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/319.a1db79eb.async.js

1283 lines
2.6 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[319],{71749:function(){"use strict"},30483:function(){"use strict"},71736:function(dn,pn){"use strict";pn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},52654:function(dn,pn){"use strict";pn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},12867:function(){"use strict"},18023:function(){"use strict";function dn(fe,z,ee,oe){ee===void 0&&(ee=0),oe===void 0&&(oe=1/0),this._name=fe,this._defaultValue=z,this._minimum=ee,this._maximum=oe}Object.defineProperty(dn.prototype,"name",{get:function(){return this._name},set:function(fe){if(typeof fe!="string"||fe==="")throw new Error("Shape name must be a valid string.");this._name=fe}}),Object.defineProperty(dn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("The default value must be a real number, not: "+fe);this._defaultValue=fe}}),Object.defineProperty(dn.prototype,"minimum",{get:function(){return this._minimum},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("Minimum must be a real number, not: "+fe);this._minimum=fe}}),Object.defineProperty(dn.prototype,"maximum",{get:function(){return this._maximum},set:function(fe){if(typeof fe!="number"||isNaN(fe))throw new Error("Maximum must be a real number, not: "+fe);this._maximum=fe}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(fe,z){var ee=go.Shape._FigureParameters[fe];return ee?ee[z]:null},go.Shape.setFigureParameter=function(fe,z,ee){if(!(ee instanceof dn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var oe=go.Shape._FigureParameters[fe];oe||(oe=[],go.Shape._FigureParameters[fe]=oe),oe[z]=ee};var pn=[];function at(fe,z){var ee=pn.pop();return ee===void 0?new go.Point(fe,z):(ee.x=fe,ee.y=z,ee)}function ot(){var fe=pn.pop();return fe===void 0?new go.Point:fe}function _t(fe){pn.push(fe)}function ae(fe,z,ee,oe,ie,le,ue,pe,Se){Se||(Se=new go.Point);var Le=fe-ee,De=ie-ue,Fe=NaN,Ae=NaN;if(Le===0)if(De===0)fe===ee&&(Fe=fe,Ae=z);else{var Oe=(le-pe)/De,ze=le-Oe*ie;Fe=fe,Ae=Oe*Fe+ze}else if(De===0){var He=(z-oe)/Le,Ye=z-He*fe;Fe=ie,Ae=He*Fe+Ye}else{var He=(z-oe)/Le,Oe=(le-pe)/De,Ye=z-He*fe,ze=le-Oe*ie;Fe=(ze-Ye)/(He-Oe),Ae=He*Fe+Ye}return Se.x=Fe,Se.y=Ae,Se}function Ge(fe,z,ee,oe,ie,le,ue,pe,Se,Le,De,Fe,Ae,Oe){var ze=1-Se,He=Se,Ye=fe*ze+ee*He,We=z*ze+oe*He,Ue=ee*ze+ie*He,st=oe*ze+le*He,dt=ie*ze+ue*He,gt=le*ze+pe*He,Et=Ye*ze+Ue*He,Ke=We*ze+st*He,et=Ue*ze+dt*He,$e=st*ze+gt*He,vt=Et*ze+et*He,wt=Ke*ze+$e*He;Le.x=Ye,Le.y=We,De.x=Et,De.y=Ke,Fe.x=vt,Fe.y=wt,Ae.x=et,Ae.y=$e,Oe.x=dt,Oe.y=gt}var Ie=new go.Spot(.156,.156),me=new go.Spot(.844,.844),de=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new dn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=5),oe=Math.min(oe,z/3),oe=Math.min(oe,ee/3);var ie=oe*de,le=new go.Geometry().add(new go.PathFigure(oe,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-oe,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,oe,z-ie,0,z,ie)).add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)).add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,ee-ie,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,oe,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,ie,ee,0,ee-ie)).add(new go.PathSegment(go.PathSegment.Line,0,oe)).add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()));return ie>1&&(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,1,-ie,-ie)),le}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(fe,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=ee/2,oe.endX=z,oe.endY=ee/2,oe}),go.Shape.defineFigureGenerator("LineV",function(fe,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=z/2,oe.startY=0,oe.endX=z/2,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(fe,z,ee){var oe=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(oe*z,(1-oe)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Move,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(fe,z,ee){var oe=z/2,ie=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,oe,oe,oe,oe).close()));return ie.spot1=Ie,ie.spot2=me,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(fe,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=0,oe.endX=z,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("Line2",function(fe,z,ee){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=z,oe.startY=0,oe.endX=0,oe.endY=ee,oe}),go.Shape.defineFigureGenerator("Curve1",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,de*z,0,z,(1-de)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,0,de*ee,(1-de)*z,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,de*ee,de*z,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-de)*z,0,0,(1-de)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new dn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)?oe=.1:oe<-1?oe=-1:oe>1&&(oe=1);var ie=Math.abs(oe)*z;if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new dn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)?oe=10:oe<-z?oe=-z:oe>z&&(oe=z);var ie=Math.abs(oe);if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("Trapezoid1",0,new dn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)?oe=.2:oe<.5?oe=-.5:oe>.5&&(oe=.5);var ie=Math.abs(oe)*z;if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new dn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)?oe=20:oe<-z?oe=-z/2:oe>z&&(oe=z/2);var ie=Math.abs(oe);if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("ManualOperation",0,new dn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)?oe=10:oe<-z?oe=-z/2:oe>z&&(oe=z/2);var ie=Math.abs(oe);if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())):le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}});var Ee=[];function we(){var fe=Ee.pop();return fe===void 0?[]:fe}function be(fe){fe.length=0,Ee.push(fe)}function Te(fe){for(var z=we(),ee=.5,oe=.5,ie=Math.PI*1.5,le=0,ue=0;ue<fe;ue++)le=2*Math.PI/fe*ue+ie,z[ue]=new go.Point(oe+ee*Math.cos(le),oe+ee*Math.sin(le));return z.push(z[0]),z}function ve(fe){var z=xe(fe),ee=we();ee[0]=z[0];for(var oe=1,ie=1;oe<z.length;oe+=2,ie+=3)ee[ie]=z[oe],ee[ie+1]=z[oe],ee[ie+2]=z[oe+1];return be(z),ee}function xe(fe){for(var z=Te(fe),ee=we(),oe=Math.floor(z.length/2),ie=z.length-1,le=fe%2===0?2:1,ue=0;ue<ie;ue++){var pe=z[ue],Se=z[ue+1],Le=z[(oe+ue-1)%ie],De=z[(oe+ue+le)%ie];ee[ue*2]=pe,ee[ue*2+1]=ae(pe.x,pe.y,Le.x,Le.y,Se.x,Se.y,De.x,De.y,new go.Point)}return ee[ee.length]=ee[0],be(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(fe,z,ee){var oe=Te(5),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<5;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(fe,z,ee){var oe=Te(6),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<6;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(fe,z,ee){var oe=Te(7),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<7;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(fe,z,ee){var oe=Te(8),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<8;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(fe,z,ee){var oe=Te(9),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<9;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(fe,z,ee){var oe=Te(10),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(fe,z,ee){var oe=Te(12),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(fe,z,ee){var oe=xe(5),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(fe,z,ee){var oe=xe(6),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(fe,z,ee){var oe=xe(7),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<14;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(fe,z,ee){var oe=xe(8),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<16;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(fe,z,ee){var oe=xe(9),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<18;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(fe,z,ee){var oe=xe(10),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<20;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*z,oe[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*z,oe[0].y*ee).close()),be(oe),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(fe,z,ee){var oe=ve(5),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return le.segments.last().close(),be(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(fe,z,ee){var oe=ve(6),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return le.segments.last().close(),be(oe),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(fe,z,ee){var oe=ve(7),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return le.segments.last().close(),be(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(fe,z,ee){var oe=ve(8),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return le.segments.last().close(),be(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(fe,z,ee){var oe=ve(9),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return le.segments.last().close(),be(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(fe,z,ee){var oe=ve(10),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*z,oe[0].y*ee,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*z,oe[ue+2].y*ee,oe[ue].x*z,oe[ue].y*ee,oe[ue+1].x*z,oe[ue+1].y*ee));return le.segments.last().close(),be(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new dn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new dn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(fe,z,ee){var oe=fe?fe.parameter1:NaN,ie=fe?fe.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(ie)&&(ie=8);var le=new go.Geometry,ue=new go.PathFigure(0,0,!0);return le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe<z/2&&ie<ee/2&&(ue.add(new go.PathSegment(go.PathSegment.Move,oe,ie)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,ie).close())),le.setSpots(0,0,1,1,oe,ie,-oe,-ie),le}),go.Shape.setFigureParameter("Ring",0,new dn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var ie=z/2,le=new go.Geometry,ue=new go.PathFigure(z,z/2,!0);le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var pe=Math.max(ie-oe,0);return pe>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+pe,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,pe,pe).close())),le.spot1=Ie,le.spot2=me,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*ee,-.09239631*z,.07836421*ee,.1406031*z,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*ee,.2450511*z,-.00697547*ee,.3776197*z,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*ee,.4539471*z,0,.6066018*z,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*ee,.6914277*z,-.01904177*ee,.8921095*z,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*ee,1.036446*z,.04105738*ee,1.020377*z,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*ee,1.04448*z,.360238*ee,.992256*z,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*ee,1.032337*z,.5771781*ee,1.018411*z,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*ee,1.028411*z,.9571472*ee,.8556702*z,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*ee,.7431877*z,1.009325*ee,.5624123*z,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*ee,.4820677*z,1.031761*ee,.3030112*z,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*ee,.2329994*z,1.01518*ee,.03213784*z,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*ee,-.02812061*z,.9032597*ee,-.01205169*z,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*ee,-.01812061*z,.6089503*ee,-.00606892*z,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*ee,-.01606892*z,.3892545*ee,-.01205169*z,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(fe,z,ee){var oe=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(oe*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,z,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Line,oe*z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,oe*ee).close())).setSpots(oe/2,oe/2,1-oe/2,1-oe/2)}),go.Shape.setFigureParameter("Pie",0,new dn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new dn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(fe,z,ee){var oe=fe?fe.parameter1:NaN,ie=fe?fe.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(ie)&&(ie=315);var le=oe%360;le<0&&(le+=360);var ue=ie%360,pe=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(pe,pe).add(new go.PathSegment(go.PathSegment.Arc,le,ue,pe,pe,pe,pe).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(fe,z,ee){var oe=de/Math.SQRT2*.5,ie=Math.SQRT2/2,le=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*z,le*ee,z,(1-oe)*ee,(ie+oe)*z,(le+oe)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var ie=Math.min(oe,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=Math.min(oe,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;if((isNaN(oe)||oe<0)&&(oe=30),z===0||ee===0){var ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=z,ie.endY=ee,ie}else{var le=z/2,ue=ee/2,pe=Math.atan2(ee,z),Se=oe-Math.min(Math.cos(pe)*oe/2,le),Le=oe-Math.min(Math.sin(pe)*oe/2,ue),ie=new go.Geometry,De=new go.PathFigure(Se,0,!0);return ie.add(De),De.add(new go.PathSegment(go.PathSegment.Line,le,.2*ee)),De.add(new go.PathSegment(go.PathSegment.Line,z-Se,0)),De.add(new go.PathSegment(go.PathSegment.Line,z,Le)),De.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),De.add(new go.PathSegment(go.PathSegment.Line,z,ee-Le)),De.add(new go.PathSegment(go.PathSegment.Line,z-Se,ee)),De.add(new go.PathSegment(go.PathSegment.Line,le,.8*ee)),De.add(new go.PathSegment(go.PathSegment.Line,Se,ee)),De.add(new go.PathSegment(go.PathSegment.Line,0,ee-Le)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),De.add(new go.PathSegment(go.PathSegment.Line,0,Le).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=new go.Geometry,le=new go.PathFigure(.1*z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new dn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*z,oe*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*z,(1-oe)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-oe)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*z,(1-oe)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*z,oe*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,oe*ee).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new dn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.5);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,Math.abs(1-oe)*z,.25*ee,Math.abs(1-oe)*z,.75*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*z,.75*ee,oe*z,.25*ee).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,de*z,0,z,(.5-de/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,(.5+de/2)*ee,de*z,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,0,z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*ee,.5*z,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*z,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.5*ee,.9*z,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.6*z,.2*ee,z,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*ee,z,.8*ee,.6*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,.5*z,.75*ee,.55*z,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*ee,.45*z,.95*ee,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*z,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*ee,0,.25*ee,.4*z,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.4*z,.6*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,ee,.5*z,.75*ee,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*ee,.55*z,.95*ee,.5*z,.75*ee));var le=.2,ue=.3,pe=0,Se=le*de;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Se+pe)*ee,(.5-Se+ue)*z,(.5+le+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+pe)*ee,(.5+Se+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Se+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue)*z,(.5-Se+pe)*ee,(.5+Se+ue)*z,(.5-le+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-Se+ue)*z,(.5-le+pe)*ee,(.5-le+ue+.05)*z,(.5-Se+pe-.02)*ee)),le=.2,ue=0,pe=-.3,Se=le*de,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+pe)*ee,(.5+Se+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Se+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue)*z,(.5-Se+pe)*ee,(.5+Se+ue)*z,(.5-le+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+pe)*ee,(.5-Se+ue)*z,(.5-le+pe)*ee,(.5-le+ue)*z,(.5-Se+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Se+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Se+pe)*ee,(.5-Se+ue)*z,(.5+le+pe)*ee)),le=.2,ue=-.3,pe=0,Se=le*de,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+pe)*ee,(1-.5+le+ue-.05)*z,(.5-Se+pe-.02)*ee,(.5+Se+ue)*z,(.5-le+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+pe)*ee,(.5-Se+ue)*z,(.5-le+pe)*ee,(.5-le+ue)*z,(.5-Se+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+pe)*ee,(.5-le+ue)*z,(.5+Se+pe)*ee,(.5-Se+ue)*z,(.5+le+pe)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+Se+ue)*z,(.5+le+pe)*ee,(.5+le+ue)*z,(.5+Se+pe)*ee).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.5,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var le=.1,ue=.5,pe=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ue+le)*z,pe*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*pe,le*z,le*z).close()),ie=new go.PathFigure(z*.5,0,!1),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),pe=.75,ie=new go.PathFigure((ue+le)*z,pe*ee,!0),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*pe,le*z,le*z).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(fe,z,ee){var oe=.8535533905932737,ie=.5*z,le=.5*ee;return new go.Geometry().add(new go.PathFigure(ie,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,ie,le,ie,le)).add(new go.PathSegment(go.PathSegment.Line,ie,ee)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,oe*z,oe*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=.5,ue=.5,pe=.5,Se=new go.PathFigure(ue*z,(pe-le)*ee);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-ie)*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue+le)*z,(pe-ie)*ee,(ue+ie)*z,(pe-le)*ee)),le=.4,ie=de*.4;var Le=ot(),De=ot(),Fe=ot(),Ae=ot();Ge(ue,pe-le,ue+ie,pe-le,ue+le,pe-ie,ue+le,pe,.42,Le,De,Fe,Ae,Ae);var Oe=ot(),ze=ot(),He=ot();Ge(ue,pe-le,ue+ie,pe-le,ue+le,pe-ie,ue+le,pe,.58,Ae,Ae,He,Oe,ze);var Ye=ot(),We=ot(),Ue=ot();Ge(ue,pe+le,ue-ie,pe+le,ue-le,pe+ie,ue-le,pe,.42,Ye,We,Ue,Ae,Ae);var st=ot(),dt=ot(),gt=ot();return Ge(ue,pe+le,ue-ie,pe+le,ue-le,pe+ie,ue-le,pe,.58,Ae,Ae,gt,st,dt),Se.add(new go.PathSegment(go.PathSegment.Move,gt.x*z,gt.y*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,st.x*z,st.y*ee,dt.x*z,dt.y*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*z,Fe.y*ee,Le.x*z,Le.y*ee,De.x*z,De.y*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,gt.x*z,gt.y*ee).close()),Se.add(new go.PathSegment(go.PathSegment.Move,Ue.x*z,Ue.y*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,He.x*z,He.y*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,Oe.x*z,Oe.y*ee,ze.x*z,ze.y*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,Ue.x*z,Ue.y*ee,Ye.x*z,Ye.y*ee,We.x*z,We.y*ee).close()),_t(Le),_t(De),_t(Fe),_t(Ae),_t(Oe),_t(ze),_t(He),_t(Ye),_t(We),_t(Ue),_t(st),_t(dt),_t(gt),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Fragile",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*z,0)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.5*ee,z,.25*ee,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new dn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30),oe>z&&(oe=z);var ie=(z-oe)/2,le=ie+oe;return new go.Geometry().add(new go.PathFigure(le,.5*ee).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(fe,z,ee){var oe=new go.Geometry,ie=de*.4,le=.4,ue=.5,pe=.5,Se=ot(),Le=ot(),De=ot(),Fe=ot(),Ae=new go.PathFigure((ue-le)*z,pe*ee,!1);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee)),Ge(ue,pe-le,ue+ie,pe-le,ue+le,pe-ie,ue+le,pe,.44,De,Fe,Le,Se,Se),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*z,Le.y*ee,De.x*z,De.y*ee,Fe.x*z,Fe.y*ee));var Oe=at(Le.x,Le.y);Ge(ue,pe-le,ue+ie,pe-le,ue+le,pe-ie,ue+le,pe,.56,Se,Se,Le,De,Fe);var ze=at(Le.x,Le.y);Ae.add(new go.PathSegment(go.PathSegment.Line,(Oe.x*.1+.95*.9)*z,Oe.y*.1*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,Oe.y*.1*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,(ze.x*.1+.9)*z,.15*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,(ze.x*.1+.9)*z,(ze.y*.1+.05*.9)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,ze.x*z,ze.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,De.x*z,De.y*ee,Fe.x*z,Fe.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-ie)*z,(pe+le)*ee,(ue-le)*z,(pe+ie)*ee)),le=.35,ie=de*.35;var He=new go.PathFigure(ue*z,(pe-le)*ee,!1);oe.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-ie)*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue+le)*z,(pe-ie)*ee,(ue+ie)*z,(pe-le)*ee));var Ye=new go.PathFigure((ue-le)*z,pe*ee,!1);return oe.add(Ye),_t(Se),_t(Le),_t(De),_t(Fe),_t(Oe),_t(ze),oe.spot1=new go.Spot(.202,.257),oe.spot2=new go.Spot(.792,.739),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("GenderFemale",function(fe,z,ee){var oe=new go.Geometry,ie=.375,le=0,ue=-.125,pe=ie*de,Se=new go.PathFigure((.525+le)*z,(.5+ie+ue)*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ue)*ee,(.5+pe+le)*z,(.5+ie+ue)*ee,(.5+ie+le)*z,(.5+pe+ue)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ue)*ee,(1-.5+ie+le)*z,(.5-pe+ue)*ee,(.5+pe+le)*z,(.5-ie+ue)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-pe+ue)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+ie+ue)*ee,(.5-ie+le)*z,(.5+pe+ue)*ee,(.5-pe+le)*z,(.5+ie+ue)*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.475*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.525*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee).close()),ie=.325,le=0,ue=-.125,pe=ie*de;var Se=new go.PathFigure((1-.5+ie+le)*z,(.5+ue)*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+ie+ue)*ee,(.5+ie+le)*z,(.5+pe+ue)*ee,(.5+pe+le)*z,(.5+ie+ue)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5+ie+ue)*ee,(.5-ie+le)*z,(.5+pe+ue)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-pe+ue)*ee,(.5-pe+le)*z,(.5-ie+ue)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ue)*ee,(.5+pe+le)*z,(.5-ie+ue)*ee,(1-.5+ie+le)*z,(.5-pe+ue)*ee));var Se=new go.PathFigure((.525+le)*z,(.5+ie+ue)*ee,!1);return oe.add(Se),oe.spot1=new go.Spot(.232,.136),oe.spot2=new go.Spot(.682,.611),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicImplies",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,oe*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,oe*z,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(fe,z,ee){var oe=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*ee,.5*z,.5*ee)));return oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicTruth",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(fe,z,ee){var oe=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,oe*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,oe*z,oe*ee,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(fe,z,ee){var oe=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,oe*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,oe*z,oe*ee,oe*z,oe*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new dn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new dn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.3);var le=(1-oe)*z,ue=(.5-ie/2)*ee,pe=(.5+ie/2)*ee,Se=new go.Geometry,Le=new go.PathFigure(0,ue,!0);Se.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,le,ue)),Le.add(new go.PathSegment(go.PathSegment.Line,le,0)),Le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,le,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,le,pe)),Le.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),Se.spot1=new go.Spot(0,ue/ee);var De=ae(0,pe/ee,1,pe/ee,le/z,1,1,.5,ot());return Se.spot2=new go.Spot(De.x,De.y),_t(De),Se}),go.Shape.setFigureParameter("Arrow2",0,new dn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new dn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=30),oe>z&&(oe=z);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,ee/2);var le=z-oe,ue=(ee-ie)/2,pe=ue+ie,Se=new go.Geometry,Le=new go.PathFigure(0,ue,!0);Se.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,le,ue)),Le.add(new go.PathSegment(go.PathSegment.Line,le,0)),Le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,le,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,le,pe)),Le.add(new go.PathSegment(go.PathSegment.Line,0,pe).close()),Se.spot1=new go.Spot(0,ue/ee);var De=ae(0,pe/ee,1,pe/ee,le/z,1,1,.5,ot());return Se.spot2=new go.Spot(De.x,De.y),_t(De),Se}),go.Shape.defineFigureGenerator("Chevron",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("DoubleArrow",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),oe}),go.Shape.setFigureParameter("DoubleEndArrow",0,new dn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,le=(.5+oe/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var Se=ae(0,.5,.3,0,0,ie/ee,.1,ie/ee,ot());return ue.spot1=new go.Spot(Se.x,Se.y),Se=ae(.7,1,1,.5,0,le/ee,1,le/ee,Se),ue.spot2=new go.Spot(Se.x,Se.y),_t(Se),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new dn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new dn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(ee-oe)/2,ue=le+oe,pe=(ee-ie)/2,Se=pe+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,le=(ee-oe)/2,ue=le+oe,pe=0,Se=ee):(le=0,ue=ee,pe=0,Se=ee));var Le=new go.Geometry,De=new go.PathFigure(z,.5*ee,!0);Le.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,Se)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,ue)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,Se)),De.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close());var Fe=ae(0,.5,.3,pe/ee,0,le/ee,1,le/ee,ot());return Le.spot1=new go.Spot(Fe.x,Fe.y),Fe=ae(.7,Se/ee,1,.5,0,ue/ee,1,ue/ee,Fe),Le.spot2=new go.Spot(Fe.x,Fe.y),_t(Fe),Le}),go.Shape.setFigureParameter("IBeamArrow",0,new dn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*ee,le=(.5+oe/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(0,ie/ee);var Se=ae(.7,1,1,.5,0,le/ee,1,le/ee,ot());return ue.spot2=new go.Spot(Se.x,Se.y),_t(Se),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new dn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new dn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(ee-oe)/2,ue=le+oe,pe=(ee-ie)/2,Se=pe+ie;(oe>ee||ie>ee)&&(ie>oe?(oe=oe*ee/ie,le=(ee-oe)/2,ue=le+oe,pe=0,Se=ee):(le=0,ue=ee,pe=0,Se=ee));var Le=new go.Geometry,De=new go.PathFigure(z,.5*ee,!0);Le.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,Se)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,Se)),De.add(new go.PathSegment(go.PathSegment.Line,0,Se)),De.add(new go.PathSegment(go.PathSegment.Line,0,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,pe)),De.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*z,pe).close()),Le.spot1=new go.Spot(0,le/ee);var Fe=ae(.7,Se/ee,1,.5,0,ue/ee,1,ue/ee,ot());return Le.spot2=new go.Spot(Fe.x,Fe.y),_t(Fe),Le}),go.Shape.setFigureParameter("Pointer",0,new dn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.1);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,oe*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(oe,.35);var ue=ae(.2,.65,1,.65,0,1,1,.5,ot());return ie.spot2=new go.Spot(ue.x,ue.y),_t(ue),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new dn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*z,.75*ee,oe*z,.25*ee).close()),ie.spot1=new go.Spot(oe,.35);var ue=ae(0,.65,1,.65,0,1,1,.5,ot());return ie.spot2=new go.Spot(ue.x,ue.y),_t(ue),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new dn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.4);var ie=(.5-oe/2)*ee,le=(.5+oe/2)*ee,ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,.3);var Se=ae(.7,1,1,.5,0,le/ee,1,le/ee,ot());return ue.spot2=new go.Spot(Se.x,Se.y),_t(Se),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new dn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=50);var ie=(ee-oe)/2,le=ie+oe;oe>ee&&(ie=0,le=ee);var ue=new go.Geometry,pe=new go.PathFigure(z,.5*ee,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),pe.add(new go.PathSegment(go.PathSegment.Line,0,le)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,ie/ee);var Se=ae(.7,1,1,.5,0,le/ee,1,le/ee,ot());return ue.spot2=new go.Spot(Se.x,Se.y),_t(Se),ue}),go.Shape.setFigureParameter("SquareArrow",0,new dn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.7);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,oe*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,oe*z,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(oe,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=de*.1,ue=new go.PathFigure(0,.9*ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee).close()),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.97),oe}),go.Shape.defineFigureGenerator("Cone2",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.9*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,ee,.85/.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var le=new go.PathFigure(0,.9*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,.8*ee,.85/.9*z,.8*ee)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.82),oe}),go.Shape.defineFigureGenerator("Cube1",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.5,.85),oe}),go.Shape.defineFigureGenerator("Cube2",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.3*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var le=new go.PathFigure(0,.3*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.7,1),oe}),go.Shape.defineFigureGenerator("Cylinder1",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,le=de*.5,ue=new go.PathFigure(0,oe,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,de*oe,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*z,oe,(.5+le)*z,0,1*z,de*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-de*oe,(.5+le)*z,1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-le)*z,1*ee,0,ee-de*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,0,oe));var pe=new go.PathFigure(z,oe,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*oe,1*z,2*oe-de*oe,(.5+le)*z,2*oe)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,oe,(.5-le)*z,2*oe,0,2*oe-de*oe)),ie.spot1=new go.Spot(0,0,0,2*oe),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,le=de*.5,ue=new go.PathFigure(0,ee-oe,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,de*oe,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,(.5+le)*z,0,z,de*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-de*oe,(.5+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-oe,(.5-le)*z,ee,0,ee-de*oe));var pe=new go.PathFigure(0,ee-oe,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*oe,0,ee-oe-de*oe,(.5-le)*z,ee-2*oe)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,ee-oe,(.5+le)*z,ee-2*oe,z,ee-oe-de*oe)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*oe),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,le=de*.5,ue=new go.PathFigure(oe,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-de*oe,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+le)*ee,z-de*oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,de*oe,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-le)*ee,de*oe,0));var pe=new go.PathFigure(oe,0,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*ee,oe+de*oe,0,2*oe,(.5-le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,oe,ee,2*oe,(.5+le)*ee,oe+de*oe,ee)),ie.spot1=new go.Spot(0,0,2*oe,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,le=de*.5,ue=new go.PathFigure(z-oe,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-de*oe,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z,(.5+le)*ee,z-de*oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,de*oe,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-le)*ee,de*oe,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z-oe,0));var pe=new go.PathFigure(z-oe,0,!1);return ie.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-2*oe,.5*ee,z-oe-de*oe,0,z-2*oe,(.5-le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,ee,z-2*oe,(.5+le)*ee,z-oe-de*oe,ee)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*oe,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,.25*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.25*z,.25*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.408,.172),oe.spot2=new go.Spot(.833,.662),oe}),go.Shape.defineFigureGenerator("Prism2",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("Pyramid1",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var le=new go.PathFigure(.5*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Pyramid2",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Actor",function(fe,z,ee){var oe=new go.Geometry,ie=.2,le=.1,ue=de*ie,pe=de*le,Se=.5,Le=.1,De=new go.PathFigure(Se*z,(Le+le)*ee,!0);oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,(Se-ie)*z,Le*ee,(Se-ue)*z,(Le+le)*ee,(Se-ie)*z,(Le+pe)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le-le)*ee,(Se-ie)*z,(Le-pe)*ee,(Se-ue)*z,(Le-le)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Se+ie)*z,Le*ee,(Se+ue)*z,(Le-le)*ee,(Se+ie)*z,(Le-pe)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le+le)*ee,(Se+ie)*z,(Le+pe)*ee,(Se+ue)*z,(Le+le)*ee));var Fe=.05,Ae=de*Fe;Se=.05,Le=.25;var Oe=new go.PathFigure(.5*z,.2*ee,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),Se=.95,Le=.25,Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Se+Fe)*z,Le*ee,(Se+Ae)*z,(Le-Fe)*ee,(Se+Fe)*z,(Le-Ae)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),Fe=.025,Ae=de*Fe,Se=.825,Le=.35,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le-Fe)*ee,(Se+Fe)*z,(Le-Ae)*ee,(Se+Ae)*z,(Le-Fe)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Se-Fe)*z,Le*ee,(Se-Ae)*z,(Le-Fe)*ee,(Se-Fe)*z,(Le-Ae)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),Fe=.05,Ae=de*Fe,Se=.5,Le=.7,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le-Fe)*ee,(Se+Fe)*z,(Le-Ae)*ee,(Se+Ae)*z,(Le-Fe)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Se-Fe)*z,Le*ee,(Se-Ae)*z,(Le-Fe)*ee,(Se-Fe)*z,(Le-Ae)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),Fe=.025,Ae=de*Fe,Se=.175,Le=.35,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le-Fe)*ee,(Se+Fe)*z,(Le-Ae)*ee,(Se+Ae)*z,(Le-Fe)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Se-Fe)*z,Le*ee,(Se-Ae)*z,(Le-Fe)*ee,(Se-Fe)*z,(Le-Ae)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Fe=.05,Ae=de*Fe,Se=.05,Le=.25,Oe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le-Fe)*ee,(Se-Fe)*z,(Le-Ae)*ee,(Se-Ae)*z,(Le-Fe)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),oe.spot1=new go.Spot(.2,.2),oe.spot2=new go.Spot(.8,.65),oe}),go.Shape.setFigureParameter("Card",0,new dn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,le=new go.PathFigure(z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,oe*ee)),le.add(new go.PathSegment(go.PathSegment.Line,oe*z,0).close()),ie.spot1=new go.Spot(0,oe),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee));var le=new go.PathFigure(.5*z,.5*ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,.25),oe}),go.Shape.defineFigureGenerator("CreateRequest",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("Database",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=de*.1,ue=new go.PathFigure(z,.1*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-le)*ee));var pe=new go.PathFigure(z,.1*ee,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+ie)*z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+ie)*z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+le)*ee,(.5+ie)*z,.4*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-ie)*z,.4*ee,0,(.3+le)*ee)),oe.spot1=new go.Spot(0,.4),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("DataStorage",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*ee,.25*z,.1*ee).close()),oe.spot1=new go.Spot(.226,0),oe.spot2=new go.Spot(.81,1),oe}),go.Shape.defineFigureGenerator("DiskStorage",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=de*.1,ue=new go.PathFigure(z,.1*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-le)*ee));var pe=new go.PathFigure(z,.1*ee,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+ie)*z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+le)*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+ie)*z,.3*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+le)*ee)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("Display",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("DividedEvent",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var le=de*.2,ue=new go.PathFigure(0,.2*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-le)*ee,(.2-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+le)*z,0,z,(.2-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+le)*ee,(.8+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-le)*z,ee,0,(.8+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var pe=new go.PathFigure(0,ie*ee,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("DividedProcess",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),oe}),go.Shape.defineFigureGenerator("Document",function(fe,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("ExternalOrganization",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(.1*z,.4*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*ee)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("File",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.75*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Interrupt",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee));var le=new go.PathFigure(z,.5*ee,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee));var ue=new go.PathFigure(z,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("InternalStorage",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.1);var ue=new go.PathFigure(0,0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var pe=new go.PathFigure(ie*z,0,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Move,0,le*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*ee)),oe}),go.Shape.defineFigureGenerator("Junction",function(fe,z,ee){var oe=new go.Geometry,ie=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ue=de*.5,pe=.5,Se=new go.PathFigure(z,pe*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,ee,z,(pe+ue)*ee,(pe+ue)*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*ee,(pe-ue)*z,ee,0,(pe+ue)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,0,0,(pe-ue)*ee,(pe-ue)*z,0)),Se.add(new go.PathSegment(go.PathSegment.Bezier,z,pe*ee,(pe+ue)*z,0,z,(pe-ue)*ee));var Le=new go.PathFigure((le+ie)*z,(le+ie)*ee,!1);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,le*z,le*ee)),Le.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+ie)*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,(le+ie)*z,le*ee)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(fe,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close());var le=new go.PathFigure(.1*z,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*ee)),oe.spot1=new go.Spot(.1,0),oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("LoopLimit",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MagneticTape",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=.5,ue=new go.PathFigure(.5*z,ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*z,.9*ee,z,(le+ie)*ee,(le+ie)*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),oe.spot1=new go.Spot(.15,.15),oe.spot2=new go.Spot(.85,.8),oe}),go.Shape.defineFigureGenerator("ManualInput",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MessageFromUser",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.7);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("MicroformProcessing",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("MicroformRecording",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("MultiDocument",function(fe,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*ee,.96*z,.47*ee,.93*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*ee,.86*z,.57*ee,.83*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*z,.4*ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var le=new go.PathFigure(.1*z,.2*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.8,.77),oe}),go.Shape.defineFigureGenerator("MultiProcess",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,.1*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close());var le=new go.PathFigure(.2*z,.1*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),oe.spot1=new go.Spot(0,.2),oe.spot2=new go.Spot(.8,1),oe}),go.Shape.defineFigureGenerator("OfflineStorage",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=1-ie,ue=new go.PathFigure(0,0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close());var pe=new go.PathFigure(.5*ie*z,ie*ee,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*ee)),oe}),go.Shape.defineFigureGenerator("OffPageConnector",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("Or",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+ie)*ee,(le+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee));var pe=new go.PathFigure(z,.5*ee,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),oe}),go.Shape.defineFigureGenerator("PaperTape",function(fe,z,ee){var oe=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.5*z,.6*ee,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),oe.spot1=new go.Spot(0,.49),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN,le=fe?fe.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Procedure",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure((1-ie)*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe}),go.Shape.defineFigureGenerator("Process",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(0,.5*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.5),oe}),go.Shape.defineFigureGenerator("Start",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(ie*z,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee));var ue=new go.PathFigure(ie*z,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),oe.spot1=new go.Spot(ie,0),oe.spot2=new go.Spot(1-ie,1),oe}),go.Shape.defineFigureGenerator("Terminator",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee)),oe.spot1=new go.Spot(.23,0),oe.spot2=new go.Spot(.77,1),oe}),go.Shape.defineFigureGenerator("TransmittalTape",function(fe,z,ee){var oe=new go.Geometry,ie=fe?fe.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*ee).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("AndGate",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(.5+ie)*z,0,z,(.5-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.5+ie)*ee,(.5+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.55,1),oe}),go.Shape.defineFigureGenerator("Buffer",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Clock",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+ie)*ee,(le+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee));var pe=new go.PathFigure(z,le*ee,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,le*ee));var Se=new go.PathFigure(.8*z,.75*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*ee)),oe}),go.Shape.defineFigureGenerator("Ground",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),oe}),go.Shape.defineFigureGenerator("Inverter",function(fe,z,ee){var oe=new go.Geometry,ie=de*.1,le=.1,ue=.9,pe=.5,Se=new go.PathFigure(.8*z,.5*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Se.add(new go.PathSegment(go.PathSegment.Line,0,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee));var Le=new go.PathFigure((ue+le)*z,pe*ee,!0);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-ie)*z,(pe+le)*ee,(ue-le)*z,(pe+ie)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+ie)*z,(pe-le)*ee,(ue+le)*z,(pe-ie)*ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.4,.75),oe}),go.Shape.defineFigureGenerator("NandGate",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=de*.4,ue=de*.1,pe=.1,Se=.9,Le=.5,De=new go.PathFigure(.8*z,.5*ee,!0);oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+le)*ee,(.4+ie)*z,ee)),De.add(new go.PathSegment(go.PathSegment.Line,0,ee)),De.add(new go.PathSegment(go.PathSegment.Line,0,0)),De.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),De.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+ie)*z,0,.8*z,(.5-le)*ee));var Fe=new go.PathFigure((Se+pe)*z,Le*ee,!0);return oe.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le+pe)*ee,(Se+pe)*z,(Le+ue)*ee,(Se+ue)*z,(Le+pe)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Se-pe)*z,Le*ee,(Se-ue)*z,(Le+pe)*ee,(Se-pe)*z,(Le+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le-pe)*ee,(Se-pe)*z,(Le-ue)*ee,(Se-ue)*z,(Le-pe)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Se+pe)*z,Le*ee,(Se+ue)*z,(Le-pe)*ee,(Se+pe)*z,(Le-ue)*ee)),oe.spot1=new go.Spot(0,.05),oe.spot2=new go.Spot(.55,.95),oe}),go.Shape.defineFigureGenerator("NorGate",function(fe,z,ee){var oe=new go.Geometry,ie=.5,le=de*ie,ue=0,pe=.5,Se=new go.PathFigure(.8*z,.5*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(pe-ie)*ee,.7*z,(pe-le)*ee)),ie=.1,le=de*.1,ue=.9,pe=.5;var Le=new go.PathFigure((ue-ie)*z,pe*ee,!0);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,pe*ee,(ue+le)*z,(pe-ie)*ee,(ue+ie)*z,(pe-le)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,pe*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee)),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.6,.75),oe}),go.Shape.defineFigureGenerator("OrGate",function(fe,z,ee){var oe=new go.Geometry,ie=.5,le=de*ie,ue=0,pe=.5,Se=new go.PathFigure(0,0,!0);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le+le)*z,(pe-ie)*ee,.8*z,(pe-le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(pe+le)*ee,(ue+le+le)*z,(pe+ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee).close()),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("XnorGate",function(fe,z,ee){var oe=new go.Geometry,ie=.5,le=de*ie,ue=.2,pe=.5,Se=new go.PathFigure(.1*z,0,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var Le=new go.PathFigure(.8*z,.5*ee,!0);oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(pe-ie)*ee,.7*z,(pe-le)*ee)),ie=.1,le=de*.1,ue=.9,pe=.5;var De=new go.PathFigure((ue-ie)*z,pe*ee,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,pe*ee,(ue+le)*z,(pe-ie)*ee,(ue+ie)*z,(pe-le)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,pe*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee)),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.65,.75),oe}),go.Shape.defineFigureGenerator("XorGate",function(fe,z,ee){var oe=new go.Geometry,ie=.5,le=de*ie,ue=.2,pe=.5,Se=new go.PathFigure(.1*z,0,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var Le=new go.PathFigure(.2*z,0,!0);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le)*z,(pe-ie)*ee,.9*z,(pe-le)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee).close()),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.8,.75),oe}),go.Shape.defineFigureGenerator("Capacitor",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("Resistor",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Inductor",function(fe,z,ee){var oe=new go.Geometry,ie=de*.1,le=.1,ue=.1,pe=.5,Se=new go.PathFigure((ue-ie*.5)*z,ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.3,Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.5,Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.7,Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.9,Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie*.5)*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(fe,z,ee){var oe=new go.Geometry,ie=de*.5,le=.5,ue=.5,pe=.5,Se=new go.PathFigure((ue-le)*z,pe*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+ie)*z,(pe-le)*ee,(ue+le)*z,(pe-ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-ie)*z,(pe+le)*ee,(ue-le)*z,(pe+ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Move,(ue-le+.1)*z,pe*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le-.1)*z,pe*ee,ue*z,(pe-le)*ee,ue*z,(pe+le)*ee)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("Diode",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Wifi",function(fe,z,ee){var oe=new go.Geometry,ie=z,le=ee;z=z*.38,ee=ee*.6;var ue=de*.8,pe=.8,Se=0,Le=.5,De=(ie-z)/2,Fe=(le-ee)/2,Ae=new go.PathFigure(Se*z+De,(Le+pe)*ee+Fe,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Se-pe)*z+De,Le*ee+Fe,(Se-ue)*z+De,(Le+pe)*ee+Fe,(Se-pe)*z+De,(Le+ue)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le-pe)*ee+Fe,(Se-pe)*z+De,(Le-ue)*ee+Fe,(Se-ue)*z+De,(Le-pe)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Se-pe+ue*.5)*z+De,Le*ee+Fe,Se*z+De,(Le-pe)*ee+Fe,(Se-pe+ue*.5)*z+De,(Le-ue)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le+pe)*ee+Fe,(Se-pe+ue*.5)*z+De,(Le+ue)*ee+Fe,Se*z+De,(Le+pe)*ee+Fe).close()),ue=de*.4,pe=.4,Se=.2,Le=.5;var Oe=new go.PathFigure(Se*z+De,(Le+pe)*ee+Fe,!0);oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Se-pe)*z+De,Le*ee+Fe,(Se-ue)*z+De,(Le+pe)*ee+Fe,(Se-pe)*z+De,(Le+ue)*ee+Fe)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le-pe)*ee+Fe,(Se-pe)*z+De,(Le-ue)*ee+Fe,(Se-ue)*z+De,(Le-pe)*ee+Fe)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(Se-pe+ue*.5)*z+De,Le*ee+Fe,Se*z+De,(Le-pe)*ee+Fe,(Se-pe+ue*.5)*z+De,(Le-ue)*ee+Fe)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le+pe)*ee+Fe,(Se-pe+ue*.5)*z+De,(Le+ue)*ee+Fe,Se*z+De,(Le+pe)*ee+Fe).close()),ue=de*.2,pe=.2,Se=.5,Le=.5;var ze=new go.PathFigure((Se-pe)*z+De,Le*ee+Fe,!0);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le-pe)*ee+Fe,(Se-pe)*z+De,(Le-ue)*ee+Fe,(Se-ue)*z+De,(Le-pe)*ee+Fe)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Se+pe)*z+De,Le*ee+Fe,(Se+ue)*z+De,(Le-pe)*ee+Fe,(Se+pe)*z+De,(Le-ue)*ee+Fe)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le+pe)*ee+Fe,(Se+pe)*z+De,(Le+ue)*ee+Fe,(Se+ue)*z+De,(Le+pe)*ee+Fe)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Se-pe)*z+De,Le*ee+Fe,(Se-ue)*z+De,(Le+pe)*ee+Fe,(Se-pe)*z+De,(Le+ue)*ee+Fe)),ue=de*.4,pe=.4,Se=.8,Le=.5;var He=new go.PathFigure(Se*z+De,(Le-pe)*ee+Fe,!0);oe.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(Se+pe)*z+De,Le*ee+Fe,(Se+ue)*z+De,(Le-pe)*ee+Fe,(Se+pe)*z+De,(Le-ue)*ee+Fe)),He.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le+pe)*ee+Fe,(Se+pe)*z+De,(Le+ue)*ee+Fe,(Se+ue)*z+De,(Le+pe)*ee+Fe)),He.add(new go.PathSegment(go.PathSegment.Bezier,(Se+pe-ue*.5)*z+De,Le*ee+Fe,Se*z+De,(Le+pe)*ee+Fe,(Se+pe-ue*.5)*z+De,(Le+ue)*ee+Fe)),He.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le-pe)*ee+Fe,(Se+pe-ue*.5)*z+De,(Le-ue)*ee+Fe,Se*z+De,(Le-pe)*ee+Fe).close()),ue=de*.8,pe=.8,Se=1,Le=.5;var Ye=new go.PathFigure(Se*z+De,(Le-pe)*ee+Fe,!0);return oe.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Se+pe)*z+De,Le*ee+Fe,(Se+ue)*z+De,(Le-pe)*ee+Fe,(Se+pe)*z+De,(Le-ue)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le+pe)*ee+Fe,(Se+pe)*z+De,(Le+ue)*ee+Fe,(Se+ue)*z+De,(Le+pe)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Se+pe-ue*.5)*z+De,Le*ee+Fe,Se*z+De,(Le+pe)*ee+Fe,(Se+pe-ue*.5)*z+De,(Le+ue)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Se*z+De,(Le-pe)*ee+Fe,(Se+pe-ue*.5)*z+De,(Le-ue)*ee+Fe,Se*z+De,(Le-pe)*ee+Fe).close()),oe}),go.Shape.defineFigureGenerator("Email",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*ee)),oe}),go.Shape.defineFigureGenerator("Ethernet",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var le=new go.PathFigure(.1*z,ee,!0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var ue=new go.PathFigure(.6*z,ee,!0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee).close());var pe=new go.PathFigure(0,.5*ee,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),oe}),go.Shape.defineFigureGenerator("Power",function(fe,z,ee){var oe=new go.Geometry,ie=de*.4,le=.4,ue=.5,pe=.5,Se=ot(),Le=ot(),De=ot(),Fe=ot();Ge(ue,pe-le,ue+ie,pe-le,ue+le,pe-ie,ue+le,pe,.5,Se,Se,Le,De,Fe);var Ae=at(Le.x,Le.y),Oe=new go.PathFigure(Le.x*z,Le.y*ee,!0);oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,De.x*z,De.y*ee,Fe.x*z,Fe.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,(ue-ie)*z,(pe+le)*ee,(ue-le)*z,(pe+ie)*ee)),Ge(ue-le,pe,ue-le,pe-ie,ue-ie,pe-le,ue,pe-le,.5,De,Fe,Le,Se,Se),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*z,Le.y*ee,De.x*z,De.y*ee,Fe.x*z,Fe.y*ee)),ie=de*.3,le=.3,Ge(ue-le,pe,ue-le,pe-ie,ue-ie,pe-le,ue,pe-le,.5,De,Fe,Le,Se,Se),Oe.add(new go.PathSegment(go.PathSegment.Line,Le.x*z,Le.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,pe*ee,Fe.x*z,Fe.y*ee,De.x*z,De.y*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+le)*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,pe*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Ge(ue,pe-le,ue+ie,pe-le,ue+le,pe-ie,ue+le,pe,.5,Se,Se,Le,De,Fe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*z,Le.y*ee,Fe.x*z,Fe.y*ee,De.x*z,De.y*ee).close());var Oe=new go.PathFigure(.45*z,0,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Oe.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),_t(Se),_t(Le),_t(De),_t(Fe),_t(Ae),oe.spot1=new go.Spot(.25,.45),oe.spot2=new go.Spot(.75,.8),oe}),go.Shape.defineFigureGenerator("Fallout",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee/2,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,ee/2,z/2,ee/2));function le(ue,pe,Se){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+pe)*z,(.8+Se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+pe)*z,(.5+Se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+pe)*z,(.5+Se)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+pe)*z,(.8+Se)*ee).close())}return le(ie,0,0),le(ie,.4,0),le(ie,.2,-.3),oe}),go.Shape.defineFigureGenerator("IrritationHazard",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.2*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),oe.spot1=new go.Spot(.3,.3),oe.spot2=new go.Spot(.7,.7),oe}),go.Shape.defineFigureGenerator("ElectricalHazard",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.37*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.37*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),oe}),go.Shape.defineFigureGenerator("FireHazard",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*ee,.45*z,.44*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*ee,.48*z,.17*ee,.54*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*ee,.59*z,.29*ee,.58*z,.28*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*ee,.8*z,.34*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*ee,.87*z,.48*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,1.17*z,.76*ee,.82*z,.8*ee).close()),oe.spot1=new go.Spot(.07,.445),oe.spot2=new go.Spot(.884,.958),oe}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(fe,z,ee){var oe=new go.Geometry,ie=.5,le=0,ue=0,pe=ie*de,Se=.4*Math.SQRT2/2+.5,Le=.5-.5*Math.SQRT2/2,De=1,Fe=.5,Ae=.5,Oe=0,ze=new go.PathFigure(Se*z,(1-Le)*ee,!1);return oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,De*z,Fe*ee,De*z,.7*ee,De*z,Fe*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+le)*z,(Oe+le)*ee,(.5+ie+le)*z,(.5-pe+le)*ee,(.5+pe+le)*z,(.5-ie+le)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-pe+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-pe+ue)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*ee,(.5-ie+le)*z,(.5+pe+ue)*ee,(.5-pe+le)*z,.9*ee)),ze.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*z,.95*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var le=new go.PathFigure(z,ee,!1);oe.add(le);var ue=new go.PathFigure(0,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),oe}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close()),oe}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var ie=new go.PathFigure(0,.2*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),oe}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.7*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,ee,.4*z,.5*ee,z,.5*ee).close());var le=new go.PathFigure(.45*z,.73*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*ee)),oe}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var le=new go.PathFigure(.335*z,(1-.555)*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*ee,(1-.12)*z,.46*ee,(1-.02)*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*ee,.02*z,.54*ee,.12*z,.46*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*ee));var ue=.5-.285,pe=.5,Se=ue,Le=Math.PI/4,De=4*(1-Math.cos(Le))/(3*Math.sin(Le)),Fe=De*.5,Ae=ue,Oe=ue,ze=De*Ae,He=De*Oe;le.add(new go.PathSegment(go.PathSegment.Bezier,(pe-Ae)*z,Se*ee,(pe-(ze+Ae)/2)*z,(Se+(Oe+He)/2)*ee,(pe-Ae)*z,(Se+He)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,pe*z,(Se-Oe)*ee,(pe-Ae)*z,(Se-He)*ee,(pe-ze)*z,(Se-Oe)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(pe+Ae)*z,Se*ee,(pe+ze)*z,(Se-Oe)*ee,(pe+Ae)*z,(Se-He)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(pe+Ae)*z,(Se+He)*ee,(pe+(ze+Ae)/2)*z,(Se+(Oe+He)/2)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee));var Ye=new go.PathFigure(.2*z,ee,!1);oe.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var We=new go.PathFigure(.8*z,ee,!1);return oe.add(We),We.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var le=new go.PathFigure(.2*z,.2*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventError",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var le=new go.PathFigure(z,ee,!1);oe.add(le);var ue=new go.PathFigure(.1*z,ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Caution",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.05*z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*ee,0,ee,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*ee,.5*z,0,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,z,ee,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,ee));var le=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-le)*z,.875*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*ee,le*z,le*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*ee,.575*z,.725*ee,.625*z,.375*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*ee,.375*z,.375*ee,.425*z,.725*ee)),oe}),go.Shape.defineFigureGenerator("Recycle",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.45*z,.95*ee,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*ee,.17*z,.95*ee,.15*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*ee,0,.675*ee,0,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*ee));var le=new go.PathFigure(.475*z,.2*ee,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*ee,.35*z,0,.375*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*ee,.625*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*ee));var ue=new go.PathFigure(.675*z,.575*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),oe}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(fe,z,ee){var oe=new go.Geometry,ie=.5,le=de*.5,ue=new go.PathFigure(z,ie*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,ee,z,(ie+le)*ee,(ie+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*ee,(ie-le)*z,ee,0,(ie+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-le)*ee,(ie-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ie*ee,(ie+le)*z,0,z,(ie-le)*ee));var pe=new go.PathFigure(ie*z,0,!1);return oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,0,ie*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),pe.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),oe}),go.Shape.defineFigureGenerator("Package",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.15*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,.15*ee,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*ee).close()),oe.spot1=new go.Spot(0,.1),oe.spot2=new go.Spot(1,1),oe}),go.Shape.defineFigureGenerator("Class",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(0,.5*ee,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),oe}),go.Shape.defineFigureGenerator("Component",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close());var le=new go.PathFigure(0,.2*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ue=new go.PathFigure(0,.6*ee,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),oe}),go.Shape.defineFigureGenerator("Boat Shipment",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.15*z,.6*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee));var le=new go.PathFigure(.15*z,.6*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),oe}),go.Shape.defineFigureGenerator("Customer/Supplier",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe}),go.Shape.defineFigureGenerator("Workcell",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Supermarket",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),oe}),go.Shape.defineFigureGenerator("TruckShipment",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(z,.8*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee).close());var ue=.1,pe=de*.1,Se=.2,Le=.9,De=new go.PathFigure((Se-ue)*z,Le*ee,!0);oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le-ue)*ee,(Se-ue)*z,(Le-pe)*ee,(Se-pe)*z,(Le-ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Se+ue)*z,Le*ee,(Se+pe)*z,(Le-ue)*ee,(Se+ue)*z,(Le-pe)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le+ue)*ee,(Se+ue)*z,(Le+pe)*ee,(Se+pe)*z,(Le+ue)*ee)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Se-ue)*z,Le*ee,(Se-pe)*z,(Le+ue)*ee,(Se-ue)*z,(Le+pe)*ee).close()),ue=.1,pe=de*.1,Se=.8,Le=.9;var Fe=new go.PathFigure((Se-ue)*z,Le*ee,!0);return oe.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le-ue)*ee,(Se-ue)*z,(Le-pe)*ee,(Se-pe)*z,(Le-ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Se+ue)*z,Le*ee,(Se+pe)*z,(Le-ue)*ee,(Se+ue)*z,(Le-pe)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Se*z,(Le+ue)*ee,(Se+ue)*z,(Le+pe)*ee,(Se+pe)*z,(Le+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Se-ue)*z,Le*ee,(Se-pe)*z,(Le+ue)*ee,(Se-ue)*z,(Le+pe)*ee).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),oe}),go.Shape.defineFigureGenerator("Forklift",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ue=new go.PathFigure(.5*z,.8*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee));var pe=new go.PathFigure(.5*z,.7*ee,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var Se=.1,Le=de*.1,De=.1,Fe=.9,Ae=new go.PathFigure((De-Se)*z,Fe*ee,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-Se)*ee,(De-Se)*z,(Fe-Le)*ee,(De-Le)*z,(Fe-Se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(De+Se)*z,Fe*ee,(De+Le)*z,(Fe-Se)*ee,(De+Se)*z,(Fe-Le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+Se)*ee,(De+Se)*z,(Fe+Le)*ee,(De+Le)*z,(Fe+Se)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(De-Se)*z,Fe*ee,(De-Le)*z,(Fe+Se)*ee,(De-Se)*z,(Fe+Le)*ee)),Se=.1,Le=de*.1,De=.4,Fe=.9;var Oe=new go.PathFigure((De-Se)*z,Fe*ee,!0);return oe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe-Se)*ee,(De-Se)*z,(Fe-Le)*ee,(De-Le)*z,(Fe-Se)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(De+Se)*z,Fe*ee,(De+Le)*z,(Fe-Se)*ee,(De+Se)*z,(Fe-Le)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,De*z,(Fe+Se)*ee,(De+Se)*z,(Fe+Le)*ee,(De+Le)*z,(Fe+Se)*ee)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(De-Se)*z,Fe*ee,(De-Le)*z,(Fe+Se)*ee,(De-Se)*z,(Fe+Le)*ee)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.1*z,.4*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*ee).close());var le=new go.PathFigure(.45*z,.7*ee,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee));var ue=new go.PathFigure(.55*z,.4*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var De=.05,Fe=de*.05,Ae=.175,Oe=.95,pe=new go.PathFigure((Ae-De)*z,Oe*ee,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe-De)*ee,(Ae-De)*z,(Oe-Fe)*ee,(Ae-Fe)*z,(Oe-De)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+De)*z,Oe*ee,(Ae+Fe)*z,(Oe-De)*ee,(Ae+De)*z,(Oe-Fe)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe+De)*ee,(Ae+De)*z,(Oe+Fe)*ee,(Ae+Fe)*z,(Oe+De)*ee)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-De)*z,Oe*ee,(Ae-Fe)*z,(Oe+De)*ee,(Ae-De)*z,(Oe+Fe)*ee));var De=.05,Fe=de*.05,Ae=.375,Oe=.95,Se=new go.PathFigure((Ae-De)*z,Oe*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe-De)*ee,(Ae-De)*z,(Oe-Fe)*ee,(Ae-Fe)*z,(Oe-De)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+De)*z,Oe*ee,(Ae+Fe)*z,(Oe-De)*ee,(Ae+De)*z,(Oe-Fe)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe+De)*ee,(Ae+De)*z,(Oe+Fe)*ee,(Ae+Fe)*z,(Oe+De)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-De)*z,Oe*ee,(Ae-Fe)*z,(Oe+De)*ee,(Ae-De)*z,(Oe+Fe)*ee));var De=.05,Fe=de*.05,Ae=.625,Oe=.95,Le=new go.PathFigure((Ae-De)*z,Oe*ee,!0);oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe-De)*ee,(Ae-De)*z,(Oe-Fe)*ee,(Ae-Fe)*z,(Oe-De)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+De)*z,Oe*ee,(Ae+Fe)*z,(Oe-De)*ee,(Ae+De)*z,(Oe-Fe)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe+De)*ee,(Ae+De)*z,(Oe+Fe)*ee,(Ae+Fe)*z,(Oe+De)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-De)*z,Oe*ee,(Ae-Fe)*z,(Oe+De)*ee,(Ae-De)*z,(Oe+Fe)*ee));var De=.05,Fe=de*.05,Ae=.825,Oe=.95,ze=new go.PathFigure((Ae-De)*z,Oe*ee,!0);oe.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe-De)*ee,(Ae-De)*z,(Oe-Fe)*ee,(Ae-Fe)*z,(Oe-De)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+De)*z,Oe*ee,(Ae+Fe)*z,(Oe-De)*ee,(Ae+De)*z,(Oe-Fe)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ae*z,(Oe+De)*ee,(Ae+De)*z,(Oe+Fe)*ee,(Ae+Fe)*z,(Oe+De)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-De)*z,Oe*ee,(Ae-Fe)*z,(Oe+De)*ee,(Ae-De)*z,(Oe+Fe)*ee).close());var He=new go.PathFigure(0,ee,!1);return oe.add(He),He.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),oe}),go.Shape.defineFigureGenerator("Warehouse",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(.15*z,ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var pe=.05,Se=de*.05,Le=.35,De=.775,Fe=new go.PathFigure((Le-pe)*z,De*ee,!0);return oe.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Le*z,(De-pe)*ee,(Le-pe)*z,(De-Se)*ee,(Le-Se)*z,(De-pe)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Le+pe)*z,De*ee,(Le+Se)*z,(De-pe)*ee,(Le+pe)*z,(De-Se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Le*z,(De+pe)*ee,(Le+pe)*z,(De+Se)*ee,(Le+Se)*z,(De+pe)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Le-pe)*z,De*ee,(Le-Se)*z,(De+pe)*ee,(Le-pe)*z,(De+Se)*ee).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee).close()),oe}),go.Shape.defineFigureGenerator("Bluetooth",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Globe",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.75*z,0,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.75*ee,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*z,ee,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*ee,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,.15*z,.25*ee,.15*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*ee,.85*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*ee,.35*z,.3*ee,.65*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*ee,.35*z,.7*ee,.65*z,.7*ee)),oe}),go.Shape.defineFigureGenerator("Wave",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*ee,.1*z,0,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*ee,.425*z,.5*ee,.575*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*ee,.8*z,0,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*ee,.1*z,.5*ee,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*ee,.425*z,ee,.575*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*ee,.8*z,.5*ee,.9*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Operator",function(fe,z,ee){var oe=new go.Geometry,ie=.3,le=de*.3,ue=.5,pe=.7,Se=new go.PathFigure((ue-ie)*z,pe*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,pe*ee,(ue+le)*z,(pe-ie)*ee,(ue+ie)*z,(pe-le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,pe*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee));var Le=new go.PathFigure(0,.7*ee,!1);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),oe}),go.Shape.defineFigureGenerator("TripleFanBlades",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.65*z,.3*ee,.65*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*ee,.35*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*z,.6*ee,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.2*z,ee,.35*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,.7*z,.6*ee,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.8*z,ee,.65*z,.95*ee)),oe}),go.Shape.defineFigureGenerator("CentrifugalPump",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,0,ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*ee,.8*z,ee,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),oe}),go.Shape.defineFigureGenerator("Battery",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*ee));var le=new go.PathFigure(0,.6*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),oe}),go.Shape.defineFigureGenerator("Delete",function(fe,z,ee){var oe=new go.Geometry,ie=.5,le=de*.5,ue=.5,pe=.5,Se=new go.PathFigure((ue-ie)*z,pe*ee,!0);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,pe*ee,(ue+le)*z,(pe-ie)*ee,(ue+ie)*z,(pe-le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,pe*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee));var Le=new go.PathFigure(.15*z,.5*ee,!1);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),oe}),go.Shape.defineFigureGenerator("Flag",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.1*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*ee,.15*z,0,.35*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,.65*z,.2*ee,.85*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.85*z,.6*ee,.65*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*z,.4*ee,.15*z,.4*ee).close()),oe}),go.Shape.defineFigureGenerator("Help",function(fe,z,ee){var oe=new go.Geometry,ie=.5,le=de*.5,ue=.5,pe=.5,Se=new go.PathFigure((ue-ie)*z,pe*ee,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,pe*ee,(ue+le)*z,(pe-ie)*ee,(ue+ie)*z,(pe-le)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,pe*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee).close()),ie=.05,le=de*.05,ue=.5,pe=.8;var Le=new go.PathFigure((ue-ie)*z,pe*ee,!1);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe-ie)*ee,(ue-ie)*z,(pe-le)*ee,(ue-le)*z,(pe-ie)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,pe*ee,(ue+le)*z,(pe-ie)*ee,(ue+ie)*z,(pe-le)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(pe+ie)*ee,(ue+ie)*z,(pe+le)*ee,(ue+le)*z,(pe+ie)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,pe*ee,(ue-le)*z,(pe+ie)*ee,(ue-ie)*z,(pe+le)*ee).close()),Le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*ee,.4*z,.2*ee,.3*z,.25*ee)),oe}),go.Shape.defineFigureGenerator("Location",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*ee,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*ee,.5*z,0,.025*z,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*ee)),oe}),go.Shape.defineFigureGenerator("Unlocked",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*ee)),oe}),go.Shape.defineFigureGenerator("Gear",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*ee,.79840625*z,.39915625*ee,.7834375*z,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*ee,.64228125*z,.2188125*ee,.603875*z,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*ee,.39759375*z,.20190625*ee,.36053125*z,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*ee,.21765625*z,.36059375*ee,.201875*z,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*ee,.20221875*z,.603875*ee,.21884375*z,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*ee,.36353125*z,.78340625*ee,.3991875*z,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*ee,.602375*z,.79809375*ee,.63946875*z,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*ee,.78234375*z,.63940625*ee,.798125*z,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*ee,0,.375*ee,.05*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*ee,.3*z,.225*ee,.4*z,.175*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*ee,.46*z,.05*ee,.525*z,.05*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*ee,.525*z,.275*ee,.475*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*ee,z,.4*ee,z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*ee,.675*z,.55*ee,.675*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*ee,.65*z,.7*ee,.65*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,ee,.61*z,.85*ee,.61*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*z,ee,0,ee).close()),oe}),go.Shape.defineFigureGenerator("Map",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),oe}),go.Shape.defineFigureGenerator("Eject",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var le=new go.PathFigure(0,ee*.6,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),oe}),go.Shape.defineFigureGenerator("Pencil",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*1,ee*1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.85).close());var le=new go.PathFigure(.126*z,.85*ee,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*ee).close());var ue=new go.PathFigure(.402*z,.85*ee,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*ee).close());var pe=new go.PathFigure(.678*z,.85*ee,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),pe.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*ee).close());var Se=new go.PathFigure(.5*z,.1*ee,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*ee)),Se.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*ee).close()),oe}),go.Shape.defineFigureGenerator("Staircase",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),oe}),go.Shape.defineFigureGenerator("5Bars",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*(1-.184)).close());var le=new go.PathFigure(z*.204,ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.204,ee*(1-.184))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*1).close());var ue=new go.PathFigure(z*.408,ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*1).close());var pe=new go.PathFigure(z*.612,ee,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),pe.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*1).close());var Se=new go.PathFigure(z*.816,ee,!0);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.816,ee*(1-.184*4))),Se.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-.184*5))),Se.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1).close()),oe}),go.Shape.defineFigureGenerator("PC",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var le=new go.PathFigure(z*.055,.07*ee,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.07)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.1).close());var ue=new go.PathFigure(z*.055,.13*ee,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.16).close());var pe=new go.PathFigure(z*.055,.18*ee,!0);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.21).close());var Se=new go.PathFigure(z*1,0,!0);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.65)),Se.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.65).close()),oe}),go.Shape.defineFigureGenerator("Plane",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(.55*z,ee,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*ee,0,.4*ee,.225*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*ee,.975*z,0,z,.08*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee).close()),oe}),go.Shape.defineFigureGenerator("Key",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*1,ee*.5,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*ee,.075*z,.075*ee).close()),oe}),go.Shape.defineFigureGenerator("FilmTape",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var le=new go.PathFigure(0,0,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*0)),le.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var ue=new go.PathFigure(z*.11,ee*.1,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.11,ee*.8).close());var pe=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),ee*.8).close());var Se=new go.PathFigure(z*(.11+.24133333*2+.028*2),ee*.1,!1);return oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.1)),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.8)),Se.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),ee*.8).close()),oe}),go.Shape.defineFigureGenerator("FloppyDisk",function(fe,z,ee){var oe=new go.Geometry,ie=8,le=ie*de,ue=new go.PathFigure(ie,0,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,le,le,0).close());var pe=new go.PathFigure(z*.83,0,!1);oe.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*0).close());var Se=new go.PathFigure(z*.83,ee*1,!1);oe.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.5)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.5)),Se.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*1).close());var Le=new go.PathFigure(z*.78,ee*.05,!1);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),Le.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),Le.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("SpeechBubble",function(fe,z,ee){var oe=fe?fe.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=15),oe=Math.min(oe,z/3),oe=Math.min(oe,ee/3);var ie=oe*de,le=ee*.8,ue=new go.Geometry,pe=new go.PathFigure(oe,0,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,z-oe,0)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z,oe,z-ie,0,z,ie)),pe.add(new go.PathSegment(go.PathSegment.Line,z,le-oe)),pe.add(new go.PathSegment(go.PathSegment.Bezier,z-oe,le,z,le-ie,z-ie,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,le)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),pe.add(new go.PathSegment(go.PathSegment.Line,z*.55,le)),pe.add(new go.PathSegment(go.PathSegment.Line,oe,le)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,le-oe,ie,le,0,le-ie)),pe.add(new go.PathSegment(go.PathSegment.Line,0,oe)),pe.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()),ie>1?(ue.spot1=new go.Spot(0,0,ie,ie),ue.spot2=new go.Spot(1,.8,-ie,-ie)):(ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.8)),ue}),go.Shape.defineFigureGenerator("Repeat",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*.45,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.45).close());var le=new go.PathFigure(z*1,ee*.55,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.55).close()),oe}),go.Shape.defineFigureGenerator("Windows",function(fe,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*.1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.9).close());var le=new go.PathFigure(z*.1,ee*.2,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.22,ee*.285)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.25).close());var ue=new go.PathFigure(z*.28,ee*.37,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),oe}),go.Shape.defineFigureGenerator("Beaker",function(fe,z,ee){var oe=new go.Geometry,ie=15,le=ie*de,ue=new go.PathFigure(z*.62,ee*.475,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.62,ee*.03).close()),le>1?(oe.spot1=new go.Spot(0,0,le,le),oe.spot2=new go.Spot(1,1,-le,-le)):(oe.spot1=go.Spot.TopLeft,oe.spot2=go.Spot.BottomRight),oe}),go.Shape.defineFigureGenerator("Download",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.4,ee*0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),oe}),go.Shape.defineFigureGenerator("Bin",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var le=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close()),oe}),go.Shape.defineFigureGenerator("Upload",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);oe.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.5,ee*0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("EmptyDrink",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close()),oe}),go.Shape.defineFigureGenerator("Drink",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close());var le=new go.PathFigure(z*.235,ee*.28,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.765,ee*.28)),le.add(new go.PathSegment(go.PathSegment.Line,z*.655,ee*.97)),le.add(new go.PathSegment(go.PathSegment.Line,z*.345,ee*.97).close()),oe}),go.Shape.defineFigureGenerator("4Arrows",function(fe,z,ee){var oe=new go.Geometry,ie=new go.PathFigure(z*.5,ee*0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.25).close()),oe}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var dn={},pn="5.0",at={},ot=null,_t=!1,ae=!1,Ge=null,Ie=!1,me=null,de=null,Ee=0;Ee<arguments.length;Ee++){var we=arguments[Ee];if(we!==null)switch(typeof we){case"number":pn=we.toFixed(1);break;case"string":we.match(new RegExp("^[0-9]\\.[0-9]+$"))?pn=we:Ge=we;break;case"object":typeof we.is3D!="undefined"?ot=we:at=we;break;case"boolean":_t=we,ae=!0;break}}ot===null&&(ot={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},at.material_id!==void 0&&!ae&&(_t=!0)),Ge!==null&&at.id===void 0&&(at.id=Ge);var be="",Te="",ve=!1,xe=null,fe=null,z=null,ee=!1,oe=null,ie=null,le=null,ue=null,pe=null;at.height!==void 0&&(at.height=Math.round(at.height)),at.width!==void 0&&(at.width=Math.round(at.width));var Se=function(ht){return parseFloat(ht)>4?parseFloat(ht):5};dn.setHTML5Codebase=function(ht,pt){de=ht,$e(ht,pt)},dn.setJavaCodebase=dn.setJavaCodebaseVersion=dn.isCompiledInstalled=dn.setPreCompiledScriptPath=dn.setPreCompiledResourcePath=function(){},dn.setHTML5CodebaseVersion=function(ht,pt){var ct=parseFloat(ht);if(ct!==NaN&&ct<5){console.log("The GeoGebra HTML5 codebase version "+ct+" is deprecated. Using version latest instead.");return}me=ht,et(ht,pt)},dn.getHTML5CodebaseVersion=function(){return fe},dn.getParameters=function(){return at},dn.setFontsCSSURL=function(ht){ue=ht},dn.setGiacJSURL=function(ht){},dn.setJNLPFile=function(ht){be=ht},dn.setJNLPBaseDir=function(ht){},dn.inject=function(){function ht(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pt="auto",ct=at.id,Ct,xt=!1,yt=0;yt<arguments.length;yt++){var Tt=arguments[yt];typeof Tt=="string"?(Tt=Tt.toLowerCase(),Tt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pt=Tt:ct=arguments[yt]):typeof Tt=="boolean"?xt=Tt:Tt instanceof HTMLElement&&(Ct=Tt)}St();function St(){if(!Ie){setTimeout(St,200);return}pt=Et(pt);var nt=Ct||document.getElementById(ct);if(!nt){console.log("possibly bug on ajax loading? ");return}if(dn.removeExistingApplet(nt,!1),at.width===void 0&&nt.clientWidth&&(at.width=nt.clientWidth),at.height===void 0&&nt.clientHeight&&(at.height=nt.clientHeight),!(at.width&&at.height)&&pt==="html5"&&(delete at.width,delete at.height),xe=pt,pt==="screenshot")We(nt,at);else{var Qe=!1;at.hasOwnProperty("playButton")&&at.playButton||at.hasOwnProperty("clickToLoad")&&at.clickToLoad?Qe=!0:at.hasOwnProperty("playButtonAutoDecide")&&at.playButtonAutoDecide&&(Qe=(!Le()||ht())&&De()),Qe?(xe="screenshot",st(nt,at,xt,pt)):Ye(nt,at,xt)}}};function Le(){try{return window.self!==window.top}catch(ht){return!0}}function De(){return at.hasOwnProperty("screenshotGenerator")&&at.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}dn.getViews=function(){return ot},dn.isJavaInstalled=function(){return!1};var Fe=function(ht){var pt=function(yt){var Tt=JSON.parse(yt),St=function(Ce){return Ce.type=="G"||Ce.type=="E"},nt=Tt.elements?Tt.elements.filter(St)[0]:Tt;if(!nt||!nt.url){ct();return}at.fileName=nt.url,Ae(nt.settings||{}),ot.is3D=!0;var Qe="https://www.geogebra.org/images/";dn.setPreviewImage(oe||nt.previewUrl,Qe+"GeoGebra_loading.png",Qe+"applet_play.png"),ht()},ct=function(){at.onError&&at.onError(),vt("Error: Fetching material (id "+at.material_id+") failed.",at)},Ct=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",xt="/materials/"+at.material_id+"?scope=basic";Oe("https://"+Ct+"/api/proxy.php?path="+encodeURIComponent(xt),pt,ct)};function Ae(ht){var pt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ct){ht[ct]=!!ht[ct]}),pt.forEach(function(ct){at[ct]===void 0&&ht[ct]!==void 0&&(at[ct]=ht[ct])}),at.showToolBarHelp===void 0&&(at.showToolBarHelp=at.showToolBar)}function Oe(ht,pt,ct){var Ct=new XMLHttpRequest;Ct.open("GET",ht),Ct.onload=function(){pt(Ct.responseText)},Ct.onerror=ct,Ct.send()}dn.isHTML5Installed=function(){return!0},dn.getLoadedAppletType=function(){return xe},dn.setPreviewImage=function(ht,pt,ct){oe=ht,ie=pt,le=ct},dn.removeExistingApplet=function(ht,pt){var ct;typeof ht=="string"&&(ht=document.getElementById(ht)),xe=null;var Ct=null;for(ct=0;ct<ht.childNodes.length;ct++){var xt=ht.childNodes[ct],yt=xt.className;yt==="applet_screenshot"?pt?(xt.style.display="block",xe="screenshot"):xt.style.display="none":yt!=="applet_scaler prerender"&&(ht.removeChild(xt),Ct=yt&&yt.indexOf("appletParameters")!=-1?xt.id:null,ct--)}var Tt=at.id!==void 0?at.id:Ct,St=window[Tt];St&&typeof St.getBase64=="function"&&(St.remove(),window[Tt]=null)},dn.refreshHitPoints=function(){if(Se(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ht=dn.getAppletObject();return ht&&typeof ht.recalculateEnvironments=="function"?(ht.recalculateEnvironments(),!0):!1},dn.startAnimation=function(){var ht=dn.getAppletObject();return ht&&typeof ht.startAnimation=="function"?(ht.startAnimation(),!0):!1},dn.stopAnimation=function(){var ht=dn.getAppletObject();return ht&&typeof ht.stopAnimation=="function"?(ht.stopAnimation(),!0):!1},dn.getAppletObject=function(){var ht=at.id!==void 0?at.id:"ggbApplet";return window[ht]},dn.resize=function(){};var ze=function(ht,pt,ct){var Ct=document.createElement("param");Ct.setAttribute("name",pt),Ct.setAttribute("value",ct),ht.appendChild(Ct)},He=function(ht){return ht&&ht!=="false"},Ye=function(ht,pt,ct){Se(fe)<=4.2&&(ct=!0);var Ct=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==fe||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Ct=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var xt=document.createElement("div");xt.classList.add("appletParameters","notranslate");var yt=pt.width,Tt=pt.height;if(pt.disableAutoScale=pt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pt.disableAutoScale,pt.width!==void 0)if(Se(fe)<=4.4)He(pt.showToolBar)&&(pt.height-=7),He(pt.showAlgebraInput)&&(pt.height-=37),pt.width<605&&He(pt.showToolBar)&&(pt.width=605,yt=605);else{var St=100;(He(pt.showToolBar)||He(pt.showMenuBar))&&(pt.hasOwnProperty("customToolBar")&&(pt.customToolbar=pt.customToolBar),St=He(pt.showMenuBar)?245:155),yt<St&&(pt.width=St,yt=St)}xt.style.border="none",xt.style.display="inline-block";for(var nt in pt)pt.hasOwnProperty(nt)&&nt!=="appletOnLoad"&&xt.setAttribute("data-param-"+nt,pt[nt]);ue&&xt.setAttribute("data-param-fontscssurl",ue),dn.resize=function(){GGBAppletUtils.responsiveResize(ht,pt)},window.addEventListener("resize",function(jt){dn.resize()});var Qe=typeof pt.appletOnLoad=="function"?pt.appletOnLoad:function(){};if(!ct&&pt.width!==void 0){pt.hasOwnProperty("showSplash")||xt.setAttribute("data-param-showSplash","false");var Ce=ht.querySelector(".applet_scaler.prerender"),Ne=Ce!==null;if(Ne)var Je=Ce.querySelector(".ggb_preview");else{var Je=gt(yt,Tt,pt.borderColor,!1);Ce=document.createElement("div"),Ce.className="applet_scaler",Ce.style.position="relative",Ce.style.display="block",Ce.style.width=yt+"px",Ce.style.height=Tt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ce,"66%"),Se(fe)>=5?(pt.appletOnLoad=function(jt){var Ht=ht.querySelector(".ggb_preview");Ht&&Ht.parentNode.removeChild(Ht),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ce),window.GGBT_wsf_view&&$(window).trigger("resize"),Qe(jt)},Ne||Ce.appendChild(Je)):xt.appendChild(Je),Ce.appendChild(xt),Ne||ht.appendChild(Ce),setTimeout(function(){dn.resize()},1)}else{var rt=document.createElement("div");rt.className="applet_scaler",rt.style.position="relative",rt.style.display="block",rt.appendChild(xt),ht.appendChild(rt),pt.appletOnLoad=function(jt){dn.resize(),Qe(jt)}}function Be(jt,Ht){Ht&&typeof Ht.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(jt,Ht.appletOnLoad):renderGGBElement(jt),vt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ht)}function _e(jt,Ht){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:jt,params:Ht}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ln){Be(ln.article,ln.params)}),html5AppletsToProcess=null)},Se(fe)<5&&(jt.className+=" geogebraweb")):Be(jt,Ht)}if(Ct){scriptLoadStarted=!0;for(var Xe=0;Xe<xt.childNodes.length;Xe++){var lt=xt.childNodes[Xe].tagName;lt==="TABLE"&&(xt.removeChild(xt.childNodes[Xe]),Xe--)}if(ggbHTML5LoadedScript!==null){var Pt=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Pt!=null&&Pt.parentNode.removeChild(Pt)}var kt=document.createElement("script"),zt=function(){_e(xt,pt)};kt.src=Te+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=fe,ggbHTML5LoadedScript=kt.src,vt("GeoGebra HTML5 codebase loaded: '"+Te+"'.",pt),!de&&(!me||me=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),zt()):Te.requirejs?__webpack_require__.e(12).then(function(){var jt=[__webpack_require__(12)];zt.apply(null,jt)}.bind(this)).catch(__webpack_require__.oe):(kt.onload=zt,ht.appendChild(kt))}else _e(xt,pt);pt.height=Tt,pt.width=yt},We=function(ht,pt,ct){var Ct=gt(pt.width,pt.height,pt.borderColor,ct),xt=document.createElement("div");xt.style.position="relative",xt.style.display="block",xt.style.width=pt.width+"px",xt.style.height=pt.height+"px",xt.className="applet_screenshot applet_scaler"+(ct?" applet_screenshot_play":""),xt.appendChild(Ct);var yt=GGBAppletUtils.getScale(pt,ht,ct);ct?(ht.appendChild(dt()),window.GGBT_wsf_view||(ht.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(xt,"66%"),ht.appendChild(xt),yt!==1&&!isNaN(yt)&&(GGBAppletUtils.scaleElement(xt,yt),xt.style.width=pt.width+"px",xt.style.height=pt.height+"px",xt.parentNode.style.width=pt.width*yt+"px",xt.parentNode.style.height=pt.height*yt+"px"),dn.resize=function(){Ue(ht,Ct,xt,ct)},window.addEventListener("resize",function(Tt){dn.resize()}),dn.resize()};function Ue(ht,pt,ct,Ct){if(ht.contains(pt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ht.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ht)}var xt=GGBAppletUtils.getScale(at,ht,Ct);ct.parentNode!==null&&(!isNaN(xt)&&xt!==1?(GGBAppletUtils.scaleElement(ct,xt),ct.parentNode.style.width=at.width*xt+"px",ct.parentNode.style.height=at.height*xt+"px"):(GGBAppletUtils.scaleElement(ct,1),ct.parentNode.style.width=at.width+"px",ct.parentNode.style.height=at.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ht),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}dn.onExitFullscreen=function(ht,pt){pt.appendChild(ht)};var st=function(ht,pt,ct,Ct){We(ht,pt,!0);for(var xt=function(){var St=[];for(Tt=0;Tt<ht.childNodes.length;Tt++)St.push(ht.childNodes[Tt]);if(window.GGBT_wsf_view){var nt=window.GGBT_wsf_view.renderFullScreen(ht,pt.id),Qe=document.getElementById("fullscreencontainer"),Ce=jQuery(ht).find(".fullscreencontent");Ce.length>0?(nt.remove(),Ce.attr("id","fullscreencontent").show(),jQuery(Qe).append(Ce),window.dispatchEvent(new Event("resize"))):Ye(nt,pt,!1),window.GGBT_wsf_view.launchFullScreen(Qe)}else xe=Ct,Ye(ht,pt,!1);if(!window.GGBT_wsf_view)for(Tt=0;Tt<St.length;Tt++)ht.removeChild(St[Tt])},yt=ht.getElementsByClassName("ggb_preview_play"),Tt=0;Tt<yt.length;Tt++)yt[Tt].addEventListener("click",xt,!1),yt[Tt].addEventListener("ontouchstart",xt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ht),De()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},dt=function(){var ht=document.createElement("div");if(ht.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var pt='.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");}',ct=document.createElement("style");ct.styleSheet?ct.styleSheet.cssText=pt:ct.appendChild(document.createTextNode(pt)),document.getElementsByTagName("head")[0].appendChild(ct)}return ht},gt=function(ht,pt,ct,Ct){var xt=document.createElement("div");xt.className="ggb_preview",xt.style.position="absolute",xt.style.zIndex="90",xt.style.width=ht-2+"px",xt.style.height=pt-2+"px",xt.style.top="0px",xt.style.left="0px",xt.style.overflow="hidden",xt.style.backgroundColor="white";var yt="lightgrey";ct!==void 0&&(ct==="none"?yt="transparent":yt=ct),xt.style.border="1px solid "+yt;var Tt=document.createElement("img");if(Tt.style.position="relative",Tt.style.zIndex="1000",Tt.style.top="-1px",Tt.style.left="-1px",oe!==null&&Tt.setAttribute("src",oe),Tt.style.opacity=.7,ie!==null){var St,nt,Qe;if(!Ct){St=document.createElement("img"),St.style.position="absolute",St.style.zIndex="1001",St.style.opacity=1,Tt.style.opacity=.3,nt=360,nt>ht/4*3&&(nt=ht/4*3),Qe=nt/5.8,St.setAttribute("src",ie),St.setAttribute("width",nt),St.setAttribute("height",Qe);var Ce=(ht-nt)/2,Ne=(pt-Qe)/2;St.style.left=Ce+"px",St.style.top=Ne+"px",xt.appendChild(St)}}return xt.appendChild(Tt),xt},Et=function(ht){return ht=ht.toLowerCase(),ht==="html5"||ht==="screenshot"?ht:"html5"},Ke=["web","webSimple","web3d","tablet","tablet3d","phone"],et=function(ht,pt){if(fe=ht,pt){$e(fe,!0);return}var ct=!_t;if(ct){var Ct=Se(fe);!isNaN(Ct)&&Ct<4.4&&(ct=!1)}var xt,yt;window.location.protocol.substr(0,4)==="http"?xt=window.location.protocol:xt="http:";var Tt=fe.indexOf("//");Tt>0?yt=fe:Tt===0?yt=xt+fe:yt="https://www.geogebra.org/apps/5.2.814.0/";for(var St in Ke)if(fe.slice(Ke[St].length*-1)===Ke[St]||fe.slice((Ke[St].length+1)*-1)===Ke[St]+"/"){$e(yt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ct&&!ot.is3D&&!ot.AV&&!ot.SV&&!ot.CV&&!ot.EV2&&!ot.CP&&!ot.PC&&!ot.DA&&!ot.FI&&!ot.PV&&!He(at.showToolBar)&&!He(at.showMenuBar)&&!He(at.showAlgebraInput)&&!He(at.enableRightClick)&&(!at.appName||at.appName=="classic")?yt+="webSimple/":yt+="web3d/",$e(yt,!1)},$e=function(ht,pt){if(ht.requirejs){Te=ht;return}ht.slice(-1)!=="/"&&(ht+="/"),Te=ht,pt===null&&(pt=ht.indexOf("http")===-1),ve=pt,z="web.nocache.js",ee=!1;var ct=Te.split("/");ct.length>1&&(!pt&&ct[ct.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):Ke.indexOf(ct[ct.length-2])>=0&&(z=ct[ct.length-2]+".nocache.js")),ct=ht.split("/"),fe=ct[ct.length-3],fe.substr(0,4)==="test"?fe=fe.substr(4,1)+"."+fe.substr(5,1):(fe.substr(0,3)==="war"||fe.substr(0,4)==="beta")&&(fe="5.0");var Ct=parseFloat(fe);Ct!==NaN&&Ct<5&&ht.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Ct+" is deprecated. Using version latest instead."),et("5.0",pt))},vt=function(ht,pt){window.console&&window.console.log&&(!pt||typeof pt.showLogging=="undefined"||pt.showLogging&&pt.showLogging!=="false")&&console.log(ht)};at.material_id!==void 0?Fe(wt):wt();function wt(){var ht=pn;me!==null?ht=me:parseFloat(ht)<5&&(ht="5.0"),et(ht,!1),de!==null&&$e(de,ve),Ie=!0}return dn},GGBAppletUtils=function(){"use strict";function dn(){return window.GGBT_wsf_edit!==void 0}function pn(Ie,me){me!=1?(Ie.style.transformOrigin="0% 0% 0px",Ie.style.webkitTransformOrigin="0% 0% 0px",Ie.style.transform="scale("+me+","+me+")",Ie.style.webkitTransform="scale("+me+","+me+")",Ie.style.maxWidth="initial",Ie.querySelector(".ggb_preview")!==null&&(Ie.querySelector(".ggb_preview").style.maxWidth="initial"),Ie.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ie.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ie.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ie.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ie.style.transform="none",Ie.style.webkitTransform="none")}function at(Ie,me,de,Ee,we,be){var Te=null;if(be!=null&&be!="")for(var ve=Ie.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+be+" ")>-1){Te=ve;break}else ve=ve.parentNode;var xe=0,fe=0,z=0,ee=0,oe=0,ie=0,le=0;if(Te)xe=Te.offsetWidth,fe=Math.max(Ee?Te.offsetWidth:0,Te.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xe=Math.min(window.innerWidth,document.documentElement.clientWidth),fe=Math.min(window.innerHeight,document.documentElement.clientHeight),z=xe):(xe=window.innerWidth,fe=window.innerHeight,z=window.innerWidth),Ie){var ue=Ie.getBoundingClientRect();ue.left>0&&ue.left<=xe&&(we===void 0||!we)&&(document.dir==="rtl"?(oe=xe-ue.width-ue.left,ie=z<=480?10:30):(ie=ue.left,oe=z<=480?10:30),ee=ie+oe)}if(Ie&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var pe=Ie.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,le=40)}}return Ie&&((de===void 0||!de)&&me>0&&me+ee<xe?xe=me:xe-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(de===void 0||!de)&&(fe-=le)),{width:xe,height:fe}}function ot(Ie,me,de,Ee,we){if(Ie.isScreenshoGenerator)return 1;var be=Ee!==void 0&&Ee,Te=Ie.noScaleMargin!=null&&Ie.noScaleMargin,ve=function(pe){return pe&&pe!=="false"},xe=ve(Ie.autoHeight),fe=at(me,Ie.width,de,xe,be&&window.GGBT_wsf_view||Te,we),z=parseInt(fe.width),ee=Ie.width,oe=Ie.height;if(ee===void 0){var ie=me.querySelector(".appletParameters");ie&&(ee=ie.offsetWidth,oe=ie.offsetHeight)}var le=z/ee,ue=be?1:fe.height/oe;return de!==void 0&&!de&&(le=Math.min(1,le),ue=Math.min(1,ue)),Math.min(le,ue)}function _t(Ie,me,de){var Ee=1,we,be=!1;if(Ie.hasOwnProperty("allowUpscale")&&(be=Ie.allowUpscale),Ie.hasOwnProperty("scale")&&(Ee=parseFloat(Ie.scale),(isNaN(Ee)||Ee===null||Ee===0)&&(Ee=1),Ee>1&&(be=!0)),me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(be=!0),!(Ie.hasOwnProperty("disableAutoScale")&&Ie.disableAutoScale))we=ot(Ie,me,be,de,Ie.scaleContainerClass);else return Ee;return be&&(!Ie.hasOwnProperty("scale")||Ee===1)?we:Math.min(Ee,we)}function ae(Ie){var me=Math.min(window.innerWidth,document.documentElement.clientWidth),de=Math.min(window.innerHeight,document.documentElement.clientHeight),Ee=Ie.getBoundingClientRect(),we=(me-Ee.width)/2,be=(de-Ee.height)/2;be<0&&(be=0),Ie.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?Ie.style.left="40px":Ie.style.left=we+"px",Ie.style.top=be+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(be<40?Ie.style.top="40px":Ie.style.top=be+"px",Ie.style.left=we+"px")}function Ge(Ie,me){var de=Ie.querySelector(".appletParameters");if(de){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(me.id!==de.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ie)}if(de.parentElement&&/fullscreen/.test(de.parentElement.className))return;var Ee=_t(me,Ie);dn()&&de.setAttribute("data-param-scale",Ee);for(var we=null,be=0;be<Ie.childNodes.length;be++)if(Ie.childNodes[be].className!==void 0&&Ie.childNodes[be].className.match(/^applet_scaler/)){we=Ie.childNodes[be];break}if(we!==null&&we.querySelector(".noscale")!==null)return;var Te=me.id!==void 0?me.id:"ggbApplet",ve=window[Te];(ve==null||!ve.recalculateEnvironments)&&we!==null&&!we.className.match(/fullscreen/)&&(we.parentNode.style.transform="",!isNaN(Ee)&&Ee!==1?(we.parentNode.style.width=me.width*Ee+"px",we.parentNode.style.height=me.height*Ee+"px",pn(we,Ee)):(pn(we,1),we.parentNode.style.width=me.width+"px",we.parentNode.style.height=me.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ae(Ie),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(de).parents(".content-added-content"))}}return{responsiveResize:Ge,isFlexibleWorksheetEditor:dn,positionCenter:ae,getScale:_t,scaleElement:pn}}();__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 dn=n.location.search;return dn.indexOf(J)!=-1||dn.indexOf(K)!=-1}function q(dn,pn){}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(dn){var pn=s[L].bindings;s[L].bindings=function(){for(var at=pn?pn():{},ot=dn[webModule.__softPermutationId],_t=O;_t<ot.length;_t++){var ae=ot[_t];at[ae[O]]=ae[P]}return at}};var t;function u(){return v(),t}function v(){if(!t){var dn=o.createElement(Q);if(dn.id=L,dn.style.cssText=R+S,dn.tabIndex=-1,o.body.appendChild(dn),t=dn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var pn=document.compatMode==U?V:W;t.write(pn+X),t.close()}}}function w(dn){function pn(ot){function _t(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ae=_t();if(ae){ot();return}function Ge(){if(!ae){if(!_t())return;ae=!0,ot(),o.removeEventListener&&o.removeEventListener(Z,Ge,!1),Ie&&clearInterval(Ie)}}o.addEventListener&&o.addEventListener(Z,Ge,!1);var Ie=setInterval(function(){Ge()},$)}function at(ot){var _t=u(),ae=_t.body,Ge=_t.createElement(_);Ge.language=ab,Ge.crossOrigin=W,Ge.src=ot,webModule.__errFn&&(Ge.onerror=function(){webModule.__errFn(L,new Error(bb+ot))}),ae.appendChild(Ge)}pn(function(){at(dn)})}webModule.__startLoadingFragment=function(dn){return C(dn)},webModule.__installRunAsyncCode=function(dn){var pn=u(),at=pn.body,ot=pn.createElement(_);ot.language=ab,ot.text=dn,at.appendChild(ot),at.removeChild(ot)};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(dn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(dn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(dn){var pn=c[dn];return pn==null?null:pn},r=d,webModule.__errFn=e}function B(){function dn(Ie){var me=Ie.lastIndexOf(rb);me==-1&&(me=Ie.length);var de=Ie.indexOf(sb);de==-1&&(de=Ie.length);var Ee=Ie.lastIndexOf(tb,Math.min(de,me));return Ee>=O?Ie.substring(O,Ee+P):W}function pn(Ie){if(!Ie.match(/^\w+:\/\//)){var me=o.createElement(ub);me.src=Ie+vb,Ie=dn(me.src)}return Ie}function at(){var Ie=__gwt_getMetaProperty(wb);return Ie!=null?Ie:W}function ot(){for(var Ie=o.getElementsByTagName(_),me=O;me<Ie.length;++me)if(Ie[me].src.indexOf(xb)!=-1)return dn(Ie[me].src);return W}function _t(){var Ie=o.getElementsByTagName(yb);return Ie.length>O?Ie[Ie.length-P].href:W}function ae(){var Ie=o.location;return Ie.href==Ie.protocol+zb+Ie.host+Ie.pathname+Ie.search+Ie.hash}var Ge=at();return Ge==W&&(Ge=ot()),Ge==W&&(Ge=_t()),Ge==W&&ae()&&(Ge=dn(o.location.href)),Ge=pn(Ge),Ge}function C(dn){return dn.match(/^\//)||dn.match(/^[a-zA-Z]+:\/\//)?dn:webModule.__moduleBase+dn}function D(){var dn=[],pn=O,at=[],ot=[];function _t(Ie){var me=ot[Ie](),de=at[Ie];if(me in de)return me;var Ee=[];for(var we in de)Ee[de[we]]=we;throw r&&r(Ie,Ee,me),null}if(__gwt_isKnownPropertyValue=function(Ie,me){return me in at[Ie]},webModule.__getPropMap=function(){var Ie={};for(var me in at)at.hasOwnProperty(me)&&(Ie[me]=_t(me));return Ie},webModule.__computePropValue=_t,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ae;try{ae=Cb;var Ge=ae.indexOf(Db);Ge!=-1&&(pn=parseInt(ae.substring(Ge+P),$),ae=ae.substring(O,Ge))}catch(Ie){}return webModule.__softPermutationId=pn,C(ae+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(dn,pn,at){"use strict";at.d(pn,{Ax:function(){return Ge},Ds:function(){return Ie},KI:function(){return de},SI:function(){return ae},f1:function(){return _t}});var ot=at(11320);function _t(Ee){let we=!0;if(Ee.length>0){for(let be=0;be<Ee.length;be++)if(Ee[be].compile_success==0||!Ee[be].compile_success){we=!1;break}}else we=!1;return we}function ae(Ee,we=""){let be=[];for(let Te=0;Te<Ee.length;Te++){let ve=Ee[Te],xe=we?`${we}/${ve.name}`:`${ve.name}`;be.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:xe})}return be}function Ge(Ee,we,be){for(let Te=0;Te<Ee.length;Te++){let ve=Ee[Te];if(ve.key===we){ve.children=be;break}ve.children&&Ge(ve.children,we,be)}return Ee}function Ie(Ee,we,be){let Te;return function(){let ve=this,xe=arguments,fe=function(){Te=null,be||Ee.apply(ve,xe)},z=be&&!Te;clearTimeout(Te),Te=setTimeout(fe,we),z&&Ee.apply(ve,xe)}}const me=!0,de=ot.Z.API_SERVER},63205:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return Te}});var ot=at(67294),_t={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ae=at(94184),Ge=at.n(ae),Ie=at(74330),me=at(15979),de=at(33170),Ee=at(28706),we=(ve,xe,fe)=>new Promise((z,ee)=>{var oe=ue=>{try{le(fe.next(ue))}catch(pe){ee(pe)}},ie=ue=>{try{le(fe.throw(ue))}catch(pe){ee(pe)}},le=ue=>ue.done?z(ue.value):Promise.resolve(ue.value).then(oe,ie);le((fe=fe.apply(ve,xe)).next())}),Te=({data:ve,className:xe,fullWidth:fe,style:z={},onClose:ee,onOk:oe,showFullTools:ie,noAssociationId:le})=>{const ue=(0,ot.useRef)(null),pe=(0,ot.useRef)(null),Se=(0,ot.useRef)(null),Le=(0,ot.useRef)(null),[De,Fe]=(0,ot.useState)(!1),[Ae,Oe]=(0,ot.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ot.useEffect)(()=>(Se.current||(Se.current=document.createElement("style"),document.head.appendChild(Se.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),Se.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&ze()):(document.body.removeAttribute("data-custom"),Se.current&&(document.head.removeChild(Se.current),Se.current=null)),()=>{document.body.removeAttribute("data-custom"),Se.current&&(document.head.removeChild(Se.current),Se.current=null)}),[ve==null?void 0:ve.visible]);const ze=()=>we(void 0,null,function*(){Fe(!0),Oe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ue=yield(0,Ee.ZJ)(ve==null?void 0:ve.src);ue.current.src="",ue.current.src=Ue,ue.current.onload=function(){We()},Fe(!1),Oe("")}),He=Ue=>we(void 0,null,function*(){Fe(!0),Oe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const st=yield(0,de.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:Ue.dataUrl}});st!=null&&st.id&&!le?(yield(0,de.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:st==null?void 0:st.id,settings:JSON.stringify(Ue.state)}})).status===0&&oe():st!=null&&st.id&&oe(st),Fe(!1),Oe("")}),Ye=()=>{const Ue=document.querySelector('a[href="https://markerjs.com/"]');Ue&&Ue.parentNode&&(Ue.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(dt=>{const gt=document.querySelector(dt.name);gt&&gt.setAttribute("title",dt.title)})},We=()=>{pe.current=new me.hP(ue.current),pe.current.targetRoot=Le.current,pe.current.addEventListener("render",He),pe.current.addEventListener("beforeclose",ee),ie&&(pe.current.availableMarkerTypes=pe.current.ALL_MARKER_TYPES,pe.current.uiStyleSettings.redoButtonVisible=!0,pe.current.uiStyleSettings.notesButtonVisible=!0,pe.current.uiStyleSettings.zoomButtonVisible=!0,pe.current.uiStyleSettings.zoomOutButtonVisible=!0,pe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=pe.current.uiStyleSettings,pe.current.show(),ve!=null&&ve.snapshotData&&pe.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ye()},300)};return ot.createElement(ot.Fragment,null,(ve==null?void 0:ve.visible)&&ot.createElement(Ie.Z,{spinning:De,tip:Ae,style:{position:"absolute",width:"100vw"}},ot.createElement("div",{ref:Le,className:Ge()(_t.imageDimensions,xe,fe?_t.fullWidth:""),style:z},ot.createElement("img",{className:_t.img,ref:ue}))))}},4069:function(dn,pn,at){"use strict";at.d(pn,{N:function(){return ee}});var ot=at(67294),_t=at(88044),ae=at(62844),Ge=at(28802),Ie=at(2453),me=at(71230),de=at(15746),Ee=at(33170),we={wrap:"wrap___F7E3F",selectWrapper:"selectWrapper____kESB",tips:"tips___aHjQY",linkBtn:"linkBtn___uggVr",mainText:"mainText____S1I0",public_tips:"public_tips___sZVWd",inputCss:"inputCss___t66EO",bt:"bt___lXptu",add_style:"add_style___knrMF"},be=at(94184),Te=at.n(be),ve=at(55304),xe=at(67294),fe=(oe,ie,le)=>new Promise((ue,pe)=>{var Se=Fe=>{try{De(le.next(Fe))}catch(Ae){pe(Ae)}},Le=Fe=>{try{De(le.throw(Fe))}catch(Ae){pe(Ae)}},De=Fe=>Fe.done?ue(Fe.value):Promise.resolve(Fe.value).then(Se,Le);De((le=le.apply(oe,ie)).next())});const{Option:z}=_t.default,ee=({subId:oe,value:ie,selectvalues:le,disabled:ue,knowledgeOptions:pe=[],className:Se,height:Le,onChange:De=()=>{},onAddKnowledgeFinish:Fe=()=>{},zIndex:Ae=1e3})=>{const Oe=(0,ot.useRef)(),[ze,He]=(0,ot.useState)([]);ie=ie||[];const Ye=(Ue,st)=>{Ue?(He([...st]),De([...st])):(He([]),De([]))};(0,ot.useEffect)(()=>{(le==null?void 0:le.length)>0?(He([...le]),De([...le])):(He([]),De([]))},[pe]),(0,ot.useEffect)(()=>{(ie==null?void 0:ie.length)>0&&De([...ie])},[pe]);const We=Ue=>{Ue.preventDefault(),Oe.current="",ae.default.confirm({centered:!0,width:585,zIndex:Ae,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:xe.createElement("div",{className:"font14"},xe.createElement("div",{className:we.public_tips},xe.createElement(ve.Z,{style:{color:"#FF8C29",marginRight:10,paddingTop:5}}),"\u65B0\u5EFA\u7684\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\u3002 \u5E73\u53F0\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF0C\u8BF7\u8BA4\u771F\u586B\u5199\u77E5\u8BC6\u70B9\u540D\u79F0\u3002"),xe.createElement("div",{style:{display:"flex",alignItems:"center"}},xe.createElement("div",{style:{width:"95px"}},xe.createElement("span",{className:we.bt},"*"),"\u77E5\u8BC6\u70B9\u540D\u79F0"),xe.createElement(Ge.default,{className:we.inputCss,style:{width:"calc(100% - 95px)"},maxLength:20,size:"middle",showCount:!0,placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:Oe.current,onChange:st=>{Oe.current=st.target.value}}))),onOk:()=>new Promise((st,dt)=>fe(void 0,null,function*(){if(!Oe.current)return Ie.ZP.warning("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),dt();if(Oe.current.length>20)return Ie.ZP.warning("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),dt();const gt=yield(0,Ee.ZP)("/api/tag_disciplines.json",{method:"post",body:{name:Oe.current,sub_discipline_id:oe}});if((gt==null?void 0:gt.status)===0){Fe({id:gt.tag_discipline_id,name:Oe.current,type:"personal"});let Et=le||[];Et.push(gt.tag_discipline_id),De([...Et]),He([...Et]),De([...Et])}return st()}))})};return xe.createElement(me.Z,{wrap:!1,align:"middle",className:Te()(we.wrap,Se)},xe.createElement(de.Z,null,xe.createElement(_t.default,{mode:"multiple",disabled:!oe||ue,className:we.selectWrapper,placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9\uFF0C\u652F\u6301\u9009\u62E9\u591A\u4E2A",onChange:Ye,style:{width:Le||490},showSearch:!0,allowClear:!0,value:ze,filterOption:(Ue,st)=>st.label.indexOf(Ue.toLowerCase())>=0},pe==null?void 0:pe.map(Ue=>xe.createElement(z,{key:Ue.id,value:Ue.id,label:Ue.name},xe.createElement("div",{style:{display:"flex",alignItems:"center"}},xe.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},Ue.name),(Ue==null?void 0:Ue.type)==="personal"&&xe.createElement("div",{style:{marginLeft:"5px",border:"1px solid #24C074",color:"#24C074",padding:"0 4px",borderRadius:"2px",fontSize:"12px",height:"20px",lineHeight:"20px"}},"\u81EA\u7528")))))),oe&&xe.createElement(de.Z,{className:`ml20 ${Le&&we.add_style}`},xe.createElement("span",{className:we.tips},"\u6CA1\u6709\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF1F"),xe.createElement("span",{className:we.linkBtn,onClick:We},"\u65B0\u5EFA\u77E5\u8BC6\u70B9")))}},36527:function(dn,pn,at){"use strict";var ot=at(67294),_t=at(71230),ae=at(15746),Ge=at(55238),Ie=at(85804),me=at(65226),de=at(71736),Ee=at(84279),we=at(67294);const be=(0,ot.forwardRef)(({callback:Te,showSaveButton:ve,value:xe=""},fe)=>{const z=(0,ot.useRef)(),ee=[{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 "}]}]}],oe=[{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}`}]}]}],ie=pe=>{z.current.setValue(z.current.getValue()+" "+pe.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(_t.Z,{className:de.Z.lists,gutter:[10,10]},ee.map((pe,Se)=>we.createElement(ae.Z,{flex:"110px",className:de.Z.item},we.createElement("div",null,we.createElement(me.Z,{value:`$$${pe.value}$$`}),pe.name),we.createElement("div",{className:de.Z.children},pe.children.map((Le,De)=>we.createElement("div",{key:De},we.createElement("h1",null,Le.name),we.createElement(_t.Z,{gutter:[10,10]},Le.data.map((Fe,Ae)=>we.createElement(ae.Z,{key:Ae,onClick:()=>ie(Fe),className:de.Z.diamond},we.createElement(me.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(_t.Z,{className:de.Z.lists,gutter:[10,10]},oe.map((pe,Se)=>we.createElement(ae.Z,{flex:"110px",className:de.Z.item},we.createElement("div",null,we.createElement(me.Z,{value:"`$$"+pe.value+"$$`"}),pe.name),we.createElement("div",{className:de.Z.children},pe.children.map((Le,De)=>we.createElement("div",{key:De},Le.name&&we.createElement("h1",null,Le.name),we.createElement(_t.Z,{gutter:[10,10]},Le.data.map((Fe,Ae)=>we.createElement(ae.Z,{key:Ae,onClick:()=>ie(Fe),className:de.Z.diamond},we.createElement(me.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))}],ue=()=>{var pe=document.createElement("div");pe.innerHTML=z.current.getValue();var Se=pe.innerText;return Te&&Te(Se),Se};return(0,ot.useImperativeHandle)(fe,()=>({getData:ue})),we.createElement("div",{className:de.Z.mathWrap},we.createElement(Ge.default,{defaultActiveKey:"1",items:le}),we.createElement("math-field",{locale:"zh_cn",className:de.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},xe||""),ve&&we.createElement("div",{className:de.Z.button},we.createElement(Ie.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});pn.Z=be},26194:function(dn,pn,at){"use strict";var ot=at(67294),_t=at(4977),ae=at(85804),Ge=Object.defineProperty,Ie=Object.defineProperties,me=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,be=(fe,z,ee)=>z in fe?Ge(fe,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):fe[z]=ee,Te=(fe,z)=>{for(var ee in z||(z={}))Ee.call(z,ee)&&be(fe,ee,z[ee]);if(de)for(var ee of de(z))we.call(z,ee)&&be(fe,ee,z[ee]);return fe},ve=(fe,z)=>Ie(fe,me(z));const xe=({img:fe,buttonProps:z={},styles:ee={},customText:oe,ButtonText:ie,ButtonClick:le,Buttonclass:ue,ButtonTwo:pe,imgStyles:Se,loading:Le=!1,className:De=""})=>ot.createElement("section",{className:`tc animated fadeIn ${De}`,style:Te({color:"#999",margin:"100px auto",visibility:Le?"hidden":"visible"},ee)},ot.createElement("img",{src:fe||_t,style:ve(Te({},Se),{pointerEvents:"none",userSelect:"none"})}),ot.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&ot.createElement(ae.ZP,Te({className:ue,onClick:le},z),ie),pe&&pe);pn.Z=xe},20819:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return ue}});var ot=at(67294),_t={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ae=at(85804),Ge=at(30153),Ie=at(36295),me=at(83062),de=at(28706),Ee=at(15835),we=at(26194),be=at(11320),Te=at(66540),ve=at(67294),xe=Object.defineProperty,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(pe,Se,Le)=>Se in pe?xe(pe,Se,{enumerable:!0,configurable:!0,writable:!0,value:Le}):pe[Se]=Le,ie=(pe,Se)=>{for(var Le in Se||(Se={}))z.call(Se,Le)&&oe(pe,Le,Se[Le]);if(fe)for(var Le of fe(Se))ee.call(Se,Le)&&oe(pe,Le,Se[Le]);return pe},le=(pe,Se,Le)=>new Promise((De,Fe)=>{var Ae=He=>{try{ze(Le.next(He))}catch(Ye){Fe(Ye)}},Oe=He=>{try{ze(Le.throw(He))}catch(Ye){Fe(Ye)}},ze=He=>He.done?De(He.value):Promise.resolve(He.value).then(Ae,Oe);ze((Le=Le.apply(pe,Se)).next())}),ue=({editOffice:pe="view",data:Se,issaver:Le,onSaver:De,theme:Fe,type:Ae,filename:Oe,monacoEditor:ze,className:He,style:Ye,close:We,onClose:Ue,hasMask:st,disabledDownload:dt,onImgDimensions:gt,showNodata:Et,recordInfo:Ke})=>{const[et,$e]=(0,ot.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[vt,wt]=(0,ot.useState)(""),[ht,pt]=(0,ot.useState)(),ct=window.ENV==="build"?"/react/build":"",Ct=location.host.startsWith("localhost")?be.Z.PROXY_SERVER:be.Z.API_SERVER,yt=10*(1024*1024),Tt=(0,ot.useRef)();Se!=null&&Se.startsWith("/api")&&Ae!=="txt"&&(Se=be.Z.API_SERVER+Se);const St=Je=>Je.substring(Je.lastIndexOf("/")+1).split(".").pop();Oe&&ze&&(ze.filename=Oe),(0,ot.useEffect)(()=>{var Je,rt;const Be=(rt=(Je=document.cookie)==null?void 0:Je.replace(/\s/g,""))==null?void 0:rt.split(";");Be==null||Be.map(_e=>{let Xe=_e.split("=");Xe[0]==="_educoder_session"&&wt(Xe[1])})},[]),(0,ot.useEffect)(()=>{Ae==="office"&&(Se.indexOf("bigfilescdn.")>-1||Se.indexOf("bigfiles1")>-1?pt({url:Se,fileType:St(Se),model:Se.indexOf("model=edit")?"edit":"view"}):Qe())},[Ae,Se]);function nt(Je){return le(this,null,function*(){Je.data.type==="pdfdata"&&(De(Je.data.data),window.removeEventListener("message",nt,!1)),console.log("mess---:",Je.data)})}const Qe=()=>le(void 0,null,function*(){console.log("data:",Se);let Je=Se;Se.startsWith("http")||(Je=location.origin+Je);let rt=new URL(Je).pathname.split("/").pop();const Be=yield(0,Ee.gJ)({attachment_id:rt});Be.url=Ct+Be.url,pt(Be)}),Ce=()=>{if(Se.startsWith("http")||Se.startsWith("blob:")){Ne();return}(0,de.Sv)(Oe||"educoder",Se,Oe)},Ne=()=>{Ke&&(0,Te.fc)({id:Ke==null?void 0:Ke.id,watch_type:1,course_id:Ke==null?void 0:Ke.course_id}),(0,de.Nd)(Oe||"educoder",decodeURIComponent(Se))};return ve.createElement("div",{style:ie({},Ye||{}),className:`${st&&_t.bgBlack} ${Ae?_t.wrp:"hide"}`},We&&ve.createElement("div",{className:_t.close,ref:Tt},!!gt&&ve.createElement(me.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Tt.current},ve.createElement("span",{onClick:()=>{Ue(),gt()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!dt&&ve.createElement(me.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Tt.current},ve.createElement("span",{onClick:Ne},ve.createElement("i",{className:"icon-quxiaozhiding"}))),Le&&ve.createElement(me.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Tt.current},ve.createElement("span",{className:"",onClick:()=>{const Je=document.getElementById("pdfiframe");window.addEventListener("message",nt,!1),setTimeout(()=>{Je.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(me.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Tt.current},ve.createElement("span",{className:"",onClick:()=>{Ue()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${_t[He]} ${He} ${_t.monaco} ${Ae==="txt"?"show":"hide"}`},Ae==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(Ie.ZP,ie({},ze)))),Ae==="audio"&&ve.createElement("audio",{src:`${(Se==null?void 0:Se.indexOf("http://"))>-1||(Se==null?void 0:Se.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Se}`,autoPlay:!0}),Ae==="video"&&ve.createElement(ve.Fragment,null,(Se==null?void 0:Se.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${Se}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Se}`,autoPlay:!0})),Ae==="office"&&ht&&ve.createElement("iframe",{src:`${ct}/office.html?key=${ht.key}&url=${btoa(ht.url)}&callbackUrl=${Ct+(ht.callbackUrl||"")}&fileType=${ht.fileType}&title=${ht.title||""}&model=${pe}&officeServer=${be.Z.ONLYOFFICE}&disabledDownload=${!!dt}`}),Ae==="html"&&ve.createElement("iframe",{src:Se+"&disposition=inline"}),Ae==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${ct}/js/pdfview/index.html?filename=${Oe||"educoder.pdf"}&url=${encodeURIComponent(Se)}&disabledDownload=${!!dt}&model=${pe}`}),Ae==="image"&&ve.createElement("img",{src:`${(Se==null?void 0:Se.indexOf("http://"))>-1||(Se==null?void 0:Se.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Se}`}),(Ae==="other"||Ae==="download")&&ve.createElement(ve.Fragment,null,Et?ve.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(ae.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ce,disabled:dt},"\u4E0B\u8F7D")}):ve.createElement(ae.ZP,{type:"primary",size:"middle",onClick:Ce,disabled:dt},ve.createElement(Ge.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},41307:function(dn,pn,at){"use strict";at.d(pn,{h:function(){return z},x:function(){return ee}});var ot=at(35567),_t=at(52654),ae=at(65226),Ge=at(67294),Ie=Object.defineProperty,me=Object.defineProperties,de=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,Te=(oe,ie,le)=>ie in oe?Ie(oe,ie,{enumerable:!0,configurable:!0,writable:!0,value:le}):oe[ie]=le,ve=(oe,ie)=>{for(var le in ie||(ie={}))we.call(ie,le)&&Te(oe,le,ie[le]);if(Ee)for(var le of Ee(ie))be.call(ie,le)&&Te(oe,le,ie[le]);return oe},xe=(oe,ie)=>me(oe,de(ie)),fe=(oe,ie)=>{var le={};for(var ue in oe)we.call(oe,ue)&&ie.indexOf(ue)<0&&(le[ue]=oe[ue]);if(oe!=null&&Ee)for(var ue of Ee(oe))ie.indexOf(ue)<0&&be.call(oe,ue)&&(le[ue]=oe[ue]);return le};const z=oe=>{var ie=oe,{value:le,onChange:ue,scrollId:pe}=ie,Se=fe(ie,["value","onChange","scrollId"]);return Ge.createElement("div",{id:pe||""},Ge.createElement(ot.Z,xe(ve({},Se),{defaultValue:le,onChange:(Le,De)=>{De!=null&&De.length?ue(Le,De):ue(Le)}})))},ee=({value:oe,onChange:ie,placeholder:le,height:ue=140,isEdit:pe,miniToolbar:Se,watch:Le=!0})=>pe?Ge.createElement(ot.Z,{watch:Le,isFocus:!0,height:ue||void 0,placeholder:le,defaultValue:oe,onChange:ie,miniToolbar:Se}):Ge.createElement("div",{style:{cursor:"pointer"}},oe?Ge.createElement(ae.Z,{className:_t.Z.inputBorder,value:oe}):Ge.createElement("div",{className:`${_t.Z.inputBorder} ${_t.Z.placeholder} inputBorderError`},le))},65226:function(dn,pn,at){"use strict";at.d(pn,{z:function(){return Ae},Z:function(){return Oe}});var ot=at(67294),_t=at(81897),ae=at(51161),Ge=at(11771),Ie=at(67631),me=at.n(Ie),de=at(11320),Ee=at(28706),we=at(20527),be=at(25934),Te=at(20819),ve=at(67294),fe=({html:ze})=>{const He=(0,ot.useRef)(null),Ye=(0,ot.useRef)(null),We=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,ot.useEffect)(()=>{const Ue=He.current.attachShadow({mode:"open"});Ye.current=document.createElement("div"),Ye.current.className="markdown-body",Ye.current.innerHTML=ze,Ue.appendChild(Ye.current);const st=document.createElement("style");return st.textContent=We,Ue.appendChild(st),()=>{Ue.innerHTML=""}},[]),(0,ot.useEffect)(()=>{Ye.current&&(Ye.current.innerHTML=ze)},[ze]),ve.createElement("div",{ref:He})};function z(ze){const He=["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"],Ye=new RegExp(`\\b(${He.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return ze.replace(Ye,"").trim()}var ee=Object.defineProperty,oe=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ue=(ze,He,Ye)=>He in ze?ee(ze,He,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):ze[He]=Ye,pe=(ze,He)=>{for(var Ye in He||(He={}))ie.call(He,Ye)&&ue(ze,Ye,He[Ye]);if(oe)for(var Ye of oe(He))le.call(He,Ye)&&ue(ze,Ye,He[Ye]);return ze};const Se="@\u2581\u2581@",Le="@\u2581@",De=/<pre[^>]*>/g;function Fe(ze){let He=document.createElement("div");return He.innerHTML=ze,He.childNodes.length===0?"":He.childNodes[0].nodeValue}const Ae=(ze,He)=>{ze=ze||"";const Ye=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,We=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ue=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,st=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return He?ze.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ye,(dt,gt,Et,Ke,et,$e,vt)=>{const wt=gt||Ke||$e,ht=Et||et||vt||"?";return de.Z.API_SERVER+"/api/attachments/"+wt+ht+"&t="+(0,Ee.Jn)(wt,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ze=ze.replace(st,(dt,gt,Et,Ke,et,$e,vt)=>{const wt=gt||Ke||$e,ht=Et||et||vt||"?";return de.Z.API_SERVER+"/attachments/download/"+wt+ht+"&t="+(0,Ee.Jn)(wt,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(Ye,(dt,gt,Et,Ke,et,$e,vt)=>{const wt=gt||Ke||$e,ht=Et||et||vt||"?";return de.Z.API_SERVER+"/api/attachments/"+wt+ht+"&t="+(0,Ee.Jn)(wt,Date.now())+(dt.indexOf(")")>-1?")":"&")}).replace(We,(dt,gt,Et,Ke,et)=>{const $e=gt||Ke,vt=Et||et||"";return'"'+de.Z.API_SERVER+"/api/attachments/"+$e+vt+$e+vt+"&t="+(0,Ee.Jn)($e,Date.now())}).replace(Ue,(dt,gt,Et,Ke,et)=>{const $e=gt||Ke,vt=Et||et||"";return"("+de.Z.API_SERVER+"/files/uploads/"+$e+vt+$e+vt+"&t="+(0,Ee.Jn)($e,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,`
`),ze)};var Oe=({value:ze="",className:He,showTextOnly:Ye,showLines:We,style:Ue={},stylesPrev:st={},highlightKeywords:dt,showProgramFill:gt,isProgramFill:Et,disabledFill:Ke=!1,programFillValue:et,onFillChange:$e=ht=>{},onFillBlur:vt=()=>{},onFillFocus:wt=()=>{}})=>{let ht=z(String(ze||""));const[pt,ct]=(0,ot.useState)(""),[Ct,xt]=(0,ot.useState)("office"),[yt,Tt]=(0,ot.useState)([]),St=(0,ot.useRef)("a"+(0,be.Z)()),nt={},Qe=jt=>/<style[\s\S]*?>/i.test(jt||""),Ce=(jt,Ht,ln)=>{const an=document.createElement(jt===Le?"input":"textarea");an.style.width="100%",an.style.height=jt===Le?"40px":"151px",an.rows=5,an.spellcheck=!1,an.name="edu-program-fill",an.placeholder="\u8BF7\u8F93\u5165",an.dataset.id=Ht;const sn=Object.keys(nt).length;return nt[sn]=an,`<span class="edu-program-fill-wrap ${jt===Le?"":"show"}" style="width:${jt===Le?"600px":"100%"}" title=${ln||""}><span>${an.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ne(jt){return jt=jt.replace(/!\[.*?\]\(.*?\)/g,""),jt=jt.replace(/\[.*?\]\(.*?\)/g,""),jt=jt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),jt=jt.replace(/<embed.*?>/g,""),jt=jt.replace(/<img.*?>/g,""),jt=jt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),jt=jt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),jt=jt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),jt=jt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),jt}const Je=jt=>!Ye&&Qe(ht)?jt:jt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ht,ln){let an=ln.replace(/(\n|\r)/g,"").split("}"),sn=[];return an.map($t=>{$t!=""&&sn.push(`.${St.current} ${$t}`)}),`<style>${sn.join("}")}</style>`}),rt=(0,ot.useMemo)(()=>{try{const an=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,sn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,$t=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,On=/\(\/attachments\/download\//g;ht=ht.replace(On,"("+de.Z.API_SERVER+"/attachments/download/").replace(an,"("+de.Z.API_SERVER+"/api/attachments/").replace(sn,'"'+de.Z.API_SERVER+"/api/attachments/").replace($t,'"'+de.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(an){}if(gt){let an=-1;return ht=ht.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(sn,$t,On){var un;return++an,Ce(sn,an,(un=et==null?void 0:et[an])==null?void 0:un.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Je(ht||"")}</pre>`}let jt=Je(ht);jt=(0,ae.ZP)(jt);const Ht=(0,ae.ez)();ht.match(/\[TOC\]/)&&(jt=jt.replace("<p>[TOC]</p>",(0,ae.Qv)()),(0,ae.Iy)()),jt=jt.replace(/(__special_katext_id_\d+__)/g,(an,sn)=>{const{type:$t,expression:On}=Ht[sn];return(0,we.renderToString)(Fe(On)||"",{displayMode:$t==="block",throwOnError:!1,output:"html"})}),jt=jt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ae.AL)();const ln=document.createElement("div");if(ln.innerHTML=jt,Ye)return ln.innerText;if(dt){const an=dt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return lt(ln,an),ln.innerHTML}return setTimeout(()=>zt(),500),ln.innerHTML},[ht,dt]);(0,ot.useEffect)(()=>{Pt.current&&Pt.current.querySelectorAll(["input","textarea"]).forEach(Ht=>{Ht.oninput=Be,Ht.onblur=_e,Ht.onfocus=Xe})},[yt]),(0,ot.useEffect)(()=>{var jt,Ht,ln,an,sn;if(et!=null&&et.length)try{const $t=Pt.current.querySelectorAll(".edu-program-fill-score"),On=Pt.current.querySelectorAll('[name="edu-program-fill"]');for(const[un,mn]of On.entries())mn.value=((jt=et==null?void 0:et[un])==null?void 0:jt.value)||"",((Ht=et==null?void 0:et[un])==null?void 0:Ht.type)==="warning"?mn.className="program-fill-warning":((ln=et==null?void 0:et[un])==null?void 0:ln.type)==="success"?mn.className="program-fill-success":mn.className="";for(const[un,mn]of $t.entries())mn.innerHTML=(an=et==null?void 0:et[un])!=null&&an.score?`${(sn=et==null?void 0:et[un])==null?void 0:sn.score}\u5206`:"";Tt(et)}catch($t){console.log($t,"error")}},[et]);const Be=jt=>{yt[jt.target.dataset.id]=yt[jt.target.dataset.id]||{},yt[jt.target.dataset.id].value=jt.target.value,Tt([...yt]),$e(yt,jt.target.dataset.id)},_e=jt=>{yt[jt.target.dataset.id]=yt[jt.target.dataset.id]||{},yt[jt.target.dataset.id].value=jt.target.value,Tt([...yt]),vt(yt,jt.target.dataset.id)},Xe=jt=>{yt[jt.target.dataset.id]=yt[jt.target.dataset.id]||{},yt[jt.target.dataset.id].value=jt.target.value,Tt([...yt]),wt(yt,jt.target.dataset.id)};function lt(jt,Ht){return jt.childNodes.forEach(ln=>{var an;if(ln.childNodes.length>0)lt(ln,Ht);else if(ln.nodeName!=="IMG")if(ln.innerHTML)ln.innerHTML=(an=ln.innerHTML)==null?void 0:an.replace(new RegExp(Ht,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const sn=document.createElement("span");sn.innerHTML=ln.textContent.replace(new RegExp(Ht,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ln.replaceWith(sn)}})}const Pt=(0,ot.useRef)();ae.jb.WebkitLineClamp=We,We&&(Ue=pe(pe({},Ue),ae.jb));function kt(jt){let Ht=jt.target;if(Ht.tagName.toUpperCase()==="A"){let ln=Ht.getAttribute("href");if(ln.indexOf("office")>-1)jt.preventDefault(),ct(ln),xt("office");else if(ln.indexOf("application/pdf")>-1)jt.preventDefault(),ct(ln),xt("pdf");else if(ln.indexOf("text/html")>-1)jt.preventDefault(),ct(ln),xt("html");else if(ln.startsWith("#")){jt.preventDefault();let an=document.getElementById(ln.replace("#",""));an&&an.scrollIntoView(!0)}}}const zt=()=>{var jt;const Ht=(jt=Pt.current)==null?void 0:jt.querySelectorAll("video");Ht==null||Ht.forEach(ln=>{if(ln.oncontextmenu=()=>!1,ln.src.indexOf(".m3u8")>-1&&!ln.canPlayType("application/vnd.apple.mpegurl")){if(me().isSupported()){var an=new(me());an.loadSource(ln.src),an.attachMedia(ln)}}})};return(0,ot.useEffect)(()=>{if(Pt.current&&rt&&rt.match(De)&&window.PR.prettyPrint(),Pt.current)return Pt.current.addEventListener("click",kt),()=>{var jt;(jt=Pt.current)==null||jt.removeEventListener("click",kt),(0,ae.AL)(),(0,ae.Iy)()}},[rt,Pt.current,kt]),(0,ot.useEffect)(()=>{var jt;const Ht=ln=>{ln.preventDefault(),ln.clipboardData.setData("text",window.getSelection().toString())};return(jt=Pt.current)==null||jt.addEventListener("copy",Ht),()=>{var ln;(ln=Pt.current)==null||ln.removeEventListener("copy",Ht)}},[Pt.current]),ot.createElement(ot.Fragment,null,Ye&&ot.createElement("div",{ref:Pt},rt),!Ye&&!Qe(rt)&&ot.createElement("div",{ref:Pt,style:pe({},Ue),className:`${He||""} ${Ke?"disabled-fill":""} markdown-body ${St.current}`,dangerouslySetInnerHTML:{__html:rt}}),!Ye&&Qe(rt)&&ot.createElement(fe,{html:rt}),ot.createElement(Te.Z,{close:!0,data:pt,type:pt!=null&&pt.length?Ct:"",style:pe({},st),onClose:()=>ct("")}))}},59451:function(dn,pn,at){"use strict";at.d(pn,{cT:function(){return Ae},pe:function(){return Le}});var ot=at(67294),_t=at(35059),ae=at(2453),Ge=at(33170),Ie=at(81354),me=at.n(Ie),de=at(25934),Ee=at(35973),we=at(56448),be=at.n(we),Te=Object.defineProperty,ve=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(ze,He,Ye)=>He in ze?Te(ze,He,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):ze[He]=Ye,ie=(ze,He)=>{for(var Ye in He||(He={}))z.call(He,Ye)&&oe(ze,Ye,He[Ye]);if(fe)for(var Ye of fe(He))ee.call(He,Ye)&&oe(ze,Ye,He[Ye]);return ze},le=(ze,He)=>ve(ze,xe(He)),ue=(ze,He)=>{var Ye={};for(var We in ze)z.call(ze,We)&&He.indexOf(We)<0&&(Ye[We]=ze[We]);if(ze!=null&&fe)for(var We of fe(ze))He.indexOf(We)<0&&ee.call(ze,We)&&(Ye[We]=ze[We]);return Ye},pe=(ze,He,Ye)=>new Promise((We,Ue)=>{var st=Et=>{try{gt(Ye.next(Et))}catch(Ke){Ue(Ke)}},dt=Et=>{try{gt(Ye.throw(Et))}catch(Ke){Ue(Ke)}},gt=Et=>Et.done?We(Et.value):Promise.resolve(Et.value).then(st,dt);gt((Ye=Ye.apply(ze,He)).next())});const{Dragger:Se}=_t.default,Le=ze=>{const He="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var We=me().enc.Utf8.parse(He);let Ue=me().enc.Utf8.parse(Ye);var st=me().AES.decrypt(ze,We,{iv:Ue,mode:me().mode.CBC});return st.toString(me().enc.Utf8)};let De;const Fe=ze=>pe(void 0,[ze],function*({identifier:He,oldFilename:Ye,newFilename:We}){var Ue,st,dt,gt,Et,Ke;const et=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});et.data=JSON.parse(Le(et.data));const $e=new OSS({endpoint:(Ue=et==null?void 0:et.data)==null?void 0:Ue.end_point,region:(st=et==null?void 0:et.data)==null?void 0:st.region,accessKeyId:(dt=et==null?void 0:et.data)==null?void 0:dt.access_key_id,accessKeySecret:(gt=et==null?void 0:et.data)==null?void 0:gt.access_key_secret,bucket:(Et=et==null?void 0:et.data)==null?void 0:Et.bucket,stsToken:(Ke=et==null?void 0:et.data)==null?void 0:Ke.security_token});return new Promise((vt,wt)=>{console.log(11111,`${He}/${Ye}`,`${He}/${We}`,et.data),$e.copy(`/${He}/${Ye}`,`/${He}/${We}`).then(ht=>{console.log("\u62F7\u8D1D\u6210\u529F",ht)}).catch(ht=>{console.log(ht)})})}),Ae=(ze,He,Ye)=>pe(void 0,null,function*(){var We,Ue,st,dt,gt,Et;He.file_name=ze.name;const Ke=yield(0,Ge.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",Le(Ke.data)),Ke.data=JSON.parse(Le(Ke.data));const et=ze.name.split(".");et.pop();const $e=He.realFileName?et.join(""):(0,de.Z)(),vt=new(be())({endpoint:(We=Ke==null?void 0:Ke.data)==null?void 0:We.end_point,region:(Ue=Ke==null?void 0:Ke.data)==null?void 0:Ue.region,accessKeyId:(st=Ke==null?void 0:Ke.data)==null?void 0:st.access_key_id,accessKeySecret:(dt=Ke==null?void 0:Ke.data)==null?void 0:dt.access_key_secret,bucket:(gt=Ke==null?void 0:Ke.data)==null?void 0:gt.bucket,stsToken:(Et=Ke==null?void 0:Ke.data)==null?void 0:Et.security_token});return new Promise((wt,ht)=>{var pt;vt.multipartUpload(`${$e}`,new Blob([ze],{type:ze.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(pt=Ke==null?void 0:Ke.data)==null?void 0:pt.callback_url,host:Ke==null?void 0:Ke.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ge.rz)(He)}})).then(function(ct){var Ct;ze.response=(Ct=ct.data)==null?void 0:Ct.data,wt(ct==null?void 0:ct.data)}).catch(function(ct){ht(ct),console.log("err:",ct)})})}),Oe=ze=>{var He=ze,{user:Ye,cancelUpload:We}=He,Ue=ue(He,["user","cancelUpload"]);const[st,dt]=(0,ot.useState)([]);let[gt,Et]=(0,ot.useState)();const Ke={onRemove:$e=>{dt([...st.filter(vt=>vt.name!==$e.name)]),Ue.onChange(st.filter(vt=>vt.name!==$e.name))},disabled:Ue.disabled,multiple:!0,fileList:st==null?void 0:st.map($e=>$e.file),customRequest:()=>{},beforeUpload:$e=>pe(void 0,null,function*(){let vt=Ue.maxSize||1073741824;if(st.filter(wt=>wt.name===$e.name).length){ae.ZP.info(`${$e.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return($e==null?void 0:$e.size)>vt?(ae.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${vt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(st.push({name:$e.name,file:$e}),dt([...st]),Ue.onChange(st),!1)})},et=($e,vt)=>pe(void 0,null,function*(){var wt,ht,pt,ct,Ct,xt;vt.file_name=$e.name;const yt=$e.name,Tt=yield(0,Ge.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(Tt.data=JSON.parse(Le(Tt.data)),(Tt==null?void 0:Tt.status)!==0){st[st.findIndex(Qe=>Qe.name===yt)].status="error",st[st.findIndex(Qe=>Qe.name===yt)].file.status="error",Ue.onChange(st),ae.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}gt=new(be())({endpoint:(wt=Tt==null?void 0:Tt.data)==null?void 0:wt.end_point,region:(ht=Tt==null?void 0:Tt.data)==null?void 0:ht.region,accessKeyId:(pt=Tt==null?void 0:Tt.data)==null?void 0:pt.access_key_id,accessKeySecret:(ct=Tt==null?void 0:Tt.data)==null?void 0:ct.access_key_secret,bucket:(Ct=Tt==null?void 0:Tt.data)==null?void 0:Ct.bucket,stsToken:(xt=Tt==null?void 0:Tt.data)==null?void 0:xt.security_token}),console.log($e,"file"),Et(gt);const St=$e.name.split(".");St.pop();const nt=yt.indexOf(".")>-1?vt.realFileName?St.join("."):(0,de.Z)():yt;return new Promise((Qe,Ce)=>{var Ne;try{gt.multipartUpload(`${Ue.identifier}/${nt}${yt.indexOf(".")>-1?"."+yt.split(".").pop():""}`,new Blob([$e.file],{type:$e.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Je,rt,Be)=>{try{console.log("\u8FDB\u5EA6",Je,rt,Be);const _e=st.findIndex(Xe=>Xe.name===yt);st[_e].file.percent=Je*100,st[_e].tempCheckpoint=rt,dt([...st])}catch(_e){}},checkpoint:st[st.findIndex(Je=>Je.name===yt)].tempCheckpoint,callback:{customValue:{id:yt+""},url:(Ne=Tt==null?void 0:Tt.data)==null?void 0:Ne.callback_url,host:Tt==null?void 0:Tt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ge.rz)(vt)}}).then(function(Je){var rt,Be,_e;const Xe=st.findIndex(Pt=>Pt.name===yt);let lt="done";if(((rt=Je.data)==null?void 0:rt.status)===0){$e.response=(Be=Je.data)==null?void 0:Be.data;const Pt=st.findIndex(kt=>kt.name===yt);st[Pt].status="done",st[Pt].file.status="done"}else ae.ZP.warning((_e=Je.data)==null?void 0:_e.message),lt="error";st[Xe].status=lt,st[Xe].file.status=lt,Ue.onChange(st),Qe(Je==null?void 0:Je.data)}).catch(function(Je){st[st.findIndex(rt=>rt.name===yt)].status="error",st[st.findIndex(rt=>rt.name===yt)].file.status="error",ae.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),dt([...st]),Ue.onChange(st),Ce(Je),console.log("err:",Je)})}catch(Je){}})});return(0,ot.useEffect)(()=>{st.every($e=>$e==="done"||$e==="error")&&Ue.onComplete(st)},[st]),(0,ot.useEffect)(()=>{We&&(gt==null||gt.cancel())},[We]),(0,ot.useEffect)(()=>{Ue.uploading&&st.map($e=>pe(void 0,null,function*(){var vt;if((!$e.status||$e.status==="error")&&!We){$e.status="uploading",$e.file.status="uploading";const wt=yield et($e,{login:(vt=Ye==null?void 0:Ye.userInfo)==null?void 0:vt.login,container_type:Ue.container_type,container_id:Ue.container_id,description:Ue.description,realFileName:Ue.realFileName})}}))},[Ue.uploading]),ot.createElement(Se,le(ie({},Ke),{height:Ue.height,className:Ue.className}),ot.createElement("p",{className:"ant-upload-hint"},Ue.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};pn.ZP=(0,Ee.connect)(({loading:ze,globalSetting:He,user:Ye})=>({globalSetting:He,loading:ze.models.competitions,user:Ye}))(Oe)},57444:function(dn,pn,at){"use strict";at.d(pn,{h:function(){return pe}});var ot=at(67294),_t=at(88044),ae=at(91773),Ge=at(85804),Ie=at(4631),me=at.n(Ie),de=at(71749),Ee=at(30483),we=Object.defineProperty,be=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,z=(Se,Le,De)=>Le in Se?we(Se,Le,{enumerable:!0,configurable:!0,writable:!0,value:De}):Se[Le]=De,ee=(Se,Le)=>{for(var De in Le||(Le={}))xe.call(Le,De)&&z(Se,De,Le[De]);if(ve)for(var De of ve(Le))fe.call(Le,De)&&z(Se,De,Le[De]);return Se},oe=(Se,Le)=>be(Se,Te(Le));const ie=_t.default.Option,le={labelCol:{span:4},wrapperCol:{span:20}},ue={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"]};pn.Z=({callback:Se,onCancel:Le})=>{const[De,Fe]=(0,ot.useState)("python");function Ae(ze){Fe(ue[ze][1])}function Oe(ze){Se(ze)}return ot.createElement(ae.default,oe(ee({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Oe,style:{width:500}}),ot.createElement(ae.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ot.createElement(_t.default,{getPopupContainer:ze=>ze.parentNode,onChange:Ae},Object.keys(ue).map(ze=>ot.createElement(ie,{key:ze,value:ze},ue[ze][0])))),ot.createElement(ae.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ot.createElement(pe,{mode:De})),ot.createElement("div",{className:"flex-container flex-end"},ot.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ot.createElement(Ge.ZP,{type:"ghost",onClick:Le},"\u53D6\u6D88")))};function pe({value:Se,onChange:Le,mode:De,options:Fe={}}){const Ae=(0,ot.useRef)(),[Oe,ze]=(0,ot.useState)();return(0,ot.useEffect)(()=>{if(Oe){let He=function(Ye){const We=Ye.getValue();Le&&Le(We)};return Oe.on("change",He),()=>{Oe.off("change",He)}}},[Oe,Le]),(0,ot.useEffect)(()=>{Oe&&Oe.setOption("mode",De)},[Oe,De]),(0,ot.useEffect)(()=>{Oe&&(Se!==Oe.getValue()||Se==="")&&setTimeout(()=>{Oe.setValue(Se||"")},300)},[Oe,Se]),(0,ot.useEffect)(()=>{if(Ae.current&&!Oe){const He=me().fromTextArea(Ae.current,ee({mode:De,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Fe));ze(He)}},[Ae.current,Oe]),ot.createElement("div",{className:"my-codemirror-container"},ot.createElement("textarea",{ref:Ae}))}},35567:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return Mr}});var ot=at(67294),_t=at(4631),ae=at.n(_t),Ge=at(91033),Ie=at(71749),me=at(57341),de=at(82801),Ee=at(88386),we=at(49047),be=at(80785),Te=at(65226),ve=({value:nn="",className:on,showTextOnly:Kt,showLines:hn,style:qn={}})=>{const tr=(0,ot.useMemo)(()=>"",[nn]);return ot.createElement(ot.Fragment,null,ot.createElement("div",{dangerouslySetInnerHTML:{__html:tr}}))},xe=Object.defineProperty,fe=Object.defineProperties,z=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(nn,on,Kt)=>on in nn?xe(nn,on,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):nn[on]=Kt,ue=(nn,on)=>{for(var Kt in on||(on={}))oe.call(on,Kt)&&le(nn,Kt,on[Kt]);if(ee)for(var Kt of ee(on))ie.call(on,Kt)&&le(nn,Kt,on[Kt]);return nn},pe=(nn,on)=>fe(nn,z(on));let Se=[{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 Le({onActionCallback:nn,title:on,icon:Kt,actionName:hn,className:qn="",children:tr}){function ur(){nn(hn)}return ot.createElement("a",{title:on,className:qn,onClick:ur},ot.createElement("i",{className:`${Kt}`}),tr)}var De=({watch:nn,showNullButton:on,showNullProgramButton:Kt,onActionCallback:hn,fullScreen:qn,insertTemp:tr,hidetoolBar:ur,extraUse:Qt})=>{const Cn=[...Se,{title:`${nn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${nn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ot.createElement("ul",{className:"markdown-toolbar-container"},!ur&&Cn.map((dr,Ar)=>ot.createElement("li",{key:Ar},dr.actionName?ot.createElement(Le,pe(ue({},dr),{onActionCallback:hn})):ot.createElement("span",{className:"v-line"}))),on?ot.createElement("li",null,ot.createElement(Le,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:hn},ot.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Kt?ot.createElement(ot.Fragment,null,ot.createElement("li",null,ot.createElement(Le,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:hn},ot.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ot.createElement("li",null,ot.createElement(Le,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:hn},ot.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,tr&&ot.createElement("li",null,ot.createElement(Le,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${tr}`,onActionCallback:hn},ot.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Qt&&ot.createElement("li",null,Qt),ot.createElement("li",{className:"btn-full-screen"},ot.createElement(Le,{icon:`${qn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:qn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:hn})))},Fe=at(76621),Ae=at(91773),Oe=at(28802),ze=at(85804),He=Object.defineProperty,Ye=Object.defineProperties,We=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,gt=(nn,on,Kt)=>on in nn?He(nn,on,{enumerable:!0,configurable:!0,writable:!0,value:Kt}):nn[on]=Kt,Et=(nn,on)=>{for(var Kt in on||(on={}))st.call(on,Kt)&&gt(nn,Kt,on[Kt]);if(Ue)for(var Kt of Ue(on))dt.call(on,Kt)&&gt(nn,Kt,on[Kt]);return nn},Ke=(nn,on)=>Ye(nn,We(on));const et={labelCol:{span:4},wrapperCol:{span:20}};var $e=({callback:nn,onCancel:on})=>{function Kt(hn){nn(hn)}return ot.createElement(Ae.default,Ke(Et({},et),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Kt,style:{width:500}}),ot.createElement(Ae.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ot.createElement(Oe.default,null)),ot.createElement(Ae.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ot.createElement(Oe.default,null)),ot.createElement("div",{className:"flex-container flex-end"},ot.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ot.createElement(ze.ZP,{type:"ghost",onClick:on},"\u53D6\u6D88")))},vt=at(57444),wt=at(70859),ht=at(62844),pt=at(71230),ct=at(63205),Ct=at(67294),xt=({callback:nn,onCancel:on})=>{const Kt=document.createElement("canvas"),hn=Kt.getContext("2d");Kt.width=1e3,Kt.height=800,hn.fillStyle="#ffffff",hn.fillRect(0,0,Kt.width,Kt.height);const qn=Kt.toDataURL("image/png");return Ct.createElement(ht.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ct.createElement(pt.Z,{style:{height:"100vh"}},Ct.createElement(ct.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:qn,visible:!0,title:String(Date.now())},onOk:tr=>{nn({src:tr.url})},onClose:on})))},yt=at(23495);function Tt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Tt,go.CommandHandler),Tt.prototype.canAlignSelection=function(){var nn=this.diagram;return!(nn===null||nn.isReadOnly||nn.isModelReadOnly||nn.selection.count<2)},Tt.prototype.alignLeft=function(){var nn=this.diagram;nn.startTransaction("aligning left");var on=1/0;nn.selection.each(function(Kt){Kt instanceof go.Link||(on=Math.min(Kt.position.x,on))}),nn.selection.each(function(Kt){Kt instanceof go.Link||Kt.move(new go.Point(on,Kt.position.y))}),nn.commitTransaction("aligning left")},Tt.prototype.alignRight=function(){var nn=this.diagram;nn.startTransaction("aligning right");var on=-1/0;nn.selection.each(function(Kt){if(!(Kt instanceof go.Link)){var hn=Kt.actualBounds.x+Kt.actualBounds.width;on=Math.max(hn,on)}}),nn.selection.each(function(Kt){Kt instanceof go.Link||Kt.move(new go.Point(on-Kt.actualBounds.width,Kt.position.y))}),nn.commitTransaction("aligning right")},Tt.prototype.alignTop=function(){var nn=this.diagram;nn.startTransaction("alignTop");var on=1/0;nn.selection.each(function(Kt){Kt instanceof go.Link||(on=Math.min(Kt.position.y,on))}),nn.selection.each(function(Kt){Kt instanceof go.Link||Kt.move(new go.Point(Kt.position.x,on))}),nn.commitTransaction("alignTop")},Tt.prototype.alignBottom=function(){var nn=this.diagram;nn.startTransaction("aligning bottom");var on=-1/0;nn.selection.each(function(Kt){if(!(Kt instanceof go.Link)){var hn=Kt.actualBounds.y+Kt.actualBounds.height;on=Math.max(hn,on)}}),nn.selection.each(function(Kt){Kt instanceof go.Link||Kt.move(new go.Point(Kt.actualBounds.x,on-Kt.actualBounds.height))}),nn.commitTransaction("aligning bottom")},Tt.prototype.alignCenterX=function(){var nn=this.diagram,on=nn.selection.first();if(on){nn.startTransaction("aligning Center X");var Kt=on.actualBounds.x+on.actualBounds.width/2;nn.selection.each(function(hn){hn instanceof go.Link||hn.move(new go.Point(Kt-hn.actualBounds.width/2,hn.actualBounds.y))}),nn.commitTransaction("aligning Center X")}},Tt.prototype.alignCenterY=function(){var nn=this.diagram,on=nn.selection.first();if(on){nn.startTransaction("aligning Center Y");var Kt=on.actualBounds.y+on.actualBounds.height/2;nn.selection.each(function(hn){hn instanceof go.Link||hn.move(new go.Point(hn.actualBounds.x,Kt-hn.actualBounds.height/2))}),nn.commitTransaction("aligning Center Y")}},Tt.prototype.alignColumn=function(nn){var on=this.diagram;on.startTransaction("align Column"),nn===void 0&&(nn=0),nn=parseFloat(nn);var Kt=new Array;on.selection.each(function(Qt){Qt instanceof go.Link||Kt.push(Qt)});for(var hn=0;hn<Kt.length-1;hn++){var qn=Kt[hn],tr=qn.actualBounds.y+qn.actualBounds.height+nn,ur=Kt[hn+1];ur.move(new go.Point(qn.actualBounds.x,tr))}on.commitTransaction("align Column")},Tt.prototype.alignRow=function(nn){nn===void 0&&(nn=0),nn=parseFloat(nn);var on=this.diagram;on.startTransaction("align Row");var Kt=new Array;on.selection.each(function(Qt){Qt instanceof go.Link||Kt.push(Qt)});for(var hn=0;hn<Kt.length-1;hn++){var qn=Kt[hn],tr=qn.actualBounds.x+qn.actualBounds.width+nn,ur=Kt[hn+1];ur.move(new go.Point(tr,qn.actualBounds.y))}on.commitTransaction("align Row")},Tt.prototype.canRotate=function(nn){var on=this.diagram;return!(on===null||on.isReadOnly||on.isModelReadOnly||on.selection.count<1)},Tt.prototype.rotate=function(nn){nn===void 0&&(nn=90);var on=this.diagram;on.startTransaction("rotate "+nn.toString());var on=this.diagram;on.selection.each(function(Kt){Kt instanceof go.Link||Kt instanceof go.Group||(Kt.angle+=nn)}),on.commitTransaction("rotate "+nn.toString())},Tt.prototype.pullToFront=function(){var nn=this.diagram;nn.startTransaction("pullToFront");var on=new go.Map;nn.selection.each(function(Kt){on.set(Kt.layer,0)}),on.iteratorKeys.each(function(Kt){var hn=0;Kt.parts.each(function(qn){if(!qn.isSelected){var tr=qn.zOrder;isNaN(tr)?qn.zOrder=0:hn=Math.max(hn,tr)}}),on.set(Kt,hn)}),nn.selection.each(function(Kt){Tt._assignZOrder(Kt,on.get(Kt.layer)+1)}),nn.commitTransaction("pullToFront")},Tt.prototype.pushToBack=function(){var nn=this.diagram;nn.startTransaction("pushToBack");var on=new go.Map;nn.selection.each(function(Kt){on.set(Kt.layer,0)}),on.iteratorKeys.each(function(Kt){var hn=0;Kt.parts.each(function(qn){if(!qn.isSelected){var tr=qn.zOrder;isNaN(tr)?qn.zOrder=0:hn=Math.min(hn,tr)}}),on.set(Kt,hn)}),nn.selection.each(function(Kt){Tt._assignZOrder(Kt,on.get(Kt.layer)-1-Tt._findGroupDepth(Kt))}),nn.commitTransaction("pushToBack")},Tt._assignZOrder=function(nn,on,Kt){Kt===void 0&&(Kt=nn),nn.layer===Kt.layer&&(nn.zOrder=on),nn instanceof go.Group&&nn.memberParts.each(function(hn){Tt._assignZOrder(hn,on+1,Kt)})},Tt._findGroupDepth=function(nn){if(nn instanceof go.Group){var on=0;return nn.memberParts.each(function(Kt){on=Math.max(on,Tt._findGroupDepth(Kt))}),on+1}else return 0},Tt.prototype.doKeyDown=function(){var nn=this.diagram;if(nn!==null){var on=nn.lastInput;if(on.key==="Up"||on.key==="Down"||on.key==="Left"||on.key==="Right"){var Kt=this.arrowKeyBehavior;if(Kt==="none")return;if(Kt==="select"){this._arrowKeySelect();return}else if(Kt==="move"){this._arrowKeyMove();return}else if(Kt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Tt.prototype._getAllParts=function(){var nn=new Array;return this.diagram.nodes.each(function(on){nn.push(on)}),this.diagram.parts.each(function(on){nn.push(on)}),nn},Tt.prototype._arrowKeyMove=function(){var nn=this.diagram,on=nn.lastInput,Kt=0,hn=0;if(on.control||on.meta)Kt=1,hn=1;else if(nn.grid!==null){var qn=nn.grid.gridCellSize;hn=qn.width,Kt=qn.height}nn.startTransaction("arrowKeyMove"),nn.selection.each(function(tr){on.key==="Up"?tr.move(new go.Point(tr.actualBounds.x,tr.actualBounds.y-Kt)):on.key==="Down"?tr.move(new go.Point(tr.actualBounds.x,tr.actualBounds.y+Kt)):on.key==="Left"?tr.move(new go.Point(tr.actualBounds.x-hn,tr.actualBounds.y)):on.key==="Right"&&tr.move(new go.Point(tr.actualBounds.x+hn,tr.actualBounds.y))}),nn.commitTransaction("arrowKeyMove")},Tt.prototype._arrowKeySelect=function(){var nn=this.diagram,on=nn.lastInput,Kt=null;on.key==="Up"?Kt=this._findNearestPartTowards(270):on.key==="Down"?Kt=this._findNearestPartTowards(90):on.key==="Left"?Kt=this._findNearestPartTowards(180):on.key==="Right"&&(Kt=this._findNearestPartTowards(0)),Kt!==null&&(on.shift?Kt.isSelected=!0:on.control||on.meta?Kt.isSelected=!Kt.isSelected:nn.select(Kt))},Tt.prototype._findNearestPartTowards=function(nn){var on=this.diagram.selection.first();if(on===null)return null;for(var Kt=on.actualBounds.center,hn=this._getAllParts(),qn=1/0,tr=on,ur=0;ur<hn.length;ur++){var Qt=hn[ur];if(Qt!==on&&Qt.canSelect()){var Cn=Qt.actualBounds.center,dr=Kt.directionPoint(Cn),Ar=this._angleCloseness(dr,nn);if(Ar<=45){var _n=Kt.distanceSquaredPoint(Cn);_n*=1+Math.sin(Ar*Math.PI/180),_n<qn&&(qn=_n,tr=Qt)}}}return tr},Tt.prototype._angleCloseness=function(nn,on){return Math.min(Math.abs(on-nn),Math.min(Math.abs(on+360-nn),Math.abs(on-360-nn)))},Tt.prototype._arrowKeyTree=function(){var nn=this.diagram,on=nn.selection.first();if(on instanceof go.Node){var Kt=nn.lastInput;if(Kt.key==="Right"){if(!on.isTreeLeaf)if(!on.isTreeExpanded)nn.commandHandler.canExpandTree(on)&&nn.commandHandler.expandTree(on);else{var hn=this._sortTreeChildrenByY(on).first();hn!==null&&nn.select(hn)}}else if(Kt.key==="Left")if(!on.isTreeLeaf&&on.isTreeExpanded)nn.commandHandler.canCollapseTree(on)&&nn.commandHandler.collapseTree(on);else{var qn=on.findTreeParentNode();qn!==null&&nn.select(qn)}else if(Kt.key==="Up"){var qn=on.findTreeParentNode();if(qn!==null){var tr=this._sortTreeChildrenByY(qn),ur=tr.indexOf(on);if(ur>0){for(var Qt=tr.elt(ur-1);Qt!==null&&Qt.isTreeExpanded&&!Qt.isTreeLeaf;){var Cn=this._sortTreeChildrenByY(Qt);Qt=Cn.last()}Qt!==null&&nn.select(Qt)}else nn.select(qn)}}else if(Kt.key==="Down")if(on.isTreeExpanded&&!on.isTreeLeaf){var hn=this._sortTreeChildrenByY(on).first();hn!==null&&nn.select(hn)}else for(;on!==null;){var qn=on.findTreeParentNode();if(qn===null)break;var tr=this._sortTreeChildrenByY(qn),ur=tr.indexOf(on);if(ur<tr.length-1){nn.select(tr.elt(ur+1));break}else on=qn}var dr=nn.selection.first();dr!==null&&nn.scrollToRect(dr.actualBounds)}},Tt.prototype._sortTreeChildrenByY=function(nn){var on=new go.List().addAll(nn.findTreeChildrenNodes());return on.sort(function(Kt,hn){var qn=Kt.location,tr=hn.location;return qn.y<tr.y?-1:qn.y>tr.y?1:qn.x<tr.x?-1:qn.x>tr.x?1:0}),on},Tt.prototype.copyToClipboard=function(nn){go.CommandHandler.prototype.copyToClipboard.call(this,nn),this._lastPasteOffset.set(this.pasteOffset)},Tt.prototype.pasteFromClipboard=function(){var nn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(nn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),nn},Object.defineProperty(Tt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(nn){if(nn!=="move"&&nn!=="select"&&nn!=="scroll"&&nn!=="tree"&&nn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+nn);this._arrowKeyBehavior=nn}}),Object.defineProperty(Tt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(nn){if(!(nn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+nn);this._pasteOffset.set(nn)}});var St=Tt,nt=at(18023),Qe=at(15746),Ce=at(33170),Ne={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Je=at(52262),rt=at(67294),Be=(nn,on,Kt)=>new Promise((hn,qn)=>{var tr=Cn=>{try{Qt(Kt.next(Cn))}catch(dr){qn(dr)}},ur=Cn=>{try{Qt(Kt.throw(Cn))}catch(dr){qn(dr)}},Qt=Cn=>Cn.done?hn(Cn.value):Promise.resolve(Cn.value).then(tr,ur);Qt((Kt=Kt.apply(nn,on)).next())});function _e({onCancel:nn,callback:on}){let Kt=(0,ot.useRef)(),hn=(0,ot.useRef)(),qn=(0,ot.useRef)(),tr=(0,ot.useRef)(!1);const ur=(0,ot.useRef)(!1),[Qt,Cn]=(0,ot.useState)(0);function dr(){const _n=yt.bx.make,Zt={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"};Kt.current=new yt.S0(hn.current,{padding:20,grid:_n(yt.s_,"Grid",_n(yt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),_n(yt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:tn=>{var Vr=tn.diagram.commandHandler.addTopLevelParts(tn.diagram.selection,!0);Vr||tn.diagram.currentTool.doCancel()},commandHandler:_n(St),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:tn=>{var Vr=tn.subject;Vr.location=Vr.location.copy().snapToGridPoint(tn.diagram.grid.gridOrigin,tn.diagram.grid.gridCellSize),setTimeout(()=>{tn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:tn=>{var Vr=tn.subject;setTimeout(()=>{tn.diagram.commandHandler.editTextBlock()})},LinkRelinked:tn=>{var Vr=tn.parameter.part;Vr.invalidateConnectedLinks();var Ti=tn.subject;tn.diagram.toolManager.linkingTool.isForwards?Ti.toNode.invalidateConnectedLinks():Ti.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Kt.current.nodeTemplate=_n(yt.NB,"Auto",{locationSpot:yt.z6.Center,locationObjectName:"SHAPE",desiredSize:new yt.$u(120,60),minSize:new yt.$u(40,40),resizable:!0,resizeCellSize:new yt.$u(10,10),rotatable:!0},new yt.KX("location","loc",yt.E9.parse).makeTwoWay(yt.E9.stringify),new yt.KX("desiredSize","size",yt.$u.parse).makeTwoWay(yt.$u.stringify),_n(yt.bn,{name:"SHAPE",fill:Zt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:yt.z6.AllSides,toSpot:yt.z6.AllSides},new yt.KX("figure"),new yt.KX("fill"),new yt.KX("stroke","borderColor"),new yt.KX("strokeWidth","thickness"),new yt.KX("strokeDashArray","dash")),_n(yt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),_n(yt.al,{margin:1,textAlign:"center",overflow:yt.al.OverflowEllipsis,editable:!0},new yt.KX("text").makeTwoWay(),new yt.KX("stroke","color"))),Kt.current.nodeTemplate.toolTip=_n("ToolTip",_n(yt.s_,"Vertical",{maxSize:new yt.$u(200,NaN)},_n(yt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new yt.KX("text")),_n(yt.al,{font:"10pt sans-serif",textAlign:"center"},new yt.KX("text","details"))));function ir(tn,Vr){var Ti=(jr,Fo)=>{jr.handled=!0,jr.diagram.model.commit(Oi=>{var Ri=Fo.part.adornedPart,Li=new yt.E9().setRectSpot(Ri.actualBounds,tn);Li.subtract(Ri.location),Li.scale(2,2),Li.x+=Math.sign(Li.x)*130,Li.y+=Math.sign(Li.y)*130,Li.add(Ri.location),Li.snapToGridPoint(jr.diagram.grid.gridOrigin,jr.diagram.grid.gridCellSize);var bi=Oi.copyNodeData(Ri.data);Oi.setGroupKeyForNodeData(bi,Oi.getGroupKeyForNodeData(Ri.data)),Oi.addNodeData(bi);var uo={from:Ri.key,to:Oi.getKeyForNodeData(bi)};Oi.addLinkData(uo);var Ln=jr.diagram.findNodeForData(bi);Ln.location=Li,jr.diagram.select(Ln),setTimeout(()=>{jr.diagram.commandHandler.editTextBlock()},20)})};return _n(yt.bn,{figure:Vr,alignment:tn,alignmentFocus:tn.opposite(),width:tn.equals(yt.z6.Top)||tn.equals(yt.z6.Bottom)?25:18,height:tn.equals(yt.z6.Top)||tn.equals(yt.z6.Bottom)?18:25,fill:"orange",stroke:Zt.white,strokeWidth:4,mouseEnter:(jr,Fo)=>Fo.fill="dodgerblue",mouseLeave:(jr,Fo)=>Fo.fill="orange",isActionable:!0,click:Ti,contextClick:Ti})}function Nr(tn){return _n(yt.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:(Vr,Ti)=>Ti.fill="dodgerblue",mouseLeave:(Vr,Ti)=>Ti.fill="orange",click:(Vr,Ti)=>{Vr.diagram.commandHandler.showContextMenu(Ti.part.adornedPart)}},tn||{})}Kt.current.nodeTemplate.selectionAdornmentTemplate=_n(yt.uz,"Spot",_n(yt.Vm,{padding:10}),ir(yt.z6.Top,"TriangleUp"),ir(yt.z6.Left,"TriangleLeft"),ir(yt.z6.Right,"TriangleRight"),ir(yt.z6.Bottom,"TriangleDown"),Nr({alignment:new yt.z6(.75,0)}));function si(tn,Vr){return(Ti,jr)=>{Ti.handled=!0,Ti.diagram.model.commit(Fo=>{Fo.set(jr.part.adornedPart.data,tn,Vr)})}}function Tn(tn,Vr){return Vr||(Vr="color"),_n(yt.bn,{width:16,height:16,stroke:"lightgray",fill:tn,margin:1,background:"transparent",mouseEnter:(Ti,jr)=>jr.stroke="dodgerblue",mouseLeave:(Ti,jr)=>jr.stroke="lightgray",click:si(Vr,tn),contextClick:si(Vr,tn)})}function vr(){return[_n("ContextMenuButton",_n(yt.s_,"Horizontal",Tn(Zt.white,"fill"),Tn(Zt.beige,"fill"),Tn(Zt.extralightblue,"fill"),Tn(Zt.extralightred,"fill"))),_n("ContextMenuButton",_n(yt.s_,"Horizontal",Tn(Zt.lightgray,"fill"),Tn(Zt.lightgreen,"fill"),Tn(Zt.lightblue,"fill"),Tn(Zt.lightred,"fill")))]}function yi(){return[_n("ContextMenuButton",_n(yt.s_,"Horizontal",Tn(Zt.black),Tn(Zt.green),Tn(Zt.blue),Tn(Zt.red))),_n("ContextMenuButton",_n(yt.s_,"Horizontal",Tn(Zt.white),Tn(Zt.magenta),Tn(Zt.purple),Tn(Zt.orange)))]}function ko(tn,Vr){return Vr||(Vr="thickness"),_n(yt.bn,"LineH",{width:16,height:16,strokeWidth:tn,margin:1,background:"transparent",mouseEnter:(Ti,jr)=>jr.background="dodgerblue",mouseLeave:(Ti,jr)=>jr.background="transparent",click:si(Vr,tn),contextClick:si(Vr,tn)})}function zi(tn,Vr){return Vr||(Vr="dash"),_n(yt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:tn,margin:1,background:"transparent",mouseEnter:(Ti,jr)=>jr.background="dodgerblue",mouseLeave:(Ti,jr)=>jr.background="transparent",click:si(Vr,tn),contextClick:si(Vr,tn)})}function xr(){return[_n("ContextMenuButton",_n(yt.s_,"Horizontal",ko(1),ko(2),ko(3),ko(4))),_n("ContextMenuButton",_n(yt.s_,"Horizontal",zi(null),zi([2,4]),zi([4,4])))]}function gr(tn,Vr){return Vr||(Vr="figure"),_n(yt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:tn,margin:1,background:"transparent",mouseEnter:(Ti,jr)=>jr.fill="dodgerblue",mouseLeave:(Ti,jr)=>jr.fill="lightgray",click:si(Vr,tn),contextClick:si(Vr,tn)})}Kt.current.nodeTemplate.contextMenu=_n("ContextMenu",_n("ContextMenuButton",_n(yt.s_,"Horizontal",gr("Rectangle"),gr("RoundedRectangle"),gr("Ellipse"),gr("Diamond"))),_n("ContextMenuButton",_n(yt.s_,"Horizontal",gr("Parallelogram2"),gr("ManualOperation"),gr("Procedure"),gr("Cylinder1"))),_n("ContextMenuButton",_n(yt.s_,"Horizontal",gr("Terminator"),gr("CreateRequest"),gr("Document"),gr("TriangleDown"))),vr(),yi(),xr()),Kt.current.groupTemplate=_n(yt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:yt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(tn,Vr)=>{var Ti=Vr.addMembers(Vr.diagram.selection,!0);Ti||Vr.diagram.currentTool.doCancel()},avoidable:!1},new yt.KX("location","loc",yt.E9.parse).makeTwoWay(yt.E9.stringify),_n(yt.s_,"Auto",{name:"BODY"},_n(yt.bn,{parameter1:10,fill:Zt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:yt.z6.AllSides,toSpot:yt.z6.AllSides},new yt.KX("fill"),new yt.KX("stroke","color"),new yt.KX("strokeWidth","thickness"),new yt.KX("strokeDashArray","dash")),_n(yt.Vm,{background:"transparent",margin:20})),_n(yt.al,{alignment:yt.z6.Top,alignmentFocus:yt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new yt.KX("text"),new yt.KX("stroke","color"))),Kt.current.groupTemplate.selectionAdornmentTemplate=_n(yt.uz,"Spot",_n(yt.s_,"Auto",_n(yt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),_n(yt.Vm,{margin:1.5})),Nr({alignment:yt.z6.TopRight,alignmentFocus:yt.z6.BottomRight})),Kt.current.groupTemplate.contextMenu=_n("ContextMenu",vr(),yi(),xr()),Kt.current.linkTemplate=_n(yt.rU,{layerName:"Foreground",routing:yt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new yt.KX("fromSpot","fromSpot",yt.z6.parse),new yt.KX("toSpot","toSpot",yt.z6.parse),new yt.KX("fromShortLength","dir",tn=>tn>=1?10:0),new yt.KX("toShortLength","dir",tn=>tn>=1?10:0),new yt.KX("points").makeTwoWay(),_n(yt.bn,{strokeWidth:2},new yt.KX("stroke","color"),new yt.KX("strokeWidth","thickness"),new yt.KX("strokeDashArray","dash")),_n(yt.bn,{segmentIndex:0,segmentOffset:new yt.E9(15,0),segmentOrientation:yt.rU.OrientAlong,alignmentFocus:yt.z6.Right,figure:"circle",width:10,strokeWidth:0},new yt.KX("fill","color"),new yt.KX("visible","dir",tn=>tn===1)),_n(yt.bn,{segmentIndex:-1,segmentOffset:new yt.E9(-10,6),segmentOrientation:yt.rU.OrientPlus90,alignmentFocus:yt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new yt.KX("fill","color"),new yt.KX("visible","dir",tn=>tn>=1),new yt.KX("width","thickness",tn=>7+3*tn),new yt.KX("height","thickness",tn=>7+3*tn),new yt.KX("segmentOffset","thickness",tn=>new yt.E9(-15,4+1.5*tn))),_n(yt.bn,{segmentIndex:0,segmentOffset:new yt.E9(15,-6),segmentOrientation:yt.rU.OrientMinus90,alignmentFocus:yt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new yt.KX("fill","color"),new yt.KX("visible","dir",tn=>tn===2),new yt.KX("width","thickness",tn=>7+3*tn),new yt.KX("height","thickness",tn=>7+3*tn),new yt.KX("segmentOffset","thickness",tn=>new yt.E9(-15,4+1.5*tn))),_n(yt.al,{alignmentFocus:new yt.z6(0,1,-4,0),editable:!0},new yt.KX("text").makeTwoWay(),new yt.KX("stroke","color"))),Kt.current.linkTemplate.selectionAdornmentTemplate=_n(yt.uz,_n(yt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Lr(2)},new yt.KX("pathPattern","thickness",Lr)),Nr({alignmentFocus:new yt.z6(0,0,-6,-4)}));function Lr(tn){return _n(yt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(tn+4).toString()+" H3"})}function _i(tn){var Vr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return tn===0?Vr="M0 0 M16 16 M0 8 L16 8":tn===2&&(Vr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),_n(yt.bn,{geometryString:Vr,margin:2,background:"transparent",mouseEnter:(Ti,jr)=>jr.background="dodgerblue",mouseLeave:(Ti,jr)=>jr.background="transparent",click:si("dir",tn),contextClick:si("dir",tn)})}function oo(tn){var Vr=(Ti,jr)=>{Ti.handled=!0,Ti.diagram.model.commit(Fo=>{var Oi=jr.part.adornedPart;Fo.set(Oi.data,tn?"toSpot":"fromSpot",yt.z6.stringify(yt.z6.AllSides)),(tn?Oi.toNode:Oi.fromNode).invalidateConnectedLinks()})};return _n(yt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Ti,jr)=>jr.background="dodgerblue",mouseLeave:(Ti,jr)=>jr.background="transparent",click:Vr,contextClick:Vr})}function Xn(tn,Vr){var Ti=0,jr=yt.z6.RightSide;tn.equals(yt.z6.Top)?(Ti=270,jr=yt.z6.TopSide):tn.equals(yt.z6.Left)?(Ti=180,jr=yt.z6.LeftSide):tn.equals(yt.z6.Bottom)&&(Ti=90,jr=yt.z6.BottomSide),Vr||(Ti-=180);var Fo=(Oi,Ri)=>{Oi.handled=!0,Oi.diagram.model.commit(Li=>{var bi=Ri.part.adornedPart;Li.set(bi.data,Vr?"toSpot":"fromSpot",yt.z6.stringify(jr)),(Vr?bi.toNode:bi.fromNode).invalidateConnectedLinks()})};return _n(yt.bn,{alignment:tn,alignmentFocus:tn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Ti,background:"transparent",mouseEnter:(Oi,Ri)=>Ri.background="dodgerblue",mouseLeave:(Oi,Ri)=>Ri.background="transparent",click:Fo,contextClick:Fo})}Kt.current.linkTemplate.contextMenu=_n("ContextMenu",yi(),xr(),_n("ContextMenuButton",_n(yt.s_,"Horizontal",_i(0),_i(1),_i(2))),_n("ContextMenuButton",_n(yt.s_,"Horizontal",_n(yt.s_,"Spot",oo(!1),Xn(yt.z6.Top,!1),Xn(yt.z6.Left,!1),Xn(yt.z6.Right,!1),Xn(yt.z6.Bottom,!1)),_n(yt.s_,"Spot",{margin:new yt.Zt(0,0,0,2)},oo(!0),Xn(yt.z6.Top,!0),Xn(yt.z6.Left,!0),Xn(yt.z6.Right,!0),Xn(yt.z6.Bottom,!0)))));const Ir=`{ "class": "GraphLinksModel",
"nodeDataArray": [
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
],
"linkDataArray": [
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
]}`;var _s=["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 Aa(tn){return console.log("shapeName:",tn),_s.indexOf(tn)>=0}var ga=new yt.YI(qn.current,{maxSelectionCount:1,linkTemplate:_n(yt.rU,{locationSpot:yt.z6.Center,selectionAdornmentTemplate:_n(yt.uz,"Link",{locationSpot:yt.z6.Center},_n(yt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),_n(yt.bn,{toArrow:"Standard",stroke:null}))},{routing:yt.rU.AvoidsNodes,curve:yt.rU.JumpOver,corner:5,toShortLength:4},new yt.KX("points"),_n(yt.bn,{isPanelMain:!0,strokeWidth:2}),_n(yt.bn,{toArrow:"Standard",stroke:null})),model:new yt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...yt.bn.getFigureGenerators().toArray().map(tn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:tn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Kt.current.addDiagramListener("TextEdited",function(tn){var Vr;const Ti=tn.subject.part;var jr=(Vr=document.activeElement)==null?void 0:Vr.value;typeof jr=="string"&&jr.trim()===""&&Kt.current.model.commit(function(Fo){Fo.set(Ti.data,"text","\u672A\u547D\u540D"),Kt.current.commandHandler.stopCommand()},"increment")}),ga.nodeTemplate=_n(yt.NB,"Auto",{locationSpot:yt.z6.Center},new yt.KX("location","location",yt.E9.parse).makeTwoWay(yt.E9.stringify),_n(yt.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 yt.KX("stroke").makeTwoWay(),new yt.KX("fill").makeTwoWay(),new yt.KX("figure")),_n(yt.al,{margin:new yt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new yt.$u(16,16),maxSize:new yt.$u(10,NaN),textAlign:"center",editable:!0},new yt.KX("key").makeTwoWay())),setTimeout(()=>{Kt.current.grid=_n(yt.s_,"Grid",_n(yt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),_n(yt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Kt.current.grid.visible=!0,Kt.current.grid.gridCellStroke="darkgray",Kt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Kt.current,Kt.current}const Ar=()=>Be(this,null,function*(){var _n,Zt=Kt.current.makeImage();const ir=yield(0,Ce.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Zt.src,file_data:JSON.stringify({login:(_n=(0,Je.eY)())==null?void 0:_n.login,data:JSON.parse(Kt.current.model.toJson())})}});on({src:ir.url})});return(0,ot.useEffect)(()=>(setTimeout(()=>{dr()},500),Cn(Qt+1),()=>{Kt.current=null}),[]),rt.createElement("div",{ref:ur,className:"body-overflow-initial"},rt.createElement(ht.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Qt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:rt.createElement(pt.Z,null,rt.createElement(Qe.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),rt.createElement(Qe.Z,{onClick:()=>{var _n,Zt,ir=Kt.current.selection.first();if(tr.current=!tr.current,document.activeElement&&ir){let Nr=(Zt=(_n=document.activeElement)==null?void 0:_n.value)==null?void 0:Zt.trim();typeof Nr=="string"&&Kt.current.model.commit(function(si){si.set(ir.data,"text",Nr||"\u672A\u547D\u540D"),Kt.current.commandHandler.stopCommand()},"increment")}Cn(Qt+1)}},rt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:nn},rt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:tr.current?"none":"block"},className:Ne.flowChartWrp},rt.createElement("div",{style:{display:"flex",height:"100%"}},rt.createElement("div",{style:{width:"300px",height:"100%"}},rt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),rt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ne.myPaletteDiv,ref:qn})),rt.createElement("div",{style:{flex:1,position:"relative"}},rt.createElement("div",{ref:hn,style:{height:"80vh"}}))),rt.createElement("div",{className:"tr"},rt.createElement(ze.ZP,{size:"large",onClick:Ar,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Xe=_e,lt=at(98813),Pt=at(37720);const kt=lt.ZP.Group,zt={margin:"0 8px"};var jt=({callback:nn,onCancel:on})=>{function Kt(hn){nn(hn)}return ot.createElement(Ae.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Kt},ot.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ot.createElement("span",{style:zt},"\u5355\u5143\u683C\u6570\uFF1A"),ot.createElement("span",{style:zt},"\u884C\u6570"),ot.createElement(Ae.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ot.createElement(Pt.Z,null)),ot.createElement("span",{style:zt},"\u5217\u6570"),ot.createElement(Ae.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ot.createElement(Pt.Z,null))),ot.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ot.createElement("span",{style:zt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ot.createElement(Ae.default.Item,{name:"align"},ot.createElement(kt,null,ot.createElement(lt.ZP,{value:"default"},ot.createElement("i",{className:"fa fa-align-justify"})),ot.createElement(lt.ZP,{value:"left"},ot.createElement("i",{className:"fa fa-align-left"})),ot.createElement(lt.ZP,{value:"center"},ot.createElement("i",{className:"fa fa-align-center"})),ot.createElement(lt.ZP,{value:"right"},ot.createElement("i",{className:"fa fa-align-right"}))))),ot.createElement("div",{className:"flex-container flex-end"},ot.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ot.createElement(ze.ZP,{type:"ghost",onClick:on},"\u53D6\u6D88")))},Ht=at(59637),ln=at(61016),an=at.n(ln),$t=(0,ot.forwardRef)(({use3d:nn,width:on,height:Kt,callback:hn,showSaveButton:qn},tr)=>{const ur=(0,ot.useRef)(),Qt=(0,ot.useRef)(),[Cn,dr]=(0,ot.useState)(!1),Ar=(0,ot.useRef)({id:ur,appName:"graphing",width:on||1e3,height:Kt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ot.useEffect)(()=>{Qt.current=new(an())(Ar.current,!0),window.onload=function(){Qt.current.inject("applet_container")}},[]);const _n=()=>{var Zt=window.ggbApplet.getPNGBase64(1,!0,72);return hn&&hn(Zt),Zt};return(0,ot.useEffect)(()=>{Ar.current.appName=Cn?"3D":"graphing",Qt.current.inject("applet_container")},[Cn]),(0,ot.useEffect)(()=>{dr(nn)},[nn]),(0,ot.useImperativeHandle)(tr,()=>({getImgData:_n})),ot.createElement(ot.Fragment,null,ot.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ur}),ot.createElement(pt.Z,{align:"middle"},ot.createElement(Qe.Z,{flex:1},ot.createElement(Ht.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Cn,onChange:Zt=>dr(Zt)})),ot.createElement(Qe.Z,null,ot.createElement(ze.ZP,{size:"large",onClick:_n,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),On=at(36527),un=at(2453);const mn="link",In="upload-image",Sn="add-flowchart",Dn="draw-image",fr="add-flowchart",_r="code-block",mr="add-table",wi="------------",no={default:wi,left:`:${wi}`,center:`:${wi}:`,right:`${wi}:`};var ro=at(99914);function io(){}let Ji=0;const lo=1e4,Fi="\u2581",Jr="@\u2581\u2581@",bn="@\u2581@",Ze=`
**\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`,vn=["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 Mn(nn){return/^\d+$/.test(nn)?`${nn}px`:nn}const zn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Un={[zn+"-B"]:"bold",[zn+"-I"]:"italic"},$n={[mn]:"\u6DFB\u52A0\u94FE\u63A5",[_r]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[In]:"\u6DFB\u52A0\u56FE\u7247",[Dn]:"\u6DFB\u52A0\u753B\u56FE",[Sn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[mr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Mr=({defaultValue:nn="",onChange:on,width:Kt="100%",height:hn=400,miniToolbar:qn=!1,isFocus:tr=!1,watch:ur,insertTemp:Qt,mode:Cn="markdown",id:dr="markdown-editor-id",showResizeBar:Ar=!1,noStorage:_n=!1,showNullButton:Zt=!1,showNullProgramButton:ir=!1,hidetoolBar:Nr=!1,fullScreen:si=!1,onBlur:Tn,onCMBeforeChange:vr,onFullScreen:yi,className:ko="",disablePaste:zi=!1,disabled:xr=!1,disabledFill:gr=!1,placeholder:Lr="",values:_i="",extraUse:oo})=>{const[Xn,Ir]=(0,ot.useState)(null),[_s,Aa]=(0,ot.useState)(nn),[ga,tn]=(0,ot.useState)(ur),[Vr,Ti]=(0,ot.useState)(si),[jr,Fo]=(0,ot.useState)(""),[Oi,Ri]=(0,ot.useState)(0),[Li,bi]=(0,ot.useState)(hn),[uo,Ln]=(0,ot.useState)(!1),[la,Nn]=(0,ot.useState)(0),[vo,bs]=(0,ot.useState)(0),Xt=(0,ot.useRef)(),Jt=(0,ot.useRef)(),cn=(0,ot.useRef)(),Fn=(0,ot.useRef)();(0,ot.useEffect)(()=>{const zr=window.scrollY||window.pageYOffset;Aa(_i),Xn==null||Xn.setValue(_i),window.scrollTo(0,zr)},[_i]),(0,ot.useEffect)(()=>{yi==null||yi(Vr)},[Vr]),(0,ot.useEffect)(()=>{if(Xt.current){let zr=function(ti,jn){var Gi;if(zi){jn.preventDefault();return}const So=jn.clipboardData;if(So){const ta=So.types.toString(),Oo=So.items;if(ta==="Files"||So.types.indexOf("Files")>-1){if(jn.preventDefault(),Cn=="stex")return;try{let Wo=Oo[1];((Gi=Oo[0])==null?void 0:Gi.kind)==="file"&&(Wo=Oo[0]);const na=Wo.getAsFile(),Ya=na.name.split(".").pop();(0,wt.I)(na,Ia=>{var Ol,Hl,rn;Ia.id?((Ol=na==null?void 0:na.type)==null?void 0:Ol.indexOf("image"))>-1?Tr.replaceSelection(`<img width="100%" src="/api/attachments/${Ia.id}?type=${Ia.content_type})" alt="" />`):((Hl=na==null?void 0:na.type)==null?void 0:Hl.indexOf("video"))>-1?Tr.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ia.id}"></video>`):((rn=na==null?void 0:na.type)==null?void 0:rn.indexOf("pdf"))>-1?Tr.replaceSelection(`<a href="/api/attachments/${Ia.id}?type=${na.type}&disposition=inline" target="_blank">${na.name}</a>`):vn.includes(Ya)?Tr.replaceSelection(`<a href="/api/attachments/${Ia.id}?type=office&disposition=inline" target="_blank">${na.name}</a>`):Tr.replaceSelection(`[${na.name}](/api/attachments/${Ia.id}?type=${Ia.content_type})`):(Ia==null?void 0:Ia.status)===401&&(document.location.href="/user/login")})}catch(Wo){un.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Tr=ae().fromTextArea(Xt.current,{mode:Cn,lineNumbers:!qn,lineWrapping:!0,value:nn,autoCloseTags:!0,autoCloseBrackets:!0});return Tr.on("keyup",function(ti,jn){jn.keyCode===8&&(ti.getValue()==""?Tr.setOption("placeholder",Lr):Tr.setOption("placeholder",null))}),Tr.on("keydown",function(ti,jn){if(jn.keyCode===8){var Gi=li(ti);Gi&&jn.preventDefault()}}),tr&&Tr.focus(),Tr.on("paste",zr),xr&&Tr.on("beforeChange",function(ti,jn){(jn.origin==="paste"||jn.origin==="+input")&&jn.cancel()}),Ir(Tr),()=>{Tr.off("paste",zr)}}},[]);const pr=(0,ot.useCallback)(()=>{if(Jt.current)try{}catch(zr){console.log(zr,"---- to set md editor body height")}},[Li,Jt,Vr]);(0,ot.useEffect)(()=>{function zr(){let Tr=new Ge.Z(ti=>{for(let jn of ti)(jn.target.offsetHeight>0||jn.target.offsetWidth>0)&&(pr(),Xn.setSize("100%","100%"),Xn.refresh())});return Tr.observe(Xt.current.parentElement),Tr}if(Xn){const Tr=zr();return()=>{var ti,jn;(ti=Xt.current)!=null&&ti.parentElement&&Tr.unobserve((jn=Xt.current)==null?void 0:jn.parentElement)}}},[Xn,pr]),(0,ot.useEffect)(()=>{if(Xn){let zr=[];for(const[Tr,ti]of Object.entries(Un)){let jn={[Tr]:()=>{Zr(ti)}};zr.push(jn),Xn.addKeyMap(jn)}return()=>{for(let Tr of zr)Xn.removeKeyMap(Tr)}}},[Xn]),(0,ot.useEffect)(()=>{si!==Vr&&Ti(si)},[si]),(0,ro.Z)(()=>{if(!_n&&Oi>0){let zr=new Date().getTime(),Tr=window.sessionStorage.getItem(dr);zr>=Oi+lo&&(!Tr||Tr!==_s)&&(window.sessionStorage.setItem(dr,_s),Ln(!0))}},lo),(0,ot.useEffect)(()=>{tn(ur)},[Xn,ur]),(0,ot.useEffect)(()=>{Xn&&tr&&Xn.focus()},[Xn,tr]),(0,ot.useEffect)(()=>{if(ga&&Xn){let zr=function(ti){let jn=ti.target;if(Fn.current){let Gi=jn.scrollTop/jn.scrollHeight;Fn.current.scrollTop=Fn.current.scrollHeight*Gi}};const Tr=Xn.getScrollerElement();return Tr.addEventListener("scroll",zr),()=>{Tr.removeEventListener("scroll",zr)}}},[Xn,ga]),(0,ot.useEffect)(()=>{if(Xn&&vr){let zr=function(Tr,ti){vr(Tr,ti)};return Xn.on("beforeChange",zr),()=>{Xn.off("beforeChange",zr)}}},[Xn,vr]),(0,ot.useEffect)(()=>{if(Xn&&Tn){let zr=function(){Tn(Xn.getValue())};return Xn.on("blur",zr),()=>{Xn.off("blur",zr)}}},[Xn,Tn]);function li(zr,Tr){var ti=zr.getDoc(),jn=ti.getCursor(),Gi=ti.getLine(jn.line),So=Gi.charAt(jn.ch-1),ta=Gi.lastIndexOf("@\u2581@",jn.ch),Oo=Gi.lastIndexOf("@\u2581\u2581@",jn.ch),Wo=ta>Oo?ta:Oo,na=ta>Oo?3:4;if(Jr.indexOf(So)===-1)return null;if(console.log("change1:",Tr,zr,Gi,jn,Wo,ta,Oo,So),Wo>=0&&jn.ch-Wo<5){var Ya=Wo+na;return ti.replaceRange("",{line:jn.line,ch:Wo},{line:jn.line,ch:Ya}),{line:jn.line,ch:Ya}}return null}(0,ot.useEffect)(()=>{if(Xn){let zr=function(Tr,ti){const jn=Tr.getValue();Aa(jn),Ri(new Date().getTime()),Tr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),on&&(ir?on(jn,Da(jn)):on(jn))};return Xn.on("change",zr),()=>{Xn.off("change",zr)}}},[Xn,on]),(0,ot.useEffect)(()=>{if(Xn)if(nn==null)Xn.setValue(""),Aa("");else{const zr=window.scrollY||window.pageYOffset;nn!==Xn.getValue()&&(Xn.setValue(nn),Aa(nn),Xn.setCursor(xr?1:Xn.lineCount(),0),window.scrollTo(0,zr))}},[Xn,nn]);const Zr=(0,ot.useCallback)(zr=>{const Tr=Xn.getCursor(),ti=Xn.getSelection();let jn=ti.split(`
`);switch(zr){case"bold":return Xn.replaceSelection("**"+ti+"**"),ti===""&&Xn.setCursor(Tr.line,Tr.ch+2),Xn.focus();case"italic":return Xn.replaceSelection("*"+ti+"*"),ti===""&&Xn.setCursor(Tr.line,Tr.ch+1),Xn.focus();case"code":return Xn.replaceSelection("`"+ti+"`"),ti===""&&Xn.setCursor(Tr.line,Tr.ch+1),Xn.focus();case"inline-latex":return Fo("inline-latex"),Xn.focus();case"latex":return Xn.replaceSelection("```latex\n"+ti+"\n```"),Xn.setCursor(Tr.line+1,ti.length+1),Xn.focus();case"line-break":return Xn.replaceSelection(`<br/>
`),Xn.focus();case"list-ul":return ti===""?Xn.replaceSelection("- "+ti):Xn.replaceSelection(jn.map(Gi=>Gi===""?"":`- ${Gi}`).join(`
`)),Xn.focus();case"list-ol":return ti===""?Xn.replaceSelection("1. "+ti):Xn.replaceSelection(jn.map((Gi,So)=>Gi===""?"":`${So+1}. ${Gi}`).join(`
`)),Xn.focus();case"add-null-ch":return ti===""&&Xn.setCursor(Tr.line,Tr.ch),Xn.replaceSelection(Fi),Xn.focus();case"add-signal":return ti===""&&Xn.setCursor(Tr.line,Tr.ch),Xn.replaceSelection(bn),Xn.focus();case"add-multiple":return ti===""&&Xn.setCursor(Tr.line,Tr.ch),Xn.replaceSelection(Jr),Xn.focus();case"inster-template-1":return ti===""&&Xn.setCursor(Tr.line,Tr.ch),Xn.replaceSelection(Ze),Xn.focus();case"eraser":return Xn.setValue(""),Xn.focus();case"trigger-watch":return tn(!ga),Xn.focus();case"trigger-full-screen":return Ti(!Vr),Xn.focus();case mn:Fo(mn);return;case _r:Fo(_r);return;case In:Fo(In);return;case Dn:Fo(Dn);return;case"maths-latex":Fo("maths-latex");return;case Sn:Fo(Sn);return;case mr:Fo(mr);return;default:throw new Error}},[Xn,ga,Vr]),Vn=(0,ot.useCallback)((zr,Tr)=>{var ti,jn,Gi,So,ta,Oo;switch(Fo(""),jr){case mn:const{title:Ol,link:Hl}=zr;return Xn.replaceSelection(`[${Ol}](${Hl})`),Xn.focus();case _r:const{language:rn,content:us}=zr;return Xn.replaceSelection(["```"+rn,us,"```"].join(`
`)),Xn.focus();case"maths-latex":for(var Wo=atob(zr),na=new Uint8Array(Wo.length),Ya=0;Ya<Wo.length;Ya++)na[Ya]=Wo.charCodeAt(Ya);var Ia=new Blob([na],{type:"image/png"});(0,wt.I)(Ia,mi=>{mi.id?Xn.replaceSelection(`![,](/api/attachments/${mi.id}?type=${mi.content_type})`):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Xn.replaceSelection("`$$"+zr+"$$`");break;case In:case Dn:case fr:const{src:ol,alt:au}=zr,co=Tr,Sl=(Gi=(jn=(ti=co==null?void 0:co.name)==null?void 0:ti.split("."))==null?void 0:jn.pop)==null?void 0:Gi.call(jn);return((So=co==null?void 0:co.type)==null?void 0:So.indexOf("image"))>-1||!(co!=null&&co.type)?co!=null&&co.align||co!=null&&co.width?Xn.replaceSelection(`<p style="text-align:${co.align||"initial"}"><img width="${co.width?co.width+"%":"initial"}" src="${ol}" alt="${au||""}" /></p>`):Xn.replaceSelection(`<img width="100%" src="${ol}" alt="${au||""}" />`):((ta=co==null?void 0:co.type)==null?void 0:ta.indexOf("video"))>-1?Xn.replaceSelection(`<video width="100%" controls src="${ol}"></video>`):((Oo=co==null?void 0:co.type)==null?void 0:Oo.indexOf("pdf"))>-1?Xn.replaceSelection(`<a href="${ol}?type=${co.type}&disposition=inline" target="_blank">${co.name}</a>`):vn.includes(Sl)?Xn.replaceSelection(`<a href="${ol}?type=office&disposition=inline" target="_blank">${co.name}</a>`):Xn.replaceSelection(`[${co.name}](${ol})`),Xn.focus();case mr:const{row:jl,col:Kl,align:xo}=zr;let ma=`
`;for(let mi=0;mi<jl;mi++){let Ai=[],Mo=[];for(let Yo=0;Yo<Kl;Yo++)mi===1&&Mo.push(no[xo]),Ai.push(" ");mi===1&&(ma+=`| ${Mo.join(" | ")} |
`),ma+=`| ${Ai.join(Kl===1?"":" | ")} |
`}return Xn.replaceSelection(ma+`
`),Xn.focus();default:throw new Error}},[Xn,jr]),Mt=(0,ot.useMemo)(()=>{switch(jr){case mn:return ot.createElement($e,{callback:Vn,onCancel:yo});case _r:return ot.createElement(vt.Z,{callback:Vn,onCancel:yo});case In:return ot.createElement(wt.Z,{callback:Vn,onCancel:yo});case Sn:return ot.createElement(Xe,{callback:Vn,onCancel:yo});case mr:return ot.createElement(jt,{callback:Vn,onCancel:yo});case"maths-latex":return ot.createElement($t,{showSaveButton:!0,callback:Vn});case"inline-latex":return ot.createElement(On.Z,{showSaveButton:!0,callback:Vn});default:return null}},[jr]);function yo(){Fo("")}(0,ot.useEffect)(()=>{if(cn.current){let zr=function(ta){Gi=!0,So=ta.pageY},Tr=function(){Gi=!1},ti=function(ta){if(Gi){let Oo=ta.pageY-So;Oo<0&&(Oo=0),Oo>300&&(Oo=300);let Wo=hn+Oo+"px";bi(Wo)}},jn=cn.current,Gi=!1,So=0;return jn.addEventListener("mousedown",zr),document.addEventListener("mousemove",ti),document.addEventListener("mouseup",Tr),()=>{jn.removeEventListener("mousedown",zr),document.removeEventListener("mousemove",ti),document.removeEventListener("mouseup",Tr)}}},[Xn,cn]),(0,ot.useEffect)(()=>{bi(hn)},[hn]);const za=Mn(Kt),Gs=Mn(Li),Ua={width:za,height:Gs},Fa=(0,ot.useMemo)(()=>{if(Oi){let zr=new Date(Oi),Tr=zr.getHours(),ti=zr.getMinutes(),jn=zr.getSeconds();return Tr=Tr<10?"0"+Tr:Tr,ti=ti<10?"0"+ti:ti,jn=jn<10?"0"+jn:jn,`${Tr}:${ti}:${jn}`}return 0},[Oi]),Da=zr=>{const Tr=[];if(ir){let ti=-1;zr=zr.replace(/(@▁▁@|@▁@)/g,function(jn,Gi,So){Tr.push({multiLine:jn!==bn})})}return Tr};function yl(){window.sessionStorage.removeItem(dr),Ln(!1),Ri(0)}function fs(){Ln(!1),Ri(0),Xn.setValue(window.sessionStorage.getItem(dr))}(0,ot.useEffect)(()=>{$n[jr]&&jr!==Dn&&jr!==Sn&&setTimeout(()=>{const zr=document.getElementsByClassName("markdown-popup-form")[0],Tr=window.innerWidth/2-zr.offsetWidth/2,ti=window.innerHeight/2-zr.offsetHeight/2;Nn(Tr),bs(ti)},0)},[jr]);const No=zr=>{zr.preventDefault();const Tr=zr.clientX-la,ti=zr.clientY-vo;document.body.onmousemove=jn=>{let Gi=jn.clientX-Tr,So=jn.clientY-ti;const ta=document.getElementsByClassName("markdown-popup-form")[0],Oo=window.innerWidth-ta.offsetWidth,Wo=window.innerHeight-ta.offsetHeight;Gi=Math.max(0,Math.min(Gi,Oo)),So=Math.max(0,Math.min(So,Wo)),ea(jn.clientX,jn.clientY,Tr,ti)&&(Nn(Gi),bs(So))},document.body.onmouseup=function(){document.body.onmousemove=null}},ea=(zr,Tr,ti,jn)=>{const Gi=document.body.clientHeight,So=document.body.clientWidth;return zr<20&&ti>zr||zr>So-20&&ti<zr||Tr<20&&jn>Tr||Tr>Gi-20&&jn<Tr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ot.createElement(ot.Fragment,null,ot.createElement("div",{className:"markdown-editor-wrapper",ref:Jt},ot.createElement("div",{className:`markdown-editor-container ${ko} ${ga?"on-preview":""} ${qn?"mini":""} ${Vr?"full-screen":""}`,style:Ua},ot.createElement(De,{insertTemp:Qt,watch:ga,fullScreen:Vr,showNullButton:Zt,showNullProgramButton:ir,onActionCallback:Zr,hidetoolBar:Nr,extraUse:oo}),ot.createElement("div",{className:"markdown-editor-body"},ot.createElement("div",{className:"codemirror-container"},ot.createElement("textarea",{ref:Xt,placeholder:Lr})),ga?ot.createElement("div",{ref:Fn,className:"preview-container"},Cn==="stex"&&ot.createElement(ve,{value:_s}),Cn!=="stex"&&ot.createElement(Te.Z,{disabledFill:gr,showProgramFill:ir,value:_s})):null))),Ar?ot.createElement("a",{ref:cn,className:"editor-resize"}):null,jr===Dn&&ot.createElement(xt,{callback:Vn,onCancel:yo}),jr===Sn&&ot.createElement(Xe,{callback:Vn,onCancel:yo}),ot.createElement(Fe.Z,null,$n[jr]&&jr!==Dn&&jr!==Sn?ot.createElement(ht.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:la,top:vo},title:ot.createElement("div",{style:{cursor:"move"},onMouseDown:No},$n[jr]),open:!0,onCancel:yo,footer:null,destroyOnClose:!0,width:jr===Sn?"1200px":null,height:jr===Sn?"80vh":null,className:"markdown-popup-form"},Mt):null))}},70859:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return Le},I:function(){return Fe}});var ot=at(91773),_t=at(2453),ae=at(28802),Ge=at(78957),Ie=at(37720),me=at(98813),de=at(85804),Ee=at(15476),we=at(67294),be=at(67294),Te=Object.defineProperty,ve=Object.defineProperties,xe=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,oe=(Ae,Oe,ze)=>Oe in Ae?Te(Ae,Oe,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Ae[Oe]=ze,ie=(Ae,Oe)=>{for(var ze in Oe||(Oe={}))z.call(Oe,ze)&&oe(Ae,ze,Oe[ze]);if(fe)for(var ze of fe(Oe))ee.call(Oe,ze)&&oe(Ae,ze,Oe[ze]);return Ae},le=(Ae,Oe)=>ve(Ae,xe(Oe));const{useForm:ue}=ot.default,pe={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}};var Le=({callback:Ae,onCancel:Oe})=>{const[ze]=ue();let He=(0,we.useRef)();function Ye(st){He.current.width=ze.getFieldValue("width"),He.current.align=ze.getFieldValue("align"),Ae(st,He.current)}function We(st,dt){if(st.status===-1){_t.ZP.error(st.message);return}ze.setFieldsValue({src:`/api/attachments/${st.id}`,type:dt.type})}function Ue(st){let dt=st.target.files[0];He.current=dt,Fe(dt,We)}return be.createElement(ot.default,le(ie({form:ze},Se),{className:"upload-image-panel",onFinish:Ye,style:{width:470,overflow:"hidden"}}),be.createElement(ot.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},be.createElement("div",{className:"flex-container"},be.createElement(ot.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},be.createElement(ae.default,{style:pe})),be.createElement(De,{onFileChange:Ue}))),be.createElement(ot.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},be.createElement(ae.default,{style:{width:264}})),be.createElement(ot.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},be.createElement(Ge.Z,null,be.createElement(ot.default.Item,{name:"width",style:{margin:0}},be.createElement(Ie.Z,{style:{width:264}})),be.createElement("span",{className:"ml8"},"%"))),be.createElement(ot.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},be.createElement(me.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"}]})),be.createElement("aside",null,be.createElement(ot.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},be.createElement(de.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),be.createElement(de.ZP,{type:"default",onClick:Oe},"\u53D6\u6D88"))))};function De({onFileChange:Ae}){return be.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",be.createElement("input",{type:"file",onChange:Ae}))}function Fe(Ae,Oe){if(!Ae)throw new String("\u6CA1\u6709\u6587\u4EF6");let ze=new FormData;ze.append("editormd-image-file",Ae),ze.append("file_param_name","editormd-image-file"),ze.append("byxhr","true");var He=new window.XMLHttpRequest;He.withCredentials=!0,He.addEventListener("load",function(Ye){Oe(JSON.parse(Ye.target.responseText),Ae)},!1),He.addEventListener("error",function(Ye){console.error(Ye)},!1),He.open("POST",`${Ee.KI}/api/attachments.json`),He.send(ze)}},76621:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return ae}});var ot=at(67294),_t=at(73935);class ae extends ot.Component{constructor(Ie){super(Ie);const me=window.document;this.node=me.createElement("div"),me.body.appendChild(this.node)}render(){const{children:Ie}=this.props;return(0,_t.createPortal)(Ie,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(dn,pn,at){"use strict";at.d(pn,{SV:function(){return yt},ZP:function(){return xt}});var ot=at(67294),_t=at(91033);const ae={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"]},Ge={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"]},Ie={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(`
`)}]},me={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(`
`)}]},de={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 Ee=at(84204),we=at.n(Ee),be=(Tt,St,nt)=>new Promise((Qe,Ce)=>{var Ne=Be=>{try{rt(nt.next(Be))}catch(_e){Ce(_e)}},Je=Be=>{try{rt(nt.throw(Be))}catch(_e){Ce(_e)}},rt=Be=>Be.done?Qe(Be.value):Promise.resolve(Be.value).then(Ne,Je);rt((nt=nt.apply(Tt,St)).next())});const Te={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"]}},ve=(Tt,St,nt,Qe)=>{const Ce=St.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:nt.lineNumber,endColumn:nt.column});return Array.from(new Set(Ce.match(/\b\w{2,}\b/g)||[])).map(Je=>({label:Je,kind:Tt.languages.CompletionItemKind.Text,insertText:Je,range:Qe}))},xe=(Tt,St,nt,Qe)=>{Tt.languages.registerCompletionItemProvider(St,{provideCompletionItems(Ce,Ne){const Je=Ce.getWordUntilPosition(Ne),rt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:Je.startColumn,endColumn:Je.endColumn},Be=Ce.getLineContent(Ne.lineNumber).substring(Je.startColumn-2,Je.endColumn);return{suggestions:[...ve(Tt,Ce,Ne,rt),...nt.map(Xe=>({label:Xe,kind:Tt.languages.CompletionItemKind.Keyword,documentation:Xe,insertText:Xe,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt})),...Qe.map(Xe=>({label:Xe.label,kind:Tt.languages.CompletionItemKind.Snippet,documentation:Xe.content,insertText:Be.startsWith("#")?Xe.content.replace(/#/,""):Xe.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:rt}))]}}})};var fe=Tt=>{Te.languages.forEach(St=>{Tt.languages.registerDocumentFormattingEditProvider(St,{provideDocumentFormattingEdits(nt){return be(this,null,function*(){const Qe=we()(nt.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:nt.getFullModelRange(),text:Qe}]})}})}),xe(Tt,"java",Ge.keywords,Ge.quickKey),xe(Tt,"cpp",Ie.keywords,Ie.quickKey),xe(Tt,"c",ae.keywords,[]),xe(Tt,"python",me.keywords,me.quickKey),xe(Tt,"scala",de.keywords,de.quickKey)};const z="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ee=Object.defineProperty,oe=(Tt,St,nt)=>St in Tt?ee(Tt,St,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Tt[St]=nt,ie=(Tt,St,nt)=>oe(Tt,typeof St!="symbol"?St+"":St,nt);const le=class mx{constructor(St,nt,Qe){this.placeholder=St,this.editor=nt,this.monaco=Qe,nt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};ie(le,"ID","editor.widget.placeholderHint");var pe=le,Se=at(84144),Le=at(2453),De=at(83062),Fe=at(96486),Ae=at(33054),Oe=at(74855),ze=Object.defineProperty,He=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,dt=(Tt,St,nt)=>St in Tt?ze(Tt,St,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Tt[St]=nt,gt=(Tt,St)=>{for(var nt in St||(St={}))Ue.call(St,nt)&&dt(Tt,nt,St[nt]);if(We)for(var nt of We(St))st.call(St,nt)&&dt(Tt,nt,St[nt]);return Tt},Et=(Tt,St)=>He(Tt,Ye(St)),Ke=(Tt,St)=>{var nt={};for(var Qe in Tt)Ue.call(Tt,Qe)&&St.indexOf(Qe)<0&&(nt[Qe]=Tt[Qe]);if(Tt!=null&&We)for(var Qe of We(Tt))St.indexOf(Qe)<0&&st.call(Tt,Qe)&&(nt[Qe]=Tt[Qe]);return nt},et=(Tt,St,nt)=>new Promise((Qe,Ce)=>{var Ne=Be=>{try{rt(nt.next(Be))}catch(_e){Ce(_e)}},Je=Be=>{try{rt(nt.throw(Be))}catch(_e){Ce(_e)}},rt=Be=>Be.done?Qe(Be.value):Promise.resolve(Be.value).then(Ne,Je);rt((nt=nt.apply(Tt,St)).next())});function $e(Tt){return/^\d+$/.test(Tt)?`${Tt}px`:Tt}function vt(){}let wt=!1;const ht={"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 pt(Tt=[]){let St=Tt;if(Array.isArray(Tt)){for(let nt=0;nt<Tt.length;nt++){let Qe=ht[Tt[nt]];if(Qe)return Qe}return St[0]}return ht[St]||St}let ct=null;const Ct=()=>et(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Tt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Tt)}});var xt=Tt=>{var St=Tt,{width:nt="100%",height:Qe="100%",value:Ce,language:Ne="javascript",style:Je={},options:rt={},overrideServices:Be={},theme:_e="vs-dark",onEditBlur:Xe,isCopy:lt=!1,onSave:Pt,autoHeight:kt=!1,forbidCopy:zt=!1,onChange:jt=vt,editorDidMount:Ht=vt,onFocus:ln=vt,onBreakPoint:an=vt,breakPointValue:sn=[],filename:$t="educoder.txt",errorLine:On,errorContent:un="",highlightLine:mn,openBreakPoint:In=!1,placeholder:Sn="",showMiniMap:Dn=!0}=St,fr=Ke(St,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const _r=(0,ot.useRef)(),mr=(0,ot.useRef)({}),wi=(0,ot.useRef)(),no=(0,ot.useRef)(),ro=(0,ot.useRef)([]),io=(0,ot.useRef)(!1),Ji=(0,ot.useRef)(),lo=(0,ot.useRef)(),Fi=(0,ot.useRef)(!1),[Jr,bn]=(0,ot.useState)(!1);function Ze(){let Qt;return _r.current&&(Qt=new _t.Z(Cn=>{for(let dr of Cn)(dr.target.offsetHeight>0||dr.target.offsetWidth>0)&&mr.current.instance.layout()}),Qt.observe(_r.current)),Qt}function vn(){Le.ZP.warning({content:decodeURIComponent(z),key:"monaco-editor-tip"})}const Mn=()=>{let Qt=mr.current.instance;if(Ce!=null&&Qt&&Jr){const Cn=Qt.getModel();Cn&&Ce!==Cn.getValue()&&(wt=!0,Cn.setValue(Ce),Qt.layout(),wt=!1)}};(0,ot.useEffect)(()=>{const Qt=Ae.Z.subscribe("formatDocument",Cn=>{var dr;let Ar=mr.current.instance;(dr=Ar==null?void 0:Ar.getAction)==null||dr.call(Ar,"editor.action.formatDocument").run()});return window.updateMonacoValue=Cn=>{jt(Cn)},Qt},[]),(0,ot.useEffect)(()=>{var Qt;let Cn=mr.current.instance;no.current&&clearTimeout(no.current),no.current=setTimeout(()=>{Mn()},500),Ce&&(Ce!=null&&Ce.length)&&((Qt=Cn==null?void 0:Cn.updateOptions)==null||Qt.call(Cn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ce.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ce,Jr,mr.current]),(0,ot.useEffect)(()=>{if(On&&mr.current&&mr.current.instance){let Cn=mr.current.instance;Cn.changeViewZones(function(dr){var Ar=document.createElement("div");Ar.style.padding="10px 20px",Ar.style.width="calc(100% - 20px)",Ar.className="my-error-line-wrp",Ar.innerHTML=un,dr.addZone({afterLineNumber:On||11,heightInLines:3,domNode:Ar})});var Qt={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}};Cn.addOverlayWidget(Qt),Cn.revealPositionInCenter({lineNumber:20,column:1})}},[On,mr.current,Jr]);const Rn=(Qt="",Cn)=>{if(!Qt||Qt.trim()==="")return!0;const Ar=mr.current.instance.getModel().getLineTokens(Cn);let _n=!1;for(let Zt=0;Zt<2;Zt++)Ar.getStandardTokenType(Zt)===1&&(_n=!0);return _n};(0,ot.useEffect)(()=>{var Qt;const Cn=(Qt=mr.current)==null?void 0:Qt.instance;if(Cn&&Jr&&zt){const dr=Cn.onDidBlurEditorWidget(()=>{Fi.current=!1}),Ar=Cn.onDidFocusEditorText(()=>{Fi.current=!0});return()=>{dr.dispose(),Ar.dispose()}}},[mr.current,Jr,zt]),(0,ot.useEffect)(()=>{var Qt;if((Qt=mr.current)!=null&&Qt.instance&&Jr&&In){let Cn=mr.current.instance,dr=Cn.getModel();if(!dr)return;(()=>{var xr;let gr=[],Lr=[];const _i=dr.getAllDecorations();for(let Xn of _i)Xn.options.className==="highlighted-line"&&(gr.push((xr=Xn==null?void 0:Xn.range)==null?void 0:xr.startLineNumber),Lr.push(Xn==null?void 0:Xn.id));if(mn===gr[0])return;dr.deltaDecorations(Lr,[]);const oo=dr.getLineCount();mn&&mn<=oo&&(Cn.deltaDecorations([],[{range:new ct.Range(mn,1,mn,dr.getLineMaxColumn(mn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Cn.revealLineInCenter(mn))})();const _n=(xr=!1)=>{var gr;let Lr=[],_i=[];const oo=dr.getAllDecorations();for(let Xn of oo)Xn.options.linesDecorationsClassName==="breakpoints-select"&&(Lr.push((gr=Xn==null?void 0:Xn.range)==null?void 0:gr.startLineNumber),_i.push(Xn==null?void 0:Xn.id));if(xr)return{lines:Lr,ids:_i};an(Lr)},Zt=xr=>et(void 0,null,function*(){let gr={range:new ct.Range(xr,1,xr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield dr.deltaDecorations([],[gr]),_n()}),ir=xr=>et(void 0,null,function*(){let gr=[];const Lr=Cn.getLineDecorations(xr);for(let _i of Lr)_i.options.linesDecorationsClassName==="breakpoints-select"&&gr.push(_i.id);yield dr.deltaDecorations(gr,[]),_n()}),Nr=xr=>{let gr=Cn.getLineDecorations(xr);for(let Lr of gr)if(Lr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Fe.isEqual)(sn,_n(!0).lines)){dr.deltaDecorations(_n(!0).ids,[]);const xr=sn.map(gr=>({range:new ct.Range(gr,1,gr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));dr.deltaDecorations([],xr)}const si=Cn.onDidChangeModelContent(xr=>{let gr=Cn.getPosition();if(gr){let Lr=gr.lineNumber;clearTimeout(lo.current),lo.current=setTimeout(()=>{Rn(dr.getLineContent(Lr),Lr)?ir(Lr):Nr(Lr)?(ir(Lr),Zt(Lr)):_n()},100)}}),Tn=Cn.onMouseDown(xr=>{var gr,Lr,_i;if(xr.target.detail&&((_i=(Lr=(gr=xr.target)==null?void 0:gr.element)==null?void 0:Lr.className)!=null&&_i.includes("line-numbers"))){let oo=xr.target.position.lineNumber;if(Rn(dr.getLineContent(oo),oo))return;Nr(oo)?ir(oo):Zt(oo)}}),vr=xr=>{let gr={range:new ct.Range(xr,1,xr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ro.current=Cn.deltaDecorations(ro.current,[gr])},yi=()=>{ro.current=Cn.deltaDecorations(ro.current,[])},ko=Cn.onMouseMove(xr=>{var gr,Lr,_i;if(yi(),xr.target.detail&&((_i=(Lr=(gr=xr.target)==null?void 0:gr.element)==null?void 0:Lr.className)!=null&&_i.includes("line-numbers"))){let oo=xr.target.position.lineNumber;if(Rn(dr.getLineContent(oo),oo))return;vr(oo)}}),zi=Cn.onMouseLeave(()=>{yi()});return()=>{si.dispose(),Tn.dispose(),ko.dispose(),zi.dispose()}}},[mr.current,Jr,sn,mn,In,Ne]),(0,ot.useEffect)(()=>{var Qt;(Qt=mr.current)!=null&&Qt.instance&&In&&mr.current.instance.setPosition({lineNumber:0,column:0})},[mn]);function zn(){let Qt=mr.current.instance;if(Qt){const Cn=Qt.getSelection(),dr=mr.current.pastePos||{},Ar=new ct.Range(dr.startLineNumber||Cn.endLineNumber,dr.startColumn||Cn.endColumn,dr.endLineNumber||Cn.endLineNumber,dr.endColumn||Cn.endColumn);setTimeout(()=>{Qt.executeEdits("",[{range:Ar,text:""}])},300)}}function Un(Qt){(window.navigator.platform.match("Mac")?Qt.metaKey:Qt.ctrlKey)&&Qt.keyCode==83&&(Qt.preventDefault(),Pt())}const $n=()=>{if(kt&&mr.current.instance){const Qt=mr.current.instance.getContentHeight();tr(Qt<Qe?Qe:Qt)}else tr(Qe)};function Mr(Qt){var Cn=document.createEvent("MouseEvents");Cn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Qt.dispatchEvent(Cn)}const nn=Qt=>{if(!Fi.current)return;const{keyCode:Cn,ctrlKey:dr,metaKey:Ar,target:_n,type:Zt}=Qt;return(Zt==="paste"||(Cn===67||Cn===86)&&(Ar||dr))&&_n.nodeName==="TEXTAREA"&&(vn(),Qt.preventDefault()),!1};function on(Qt,Cn){var dr=window.URL||window.webkitURL||window,Ar=new Blob([Cn]),_n=document.createElementNS("http://www.w3.org/1999/xhtml","a");_n.href=dr.createObjectURL(Ar),_n.download=Qt,Mr(_n)}(0,ot.useEffect)(()=>{$n()},[$n]),(0,ot.useEffect)(()=>{_r.current&&!Jr&&Promise.all([at.e(5552),at.e(9651)]).then(at.bind(at,55826)).then(Qt=>{try{ct=Qt,mr.current.instance=ct.editor.create(_r.current,{value:Ce,language:pt(Ne),theme:_e,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Dn||!1}},Be);const Cn=mr.current.instance;let _n=[...Se.BH._menuItems].find(si=>si[0]._debugName=="EditorContext")[1],Zt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ir=(si,Tn)=>{var vr,yi;let ko=si._first;do Tn.includes((yi=(vr=ko.element)==null?void 0:vr.command)==null?void 0:yi.id)&&si._remove(ko);while(ko=ko.next)};if(Ht(Cn,ct),setTimeout(()=>{$n(),mr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{on($t||"educoder.txt",Cn.getValue())}})},500),mr.current.subscription=Cn.onDidChangeModelContent(si=>{io.current?clearTimeout(Ji.current):($n(),jt(Cn.getValue(),si)),Ji.current=setTimeout(()=>{io.current=!1},500)}),window.Monaco||fe(ct,pt(Ne)),zt&&(ir(_n,Zt),_r.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",nn),window.removeEventListener("paste",nn),window.addEventListener("keydown",nn),window.addEventListener("paste",nn)),window.Monaco=ct,Xe&&Cn.onDidBlurEditorWidget(()=>{Xe(Cn.getValue())}),ln&&Cn.onDidFocusEditorText(()=>{zt&&Ct(),ln(Cn.getValue())}),zt){Ct();try{Cn.onDidPaste(si=>{const Tn=Cn.getSelection(),vr=mr.current.pastePos||{},yi=new ct.Range(vr.startLineNumber||Tn.endLineNumber,vr.startColumn||Tn.endColumn,vr.endLineNumber||Tn.endLineNumber,vr.endColumn||Tn.endColumn);Cn.executeEdits("",[{range:si.range,text:""}])})}catch(si){}}let Nr=Ze();return Sn&&typeof Sn=="string"&&new pe(Sn,Cn,ct),bn(!0),()=>{const si=mr.current.instance;si.dispose();const Tn=si.getModel();Tn&&Tn.dispose(),mr.current.subscription&&mr.current.subscription.dispose(),Nr.unobserve(_r.current)}}catch(Cn){}})},[]),(0,ot.useEffect)(()=>{if(mr.current.instance&&Jr)return document.addEventListener("keydown",Un,!1),()=>{document.removeEventListener("keydown",Un)}},[Pt,Jr]),(0,ot.useEffect)(()=>{let Qt=mr.current.instance;if(Qt&&Jr){let Cn=pt(Ne);ct.editor.setModelLanguage(Qt.getModel(),Cn)}},[Ne,Jr]),(0,ot.useEffect)(()=>{mr.current.instance&&Jr&&ct.editor.setTheme(_e)},[_e,Jr]),(0,ot.useEffect)(()=>{let Qt=mr.current.instance;wi.current=rt,Qt&&Jr&&(Qt.updateOptions(gt({},rt)),setTimeout(()=>{Qt.getModel().updateOptions(gt({},rt))},200))},[JSON.stringify(rt),Jr]),(0,ot.useEffect)(()=>{let Qt=mr.current.instance;Qt&&Jr&&Qt.layout()},[nt,Qe,Jr]);const[Kt,hn]=(0,ot.useState)($e(nt)),[qn,tr]=(0,ot.useState)($e(Qe)),ur=Et(gt({},Je),{width:Kt,height:qn,position:"relative"});return ot.createElement("div",{className:"my-monaco-editor",ref:_r,style:ur},lt&&ot.createElement(Oe.CopyToClipboard,{text:Ce,onCopy:()=>Le.ZP.success("\u590D\u5236\u6210\u529F")},ot.createElement(De.Z,{title:"\u590D\u5236\u4EE3\u7801"},ot.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ot.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function yt({width:Tt="100%",height:St="100%",original:nt,modified:Qe,language:Ce,options:Ne={}}){const Je=(0,ot.useRef)(),[rt,Be]=(0,ot.useState)(null);function _e(kt){let zt;return Je.current&&(zt=new _t.Z(jt=>{for(let Ht of jt)(Ht.target.offsetHeight>0||Ht.target.offsetWidth>0)&&kt.layout()}),zt.observe(Je.current)),zt}(0,ot.useEffect)(()=>(Je.current&&Promise.all([at.e(5552),at.e(9404)]).then(at.bind(at,50048)).then(kt=>{ct=kt;const zt=ct.editor.createDiffEditor(Je.current,Et(gt({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},Ne),{wordWrap:!0}));Be(zt);let jt=_e(zt);return()=>{zt.dispose();const Ht=zt.getModel();Ht&&Ht.dispose(),jt.unobserve(Je.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ot.useEffect)(()=>{rt&&rt.setModel({original:ct.editor.createModel(nt,Ce),modified:ct.editor.createModel(Qe,Ce)})},[nt,Qe,Ce,rt]);const Xe=$e(Tt),lt=$e(St),Pt={width:Xe,height:lt};return ot.createElement("div",{className:"my-diff-editor",ref:Je,style:Pt})}},21434:function(dn,pn,at){"use strict";var ot=at(12867),_t=at(88044),ae=at(59637),Ge=at(67294);const Ie=_t.default.Option;pn.Z=({isTheoretical:me,onFontSizeChange:de,cmFontSize:Ee,cmCodeMode:we,autoFormat:be,onCodeModeChange:Te,onTabToSpace:ve,onAutoFormat:xe,formatDocument:fe,className:z="",tabToSpace:ee,children:oe,code_editor:ie,challenge:le,shixun_environment_id:ue,shixun_environments:pe})=>{var Se;const Le={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},De=(Se=pe==null?void 0:pe.find(Fe=>Fe.shixun_environment_id===ue))==null?void 0:Se.program_language;return console.log("----",De,pe,ue,ie),Ge.createElement("div",{className:`tpi-code-setting ${z}`},Ge.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Ge.createElement("section",null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Ge.createElement(_t.default,{bordered:!1,size:"small",value:we,onChange:Te},Ge.createElement(Ie,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Ge.createElement(Ie,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!me&&Ge.createElement(Ge.Fragment,null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Ge.createElement(_t.default,{bordered:!1,size:"small",value:Ee,onChange:de},Ge.createElement(Ie,{value:12},"12px"),Ge.createElement(Ie,{value:14},"14px"),Ge.createElement(Ie,{value:16},"16px"),Ge.createElement(Ie,{value:18},"18px"),Ge.createElement(Ie,{value:20},"20px"),Ge.createElement(Ie,{value:22},"22px"))),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"Tab\u8F6C\u6362"),Ge.createElement(ae.Z,{checked:ee,onChange:ve})),Ge.createElement("div",{className:"file-item",onClick:fe},Ge.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!me&&Ge.createElement(Ge.Fragment,null,Ge.createElement("h3",null,"\u5FEB\u6377\u952E"),Ge.createElement("section",null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Ge.createElement("span",null,"Ctrl + S")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Ge.createElement("span",null,"F1 / Alt + F1")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Ge.createElement("span",null,"Ctrl + ]/[")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Ge.createElement("span",null,"Ctrl + Shift + \\")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Ge.createElement("span",null,"Home")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Ge.createElement("span",null,"End"))),oe),!me&&Ge.createElement(Ge.Fragment,null,Ge.createElement("h3",null,"\u5FEB\u6377\u952E"),Ge.createElement("section",null,De&&Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),Ge.createElement("span",null,De)),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Ge.createElement("span",null,Le[le==null?void 0:le.difficulty])),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Ge.createElement("span",null,ie==null?void 0:ie.name)),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Ge.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},5476:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return Te}});var ot={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"},_t=at(74330),ae=at(83062),Ge=at(94184),Ie=at.n(Ge),me=at(28706),de=at(26194),Ee=at(52262),we=at(67294),Te=({className:ve,dataSource:xe=[],col:fe=4,right:z,bottom:ee=23,precision:oe=0,wrapWidth:ie=1200,trackEventItems:le,loading:ue,onRemove:pe=()=>{},isCurrent:Se=!0,showAlias:Le=!1})=>{const De=Math.floor((ie-(fe-1)*z)/fe),Fe=[{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 we.createElement(_t.Z,{spinning:ue},we.createElement("div",{className:Ie()(ot.list,ve)},!!(xe!=null&&xe.length)&&(xe==null?void 0:xe.map((Ae,Oe)=>{var ze;const{name:He,id:Ye,identifier:We,featured:Ue,school_name:st,image_url:dt,excellent:gt,is_plan:Et}=Ae;return we.createElement("div",{key:Ye,className:ot.wrap,style:{width:De,marginRight:(1+Oe)%fe===0?0:z+oe,marginBottom:ee}},we.createElement("a",{className:ot.li,onClick:Ke=>{Ke.preventDefault(),Ke.stopPropagation(),le&&(0,me.L9)([le]),(0,me.xg)(`/paths/${We}`)}},we.createElement("div",{className:ot.img},we.createElement("img",{className:ot.cover,src:`${dt}`}),Se&&(0,Ee.bg)()&&(Ae==null?void 0:Ae.studying)&&we.createElement("div",{className:`${ot.movebq} user-path-items`,onClick:Ke=>{Ke.stopPropagation(),pe(Ae)}},we.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),we.createElement("span",{className:"c-red"},"\u79FB\u9664")),(ze=Ae==null?void 0:Ae.subject_tags)==null?void 0:ze.map((Ke,et)=>{var $e,vt;if(et===0){const ht=($e=Fe.find(pt=>pt.name==Ke))==null?void 0:$e.swimg;return we.createElement("img",{className:ot.sign,src:ht,style:{left:"-4px"}})}const wt=(vt=Fe.find(ht=>ht.name==Ke))==null?void 0:vt.ptimg;return we.createElement("img",{className:ot.sign,src:wt,style:{left:`${48+52*(et-1)+2*et}px`}})}),we.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Ae==null?void 0:Ae.excellent)&&we.createElement("div",{className:ot.bq},"\u5F00\u653E\u8BFE\u7A0B"))),we.createElement("div",{className:ot.name},we.createElement(ae.Z,{title:Le&&(Ae!=null&&Ae.excellent_alias_name)?we.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${He}`,we.createElement("br",null),we.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Ae==null?void 0:Ae.excellent_alias_name}`)):He},we.createElement("span",{className:ot.e},Le&&(Ae==null?void 0:Ae.excellent_alias_name)||He))),we.createElement(ae.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${st}`},we.createElement("div",{className:ot.unit},we.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),st)),we.createElement("div",{className:ot.tags},we.createElement("div",null,we.createElement(ae.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},we.createElement("span",null,we.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),we.createElement("span",null,Ae.stages_count))),we.createElement(ae.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},we.createElement("span",null,we.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),we.createElement("span",null,Ae.members_count)))))))})),!xe.length&&we.createElement(de.Z,null)))}},30001:function(dn,pn,at){"use strict";at.d(pn,{jL:function(){return Ie},w9:function(){return $e},QD:function(){return On},cQ:function(){return dt.Z},op:function(){return jt},O5:function(){return Mn},_b:function(){return fr},t7:function(){return ie},Gi:function(){return Ct},YG:function(){return pt},qp:function(){return Te},vr:function(){return In},qE:function(){return an},Je:function(){return pe},wb:function(){return st},cq:function(){return Qe},tp:function(){return fe}});var ot=at(67294),_t={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"},ae="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==",Ie=({dataSource:Rn=[],img:zn,imgWidth:Un=346,title:$n,sunTitle:Mr,bannerExtraContent:nn})=>ot.createElement("div",{className:_t.banner},ot.createElement("div",{className:_t.content},ot.createElement("aside",null,ot.createElement("p",null,ot.createElement("b",null,$n),ot.createElement("span",null,Mr)),Rn.length>0&&ot.createElement("div",{className:_t.btns},Rn.map((on,Kt)=>ot.createElement("div",{key:Kt,onClick:on.click},on.name,on.sign?ot.createElement("img",{src:ae,width:39}):null))),nn),zn&&ot.createElement("img",{style:{marginTop:33,marginRight:38},src:zn,width:Un}))),me={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"},de=at(94184),Ee=at.n(de),we=at(96486),Te=({dataSource:Rn=[],value:zn,onChange:Un,onTitleChange:$n,className:Mr,title:nn,titleWidth:on=41,style:Kt={},fontColor:hn="#6A7283",showCount:qn})=>{const[tr,ur]=(0,ot.useState)(0),[Qt,Cn]=(0,ot.useState)(!1),dr=(0,ot.useRef)(null),Ar=(0,ot.useRef)(null);return(0,ot.useEffect)(()=>{var _n;Rn.length!==0&&(((_n=dr==null?void 0:dr.current)==null?void 0:_n.clientHeight)>97?ur(1):ur(0)),Rn.length===0&&ur(0),Cn(!1)},[Rn]),ot.createElement("div",{className:Ee()(me.row,Mr),style:Kt},ot.createElement("div",{onClick:(0,we.throttle)(()=>$n==null?void 0:$n(),2e3),style:{width:on,marginTop:Qt?12:4},className:`${me.title} ${$n?"current":""}`},nn),ot.createElement("div",{className:Qt?`${me.tagsWrap} ${me.tagsBorderWrap}`:me.tagsWrap},ot.createElement("div",{className:me.bar,ref:Ar,style:tr>0?{height:tr===1?97:"auto",overflow:tr===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ot.createElement("div",{className:me.tag,ref:dr},Rn==null?void 0:Rn.map(_n=>ot.createElement("span",{onClick:()=>Un(_n.id),key:_n.id,style:{color:hn},className:zn===_n.id?me.active:""},ot.createElement("span",{title:_n.name,className:me.name},_n.name),!!qn&&ot.createElement("span",{className:me.num},_n.count))))),!!tr&&ot.createElement(ot.Fragment,null,tr===1?ot.createElement("div",{onClick:()=>{var _n;ur(2),((_n=dr==null?void 0:dr.current)==null?void 0:_n.clientHeight)>245?Cn(!0):Cn(!1)},className:me.action},"\u5C55\u5F00",ot.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ot.createElement("div",{onClick:()=>{Ar.current.scrollTop=0,ur(1),Cn(!1)},className:me.action},"\u6536\u8D77",ot.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},ve={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"},fe=({dataSource:Rn=[],value:zn,onChange:Un,className:$n,style:Mr={}})=>ot.createElement("div",{style:Mr,className:Ee()(ve.tabs,$n)},Rn.map(nn=>ot.createElement("span",{onClick:()=>Un(nn.id),className:zn===nn.id?ve.active:"",key:nn.id},nn.name))),z={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"},ee=at(28802),ie=({dataSource:Rn=[],value:zn="",onChange:Un,onInputChange:$n=()=>{},className:Mr,style:nn={},placeholder:on,allowClear:Kt=!1})=>{var hn;const[qn,tr]=(0,ot.useState)(""),[ur,Qt]=(0,ot.useState)("");(0,ot.useEffect)(()=>{var Ar;let _n=zn;(Ar=JSON.stringify(zn))!=null&&Ar.includes("{")&&(tr(zn.id),_n=zn.value||"");try{Qt(decodeURIComponent(_n||""))}catch(Zt){Qt(decodeURIComponent(_n||""))}},[zn]);const Cn=()=>{Un(encodeURIComponent(ur),qn||null)},dr=Ar=>{Ar!==qn&&(tr(Ar),Un(encodeURIComponent(ur),Ar))};return ot.createElement("div",{className:Ee()(z.input,Mr),style:nn},!!Rn.length&&ot.createElement("div",{className:z.dropdown},ot.createElement("div",{className:z.text},(hn=Rn.find(Ar=>Ar.id===qn))==null?void 0:hn.name,ot.createElement("i",{className:"iconfont icon-zhankai4"}),ot.createElement("b",{className:z.b1}),ot.createElement("b",{className:z.b2})),ot.createElement("div",{className:z.menu},Rn.map((Ar,_n)=>ot.createElement("div",{key:_n,onClick:()=>dr(Ar.id)},Ar.name)))),ot.createElement(ee.default,{onPressEnter:Cn,value:ur,onChange:Ar=>{Qt(Ar.target.value),$n(encodeURIComponent(Ar.target.value),qn||null)},bordered:!1,placeholder:on}),ot.createElement("i",{onClick:Cn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},le={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"},pe=({value:Rn,onChange:zn,className:Un,total:$n,pageSize:Mr,style:nn={}})=>{const on=Rn<2,Kt=Rn>=Math.ceil($n/Mr);return $n<=Mr?ot.createElement(ot.Fragment,null):ot.createElement("div",{className:Ee()(le.quickPager,Un),style:nn},ot.createElement("div",{onClick:()=>{on||zn(Rn-1,"prev")},className:on?le.disabled:""},"\u4E0A\u4E00\u9875"),ot.createElement("div",{onClick:()=>{Kt||zn(Rn+1,"next")},className:Kt?le.disabled:""},"\u4E0B\u4E00\u9875"))},Se={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"},Le=at(74330),De=at(83062),Fe=at(57097),Ae=at(11320),Oe=at(28706),ze=at(96908),He=at(57177),Ye=at(81378),We=at(26194),st=({className:Rn,dataSource:zn=[],col:Un=4,right:$n,bottom:Mr=23,precision:nn=0,wrapWidth:on=1200,trackEventItems:Kt,loading:hn})=>{const qn=Math.floor((on-(Un-1)*$n)/Un);return ot.createElement(Le.Z,{spinning:hn},ot.createElement("div",{className:Ee()(Se.list,Rn)},!!zn.length&&zn.map((tr,ur)=>{const{name:Qt,id:Cn,identifier:dr,power:Ar,cover_image_id:_n,pic:Zt}=tr;return ot.createElement("div",{className:Se.wrap,key:Cn,style:{width:qn,marginRight:(1+ur)%Un===0?0:$n+nn,marginBottom:Mr}},ot.createElement("a",{target:"_blank",href:`/shixuns/${dr}/challenges`,className:Se.li,onClick:ir=>{ir.preventDefault(),Kt&&(0,Oe.L9)([Kt]),Ar&&(0,Oe.xg)(`/shixuns/${dr}/challenges`)}},ot.createElement("div",{className:Se.img},ot.createElement("img",{className:Se.cover,src:`${Zt}`}),tr.is_jupyter&&ot.createElement("img",{className:Se.sign,src:ze}),tr.is_jupyter_lab&&ot.createElement("img",{className:Se.sign,src:He}),tr.is_unity_3d&&ot.createElement("img",{className:Se.sign,src:Ye})),ot.createElement("div",{className:Se.name},ot.createElement(De.Z,{title:Qt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ot.createElement("span",{className:Se.e},Qt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ot.createElement("div",{className:Se.tags},ot.createElement(De.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ot.createElement("span",null,ot.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ot.createElement("span",null,tr.challenges_count))),!!tr.myshixuns_count&&ot.createElement(De.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ot.createElement("span",null,ot.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ot.createElement("span",null,tr.myshixuns_count))),ot.createElement(De.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ot.createElement("span",null,ot.createElement("span",null,tr.level))),ot.createElement("div",{className:Se.rate},ot.createElement(Fe.Z,{allowHalf:!0,disabled:!0,defaultValue:tr.score_info}),ot.createElement("span",null,"\xA0",tr.score_info?`${tr.score_info}\u5206`:"5\u5206")))),!Ar&&ot.createElement("div",{className:Se.lockWrap},ot.createElement("img",{src:`${Ae.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ot.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!zn.length&&ot.createElement(We.Z,null)))},dt=at(5476),gt={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"},Et="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",Ke=at(67294),$e=({className:Rn,dataSource:zn=[],col:Un=4,right:$n,bottom:Mr=23,precision:nn=0,wrapWidth:on=1200,trackEventItems:Kt,loading:hn,handleVery:qn=()=>!0})=>{const tr=Math.floor((on-(Un-1)*$n)/Un);return Ke.createElement(Le.Z,{spinning:hn},Ke.createElement("div",{className:Ee()(gt.list,Rn)},!!zn.length&&zn.map((ur,Qt)=>{const{subject_identifier:Cn,id:dr,identifier:Ar,power:_n}=ur,Zt=ur.is_public!=0&&ur.is_public;return Ke.createElement("div",{className:gt.wrap,key:dr,style:{width:tr,marginRight:(1+Qt)%Un===0?0:$n+nn,marginBottom:Mr}},Ke.createElement("a",{className:gt.li,onClick:ir=>{ir.preventDefault(),qn(ur==null?void 0:ur.first_category_url)&&(Kt&&(0,Oe.L9)([Kt]),(0,Oe.xg)(ur.first_category_url))}},Ke.createElement("div",{className:gt.top},Ke.createElement(De.Z,{title:ur.name},Ke.createElement("div",{className:gt.name},ur.name)),Ke.createElement("img",{className:gt.img,src:Ae.Z.IMG_SERVER+"/images/"+ur.avatar_url}),Ke.createElement("div",{className:gt.text,title:ur.creator},ur.creator),Cn&&Ke.createElement("div",{className:gt.btns},Ke.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Ke.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Zt&&Ke.createElement("div",{className:gt.sign},"\u516C\u5F00")),Ke.createElement("div",{className:gt.bottom},ur.visits>0&&Ke.createElement(De.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Ke.createElement("span",null,Ke.createElement("i",{className:"iconfont icon-liulanyan"}),Ke.createElement("span",null,ur.visits))),ur.course_members_count>0&&Ke.createElement(De.Z,{title:"\u6210\u5458",placement:"bottom"},Ke.createElement("span",null,Ke.createElement("i",{className:"iconfont icon-chengyuan"}),ur.course_members_count)),ur.tasks_count>0&&Ke.createElement(De.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Ke.createElement("span",null,Ke.createElement("i",{className:"iconfont icon-zuoye"}),ur.tasks_count)),ur.is_end?Ke.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Ke.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!ur.is_accessible&&Ke.createElement("div",{className:gt.lockWrap},Ke.createElement("img",{src:`${Ae.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Ke.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!zn.length&&Ke.createElement(We.Z,null)))},vt={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"},wt=at(35973),pt=({dataSource:Rn=[],value:zn,onChange:Un,className:$n,style:Mr={},tabBarExtraContent:nn})=>ot.createElement("div",{className:Ee()(vt.tabs,$n),style:Mr},ot.createElement("div",{className:vt.tabsWrap},Rn.map((on,Kt)=>!(on!=null&&on.hide)&&ot.createElement("aside",{className:vt.tab,onClick:()=>{Un(on.id),on.link&&wt.history.push(on.link)},key:Kt},ot.createElement("div",{className:zn===on.id?vt.active:""},on.name),(on==null?void 0:on.resetCount)==null&&(on==null?void 0:on.total)!==void 0&&ot.createElement("span",null,"\uFF08",on==null?void 0:on.total,"\uFF09"),(on==null?void 0:on.resetCount)!==void 0&&(on==null?void 0:on.total)!==void 0&&ot.createElement(De.Z,{title:(on==null?void 0:on.tip)!=null?on==null?void 0:on.tip:""},ot.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ot.createElement("span",{style:{color:"#000"}},on==null?void 0:on.resetCount),"/",ot.createElement("span",null,on==null?void 0:on.total),"\uFF09"))))),ot.createElement("div",{className:vt.tabBar},nn)),Ct=({className:Rn,style:zn={},children:Un})=>ot.createElement("div",{className:Ee()(Rn),style:zn},Un),xt={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"},yt=at(85418),Tt=at(50136);const St=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Qe=({sortValue:Rn,dropValue:zn,className:Un,onSort:$n,onDrop:Mr,dataSource:nn=St})=>{var on;return ot.createElement("div",{className:Ee()(xt.orderWrap,Un)},ot.createElement(yt.Z,{dropdownRender:()=>ot.createElement(Tt.default,null,nn.map((Kt,hn)=>ot.createElement(Tt.default.Item,{key:hn,onClick:()=>Mr(Kt.id)},Kt.name)))},ot.createElement("span",{className:xt.orderTextWrap},(on=nn.find(Kt=>zn===Kt.id))==null?void 0:on.name)),ot.createElement("span",{className:xt.orderIconWrap},ot.createElement("span",{className:xt.orderAsc},ot.createElement("i",{className:Rn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${xt.cursorPointer} ${xt.active}`:`iconfont icon-sanjiaoxing-up font12 ${xt.cursorPointer}`,onClick:()=>$n(Rn==="asc"?"desc":"asc")})),ot.createElement("span",{className:xt.orderDesc},ot.createElement("i",{className:Rn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${xt.cursorPointer} ${xt.active}`:`iconfont icon-sanjiaoxing-down font12 ${xt.cursorPointer}`,onClick:()=>$n(Rn==="asc"?"desc":"asc")}))))},Ce={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"},Ne=at(85804),Je=Object.defineProperty,rt=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Xe=(Rn,zn,Un)=>zn in Rn?Je(Rn,zn,{enumerable:!0,configurable:!0,writable:!0,value:Un}):Rn[zn]=Un,lt=(Rn,zn)=>{for(var Un in zn||(zn={}))Be.call(zn,Un)&&Xe(Rn,Un,zn[Un]);if(rt)for(var Un of rt(zn))_e.call(zn,Un)&&Xe(Rn,Un,zn[Un]);return Rn},Pt=(Rn,zn)=>{var Un={};for(var $n in Rn)Be.call(Rn,$n)&&zn.indexOf($n)<0&&(Un[$n]=Rn[$n]);if(Rn!=null&&rt)for(var $n of rt(Rn))zn.indexOf($n)<0&&_e.call(Rn,$n)&&(Un[$n]=Rn[$n]);return Un},kt=(Rn,zn,Un)=>new Promise(($n,Mr)=>{var nn=hn=>{try{Kt(Un.next(hn))}catch(qn){Mr(qn)}},on=hn=>{try{Kt(Un.throw(hn))}catch(qn){Mr(qn)}},Kt=hn=>hn.done?$n(hn.value):Promise.resolve(hn.value).then(nn,on);Kt((Un=Un.apply(Rn,zn)).next())}),jt=Rn=>{var zn=Rn,{className:Un,style:$n,children:Mr,loading:nn=!1,openLoading:on,onClick:Kt=()=>{},size:hn="middle",shape:qn="round"}=zn,tr=Pt(zn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[ur,Qt]=(0,ot.useState)(!1);return ot.createElement(Ne.ZP,lt({onClick:(0,we.throttle)(Cn=>kt(void 0,null,function*(){on&&Qt(!0);try{yield Kt(Cn)}catch(dr){console.log("error",dr)}on&&Qt(!1)}),2e3,{leading:!0,trailing:!1}),className:Ee()(Ce.btn,Ce[`${hn}-${qn}`],Un),style:$n,size:hn,shape:qn,loading:ur||nn},tr),Mr)},Ht={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"},an=({className:Rn,style:zn,children:Un=null,onClick:$n,title:Mr})=>ot.createElement("div",{className:Ee()(Ht.head,Rn),style:zn},ot.createElement("span",{className:"primary-hover",onClick:$n},ot.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ot.createElement("b",{title:Mr},Mr),ot.createElement("div",{className:Ht.node},Un)),sn={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"},On=({confirmShow:Rn=!0,confirmTitle:zn,confirmClick:Un,cancelShow:$n=!0,cancelTitle:Mr,cancelClick:nn,className:on,style:Kt,confirmLoading:hn=!1})=>ot.createElement("div",{className:Ee()(sn.btns,on),style:Kt},Rn&&ot.createElement(Ne.ZP,{loading:hn,onClick:Un,type:"primary",className:sn.confirm},zn),$n&&ot.createElement(Ne.ZP,{onClick:nn,className:sn.cancel},Mr)),un={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"},In=({className:Rn,style:zn={},LeftContent:Un,children:$n,RightContent:Mr})=>ot.createElement("div",{className:Ee()(un.fixedBottom,Rn),style:zn},ot.createElement("div",{className:un.wrap},ot.createElement("div",{className:un.left},Un),ot.createElement("div",{className:un.center},$n),ot.createElement("div",{className:un.right},Mr))),Sn={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"},fr=({className:Rn,style:zn={},dataSource:Un=[]})=>ot.createElement("div",{className:Ee()(Sn.crumbs,Rn),style:zn},Un.map(($n,Mr)=>Mr<Un.length-1?ot.createElement(ot.Fragment,{key:Mr},$n.path||$n.onClick?ot.createElement("span",{className:Sn.hover,onClick:$n!=null&&$n.onClick?$n.onClick:()=>wt.history.push($n.path)},$n.name):ot.createElement("span",null,$n.name),ot.createElement("span",null,"\xA0",">","\xA0")):ot.createElement("span",{key:Mr,style:{color:"#5F6368"}},$n.name))),_r=at(55054),mr=Object.defineProperty,wi=Object.defineProperties,no=Object.getOwnPropertyDescriptors,ro=Object.getOwnPropertySymbols,io=Object.prototype.hasOwnProperty,Ji=Object.prototype.propertyIsEnumerable,lo=(Rn,zn,Un)=>zn in Rn?mr(Rn,zn,{enumerable:!0,configurable:!0,writable:!0,value:Un}):Rn[zn]=Un,Fi=(Rn,zn)=>{for(var Un in zn||(zn={}))io.call(zn,Un)&&lo(Rn,Un,zn[Un]);if(ro)for(var Un of ro(zn))Ji.call(zn,Un)&&lo(Rn,Un,zn[Un]);return Rn},Jr=(Rn,zn)=>wi(Rn,no(zn)),bn=(Rn,zn)=>{var Un={};for(var $n in Rn)io.call(Rn,$n)&&zn.indexOf($n)<0&&(Un[$n]=Rn[$n]);if(Rn!=null&&ro)for(var $n of ro(Rn))zn.indexOf($n)<0&&Ji.call(Rn,$n)&&(Un[$n]=Rn[$n]);return Un};const{Countdown:Ze}=_r.default;var Mn=Rn=>{var zn=Rn,{onChange:Un}=zn,$n=bn(zn,["onChange"]);const[Mr,nn]=(0,ot.useState)(null);(0,ot.useEffect)(()=>{typeof Mr=="number"&&Mr>=0&&Un(Mr)},[Mr]);const on=Kt=>{const hn=Math.floor(Kt/1e3);nn(hn)};return ot.createElement(Ze,Jr(Fi({},$n),{onChange:on}))}},99914:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return _t}});var ot=at(67294);function _t(ae,Ge){const Ie=(0,ot.useRef)();(0,ot.useEffect)(()=>{Ie.current=ae}),(0,ot.useEffect)(()=>{function me(){Ie.current()}if(Ge!==null){let de=setInterval(me,Ge);return()=>clearInterval(de)}},[Ge])}},69223:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return ze}});var ot=at(67294),_t=at(91773),ae=at(95012),Ge=at(62844),Ie=at(2453),me=at(84567),de=at(36295),Ee=at(21434),we=at(76621),be=at(40471),Te={"code-panel-container":"code-panel-container___RFtv_","action-oj-bar":"action-oj-bar___ByFmZ",active:"active___s9gT5",tip:"tip___XZhl7"},ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAcCAYAAAAJKR1YAAAAAXNSR0IArs4c6QAAA8pJREFUWEfdl1toHUUYx//f7p7LbnIuSU4bk2JqS3qxbTA9FsQXBamJNMVS8CEPAfGhakQFUaHQh2Kp4IPgBfTBBx9UUHyQGgslscGCIr2QHlpfWg1pktPW0rTunvttdqadTY85yUmTTXJSwe9pZ3dm/r/5f8PMtzQYs96FwEEI0Yj/KojGVUV5Y3dn8DgNnrduV8IQAWtCXty0iggYGmybI1vgiIS8MFNF2Hx1qInoRFc0vIcGR0xRKaEqQGuTH/GpPBqDHjDGkczaWBfxOZAlNqt77eiIznZHw09UAWkqIaCrEKDaiVXNJJDMMPDKtc0HJBE624PwaMoqwkxPnciUcDmemdGZD8irETrbQ6sOIwVKjCM2mvyfAp25VsTjLV7Ml9kEB0gAQXVho2vm0MCfOXwxksbeTTpe3VU/S5UBOJ6afvWMsTBUTYDKMA/Vq/hgdxgRvXrzT5SA03nAtwjUioHcwJTtcgO1IqClwLiFWjYQ48BbQyaumAz7thg4EK1zdSwUBPBzFkhz4DEv8KjMYUUsG0jOkSoIHPrFwpjJ0LujDn0dxoJQEuZUFjA5sN0HdHiru68IaClQbmBqdjBWOtXXUYfeHbOdkvfu8Bxn4qyAj1Pj2KgZ6NEjeETTHbtW7FDZdAl19NcEXuysx7aIVpWLWB7OgVlOk31X/JD1F+IsBxWE/kAbnvSFage02I5mEBhjOWzWZtyT7cPWKDgEfKTgw4atCHDlwdxl54pJfJqcwJFwOzbcS49cxDeZv3EiN+Wsp9dowXPepgcD9GP2Jr7P3kCbpuNoeBPKV9rZYgKfJCccoKf9jXjJ37o4kELT9ZAmy8ZlxnD+H3yZvuqM3m804wWjGb8VLHyVuY4Ml7cdsFdfix6K4NJkekblfhWjz6MgWFe9Wd3ymcTwkTqOcultQEUWcmvPxAF7HYJJDcyuKBkrgBIAgm4F3fQ7bSRwxpDTzh99ZguabM/sj0Qnu6PhZ2loxHpfEN6GEHMOdzfS9+8T01OQYEWq/k1pK/mxP7H238FEZAlQf3c09J1Tyf8eF3ohm1r0kmJ58R5n/DW3qNwvXvmh3hzLodBqonREAOvLY0PQ3nw5//C3sh3YHEjsIirJZ9e/FsPnc+sZCpeX5CTRaNPO0DYptmfy4lMATkEIR5MASzV8bQNrtt4r6aZRXQMNxcyvBUefW3fK/UhRXu/aGfpMtnsmL3wuBPodYcJ1TyC4/VjDBqtyTldAJ/9IN/MiOyYISz4PCOJGV7RhnxR9fupSwM4VBwBMKJrvnZ9at9yau8A7ulgdO7eZq+0AAAAASUVORK5CYII=",xe=at(96486),fe=at(30001),z=at(67294),ee=Object.defineProperty,oe=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,Se=(Ye,We,Ue)=>We in Ye?ee(Ye,We,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Ye[We]=Ue,Le=(Ye,We)=>{for(var Ue in We||(We={}))ue.call(We,Ue)&&Se(Ye,Ue,We[Ue]);if(le)for(var Ue of le(We))pe.call(We,Ue)&&Se(Ye,Ue,We[Ue]);return Ye},De=(Ye,We)=>oe(Ye,ie(We));const Fe={theme:(0,be.G)("cmCodeMode","vs-dark"),fontSize:(0,be.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,be.G)("cmTabToSpace",!0)};var Ae=(Ye=>(Ye[Ye.set_font_size=0]="set_font_size",Ye[Ye.set_theme=1]="set_theme",Ye[Ye.on_tab_to_space=2]="on_tab_to_space",Ye[Ye.set_show_editor_setting=3]="set_show_editor_setting",Ye))(Ae||{});function Oe(Ye,We){switch(We.type){case 3:return De(Le({},Ye),{showEditorSetting:We.payload});case 1:return De(Le({},Ye),{theme:We.payload});case 0:return De(Le({},Ye),{fontSize:We.payload});case 2:return De(Le({},Ye),{tabToSpace:We.payload});default:throw new Error}}var ze=({isLoading:Ye,value:We=[],onChange:Ue,form:st})=>{var dt;const[gt,Et]=(0,ot.useReducer)(Oe,Fe),{theme:Ke,fontSize:et,showEditorSetting:$e,tabToSpace:vt}=gt,[wt,ht]=(0,ot.useState)("C"),[pt,ct]=(0,ot.useState)(!1),[Ct,xt]=(0,ot.useState)([]),yt=(0,ot.useRef)([]),Tt=_t.default.useWatch(["hack","languages"],st);(0,ot.useEffect)(()=>{We!=null&&We.length&&(yt.current=(0,xe.cloneDeep)(We))},[We]),(0,ot.useEffect)(()=>{pt&&xt(Tt)},[pt]),(0,ot.useEffect)(()=>{ht(Tt==null?void 0:Tt[0])},[Tt]);const St={onFontSizeChange:rt=>{Et({type:0,payload:rt}),(0,be.t)("cmFontSize",rt)},tabToSpace:vt,cmFontSize:et,className:"oj",cmCodeMode:Ke,onTabToSpace:rt=>{Et({type:2,payload:rt}),(0,be.t)("cmTabToSpace",rt)},onCodeModeChange:rt=>{Et({type:1,payload:rt}),(0,be.t)("cmCodeMode",rt)}};function nt(){Et({type:3,payload:!1})}function Qe(){Et({type:3,payload:!0})}function Ce(rt){var Be;const _e=(Be=yt.current)==null?void 0:Be.map(Xe=>(Xe.language===wt&&(Xe.code=rt),Xe));yt.current=(0,xe.cloneDeep)(_e),Ue(_e)}const Ne={key:wt,value:(dt=We==null?void 0:We.find(rt=>rt.language===wt))==null?void 0:dt.code,language:wt,onChange:Ce,theme:"vs",height:"calc(100% - 40px)",options:{fontSize:et,insertSpaces:vt}};console.log(888,We,Tt);const Je=We.filter(rt=>Tt==null?void 0:Tt.includes(rt.language));return z.createElement(ot.Fragment,null,z.createElement("div",{className:Te["code-panel-container"]},z.createElement(He,{setVisible:ct,languageItems:Je,onLanguage:rt=>ht(rt),language:wt,onShowCodeSetting:Qe}),!Ye&&z.createElement(de.ZP,Le({},Ne))),z.createElement(we.Z,null,z.createElement(ae.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:$e,onClose:nt},z.createElement(Ee.Z,Le({},St)))),z.createElement(Ge.default,{centered:!0,open:pt,title:"\u7F16\u7A0B\u8BED\u8A00\u914D\u7F6E",width:564,onOk:()=>{if(!Ct.length){Ie.ZP.warning("\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00");return}st.setFieldValue(["hack","languages"],Ct),ct(!1)},onCancel:()=>ct(!1)},z.createElement("div",{style:{background:"#F6F7F9",padding:"20px 20px 20px 26px"}},z.createElement(me.default.Group,{value:Ct,options:[{label:"C\u8BED\u8A00",value:"C"},{label:"C++\u8BED\u8A00",value:"C++",style:{marginLeft:30}},{label:"Java\u8BED\u8A00",value:"Java",style:{marginLeft:30}},{label:"Python\u8BED\u8A00",value:"Python",style:{marginLeft:30}}],onChange:rt=>{xt(rt)}}))))};function He({languageItems:Ye,language:We,onShowCodeSetting:Ue,onLanguage:st,setVisible:dt}){return z.createElement("div",{className:Te["action-oj-bar"]},Ye==null?void 0:Ye.map(gt=>z.createElement("aside",{className:We===(gt==null?void 0:gt.language)?Te.active:"",onClick:()=>st(gt==null?void 0:gt.language),key:gt==null?void 0:gt.language},z.createElement("i",{className:"iconfont icon-bianchengyuyan1"}),z.createElement("span",null,gt==null?void 0:gt.language))),z.createElement("div",{className:Te.tip},z.createElement("i",{className:"iconfont icon-tishi12 font14",style:{color:"#FEB636",marginRight:3}}),z.createElement("span",null,"\u8BBE\u7F6E\u521D\u59CB\u4EE3\u7801\uFF0C\u4E3A\u5B66\u751F\u63D0\u4F9B\u660E\u786E\u7F16\u8BD1\u8D77\u70B9")),z.createElement(fe.op,{onClick:()=>dt(!0),shape:"default"},z.createElement("img",{src:ve,width:18,style:{marginRight:8}}),"\u7F16\u7A0B\u8BED\u8A00\u914D\u7F6E"))}},55834:function(dn,pn,at){"use strict";at.d(pn,{GM:function(){return Ee},MK:function(){return de},PR:function(){return _t},ZS:function(){return be},d1:function(){return ae},fu:function(){return Ge},j2:function(){return we},l_:function(){return Ie},uE:function(){return Te},zQ:function(){return me}});var ot=at(33170);function _t(){return(0,ot.U2)("problems/new.json")}function ae(xe="question"){return(0,ot.U2)("disciplines.json",{source:xe})}function Ge(xe){return(0,ot.U2)(`problems/${xe}/edit.json`)}function Ie(xe,fe){return(0,ot.gz)(`problems/${xe}.json`,fe)}function me(xe){return(0,ot.v_)("problems.json",xe)}function de(xe,fe){return(0,ot.v_)(`exercises/${xe}/exercise_questions.json`,fe)}function Ee(xe,fe){return(0,ot.gz)(`exercise_questions/${xe}.json`,fe)}function we(xe){return(0,ot.v_)(`problems/${xe}/publish.json`)}function be(xe){return(0,ot.v_)(`problems/${xe}/cancel_publish.json`)}function Te(xe){return(0,ot.U2)(`problems/${xe}/start.json`)}function ve(xe,fe){return post("tag_disciplines.json",{name:fe,sub_discipline_id:xe})}},44048:function(dn,pn,at){"use strict";at.d(pn,{D0:function(){return de},R8:function(){return Ge},jw:function(){return me},y3:function(){return Ee}});var ot=at(88044),_t=at(67294);const{Option:ae}=ot.default;var Ge=(we=>(we[we.language=0]="language",we[we.difficult=1]="difficult",we[we.category=2]="category",we[we.openOrNot=3]="openOrNot",we))(Ge||{});const Ie={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}],2:[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}],3:[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]};function me(we){return Ie[we].map(be=>_t.createElement(ae,{key:be.title,value:be.key}," ",be.title," "))}function de(we,be){we.map(Te=>{const{id:ve,name:xe,sub_disciplines:fe}=Te;let z={value:ve,label:xe};be.push(z),fe&&fe.length>0&&(z.children=[],de(fe,z.children))})}function Ee(we,be){var Te;let ve=[];for(let xe=0;xe<we.length;xe++){const fe=we[xe];if(((Te=fe.sub_disciplines)==null?void 0:Te.length)>0){ve[0]=fe.id;for(let z=0;z<fe.sub_disciplines.length;z++){const ee=fe.sub_disciplines[z];if(ee.id===be)return ve[1]=ee.id,[ve,ee.tag_disciplines||ee.sub_disciplines||[]]}}}return[ve,[]]}},32259:function(dn,pn,at){"use strict";at.d(pn,{Y2:function(){return dt},ZP:function(){return gt}});var ot=at(67294),_t=at(35059),ae=at(2453),Ge=at(62844),Ie=at(71230),me=at(98813),de=at(85804),Ee=at(84567),we=at(83062),be=at(28802),Te={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",xe=at(56448),fe=at.n(xe),z=at(59451),ee=at(33170),oe=at(25934),ie=at(28706),le=at(20819),ue=at(67294),pe=Object.defineProperty,Se=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,Oe=(Et,Ke,et)=>Ke in Et?pe(Et,Ke,{enumerable:!0,configurable:!0,writable:!0,value:et}):Et[Ke]=et,ze=(Et,Ke)=>{for(var et in Ke||(Ke={}))Fe.call(Ke,et)&&Oe(Et,et,Ke[et]);if(De)for(var et of De(Ke))Ae.call(Ke,et)&&Oe(Et,et,Ke[et]);return Et},He=(Et,Ke)=>Se(Et,Le(Ke)),Ye=(Et,Ke,et)=>new Promise(($e,vt)=>{var wt=ct=>{try{pt(et.next(ct))}catch(Ct){vt(Ct)}},ht=ct=>{try{pt(et.throw(ct))}catch(Ct){vt(Ct)}},pt=ct=>ct.done?$e(ct.value):Promise.resolve(ct.value).then(wt,ht);pt((et=et.apply(Et,Ke)).next())});const{Dragger:We}=_t.default,Ue=Et=>{const Ke=Ct=>Ct&&Ct.substring(0,Ct.lastIndexOf("."));for(var et=[...Et],$e=0,vt=[],wt=0;wt<et.length;wt++){for(var ht="",pt=0;pt<vt.length;pt++)if(Ke(vt[pt][0].name)==Ke(et[wt].name)){$e=1,ht=pt;break}if($e==1)vt[ht].push(et[wt]),$e=0;else if($e==0){let Ct=new Array;Ct.push(et[wt]),vt.push(Ct)}}return vt.map(Ct=>{if(Ct.forEach(xt=>{let yt=xt.name.split(/\.(?=[^\.]+$)/);xt.name=`${yt[0]}.${yt[1].toLowerCase()}`}),Ct[0].name.includes(".in"))return Ct.length===2?Ct:[Ct[0],{}];if(Ct[0].name.includes(".out"))return Ct.length===2?Ct.reverse():[{},Ct[0]]})},st=({onClose:Et,onOK:Ke,visible:et,wrapClassName:$e,rootIdentifier:vt,multiple:wt=!1,defaultMultipleValue:ht=!0})=>{const[pt,ct]=(0,ot.useState)([]),[Ct,xt]=(0,ot.useState)({}),[yt,Tt]=(0,ot.useState)(!1),[St,nt]=(0,ot.useState)(!0),Qe=(0,ot.useRef)([]),Ce=(0,ot.useRef)(0),Ne=()=>{Et()};(0,ot.useEffect)(()=>{Je()},[]),(0,ot.useEffect)(()=>{et&&(Qe.current=[],Ce.current=0,ct([]),nt(ht))},[et]);const Je=()=>Ye(void 0,null,function*(){try{const zt=yield(0,ee.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),jt=JSON.parse((0,z.pe)(zt.data));xt(jt)}catch(zt){}}),rt=zt=>zt&&zt.substring(0,zt.lastIndexOf(".")),Be=zt=>{var jt,Ht;const ln=rt((jt=zt[0])==null?void 0:jt.name)||rt((Ht=zt[1])==null?void 0:Ht.name),an=pt.filter(sn=>rt(sn.name)!==ln);Qe.current=[...an],ct([...an])},_e=zt=>{if(!St){const $t=new FormData;$t.append("file",zt.file),(0,ee.ZP)("/api/attachments/get_file_content.json",{method:"post",body:$t},!0).then(un=>{if(un.status===0){Ce.current=Ce.current+1;const mn=Qe.current.map(In=>{var Sn;if(In.name===zt.name){const Dn=ze({},In);return(Sn=zt==null?void 0:zt.name)!=null&&Sn.includes(".in")?Dn.input=un==null?void 0:un.content:Dn.output=un==null?void 0:un.content,Dn}return In});if(Qe.current=[...mn],ct([...mn]),Ce.current>0&&Ce.current===pt.length){Tt(!1);let In=Ue(mn);In=In.filter(Sn=>{var Dn,fr;return!!((Dn=Sn[0])!=null&&Dn.name&&((fr=Sn[1])!=null&&fr.name))}),In=In.map(Sn=>He(ze(ze({},Sn[0]),Sn[1]),{is_file:!1})),Ke(In),Et()}}else Tt(!1),Et()});return}const jt=new(fe())({endpoint:Ct.end_point,region:Ct.region,accessKeyId:Ct.access_key_id,accessKeySecret:Ct.access_key_secret,bucket:Ct.bucket,stsToken:Ct.security_token}),Ht=zt.name,ln={container_type:"TestSet",file_name:Ht},an=(0,oe.Z)();let sn=`testsets/${vt}/${an}${Ht.indexOf(".")>-1?"."+Ht.split(".").pop():""}`;vt===null&&(sn=`testsets/${an}${Ht.indexOf(".")>-1?"."+Ht.split(".").pop():""}`),jt.multipartUpload(sn,new Blob([zt.file],{type:zt.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Ht+""},url:Ct==null?void 0:Ct.callback_url,host:Ct==null?void 0:Ct.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ee.rz)(ln)}}).then(function($t){if($t.data.status===0){Ce.current=Ce.current+1;const On=Qe.current.map(un=>{var mn,In,Sn,Dn,fr,_r,mr,wi,no,ro,io,Ji,lo,Fi,Jr,bn,Ze;if(un.name===((In=(mn=$t.data)==null?void 0:mn.data)==null?void 0:In.file_name)){const vn=ze({},un);return(fr=(Dn=(Sn=$t.data)==null?void 0:Sn.data)==null?void 0:Dn.file_name)!=null&&fr.includes(".in")?(vn.in_object_key=(mr=(_r=$t.data)==null?void 0:_r.data)==null?void 0:mr.object,vn.in_object_size=(no=(wi=$t.data)==null?void 0:wi.data)==null?void 0:no.size,vn.input=(io=(ro=$t.data)==null?void 0:ro.data)==null?void 0:io.file_name,vn.in_file=zt):(vn.out_object_key=(lo=(Ji=$t.data)==null?void 0:Ji.data)==null?void 0:lo.object,vn.out_object_size=(Jr=(Fi=$t.data)==null?void 0:Fi.data)==null?void 0:Jr.size,vn.output=(Ze=(bn=$t.data)==null?void 0:bn.data)==null?void 0:Ze.file_name,vn.out_file=zt),vn}return un});if(Qe.current=[...On],ct([...On]),Ce.current>0&&Ce.current===pt.length){Tt(!1);let un=Ue(On);un=un.filter(mn=>{var In,Sn;return!!((In=mn[0])!=null&&In.name&&((Sn=mn[1])!=null&&Sn.name))}),un=un.map(mn=>He(ze(ze({},mn[0]),mn[1]),{is_file:!0})),Ke(un),Et()}}})},Xe=zt=>new Promise((jt,Ht)=>{let ln=0,an=[];for(let sn=0;sn<zt.length;sn++)zt[sn].file.slice(0,1).arrayBuffer().then(()=>{ln++,ln===zt.length&&(an.length?(ae.ZP.warning(`${an.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Ht()):jt(zt))}).catch($t=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",$t),ln++,an.push(zt[sn].name),ln===zt.length&&(an.length?(ae.ZP.warning(`${an.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Ht()):jt(zt))})}),lt=()=>Ye(void 0,null,function*(){if(pt.length===0){ae.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield Xe(pt),Tt(!0),Ue(pt).some(jt=>{var Ht,ln;return!((Ht=jt[0])!=null&&Ht.name&&((ln=jt[1])!=null&&ln.name))})){Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>Ye(void 0,null,function*(){pt.map(jt=>Ye(void 0,null,function*(){_e(jt)}))}),onCancel:()=>{Tt(!1)}});return}pt.map(jt=>Ye(void 0,null,function*(){_e(jt)}))}),Pt={name:"file",fileList:pt,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:zt=>{if(pt!=null&&pt.some(Ht=>Ht.name===zt.name))return ae.ZP.info(`${zt.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(zt.size/1024/1024>100)return ae.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(zt.name))return ae.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const jt={name:zt.name,uid:zt.uid,file:zt,percent:0};return pt.push(jt),Qe.current=[...pt],ct([...pt]),!1}},kt=Ue(pt);return console.log(pt,kt,"fileList"),ue.createElement(Ge.default,{open:et,wrapClassName:$e,onOk:lt,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:yt},onCancel:Ne,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:Te.wrap},pt.length?ue.createElement("div",null,ue.createElement(Ie.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:wt?"visible":"hidden"}},ue.createElement("span",{className:Te.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(me.ZP.Group,{className:`ml20 ${Te.testCaseRadio}`,optionType:"button",value:St,onChange:zt=>nt(zt.target.value)},ue.createElement(me.ZP,{value:!1},"\u6587\u672C"),ue.createElement(me.ZP,{value:!0},"\u6587\u4EF6"))),ue.createElement(_t.default,ze({},Pt),ue.createElement(de.ZP,{type:"primary",className:Te.btnS},ue.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ue.createElement(dt,{data:kt,onRemove:Be})):ue.createElement("div",{className:`${Te.noData} mb30`},ue.createElement(_t.default.Dragger,He(ze({},Pt),{className:Te.dragger}),ue.createElement("img",{src:ve,alt:"",className:"mb20"}),ue.createElement("div",null,ue.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),ue.createElement("span",{className:Te.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ue.createElement("div",{className:Te.text},ue.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),ue.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",ue.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",ue.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",ue.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",ue.createElement("br",null))))},dt=({data:Et=[],onRemove:Ke,width:et="auto",showScore:$e=!1,disabled:vt=!1,inputChange:wt,onEvaluatingChange:ht,onSelectAll:pt,checkAll1:ct,checkAll2:Ct,checkAll3:xt,checkAll4:yt,checkAll5:Tt,showEvaluatingSetting:St=!1,className:nt="",isProgramHomework:Qe=!1})=>{const Ce={value:"",filename:"",dataUrl:""},[Ne,Je]=(0,ot.useState)(ze({},Ce)),rt=Xe=>{let lt=document.createElement("a");document.body.appendChild(lt);let Pt=URL.createObjectURL(Xe.file);lt.href=Pt,lt.download=Xe.name,lt.click(),URL.revokeObjectURL(Pt),document.body.removeChild(lt)},Be=(Xe,lt)=>{(0,ie.LR)(Xe,lt)},_e=(Xe,lt)=>{Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ue.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{Ke(Xe,lt)},onCancel:()=>{}})};return Et.length?ue.createElement("div",{className:nt,style:{width:et}},ue.createElement("div",{className:`${Qe?Te.headProgram:Te.head}`},St&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(Ee.default,{checked:ct,onChange:Xe=>{pt(Xe.target.checked,"hidden")}}),ue.createElement(we.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{style:{width:Qe?"25%":"15%"}},"\u7528\u4F8B"),ue.createElement("div",{style:{width:$e?Qe?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:$e?Qe?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),$e&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),St&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(Ee.default,{checked:yt,onChange:Xe=>{pt(Xe.target.checked,"input_visible")}}),ue.createElement(we.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),St&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(Ee.default,{checked:Ct,onChange:Xe=>{pt(Xe.target.checked,"is_invisible")}}),ue.createElement(we.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),St&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(Ee.default,{checked:Tt,onChange:Xe=>{pt(Xe.target.checked,"actual_output_visible")}}),ue.createElement(we.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),St&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(Ee.default,{checked:xt,onChange:Xe=>{pt(Xe.target.checked,"last_match_rule")}}),ue.createElement(we.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{className:Te.operation,style:Qe?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ue.createElement("div",{className:Te.listWrapper,style:{boxShadow:Qe?"0px 2px 4px 0px #EAEEF4":"unset"}},Et.map((Xe,lt)=>{var Pt,kt,zt,jt;return ue.createElement("div",{key:lt,className:Te.list,style:Qe?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},St&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(Ee.default,{checked:!!Xe.hidden,onChange:Ht=>{ht(Ht.target.checked,lt,"hidden")}})),ue.createElement("div",{style:{width:Qe?"25%":"15%",paddingLeft:Qe?"5px":"0px",paddingRight:Qe?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",lt+1),ue.createElement("div",{className:Te.info,style:{width:$e?Qe?"20%":"15%":"25%"}},ue.createElement("span",{title:Xe.input||((Pt=Xe[0])==null?void 0:Pt.name),onClick:()=>Ye(void 0,null,function*(){let Ht;Xe.input?Xe.input_file_url?Ht=Xe.input_file_url:Ht=Xe.in_file:Ht=Xe[0];let ln;typeof Ht=="string"?(ln=yield fetch(Ht,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Je({value:yield ln.text(),filename:"",dataUrl:Ht})):(ln=yield(0,ie.db)(Ht.file),Je({value:ln.text,filename:Ht.name,dataUrl:ln.link}))})},Xe.input||((kt=Xe[0])==null?void 0:kt.name))),ue.createElement("div",{className:Te.info,style:{width:$e?Qe?"20%":"15%":"25%"}},ue.createElement("span",{title:Xe.output||((zt=Xe[1])==null?void 0:zt.name),onClick:()=>Ye(void 0,null,function*(){let Ht;Xe.input?Xe.output_file_url?Ht=Xe.output_file_url:Ht=Xe.out_file:Ht=Xe[1];let ln;typeof Ht=="string"?(ln=yield fetch(Ht,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Je({value:yield ln.text(),filename:"",dataUrl:Ht})):(ln=yield(0,ie.db)(Ht.file),Je({value:ln.text,filename:Ht.name,dataUrl:ln.link}))})},Xe.output||((jt=Xe[1])==null?void 0:jt.name))),$e&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{size:"large",addonAfter:Qe?"%":null,disabled:vt,style:{width:"80%"},onChange:Ht=>wt(Ht,lt),value:Xe.score}),!Qe&&ue.createElement("span",null,"\xA0%")),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Ee.default,{checked:Xe.input_visible||!1,onChange:Ht=>{ht(Ht.target.checked,lt,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Ee.default,{checked:Xe.is_invisible||!1,onChange:Ht=>{ht(Ht.target.checked,lt,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Ee.default,{checked:Xe.actual_output_visible||!1,onChange:Ht=>{ht(Ht.target.checked,lt,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Ee.default,{checked:Xe.last_match_rule||!1,onChange:Ht=>{ht(Ht.target.checked,lt,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ue.createElement("div",{onClick:()=>_e(Xe,lt),style:Qe?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ue.createElement("span",{className:Te.del},"\u5220\u9664")))})),ue.createElement(le.Z,{close:!0,data:Ne.dataUrl,filename:Ne.filename,type:Ne.dataUrl.length?"txt":"",onClose:()=>Je(ze({},Ce)),monacoEditor:{value:Ne.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var gt=st},71573:function(dn,pn,at){"use strict";at.d(pn,{c:function(){return _t}});var ot=(ae=>(ae.FirstPage="firstPage",ae.PrevPage="prevPage",ae.NextPage="nextPage",ae))(ot||{}),_t=(ae=>(ae[ae.Single=0]="Single",ae[ae.Multiple=1]="Multiple",ae[ae.Judge=2]="Judge",ae[ae.Fill=3]="Fill",ae[ae.Subjective=4]="Subjective",ae[ae.Shixun=5]="Shixun",ae[ae.Program=6]="Program",ae[ae.Combine=7]="Combine",ae))(_t||{})},51161:function(dn,pn,at){"use strict";at.d(pn,{AL:function(){return pe},Iy:function(){return Te},Qv:function(){return fe},ez:function(){return ue},jb:function(){return ve}});var ot=at(47084),_t=at.n(ot),ae=at(90621),Ge=at.n(ae);let Ie=1;function me(Ae,Oe){const ze=Ae.match(/^(\s+)(?:```)/);if(ze===null)return Oe;const He=ze[1];return Oe.split(`
`).map(Ye=>{const We=Ye.match(/^\s+/);if(We===null)return Ye;const[Ue]=We;return Ue.length>=He.length?Ye.slice(He.length):Ye}).join(`
`)}let de=[],Ee=["<ul>"];const we=new(_t()).Renderer,be=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Te(){de.length=0,Ee=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function xe(Ae,Oe,ze,He){if(Oe>=Ae.length||Ae[Oe].level<=ze)return Oe;var Ye=Ae[Oe];He.push("<li><a href='#"+Ie+Ye.anchor+"'>"+Ye.text+"</a>"),Oe++;var We=[];return Oe=xe(Ae,Oe,Ye.level,We),We.length>0&&(He.push("<ul>"),We.forEach(function(Ue){He.push(Ue)}),He.push("</ul>")),He.push("</li>"),Oe=xe(Ae,Oe,ze,He),Oe}function fe(){return xe(de,0,0,Ee),Ee.push("</ul>"),Ee.join("")}const z={heading(Ae){const Oe=be.exec(Ae);if(Ie+=1,Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},fences(Ae){const Oe=this.rules.block.fences.exec(Ae);if(Oe){const ze=Oe[0];let He=me(ze,Oe[3]||"");const Ye=Oe[2]?Oe[2].trim():Oe[2];if(["latex","katex","math"].indexOf(Ye)>=0){const We=ie(),Ue=He;He=We,le[We]={type:"block",expression:Ue}}return{type:"code",raw:ze,lang:Ye,text:He}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const ie=()=>`__special_katext_id_${oe++}__`;let le={};function ue(){return le}function pe(){oe=0,le={}}function Se(Ae){return Ae=Ae.replace(ee,(Oe,ze)=>{const He=ie();return le[He]={type:"inline",expression:ze},He}),Ae}const Le=we.listitem;we.listitem=function(Ae){return Le(Se(Ae))};const De=we.paragraph;we.paragraph=function(Ae){return De(Se(Ae))};const Fe=we.tablecell;we.tablecell=function(Ae,Oe){return Fe(Se(Ae),Oe)},we.code=function(Ae,Oe,ze){const He=(Oe||"").match(/\S*/)[0];return He?["latex","katex","math"].indexOf(He)>=0?`<p class='editormd-tex'>${Ae}</p>`:`<pre class="prettyprint linenums"><code class="language-${Oe}">${ze?Ae:(0,ae.escape)(Ae,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ze?Ae:(0,ae.escape)(Ae,!0))+"</code></pre>"},we.heading=function(Ae,Oe,ze){let He=this.options.headerPrefix+ze.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return de.push({anchor:He,level:Oe,text:Ae}),"<h"+Oe+' id="'+Ie+He+'">'+Ae+"</h"+Oe+">"},_t().setOptions({silent:!0,gfm:!0,pedantic:!1}),_t().use({tokenizer:z,renderer:we}),pn.ZP=_t()},40471:function(dn,pn,at){"use strict";at.d(pn,{G:function(){return Ie},t:function(){return Ge}});var ot=at(58971),_t=at.n(ot);const ae=null;function Ge(me,de){let Ee=_t().get("__ec");Ee||(Ee={}),Ee[me]=de,_t().set("__ec",Ee)}function Ie(me,de){let Ee=_t().get("__ec");return Ee?Ee[me]===void 0?de:Ee[me]:de}},56448:function(dn){(function(pn){(function(at){if(1)dn.exports=at();else var ot})(function(){var at,ot,_t;return function(){function ae(Ge,Ie,me){function de(be,Te){if(!Ie[be]){if(!Ge[be]){var ve=void 0;if(!Te&&ve)return require(be,!0);if(Ee)return Ee(be,!0);var xe=new Error("Cannot find module '"+be+"'");throw xe.code="MODULE_NOT_FOUND",xe}var fe=Ie[be]={exports:{}};Ge[be][0].call(fe.exports,function(z){var ee=Ge[be][1][z];return de(ee||z)},fe,fe.exports,ae,Ge,Ie,me)}return Ie[be].exports}for(var Ee=void 0,we=0;we<me.length;we++)de(me[we]);return de}return ae}()({1:[function(ae,Ge,Ie){"use strict";var me=ae("./browser/client");me.Buffer=ae("buffer").Buffer,me.urllib=ae("../shims/xhr"),me.version=ae("./browser/version").version,Ge.exports=me},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.slice.js");var we=ae("assert"),be=ae("../common/utils/checkBucketName"),Te=be.checkBucketName,ve=Ie;function xe(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function fe(z){return z?xe(z)?z:[z]:[]}ve.useBucket=function(ee){return Te(ee),this.options.bucket=ee,this},ve.setBucket=function(ee){return Te(ee),this.options.bucket=ee,this},ve.getBucket=function(){return this.options.bucket},ve.deleteBucket=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le){var ue,pe;return de.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"",le),Le.next=3,this.request(ue);case 3:if(pe=Le.sent,!(pe.status===200||pe.status===204)){Le.next=6;break}return Le.abrupt("return",{res:pe.res});case 6:return Le.next=8,this.requestError(pe);case 8:throw Le.sent;case 9:case"end":return Le.stop()}},oe,this)}));function ee(oe,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketACL=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le,ue){var pe,Se;return de.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return pe=this._bucketRequestParams("PUT",ie,"acl",ue),pe.headers={"x-oss-acl":le},pe.successStatuses=[200],De.next=5,this.request(pe);case 5:return Se=De.sent,De.abrupt("return",{bucket:Se.headers.location&&Se.headers.location.substring(1)||null,res:Se.res});case 7:case"end":return De.stop()}},oe,this)}));function ee(oe,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketACL=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le){var ue,pe;return de.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return ue=this._bucketRequestParams("GET",ie,"acl",le),ue.successStatuses=[200],ue.xmlResponse=!0,Le.next=5,this.request(ue);case 5:return pe=Le.sent,Le.abrupt("return",{acl:pe.data.AccessControlList.Grant,owner:{id:pe.data.Owner.ID,displayName:pe.data.Owner.DisplayName},res:pe.res});case 7:case"end":return Le.stop()}},oe,this)}));function ee(oe,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketLogging=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le,ue){var pe,Se,Le;return de.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return pe=this._bucketRequestParams("PUT",ie,"logging",ue),Se=`<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>`.concat(ie,`</TargetBucket>
`),le&&(Se+="<TargetPrefix>".concat(le,`</TargetPrefix>
`)),Se+=`</LoggingEnabled>
</BucketLoggingStatus>`,pe.content=Se,pe.mime="xml",pe.successStatuses=[200],Fe.next=9,this.request(pe);case 9:return Le=Fe.sent,Fe.abrupt("return",{res:Le.res});case 11:case"end":return Fe.stop()}},oe,this)}));function ee(oe,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketLogging=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le){var ue,pe,Se;return de.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ue=this._bucketRequestParams("GET",ie,"logging",le),ue.successStatuses=[200],ue.xmlResponse=!0,De.next=5,this.request(ue);case 5:return pe=De.sent,Se=pe.data.LoggingEnabled,De.abrupt("return",{enable:!!Se,prefix:Se&&Se.TargetPrefix||null,res:pe.res});case 8:case"end":return De.stop()}},oe,this)}));function ee(oe,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketLogging=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le){var ue,pe;return de.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"logging",le),ue.successStatuses=[204,200],Le.next=4,this.request(ue);case 4:return pe=Le.sent,Le.abrupt("return",{res:pe.res});case 6:case"end":return Le.stop()}},oe,this)}));function ee(oe,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketCORS=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le,ue){var pe,Se,Le,De,Fe,Ae,Oe,ze,He,Ye;return de.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:for(le=le||[],we(le.length,"rules is required"),le.forEach(function(st){we(st.allowedOrigin,"allowedOrigin is required"),we(st.allowedMethod,"allowedMethod is required")}),pe=this._bucketRequestParams("PUT",ie,"cors",ue),Se=`<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>`,Le=function(dt){Se+="<AllowedOrigin>".concat(dt,"</AllowedOrigin>")},De=function(dt){Se+="<AllowedMethod>".concat(dt,"</AllowedMethod>")},Fe=function(dt){Se+="<AllowedHeader>".concat(dt,"</AllowedHeader>")},Ae=function(dt){Se+="<ExposeHeader>".concat(dt,"</ExposeHeader>")},Oe=0,ze=le.length;Oe<ze;Oe++)He=le[Oe],Se+="<CORSRule>",fe(He.allowedOrigin).forEach(Le),fe(He.allowedMethod).forEach(De),fe(He.allowedHeader).forEach(Fe),fe(He.exposeHeader).forEach(Ae),He.maxAgeSeconds&&(Se+="<MaxAgeSeconds>".concat(He.maxAgeSeconds,"</MaxAgeSeconds>")),Se+="</CORSRule>";return Se+="</CORSConfiguration>",pe.content=Se,pe.mime="xml",pe.successStatuses=[200],Ue.next=16,this.request(pe);case 16:return Ye=Ue.sent,Ue.abrupt("return",{res:Ye.res});case 18:case"end":return Ue.stop()}},oe,this)}));function ee(oe,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketCORS=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le){var ue,pe,Se,Le;return de.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ue=this._bucketRequestParams("GET",ie,"cors",le),ue.successStatuses=[200],ue.xmlResponse=!0,Fe.next=5,this.request(ue);case 5:return pe=Fe.sent,Se=[],pe.data&&pe.data.CORSRule&&(Le=pe.data.CORSRule,xe(Le)||(Le=[Le]),Le.forEach(function(Ae){var Oe={};Object.keys(Ae).forEach(function(ze){Oe[ze.slice(0,1).toLowerCase()+ze.slice(1,ze.length)]=Ae[ze]}),Se.push(Oe)})),Fe.abrupt("return",{rules:Se,res:pe.res});case 9:case"end":return Fe.stop()}},oe,this)}));function ee(oe,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketCORS=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le){var ue,pe;return de.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"cors",le),ue.successStatuses=[204],Le.next=4,this.request(ue);case 4:return pe=Le.sent,Le.abrupt("return",{res:pe.res});case 6:case"end":return Le.stop()}},oe,this)}));function ee(oe,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketReferer=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le,ue,pe){var Se,Le,De,Fe;return de.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(Se=this._bucketRequestParams("PUT",ie,"referer",pe),Le=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,Le+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
`),ue&&ue.length>0){for(Le+=` <RefererList>
`,De=0;De<ue.length;De++)Le+=" <Referer>".concat(ue[De],`</Referer>
`);Le+=` </RefererList>
`}else Le+=` <RefererList />
`;return Le+="</RefererConfiguration>",Se.content=Le,Se.mime="xml",Se.successStatuses=[200],Oe.next=10,this.request(Se);case 10:return Fe=Oe.sent,Oe.abrupt("return",{res:Fe.res});case 12:case"end":return Oe.stop()}},oe,this)}));function ee(oe,ie,le,ue){return z.apply(this,arguments)}return ee}(),ve.getBucketReferer=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le){var ue,pe,Se;return de.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ue=this._bucketRequestParams("GET",ie,"referer",le),ue.successStatuses=[200],ue.xmlResponse=!0,De.next=5,this.request(ue);case 5:return pe=De.sent,Se=pe.data.RefererList.Referer||null,Se&&(xe(Se)||(Se=[Se])),De.abrupt("return",{allowEmpty:pe.data.AllowEmptyReferer==="true",referers:Se,res:pe.res});case 9:case"end":return De.stop()}},oe,this)}));function ee(oe,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketReferer=function(){var z=(0,Ee.default)(de.default.mark(function oe(ie,le){return de.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return pe.next=2,this.putBucketReferer(ie,!0,null,le);case 2:return pe.abrupt("return",pe.sent);case 3:case"end":return pe.stop()}},oe,this)}));function ee(oe,ie){return z.apply(this,arguments)}return ee}(),ve._bucketRequestParams=function(ee,oe,ie,le){return{method:ee,bucket:oe,subres:ie,timeout:le&&le.timeout,ctx:le&&le.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(ae,Ge,Ie){(function(me,de){(function(){"use strict";var Ee=ae("@babel/runtime/helpers/interopRequireDefault"),we=Ee(ae("@babel/runtime/regenerator")),be=Ee(ae("@babel/runtime/helpers/asyncToGenerator"));ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.split.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.symbol.js"),ae("core-js/modules/es.symbol.description.js"),ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.regexp.to-string.js");var Te=ae("debug")("ali-oss"),ve=ae("xml2js"),xe=ae("agentkeepalive"),fe=ae("merge-descriptors"),z=ae("platform"),ee=ae("utility"),oe=ae("urllib"),ie=ae("./version"),le=ae("bowser"),ue=ae("../common/signUtils"),pe=ae("../common/client/initOptions"),Se=ae("../common/utils/createRequest"),Le=Se.createRequest,De=ae("../common/utils/encoder"),Fe=De.encoder,Ae=ae("../common/client/getReqUrl"),Oe=Ae.getReqUrl,ze=ae("../common/utils/setSTSToken"),He=ze.setSTSToken,Ye=ae("../common/utils/retry"),We=Ye.retry,Ue=ae("../common/utils/isFunction"),st=Ue.isFunction,dt=new xe;function gt(){var wt=z.name,ht=z.version;wt&&wt.toLowerCase&&wt.toLowerCase()==="ie"&&ht.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Et(){return location&&location.protocol==="https:"}function Ke(wt,ht){if(gt(),!(this instanceof Ke))return new Ke(wt,ht);wt&&wt.inited?this.options=wt:this.options=Ke.initOptions(wt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=oe,this.agent=this.options.agent||dt),this.ctx=ht,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}Ge.exports=Ke,Ke.initOptions=function(ht){ht.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var pt=Object.assign({secure:Et(),useFetch:!1},ht);return pe(pt)};var et=Ke.prototype;et.debug=Te,fe(et,ae("./object")),fe(et,ae("./bucket")),fe(et,ae("../common/bucket/getBucketWebsite")),fe(et,ae("../common/bucket/putBucketWebsite")),fe(et,ae("../common/bucket/deleteBucketWebsite")),fe(et,ae("../common/bucket/getBucketLifecycle")),fe(et,ae("../common/bucket/putBucketLifecycle")),fe(et,ae("../common/bucket/deleteBucketLifecycle")),fe(et,ae("../common/bucket/putBucketVersioning")),fe(et,ae("../common/bucket/getBucketVersioning")),fe(et,ae("../common/bucket/getBucketInventory")),fe(et,ae("../common/bucket/deleteBucketInventory")),fe(et,ae("../common/bucket/listBucketInventory")),fe(et,ae("../common/bucket/putBucketInventory")),fe(et,ae("../common/bucket/abortBucketWorm")),fe(et,ae("../common/bucket/completeBucketWorm")),fe(et,ae("../common/bucket/extendBucketWorm")),fe(et,ae("../common/bucket/getBucketWorm")),fe(et,ae("../common/bucket/initiateBucketWorm")),fe(et,ae("./managed-upload")),fe(et,ae("../common/multipart-copy")),fe(et,ae("../common/multipart")),fe(et,ae("../common/parallel")),et.signature=function(ht){return this.debug("authorization stringToSign: %s",ht,"info"),ue.computeSignature(this.options.accessKeySecret,ht,this.options.headerEncoding)},et._getReqUrl=Oe,et.authorization=function(ht,pt,ct,Ct){var xt=ue.buildCanonicalString(ht.toUpperCase(),pt,{headers:Ct,parameters:ct});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,xt,this.options.headerEncoding)},et.request=function(){var wt=(0,be.default)(we.default.mark(function ht(pt){var ct=this;return we.default.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:if(!this.options.retryMax){xt.next=6;break}return xt.next=3,We($e.bind(this),this.options.retryMax,{errorHandler:function(Tt){var St=function(Qe){if(pt.stream)return!1;var Ce=[-1,-2].includes(Qe.status),Ne=ct.options.requestErrorRetryHandle||function(){return!0};return Ce&&Ne(Qe)};return!!St(Tt)}})(pt);case 3:return xt.abrupt("return",xt.sent);case 6:return xt.abrupt("return",$e.call(this,pt));case 7:case"end":return xt.stop()}},ht,this)}));return function(ht){return wt.apply(this,arguments)}}();function $e(wt){return vt.apply(this,arguments)}function vt(){return vt=(0,be.default)(we.default.mark(function wt(ht){var pt,ct,Ct,xt,yt,Tt;return we.default.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(!(this.options.stsToken&&st(this.options.refreshSTSToken))){nt.next=3;break}return nt.next=3,He.call(this);case 3:return pt=Le.call(this,ht),this.options.useFetch||(pt.params.mode="disable-fetch"),xt=!!ht.stream,nt.prev=6,nt.next=9,this.urllib.request(pt.url,pt.params);case 9:ct=nt.sent,this.debug("response %s %s, got %s, headers: %j",ht.method,pt.url,ct.status,ct.headers,"info"),nt.next=16;break;case 13:nt.prev=13,nt.t0=nt.catch(6),Ct=nt.t0;case 16:if(!(ct&&ht.successStatuses&&ht.successStatuses.indexOf(ct.status)===-1)){nt.next=28;break}return nt.next=19,this.requestError(ct);case 19:if(yt=nt.sent,!(yt.code==="RequestTimeTooSkewed"&&!xt)){nt.next=25;break}return this.options.amendTimeSkewed=+new Date(yt.serverTime)-new Date,nt.next=24,this.request(ht);case 24:return nt.abrupt("return",nt.sent);case 25:yt.params=ht,nt.next=32;break;case 28:if(!Ct){nt.next=32;break}return nt.next=31,this.requestError(Ct);case 31:yt=nt.sent;case 32:if(!yt){nt.next=34;break}throw yt;case 34:if(!ht.xmlResponse){nt.next=39;break}return nt.next=37,this.parseXML(ct.data);case 37:Tt=nt.sent,ct.data=Tt;case 39:return nt.abrupt("return",ct);case 40:case"end":return nt.stop()}},wt,this,[[6,13]])})),vt.apply(this,arguments)}et._getResource=function(ht){var pt="/";return ht.bucket&&(pt+="".concat(ht.bucket,"/")),ht.object&&(pt+=Fe(ht.object,this.options.headerEncoding)),pt},et._escape=function(ht){return ee.encodeURIComponent(ht).replace(/%2F/g,"/")},et._getUserAgent=function(){var ht=de&&de.browser?"js":"nodejs",pt="aliyun-sdk-".concat(ht,"/").concat(ie.version),ct=z.description;return!ct&&de&&(ct="Node.js ".concat(de.version.slice(1)," on ").concat(de.platform," ").concat(de.arch)),this._checkUserAgent("".concat(pt," ").concat(ct))},et._checkUserAgent=function(ht){var pt=ht.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return pt},et.checkBrowserAndVersion=function(ht,pt){return le.name===ht&&le.version.split(".")[0]===pt},et.parseXML=function(ht){return new Promise(function(pt,ct){me.isBuffer(ht)&&(ht=ht.toString()),ve.parseString(ht,{explicitRoot:!1,explicitArray:!1},function(Ct,xt){Ct?ct(Ct):pt(xt)})})},et.requestError=function(){var wt=(0,be.default)(we.default.mark(function pt(ct){var Ct,xt,yt,Tt;return we.default.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(Ct=null,!(!ct.data||!ct.data.length)){nt.next=5;break}ct.status===-1||ct.status===-2?(Ct=new Error(ct.message),Ct.name=ct.name,Ct.status=ct.status,Ct.code=ct.name):(ct.status===404?(Ct=new Error("Object not exists"),Ct.name="NoSuchKeyError",Ct.status=404,Ct.code="NoSuchKey"):ct.status===412?(Ct=new Error("Pre condition failed"),Ct.name="PreconditionFailedError",Ct.status=412,Ct.code="PreconditionFailed"):(Ct=new Error("Unknow error, status: ".concat(ct.status)),Ct.name="UnknownError",Ct.status=ct.status),Ct.requestId=ct.headers["x-oss-request-id"],Ct.host=""),nt.next=32;break;case 5:return xt=String(ct.data),this.debug("request response error data: %s",xt,"error"),nt.prev=7,nt.next=10,this.parseXML(xt);case 10:if(nt.t0=nt.sent,nt.t0){nt.next=13;break}nt.t0={};case 13:yt=nt.t0,nt.next=23;break;case 16:return nt.prev=16,nt.t1=nt.catch(7),this.debug(xt,"error"),nt.t1.message+=`
raw xml: `.concat(xt),nt.t1.status=ct.status,nt.t1.requestId=ct.headers["x-oss-request-id"],nt.abrupt("return",nt.t1);case 23:Tt=yt.Message||"unknow request error, status: ".concat(ct.status),yt.Condition&&(Tt+=" (condition: ".concat(yt.Condition,")")),Ct=new Error(Tt),Ct.name=yt.Code?"".concat(yt.Code,"Error"):"UnknownError",Ct.status=ct.status,Ct.code=yt.Code,Ct.requestId=yt.RequestId,Ct.hostId=yt.HostId,Ct.serverTime=yt.ServerTime;case 32:return this.debug("generate error %j",Ct,"error"),nt.abrupt("return",Ct);case 34:case"end":return nt.stop()}},pt,this,[[7,16]])}));function ht(pt){return wt.apply(this,arguments)}return ht}()}).call(this)}).call(this,{isBuffer:ae("../../node_modules/is-buffer/index.js")},ae("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=ae("@babel/runtime/helpers/interopRequireDefault"),Ee=de(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.array.from.js"),ae("core-js/modules/es.string.iterator.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.array.filter.js"),ae("core-js/modules/es.array.find.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.array.iterator.js"),ae("core-js/modules/es.array-buffer.slice.js"),ae("core-js/modules/es.typed-array.uint8-array.js"),ae("core-js/modules/es.typed-array.copy-within.js"),ae("core-js/modules/es.typed-array.every.js"),ae("core-js/modules/es.typed-array.fill.js"),ae("core-js/modules/es.typed-array.filter.js"),ae("core-js/modules/es.typed-array.find.js"),ae("core-js/modules/es.typed-array.find-index.js"),ae("core-js/modules/es.typed-array.for-each.js"),ae("core-js/modules/es.typed-array.includes.js"),ae("core-js/modules/es.typed-array.index-of.js"),ae("core-js/modules/es.typed-array.iterator.js"),ae("core-js/modules/es.typed-array.join.js"),ae("core-js/modules/es.typed-array.last-index-of.js"),ae("core-js/modules/es.typed-array.map.js"),ae("core-js/modules/es.typed-array.reduce.js"),ae("core-js/modules/es.typed-array.reduce-right.js"),ae("core-js/modules/es.typed-array.reverse.js"),ae("core-js/modules/es.typed-array.set.js"),ae("core-js/modules/es.typed-array.slice.js"),ae("core-js/modules/es.typed-array.some.js"),ae("core-js/modules/es.typed-array.sort.js"),ae("core-js/modules/es.typed-array.subarray.js"),ae("core-js/modules/es.typed-array.to-locale-string.js"),ae("core-js/modules/es.typed-array.to-string.js");var we=de(ae("@babel/runtime/helpers/asyncToGenerator")),be=ae("util"),Te=ae("path"),ve=ae("mime"),xe=ae("copy-to"),fe=ae("../common/utils/isBlob"),z=fe.isBlob,ee=ae("../common/utils/isFile"),oe=ee.isFile,ie=ae("../common/utils/isBuffer"),le=ie.isBuffer,ue=Ie;ue.multipartUpload=function(){var Fe=(0,we.default)(Ee.default.mark(function Oe(ze,He){var Ye,We,Ue,st,dt,gt,Et,Ke,et,$e=arguments;return Ee.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(Ye=$e.length>2&&$e[2]!==void 0?$e[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){wt.next=8;break}return He&&oe(He)&&(Ye.checkpoint.file=He),wt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return wt.abrupt("return",wt.sent);case 8:return We=102400,Ye.mime||(oe(He)?Ye.mime=ve.getType(Te.extname(He.name)):z(He)?Ye.mime=He.type:le(He)?Ye.mime="":Ye.mime=ve.getType(Te.extname(He))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),wt.next=14,this._getFileSize(He);case 14:if(Ue=wt.sent,!(Ue<We)){wt.next=26;break}return Ye.contentLength=Ue,wt.next=19,this.put(ze,He,Ye);case 19:if(st=wt.sent,!(Ye&&Ye.progress)){wt.next=23;break}return wt.next=23,Ye.progress(1);case 23:return dt={res:st.res,bucket:this.options.bucket,name:ze,etag:st.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(dt.data=st.data),wt.abrupt("return",dt);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){wt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<We)){wt.next=30;break}throw new Error("partSize must not be smaller than ".concat(We));case 30:return wt.next=32,this.initMultipartUpload(ze,Ye);case 32:if(gt=wt.sent,Et=gt.uploadId,Ke=this._getPartSize(Ue,Ye.partSize),et={file:He,name:ze,fileSize:Ue,partSize:Ke,uploadId:Et,doneParts:[]},!(Ye&&Ye.progress)){wt.next=39;break}return wt.next=39,Ye.progress(0,et,gt.res);case 39:return wt.next=41,this._resumeMultipart(et,Ye);case 41:return wt.abrupt("return",wt.sent);case 42:case"end":return wt.stop()}},Oe,this)}));function Ae(Oe,ze){return Fe.apply(this,arguments)}return Ae}(),ue._resumeMultipart=function(){var Fe=(0,we.default)(Ee.default.mark(function Oe(ze,He){var Ye,We,Ue,st,dt,gt,Et,Ke,et,$e,vt,wt,ht,pt,ct,Ct,xt,yt,Tt;return Ee.default.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(Ye=this,!this.isCancel()){nt.next=3;break}throw this._makeCancelEvent();case 3:return We=ze.file,Ue=ze.fileSize,st=ze.partSize,dt=ze.uploadId,gt=ze.doneParts,Et=ze.name,Ke=[],gt.length>0&&xe(gt).to(Ke),et=this._divideParts(Ue,st),$e=et.length,vt=!1,wt=function(Ce,Ne){return new Promise(function(){var Je=(0,we.default)(Ee.default.mark(function rt(Be,_e){var Xe,lt,Pt,kt,zt;return Ee.default.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(Ht.prev=0,Ce.isCancel()){Ht.next=29;break}return Xe=et[Ne-1],Ht.next=5,Ce._createBuffer(We,Xe.start,Xe.end);case 5:return lt=Ht.sent,Pt={content:lt,size:Xe.end-Xe.start},Ht.prev=7,Ht.next=10,Ce._uploadPart(Et,dt,Ne,Pt,He);case 10:kt=Ht.sent,Ht.next=18;break;case 13:if(Ht.prev=13,Ht.t0=Ht.catch(7),Ht.t0.status!==404){Ht.next=17;break}throw Ce._makeAbortEvent();case 17:throw Ht.t0;case 18:if(!(!Ce.isCancel()&&!vt)){Ht.next=26;break}if(ze.doneParts.push({number:Ne,etag:kt.res.headers.etag}),!He.progress){Ht.next=23;break}return Ht.next=23,He.progress(gt.length/($e+1),ze,kt.res);case 23:Be({number:Ne,etag:kt.res.headers.etag}),Ht.next=27;break;case 26:Be();case 27:Ht.next=30;break;case 29:Be();case 30:Ht.next=41;break;case 32:Ht.prev=32,Ht.t1=Ht.catch(0),zt=new Error,zt.name=Ht.t1.name,zt.message=Ht.t1.message,zt.stack=Ht.t1.stack,zt.partNum=Ne,xe(Ht.t1).to(zt),_e(zt);case 41:case"end":return Ht.stop()}},rt,null,[[0,32],[7,13]])}));return function(rt,Be){return Je.apply(this,arguments)}}())},ht=Array.from(new Array($e),function(Qe,Ce){return Ce+1}),pt=Ke.map(function(Qe){return Qe.number}),ct=ht.filter(function(Qe){return pt.indexOf(Qe)<0}),Ct=5,xt=He.parallel||Ct,nt.next=17,this._parallel(ct,xt,function(Qe){return new Promise(function(Ce,Ne){wt(Ye,Qe).then(function(Je){Je&&Ke.push(Je),Ce()}).catch(function(Je){Ne(Je)})})});case 17:if(yt=nt.sent,vt=!0,Tt=yt.find(function(Qe){return Qe.name==="abort"}),!Tt){nt.next=22;break}throw Tt;case 22:if(!this.isCancel()){nt.next=25;break}throw wt=null,this._makeCancelEvent();case 25:if(!(yt&&yt.length>0)){nt.next=28;break}throw yt[0].message="Failed to upload some parts with error: ".concat(yt[0].toString()," part_num: ").concat(yt[0].partNum),yt[0];case 28:return nt.next=30,this.completeMultipartUpload(Et,dt,Ke,He);case 30:return nt.abrupt("return",nt.sent);case 31:case"end":return nt.stop()}},Oe,this)}));function Ae(Oe,ze){return Fe.apply(this,arguments)}return Ae}(),ue._getFileSize=function(){var Fe=(0,we.default)(Ee.default.mark(function Oe(ze){return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(ze)){Ye.next=4;break}return Ye.abrupt("return",ze.length);case 4:if(!(z(ze)||oe(ze))){Ye.next=6;break}return Ye.abrupt("return",ze.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Ye.stop()}},Oe)}));function Ae(Oe){return Fe.apply(this,arguments)}return Ae}();var pe=ae("stream"),Se=pe.Readable;function Le(Fe,Ae){if(!(this instanceof Le))return new Le(Fe,Ae);Se.call(this,Ae),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}be.inherits(Le,Se),Le.prototype.readFileAndPush=function(Ae){if(this.fileBuffer)for(var Oe=!0;Oe&&this.fileBuffer&&this.start<this.fileBuffer.length;){var ze=this.start,He=ze+Ae;He=He>this.fileBuffer.length?this.fileBuffer.length:He,this.start=He,Oe=this.push(this.fileBuffer.slice(ze,He))}},Le.prototype._read=function(Ae){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var Oe=16*1024;Ae=Ae||Oe;var ze=this;this.reader.onload=function(Ye){ze.fileBuffer=me.from(new Uint8Array(Ye.target.result)),ze.file=null,ze.readFileAndPush(Ae)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Ae)};function De(Fe){return Fe.arrayBuffer?Fe.arrayBuffer():new Promise(function(Ae,Oe){var ze=new FileReader;ze.onload=function(He){Ae(He.target.result)},ze.onerror=function(He){Oe(He)},ze.readAsArrayBuffer(Fe)})}ue._createBuffer=function(){var Fe=(0,we.default)(Ee.default.mark(function Oe(ze,He,Ye){var We,Ue;return Ee.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(!(z(ze)||oe(ze))){dt.next=8;break}return We=ze.slice(He,Ye),dt.next=4,De(We);case 4:return Ue=dt.sent,dt.abrupt("return",me.from(Ue));case 8:if(!le(ze)){dt.next=12;break}return dt.abrupt("return",ze.subarray(He,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return dt.stop()}},Oe)}));function Ae(Oe,ze,He){return Fe.apply(this,arguments)}return Ae}(),ue._getPartSize=function(Ae,Oe){var ze=1e4,He=1*1024*1024;Oe||(Oe=He);var Ye=Math.ceil(Ae/ze);return Oe<Ye&&(Oe=Ye,console.warn("partSize has been set to ".concat(Oe,", because the partSize you provided causes partNumber to be greater than 10,000"))),Oe},ue._divideParts=function(Ae,Oe){for(var ze=Math.ceil(Ae/Oe),He=[],Ye=0;Ye<ze;Ye++){var We=Oe*Ye,Ue=Math.min(We+Oe,Ae);He.push({start:We,end:Ue})}return He}}).call(this)}).call(this,ae("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault");ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.number.constructor.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.promise.js");var de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("fs"),be=ae("copy-to"),Te=ae("path"),ve=ae("mime"),xe=ae("../common/callback"),fe=ae("merge-descriptors"),z=ae("../common/utils/isBlob"),ee=z.isBlob,oe=ae("../common/utils/isFile"),ie=oe.isFile,le=ae("../common/utils/isBuffer"),ue=le.isBuffer,pe=ae("../common/utils/obj2xml"),Se=pe.obj2xml,Le=Ie;Le.append=function(){var De=(0,Ee.default)(de.default.mark(function Ae(Oe,ze,He){var Ye;return de.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return He=He||{},He.position===void 0&&(He.position="0"),He.subres={append:"",position:He.position},He.method="POST",Ue.next=6,this.put(Oe,ze,He);case 6:return Ye=Ue.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Ue.abrupt("return",Ye);case 9:case"end":return Ue.stop()}},Ae,this)}));function Fe(Ae,Oe,ze){return De.apply(this,arguments)}return Fe}(),Le.put=function(){var De=(0,Ee.default)(de.default.mark(function Ae(Oe,ze,He){var Ye,We,Ue,st,dt;return de.default.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(He=He||{},He.disabledMD5=He.disabledMD5===void 0?!0:!!He.disabledMD5,He.headers=He.headers||{},Oe=this._objectName(Oe),!ue(ze)){Et.next=8;break}Ye=ze,Et.next=19;break;case 8:if(!(ee(ze)||ie(ze))){Et.next=18;break}return He.mime||(ie(ze)?He.mime=ve.getType(Te.extname(ze.name)):He.mime=ze.type),Et.next=12,this._createBuffer(ze,0,ze.size);case 12:return Ye=Et.sent,Et.next=15,this._getFileSize(ze);case 15:He.contentLength=Et.sent,Et.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(He.meta,He.headers),We=He.method||"PUT",Ue=this._objectRequestParams(We,Oe,He),xe.encodeCallback(Ue,He),Ue.mime=He.mime,Ue.disabledMD5=He.disabledMD5,Ue.content=Ye,Ue.successStatuses=[200],Et.next=29,this.request(Ue);case 29:return st=Et.sent,dt={name:Oe,url:this._objectUrl(Oe),res:st.res},Ue.headers&&Ue.headers["x-oss-callback"]&&(dt.data=JSON.parse(st.data.toString())),Et.abrupt("return",dt);case 33:case"end":return Et.stop()}},Ae,this)}));function Fe(Ae,Oe,ze){return De.apply(this,arguments)}return Fe}(),Le.putStream=function(){var De=(0,Ee.default)(de.default.mark(function Ae(Oe,ze,He){var Ye,We,Ue,st;return de.default.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return He=He||{},He.headers=He.headers||{},Oe=this._objectName(Oe),He.contentLength?He.headers["Content-Length"]=He.contentLength:He.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(He.meta,He.headers),Ye=He.method||"PUT",We=this._objectRequestParams(Ye,Oe,He),xe.encodeCallback(We,He),We.mime=He.mime,We.stream=ze,We.successStatuses=[200],gt.next=13,this.request(We);case 13:return Ue=gt.sent,st={name:Oe,url:this._objectUrl(Oe),res:Ue.res},We.headers&&We.headers["x-oss-callback"]&&(st.data=JSON.parse(Ue.data.toString())),gt.abrupt("return",st);case 17:case"end":return gt.stop()}},Ae,this)}));function Fe(Ae,Oe,ze){return De.apply(this,arguments)}return Fe}(),fe(Le,ae("../common/object/copyObject")),fe(Le,ae("../common/object/getObjectTagging")),fe(Le,ae("../common/object/putObjectTagging")),fe(Le,ae("../common/object/deleteObjectTagging")),fe(Le,ae("../common/image")),fe(Le,ae("../common/object/getBucketVersions")),fe(Le,ae("../common/object/getACL")),fe(Le,ae("../common/object/putACL")),fe(Le,ae("../common/object/head")),fe(Le,ae("../common/object/delete")),fe(Le,ae("../common/object/get")),fe(Le,ae("../common/object/putSymlink")),fe(Le,ae("../common/object/getSymlink")),fe(Le,ae("../common/object/deleteMulti")),fe(Le,ae("../common/object/getObjectMeta")),fe(Le,ae("../common/object/getObjectUrl")),fe(Le,ae("../common/object/generateObjectUrl")),fe(Le,ae("../common/object/signatureUrl")),fe(Le,ae("../common/object/asyncSignatureUrl")),Le.putMeta=function(){var De=(0,Ee.default)(de.default.mark(function Ae(Oe,ze,He){var Ye;return de.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ue.next=2,this.copy(Oe,Oe,{meta:ze||{},timeout:He&&He.timeout,ctx:He&&He.ctx});case 2:return Ye=Ue.sent,Ue.abrupt("return",Ye);case 4:case"end":return Ue.stop()}},Ae,this)}));function Fe(Ae,Oe,ze){return De.apply(this,arguments)}return Fe}(),Le.list=function(){var De=(0,Ee.default)(de.default.mark(function Ae(Oe,ze){var He,Ye,We,Ue,st;return de.default.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return He=this._objectRequestParams("GET","",ze),He.query=Oe,He.xmlResponse=!0,He.successStatuses=[200],gt.next=6,this.request(He);case 6:return Ye=gt.sent,We=Ye.data.Contents||[],Ue=this,We&&(Array.isArray(We)||(We=[We]),We=We.map(function(Et){return{name:Et.Key,url:Ue._objectUrl(Et.Key),lastModified:Et.LastModified,etag:Et.ETag,type:Et.Type,size:Number(Et.Size),storageClass:Et.StorageClass,owner:{id:Et.Owner.ID,displayName:Et.Owner.DisplayName}}})),st=Ye.data.CommonPrefixes||null,st&&(Array.isArray(st)||(st=[st]),st=st.map(function(Et){return Et.Prefix})),gt.abrupt("return",{res:Ye.res,objects:We,prefixes:st,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return gt.stop()}},Ae,this)}));function Fe(Ae,Oe){return De.apply(this,arguments)}return Fe}(),Le.listV2=function(){var De=(0,Ee.default)(de.default.mark(function Ae(Oe){var ze,He,Ye,We,Ue,st,dt,gt=arguments;return de.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return ze=gt.length>1&&gt[1]!==void 0?gt[1]:{},He=Oe["continuation-token"]||Oe.continuationToken,He&&(ze.subres=Object.assign({"continuation-token":He},ze.subres)),Ye=this._objectRequestParams("GET","",ze),Ye.query=Object.assign({"list-type":2},Oe),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],Ke.next=11,this.request(Ye);case 11:return We=Ke.sent,Ue=We.data.Contents||[],st=this,Ue&&(Array.isArray(Ue)||(Ue=[Ue]),Ue=Ue.map(function(et){var $e=null;return et.Owner&&($e={id:et.Owner.ID,displayName:et.Owner.DisplayName}),{name:et.Key,url:st._objectUrl(et.Key),lastModified:et.LastModified,etag:et.ETag,type:et.Type,size:Number(et.Size),storageClass:et.StorageClass,owner:$e}})),dt=We.data.CommonPrefixes||null,dt&&(Array.isArray(dt)||(dt=[dt]),dt=dt.map(function(et){return et.Prefix})),Ke.abrupt("return",{res:We.res,objects:Ue,prefixes:dt,isTruncated:We.data.IsTruncated==="true",keyCount:+We.data.KeyCount,continuationToken:We.data.ContinuationToken||null,nextContinuationToken:We.data.NextContinuationToken||null});case 18:case"end":return Ke.stop()}},Ae,this)}));function Fe(Ae){return De.apply(this,arguments)}return Fe}(),Le.restore=function(){var De=(0,Ee.default)(de.default.mark(function Ae(Oe){var ze,He,Ye,We,Ue=arguments;return de.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return ze=Ue.length>1&&Ue[1]!==void 0?Ue[1]:{type:"Archive"},ze=ze||{},ze.subres=Object.assign({restore:""},ze.subres),ze.versionId&&(ze.subres.versionId=ze.versionId),He=this._objectRequestParams("POST",Oe,ze),ze.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:ze.Days?ze.Days:2,JobParameters:{Tier:ze.JobParameters?ze.JobParameters:"Standard"}}},He.content=Se(Ye,{headers:!0}),He.mime="xml"),He.successStatuses=[202],dt.next=9,this.request(He);case 9:return We=dt.sent,dt.abrupt("return",{res:We.res});case 11:case"end":return dt.stop()}},Ae,this)}));function Fe(Ae){return De.apply(this,arguments)}return Fe}(),Le._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},Le._objectRequestParams=function(Fe,Ae,Oe){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Oe=Oe||{},Ae=this._objectName(Ae);var ze={object:Ae,bucket:this.options.bucket,method:Fe,subres:Oe&&Oe.subres,timeout:Oe&&Oe.timeout,ctx:Oe&&Oe.ctx};return Oe.headers&&(ze.headers={},be(Oe.headers).to(ze.headers)),ze},Le._objectName=function(Fe){return Fe.replace(/^\/+/,"")},Le._convertMetaToHeaders=function(Fe,Ae){Fe&&Object.keys(Fe).forEach(function(Oe){Ae["x-oss-meta-".concat(Oe)]=Fe[Oe]})},Le._deleteFileSafe=function(Fe){var Ae=this;return new Promise(function(Oe){we.exists(Fe,function(ze){ze?we.unlink(Fe,function(He){He&&Ae.debug("unlink %j error: %s",Fe,He,"error"),Oe()}):Oe()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(ae,Ge,Ie){"use strict";Ie.version="6.18.1"},{}],7:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.abortBucketWorm=void 0;var we=ae("../utils/checkBucketName");function be(ve,xe){return Te.apply(this,arguments)}function Te(){return Te=(0,Ee.default)(de.default.mark(function ve(xe,fe){var z,ee;return de.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return we.checkBucketName(xe),z=this._bucketRequestParams("DELETE",xe,"worm",fe),ie.next=4,this.request(z);case 4:return ee=ie.sent,ie.abrupt("return",{res:ee.res,status:ee.status});case 6:case"end":return ie.stop()}},ve,this)})),Te.apply(this,arguments)}Ie.abortBucketWorm=be},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.completeBucketWorm=void 0;var we=ae("../utils/checkBucketName");function be(ve,xe,fe){return Te.apply(this,arguments)}function Te(){return Te=(0,Ee.default)(de.default.mark(function ve(xe,fe,z){var ee,oe;return de.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return we.checkBucketName(xe),ee=this._bucketRequestParams("POST",xe,{wormId:fe},z),le.next=4,this.request(ee);case 4:return oe=le.sent,le.abrupt("return",{res:oe.res,status:oe.status});case 6:case"end":return le.stop()}},ve,this)})),Te.apply(this,arguments)}Ie.completeBucketWorm=be},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.deleteBucketInventory=void 0;var we=ae("../utils/checkBucketName");function be(ve,xe){return Te.apply(this,arguments)}function Te(){return Te=(0,Ee.default)(de.default.mark(function ve(xe,fe){var z,ee,oe,ie,le=arguments;return de.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return z=le.length>2&&le[2]!==void 0?le[2]:{},ee=Object.assign({inventory:"",inventoryId:fe},z.subres),we.checkBucketName(xe),oe=this._bucketRequestParams("DELETE",xe,ee,z),oe.successStatuses=[204],pe.next=7,this.request(oe);case 7:return ie=pe.sent,pe.abrupt("return",{status:ie.status,res:ie.res});case 9:case"end":return pe.stop()}},ve,this)})),Te.apply(this,arguments)}Ie.deleteBucketInventory=be},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=Ie;Te.deleteBucketLifecycle=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z,ee){var oe,ie;return de.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return be(z),oe=this._bucketRequestParams("DELETE",z,"lifecycle",ee),oe.successStatuses=[204],ue.next=5,this.request(oe);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},fe,this)}));function xe(fe,z){return ve.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=Ie;Te.deleteBucketWebsite=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z,ee){var oe,ie;return de.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return be(z),oe=this._bucketRequestParams("DELETE",z,"website",ee),oe.successStatuses=[204],ue.next=5,this.request(oe);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},fe,this)}));function xe(fe,z){return ve.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.extendBucketWorm=void 0;var we=ae("../utils/checkBucketName"),be=ae("../utils/obj2xml");function Te(xe,fe,z,ee){return ve.apply(this,arguments)}function ve(){return ve=(0,Ee.default)(de.default.mark(function xe(fe,z,ee,oe){var ie,le,ue;return de.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return we.checkBucketName(fe),ie=this._bucketRequestParams("POST",fe,{wormExtend:"",wormId:z},oe),le={ExtendWormConfiguration:{RetentionPeriodInDays:ee}},ie.mime="xml",ie.content=be.obj2xml(le,{headers:!0}),ie.successStatuses=[200],Se.next=8,this.request(ie);case 8:return ue=Se.sent,Se.abrupt("return",{res:ue.res,status:ue.status});case 10:case"end":return Se.stop()}},xe,this)})),ve.apply(this,arguments)}Ie.extendBucketWorm=Te},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getBucketInventory=void 0;var we=ae("../utils/checkBucketName"),be=ae("../utils/formatInventoryConfig");function Te(xe,fe){return ve.apply(this,arguments)}function ve(){return ve=(0,Ee.default)(de.default.mark(function xe(fe,z){var ee,oe,ie,le,ue=arguments;return de.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return ee=ue.length>2&&ue[2]!==void 0?ue[2]:{},oe=Object.assign({inventory:"",inventoryId:z},ee.subres),we.checkBucketName(fe),ie=this._bucketRequestParams("GET",fe,oe,ee),ie.successStatuses=[200],ie.xmlResponse=!0,Se.next=8,this.request(ie);case 8:return le=Se.sent,Se.abrupt("return",{status:le.status,res:le.res,inventory:be.formatInventoryConfig(le.data)});case 10:case"end":return Se.stop()}},xe,this)})),ve.apply(this,arguments)}Ie.getBucketInventory=Te},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.map.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=ae("../utils/isArray"),ve=Te.isArray,xe=ae("../utils/formatObjKey"),fe=xe.formatObjKey,z=Ie;z.getBucketLifecycle=function(){var ee=(0,Ee.default)(de.default.mark(function ie(le,ue){var pe,Se,Le;return de.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return be(le),pe=this._bucketRequestParams("GET",le,"lifecycle",ue),pe.successStatuses=[200],pe.xmlResponse=!0,Fe.next=6,this.request(pe);case 6:return Se=Fe.sent,Le=Se.data.Rule||null,Le&&(ve(Le)||(Le=[Le]),Le=Le.map(function(Ae){return Ae.ID&&(Ae.id=Ae.ID,delete Ae.ID),Ae.Tag&&!ve(Ae.Tag)&&(Ae.Tag=[Ae.Tag]),fe(Ae,"firstLowerCase")})),Fe.abrupt("return",{rules:Le,res:Se.res});case 10:case"end":return Fe.stop()}},ie,this)}));function oe(ie,le){return ee.apply(this,arguments)}return oe}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=Ie;Te.getBucketVersioning=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z,ee){var oe,ie,le;return de.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return be(z),oe=this._bucketRequestParams("GET",z,"versioning",ee),oe.xmlResponse=!0,oe.successStatuses=[200],pe.next=6,this.request(oe);case 6:return ie=pe.sent,le=ie.data.Status,pe.abrupt("return",{status:ie.status,versionStatus:le,res:ie.res});case 9:case"end":return pe.stop()}},fe,this)}));function xe(fe,z){return ve.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=ae("../utils/isObject"),ve=Te.isObject,xe=Ie;xe.getBucketWebsite=function(){var fe=(0,Ee.default)(de.default.mark(function ee(oe,ie){var le,ue,pe;return de.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return be(oe),le=this._bucketRequestParams("GET",oe,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,Le.next=6,this.request(le);case 6:return ue=Le.sent,pe=[],ue.data.RoutingRules&&ue.data.RoutingRules.RoutingRule&&(ve(ue.data.RoutingRules.RoutingRule)?pe=[ue.data.RoutingRules.RoutingRule]:pe=ue.data.RoutingRules.RoutingRule),Le.abrupt("return",{index:ue.data.IndexDocument&&ue.data.IndexDocument.Suffix||"",supportSubDir:ue.data.IndexDocument&&ue.data.IndexDocument.SupportSubDir||"false",type:ue.data.IndexDocument&&ue.data.IndexDocument.Type,routingRules:pe,error:ue.data.ErrorDocument&&ue.data.ErrorDocument.Key||null,res:ue.res});case 10:case"end":return Le.stop()}},ee,this)}));function z(ee,oe){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getBucketWorm=void 0;var we=ae("../utils/checkBucketName"),be=ae("../utils/dataFix");function Te(xe,fe){return ve.apply(this,arguments)}function ve(){return ve=(0,Ee.default)(de.default.mark(function xe(fe,z){var ee,oe;return de.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return we.checkBucketName(fe),ee=this._bucketRequestParams("GET",fe,"worm",z),ee.successStatuses=[200],ee.xmlResponse=!0,le.next=6,this.request(ee);case 6:return oe=le.sent,be.dataFix(oe.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),le.abrupt("return",Object.assign(Object.assign({},oe.data),{res:oe.res,status:oe.status}));case 9:case"end":return le.stop()}},xe,this)})),ve.apply(this,arguments)}Ie.getBucketWorm=Te},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.initiateBucketWorm=void 0;var we=ae("../utils/obj2xml"),be=ae("../utils/checkBucketName");function Te(xe,fe,z){return ve.apply(this,arguments)}function ve(){return ve=(0,Ee.default)(de.default.mark(function xe(fe,z,ee){var oe,ie,le;return de.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return be.checkBucketName(fe),oe=this._bucketRequestParams("POST",fe,"worm",ee),ie={InitiateWormConfiguration:{RetentionPeriodInDays:z}},oe.mime="xml",oe.content=we.obj2xml(ie,{headers:!0}),oe.successStatuses=[200],pe.next=8,this.request(oe);case 8:return le=pe.sent,pe.abrupt("return",{res:le.res,wormId:le.res.headers["x-oss-worm-id"],status:le.status});case 10:case"end":return pe.stop()}},xe,this)})),ve.apply(this,arguments)}Ie.initiateBucketWorm=Te},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.listBucketInventory=void 0;var we=ae("../utils/checkBucketName"),be=ae("../utils/formatInventoryConfig");function Te(xe){return ve.apply(this,arguments)}function ve(){return ve=(0,Ee.default)(de.default.mark(function xe(fe){var z,ee,oe,ie,le,ue,pe,Se,Le=arguments;return de.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z=Le.length>1&&Le[1]!==void 0?Le[1]:{},ee=z.continuationToken,oe=Object.assign({inventory:""},ee&&{"continuation-token":ee},z.subres),we.checkBucketName(fe),ie=this._bucketRequestParams("GET",fe,oe,z),ie.successStatuses=[200],ie.xmlResponse=!0,Fe.next=9,this.request(ie);case 9:return le=Fe.sent,ue=le.data,pe=le.res,Se=le.status,Fe.abrupt("return",{isTruncated:ue.IsTruncated==="true",nextContinuationToken:ue.NextContinuationToken,inventoryList:be.formatInventoryConfig(ue.InventoryConfiguration,!0),status:Se,res:pe});case 12:case"end":return Fe.stop()}},xe,this)})),ve.apply(this,arguments)}Ie.listBucketInventory=Te},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.concat.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.putBucketInventory=void 0;var we=ae("../utils/checkBucketName"),be=ae("../utils/obj2xml");function Te(xe,fe){return ve.apply(this,arguments)}function ve(){return ve=(0,Ee.default)(de.default.mark(function xe(fe,z){var ee,oe,ie,le,ue,pe,Se,Le,De,Fe,Ae,Oe=arguments;return de.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:return ee=Oe.length>2&&Oe[2]!==void 0?Oe[2]:{},oe=Object.assign({inventory:"",inventoryId:z.id},ee.subres),we.checkBucketName(fe),ie=z.OSSBucketDestination,le=z.optionalFields,ue=z.includedObjectVersions,pe="acs:oss:::",Se="acs:ram::".concat(ie.accountId,":role/"),Le={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:ie.format,AccountId:ie.accountId,RoleArn:"".concat(Se).concat(ie.rolename),Bucket:"".concat(pe).concat(ie.bucket),Prefix:ie.prefix||"",Encryption:ie.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ue,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},De=be.obj2xml(Le,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",fe,oe,ee),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=De,He.next=14,this.request(Fe);case 14:return Ae=He.sent,He.abrupt("return",{status:Ae.status,res:Ae.res});case 16:case"end":return He.stop()}},xe,this)})),ve.apply(this,arguments)}Ie.putBucketInventory=Te},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.array.includes.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=ae("../utils/isArray"),ve=Te.isArray,xe=ae("../utils/deepCopy"),fe=xe.deepCopy,z=ae("../utils/isObject"),ee=z.isObject,oe=ae("../utils/obj2xml"),ie=oe.obj2xml,le=ae("../utils/checkObjectTag"),ue=le.checkObjectTag,pe=ae("../utils/getStrBytesCount"),Se=pe.getStrBytesCount,Le=Ie;Le.putBucketLifecycle=function(){var ze=(0,Ee.default)(de.default.mark(function Ye(We,Ue,st){var dt,gt,Et,Ke,et;return de.default.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(be(We),ve(Ue)){vt.next=3;break}throw new Error("rules must be Array");case 3:return dt=this._bucketRequestParams("PUT",We,"lifecycle",st),gt=[],Et={LifecycleConfiguration:{Rule:gt}},Ue.forEach(function(wt){De(wt),Oe(wt),wt.id&&(wt.ID=wt.id,delete wt.id),gt.push(wt)}),Ke=ie(Et,{headers:!0,firstUpperCase:!0}),dt.content=Ke,dt.mime="xml",dt.successStatuses=[200],vt.next=13,this.request(dt);case 13:return et=vt.sent,vt.abrupt("return",{res:et.res});case 15:case"end":return vt.stop()}},Ye,this)}));function He(Ye,We,Ue){return ze.apply(this,arguments)}return He}();function De(ze){ze.days&&(ze.expiration={days:ze.days}),ze.date&&(ze.expiration={createdBeforeDate:ze.date})}function Fe(ze,He){var Ye=ze.days,We=ze.createdBeforeDate;if(!Ye&&!We)throw new Error("".concat(He," must includes days or createdBeforeDate"));if(Ye&&!/^[1-9][0-9]*$/.test(Ye))throw new Error("days must be a positive integer");if(We&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(We))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function Ae(ze){if(!ve(ze)&&!ee(ze))throw new Error("tag must be Object or Array");ze=ee(ze)?[ze]:ze;var He={},Ye=fe(ze);Ye.forEach(function(We){He[We.key]=We.value}),ue(He)}function Oe(ze){if(ze.id&&Se(ze.id)>255)throw new Error("ID is composed of 255 bytes at most");if(ze.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(ze.status))throw new Error("Status must be Enabled or Disabled");if(ze.transition){if(!["IA","Archive"].includes(ze.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(ze.transition,"Transition")}if(ze.expiration){if(!ze.expiration.expiredObjectDeleteMarker)Fe(ze.expiration,"Expiration");else if(ze.expiration.days||ze.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(ze.abortMultipartUpload&&Fe(ze.abortMultipartUpload,"AbortMultipartUpload"),!ze.expiration&&!ze.abortMultipartUpload&&!ze.transition&&!ze.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(ze.tag){if(ze.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Ae(ze.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.includes.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=ae("../utils/obj2xml"),ve=Te.obj2xml,xe=Ie;xe.putBucketVersioning=function(){var fe=(0,Ee.default)(de.default.mark(function ee(oe,ie){var le,ue,pe,Se,Le=arguments;return de.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=Le.length>2&&Le[2]!==void 0?Le[2]:{},be(oe),["Enabled","Suspended"].includes(ie)){Fe.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ue=this._bucketRequestParams("PUT",oe,"versioning",le),pe={VersioningConfiguration:{Status:ie}},ue.mime="xml",ue.content=ve(pe,{headers:!0}),Fe.next=10,this.request(ue);case 10:return Se=Fe.sent,Fe.abrupt("return",{res:Se.res,status:Se.status});case 12:case"end":return Fe.stop()}},ee,this)}));function z(ee,oe){return fe.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=ae("../utils/obj2xml"),ve=Te.obj2xml,xe=ae("../utils/isArray"),fe=xe.isArray,z=Ie;z.putBucketWebsite=function(){var ee=(0,Ee.default)(de.default.mark(function ie(le){var ue,pe,Se,Le,De,Fe,Ae,Oe=arguments;return de.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:if(ue=Oe.length>1&&Oe[1]!==void 0?Oe[1]:{},pe=Oe.length>2?Oe[2]:void 0,be(le),Se=this._bucketRequestParams("PUT",le,"website",pe),Le={Suffix:ue.index||"index.html"},De={IndexDocument:Le},Fe={WebsiteConfiguration:De},ue.supportSubDir&&(Le.SupportSubDir=ue.supportSubDir),ue.type&&(Le.Type=ue.type),ue.error&&(De.ErrorDocument={Key:ue.error}),ue.routingRules===void 0){He.next=14;break}if(fe(ue.routingRules)){He.next=13;break}throw new Error("RoutingRules must be Array");case 13:De.RoutingRules={RoutingRule:ue.routingRules};case 14:return Fe=ve(Fe),Se.content=Fe,Se.mime="xml",Se.successStatuses=[200],He.next=20,this.request(Se);case 20:return Ae=He.sent,He.abrupt("return",{res:Ae.res});case 22:case"end":return He.stop()}},ie,this)}));function oe(ie){return ee.apply(this,arguments)}return oe}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(ae,Ge,Ie){(function(me){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),Ie.encodeCallback=function(Ee,we){if(Ee.headers=Ee.headers||{},!Object.prototype.hasOwnProperty.call(Ee.headers,"x-oss-callback")&&we.callback){var be={callbackUrl:encodeURI(we.callback.url),callbackBody:we.callback.body};we.callback.host&&(be.callbackHost=we.callback.host),we.callback.contentType&&(be.callbackBodyType=we.callback.contentType);var Te=me.from(JSON.stringify(be)).toString("base64");if(Ee.headers["x-oss-callback"]=Te,we.callback.customValue){var ve={};Object.keys(we.callback.customValue).forEach(function(xe){ve["x:".concat(xe)]=we.callback.customValue[xe].toString()}),Ee.headers["x-oss-callback-var"]=me.from(JSON.stringify(ve)).toString("base64")}}}}).call(this)}).call(this,ae("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js");var me=function(fe){return fe&&fe.__esModule?fe:{default:fe}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getReqUrl=void 0;var de=me(ae("copy-to")),Ee=me(ae("url")),we=me(ae("merge-descriptors")),be=me(ae("is-type-of")),Te=ae("../utils/isIP"),ve=ae("../utils/checkConfigValid");function xe(fe){var z={},ee=this.options.cname;ve.checkConfigValid(this.options.endpoint,"endpoint"),de.default(this.options.endpoint,!1).to(z),fe.bucket&&!ee&&!Te.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(fe.bucket,".").concat(z.host));var oe="/";fe.bucket&&this.options.sldEnable&&(oe+="".concat(fe.bucket,"/")),fe.object&&(oe+=this._escape(fe.object).replace(/\+/g,"%2B")),z.pathname=oe;var ie={};if(fe.query&&we.default(ie,fe.query),fe.subres){var le={};be.default.string(fe.subres)?le[fe.subres]="":be.default.array(fe.subres)?fe.subres.forEach(function(ue){le[ue]=""}):le=fe.subres,we.default(ie,le)}return z.query=ie,Ee.default.format(z)}Ie.getReqUrl=xe},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.string.trim.js");var me=ae("humanize-ms"),de=ae("url"),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,be=ae("../utils/setRegion"),Te=be.setRegion,ve=ae("../utils/checkConfigValid"),xe=ve.checkConfigValid;function fe(z,ee){xe(z,"endpoint");var oe=de.parse(z);if(oe.protocol||(oe=de.parse("http".concat(ee?"s":"","://").concat(z))),oe.protocol!=="http:"&&oe.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return oe}Ge.exports=function(z){if(!z||!z.accessKeyId||!z.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");z.stsToken&&!z.refreshSTSToken&&!z.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),z.bucket&&we(z.bucket);var ee=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},z);if(ee.accessKeyId=ee.accessKeyId.trim(),ee.accessKeySecret=ee.accessKeySecret.trim(),ee.timeout&&(ee.timeout=me(ee.timeout)),ee.endpoint)ee.endpoint=fe(ee.endpoint,ee.secure);else if(ee.region)ee.endpoint=Te(ee.region,ee.internal,ee.secure);else throw new Error("require options.endpoint or options.region");return ee.inited=!0,ee}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(ae,Ge,Ie){"use strict";var me=ae("merge-descriptors"),de=Ie;me(de,ae("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.concat.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),be=we.checkBucketName,Te=ae("querystring"),ve=ae("js-base64"),xe=ve.Base64.encode,fe=Ie;fe.processObjectSave=function(){var ee=(0,Ee.default)(de.default.mark(function ie(le,ue,pe,Se){var Le,De,Fe,Ae;return de.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return z(le,"sourceObject"),z(ue,"targetObject"),z(pe,"process"),ue=this._objectName(ue),Se&&be(Se),Le=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),De=Se?",b_".concat(xe(Se)):"",ue=xe(ue),Fe={"x-oss-process":"".concat(pe,"|sys/saveas,o_").concat(ue).concat(De)},Le.content=Te.stringify(Fe),ze.next=12,this.request(Le);case 12:return Ae=ze.sent,ze.abrupt("return",{res:Ae.res,status:Ae.res.status});case 14:case"end":return ze.stop()}},ie,this)}));function oe(ie,le,ue,pe){return ee.apply(this,arguments)}return oe}();function z(ee,oe){if(!ee)throw new Error("".concat(oe," is required"));if(typeof ee!="string")throw new Error("".concat(oe," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.array.from.js"),ae("core-js/modules/es.string.iterator.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.array.filter.js"),ae("core-js/modules/es.array.find.js"),ae("core-js/modules/es.regexp.to-string.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("debug")("ali-oss:multipart-copy"),be=ae("copy-to"),Te=Ie;Te.uploadPartCopy=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z,ee,oe,ie,le){var ue,pe,Se,Le,De,Fe=arguments;return de.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return ue=Fe.length>5&&Fe[5]!==void 0?Fe[5]:{},ue.headers=ue.headers||{},pe=ue.versionId||ue.subres&&ue.subres.versionId||null,pe?Se="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(pe):Se="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),ue.headers["x-oss-copy-source"]=Se,ie&&(ue.headers["x-oss-copy-source-range"]="bytes=".concat(ie)),ue.subres={partNumber:oe,uploadId:ee},Le=this._objectRequestParams("PUT",z,ue),Le.mime=ue.mime,Le.successStatuses=[200],Oe.next=12,this.request(Le);case 12:return De=Oe.sent,Oe.abrupt("return",{name:z,etag:De.res.headers.etag,res:De.res});case 14:case"end":return Oe.stop()}},fe,this)}));function xe(fe,z,ee,oe,ie){return ve.apply(this,arguments)}return xe}(),Te.multipartUploadCopy=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z,ee){var oe,ie,le,ue,pe,Se,Le,De,Fe,Ae,Oe,ze,He=arguments;return de.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return oe=He.length>2&&He[2]!==void 0?He[2]:{},this.resetCancelFlag(),ie=oe.versionId,le=ie===void 0?null:ie,ue={versionId:le},We.next=6,this._getObjectMeta(ee.sourceBucketName,ee.sourceKey,ue);case 6:if(pe=We.sent,Se=pe.res.headers["content-length"],ee.startOffset=ee.startOffset||0,ee.endOffset=ee.endOffset||Se,!(oe.checkpoint&&oe.checkpoint.uploadId)){We.next=14;break}return We.next=13,this._resumeMultipartCopy(oe.checkpoint,ee,oe);case 13:return We.abrupt("return",We.sent);case 14:if(Le=102400,De=ee.endOffset-ee.startOffset,!(De<Le)){We.next=18;break}throw new Error("copySize must not be smaller than ".concat(Le));case 18:if(!(oe.partSize&&oe.partSize<Le)){We.next=20;break}throw new Error("partSize must not be smaller than ".concat(Le));case 20:return We.next=22,this.initMultipartUpload(z,oe);case 22:if(Fe=We.sent,Ae=Fe.uploadId,Oe=this._getPartSize(De,oe.partSize),ze={name:z,copySize:De,partSize:Oe,uploadId:Ae,doneParts:[]},!(oe&&oe.progress)){We.next=29;break}return We.next=29,oe.progress(0,ze,Fe.res);case 29:return We.next=31,this._resumeMultipartCopy(ze,ee,oe);case 31:return We.abrupt("return",We.sent);case 32:case"end":return We.stop()}},fe,this)}));function xe(fe,z){return ve.apply(this,arguments)}return xe}(),Te._resumeMultipartCopy=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z,ee,oe){var ie,le,ue,pe,Se,Le,De,Fe,Ae,Oe,ze,He,Ye,We,Ue,st,dt,gt,Et,Ke,et;return de.default.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(!this.isCancel()){vt.next=2;break}throw this._makeCancelEvent();case 2:if(ie=oe.versionId,le=ie===void 0?null:ie,ue={versionId:le},pe=z.copySize,Se=z.partSize,Le=z.uploadId,De=z.doneParts,Fe=z.name,Ae=this._divideMultipartCopyParts(pe,Se,ee.startOffset),Oe=Ae.length,ze={headers:{}},oe.copyheaders&&be(oe.copyheaders).to(ze.headers),le&&be(ue).to(ze),He=function(ht,pt,ct){return new Promise(function(){var Ct=(0,Ee.default)(de.default.mark(function xt(yt,Tt){var St,nt,Qe;return de.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(Ne.prev=0,ht.isCancel()){Ne.next=22;break}return St=Ae[pt-1],nt="".concat(St.start,"-").concat(St.end-1),Ne.prev=4,Ne.next=7,ht.uploadPartCopy(Fe,Le,pt,nt,ct,ze);case 7:Qe=Ne.sent,Ne.next=15;break;case 10:if(Ne.prev=10,Ne.t0=Ne.catch(4),Ne.t0.status!==404){Ne.next=14;break}throw ht._makeAbortEvent();case 14:throw Ne.t0;case 15:if(ht.isCancel()){Ne.next=22;break}if(we("content-range ".concat(Qe.res.headers["content-range"])),De.push({number:pt,etag:Qe.res.headers.etag}),z.doneParts=De,!(oe&&oe.progress)){Ne.next=22;break}return Ne.next=22,oe.progress(De.length/Oe,z,Qe.res);case 22:yt(),Ne.next=29;break;case 25:Ne.prev=25,Ne.t1=Ne.catch(0),Ne.t1.partNum=pt,Tt(Ne.t1);case 29:case"end":return Ne.stop()}},xt,null,[[0,25],[4,10]])}));return function(xt,yt){return Ct.apply(this,arguments)}}())},Ye=Array.from(new Array(Oe),function(wt,ht){return ht+1}),We=De.map(function(wt){return wt.number}),Ue=Ye.filter(function(wt){return We.indexOf(wt)<0}),st=5,dt=oe.parallel||st,!(this.checkBrowserAndVersion("Internet Explorer","10")||dt===1)){vt.next=28;break}gt=0;case 18:if(!(gt<Ue.length)){vt.next=26;break}if(!this.isCancel()){vt.next=21;break}throw this._makeCancelEvent();case 21:return vt.next=23,He(this,Ue[gt],ee);case 23:gt++,vt.next=18;break;case 26:vt.next=40;break;case 28:return vt.next=30,this._parallelNode(Ue,dt,He,ee);case 30:if(Et=vt.sent,Ke=Et.find(function(wt){return wt.name==="abort"}),!Ke){vt.next=34;break}throw Ke;case 34:if(!this.isCancel()){vt.next=36;break}throw this._makeCancelEvent();case 36:if(!(Et&&Et.length>0)){vt.next=40;break}throw et=Et[0],et.message="Failed to copy some parts with error: ".concat(et.toString()," part_num: ").concat(et.partNum),et;case 40:return vt.next=42,this.completeMultipartUpload(Fe,Le,De,oe);case 42:return vt.abrupt("return",vt.sent);case 43:case"end":return vt.stop()}},fe,this)}));function xe(fe,z,ee){return ve.apply(this,arguments)}return xe}(),Te._divideMultipartCopyParts=function(xe,fe,z){for(var ee=Math.ceil(xe/fe),oe=[],ie=0;ie<ee;ie++){var le=fe*ie+z,ue=Math.min(le+fe,xe+z);oe.push({start:le,end:ue})}return oe},Te._getObjectMeta=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z,ee,oe){var ie,le;return de.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return ie=this.getBucket(),this.setBucket(z),pe.next=4,this.head(ee,oe);case 4:return le=pe.sent,this.setBucket(ie),pe.abrupt("return",le);case 7:case"end":return pe.stop()}},fe,this)}));function xe(fe,z,ee){return ve.apply(this,arguments)}return xe}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=ae("@babel/runtime/helpers/interopRequireDefault"),Ee=de(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.array.filter.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.array.sort.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.to-string.js");var we=de(ae("@babel/runtime/helpers/asyncToGenerator")),be=ae("copy-to"),Te=ae("./callback"),ve=ae("./utils/deepCopy"),xe=ve.deepCopyWith,fe=ae("./utils/isBuffer"),z=fe.isBuffer,ee=ae("./utils/omit"),oe=ee.omit,ie=Ie;ie.listUploads=function(){var le=(0,we.default)(Ee.default.mark(function pe(Se,Le){var De,Fe,Ae,Oe;return Ee.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:return Le=Le||{},De={},be(Le).to(De),De.subres="uploads",Fe=this._objectRequestParams("GET","",De),Fe.query=Se,Fe.xmlResponse=!0,Fe.successStatuses=[200],He.next=10,this.request(Fe);case 10:return Ae=He.sent,Oe=Ae.data.Upload||[],Array.isArray(Oe)||(Oe=[Oe]),Oe=Oe.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),He.abrupt("return",{res:Ae.res,uploads:Oe,bucket:Ae.data.Bucket,nextKeyMarker:Ae.data.NextKeyMarker,nextUploadIdMarker:Ae.data.NextUploadIdMarker,isTruncated:Ae.data.IsTruncated==="true"});case 15:case"end":return He.stop()}},pe,this)}));function ue(pe,Se){return le.apply(this,arguments)}return ue}(),ie.listParts=function(){var le=(0,we.default)(Ee.default.mark(function pe(Se,Le,De,Fe){var Ae,Oe,ze;return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Fe=Fe||{},Ae={},be(Fe).to(Ae),Ae.subres={uploadId:Le},Oe=this._objectRequestParams("GET",Se,Ae),Oe.query=De,Oe.xmlResponse=!0,Oe.successStatuses=[200],Ye.next=10,this.request(Oe);case 10:return ze=Ye.sent,Ye.abrupt("return",{res:ze.res,uploadId:ze.data.UploadId,bucket:ze.data.Bucket,name:ze.data.Key,partNumberMarker:ze.data.PartNumberMarker,nextPartNumberMarker:ze.data.NextPartNumberMarker,maxParts:ze.data.MaxParts,isTruncated:ze.data.IsTruncated,parts:ze.data.Part||[]});case 12:case"end":return Ye.stop()}},pe,this)}));function ue(pe,Se,Le,De){return le.apply(this,arguments)}return ue}(),ie.abortMultipartUpload=function(){var le=(0,we.default)(Ee.default.mark(function pe(Se,Le,De){var Fe,Ae,Oe;return Ee.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:return this._stop(),De=De||{},Fe={},be(De).to(Fe),Fe.subres={uploadId:Le},Ae=this._objectRequestParams("DELETE",Se,Fe),Ae.successStatuses=[204],He.next=9,this.request(Ae);case 9:return Oe=He.sent,He.abrupt("return",{res:Oe.res});case 11:case"end":return He.stop()}},pe,this)}));function ue(pe,Se,Le){return le.apply(this,arguments)}return ue}(),ie.initMultipartUpload=function(){var le=(0,we.default)(Ee.default.mark(function pe(Se,Le){var De,Fe,Ae;return Ee.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return Le=Le||{},De={},be(Le).to(De),De.headers=De.headers||{},this._convertMetaToHeaders(Le.meta,De.headers),De.subres="uploads",Fe=this._objectRequestParams("POST",Se,De),Fe.mime=Le.mime,Fe.xmlResponse=!0,Fe.successStatuses=[200],ze.next=12,this.request(Fe);case 12:return Ae=ze.sent,ze.abrupt("return",{res:Ae.res,bucket:Ae.data.Bucket,name:Ae.data.Key,uploadId:Ae.data.UploadId});case 14:case"end":return ze.stop()}},pe,this)}));function ue(pe,Se){return le.apply(this,arguments)}return ue}(),ie.uploadPart=function(){var le=(0,we.default)(Ee.default.mark(function pe(Se,Le,De,Fe,Ae,Oe,ze){var He,Ye;return Ee.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(He={size:Oe-Ae},Ye=me&&me.browser,!Ye){Ue.next=8;break}return Ue.next=5,this._createBuffer(Fe,Ae,Oe);case 5:He.content=Ue.sent,Ue.next=11;break;case 8:return Ue.next=10,this._createStream(Fe,Ae,Oe);case 10:He.stream=Ue.sent;case 11:return Ue.next=13,this._uploadPart(Se,Le,De,He,ze);case 13:return Ue.abrupt("return",Ue.sent);case 14:case"end":return Ue.stop()}},pe,this)}));function ue(pe,Se,Le,De,Fe,Ae,Oe){return le.apply(this,arguments)}return ue}(),ie.completeMultipartUpload=function(){var le=(0,we.default)(Ee.default.mark(function pe(Se,Le,De,Fe){var Ae,Oe,ze,He,Ye,We,Ue,st;return Ee.default.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:for(Ae=De.concat().sort(function(Et,Ke){return Et.number-Ke.number}).filter(function(Et,Ke,et){return!Ke||Et.number!==et[Ke-1].number}),Oe=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,ze=0;ze<Ae.length;ze++)He=Ae[ze],Oe+=`<Part>
`,Oe+="<PartNumber>".concat(He.number,`</PartNumber>
`),Oe+="<ETag>".concat(He.etag,`</ETag>
`),Oe+=`</Part>
`;return Oe+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=xe(Fe,function(Et){if(z(Et))return null}),Ye.subres={uploadId:Le},Ye.headers=oe(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),We=this._objectRequestParams("POST",Se,Ye),Te.encodeCallback(We,Ye),We.mime="xml",We.content=Oe,We.headers&&We.headers["x-oss-callback"]||(We.xmlResponse=!0),We.successStatuses=[200],gt.next=17,this.request(We);case 17:if(Ue=gt.sent,!Fe.progress){gt.next=21;break}return gt.next=21,Fe.progress(1,null,Ue.res);case 21:return st={res:Ue.res,bucket:We.bucket,name:Se,etag:Ue.res.headers.etag},We.headers&&We.headers["x-oss-callback"]&&(st.data=JSON.parse(Ue.data.toString())),gt.abrupt("return",st);case 24:case"end":return gt.stop()}},pe,this)}));function ue(pe,Se,Le,De){return le.apply(this,arguments)}return ue}(),ie._uploadPart=function(){var le=(0,we.default)(Ee.default.mark(function pe(Se,Le,De,Fe,Ae){var Oe,ze,He,Ye;return Ee.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ae=Ae||{},Oe={},be(Ae).to(Oe),Oe.headers=Oe.headers||{},Oe.headers["Content-Length"]=Fe.size,Oe.headers=oe(Oe.headers,["x-oss-server-side-encryption"]),Oe.subres={partNumber:De,uploadId:Le},ze=this._objectRequestParams("PUT",Se,Oe),ze.mime=Oe.mime,He=me&&me.browser,He?ze.content=Fe.content:ze.stream=Fe.stream,ze.successStatuses=[200],ze.disabledMD5=Ae.disabledMD5,Ue.next=15,this.request(ze);case 15:if(Ye=Ue.sent,Ye.res.headers.etag){Ue.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 18:return Fe.stream&&(Fe.stream=null,ze.stream=null),Ue.abrupt("return",{name:Se,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Ue.stop()}},pe,this)}));function ue(pe,Se,Le,De,Fe){return le.apply(this,arguments)}return ue}()}).call(this)}).call(this,ae("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator")),Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("url"),be=ae("utility"),Te=ae("copy-to"),ve=ae("../../common/signUtils"),xe=ae("../utils/isIP"),fe=xe.isIP,z=ae("../utils/setSTSToken"),ee=z.setSTSToken,oe=ae("../utils/isFunction"),ie=oe.isFunction,le=Ie;le.asyncSignatureUrl=function(){var ue=(0,Ee.default)(de.default.mark(function Se(Le,De){var Fe,Ae,Oe,ze,He;return de.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(!fe(this.options.endpoint.hostname)){We.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(De=De||{},Le=this._objectName(Le),De.method=De.method||"GET",Fe=be.timestamp()+(De.expires||1800),Ae={bucket:this.options.bucket,object:Le},Oe=this._getResource(Ae),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){We.next=11;break}return We.next=11,ee.call(this);case 11:return this.options.stsToken&&(De["security-token"]=this.options.stsToken),ze=ve._signatureForURL(this.options.accessKeySecret,De,Oe,Fe),He=we.parse(this._getReqUrl(Ae)),He.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:ze.Signature},Te(ze.subResource).to(He.query),We.abrupt("return",He.format());case 17:case"end":return We.stop()}},Se,this)}));function pe(Se,Le){return ue.apply(this,arguments)}return pe}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.find.js"),ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js");var Ee=me(ae("@babel/runtime/helpers/typeof")),we=me(ae("@babel/runtime/helpers/asyncToGenerator")),be=ae("../utils/checkBucketName"),Te=be.checkBucketName,ve=Ie,xe=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];ve.copy=function(){var fe=(0,we.default)(de.default.mark(function ee(oe,ie,le,ue){var pe,Se,Le;return de.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return(0,Ee.default)(le)==="object"&&(ue=le),ue=ue||{},ue.headers=ue.headers||{},Object.keys(ue.headers).forEach(function(Ae){ue.headers["x-oss-copy-source-".concat(Ae.toLowerCase())]=ue.headers[Ae]}),(ue.meta||Object.keys(ue.headers).find(function(Ae){return xe.includes(Ae.toLowerCase())}))&&(ue.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ue.meta,ue.headers),ie=this._getSourceName(ie,le),ue.versionId&&(ie="".concat(ie,"?versionId=").concat(ue.versionId)),ue.headers["x-oss-copy-source"]=ie,pe=this._objectRequestParams("PUT",oe,ue),pe.xmlResponse=!0,pe.successStatuses=[200,304],Fe.next=14,this.request(pe);case 14:return Se=Fe.sent,Le=Se.data,Le&&(Le={etag:Le.ETag,lastModified:Le.LastModified}),Fe.abrupt("return",{data:Le,res:Se.res});case 18:case"end":return Fe.stop()}},ee,this)}));function z(ee,oe,ie,le){return fe.apply(this,arguments)}return z}(),ve._getSourceName=function(z,ee){return typeof ee=="string"?z=this._objectName(z):z[0]!=="/"?ee=this.options.bucket:(ee=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),Te(ee),z=encodeURIComponent(z),z="/".concat(ee,"/").concat(z),z}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie;we.delete=function(){var be=(0,Ee.default)(de.default.mark(function ve(xe){var fe,z,ee,oe=arguments;return de.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=oe.length>1&&oe[1]!==void 0?oe[1]:{},fe.subres=Object.assign({},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("DELETE",xe,fe),z.successStatuses=[204],le.next=7,this.request(z);case 7:return ee=le.sent,le.abrupt("return",{res:ee.res});case 9:case"end":return le.stop()}},ve,this)}));function Te(ve){return be.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("utility"),be=ae("../utils/obj2xml"),Te=be.obj2xml,ve=Ie;ve.deleteMulti=function(){var xe=(0,Ee.default)(de.default.mark(function z(ee){var oe,ie,le,ue,pe,Se,Le,De,Fe,Ae,Oe,ze,He,Ye=arguments;return de.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(oe=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},ie=[],!(!ee||!ee.length)){Ue.next=4;break}throw new Error("names is required");case 4:for(le=0;le<ee.length;le++)ue={},typeof ee[le]=="string"?ue.Key=we.escape(this._objectName(ee[le])):(pe=ee[le],Se=pe.key,Le=pe.versionId,ue.Key=we.escape(this._objectName(Se)),ue.VersionId=Le),ie.push(ue);return De={Delete:{Quiet:!!oe.quiet,Object:ie}},Fe=Te(De,{headers:!0}),oe.subres=Object.assign({delete:""},oe.subres),oe.versionId&&(oe.subres.versionId=oe.versionId),Ae=this._objectRequestParams("POST","",oe),Ae.mime="xml",Ae.content=Fe,Ae.xmlResponse=!0,Ae.successStatuses=[200],Ue.next=16,this.request(Ae);case 16:return Oe=Ue.sent,ze=Oe.data,He=ze&&ze.Deleted||null,He&&(Array.isArray(He)||(He=[He])),Ue.abrupt("return",{res:Oe.res,deleted:He||[]});case 21:case"end":return Ue.stop()}},z,this)}));function fe(z){return xe.apply(this,arguments)}return fe}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie;we.deleteObjectTagging=function(){var be=(0,Ee.default)(de.default.mark(function ve(xe){var fe,z,ee,oe=arguments;return de.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=oe.length>1&&oe[1]!==void 0?oe[1]:{},fe.subres=Object.assign({tagging:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),xe=this._objectName(xe),z=this._objectRequestParams("DELETE",xe,fe),z.successStatuses=[204],le.next=8,this.request(z);case 8:return ee=le.sent,le.abrupt("return",{status:ee.status,res:ee.res});case 10:case"end":return le.stop()}},ve,this)}));function Te(ve){return be.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.concat.js");var me=ae("url"),de=ae("../utils/isIP"),Ee=de.isIP,we=Ie;we.generateObjectUrl=function(Te,ve){if(Ee(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(ve)ve[ve.length-1]!=="/"&&(ve+="/");else{ve=this.options.endpoint.format();var xe=me.parse(ve),fe=this.options.bucket;xe.hostname="".concat(fe,".").concat(xe.hostname),xe.host="".concat(fe,".").concat(xe.host),ve=xe.format()}return ve+this._escape(this._objectName(Te))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=ae("@babel/runtime/helpers/interopRequireDefault"),Ee=de(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var we=de(ae("@babel/runtime/helpers/asyncToGenerator")),be=ae("fs"),Te=ae("is-type-of"),ve=Ie;ve.get=function(){var xe=(0,we.default)(Ee.default.mark(function z(ee,oe){var ie,le,ue,pe,Se,Le,De,Fe,Ae=arguments;return Ee.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return ie=Ae.length>2&&Ae[2]!==void 0?Ae[2]:{},le=null,ue=!1,Te.writableStream(oe)?le=oe:Te.string(oe)?(le=be.createWriteStream(oe),ue=!0):ie=oe,ie=ie||{},pe=me&&me.browser,Se=ie.responseCacheControl===null?"":"no-cache",Le=pe&&Se?{"response-cache-control":Se}:{},ie.subres=Object.assign(Le,ie.subres),ie.versionId&&(ie.subres.versionId=ie.versionId),ie.process&&(ie.subres["x-oss-process"]=ie.process),ze.prev=11,Fe=this._objectRequestParams("GET",ee,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],ze.next=17,this.request(Fe);case 17:De=ze.sent,ue&&le.destroy(),ze.next=28;break;case 21:if(ze.prev=21,ze.t0=ze.catch(11),!ue){ze.next=27;break}return le.destroy(),ze.next=27,this._deleteFileSafe(oe);case 27:throw ze.t0;case 28:return ze.abrupt("return",{res:De.res,content:De.data});case 29:case"end":return ze.stop()}},z,this,[[11,21]])}));function fe(z,ee){return xe.apply(this,arguments)}return fe}()}).call(this)}).call(this,ae("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie;we.getACL=function(){var be=(0,Ee.default)(de.default.mark(function ve(xe){var fe,z,ee,oe=arguments;return de.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return fe=oe.length>1&&oe[1]!==void 0?oe[1]:{},fe.subres=Object.assign({acl:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),xe=this._objectName(xe),z=this._objectRequestParams("GET",xe,fe),z.successStatuses=[200],z.xmlResponse=!0,le.next=9,this.request(z);case 9:return ee=le.sent,le.abrupt("return",{acl:ee.data.AccessControlList.Grant,owner:{id:ee.data.Owner.ID,displayName:ee.data.Owner.DisplayName},res:ee.res});case 11:case"end":return le.stop()}},ve,this)}));function Te(ve){return be.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.number.constructor.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie,be=ae("../utils/isObject"),Te=be.isObject,ve=ae("../utils/isArray"),xe=ve.isArray;we.getBucketVersions=fe,we.listObjectVersions=fe;function fe(){return z.apply(this,arguments)}function z(){return z=(0,Ee.default)(de.default.mark(function ie(){var le,ue,pe,Se,Le,De,Fe,Ae,Oe=arguments;return de.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:if(le=Oe.length>0&&Oe[0]!==void 0?Oe[0]:{},ue=Oe.length>1&&Oe[1]!==void 0?Oe[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){He.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return ue.subres=Object.assign({versions:""},ue.subres),ue.versionId&&(ue.subres.versionId=ue.versionId),pe=this._objectRequestParams("GET","",ue),pe.xmlResponse=!0,pe.successStatuses=[200],pe.query=oe(le),He.next=12,this.request(pe);case 12:return Se=He.sent,Le=Se.data.Version||[],De=Se.data.DeleteMarker||[],Fe=this,Le&&(Array.isArray(Le)||(Le=[Le]),Le=Le.map(function(Ye){return{name:Ye.Key,url:Fe._objectUrl(Ye.Key),lastModified:Ye.LastModified,isLatest:Ye.IsLatest==="true",versionId:Ye.VersionId,etag:Ye.ETag,type:Ye.Type,size:Number(Ye.Size),storageClass:Ye.StorageClass,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),De&&(xe(De)||(De=[De]),De=De.map(function(Ye){return{name:Ye.Key,lastModified:Ye.LastModified,versionId:Ye.VersionId,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Ae=Se.data.CommonPrefixes||null,Ae&&(xe(Ae)||(Ae=[Ae]),Ae=Ae.map(function(Ye){return Ye.Prefix})),He.abrupt("return",{res:Se.res,objects:Le,deleteMarker:De,prefixes:Ae,nextMarker:Se.data.NextKeyMarker||null,NextVersionIdMarker:Se.data.NextVersionIdMarker||null,nextKeyMarker:Se.data.NextKeyMarker||null,nextVersionIdMarker:Se.data.NextVersionIdMarker||null,isTruncated:Se.data.IsTruncated==="true"});case 21:case"end":return He.stop()}},ie,this)})),z.apply(this,arguments)}function ee(ie){return ie.replace(/([A-Z])/g,"-$1").toLowerCase()}function oe(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le={};return Te(ie)&&Object.keys(ie).forEach(function(ue){le[ee(ue)]=ie[ue]}),le}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie;we.getObjectMeta=function(){var be=(0,Ee.default)(de.default.mark(function ve(xe,fe){var z,ee;return de.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return fe=fe||{},xe=this._objectName(xe),fe.subres=Object.assign({objectMeta:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),z=this._objectRequestParams("HEAD",xe,fe),z.successStatuses=[200],ie.next=8,this.request(z);case 8:return ee=ie.sent,ie.abrupt("return",{status:ee.status,res:ee.res});case 10:case"end":return ie.stop()}},ve,this)}));function Te(ve,xe){return be.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie,be=ae("../utils/isObject"),Te=be.isObject;we.getObjectTagging=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z){var ee,oe,ie,le,ue,pe,Se=arguments;return de.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ee=Se.length>1&&Se[1]!==void 0?Se[1]:{},ee.subres=Object.assign({tagging:""},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),z=this._objectName(z),oe=this._objectRequestParams("GET",z,ee),oe.successStatuses=[200],De.next=8,this.request(oe);case 8:return ie=De.sent,De.next=11,this.parseXML(ie.data);case 11:return le=De.sent,ue=le.TagSet.Tag,ue=ue&&Te(ue)?[ue]:ue||[],pe={},ue.forEach(function(Fe){pe[Fe.Key]=Fe.Value}),De.abrupt("return",{status:ie.status,res:ie.res,tag:pe});case 17:case"end":return De.stop()}},fe,this)}));function xe(fe){return ve.apply(this,arguments)}return xe}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(ae,Ge,Ie){"use strict";var me=ae("../utils/isIP"),de=me.isIP,Ee=Ie;Ee.getObjectUrl=function(be,Te){if(de(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Te?Te[Te.length-1]!=="/"&&(Te+="/"):Te=this.options.endpoint.format(),Te+this._escape(this._objectName(be))}},{"../utils/isIP":69}],43:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie;we.getSymlink=function(){var be=(0,Ee.default)(de.default.mark(function ve(xe){var fe,z,ee,oe,ie=arguments;return de.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return fe=ie.length>1&&ie[1]!==void 0?ie[1]:{},fe.subres=Object.assign({symlink:""},fe.subres),fe.versionId&&(fe.subres.versionId=fe.versionId),xe=this._objectName(xe),z=this._objectRequestParams("GET",xe,fe),z.successStatuses=[200],ue.next=8,this.request(z);case 8:return ee=ue.sent,oe=ee.res.headers["x-oss-symlink-target"],ue.abrupt("return",{targetName:decodeURIComponent(oe),res:ee.res});case 11:case"end":return ue.stop()}},ve,this)}));function Te(ve){return be.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkEnv"),be=we.checkEnv,Te=Ie;Te.head=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z){var ee,oe,ie,le,ue=arguments;return de.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return ee=ue.length>1&&ue[1]!==void 0?ue[1]:{},be("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),ee.subres=Object.assign({},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),oe=this._objectRequestParams("HEAD",z,ee),oe.successStatuses=[200,304],Se.next=8,this.request(oe);case 8:return ie=Se.sent,le={meta:null,res:ie.res,status:ie.status},ie.status===200&&Object.keys(ie.headers).forEach(function(Le){Le.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[Le.substring(11)]=ie.headers[Le])}),Se.abrupt("return",le);case 12:case"end":return Se.stop()}},fe,this)}));function xe(fe){return ve.apply(this,arguments)}return xe}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie;we.putACL=function(){var be=(0,Ee.default)(de.default.mark(function ve(xe,fe,z){var ee,oe;return de.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.subres=Object.assign({acl:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.headers=z.headers||{},z.headers["x-oss-object-acl"]=fe,xe=this._objectName(xe),ee=this._objectRequestParams("PUT",xe,z),ee.successStatuses=[200],le.next=10,this.request(ee);case 10:return oe=le.sent,le.abrupt("return",{res:oe.res});case 12:case"end":return le.stop()}},ve,this)}));function Te(ve,xe,fe){return be.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.object.keys.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/obj2xml"),be=we.obj2xml,Te=ae("../utils/checkObjectTag"),ve=Te.checkObjectTag,xe=Ie;xe.putObjectTagging=function(){var fe=(0,Ee.default)(de.default.mark(function ee(oe,ie){var le,ue,pe,Se,Le=arguments;return de.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=Le.length>2&&Le[2]!==void 0?Le[2]:{},ve(ie),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),oe=this._objectName(oe),ue=this._objectRequestParams("PUT",oe,le),ue.successStatuses=[200],ie=Object.keys(ie).map(function(Ae){return{Key:Ae,Value:ie[Ae]}}),pe={Tagging:{TagSet:{Tag:ie}}},ue.mime="xml",ue.content=be(pe),Fe.next=13,this.request(ue);case 13:return Se=Fe.sent,Fe.abrupt("return",{res:Se.res,status:Se.status});case 15:case"end":return Fe.stop()}},ee,this)}));function z(ee,oe){return fe.apply(this,arguments)}return z}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=Ie;we.putSymlink=function(){var be=(0,Ee.default)(de.default.mark(function ve(xe,fe,z){var ee,oe;return de.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.headers=z.headers||{},fe=this._escape(this._objectName(fe)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=fe,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),xe=this._objectName(xe),ee=this._objectRequestParams("PUT",xe,z),ee.successStatuses=[200],le.next=13,this.request(ee);case 13:return oe=le.sent,le.abrupt("return",{res:oe.res});case 15:case"end":return le.stop()}},ve,this)}));function Te(ve,xe,fe){return be.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(ae,Ge,Ie){"use strict";var me=ae("url"),de=ae("utility"),Ee=ae("copy-to"),we=ae("../../common/signUtils"),be=ae("../utils/isIP"),Te=be.isIP,ve=Ie;ve.signatureUrl=function(fe,z){if(Te(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},fe=this._objectName(fe),z.method=z.method||"GET";var ee=de.timestamp()+(z.expires||1800),oe={bucket:this.options.bucket,object:fe},ie=this._getResource(oe);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var le=we._signatureForURL(this.options.accessKeySecret,z,ie,ee),ue=me.parse(this._getReqUrl(oe));return ue.query={OSSAccessKeyId:this.options.accessKeyId,Expires:ee,Signature:le.Signature},Ee(le.subResource).to(ue.query),ue.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.iterator.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.string.iterator.js"),ae("core-js/modules/web.dom-collections.iterator.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.function.name.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("./utils/isArray"),be=we.isArray,Te=Ie;Te._parallelNode=function(){var ve=(0,Ee.default)(de.default.mark(function fe(z,ee,oe,ie){var le,ue,pe,Se,Le,De,Fe,Ae;return de.default.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:le=this,ue=[],pe=[],Se=z.length/ee,Le=z.length%ee,De=Le===0?Se:(z.length-Le)/ee+1,Fe=1,Ae=0;case 8:if(!(Ae<z.length)){ze.next=26;break}if(!le.isCancel()){ze.next=11;break}return ze.abrupt("break",26);case 11:if(ie?pe.push(oe(le,z[Ae],ie)):pe.push(oe(le,z[Ae])),!(pe.length===ee||Fe===De&&Ae===z.length-1)){ze.next=23;break}return ze.prev=13,Fe+=1,ze.next=17,Promise.all(pe);case 17:ze.next=22;break;case 19:ze.prev=19,ze.t0=ze.catch(13),ue.push(ze.t0);case 22:pe=[];case 23:Ae++,ze.next=8;break;case 26:return ze.abrupt("return",ue);case 27:case"end":return ze.stop()}},fe,this,[[13,19]])}));function xe(fe,z,ee,oe){return ve.apply(this,arguments)}return xe}(),Te._parallel=function(xe,fe,z){var ee=this;return new Promise(function(oe){var ie=[];if(fe<=0||!xe){oe(ie);return}function le(ze){return function(){if(ze===null)throw new Error("Callback was already called.");var He=ze;ze=null;for(var Ye=arguments.length,We=new Array(Ye),Ue=0;Ue<Ye;Ue++)We[Ue]=arguments[Ue];He.apply(this,We)}}function ue(ze){var He=-1,Ye=ze.length;return function(){return++He<Ye&&!ee.isCancel()?{value:ze[He],key:He}:null}}var pe=ue(xe),Se=!1,Le=0,De=!1;function Fe(ze){Le-=1,ze?(Se=!0,ie.push(ze),oe(ie)):Se&&Le<=0?(Se=!0,oe(ie)):De||(ee.isCancel()?oe(ie):Oe())}function Ae(ze,He){z(ze).then(function(Ye){He(null,Ye)}).catch(function(Ye){He(Ye)})}function Oe(){for(De=!0;Le<fe&&!Se&&!ee.isCancel();){var ze=pe();if(ze===null||ie.length>0){Se=!0,Le<=0&&oe(ie);return}Le+=1,Ae(ze.value,le(Fe))}De=!1}Oe()})},Te.cancel=function(xe){this.options.cancelFlag=!0,be(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(fe){if(fe.destroyed===!1){var z={name:"cancel",message:"cancel"};fe.destroy(z)}}),this.multipartUploadStreams=[],xe&&this.abortMultipartUpload(xe.name,xe.uploadId,xe.options)},Te.isCancel=function(){return this.options.cancelFlag},Te.resetCancelFlag=function(){this.options.cancelFlag=!1},Te._stop=function(){this.options.cancelFlag=!0},Te._makeCancelEvent=function(){var xe={status:0,name:"cancel"};return xe},Te._makeAbortEvent=function(){var xe={status:0,name:"abort",message:"upload task has been abort"};return xe}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(ae,Ge,Ie){(function(me){(function(){"use strict";ae("core-js/modules/es.string.trim.js"),ae("core-js/modules/es.array.sort.js"),ae("core-js/modules/es.array.join.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.to-string.js");var de=ae("./../../shims/crypto/crypto.js"),Ee=ae("is-type-of"),we=ae("./utils/lowercaseKeyHeader"),be=we.lowercaseKeyHeader;Ie.buildCanonicalizedResource=function(ve,xe){var fe="".concat(ve),z="?";if(Ee.string(xe)&&xe.trim()!=="")fe+=z+xe;else if(Ee.array(xe))xe.sort(),fe+=z+xe.join("&");else if(xe){var ee=function(le,ue){return le[0]>ue[0]?1:le[0]<ue[0]?-1:0},oe=function(le){fe+=z+le,(xe[le]||xe[le]===0)&&(fe+="=".concat(xe[le])),z="&"};Object.keys(xe).sort(ee).forEach(oe)}return fe},Ie.buildCanonicalString=function(ve,xe,fe,z){fe=fe||{};var ee=be(fe.headers),oe="x-oss-",ie=[],le={},ue=[ve.toUpperCase(),ee["content-md5"]||"",ee["content-type"],z||ee["x-oss-date"]];return Object.keys(ee).forEach(function(pe){var Se=pe.toLowerCase();Se.indexOf(oe)===0&&(le[Se]=String(ee[pe]).trim())}),Object.keys(le).sort().forEach(function(pe){ie.push("".concat(pe,":").concat(le[pe]))}),ue=ue.concat(ie),ue.push(this.buildCanonicalizedResource(xe,fe.parameters)),ue.join(`
`)},Ie.computeSignature=function(ve,xe){var fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=de.createHmac("sha1",ve);return z.update(me.from(xe,fe)).digest("base64")},Ie.authorization=function(ve,xe,fe,z){return"OSS ".concat(ve,":").concat(this.computeSignature(xe,fe,z))},Ie._signatureForURL=function(ve){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},fe=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,ee=arguments.length>4?arguments[4]:void 0,oe={},ie=xe.subResource,le=ie===void 0?{}:ie;if(xe.process){var ue="x-oss-process";le[ue]=xe.process}if(xe.trafficLimit){var pe="x-oss-traffic-limit";le[pe]=xe.trafficLimit}if(xe.response&&Object.keys(xe.response).forEach(function(Fe){var Ae="response-".concat(Fe.toLowerCase());le[Ae]=xe.response[Fe]}),Object.keys(xe).forEach(function(Fe){var Ae=Fe.toLowerCase(),Oe=xe[Fe];Ae.indexOf("x-oss-")===0?oe[Ae]=Oe:(Ae.indexOf("content-md5")===0||Ae.indexOf("content-type")===0)&&(oe[Fe]=Oe)}),Object.prototype.hasOwnProperty.call(xe,"security-token")&&(le["security-token"]=xe["security-token"]),Object.prototype.hasOwnProperty.call(xe,"callback")){var Se={callbackUrl:encodeURI(xe.callback.url),callbackBody:xe.callback.body};if(xe.callback.host&&(Se.callbackHost=xe.callback.host),xe.callback.contentType&&(Se.callbackBodyType=xe.callback.contentType),le.callback=me.from(JSON.stringify(Se)).toString("base64"),xe.callback.customValue){var Le={};Object.keys(xe.callback.customValue).forEach(function(Fe){Le["x:".concat(Fe)]=xe.callback.customValue[Fe]}),le["callback-var"]=me.from(JSON.stringify(Le)).toString("base64")}}var De=this.buildCanonicalString(xe.method,fe,{headers:oe,parameters:le},z.toString());return{Signature:this.computeSignature(ve,De,ee),subResource:le}}}).call(this)}).call(this,ae("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.checkBucketName=void 0,Ie.checkBucketName=function(me){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ee=de?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!Ee.test(me))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.checkConfigValid=void 0;var me={endpoint:de,region:/^[a-zA-Z0-9\-_]+$/};function de(Ee){return typeof Ee=="string"?/^[a-zA-Z0-9._:/-]+$/.test(Ee):Ee.host?/^[a-zA-Z0-9._:/-]+$/.test(Ee.host):!1}Ie.checkConfigValid=function(Ee,we){if(me[we]){var be=!0;if(me[we]instanceof Function?be=me[we](Ee):be=me[we].test(Ee),!be)throw new Error("The ".concat(we," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(ae,Ge,Ie){(function(me){(function(){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.checkEnv=void 0;function de(Ee){me.browser&&console.warn(Ee)}Ie.checkEnv=de}).call(this)}).call(this,ae("_process"))},{_process:467}],54:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.object.entries.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.checkObjectTag=void 0;var me=ae("./checkValid"),de=me.checkValid,Ee=ae("./isObject"),we=Ee.isObject,be=[{validator:function(fe){if(typeof fe!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],Te={key:[].concat(be,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(be,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function ve(xe){if(!we(xe))throw new Error("tag must be Object");var fe=Object.entries(xe);if(fe.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];fe.forEach(function(ee){ee.forEach(function(oe,ie){de(oe,Te[z[ie]])})})}Ie.checkObjectTag=ve},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.checkValid=void 0;function me(de,Ee){Ee.forEach(function(we){if(we.validator)we.validator(de);else if(we.pattern&&!we.pattern.test(de))throw new Error(we.msg)})}Ie.checkValid=me},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(ae,Ge,Ie){(function(me){(function(){"use strict";ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.string.includes.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.concat.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.createRequest=void 0;var de=ae("./../../../shims/crypto/crypto.js"),Ee=ae("debug")("ali-oss"),we=ae("mime"),be=ae("dateformat"),Te=ae("copy-to"),ve=ae("path"),xe=ae("./encoder"),fe=xe.encoder,z=ae("./isIP"),ee=z.isIP,oe=ae("./setRegion"),ie=oe.setRegion,le=ae("../client/getReqUrl"),ue=le.getReqUrl,pe=ae("./isDingTalk"),Se=pe.isDingTalk;function Le(Ae,Oe){return Ae[Oe]||Ae[Oe.toLowerCase()]}function De(Ae,Oe){delete Ae[Oe],delete Ae[Oe.toLowerCase()]}function Fe(Ae){var Oe=new Date;this.options.amendTimeSkewed&&(Oe=+new Date+this.options.amendTimeSkewed);var ze={"x-oss-date":be(Oe,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(ze["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(ze["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(ze,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(ze["x-oss-security-token"]=this.options.stsToken),Te(Ae.headers).to(ze),Le(ze,"Content-Type")||(Ae.mime&&Ae.mime.indexOf("/")>0?ze["Content-Type"]=Ae.mime:Se()?ze["Content-Type"]="application/octet-stream":ze["Content-Type"]=we.getType(Ae.mime||ve.extname(Ae.object||""))),Le(ze,"Content-Type")||De(ze,"Content-Type"),Ae.content&&(Ae.disabledMD5||(!Ae.headers||!Ae.headers["Content-MD5"]?ze["Content-MD5"]=de.createHash("md5").update(me.from(Ae.content,"utf8")).digest("base64"):ze["Content-MD5"]=Ae.headers["Content-MD5"]),ze["Content-Length"]||(ze["Content-Length"]=Ae.content.length));var He=Object.prototype.hasOwnProperty;for(var Ye in ze)ze[Ye]&&He.call(ze,Ye)&&(ze[Ye]=fe(String(ze[Ye]),this.options.headerEncoding));var We=this._getResource(Ae);if(ze.authorization=this.authorization(Ae.method,We,Ae.subres,ze,this.options.headerEncoding),ee(this.options.endpoint.hostname)){var Ue=this.options,st=Ue.region,dt=Ue.internal,gt=Ue.secure,Et=ie(st,dt,gt);ze.host="".concat(Ae.bucket,".").concat(Et.host)}var Ke=ue.bind(this)(Ae);Ee("request %s %s, with headers %j, !!stream: %s",Ae.method,Ke,ze,!!Ae.stream);var et=Ae.timeout||this.options.timeout,$e={method:Ae.method,content:Ae.content,stream:Ae.stream,headers:ze,timeout:et,writeStream:Ae.writeStream,customResponse:Ae.customResponse,ctx:Ae.ctx||this.ctx};return this.agent&&($e.agent=this.agent),this.httpsAgent&&($e.httpsAgent=this.httpsAgent),$e.enableProxy=!!this.options.enableProxy,$e.proxy=this.options.proxy?this.options.proxy:null,{url:Ke,params:$e}}Ie.createRequest=Fe}).call(this)}).call(this,ae("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.entries.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.object.keys.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.dataFix=void 0;var me=ae("./isObject"),de=["true","TRUE","1",1],Ee=["false","FALSE","0",0];function we(ve,xe,fe){if(me.isObject(ve)){var z=xe.remove,ee=z===void 0?[]:z,oe=xe.rename,ie=oe===void 0?{}:oe,le=xe.camel,ue=le===void 0?[]:le,pe=xe.bool,Se=pe===void 0?[]:pe,Le=xe.lowerFirst,De=Le===void 0?!1:Le;return ee.forEach(function(Fe){return delete ve[Fe]}),Object.entries(ie).forEach(function(Fe){ve[Fe[0]]&&(ve[Fe[1]]||(ve[Fe[1]]=ve[Fe[0]],delete ve[Fe[0]]))}),ue.forEach(function(Fe){if(ve[Fe]){var Ae=Fe.replace(/^(.)/,function(Oe){return Oe.toLowerCase()}).replace(/-(\w)/g,function(Oe,ze){return ze.toUpperCase()});ve[Ae]||(ve[Ae]=ve[Fe])}}),Se.forEach(function(Fe){ve[Fe]=be(ve[Fe])}),typeof fe=="function"&&fe(ve),Te(ve,De),we}}Ie.dataFix=we;function be(ve){return ve?de.includes(ve)?!0:Ee.includes(ve)?!1:ve:!1}function Te(ve,xe){xe&&Object.keys(ve).forEach(function(fe){var z=fe.replace(/^\w/,function(ee){return ee.toLowerCase()});typeof ve[z]=="undefined"&&(ve[z]=ve[fe],delete ve[fe])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault");ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js");var de=me(ae("@babel/runtime/helpers/typeof"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.deepCopyWith=Ie.deepCopy=void 0;var Ee=ae("./isBuffer");Ie.deepCopy=function(we){if(we===null||(0,de.default)(we)!=="object")return we;if(Ee.isBuffer(we))return we.slice();var be=Array.isArray(we)?[]:{};return Object.keys(we).forEach(function(Te){be[Te]=Ie.deepCopy(we[Te])}),be},Ie.deepCopyWith=function(we,be){function Te(ve,xe,fe){var z=be(ve,xe,fe);if(z!==void 0)return z;if(ve===null||(0,de.default)(ve)!=="object")return ve;if(Ee.isBuffer(ve))return ve.slice();var ee=Array.isArray(ve)?[]:{};return Object.keys(ve).forEach(function(oe){ee[oe]=Te(ve[oe],oe,ve)}),ee}return be?Te(we,"",null):Ie.deepCopy(we)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(ae,Ge,Ie){(function(me){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.encoder=void 0;function de(Ee){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return we==="utf-8"?Ee:me.from(Ee).toString("latin1")}Ie.encoder=de}).call(this)}).call(this,ae("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.formatInventoryConfig=void 0;var me=ae("../utils/dataFix"),de=ae("../utils/isObject"),Ee=ae("../utils/isArray"),we=ae("../utils/formatObjKey");function be(ve){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xe&&de.isObject(ve)&&(ve=[ve]),Ee.isArray(ve)?ve=ve.map(Te):ve=Te(ve),ve}Ie.formatInventoryConfig=be;function Te(ve){return me.dataFix(ve,{bool:["IsEnabled"]},function(xe){var fe,z;xe.prefix=xe.Filter.Prefix,delete xe.Filter,xe.OSSBucketDestination=xe.Destination.OSSBucketDestination,xe.OSSBucketDestination.rolename=xe.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete xe.OSSBucketDestination.RoleArn,xe.OSSBucketDestination.bucket=xe.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete xe.OSSBucketDestination.Bucket,delete xe.Destination,xe.frequency=xe.Schedule.Frequency,delete xe.Schedule.Frequency,!((fe=xe==null?void 0:xe.OptionalFields)===null||fe===void 0)&&fe.Field&&!Ee.isArray((z=xe.OptionalFields)===null||z===void 0?void 0:z.Field)&&(xe.OptionalFields.Field=[xe.OptionalFields.Field])}),ve=we.formatObjKey(ve,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),ve}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault");ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.string.includes.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js");var de=me(ae("@babel/runtime/helpers/typeof"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.formatObjKey=void 0;function Ee(be,Te,ve){if(be===null||(0,de.default)(be)!=="object")return be;var xe;if(Array.isArray(be)){xe=[];for(var fe=0;fe<be.length;fe++)xe.push(Ee(be[fe],Te,ve))}else xe={},Object.keys(be).forEach(function(z){xe[we(z,Te,ve)]=Ee(be[z],Te,ve)});return xe}Ie.formatObjKey=Ee;function we(be,Te,ve){return ve&&ve.exclude&&ve.exclude.includes(be)||(Te==="firstUpperCase"?be=be.replace(/^./,function(xe){return xe.toUpperCase()}):Te==="firstLowerCase"&&(be=be.replace(/^./,function(xe){return xe.toLowerCase()}))),be}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.getStrBytesCount=void 0;function me(de){for(var Ee=0,we=0;we<de.length;we++){var be=de.charAt(we);/^[\u00-\uff]$/.test(be)?Ee+=1:Ee+=2}return Ee}Ie.getStrBytesCount=me},{"core-js/modules/es.regexp.exec.js":300}],63:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.object.to-string.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isArray=void 0,Ie.isArray=function(me){return Object.prototype.toString.call(me)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(ae,Ge,Ie){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isBlob=void 0;function me(de){return typeof Blob!="undefined"&&de instanceof Blob}Ie.isBlob=me},{}],65:[function(ae,Ge,Ie){(function(me){(function(){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isBuffer=void 0;function de(Ee){return me.isBuffer(Ee)}Ie.isBuffer=de}).call(this)}).call(this,{isBuffer:ae("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(ae,Ge,Ie){(function(me){(function(){"use strict";ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.string.includes.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isDingTalk=void 0;function de(){return!!(me.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}Ie.isDingTalk=de}).call(this)}).call(this,ae("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(ae,Ge,Ie){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isFile=void 0,Ie.isFile=function(me){return typeof File!="undefined"&&me instanceof File}},{}],68:[function(ae,Ge,Ie){"use strict";Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isFunction=void 0,Ie.isFunction=function(me){return typeof me=="function"}},{}],69:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isIP=void 0,Ie.isIP=function(me){var de=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,Ee=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return de.test(me)||Ee.test(me)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.object.to-string.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.isObject=void 0,Ie.isObject=function(me){return Object.prototype.toString.call(me)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.lowercaseKeyHeader=void 0;var me=ae("./isObject");function de(Ee){var we={};return me.isObject(Ee)&&Object.keys(Ee).forEach(function(be){we[be.toLowerCase()]=Ee[be]}),we}Ie.lowercaseKeyHeader=de},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.array.join.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.obj2xml=void 0;var me=ae("./formatObjKey");function de(we){return Object.prototype.toString.call(we).replace(/(.*? |])/g,"").toLowerCase()}function Ee(we,be){var Te="";return be&&be.headers&&(Te=`<?xml version="1.0" encoding="UTF-8"?>
`),be&&be.firstUpperCase&&(we=me.formatObjKey(we,"firstUpperCase")),de(we)==="object"?Object.keys(we).forEach(function(ve){de(we[ve])!=="undefined"&&de(we[ve])!=="null"&&(de(we[ve])==="string"||de(we[ve])==="number"?Te+="<".concat(ve,">").concat(we[ve],"</").concat(ve,">"):de(we[ve])==="object"?Te+="<".concat(ve,">").concat(Ee(we[ve]),"</").concat(ve,">"):de(we[ve])==="array"?Te+=we[ve].map(function(xe){return"<".concat(ve,">").concat(Ee(xe),"</").concat(ve,">")}).join(""):Te+="<".concat(ve,">").concat(we[ve].toString(),"</").concat(ve,">"))}):Te+=we.toString(),Te}Ie.obj2xml=Ee},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.array.from.js"),ae("core-js/modules/es.string.iterator.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.symbol.js"),ae("core-js/modules/es.symbol.description.js"),ae("core-js/modules/es.symbol.iterator.js"),ae("core-js/modules/es.array.iterator.js"),ae("core-js/modules/web.dom-collections.iterator.js"),ae("core-js/modules/es.object.assign.js");function me(be,Te){var ve=typeof Symbol!="undefined"&&be[Symbol.iterator]||be["@@iterator"];if(!ve){if(Array.isArray(be)||(ve=de(be))||Te&&be&&typeof be.length=="number"){ve&&(be=ve);var xe=0,fe=function(){};return{s:fe,n:function(){return xe>=be.length?{done:!0}:{done:!1,value:be[xe++]}},e:function(le){throw le},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var z=!0,ee=!1,oe;return{s:function(){ve=ve.call(be)},n:function(){var le=ve.next();return z=le.done,le},e:function(le){ee=!0,oe=le},f:function(){try{!z&&ve.return!=null&&ve.return()}finally{if(ee)throw oe}}}}function de(be,Te){if(be){if(typeof be=="string")return Ee(be,Te);var ve=Object.prototype.toString.call(be).slice(8,-1);if(ve==="Object"&&be.constructor&&(ve=be.constructor.name),ve==="Map"||ve==="Set")return Array.from(be);if(ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve))return Ee(be,Te)}}function Ee(be,Te){(Te==null||Te>be.length)&&(Te=be.length);for(var ve=0,xe=new Array(Te);ve<Te;ve++)xe[ve]=be[ve];return xe}Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.omit=void 0;function we(be,Te){var ve=Object.assign({},be),xe=me(Te),fe;try{for(xe.s();!(fe=xe.n()).done;){var z=fe.value;delete ve[z]}}catch(ee){xe.e(ee)}finally{xe.f()}return ve}Ie.omit=we},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.retry=void 0;function me(de,Ee){var we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},be=0,Te=we.retryDelay,ve=Te===void 0?500:Te,xe=we.errorHandler,fe=xe===void 0?function(){return!0}:xe,z=function ee(){for(var oe=arguments.length,ie=new Array(oe),le=0;le<oe;le++)ie[le]=arguments[le];return new Promise(function(ue,pe){de.apply(void 0,ie).then(function(Se){be=0,ue(Se)}).catch(function(Se){be<Ee&&fe(Se)?(be++,setTimeout(function(){ue(ee.apply(void 0,ie))},ve)):(be=0,pe(Se))})})};return z}Ie.retry=me},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(ae,Ge,Ie){"use strict";var me=function(be){return be&&be.__esModule?be:{default:be}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.setRegion=void 0;var de=me(ae("url")),Ee=ae("./checkConfigValid");function we(be){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Ee.checkConfigValid(be,"region");var xe=ve?"https://":"http://",fe=Te?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return be.substr(0,z.length)===z&&(fe=".aliyuncs.com"),de.default.parse(xe+be+fe)}Ie.setRegion=we},{"./checkConfigValid":52,url:472}],76:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.array.find.js"),ae("core-js/modules/es.object.assign.js");var Ee=me(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.checkCredentials=Ie.setSTSToken=void 0;var we=ae("./formatObjKey");function be(){return Te.apply(this,arguments)}function Te(){return Te=(0,Ee.default)(de.default.mark(function xe(){var fe,z;return de.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(this.options||(this.options={}),fe=new Date,!this.stsTokenFreshTime){oe.next=14;break}if(!(+fe-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){oe.next=12;break}return this.stsTokenFreshTime=fe,oe.next=7,this.options.refreshSTSToken();case 7:z=oe.sent,z=we.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),ve(z),Object.assign(this.options,z);case 12:oe.next=15;break;case 14:this.stsTokenFreshTime=fe;case 15:return oe.abrupt("return",null);case 16:case"end":return oe.stop()}},xe,this)})),Te.apply(this,arguments)}Ie.setSTSToken=be;function ve(xe){var fe=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(xe);fe.forEach(function(ee){if(!z.find(function(oe){return oe===ee}))throw Error("refreshSTSToken must return contains ".concat(ee))})}Ie.checkCredentials=ve},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(ae,Ge,Ie){function me(Ee,we,be,Te,ve,xe,fe){try{var z=Ee[xe](fe),ee=z.value}catch(oe){be(oe);return}z.done?we(ee):Promise.resolve(ee).then(Te,ve)}function de(Ee){return function(){var we=this,be=arguments;return new Promise(function(Te,ve){var xe=Ee.apply(we,be);function fe(ee){me(xe,Te,ve,fe,z,"next",ee)}function z(ee){me(xe,Te,ve,fe,z,"throw",ee)}fe(void 0)})}}Ge.exports=de,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],78:[function(ae,Ge,Ie){function me(de){return de&&de.__esModule?de:{default:de}}Ge.exports=me,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],79:[function(ae,Ge,Ie){function me(de){"@babel/helpers - typeof";return Ge.exports=me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ee){return typeof Ee}:function(Ee){return Ee&&typeof Symbol=="function"&&Ee.constructor===Symbol&&Ee!==Symbol.prototype?"symbol":typeof Ee},Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports,me(de)}Ge.exports=me,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],80:[function(ae,Ge,Ie){Ge.exports=ae("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(ae,Ge,Ie){Ge.exports=me,Ge.exports.HttpsAgent=me;function me(){}},{}],82:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=ae("object-assign");function Ee(st,dt){if(st===dt)return 0;for(var gt=st.length,Et=dt.length,Ke=0,et=Math.min(gt,Et);Ke<et;++Ke)if(st[Ke]!==dt[Ke]){gt=st[Ke],Et=dt[Ke];break}return gt<Et?-1:Et<gt?1:0}function we(st){return me.Buffer&&typeof me.Buffer.isBuffer=="function"?me.Buffer.isBuffer(st):!!(st!=null&&st._isBuffer)}var be=ae("util/"),Te=Object.prototype.hasOwnProperty,ve=Array.prototype.slice,xe=function(){return function(){}.name==="foo"}();function fe(st){return Object.prototype.toString.call(st)}function z(st){return we(st)||typeof me.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(st):st?!!(st instanceof DataView||st.buffer&&st.buffer instanceof ArrayBuffer):!1}var ee=Ge.exports=Le,oe=/\s*function\s+([^\(\s]*)\s*/;function ie(st){if(be.isFunction(st)){if(xe)return st.name;var dt=st.toString(),gt=dt.match(oe);return gt&&gt[1]}}ee.AssertionError=function(dt){this.name="AssertionError",this.actual=dt.actual,this.expected=dt.expected,this.operator=dt.operator,dt.message?(this.message=dt.message,this.generatedMessage=!1):(this.message=pe(this),this.generatedMessage=!0);var gt=dt.stackStartFunction||Se;if(Error.captureStackTrace)Error.captureStackTrace(this,gt);else{var Et=new Error;if(Et.stack){var Ke=Et.stack,et=ie(gt),$e=Ke.indexOf(`
`+et);if($e>=0){var vt=Ke.indexOf(`
`,$e+1);Ke=Ke.substring(vt+1)}this.stack=Ke}}},be.inherits(ee.AssertionError,Error);function le(st,dt){return typeof st=="string"?st.length<dt?st:st.slice(0,dt):st}function ue(st){if(xe||!be.isFunction(st))return be.inspect(st);var dt=ie(st),gt=dt?": "+dt:"";return"[Function"+gt+"]"}function pe(st){return le(ue(st.actual),128)+" "+st.operator+" "+le(ue(st.expected),128)}function Se(st,dt,gt,Et,Ke){throw new ee.AssertionError({message:gt,actual:st,expected:dt,operator:Et,stackStartFunction:Ke})}ee.fail=Se;function Le(st,dt){st||Se(st,!0,dt,"==",ee.ok)}ee.ok=Le,ee.equal=function(dt,gt,Et){dt!=gt&&Se(dt,gt,Et,"==",ee.equal)},ee.notEqual=function(dt,gt,Et){dt==gt&&Se(dt,gt,Et,"!=",ee.notEqual)},ee.deepEqual=function(dt,gt,Et){De(dt,gt,!1)||Se(dt,gt,Et,"deepEqual",ee.deepEqual)},ee.deepStrictEqual=function(dt,gt,Et){De(dt,gt,!0)||Se(dt,gt,Et,"deepStrictEqual",ee.deepStrictEqual)};function De(st,dt,gt,Et){if(st===dt)return!0;if(we(st)&&we(dt))return Ee(st,dt)===0;if(be.isDate(st)&&be.isDate(dt))return st.getTime()===dt.getTime();if(be.isRegExp(st)&&be.isRegExp(dt))return st.source===dt.source&&st.global===dt.global&&st.multiline===dt.multiline&&st.lastIndex===dt.lastIndex&&st.ignoreCase===dt.ignoreCase;if((st===null||typeof st!="object")&&(dt===null||typeof dt!="object"))return gt?st===dt:st==dt;if(z(st)&&z(dt)&&fe(st)===fe(dt)&&!(st instanceof Float32Array||st instanceof Float64Array))return Ee(new Uint8Array(st.buffer),new Uint8Array(dt.buffer))===0;if(we(st)!==we(dt))return!1;Et=Et||{actual:[],expected:[]};var Ke=Et.actual.indexOf(st);return Ke!==-1&&Ke===Et.expected.indexOf(dt)?!0:(Et.actual.push(st),Et.expected.push(dt),Ae(st,dt,gt,Et))}function Fe(st){return Object.prototype.toString.call(st)=="[object Arguments]"}function Ae(st,dt,gt,Et){if(st==null||dt===null||dt===void 0)return!1;if(be.isPrimitive(st)||be.isPrimitive(dt))return st===dt;if(gt&&Object.getPrototypeOf(st)!==Object.getPrototypeOf(dt))return!1;var Ke=Fe(st),et=Fe(dt);if(Ke&&!et||!Ke&&et)return!1;if(Ke)return st=ve.call(st),dt=ve.call(dt),De(st,dt,gt);var $e=Ue(st),vt=Ue(dt),wt,ht;if($e.length!==vt.length)return!1;for($e.sort(),vt.sort(),ht=$e.length-1;ht>=0;ht--)if($e[ht]!==vt[ht])return!1;for(ht=$e.length-1;ht>=0;ht--)if(wt=$e[ht],!De(st[wt],dt[wt],gt,Et))return!1;return!0}ee.notDeepEqual=function(dt,gt,Et){De(dt,gt,!1)&&Se(dt,gt,Et,"notDeepEqual",ee.notDeepEqual)},ee.notDeepStrictEqual=Oe;function Oe(st,dt,gt){De(st,dt,!0)&&Se(st,dt,gt,"notDeepStrictEqual",Oe)}ee.strictEqual=function(dt,gt,Et){dt!==gt&&Se(dt,gt,Et,"===",ee.strictEqual)},ee.notStrictEqual=function(dt,gt,Et){dt===gt&&Se(dt,gt,Et,"!==",ee.notStrictEqual)};function ze(st,dt){if(!st||!dt)return!1;if(Object.prototype.toString.call(dt)=="[object RegExp]")return dt.test(st);try{if(st instanceof dt)return!0}catch(gt){}return Error.isPrototypeOf(dt)?!1:dt.call({},st)===!0}function He(st){var dt;try{st()}catch(gt){dt=gt}return dt}function Ye(st,dt,gt,Et){var Ke;if(typeof dt!="function")throw new TypeError('"block" argument must be a function');typeof gt=="string"&&(Et=gt,gt=null),Ke=He(dt),Et=(gt&&gt.name?" ("+gt.name+").":".")+(Et?" "+Et:"."),st&&!Ke&&Se(Ke,gt,"Missing expected exception"+Et);var et=typeof Et=="string",$e=!st&&be.isError(Ke),vt=!st&&Ke&&!gt;if(($e&&et&&ze(Ke,gt)||vt)&&Se(Ke,gt,"Got unwanted exception"+Et),st&&Ke&&gt&&!ze(Ke,gt)||!st&&Ke)throw Ke}ee.throws=function(st,dt,gt){Ye(!0,st,dt,gt)},ee.doesNotThrow=function(st,dt,gt){Ye(!1,st,dt,gt)},ee.ifError=function(st){if(st)throw st};function We(st,dt){st||Se(st,!0,dt,"==",We)}ee.strict=de(We,ee,{equal:ee.strictEqual,deepEqual:ee.deepStrictEqual,notEqual:ee.notStrictEqual,notDeepEqual:ee.notDeepStrictEqual}),ee.strict.strict=ee.strict;var Ue=Object.keys||function(st){var dt=[];for(var gt in st)Te.call(st,gt)&&dt.push(gt);return dt}}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(ae,Ge,Ie){typeof Object.create=="function"?Ge.exports=function(de,Ee){de.super_=Ee,de.prototype=Object.create(Ee.prototype,{constructor:{value:de,enumerable:!1,writable:!0,configurable:!0}})}:Ge.exports=function(de,Ee){de.super_=Ee;var we=function(){};we.prototype=Ee.prototype,de.prototype=new we,de.prototype.constructor=de}},{}],84:[function(ae,Ge,Ie){Ge.exports=function(de){return de&&typeof de=="object"&&typeof de.copy=="function"&&typeof de.fill=="function"&&typeof de.readUInt8=="function"}},{}],85:[function(ae,Ge,Ie){(function(me,de){(function(){var Ee=/%[sdj%]/g;Ie.format=function(vt){if(!Ae(vt)){for(var wt=[],ht=0;ht<arguments.length;ht++)wt.push(Te(arguments[ht]));return wt.join(" ")}for(var ht=1,pt=arguments,ct=pt.length,Ct=String(vt).replace(Ee,function(yt){if(yt==="%%")return"%";if(ht>=ct)return yt;switch(yt){case"%s":return String(pt[ht++]);case"%d":return Number(pt[ht++]);case"%j":try{return JSON.stringify(pt[ht++])}catch(Tt){return"[Circular]"}default:return yt}}),xt=pt[ht];ht<ct;xt=pt[++ht])Le(xt)||!Ye(xt)?Ct+=" "+xt:Ct+=" "+Te(xt);return Ct},Ie.deprecate=function(vt,wt){if(ze(de.process))return function(){return Ie.deprecate(vt,wt).apply(this,arguments)};if(me.noDeprecation===!0)return vt;var ht=!1;function pt(){if(!ht){if(me.throwDeprecation)throw new Error(wt);me.traceDeprecation?console.trace(wt):console.error(wt),ht=!0}return vt.apply(this,arguments)}return pt};var we={},be;Ie.debuglog=function(vt){if(ze(be)&&(be=me.env.NODE_DEBUG||""),vt=vt.toUpperCase(),!we[vt])if(new RegExp("\\b"+vt+"\\b","i").test(be)){var wt=me.pid;we[vt]=function(){var ht=Ie.format.apply(Ie,arguments);console.error("%s %d: %s",vt,wt,ht)}}else we[vt]=function(){};return we[vt]};function Te(vt,wt){var ht={seen:[],stylize:xe};return arguments.length>=3&&(ht.depth=arguments[2]),arguments.length>=4&&(ht.colors=arguments[3]),Se(wt)?ht.showHidden=wt:wt&&Ie._extend(ht,wt),ze(ht.showHidden)&&(ht.showHidden=!1),ze(ht.depth)&&(ht.depth=2),ze(ht.colors)&&(ht.colors=!1),ze(ht.customInspect)&&(ht.customInspect=!0),ht.colors&&(ht.stylize=ve),z(ht,vt,ht.depth)}Ie.inspect=Te,Te.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Te.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ve(vt,wt){var ht=Te.styles[wt];return ht?"\x1B["+Te.colors[ht][0]+"m"+vt+"\x1B["+Te.colors[ht][1]+"m":vt}function xe(vt,wt){return vt}function fe(vt){var wt={};return vt.forEach(function(ht,pt){wt[ht]=!0}),wt}function z(vt,wt,ht){if(vt.customInspect&&wt&&st(wt.inspect)&&wt.inspect!==Ie.inspect&&!(wt.constructor&&wt.constructor.prototype===wt)){var pt=wt.inspect(ht,vt);return Ae(pt)||(pt=z(vt,pt,ht)),pt}var ct=ee(vt,wt);if(ct)return ct;var Ct=Object.keys(wt),xt=fe(Ct);if(vt.showHidden&&(Ct=Object.getOwnPropertyNames(wt)),Ue(wt)&&(Ct.indexOf("message")>=0||Ct.indexOf("description")>=0))return oe(wt);if(Ct.length===0){if(st(wt)){var yt=wt.name?": "+wt.name:"";return vt.stylize("[Function"+yt+"]","special")}if(He(wt))return vt.stylize(RegExp.prototype.toString.call(wt),"regexp");if(We(wt))return vt.stylize(Date.prototype.toString.call(wt),"date");if(Ue(wt))return oe(wt)}var Tt="",St=!1,nt=["{","}"];if(pe(wt)&&(St=!0,nt=["[","]"]),st(wt)){var Qe=wt.name?": "+wt.name:"";Tt=" [Function"+Qe+"]"}if(He(wt)&&(Tt=" "+RegExp.prototype.toString.call(wt)),We(wt)&&(Tt=" "+Date.prototype.toUTCString.call(wt)),Ue(wt)&&(Tt=" "+oe(wt)),Ct.length===0&&(!St||wt.length==0))return nt[0]+Tt+nt[1];if(ht<0)return He(wt)?vt.stylize(RegExp.prototype.toString.call(wt),"regexp"):vt.stylize("[Object]","special");vt.seen.push(wt);var Ce;return St?Ce=ie(vt,wt,ht,xt,Ct):Ce=Ct.map(function(Ne){return le(vt,wt,ht,xt,Ne,St)}),vt.seen.pop(),ue(Ce,Tt,nt)}function ee(vt,wt){if(ze(wt))return vt.stylize("undefined","undefined");if(Ae(wt)){var ht="'"+JSON.stringify(wt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return vt.stylize(ht,"string")}if(Fe(wt))return vt.stylize(""+wt,"number");if(Se(wt))return vt.stylize(""+wt,"boolean");if(Le(wt))return vt.stylize("null","null")}function oe(vt){return"["+Error.prototype.toString.call(vt)+"]"}function ie(vt,wt,ht,pt,ct){for(var Ct=[],xt=0,yt=wt.length;xt<yt;++xt)$e(wt,String(xt))?Ct.push(le(vt,wt,ht,pt,String(xt),!0)):Ct.push("");return ct.forEach(function(Tt){Tt.match(/^\d+$/)||Ct.push(le(vt,wt,ht,pt,Tt,!0))}),Ct}function le(vt,wt,ht,pt,ct,Ct){var xt,yt,Tt;if(Tt=Object.getOwnPropertyDescriptor(wt,ct)||{value:wt[ct]},Tt.get?Tt.set?yt=vt.stylize("[Getter/Setter]","special"):yt=vt.stylize("[Getter]","special"):Tt.set&&(yt=vt.stylize("[Setter]","special")),$e(pt,ct)||(xt="["+ct+"]"),yt||(vt.seen.indexOf(Tt.value)<0?(Le(ht)?yt=z(vt,Tt.value,null):yt=z(vt,Tt.value,ht-1),yt.indexOf(`
`)>-1&&(Ct?yt=yt.split(`
`).map(function(St){return" "+St}).join(`
`).substr(2):yt=`
`+yt.split(`
`).map(function(St){return" "+St}).join(`
`))):yt=vt.stylize("[Circular]","special")),ze(xt)){if(Ct&&ct.match(/^\d+$/))return yt;xt=JSON.stringify(""+ct),xt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(xt=xt.substr(1,xt.length-2),xt=vt.stylize(xt,"name")):(xt=xt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),xt=vt.stylize(xt,"string"))}return xt+": "+yt}function ue(vt,wt,ht){var pt=0,ct=vt.reduce(function(Ct,xt){return pt++,xt.indexOf(`
`)>=0&&pt++,Ct+xt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ct>60?ht[0]+(wt===""?"":wt+`
`)+" "+vt.join(`,
`)+" "+ht[1]:ht[0]+wt+" "+vt.join(", ")+" "+ht[1]}function pe(vt){return Array.isArray(vt)}Ie.isArray=pe;function Se(vt){return typeof vt=="boolean"}Ie.isBoolean=Se;function Le(vt){return vt===null}Ie.isNull=Le;function De(vt){return vt==null}Ie.isNullOrUndefined=De;function Fe(vt){return typeof vt=="number"}Ie.isNumber=Fe;function Ae(vt){return typeof vt=="string"}Ie.isString=Ae;function Oe(vt){return typeof vt=="symbol"}Ie.isSymbol=Oe;function ze(vt){return vt===void 0}Ie.isUndefined=ze;function He(vt){return Ye(vt)&&gt(vt)==="[object RegExp]"}Ie.isRegExp=He;function Ye(vt){return typeof vt=="object"&&vt!==null}Ie.isObject=Ye;function We(vt){return Ye(vt)&&gt(vt)==="[object Date]"}Ie.isDate=We;function Ue(vt){return Ye(vt)&&(gt(vt)==="[object Error]"||vt instanceof Error)}Ie.isError=Ue;function st(vt){return typeof vt=="function"}Ie.isFunction=st;function dt(vt){return vt===null||typeof vt=="boolean"||typeof vt=="number"||typeof vt=="string"||typeof vt=="symbol"||typeof vt=="undefined"}Ie.isPrimitive=dt,Ie.isBuffer=ae("./support/isBuffer");function gt(vt){return Object.prototype.toString.call(vt)}function Et(vt){return vt<10?"0"+vt.toString(10):vt.toString(10)}var Ke=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function et(){var vt=new Date,wt=[Et(vt.getHours()),Et(vt.getMinutes()),Et(vt.getSeconds())].join(":");return[vt.getDate(),Ke[vt.getMonth()],wt].join(" ")}Ie.log=function(){console.log("%s - %s",et(),Ie.format.apply(Ie,arguments))},Ie.inherits=ae("inherits"),Ie._extend=function(vt,wt){if(!wt||!Ye(wt))return vt;for(var ht=Object.keys(wt),pt=ht.length;pt--;)vt[ht[pt]]=wt[ht[pt]];return vt};function $e(vt,wt){return Object.prototype.hasOwnProperty.call(vt,wt)}}).call(this)}).call(this,ae("_process"),typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],Ee=typeof globalThis=="undefined"?me:globalThis;Ge.exports=function(){for(var be=[],Te=0;Te<de.length;Te++)typeof Ee[de[Te]]=="function"&&(be[be.length]=de[Te]);return be}}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(ae,Ge,Ie){"use strict";Ie.byteLength=xe,Ie.toByteArray=z,Ie.fromByteArray=ie;for(var me=[],de=[],Ee=typeof Uint8Array!="undefined"?Uint8Array:Array,we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=0,Te=we.length;be<Te;++be)me[be]=we[be],de[we.charCodeAt(be)]=be;de[45]=62,de[95]=63;function ve(le){var ue=le.length;if(ue%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var pe=le.indexOf("=");pe===-1&&(pe=ue);var Se=pe===ue?0:4-pe%4;return[pe,Se]}function xe(le){var ue=ve(le),pe=ue[0],Se=ue[1];return(pe+Se)*3/4-Se}function fe(le,ue,pe){return(ue+pe)*3/4-pe}function z(le){var ue,pe=ve(le),Se=pe[0],Le=pe[1],De=new Ee(fe(le,Se,Le)),Fe=0,Ae=Le>0?Se-4:Se,Oe;for(Oe=0;Oe<Ae;Oe+=4)ue=de[le.charCodeAt(Oe)]<<18|de[le.charCodeAt(Oe+1)]<<12|de[le.charCodeAt(Oe+2)]<<6|de[le.charCodeAt(Oe+3)],De[Fe++]=ue>>16&255,De[Fe++]=ue>>8&255,De[Fe++]=ue&255;return Le===2&&(ue=de[le.charCodeAt(Oe)]<<2|de[le.charCodeAt(Oe+1)]>>4,De[Fe++]=ue&255),Le===1&&(ue=de[le.charCodeAt(Oe)]<<10|de[le.charCodeAt(Oe+1)]<<4|de[le.charCodeAt(Oe+2)]>>2,De[Fe++]=ue>>8&255,De[Fe++]=ue&255),De}function ee(le){return me[le>>18&63]+me[le>>12&63]+me[le>>6&63]+me[le&63]}function oe(le,ue,pe){for(var Se,Le=[],De=ue;De<pe;De+=3)Se=(le[De]<<16&16711680)+(le[De+1]<<8&65280)+(le[De+2]&255),Le.push(ee(Se));return Le.join("")}function ie(le){for(var ue,pe=le.length,Se=pe%3,Le=[],De=16383,Fe=0,Ae=pe-Se;Fe<Ae;Fe+=De)Le.push(oe(le,Fe,Fe+De>Ae?Ae:Fe+De));return Se===1?(ue=le[pe-1],Le.push(me[ue>>2]+me[ue<<4&63]+"==")):Se===2&&(ue=(le[pe-2]<<8)+le[pe-1],Le.push(me[ue>>10]+me[ue>>4&63]+me[ue<<2&63]+"=")),Le.join("")}},{}],88:[function(ae,Ge,Ie){(function(me,de,Ee){typeof Ge!="undefined"&&Ge.exports?Ge.exports=Ee():typeof at=="function"&&at.amd?at(de,Ee):me[de]=Ee()})(this,"bowser",function(){var me=!0;function de(fe){function z(wt){var ht=fe.match(wt);return ht&&ht.length>1&&ht[1]||""}function ee(wt){var ht=fe.match(wt);return ht&&ht.length>1&&ht[2]||""}var oe=z(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(fe),le=!ie&&/android/i.test(fe),ue=/nexus\s*[0-6]\s*/i.test(fe),pe=!ue&&/nexus\s*[0-9]+/i.test(fe),Se=/CrOS/.test(fe),Le=/silk/i.test(fe),De=/sailfish/i.test(fe),Fe=/tizen/i.test(fe),Ae=/(web|hpw)(o|0)s/i.test(fe),Oe=/windows phone/i.test(fe),ze=/SamsungBrowser/i.test(fe),He=!Oe&&/windows/i.test(fe),Ye=!oe&&!Le&&/macintosh/i.test(fe),We=!le&&!De&&!Fe&&!Ae&&/linux/i.test(fe),Ue=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),st=z(/version\/(\d+(\.\d+)?)/i),dt=/tablet/i.test(fe)&&!/tablet pc/i.test(fe),gt=!dt&&/[^-]mobi/i.test(fe),Et=/xbox/i.test(fe),Ke;/opera/i.test(fe)?Ke={name:"Opera",opera:me,version:st||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(fe)?Ke={name:"Opera",opera:me,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||st}:/SamsungBrowser/i.test(fe)?Ke={name:"Samsung Internet for Android",samsungBrowser:me,version:st||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(fe)?Ke={name:"NAVER Whale browser",whale:me,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(fe)?Ke={name:"MZ Browser",mzbrowser:me,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(fe)?Ke={name:"Opera Coast",coast:me,version:st||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(fe)?Ke={name:"Focus",focus:me,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(fe)?Ke={name:"Yandex Browser",yandexbrowser:me,version:st||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(fe)?Ke={name:"UC Browser",ucbrowser:me,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(fe)?Ke={name:"Maxthon",maxthon:me,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(fe)?Ke={name:"Epiphany",epiphany:me,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(fe)?Ke={name:"Puffin",puffin:me,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(fe)?Ke={name:"Sleipnir",sleipnir:me,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(fe)?Ke={name:"K-Meleon",kMeleon:me,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Oe?(Ke={name:"Windows Phone",osname:"Windows Phone",windowsphone:me},Ue?(Ke.msedge=me,Ke.version=Ue):(Ke.msie=me,Ke.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(fe)?Ke={name:"Internet Explorer",msie:me,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Se?Ke={name:"Chrome",osname:"Chrome OS",chromeos:me,chromeBook:me,chrome:me,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(fe)?Ke={name:"Microsoft Edge",msedge:me,version:Ue}:/vivaldi/i.test(fe)?Ke={name:"Vivaldi",vivaldi:me,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||st}:De?Ke={name:"Sailfish",osname:"Sailfish OS",sailfish:me,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(fe)?Ke={name:"SeaMonkey",seamonkey:me,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(fe)?(Ke={name:"Firefox",firefox:me,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(fe)&&(Ke.firefoxos=me,Ke.osname="Firefox OS")):Le?Ke={name:"Amazon Silk",silk:me,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(fe)?Ke={name:"PhantomJS",phantom:me,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(fe)?Ke={name:"SlimerJS",slimer:me,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(fe)||/rim\stablet/i.test(fe)?Ke={name:"BlackBerry",osname:"BlackBerry OS",blackberry:me,version:st||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ae?(Ke={name:"WebOS",osname:"WebOS",webos:me,version:st||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(fe)&&(Ke.touchpad=me)):/bada/i.test(fe)?Ke={name:"Bada",osname:"Bada",bada:me,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Fe?Ke={name:"Tizen",osname:"Tizen",tizen:me,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||st}:/qupzilla/i.test(fe)?Ke={name:"QupZilla",qupzilla:me,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||st}:/chromium/i.test(fe)?Ke={name:"Chromium",chromium:me,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||st}:/chrome|crios|crmo/i.test(fe)?Ke={name:"Chrome",chrome:me,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?Ke={name:"Android",version:st}:/safari|applewebkit/i.test(fe)?(Ke={name:"Safari",safari:me},st&&(Ke.version=st)):oe?(Ke={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},st&&(Ke.version=st)):/googlebot/i.test(fe)?Ke={name:"Googlebot",googlebot:me,version:z(/googlebot\/(\d+(\.\d+))/i)||st}:Ke={name:z(/^(.*)\/(.*) /),version:ee(/^(.*)\/(.*) /)},!Ke.msedge&&/(apple)?webkit/i.test(fe)?(/(apple)?webkit\/537\.36/i.test(fe)?(Ke.name=Ke.name||"Blink",Ke.blink=me):(Ke.name=Ke.name||"Webkit",Ke.webkit=me),!Ke.version&&st&&(Ke.version=st)):!Ke.opera&&/gecko\//i.test(fe)&&(Ke.name=Ke.name||"Gecko",Ke.gecko=me,Ke.version=Ke.version||z(/gecko\/(\d+(\.\d+)?)/i)),!Ke.windowsphone&&(le||Ke.silk)?(Ke.android=me,Ke.osname="Android"):!Ke.windowsphone&&oe?(Ke[oe]=me,Ke.ios=me,Ke.osname="iOS"):Ye?(Ke.mac=me,Ke.osname="macOS"):Et?(Ke.xbox=me,Ke.osname="Xbox"):He?(Ke.windows=me,Ke.osname="Windows"):We&&(Ke.linux=me,Ke.osname="Linux");function et(wt){switch(wt){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var $e="";Ke.windows?$e=et(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Ke.windowsphone?$e=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Ke.mac?($e=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),$e=$e.replace(/[_\s]/g,".")):oe?($e=z(/os (\d+([_\s]\d+)*) like mac os x/i),$e=$e.replace(/[_\s]/g,".")):le?$e=z(/android[ \/-](\d+(\.\d+)*)/i):Ke.webos?$e=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Ke.blackberry?$e=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Ke.bada?$e=z(/bada\/(\d+(\.\d+)*)/i):Ke.tizen&&($e=z(/tizen[\/\s](\d+(\.\d+)*)/i)),$e&&(Ke.osversion=$e);var vt=!Ke.windows&&$e.split(".")[0];return dt||pe||oe=="ipad"||le&&(vt==3||vt>=4&&!gt)||Ke.silk?Ke.tablet=me:(gt||oe=="iphone"||oe=="ipod"||le||ue||Ke.blackberry||Ke.webos||Ke.bada)&&(Ke.mobile=me),Ke.msedge||Ke.msie&&Ke.version>=10||Ke.yandexbrowser&&Ke.version>=15||Ke.vivaldi&&Ke.version>=1||Ke.chrome&&Ke.version>=20||Ke.samsungBrowser&&Ke.version>=4||Ke.whale&&Te([Ke.version,"1.0"])===1||Ke.mzbrowser&&Te([Ke.version,"6.0"])===1||Ke.focus&&Te([Ke.version,"1.0"])===1||Ke.firefox&&Ke.version>=20||Ke.safari&&Ke.version>=6||Ke.opera&&Ke.version>=10||Ke.ios&&Ke.osversion&&Ke.osversion.split(".")[0]>=6||Ke.blackberry&&Ke.version>=10.1||Ke.chromium&&Ke.version>=20?Ke.a=me:Ke.msie&&Ke.version<10||Ke.chrome&&Ke.version<20||Ke.firefox&&Ke.version<20||Ke.safari&&Ke.version<6||Ke.opera&&Ke.version<10||Ke.ios&&Ke.osversion&&Ke.osversion.split(".")[0]<6||Ke.chromium&&Ke.version<20?Ke.c=me:Ke.x=me,Ke}var Ee=de(typeof navigator!="undefined"&&navigator.userAgent||"");Ee.test=function(fe){for(var z=0;z<fe.length;++z){var ee=fe[z];if(typeof ee=="string"&&ee in Ee)return!0}return!1};function we(fe){return fe.split(".").length}function be(fe,z){var ee=[],oe;if(Array.prototype.map)return Array.prototype.map.call(fe,z);for(oe=0;oe<fe.length;oe++)ee.push(z(fe[oe]));return ee}function Te(fe){for(var z=Math.max(we(fe[0]),we(fe[1])),ee=be(fe,function(oe){var ie=z-we(oe);return oe=oe+new Array(ie+1).join(".0"),be(oe.split("."),function(le){return new Array(20-le.length).join("0")+le}).reverse()});--z>=0;){if(ee[0][z]>ee[1][z])return 1;if(ee[0][z]===ee[1][z]){if(z===0)return 0}else return-1}}function ve(fe,z,ee){var oe=Ee;typeof z=="string"&&(ee=z,z=void 0),z===void 0&&(z=!1),ee&&(oe=de(ee));var ie=""+oe.version;for(var le in fe)if(fe.hasOwnProperty(le)&&oe[le]){if(typeof fe[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(fe));return Te([ie,fe[le]])<0}return z}function xe(fe,z,ee){return!ve(fe,z,ee)}return Ee.isUnsupportedBrowser=ve,Ee.compareVersions=Te,Ee.check=xe,Ee._detect=de,Ee.detect=de,Ee})},{}],89:[function(ae,Ge,Ie){},{}],90:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=ae("base64-js"),Ee=ae("ieee754");Ie.Buffer=ve,Ie.SlowBuffer=Se,Ie.INSPECT_MAX_BYTES=50;var we=2147483647;Ie.kMaxLength=we,ve.TYPED_ARRAY_SUPPORT=be(),!ve.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 be(){try{var _e=new Uint8Array(1);return _e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},_e.foo()===42}catch(Xe){return!1}}Object.defineProperty(ve.prototype,"parent",{enumerable:!0,get:function(){if(ve.isBuffer(this))return this.buffer}}),Object.defineProperty(ve.prototype,"offset",{enumerable:!0,get:function(){if(ve.isBuffer(this))return this.byteOffset}});function Te(_e){if(_e>we)throw new RangeError('The value "'+_e+'" is invalid for option "size"');var Xe=new Uint8Array(_e);return Xe.__proto__=ve.prototype,Xe}function ve(_e,Xe,lt){if(typeof _e=="number"){if(typeof Xe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ee(_e)}return xe(_e,Xe,lt)}typeof Symbol!="undefined"&&Symbol.species!=null&&ve[Symbol.species]===ve&&Object.defineProperty(ve,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),ve.poolSize=8192;function xe(_e,Xe,lt){if(typeof _e=="string")return oe(_e,Xe);if(ArrayBuffer.isView(_e))return ie(_e);if(_e==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e);if(rt(_e,ArrayBuffer)||_e&&rt(_e.buffer,ArrayBuffer))return le(_e,Xe,lt);if(typeof _e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Pt=_e.valueOf&&_e.valueOf();if(Pt!=null&&Pt!==_e)return ve.from(Pt,Xe,lt);var kt=ue(_e);if(kt)return kt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof _e[Symbol.toPrimitive]=="function")return ve.from(_e[Symbol.toPrimitive]("string"),Xe,lt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e)}ve.from=function(_e,Xe,lt){return xe(_e,Xe,lt)},ve.prototype.__proto__=Uint8Array.prototype,ve.__proto__=Uint8Array;function fe(_e){if(typeof _e!="number")throw new TypeError('"size" argument must be of type number');if(_e<0)throw new RangeError('The value "'+_e+'" is invalid for option "size"')}function z(_e,Xe,lt){return fe(_e),_e<=0?Te(_e):Xe!==void 0?typeof lt=="string"?Te(_e).fill(Xe,lt):Te(_e).fill(Xe):Te(_e)}ve.alloc=function(_e,Xe,lt){return z(_e,Xe,lt)};function ee(_e){return fe(_e),Te(_e<0?0:pe(_e)|0)}ve.allocUnsafe=function(_e){return ee(_e)},ve.allocUnsafeSlow=function(_e){return ee(_e)};function oe(_e,Xe){if((typeof Xe!="string"||Xe==="")&&(Xe="utf8"),!ve.isEncoding(Xe))throw new TypeError("Unknown encoding: "+Xe);var lt=Le(_e,Xe)|0,Pt=Te(lt),kt=Pt.write(_e,Xe);return kt!==lt&&(Pt=Pt.slice(0,kt)),Pt}function ie(_e){for(var Xe=_e.length<0?0:pe(_e.length)|0,lt=Te(Xe),Pt=0;Pt<Xe;Pt+=1)lt[Pt]=_e[Pt]&255;return lt}function le(_e,Xe,lt){if(Xe<0||_e.byteLength<Xe)throw new RangeError('"offset" is outside of buffer bounds');if(_e.byteLength<Xe+(lt||0))throw new RangeError('"length" is outside of buffer bounds');var Pt;return Xe===void 0&&lt===void 0?Pt=new Uint8Array(_e):lt===void 0?Pt=new Uint8Array(_e,Xe):Pt=new Uint8Array(_e,Xe,lt),Pt.__proto__=ve.prototype,Pt}function ue(_e){if(ve.isBuffer(_e)){var Xe=pe(_e.length)|0,lt=Te(Xe);return lt.length===0||_e.copy(lt,0,0,Xe),lt}if(_e.length!==void 0)return typeof _e.length!="number"||Be(_e.length)?Te(0):ie(_e);if(_e.type==="Buffer"&&Array.isArray(_e.data))return ie(_e.data)}function pe(_e){if(_e>=we)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+we.toString(16)+" bytes");return _e|0}function Se(_e){return+_e!=_e&&(_e=0),ve.alloc(+_e)}ve.isBuffer=function(Xe){return Xe!=null&&Xe._isBuffer===!0&&Xe!==ve.prototype},ve.compare=function(Xe,lt){if(rt(Xe,Uint8Array)&&(Xe=ve.from(Xe,Xe.offset,Xe.byteLength)),rt(lt,Uint8Array)&&(lt=ve.from(lt,lt.offset,lt.byteLength)),!ve.isBuffer(Xe)||!ve.isBuffer(lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Xe===lt)return 0;for(var Pt=Xe.length,kt=lt.length,zt=0,jt=Math.min(Pt,kt);zt<jt;++zt)if(Xe[zt]!==lt[zt]){Pt=Xe[zt],kt=lt[zt];break}return Pt<kt?-1:kt<Pt?1:0},ve.isEncoding=function(Xe){switch(String(Xe).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}},ve.concat=function(Xe,lt){if(!Array.isArray(Xe))throw new TypeError('"list" argument must be an Array of Buffers');if(Xe.length===0)return ve.alloc(0);var Pt;if(lt===void 0)for(lt=0,Pt=0;Pt<Xe.length;++Pt)lt+=Xe[Pt].length;var kt=ve.allocUnsafe(lt),zt=0;for(Pt=0;Pt<Xe.length;++Pt){var jt=Xe[Pt];if(rt(jt,Uint8Array)&&(jt=ve.from(jt)),!ve.isBuffer(jt))throw new TypeError('"list" argument must be an Array of Buffers');jt.copy(kt,zt),zt+=jt.length}return kt};function Le(_e,Xe){if(ve.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||rt(_e,ArrayBuffer))return _e.byteLength;if(typeof _e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _e);var lt=_e.length,Pt=arguments.length>2&&arguments[2]===!0;if(!Pt&&lt===0)return 0;for(var kt=!1;;)switch(Xe){case"ascii":case"latin1":case"binary":return lt;case"utf8":case"utf-8":return nt(_e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lt*2;case"hex":return lt>>>1;case"base64":return Ne(_e).length;default:if(kt)return Pt?-1:nt(_e).length;Xe=(""+Xe).toLowerCase(),kt=!0}}ve.byteLength=Le;function De(_e,Xe,lt){var Pt=!1;if((Xe===void 0||Xe<0)&&(Xe=0),Xe>this.length||((lt===void 0||lt>this.length)&&(lt=this.length),lt<=0)||(lt>>>=0,Xe>>>=0,lt<=Xe))return"";for(_e||(_e="utf8");;)switch(_e){case"hex":return vt(this,Xe,lt);case"utf8":case"utf-8":return gt(this,Xe,lt);case"ascii":return et(this,Xe,lt);case"latin1":case"binary":return $e(this,Xe,lt);case"base64":return dt(this,Xe,lt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wt(this,Xe,lt);default:if(Pt)throw new TypeError("Unknown encoding: "+_e);_e=(_e+"").toLowerCase(),Pt=!0}}ve.prototype._isBuffer=!0;function Fe(_e,Xe,lt){var Pt=_e[Xe];_e[Xe]=_e[lt],_e[lt]=Pt}ve.prototype.swap16=function(){var Xe=this.length;if(Xe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var lt=0;lt<Xe;lt+=2)Fe(this,lt,lt+1);return this},ve.prototype.swap32=function(){var Xe=this.length;if(Xe%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var lt=0;lt<Xe;lt+=4)Fe(this,lt,lt+3),Fe(this,lt+1,lt+2);return this},ve.prototype.swap64=function(){var Xe=this.length;if(Xe%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var lt=0;lt<Xe;lt+=8)Fe(this,lt,lt+7),Fe(this,lt+1,lt+6),Fe(this,lt+2,lt+5),Fe(this,lt+3,lt+4);return this},ve.prototype.toString=function(){var Xe=this.length;return Xe===0?"":arguments.length===0?gt(this,0,Xe):De.apply(this,arguments)},ve.prototype.toLocaleString=ve.prototype.toString,ve.prototype.equals=function(Xe){if(!ve.isBuffer(Xe))throw new TypeError("Argument must be a Buffer");return this===Xe?!0:ve.compare(this,Xe)===0},ve.prototype.inspect=function(){var Xe="",lt=Ie.INSPECT_MAX_BYTES;return Xe=this.toString("hex",0,lt).replace(/(.{2})/g,"$1 ").trim(),this.length>lt&&(Xe+=" ... "),"<Buffer "+Xe+">"},ve.prototype.compare=function(Xe,lt,Pt,kt,zt){if(rt(Xe,Uint8Array)&&(Xe=ve.from(Xe,Xe.offset,Xe.byteLength)),!ve.isBuffer(Xe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Xe);if(lt===void 0&&(lt=0),Pt===void 0&&(Pt=Xe?Xe.length:0),kt===void 0&&(kt=0),zt===void 0&&(zt=this.length),lt<0||Pt>Xe.length||kt<0||zt>this.length)throw new RangeError("out of range index");if(kt>=zt&&lt>=Pt)return 0;if(kt>=zt)return-1;if(lt>=Pt)return 1;if(lt>>>=0,Pt>>>=0,kt>>>=0,zt>>>=0,this===Xe)return 0;for(var jt=zt-kt,Ht=Pt-lt,ln=Math.min(jt,Ht),an=this.slice(kt,zt),sn=Xe.slice(lt,Pt),$t=0;$t<ln;++$t)if(an[$t]!==sn[$t]){jt=an[$t],Ht=sn[$t];break}return jt<Ht?-1:Ht<jt?1:0};function Ae(_e,Xe,lt,Pt,kt){if(_e.length===0)return-1;if(typeof lt=="string"?(Pt=lt,lt=0):lt>2147483647?lt=2147483647:lt<-2147483648&&(lt=-2147483648),lt=+lt,Be(lt)&&(lt=kt?0:_e.length-1),lt<0&&(lt=_e.length+lt),lt>=_e.length){if(kt)return-1;lt=_e.length-1}else if(lt<0)if(kt)lt=0;else return-1;if(typeof Xe=="string"&&(Xe=ve.from(Xe,Pt)),ve.isBuffer(Xe))return Xe.length===0?-1:Oe(_e,Xe,lt,Pt,kt);if(typeof Xe=="number")return Xe=Xe&255,typeof Uint8Array.prototype.indexOf=="function"?kt?Uint8Array.prototype.indexOf.call(_e,Xe,lt):Uint8Array.prototype.lastIndexOf.call(_e,Xe,lt):Oe(_e,[Xe],lt,Pt,kt);throw new TypeError("val must be string, number or Buffer")}function Oe(_e,Xe,lt,Pt,kt){var zt=1,jt=_e.length,Ht=Xe.length;if(Pt!==void 0&&(Pt=String(Pt).toLowerCase(),Pt==="ucs2"||Pt==="ucs-2"||Pt==="utf16le"||Pt==="utf-16le")){if(_e.length<2||Xe.length<2)return-1;zt=2,jt/=2,Ht/=2,lt/=2}function ln(un,mn){return zt===1?un[mn]:un.readUInt16BE(mn*zt)}var an;if(kt){var sn=-1;for(an=lt;an<jt;an++)if(ln(_e,an)===ln(Xe,sn===-1?0:an-sn)){if(sn===-1&&(sn=an),an-sn+1===Ht)return sn*zt}else sn!==-1&&(an-=an-sn),sn=-1}else for(lt+Ht>jt&&(lt=jt-Ht),an=lt;an>=0;an--){for(var $t=!0,On=0;On<Ht;On++)if(ln(_e,an+On)!==ln(Xe,On)){$t=!1;break}if($t)return an}return-1}ve.prototype.includes=function(Xe,lt,Pt){return this.indexOf(Xe,lt,Pt)!==-1},ve.prototype.indexOf=function(Xe,lt,Pt){return Ae(this,Xe,lt,Pt,!0)},ve.prototype.lastIndexOf=function(Xe,lt,Pt){return Ae(this,Xe,lt,Pt,!1)};function ze(_e,Xe,lt,Pt){lt=Number(lt)||0;var kt=_e.length-lt;Pt?(Pt=Number(Pt),Pt>kt&&(Pt=kt)):Pt=kt;var zt=Xe.length;Pt>zt/2&&(Pt=zt/2);for(var jt=0;jt<Pt;++jt){var Ht=parseInt(Xe.substr(jt*2,2),16);if(Be(Ht))return jt;_e[lt+jt]=Ht}return jt}function He(_e,Xe,lt,Pt){return Je(nt(Xe,_e.length-lt),_e,lt,Pt)}function Ye(_e,Xe,lt,Pt){return Je(Qe(Xe),_e,lt,Pt)}function We(_e,Xe,lt,Pt){return Ye(_e,Xe,lt,Pt)}function Ue(_e,Xe,lt,Pt){return Je(Ne(Xe),_e,lt,Pt)}function st(_e,Xe,lt,Pt){return Je(Ce(Xe,_e.length-lt),_e,lt,Pt)}ve.prototype.write=function(Xe,lt,Pt,kt){if(lt===void 0)kt="utf8",Pt=this.length,lt=0;else if(Pt===void 0&&typeof lt=="string")kt=lt,Pt=this.length,lt=0;else if(isFinite(lt))lt=lt>>>0,isFinite(Pt)?(Pt=Pt>>>0,kt===void 0&&(kt="utf8")):(kt=Pt,Pt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var zt=this.length-lt;if((Pt===void 0||Pt>zt)&&(Pt=zt),Xe.length>0&&(Pt<0||lt<0)||lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");kt||(kt="utf8");for(var jt=!1;;)switch(kt){case"hex":return ze(this,Xe,lt,Pt);case"utf8":case"utf-8":return He(this,Xe,lt,Pt);case"ascii":return Ye(this,Xe,lt,Pt);case"latin1":case"binary":return We(this,Xe,lt,Pt);case"base64":return Ue(this,Xe,lt,Pt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,Xe,lt,Pt);default:if(jt)throw new TypeError("Unknown encoding: "+kt);kt=(""+kt).toLowerCase(),jt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function dt(_e,Xe,lt){return Xe===0&&lt===_e.length?de.fromByteArray(_e):de.fromByteArray(_e.slice(Xe,lt))}function gt(_e,Xe,lt){lt=Math.min(_e.length,lt);for(var Pt=[],kt=Xe;kt<lt;){var zt=_e[kt],jt=null,Ht=zt>239?4:zt>223?3:zt>191?2:1;if(kt+Ht<=lt){var ln,an,sn,$t;switch(Ht){case 1:zt<128&&(jt=zt);break;case 2:ln=_e[kt+1],(ln&192)===128&&($t=(zt&31)<<6|ln&63,$t>127&&(jt=$t));break;case 3:ln=_e[kt+1],an=_e[kt+2],(ln&192)===128&&(an&192)===128&&($t=(zt&15)<<12|(ln&63)<<6|an&63,$t>2047&&($t<55296||$t>57343)&&(jt=$t));break;case 4:ln=_e[kt+1],an=_e[kt+2],sn=_e[kt+3],(ln&192)===128&&(an&192)===128&&(sn&192)===128&&($t=(zt&15)<<18|(ln&63)<<12|(an&63)<<6|sn&63,$t>65535&&$t<1114112&&(jt=$t))}}jt===null?(jt=65533,Ht=1):jt>65535&&(jt-=65536,Pt.push(jt>>>10&1023|55296),jt=56320|jt&1023),Pt.push(jt),kt+=Ht}return Ke(Pt)}var Et=4096;function Ke(_e){var Xe=_e.length;if(Xe<=Et)return String.fromCharCode.apply(String,_e);for(var lt="",Pt=0;Pt<Xe;)lt+=String.fromCharCode.apply(String,_e.slice(Pt,Pt+=Et));return lt}function et(_e,Xe,lt){var Pt="";lt=Math.min(_e.length,lt);for(var kt=Xe;kt<lt;++kt)Pt+=String.fromCharCode(_e[kt]&127);return Pt}function $e(_e,Xe,lt){var Pt="";lt=Math.min(_e.length,lt);for(var kt=Xe;kt<lt;++kt)Pt+=String.fromCharCode(_e[kt]);return Pt}function vt(_e,Xe,lt){var Pt=_e.length;(!Xe||Xe<0)&&(Xe=0),(!lt||lt<0||lt>Pt)&&(lt=Pt);for(var kt="",zt=Xe;zt<lt;++zt)kt+=St(_e[zt]);return kt}function wt(_e,Xe,lt){for(var Pt=_e.slice(Xe,lt),kt="",zt=0;zt<Pt.length;zt+=2)kt+=String.fromCharCode(Pt[zt]+Pt[zt+1]*256);return kt}ve.prototype.slice=function(Xe,lt){var Pt=this.length;Xe=~~Xe,lt=lt===void 0?Pt:~~lt,Xe<0?(Xe+=Pt,Xe<0&&(Xe=0)):Xe>Pt&&(Xe=Pt),lt<0?(lt+=Pt,lt<0&&(lt=0)):lt>Pt&&(lt=Pt),lt<Xe&&(lt=Xe);var kt=this.subarray(Xe,lt);return kt.__proto__=ve.prototype,kt};function ht(_e,Xe,lt){if(_e%1!==0||_e<0)throw new RangeError("offset is not uint");if(_e+Xe>lt)throw new RangeError("Trying to access beyond buffer length")}ve.prototype.readUIntLE=function(Xe,lt,Pt){Xe=Xe>>>0,lt=lt>>>0,Pt||ht(Xe,lt,this.length);for(var kt=this[Xe],zt=1,jt=0;++jt<lt&&(zt*=256);)kt+=this[Xe+jt]*zt;return kt},ve.prototype.readUIntBE=function(Xe,lt,Pt){Xe=Xe>>>0,lt=lt>>>0,Pt||ht(Xe,lt,this.length);for(var kt=this[Xe+--lt],zt=1;lt>0&&(zt*=256);)kt+=this[Xe+--lt]*zt;return kt},ve.prototype.readUInt8=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,1,this.length),this[Xe]},ve.prototype.readUInt16LE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,2,this.length),this[Xe]|this[Xe+1]<<8},ve.prototype.readUInt16BE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,2,this.length),this[Xe]<<8|this[Xe+1]},ve.prototype.readUInt32LE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,4,this.length),(this[Xe]|this[Xe+1]<<8|this[Xe+2]<<16)+this[Xe+3]*16777216},ve.prototype.readUInt32BE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,4,this.length),this[Xe]*16777216+(this[Xe+1]<<16|this[Xe+2]<<8|this[Xe+3])},ve.prototype.readIntLE=function(Xe,lt,Pt){Xe=Xe>>>0,lt=lt>>>0,Pt||ht(Xe,lt,this.length);for(var kt=this[Xe],zt=1,jt=0;++jt<lt&&(zt*=256);)kt+=this[Xe+jt]*zt;return zt*=128,kt>=zt&&(kt-=Math.pow(2,8*lt)),kt},ve.prototype.readIntBE=function(Xe,lt,Pt){Xe=Xe>>>0,lt=lt>>>0,Pt||ht(Xe,lt,this.length);for(var kt=lt,zt=1,jt=this[Xe+--kt];kt>0&&(zt*=256);)jt+=this[Xe+--kt]*zt;return zt*=128,jt>=zt&&(jt-=Math.pow(2,8*lt)),jt},ve.prototype.readInt8=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,1,this.length),this[Xe]&128?(255-this[Xe]+1)*-1:this[Xe]},ve.prototype.readInt16LE=function(Xe,lt){Xe=Xe>>>0,lt||ht(Xe,2,this.length);var Pt=this[Xe]|this[Xe+1]<<8;return Pt&32768?Pt|4294901760:Pt},ve.prototype.readInt16BE=function(Xe,lt){Xe=Xe>>>0,lt||ht(Xe,2,this.length);var Pt=this[Xe+1]|this[Xe]<<8;return Pt&32768?Pt|4294901760:Pt},ve.prototype.readInt32LE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,4,this.length),this[Xe]|this[Xe+1]<<8|this[Xe+2]<<16|this[Xe+3]<<24},ve.prototype.readInt32BE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,4,this.length),this[Xe]<<24|this[Xe+1]<<16|this[Xe+2]<<8|this[Xe+3]},ve.prototype.readFloatLE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,4,this.length),Ee.read(this,Xe,!0,23,4)},ve.prototype.readFloatBE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,4,this.length),Ee.read(this,Xe,!1,23,4)},ve.prototype.readDoubleLE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,8,this.length),Ee.read(this,Xe,!0,52,8)},ve.prototype.readDoubleBE=function(Xe,lt){return Xe=Xe>>>0,lt||ht(Xe,8,this.length),Ee.read(this,Xe,!1,52,8)};function pt(_e,Xe,lt,Pt,kt,zt){if(!ve.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(Xe>kt||Xe<zt)throw new RangeError('"value" argument is out of bounds');if(lt+Pt>_e.length)throw new RangeError("Index out of range")}ve.prototype.writeUIntLE=function(Xe,lt,Pt,kt){if(Xe=+Xe,lt=lt>>>0,Pt=Pt>>>0,!kt){var zt=Math.pow(2,8*Pt)-1;pt(this,Xe,lt,Pt,zt,0)}var jt=1,Ht=0;for(this[lt]=Xe&255;++Ht<Pt&&(jt*=256);)this[lt+Ht]=Xe/jt&255;return lt+Pt},ve.prototype.writeUIntBE=function(Xe,lt,Pt,kt){if(Xe=+Xe,lt=lt>>>0,Pt=Pt>>>0,!kt){var zt=Math.pow(2,8*Pt)-1;pt(this,Xe,lt,Pt,zt,0)}var jt=Pt-1,Ht=1;for(this[lt+jt]=Xe&255;--jt>=0&&(Ht*=256);)this[lt+jt]=Xe/Ht&255;return lt+Pt},ve.prototype.writeUInt8=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,1,255,0),this[lt]=Xe&255,lt+1},ve.prototype.writeUInt16LE=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,2,65535,0),this[lt]=Xe&255,this[lt+1]=Xe>>>8,lt+2},ve.prototype.writeUInt16BE=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,2,65535,0),this[lt]=Xe>>>8,this[lt+1]=Xe&255,lt+2},ve.prototype.writeUInt32LE=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,4,4294967295,0),this[lt+3]=Xe>>>24,this[lt+2]=Xe>>>16,this[lt+1]=Xe>>>8,this[lt]=Xe&255,lt+4},ve.prototype.writeUInt32BE=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,4,4294967295,0),this[lt]=Xe>>>24,this[lt+1]=Xe>>>16,this[lt+2]=Xe>>>8,this[lt+3]=Xe&255,lt+4},ve.prototype.writeIntLE=function(Xe,lt,Pt,kt){if(Xe=+Xe,lt=lt>>>0,!kt){var zt=Math.pow(2,8*Pt-1);pt(this,Xe,lt,Pt,zt-1,-zt)}var jt=0,Ht=1,ln=0;for(this[lt]=Xe&255;++jt<Pt&&(Ht*=256);)Xe<0&&ln===0&&this[lt+jt-1]!==0&&(ln=1),this[lt+jt]=(Xe/Ht>>0)-ln&255;return lt+Pt},ve.prototype.writeIntBE=function(Xe,lt,Pt,kt){if(Xe=+Xe,lt=lt>>>0,!kt){var zt=Math.pow(2,8*Pt-1);pt(this,Xe,lt,Pt,zt-1,-zt)}var jt=Pt-1,Ht=1,ln=0;for(this[lt+jt]=Xe&255;--jt>=0&&(Ht*=256);)Xe<0&&ln===0&&this[lt+jt+1]!==0&&(ln=1),this[lt+jt]=(Xe/Ht>>0)-ln&255;return lt+Pt},ve.prototype.writeInt8=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,1,127,-128),Xe<0&&(Xe=255+Xe+1),this[lt]=Xe&255,lt+1},ve.prototype.writeInt16LE=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,2,32767,-32768),this[lt]=Xe&255,this[lt+1]=Xe>>>8,lt+2},ve.prototype.writeInt16BE=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,2,32767,-32768),this[lt]=Xe>>>8,this[lt+1]=Xe&255,lt+2},ve.prototype.writeInt32LE=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,4,2147483647,-2147483648),this[lt]=Xe&255,this[lt+1]=Xe>>>8,this[lt+2]=Xe>>>16,this[lt+3]=Xe>>>24,lt+4},ve.prototype.writeInt32BE=function(Xe,lt,Pt){return Xe=+Xe,lt=lt>>>0,Pt||pt(this,Xe,lt,4,2147483647,-2147483648),Xe<0&&(Xe=4294967295+Xe+1),this[lt]=Xe>>>24,this[lt+1]=Xe>>>16,this[lt+2]=Xe>>>8,this[lt+3]=Xe&255,lt+4};function ct(_e,Xe,lt,Pt,kt,zt){if(lt+Pt>_e.length)throw new RangeError("Index out of range");if(lt<0)throw new RangeError("Index out of range")}function Ct(_e,Xe,lt,Pt,kt){return Xe=+Xe,lt=lt>>>0,kt||ct(_e,Xe,lt,4,34028234663852886e22,-34028234663852886e22),Ee.write(_e,Xe,lt,Pt,23,4),lt+4}ve.prototype.writeFloatLE=function(Xe,lt,Pt){return Ct(this,Xe,lt,!0,Pt)},ve.prototype.writeFloatBE=function(Xe,lt,Pt){return Ct(this,Xe,lt,!1,Pt)};function xt(_e,Xe,lt,Pt,kt){return Xe=+Xe,lt=lt>>>0,kt||ct(_e,Xe,lt,8,17976931348623157e292,-17976931348623157e292),Ee.write(_e,Xe,lt,Pt,52,8),lt+8}ve.prototype.writeDoubleLE=function(Xe,lt,Pt){return xt(this,Xe,lt,!0,Pt)},ve.prototype.writeDoubleBE=function(Xe,lt,Pt){return xt(this,Xe,lt,!1,Pt)},ve.prototype.copy=function(Xe,lt,Pt,kt){if(!ve.isBuffer(Xe))throw new TypeError("argument should be a Buffer");if(Pt||(Pt=0),!kt&&kt!==0&&(kt=this.length),lt>=Xe.length&&(lt=Xe.length),lt||(lt=0),kt>0&&kt<Pt&&(kt=Pt),kt===Pt||Xe.length===0||this.length===0)return 0;if(lt<0)throw new RangeError("targetStart out of bounds");if(Pt<0||Pt>=this.length)throw new RangeError("Index out of range");if(kt<0)throw new RangeError("sourceEnd out of bounds");kt>this.length&&(kt=this.length),Xe.length-lt<kt-Pt&&(kt=Xe.length-lt+Pt);var zt=kt-Pt;if(this===Xe&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(lt,Pt,kt);else if(this===Xe&&Pt<lt&&lt<kt)for(var jt=zt-1;jt>=0;--jt)Xe[jt+lt]=this[jt+Pt];else Uint8Array.prototype.set.call(Xe,this.subarray(Pt,kt),lt);return zt},ve.prototype.fill=function(Xe,lt,Pt,kt){if(typeof Xe=="string"){if(typeof lt=="string"?(kt=lt,lt=0,Pt=this.length):typeof Pt=="string"&&(kt=Pt,Pt=this.length),kt!==void 0&&typeof kt!="string")throw new TypeError("encoding must be a string");if(typeof kt=="string"&&!ve.isEncoding(kt))throw new TypeError("Unknown encoding: "+kt);if(Xe.length===1){var zt=Xe.charCodeAt(0);(kt==="utf8"&&zt<128||kt==="latin1")&&(Xe=zt)}}else typeof Xe=="number"&&(Xe=Xe&255);if(lt<0||this.length<lt||this.length<Pt)throw new RangeError("Out of range index");if(Pt<=lt)return this;lt=lt>>>0,Pt=Pt===void 0?this.length:Pt>>>0,Xe||(Xe=0);var jt;if(typeof Xe=="number")for(jt=lt;jt<Pt;++jt)this[jt]=Xe;else{var Ht=ve.isBuffer(Xe)?Xe:ve.from(Xe,kt),ln=Ht.length;if(ln===0)throw new TypeError('The value "'+Xe+'" is invalid for argument "value"');for(jt=0;jt<Pt-lt;++jt)this[jt+lt]=Ht[jt%ln]}return this};var yt=/[^+/0-9A-Za-z-_]/g;function Tt(_e){if(_e=_e.split("=")[0],_e=_e.trim().replace(yt,""),_e.length<2)return"";for(;_e.length%4!==0;)_e=_e+"=";return _e}function St(_e){return _e<16?"0"+_e.toString(16):_e.toString(16)}function nt(_e,Xe){Xe=Xe||1/0;for(var lt,Pt=_e.length,kt=null,zt=[],jt=0;jt<Pt;++jt){if(lt=_e.charCodeAt(jt),lt>55295&&lt<57344){if(!kt){if(lt>56319){(Xe-=3)>-1&&zt.push(239,191,189);continue}else if(jt+1===Pt){(Xe-=3)>-1&&zt.push(239,191,189);continue}kt=lt;continue}if(lt<56320){(Xe-=3)>-1&&zt.push(239,191,189),kt=lt;continue}lt=(kt-55296<<10|lt-56320)+65536}else kt&&(Xe-=3)>-1&&zt.push(239,191,189);if(kt=null,lt<128){if((Xe-=1)<0)break;zt.push(lt)}else if(lt<2048){if((Xe-=2)<0)break;zt.push(lt>>6|192,lt&63|128)}else if(lt<65536){if((Xe-=3)<0)break;zt.push(lt>>12|224,lt>>6&63|128,lt&63|128)}else if(lt<1114112){if((Xe-=4)<0)break;zt.push(lt>>18|240,lt>>12&63|128,lt>>6&63|128,lt&63|128)}else throw new Error("Invalid code point")}return zt}function Qe(_e){for(var Xe=[],lt=0;lt<_e.length;++lt)Xe.push(_e.charCodeAt(lt)&255);return Xe}function Ce(_e,Xe){for(var lt,Pt,kt,zt=[],jt=0;jt<_e.length&&!((Xe-=2)<0);++jt)lt=_e.charCodeAt(jt),Pt=lt>>8,kt=lt%256,zt.push(kt),zt.push(Pt);return zt}function Ne(_e){return de.toByteArray(Tt(_e))}function Je(_e,Xe,lt,Pt){for(var kt=0;kt<Pt&&!(kt+lt>=Xe.length||kt>=_e.length);++kt)Xe[kt+lt]=_e[kt];return kt}function rt(_e,Xe){return _e instanceof Xe||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===Xe.name}function Be(_e){return _e!==_e}}).call(this)}).call(this,ae("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(ae,Ge,Ie){Ge.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(ae,Ge,Ie){"use strict";var me=ae("get-intrinsic"),de=ae("./"),Ee=de(me("String.prototype.indexOf"));Ge.exports=function(be,Te){var ve=me(be,!!Te);return typeof ve=="function"&&Ee(be,".prototype.")>-1?de(ve):ve}},{"./":93,"get-intrinsic":348}],93:[function(ae,Ge,Ie){"use strict";var me=ae("function-bind"),de=ae("get-intrinsic"),Ee=de("%Function.prototype.apply%"),we=de("%Function.prototype.call%"),be=de("%Reflect.apply%",!0)||me.call(we,Ee),Te=de("%Object.getOwnPropertyDescriptor%",!0),ve=de("%Object.defineProperty%",!0),xe=de("%Math.max%");if(ve)try{ve({},"a",{value:1})}catch(z){ve=null}Ge.exports=function(ee){var oe=be(me,we,arguments);if(Te&&ve){var ie=Te(oe,"length");ie.configurable&&ve(oe,"length",{value:1+xe(0,ee.length-(arguments.length-1))})}return oe};var fe=function(){return be(me,Ee,arguments)};ve?ve(Ge.exports,"apply",{value:fe}):Ge.exports.apply=fe},{"function-bind":347,"get-intrinsic":348}],94:[function(ae,Ge,Ie){"use strict";var me=Array.prototype.slice;Ge.exports=de;function de(we,be){if(!(this instanceof de))return new de(we,be);this.src=we,this._withAccess=be}de.prototype.withAccess=function(we){return this._withAccess=we!==!1,this},de.prototype.pick=function(we){return Array.isArray(we)||(we=me.call(arguments)),we.length&&(this.keys=we),this},de.prototype.to=function(we){if(we=we||{},!this.src)return we;var be=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Te=0;Te<be.length;Te++)ve=be[Te],we[ve]===void 0&&(we[ve]=this.src[ve]);return we}for(var Te=0;Te<be.length;Te++){var ve=be[Te];if(Ee(we,ve)){var xe=this.src.__lookupGetter__(ve),fe=this.src.__lookupSetter__(ve);xe&&we.__defineGetter__(ve,xe),fe&&we.__defineSetter__(ve,fe),!xe&&!fe&&(we[ve]=this.src[ve])}}return we},de.prototype.toCover=function(we){for(var be=this.keys||Object.keys(this.src),Te=0;Te<be.length;Te++){var ve=be[Te];delete we[ve];var xe=this.src.__lookupGetter__(ve),fe=this.src.__lookupSetter__(ve);xe&&we.__defineGetter__(ve,xe),fe&&we.__defineSetter__(ve,fe),!xe&&!fe&&(we[ve]=this.src[ve])}},de.prototype.override=de.prototype.toCover,de.prototype.and=function(we){var be={};return this.to(be),this.src=we,this.to(be),this.src=be,this};function Ee(we,be){return we[be]===void 0&&we.__lookupGetter__(be)===void 0&&we.__lookupSetter__(be)===void 0}},{}],95:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-callable"),Ee=ae("../internals/try-to-string"),we=me.TypeError;Ge.exports=function(be){if(de(be))return be;throw we(Ee(be)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-constructor"),Ee=ae("../internals/try-to-string"),we=me.TypeError;Ge.exports=function(be){if(de(be))return be;throw we(Ee(be)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-callable"),Ee=me.String,we=me.TypeError;Ge.exports=function(be){if(typeof be=="object"||de(be))return be;throw we("Can't set "+Ee(be)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(ae,Ge,Ie){var me=ae("../internals/well-known-symbol"),de=ae("../internals/object-create"),Ee=ae("../internals/object-define-property"),we=me("unscopables"),be=Array.prototype;be[we]==null&&Ee.f(be,we,{configurable:!0,value:de(null)}),Ge.exports=function(Te){be[we][Te]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/string-multibyte").charAt;Ge.exports=function(de,Ee,we){return Ee+(we?me(de,Ee).length:1)}},{"../internals/string-multibyte":239}],100:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/object-is-prototype-of"),Ee=me.TypeError;Ge.exports=function(we,be){if(de(be,we))return we;throw Ee("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-object"),Ee=me.String,we=me.TypeError;Ge.exports=function(be){if(de(be))return be;throw we(Ee(be)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(ae,Ge,Ie){Ge.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-native"),de=ae("../internals/descriptors"),Ee=ae("../internals/global"),we=ae("../internals/is-callable"),be=ae("../internals/is-object"),Te=ae("../internals/has-own-property"),ve=ae("../internals/classof"),xe=ae("../internals/try-to-string"),fe=ae("../internals/create-non-enumerable-property"),z=ae("../internals/redefine"),ee=ae("../internals/object-define-property").f,oe=ae("../internals/object-is-prototype-of"),ie=ae("../internals/object-get-prototype-of"),le=ae("../internals/object-set-prototype-of"),ue=ae("../internals/well-known-symbol"),pe=ae("../internals/uid"),Se=Ee.Int8Array,Le=Se&&Se.prototype,De=Ee.Uint8ClampedArray,Fe=De&&De.prototype,Ae=Se&&ie(Se),Oe=Le&&ie(Le),ze=Object.prototype,He=Ee.TypeError,Ye=ue("toStringTag"),We=pe("TYPED_ARRAY_TAG"),Ue=pe("TYPED_ARRAY_CONSTRUCTOR"),st=me&&!!le&&ve(Ee.opera)!=="Opera",dt=!1,gt,Et,Ke,et={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},$e={BigInt64Array:8,BigUint64Array:8},vt=function(yt){if(!be(yt))return!1;var Tt=ve(yt);return Tt==="DataView"||Te(et,Tt)||Te($e,Tt)},wt=function(xt){if(!be(xt))return!1;var yt=ve(xt);return Te(et,yt)||Te($e,yt)},ht=function(xt){if(wt(xt))return xt;throw He("Target is not a typed array")},pt=function(xt){if(we(xt)&&(!le||oe(Ae,xt)))return xt;throw He(xe(xt)+" is not a typed array constructor")},ct=function(xt,yt,Tt,St){if(de){if(Tt)for(var nt in et){var Qe=Ee[nt];if(Qe&&Te(Qe.prototype,xt))try{delete Qe.prototype[xt]}catch(Ce){try{Qe.prototype[xt]=yt}catch(Ne){}}}(!Oe[xt]||Tt)&&z(Oe,xt,Tt?yt:st&&Le[xt]||yt,St)}},Ct=function(xt,yt,Tt){var St,nt;if(de){if(le){if(Tt){for(St in et)if(nt=Ee[St],nt&&Te(nt,xt))try{delete nt[xt]}catch(Qe){}}if(!Ae[xt]||Tt)try{return z(Ae,xt,Tt?yt:st&&Ae[xt]||yt)}catch(Qe){}else return}for(St in et)nt=Ee[St],nt&&(!nt[xt]||Tt)&&z(nt,xt,yt)}};for(gt in et)Et=Ee[gt],Ke=Et&&Et.prototype,Ke?fe(Ke,Ue,Et):st=!1;for(gt in $e)Et=Ee[gt],Ke=Et&&Et.prototype,Ke&&fe(Ke,Ue,Et);if((!st||!we(Ae)||Ae===Function.prototype)&&(Ae=function(){throw He("Incorrect invocation")},st))for(gt in et)Ee[gt]&&le(Ee[gt],Ae);if((!st||!Oe||Oe===ze)&&(Oe=Ae.prototype,st))for(gt in et)Ee[gt]&&le(Ee[gt].prototype,Oe);if(st&&ie(Fe)!==Oe&&le(Fe,Oe),de&&!Te(Oe,Ye)){dt=!0,ee(Oe,Ye,{get:function(){return be(this)?this[We]:void 0}});for(gt in et)Ee[gt]&&fe(Ee[gt],We,gt)}Ge.exports={NATIVE_ARRAY_BUFFER_VIEWS:st,TYPED_ARRAY_CONSTRUCTOR:Ue,TYPED_ARRAY_TAG:dt&&We,aTypedArray:ht,aTypedArrayConstructor:pt,exportTypedArrayMethod:ct,exportTypedArrayStaticMethod:Ct,isView:vt,isTypedArray:wt,TypedArray:Ae,TypedArrayPrototype:Oe}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/global"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/descriptors"),we=ae("../internals/array-buffer-native"),be=ae("../internals/function-name"),Te=ae("../internals/create-non-enumerable-property"),ve=ae("../internals/redefine-all"),xe=ae("../internals/fails"),fe=ae("../internals/an-instance"),z=ae("../internals/to-integer-or-infinity"),ee=ae("../internals/to-length"),oe=ae("../internals/to-index"),ie=ae("../internals/ieee754"),le=ae("../internals/object-get-prototype-of"),ue=ae("../internals/object-set-prototype-of"),pe=ae("../internals/object-get-own-property-names").f,Se=ae("../internals/object-define-property").f,Le=ae("../internals/array-fill"),De=ae("../internals/array-slice-simple"),Fe=ae("../internals/set-to-string-tag"),Ae=ae("../internals/internal-state"),Oe=be.PROPER,ze=be.CONFIGURABLE,He=Ae.get,Ye=Ae.set,We="ArrayBuffer",Ue="DataView",st="prototype",dt="Wrong length",gt="Wrong index",Et=me[We],Ke=Et,et=Ke&&Ke[st],$e=me[Ue],vt=$e&&$e[st],wt=Object.prototype,ht=me.Array,pt=me.RangeError,ct=de(Le),Ct=de([].reverse),xt=ie.pack,yt=ie.unpack,Tt=function(jt){return[jt&255]},St=function(jt){return[jt&255,jt>>8&255]},nt=function(jt){return[jt&255,jt>>8&255,jt>>16&255,jt>>24&255]},Qe=function(jt){return jt[3]<<24|jt[2]<<16|jt[1]<<8|jt[0]},Ce=function(jt){return xt(jt,23,4)},Ne=function(jt){return xt(jt,52,8)},Je=function(jt,Ht){Se(jt[st],Ht,{get:function(){return He(this)[Ht]}})},rt=function(jt,Ht,ln,an){var sn=oe(ln),$t=He(jt);if(sn+Ht>$t.byteLength)throw pt(gt);var On=He($t.buffer).bytes,un=sn+$t.byteOffset,mn=De(On,un,un+Ht);return an?mn:Ct(mn)},Be=function(jt,Ht,ln,an,sn,$t){var On=oe(ln),un=He(jt);if(On+Ht>un.byteLength)throw pt(gt);for(var mn=He(un.buffer).bytes,In=On+un.byteOffset,Sn=an(+sn),Dn=0;Dn<Ht;Dn++)mn[In+Dn]=Sn[$t?Dn:Ht-Dn-1]};if(!we)Ke=function(Ht){fe(this,et);var ln=oe(Ht);Ye(this,{bytes:ct(ht(ln),0),byteLength:ln}),Ee||(this.byteLength=ln)},et=Ke[st],$e=function(Ht,ln,an){fe(this,vt),fe(Ht,et);var sn=He(Ht).byteLength,$t=z(ln);if($t<0||$t>sn)throw pt("Wrong offset");if(an=an===void 0?sn-$t:ee(an),$t+an>sn)throw pt(dt);Ye(this,{buffer:Ht,byteLength:an,byteOffset:$t}),Ee||(this.buffer=Ht,this.byteLength=an,this.byteOffset=$t)},vt=$e[st],Ee&&(Je(Ke,"byteLength"),Je($e,"buffer"),Je($e,"byteLength"),Je($e,"byteOffset")),ve(vt,{getInt8:function(Ht){return rt(this,1,Ht)[0]<<24>>24},getUint8:function(Ht){return rt(this,1,Ht)[0]},getInt16:function(Ht){var ln=rt(this,2,Ht,arguments.length>1?arguments[1]:void 0);return(ln[1]<<8|ln[0])<<16>>16},getUint16:function(Ht){var ln=rt(this,2,Ht,arguments.length>1?arguments[1]:void 0);return ln[1]<<8|ln[0]},getInt32:function(Ht){return Qe(rt(this,4,Ht,arguments.length>1?arguments[1]:void 0))},getUint32:function(Ht){return Qe(rt(this,4,Ht,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Ht){return yt(rt(this,4,Ht,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Ht){return yt(rt(this,8,Ht,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Ht,ln){Be(this,1,Ht,Tt,ln)},setUint8:function(Ht,ln){Be(this,1,Ht,Tt,ln)},setInt16:function(Ht,ln){Be(this,2,Ht,St,ln,arguments.length>2?arguments[2]:void 0)},setUint16:function(Ht,ln){Be(this,2,Ht,St,ln,arguments.length>2?arguments[2]:void 0)},setInt32:function(Ht,ln){Be(this,4,Ht,nt,ln,arguments.length>2?arguments[2]:void 0)},setUint32:function(Ht,ln){Be(this,4,Ht,nt,ln,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Ht,ln){Be(this,4,Ht,Ce,ln,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Ht,ln){Be(this,8,Ht,Ne,ln,arguments.length>2?arguments[2]:void 0)}});else{var _e=Oe&&Et.name!==We;if(!xe(function(){Et(1)})||!xe(function(){new Et(-1)})||xe(function(){return new Et,new Et(1.5),new Et(NaN),_e&&!ze})){Ke=function(Ht){return fe(this,et),new Et(oe(Ht))},Ke[st]=et;for(var Xe=pe(Et),lt=0,Pt;Xe.length>lt;)(Pt=Xe[lt++])in Ke||Te(Ke,Pt,Et[Pt]);et.constructor=Ke}else _e&&ze&&Te(Et,"name",We);ue&&le(vt)!==wt&&ue(vt,wt);var kt=new $e(new Ke(2)),zt=de(vt.setInt8);kt.setInt8(0,2147483648),kt.setInt8(1,2147483649),(kt.getInt8(0)||!kt.getInt8(1))&&ve(vt,{setInt8:function(Ht,ln){zt(this,Ht,ln<<24>>24)},setUint8:function(Ht,ln){zt(this,Ht,ln<<24>>24)}},{unsafe:!0})}Fe(Ke,We),Fe($e,Ue),Ge.exports={ArrayBuffer:Ke,DataView:$e}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/to-object"),de=ae("../internals/to-absolute-index"),Ee=ae("../internals/length-of-array-like"),we=Math.min;Ge.exports=[].copyWithin||function(Te,ve){var xe=me(this),fe=Ee(xe),z=de(Te,fe),ee=de(ve,fe),oe=arguments.length>2?arguments[2]:void 0,ie=we((oe===void 0?fe:de(oe,fe))-ee,fe-z),le=1;for(ee<z&&z<ee+ie&&(le=-1,ee+=ie-1,z+=ie-1);ie-- >0;)ee in xe?xe[z]=xe[ee]:delete xe[z],z+=le,ee+=le;return xe}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/to-object"),de=ae("../internals/to-absolute-index"),Ee=ae("../internals/length-of-array-like");Ge.exports=function(be){for(var Te=me(this),ve=Ee(Te),xe=arguments.length,fe=de(xe>1?arguments[1]:void 0,ve),z=xe>2?arguments[2]:void 0,ee=z===void 0?ve:de(z,ve);ee>fe;)Te[fe++]=be;return Te}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-iteration").forEach,de=ae("../internals/array-method-is-strict"),Ee=de("forEach");Ge.exports=Ee?[].forEach:function(be){return me(this,be,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(ae,Ge,Ie){var me=ae("../internals/length-of-array-like");Ge.exports=function(de,Ee){for(var we=0,be=me(Ee),Te=new de(be);be>we;)Te[we]=Ee[we++];return Te}},{"../internals/length-of-array-like":188}],109:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/global"),de=ae("../internals/function-bind-context"),Ee=ae("../internals/function-call"),we=ae("../internals/to-object"),be=ae("../internals/call-with-safe-iteration-closing"),Te=ae("../internals/is-array-iterator-method"),ve=ae("../internals/is-constructor"),xe=ae("../internals/length-of-array-like"),fe=ae("../internals/create-property"),z=ae("../internals/get-iterator"),ee=ae("../internals/get-iterator-method"),oe=me.Array;Ge.exports=function(le){var ue=we(le),pe=ve(this),Se=arguments.length,Le=Se>1?arguments[1]:void 0,De=Le!==void 0;De&&(Le=de(Le,Se>2?arguments[2]:void 0));var Fe=ee(ue),Ae=0,Oe,ze,He,Ye,We,Ue;if(Fe&&!(this==oe&&Te(Fe)))for(Ye=z(ue,Fe),We=Ye.next,ze=pe?new this:[];!(He=Ee(We,Ye)).done;Ae++)Ue=De?be(Ye,Le,[He.value,Ae],!0):He.value,fe(ze,Ae,Ue);else for(Oe=xe(ue),ze=pe?new this(Oe):oe(Oe);Oe>Ae;Ae++)Ue=De?Le(ue[Ae],Ae):ue[Ae],fe(ze,Ae,Ue);return ze.length=Ae,ze}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(ae,Ge,Ie){var me=ae("../internals/to-indexed-object"),de=ae("../internals/to-absolute-index"),Ee=ae("../internals/length-of-array-like"),we=function(be){return function(Te,ve,xe){var fe=me(Te),z=Ee(fe),ee=de(xe,z),oe;if(be&&ve!=ve){for(;z>ee;)if(oe=fe[ee++],oe!=oe)return!0}else for(;z>ee;ee++)if((be||ee in fe)&&fe[ee]===ve)return be||ee||0;return!be&&-1}};Ge.exports={includes:we(!0),indexOf:we(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(ae,Ge,Ie){var me=ae("../internals/function-bind-context"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/indexed-object"),we=ae("../internals/to-object"),be=ae("../internals/length-of-array-like"),Te=ae("../internals/array-species-create"),ve=de([].push),xe=function(fe){var z=fe==1,ee=fe==2,oe=fe==3,ie=fe==4,le=fe==6,ue=fe==7,pe=fe==5||le;return function(Se,Le,De,Fe){for(var Ae=we(Se),Oe=Ee(Ae),ze=me(Le,De),He=be(Oe),Ye=0,We=Fe||Te,Ue=z?We(Se,He):ee||ue?We(Se,0):void 0,st,dt;He>Ye;Ye++)if((pe||Ye in Oe)&&(st=Oe[Ye],dt=ze(st,Ye,Ae),fe))if(z)Ue[Ye]=dt;else if(dt)switch(fe){case 3:return!0;case 5:return st;case 6:return Ye;case 2:ve(Ue,st)}else switch(fe){case 4:return!1;case 7:ve(Ue,st)}return le?-1:oe||ie?ie:Ue}};Ge.exports={forEach:xe(0),map:xe(1),filter:xe(2),some:xe(3),every:xe(4),find:xe(5),findIndex:xe(6),filterReject:xe(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/function-apply"),de=ae("../internals/to-indexed-object"),Ee=ae("../internals/to-integer-or-infinity"),we=ae("../internals/length-of-array-like"),be=ae("../internals/array-method-is-strict"),Te=Math.min,ve=[].lastIndexOf,xe=!!ve&&1/[1].lastIndexOf(1,-0)<0,fe=be("lastIndexOf"),z=xe||!fe;Ge.exports=z?function(oe){if(xe)return me(ve,this,arguments)||0;var ie=de(this),le=we(ie),ue=le-1;for(arguments.length>1&&(ue=Te(ue,Ee(arguments[1]))),ue<0&&(ue=le+ue);ue>=0;ue--)if(ue in ie&&ie[ue]===oe)return ue||0;return-1}:ve},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(ae,Ge,Ie){var me=ae("../internals/fails"),de=ae("../internals/well-known-symbol"),Ee=ae("../internals/engine-v8-version"),we=de("species");Ge.exports=function(be){return Ee>=51||!me(function(){var Te=[],ve=Te.constructor={};return ve[we]=function(){return{foo:1}},Te[be](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/fails");Ge.exports=function(de,Ee){var we=[][de];return!!we&&me(function(){we.call(null,Ee||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/a-callable"),Ee=ae("../internals/to-object"),we=ae("../internals/indexed-object"),be=ae("../internals/length-of-array-like"),Te=me.TypeError,ve=function(xe){return function(fe,z,ee,oe){de(z);var ie=Ee(fe),le=we(ie),ue=be(ie),pe=xe?ue-1:0,Se=xe?-1:1;if(ee<2)for(;;){if(pe in le){oe=le[pe],pe+=Se;break}if(pe+=Se,xe?pe<0:ue<=pe)throw Te("Reduce of empty array with no initial value")}for(;xe?pe>=0:ue>pe;pe+=Se)pe in le&&(oe=z(oe,le[pe],pe,ie));return oe}};Ge.exports={left:ve(!1),right:ve(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/to-absolute-index"),Ee=ae("../internals/length-of-array-like"),we=ae("../internals/create-property"),be=me.Array,Te=Math.max;Ge.exports=function(ve,xe,fe){for(var z=Ee(ve),ee=de(xe,z),oe=de(fe===void 0?z:fe,z),ie=be(Te(oe-ee,0)),le=0;ee<oe;ee++,le++)we(ie,le,ve[ee]);return ie.length=le,ie}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this");Ge.exports=me([].slice)},{"../internals/function-uncurry-this":157}],118:[function(ae,Ge,Ie){var me=ae("../internals/array-slice-simple"),de=Math.floor,Ee=function(Te,ve){var xe=Te.length,fe=de(xe/2);return xe<8?we(Te,ve):be(Te,Ee(me(Te,0,fe),ve),Ee(me(Te,fe),ve),ve)},we=function(Te,ve){for(var xe=Te.length,fe=1,z,ee;fe<xe;){for(ee=fe,z=Te[fe];ee&&ve(Te[ee-1],z)>0;)Te[ee]=Te[--ee];ee!==fe++&&(Te[ee]=z)}return Te},be=function(Te,ve,xe,fe){for(var z=ve.length,ee=xe.length,oe=0,ie=0;oe<z||ie<ee;)Te[oe+ie]=oe<z&&ie<ee?fe(ve[oe],xe[ie])<=0?ve[oe++]:xe[ie++]:oe<z?ve[oe++]:xe[ie++];return Te};Ge.exports=Ee},{"../internals/array-slice-simple":116}],119:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-array"),Ee=ae("../internals/is-constructor"),we=ae("../internals/is-object"),be=ae("../internals/well-known-symbol"),Te=be("species"),ve=me.Array;Ge.exports=function(xe){var fe;return de(xe)&&(fe=xe.constructor,Ee(fe)&&(fe===ve||de(fe.prototype))?fe=void 0:we(fe)&&(fe=fe[Te],fe===null&&(fe=void 0))),fe===void 0?ve:fe}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(ae,Ge,Ie){var me=ae("../internals/array-species-constructor");Ge.exports=function(de,Ee){return new(me(de))(Ee===0?0:Ee)}},{"../internals/array-species-constructor":119}],121:[function(ae,Ge,Ie){var me=ae("../internals/an-object"),de=ae("../internals/iterator-close");Ge.exports=function(Ee,we,be,Te){try{return Te?we(me(be)[0],be[1]):we(be)}catch(ve){de(Ee,"throw",ve)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(ae,Ge,Ie){var me=ae("../internals/well-known-symbol"),de=me("iterator"),Ee=!1;try{var we=0,be={next:function(){return{done:!!we++}},return:function(){Ee=!0}};be[de]=function(){return this},Array.from(be,function(){throw 2})}catch(Te){}Ge.exports=function(Te,ve){if(!ve&&!Ee)return!1;var xe=!1;try{var fe={};fe[de]=function(){return{next:function(){return{done:xe=!0}}}},Te(fe)}catch(z){}return xe}},{"../internals/well-known-symbol":268}],123:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=me({}.toString),Ee=me("".slice);Ge.exports=function(we){return Ee(de(we),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/to-string-tag-support"),Ee=ae("../internals/is-callable"),we=ae("../internals/classof-raw"),be=ae("../internals/well-known-symbol"),Te=be("toStringTag"),ve=me.Object,xe=we(function(){return arguments}())=="Arguments",fe=function(z,ee){try{return z[ee]}catch(oe){}};Ge.exports=de?we:function(z){var ee,oe,ie;return z===void 0?"Undefined":z===null?"Null":typeof(oe=fe(ee=ve(z),Te))=="string"?oe:xe?we(ee):(ie=we(ee))=="Object"&&Ee(ee.callee)?"Arguments":ie}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(ae,Ge,Ie){var me=ae("../internals/has-own-property"),de=ae("../internals/own-keys"),Ee=ae("../internals/object-get-own-property-descriptor"),we=ae("../internals/object-define-property");Ge.exports=function(be,Te,ve){for(var xe=de(Te),fe=we.f,z=Ee.f,ee=0;ee<xe.length;ee++){var oe=xe[ee];!me(be,oe)&&!(ve&&me(ve,oe))&&fe(be,oe,z(Te,oe))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(ae,Ge,Ie){var me=ae("../internals/well-known-symbol"),de=me("match");Ge.exports=function(Ee){var we=/./;try{"/./"[Ee](we)}catch(be){try{return we[de]=!1,"/./"[Ee](we)}catch(Te){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(ae,Ge,Ie){var me=ae("../internals/fails");Ge.exports=!me(function(){function de(){}return de.prototype.constructor=null,Object.getPrototypeOf(new de)!==de.prototype})},{"../internals/fails":150}],128:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/iterators-core").IteratorPrototype,de=ae("../internals/object-create"),Ee=ae("../internals/create-property-descriptor"),we=ae("../internals/set-to-string-tag"),be=ae("../internals/iterators"),Te=function(){return this};Ge.exports=function(ve,xe,fe,z){var ee=xe+" Iterator";return ve.prototype=de(me,{next:Ee(+!z,fe)}),we(ve,ee,!1,!0),be[ee]=Te,ve}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/object-define-property"),Ee=ae("../internals/create-property-descriptor");Ge.exports=me?function(we,be,Te){return de.f(we,be,Ee(1,Te))}:function(we,be,Te){return we[be]=Te,we}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(ae,Ge,Ie){Ge.exports=function(me,de){return{enumerable:!(me&1),configurable:!(me&2),writable:!(me&4),value:de}}},{}],131:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/to-property-key"),de=ae("../internals/object-define-property"),Ee=ae("../internals/create-property-descriptor");Ge.exports=function(we,be,Te){var ve=me(be);ve in we?de.f(we,ve,Ee(0,Te)):we[ve]=Te}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/function-call"),Ee=ae("../internals/is-pure"),we=ae("../internals/function-name"),be=ae("../internals/is-callable"),Te=ae("../internals/create-iterator-constructor"),ve=ae("../internals/object-get-prototype-of"),xe=ae("../internals/object-set-prototype-of"),fe=ae("../internals/set-to-string-tag"),z=ae("../internals/create-non-enumerable-property"),ee=ae("../internals/redefine"),oe=ae("../internals/well-known-symbol"),ie=ae("../internals/iterators"),le=ae("../internals/iterators-core"),ue=we.PROPER,pe=we.CONFIGURABLE,Se=le.IteratorPrototype,Le=le.BUGGY_SAFARI_ITERATORS,De=oe("iterator"),Fe="keys",Ae="values",Oe="entries",ze=function(){return this};Ge.exports=function(He,Ye,We,Ue,st,dt,gt){Te(We,Ye,Ue);var Et=function(xt){if(xt===st&&wt)return wt;if(!Le&&xt in $e)return $e[xt];switch(xt){case Fe:return function(){return new We(this,xt)};case Ae:return function(){return new We(this,xt)};case Oe:return function(){return new We(this,xt)}}return function(){return new We(this)}},Ke=Ye+" Iterator",et=!1,$e=He.prototype,vt=$e[De]||$e["@@iterator"]||st&&$e[st],wt=!Le&&vt||Et(st),ht=Ye=="Array"&&$e.entries||vt,pt,ct,Ct;if(ht&&(pt=ve(ht.call(new He)),pt!==Object.prototype&&pt.next&&(!Ee&&ve(pt)!==Se&&(xe?xe(pt,Se):be(pt[De])||ee(pt,De,ze)),fe(pt,Ke,!0,!0),Ee&&(ie[Ke]=ze))),ue&&st==Ae&&vt&&vt.name!==Ae&&(!Ee&&pe?z($e,"name",Ae):(et=!0,wt=function(){return de(vt,this)})),st)if(ct={values:Et(Ae),keys:dt?wt:Et(Fe),entries:Et(Oe)},gt)for(Ct in ct)(Le||et||!(Ct in $e))&&ee($e,Ct,ct[Ct]);else me({target:Ye,proto:!0,forced:Le||et},ct);return(!Ee||gt)&&$e[De]!==wt&&ee($e,De,wt,{name:st}),ie[Ye]=wt,ct}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(ae,Ge,Ie){var me=ae("../internals/path"),de=ae("../internals/has-own-property"),Ee=ae("../internals/well-known-symbol-wrapped"),we=ae("../internals/object-define-property").f;Ge.exports=function(be){var Te=me.Symbol||(me.Symbol={});de(Te,be)||we(Te,be,{value:Ee.f(be)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(ae,Ge,Ie){var me=ae("../internals/fails");Ge.exports=!me(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-object"),Ee=me.document,we=de(Ee)&&de(Ee.createElement);Ge.exports=function(be){return we?Ee.createElement(be):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(ae,Ge,Ie){Ge.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(ae,Ge,Ie){var me=ae("../internals/document-create-element"),de=me("span").classList,Ee=de&&de.constructor&&de.constructor.prototype;Ge.exports=Ee===Object.prototype?void 0:Ee},{"../internals/document-create-element":135}],138:[function(ae,Ge,Ie){var me=ae("../internals/engine-user-agent"),de=me.match(/firefox\/(\d+)/i);Ge.exports=!!de&&+de[1]},{"../internals/engine-user-agent":145}],139:[function(ae,Ge,Ie){Ge.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(ae,Ge,Ie){var me=ae("../internals/engine-user-agent");Ge.exports=/MSIE|Trident/.test(me)},{"../internals/engine-user-agent":145}],141:[function(ae,Ge,Ie){var me=ae("../internals/engine-user-agent"),de=ae("../internals/global");Ge.exports=/ipad|iphone|ipod/i.test(me)&&de.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(ae,Ge,Ie){var me=ae("../internals/engine-user-agent");Ge.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(me)},{"../internals/engine-user-agent":145}],143:[function(ae,Ge,Ie){var me=ae("../internals/classof-raw"),de=ae("../internals/global");Ge.exports=me(de.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(ae,Ge,Ie){var me=ae("../internals/engine-user-agent");Ge.exports=/web0s(?!.*chrome)/i.test(me)},{"../internals/engine-user-agent":145}],145:[function(ae,Ge,Ie){var me=ae("../internals/get-built-in");Ge.exports=me("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/engine-user-agent"),Ee=me.process,we=me.Deno,be=Ee&&Ee.versions||we&&we.version,Te=be&&be.v8,ve,xe;Te&&(ve=Te.split("."),xe=ve[0]>0&&ve[0]<4?1:+(ve[0]+ve[1])),!xe&&de&&(ve=de.match(/Edge\/(\d+)/),(!ve||ve[1]>=74)&&(ve=de.match(/Chrome\/(\d+)/),ve&&(xe=+ve[1]))),Ge.exports=xe},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(ae,Ge,Ie){var me=ae("../internals/engine-user-agent"),de=me.match(/AppleWebKit\/(\d+)\./);Ge.exports=!!de&&+de[1]},{"../internals/engine-user-agent":145}],148:[function(ae,Ge,Ie){Ge.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/object-get-own-property-descriptor").f,Ee=ae("../internals/create-non-enumerable-property"),we=ae("../internals/redefine"),be=ae("../internals/set-global"),Te=ae("../internals/copy-constructor-properties"),ve=ae("../internals/is-forced");Ge.exports=function(xe,fe){var z=xe.target,ee=xe.global,oe=xe.stat,ie,le,ue,pe,Se,Le;if(ee?le=me:oe?le=me[z]||be(z,{}):le=(me[z]||{}).prototype,le)for(ue in fe){if(Se=fe[ue],xe.noTargetGet?(Le=de(le,ue),pe=Le&&Le.value):pe=le[ue],ie=ve(ee?ue:z+(oe?".":"#")+ue,xe.forced),!ie&&pe!==void 0){if(typeof Se==typeof pe)continue;Te(Se,pe)}(xe.sham||pe&&pe.sham)&&Ee(Se,"sham",!0),we(le,ue,Se,xe)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(ae,Ge,Ie){Ge.exports=function(me){try{return!!me()}catch(de){return!0}}},{}],151:[function(ae,Ge,Ie){"use strict";ae("../modules/es.regexp.exec");var me=ae("../internals/function-uncurry-this"),de=ae("../internals/redefine"),Ee=ae("../internals/regexp-exec"),we=ae("../internals/fails"),be=ae("../internals/well-known-symbol"),Te=ae("../internals/create-non-enumerable-property"),ve=be("species"),xe=RegExp.prototype;Ge.exports=function(fe,z,ee,oe){var ie=be(fe),le=!we(function(){var Le={};return Le[ie]=function(){return 7},""[fe](Le)!=7}),ue=le&&!we(function(){var Le=!1,De=/a/;return fe==="split"&&(De={},De.constructor={},De.constructor[ve]=function(){return De},De.flags="",De[ie]=/./[ie]),De.exec=function(){return Le=!0,null},De[ie](""),!Le});if(!le||!ue||ee){var pe=me(/./[ie]),Se=z(ie,""[fe],function(Le,De,Fe,Ae,Oe){var ze=me(Le),He=De.exec;return He===Ee||He===xe.exec?le&&!Oe?{done:!0,value:pe(De,Fe,Ae)}:{done:!0,value:ze(Fe,De,Ae)}:{done:!1}});de(String.prototype,fe,Se[0]),de(xe,ie,Se[1])}oe&&Te(xe[ie],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(ae,Ge,Ie){var me=ae("../internals/function-bind-native"),de=Function.prototype,Ee=de.apply,we=de.call;Ge.exports=typeof Reflect=="object"&&Reflect.apply||(me?we.bind(Ee):function(){return we.apply(Ee,arguments)})},{"../internals/function-bind-native":154}],153:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/a-callable"),Ee=ae("../internals/function-bind-native"),we=me(me.bind);Ge.exports=function(be,Te){return de(be),Te===void 0?be:Ee?we(be,Te):function(){return be.apply(Te,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(ae,Ge,Ie){var me=ae("../internals/fails");Ge.exports=!me(function(){var de=function(){}.bind();return typeof de!="function"||de.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(ae,Ge,Ie){var me=ae("../internals/function-bind-native"),de=Function.prototype.call;Ge.exports=me?de.bind(de):function(){return de.apply(de,arguments)}},{"../internals/function-bind-native":154}],156:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/has-own-property"),Ee=Function.prototype,we=me&&Object.getOwnPropertyDescriptor,be=de(Ee,"name"),Te=be&&function(){}.name==="something",ve=be&&(!me||me&&we(Ee,"name").configurable);Ge.exports={EXISTS:be,PROPER:Te,CONFIGURABLE:ve}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(ae,Ge,Ie){var me=ae("../internals/function-bind-native"),de=Function.prototype,Ee=de.bind,we=de.call,be=me&&Ee.bind(we,we);Ge.exports=me?function(Te){return Te&&be(Te)}:function(Te){return Te&&function(){return we.apply(Te,arguments)}}},{"../internals/function-bind-native":154}],158:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-callable"),Ee=function(we){return de(we)?we:void 0};Ge.exports=function(we,be){return arguments.length<2?Ee(me[we]):me[we]&&me[we][be]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(ae,Ge,Ie){var me=ae("../internals/classof"),de=ae("../internals/get-method"),Ee=ae("../internals/iterators"),we=ae("../internals/well-known-symbol"),be=we("iterator");Ge.exports=function(Te){if(Te!=null)return de(Te,be)||de(Te,"@@iterator")||Ee[me(Te)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/function-call"),Ee=ae("../internals/a-callable"),we=ae("../internals/an-object"),be=ae("../internals/try-to-string"),Te=ae("../internals/get-iterator-method"),ve=me.TypeError;Ge.exports=function(xe,fe){var z=arguments.length<2?Te(xe):fe;if(Ee(z))return we(de(z,xe));throw ve(be(xe)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(ae,Ge,Ie){var me=ae("../internals/a-callable");Ge.exports=function(de,Ee){var we=de[Ee];return we==null?void 0:me(we)}},{"../internals/a-callable":95}],162:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/to-object"),Ee=Math.floor,we=me("".charAt),be=me("".replace),Te=me("".slice),ve=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xe=/\$([$&'`]|\d{1,2})/g;Ge.exports=function(fe,z,ee,oe,ie,le){var ue=ee+fe.length,pe=oe.length,Se=xe;return ie!==void 0&&(ie=de(ie),Se=ve),be(le,Se,function(Le,De){var Fe;switch(we(De,0)){case"$":return"$";case"&":return fe;case"`":return Te(z,0,ee);case"'":return Te(z,ue);case"<":Fe=ie[Te(De,1,-1)];break;default:var Ae=+De;if(Ae===0)return Le;if(Ae>pe){var Oe=Ee(Ae/10);return Oe===0?Le:Oe<=pe?oe[Oe-1]===void 0?we(De,1):oe[Oe-1]+we(De,1):Le}Fe=oe[Ae-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(ae,Ge,Ie){(function(me){(function(){var de=function(Ee){return Ee&&Ee.Math==Math&&Ee};Ge.exports=de(typeof globalThis=="object"&&globalThis)||de(typeof window=="object"&&window)||de(typeof self=="object"&&self)||de(typeof me=="object"&&me)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/to-object"),Ee=me({}.hasOwnProperty);Ge.exports=Object.hasOwn||function(be,Te){return Ee(de(be),Te)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(ae,Ge,Ie){Ge.exports={}},{}],166:[function(ae,Ge,Ie){var me=ae("../internals/global");Ge.exports=function(de,Ee){var we=me.console;we&&we.error&&(arguments.length==1?we.error(de):we.error(de,Ee))}},{"../internals/global":163}],167:[function(ae,Ge,Ie){var me=ae("../internals/get-built-in");Ge.exports=me("document","documentElement")},{"../internals/get-built-in":158}],168:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/fails"),Ee=ae("../internals/document-create-element");Ge.exports=!me&&!de(function(){return Object.defineProperty(Ee("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=me.Array,Ee=Math.abs,we=Math.pow,be=Math.floor,Te=Math.log,ve=Math.LN2,xe=function(z,ee,oe){var ie=de(oe),le=oe*8-ee-1,ue=(1<<le)-1,pe=ue>>1,Se=ee===23?we(2,-24)-we(2,-77):0,Le=z<0||z===0&&1/z<0?1:0,De=0,Fe,Ae,Oe;for(z=Ee(z),z!=z||z===1/0?(Ae=z!=z?1:0,Fe=ue):(Fe=be(Te(z)/ve),Oe=we(2,-Fe),z*Oe<1&&(Fe--,Oe*=2),Fe+pe>=1?z+=Se/Oe:z+=Se*we(2,1-pe),z*Oe>=2&&(Fe++,Oe/=2),Fe+pe>=ue?(Ae=0,Fe=ue):Fe+pe>=1?(Ae=(z*Oe-1)*we(2,ee),Fe=Fe+pe):(Ae=z*we(2,pe-1)*we(2,ee),Fe=0));ee>=8;)ie[De++]=Ae&255,Ae/=256,ee-=8;for(Fe=Fe<<ee|Ae,le+=ee;le>0;)ie[De++]=Fe&255,Fe/=256,le-=8;return ie[--De]|=Le*128,ie},fe=function(z,ee){var oe=z.length,ie=oe*8-ee-1,le=(1<<ie)-1,ue=le>>1,pe=ie-7,Se=oe-1,Le=z[Se--],De=Le&127,Fe;for(Le>>=7;pe>0;)De=De*256+z[Se--],pe-=8;for(Fe=De&(1<<-pe)-1,De>>=-pe,pe+=ee;pe>0;)Fe=Fe*256+z[Se--],pe-=8;if(De===0)De=1-ue;else{if(De===le)return Fe?NaN:Le?-1/0:1/0;Fe=Fe+we(2,ee),De=De-ue}return(Le?-1:1)*Fe*we(2,De-ee)};Ge.exports={pack:xe,unpack:fe}},{"../internals/global":163}],170:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/fails"),we=ae("../internals/classof-raw"),be=me.Object,Te=de("".split);Ge.exports=Ee(function(){return!be("z").propertyIsEnumerable(0)})?function(ve){return we(ve)=="String"?Te(ve,""):be(ve)}:be},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(ae,Ge,Ie){var me=ae("../internals/is-callable"),de=ae("../internals/is-object"),Ee=ae("../internals/object-set-prototype-of");Ge.exports=function(we,be,Te){var ve,xe;return Ee&&me(ve=be.constructor)&&ve!==Te&&de(xe=ve.prototype)&&xe!==Te.prototype&&Ee(we,xe),we}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/is-callable"),Ee=ae("../internals/shared-store"),we=me(Function.toString);de(Ee.inspectSource)||(Ee.inspectSource=function(be){return we(be)}),Ge.exports=Ee.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(ae,Ge,Ie){var me=ae("../internals/native-weak-map"),de=ae("../internals/global"),Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/is-object"),be=ae("../internals/create-non-enumerable-property"),Te=ae("../internals/has-own-property"),ve=ae("../internals/shared-store"),xe=ae("../internals/shared-key"),fe=ae("../internals/hidden-keys"),z="Object already initialized",ee=de.TypeError,oe=de.WeakMap,ie,le,ue,pe=function(ze){return ue(ze)?le(ze):ie(ze,{})},Se=function(ze){return function(He){var Ye;if(!we(He)||(Ye=le(He)).type!==ze)throw ee("Incompatible receiver, "+ze+" required");return Ye}};if(me||ve.state){var Le=ve.state||(ve.state=new oe),De=Ee(Le.get),Fe=Ee(Le.has),Ae=Ee(Le.set);ie=function(ze,He){if(Fe(Le,ze))throw new ee(z);return He.facade=ze,Ae(Le,ze,He),He},le=function(ze){return De(Le,ze)||{}},ue=function(ze){return Fe(Le,ze)}}else{var Oe=xe("state");fe[Oe]=!0,ie=function(ze,He){if(Te(ze,Oe))throw new ee(z);return He.facade=ze,be(ze,Oe,He),He},le=function(ze){return Te(ze,Oe)?ze[Oe]:{}},ue=function(ze){return Te(ze,Oe)}}Ge.exports={set:ie,get:le,has:ue,enforce:pe,getterFor:Se}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(ae,Ge,Ie){var me=ae("../internals/well-known-symbol"),de=ae("../internals/iterators"),Ee=me("iterator"),we=Array.prototype;Ge.exports=function(be){return be!==void 0&&(de.Array===be||we[Ee]===be)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(ae,Ge,Ie){var me=ae("../internals/classof-raw");Ge.exports=Array.isArray||function(Ee){return me(Ee)=="Array"}},{"../internals/classof-raw":123}],176:[function(ae,Ge,Ie){Ge.exports=function(me){return typeof me=="function"}},{}],177:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/fails"),Ee=ae("../internals/is-callable"),we=ae("../internals/classof"),be=ae("../internals/get-built-in"),Te=ae("../internals/inspect-source"),ve=function(){},xe=[],fe=be("Reflect","construct"),z=/^\s*(?:class|function)\b/,ee=me(z.exec),oe=!z.exec(ve),ie=function(pe){if(!Ee(pe))return!1;try{return fe(ve,xe,pe),!0}catch(Se){return!1}},le=function(pe){if(!Ee(pe))return!1;switch(we(pe)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return oe||!!ee(z,Te(pe))}catch(Se){return!0}};le.sham=!0,Ge.exports=!fe||de(function(){var ue;return ie(ie.call)||!ie(Object)||!ie(function(){ue=!0})||ue})?le:ie},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(ae,Ge,Ie){var me=ae("../internals/fails"),de=ae("../internals/is-callable"),Ee=/#|\.prototype\./,we=function(fe,z){var ee=Te[be(fe)];return ee==xe?!0:ee==ve?!1:de(z)?me(z):!!z},be=we.normalize=function(fe){return String(fe).replace(Ee,".").toLowerCase()},Te=we.data={},ve=we.NATIVE="N",xe=we.POLYFILL="P";Ge.exports=we},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(ae,Ge,Ie){var me=ae("../internals/is-object"),de=Math.floor;Ge.exports=Number.isInteger||function(we){return!me(we)&&isFinite(we)&&de(we)===we}},{"../internals/is-object":180}],180:[function(ae,Ge,Ie){var me=ae("../internals/is-callable");Ge.exports=function(de){return typeof de=="object"?de!==null:me(de)}},{"../internals/is-callable":176}],181:[function(ae,Ge,Ie){Ge.exports=!1},{}],182:[function(ae,Ge,Ie){var me=ae("../internals/is-object"),de=ae("../internals/classof-raw"),Ee=ae("../internals/well-known-symbol"),we=Ee("match");Ge.exports=function(be){var Te;return me(be)&&((Te=be[we])!==void 0?!!Te:de(be)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/get-built-in"),Ee=ae("../internals/is-callable"),we=ae("../internals/object-is-prototype-of"),be=ae("../internals/use-symbol-as-uid"),Te=me.Object;Ge.exports=be?function(ve){return typeof ve=="symbol"}:function(ve){var xe=de("Symbol");return Ee(xe)&&we(xe.prototype,Te(ve))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/function-bind-context"),Ee=ae("../internals/function-call"),we=ae("../internals/an-object"),be=ae("../internals/try-to-string"),Te=ae("../internals/is-array-iterator-method"),ve=ae("../internals/length-of-array-like"),xe=ae("../internals/object-is-prototype-of"),fe=ae("../internals/get-iterator"),z=ae("../internals/get-iterator-method"),ee=ae("../internals/iterator-close"),oe=me.TypeError,ie=function(ue,pe){this.stopped=ue,this.result=pe},le=ie.prototype;Ge.exports=function(ue,pe,Se){var Le=Se&&Se.that,De=!!(Se&&Se.AS_ENTRIES),Fe=!!(Se&&Se.IS_ITERATOR),Ae=!!(Se&&Se.INTERRUPTED),Oe=de(pe,Le),ze,He,Ye,We,Ue,st,dt,gt=function(Ke){return ze&&ee(ze,"normal",Ke),new ie(!0,Ke)},Et=function(Ke){return De?(we(Ke),Ae?Oe(Ke[0],Ke[1],gt):Oe(Ke[0],Ke[1])):Ae?Oe(Ke,gt):Oe(Ke)};if(Fe)ze=ue;else{if(He=z(ue),!He)throw oe(be(ue)+" is not iterable");if(Te(He)){for(Ye=0,We=ve(ue);We>Ye;Ye++)if(Ue=Et(ue[Ye]),Ue&&xe(le,Ue))return Ue;return new ie(!1)}ze=fe(ue,He)}for(st=ze.next;!(dt=Ee(st,ze)).done;){try{Ue=Et(dt.value)}catch(Ke){ee(ze,"throw",Ke)}if(typeof Ue=="object"&&Ue&&xe(le,Ue))return Ue}return new ie(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(ae,Ge,Ie){var me=ae("../internals/function-call"),de=ae("../internals/an-object"),Ee=ae("../internals/get-method");Ge.exports=function(we,be,Te){var ve,xe;de(we);try{if(ve=Ee(we,"return"),!ve){if(be==="throw")throw Te;return Te}ve=me(ve,we)}catch(fe){xe=!0,ve=fe}if(be==="throw")throw Te;if(xe)throw ve;return de(ve),Te}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/fails"),de=ae("../internals/is-callable"),Ee=ae("../internals/object-create"),we=ae("../internals/object-get-prototype-of"),be=ae("../internals/redefine"),Te=ae("../internals/well-known-symbol"),ve=ae("../internals/is-pure"),xe=Te("iterator"),fe=!1,z,ee,oe;[].keys&&(oe=[].keys(),"next"in oe?(ee=we(we(oe)),ee!==Object.prototype&&(z=ee)):fe=!0);var ie=z==null||me(function(){var le={};return z[xe].call(le)!==le});ie?z={}:ve&&(z=Ee(z)),de(z[xe])||be(z,xe,function(){return this}),Ge.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:fe}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(ae,Ge,Ie){arguments[4][165][0].apply(Ie,arguments)},{dup:165}],188:[function(ae,Ge,Ie){var me=ae("../internals/to-length");Ge.exports=function(de){return me(de.length)}},{"../internals/to-length":249}],189:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/function-bind-context"),Ee=ae("../internals/object-get-own-property-descriptor").f,we=ae("../internals/task").set,be=ae("../internals/engine-is-ios"),Te=ae("../internals/engine-is-ios-pebble"),ve=ae("../internals/engine-is-webos-webkit"),xe=ae("../internals/engine-is-node"),fe=me.MutationObserver||me.WebKitMutationObserver,z=me.document,ee=me.process,oe=me.Promise,ie=Ee(me,"queueMicrotask"),le=ie&&ie.value,ue,pe,Se,Le,De,Fe,Ae,Oe;le||(ue=function(){var ze,He;for(xe&&(ze=ee.domain)&&ze.exit();pe;){He=pe.fn,pe=pe.next;try{He()}catch(Ye){throw pe?Le():Se=void 0,Ye}}Se=void 0,ze&&ze.enter()},!be&&!xe&&!ve&&fe&&z?(De=!0,Fe=z.createTextNode(""),new fe(ue).observe(Fe,{characterData:!0}),Le=function(){Fe.data=De=!De}):!Te&&oe&&oe.resolve?(Ae=oe.resolve(void 0),Ae.constructor=oe,Oe=de(Ae.then,Ae),Le=function(){Oe(ue)}):xe?Le=function(){ee.nextTick(ue)}:(we=de(we,me),Le=function(){we(ue)})),Ge.exports=le||function(ze){var He={fn:ze,next:void 0};Se&&(Se.next=He),pe||(pe=He,Le()),Se=He}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(ae,Ge,Ie){var me=ae("../internals/native-symbol");Ge.exports=me&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(ae,Ge,Ie){var me=ae("../internals/engine-v8-version"),de=ae("../internals/fails");Ge.exports=!!Object.getOwnPropertySymbols&&!de(function(){var Ee=Symbol();return!String(Ee)||!(Object(Ee)instanceof Symbol)||!Symbol.sham&&me&&me<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-callable"),Ee=ae("../internals/inspect-source"),we=me.WeakMap;Ge.exports=de(we)&&/native code/.test(Ee(we))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/a-callable"),de=function(Ee){var we,be;this.promise=new Ee(function(Te,ve){if(we!==void 0||be!==void 0)throw TypeError("Bad Promise constructor");we=Te,be=ve}),this.resolve=me(we),this.reject=me(be)};Ge.exports.f=function(Ee){return new de(Ee)}},{"../internals/a-callable":95}],194:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-regexp"),Ee=me.TypeError;Ge.exports=function(we){if(de(we))throw Ee("The method doesn't accept regular expressions");return we}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/descriptors"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/function-call"),we=ae("../internals/fails"),be=ae("../internals/object-keys"),Te=ae("../internals/object-get-own-property-symbols"),ve=ae("../internals/object-property-is-enumerable"),xe=ae("../internals/to-object"),fe=ae("../internals/indexed-object"),z=Object.assign,ee=Object.defineProperty,oe=de([].concat);Ge.exports=!z||we(function(){if(me&&z({b:1},z(ee({},"a",{enumerable:!0,get:function(){ee(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var ie={},le={},ue=Symbol(),pe="abcdefghijklmnopqrst";return ie[ue]=7,pe.split("").forEach(function(Se){le[Se]=Se}),z({},ie)[ue]!=7||be(z({},le)).join("")!=pe})?function(le,ue){for(var pe=xe(le),Se=arguments.length,Le=1,De=Te.f,Fe=ve.f;Se>Le;)for(var Ae=fe(arguments[Le++]),Oe=De?oe(be(Ae),De(Ae)):be(Ae),ze=Oe.length,He=0,Ye;ze>He;)Ye=Oe[He++],(!me||Ee(Fe,Ae,Ye))&&(pe[Ye]=Ae[Ye]);return pe}:z},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(ae,Ge,Ie){var me=ae("../internals/an-object"),de=ae("../internals/object-define-properties"),Ee=ae("../internals/enum-bug-keys"),we=ae("../internals/hidden-keys"),be=ae("../internals/html"),Te=ae("../internals/document-create-element"),ve=ae("../internals/shared-key"),xe=">",fe="<",z="prototype",ee="script",oe=ve("IE_PROTO"),ie=function(){},le=function(De){return fe+ee+xe+De+fe+"/"+ee+xe},ue=function(De){De.write(le("")),De.close();var Fe=De.parentWindow.Object;return De=null,Fe},pe=function(){var De=Te("iframe"),Fe="java"+ee+":",Ae;return De.style.display="none",be.appendChild(De),De.src=String(Fe),Ae=De.contentWindow.document,Ae.open(),Ae.write(le("document.F=Object")),Ae.close(),Ae.F},Se,Le=function(){try{Se=new ActiveXObject("htmlfile")}catch(Fe){}Le=typeof document!="undefined"?document.domain&&Se?ue(Se):pe():ue(Se);for(var De=Ee.length;De--;)delete Le[z][Ee[De]];return Le()};we[oe]=!0,Ge.exports=Object.create||function(Fe,Ae){var Oe;return Fe!==null?(ie[z]=me(Fe),Oe=new ie,ie[z]=null,Oe[oe]=Fe):Oe=Le(),Ae===void 0?Oe:de.f(Oe,Ae)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/v8-prototype-define-bug"),Ee=ae("../internals/object-define-property"),we=ae("../internals/an-object"),be=ae("../internals/to-indexed-object"),Te=ae("../internals/object-keys");Ie.f=me&&!de?Object.defineProperties:function(xe,fe){we(xe);for(var z=be(fe),ee=Te(fe),oe=ee.length,ie=0,le;oe>ie;)Ee.f(xe,le=ee[ie++],z[le]);return xe}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/descriptors"),Ee=ae("../internals/ie8-dom-define"),we=ae("../internals/v8-prototype-define-bug"),be=ae("../internals/an-object"),Te=ae("../internals/to-property-key"),ve=me.TypeError,xe=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,z="enumerable",ee="configurable",oe="writable";Ie.f=de?we?function(le,ue,pe){if(be(le),ue=Te(ue),be(pe),typeof le=="function"&&ue==="prototype"&&"value"in pe&&oe in pe&&!pe[oe]){var Se=fe(le,ue);Se&&Se[oe]&&(le[ue]=pe.value,pe={configurable:ee in pe?pe[ee]:Se[ee],enumerable:z in pe?pe[z]:Se[z],writable:!1})}return xe(le,ue,pe)}:xe:function(le,ue,pe){if(be(le),ue=Te(ue),be(pe),Ee)try{return xe(le,ue,pe)}catch(Se){}if("get"in pe||"set"in pe)throw ve("Accessors not supported");return"value"in pe&&(le[ue]=pe.value),le}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/function-call"),Ee=ae("../internals/object-property-is-enumerable"),we=ae("../internals/create-property-descriptor"),be=ae("../internals/to-indexed-object"),Te=ae("../internals/to-property-key"),ve=ae("../internals/has-own-property"),xe=ae("../internals/ie8-dom-define"),fe=Object.getOwnPropertyDescriptor;Ie.f=me?fe:function(ee,oe){if(ee=be(ee),oe=Te(oe),xe)try{return fe(ee,oe)}catch(ie){}if(ve(ee,oe))return we(!de(Ee.f,ee,oe),ee[oe])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(ae,Ge,Ie){var me=ae("../internals/classof-raw"),de=ae("../internals/to-indexed-object"),Ee=ae("../internals/object-get-own-property-names").f,we=ae("../internals/array-slice-simple"),be=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Te=function(ve){try{return Ee(ve)}catch(xe){return we(be)}};Ge.exports.f=function(xe){return be&&me(xe)=="Window"?Te(xe):Ee(de(xe))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(ae,Ge,Ie){var me=ae("../internals/object-keys-internal"),de=ae("../internals/enum-bug-keys"),Ee=de.concat("length","prototype");Ie.f=Object.getOwnPropertyNames||function(be){return me(be,Ee)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(ae,Ge,Ie){Ie.f=Object.getOwnPropertySymbols},{}],203:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/has-own-property"),Ee=ae("../internals/is-callable"),we=ae("../internals/to-object"),be=ae("../internals/shared-key"),Te=ae("../internals/correct-prototype-getter"),ve=be("IE_PROTO"),xe=me.Object,fe=xe.prototype;Ge.exports=Te?xe.getPrototypeOf:function(z){var ee=we(z);if(de(ee,ve))return ee[ve];var oe=ee.constructor;return Ee(oe)&&ee instanceof oe?oe.prototype:ee instanceof xe?fe:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this");Ge.exports=me({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/has-own-property"),Ee=ae("../internals/to-indexed-object"),we=ae("../internals/array-includes").indexOf,be=ae("../internals/hidden-keys"),Te=me([].push);Ge.exports=function(ve,xe){var fe=Ee(ve),z=0,ee=[],oe;for(oe in fe)!de(be,oe)&&de(fe,oe)&&Te(ee,oe);for(;xe.length>z;)de(fe,oe=xe[z++])&&(~we(ee,oe)||Te(ee,oe));return ee}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(ae,Ge,Ie){var me=ae("../internals/object-keys-internal"),de=ae("../internals/enum-bug-keys");Ge.exports=Object.keys||function(we){return me(we,de)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(ae,Ge,Ie){"use strict";var me={}.propertyIsEnumerable,de=Object.getOwnPropertyDescriptor,Ee=de&&!me.call({1:2},1);Ie.f=Ee?function(be){var Te=de(this,be);return!!Te&&Te.enumerable}:me},{}],208:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/an-object"),Ee=ae("../internals/a-possible-prototype");Ge.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var we=!1,be={},Te;try{Te=me(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Te(be,[]),we=be instanceof Array}catch(ve){}return function(xe,fe){return de(xe),Ee(fe),we?Te(xe,fe):xe.__proto__=fe,xe}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/object-keys"),we=ae("../internals/to-indexed-object"),be=ae("../internals/object-property-is-enumerable").f,Te=de(be),ve=de([].push),xe=function(fe){return function(z){for(var ee=we(z),oe=Ee(ee),ie=oe.length,le=0,ue=[],pe;ie>le;)pe=oe[le++],(!me||Te(ee,pe))&&ve(ue,fe?[pe,ee[pe]]:ee[pe]);return ue}};Ge.exports={entries:xe(!0),values:xe(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/to-string-tag-support"),de=ae("../internals/classof");Ge.exports=me?{}.toString:function(){return"[object "+de(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/function-call"),Ee=ae("../internals/is-callable"),we=ae("../internals/is-object"),be=me.TypeError;Ge.exports=function(Te,ve){var xe,fe;if(ve==="string"&&Ee(xe=Te.toString)&&!we(fe=de(xe,Te))||Ee(xe=Te.valueOf)&&!we(fe=de(xe,Te))||ve!=="string"&&Ee(xe=Te.toString)&&!we(fe=de(xe,Te)))return fe;throw be("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(ae,Ge,Ie){var me=ae("../internals/get-built-in"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/object-get-own-property-names"),we=ae("../internals/object-get-own-property-symbols"),be=ae("../internals/an-object"),Te=de([].concat);Ge.exports=me("Reflect","ownKeys")||function(xe){var fe=Ee.f(be(xe)),z=we.f;return z?Te(fe,z(xe)):fe}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(ae,Ge,Ie){var me=ae("../internals/global");Ge.exports=me},{"../internals/global":163}],214:[function(ae,Ge,Ie){Ge.exports=function(me){try{return{error:!1,value:me()}}catch(de){return{error:!0,value:de}}}},{}],215:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/promise-native-constructor"),Ee=ae("../internals/is-callable"),we=ae("../internals/is-forced"),be=ae("../internals/inspect-source"),Te=ae("../internals/well-known-symbol"),ve=ae("../internals/engine-is-browser"),xe=ae("../internals/is-pure"),fe=ae("../internals/engine-v8-version"),z=de&&de.prototype,ee=Te("species"),oe=!1,ie=Ee(me.PromiseRejectionEvent),le=we("Promise",function(){var ue=be(de),pe=ue!==String(de);if(!pe&&fe===66||xe&&!(z.catch&&z.finally))return!0;if(fe>=51&&/native code/.test(ue))return!1;var Se=new de(function(Fe){Fe(1)}),Le=function(Fe){Fe(function(){},function(){})},De=Se.constructor={};return De[ee]=Le,oe=Se.then(function(){})instanceof Le,oe?!pe&&ve&&!ie:!0});Ge.exports={CONSTRUCTOR:le,REJECTION_EVENT:ie,SUBCLASSING:oe}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(ae,Ge,Ie){var me=ae("../internals/global");Ge.exports=me.Promise},{"../internals/global":163}],217:[function(ae,Ge,Ie){var me=ae("../internals/an-object"),de=ae("../internals/is-object"),Ee=ae("../internals/new-promise-capability");Ge.exports=function(we,be){if(me(we),de(be)&&be.constructor===we)return be;var Te=Ee.f(we),ve=Te.resolve;return ve(be),Te.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(ae,Ge,Ie){var me=ae("../internals/promise-native-constructor"),de=ae("../internals/check-correctness-of-iteration"),Ee=ae("../internals/promise-constructor-detection").CONSTRUCTOR;Ge.exports=Ee||!de(function(we){me.all(we).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(ae,Ge,Ie){var me=ae("../internals/object-define-property").f;Ge.exports=function(de,Ee,we){we in de||me(de,we,{configurable:!0,get:function(){return Ee[we]},set:function(be){Ee[we]=be}})}},{"../internals/object-define-property":198}],220:[function(ae,Ge,Ie){var me=function(){this.head=null,this.tail=null};me.prototype={add:function(de){var Ee={item:de,next:null};this.head?this.tail.next=Ee:this.head=Ee,this.tail=Ee},get:function(){var de=this.head;if(de)return this.head=de.next,this.tail===de&&(this.tail=null),de.item}},Ge.exports=me},{}],221:[function(ae,Ge,Ie){var me=ae("../internals/redefine");Ge.exports=function(de,Ee,we){for(var be in Ee)me(de,be,Ee[be],we);return de}},{"../internals/redefine":222}],222:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/is-callable"),Ee=ae("../internals/has-own-property"),we=ae("../internals/create-non-enumerable-property"),be=ae("../internals/set-global"),Te=ae("../internals/inspect-source"),ve=ae("../internals/internal-state"),xe=ae("../internals/function-name").CONFIGURABLE,fe=ve.get,z=ve.enforce,ee=String(String).split("String");(Ge.exports=function(oe,ie,le,ue){var pe=ue?!!ue.unsafe:!1,Se=ue?!!ue.enumerable:!1,Le=ue?!!ue.noTargetGet:!1,De=ue&&ue.name!==void 0?ue.name:ie,Fe;if(de(le)&&(String(De).slice(0,7)==="Symbol("&&(De="["+String(De).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ee(le,"name")||xe&&le.name!==De)&&we(le,"name",De),Fe=z(le),Fe.source||(Fe.source=ee.join(typeof De=="string"?De:""))),oe===me){Se?oe[ie]=le:be(ie,le);return}else pe?!Le&&oe[ie]&&(Se=!0):delete oe[ie];Se?oe[ie]=le:we(oe,ie,le)})(Function.prototype,"toString",function(){return de(this)&&fe(this).source||Te(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/function-call"),Ee=ae("../internals/an-object"),we=ae("../internals/is-callable"),be=ae("../internals/classof-raw"),Te=ae("../internals/regexp-exec"),ve=me.TypeError;Ge.exports=function(xe,fe){var z=xe.exec;if(we(z)){var ee=de(z,xe,fe);return ee!==null&&Ee(ee),ee}if(be(xe)==="RegExp")return de(Te,xe,fe);throw ve("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/function-call"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/to-string"),we=ae("../internals/regexp-flags"),be=ae("../internals/regexp-sticky-helpers"),Te=ae("../internals/shared"),ve=ae("../internals/object-create"),xe=ae("../internals/internal-state").get,fe=ae("../internals/regexp-unsupported-dot-all"),z=ae("../internals/regexp-unsupported-ncg"),ee=Te("native-string-replace",String.prototype.replace),oe=RegExp.prototype.exec,ie=oe,le=de("".charAt),ue=de("".indexOf),pe=de("".replace),Se=de("".slice),Le=function(){var Oe=/a/,ze=/b*/g;return me(oe,Oe,"a"),me(oe,ze,"a"),Oe.lastIndex!==0||ze.lastIndex!==0}(),De=be.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Ae=Le||Fe||De||fe||z;Ae&&(ie=function(ze){var He=this,Ye=xe(He),We=Ee(ze),Ue=Ye.raw,st,dt,gt,Et,Ke,et,$e;if(Ue)return Ue.lastIndex=He.lastIndex,st=me(ie,Ue,We),He.lastIndex=Ue.lastIndex,st;var vt=Ye.groups,wt=De&&He.sticky,ht=me(we,He),pt=He.source,ct=0,Ct=We;if(wt&&(ht=pe(ht,"y",""),ue(ht,"g")===-1&&(ht+="g"),Ct=Se(We,He.lastIndex),He.lastIndex>0&&(!He.multiline||He.multiline&&le(We,He.lastIndex-1)!==`
`)&&(pt="(?: "+pt+")",Ct=" "+Ct,ct++),dt=new RegExp("^(?:"+pt+")",ht)),Fe&&(dt=new RegExp("^"+pt+"$(?!\\s)",ht)),Le&&(gt=He.lastIndex),Et=me(oe,wt?dt:He,Ct),wt?Et?(Et.input=Se(Et.input,ct),Et[0]=Se(Et[0],ct),Et.index=He.lastIndex,He.lastIndex+=Et[0].length):He.lastIndex=0:Le&&Et&&(He.lastIndex=He.global?Et.index+Et[0].length:gt),Fe&&Et&&Et.length>1&&me(ee,Et[0],dt,function(){for(Ke=1;Ke<arguments.length-2;Ke++)arguments[Ke]===void 0&&(Et[Ke]=void 0)}),Et&&vt)for(Et.groups=et=ve(null),Ke=0;Ke<vt.length;Ke++)$e=vt[Ke],et[$e[0]]=Et[$e[1]];return Et}),Ge.exports=ie},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/an-object");Ge.exports=function(){var de=me(this),Ee="";return de.hasIndices&&(Ee+="d"),de.global&&(Ee+="g"),de.ignoreCase&&(Ee+="i"),de.multiline&&(Ee+="m"),de.dotAll&&(Ee+="s"),de.unicode&&(Ee+="u"),de.sticky&&(Ee+="y"),Ee}},{"../internals/an-object":101}],226:[function(ae,Ge,Ie){var me=ae("../internals/function-call"),de=ae("../internals/has-own-property"),Ee=ae("../internals/object-is-prototype-of"),we=ae("../internals/regexp-flags"),be=RegExp.prototype;Ge.exports=function(Te){var ve=Te.flags;return ve===void 0&&!("flags"in be)&&!de(Te,"flags")&&Ee(be,Te)?me(we,Te):ve}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(ae,Ge,Ie){var me=ae("../internals/fails"),de=ae("../internals/global"),Ee=de.RegExp,we=me(function(){var ve=Ee("a","y");return ve.lastIndex=2,ve.exec("abcd")!=null}),be=we||me(function(){return!Ee("a","y").sticky}),Te=we||me(function(){var ve=Ee("^r","gy");return ve.lastIndex=2,ve.exec("str")!=null});Ge.exports={BROKEN_CARET:Te,MISSED_STICKY:be,UNSUPPORTED_Y:we}},{"../internals/fails":150,"../internals/global":163}],228:[function(ae,Ge,Ie){var me=ae("../internals/fails"),de=ae("../internals/global"),Ee=de.RegExp;Ge.exports=me(function(){var we=Ee(".","s");return!(we.dotAll&&we.exec(`
`)&&we.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(ae,Ge,Ie){var me=ae("../internals/fails"),de=ae("../internals/global"),Ee=de.RegExp;Ge.exports=me(function(){var we=Ee("(?<a>b)","g");return we.exec("b").groups.a!=="b"||"b".replace(we,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=me.TypeError;Ge.exports=function(Ee){if(Ee==null)throw de("Can't call method on "+Ee);return Ee}},{"../internals/global":163}],231:[function(ae,Ge,Ie){Ge.exports=Object.is||function(de,Ee){return de===Ee?de!==0||1/de===1/Ee:de!=de&&Ee!=Ee}},{}],232:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=Object.defineProperty;Ge.exports=function(Ee,we){try{de(me,Ee,{value:we,configurable:!0,writable:!0})}catch(be){me[Ee]=we}return we}},{"../internals/global":163}],233:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/get-built-in"),de=ae("../internals/object-define-property"),Ee=ae("../internals/well-known-symbol"),we=ae("../internals/descriptors"),be=Ee("species");Ge.exports=function(Te){var ve=me(Te),xe=de.f;we&&ve&&!ve[be]&&xe(ve,be,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(ae,Ge,Ie){var me=ae("../internals/object-define-property").f,de=ae("../internals/has-own-property"),Ee=ae("../internals/well-known-symbol"),we=Ee("toStringTag");Ge.exports=function(be,Te,ve){be&&!ve&&(be=be.prototype),be&&!de(be,we)&&me(be,we,{configurable:!0,value:Te})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(ae,Ge,Ie){var me=ae("../internals/shared"),de=ae("../internals/uid"),Ee=me("keys");Ge.exports=function(we){return Ee[we]||(Ee[we]=de(we))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/set-global"),Ee="__core-js_shared__",we=me[Ee]||de(Ee,{});Ge.exports=we},{"../internals/global":163,"../internals/set-global":232}],237:[function(ae,Ge,Ie){var me=ae("../internals/is-pure"),de=ae("../internals/shared-store");(Ge.exports=function(Ee,we){return de[Ee]||(de[Ee]=we!==void 0?we:{})})("versions",[]).push({version:"3.22.1",mode:me?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(ae,Ge,Ie){var me=ae("../internals/an-object"),de=ae("../internals/a-constructor"),Ee=ae("../internals/well-known-symbol"),we=Ee("species");Ge.exports=function(be,Te){var ve=me(be).constructor,xe;return ve===void 0||(xe=me(ve)[we])==null?Te:de(xe)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/to-integer-or-infinity"),Ee=ae("../internals/to-string"),we=ae("../internals/require-object-coercible"),be=me("".charAt),Te=me("".charCodeAt),ve=me("".slice),xe=function(fe){return function(z,ee){var oe=Ee(we(z)),ie=de(ee),le=oe.length,ue,pe;return ie<0||ie>=le?fe?"":void 0:(ue=Te(oe,ie),ue<55296||ue>56319||ie+1===le||(pe=Te(oe,ie+1))<56320||pe>57343?fe?be(oe,ie):ue:fe?ve(oe,ie,ie+2):(ue-55296<<10)+(pe-56320)+65536)}};Ge.exports={codeAt:xe(!1),charAt:xe(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(ae,Ge,Ie){var me=ae("../internals/function-name").PROPER,de=ae("../internals/fails"),Ee=ae("../internals/whitespaces"),we="\u200B\x85\u180E";Ge.exports=function(be){return de(function(){return!!Ee[be]()||we[be]()!==we||me&&Ee[be].name!==be})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=ae("../internals/require-object-coercible"),Ee=ae("../internals/to-string"),we=ae("../internals/whitespaces"),be=me("".replace),Te="["+we+"]",ve=RegExp("^"+Te+Te+"*"),xe=RegExp(Te+Te+"*$"),fe=function(z){return function(ee){var oe=Ee(de(ee));return z&1&&(oe=be(oe,ve,"")),z&2&&(oe=be(oe,xe,"")),oe}};Ge.exports={start:fe(1),end:fe(2),trim:fe(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(ae,Ge,Ie){var me=ae("../internals/function-call"),de=ae("../internals/get-built-in"),Ee=ae("../internals/well-known-symbol"),we=ae("../internals/redefine");Ge.exports=function(){var be=de("Symbol"),Te=be&&be.prototype,ve=Te&&Te.valueOf,xe=Ee("toPrimitive");Te&&!Te[xe]&&we(Te,xe,function(fe){return me(ve,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/function-apply"),Ee=ae("../internals/function-bind-context"),we=ae("../internals/is-callable"),be=ae("../internals/has-own-property"),Te=ae("../internals/fails"),ve=ae("../internals/html"),xe=ae("../internals/array-slice"),fe=ae("../internals/document-create-element"),z=ae("../internals/validate-arguments-length"),ee=ae("../internals/engine-is-ios"),oe=ae("../internals/engine-is-node"),ie=me.setImmediate,le=me.clearImmediate,ue=me.process,pe=me.Dispatch,Se=me.Function,Le=me.MessageChannel,De=me.String,Fe=0,Ae={},Oe="onreadystatechange",ze,He,Ye,We;try{ze=me.location}catch(Et){}var Ue=function(Et){if(be(Ae,Et)){var Ke=Ae[Et];delete Ae[Et],Ke()}},st=function(Et){return function(){Ue(Et)}},dt=function(Et){Ue(Et.data)},gt=function(Et){me.postMessage(De(Et),ze.protocol+"//"+ze.host)};(!ie||!le)&&(ie=function(Ke){z(arguments.length,1);var et=we(Ke)?Ke:Se(Ke),$e=xe(arguments,1);return Ae[++Fe]=function(){de(et,void 0,$e)},He(Fe),Fe},le=function(Ke){delete Ae[Ke]},oe?He=function(Et){ue.nextTick(st(Et))}:pe&&pe.now?He=function(Et){pe.now(st(Et))}:Le&&!ee?(Ye=new Le,We=Ye.port2,Ye.port1.onmessage=dt,He=Ee(We.postMessage,We)):me.addEventListener&&we(me.postMessage)&&!me.importScripts&&ze&&ze.protocol!=="file:"&&!Te(gt)?(He=gt,me.addEventListener("message",dt,!1)):Oe in fe("script")?He=function(Et){ve.appendChild(fe("script"))[Oe]=function(){ve.removeChild(this),Ue(Et)}}:He=function(Et){setTimeout(st(Et),0)}),Ge.exports={set:ie,clear:le}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this");Ge.exports=me(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(ae,Ge,Ie){var me=ae("../internals/to-integer-or-infinity"),de=Math.max,Ee=Math.min;Ge.exports=function(we,be){var Te=me(we);return Te<0?de(Te+be,0):Ee(Te,be)}},{"../internals/to-integer-or-infinity":248}],246:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/to-integer-or-infinity"),Ee=ae("../internals/to-length"),we=me.RangeError;Ge.exports=function(be){if(be===void 0)return 0;var Te=de(be),ve=Ee(Te);if(Te!==ve)throw we("Wrong length or index");return ve}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(ae,Ge,Ie){var me=ae("../internals/indexed-object"),de=ae("../internals/require-object-coercible");Ge.exports=function(Ee){return me(de(Ee))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(ae,Ge,Ie){var me=Math.ceil,de=Math.floor;Ge.exports=function(Ee){var we=+Ee;return we!==we||we===0?0:(we>0?de:me)(we)}},{}],249:[function(ae,Ge,Ie){var me=ae("../internals/to-integer-or-infinity"),de=Math.min;Ge.exports=function(Ee){return Ee>0?de(me(Ee),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/require-object-coercible"),Ee=me.Object;Ge.exports=function(we){return Ee(de(we))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/to-positive-integer"),Ee=me.RangeError;Ge.exports=function(we,be){var Te=de(we);if(Te%be)throw Ee("Wrong offset");return Te}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/to-integer-or-infinity"),Ee=me.RangeError;Ge.exports=function(we){var be=de(we);if(be<0)throw Ee("The argument can't be less than 0");return be}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/function-call"),Ee=ae("../internals/is-object"),we=ae("../internals/is-symbol"),be=ae("../internals/get-method"),Te=ae("../internals/ordinary-to-primitive"),ve=ae("../internals/well-known-symbol"),xe=me.TypeError,fe=ve("toPrimitive");Ge.exports=function(z,ee){if(!Ee(z)||we(z))return z;var oe=be(z,fe),ie;if(oe){if(ee===void 0&&(ee="default"),ie=de(oe,z,ee),!Ee(ie)||we(ie))return ie;throw xe("Can't convert object to primitive value")}return ee===void 0&&(ee="number"),Te(z,ee)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(ae,Ge,Ie){var me=ae("../internals/to-primitive"),de=ae("../internals/is-symbol");Ge.exports=function(Ee){var we=me(Ee,"string");return de(we)?we:we+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(ae,Ge,Ie){var me=ae("../internals/well-known-symbol"),de=me("toStringTag"),Ee={};Ee[de]="z",Ge.exports=String(Ee)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/classof"),Ee=me.String;Ge.exports=function(we){if(de(we)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Ee(we)}},{"../internals/classof":124,"../internals/global":163}],257:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=me.String;Ge.exports=function(Ee){try{return de(Ee)}catch(we){return"Object"}}},{"../internals/global":163}],258:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/global"),Ee=ae("../internals/function-call"),we=ae("../internals/descriptors"),be=ae("../internals/typed-array-constructors-require-wrappers"),Te=ae("../internals/array-buffer-view-core"),ve=ae("../internals/array-buffer"),xe=ae("../internals/an-instance"),fe=ae("../internals/create-property-descriptor"),z=ae("../internals/create-non-enumerable-property"),ee=ae("../internals/is-integral-number"),oe=ae("../internals/to-length"),ie=ae("../internals/to-index"),le=ae("../internals/to-offset"),ue=ae("../internals/to-property-key"),pe=ae("../internals/has-own-property"),Se=ae("../internals/classof"),Le=ae("../internals/is-object"),De=ae("../internals/is-symbol"),Fe=ae("../internals/object-create"),Ae=ae("../internals/object-is-prototype-of"),Oe=ae("../internals/object-set-prototype-of"),ze=ae("../internals/object-get-own-property-names").f,He=ae("../internals/typed-array-from"),Ye=ae("../internals/array-iteration").forEach,We=ae("../internals/set-species"),Ue=ae("../internals/object-define-property"),st=ae("../internals/object-get-own-property-descriptor"),dt=ae("../internals/internal-state"),gt=ae("../internals/inherit-if-required"),Et=dt.get,Ke=dt.set,et=Ue.f,$e=st.f,vt=Math.round,wt=de.RangeError,ht=ve.ArrayBuffer,pt=ht.prototype,ct=ve.DataView,Ct=Te.NATIVE_ARRAY_BUFFER_VIEWS,xt=Te.TYPED_ARRAY_CONSTRUCTOR,yt=Te.TYPED_ARRAY_TAG,Tt=Te.TypedArray,St=Te.TypedArrayPrototype,nt=Te.aTypedArrayConstructor,Qe=Te.isTypedArray,Ce="BYTES_PER_ELEMENT",Ne="Wrong length",Je=function(Pt,kt){nt(Pt);for(var zt=0,jt=kt.length,Ht=new Pt(jt);jt>zt;)Ht[zt]=kt[zt++];return Ht},rt=function(Pt,kt){et(Pt,kt,{get:function(){return Et(this)[kt]}})},Be=function(Pt){var kt;return Ae(pt,Pt)||(kt=Se(Pt))=="ArrayBuffer"||kt=="SharedArrayBuffer"},_e=function(Pt,kt){return Qe(Pt)&&!De(kt)&&kt in Pt&&ee(+kt)&&kt>=0},Xe=function(kt,zt){return zt=ue(zt),_e(kt,zt)?fe(2,kt[zt]):$e(kt,zt)},lt=function(kt,zt,jt){return zt=ue(zt),_e(kt,zt)&&Le(jt)&&pe(jt,"value")&&!pe(jt,"get")&&!pe(jt,"set")&&!jt.configurable&&(!pe(jt,"writable")||jt.writable)&&(!pe(jt,"enumerable")||jt.enumerable)?(kt[zt]=jt.value,kt):et(kt,zt,jt)};we?(Ct||(st.f=Xe,Ue.f=lt,rt(St,"buffer"),rt(St,"byteOffset"),rt(St,"byteLength"),rt(St,"length")),me({target:"Object",stat:!0,forced:!Ct},{getOwnPropertyDescriptor:Xe,defineProperty:lt}),Ge.exports=function(Pt,kt,zt){var jt=Pt.match(/\d+$/)[0]/8,Ht=Pt+(zt?"Clamped":"")+"Array",ln="get"+Pt,an="set"+Pt,sn=de[Ht],$t=sn,On=$t&&$t.prototype,un={},mn=function(Dn,fr){var _r=Et(Dn);return _r.view[ln](fr*jt+_r.byteOffset,!0)},In=function(Dn,fr,_r){var mr=Et(Dn);zt&&(_r=(_r=vt(_r))<0?0:_r>255?255:_r&255),mr.view[an](fr*jt+mr.byteOffset,_r,!0)},Sn=function(Dn,fr){et(Dn,fr,{get:function(){return mn(this,fr)},set:function(_r){return In(this,fr,_r)},enumerable:!0})};Ct?be&&($t=kt(function(Dn,fr,_r,mr){return xe(Dn,On),gt(function(){return Le(fr)?Be(fr)?mr!==void 0?new sn(fr,le(_r,jt),mr):_r!==void 0?new sn(fr,le(_r,jt)):new sn(fr):Qe(fr)?Je($t,fr):Ee(He,$t,fr):new sn(ie(fr))}(),Dn,$t)}),Oe&&Oe($t,Tt),Ye(ze(sn),function(Dn){Dn in $t||z($t,Dn,sn[Dn])}),$t.prototype=On):($t=kt(function(Dn,fr,_r,mr){xe(Dn,On);var wi=0,no=0,ro,io,Ji;if(!Le(fr))Ji=ie(fr),io=Ji*jt,ro=new ht(io);else if(Be(fr)){ro=fr,no=le(_r,jt);var lo=fr.byteLength;if(mr===void 0){if(lo%jt||(io=lo-no,io<0))throw wt(Ne)}else if(io=oe(mr)*jt,io+no>lo)throw wt(Ne);Ji=io/jt}else return Qe(fr)?Je($t,fr):Ee(He,$t,fr);for(Ke(Dn,{buffer:ro,byteOffset:no,byteLength:io,length:Ji,view:new ct(ro)});wi<Ji;)Sn(Dn,wi++)}),Oe&&Oe($t,Tt),On=$t.prototype=Fe(St)),On.constructor!==$t&&z(On,"constructor",$t),z(On,xt,$t),yt&&z(On,yt,Ht),un[Ht]=$t,me({global:!0,forced:$t!=sn,sham:!Ct},un),Ce in $t||z($t,Ce,jt),Ce in On||z(On,Ce,jt),We(Ht)}):Ge.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/fails"),Ee=ae("../internals/check-correctness-of-iteration"),we=ae("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,be=me.ArrayBuffer,Te=me.Int8Array;Ge.exports=!we||!de(function(){Te(1)})||!de(function(){new Te(-1)})||!Ee(function(ve){new Te,new Te(null),new Te(1.5),new Te(ve)},!0)||de(function(){return new Te(new be(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(ae,Ge,Ie){var me=ae("../internals/array-from-constructor-and-list"),de=ae("../internals/typed-array-species-constructor");Ge.exports=function(Ee,we){return me(de(Ee),we)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(ae,Ge,Ie){var me=ae("../internals/function-bind-context"),de=ae("../internals/function-call"),Ee=ae("../internals/a-constructor"),we=ae("../internals/to-object"),be=ae("../internals/length-of-array-like"),Te=ae("../internals/get-iterator"),ve=ae("../internals/get-iterator-method"),xe=ae("../internals/is-array-iterator-method"),fe=ae("../internals/array-buffer-view-core").aTypedArrayConstructor;Ge.exports=function(ee){var oe=Ee(this),ie=we(ee),le=arguments.length,ue=le>1?arguments[1]:void 0,pe=ue!==void 0,Se=ve(ie),Le,De,Fe,Ae,Oe,ze;if(Se&&!xe(Se))for(Oe=Te(ie,Se),ze=Oe.next,ie=[];!(Ae=de(ze,Oe)).done;)ie.push(Ae.value);for(pe&&le>2&&(ue=me(ue,arguments[2])),De=be(ie),Fe=new(fe(oe))(De),Le=0;De>Le;Le++)Fe[Le]=pe?ue(ie[Le],Le):ie[Le];return Fe}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(ae,Ge,Ie){var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/species-constructor"),Ee=me.TYPED_ARRAY_CONSTRUCTOR,we=me.aTypedArrayConstructor;Ge.exports=function(be){return we(de(be,be[Ee]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(ae,Ge,Ie){var me=ae("../internals/function-uncurry-this"),de=0,Ee=Math.random(),we=me(1 .toString);Ge.exports=function(be){return"Symbol("+(be===void 0?"":be)+")_"+we(++de+Ee,36)}},{"../internals/function-uncurry-this":157}],264:[function(ae,Ge,Ie){var me=ae("../internals/native-symbol");Ge.exports=me&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/fails");Ge.exports=me&&de(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=me.TypeError;Ge.exports=function(Ee,we){if(Ee<we)throw de("Not enough arguments");return Ee}},{"../internals/global":163}],267:[function(ae,Ge,Ie){var me=ae("../internals/well-known-symbol");Ie.f=me},{"../internals/well-known-symbol":268}],268:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/shared"),Ee=ae("../internals/has-own-property"),we=ae("../internals/uid"),be=ae("../internals/native-symbol"),Te=ae("../internals/use-symbol-as-uid"),ve=de("wks"),xe=me.Symbol,fe=xe&&xe.for,z=Te?xe:xe&&xe.withoutSetter||we;Ge.exports=function(ee){if(!Ee(ve,ee)||!(be||typeof ve[ee]=="string")){var oe="Symbol."+ee;be&&Ee(xe,ee)?ve[ee]=xe[ee]:Te&&fe?ve[ee]=fe(oe):ve[ee]=z(oe)}return ve[ee]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(ae,Ge,Ie){Ge.exports=`
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/global"),Ee=ae("../internals/array-buffer"),we=ae("../internals/set-species"),be="ArrayBuffer",Te=Ee[be],ve=de[be];me({global:!0,forced:ve!==Te},{ArrayBuffer:Te}),we(be)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/fails"),we=ae("../internals/array-buffer"),be=ae("../internals/an-object"),Te=ae("../internals/to-absolute-index"),ve=ae("../internals/to-length"),xe=ae("../internals/species-constructor"),fe=we.ArrayBuffer,z=we.DataView,ee=z.prototype,oe=de(fe.prototype.slice),ie=de(ee.getUint8),le=de(ee.setUint8),ue=Ee(function(){return!new fe(2).slice(1,void 0).byteLength});me({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ue},{slice:function(Se,Le){if(oe&&Le===void 0)return oe(be(this),Se);for(var De=be(this).byteLength,Fe=Te(Se,De),Ae=Te(Le===void 0?De:Le,De),Oe=new(xe(this,fe))(ve(Ae-Fe)),ze=new z(this),He=new z(Oe),Ye=0;Fe<Ae;)le(He,Ye++,ie(ze,Fe++));return Oe}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/global"),Ee=ae("../internals/fails"),we=ae("../internals/is-array"),be=ae("../internals/is-object"),Te=ae("../internals/to-object"),ve=ae("../internals/length-of-array-like"),xe=ae("../internals/create-property"),fe=ae("../internals/array-species-create"),z=ae("../internals/array-method-has-species-support"),ee=ae("../internals/well-known-symbol"),oe=ae("../internals/engine-v8-version"),ie=ee("isConcatSpreadable"),le=9007199254740991,ue="Maximum allowed index exceeded",pe=de.TypeError,Se=oe>=51||!Ee(function(){var Ae=[];return Ae[ie]=!1,Ae.concat()[0]!==Ae}),Le=z("concat"),De=function(Ae){if(!be(Ae))return!1;var Oe=Ae[ie];return Oe!==void 0?!!Oe:we(Ae)},Fe=!Se||!Le;me({target:"Array",proto:!0,forced:Fe},{concat:function(Oe){var ze=Te(this),He=fe(ze,0),Ye=0,We,Ue,st,dt,gt;for(We=-1,st=arguments.length;We<st;We++)if(gt=We===-1?ze:arguments[We],De(gt)){if(dt=ve(gt),Ye+dt>le)throw pe(ue);for(Ue=0;Ue<dt;Ue++,Ye++)Ue in gt&&xe(He,Ye,gt[Ue])}else{if(Ye>=le)throw pe(ue);xe(He,Ye++,gt)}return He.length=Ye,He}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/array-fill"),Ee=ae("../internals/add-to-unscopables");me({target:"Array",proto:!0},{fill:de}),Ee("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/array-iteration").filter,Ee=ae("../internals/array-method-has-species-support"),we=Ee("filter");me({target:"Array",proto:!0,forced:!we},{filter:function(Te){return de(this,Te,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/array-iteration").find,Ee=ae("../internals/add-to-unscopables"),we="find",be=!0;we in[]&&Array(1)[we](function(){be=!1}),me({target:"Array",proto:!0,forced:be},{find:function(ve){return de(this,ve,arguments.length>1?arguments[1]:void 0)}}),Ee(we)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/array-from"),Ee=ae("../internals/check-correctness-of-iteration"),we=!Ee(function(be){Array.from(be)});me({target:"Array",stat:!0,forced:we},{from:de})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/array-includes").includes,Ee=ae("../internals/add-to-unscopables");me({target:"Array",proto:!0},{includes:function(be){return de(this,be,arguments.length>1?arguments[1]:void 0)}}),Ee("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/to-indexed-object"),de=ae("../internals/add-to-unscopables"),Ee=ae("../internals/iterators"),we=ae("../internals/internal-state"),be=ae("../internals/object-define-property").f,Te=ae("../internals/define-iterator"),ve=ae("../internals/is-pure"),xe=ae("../internals/descriptors"),fe="Array Iterator",z=we.set,ee=we.getterFor(fe);Ge.exports=Te(Array,"Array",function(ie,le){z(this,{type:fe,target:me(ie),index:0,kind:le})},function(){var ie=ee(this),le=ie.target,ue=ie.kind,pe=ie.index++;return!le||pe>=le.length?(ie.target=void 0,{value:void 0,done:!0}):ue=="keys"?{value:pe,done:!1}:ue=="values"?{value:le[pe],done:!1}:{value:[pe,le[pe]],done:!1}},"values");var oe=Ee.Arguments=Ee.Array;if(de("keys"),de("values"),de("entries"),!ve&&xe&&oe.name!=="values")try{be(oe,"name",{value:"values"})}catch(ie){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/indexed-object"),we=ae("../internals/to-indexed-object"),be=ae("../internals/array-method-is-strict"),Te=de([].join),ve=Ee!=Object,xe=be("join",",");me({target:"Array",proto:!0,forced:ve||!xe},{join:function(z){return Te(we(this),z===void 0?",":z)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/array-iteration").map,Ee=ae("../internals/array-method-has-species-support"),we=Ee("map");me({target:"Array",proto:!0,forced:!we},{map:function(Te){return de(this,Te,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/global"),Ee=ae("../internals/is-array"),we=ae("../internals/is-constructor"),be=ae("../internals/is-object"),Te=ae("../internals/to-absolute-index"),ve=ae("../internals/length-of-array-like"),xe=ae("../internals/to-indexed-object"),fe=ae("../internals/create-property"),z=ae("../internals/well-known-symbol"),ee=ae("../internals/array-method-has-species-support"),oe=ae("../internals/array-slice"),ie=ee("slice"),le=z("species"),ue=de.Array,pe=Math.max;me({target:"Array",proto:!0,forced:!ie},{slice:function(Le,De){var Fe=xe(this),Ae=ve(Fe),Oe=Te(Le,Ae),ze=Te(De===void 0?Ae:De,Ae),He,Ye,We;if(Ee(Fe)&&(He=Fe.constructor,we(He)&&(He===ue||Ee(He.prototype))?He=void 0:be(He)&&(He=He[le],He===null&&(He=void 0)),He===ue||He===void 0))return oe(Fe,Oe,ze);for(Ye=new(He===void 0?ue:He)(pe(ze-Oe,0)),We=0;Oe<ze;Oe++,We++)Oe in Fe&&fe(Ye,We,Fe[Oe]);return Ye.length=We,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/a-callable"),we=ae("../internals/to-object"),be=ae("../internals/length-of-array-like"),Te=ae("../internals/to-string"),ve=ae("../internals/fails"),xe=ae("../internals/array-sort"),fe=ae("../internals/array-method-is-strict"),z=ae("../internals/engine-ff-version"),ee=ae("../internals/engine-is-ie-or-edge"),oe=ae("../internals/engine-v8-version"),ie=ae("../internals/engine-webkit-version"),le=[],ue=de(le.sort),pe=de(le.push),Se=ve(function(){le.sort(void 0)}),Le=ve(function(){le.sort(null)}),De=fe("sort"),Fe=!ve(function(){if(oe)return oe<70;if(!(z&&z>3)){if(ee)return!0;if(ie)return ie<603;var ze="",He,Ye,We,Ue;for(He=65;He<76;He++){switch(Ye=String.fromCharCode(He),He){case 66:case 69:case 70:case 72:We=3;break;case 68:case 71:We=4;break;default:We=2}for(Ue=0;Ue<47;Ue++)le.push({k:Ye+Ue,v:We})}for(le.sort(function(st,dt){return dt.v-st.v}),Ue=0;Ue<le.length;Ue++)Ye=le[Ue].k.charAt(0),ze.charAt(ze.length-1)!==Ye&&(ze+=Ye);return ze!=="DGBEFHACIJK"}}),Ae=Se||!Le||!De||!Fe,Oe=function(ze){return function(He,Ye){return Ye===void 0?-1:He===void 0?1:ze!==void 0?+ze(He,Ye)||0:Te(He)>Te(Ye)?1:-1}};me({target:"Array",proto:!0,forced:Ae},{sort:function(He){He!==void 0&&Ee(He);var Ye=we(this);if(Fe)return He===void 0?ue(Ye):ue(Ye,He);var We=[],Ue=be(Ye),st,dt;for(dt=0;dt<Ue;dt++)dt in Ye&&pe(We,Ye[dt]);for(xe(We,Oe(He)),st=We.length,dt=0;dt<st;)Ye[dt]=We[dt++];for(;dt<Ue;)delete Ye[dt++];return Ye}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/global"),Ee=ae("../internals/to-absolute-index"),we=ae("../internals/to-integer-or-infinity"),be=ae("../internals/length-of-array-like"),Te=ae("../internals/to-object"),ve=ae("../internals/array-species-create"),xe=ae("../internals/create-property"),fe=ae("../internals/array-method-has-species-support"),z=fe("splice"),ee=de.TypeError,oe=Math.max,ie=Math.min,le=9007199254740991,ue="Maximum allowed length exceeded";me({target:"Array",proto:!0,forced:!z},{splice:function(Se,Le){var De=Te(this),Fe=be(De),Ae=Ee(Se,Fe),Oe=arguments.length,ze,He,Ye,We,Ue,st;if(Oe===0?ze=He=0:Oe===1?(ze=0,He=Fe-Ae):(ze=Oe-2,He=ie(oe(we(Le),0),Fe-Ae)),Fe+ze-He>le)throw ee(ue);for(Ye=ve(De,He),We=0;We<He;We++)Ue=Ae+We,Ue in De&&xe(Ye,We,De[Ue]);if(Ye.length=He,ze<He){for(We=Ae;We<Fe-He;We++)Ue=We+He,st=We+ze,Ue in De?De[st]=De[Ue]:delete De[st];for(We=Fe;We>Fe-He+ze;We--)delete De[We-1]}else if(ze>He)for(We=Fe-He;We>Ae;We--)Ue=We+He-1,st=We+ze-1,Ue in De?De[st]=De[Ue]:delete De[st];for(We=0;We<ze;We++)De[We+Ae]=arguments[We+2];return De.length=Fe-He+ze,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/function-name").EXISTS,Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/object-define-property").f,be=Function.prototype,Te=Ee(be.toString),ve=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,xe=Ee(ve.exec),fe="name";me&&!de&&we(be,fe,{configurable:!0,get:function(){try{return xe(ve,Te(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/get-built-in"),Ee=ae("../internals/function-apply"),we=ae("../internals/function-call"),be=ae("../internals/function-uncurry-this"),Te=ae("../internals/fails"),ve=ae("../internals/is-array"),xe=ae("../internals/is-callable"),fe=ae("../internals/is-object"),z=ae("../internals/is-symbol"),ee=ae("../internals/array-slice"),oe=ae("../internals/native-symbol"),ie=de("JSON","stringify"),le=be(/./.exec),ue=be("".charAt),pe=be("".charCodeAt),Se=be("".replace),Le=be(1 .toString),De=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,Ae=/^[\uDC00-\uDFFF]$/,Oe=!oe||Te(function(){var We=de("Symbol")();return ie([We])!="[null]"||ie({a:We})!="{}"||ie(Object(We))!="{}"}),ze=Te(function(){return ie("\uDF06\uD834")!=='"\\udf06\\ud834"'||ie("\uDEAD")!=='"\\udead"'}),He=function(We,Ue){var st=ee(arguments),dt=Ue;if(!(!fe(Ue)&&We===void 0||z(We)))return ve(Ue)||(Ue=function(gt,Et){if(xe(dt)&&(Et=we(dt,this,gt,Et)),!z(Et))return Et}),st[1]=Ue,Ee(ie,null,st)},Ye=function(We,Ue,st){var dt=ue(st,Ue-1),gt=ue(st,Ue+1);return le(Fe,We)&&!le(Ae,gt)||le(Ae,We)&&!le(Fe,dt)?"\\u"+Le(pe(We,0),16):We};ie&&me({target:"JSON",stat:!0,forced:Oe||ze},{stringify:function(Ue,st,dt){var gt=ee(arguments),Et=Ee(Oe?He:ie,null,gt);return ze&&typeof Et=="string"?Se(Et,De,Ye):Et}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/descriptors"),de=ae("../internals/global"),Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/is-forced"),be=ae("../internals/redefine"),Te=ae("../internals/has-own-property"),ve=ae("../internals/inherit-if-required"),xe=ae("../internals/object-is-prototype-of"),fe=ae("../internals/is-symbol"),z=ae("../internals/to-primitive"),ee=ae("../internals/fails"),oe=ae("../internals/object-get-own-property-names").f,ie=ae("../internals/object-get-own-property-descriptor").f,le=ae("../internals/object-define-property").f,ue=ae("../internals/this-number-value"),pe=ae("../internals/string-trim").trim,Se="Number",Le=de[Se],De=Le.prototype,Fe=de.TypeError,Ae=Ee("".slice),Oe=Ee("".charCodeAt),ze=function(dt){var gt=z(dt,"number");return typeof gt=="bigint"?gt:He(gt)},He=function(dt){var gt=z(dt,"number"),Et,Ke,et,$e,vt,wt,ht,pt;if(fe(gt))throw Fe("Cannot convert a Symbol value to a number");if(typeof gt=="string"&&gt.length>2){if(gt=pe(gt),Et=Oe(gt,0),Et===43||Et===45){if(Ke=Oe(gt,2),Ke===88||Ke===120)return NaN}else if(Et===48){switch(Oe(gt,1)){case 66:case 98:et=2,$e=49;break;case 79:case 111:et=8,$e=55;break;default:return+gt}for(vt=Ae(gt,2),wt=vt.length,ht=0;ht<wt;ht++)if(pt=Oe(vt,ht),pt<48||pt>$e)return NaN;return parseInt(vt,et)}}return+gt};if(we(Se,!Le(" 0o1")||!Le("0b1")||Le("+0x1"))){for(var Ye=function(gt){var Et=arguments.length<1?0:Le(ze(gt)),Ke=this;return xe(De,Ke)&&ee(function(){ue(Ke)})?ve(Object(Et),Ke,Ye):Et},We=me?oe(Le):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Ue=0,st;We.length>Ue;Ue++)Te(Le,st=We[Ue])&&!Te(Ye,st)&&le(Ye,st,ie(Le,st));Ye.prototype=De,De.constructor=Ye,be(de,Se,Ye)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/object-assign");me({target:"Object",stat:!0,forced:Object.assign!==de},{assign:de})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/object-to-array").entries;me({target:"Object",stat:!0},{entries:function(we){return de(we)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/native-symbol"),Ee=ae("../internals/fails"),we=ae("../internals/object-get-own-property-symbols"),be=ae("../internals/to-object"),Te=!de||Ee(function(){we.f(1)});me({target:"Object",stat:!0,forced:Te},{getOwnPropertySymbols:function(xe){var fe=we.f;return fe?fe(be(xe)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/to-object"),Ee=ae("../internals/object-keys"),we=ae("../internals/fails"),be=we(function(){Ee(1)});me({target:"Object",stat:!0,forced:be},{keys:function(ve){return Ee(de(ve))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(ae,Ge,Ie){var me=ae("../internals/to-string-tag-support"),de=ae("../internals/redefine"),Ee=ae("../internals/object-to-string");me||de(Object.prototype,"toString",Ee,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/function-call"),Ee=ae("../internals/a-callable"),we=ae("../internals/new-promise-capability"),be=ae("../internals/perform"),Te=ae("../internals/iterate"),ve=ae("../internals/promise-statics-incorrect-iteration");me({target:"Promise",stat:!0,forced:ve},{all:function(fe){var z=this,ee=we.f(z),oe=ee.resolve,ie=ee.reject,le=be(function(){var ue=Ee(z.resolve),pe=[],Se=0,Le=1;Te(fe,function(De){var Fe=Se++,Ae=!1;Le++,de(ue,z,De).then(function(Oe){Ae||(Ae=!0,pe[Fe]=Oe,--Le||oe(pe))},ie)}),--Le||oe(pe)});return le.error&&ie(le.value),ee.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/is-pure"),Ee=ae("../internals/promise-constructor-detection").CONSTRUCTOR,we=ae("../internals/promise-native-constructor"),be=ae("../internals/get-built-in"),Te=ae("../internals/is-callable"),ve=ae("../internals/redefine"),xe=we&&we.prototype;if(me({target:"Promise",proto:!0,forced:Ee,real:!0},{catch:function(z){return this.then(void 0,z)}}),!de&&Te(we)){var fe=be("Promise").prototype.catch;xe.catch!==fe&&ve(xe,"catch",fe,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/is-pure"),Ee=ae("../internals/engine-is-node"),we=ae("../internals/global"),be=ae("../internals/function-call"),Te=ae("../internals/redefine"),ve=ae("../internals/redefine-all"),xe=ae("../internals/object-set-prototype-of"),fe=ae("../internals/set-to-string-tag"),z=ae("../internals/set-species"),ee=ae("../internals/a-callable"),oe=ae("../internals/is-callable"),ie=ae("../internals/is-object"),le=ae("../internals/an-instance"),ue=ae("../internals/species-constructor"),pe=ae("../internals/task").set,Se=ae("../internals/microtask"),Le=ae("../internals/host-report-errors"),De=ae("../internals/perform"),Fe=ae("../internals/queue"),Ae=ae("../internals/internal-state"),Oe=ae("../internals/promise-native-constructor"),ze=ae("../internals/promise-constructor-detection"),He=ae("../internals/new-promise-capability"),Ye="Promise",We=ze.CONSTRUCTOR,Ue=ze.REJECTION_EVENT,st=ze.SUBCLASSING,dt=Ae.getterFor(Ye),gt=Ae.set,Et=Oe&&Oe.prototype,Ke=Oe,et=Et,$e=we.TypeError,vt=we.document,wt=we.process,ht=He.f,pt=ht,ct=!!(vt&&vt.createEvent&&we.dispatchEvent),Ct="unhandledrejection",xt="rejectionhandled",yt=0,Tt=1,St=2,nt=1,Qe=2,Ce,Ne,Je,rt,Be=function(an){var sn;return ie(an)&&oe(sn=an.then)?sn:!1},_e=function(an,sn){var $t=sn.value,On=sn.state==Tt,un=On?an.ok:an.fail,mn=an.resolve,In=an.reject,Sn=an.domain,Dn,fr,_r;try{un?(On||(sn.rejection===Qe&&zt(sn),sn.rejection=nt),un===!0?Dn=$t:(Sn&&Sn.enter(),Dn=un($t),Sn&&(Sn.exit(),_r=!0)),Dn===an.promise?In($e("Promise-chain cycle")):(fr=Be(Dn))?be(fr,Dn,mn,In):mn(Dn)):In($t)}catch(mr){Sn&&!_r&&Sn.exit(),In(mr)}},Xe=function(an,sn){an.notified||(an.notified=!0,Se(function(){for(var $t=an.reactions,On;On=$t.get();)_e(On,an);an.notified=!1,sn&&!an.rejection&&Pt(an)}))},lt=function(an,sn,$t){var On,un;ct?(On=vt.createEvent("Event"),On.promise=sn,On.reason=$t,On.initEvent(an,!1,!0),we.dispatchEvent(On)):On={promise:sn,reason:$t},!Ue&&(un=we["on"+an])?un(On):an===Ct&&Le("Unhandled promise rejection",$t)},Pt=function(an){be(pe,we,function(){var sn=an.facade,$t=an.value,On=kt(an),un;if(On&&(un=De(function(){Ee?wt.emit("unhandledRejection",$t,sn):lt(Ct,sn,$t)}),an.rejection=Ee||kt(an)?Qe:nt,un.error))throw un.value})},kt=function(an){return an.rejection!==nt&&!an.parent},zt=function(an){be(pe,we,function(){var sn=an.facade;Ee?wt.emit("rejectionHandled",sn):lt(xt,sn,an.value)})},jt=function(an,sn,$t){return function(On){an(sn,On,$t)}},Ht=function(an,sn,$t){an.done||(an.done=!0,$t&&(an=$t),an.value=sn,an.state=St,Xe(an,!0))},ln=function(an,sn,$t){if(!an.done){an.done=!0,$t&&(an=$t);try{if(an.facade===sn)throw $e("Promise can't be resolved itself");var On=Be(sn);On?Se(function(){var un={done:!1};try{be(On,sn,jt(ln,un,an),jt(Ht,un,an))}catch(mn){Ht(un,mn,an)}}):(an.value=sn,an.state=Tt,Xe(an,!1))}catch(un){Ht({done:!1},un,an)}}};if(We&&(Ke=function(sn){le(this,et),ee(sn),be(Ce,this);var $t=dt(this);try{sn(jt(ln,$t),jt(Ht,$t))}catch(On){Ht($t,On)}},et=Ke.prototype,Ce=function(sn){gt(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:yt,value:void 0})},Ce.prototype=ve(et,{then:function(sn,$t){var On=dt(this),un=ht(ue(this,Ke));return On.parent=!0,un.ok=oe(sn)?sn:!0,un.fail=oe($t)&&$t,un.domain=Ee?wt.domain:void 0,On.state==yt?On.reactions.add(un):Se(function(){_e(un,On)}),un.promise}}),Ne=function(){var an=new Ce,sn=dt(an);this.promise=an,this.resolve=jt(ln,sn),this.reject=jt(Ht,sn)},He.f=ht=function(an){return an===Ke||an===Je?new Ne(an):pt(an)},!de&&oe(Oe)&&Et!==Object.prototype)){rt=Et.then,st||Te(Et,"then",function(sn,$t){var On=this;return new Ke(function(un,mn){be(rt,On,un,mn)}).then(sn,$t)},{unsafe:!0});try{delete Et.constructor}catch(an){}xe&&xe(Et,et)}me({global:!0,wrap:!0,forced:We},{Promise:Ke}),fe(Ke,Ye,!1,!0),z(Ye)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(ae,Ge,Ie){ae("../modules/es.promise.constructor"),ae("../modules/es.promise.all"),ae("../modules/es.promise.catch"),ae("../modules/es.promise.race"),ae("../modules/es.promise.reject"),ae("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/function-call"),Ee=ae("../internals/a-callable"),we=ae("../internals/new-promise-capability"),be=ae("../internals/perform"),Te=ae("../internals/iterate"),ve=ae("../internals/promise-statics-incorrect-iteration");me({target:"Promise",stat:!0,forced:ve},{race:function(fe){var z=this,ee=we.f(z),oe=ee.reject,ie=be(function(){var le=Ee(z.resolve);Te(fe,function(ue){de(le,z,ue).then(ee.resolve,oe)})});return ie.error&&oe(ie.value),ee.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/function-call"),Ee=ae("../internals/new-promise-capability"),we=ae("../internals/promise-constructor-detection").CONSTRUCTOR;me({target:"Promise",stat:!0,forced:we},{reject:function(Te){var ve=Ee.f(this);return de(ve.reject,void 0,Te),ve.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/get-built-in"),Ee=ae("../internals/is-pure"),we=ae("../internals/promise-native-constructor"),be=ae("../internals/promise-constructor-detection").CONSTRUCTOR,Te=ae("../internals/promise-resolve"),ve=de("Promise"),xe=Ee&&!be;me({target:"Promise",stat:!0,forced:Ee||be},{resolve:function(z){return Te(xe&&this===ve?we:this,z)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(ae,Ge,Ie){var me=ae("../internals/descriptors"),de=ae("../internals/global"),Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/is-forced"),be=ae("../internals/inherit-if-required"),Te=ae("../internals/create-non-enumerable-property"),ve=ae("../internals/object-get-own-property-names").f,xe=ae("../internals/object-is-prototype-of"),fe=ae("../internals/is-regexp"),z=ae("../internals/to-string"),ee=ae("../internals/regexp-get-flags"),oe=ae("../internals/regexp-sticky-helpers"),ie=ae("../internals/proxy-accessor"),le=ae("../internals/redefine"),ue=ae("../internals/fails"),pe=ae("../internals/has-own-property"),Se=ae("../internals/internal-state").enforce,Le=ae("../internals/set-species"),De=ae("../internals/well-known-symbol"),Fe=ae("../internals/regexp-unsupported-dot-all"),Ae=ae("../internals/regexp-unsupported-ncg"),Oe=De("match"),ze=de.RegExp,He=ze.prototype,Ye=de.SyntaxError,We=Ee(He.exec),Ue=Ee("".charAt),st=Ee("".replace),dt=Ee("".indexOf),gt=Ee("".slice),Et=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ke=/a/g,et=/a/g,$e=new ze(Ke)!==Ke,vt=oe.MISSED_STICKY,wt=oe.UNSUPPORTED_Y,ht=me&&(!$e||vt||Fe||Ae||ue(function(){return et[Oe]=!1,ze(Ke)!=Ke||ze(et)==et||ze(Ke,"i")!="/a/i"})),pt=function(Tt){for(var St=Tt.length,nt=0,Qe="",Ce=!1,Ne;nt<=St;nt++){if(Ne=Ue(Tt,nt),Ne==="\\"){Qe+=Ne+Ue(Tt,++nt);continue}!Ce&&Ne==="."?Qe+="[\\s\\S]":(Ne==="["?Ce=!0:Ne==="]"&&(Ce=!1),Qe+=Ne)}return Qe},ct=function(Tt){for(var St=Tt.length,nt=0,Qe="",Ce=[],Ne={},Je=!1,rt=!1,Be=0,_e="",Xe;nt<=St;nt++){if(Xe=Ue(Tt,nt),Xe==="\\")Xe=Xe+Ue(Tt,++nt);else if(Xe==="]")Je=!1;else if(!Je)switch(!0){case Xe==="[":Je=!0;break;case Xe==="(":We(Et,gt(Tt,nt+1))&&(nt+=2,rt=!0),Qe+=Xe,Be++;continue;case(Xe===">"&&rt):if(_e===""||pe(Ne,_e))throw new Ye("Invalid capture group name");Ne[_e]=!0,Ce[Ce.length]=[_e,Be],rt=!1,_e="";continue}rt?_e+=Xe:Qe+=Xe}return[Qe,Ce]};if(we("RegExp",ht)){for(var Ct=function(St,nt){var Qe=xe(He,this),Ce=fe(St),Ne=nt===void 0,Je=[],rt=St,Be,_e,Xe,lt,Pt,kt;if(!Qe&&Ce&&Ne&&St.constructor===Ct)return St;if((Ce||xe(He,St))&&(St=St.source,Ne&&(nt=ee(rt))),St=St===void 0?"":z(St),nt=nt===void 0?"":z(nt),rt=St,Fe&&"dotAll"in Ke&&(_e=!!nt&&dt(nt,"s")>-1,_e&&(nt=st(nt,/s/g,""))),Be=nt,vt&&"sticky"in Ke&&(Xe=!!nt&&dt(nt,"y")>-1,Xe&&wt&&(nt=st(nt,/y/g,""))),Ae&&(lt=ct(St),St=lt[0],Je=lt[1]),Pt=be(ze(St,nt),Qe?this:He,Ct),(_e||Xe||Je.length)&&(kt=Se(Pt),_e&&(kt.dotAll=!0,kt.raw=Ct(pt(St),Be)),Xe&&(kt.sticky=!0),Je.length&&(kt.groups=Je)),St!==rt)try{Te(Pt,"source",rt===""?"(?:)":rt)}catch(zt){}return Pt},xt=ve(ze),yt=0;xt.length>yt;)ie(Ct,ze,xt[yt++]);He.constructor=Ct,Ct.prototype=He,le(de,"RegExp",Ct)}Le("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/regexp-exec");me({target:"RegExp",proto:!0,forced:/./.exec!==de},{exec:de})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/function-name").PROPER,de=ae("../internals/redefine"),Ee=ae("../internals/an-object"),we=ae("../internals/to-string"),be=ae("../internals/fails"),Te=ae("../internals/regexp-get-flags"),ve="toString",xe=RegExp.prototype,fe=xe[ve],z=be(function(){return fe.call({source:"a",flags:"b"})!="/a/b"}),ee=me&&fe.name!=ve;(z||ee)&&de(RegExp.prototype,ve,function(){var ie=Ee(this),le=we(ie.source),ue=we(Te(ie));return"/"+le+"/"+ue},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/not-a-regexp"),we=ae("../internals/require-object-coercible"),be=ae("../internals/to-string"),Te=ae("../internals/correct-is-regexp-logic"),ve=de("".indexOf);me({target:"String",proto:!0,forced:!Te("includes")},{includes:function(fe){return!!~ve(be(we(this)),be(Ee(fe)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/string-multibyte").charAt,de=ae("../internals/to-string"),Ee=ae("../internals/internal-state"),we=ae("../internals/define-iterator"),be="String Iterator",Te=Ee.set,ve=Ee.getterFor(be);we(String,"String",function(xe){Te(this,{type:be,string:de(xe),index:0})},function(){var fe=ve(this),z=fe.string,ee=fe.index,oe;return ee>=z.length?{value:void 0,done:!0}:(oe=me(z,ee),fe.index+=oe.length,{value:oe,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/function-call"),de=ae("../internals/fix-regexp-well-known-symbol-logic"),Ee=ae("../internals/an-object"),we=ae("../internals/to-length"),be=ae("../internals/to-string"),Te=ae("../internals/require-object-coercible"),ve=ae("../internals/get-method"),xe=ae("../internals/advance-string-index"),fe=ae("../internals/regexp-exec-abstract");de("match",function(z,ee,oe){return[function(le){var ue=Te(this),pe=le==null?void 0:ve(le,z);return pe?me(pe,le,ue):new RegExp(le)[z](be(ue))},function(ie){var le=Ee(this),ue=be(ie),pe=oe(ee,le,ue);if(pe.done)return pe.value;if(!le.global)return fe(le,ue);var Se=le.unicode;le.lastIndex=0;for(var Le=[],De=0,Fe;(Fe=fe(le,ue))!==null;){var Ae=be(Fe[0]);Le[De]=Ae,Ae===""&&(le.lastIndex=xe(ue,we(le.lastIndex),Se)),De++}return De===0?null:Le}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/function-apply"),de=ae("../internals/function-call"),Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/fix-regexp-well-known-symbol-logic"),be=ae("../internals/fails"),Te=ae("../internals/an-object"),ve=ae("../internals/is-callable"),xe=ae("../internals/to-integer-or-infinity"),fe=ae("../internals/to-length"),z=ae("../internals/to-string"),ee=ae("../internals/require-object-coercible"),oe=ae("../internals/advance-string-index"),ie=ae("../internals/get-method"),le=ae("../internals/get-substitution"),ue=ae("../internals/regexp-exec-abstract"),pe=ae("../internals/well-known-symbol"),Se=pe("replace"),Le=Math.max,De=Math.min,Fe=Ee([].concat),Ae=Ee([].push),Oe=Ee("".indexOf),ze=Ee("".slice),He=function(st){return st===void 0?st:String(st)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),We=function(){return/./[Se]?/./[Se]("a","$0")==="":!1}(),Ue=!be(function(){var st=/./;return st.exec=function(){var dt=[];return dt.groups={a:"7"},dt},"".replace(st,"$<a>")!=="7"});we("replace",function(st,dt,gt){var Et=We?"$":"$0";return[function(et,$e){var vt=ee(this),wt=et==null?void 0:ie(et,Se);return wt?de(wt,et,vt,$e):de(dt,z(vt),et,$e)},function(Ke,et){var $e=Te(this),vt=z(Ke);if(typeof et=="string"&&Oe(et,Et)===-1&&Oe(et,"$<")===-1){var wt=gt(dt,$e,vt,et);if(wt.done)return wt.value}var ht=ve(et);ht||(et=z(et));var pt=$e.global;if(pt){var ct=$e.unicode;$e.lastIndex=0}for(var Ct=[];;){var xt=ue($e,vt);if(xt===null||(Ae(Ct,xt),!pt))break;var yt=z(xt[0]);yt===""&&($e.lastIndex=oe(vt,fe($e.lastIndex),ct))}for(var Tt="",St=0,nt=0;nt<Ct.length;nt++){xt=Ct[nt];for(var Qe=z(xt[0]),Ce=Le(De(xe(xt.index),vt.length),0),Ne=[],Je=1;Je<xt.length;Je++)Ae(Ne,He(xt[Je]));var rt=xt.groups;if(ht){var Be=Fe([Qe],Ne,Ce,vt);rt!==void 0&&Ae(Be,rt);var _e=z(me(et,void 0,Be))}else _e=le(Qe,vt,Ce,Ne,rt,et);Ce>=St&&(Tt+=ze(vt,St,Ce)+_e,St=Ce+Qe.length)}return Tt+ze(vt,St)}]},!Ue||!Ye||We)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/function-call"),de=ae("../internals/fix-regexp-well-known-symbol-logic"),Ee=ae("../internals/an-object"),we=ae("../internals/require-object-coercible"),be=ae("../internals/same-value"),Te=ae("../internals/to-string"),ve=ae("../internals/get-method"),xe=ae("../internals/regexp-exec-abstract");de("search",function(fe,z,ee){return[function(ie){var le=we(this),ue=ie==null?void 0:ve(ie,fe);return ue?me(ue,ie,le):new RegExp(ie)[fe](Te(le))},function(oe){var ie=Ee(this),le=Te(oe),ue=ee(z,ie,le);if(ue.done)return ue.value;var pe=ie.lastIndex;be(pe,0)||(ie.lastIndex=0);var Se=xe(ie,le);return be(ie.lastIndex,pe)||(ie.lastIndex=pe),Se===null?-1:Se.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/function-apply"),de=ae("../internals/function-call"),Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/fix-regexp-well-known-symbol-logic"),be=ae("../internals/is-regexp"),Te=ae("../internals/an-object"),ve=ae("../internals/require-object-coercible"),xe=ae("../internals/species-constructor"),fe=ae("../internals/advance-string-index"),z=ae("../internals/to-length"),ee=ae("../internals/to-string"),oe=ae("../internals/get-method"),ie=ae("../internals/array-slice-simple"),le=ae("../internals/regexp-exec-abstract"),ue=ae("../internals/regexp-exec"),pe=ae("../internals/regexp-sticky-helpers"),Se=ae("../internals/fails"),Le=pe.UNSUPPORTED_Y,De=4294967295,Fe=Math.min,Ae=[].push,Oe=Ee(/./.exec),ze=Ee(Ae),He=Ee("".slice),Ye=!Se(function(){var We=/(?:)/,Ue=We.exec;We.exec=function(){return Ue.apply(this,arguments)};var st="ab".split(We);return st.length!==2||st[0]!=="a"||st[1]!=="b"});we("split",function(We,Ue,st){var dt;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?dt=function(gt,Et){var Ke=ee(ve(this)),et=Et===void 0?De:Et>>>0;if(et===0)return[];if(gt===void 0)return[Ke];if(!be(gt))return de(Ue,Ke,gt,et);for(var $e=[],vt=(gt.ignoreCase?"i":"")+(gt.multiline?"m":"")+(gt.unicode?"u":"")+(gt.sticky?"y":""),wt=0,ht=new RegExp(gt.source,vt+"g"),pt,ct,Ct;(pt=de(ue,ht,Ke))&&(ct=ht.lastIndex,!(ct>wt&&(ze($e,He(Ke,wt,pt.index)),pt.length>1&&pt.index<Ke.length&&me(Ae,$e,ie(pt,1)),Ct=pt[0].length,wt=ct,$e.length>=et)));)ht.lastIndex===pt.index&&ht.lastIndex++;return wt===Ke.length?(Ct||!Oe(ht,""))&&ze($e,""):ze($e,He(Ke,wt)),$e.length>et?ie($e,0,et):$e}:"0".split(void 0,0).length?dt=function(gt,Et){return gt===void 0&&Et===0?[]:de(Ue,this,gt,Et)}:dt=Ue,[function(Et,Ke){var et=ve(this),$e=Et==null?void 0:oe(Et,We);return $e?de($e,Et,et,Ke):de(dt,ee(et),Et,Ke)},function(gt,Et){var Ke=Te(this),et=ee(gt),$e=st(dt,Ke,et,Et,dt!==Ue);if($e.done)return $e.value;var vt=xe(Ke,RegExp),wt=Ke.unicode,ht=(Ke.ignoreCase?"i":"")+(Ke.multiline?"m":"")+(Ke.unicode?"u":"")+(Le?"g":"y"),pt=new vt(Le?"^(?:"+Ke.source+")":Ke,ht),ct=Et===void 0?De:Et>>>0;if(ct===0)return[];if(et.length===0)return le(pt,et)===null?[et]:[];for(var Ct=0,xt=0,yt=[];xt<et.length;){pt.lastIndex=Le?0:xt;var Tt=le(pt,Le?He(et,xt):et),St;if(Tt===null||(St=Fe(z(pt.lastIndex+(Le?xt:0)),et.length))===Ct)xt=fe(et,xt,wt);else{if(ze(yt,He(et,Ct,xt)),yt.length===ct)return yt;for(var nt=1;nt<=Tt.length-1;nt++)if(ze(yt,Tt[nt]),yt.length===ct)return yt;xt=Ct=St}}return ze(yt,He(et,Ct)),yt}]},!Ye,Le)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/string-trim").trim,Ee=ae("../internals/string-trim-forced");me({target:"String",proto:!0,forced:Ee("trim")},{trim:function(){return de(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/global"),Ee=ae("../internals/function-call"),we=ae("../internals/function-uncurry-this"),be=ae("../internals/is-pure"),Te=ae("../internals/descriptors"),ve=ae("../internals/native-symbol"),xe=ae("../internals/fails"),fe=ae("../internals/has-own-property"),z=ae("../internals/object-is-prototype-of"),ee=ae("../internals/an-object"),oe=ae("../internals/to-indexed-object"),ie=ae("../internals/to-property-key"),le=ae("../internals/to-string"),ue=ae("../internals/create-property-descriptor"),pe=ae("../internals/object-create"),Se=ae("../internals/object-keys"),Le=ae("../internals/object-get-own-property-names"),De=ae("../internals/object-get-own-property-names-external"),Fe=ae("../internals/object-get-own-property-symbols"),Ae=ae("../internals/object-get-own-property-descriptor"),Oe=ae("../internals/object-define-property"),ze=ae("../internals/object-define-properties"),He=ae("../internals/object-property-is-enumerable"),Ye=ae("../internals/redefine"),We=ae("../internals/shared"),Ue=ae("../internals/shared-key"),st=ae("../internals/hidden-keys"),dt=ae("../internals/uid"),gt=ae("../internals/well-known-symbol"),Et=ae("../internals/well-known-symbol-wrapped"),Ke=ae("../internals/define-well-known-symbol"),et=ae("../internals/symbol-define-to-primitive"),$e=ae("../internals/set-to-string-tag"),vt=ae("../internals/internal-state"),wt=ae("../internals/array-iteration").forEach,ht=Ue("hidden"),pt="Symbol",ct="prototype",Ct=vt.set,xt=vt.getterFor(pt),yt=Object[ct],Tt=de.Symbol,St=Tt&&Tt[ct],nt=de.TypeError,Qe=de.QObject,Ce=Ae.f,Ne=Oe.f,Je=De.f,rt=He.f,Be=we([].push),_e=We("symbols"),Xe=We("op-symbols"),lt=We("wks"),Pt=!Qe||!Qe[ct]||!Qe[ct].findChild,kt=Te&&xe(function(){return pe(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a!=7})?function(un,mn,In){var Sn=Ce(yt,mn);Sn&&delete yt[mn],Ne(un,mn,In),Sn&&un!==yt&&Ne(yt,mn,Sn)}:Ne,zt=function(un,mn){var In=_e[un]=pe(St);return Ct(In,{type:pt,tag:un,description:mn}),Te||(In.description=mn),In},jt=function(mn,In,Sn){mn===yt&&jt(Xe,In,Sn),ee(mn);var Dn=ie(In);return ee(Sn),fe(_e,Dn)?(Sn.enumerable?(fe(mn,ht)&&mn[ht][Dn]&&(mn[ht][Dn]=!1),Sn=pe(Sn,{enumerable:ue(0,!1)})):(fe(mn,ht)||Ne(mn,ht,ue(1,{})),mn[ht][Dn]=!0),kt(mn,Dn,Sn)):Ne(mn,Dn,Sn)},Ht=function(mn,In){ee(mn);var Sn=oe(In),Dn=Se(Sn).concat(On(Sn));return wt(Dn,function(fr){(!Te||Ee(an,Sn,fr))&&jt(mn,fr,Sn[fr])}),mn},ln=function(mn,In){return In===void 0?pe(mn):Ht(pe(mn),In)},an=function(mn){var In=ie(mn),Sn=Ee(rt,this,In);return this===yt&&fe(_e,In)&&!fe(Xe,In)?!1:Sn||!fe(this,In)||!fe(_e,In)||fe(this,ht)&&this[ht][In]?Sn:!0},sn=function(mn,In){var Sn=oe(mn),Dn=ie(In);if(!(Sn===yt&&fe(_e,Dn)&&!fe(Xe,Dn))){var fr=Ce(Sn,Dn);return fr&&fe(_e,Dn)&&!(fe(Sn,ht)&&Sn[ht][Dn])&&(fr.enumerable=!0),fr}},$t=function(mn){var In=Je(oe(mn)),Sn=[];return wt(In,function(Dn){!fe(_e,Dn)&&!fe(st,Dn)&&Be(Sn,Dn)}),Sn},On=function(un){var mn=un===yt,In=Je(mn?Xe:oe(un)),Sn=[];return wt(In,function(Dn){fe(_e,Dn)&&(!mn||fe(yt,Dn))&&Be(Sn,_e[Dn])}),Sn};ve||(Tt=function(){if(z(St,this))throw nt("Symbol is not a constructor");var mn=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),In=dt(mn),Sn=function(Dn){this===yt&&Ee(Sn,Xe,Dn),fe(this,ht)&&fe(this[ht],In)&&(this[ht][In]=!1),kt(this,In,ue(1,Dn))};return Te&&Pt&&kt(yt,In,{configurable:!0,set:Sn}),zt(In,mn)},St=Tt[ct],Ye(St,"toString",function(){return xt(this).tag}),Ye(Tt,"withoutSetter",function(un){return zt(dt(un),un)}),He.f=an,Oe.f=jt,ze.f=Ht,Ae.f=sn,Le.f=De.f=$t,Fe.f=On,Et.f=function(un){return zt(gt(un),un)},Te&&(Ne(St,"description",{configurable:!0,get:function(){return xt(this).description}}),be||Ye(yt,"propertyIsEnumerable",an,{unsafe:!0}))),me({global:!0,wrap:!0,forced:!ve,sham:!ve},{Symbol:Tt}),wt(Se(lt),function(un){Ke(un)}),me({target:pt,stat:!0,forced:!ve},{useSetter:function(){Pt=!0},useSimple:function(){Pt=!1}}),me({target:"Object",stat:!0,forced:!ve,sham:!Te},{create:ln,defineProperty:jt,defineProperties:Ht,getOwnPropertyDescriptor:sn}),me({target:"Object",stat:!0,forced:!ve},{getOwnPropertyNames:$t}),et(),$e(Tt,pt),st[ht]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/export"),de=ae("../internals/descriptors"),Ee=ae("../internals/global"),we=ae("../internals/function-uncurry-this"),be=ae("../internals/has-own-property"),Te=ae("../internals/is-callable"),ve=ae("../internals/object-is-prototype-of"),xe=ae("../internals/to-string"),fe=ae("../internals/object-define-property").f,z=ae("../internals/copy-constructor-properties"),ee=Ee.Symbol,oe=ee&&ee.prototype;if(de&&Te(ee)&&(!("description"in oe)||ee().description!==void 0)){var ie={},le=function(){var Oe=arguments.length<1||arguments[0]===void 0?void 0:xe(arguments[0]),ze=ve(oe,this)?new ee(Oe):Oe===void 0?ee():ee(Oe);return Oe===""&&(ie[ze]=!0),ze};z(le,ee),le.prototype=oe,oe.constructor=le;var ue=String(ee("test"))=="Symbol(test)",pe=we(oe.toString),Se=we(oe.valueOf),Le=/^Symbol\((.*)\)[^)]+$/,De=we("".replace),Fe=we("".slice);fe(oe,"description",{configurable:!0,get:function(){var Oe=Se(this),ze=pe(Oe);if(be(ie,Oe))return"";var He=ue?Fe(ze,7,-1):De(ze,Le,"$1");return He===""?void 0:He}}),me({global:!0,forced:!0},{Symbol:le})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/get-built-in"),Ee=ae("../internals/has-own-property"),we=ae("../internals/to-string"),be=ae("../internals/shared"),Te=ae("../internals/native-symbol-registry"),ve=be("string-to-symbol-registry"),xe=be("symbol-to-string-registry");me({target:"Symbol",stat:!0,forced:!Te},{for:function(fe){var z=we(fe);if(Ee(ve,z))return ve[z];var ee=de("Symbol")(z);return ve[z]=ee,xe[ee]=z,ee}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(ae,Ge,Ie){var me=ae("../internals/define-well-known-symbol");me("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(ae,Ge,Ie){ae("../modules/es.symbol.constructor"),ae("../modules/es.symbol.for"),ae("../modules/es.symbol.key-for"),ae("../modules/es.json.stringify"),ae("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(ae,Ge,Ie){var me=ae("../internals/export"),de=ae("../internals/has-own-property"),Ee=ae("../internals/is-symbol"),we=ae("../internals/try-to-string"),be=ae("../internals/shared"),Te=ae("../internals/native-symbol-registry"),ve=be("symbol-to-string-registry");me({target:"Symbol",stat:!0,forced:!Te},{keyFor:function(fe){if(!Ee(fe))throw TypeError(we(fe)+" is not a symbol");if(de(ve,fe))return ve[fe]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/function-uncurry-this"),de=ae("../internals/array-buffer-view-core"),Ee=ae("../internals/array-copy-within"),we=me(Ee),be=de.aTypedArray,Te=de.exportTypedArrayMethod;Te("copyWithin",function(xe,fe){return we(be(this),xe,fe,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-iteration").every,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("every",function(Te){return de(Ee(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/function-call"),Ee=ae("../internals/array-fill"),we=me.aTypedArray,be=me.exportTypedArrayMethod;be("fill",function(ve){var xe=arguments.length;return de(Ee,we(this),ve,xe>1?arguments[1]:void 0,xe>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-iteration").filter,Ee=ae("../internals/typed-array-from-species-and-list"),we=me.aTypedArray,be=me.exportTypedArrayMethod;be("filter",function(ve){var xe=de(we(this),ve,arguments.length>1?arguments[1]:void 0);return Ee(this,xe)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-iteration").findIndex,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("findIndex",function(Te){return de(Ee(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-iteration").find,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("find",function(Te){return de(Ee(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-iteration").forEach,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("forEach",function(Te){de(Ee(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-includes").includes,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("includes",function(Te){return de(Ee(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-includes").indexOf,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("indexOf",function(Te){return de(Ee(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/global"),de=ae("../internals/fails"),Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/array-buffer-view-core"),be=ae("../modules/es.array.iterator"),Te=ae("../internals/well-known-symbol"),ve=Te("iterator"),xe=me.Uint8Array,fe=Ee(be.values),z=Ee(be.keys),ee=Ee(be.entries),oe=we.aTypedArray,ie=we.exportTypedArrayMethod,le=xe&&xe.prototype,ue=!de(function(){le[ve].call([1])}),pe=!!le&&le.values&&le[ve]===le.values&&le.values.name==="values",Se=function(){return fe(oe(this))};ie("entries",function(){return ee(oe(this))},ue),ie("keys",function(){return z(oe(this))},ue),ie("values",Se,ue||!pe,{name:"values"}),ie(ve,Se,ue||!pe,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/function-uncurry-this"),Ee=me.aTypedArray,we=me.exportTypedArrayMethod,be=de([].join);we("join",function(ve){return be(Ee(this),ve)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/function-apply"),Ee=ae("../internals/array-last-index-of"),we=me.aTypedArray,be=me.exportTypedArrayMethod;be("lastIndexOf",function(ve){var xe=arguments.length;return de(Ee,we(this),xe>1?[ve,arguments[1]]:[ve])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-iteration").map,Ee=ae("../internals/typed-array-species-constructor"),we=me.aTypedArray,be=me.exportTypedArrayMethod;be("map",function(ve){return de(we(this),ve,arguments.length>1?arguments[1]:void 0,function(xe,fe){return new(Ee(xe))(fe)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-reduce").right,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("reduceRight",function(Te){var ve=arguments.length;return de(Ee(this),Te,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-reduce").left,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("reduce",function(Te){var ve=arguments.length;return de(Ee(this),Te,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=me.aTypedArray,Ee=me.exportTypedArrayMethod,we=Math.floor;Ee("reverse",function(){for(var Te=this,ve=de(Te).length,xe=we(ve/2),fe=0,z;fe<xe;)z=Te[fe],Te[fe++]=Te[--ve],Te[ve]=z;return Te})},{"../internals/array-buffer-view-core":103}],331:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/global"),de=ae("../internals/function-call"),Ee=ae("../internals/array-buffer-view-core"),we=ae("../internals/length-of-array-like"),be=ae("../internals/to-offset"),Te=ae("../internals/to-object"),ve=ae("../internals/fails"),xe=me.RangeError,fe=me.Int8Array,z=fe&&fe.prototype,ee=z&&z.set,oe=Ee.aTypedArray,ie=Ee.exportTypedArrayMethod,le=!ve(function(){var pe=new Uint8ClampedArray(2);return de(ee,pe,{length:1,0:3},1),pe[1]!==3}),ue=le&&Ee.NATIVE_ARRAY_BUFFER_VIEWS&&ve(function(){var pe=new fe(2);return pe.set(1),pe.set("2",1),pe[0]!==0||pe[1]!==2});ie("set",function(Se){oe(this);var Le=be(arguments.length>1?arguments[1]:void 0,1),De=Te(Se);if(le)return de(ee,this,De,Le);var Fe=this.length,Ae=we(De),Oe=0;if(Ae+Le>Fe)throw xe("Wrong length");for(;Oe<Ae;)this[Le+Oe]=De[Oe++]},!le||ue)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/typed-array-species-constructor"),Ee=ae("../internals/fails"),we=ae("../internals/array-slice"),be=me.aTypedArray,Te=me.exportTypedArrayMethod,ve=Ee(function(){new Int8Array(1).slice()});Te("slice",function(fe,z){for(var ee=we(be(this),fe,z),oe=de(this),ie=0,le=ee.length,ue=new oe(le);le>ie;)ue[ie]=ee[ie++];return ue},ve)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/array-iteration").some,Ee=me.aTypedArray,we=me.exportTypedArrayMethod;we("some",function(Te){return de(Ee(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/global"),de=ae("../internals/function-uncurry-this"),Ee=ae("../internals/fails"),we=ae("../internals/a-callable"),be=ae("../internals/array-sort"),Te=ae("../internals/array-buffer-view-core"),ve=ae("../internals/engine-ff-version"),xe=ae("../internals/engine-is-ie-or-edge"),fe=ae("../internals/engine-v8-version"),z=ae("../internals/engine-webkit-version"),ee=Te.aTypedArray,oe=Te.exportTypedArrayMethod,ie=me.Uint16Array,le=ie&&de(ie.prototype.sort),ue=!!le&&!(Ee(function(){le(new ie(2),null)})&&Ee(function(){le(new ie(2),{})})),pe=!!le&&!Ee(function(){if(fe)return fe<74;if(ve)return ve<67;if(xe)return!0;if(z)return z<602;var Le=new ie(516),De=Array(516),Fe,Ae;for(Fe=0;Fe<516;Fe++)Ae=Fe%4,Le[Fe]=515-Fe,De[Fe]=Fe-2*Ae+3;for(le(Le,function(Oe,ze){return(Oe/4|0)-(ze/4|0)}),Fe=0;Fe<516;Fe++)if(Le[Fe]!==De[Fe])return!0}),Se=function(Le){return function(De,Fe){return Le!==void 0?+Le(De,Fe)||0:Fe!==Fe?-1:De!==De?1:De===0&&Fe===0?1/De>0&&1/Fe<0?1:-1:De>Fe}};oe("sort",function(De){return De!==void 0&&we(De),pe?le(this,De):be(ee(this),Se(De))},!pe||ue)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core"),de=ae("../internals/to-length"),Ee=ae("../internals/to-absolute-index"),we=ae("../internals/typed-array-species-constructor"),be=me.aTypedArray,Te=me.exportTypedArrayMethod;Te("subarray",function(xe,fe){var z=be(this),ee=z.length,oe=Ee(xe,ee),ie=we(z);return new ie(z.buffer,z.byteOffset+oe*z.BYTES_PER_ELEMENT,de((fe===void 0?ee:Ee(fe,ee))-oe))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/global"),de=ae("../internals/function-apply"),Ee=ae("../internals/array-buffer-view-core"),we=ae("../internals/fails"),be=ae("../internals/array-slice"),Te=me.Int8Array,ve=Ee.aTypedArray,xe=Ee.exportTypedArrayMethod,fe=[].toLocaleString,z=!!Te&&we(function(){fe.call(new Te(1))}),ee=we(function(){return[1,2].toLocaleString()!=new Te([1,2]).toLocaleString()})||!we(function(){Te.prototype.toLocaleString.call([1,2])});xe("toLocaleString",function(){return de(fe,z?be(ve(this)):ve(this),be(arguments))},ee)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(ae,Ge,Ie){"use strict";var me=ae("../internals/array-buffer-view-core").exportTypedArrayMethod,de=ae("../internals/fails"),Ee=ae("../internals/global"),we=ae("../internals/function-uncurry-this"),be=Ee.Uint8Array,Te=be&&be.prototype||{},ve=[].toString,xe=we([].join);de(function(){ve.call({})})&&(ve=function(){return xe(this)});var fe=Te.toString!=ve;me("toString",ve,fe)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(ae,Ge,Ie){var me=ae("../internals/typed-array-constructor");me("Uint8",function(de){return function(we,be,Te){return de(this,we,be,Te)}})},{"../internals/typed-array-constructor":258}],339:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/dom-iterables"),Ee=ae("../internals/dom-token-list-prototype"),we=ae("../internals/array-for-each"),be=ae("../internals/create-non-enumerable-property"),Te=function(xe){if(xe&&xe.forEach!==we)try{be(xe,"forEach",we)}catch(fe){xe.forEach=we}};for(var ve in de)de[ve]&&Te(me[ve]&&me[ve].prototype);Te(Ee)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(ae,Ge,Ie){var me=ae("../internals/global"),de=ae("../internals/dom-iterables"),Ee=ae("../internals/dom-token-list-prototype"),we=ae("../modules/es.array.iterator"),be=ae("../internals/create-non-enumerable-property"),Te=ae("../internals/well-known-symbol"),ve=Te("iterator"),xe=Te("toStringTag"),fe=we.values,z=function(oe,ie){if(oe){if(oe[ve]!==fe)try{be(oe,ve,fe)}catch(ue){oe[ve]=fe}if(oe[xe]||be(oe,xe,ie),de[ie]){for(var le in we)if(oe[le]!==we[le])try{be(oe,le,we[le])}catch(ue){oe[le]=we[le]}}}};for(var ee in de)z(me[ee]&&me[ee].prototype,ee);z(Ee,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(ae,Ge,Ie){function me(pe){return Array.isArray?Array.isArray(pe):ue(pe)==="[object Array]"}Ie.isArray=me;function de(pe){return typeof pe=="boolean"}Ie.isBoolean=de;function Ee(pe){return pe===null}Ie.isNull=Ee;function we(pe){return pe==null}Ie.isNullOrUndefined=we;function be(pe){return typeof pe=="number"}Ie.isNumber=be;function Te(pe){return typeof pe=="string"}Ie.isString=Te;function ve(pe){return typeof pe=="symbol"}Ie.isSymbol=ve;function xe(pe){return pe===void 0}Ie.isUndefined=xe;function fe(pe){return ue(pe)==="[object RegExp]"}Ie.isRegExp=fe;function z(pe){return typeof pe=="object"&&pe!==null}Ie.isObject=z;function ee(pe){return ue(pe)==="[object Date]"}Ie.isDate=ee;function oe(pe){return ue(pe)==="[object Error]"||pe instanceof Error}Ie.isError=oe;function ie(pe){return typeof pe=="function"}Ie.isFunction=ie;function le(pe){return pe===null||typeof pe=="boolean"||typeof pe=="number"||typeof pe=="string"||typeof pe=="symbol"||typeof pe=="undefined"}Ie.isPrimitive=le,Ie.isBuffer=ae("buffer").Buffer.isBuffer;function ue(pe){return Object.prototype.toString.call(pe)}},{buffer:90}],342:[function(ae,Ge,Ie){(function(me){"use strict";var de=function(){var ve=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,xe=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,fe=/[^-+\dA-Z]/g;return function(z,ee,oe,ie){if(arguments.length===1&&Te(z)==="string"&&!/\d/.test(z)&&(ee=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");ee=String(de.masks[ee]||ee||de.masks.default);var le=ee.slice(0,4);(le==="UTC:"||le==="GMT:")&&(ee=ee.slice(4),oe=!0,le==="GMT:"&&(ie=!0));var ue=oe?"getUTC":"get",pe=z[ue+"Date"](),Se=z[ue+"Day"](),Le=z[ue+"Month"](),De=z[ue+"FullYear"](),Fe=z[ue+"Hours"](),Ae=z[ue+"Minutes"](),Oe=z[ue+"Seconds"](),ze=z[ue+"Milliseconds"](),He=oe?0:z.getTimezoneOffset(),Ye=we(z),We=be(z),Ue={d:pe,dd:Ee(pe),ddd:de.i18n.dayNames[Se],dddd:de.i18n.dayNames[Se+7],m:Le+1,mm:Ee(Le+1),mmm:de.i18n.monthNames[Le],mmmm:de.i18n.monthNames[Le+12],yy:String(De).slice(2),yyyy:De,h:Fe%12||12,hh:Ee(Fe%12||12),H:Fe,HH:Ee(Fe),M:Ae,MM:Ee(Ae),s:Oe,ss:Ee(Oe),l:Ee(ze,3),L:Ee(Math.round(ze/10)),t:Fe<12?"a":"p",tt:Fe<12?"am":"pm",T:Fe<12?"A":"P",TT:Fe<12?"AM":"PM",Z:ie?"GMT":oe?"UTC":(String(z).match(xe)||[""]).pop().replace(fe,""),o:(He>0?"-":"+")+Ee(Math.floor(Math.abs(He)/60)*100+Math.abs(He)%60,4),S:["th","st","nd","rd"][pe%10>3?0:(pe%100-pe%10!=10)*pe%10],W:Ye,N:We};return ee.replace(ve,function(st){return st in Ue?Ue[st]:st.slice(1,st.length-1)})}}();de.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},de.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function Ee(ve,xe){for(ve=String(ve),xe=xe||2;ve.length<xe;)ve="0"+ve;return ve}function we(ve){var xe=new Date(ve.getFullYear(),ve.getMonth(),ve.getDate());xe.setDate(xe.getDate()-(xe.getDay()+6)%7+3);var fe=new Date(xe.getFullYear(),0,4);fe.setDate(fe.getDate()-(fe.getDay()+6)%7+3);var z=xe.getTimezoneOffset()-fe.getTimezoneOffset();xe.setHours(xe.getHours()-z);var ee=(xe-fe)/(864e5*7);return 1+Math.floor(ee)}function be(ve){var xe=ve.getDay();return xe===0&&(xe=7),xe}function Te(ve){return ve===null?"null":ve===void 0?"undefined":typeof ve!="object"?typeof ve:Array.isArray(ve)?"array":{}.toString.call(ve).slice(8,-1).toLowerCase()}typeof at=="function"&&at.amd?at(function(){return de}):typeof Ie=="object"?Ge.exports=de:me.dateFormat=de})(this)},{}],343:[function(ae,Ge,Ie){"use strict";var me=/["'&<>]/;Ge.exports=de;function de(Ee){var we=""+Ee,be=me.exec(we);if(!be)return we;var Te,ve="",xe=0,fe=0;for(xe=be.index;xe<we.length;xe++){switch(we.charCodeAt(xe)){case 34:Te="&quot;";break;case 38:Te="&amp;";break;case 39:Te="&#39;";break;case 60:Te="&lt;";break;case 62:Te="&gt;";break;default:continue}fe!==xe&&(ve+=we.substring(fe,xe)),fe=xe+1,ve+=Te}return fe!==xe?ve+we.substring(fe,xe):ve}},{}],344:[function(ae,Ge,Ie){"use strict";var me=typeof Reflect=="object"?Reflect:null,de=me&&typeof me.apply=="function"?me.apply:function(Oe,ze,He){return Function.prototype.apply.call(Oe,ze,He)},Ee;me&&typeof me.ownKeys=="function"?Ee=me.ownKeys:Object.getOwnPropertySymbols?Ee=function(Oe){return Object.getOwnPropertyNames(Oe).concat(Object.getOwnPropertySymbols(Oe))}:Ee=function(Oe){return Object.getOwnPropertyNames(Oe)};function we(Ae){console&&console.warn&&console.warn(Ae)}var be=Number.isNaN||function(Oe){return Oe!==Oe};function Te(){Te.init.call(this)}Ge.exports=Te,Ge.exports.once=Le,Te.EventEmitter=Te,Te.prototype._events=void 0,Te.prototype._eventsCount=0,Te.prototype._maxListeners=void 0;var ve=10;function xe(Ae){if(typeof Ae!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Ae)}Object.defineProperty(Te,"defaultMaxListeners",{enumerable:!0,get:function(){return ve},set:function(Ae){if(typeof Ae!="number"||Ae<0||be(Ae))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Ae+".");ve=Ae}}),Te.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},Te.prototype.setMaxListeners=function(Oe){if(typeof Oe!="number"||Oe<0||be(Oe))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Oe+".");return this._maxListeners=Oe,this};function fe(Ae){return Ae._maxListeners===void 0?Te.defaultMaxListeners:Ae._maxListeners}Te.prototype.getMaxListeners=function(){return fe(this)},Te.prototype.emit=function(Oe){for(var ze=[],He=1;He<arguments.length;He++)ze.push(arguments[He]);var Ye=Oe==="error",We=this._events;if(We!==void 0)Ye=Ye&&We.error===void 0;else if(!Ye)return!1;if(Ye){var Ue;if(ze.length>0&&(Ue=ze[0]),Ue instanceof Error)throw Ue;var st=new Error("Unhandled error."+(Ue?" ("+Ue.message+")":""));throw st.context=Ue,st}var dt=We[Oe];if(dt===void 0)return!1;if(typeof dt=="function")de(dt,this,ze);else for(var gt=dt.length,Et=ue(dt,gt),He=0;He<gt;++He)de(Et[He],this,ze);return!0};function z(Ae,Oe,ze,He){var Ye,We,Ue;if(xe(ze),We=Ae._events,We===void 0?(We=Ae._events=Object.create(null),Ae._eventsCount=0):(We.newListener!==void 0&&(Ae.emit("newListener",Oe,ze.listener?ze.listener:ze),We=Ae._events),Ue=We[Oe]),Ue===void 0)Ue=We[Oe]=ze,++Ae._eventsCount;else if(typeof Ue=="function"?Ue=We[Oe]=He?[ze,Ue]:[Ue,ze]:He?Ue.unshift(ze):Ue.push(ze),Ye=fe(Ae),Ye>0&&Ue.length>Ye&&!Ue.warned){Ue.warned=!0;var st=new Error("Possible EventEmitter memory leak detected. "+Ue.length+" "+String(Oe)+" listeners added. Use emitter.setMaxListeners() to increase limit");st.name="MaxListenersExceededWarning",st.emitter=Ae,st.type=Oe,st.count=Ue.length,we(st)}return Ae}Te.prototype.addListener=function(Oe,ze){return z(this,Oe,ze,!1)},Te.prototype.on=Te.prototype.addListener,Te.prototype.prependListener=function(Oe,ze){return z(this,Oe,ze,!0)};function ee(){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 oe(Ae,Oe,ze){var He={fired:!1,wrapFn:void 0,target:Ae,type:Oe,listener:ze},Ye=ee.bind(He);return Ye.listener=ze,He.wrapFn=Ye,Ye}Te.prototype.once=function(Oe,ze){return xe(ze),this.on(Oe,oe(this,Oe,ze)),this},Te.prototype.prependOnceListener=function(Oe,ze){return xe(ze),this.prependListener(Oe,oe(this,Oe,ze)),this},Te.prototype.removeListener=function(Oe,ze){var He,Ye,We,Ue,st;if(xe(ze),Ye=this._events,Ye===void 0)return this;if(He=Ye[Oe],He===void 0)return this;if(He===ze||He.listener===ze)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Oe],Ye.removeListener&&this.emit("removeListener",Oe,He.listener||ze));else if(typeof He!="function"){for(We=-1,Ue=He.length-1;Ue>=0;Ue--)if(He[Ue]===ze||He[Ue].listener===ze){st=He[Ue].listener,We=Ue;break}if(We<0)return this;We===0?He.shift():pe(He,We),He.length===1&&(Ye[Oe]=He[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Oe,st||ze)}return this},Te.prototype.off=Te.prototype.removeListener,Te.prototype.removeAllListeners=function(Oe){var ze,He,Ye;if(He=this._events,He===void 0)return this;if(He.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):He[Oe]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete He[Oe]),this;if(arguments.length===0){var We=Object.keys(He),Ue;for(Ye=0;Ye<We.length;++Ye)Ue=We[Ye],Ue!=="removeListener"&&this.removeAllListeners(Ue);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(ze=He[Oe],typeof ze=="function")this.removeListener(Oe,ze);else if(ze!==void 0)for(Ye=ze.length-1;Ye>=0;Ye--)this.removeListener(Oe,ze[Ye]);return this};function ie(Ae,Oe,ze){var He=Ae._events;if(He===void 0)return[];var Ye=He[Oe];return Ye===void 0?[]:typeof Ye=="function"?ze?[Ye.listener||Ye]:[Ye]:ze?Se(Ye):ue(Ye,Ye.length)}Te.prototype.listeners=function(Oe){return ie(this,Oe,!0)},Te.prototype.rawListeners=function(Oe){return ie(this,Oe,!1)},Te.listenerCount=function(Ae,Oe){return typeof Ae.listenerCount=="function"?Ae.listenerCount(Oe):le.call(Ae,Oe)},Te.prototype.listenerCount=le;function le(Ae){var Oe=this._events;if(Oe!==void 0){var ze=Oe[Ae];if(typeof ze=="function")return 1;if(ze!==void 0)return ze.length}return 0}Te.prototype.eventNames=function(){return this._eventsCount>0?Ee(this._events):[]};function ue(Ae,Oe){for(var ze=new Array(Oe),He=0;He<Oe;++He)ze[He]=Ae[He];return ze}function pe(Ae,Oe){for(;Oe+1<Ae.length;Oe++)Ae[Oe]=Ae[Oe+1];Ae.pop()}function Se(Ae){for(var Oe=new Array(Ae.length),ze=0;ze<Oe.length;++ze)Oe[ze]=Ae[ze].listener||Ae[ze];return Oe}function Le(Ae,Oe){return new Promise(function(ze,He){function Ye(Ue){Ae.removeListener(Oe,We),He(Ue)}function We(){typeof Ae.removeListener=="function"&&Ae.removeListener("error",Ye),ze([].slice.call(arguments))}Fe(Ae,Oe,We,{once:!0}),Oe!=="error"&&De(Ae,Ye,{once:!0})})}function De(Ae,Oe,ze){typeof Ae.on=="function"&&Fe(Ae,"error",Oe,ze)}function Fe(Ae,Oe,ze,He){if(typeof Ae.on=="function")He.once?Ae.once(Oe,ze):Ae.on(Oe,ze);else if(typeof Ae.addEventListener=="function")Ae.addEventListener(Oe,function Ye(We){He.once&&Ae.removeEventListener(Oe,Ye),ze(We)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Ae)}},{}],345:[function(ae,Ge,Ie){"use strict";var me=ae("is-callable"),de=Object.prototype.toString,Ee=Object.prototype.hasOwnProperty,we=function(fe,z,ee){for(var oe=0,ie=fe.length;oe<ie;oe++)Ee.call(fe,oe)&&(ee==null?z(fe[oe],oe,fe):z.call(ee,fe[oe],oe,fe))},be=function(fe,z,ee){for(var oe=0,ie=fe.length;oe<ie;oe++)ee==null?z(fe.charAt(oe),oe,fe):z.call(ee,fe.charAt(oe),oe,fe)},Te=function(fe,z,ee){for(var oe in fe)Ee.call(fe,oe)&&(ee==null?z(fe[oe],oe,fe):z.call(ee,fe[oe],oe,fe))},ve=function(fe,z,ee){if(!me(z))throw new TypeError("iterator must be a function");var oe;arguments.length>=3&&(oe=ee),de.call(fe)==="[object Array]"?we(fe,z,oe):typeof fe=="string"?be(fe,z,oe):Te(fe,z,oe)};Ge.exports=ve},{"is-callable":367}],346:[function(ae,Ge,Ie){"use strict";var me="Function.prototype.bind called on incompatible ",de=Array.prototype.slice,Ee=Object.prototype.toString,we="[object Function]";Ge.exports=function(Te){var ve=this;if(typeof ve!="function"||Ee.call(ve)!==we)throw new TypeError(me+ve);for(var xe=de.call(arguments,1),fe,z=function(){if(this instanceof fe){var ue=ve.apply(this,xe.concat(de.call(arguments)));return Object(ue)===ue?ue:this}else return ve.apply(Te,xe.concat(de.call(arguments)))},ee=Math.max(0,ve.length-xe.length),oe=[],ie=0;ie<ee;ie++)oe.push("$"+ie);if(fe=Function("binder","return function ("+oe.join(",")+"){ return binder.apply(this,arguments); }")(z),ve.prototype){var le=function(){};le.prototype=ve.prototype,fe.prototype=new le,le.prototype=null}return fe}},{}],347:[function(ae,Ge,Ie){"use strict";var me=ae("./implementation");Ge.exports=Function.prototype.bind||me},{"./implementation":346}],348:[function(ae,Ge,Ie){"use strict";var me,de=SyntaxError,Ee=Function,we=TypeError,be=function(dt){try{return Ee('"use strict"; return ('+dt+").constructor;")()}catch(gt){}},Te=Object.getOwnPropertyDescriptor;if(Te)try{Te({},"")}catch(dt){Te=null}var ve=function(){throw new we},xe=Te?function(){try{return arguments.callee,ve}catch(dt){try{return Te(arguments,"callee").get}catch(gt){return ve}}}():ve,fe=ae("has-symbols")(),z=ae("has-proto")(),ee=Object.getPrototypeOf||(z?function(dt){return dt.__proto__}:null),oe={},ie=typeof Uint8Array=="undefined"||!ee?me:ee(Uint8Array),le={"%AggregateError%":typeof AggregateError=="undefined"?me:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?me:ArrayBuffer,"%ArrayIteratorPrototype%":fe&&ee?ee([][Symbol.iterator]()):me,"%AsyncFromSyncIteratorPrototype%":me,"%AsyncFunction%":oe,"%AsyncGenerator%":oe,"%AsyncGeneratorFunction%":oe,"%AsyncIteratorPrototype%":oe,"%Atomics%":typeof Atomics=="undefined"?me:Atomics,"%BigInt%":typeof BigInt=="undefined"?me:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?me:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?me:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?me:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?me:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?me:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?me:FinalizationRegistry,"%Function%":Ee,"%GeneratorFunction%":oe,"%Int8Array%":typeof Int8Array=="undefined"?me:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?me:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?me:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fe&&ee?ee(ee([][Symbol.iterator]())):me,"%JSON%":typeof JSON=="object"?JSON:me,"%Map%":typeof Map=="undefined"?me:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!fe||!ee?me:ee(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?me:Promise,"%Proxy%":typeof Proxy=="undefined"?me:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?me:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?me:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!fe||!ee?me:ee(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?me:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fe&&ee?ee(""[Symbol.iterator]()):me,"%Symbol%":fe?Symbol:me,"%SyntaxError%":de,"%ThrowTypeError%":xe,"%TypedArray%":ie,"%TypeError%":we,"%Uint8Array%":typeof Uint8Array=="undefined"?me:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?me:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?me:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?me:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?me:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?me:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?me:WeakSet};if(ee)try{null.error}catch(dt){var ue=ee(ee(dt));le["%Error.prototype%"]=ue}var pe=function dt(gt){var Et;if(gt==="%AsyncFunction%")Et=be("async function () {}");else if(gt==="%GeneratorFunction%")Et=be("function* () {}");else if(gt==="%AsyncGeneratorFunction%")Et=be("async function* () {}");else if(gt==="%AsyncGenerator%"){var Ke=dt("%AsyncGeneratorFunction%");Ke&&(Et=Ke.prototype)}else if(gt==="%AsyncIteratorPrototype%"){var et=dt("%AsyncGenerator%");et&&ee&&(Et=ee(et.prototype))}return le[gt]=Et,Et},Se={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Le=ae("function-bind"),De=ae("has"),Fe=Le.call(Function.call,Array.prototype.concat),Ae=Le.call(Function.apply,Array.prototype.splice),Oe=Le.call(Function.call,String.prototype.replace),ze=Le.call(Function.call,String.prototype.slice),He=Le.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,We=/\\(\\)?/g,Ue=function(gt){var Et=ze(gt,0,1),Ke=ze(gt,-1);if(Et==="%"&&Ke!=="%")throw new de("invalid intrinsic syntax, expected closing `%`");if(Ke==="%"&&Et!=="%")throw new de("invalid intrinsic syntax, expected opening `%`");var et=[];return Oe(gt,Ye,function($e,vt,wt,ht){et[et.length]=wt?Oe(ht,We,"$1"):vt||$e}),et},st=function(gt,Et){var Ke=gt,et;if(De(Se,Ke)&&(et=Se[Ke],Ke="%"+et[0]+"%"),De(le,Ke)){var $e=le[Ke];if($e===oe&&($e=pe(Ke)),typeof $e=="undefined"&&!Et)throw new we("intrinsic "+gt+" exists, but is not available. Please file an issue!");return{alias:et,name:Ke,value:$e}}throw new de("intrinsic "+gt+" does not exist!")};Ge.exports=function(gt,Et){if(typeof gt!="string"||gt.length===0)throw new we("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Et!="boolean")throw new we('"allowMissing" argument must be a boolean');if(He(/^%?[^%]*%?$/,gt)===null)throw new de("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ke=Ue(gt),et=Ke.length>0?Ke[0]:"",$e=st("%"+et+"%",Et),vt=$e.name,wt=$e.value,ht=!1,pt=$e.alias;pt&&(et=pt[0],Ae(Ke,Fe([0,1],pt)));for(var ct=1,Ct=!0;ct<Ke.length;ct+=1){var xt=Ke[ct],yt=ze(xt,0,1),Tt=ze(xt,-1);if((yt==='"'||yt==="'"||yt==="`"||Tt==='"'||Tt==="'"||Tt==="`")&&yt!==Tt)throw new de("property names with quotes must have matching quotes");if((xt==="constructor"||!Ct)&&(ht=!0),et+="."+xt,vt="%"+et+"%",De(le,vt))wt=le[vt];else if(wt!=null){if(!(xt in wt)){if(!Et)throw new we("base intrinsic for "+gt+" exists, but the property is not available.");return}if(Te&&ct+1>=Ke.length){var St=Te(wt,xt);Ct=!!St,Ct&&"get"in St&&!("originalValue"in St.get)?wt=St.get:wt=wt[xt]}else Ct=De(wt,xt),wt=wt[xt];Ct&&!ht&&(le[vt]=wt)}}return wt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(ae,Ge,Ie){"use strict";var me=ae("get-intrinsic"),de=me("%Object.getOwnPropertyDescriptor%",!0);if(de)try{de([],"length")}catch(Ee){de=null}Ge.exports=de},{"get-intrinsic":348}],350:[function(ae,Ge,Ie){"use strict";var me={foo:{}},de=Object;Ge.exports=function(){return{__proto__:me}.foo===me.foo&&!({__proto__:null}instanceof de)}},{}],351:[function(ae,Ge,Ie){"use strict";var me=typeof Symbol!="undefined"&&Symbol,de=ae("./shams");Ge.exports=function(){return typeof me!="function"||typeof Symbol!="function"||typeof me("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:de()}},{"./shams":352}],352:[function(ae,Ge,Ie){"use strict";Ge.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var de={},Ee=Symbol("test"),we=Object(Ee);if(typeof Ee=="string"||Object.prototype.toString.call(Ee)!=="[object Symbol]"||Object.prototype.toString.call(we)!=="[object Symbol]")return!1;var be=42;de[Ee]=be;for(Ee in de)return!1;if(typeof Object.keys=="function"&&Object.keys(de).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(de).length!==0)return!1;var Te=Object.getOwnPropertySymbols(de);if(Te.length!==1||Te[0]!==Ee||!Object.prototype.propertyIsEnumerable.call(de,Ee))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var ve=Object.getOwnPropertyDescriptor(de,Ee);if(ve.value!==be||ve.enumerable!==!0)return!1}return!0}},{}],353:[function(ae,Ge,Ie){"use strict";var me=ae("has-symbols/shams");Ge.exports=function(){return me()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(ae,Ge,Ie){"use strict";var me=ae("function-bind");Ge.exports=me.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(ae,Ge,Ie){var me=ae("http"),de=ae("url"),Ee=Ge.exports;for(var we in me)me.hasOwnProperty(we)&&(Ee[we]=me[we]);Ee.request=function(Te,ve){return Te=be(Te),me.request.call(this,Te,ve)},Ee.get=function(Te,ve){return Te=be(Te),me.get.call(this,Te,ve)};function be(Te){if(typeof Te=="string"&&(Te=de.parse(Te)),Te.protocol||(Te.protocol="https:"),Te.protocol!=="https:")throw new Error('Protocol "'+Te.protocol+'" not supported. Expected "https:"');return Te}},{http:468,url:472}],356:[function(ae,Ge,Ie){"use strict";var me=ae("util"),de=ae("ms");Ge.exports=function(Ee){if(typeof Ee=="number")return Ee;var we=de(Ee);if(we===void 0){var be=new Error(me.format("humanize-ms(%j) result undefined",Ee));console.warn(be.stack)}return we}},{ms:376,util:419}],357:[function(ae,Ge,Ie){Ie.read=function(me,de,Ee,we,be){var Te,ve,xe=be*8-we-1,fe=(1<<xe)-1,z=fe>>1,ee=-7,oe=Ee?be-1:0,ie=Ee?-1:1,le=me[de+oe];for(oe+=ie,Te=le&(1<<-ee)-1,le>>=-ee,ee+=xe;ee>0;Te=Te*256+me[de+oe],oe+=ie,ee-=8);for(ve=Te&(1<<-ee)-1,Te>>=-ee,ee+=we;ee>0;ve=ve*256+me[de+oe],oe+=ie,ee-=8);if(Te===0)Te=1-z;else{if(Te===fe)return ve?NaN:(le?-1:1)*(1/0);ve=ve+Math.pow(2,we),Te=Te-z}return(le?-1:1)*ve*Math.pow(2,Te-we)},Ie.write=function(me,de,Ee,we,be,Te){var ve,xe,fe,z=Te*8-be-1,ee=(1<<z)-1,oe=ee>>1,ie=be===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=we?0:Te-1,ue=we?1:-1,pe=de<0||de===0&&1/de<0?1:0;for(de=Math.abs(de),isNaN(de)||de===1/0?(xe=isNaN(de)?1:0,ve=ee):(ve=Math.floor(Math.log(de)/Math.LN2),de*(fe=Math.pow(2,-ve))<1&&(ve--,fe*=2),ve+oe>=1?de+=ie/fe:de+=ie*Math.pow(2,1-oe),de*fe>=2&&(ve++,fe/=2),ve+oe>=ee?(xe=0,ve=ee):ve+oe>=1?(xe=(de*fe-1)*Math.pow(2,be),ve=ve+oe):(xe=de*Math.pow(2,oe-1)*Math.pow(2,be),ve=0));be>=8;me[Ee+le]=xe&255,le+=ue,xe/=256,be-=8);for(ve=ve<<be|xe,z+=be;z>0;me[Ee+le]=ve&255,le+=ue,ve/=256,z-=8);me[Ee+le-ue]|=pe*128}},{}],358:[function(ae,Ge,Ie){"use strict";var me=[ae("./nextTick"),ae("./queueMicrotask"),ae("./mutation.js"),ae("./messageChannel"),ae("./stateChange"),ae("./timeout")],de,Ee,we=-1,be=[],Te=!1;function ve(){!de||!Ee||(de=!1,Ee.length?be=Ee.concat(be):we=-1,be.length&&xe())}function xe(){if(!de){Te=!1,de=!0;for(var le=be.length,ue=setTimeout(ve);le;){for(Ee=be,be=[];Ee&&++we<le;)Ee[we].run();we=-1,le=be.length}Ee=null,we=-1,de=!1,clearTimeout(ue)}}for(var fe,z=-1,ee=me.length;++z<ee;)if(me[z]&&me[z].test&&me[z].test()){fe=me[z].install(xe);break}function oe(le,ue){this.fun=le,this.array=ue}oe.prototype.run=function(){var le=this.fun,ue=this.array;switch(ue.length){case 0:return le();case 1:return le(ue[0]);case 2:return le(ue[0],ue[1]);case 3:return le(ue[0],ue[1],ue[2]);default:return le.apply(null,ue)}},Ge.exports=ie;function ie(le){var ue=new Array(arguments.length-1);if(arguments.length>1)for(var pe=1;pe<arguments.length;pe++)ue[pe-1]=arguments[pe];be.push(new oe(le,ue)),!Te&&!de&&(Te=!0,fe())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(ae,Ge,Ie){(function(me){(function(){"use strict";Ie.test=function(){return me.setImmediate?!1:typeof me.MessageChannel!="undefined"},Ie.install=function(de){var Ee=new me.MessageChannel;return Ee.port1.onmessage=de,function(){Ee.port2.postMessage(0)}}}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=me.MutationObserver||me.WebKitMutationObserver;Ie.test=function(){return de},Ie.install=function(Ee){var we=0,be=new de(Ee),Te=me.document.createTextNode("");return be.observe(Te,{characterData:!0}),function(){Te.data=we=++we%2}}}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(ae,Ge,Ie){(function(me){(function(){"use strict";Ie.test=function(){return typeof me.queueMicrotask=="function"},Ie.install=function(de){return function(){me.queueMicrotask(de)}}}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(ae,Ge,Ie){(function(me){(function(){"use strict";Ie.test=function(){return"document"in me&&"onreadystatechange"in me.document.createElement("script")},Ie.install=function(de){return function(){var Ee=me.document.createElement("script");return Ee.onreadystatechange=function(){de(),Ee.onreadystatechange=null,Ee.parentNode.removeChild(Ee),Ee=null},me.document.documentElement.appendChild(Ee),de}}}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(ae,Ge,Ie){"use strict";Ie.test=function(){return!0},Ie.install=function(me){return function(){setTimeout(me,0)}}},{}],364:[function(ae,Ge,Ie){typeof Object.create=="function"?Ge.exports=function(de,Ee){Ee&&(de.super_=Ee,de.prototype=Object.create(Ee.prototype,{constructor:{value:de,enumerable:!1,writable:!0,configurable:!0}}))}:Ge.exports=function(de,Ee){if(Ee){de.super_=Ee;var we=function(){};we.prototype=Ee.prototype,de.prototype=new we,de.prototype.constructor=de}}},{}],365:[function(ae,Ge,Ie){"use strict";var me=ae("has-tostringtag/shams")(),de=ae("call-bind/callBound"),Ee=de("Object.prototype.toString"),we=function(xe){return me&&xe&&typeof xe=="object"&&Symbol.toStringTag in xe?!1:Ee(xe)==="[object Arguments]"},be=function(xe){return we(xe)?!0:xe!==null&&typeof xe=="object"&&typeof xe.length=="number"&&xe.length>=0&&Ee(xe)!=="[object Array]"&&Ee(xe.callee)==="[object Function]"},Te=function(){return we(arguments)}();we.isLegacyArguments=be,Ge.exports=Te?we:be},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(ae,Ge,Ie){Ge.exports=function(Ee){return Ee!=null&&(me(Ee)||de(Ee)||!!Ee._isBuffer)};function me(Ee){return!!Ee.constructor&&typeof Ee.constructor.isBuffer=="function"&&Ee.constructor.isBuffer(Ee)}function de(Ee){return typeof Ee.readFloatLE=="function"&&typeof Ee.slice=="function"&&me(Ee.slice(0,0))}},{}],367:[function(ae,Ge,Ie){"use strict";var me=Function.prototype.toString,de=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ee,we;if(typeof de=="function"&&typeof Object.defineProperty=="function")try{Ee=Object.defineProperty({},"length",{get:function(){throw we}}),we={},de(function(){throw 42},null,Ee)}catch(De){De!==we&&(de=null)}else de=null;var be=/^\s*class\b/,Te=function(Fe){try{var Ae=me.call(Fe);return be.test(Ae)}catch(Oe){return!1}},ve=function(Fe){try{return Te(Fe)?!1:(me.call(Fe),!0)}catch(Ae){return!1}},xe=Object.prototype.toString,fe="[object Object]",z="[object Function]",ee="[object GeneratorFunction]",oe="[object HTMLAllCollection]",ie="[object HTML document.all class]",le="[object HTMLCollection]",ue=typeof Symbol=="function"&&!!Symbol.toStringTag,pe=!(0 in[,]),Se=function(){return!1};if(typeof document=="object"){var Le=document.all;xe.call(Le)===xe.call(document.all)&&(Se=function(Fe){if((pe||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var Ae=xe.call(Fe);return(Ae===oe||Ae===ie||Ae===le||Ae===fe)&&Fe("")==null}catch(Oe){}return!1})}Ge.exports=de?function(Fe){if(Se(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;try{de(Fe,null,Ee)}catch(Ae){if(Ae!==we)return!1}return!Te(Fe)&&ve(Fe)}:function(Fe){if(Se(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;if(ue)return ve(Fe);if(Te(Fe))return!1;var Ae=xe.call(Fe);return Ae!==z&&Ae!==ee&&!/^\[object HTML/.test(Ae)?!1:ve(Fe)}},{}],368:[function(ae,Ge,Ie){"use strict";var me=Object.prototype.toString,de=Function.prototype.toString,Ee=/^\s*(?:function)?\*/,we=ae("has-tostringtag/shams")(),be=Object.getPrototypeOf,Te=function(){if(!we)return!1;try{return Function("return function*() {}")()}catch(xe){}},ve;Ge.exports=function(fe){if(typeof fe!="function")return!1;if(Ee.test(de.call(fe)))return!0;if(!we){var z=me.call(fe);return z==="[object GeneratorFunction]"}if(!be)return!1;if(typeof ve=="undefined"){var ee=Te();ve=ee?be(ee):!1}return be(fe)===ve}},{"has-tostringtag/shams":353}],369:[function(ae,Ge,Ie){"use strict";var me=ae("which-typed-array");Ge.exports=function(Ee){return!!me(Ee)}},{"which-typed-array":420}],370:[function(ae,Ge,Ie){var me={}.toString;Ge.exports=Array.isArray||function(de){return me.call(de)=="[object Array]"}},{}],371:[function(ae,Ge,Ie){(function(me){(function(){(function(de,Ee){typeof Ie=="object"&&typeof Ge!="undefined"?Ge.exports=Ee(de):typeof at=="function"&&at.amd?at(Ee):Ee(de)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof me!="undefined"?me:this,function(de){"use strict";de=de||{};var Ee=de.Base64,we="2.6.4",be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te=function(gt){for(var Et={},Ke=0,et=gt.length;Ke<et;Ke++)Et[gt.charAt(Ke)]=Ke;return Et}(be),ve=String.fromCharCode,xe=function(gt){if(gt.length<2){var Et=gt.charCodeAt(0);return Et<128?gt:Et<2048?ve(192|Et>>>6)+ve(128|Et&63):ve(224|Et>>>12&15)+ve(128|Et>>>6&63)+ve(128|Et&63)}else{var Et=65536+(gt.charCodeAt(0)-55296)*1024+(gt.charCodeAt(1)-56320);return ve(240|Et>>>18&7)+ve(128|Et>>>12&63)+ve(128|Et>>>6&63)+ve(128|Et&63)}},fe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(gt){return gt.replace(fe,xe)},ee=function(gt){var Et=[0,2,1][gt.length%3],Ke=gt.charCodeAt(0)<<16|(gt.length>1?gt.charCodeAt(1):0)<<8|(gt.length>2?gt.charCodeAt(2):0),et=[be.charAt(Ke>>>18),be.charAt(Ke>>>12&63),Et>=2?"=":be.charAt(Ke>>>6&63),Et>=1?"=":be.charAt(Ke&63)];return et.join("")},oe=de.btoa&&typeof de.btoa=="function"?function(gt){return de.btoa(gt)}:function(gt){if(gt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return gt.replace(/[\s\S]{1,3}/g,ee)},ie=function(gt){return oe(z(String(gt)))},le=function(gt){return gt.replace(/[+\/]/g,function(Et){return Et=="+"?"-":"_"}).replace(/=/g,"")},ue=function(gt,Et){return Et?le(ie(gt)):ie(gt)},pe=function(gt){return ue(gt,!0)},Se;de.Uint8Array&&(Se=function(gt,Et){for(var Ke="",et=0,$e=gt.length;et<$e;et+=3){var vt=gt[et],wt=gt[et+1],ht=gt[et+2],pt=vt<<16|wt<<8|ht;Ke+=be.charAt(pt>>>18)+be.charAt(pt>>>12&63)+(typeof wt!="undefined"?be.charAt(pt>>>6&63):"=")+(typeof ht!="undefined"?be.charAt(pt&63):"=")}return Et?le(Ke):Ke});var Le=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,De=function(gt){switch(gt.length){case 4:var Et=(7&gt.charCodeAt(0))<<18|(63&gt.charCodeAt(1))<<12|(63&gt.charCodeAt(2))<<6|63&gt.charCodeAt(3),Ke=Et-65536;return ve((Ke>>>10)+55296)+ve((Ke&1023)+56320);case 3:return ve((15&gt.charCodeAt(0))<<12|(63&gt.charCodeAt(1))<<6|63&gt.charCodeAt(2));default:return ve((31&gt.charCodeAt(0))<<6|63&gt.charCodeAt(1))}},Fe=function(gt){return gt.replace(Le,De)},Ae=function(gt){var Et=gt.length,Ke=Et%4,et=(Et>0?Te[gt.charAt(0)]<<18:0)|(Et>1?Te[gt.charAt(1)]<<12:0)|(Et>2?Te[gt.charAt(2)]<<6:0)|(Et>3?Te[gt.charAt(3)]:0),$e=[ve(et>>>16),ve(et>>>8&255),ve(et&255)];return $e.length-=[0,0,2,1][Ke],$e.join("")},Oe=de.atob&&typeof de.atob=="function"?function(gt){return de.atob(gt)}:function(gt){return gt.replace(/\S{1,4}/g,Ae)},ze=function(gt){return Oe(String(gt).replace(/[^A-Za-z0-9\+\/]/g,""))},He=function(gt){return Fe(Oe(gt))},Ye=function(gt){return String(gt).replace(/[-_]/g,function(Et){return Et=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},We=function(gt){return He(Ye(gt))},Ue;de.Uint8Array&&(Ue=function(gt){return Uint8Array.from(ze(Ye(gt)),function(Et){return Et.charCodeAt(0)})});var st=function(){var gt=de.Base64;return de.Base64=Ee,gt};if(de.Base64={VERSION:we,atob:ze,btoa:oe,fromBase64:We,toBase64:ue,utob:z,encode:ue,encodeURI:pe,btou:Fe,decode:We,noConflict:st,fromUint8Array:Se,toUint8Array:Ue},typeof Object.defineProperty=="function"){var dt=function(gt){return{value:gt,enumerable:!1,writable:!0,configurable:!0}};de.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",dt(function(){return We(this)})),Object.defineProperty(String.prototype,"toBase64",dt(function(gt){return ue(this,gt)})),Object.defineProperty(String.prototype,"toBase64URI",dt(function(){return ue(this,!0)}))}}return de.Meteor&&(Base64=de.Base64),typeof Ge!="undefined"&&Ge.exports?Ge.exports.Base64=de.Base64:typeof at=="function"&&at.amd&&at([],function(){return de.Base64}),{Base64:de.Base64}})}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(ae,Ge,Ie){"use strict";Ge.exports=de;var me=Object.prototype.hasOwnProperty;function de(Ee,we,be){if(!Ee)throw new TypeError("argument dest is required");if(!we)throw new TypeError("argument src is required");return be===void 0&&(be=!0),Object.getOwnPropertyNames(we).forEach(function(ve){if(!(!be&&me.call(Ee,ve))){var xe=Object.getOwnPropertyDescriptor(we,ve);Object.defineProperty(Ee,ve,xe)}}),Ee}},{}],373:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.regexp.constructor.js"),ae("core-js/modules/es.regexp.to-string.js");function me(){this._types=Object.create(null),this._extensions=Object.create(null);for(var de=0;de<arguments.length;de++)this.define(arguments[de]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}me.prototype.define=function(de,Ee){for(var we in de){var be=de[we].map(function(fe){return fe.toLowerCase()});we=we.toLowerCase();for(var Te=0;Te<be.length;Te++){var ve=be[Te];if(ve[0]!=="*"){if(!Ee&&ve in this._types)throw new Error('Attempt to change mapping for "'+ve+'" extension from "'+this._types[ve]+'" to "'+we+'". Pass `force=true` to allow this, otherwise remove "'+ve+'" from the list of extensions for "'+we+'".');this._types[ve]=we}}if(Ee||!this._extensions[we]){var xe=be[0];this._extensions[we]=xe[0]!=="*"?xe:xe.substr(1)}}},me.prototype.getType=function(de){de=String(de);var Ee=de.replace(/^.*[/\\]/,"").toLowerCase(),we=Ee.replace(/^.*\./,"").toLowerCase(),be=Ee.length<de.length,Te=we.length<Ee.length-1;return(Te||!be)&&this._types[we]||null},me.prototype.getExtension=function(de){return de=/^\s*([^;\s]*)/.test(de)&&RegExp.$1,de&&this._extensions[de.toLowerCase()]||null},Ge.exports=me},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(ae,Ge,Ie){"use strict";var me=ae("./Mime");Ge.exports=new me(ae("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(ae,Ge,Ie){"use strict";Ge.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(ae,Ge,Ie){var me=1e3,de=me*60,Ee=de*60,we=Ee*24,be=we*7,Te=we*365.25;Ge.exports=function(ee,oe){oe=oe||{};var ie=typeof ee;if(ie==="string"&&ee.length>0)return ve(ee);if(ie==="number"&&isFinite(ee))return oe.long?fe(ee):xe(ee);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ee))};function ve(ee){if(ee=String(ee),!(ee.length>100)){var oe=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(ee);if(oe){var ie=parseFloat(oe[1]),le=(oe[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return ie*Te;case"weeks":case"week":case"w":return ie*be;case"days":case"day":case"d":return ie*we;case"hours":case"hour":case"hrs":case"hr":case"h":return ie*Ee;case"minutes":case"minute":case"mins":case"min":case"m":return ie*de;case"seconds":case"second":case"secs":case"sec":case"s":return ie*me;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ie;default:return}}}}function xe(ee){var oe=Math.abs(ee);return oe>=we?Math.round(ee/we)+"d":oe>=Ee?Math.round(ee/Ee)+"h":oe>=de?Math.round(ee/de)+"m":oe>=me?Math.round(ee/me)+"s":ee+"ms"}function fe(ee){var oe=Math.abs(ee);return oe>=we?z(ee,oe,we,"day"):oe>=Ee?z(ee,oe,Ee,"hour"):oe>=de?z(ee,oe,de,"minute"):oe>=me?z(ee,oe,me,"second"):ee+" ms"}function z(ee,oe,ie,le){var ue=oe>=ie*1.5;return Math.round(ee/ie)+" "+le+(ue?"s":"")}},{}],377:[function(ae,Ge,Ie){"use strict";var me=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function we(Te){if(Te==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Te)}function be(){try{if(!Object.assign)return!1;var Te=new String("abc");if(Te[5]="de",Object.getOwnPropertyNames(Te)[0]==="5")return!1;for(var ve={},xe=0;xe<10;xe++)ve["_"+String.fromCharCode(xe)]=xe;var fe=Object.getOwnPropertyNames(ve).map(function(ee){return ve[ee]});if(fe.join("")!=="0123456789")return!1;var z={};return"abcdefghijklmnopqrst".split("").forEach(function(ee){z[ee]=ee}),Object.keys(Object.assign({},z)).join("")==="abcdefghijklmnopqrst"}catch(ee){return!1}}Ge.exports=be()?Object.assign:function(Te,ve){for(var xe,fe=we(Te),z,ee=1;ee<arguments.length;ee++){xe=Object(arguments[ee]);for(var oe in xe)de.call(xe,oe)&&(fe[oe]=xe[oe]);if(me){z=me(xe);for(var ie=0;ie<z.length;ie++)Ee.call(xe,z[ie])&&(fe[z[ie]]=xe[z[ie]])}}return fe}},{}],378:[function(ae,Ge,Ie){(function(me){(function(){"use strict";function de(Te){if(typeof Te!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Te))}function Ee(Te,ve){for(var xe="",fe=0,z=-1,ee=0,oe,ie=0;ie<=Te.length;++ie){if(ie<Te.length)oe=Te.charCodeAt(ie);else{if(oe===47)break;oe=47}if(oe===47){if(!(z===ie-1||ee===1))if(z!==ie-1&&ee===2){if(xe.length<2||fe!==2||xe.charCodeAt(xe.length-1)!==46||xe.charCodeAt(xe.length-2)!==46){if(xe.length>2){var le=xe.lastIndexOf("/");if(le!==xe.length-1){le===-1?(xe="",fe=0):(xe=xe.slice(0,le),fe=xe.length-1-xe.lastIndexOf("/")),z=ie,ee=0;continue}}else if(xe.length===2||xe.length===1){xe="",fe=0,z=ie,ee=0;continue}}ve&&(xe.length>0?xe+="/..":xe="..",fe=2)}else xe.length>0?xe+="/"+Te.slice(z+1,ie):xe=Te.slice(z+1,ie),fe=ie-z-1;z=ie,ee=0}else oe===46&&ee!==-1?++ee:ee=-1}return xe}function we(Te,ve){var xe=ve.dir||ve.root,fe=ve.base||(ve.name||"")+(ve.ext||"");return xe?xe===ve.root?xe+fe:xe+Te+fe:fe}var be={resolve:function(){for(var ve="",xe=!1,fe,z=arguments.length-1;z>=-1&&!xe;z--){var ee;z>=0?ee=arguments[z]:(fe===void 0&&(fe=me.cwd()),ee=fe),de(ee),ee.length!==0&&(ve=ee+"/"+ve,xe=ee.charCodeAt(0)===47)}return ve=Ee(ve,!xe),xe?ve.length>0?"/"+ve:"/":ve.length>0?ve:"."},normalize:function(ve){if(de(ve),ve.length===0)return".";var xe=ve.charCodeAt(0)===47,fe=ve.charCodeAt(ve.length-1)===47;return ve=Ee(ve,!xe),ve.length===0&&!xe&&(ve="."),ve.length>0&&fe&&(ve+="/"),xe?"/"+ve:ve},isAbsolute:function(ve){return de(ve),ve.length>0&&ve.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var ve,xe=0;xe<arguments.length;++xe){var fe=arguments[xe];de(fe),fe.length>0&&(ve===void 0?ve=fe:ve+="/"+fe)}return ve===void 0?".":be.normalize(ve)},relative:function(ve,xe){if(de(ve),de(xe),ve===xe||(ve=be.resolve(ve),xe=be.resolve(xe),ve===xe))return"";for(var fe=1;fe<ve.length&&ve.charCodeAt(fe)===47;++fe);for(var z=ve.length,ee=z-fe,oe=1;oe<xe.length&&xe.charCodeAt(oe)===47;++oe);for(var ie=xe.length,le=ie-oe,ue=ee<le?ee:le,pe=-1,Se=0;Se<=ue;++Se){if(Se===ue){if(le>ue){if(xe.charCodeAt(oe+Se)===47)return xe.slice(oe+Se+1);if(Se===0)return xe.slice(oe+Se)}else ee>ue&&(ve.charCodeAt(fe+Se)===47?pe=Se:Se===0&&(pe=0));break}var Le=ve.charCodeAt(fe+Se),De=xe.charCodeAt(oe+Se);if(Le!==De)break;Le===47&&(pe=Se)}var Fe="";for(Se=fe+pe+1;Se<=z;++Se)(Se===z||ve.charCodeAt(Se)===47)&&(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+xe.slice(oe+pe):(oe+=pe,xe.charCodeAt(oe)===47&&++oe,xe.slice(oe))},_makeLong:function(ve){return ve},dirname:function(ve){if(de(ve),ve.length===0)return".";for(var xe=ve.charCodeAt(0),fe=xe===47,z=-1,ee=!0,oe=ve.length-1;oe>=1;--oe)if(xe=ve.charCodeAt(oe),xe===47){if(!ee){z=oe;break}}else ee=!1;return z===-1?fe?"/":".":fe&&z===1?"//":ve.slice(0,z)},basename:function(ve,xe){if(xe!==void 0&&typeof xe!="string")throw new TypeError('"ext" argument must be a string');de(ve);var fe=0,z=-1,ee=!0,oe;if(xe!==void 0&&xe.length>0&&xe.length<=ve.length){if(xe.length===ve.length&&xe===ve)return"";var ie=xe.length-1,le=-1;for(oe=ve.length-1;oe>=0;--oe){var ue=ve.charCodeAt(oe);if(ue===47){if(!ee){fe=oe+1;break}}else le===-1&&(ee=!1,le=oe+1),ie>=0&&(ue===xe.charCodeAt(ie)?--ie===-1&&(z=oe):(ie=-1,z=le))}return fe===z?z=le:z===-1&&(z=ve.length),ve.slice(fe,z)}else{for(oe=ve.length-1;oe>=0;--oe)if(ve.charCodeAt(oe)===47){if(!ee){fe=oe+1;break}}else z===-1&&(ee=!1,z=oe+1);return z===-1?"":ve.slice(fe,z)}},extname:function(ve){de(ve);for(var xe=-1,fe=0,z=-1,ee=!0,oe=0,ie=ve.length-1;ie>=0;--ie){var le=ve.charCodeAt(ie);if(le===47){if(!ee){fe=ie+1;break}continue}z===-1&&(ee=!1,z=ie+1),le===46?xe===-1?xe=ie:oe!==1&&(oe=1):xe!==-1&&(oe=-1)}return xe===-1||z===-1||oe===0||oe===1&&xe===z-1&&xe===fe+1?"":ve.slice(xe,z)},format:function(ve){if(ve===null||typeof ve!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof ve);return we("/",ve)},parse:function(ve){de(ve);var xe={root:"",dir:"",base:"",ext:"",name:""};if(ve.length===0)return xe;var fe=ve.charCodeAt(0),z=fe===47,ee;z?(xe.root="/",ee=1):ee=0;for(var oe=-1,ie=0,le=-1,ue=!0,pe=ve.length-1,Se=0;pe>=ee;--pe){if(fe=ve.charCodeAt(pe),fe===47){if(!ue){ie=pe+1;break}continue}le===-1&&(ue=!1,le=pe+1),fe===46?oe===-1?oe=pe:Se!==1&&(Se=1):oe!==-1&&(Se=-1)}return oe===-1||le===-1||Se===0||Se===1&&oe===le-1&&oe===ie+1?le!==-1&&(ie===0&&z?xe.base=xe.name=ve.slice(1,le):xe.base=xe.name=ve.slice(ie,le)):(ie===0&&z?(xe.name=ve.slice(1,oe),xe.base=ve.slice(1,le)):(xe.name=ve.slice(ie,oe),xe.base=ve.slice(ie,le)),xe.ext=ve.slice(oe,le)),ie>0?xe.dir=ve.slice(0,ie-1):z&&(xe.dir="/"),xe},sep:"/",delimiter:":",win32:null,posix:null};be.posix=be,Ge.exports=be}).call(this)}).call(this,ae("_process"))},{_process:467}],379:[function(ae,Ge,Ie){(function(me){(function(){(function(){"use strict";var de={function:!0,object:!0},Ee=de[typeof window]&&window||this,we=Ee,be=de[typeof Ie]&&Ie,Te=de[typeof Ge]&&Ge&&!Ge.nodeType&&Ge,ve=be&&Te&&typeof me=="object"&&me;ve&&(ve.global===ve||ve.window===ve||ve.self===ve)&&(Ee=ve);var xe=Math.pow(2,53)-1,fe=/\bOpera/,z=this,ee=Object.prototype,oe=ee.hasOwnProperty,ie=ee.toString;function le(We){return We=String(We),We.charAt(0).toUpperCase()+We.slice(1)}function ue(We,Ue,st){var dt={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Ue&&st&&/^Win/i.test(We)&&!/^Windows Phone /i.test(We)&&(dt=dt[/[\d.]+$/.exec(We)])&&(We="Windows "+dt),We=String(We),Ue&&st&&(We=We.replace(RegExp(Ue,"i"),st)),We=Se(We.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),We}function pe(We,Ue){var st=-1,dt=We?We.length:0;if(typeof dt=="number"&&dt>-1&&dt<=xe)for(;++st<dt;)Ue(We[st],st,We);else Le(We,Ue)}function Se(We){return We=ze(We),/^(?:webOS|i(?:OS|P))/.test(We)?We:le(We)}function Le(We,Ue){for(var st in We)oe.call(We,st)&&Ue(We[st],st,We)}function De(We){return We==null?le(We):ie.call(We).slice(8,-1)}function Fe(We,Ue){var st=We!=null?typeof We[Ue]:"number";return!/^(?:boolean|number|string|undefined)$/.test(st)&&(st=="object"?!!We[Ue]:!0)}function Ae(We){return String(We).replace(/([ -])(?!$)/g,"$1?")}function Oe(We,Ue){var st=null;return pe(We,function(dt,gt){st=Ue(st,dt,gt,We)}),st}function ze(We){return String(We).replace(/^ +| +$/g,"")}function He(We){var Ue=Ee,st=We&&typeof We=="object"&&De(We)!="String";st&&(Ue=We,We=null);var dt=Ue.navigator||{},gt=dt.userAgent||"";We||(We=gt);var Et=st||z==we,Ke=st?!!dt.likeChrome:/\bChrome\b/.test(We)&&!/internal|\n/i.test(ie.toString()),et="Object",$e=st?et:"ScriptBridgingProxyObject",vt=st?et:"Environment",wt=st&&Ue.java?"JavaPackage":De(Ue.java),ht=st?et:"RuntimeObject",pt=/\bJava/.test(wt)&&Ue.java,ct=pt&&De(Ue.environment)==vt,Ct=pt?"a":"\u03B1",xt=pt?"b":"\u03B2",yt=Ue.document||{},Tt=Ue.operamini||Ue.opera,St=fe.test(St=st&&Tt?Tt["[[Class]]"]:De(Tt))?St:Tt=null,nt,Qe=We,Ce=[],Ne=null,Je=We==gt,rt=Je&&Tt&&typeof Tt.version=="function"&&Tt.version(),Be,_e=zt([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Xe=Ht(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),lt=an([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),Pt=jt({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),kt=ln(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function zt(un){return Oe(un,function(mn,In){return mn||RegExp("\\b"+(In.pattern||Ae(In))+"\\b","i").exec(We)&&(In.label||In)})}function jt(un){return Oe(un,function(mn,In,Sn){return mn||(In[lt]||In[/^[a-z]+(?: +[a-z]+\b)*/i.exec(lt)]||RegExp("\\b"+Ae(Sn)+"(?:\\b|\\w*\\d)","i").exec(We))&&Sn})}function Ht(un){return Oe(un,function(mn,In){return mn||RegExp("\\b"+(In.pattern||Ae(In))+"\\b","i").exec(We)&&(In.label||In)})}function ln(un){return Oe(un,function(mn,In){var Sn=In.pattern||Ae(In);return!mn&&(mn=RegExp("\\b"+Sn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(We))&&(mn=ue(mn,Sn,In.label||In)),mn})}function an(un){return Oe(un,function(mn,In){var Sn=In.pattern||Ae(In);return!mn&&(mn=RegExp("\\b"+Sn+" *\\d+[.\\w_]*","i").exec(We)||RegExp("\\b"+Sn+" *\\w+-[\\w]*","i").exec(We)||RegExp("\\b"+Sn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(We))&&((mn=String(In.label&&!RegExp(Sn,"i").test(In.label)?In.label:mn).split("/"))[1]&&!/[\d.]+/.test(mn[0])&&(mn[0]+=" "+mn[1]),In=In.label||In,mn=Se(mn[0].replace(RegExp(Sn,"i"),In).replace(RegExp("; *(?:"+In+"[_-])?","i")," ").replace(RegExp("("+In+")[-_.]?(\\w)","i"),"$1 $2"))),mn})}function sn(un){return Oe(un,function(mn,In){return mn||(RegExp(In+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(We)||0)[1]||null})}function $t(){return this.description||""}if(_e&&(_e=[_e]),/\bAndroid\b/.test(kt)&&!lt&&(nt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(We))&&(lt=ze(nt[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),Pt&&!lt?lt=an([Pt]):Pt&&lt&&(lt=lt.replace(RegExp("^("+Ae(Pt)+")[-_.\\s]","i"),Pt+" ").replace(RegExp("^("+Ae(Pt)+")[-_.]?(\\w)","i"),Pt+" $2")),(nt=/\bGoogle TV\b/.exec(lt))&&(lt=nt[0]),/\bSimulator\b/i.test(We)&&(lt=(lt?lt+" ":"")+"Simulator"),Xe=="Opera Mini"&&/\bOPiOS\b/.test(We)&&Ce.push("running in Turbo/Uncompressed mode"),Xe=="IE"&&/\blike iPhone OS\b/.test(We)?(nt=He(We.replace(/like iPhone OS/,"")),Pt=nt.manufacturer,lt=nt.product):/^iP/.test(lt)?(Xe||(Xe="Safari"),kt="iOS"+((nt=/ OS ([\d_]+)/i.exec(We))?" "+nt[1].replace(/_/g,"."):"")):Xe=="Konqueror"&&/^Linux\b/i.test(kt)?kt="Kubuntu":Pt&&Pt!="Google"&&(/Chrome/.test(Xe)&&!/\bMobile Safari\b/i.test(We)||/\bVita\b/.test(lt))||/\bAndroid\b/.test(kt)&&/^Chrome/.test(Xe)&&/\bVersion\//i.test(We)?(Xe="Android Browser",kt=/\bAndroid\b/.test(kt)?kt:"Android"):Xe=="Silk"?(/\bMobi/i.test(We)||(kt="Android",Ce.unshift("desktop mode")),/Accelerated *= *true/i.test(We)&&Ce.unshift("accelerated")):Xe=="UC Browser"&&/\bUCWEB\b/.test(We)?Ce.push("speed mode"):Xe=="PaleMoon"&&(nt=/\bFirefox\/([\d.]+)\b/.exec(We))?Ce.push("identifying as Firefox "+nt[1]):Xe=="Firefox"&&(nt=/\b(Mobile|Tablet|TV)\b/i.exec(We))?(kt||(kt="Firefox OS"),lt||(lt=nt[1])):!Xe||(nt=!/\bMinefield\b/i.test(We)&&/\b(?:Firefox|Safari)\b/.exec(Xe))?(Xe&&!lt&&/[\/,]|^[^(]+?\)/.test(We.slice(We.indexOf(nt+"/")+8))&&(Xe=null),(nt=lt||Pt||kt)&&(lt||Pt||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(kt))&&(Xe=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(kt)?kt:nt)+" Browser")):Xe=="Electron"&&(nt=(/\bChrome\/([\d.]+)\b/.exec(We)||0)[1])&&Ce.push("Chromium "+nt),rt||(rt=sn(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Ae(Xe),"(?:Firefox|Minefield|NetFront)"])),(nt=_e=="iCab"&&parseFloat(rt)>3&&"WebKit"||/\bOpera\b/.test(Xe)&&(/\bOPR\b/.test(We)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(We)&&!/^(?:Trident|EdgeHTML)$/.test(_e)&&"WebKit"||!_e&&/\bMSIE\b/i.test(We)&&(kt=="Mac OS"?"Tasman":"Trident")||_e=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Xe)&&"NetFront")&&(_e=[nt]),Xe=="IE"&&(nt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(We)||0)[1])?(Xe+=" Mobile",kt="Windows Phone "+(/\+$/.test(nt)?nt:nt+".x"),Ce.unshift("desktop mode")):/\bWPDesktop\b/i.test(We)?(Xe="IE Mobile",kt="Windows Phone 8.x",Ce.unshift("desktop mode"),rt||(rt=(/\brv:([\d.]+)/.exec(We)||0)[1])):Xe!="IE"&&_e=="Trident"&&(nt=/\brv:([\d.]+)/.exec(We))&&(Xe&&Ce.push("identifying as "+Xe+(rt?" "+rt:"")),Xe="IE",rt=nt[1]),Je){if(Fe(Ue,"global"))if(pt&&(nt=pt.lang.System,Qe=nt.getProperty("os.arch"),kt=kt||nt.getProperty("os.name")+" "+nt.getProperty("os.version")),ct){try{rt=Ue.require("ringo/engine").version.join("."),Xe="RingoJS"}catch(un){(nt=Ue.system)&&nt.global.system==Ue.system&&(Xe="Narwhal",kt||(kt=nt[0].os||null))}Xe||(Xe="Rhino")}else typeof Ue.process=="object"&&!Ue.process.browser&&(nt=Ue.process)&&(typeof nt.versions=="object"&&(typeof nt.versions.electron=="string"?(Ce.push("Node "+nt.versions.node),Xe="Electron",rt=nt.versions.electron):typeof nt.versions.nw=="string"&&(Ce.push("Chromium "+rt,"Node "+nt.versions.node),Xe="NW.js",rt=nt.versions.nw)),Xe||(Xe="Node.js",Qe=nt.arch,kt=nt.platform,rt=/[\d.]+/.exec(nt.version),rt=rt?rt[0]:null));else De(nt=Ue.runtime)==$e?(Xe="Adobe AIR",kt=nt.flash.system.Capabilities.os):De(nt=Ue.phantom)==ht?(Xe="PhantomJS",rt=(nt=nt.version||null)&&nt.major+"."+nt.minor+"."+nt.patch):typeof yt.documentMode=="number"&&(nt=/\bTrident\/(\d+)/i.exec(We))?(rt=[rt,yt.documentMode],(nt=+nt[1]+4)!=rt[1]&&(Ce.push("IE "+rt[1]+" mode"),_e&&(_e[1]=""),rt[1]=nt),rt=Xe=="IE"?String(rt[1].toFixed(1)):rt[0]):typeof yt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Xe)&&(Ce.push("masking as "+Xe+" "+rt),Xe="IE",rt="11.0",_e=["Trident"],kt="Windows");kt=kt&&Se(kt)}if(rt&&(nt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(rt)||/(?:alpha|beta)(?: ?\d)?/i.exec(We+";"+(Je&&dt.appMinorVersion))||/\bMinefield\b/i.test(We)&&"a")&&(Ne=/b/i.test(nt)?"beta":"alpha",rt=rt.replace(RegExp(nt+"\\+?$"),"")+(Ne=="beta"?xt:Ct)+(/\d+\+?/.exec(nt)||"")),Xe=="Fennec"||Xe=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(kt))Xe="Firefox Mobile";else if(Xe=="Maxthon"&&rt)rt=rt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(lt))lt=="Xbox 360"&&(kt=null),lt=="Xbox 360"&&/\bIEMobile\b/.test(We)&&Ce.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Xe)||Xe&&!lt&&!/Browser|Mobi/.test(Xe))&&(kt=="Windows CE"||/Mobi/i.test(We)))Xe+=" Mobile";else if(Xe=="IE"&&Je)try{Ue.external===null&&Ce.unshift("platform preview")}catch(un){Ce.unshift("embedded")}else(/\bBlackBerry\b/.test(lt)||/\bBB10\b/.test(We))&&(nt=(RegExp(lt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(We)||0)[1]||rt)?(nt=[nt,/BB10/.test(We)],kt=(nt[1]?(lt=null,Pt="BlackBerry"):"Device Software")+" "+nt[0],rt=null):this!=Le&&lt!="Wii"&&(Je&&Tt||/Opera/.test(Xe)&&/\b(?:MSIE|Firefox)\b/i.test(We)||Xe=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(kt)||Xe=="IE"&&(kt&&!/^Win/.test(kt)&&rt>5.5||/\bWindows XP\b/.test(kt)&&rt>8||rt==8&&!/\bTrident\b/.test(We)))&&!fe.test(nt=He.call(Le,We.replace(fe,"")+";"))&&nt.name&&(nt="ing as "+nt.name+((nt=nt.version)?" "+nt:""),fe.test(Xe)?(/\bIE\b/.test(nt)&&kt=="Mac OS"&&(kt=null),nt="identify"+nt):(nt="mask"+nt,St?Xe=Se(St.replace(/([a-z])([A-Z])/g,"$1 $2")):Xe="Opera",/\bIE\b/.test(nt)&&(kt=null),Je||(rt=null)),_e=["Presto"],Ce.push(nt));(nt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(We)||0)[1])&&(nt=[parseFloat(nt.replace(/\.(\d)$/,".0$1")),nt],Xe=="Safari"&&nt[1].slice(-1)=="+"?(Xe="WebKit Nightly",Ne="alpha",rt=nt[1].slice(0,-1)):(rt==nt[1]||rt==(nt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(We)||0)[1]))&&(rt=null),nt[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(We)||0)[1],nt[0]==537.36&&nt[2]==537.36&&parseFloat(nt[1])>=28&&_e=="WebKit"&&(_e=["Blink"]),!Je||!Ke&&!nt[1]?(_e&&(_e[1]="like Safari"),nt=(nt=nt[0],nt<400?1:nt<500?2:nt<526?3:nt<533?4:nt<534?"4+":nt<535?5:nt<537?6:nt<538?7:nt<601?8:nt<602?9:nt<604?10:nt<606?11:nt<608?12:"12")):(_e&&(_e[1]="like Chrome"),nt=nt[1]||(nt=nt[0],nt<530?1:nt<532?2:nt<532.05?3:nt<533?4:nt<534.03?5:nt<534.07?6:nt<534.1?7:nt<534.13?8:nt<534.16?9:nt<534.24?10:nt<534.3?11:nt<535.01?12:nt<535.02?"13+":nt<535.07?15:nt<535.11?16:nt<535.19?17:nt<536.05?18:nt<536.1?19:nt<537.01?20:nt<537.11?"21+":nt<537.13?23:nt<537.18?24:nt<537.24?25:nt<537.36?26:_e!="Blink"?"27":"28")),_e&&(_e[1]+=" "+(nt+=typeof nt=="number"?".x":/[.+]/.test(nt)?"":"+")),Xe=="Safari"&&(!rt||parseInt(rt)>45)?rt=nt:Xe=="Chrome"&&/\bHeadlessChrome/i.test(We)&&Ce.unshift("headless")),Xe=="Opera"&&(nt=/\bzbov|zvav$/.exec(kt))?(Xe+=" ",Ce.unshift("desktop mode"),nt=="zvav"?(Xe+="Mini",rt=null):Xe+="Mobile",kt=kt.replace(RegExp(" *"+nt+"$"),"")):Xe=="Safari"&&/\bChrome\b/.exec(_e&&_e[1])?(Ce.unshift("desktop mode"),Xe="Chrome Mobile",rt=null,/\bOS X\b/.test(kt)?(Pt="Apple",kt="iOS 4.3+"):kt=null):/\bSRWare Iron\b/.test(Xe)&&!rt&&(rt=sn("Chrome")),rt&&rt.indexOf(nt=/[\d.]+$/.exec(kt))==0&&We.indexOf("/"+nt+"-")>-1&&(kt=ze(kt.replace(nt,""))),kt&&kt.indexOf(Xe)!=-1&&!RegExp(Xe+" OS").test(kt)&&(kt=kt.replace(RegExp(" *"+Ae(Xe)+" *"),"")),_e&&!/\b(?:Avant|Nook)\b/.test(Xe)&&(/Browser|Lunascape|Maxthon/.test(Xe)||Xe!="Safari"&&/^iOS/.test(kt)&&/\bSafari\b/.test(_e[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Xe)&&_e[1])&&(nt=_e[_e.length-1])&&Ce.push(nt),Ce.length&&(Ce=["("+Ce.join("; ")+")"]),Pt&&lt&&lt.indexOf(Pt)<0&&Ce.push("on "+Pt),lt&&Ce.push((/^on /.test(Ce[Ce.length-1])?"":"on ")+lt),kt&&(nt=/ ([\d.+]+)$/.exec(kt),Be=nt&&kt.charAt(kt.length-nt[0].length-1)=="/",kt={architecture:32,family:nt&&!Be?kt.replace(nt[0],""):kt,version:nt?nt[1]:null,toString:function(){var un=this.version;return this.family+(un&&!Be?" "+un:"")+(this.architecture==64?" 64-bit":"")}}),(nt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Qe))&&!/\bi686\b/i.test(Qe)?(kt&&(kt.architecture=64,kt.family=kt.family.replace(RegExp(" *"+nt),"")),Xe&&(/\bWOW64\b/i.test(We)||Je&&/\w(?:86|32)$/.test(dt.cpuClass||dt.platform)&&!/\bWin64; x64\b/i.test(We))&&Ce.unshift("32-bit")):kt&&/^OS X/.test(kt.family)&&Xe=="Chrome"&&parseFloat(rt)>=39&&(kt.architecture=64),We||(We=null);var On={};return On.description=We,On.layout=_e&&_e[0],On.manufacturer=Pt,On.name=Xe,On.prerelease=Ne,On.product=lt,On.ua=We,On.version=Xe&&rt,On.os=kt||{architecture:null,family:null,version:null,toString:function(){return"null"}},On.parse=He,On.toString=$t,On.version&&Ce.unshift(rt),On.name&&Ce.unshift(Xe),kt&&Xe&&!(kt==String(kt).split(" ")[0]&&(kt==Xe.split(" ")[0]||lt))&&Ce.push(lt?"("+kt+")":"on "+kt),Ce.length&&(On.description=Ce.join(" ")),On}var Ye=He();typeof at=="function"&&typeof at.amd=="object"&&at.amd?(Ee.platform=Ye,at(function(){return Ye})):be&&Te?Le(Ye,function(We,Ue){be[Ue]=We}):Ee.platform=Ye}).call(this)}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(ae,Ge,Ie){(function(me){(function(){"use strict";typeof me=="undefined"||!me.version||me.version.indexOf("v0.")===0||me.version.indexOf("v1.")===0&&me.version.indexOf("v1.8.")!==0?Ge.exports={nextTick:de}:Ge.exports=me;function de(Ee,we,be,Te){if(typeof Ee!="function")throw new TypeError('"callback" argument must be a function');var ve=arguments.length,xe,fe;switch(ve){case 0:case 1:return me.nextTick(Ee);case 2:return me.nextTick(function(){Ee.call(null,we)});case 3:return me.nextTick(function(){Ee.call(null,we,be)});case 4:return me.nextTick(function(){Ee.call(null,we,be,Te)});default:for(xe=new Array(ve-1),fe=0;fe<xe.length;)xe[fe++]=arguments[fe];return me.nextTick(function(){Ee.apply(null,xe)})}}}).call(this)}).call(this,ae("_process"))},{_process:467}],381:[function(ae,Ge,Ie){var me=Ge.exports={},de,Ee;function we(){throw new Error("setTimeout has not been defined")}function be(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?de=setTimeout:de=we}catch(pe){de=we}try{typeof clearTimeout=="function"?Ee=clearTimeout:Ee=be}catch(pe){Ee=be}})();function Te(pe){if(de===setTimeout)return setTimeout(pe,0);if((de===we||!de)&&setTimeout)return de=setTimeout,setTimeout(pe,0);try{return de(pe,0)}catch(Se){try{return de.call(null,pe,0)}catch(Le){return de.call(this,pe,0)}}}function ve(pe){if(Ee===clearTimeout)return clearTimeout(pe);if((Ee===be||!Ee)&&clearTimeout)return Ee=clearTimeout,clearTimeout(pe);try{return Ee(pe)}catch(Se){try{return Ee.call(null,pe)}catch(Le){return Ee.call(this,pe)}}}var xe=[],fe=!1,z,ee=-1;function oe(){!fe||!z||(fe=!1,z.length?xe=z.concat(xe):ee=-1,xe.length&&ie())}function ie(){if(!fe){var pe=Te(oe);fe=!0;for(var Se=xe.length;Se;){for(z=xe,xe=[];++ee<Se;)z&&z[ee].run();ee=-1,Se=xe.length}z=null,fe=!1,ve(pe)}}me.nextTick=function(pe){var Se=new Array(arguments.length-1);if(arguments.length>1)for(var Le=1;Le<arguments.length;Le++)Se[Le-1]=arguments[Le];xe.push(new le(pe,Se)),xe.length===1&&!fe&&Te(ie)};function le(pe,Se){this.fun=pe,this.array=Se}le.prototype.run=function(){this.fun.apply(null,this.array)},me.title="browser",me.browser=!0,me.env={},me.argv=[],me.version="",me.versions={};function ue(){}me.on=ue,me.addListener=ue,me.once=ue,me.off=ue,me.removeListener=ue,me.removeAllListeners=ue,me.emit=ue,me.prependListener=ue,me.prependOnceListener=ue,me.listeners=function(pe){return[]},me.binding=function(pe){throw new Error("process.binding is not supported")},me.cwd=function(){return"/"},me.chdir=function(pe){throw new Error("process.chdir is not supported")},me.umask=function(){return 0}},{}],382:[function(ae,Ge,Ie){(function(me){(function(){(function(de){var Ee=typeof Ie=="object"&&Ie&&!Ie.nodeType&&Ie,we=typeof Ge=="object"&&Ge&&!Ge.nodeType&&Ge,be=typeof me=="object"&&me;(be.global===be||be.window===be||be.self===be)&&(de=be);var Te,ve=2147483647,xe=36,fe=1,z=26,ee=38,oe=700,ie=72,le=128,ue="-",pe=/^xn--/,Se=/[^\x20-\x7E]/,Le=/[\x2E\u3002\uFF0E\uFF61]/g,De={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=xe-fe,Ae=Math.floor,Oe=String.fromCharCode,ze;function He(wt){throw new RangeError(De[wt])}function Ye(wt,ht){for(var pt=wt.length,ct=[];pt--;)ct[pt]=ht(wt[pt]);return ct}function We(wt,ht){var pt=wt.split("@"),ct="";pt.length>1&&(ct=pt[0]+"@",wt=pt[1]),wt=wt.replace(Le,".");var Ct=wt.split("."),xt=Ye(Ct,ht).join(".");return ct+xt}function Ue(wt){for(var ht=[],pt=0,ct=wt.length,Ct,xt;pt<ct;)Ct=wt.charCodeAt(pt++),Ct>=55296&&Ct<=56319&&pt<ct?(xt=wt.charCodeAt(pt++),(xt&64512)==56320?ht.push(((Ct&1023)<<10)+(xt&1023)+65536):(ht.push(Ct),pt--)):ht.push(Ct);return ht}function st(wt){return Ye(wt,function(ht){var pt="";return ht>65535&&(ht-=65536,pt+=Oe(ht>>>10&1023|55296),ht=56320|ht&1023),pt+=Oe(ht),pt}).join("")}function dt(wt){return wt-48<10?wt-22:wt-65<26?wt-65:wt-97<26?wt-97:xe}function gt(wt,ht){return wt+22+75*(wt<26)-((ht!=0)<<5)}function Et(wt,ht,pt){var ct=0;for(wt=pt?Ae(wt/oe):wt>>1,wt+=Ae(wt/ht);wt>Fe*z>>1;ct+=xe)wt=Ae(wt/Fe);return Ae(ct+(Fe+1)*wt/(wt+ee))}function Ke(wt){var ht=[],pt=wt.length,ct,Ct=0,xt=le,yt=ie,Tt,St,nt,Qe,Ce,Ne,Je,rt,Be;for(Tt=wt.lastIndexOf(ue),Tt<0&&(Tt=0),St=0;St<Tt;++St)wt.charCodeAt(St)>=128&&He("not-basic"),ht.push(wt.charCodeAt(St));for(nt=Tt>0?Tt+1:0;nt<pt;){for(Qe=Ct,Ce=1,Ne=xe;nt>=pt&&He("invalid-input"),Je=dt(wt.charCodeAt(nt++)),(Je>=xe||Je>Ae((ve-Ct)/Ce))&&He("overflow"),Ct+=Je*Ce,rt=Ne<=yt?fe:Ne>=yt+z?z:Ne-yt,!(Je<rt);Ne+=xe)Be=xe-rt,Ce>Ae(ve/Be)&&He("overflow"),Ce*=Be;ct=ht.length+1,yt=Et(Ct-Qe,ct,Qe==0),Ae(Ct/ct)>ve-xt&&He("overflow"),xt+=Ae(Ct/ct),Ct%=ct,ht.splice(Ct++,0,xt)}return st(ht)}function et(wt){var ht,pt,ct,Ct,xt,yt,Tt,St,nt,Qe,Ce,Ne=[],Je,rt,Be,_e;for(wt=Ue(wt),Je=wt.length,ht=le,pt=0,xt=ie,yt=0;yt<Je;++yt)Ce=wt[yt],Ce<128&&Ne.push(Oe(Ce));for(ct=Ct=Ne.length,Ct&&Ne.push(ue);ct<Je;){for(Tt=ve,yt=0;yt<Je;++yt)Ce=wt[yt],Ce>=ht&&Ce<Tt&&(Tt=Ce);for(rt=ct+1,Tt-ht>Ae((ve-pt)/rt)&&He("overflow"),pt+=(Tt-ht)*rt,ht=Tt,yt=0;yt<Je;++yt)if(Ce=wt[yt],Ce<ht&&++pt>ve&&He("overflow"),Ce==ht){for(St=pt,nt=xe;Qe=nt<=xt?fe:nt>=xt+z?z:nt-xt,!(St<Qe);nt+=xe)_e=St-Qe,Be=xe-Qe,Ne.push(Oe(gt(Qe+_e%Be,0))),St=Ae(_e/Be);Ne.push(Oe(gt(St,0))),xt=Et(pt,rt,ct==Ct),pt=0,++ct}++pt,++ht}return Ne.join("")}function $e(wt){return We(wt,function(ht){return pe.test(ht)?Ke(ht.slice(4).toLowerCase()):ht})}function vt(wt){return We(wt,function(ht){return Se.test(ht)?"xn--"+et(ht):ht})}if(Te={version:"1.4.1",ucs2:{decode:Ue,encode:st},decode:Ke,encode:et,toASCII:vt,toUnicode:$e},typeof at=="function"&&typeof at.amd=="object"&&at.amd)at("punycode",function(){return Te});else if(Ee&&we)if(Ge.exports==Ee)we.exports=Te;else for(ze in Te)Te.hasOwnProperty(ze)&&(Ee[ze]=Te[ze]);else de.punycode=Te})(this)}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(ae,Ge,Ie){"use strict";function me(Ee,we){return Object.prototype.hasOwnProperty.call(Ee,we)}Ge.exports=function(Ee,we,be,Te){we=we||"&",be=be||"=";var ve={};if(typeof Ee!="string"||Ee.length===0)return ve;var xe=/\+/g;Ee=Ee.split(we);var fe=1e3;Te&&typeof Te.maxKeys=="number"&&(fe=Te.maxKeys);var z=Ee.length;fe>0&&z>fe&&(z=fe);for(var ee=0;ee<z;++ee){var oe=Ee[ee].replace(xe,"%20"),ie=oe.indexOf(be),le,ue,pe,Se;ie>=0?(le=oe.substr(0,ie),ue=oe.substr(ie+1)):(le=oe,ue=""),pe=decodeURIComponent(le),Se=decodeURIComponent(ue),me(ve,pe)?de(ve[pe])?ve[pe].push(Se):ve[pe]=[ve[pe],Se]:ve[pe]=Se}return ve};var de=Array.isArray||function(Ee){return Object.prototype.toString.call(Ee)==="[object Array]"}},{}],384:[function(ae,Ge,Ie){"use strict";var me=function(be){switch(typeof be){case"string":return be;case"boolean":return be?"true":"false";case"number":return isFinite(be)?be:"";default:return""}};Ge.exports=function(be,Te,ve,xe){return Te=Te||"&",ve=ve||"=",be===null&&(be=void 0),typeof be=="object"?Ee(we(be),function(fe){var z=encodeURIComponent(me(fe))+ve;return de(be[fe])?Ee(be[fe],function(ee){return z+encodeURIComponent(me(ee))}).join(Te):z+encodeURIComponent(me(be[fe]))}).join(Te):xe?encodeURIComponent(me(xe))+ve+encodeURIComponent(me(be)):""};var de=Array.isArray||function(be){return Object.prototype.toString.call(be)==="[object Array]"};function Ee(be,Te){if(be.map)return be.map(Te);for(var ve=[],xe=0;xe<be.length;xe++)ve.push(Te(be[xe],xe));return ve}var we=Object.keys||function(be){var Te=[];for(var ve in be)Object.prototype.hasOwnProperty.call(be,ve)&&Te.push(ve);return Te}},{}],385:[function(ae,Ge,Ie){"use strict";Ie.decode=Ie.parse=ae("./decode"),Ie.encode=Ie.stringify=ae("./encode")},{"./decode":383,"./encode":384}],386:[function(ae,Ge,Ie){"use strict";var me=ae("process-nextick-args"),de=Object.keys||function(oe){var ie=[];for(var le in oe)ie.push(le);return ie};Ge.exports=fe;var Ee=Object.create(ae("core-util-is"));Ee.inherits=ae("inherits");var we=ae("./_stream_readable"),be=ae("./_stream_writable");Ee.inherits(fe,we);for(var Te=de(be.prototype),ve=0;ve<Te.length;ve++){var xe=Te[ve];fe.prototype[xe]||(fe.prototype[xe]=be.prototype[xe])}function fe(oe){if(!(this instanceof fe))return new fe(oe);we.call(this,oe),be.call(this,oe),oe&&oe.readable===!1&&(this.readable=!1),oe&&oe.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,oe&&oe.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||me.nextTick(ee,this)}function ee(oe){oe.end()}Object.defineProperty(fe.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(oe){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=oe,this._writableState.destroyed=oe)}}),fe.prototype._destroy=function(oe,ie){this.push(null),this.end(),me.nextTick(ie,oe)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(ae,Ge,Ie){"use strict";Ge.exports=Ee;var me=ae("./_stream_transform"),de=Object.create(ae("core-util-is"));de.inherits=ae("inherits"),de.inherits(Ee,me);function Ee(we){if(!(this instanceof Ee))return new Ee(we);me.call(this,we)}Ee.prototype._transform=function(we,be,Te){Te(null,we)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(ae,Ge,Ie){(function(me,de){(function(){"use strict";var Ee=ae("process-nextick-args");Ge.exports=Oe;var we=ae("isarray"),be;Oe.ReadableState=Ae;var Te=ae("events").EventEmitter,ve=function(Ce,Ne){return Ce.listeners(Ne).length},xe=ae("./internal/streams/stream"),fe=ae("safe-buffer").Buffer,z=de.Uint8Array||function(){};function ee(Ce){return fe.from(Ce)}function oe(Ce){return fe.isBuffer(Ce)||Ce instanceof z}var ie=Object.create(ae("core-util-is"));ie.inherits=ae("inherits");var le=ae("util"),ue=void 0;le&&le.debuglog?ue=le.debuglog("stream"):ue=function(){};var pe=ae("./internal/streams/BufferList"),Se=ae("./internal/streams/destroy"),Le;ie.inherits(Oe,xe);var De=["error","close","destroy","pause","resume"];function Fe(Ce,Ne,Je){if(typeof Ce.prependListener=="function")return Ce.prependListener(Ne,Je);!Ce._events||!Ce._events[Ne]?Ce.on(Ne,Je):we(Ce._events[Ne])?Ce._events[Ne].unshift(Je):Ce._events[Ne]=[Je,Ce._events[Ne]]}function Ae(Ce,Ne){be=be||ae("./_stream_duplex"),Ce=Ce||{};var Je=Ne instanceof be;this.objectMode=!!Ce.objectMode,Je&&(this.objectMode=this.objectMode||!!Ce.readableObjectMode);var rt=Ce.highWaterMark,Be=Ce.readableHighWaterMark,_e=this.objectMode?16:16*1024;rt||rt===0?this.highWaterMark=rt:Je&&(Be||Be===0)?this.highWaterMark=Be:this.highWaterMark=_e,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new pe,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=Ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ce.encoding&&(Le||(Le=ae("string_decoder/").StringDecoder),this.decoder=new Le(Ce.encoding),this.encoding=Ce.encoding)}function Oe(Ce){if(be=be||ae("./_stream_duplex"),!(this instanceof Oe))return new Oe(Ce);this._readableState=new Ae(Ce,this),this.readable=!0,Ce&&(typeof Ce.read=="function"&&(this._read=Ce.read),typeof Ce.destroy=="function"&&(this._destroy=Ce.destroy)),xe.call(this)}Object.defineProperty(Oe.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Ce){this._readableState&&(this._readableState.destroyed=Ce)}}),Oe.prototype.destroy=Se.destroy,Oe.prototype._undestroy=Se.undestroy,Oe.prototype._destroy=function(Ce,Ne){this.push(null),Ne(Ce)},Oe.prototype.push=function(Ce,Ne){var Je=this._readableState,rt;return Je.objectMode?rt=!0:typeof Ce=="string"&&(Ne=Ne||Je.defaultEncoding,Ne!==Je.encoding&&(Ce=fe.from(Ce,Ne),Ne=""),rt=!0),ze(this,Ce,Ne,!1,rt)},Oe.prototype.unshift=function(Ce){return ze(this,Ce,null,!0,!1)};function ze(Ce,Ne,Je,rt,Be){var _e=Ce._readableState;if(Ne===null)_e.reading=!1,gt(Ce,_e);else{var Xe;Be||(Xe=Ye(_e,Ne)),Xe?Ce.emit("error",Xe):_e.objectMode||Ne&&Ne.length>0?(typeof Ne!="string"&&!_e.objectMode&&Object.getPrototypeOf(Ne)!==fe.prototype&&(Ne=ee(Ne)),rt?_e.endEmitted?Ce.emit("error",new Error("stream.unshift() after end event")):He(Ce,_e,Ne,!0):_e.ended?Ce.emit("error",new Error("stream.push() after EOF")):(_e.reading=!1,_e.decoder&&!Je?(Ne=_e.decoder.write(Ne),_e.objectMode||Ne.length!==0?He(Ce,_e,Ne,!1):et(Ce,_e)):He(Ce,_e,Ne,!1))):rt||(_e.reading=!1)}return We(_e)}function He(Ce,Ne,Je,rt){Ne.flowing&&Ne.length===0&&!Ne.sync?(Ce.emit("data",Je),Ce.read(0)):(Ne.length+=Ne.objectMode?1:Je.length,rt?Ne.buffer.unshift(Je):Ne.buffer.push(Je),Ne.needReadable&&Et(Ce)),et(Ce,Ne)}function Ye(Ce,Ne){var Je;return!oe(Ne)&&typeof Ne!="string"&&Ne!==void 0&&!Ce.objectMode&&(Je=new TypeError("Invalid non-string/buffer chunk")),Je}function We(Ce){return!Ce.ended&&(Ce.needReadable||Ce.length<Ce.highWaterMark||Ce.length===0)}Oe.prototype.isPaused=function(){return this._readableState.flowing===!1},Oe.prototype.setEncoding=function(Ce){return Le||(Le=ae("string_decoder/").StringDecoder),this._readableState.decoder=new Le(Ce),this._readableState.encoding=Ce,this};var Ue=8388608;function st(Ce){return Ce>=Ue?Ce=Ue:(Ce--,Ce|=Ce>>>1,Ce|=Ce>>>2,Ce|=Ce>>>4,Ce|=Ce>>>8,Ce|=Ce>>>16,Ce++),Ce}function dt(Ce,Ne){return Ce<=0||Ne.length===0&&Ne.ended?0:Ne.objectMode?1:Ce!==Ce?Ne.flowing&&Ne.length?Ne.buffer.head.data.length:Ne.length:(Ce>Ne.highWaterMark&&(Ne.highWaterMark=st(Ce)),Ce<=Ne.length?Ce:Ne.ended?Ne.length:(Ne.needReadable=!0,0))}Oe.prototype.read=function(Ce){ue("read",Ce),Ce=parseInt(Ce,10);var Ne=this._readableState,Je=Ce;if(Ce!==0&&(Ne.emittedReadable=!1),Ce===0&&Ne.needReadable&&(Ne.length>=Ne.highWaterMark||Ne.ended))return ue("read: emitReadable",Ne.length,Ne.ended),Ne.length===0&&Ne.ended?St(this):Et(this),null;if(Ce=dt(Ce,Ne),Ce===0&&Ne.ended)return Ne.length===0&&St(this),null;var rt=Ne.needReadable;ue("need readable",rt),(Ne.length===0||Ne.length-Ce<Ne.highWaterMark)&&(rt=!0,ue("length less than watermark",rt)),Ne.ended||Ne.reading?(rt=!1,ue("reading or ended",rt)):rt&&(ue("do read"),Ne.reading=!0,Ne.sync=!0,Ne.length===0&&(Ne.needReadable=!0),this._read(Ne.highWaterMark),Ne.sync=!1,Ne.reading||(Ce=dt(Je,Ne)));var Be;return Ce>0?Be=Ct(Ce,Ne):Be=null,Be===null?(Ne.needReadable=!0,Ce=0):Ne.length-=Ce,Ne.length===0&&(Ne.ended||(Ne.needReadable=!0),Je!==Ce&&Ne.ended&&St(this)),Be!==null&&this.emit("data",Be),Be};function gt(Ce,Ne){if(!Ne.ended){if(Ne.decoder){var Je=Ne.decoder.end();Je&&Je.length&&(Ne.buffer.push(Je),Ne.length+=Ne.objectMode?1:Je.length)}Ne.ended=!0,Et(Ce)}}function Et(Ce){var Ne=Ce._readableState;Ne.needReadable=!1,Ne.emittedReadable||(ue("emitReadable",Ne.flowing),Ne.emittedReadable=!0,Ne.sync?Ee.nextTick(Ke,Ce):Ke(Ce))}function Ke(Ce){ue("emit readable"),Ce.emit("readable"),ct(Ce)}function et(Ce,Ne){Ne.readingMore||(Ne.readingMore=!0,Ee.nextTick($e,Ce,Ne))}function $e(Ce,Ne){for(var Je=Ne.length;!Ne.reading&&!Ne.flowing&&!Ne.ended&&Ne.length<Ne.highWaterMark&&(ue("maybeReadMore read 0"),Ce.read(0),Je!==Ne.length);)Je=Ne.length;Ne.readingMore=!1}Oe.prototype._read=function(Ce){this.emit("error",new Error("_read() is not implemented"))},Oe.prototype.pipe=function(Ce,Ne){var Je=this,rt=this._readableState;switch(rt.pipesCount){case 0:rt.pipes=Ce;break;case 1:rt.pipes=[rt.pipes,Ce];break;default:rt.pipes.push(Ce);break}rt.pipesCount+=1,ue("pipe count=%d opts=%j",rt.pipesCount,Ne);var Be=(!Ne||Ne.end!==!1)&&Ce!==me.stdout&&Ce!==me.stderr,_e=Be?lt:$t;rt.endEmitted?Ee.nextTick(_e):Je.once("end",_e),Ce.on("unpipe",Xe);function Xe(On,un){ue("onunpipe"),On===Je&&un&&un.hasUnpiped===!1&&(un.hasUnpiped=!0,zt())}function lt(){ue("onend"),Ce.end()}var Pt=vt(Je);Ce.on("drain",Pt);var kt=!1;function zt(){ue("cleanup"),Ce.removeListener("close",an),Ce.removeListener("finish",sn),Ce.removeListener("drain",Pt),Ce.removeListener("error",ln),Ce.removeListener("unpipe",Xe),Je.removeListener("end",lt),Je.removeListener("end",$t),Je.removeListener("data",Ht),kt=!0,rt.awaitDrain&&(!Ce._writableState||Ce._writableState.needDrain)&&Pt()}var jt=!1;Je.on("data",Ht);function Ht(On){ue("ondata"),jt=!1;var un=Ce.write(On);un===!1&&!jt&&((rt.pipesCount===1&&rt.pipes===Ce||rt.pipesCount>1&&Qe(rt.pipes,Ce)!==-1)&&!kt&&(ue("false write response, pause",Je._readableState.awaitDrain),Je._readableState.awaitDrain++,jt=!0),Je.pause())}function ln(On){ue("onerror",On),$t(),Ce.removeListener("error",ln),ve(Ce,"error")===0&&Ce.emit("error",On)}Fe(Ce,"error",ln);function an(){Ce.removeListener("finish",sn),$t()}Ce.once("close",an);function sn(){ue("onfinish"),Ce.removeListener("close",an),$t()}Ce.once("finish",sn);function $t(){ue("unpipe"),Je.unpipe(Ce)}return Ce.emit("pipe",Je),rt.flowing||(ue("pipe resume"),Je.resume()),Ce};function vt(Ce){return function(){var Ne=Ce._readableState;ue("pipeOnDrain",Ne.awaitDrain),Ne.awaitDrain&&Ne.awaitDrain--,Ne.awaitDrain===0&&ve(Ce,"data")&&(Ne.flowing=!0,ct(Ce))}}Oe.prototype.unpipe=function(Ce){var Ne=this._readableState,Je={hasUnpiped:!1};if(Ne.pipesCount===0)return this;if(Ne.pipesCount===1)return Ce&&Ce!==Ne.pipes?this:(Ce||(Ce=Ne.pipes),Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1,Ce&&Ce.emit("unpipe",this,Je),this);if(!Ce){var rt=Ne.pipes,Be=Ne.pipesCount;Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1;for(var _e=0;_e<Be;_e++)rt[_e].emit("unpipe",this,Je);return this}var Xe=Qe(Ne.pipes,Ce);return Xe===-1?this:(Ne.pipes.splice(Xe,1),Ne.pipesCount-=1,Ne.pipesCount===1&&(Ne.pipes=Ne.pipes[0]),Ce.emit("unpipe",this,Je),this)},Oe.prototype.on=function(Ce,Ne){var Je=xe.prototype.on.call(this,Ce,Ne);if(Ce==="data")this._readableState.flowing!==!1&&this.resume();else if(Ce==="readable"){var rt=this._readableState;!rt.endEmitted&&!rt.readableListening&&(rt.readableListening=rt.needReadable=!0,rt.emittedReadable=!1,rt.reading?rt.length&&Et(this):Ee.nextTick(wt,this))}return Je},Oe.prototype.addListener=Oe.prototype.on;function wt(Ce){ue("readable nexttick read 0"),Ce.read(0)}Oe.prototype.resume=function(){var Ce=this._readableState;return Ce.flowing||(ue("resume"),Ce.flowing=!0,ht(this,Ce)),this};function ht(Ce,Ne){Ne.resumeScheduled||(Ne.resumeScheduled=!0,Ee.nextTick(pt,Ce,Ne))}function pt(Ce,Ne){Ne.reading||(ue("resume read 0"),Ce.read(0)),Ne.resumeScheduled=!1,Ne.awaitDrain=0,Ce.emit("resume"),ct(Ce),Ne.flowing&&!Ne.reading&&Ce.read(0)}Oe.prototype.pause=function(){return ue("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ue("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ct(Ce){var Ne=Ce._readableState;for(ue("flow",Ne.flowing);Ne.flowing&&Ce.read()!==null;);}Oe.prototype.wrap=function(Ce){var Ne=this,Je=this._readableState,rt=!1;Ce.on("end",function(){if(ue("wrapped end"),Je.decoder&&!Je.ended){var Xe=Je.decoder.end();Xe&&Xe.length&&Ne.push(Xe)}Ne.push(null)}),Ce.on("data",function(Xe){if(ue("wrapped data"),Je.decoder&&(Xe=Je.decoder.write(Xe)),!(Je.objectMode&&Xe==null)&&!(!Je.objectMode&&(!Xe||!Xe.length))){var lt=Ne.push(Xe);lt||(rt=!0,Ce.pause())}});for(var Be in Ce)this[Be]===void 0&&typeof Ce[Be]=="function"&&(this[Be]=function(Xe){return function(){return Ce[Xe].apply(Ce,arguments)}}(Be));for(var _e=0;_e<De.length;_e++)Ce.on(De[_e],this.emit.bind(this,De[_e]));return this._read=function(Xe){ue("wrapped _read",Xe),rt&&(rt=!1,Ce.resume())},this},Object.defineProperty(Oe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Oe._fromList=Ct;function Ct(Ce,Ne){if(Ne.length===0)return null;var Je;return Ne.objectMode?Je=Ne.buffer.shift():!Ce||Ce>=Ne.length?(Ne.decoder?Je=Ne.buffer.join(""):Ne.buffer.length===1?Je=Ne.buffer.head.data:Je=Ne.buffer.concat(Ne.length),Ne.buffer.clear()):Je=xt(Ce,Ne.buffer,Ne.decoder),Je}function xt(Ce,Ne,Je){var rt;return Ce<Ne.head.data.length?(rt=Ne.head.data.slice(0,Ce),Ne.head.data=Ne.head.data.slice(Ce)):Ce===Ne.head.data.length?rt=Ne.shift():rt=Je?yt(Ce,Ne):Tt(Ce,Ne),rt}function yt(Ce,Ne){var Je=Ne.head,rt=1,Be=Je.data;for(Ce-=Be.length;Je=Je.next;){var _e=Je.data,Xe=Ce>_e.length?_e.length:Ce;if(Xe===_e.length?Be+=_e:Be+=_e.slice(0,Ce),Ce-=Xe,Ce===0){Xe===_e.length?(++rt,Je.next?Ne.head=Je.next:Ne.head=Ne.tail=null):(Ne.head=Je,Je.data=_e.slice(Xe));break}++rt}return Ne.length-=rt,Be}function Tt(Ce,Ne){var Je=fe.allocUnsafe(Ce),rt=Ne.head,Be=1;for(rt.data.copy(Je),Ce-=rt.data.length;rt=rt.next;){var _e=rt.data,Xe=Ce>_e.length?_e.length:Ce;if(_e.copy(Je,Je.length-Ce,0,Xe),Ce-=Xe,Ce===0){Xe===_e.length?(++Be,rt.next?Ne.head=rt.next:Ne.head=Ne.tail=null):(Ne.head=rt,rt.data=_e.slice(Xe));break}++Be}return Ne.length-=Be,Je}function St(Ce){var Ne=Ce._readableState;if(Ne.length>0)throw new Error('"endReadable()" called on non-empty stream');Ne.endEmitted||(Ne.ended=!0,Ee.nextTick(nt,Ne,Ce))}function nt(Ce,Ne){!Ce.endEmitted&&Ce.length===0&&(Ce.endEmitted=!0,Ne.readable=!1,Ne.emit("end"))}function Qe(Ce,Ne){for(var Je=0,rt=Ce.length;Je<rt;Je++)if(Ce[Je]===Ne)return Je;return-1}}).call(this)}).call(this,ae("_process"),typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(ae,Ge,Ie){"use strict";Ge.exports=we;var me=ae("./_stream_duplex"),de=Object.create(ae("core-util-is"));de.inherits=ae("inherits"),de.inherits(we,me);function Ee(ve,xe){var fe=this._transformState;fe.transforming=!1;var z=fe.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));fe.writechunk=null,fe.writecb=null,xe!=null&&this.push(xe),z(ve);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function we(ve){if(!(this instanceof we))return new we(ve);me.call(this,ve),this._transformState={afterTransform:Ee.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ve&&(typeof ve.transform=="function"&&(this._transform=ve.transform),typeof ve.flush=="function"&&(this._flush=ve.flush)),this.on("prefinish",be)}function be(){var ve=this;typeof this._flush=="function"?this._flush(function(xe,fe){Te(ve,xe,fe)}):Te(this,null,null)}we.prototype.push=function(ve,xe){return this._transformState.needTransform=!1,me.prototype.push.call(this,ve,xe)},we.prototype._transform=function(ve,xe,fe){throw new Error("_transform() is not implemented")},we.prototype._write=function(ve,xe,fe){var z=this._transformState;if(z.writecb=fe,z.writechunk=ve,z.writeencoding=xe,!z.transforming){var ee=this._readableState;(z.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},we.prototype._read=function(ve){var xe=this._transformState;xe.writechunk!==null&&xe.writecb&&!xe.transforming?(xe.transforming=!0,this._transform(xe.writechunk,xe.writeencoding,xe.afterTransform)):xe.needTransform=!0},we.prototype._destroy=function(ve,xe){var fe=this;me.prototype._destroy.call(this,ve,function(z){xe(z),fe.emit("close")})};function Te(ve,xe,fe){if(xe)return ve.emit("error",xe);if(fe!=null&&ve.push(fe),ve._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(ve._transformState.transforming)throw new Error("Calling transform done when still transforming");return ve.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(ae,Ge,Ie){(function(me,de,Ee){(function(){"use strict";var we=ae("process-nextick-args");Ge.exports=Fe;function be(pt,ct,Ct){this.chunk=pt,this.encoding=ct,this.callback=Ct,this.next=null}function Te(pt){var ct=this;this.next=null,this.entry=null,this.finish=function(){ht(ct,pt)}}var ve=!me.browser&&["v0.10","v0.9."].indexOf(me.version.slice(0,5))>-1?Ee:we.nextTick,xe;Fe.WritableState=Le;var fe=Object.create(ae("core-util-is"));fe.inherits=ae("inherits");var z={deprecate:ae("util-deprecate")},ee=ae("./internal/streams/stream"),oe=ae("safe-buffer").Buffer,ie=de.Uint8Array||function(){};function le(pt){return oe.from(pt)}function ue(pt){return oe.isBuffer(pt)||pt instanceof ie}var pe=ae("./internal/streams/destroy");fe.inherits(Fe,ee);function Se(){}function Le(pt,ct){xe=xe||ae("./_stream_duplex"),pt=pt||{};var Ct=ct instanceof xe;this.objectMode=!!pt.objectMode,Ct&&(this.objectMode=this.objectMode||!!pt.writableObjectMode);var xt=pt.highWaterMark,yt=pt.writableHighWaterMark,Tt=this.objectMode?16:16*1024;xt||xt===0?this.highWaterMark=xt:Ct&&(yt||yt===0)?this.highWaterMark=yt:this.highWaterMark=Tt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var St=pt.decodeStrings===!1;this.decodeStrings=!St,this.defaultEncoding=pt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(nt){st(ct,nt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Te(this)}Le.prototype.getBuffer=function(){for(var ct=this.bufferedRequest,Ct=[];ct;)Ct.push(ct),ct=ct.next;return Ct},function(){try{Object.defineProperty(Le.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(pt){}}();var De;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(De=Function.prototype[Symbol.hasInstance],Object.defineProperty(Fe,Symbol.hasInstance,{value:function(pt){return De.call(this,pt)?!0:this!==Fe?!1:pt&&pt._writableState instanceof Le}})):De=function(pt){return pt instanceof this};function Fe(pt){if(xe=xe||ae("./_stream_duplex"),!De.call(Fe,this)&&!(this instanceof xe))return new Fe(pt);this._writableState=new Le(pt,this),this.writable=!0,pt&&(typeof pt.write=="function"&&(this._write=pt.write),typeof pt.writev=="function"&&(this._writev=pt.writev),typeof pt.destroy=="function"&&(this._destroy=pt.destroy),typeof pt.final=="function"&&(this._final=pt.final)),ee.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Ae(pt,ct){var Ct=new Error("write after end");pt.emit("error",Ct),we.nextTick(ct,Ct)}function Oe(pt,ct,Ct,xt){var yt=!0,Tt=!1;return Ct===null?Tt=new TypeError("May not write null values to stream"):typeof Ct!="string"&&Ct!==void 0&&!ct.objectMode&&(Tt=new TypeError("Invalid non-string/buffer chunk")),Tt&&(pt.emit("error",Tt),we.nextTick(xt,Tt),yt=!1),yt}Fe.prototype.write=function(pt,ct,Ct){var xt=this._writableState,yt=!1,Tt=!xt.objectMode&&ue(pt);return Tt&&!oe.isBuffer(pt)&&(pt=le(pt)),typeof ct=="function"&&(Ct=ct,ct=null),Tt?ct="buffer":ct||(ct=xt.defaultEncoding),typeof Ct!="function"&&(Ct=Se),xt.ended?Ae(this,Ct):(Tt||Oe(this,xt,pt,Ct))&&(xt.pendingcb++,yt=He(this,xt,Tt,pt,ct,Ct)),yt},Fe.prototype.cork=function(){var pt=this._writableState;pt.corked++},Fe.prototype.uncork=function(){var pt=this._writableState;pt.corked&&(pt.corked--,!pt.writing&&!pt.corked&&!pt.finished&&!pt.bufferProcessing&&pt.bufferedRequest&&Et(this,pt))},Fe.prototype.setDefaultEncoding=function(ct){if(typeof ct=="string"&&(ct=ct.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ct+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ct);return this._writableState.defaultEncoding=ct,this};function ze(pt,ct,Ct){return!pt.objectMode&&pt.decodeStrings!==!1&&typeof ct=="string"&&(ct=oe.from(ct,Ct)),ct}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function He(pt,ct,Ct,xt,yt,Tt){if(!Ct){var St=ze(ct,xt,yt);xt!==St&&(Ct=!0,yt="buffer",xt=St)}var nt=ct.objectMode?1:xt.length;ct.length+=nt;var Qe=ct.length<ct.highWaterMark;if(Qe||(ct.needDrain=!0),ct.writing||ct.corked){var Ce=ct.lastBufferedRequest;ct.lastBufferedRequest={chunk:xt,encoding:yt,isBuf:Ct,callback:Tt,next:null},Ce?Ce.next=ct.lastBufferedRequest:ct.bufferedRequest=ct.lastBufferedRequest,ct.bufferedRequestCount+=1}else Ye(pt,ct,!1,nt,xt,yt,Tt);return Qe}function Ye(pt,ct,Ct,xt,yt,Tt,St){ct.writelen=xt,ct.writecb=St,ct.writing=!0,ct.sync=!0,Ct?pt._writev(yt,ct.onwrite):pt._write(yt,Tt,ct.onwrite),ct.sync=!1}function We(pt,ct,Ct,xt,yt){--ct.pendingcb,Ct?(we.nextTick(yt,xt),we.nextTick(vt,pt,ct),pt._writableState.errorEmitted=!0,pt.emit("error",xt)):(yt(xt),pt._writableState.errorEmitted=!0,pt.emit("error",xt),vt(pt,ct))}function Ue(pt){pt.writing=!1,pt.writecb=null,pt.length-=pt.writelen,pt.writelen=0}function st(pt,ct){var Ct=pt._writableState,xt=Ct.sync,yt=Ct.writecb;if(Ue(Ct),ct)We(pt,Ct,xt,ct,yt);else{var Tt=Ke(Ct);!Tt&&!Ct.corked&&!Ct.bufferProcessing&&Ct.bufferedRequest&&Et(pt,Ct),xt?ve(dt,pt,Ct,Tt,yt):dt(pt,Ct,Tt,yt)}}function dt(pt,ct,Ct,xt){Ct||gt(pt,ct),ct.pendingcb--,xt(),vt(pt,ct)}function gt(pt,ct){ct.length===0&&ct.needDrain&&(ct.needDrain=!1,pt.emit("drain"))}function Et(pt,ct){ct.bufferProcessing=!0;var Ct=ct.bufferedRequest;if(pt._writev&&Ct&&Ct.next){var xt=ct.bufferedRequestCount,yt=new Array(xt),Tt=ct.corkedRequestsFree;Tt.entry=Ct;for(var St=0,nt=!0;Ct;)yt[St]=Ct,Ct.isBuf||(nt=!1),Ct=Ct.next,St+=1;yt.allBuffers=nt,Ye(pt,ct,!0,ct.length,yt,"",Tt.finish),ct.pendingcb++,ct.lastBufferedRequest=null,Tt.next?(ct.corkedRequestsFree=Tt.next,Tt.next=null):ct.corkedRequestsFree=new Te(ct),ct.bufferedRequestCount=0}else{for(;Ct;){var Qe=Ct.chunk,Ce=Ct.encoding,Ne=Ct.callback,Je=ct.objectMode?1:Qe.length;if(Ye(pt,ct,!1,Je,Qe,Ce,Ne),Ct=Ct.next,ct.bufferedRequestCount--,ct.writing)break}Ct===null&&(ct.lastBufferedRequest=null)}ct.bufferedRequest=Ct,ct.bufferProcessing=!1}Fe.prototype._write=function(pt,ct,Ct){Ct(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(pt,ct,Ct){var xt=this._writableState;typeof pt=="function"?(Ct=pt,pt=null,ct=null):typeof ct=="function"&&(Ct=ct,ct=null),pt!=null&&this.write(pt,ct),xt.corked&&(xt.corked=1,this.uncork()),!xt.ending&&!xt.finished&&wt(this,xt,Ct)};function Ke(pt){return pt.ending&&pt.length===0&&pt.bufferedRequest===null&&!pt.finished&&!pt.writing}function et(pt,ct){pt._final(function(Ct){ct.pendingcb--,Ct&&pt.emit("error",Ct),ct.prefinished=!0,pt.emit("prefinish"),vt(pt,ct)})}function $e(pt,ct){!ct.prefinished&&!ct.finalCalled&&(typeof pt._final=="function"?(ct.pendingcb++,ct.finalCalled=!0,we.nextTick(et,pt,ct)):(ct.prefinished=!0,pt.emit("prefinish")))}function vt(pt,ct){var Ct=Ke(ct);return Ct&&($e(pt,ct),ct.pendingcb===0&&(ct.finished=!0,pt.emit("finish"))),Ct}function wt(pt,ct,Ct){ct.ending=!0,vt(pt,ct),Ct&&(ct.finished?we.nextTick(Ct):pt.once("finish",Ct)),ct.ended=!0,pt.writable=!1}function ht(pt,ct,Ct){var xt=pt.entry;for(pt.entry=null;xt;){var yt=xt.callback;ct.pendingcb--,yt(Ct),xt=xt.next}ct.corkedRequestsFree?ct.corkedRequestsFree.next=pt:ct.corkedRequestsFree=pt}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(pt){this._writableState&&(this._writableState.destroyed=pt)}}),Fe.prototype.destroy=pe.destroy,Fe.prototype._undestroy=pe.undestroy,Fe.prototype._destroy=function(pt,ct){this.end(),ct(pt)}}).call(this)}).call(this,ae("_process"),typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ae("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(ae,Ge,Ie){"use strict";function me(be,Te){if(!(be instanceof Te))throw new TypeError("Cannot call a class as a function")}var de=ae("safe-buffer").Buffer,Ee=ae("util");function we(be,Te,ve){be.copy(Te,ve)}Ge.exports=function(){function be(){me(this,be),this.head=null,this.tail=null,this.length=0}return be.prototype.push=function(ve){var xe={data:ve,next:null};this.length>0?this.tail.next=xe:this.head=xe,this.tail=xe,++this.length},be.prototype.unshift=function(ve){var xe={data:ve,next:this.head};this.length===0&&(this.tail=xe),this.head=xe,++this.length},be.prototype.shift=function(){if(this.length!==0){var ve=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ve}},be.prototype.clear=function(){this.head=this.tail=null,this.length=0},be.prototype.join=function(ve){if(this.length===0)return"";for(var xe=this.head,fe=""+xe.data;xe=xe.next;)fe+=ve+xe.data;return fe},be.prototype.concat=function(ve){if(this.length===0)return de.alloc(0);if(this.length===1)return this.head.data;for(var xe=de.allocUnsafe(ve>>>0),fe=this.head,z=0;fe;)we(fe.data,xe,z),z+=fe.data.length,fe=fe.next;return xe},be}(),Ee&&Ee.inspect&&Ee.inspect.custom&&(Ge.exports.prototype[Ee.inspect.custom]=function(){var be=Ee.inspect({length:this.length});return this.constructor.name+" "+be})},{"safe-buffer":396,util:89}],392:[function(ae,Ge,Ie){"use strict";var me=ae("process-nextick-args");function de(be,Te){var ve=this,xe=this._readableState&&this._readableState.destroyed,fe=this._writableState&&this._writableState.destroyed;return xe||fe?(Te?Te(be):be&&(!this._writableState||!this._writableState.errorEmitted)&&me.nextTick(we,this,be),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(be||null,function(z){!Te&&z?(me.nextTick(we,ve,z),ve._writableState&&(ve._writableState.errorEmitted=!0)):Te&&Te(z)}),this)}function Ee(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function we(be,Te){be.emit("error",Te)}Ge.exports={destroy:de,undestroy:Ee}},{"process-nextick-args":380}],393:[function(ae,Ge,Ie){Ge.exports=ae("events").EventEmitter},{events:344}],394:[function(ae,Ge,Ie){Ie=Ge.exports=ae("./lib/_stream_readable.js"),Ie.Stream=Ie,Ie.Readable=Ie,Ie.Writable=ae("./lib/_stream_writable.js"),Ie.Duplex=ae("./lib/_stream_duplex.js"),Ie.Transform=ae("./lib/_stream_transform.js"),Ie.PassThrough=ae("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(ae,Ge,Ie){var me=function(de){"use strict";var Ee=Object.prototype,we=Ee.hasOwnProperty,be,Te=typeof Symbol=="function"?Symbol:{},ve=Te.iterator||"@@iterator",xe=Te.asyncIterator||"@@asyncIterator",fe=Te.toStringTag||"@@toStringTag";function z($e,vt,wt){return Object.defineProperty($e,vt,{value:wt,enumerable:!0,configurable:!0,writable:!0}),$e[vt]}try{z({},"")}catch($e){z=function(vt,wt,ht){return vt[wt]=ht}}function ee($e,vt,wt,ht){var pt=vt&&vt.prototype instanceof Le?vt:Le,ct=Object.create(pt.prototype),Ct=new Et(ht||[]);return ct._invoke=Ue($e,wt,Ct),ct}de.wrap=ee;function oe($e,vt,wt){try{return{type:"normal",arg:$e.call(vt,wt)}}catch(ht){return{type:"throw",arg:ht}}}var ie="suspendedStart",le="suspendedYield",ue="executing",pe="completed",Se={};function Le(){}function De(){}function Fe(){}var Ae={};z(Ae,ve,function(){return this});var Oe=Object.getPrototypeOf,ze=Oe&&Oe(Oe(Ke([])));ze&&ze!==Ee&&we.call(ze,ve)&&(Ae=ze);var He=Fe.prototype=Le.prototype=Object.create(Ae);De.prototype=Fe,z(He,"constructor",Fe),z(Fe,"constructor",De),De.displayName=z(Fe,fe,"GeneratorFunction");function Ye($e){["next","throw","return"].forEach(function(vt){z($e,vt,function(wt){return this._invoke(vt,wt)})})}de.isGeneratorFunction=function($e){var vt=typeof $e=="function"&&$e.constructor;return vt?vt===De||(vt.displayName||vt.name)==="GeneratorFunction":!1},de.mark=function($e){return Object.setPrototypeOf?Object.setPrototypeOf($e,Fe):($e.__proto__=Fe,z($e,fe,"GeneratorFunction")),$e.prototype=Object.create(He),$e},de.awrap=function($e){return{__await:$e}};function We($e,vt){function wt(ct,Ct,xt,yt){var Tt=oe($e[ct],$e,Ct);if(Tt.type==="throw")yt(Tt.arg);else{var St=Tt.arg,nt=St.value;return nt&&typeof nt=="object"&&we.call(nt,"__await")?vt.resolve(nt.__await).then(function(Qe){wt("next",Qe,xt,yt)},function(Qe){wt("throw",Qe,xt,yt)}):vt.resolve(nt).then(function(Qe){St.value=Qe,xt(St)},function(Qe){return wt("throw",Qe,xt,yt)})}}var ht;function pt(ct,Ct){function xt(){return new vt(function(yt,Tt){wt(ct,Ct,yt,Tt)})}return ht=ht?ht.then(xt,xt):xt()}this._invoke=pt}Ye(We.prototype),z(We.prototype,xe,function(){return this}),de.AsyncIterator=We,de.async=function($e,vt,wt,ht,pt){pt===void 0&&(pt=Promise);var ct=new We(ee($e,vt,wt,ht),pt);return de.isGeneratorFunction(vt)?ct:ct.next().then(function(Ct){return Ct.done?Ct.value:ct.next()})};function Ue($e,vt,wt){var ht=ie;return function(ct,Ct){if(ht===ue)throw new Error("Generator is already running");if(ht===pe){if(ct==="throw")throw Ct;return et()}for(wt.method=ct,wt.arg=Ct;;){var xt=wt.delegate;if(xt){var yt=st(xt,wt);if(yt){if(yt===Se)continue;return yt}}if(wt.method==="next")wt.sent=wt._sent=wt.arg;else if(wt.method==="throw"){if(ht===ie)throw ht=pe,wt.arg;wt.dispatchException(wt.arg)}else wt.method==="return"&&wt.abrupt("return",wt.arg);ht=ue;var Tt=oe($e,vt,wt);if(Tt.type==="normal"){if(ht=wt.done?pe:le,Tt.arg===Se)continue;return{value:Tt.arg,done:wt.done}}else Tt.type==="throw"&&(ht=pe,wt.method="throw",wt.arg=Tt.arg)}}}function st($e,vt){var wt=$e.iterator[vt.method];if(wt===be){if(vt.delegate=null,vt.method==="throw"){if($e.iterator.return&&(vt.method="return",vt.arg=be,st($e,vt),vt.method==="throw"))return Se;vt.method="throw",vt.arg=new TypeError("The iterator does not provide a 'throw' method")}return Se}var ht=oe(wt,$e.iterator,vt.arg);if(ht.type==="throw")return vt.method="throw",vt.arg=ht.arg,vt.delegate=null,Se;var pt=ht.arg;if(!pt)return vt.method="throw",vt.arg=new TypeError("iterator result is not an object"),vt.delegate=null,Se;if(pt.done)vt[$e.resultName]=pt.value,vt.next=$e.nextLoc,vt.method!=="return"&&(vt.method="next",vt.arg=be);else return pt;return vt.delegate=null,Se}Ye(He),z(He,fe,"Generator"),z(He,ve,function(){return this}),z(He,"toString",function(){return"[object Generator]"});function dt($e){var vt={tryLoc:$e[0]};1 in $e&&(vt.catchLoc=$e[1]),2 in $e&&(vt.finallyLoc=$e[2],vt.afterLoc=$e[3]),this.tryEntries.push(vt)}function gt($e){var vt=$e.completion||{};vt.type="normal",delete vt.arg,$e.completion=vt}function Et($e){this.tryEntries=[{tryLoc:"root"}],$e.forEach(dt,this),this.reset(!0)}de.keys=function($e){var vt=[];for(var wt in $e)vt.push(wt);return vt.reverse(),function ht(){for(;vt.length;){var pt=vt.pop();if(pt in $e)return ht.value=pt,ht.done=!1,ht}return ht.done=!0,ht}};function Ke($e){if($e){var vt=$e[ve];if(vt)return vt.call($e);if(typeof $e.next=="function")return $e;if(!isNaN($e.length)){var wt=-1,ht=function pt(){for(;++wt<$e.length;)if(we.call($e,wt))return pt.value=$e[wt],pt.done=!1,pt;return pt.value=be,pt.done=!0,pt};return ht.next=ht}}return{next:et}}de.values=Ke;function et(){return{value:be,done:!0}}return Et.prototype={constructor:Et,reset:function($e){if(this.prev=0,this.next=0,this.sent=this._sent=be,this.done=!1,this.delegate=null,this.method="next",this.arg=be,this.tryEntries.forEach(gt),!$e)for(var vt in this)vt.charAt(0)==="t"&&we.call(this,vt)&&!isNaN(+vt.slice(1))&&(this[vt]=be)},stop:function(){this.done=!0;var $e=this.tryEntries[0],vt=$e.completion;if(vt.type==="throw")throw vt.arg;return this.rval},dispatchException:function($e){if(this.done)throw $e;var vt=this;function wt(yt,Tt){return ct.type="throw",ct.arg=$e,vt.next=yt,Tt&&(vt.method="next",vt.arg=be),!!Tt}for(var ht=this.tryEntries.length-1;ht>=0;--ht){var pt=this.tryEntries[ht],ct=pt.completion;if(pt.tryLoc==="root")return wt("end");if(pt.tryLoc<=this.prev){var Ct=we.call(pt,"catchLoc"),xt=we.call(pt,"finallyLoc");if(Ct&&xt){if(this.prev<pt.catchLoc)return wt(pt.catchLoc,!0);if(this.prev<pt.finallyLoc)return wt(pt.finallyLoc)}else if(Ct){if(this.prev<pt.catchLoc)return wt(pt.catchLoc,!0)}else if(xt){if(this.prev<pt.finallyLoc)return wt(pt.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function($e,vt){for(var wt=this.tryEntries.length-1;wt>=0;--wt){var ht=this.tryEntries[wt];if(ht.tryLoc<=this.prev&&we.call(ht,"finallyLoc")&&this.prev<ht.finallyLoc){var pt=ht;break}}pt&&($e==="break"||$e==="continue")&&pt.tryLoc<=vt&&vt<=pt.finallyLoc&&(pt=null);var ct=pt?pt.completion:{};return ct.type=$e,ct.arg=vt,pt?(this.method="next",this.next=pt.finallyLoc,Se):this.complete(ct)},complete:function($e,vt){if($e.type==="throw")throw $e.arg;return $e.type==="break"||$e.type==="continue"?this.next=$e.arg:$e.type==="return"?(this.rval=this.arg=$e.arg,this.method="return",this.next="end"):$e.type==="normal"&&vt&&(this.next=vt),Se},finish:function($e){for(var vt=this.tryEntries.length-1;vt>=0;--vt){var wt=this.tryEntries[vt];if(wt.finallyLoc===$e)return this.complete(wt.completion,wt.afterLoc),gt(wt),Se}},catch:function($e){for(var vt=this.tryEntries.length-1;vt>=0;--vt){var wt=this.tryEntries[vt];if(wt.tryLoc===$e){var ht=wt.completion;if(ht.type==="throw"){var pt=ht.arg;gt(wt)}return pt}}throw new Error("illegal catch attempt")},delegateYield:function($e,vt,wt){return this.delegate={iterator:Ke($e),resultName:vt,nextLoc:wt},this.method==="next"&&(this.arg=be),Se}},de}(typeof Ge=="object"?Ge.exports:{});try{regeneratorRuntime=me}catch(de){typeof globalThis=="object"?globalThis.regeneratorRuntime=me:Function("r","regeneratorRuntime = r")(me)}},{}],396:[function(ae,Ge,Ie){var me=ae("buffer"),de=me.Buffer;function Ee(be,Te){for(var ve in be)Te[ve]=be[ve]}de.from&&de.alloc&&de.allocUnsafe&&de.allocUnsafeSlow?Ge.exports=me:(Ee(me,Ie),Ie.Buffer=we);function we(be,Te,ve){return de(be,Te,ve)}Ee(de,we),we.from=function(be,Te,ve){if(typeof be=="number")throw new TypeError("Argument must not be a number");return de(be,Te,ve)},we.alloc=function(be,Te,ve){if(typeof be!="number")throw new TypeError("Argument must be a number");var xe=de(be);return Te!==void 0?typeof ve=="string"?xe.fill(Te,ve):xe.fill(Te):xe.fill(0),xe},we.allocUnsafe=function(be){if(typeof be!="number")throw new TypeError("Argument must be a number");return de(be)},we.allocUnsafeSlow=function(be){if(typeof be!="number")throw new TypeError("Argument must be a number");return me.SlowBuffer(be)}},{buffer:90}],397:[function(ae,Ge,Ie){(function(me){(function(){(function(de){de.parser=function(St,nt){return new we(St,nt)},de.SAXParser=we,de.SAXStream=ee,de.createStream=z,de.MAX_BUFFER_LENGTH=64*1024;var Ee=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];de.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function we(St,nt){if(!(this instanceof we))return new we(St,nt);var Qe=this;Te(Qe),Qe.q=Qe.c="",Qe.bufferCheckPosition=de.MAX_BUFFER_LENGTH,Qe.opt=nt||{},Qe.opt.lowercase=Qe.opt.lowercase||Qe.opt.lowercasetags,Qe.looseCase=Qe.opt.lowercase?"toLowerCase":"toUpperCase",Qe.tags=[],Qe.closed=Qe.closedRoot=Qe.sawRoot=!1,Qe.tag=Qe.error=null,Qe.strict=!!St,Qe.noscript=!!(St||Qe.opt.noscript),Qe.state=We.BEGIN,Qe.strictEntities=Qe.opt.strictEntities,Qe.ENTITIES=Qe.strictEntities?Object.create(de.XML_ENTITIES):Object.create(de.ENTITIES),Qe.attribList=[],Qe.opt.xmlns&&(Qe.ns=Object.create(pe)),Qe.trackPosition=Qe.opt.position!==!1,Qe.trackPosition&&(Qe.position=Qe.line=Qe.column=0),st(Qe,"onready")}Object.create||(Object.create=function(St){function nt(){}nt.prototype=St;var Qe=new nt;return Qe}),Object.keys||(Object.keys=function(St){var nt=[];for(var Qe in St)St.hasOwnProperty(Qe)&&nt.push(Qe);return nt});function be(St){for(var nt=Math.max(de.MAX_BUFFER_LENGTH,10),Qe=0,Ce=0,Ne=Ee.length;Ce<Ne;Ce++){var Je=St[Ee[Ce]].length;if(Je>nt)switch(Ee[Ce]){case"textNode":gt(St);break;case"cdata":dt(St,"oncdata",St.cdata),St.cdata="";break;case"script":dt(St,"onscript",St.script),St.script="";break;default:Ke(St,"Max buffer length exceeded: "+Ee[Ce])}Qe=Math.max(Qe,Je)}var rt=de.MAX_BUFFER_LENGTH-Qe;St.bufferCheckPosition=rt+St.position}function Te(St){for(var nt=0,Qe=Ee.length;nt<Qe;nt++)St[Ee[nt]]=""}function ve(St){gt(St),St.cdata!==""&&(dt(St,"oncdata",St.cdata),St.cdata=""),St.script!==""&&(dt(St,"onscript",St.script),St.script="")}we.prototype={end:function(){et(this)},write:Tt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){ve(this)}};var xe;try{xe=ae("stream").Stream}catch(St){xe=function(){}}var fe=de.EVENTS.filter(function(St){return St!=="error"&&St!=="end"});function z(St,nt){return new ee(St,nt)}function ee(St,nt){if(!(this instanceof ee))return new ee(St,nt);xe.apply(this),this._parser=new we(St,nt),this.writable=!0,this.readable=!0;var Qe=this;this._parser.onend=function(){Qe.emit("end")},this._parser.onerror=function(Ce){Qe.emit("error",Ce),Qe._parser.error=null},this._decoder=null,fe.forEach(function(Ce){Object.defineProperty(Qe,"on"+Ce,{get:function(){return Qe._parser["on"+Ce]},set:function(Ne){if(!Ne)return Qe.removeAllListeners(Ce),Qe._parser["on"+Ce]=Ne,Ne;Qe.on(Ce,Ne)},enumerable:!0,configurable:!1})})}ee.prototype=Object.create(xe.prototype,{constructor:{value:ee}}),ee.prototype.write=function(St){if(typeof me=="function"&&typeof me.isBuffer=="function"&&me.isBuffer(St)){if(!this._decoder){var nt=ae("string_decoder").StringDecoder;this._decoder=new nt("utf8")}St=this._decoder.write(St)}return this._parser.write(St.toString()),this.emit("data",St),!0},ee.prototype.end=function(St){return St&&St.length&&this.write(St),this._parser.end(),!0},ee.prototype.on=function(St,nt){var Qe=this;return!Qe._parser["on"+St]&&fe.indexOf(St)!==-1&&(Qe._parser["on"+St]=function(){var Ce=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Ce.splice(0,0,St),Qe.emit.apply(Qe,Ce)}),xe.prototype.on.call(Qe,St,nt)};var oe="[CDATA[",ie="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",pe={xml:le,xmlns:ue},Se=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Le=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,De=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Fe=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function Ae(St){return St===" "||St===`
`||St==="\r"||St===" "}function Oe(St){return St==='"'||St==="'"}function ze(St){return St===">"||Ae(St)}function He(St,nt){return St.test(nt)}function Ye(St,nt){return!He(St,nt)}var We=0;de.STATE={BEGIN:We++,BEGIN_WHITESPACE:We++,TEXT:We++,TEXT_ENTITY:We++,OPEN_WAKA:We++,SGML_DECL:We++,SGML_DECL_QUOTED:We++,DOCTYPE:We++,DOCTYPE_QUOTED:We++,DOCTYPE_DTD:We++,DOCTYPE_DTD_QUOTED:We++,COMMENT_STARTING:We++,COMMENT:We++,COMMENT_ENDING:We++,COMMENT_ENDED:We++,CDATA:We++,CDATA_ENDING:We++,CDATA_ENDING_2:We++,PROC_INST:We++,PROC_INST_BODY:We++,PROC_INST_ENDING:We++,OPEN_TAG:We++,OPEN_TAG_SLASH:We++,ATTRIB:We++,ATTRIB_NAME:We++,ATTRIB_NAME_SAW_WHITE:We++,ATTRIB_VALUE:We++,ATTRIB_VALUE_QUOTED:We++,ATTRIB_VALUE_CLOSED:We++,ATTRIB_VALUE_UNQUOTED:We++,ATTRIB_VALUE_ENTITY_Q:We++,ATTRIB_VALUE_ENTITY_U:We++,CLOSE_TAG:We++,CLOSE_TAG_SAW_WHITE:We++,SCRIPT:We++,SCRIPT_ENDING:We++},de.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},de.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(de.ENTITIES).forEach(function(St){var nt=de.ENTITIES[St],Qe=typeof nt=="number"?String.fromCharCode(nt):nt;de.ENTITIES[St]=Qe});for(var Ue in de.STATE)de.STATE[de.STATE[Ue]]=Ue;We=de.STATE;function st(St,nt,Qe){St[nt]&&St[nt](Qe)}function dt(St,nt,Qe){St.textNode&&gt(St),st(St,nt,Qe)}function gt(St){St.textNode=Et(St.opt,St.textNode),St.textNode&&st(St,"ontext",St.textNode),St.textNode=""}function Et(St,nt){return St.trim&&(nt=nt.trim()),St.normalize&&(nt=nt.replace(/\s+/g," ")),nt}function Ke(St,nt){return gt(St),St.trackPosition&&(nt+=`
Line: `+St.line+`
Column: `+St.column+`
Char: `+St.c),nt=new Error(nt),St.error=nt,st(St,"onerror",nt),St}function et(St){return St.sawRoot&&!St.closedRoot&&$e(St,"Unclosed root tag"),St.state!==We.BEGIN&&St.state!==We.BEGIN_WHITESPACE&&St.state!==We.TEXT&&Ke(St,"Unexpected end"),gt(St),St.c="",St.closed=!0,st(St,"onend"),we.call(St,St.strict,St.opt),St}function $e(St,nt){if(typeof St!="object"||!(St instanceof we))throw new Error("bad call to strictFail");St.strict&&Ke(St,nt)}function vt(St){St.strict||(St.tagName=St.tagName[St.looseCase]());var nt=St.tags[St.tags.length-1]||St,Qe=St.tag={name:St.tagName,attributes:{}};St.opt.xmlns&&(Qe.ns=nt.ns),St.attribList.length=0,dt(St,"onopentagstart",Qe)}function wt(St,nt){var Qe=St.indexOf(":"),Ce=Qe<0?["",St]:St.split(":"),Ne=Ce[0],Je=Ce[1];return nt&&St==="xmlns"&&(Ne="xmlns",Je=""),{prefix:Ne,local:Je}}function ht(St){if(St.strict||(St.attribName=St.attribName[St.looseCase]()),St.attribList.indexOf(St.attribName)!==-1||St.tag.attributes.hasOwnProperty(St.attribName)){St.attribName=St.attribValue="";return}if(St.opt.xmlns){var nt=wt(St.attribName,!0),Qe=nt.prefix,Ce=nt.local;if(Qe==="xmlns")if(Ce==="xml"&&St.attribValue!==le)$e(St,"xml: prefix must be bound to "+le+`
Actual: `+St.attribValue);else if(Ce==="xmlns"&&St.attribValue!==ue)$e(St,"xmlns: prefix must be bound to "+ue+`
Actual: `+St.attribValue);else{var Ne=St.tag,Je=St.tags[St.tags.length-1]||St;Ne.ns===Je.ns&&(Ne.ns=Object.create(Je.ns)),Ne.ns[Ce]=St.attribValue}St.attribList.push([St.attribName,St.attribValue])}else St.tag.attributes[St.attribName]=St.attribValue,dt(St,"onattribute",{name:St.attribName,value:St.attribValue});St.attribName=St.attribValue=""}function pt(St,nt){if(St.opt.xmlns){var Qe=St.tag,Ce=wt(St.tagName);Qe.prefix=Ce.prefix,Qe.local=Ce.local,Qe.uri=Qe.ns[Ce.prefix]||"",Qe.prefix&&!Qe.uri&&($e(St,"Unbound namespace prefix: "+JSON.stringify(St.tagName)),Qe.uri=Ce.prefix);var Ne=St.tags[St.tags.length-1]||St;Qe.ns&&Ne.ns!==Qe.ns&&Object.keys(Qe.ns).forEach(function(Ht){dt(St,"onopennamespace",{prefix:Ht,uri:Qe.ns[Ht]})});for(var Je=0,rt=St.attribList.length;Je<rt;Je++){var Be=St.attribList[Je],_e=Be[0],Xe=Be[1],lt=wt(_e,!0),Pt=lt.prefix,kt=lt.local,zt=Pt===""?"":Qe.ns[Pt]||"",jt={name:_e,value:Xe,prefix:Pt,local:kt,uri:zt};Pt&&Pt!=="xmlns"&&!zt&&($e(St,"Unbound namespace prefix: "+JSON.stringify(Pt)),jt.uri=Pt),St.tag.attributes[_e]=jt,dt(St,"onattribute",jt)}St.attribList.length=0}St.tag.isSelfClosing=!!nt,St.sawRoot=!0,St.tags.push(St.tag),dt(St,"onopentag",St.tag),nt||(!St.noscript&&St.tagName.toLowerCase()==="script"?St.state=We.SCRIPT:St.state=We.TEXT,St.tag=null,St.tagName=""),St.attribName=St.attribValue="",St.attribList.length=0}function ct(St){if(!St.tagName){$e(St,"Weird empty close tag."),St.textNode+="</>",St.state=We.TEXT;return}if(St.script){if(St.tagName!=="script"){St.script+="</"+St.tagName+">",St.tagName="",St.state=We.SCRIPT;return}dt(St,"onscript",St.script),St.script=""}var nt=St.tags.length,Qe=St.tagName;St.strict||(Qe=Qe[St.looseCase]());for(var Ce=Qe;nt--;){var Ne=St.tags[nt];if(Ne.name!==Ce)$e(St,"Unexpected close tag");else break}if(nt<0){$e(St,"Unmatched closing tag: "+St.tagName),St.textNode+="</"+St.tagName+">",St.state=We.TEXT;return}St.tagName=Qe;for(var Je=St.tags.length;Je-- >nt;){var rt=St.tag=St.tags.pop();St.tagName=St.tag.name,dt(St,"onclosetag",St.tagName);var Be={};for(var _e in rt.ns)Be[_e]=rt.ns[_e];var Xe=St.tags[St.tags.length-1]||St;St.opt.xmlns&&rt.ns!==Xe.ns&&Object.keys(rt.ns).forEach(function(lt){var Pt=rt.ns[lt];dt(St,"onclosenamespace",{prefix:lt,uri:Pt})})}nt===0&&(St.closedRoot=!0),St.tagName=St.attribValue=St.attribName="",St.attribList.length=0,St.state=We.TEXT}function Ct(St){var nt=St.entity,Qe=nt.toLowerCase(),Ce,Ne="";return St.ENTITIES[nt]?St.ENTITIES[nt]:St.ENTITIES[Qe]?St.ENTITIES[Qe]:(nt=Qe,nt.charAt(0)==="#"&&(nt.charAt(1)==="x"?(nt=nt.slice(2),Ce=parseInt(nt,16),Ne=Ce.toString(16)):(nt=nt.slice(1),Ce=parseInt(nt,10),Ne=Ce.toString(10))),nt=nt.replace(/^0+/,""),isNaN(Ce)||Ne.toLowerCase()!==nt?($e(St,"Invalid character entity"),"&"+St.entity+";"):String.fromCodePoint(Ce))}function xt(St,nt){nt==="<"?(St.state=We.OPEN_WAKA,St.startTagPosition=St.position):Ae(nt)||($e(St,"Non-whitespace before first tag."),St.textNode=nt,St.state=We.TEXT)}function yt(St,nt){var Qe="";return nt<St.length&&(Qe=St.charAt(nt)),Qe}function Tt(St){var nt=this;if(this.error)throw this.error;if(nt.closed)return Ke(nt,"Cannot write after close. Assign an onready handler.");if(St===null)return et(nt);typeof St=="object"&&(St=St.toString());for(var Qe=0,Ce="";Ce=yt(St,Qe++),nt.c=Ce,!!Ce;)switch(nt.trackPosition&&(nt.position++,Ce===`
`?(nt.line++,nt.column=0):nt.column++),nt.state){case We.BEGIN:if(nt.state=We.BEGIN_WHITESPACE,Ce==="\uFEFF")continue;xt(nt,Ce);continue;case We.BEGIN_WHITESPACE:xt(nt,Ce);continue;case We.TEXT:if(nt.sawRoot&&!nt.closedRoot){for(var Ne=Qe-1;Ce&&Ce!=="<"&&Ce!=="&";)Ce=yt(St,Qe++),Ce&&nt.trackPosition&&(nt.position++,Ce===`
`?(nt.line++,nt.column=0):nt.column++);nt.textNode+=St.substring(Ne,Qe-1)}Ce==="<"&&!(nt.sawRoot&&nt.closedRoot&&!nt.strict)?(nt.state=We.OPEN_WAKA,nt.startTagPosition=nt.position):(!Ae(Ce)&&(!nt.sawRoot||nt.closedRoot)&&$e(nt,"Text data outside of root node."),Ce==="&"?nt.state=We.TEXT_ENTITY:nt.textNode+=Ce);continue;case We.SCRIPT:Ce==="<"?nt.state=We.SCRIPT_ENDING:nt.script+=Ce;continue;case We.SCRIPT_ENDING:Ce==="/"?nt.state=We.CLOSE_TAG:(nt.script+="<"+Ce,nt.state=We.SCRIPT);continue;case We.OPEN_WAKA:if(Ce==="!")nt.state=We.SGML_DECL,nt.sgmlDecl="";else if(!Ae(Ce))if(He(Se,Ce))nt.state=We.OPEN_TAG,nt.tagName=Ce;else if(Ce==="/")nt.state=We.CLOSE_TAG,nt.tagName="";else if(Ce==="?")nt.state=We.PROC_INST,nt.procInstName=nt.procInstBody="";else{if($e(nt,"Unencoded <"),nt.startTagPosition+1<nt.position){var Je=nt.position-nt.startTagPosition;Ce=new Array(Je).join(" ")+Ce}nt.textNode+="<"+Ce,nt.state=We.TEXT}continue;case We.SGML_DECL:(nt.sgmlDecl+Ce).toUpperCase()===oe?(dt(nt,"onopencdata"),nt.state=We.CDATA,nt.sgmlDecl="",nt.cdata=""):nt.sgmlDecl+Ce==="--"?(nt.state=We.COMMENT,nt.comment="",nt.sgmlDecl=""):(nt.sgmlDecl+Ce).toUpperCase()===ie?(nt.state=We.DOCTYPE,(nt.doctype||nt.sawRoot)&&$e(nt,"Inappropriately located doctype declaration"),nt.doctype="",nt.sgmlDecl=""):Ce===">"?(dt(nt,"onsgmldeclaration",nt.sgmlDecl),nt.sgmlDecl="",nt.state=We.TEXT):(Oe(Ce)&&(nt.state=We.SGML_DECL_QUOTED),nt.sgmlDecl+=Ce);continue;case We.SGML_DECL_QUOTED:Ce===nt.q&&(nt.state=We.SGML_DECL,nt.q=""),nt.sgmlDecl+=Ce;continue;case We.DOCTYPE:Ce===">"?(nt.state=We.TEXT,dt(nt,"ondoctype",nt.doctype),nt.doctype=!0):(nt.doctype+=Ce,Ce==="["?nt.state=We.DOCTYPE_DTD:Oe(Ce)&&(nt.state=We.DOCTYPE_QUOTED,nt.q=Ce));continue;case We.DOCTYPE_QUOTED:nt.doctype+=Ce,Ce===nt.q&&(nt.q="",nt.state=We.DOCTYPE);continue;case We.DOCTYPE_DTD:nt.doctype+=Ce,Ce==="]"?nt.state=We.DOCTYPE:Oe(Ce)&&(nt.state=We.DOCTYPE_DTD_QUOTED,nt.q=Ce);continue;case We.DOCTYPE_DTD_QUOTED:nt.doctype+=Ce,Ce===nt.q&&(nt.state=We.DOCTYPE_DTD,nt.q="");continue;case We.COMMENT:Ce==="-"?nt.state=We.COMMENT_ENDING:nt.comment+=Ce;continue;case We.COMMENT_ENDING:Ce==="-"?(nt.state=We.COMMENT_ENDED,nt.comment=Et(nt.opt,nt.comment),nt.comment&&dt(nt,"oncomment",nt.comment),nt.comment=""):(nt.comment+="-"+Ce,nt.state=We.COMMENT);continue;case We.COMMENT_ENDED:Ce!==">"?($e(nt,"Malformed comment"),nt.comment+="--"+Ce,nt.state=We.COMMENT):nt.state=We.TEXT;continue;case We.CDATA:Ce==="]"?nt.state=We.CDATA_ENDING:nt.cdata+=Ce;continue;case We.CDATA_ENDING:Ce==="]"?nt.state=We.CDATA_ENDING_2:(nt.cdata+="]"+Ce,nt.state=We.CDATA);continue;case We.CDATA_ENDING_2:Ce===">"?(nt.cdata&&dt(nt,"oncdata",nt.cdata),dt(nt,"onclosecdata"),nt.cdata="",nt.state=We.TEXT):Ce==="]"?nt.cdata+="]":(nt.cdata+="]]"+Ce,nt.state=We.CDATA);continue;case We.PROC_INST:Ce==="?"?nt.state=We.PROC_INST_ENDING:Ae(Ce)?nt.state=We.PROC_INST_BODY:nt.procInstName+=Ce;continue;case We.PROC_INST_BODY:if(!nt.procInstBody&&Ae(Ce))continue;Ce==="?"?nt.state=We.PROC_INST_ENDING:nt.procInstBody+=Ce;continue;case We.PROC_INST_ENDING:Ce===">"?(dt(nt,"onprocessinginstruction",{name:nt.procInstName,body:nt.procInstBody}),nt.procInstName=nt.procInstBody="",nt.state=We.TEXT):(nt.procInstBody+="?"+Ce,nt.state=We.PROC_INST_BODY);continue;case We.OPEN_TAG:He(Le,Ce)?nt.tagName+=Ce:(vt(nt),Ce===">"?pt(nt):Ce==="/"?nt.state=We.OPEN_TAG_SLASH:(Ae(Ce)||$e(nt,"Invalid character in tag name"),nt.state=We.ATTRIB));continue;case We.OPEN_TAG_SLASH:Ce===">"?(pt(nt,!0),ct(nt)):($e(nt,"Forward-slash in opening tag not followed by >"),nt.state=We.ATTRIB);continue;case We.ATTRIB:if(Ae(Ce))continue;Ce===">"?pt(nt):Ce==="/"?nt.state=We.OPEN_TAG_SLASH:He(Se,Ce)?(nt.attribName=Ce,nt.attribValue="",nt.state=We.ATTRIB_NAME):$e(nt,"Invalid attribute name");continue;case We.ATTRIB_NAME:Ce==="="?nt.state=We.ATTRIB_VALUE:Ce===">"?($e(nt,"Attribute without value"),nt.attribValue=nt.attribName,ht(nt),pt(nt)):Ae(Ce)?nt.state=We.ATTRIB_NAME_SAW_WHITE:He(Le,Ce)?nt.attribName+=Ce:$e(nt,"Invalid attribute name");continue;case We.ATTRIB_NAME_SAW_WHITE:if(Ce==="=")nt.state=We.ATTRIB_VALUE;else{if(Ae(Ce))continue;$e(nt,"Attribute without value"),nt.tag.attributes[nt.attribName]="",nt.attribValue="",dt(nt,"onattribute",{name:nt.attribName,value:""}),nt.attribName="",Ce===">"?pt(nt):He(Se,Ce)?(nt.attribName=Ce,nt.state=We.ATTRIB_NAME):($e(nt,"Invalid attribute name"),nt.state=We.ATTRIB)}continue;case We.ATTRIB_VALUE:if(Ae(Ce))continue;Oe(Ce)?(nt.q=Ce,nt.state=We.ATTRIB_VALUE_QUOTED):($e(nt,"Unquoted attribute value"),nt.state=We.ATTRIB_VALUE_UNQUOTED,nt.attribValue=Ce);continue;case We.ATTRIB_VALUE_QUOTED:if(Ce!==nt.q){Ce==="&"?nt.state=We.ATTRIB_VALUE_ENTITY_Q:nt.attribValue+=Ce;continue}ht(nt),nt.q="",nt.state=We.ATTRIB_VALUE_CLOSED;continue;case We.ATTRIB_VALUE_CLOSED:Ae(Ce)?nt.state=We.ATTRIB:Ce===">"?pt(nt):Ce==="/"?nt.state=We.OPEN_TAG_SLASH:He(Se,Ce)?($e(nt,"No whitespace between attributes"),nt.attribName=Ce,nt.attribValue="",nt.state=We.ATTRIB_NAME):$e(nt,"Invalid attribute name");continue;case We.ATTRIB_VALUE_UNQUOTED:if(!ze(Ce)){Ce==="&"?nt.state=We.ATTRIB_VALUE_ENTITY_U:nt.attribValue+=Ce;continue}ht(nt),Ce===">"?pt(nt):nt.state=We.ATTRIB;continue;case We.CLOSE_TAG:if(nt.tagName)Ce===">"?ct(nt):He(Le,Ce)?nt.tagName+=Ce:nt.script?(nt.script+="</"+nt.tagName,nt.tagName="",nt.state=We.SCRIPT):(Ae(Ce)||$e(nt,"Invalid tagname in closing tag"),nt.state=We.CLOSE_TAG_SAW_WHITE);else{if(Ae(Ce))continue;Ye(Se,Ce)?nt.script?(nt.script+="</"+Ce,nt.state=We.SCRIPT):$e(nt,"Invalid tagname in closing tag."):nt.tagName=Ce}continue;case We.CLOSE_TAG_SAW_WHITE:if(Ae(Ce))continue;Ce===">"?ct(nt):$e(nt,"Invalid characters in closing tag");continue;case We.TEXT_ENTITY:case We.ATTRIB_VALUE_ENTITY_Q:case We.ATTRIB_VALUE_ENTITY_U:var rt,Be;switch(nt.state){case We.TEXT_ENTITY:rt=We.TEXT,Be="textNode";break;case We.ATTRIB_VALUE_ENTITY_Q:rt=We.ATTRIB_VALUE_QUOTED,Be="attribValue";break;case We.ATTRIB_VALUE_ENTITY_U:rt=We.ATTRIB_VALUE_UNQUOTED,Be="attribValue";break}Ce===";"?(nt[Be]+=Ct(nt),nt.entity="",nt.state=rt):He(nt.entity.length?Fe:De,Ce)?nt.entity+=Ce:($e(nt,"Invalid character in entity name"),nt[Be]+="&"+nt.entity+Ce,nt.entity="",nt.state=rt);continue;default:throw new Error(nt,"Unknown state: "+nt.state)}return nt.position>=nt.bufferCheckPosition&&be(nt),nt}String.fromCodePoint||function(){var St=String.fromCharCode,nt=Math.floor,Qe=function(){var Ce=16384,Ne=[],Je,rt,Be=-1,_e=arguments.length;if(!_e)return"";for(var Xe="";++Be<_e;){var lt=Number(arguments[Be]);if(!isFinite(lt)||lt<0||lt>1114111||nt(lt)!==lt)throw RangeError("Invalid code point: "+lt);lt<=65535?Ne.push(lt):(lt-=65536,Je=(lt>>10)+55296,rt=lt%1024+56320,Ne.push(Je,rt)),(Be+1===_e||Ne.length>Ce)&&(Xe+=St.apply(null,Ne),Ne.length=0)}return Xe};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Qe,configurable:!0,writable:!0}):String.fromCodePoint=Qe}()})(typeof Ie=="undefined"?this.sax={}:Ie)}).call(this)}).call(this,ae("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(ae,Ge,Ie){Ge.exports=Ee;var me=ae("events").EventEmitter,de=ae("inherits");de(Ee,me),Ee.Readable=ae("readable-stream/lib/_stream_readable.js"),Ee.Writable=ae("readable-stream/lib/_stream_writable.js"),Ee.Duplex=ae("readable-stream/lib/_stream_duplex.js"),Ee.Transform=ae("readable-stream/lib/_stream_transform.js"),Ee.PassThrough=ae("readable-stream/lib/_stream_passthrough.js"),Ee.finished=ae("readable-stream/lib/internal/streams/end-of-stream.js"),Ee.pipeline=ae("readable-stream/lib/internal/streams/pipeline.js"),Ee.Stream=Ee;function Ee(){me.call(this)}Ee.prototype.pipe=function(we,be){var Te=this;function ve(le){we.writable&&we.write(le)===!1&&Te.pause&&Te.pause()}Te.on("data",ve);function xe(){Te.readable&&Te.resume&&Te.resume()}we.on("drain",xe),!we._isStdio&&(!be||be.end!==!1)&&(Te.on("end",z),Te.on("close",ee));var fe=!1;function z(){fe||(fe=!0,we.end())}function ee(){fe||(fe=!0,typeof we.destroy=="function"&&we.destroy())}function oe(le){if(ie(),me.listenerCount(this,"error")===0)throw le}Te.on("error",oe),we.on("error",oe);function ie(){Te.removeListener("data",ve),we.removeListener("drain",xe),Te.removeListener("end",z),Te.removeListener("close",ee),Te.removeListener("error",oe),we.removeListener("error",oe),Te.removeListener("end",ie),Te.removeListener("close",ie),we.removeListener("close",ie)}return Te.on("end",ie),Te.on("close",ie),we.on("close",ie),we.emit("pipe",Te),we}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(ae,Ge,Ie){"use strict";function me(xe,fe){xe.prototype=Object.create(fe.prototype),xe.prototype.constructor=xe,xe.__proto__=fe}var de={};function Ee(xe,fe,z){z||(z=Error);function ee(ie,le,ue){return typeof fe=="string"?fe:fe(ie,le,ue)}var oe=function(ie){me(le,ie);function le(ue,pe,Se){return ie.call(this,ee(ue,pe,Se))||this}return le}(z);oe.prototype.name=z.name,oe.prototype.code=xe,de[xe]=oe}function we(xe,fe){if(Array.isArray(xe)){var z=xe.length;return xe=xe.map(function(ee){return String(ee)}),z>2?"one of ".concat(fe," ").concat(xe.slice(0,z-1).join(", "),", or ")+xe[z-1]:z===2?"one of ".concat(fe," ").concat(xe[0]," or ").concat(xe[1]):"of ".concat(fe," ").concat(xe[0])}else return"of ".concat(fe," ").concat(String(xe))}function be(xe,fe,z){return xe.substr(!z||z<0?0:+z,fe.length)===fe}function Te(xe,fe,z){return(z===void 0||z>xe.length)&&(z=xe.length),xe.substring(z-fe.length,z)===fe}function ve(xe,fe,z){return typeof z!="number"&&(z=0),z+fe.length>xe.length?!1:xe.indexOf(fe,z)!==-1}Ee("ERR_INVALID_OPT_VALUE",function(xe,fe){return'The value "'+fe+'" is invalid for option "'+xe+'"'},TypeError),Ee("ERR_INVALID_ARG_TYPE",function(xe,fe,z){var ee;typeof fe=="string"&&be(fe,"not ")?(ee="must not be",fe=fe.replace(/^not /,"")):ee="must be";var oe;if(Te(xe," argument"))oe="The ".concat(xe," ").concat(ee," ").concat(we(fe,"type"));else{var ie=ve(xe,".")?"property":"argument";oe='The "'.concat(xe,'" ').concat(ie," ").concat(ee," ").concat(we(fe,"type"))}return oe+=". Received type ".concat(typeof z),oe},TypeError),Ee("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Ee("ERR_METHOD_NOT_IMPLEMENTED",function(xe){return"The "+xe+" method is not implemented"}),Ee("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Ee("ERR_STREAM_DESTROYED",function(xe){return"Cannot call "+xe+" after a stream was destroyed"}),Ee("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Ee("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Ee("ERR_STREAM_WRITE_AFTER_END","write after end"),Ee("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Ee("ERR_UNKNOWN_ENCODING",function(xe){return"Unknown encoding: "+xe},TypeError),Ee("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ge.exports.codes=de},{}],400:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=Object.keys||function(ee){var oe=[];for(var ie in ee)oe.push(ie);return oe};Ge.exports=xe;var Ee=ae("./_stream_readable"),we=ae("./_stream_writable");ae("inherits")(xe,Ee);for(var be=de(we.prototype),Te=0;Te<be.length;Te++){var ve=be[Te];xe.prototype[ve]||(xe.prototype[ve]=we.prototype[ve])}function xe(ee){if(!(this instanceof xe))return new xe(ee);Ee.call(this,ee),we.call(this,ee),this.allowHalfOpen=!0,ee&&(ee.readable===!1&&(this.readable=!1),ee.writable===!1&&(this.writable=!1),ee.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",fe)))}Object.defineProperty(xe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(xe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(xe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function fe(){this._writableState.ended||me.nextTick(z,this)}function z(ee){ee.end()}Object.defineProperty(xe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(oe){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=oe,this._writableState.destroyed=oe)}})}).call(this)}).call(this,ae("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(ae,Ge,Ie){"use strict";Ge.exports=de;var me=ae("./_stream_transform");ae("inherits")(de,me);function de(Ee){if(!(this instanceof de))return new de(Ee);me.call(this,Ee)}de.prototype._transform=function(Ee,we,be){be(null,Ee)}},{"./_stream_transform":403,inherits:364}],402:[function(ae,Ge,Ie){(function(me,de){(function(){"use strict";Ge.exports=dt;var Ee;dt.ReadableState=st;var we=ae("events").EventEmitter,be=function(_e,Xe){return _e.listeners(Xe).length},Te=ae("./internal/streams/stream"),ve=ae("buffer").Buffer,xe=(typeof de!="undefined"?de:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function fe(Be){return ve.from(Be)}function z(Be){return ve.isBuffer(Be)||Be instanceof xe}var ee=ae("util"),oe;ee&&ee.debuglog?oe=ee.debuglog("stream"):oe=function(){};var ie=ae("./internal/streams/buffer_list"),le=ae("./internal/streams/destroy"),ue=ae("./internal/streams/state"),pe=ue.getHighWaterMark,Se=ae("../errors").codes,Le=Se.ERR_INVALID_ARG_TYPE,De=Se.ERR_STREAM_PUSH_AFTER_EOF,Fe=Se.ERR_METHOD_NOT_IMPLEMENTED,Ae=Se.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Oe,ze,He;ae("inherits")(dt,Te);var Ye=le.errorOrDestroy,We=["error","close","destroy","pause","resume"];function Ue(Be,_e,Xe){if(typeof Be.prependListener=="function")return Be.prependListener(_e,Xe);!Be._events||!Be._events[_e]?Be.on(_e,Xe):Array.isArray(Be._events[_e])?Be._events[_e].unshift(Xe):Be._events[_e]=[Xe,Be._events[_e]]}function st(Be,_e,Xe){Ee=Ee||ae("./_stream_duplex"),Be=Be||{},typeof Xe!="boolean"&&(Xe=_e instanceof Ee),this.objectMode=!!Be.objectMode,Xe&&(this.objectMode=this.objectMode||!!Be.readableObjectMode),this.highWaterMark=pe(this,Be,"readableHighWaterMark",Xe),this.buffer=new ie,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Be.emitClose!==!1,this.autoDestroy=!!Be.autoDestroy,this.destroyed=!1,this.defaultEncoding=Be.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Be.encoding&&(Oe||(Oe=ae("string_decoder/").StringDecoder),this.decoder=new Oe(Be.encoding),this.encoding=Be.encoding)}function dt(Be){if(Ee=Ee||ae("./_stream_duplex"),!(this instanceof dt))return new dt(Be);var _e=this instanceof Ee;this._readableState=new st(Be,this,_e),this.readable=!0,Be&&(typeof Be.read=="function"&&(this._read=Be.read),typeof Be.destroy=="function"&&(this._destroy=Be.destroy)),Te.call(this)}Object.defineProperty(dt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(_e){this._readableState&&(this._readableState.destroyed=_e)}}),dt.prototype.destroy=le.destroy,dt.prototype._undestroy=le.undestroy,dt.prototype._destroy=function(Be,_e){_e(Be)},dt.prototype.push=function(Be,_e){var Xe=this._readableState,lt;return Xe.objectMode?lt=!0:typeof Be=="string"&&(_e=_e||Xe.defaultEncoding,_e!==Xe.encoding&&(Be=ve.from(Be,_e),_e=""),lt=!0),gt(this,Be,_e,!1,lt)},dt.prototype.unshift=function(Be){return gt(this,Be,null,!0,!1)};function gt(Be,_e,Xe,lt,Pt){oe("readableAddChunk",_e);var kt=Be._readableState;if(_e===null)kt.reading=!1,wt(Be,kt);else{var zt;if(Pt||(zt=Ke(kt,_e)),zt)Ye(Be,zt);else if(kt.objectMode||_e&&_e.length>0)if(typeof _e!="string"&&!kt.objectMode&&Object.getPrototypeOf(_e)!==ve.prototype&&(_e=fe(_e)),lt)kt.endEmitted?Ye(Be,new Ae):Et(Be,kt,_e,!0);else if(kt.ended)Ye(Be,new De);else{if(kt.destroyed)return!1;kt.reading=!1,kt.decoder&&!Xe?(_e=kt.decoder.write(_e),kt.objectMode||_e.length!==0?Et(Be,kt,_e,!1):ct(Be,kt)):Et(Be,kt,_e,!1)}else lt||(kt.reading=!1,ct(Be,kt))}return!kt.ended&&(kt.length<kt.highWaterMark||kt.length===0)}function Et(Be,_e,Xe,lt){_e.flowing&&_e.length===0&&!_e.sync?(_e.awaitDrain=0,Be.emit("data",Xe)):(_e.length+=_e.objectMode?1:Xe.length,lt?_e.buffer.unshift(Xe):_e.buffer.push(Xe),_e.needReadable&&ht(Be)),ct(Be,_e)}function Ke(Be,_e){var Xe;return!z(_e)&&typeof _e!="string"&&_e!==void 0&&!Be.objectMode&&(Xe=new Le("chunk",["string","Buffer","Uint8Array"],_e)),Xe}dt.prototype.isPaused=function(){return this._readableState.flowing===!1},dt.prototype.setEncoding=function(Be){Oe||(Oe=ae("string_decoder/").StringDecoder);var _e=new Oe(Be);this._readableState.decoder=_e,this._readableState.encoding=this._readableState.decoder.encoding;for(var Xe=this._readableState.buffer.head,lt="";Xe!==null;)lt+=_e.write(Xe.data),Xe=Xe.next;return this._readableState.buffer.clear(),lt!==""&&this._readableState.buffer.push(lt),this._readableState.length=lt.length,this};var et=1073741824;function $e(Be){return Be>=et?Be=et:(Be--,Be|=Be>>>1,Be|=Be>>>2,Be|=Be>>>4,Be|=Be>>>8,Be|=Be>>>16,Be++),Be}function vt(Be,_e){return Be<=0||_e.length===0&&_e.ended?0:_e.objectMode?1:Be!==Be?_e.flowing&&_e.length?_e.buffer.head.data.length:_e.length:(Be>_e.highWaterMark&&(_e.highWaterMark=$e(Be)),Be<=_e.length?Be:_e.ended?_e.length:(_e.needReadable=!0,0))}dt.prototype.read=function(Be){oe("read",Be),Be=parseInt(Be,10);var _e=this._readableState,Xe=Be;if(Be!==0&&(_e.emittedReadable=!1),Be===0&&_e.needReadable&&((_e.highWaterMark!==0?_e.length>=_e.highWaterMark:_e.length>0)||_e.ended))return oe("read: emitReadable",_e.length,_e.ended),_e.length===0&&_e.ended?Ne(this):ht(this),null;if(Be=vt(Be,_e),Be===0&&_e.ended)return _e.length===0&&Ne(this),null;var lt=_e.needReadable;oe("need readable",lt),(_e.length===0||_e.length-Be<_e.highWaterMark)&&(lt=!0,oe("length less than watermark",lt)),_e.ended||_e.reading?(lt=!1,oe("reading or ended",lt)):lt&&(oe("do read"),_e.reading=!0,_e.sync=!0,_e.length===0&&(_e.needReadable=!0),this._read(_e.highWaterMark),_e.sync=!1,_e.reading||(Be=vt(Xe,_e)));var Pt;return Be>0?Pt=Ce(Be,_e):Pt=null,Pt===null?(_e.needReadable=_e.length<=_e.highWaterMark,Be=0):(_e.length-=Be,_e.awaitDrain=0),_e.length===0&&(_e.ended||(_e.needReadable=!0),Xe!==Be&&_e.ended&&Ne(this)),Pt!==null&&this.emit("data",Pt),Pt};function wt(Be,_e){if(oe("onEofChunk"),!_e.ended){if(_e.decoder){var Xe=_e.decoder.end();Xe&&Xe.length&&(_e.buffer.push(Xe),_e.length+=_e.objectMode?1:Xe.length)}_e.ended=!0,_e.sync?ht(Be):(_e.needReadable=!1,_e.emittedReadable||(_e.emittedReadable=!0,pt(Be)))}}function ht(Be){var _e=Be._readableState;oe("emitReadable",_e.needReadable,_e.emittedReadable),_e.needReadable=!1,_e.emittedReadable||(oe("emitReadable",_e.flowing),_e.emittedReadable=!0,me.nextTick(pt,Be))}function pt(Be){var _e=Be._readableState;oe("emitReadable_",_e.destroyed,_e.length,_e.ended),!_e.destroyed&&(_e.length||_e.ended)&&(Be.emit("readable"),_e.emittedReadable=!1),_e.needReadable=!_e.flowing&&!_e.ended&&_e.length<=_e.highWaterMark,Qe(Be)}function ct(Be,_e){_e.readingMore||(_e.readingMore=!0,me.nextTick(Ct,Be,_e))}function Ct(Be,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){var Xe=_e.length;if(oe("maybeReadMore read 0"),Be.read(0),Xe===_e.length)break}_e.readingMore=!1}dt.prototype._read=function(Be){Ye(this,new Fe("_read()"))},dt.prototype.pipe=function(Be,_e){var Xe=this,lt=this._readableState;switch(lt.pipesCount){case 0:lt.pipes=Be;break;case 1:lt.pipes=[lt.pipes,Be];break;default:lt.pipes.push(Be);break}lt.pipesCount+=1,oe("pipe count=%d opts=%j",lt.pipesCount,_e);var Pt=(!_e||_e.end!==!1)&&Be!==me.stdout&&Be!==me.stderr,kt=Pt?jt:mn;lt.endEmitted?me.nextTick(kt):Xe.once("end",kt),Be.on("unpipe",zt);function zt(In,Sn){oe("onunpipe"),In===Xe&&Sn&&Sn.hasUnpiped===!1&&(Sn.hasUnpiped=!0,an())}function jt(){oe("onend"),Be.end()}var Ht=xt(Xe);Be.on("drain",Ht);var ln=!1;function an(){oe("cleanup"),Be.removeListener("close",On),Be.removeListener("finish",un),Be.removeListener("drain",Ht),Be.removeListener("error",$t),Be.removeListener("unpipe",zt),Xe.removeListener("end",jt),Xe.removeListener("end",mn),Xe.removeListener("data",sn),ln=!0,lt.awaitDrain&&(!Be._writableState||Be._writableState.needDrain)&&Ht()}Xe.on("data",sn);function sn(In){oe("ondata");var Sn=Be.write(In);oe("dest.write",Sn),Sn===!1&&((lt.pipesCount===1&&lt.pipes===Be||lt.pipesCount>1&&rt(lt.pipes,Be)!==-1)&&!ln&&(oe("false write response, pause",lt.awaitDrain),lt.awaitDrain++),Xe.pause())}function $t(In){oe("onerror",In),mn(),Be.removeListener("error",$t),be(Be,"error")===0&&Ye(Be,In)}Ue(Be,"error",$t);function On(){Be.removeListener("finish",un),mn()}Be.once("close",On);function un(){oe("onfinish"),Be.removeListener("close",On),mn()}Be.once("finish",un);function mn(){oe("unpipe"),Xe.unpipe(Be)}return Be.emit("pipe",Xe),lt.flowing||(oe("pipe resume"),Xe.resume()),Be};function xt(Be){return function(){var Xe=Be._readableState;oe("pipeOnDrain",Xe.awaitDrain),Xe.awaitDrain&&Xe.awaitDrain--,Xe.awaitDrain===0&&be(Be,"data")&&(Xe.flowing=!0,Qe(Be))}}dt.prototype.unpipe=function(Be){var _e=this._readableState,Xe={hasUnpiped:!1};if(_e.pipesCount===0)return this;if(_e.pipesCount===1)return Be&&Be!==_e.pipes?this:(Be||(Be=_e.pipes),_e.pipes=null,_e.pipesCount=0,_e.flowing=!1,Be&&Be.emit("unpipe",this,Xe),this);if(!Be){var lt=_e.pipes,Pt=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var kt=0;kt<Pt;kt++)lt[kt].emit("unpipe",this,{hasUnpiped:!1});return this}var zt=rt(_e.pipes,Be);return zt===-1?this:(_e.pipes.splice(zt,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),Be.emit("unpipe",this,Xe),this)},dt.prototype.on=function(Be,_e){var Xe=Te.prototype.on.call(this,Be,_e),lt=this._readableState;return Be==="data"?(lt.readableListening=this.listenerCount("readable")>0,lt.flowing!==!1&&this.resume()):Be==="readable"&&!lt.endEmitted&&!lt.readableListening&&(lt.readableListening=lt.needReadable=!0,lt.flowing=!1,lt.emittedReadable=!1,oe("on readable",lt.length,lt.reading),lt.length?ht(this):lt.reading||me.nextTick(Tt,this)),Xe},dt.prototype.addListener=dt.prototype.on,dt.prototype.removeListener=function(Be,_e){var Xe=Te.prototype.removeListener.call(this,Be,_e);return Be==="readable"&&me.nextTick(yt,this),Xe},dt.prototype.removeAllListeners=function(Be){var _e=Te.prototype.removeAllListeners.apply(this,arguments);return(Be==="readable"||Be===void 0)&&me.nextTick(yt,this),_e};function yt(Be){var _e=Be._readableState;_e.readableListening=Be.listenerCount("readable")>0,_e.resumeScheduled&&!_e.paused?_e.flowing=!0:Be.listenerCount("data")>0&&Be.resume()}function Tt(Be){oe("readable nexttick read 0"),Be.read(0)}dt.prototype.resume=function(){var Be=this._readableState;return Be.flowing||(oe("resume"),Be.flowing=!Be.readableListening,St(this,Be)),Be.paused=!1,this};function St(Be,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,me.nextTick(nt,Be,_e))}function nt(Be,_e){oe("resume",_e.reading),_e.reading||Be.read(0),_e.resumeScheduled=!1,Be.emit("resume"),Qe(Be),_e.flowing&&!_e.reading&&Be.read(0)}dt.prototype.pause=function(){return oe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(oe("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Qe(Be){var _e=Be._readableState;for(oe("flow",_e.flowing);_e.flowing&&Be.read()!==null;);}dt.prototype.wrap=function(Be){var _e=this,Xe=this._readableState,lt=!1;Be.on("end",function(){if(oe("wrapped end"),Xe.decoder&&!Xe.ended){var zt=Xe.decoder.end();zt&&zt.length&&_e.push(zt)}_e.push(null)}),Be.on("data",function(zt){if(oe("wrapped data"),Xe.decoder&&(zt=Xe.decoder.write(zt)),!(Xe.objectMode&&zt==null)&&!(!Xe.objectMode&&(!zt||!zt.length))){var jt=_e.push(zt);jt||(lt=!0,Be.pause())}});for(var Pt in Be)this[Pt]===void 0&&typeof Be[Pt]=="function"&&(this[Pt]=function(jt){return function(){return Be[jt].apply(Be,arguments)}}(Pt));for(var kt=0;kt<We.length;kt++)Be.on(We[kt],this.emit.bind(this,We[kt]));return this._read=function(zt){oe("wrapped _read",zt),lt&&(lt=!1,Be.resume())},this},typeof Symbol=="function"&&(dt.prototype[Symbol.asyncIterator]=function(){return ze===void 0&&(ze=ae("./internal/streams/async_iterator")),ze(this)}),Object.defineProperty(dt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(dt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(dt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(_e){this._readableState&&(this._readableState.flowing=_e)}}),dt._fromList=Ce,Object.defineProperty(dt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ce(Be,_e){if(_e.length===0)return null;var Xe;return _e.objectMode?Xe=_e.buffer.shift():!Be||Be>=_e.length?(_e.decoder?Xe=_e.buffer.join(""):_e.buffer.length===1?Xe=_e.buffer.first():Xe=_e.buffer.concat(_e.length),_e.buffer.clear()):Xe=_e.buffer.consume(Be,_e.decoder),Xe}function Ne(Be){var _e=Be._readableState;oe("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,me.nextTick(Je,_e,Be))}function Je(Be,_e){if(oe("endReadableNT",Be.endEmitted,Be.length),!Be.endEmitted&&Be.length===0&&(Be.endEmitted=!0,_e.readable=!1,_e.emit("end"),Be.autoDestroy)){var Xe=_e._writableState;(!Xe||Xe.autoDestroy&&Xe.finished)&&_e.destroy()}}typeof Symbol=="function"&&(dt.from=function(Be,_e){return He===void 0&&(He=ae("./internal/streams/from")),He(dt,Be,_e)});function rt(Be,_e){for(var Xe=0,lt=Be.length;Xe<lt;Xe++)if(Be[Xe]===_e)return Xe;return-1}}).call(this)}).call(this,ae("_process"),typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(ae,Ge,Ie){"use strict";Ge.exports=xe;var me=ae("../errors").codes,de=me.ERR_METHOD_NOT_IMPLEMENTED,Ee=me.ERR_MULTIPLE_CALLBACK,we=me.ERR_TRANSFORM_ALREADY_TRANSFORMING,be=me.ERR_TRANSFORM_WITH_LENGTH_0,Te=ae("./_stream_duplex");ae("inherits")(xe,Te);function ve(ee,oe){var ie=this._transformState;ie.transforming=!1;var le=ie.writecb;if(le===null)return this.emit("error",new Ee);ie.writechunk=null,ie.writecb=null,oe!=null&&this.push(oe),le(ee);var ue=this._readableState;ue.reading=!1,(ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}function xe(ee){if(!(this instanceof xe))return new xe(ee);Te.call(this,ee),this._transformState={afterTransform:ve.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ee&&(typeof ee.transform=="function"&&(this._transform=ee.transform),typeof ee.flush=="function"&&(this._flush=ee.flush)),this.on("prefinish",fe)}function fe(){var ee=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(oe,ie){z(ee,oe,ie)}):z(this,null,null)}xe.prototype.push=function(ee,oe){return this._transformState.needTransform=!1,Te.prototype.push.call(this,ee,oe)},xe.prototype._transform=function(ee,oe,ie){ie(new de("_transform()"))},xe.prototype._write=function(ee,oe,ie){var le=this._transformState;if(le.writecb=ie,le.writechunk=ee,le.writeencoding=oe,!le.transforming){var ue=this._readableState;(le.needTransform||ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}},xe.prototype._read=function(ee){var oe=this._transformState;oe.writechunk!==null&&!oe.transforming?(oe.transforming=!0,this._transform(oe.writechunk,oe.writeencoding,oe.afterTransform)):oe.needTransform=!0},xe.prototype._destroy=function(ee,oe){Te.prototype._destroy.call(this,ee,function(ie){oe(ie)})};function z(ee,oe,ie){if(oe)return ee.emit("error",oe);if(ie!=null&&ee.push(ie),ee._writableState.length)throw new be;if(ee._transformState.transforming)throw new we;return ee.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(ae,Ge,Ie){(function(me,de){(function(){"use strict";Ge.exports=st;function Ee(Qe,Ce,Ne){this.chunk=Qe,this.encoding=Ce,this.callback=Ne,this.next=null}function we(Qe){var Ce=this;this.next=null,this.entry=null,this.finish=function(){nt(Ce,Qe)}}var be;st.WritableState=We;var Te={deprecate:ae("util-deprecate")},ve=ae("./internal/streams/stream"),xe=ae("buffer").Buffer,fe=(typeof de!="undefined"?de:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(Qe){return xe.from(Qe)}function ee(Qe){return xe.isBuffer(Qe)||Qe instanceof fe}var oe=ae("./internal/streams/destroy"),ie=ae("./internal/streams/state"),le=ie.getHighWaterMark,ue=ae("../errors").codes,pe=ue.ERR_INVALID_ARG_TYPE,Se=ue.ERR_METHOD_NOT_IMPLEMENTED,Le=ue.ERR_MULTIPLE_CALLBACK,De=ue.ERR_STREAM_CANNOT_PIPE,Fe=ue.ERR_STREAM_DESTROYED,Ae=ue.ERR_STREAM_NULL_VALUES,Oe=ue.ERR_STREAM_WRITE_AFTER_END,ze=ue.ERR_UNKNOWN_ENCODING,He=oe.errorOrDestroy;ae("inherits")(st,ve);function Ye(){}function We(Qe,Ce,Ne){be=be||ae("./_stream_duplex"),Qe=Qe||{},typeof Ne!="boolean"&&(Ne=Ce instanceof be),this.objectMode=!!Qe.objectMode,Ne&&(this.objectMode=this.objectMode||!!Qe.writableObjectMode),this.highWaterMark=le(this,Qe,"writableHighWaterMark",Ne),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Je=Qe.decodeStrings===!1;this.decodeStrings=!Je,this.defaultEncoding=Qe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(rt){wt(Ce,rt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Qe.emitClose!==!1,this.autoDestroy=!!Qe.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new we(this)}We.prototype.getBuffer=function(){for(var Ce=this.bufferedRequest,Ne=[];Ce;)Ne.push(Ce),Ce=Ce.next;return Ne},function(){try{Object.defineProperty(We.prototype,"buffer",{get:Te.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Qe){}}();var Ue;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ue=Function.prototype[Symbol.hasInstance],Object.defineProperty(st,Symbol.hasInstance,{value:function(Ce){return Ue.call(this,Ce)?!0:this!==st?!1:Ce&&Ce._writableState instanceof We}})):Ue=function(Ce){return Ce instanceof this};function st(Qe){be=be||ae("./_stream_duplex");var Ce=this instanceof be;if(!Ce&&!Ue.call(st,this))return new st(Qe);this._writableState=new We(Qe,this,Ce),this.writable=!0,Qe&&(typeof Qe.write=="function"&&(this._write=Qe.write),typeof Qe.writev=="function"&&(this._writev=Qe.writev),typeof Qe.destroy=="function"&&(this._destroy=Qe.destroy),typeof Qe.final=="function"&&(this._final=Qe.final)),ve.call(this)}st.prototype.pipe=function(){He(this,new De)};function dt(Qe,Ce){var Ne=new Oe;He(Qe,Ne),me.nextTick(Ce,Ne)}function gt(Qe,Ce,Ne,Je){var rt;return Ne===null?rt=new Ae:typeof Ne!="string"&&!Ce.objectMode&&(rt=new pe("chunk",["string","Buffer"],Ne)),rt?(He(Qe,rt),me.nextTick(Je,rt),!1):!0}st.prototype.write=function(Qe,Ce,Ne){var Je=this._writableState,rt=!1,Be=!Je.objectMode&&ee(Qe);return Be&&!xe.isBuffer(Qe)&&(Qe=z(Qe)),typeof Ce=="function"&&(Ne=Ce,Ce=null),Be?Ce="buffer":Ce||(Ce=Je.defaultEncoding),typeof Ne!="function"&&(Ne=Ye),Je.ending?dt(this,Ne):(Be||gt(this,Je,Qe,Ne))&&(Je.pendingcb++,rt=Ke(this,Je,Be,Qe,Ce,Ne)),rt},st.prototype.cork=function(){this._writableState.corked++},st.prototype.uncork=function(){var Qe=this._writableState;Qe.corked&&(Qe.corked--,!Qe.writing&&!Qe.corked&&!Qe.bufferProcessing&&Qe.bufferedRequest&&ct(this,Qe))},st.prototype.setDefaultEncoding=function(Ce){if(typeof Ce=="string"&&(Ce=Ce.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Ce+"").toLowerCase())>-1))throw new ze(Ce);return this._writableState.defaultEncoding=Ce,this},Object.defineProperty(st.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Et(Qe,Ce,Ne){return!Qe.objectMode&&Qe.decodeStrings!==!1&&typeof Ce=="string"&&(Ce=xe.from(Ce,Ne)),Ce}Object.defineProperty(st.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ke(Qe,Ce,Ne,Je,rt,Be){if(!Ne){var _e=Et(Ce,Je,rt);Je!==_e&&(Ne=!0,rt="buffer",Je=_e)}var Xe=Ce.objectMode?1:Je.length;Ce.length+=Xe;var lt=Ce.length<Ce.highWaterMark;if(lt||(Ce.needDrain=!0),Ce.writing||Ce.corked){var Pt=Ce.lastBufferedRequest;Ce.lastBufferedRequest={chunk:Je,encoding:rt,isBuf:Ne,callback:Be,next:null},Pt?Pt.next=Ce.lastBufferedRequest:Ce.bufferedRequest=Ce.lastBufferedRequest,Ce.bufferedRequestCount+=1}else et(Qe,Ce,!1,Xe,Je,rt,Be);return lt}function et(Qe,Ce,Ne,Je,rt,Be,_e){Ce.writelen=Je,Ce.writecb=_e,Ce.writing=!0,Ce.sync=!0,Ce.destroyed?Ce.onwrite(new Fe("write")):Ne?Qe._writev(rt,Ce.onwrite):Qe._write(rt,Be,Ce.onwrite),Ce.sync=!1}function $e(Qe,Ce,Ne,Je,rt){--Ce.pendingcb,Ne?(me.nextTick(rt,Je),me.nextTick(Tt,Qe,Ce),Qe._writableState.errorEmitted=!0,He(Qe,Je)):(rt(Je),Qe._writableState.errorEmitted=!0,He(Qe,Je),Tt(Qe,Ce))}function vt(Qe){Qe.writing=!1,Qe.writecb=null,Qe.length-=Qe.writelen,Qe.writelen=0}function wt(Qe,Ce){var Ne=Qe._writableState,Je=Ne.sync,rt=Ne.writecb;if(typeof rt!="function")throw new Le;if(vt(Ne),Ce)$e(Qe,Ne,Je,Ce,rt);else{var Be=Ct(Ne)||Qe.destroyed;!Be&&!Ne.corked&&!Ne.bufferProcessing&&Ne.bufferedRequest&&ct(Qe,Ne),Je?me.nextTick(ht,Qe,Ne,Be,rt):ht(Qe,Ne,Be,rt)}}function ht(Qe,Ce,Ne,Je){Ne||pt(Qe,Ce),Ce.pendingcb--,Je(),Tt(Qe,Ce)}function pt(Qe,Ce){Ce.length===0&&Ce.needDrain&&(Ce.needDrain=!1,Qe.emit("drain"))}function ct(Qe,Ce){Ce.bufferProcessing=!0;var Ne=Ce.bufferedRequest;if(Qe._writev&&Ne&&Ne.next){var Je=Ce.bufferedRequestCount,rt=new Array(Je),Be=Ce.corkedRequestsFree;Be.entry=Ne;for(var _e=0,Xe=!0;Ne;)rt[_e]=Ne,Ne.isBuf||(Xe=!1),Ne=Ne.next,_e+=1;rt.allBuffers=Xe,et(Qe,Ce,!0,Ce.length,rt,"",Be.finish),Ce.pendingcb++,Ce.lastBufferedRequest=null,Be.next?(Ce.corkedRequestsFree=Be.next,Be.next=null):Ce.corkedRequestsFree=new we(Ce),Ce.bufferedRequestCount=0}else{for(;Ne;){var lt=Ne.chunk,Pt=Ne.encoding,kt=Ne.callback,zt=Ce.objectMode?1:lt.length;if(et(Qe,Ce,!1,zt,lt,Pt,kt),Ne=Ne.next,Ce.bufferedRequestCount--,Ce.writing)break}Ne===null&&(Ce.lastBufferedRequest=null)}Ce.bufferedRequest=Ne,Ce.bufferProcessing=!1}st.prototype._write=function(Qe,Ce,Ne){Ne(new Se("_write()"))},st.prototype._writev=null,st.prototype.end=function(Qe,Ce,Ne){var Je=this._writableState;return typeof Qe=="function"?(Ne=Qe,Qe=null,Ce=null):typeof Ce=="function"&&(Ne=Ce,Ce=null),Qe!=null&&this.write(Qe,Ce),Je.corked&&(Je.corked=1,this.uncork()),Je.ending||St(this,Je,Ne),this},Object.defineProperty(st.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ct(Qe){return Qe.ending&&Qe.length===0&&Qe.bufferedRequest===null&&!Qe.finished&&!Qe.writing}function xt(Qe,Ce){Qe._final(function(Ne){Ce.pendingcb--,Ne&&He(Qe,Ne),Ce.prefinished=!0,Qe.emit("prefinish"),Tt(Qe,Ce)})}function yt(Qe,Ce){!Ce.prefinished&&!Ce.finalCalled&&(typeof Qe._final=="function"&&!Ce.destroyed?(Ce.pendingcb++,Ce.finalCalled=!0,me.nextTick(xt,Qe,Ce)):(Ce.prefinished=!0,Qe.emit("prefinish")))}function Tt(Qe,Ce){var Ne=Ct(Ce);if(Ne&&(yt(Qe,Ce),Ce.pendingcb===0&&(Ce.finished=!0,Qe.emit("finish"),Ce.autoDestroy))){var Je=Qe._readableState;(!Je||Je.autoDestroy&&Je.endEmitted)&&Qe.destroy()}return Ne}function St(Qe,Ce,Ne){Ce.ending=!0,Tt(Qe,Ce),Ne&&(Ce.finished?me.nextTick(Ne):Qe.once("finish",Ne)),Ce.ended=!0,Qe.writable=!1}function nt(Qe,Ce,Ne){var Je=Qe.entry;for(Qe.entry=null;Je;){var rt=Je.callback;Ce.pendingcb--,rt(Ne),Je=Je.next}Ce.corkedRequestsFree.next=Qe}Object.defineProperty(st.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Ce){this._writableState&&(this._writableState.destroyed=Ce)}}),st.prototype.destroy=oe.destroy,st.prototype._undestroy=oe.undestroy,st.prototype._destroy=function(Qe,Ce){Ce(Qe)}}).call(this)}).call(this,ae("_process"),typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de;function Ee(Ae,Oe,ze){return Oe=we(Oe),Oe in Ae?Object.defineProperty(Ae,Oe,{value:ze,enumerable:!0,configurable:!0,writable:!0}):Ae[Oe]=ze,Ae}function we(Ae){var Oe=be(Ae,"string");return typeof Oe=="symbol"?Oe:String(Oe)}function be(Ae,Oe){if(typeof Ae!="object"||Ae===null)return Ae;var ze=Ae[Symbol.toPrimitive];if(ze!==void 0){var He=ze.call(Ae,Oe||"default");if(typeof He!="object")return He;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Oe==="string"?String:Number)(Ae)}var Te=ae("./end-of-stream"),ve=Symbol("lastResolve"),xe=Symbol("lastReject"),fe=Symbol("error"),z=Symbol("ended"),ee=Symbol("lastPromise"),oe=Symbol("handlePromise"),ie=Symbol("stream");function le(Ae,Oe){return{value:Ae,done:Oe}}function ue(Ae){var Oe=Ae[ve];if(Oe!==null){var ze=Ae[ie].read();ze!==null&&(Ae[ee]=null,Ae[ve]=null,Ae[xe]=null,Oe(le(ze,!1)))}}function pe(Ae){me.nextTick(ue,Ae)}function Se(Ae,Oe){return function(ze,He){Ae.then(function(){if(Oe[z]){ze(le(void 0,!0));return}Oe[oe](ze,He)},He)}}var Le=Object.getPrototypeOf(function(){}),De=Object.setPrototypeOf((de={get stream(){return this[ie]},next:function(){var Oe=this,ze=this[fe];if(ze!==null)return Promise.reject(ze);if(this[z])return Promise.resolve(le(void 0,!0));if(this[ie].destroyed)return new Promise(function(Ue,st){me.nextTick(function(){Oe[fe]?st(Oe[fe]):Ue(le(void 0,!0))})});var He=this[ee],Ye;if(He)Ye=new Promise(Se(He,this));else{var We=this[ie].read();if(We!==null)return Promise.resolve(le(We,!1));Ye=new Promise(this[oe])}return this[ee]=Ye,Ye}},Ee(de,Symbol.asyncIterator,function(){return this}),Ee(de,"return",function(){var Oe=this;return new Promise(function(ze,He){Oe[ie].destroy(null,function(Ye){if(Ye){He(Ye);return}ze(le(void 0,!0))})})}),de),Le),Fe=function(Oe){var ze,He=Object.create(De,(ze={},Ee(ze,ie,{value:Oe,writable:!0}),Ee(ze,ve,{value:null,writable:!0}),Ee(ze,xe,{value:null,writable:!0}),Ee(ze,fe,{value:null,writable:!0}),Ee(ze,z,{value:Oe._readableState.endEmitted,writable:!0}),Ee(ze,oe,{value:function(We,Ue){var st=He[ie].read();st?(He[ee]=null,He[ve]=null,He[xe]=null,We(le(st,!1))):(He[ve]=We,He[xe]=Ue)},writable:!0}),ze));return He[ee]=null,Te(Oe,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var We=He[xe];We!==null&&(He[ee]=null,He[ve]=null,He[xe]=null,We(Ye)),He[fe]=Ye;return}var Ue=He[ve];Ue!==null&&(He[ee]=null,He[ve]=null,He[xe]=null,Ue(le(void 0,!0))),He[z]=!0}),Oe.on("readable",pe.bind(null,He)),He};Ge.exports=Fe}).call(this)}).call(this,ae("_process"))},{"./end-of-stream":408,_process:467}],406:[function(ae,Ge,Ie){"use strict";function me(ue,pe){var Se=Object.keys(ue);if(Object.getOwnPropertySymbols){var Le=Object.getOwnPropertySymbols(ue);pe&&(Le=Le.filter(function(De){return Object.getOwnPropertyDescriptor(ue,De).enumerable})),Se.push.apply(Se,Le)}return Se}function de(ue){for(var pe=1;pe<arguments.length;pe++){var Se=arguments[pe]!=null?arguments[pe]:{};pe%2?me(Object(Se),!0).forEach(function(Le){Ee(ue,Le,Se[Le])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(Se)):me(Object(Se)).forEach(function(Le){Object.defineProperty(ue,Le,Object.getOwnPropertyDescriptor(Se,Le))})}return ue}function Ee(ue,pe,Se){return pe=ve(pe),pe in ue?Object.defineProperty(ue,pe,{value:Se,enumerable:!0,configurable:!0,writable:!0}):ue[pe]=Se,ue}function we(ue,pe){if(!(ue instanceof pe))throw new TypeError("Cannot call a class as a function")}function be(ue,pe){for(var Se=0;Se<pe.length;Se++){var Le=pe[Se];Le.enumerable=Le.enumerable||!1,Le.configurable=!0,"value"in Le&&(Le.writable=!0),Object.defineProperty(ue,ve(Le.key),Le)}}function Te(ue,pe,Se){return pe&&be(ue.prototype,pe),Se&&be(ue,Se),Object.defineProperty(ue,"prototype",{writable:!1}),ue}function ve(ue){var pe=xe(ue,"string");return typeof pe=="symbol"?pe:String(pe)}function xe(ue,pe){if(typeof ue!="object"||ue===null)return ue;var Se=ue[Symbol.toPrimitive];if(Se!==void 0){var Le=Se.call(ue,pe||"default");if(typeof Le!="object")return Le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(pe==="string"?String:Number)(ue)}var fe=ae("buffer"),z=fe.Buffer,ee=ae("util"),oe=ee.inspect,ie=oe&&oe.custom||"inspect";function le(ue,pe,Se){z.prototype.copy.call(ue,pe,Se)}Ge.exports=function(){function ue(){we(this,ue),this.head=null,this.tail=null,this.length=0}return Te(ue,[{key:"push",value:function(Se){var Le={data:Se,next:null};this.length>0?this.tail.next=Le:this.head=Le,this.tail=Le,++this.length}},{key:"unshift",value:function(Se){var Le={data:Se,next:this.head};this.length===0&&(this.tail=Le),this.head=Le,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Se=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Se}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Se){if(this.length===0)return"";for(var Le=this.head,De=""+Le.data;Le=Le.next;)De+=Se+Le.data;return De}},{key:"concat",value:function(Se){if(this.length===0)return z.alloc(0);for(var Le=z.allocUnsafe(Se>>>0),De=this.head,Fe=0;De;)le(De.data,Le,Fe),Fe+=De.data.length,De=De.next;return Le}},{key:"consume",value:function(Se,Le){var De;return Se<this.head.data.length?(De=this.head.data.slice(0,Se),this.head.data=this.head.data.slice(Se)):Se===this.head.data.length?De=this.shift():De=Le?this._getString(Se):this._getBuffer(Se),De}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Se){var Le=this.head,De=1,Fe=Le.data;for(Se-=Fe.length;Le=Le.next;){var Ae=Le.data,Oe=Se>Ae.length?Ae.length:Se;if(Oe===Ae.length?Fe+=Ae:Fe+=Ae.slice(0,Se),Se-=Oe,Se===0){Oe===Ae.length?(++De,Le.next?this.head=Le.next:this.head=this.tail=null):(this.head=Le,Le.data=Ae.slice(Oe));break}++De}return this.length-=De,Fe}},{key:"_getBuffer",value:function(Se){var Le=z.allocUnsafe(Se),De=this.head,Fe=1;for(De.data.copy(Le),Se-=De.data.length;De=De.next;){var Ae=De.data,Oe=Se>Ae.length?Ae.length:Se;if(Ae.copy(Le,Le.length-Se,0,Oe),Se-=Oe,Se===0){Oe===Ae.length?(++Fe,De.next?this.head=De.next:this.head=this.tail=null):(this.head=De,De.data=Ae.slice(Oe));break}++Fe}return this.length-=Fe,Le}},{key:ie,value:function(Se,Le){return oe(this,de(de({},Le),{},{depth:0,customInspect:!1}))}}]),ue}()},{buffer:90,util:89}],407:[function(ae,Ge,Ie){(function(me){(function(){"use strict";function de(xe,fe){var z=this,ee=this._readableState&&this._readableState.destroyed,oe=this._writableState&&this._writableState.destroyed;return ee||oe?(fe?fe(xe):xe&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,me.nextTick(Te,this,xe)):me.nextTick(Te,this,xe)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xe||null,function(ie){!fe&&ie?z._writableState?z._writableState.errorEmitted?me.nextTick(we,z):(z._writableState.errorEmitted=!0,me.nextTick(Ee,z,ie)):me.nextTick(Ee,z,ie):fe?(me.nextTick(we,z),fe(ie)):me.nextTick(we,z)}),this)}function Ee(xe,fe){Te(xe,fe),we(xe)}function we(xe){xe._writableState&&!xe._writableState.emitClose||xe._readableState&&!xe._readableState.emitClose||xe.emit("close")}function be(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Te(xe,fe){xe.emit("error",fe)}function ve(xe,fe){var z=xe._readableState,ee=xe._writableState;z&&z.autoDestroy||ee&&ee.autoDestroy?xe.destroy(fe):xe.emit("error",fe)}Ge.exports={destroy:de,undestroy:be,errorOrDestroy:ve}}).call(this)}).call(this,ae("_process"))},{_process:467}],408:[function(ae,Ge,Ie){"use strict";var me=ae("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function de(Te){var ve=!1;return function(){if(!ve){ve=!0;for(var xe=arguments.length,fe=new Array(xe),z=0;z<xe;z++)fe[z]=arguments[z];Te.apply(this,fe)}}}function Ee(){}function we(Te){return Te.setHeader&&typeof Te.abort=="function"}function be(Te,ve,xe){if(typeof ve=="function")return be(Te,null,ve);ve||(ve={}),xe=de(xe||Ee);var fe=ve.readable||ve.readable!==!1&&Te.readable,z=ve.writable||ve.writable!==!1&&Te.writable,ee=function(){Te.writable||ie()},oe=Te._writableState&&Te._writableState.finished,ie=function(){z=!1,oe=!0,fe||xe.call(Te)},le=Te._readableState&&Te._readableState.endEmitted,ue=function(){fe=!1,le=!0,z||xe.call(Te)},pe=function(Fe){xe.call(Te,Fe)},Se=function(){var Fe;if(fe&&!le)return(!Te._readableState||!Te._readableState.ended)&&(Fe=new me),xe.call(Te,Fe);if(z&&!oe)return(!Te._writableState||!Te._writableState.ended)&&(Fe=new me),xe.call(Te,Fe)},Le=function(){Te.req.on("finish",ie)};return we(Te)?(Te.on("complete",ie),Te.on("abort",Se),Te.req?Le():Te.on("request",Le)):z&&!Te._writableState&&(Te.on("end",ee),Te.on("close",ee)),Te.on("end",ue),Te.on("finish",ie),ve.error!==!1&&Te.on("error",pe),Te.on("close",Se),function(){Te.removeListener("complete",ie),Te.removeListener("abort",Se),Te.removeListener("request",Le),Te.req&&Te.req.removeListener("finish",ie),Te.removeListener("end",ee),Te.removeListener("close",ee),Te.removeListener("finish",ie),Te.removeListener("end",ue),Te.removeListener("error",pe),Te.removeListener("close",Se)}}Ge.exports=be},{"../../../errors":399}],409:[function(ae,Ge,Ie){Ge.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(ae,Ge,Ie){"use strict";var me;function de(ie){var le=!1;return function(){le||(le=!0,ie.apply(void 0,arguments))}}var Ee=ae("../../../errors").codes,we=Ee.ERR_MISSING_ARGS,be=Ee.ERR_STREAM_DESTROYED;function Te(ie){if(ie)throw ie}function ve(ie){return ie.setHeader&&typeof ie.abort=="function"}function xe(ie,le,ue,pe){pe=de(pe);var Se=!1;ie.on("close",function(){Se=!0}),me===void 0&&(me=ae("./end-of-stream")),me(ie,{readable:le,writable:ue},function(De){if(De)return pe(De);Se=!0,pe()});var Le=!1;return function(De){if(!Se&&!Le){if(Le=!0,ve(ie))return ie.abort();if(typeof ie.destroy=="function")return ie.destroy();pe(De||new be("pipe"))}}}function fe(ie){ie()}function z(ie,le){return ie.pipe(le)}function ee(ie){return!ie.length||typeof ie[ie.length-1]!="function"?Te:ie.pop()}function oe(){for(var ie=arguments.length,le=new Array(ie),ue=0;ue<ie;ue++)le[ue]=arguments[ue];var pe=ee(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new we("streams");var Se,Le=le.map(function(De,Fe){var Ae=Fe<le.length-1,Oe=Fe>0;return xe(De,Ae,Oe,function(ze){Se||(Se=ze),ze&&Le.forEach(fe),!Ae&&(Le.forEach(fe),pe(Se))})});return le.reduce(z)}Ge.exports=oe},{"../../../errors":399,"./end-of-stream":408}],411:[function(ae,Ge,Ie){"use strict";var me=ae("../../../errors").codes.ERR_INVALID_OPT_VALUE;function de(we,be,Te){return we.highWaterMark!=null?we.highWaterMark:be?we[Te]:null}function Ee(we,be,Te,ve){var xe=de(be,ve,Te);if(xe!=null){if(!(isFinite(xe)&&Math.floor(xe)===xe)||xe<0){var fe=ve?Te:"highWaterMark";throw new me(fe,xe)}return Math.floor(xe)}return we.objectMode?16:16*1024}Ge.exports={getHighWaterMark:Ee}},{"../../../errors":399}],412:[function(ae,Ge,Ie){arguments[4][393][0].apply(Ie,arguments)},{dup:393,events:344}],413:[function(ae,Ge,Ie){"use strict";var me=ae("safe-buffer").Buffer,de=me.isEncoding||function(Le){switch(Le=""+Le,Le&&Le.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Ee(Le){if(!Le)return"utf8";for(var De;;)switch(Le){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return Le;default:if(De)return;Le=(""+Le).toLowerCase(),De=!0}}function we(Le){var De=Ee(Le);if(typeof De!="string"&&(me.isEncoding===de||!de(Le)))throw new Error("Unknown encoding: "+Le);return De||Le}Ie.StringDecoder=be;function be(Le){this.encoding=we(Le);var De;switch(this.encoding){case"utf16le":this.text=oe,this.end=ie,De=4;break;case"utf8":this.fillLast=fe,De=4;break;case"base64":this.text=le,this.end=ue,De=3;break;default:this.write=pe,this.end=Se;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=me.allocUnsafe(De)}be.prototype.write=function(Le){if(Le.length===0)return"";var De,Fe;if(this.lastNeed){if(De=this.fillLast(Le),De===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<Le.length?De?De+this.text(Le,Fe):this.text(Le,Fe):De||""},be.prototype.end=ee,be.prototype.text=z,be.prototype.fillLast=function(Le){if(this.lastNeed<=Le.length)return Le.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Le.copy(this.lastChar,this.lastTotal-this.lastNeed,0,Le.length),this.lastNeed-=Le.length};function Te(Le){return Le<=127?0:Le>>5===6?2:Le>>4===14?3:Le>>3===30?4:Le>>6===2?-1:-2}function ve(Le,De,Fe){var Ae=De.length-1;if(Ae<Fe)return 0;var Oe=Te(De[Ae]);return Oe>=0?(Oe>0&&(Le.lastNeed=Oe-1),Oe):--Ae<Fe||Oe===-2?0:(Oe=Te(De[Ae]),Oe>=0?(Oe>0&&(Le.lastNeed=Oe-2),Oe):--Ae<Fe||Oe===-2?0:(Oe=Te(De[Ae]),Oe>=0?(Oe>0&&(Oe===2?Oe=0:Le.lastNeed=Oe-3),Oe):0))}function xe(Le,De,Fe){if((De[0]&192)!==128)return Le.lastNeed=0,"\uFFFD";if(Le.lastNeed>1&&De.length>1){if((De[1]&192)!==128)return Le.lastNeed=1,"\uFFFD";if(Le.lastNeed>2&&De.length>2&&(De[2]&192)!==128)return Le.lastNeed=2,"\uFFFD"}}function fe(Le){var De=this.lastTotal-this.lastNeed,Fe=xe(this,Le,De);if(Fe!==void 0)return Fe;if(this.lastNeed<=Le.length)return Le.copy(this.lastChar,De,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Le.copy(this.lastChar,De,0,Le.length),this.lastNeed-=Le.length}function z(Le,De){var Fe=ve(this,Le,De);if(!this.lastNeed)return Le.toString("utf8",De);this.lastTotal=Fe;var Ae=Le.length-(Fe-this.lastNeed);return Le.copy(this.lastChar,0,Ae),Le.toString("utf8",De,Ae)}function ee(Le){var De=Le&&Le.length?this.write(Le):"";return this.lastNeed?De+"\uFFFD":De}function oe(Le,De){if((Le.length-De)%2===0){var Fe=Le.toString("utf16le",De);if(Fe){var Ae=Fe.charCodeAt(Fe.length-1);if(Ae>=55296&&Ae<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=Le[Le.length-2],this.lastChar[1]=Le[Le.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=Le[Le.length-1],Le.toString("utf16le",De,Le.length-1)}function ie(Le){var De=Le&&Le.length?this.write(Le):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return De+this.lastChar.toString("utf16le",0,Fe)}return De}function le(Le,De){var Fe=(Le.length-De)%3;return Fe===0?Le.toString("base64",De):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=Le[Le.length-1]:(this.lastChar[0]=Le[Le.length-2],this.lastChar[1]=Le[Le.length-1]),Le.toString("base64",De,Le.length-Fe))}function ue(Le){var De=Le&&Le.length?this.write(Le):"";return this.lastNeed?De+this.lastChar.toString("base64",0,3-this.lastNeed):De}function pe(Le){return Le.toString(this.encoding)}function Se(Le){return Le&&Le.length?this.write(Le):""}},{"safe-buffer":396}],414:[function(ae,Ge,Ie){(function(me,de){(function(){var Ee=ae("process/browser.js").nextTick,we=Function.prototype.apply,be=Array.prototype.slice,Te={},ve=0;Ie.setTimeout=function(){return new xe(we.call(setTimeout,window,arguments),clearTimeout)},Ie.setInterval=function(){return new xe(we.call(setInterval,window,arguments),clearInterval)},Ie.clearTimeout=Ie.clearInterval=function(fe){fe.close()};function xe(fe,z){this._id=fe,this._clearFn=z}xe.prototype.unref=xe.prototype.ref=function(){},xe.prototype.close=function(){this._clearFn.call(window,this._id)},Ie.enroll=function(fe,z){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=z},Ie.unenroll=function(fe){clearTimeout(fe._idleTimeoutId),fe._idleTimeout=-1},Ie._unrefActive=Ie.active=function(fe){clearTimeout(fe._idleTimeoutId);var z=fe._idleTimeout;z>=0&&(fe._idleTimeoutId=setTimeout(function(){fe._onTimeout&&fe._onTimeout()},z))},Ie.setImmediate=typeof me=="function"?me:function(fe){var z=ve++,ee=arguments.length<2?!1:be.call(arguments,1);return Te[z]=!0,Ee(function(){Te[z]&&(ee?fe.apply(null,ee):fe.call(null),Ie.clearImmediate(z))}),z},Ie.clearImmediate=typeof de=="function"?de:function(fe){delete Te[fe]}}).call(this)}).call(this,ae("timers").setImmediate,ae("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(ae,Ge,Ie){var me=ae("buffer").Buffer;Ge.exports=function(de){if(de instanceof Uint8Array){if(de.byteOffset===0&&de.byteLength===de.buffer.byteLength)return de.buffer;if(typeof de.buffer.slice=="function")return de.buffer.slice(de.byteOffset,de.byteOffset+de.byteLength)}if(me.isBuffer(de)){for(var Ee=new Uint8Array(de.length),we=de.length,be=0;be<we;be++)Ee[be]=de[be];return Ee.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(ae,Ge,Ie){(function(me){(function(){Ge.exports=de;function de(we,be){if(Ee("noDeprecation"))return we;var Te=!1;function ve(){if(!Te){if(Ee("throwDeprecation"))throw new Error(be);Ee("traceDeprecation")?console.trace(be):console.warn(be),Te=!0}return we.apply(this,arguments)}return ve}function Ee(we){try{if(!me.localStorage)return!1}catch(Te){return!1}var be=me.localStorage[we];return be==null?!1:String(be).toLowerCase()==="true"}}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(ae,Ge,Ie){arguments[4][84][0].apply(Ie,arguments)},{dup:84}],418:[function(ae,Ge,Ie){"use strict";var me=ae("is-arguments"),de=ae("is-generator-function"),Ee=ae("which-typed-array"),we=ae("is-typed-array");function be(Pt){return Pt.call.bind(Pt)}var Te=typeof BigInt!="undefined",ve=typeof Symbol!="undefined",xe=be(Object.prototype.toString),fe=be(Number.prototype.valueOf),z=be(String.prototype.valueOf),ee=be(Boolean.prototype.valueOf);if(Te)var oe=be(BigInt.prototype.valueOf);if(ve)var ie=be(Symbol.prototype.valueOf);function le(Pt,kt){if(typeof Pt!="object")return!1;try{return kt(Pt),!0}catch(zt){return!1}}Ie.isArgumentsObject=me,Ie.isGeneratorFunction=de,Ie.isTypedArray=we;function ue(Pt){return typeof Promise!="undefined"&&Pt instanceof Promise||Pt!==null&&typeof Pt=="object"&&typeof Pt.then=="function"&&typeof Pt.catch=="function"}Ie.isPromise=ue;function pe(Pt){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(Pt):we(Pt)||ct(Pt)}Ie.isArrayBufferView=pe;function Se(Pt){return Ee(Pt)==="Uint8Array"}Ie.isUint8Array=Se;function Le(Pt){return Ee(Pt)==="Uint8ClampedArray"}Ie.isUint8ClampedArray=Le;function De(Pt){return Ee(Pt)==="Uint16Array"}Ie.isUint16Array=De;function Fe(Pt){return Ee(Pt)==="Uint32Array"}Ie.isUint32Array=Fe;function Ae(Pt){return Ee(Pt)==="Int8Array"}Ie.isInt8Array=Ae;function Oe(Pt){return Ee(Pt)==="Int16Array"}Ie.isInt16Array=Oe;function ze(Pt){return Ee(Pt)==="Int32Array"}Ie.isInt32Array=ze;function He(Pt){return Ee(Pt)==="Float32Array"}Ie.isFloat32Array=He;function Ye(Pt){return Ee(Pt)==="Float64Array"}Ie.isFloat64Array=Ye;function We(Pt){return Ee(Pt)==="BigInt64Array"}Ie.isBigInt64Array=We;function Ue(Pt){return Ee(Pt)==="BigUint64Array"}Ie.isBigUint64Array=Ue;function st(Pt){return xe(Pt)==="[object Map]"}st.working=typeof Map!="undefined"&&st(new Map);function dt(Pt){return typeof Map=="undefined"?!1:st.working?st(Pt):Pt instanceof Map}Ie.isMap=dt;function gt(Pt){return xe(Pt)==="[object Set]"}gt.working=typeof Set!="undefined"&&gt(new Set);function Et(Pt){return typeof Set=="undefined"?!1:gt.working?gt(Pt):Pt instanceof Set}Ie.isSet=Et;function Ke(Pt){return xe(Pt)==="[object WeakMap]"}Ke.working=typeof WeakMap!="undefined"&&Ke(new WeakMap);function et(Pt){return typeof WeakMap=="undefined"?!1:Ke.working?Ke(Pt):Pt instanceof WeakMap}Ie.isWeakMap=et;function $e(Pt){return xe(Pt)==="[object WeakSet]"}$e.working=typeof WeakSet!="undefined"&&$e(new WeakSet);function vt(Pt){return $e(Pt)}Ie.isWeakSet=vt;function wt(Pt){return xe(Pt)==="[object ArrayBuffer]"}wt.working=typeof ArrayBuffer!="undefined"&&wt(new ArrayBuffer);function ht(Pt){return typeof ArrayBuffer=="undefined"?!1:wt.working?wt(Pt):Pt instanceof ArrayBuffer}Ie.isArrayBuffer=ht;function pt(Pt){return xe(Pt)==="[object DataView]"}pt.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&pt(new DataView(new ArrayBuffer(1),0,1));function ct(Pt){return typeof DataView=="undefined"?!1:pt.working?pt(Pt):Pt instanceof DataView}Ie.isDataView=ct;var Ct=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function xt(Pt){return xe(Pt)==="[object SharedArrayBuffer]"}function yt(Pt){return typeof Ct=="undefined"?!1:(typeof xt.working=="undefined"&&(xt.working=xt(new Ct)),xt.working?xt(Pt):Pt instanceof Ct)}Ie.isSharedArrayBuffer=yt;function Tt(Pt){return xe(Pt)==="[object AsyncFunction]"}Ie.isAsyncFunction=Tt;function St(Pt){return xe(Pt)==="[object Map Iterator]"}Ie.isMapIterator=St;function nt(Pt){return xe(Pt)==="[object Set Iterator]"}Ie.isSetIterator=nt;function Qe(Pt){return xe(Pt)==="[object Generator]"}Ie.isGeneratorObject=Qe;function Ce(Pt){return xe(Pt)==="[object WebAssembly.Module]"}Ie.isWebAssemblyCompiledModule=Ce;function Ne(Pt){return le(Pt,fe)}Ie.isNumberObject=Ne;function Je(Pt){return le(Pt,z)}Ie.isStringObject=Je;function rt(Pt){return le(Pt,ee)}Ie.isBooleanObject=rt;function Be(Pt){return Te&&le(Pt,oe)}Ie.isBigIntObject=Be;function _e(Pt){return ve&&le(Pt,ie)}Ie.isSymbolObject=_e;function Xe(Pt){return Ne(Pt)||Je(Pt)||rt(Pt)||Be(Pt)||_e(Pt)}Ie.isBoxedPrimitive=Xe;function lt(Pt){return typeof Uint8Array!="undefined"&&(ht(Pt)||yt(Pt))}Ie.isAnyArrayBuffer=lt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Pt){Object.defineProperty(Ie,Pt,{enumerable:!1,value:function(){throw new Error(Pt+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(ae,Ge,Ie){(function(me){(function(){var de=Object.getOwnPropertyDescriptors||function(Ct){for(var xt=Object.keys(Ct),yt={},Tt=0;Tt<xt.length;Tt++)yt[xt[Tt]]=Object.getOwnPropertyDescriptor(Ct,xt[Tt]);return yt},Ee=/%[sdj%]/g;Ie.format=function(ct){if(!Oe(ct)){for(var Ct=[],xt=0;xt<arguments.length;xt++)Ct.push(ve(arguments[xt]));return Ct.join(" ")}for(var xt=1,yt=arguments,Tt=yt.length,St=String(ct).replace(Ee,function(Qe){if(Qe==="%%")return"%";if(xt>=Tt)return Qe;switch(Qe){case"%s":return String(yt[xt++]);case"%d":return Number(yt[xt++]);case"%j":try{return JSON.stringify(yt[xt++])}catch(Ce){return"[Circular]"}default:return Qe}}),nt=yt[xt];xt<Tt;nt=yt[++xt])De(nt)||!We(nt)?St+=" "+nt:St+=" "+ve(nt);return St},Ie.deprecate=function(ct,Ct){if(typeof me!="undefined"&&me.noDeprecation===!0)return ct;if(typeof me=="undefined")return function(){return Ie.deprecate(ct,Ct).apply(this,arguments)};var xt=!1;function yt(){if(!xt){if(me.throwDeprecation)throw new Error(Ct);me.traceDeprecation?console.trace(Ct):console.error(Ct),xt=!0}return ct.apply(this,arguments)}return yt};var we={},be=/^$/;if(me.env.NODE_DEBUG){var Te=me.env.NODE_DEBUG;Te=Te.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),be=new RegExp("^"+Te+"$","i")}Ie.debuglog=function(ct){if(ct=ct.toUpperCase(),!we[ct])if(be.test(ct)){var Ct=me.pid;we[ct]=function(){var xt=Ie.format.apply(Ie,arguments);console.error("%s %d: %s",ct,Ct,xt)}}else we[ct]=function(){};return we[ct]};function ve(ct,Ct){var xt={seen:[],stylize:fe};return arguments.length>=3&&(xt.depth=arguments[2]),arguments.length>=4&&(xt.colors=arguments[3]),Le(Ct)?xt.showHidden=Ct:Ct&&Ie._extend(xt,Ct),He(xt.showHidden)&&(xt.showHidden=!1),He(xt.depth)&&(xt.depth=2),He(xt.colors)&&(xt.colors=!1),He(xt.customInspect)&&(xt.customInspect=!0),xt.colors&&(xt.stylize=xe),ee(xt,ct,xt.depth)}Ie.inspect=ve,ve.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ve.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function xe(ct,Ct){var xt=ve.styles[Ct];return xt?"\x1B["+ve.colors[xt][0]+"m"+ct+"\x1B["+ve.colors[xt][1]+"m":ct}function fe(ct,Ct){return ct}function z(ct){var Ct={};return ct.forEach(function(xt,yt){Ct[xt]=!0}),Ct}function ee(ct,Ct,xt){if(ct.customInspect&&Ct&&dt(Ct.inspect)&&Ct.inspect!==Ie.inspect&&!(Ct.constructor&&Ct.constructor.prototype===Ct)){var yt=Ct.inspect(xt,ct);return Oe(yt)||(yt=ee(ct,yt,xt)),yt}var Tt=oe(ct,Ct);if(Tt)return Tt;var St=Object.keys(Ct),nt=z(St);if(ct.showHidden&&(St=Object.getOwnPropertyNames(Ct)),st(Ct)&&(St.indexOf("message")>=0||St.indexOf("description")>=0))return ie(Ct);if(St.length===0){if(dt(Ct)){var Qe=Ct.name?": "+Ct.name:"";return ct.stylize("[Function"+Qe+"]","special")}if(Ye(Ct))return ct.stylize(RegExp.prototype.toString.call(Ct),"regexp");if(Ue(Ct))return ct.stylize(Date.prototype.toString.call(Ct),"date");if(st(Ct))return ie(Ct)}var Ce="",Ne=!1,Je=["{","}"];if(Se(Ct)&&(Ne=!0,Je=["[","]"]),dt(Ct)){var rt=Ct.name?": "+Ct.name:"";Ce=" [Function"+rt+"]"}if(Ye(Ct)&&(Ce=" "+RegExp.prototype.toString.call(Ct)),Ue(Ct)&&(Ce=" "+Date.prototype.toUTCString.call(Ct)),st(Ct)&&(Ce=" "+ie(Ct)),St.length===0&&(!Ne||Ct.length==0))return Je[0]+Ce+Je[1];if(xt<0)return Ye(Ct)?ct.stylize(RegExp.prototype.toString.call(Ct),"regexp"):ct.stylize("[Object]","special");ct.seen.push(Ct);var Be;return Ne?Be=le(ct,Ct,xt,nt,St):Be=St.map(function(_e){return ue(ct,Ct,xt,nt,_e,Ne)}),ct.seen.pop(),pe(Be,Ce,Je)}function oe(ct,Ct){if(He(Ct))return ct.stylize("undefined","undefined");if(Oe(Ct)){var xt="'"+JSON.stringify(Ct).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ct.stylize(xt,"string")}if(Ae(Ct))return ct.stylize(""+Ct,"number");if(Le(Ct))return ct.stylize(""+Ct,"boolean");if(De(Ct))return ct.stylize("null","null")}function ie(ct){return"["+Error.prototype.toString.call(ct)+"]"}function le(ct,Ct,xt,yt,Tt){for(var St=[],nt=0,Qe=Ct.length;nt<Qe;++nt)vt(Ct,String(nt))?St.push(ue(ct,Ct,xt,yt,String(nt),!0)):St.push("");return Tt.forEach(function(Ce){Ce.match(/^\d+$/)||St.push(ue(ct,Ct,xt,yt,Ce,!0))}),St}function ue(ct,Ct,xt,yt,Tt,St){var nt,Qe,Ce;if(Ce=Object.getOwnPropertyDescriptor(Ct,Tt)||{value:Ct[Tt]},Ce.get?Ce.set?Qe=ct.stylize("[Getter/Setter]","special"):Qe=ct.stylize("[Getter]","special"):Ce.set&&(Qe=ct.stylize("[Setter]","special")),vt(yt,Tt)||(nt="["+Tt+"]"),Qe||(ct.seen.indexOf(Ce.value)<0?(De(xt)?Qe=ee(ct,Ce.value,null):Qe=ee(ct,Ce.value,xt-1),Qe.indexOf(`
`)>-1&&(St?Qe=Qe.split(`
`).map(function(Ne){return" "+Ne}).join(`
`).slice(2):Qe=`
`+Qe.split(`
`).map(function(Ne){return" "+Ne}).join(`
`))):Qe=ct.stylize("[Circular]","special")),He(nt)){if(St&&Tt.match(/^\d+$/))return Qe;nt=JSON.stringify(""+Tt),nt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(nt=nt.slice(1,-1),nt=ct.stylize(nt,"name")):(nt=nt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),nt=ct.stylize(nt,"string"))}return nt+": "+Qe}function pe(ct,Ct,xt){var yt=0,Tt=ct.reduce(function(St,nt){return yt++,nt.indexOf(`
`)>=0&&yt++,St+nt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Tt>60?xt[0]+(Ct===""?"":Ct+`
`)+" "+ct.join(`,
`)+" "+xt[1]:xt[0]+Ct+" "+ct.join(", ")+" "+xt[1]}Ie.types=ae("./support/types");function Se(ct){return Array.isArray(ct)}Ie.isArray=Se;function Le(ct){return typeof ct=="boolean"}Ie.isBoolean=Le;function De(ct){return ct===null}Ie.isNull=De;function Fe(ct){return ct==null}Ie.isNullOrUndefined=Fe;function Ae(ct){return typeof ct=="number"}Ie.isNumber=Ae;function Oe(ct){return typeof ct=="string"}Ie.isString=Oe;function ze(ct){return typeof ct=="symbol"}Ie.isSymbol=ze;function He(ct){return ct===void 0}Ie.isUndefined=He;function Ye(ct){return We(ct)&&Et(ct)==="[object RegExp]"}Ie.isRegExp=Ye,Ie.types.isRegExp=Ye;function We(ct){return typeof ct=="object"&&ct!==null}Ie.isObject=We;function Ue(ct){return We(ct)&&Et(ct)==="[object Date]"}Ie.isDate=Ue,Ie.types.isDate=Ue;function st(ct){return We(ct)&&(Et(ct)==="[object Error]"||ct instanceof Error)}Ie.isError=st,Ie.types.isNativeError=st;function dt(ct){return typeof ct=="function"}Ie.isFunction=dt;function gt(ct){return ct===null||typeof ct=="boolean"||typeof ct=="number"||typeof ct=="string"||typeof ct=="symbol"||typeof ct=="undefined"}Ie.isPrimitive=gt,Ie.isBuffer=ae("./support/isBuffer");function Et(ct){return Object.prototype.toString.call(ct)}function Ke(ct){return ct<10?"0"+ct.toString(10):ct.toString(10)}var et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $e(){var ct=new Date,Ct=[Ke(ct.getHours()),Ke(ct.getMinutes()),Ke(ct.getSeconds())].join(":");return[ct.getDate(),et[ct.getMonth()],Ct].join(" ")}Ie.log=function(){console.log("%s - %s",$e(),Ie.format.apply(Ie,arguments))},Ie.inherits=ae("inherits"),Ie._extend=function(ct,Ct){if(!Ct||!We(Ct))return ct;for(var xt=Object.keys(Ct),yt=xt.length;yt--;)ct[xt[yt]]=Ct[xt[yt]];return ct};function vt(ct,Ct){return Object.prototype.hasOwnProperty.call(ct,Ct)}var wt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Ie.promisify=function(Ct){if(typeof Ct!="function")throw new TypeError('The "original" argument must be of type Function');if(wt&&Ct[wt]){var xt=Ct[wt];if(typeof xt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(xt,wt,{value:xt,enumerable:!1,writable:!1,configurable:!0}),xt}function xt(){for(var yt,Tt,St=new Promise(function(Ce,Ne){yt=Ce,Tt=Ne}),nt=[],Qe=0;Qe<arguments.length;Qe++)nt.push(arguments[Qe]);nt.push(function(Ce,Ne){Ce?Tt(Ce):yt(Ne)});try{Ct.apply(this,nt)}catch(Ce){Tt(Ce)}return St}return Object.setPrototypeOf(xt,Object.getPrototypeOf(Ct)),wt&&Object.defineProperty(xt,wt,{value:xt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(xt,de(Ct))},Ie.promisify.custom=wt;function ht(ct,Ct){if(!ct){var xt=new Error("Promise was rejected with a falsy value");xt.reason=ct,ct=xt}return Ct(ct)}function pt(ct){if(typeof ct!="function")throw new TypeError('The "original" argument must be of type Function');function Ct(){for(var xt=[],yt=0;yt<arguments.length;yt++)xt.push(arguments[yt]);var Tt=xt.pop();if(typeof Tt!="function")throw new TypeError("The last argument must be of type Function");var St=this,nt=function(){return Tt.apply(St,arguments)};ct.apply(this,xt).then(function(Qe){me.nextTick(nt.bind(null,null,Qe))},function(Qe){me.nextTick(ht.bind(null,Qe,nt))})}return Object.setPrototypeOf(Ct,Object.getPrototypeOf(ct)),Object.defineProperties(Ct,de(ct)),Ct}Ie.callbackify=pt}).call(this)}).call(this,ae("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=ae("for-each"),Ee=ae("available-typed-arrays"),we=ae("call-bind"),be=ae("call-bind/callBound"),Te=ae("gopd"),ve=be("Object.prototype.toString"),xe=ae("has-tostringtag/shams")(),fe=typeof globalThis=="undefined"?me:globalThis,z=Ee(),ee=be("String.prototype.slice"),oe=Object.getPrototypeOf,ie=be("Array.prototype.indexOf",!0)||function(Le,De){for(var Fe=0;Fe<Le.length;Fe+=1)if(Le[Fe]===De)return Fe;return-1},le={__proto__:null};xe&&Te&&oe?de(z,function(Se){var Le=new fe[Se];if(Symbol.toStringTag in Le){var De=oe(Le),Fe=Te(De,Symbol.toStringTag);if(!Fe){var Ae=oe(De);Fe=Te(Ae,Symbol.toStringTag)}le["$"+Se]=we(Fe.get)}}):de(z,function(Se){var Le=new fe[Se];le["$"+Se]=we(Le.slice)});var ue=function(Le){var De=!1;return de(le,function(Fe,Ae){if(!De)try{"$"+Fe(Le)===Ae&&(De=ee(Ae,1))}catch(Oe){}}),De},pe=function(Le){var De=!1;return de(le,function(Fe,Ae){if(!De)try{Fe(Le),De=ee(Ae,1)}catch(Oe){}}),De};Ge.exports=function(Le){if(!Le||typeof Le!="object")return!1;if(!xe){var De=ee(ve(Le),8,-1);return ie(z,De)>-1?De:De!=="Object"?!1:pe(Le)}return Te?ue(Le):null}}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(ae,Ge,Ie){(function(){"use strict";Ie.stripBOM=function(me){return me[0]==="\uFEFF"?me.substring(1):me}}).call(this)},{}],422:[function(ae,Ge,Ie){(function(){"use strict";var me,de,Ee,we,be,Te={}.hasOwnProperty;me=ae("xmlbuilder"),de=ae("./defaults").defaults,we=function(ve){return typeof ve=="string"&&(ve.indexOf("&")>=0||ve.indexOf(">")>=0||ve.indexOf("<")>=0)},be=function(ve){return"<![CDATA["+Ee(ve)+"]]>"},Ee=function(ve){return ve.replace("]]>","]]]]><![CDATA[>")},Ie.Builder=function(){function ve(xe){var fe,z,ee;this.options={},z=de["0.2"];for(fe in z)Te.call(z,fe)&&(ee=z[fe],this.options[fe]=ee);for(fe in xe)Te.call(xe,fe)&&(ee=xe[fe],this.options[fe]=ee)}return ve.prototype.buildObject=function(xe){var fe,z,ee,oe,ie;return fe=this.options.attrkey,z=this.options.charkey,Object.keys(xe).length===1&&this.options.rootName===de["0.2"].rootName?(ie=Object.keys(xe)[0],xe=xe[ie]):ie=this.options.rootName,ee=function(le){return function(ue,pe){var Se,Le,De,Fe,Ae,Oe;if(typeof pe!="object")le.options.cdata&&we(pe)?ue.raw(be(pe)):ue.txt(pe);else if(Array.isArray(pe)){for(Fe in pe)if(Te.call(pe,Fe)){Le=pe[Fe];for(Ae in Le)De=Le[Ae],ue=ee(ue.ele(Ae),De).up()}}else for(Ae in pe)if(Te.call(pe,Ae))if(Le=pe[Ae],Ae===fe){if(typeof Le=="object")for(Se in Le)Oe=Le[Se],ue=ue.att(Se,Oe)}else if(Ae===z)le.options.cdata&&we(Le)?ue=ue.raw(be(Le)):ue=ue.txt(Le);else if(Array.isArray(Le))for(Fe in Le)Te.call(Le,Fe)&&(De=Le[Fe],typeof De=="string"?le.options.cdata&&we(De)?ue=ue.ele(Ae).raw(be(De)).up():ue=ue.ele(Ae,De).up():ue=ee(ue.ele(Ae),De).up());else typeof Le=="object"?ue=ee(ue.ele(Ae),Le).up():typeof Le=="string"&&le.options.cdata&&we(Le)?ue=ue.ele(Ae).raw(be(Le)).up():(Le==null&&(Le=""),ue=ue.ele(Ae,Le.toString()).up());return ue}}(this),oe=me.create(ie,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ee(oe,xe).end(this.options.renderOpts)},ve}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(ae,Ge,Ie){(function(){Ie.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(ae,Ge,Ie){(function(){"use strict";var me,de,Ee,we,be,Te,ve,xe,fe,z=function(ie,le){return function(){return ie.apply(le,arguments)}},ee=function(ie,le){for(var ue in le)oe.call(le,ue)&&(ie[ue]=le[ue]);function pe(){this.constructor=ie}return pe.prototype=le.prototype,ie.prototype=new pe,ie.__super__=le.prototype,ie},oe={}.hasOwnProperty;xe=ae("sax"),we=ae("events"),me=ae("./bom"),ve=ae("./processors"),fe=ae("timers").setImmediate,de=ae("./defaults").defaults,be=function(ie){return typeof ie=="object"&&ie!=null&&Object.keys(ie).length===0},Te=function(ie,le,ue){var pe,Se,Le;for(pe=0,Se=ie.length;pe<Se;pe++)Le=ie[pe],le=Le(le,ue);return le},Ee=function(ie,le,ue){var pe;return pe=Object.create(null),pe.value=ue,pe.writable=!0,pe.enumerable=!0,pe.configurable=!0,Object.defineProperty(ie,le,pe)},Ie.Parser=function(ie){ee(le,ie);function le(ue){this.parseStringPromise=z(this.parseStringPromise,this),this.parseString=z(this.parseString,this),this.reset=z(this.reset,this),this.assignOrPush=z(this.assignOrPush,this),this.processAsync=z(this.processAsync,this);var pe,Se,Le;if(!(this instanceof Ie.Parser))return new Ie.Parser(ue);this.options={},Se=de["0.2"];for(pe in Se)oe.call(Se,pe)&&(Le=Se[pe],this.options[pe]=Le);for(pe in ue)oe.call(ue,pe)&&(Le=ue[pe],this.options[pe]=Le);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(ve.normalize)),this.reset()}return le.prototype.processAsync=function(){var ue,pe;try{return this.remaining.length<=this.options.chunkSize?(ue=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(ue),this.saxParser.close()):(ue=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(ue),fe(this.processAsync))}catch(Se){if(pe=Se,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(pe)}},le.prototype.assignOrPush=function(ue,pe,Se){return pe in ue?(ue[pe]instanceof Array||Ee(ue,pe,[ue[pe]]),ue[pe].push(Se)):this.options.explicitArray?Ee(ue,pe,[Se]):Ee(ue,pe,Se)},le.prototype.reset=function(){var ue,pe,Se,Le;return this.removeAllListeners(),this.saxParser=xe.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(De){return function(Fe){if(De.saxParser.resume(),!De.saxParser.errThrown)return De.saxParser.errThrown=!0,De.emit("error",Fe)}}(this),this.saxParser.onend=function(De){return function(){if(!De.saxParser.ended)return De.saxParser.ended=!0,De.emit("end",De.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,Le=[],ue=this.options.attrkey,pe=this.options.charkey,this.saxParser.onopentag=function(De){return function(Fe){var Ae,Oe,ze,He,Ye;if(ze={},ze[pe]="",!De.options.ignoreAttrs){Ye=Fe.attributes;for(Ae in Ye)oe.call(Ye,Ae)&&(!(ue in ze)&&!De.options.mergeAttrs&&(ze[ue]={}),Oe=De.options.attrValueProcessors?Te(De.options.attrValueProcessors,Fe.attributes[Ae],Ae):Fe.attributes[Ae],He=De.options.attrNameProcessors?Te(De.options.attrNameProcessors,Ae):Ae,De.options.mergeAttrs?De.assignOrPush(ze,He,Oe):Ee(ze[ue],He,Oe))}return ze["#name"]=De.options.tagNameProcessors?Te(De.options.tagNameProcessors,Fe.name):Fe.name,De.options.xmlns&&(ze[De.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),Le.push(ze)}}(this),this.saxParser.onclosetag=function(De){return function(){var Fe,Ae,Oe,ze,He,Ye,We,Ue,st,dt;if(Ye=Le.pop(),He=Ye["#name"],(!De.options.explicitChildren||!De.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(Fe=Ye.cdata,delete Ye.cdata),st=Le[Le.length-1],Ye[pe].match(/^\s*$/)&&!Fe?(Ae=Ye[pe],delete Ye[pe]):(De.options.trim&&(Ye[pe]=Ye[pe].trim()),De.options.normalize&&(Ye[pe]=Ye[pe].replace(/\s{2,}/g," ").trim()),Ye[pe]=De.options.valueProcessors?Te(De.options.valueProcessors,Ye[pe],He):Ye[pe],Object.keys(Ye).length===1&&pe in Ye&&!De.EXPLICIT_CHARKEY&&(Ye=Ye[pe])),be(Ye)&&(typeof De.options.emptyTag=="function"?Ye=De.options.emptyTag():Ye=De.options.emptyTag!==""?De.options.emptyTag:Ae),De.options.validator!=null&&(dt="/"+function(){var gt,Et,Ke;for(Ke=[],gt=0,Et=Le.length;gt<Et;gt++)ze=Le[gt],Ke.push(ze["#name"]);return Ke}().concat(He).join("/"),function(){var gt;try{return Ye=De.options.validator(dt,st&&st[He],Ye)}catch(Et){return gt=Et,De.emit("error",gt)}}()),De.options.explicitChildren&&!De.options.mergeAttrs&&typeof Ye=="object"){if(!De.options.preserveChildrenOrder)ze={},De.options.attrkey in Ye&&(ze[De.options.attrkey]=Ye[De.options.attrkey],delete Ye[De.options.attrkey]),!De.options.charsAsChildren&&De.options.charkey in Ye&&(ze[De.options.charkey]=Ye[De.options.charkey],delete Ye[De.options.charkey]),Object.getOwnPropertyNames(Ye).length>0&&(ze[De.options.childkey]=Ye),Ye=ze;else if(st){st[De.options.childkey]=st[De.options.childkey]||[],We={};for(Oe in Ye)oe.call(Ye,Oe)&&Ee(We,Oe,Ye[Oe]);st[De.options.childkey].push(We),delete Ye["#name"],Object.keys(Ye).length===1&&pe in Ye&&!De.EXPLICIT_CHARKEY&&(Ye=Ye[pe])}}return Le.length>0?De.assignOrPush(st,He,Ye):(De.options.explicitRoot&&(Ue=Ye,Ye={},Ee(Ye,He,Ue)),De.resultObject=Ye,De.saxParser.ended=!0,De.emit("end",De.resultObject))}}(this),Se=function(De){return function(Fe){var Ae,Oe;if(Oe=Le[Le.length-1],Oe)return Oe[pe]+=Fe,De.options.explicitChildren&&De.options.preserveChildrenOrder&&De.options.charsAsChildren&&(De.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Oe[De.options.childkey]=Oe[De.options.childkey]||[],Ae={"#name":"__text__"},Ae[pe]=Fe,De.options.normalize&&(Ae[pe]=Ae[pe].replace(/\s{2,}/g," ").trim()),Oe[De.options.childkey].push(Ae)),Oe}}(this),this.saxParser.ontext=Se,this.saxParser.oncdata=function(De){return function(Fe){var Ae;if(Ae=Se(Fe),Ae)return Ae.cdata=!0}}(this)},le.prototype.parseString=function(ue,pe){var Se;pe!=null&&typeof pe=="function"&&(this.on("end",function(Le){return this.reset(),pe(null,Le)}),this.on("error",function(Le){return this.reset(),pe(Le)}));try{return ue=ue.toString(),ue.trim()===""?(this.emit("end",null),!0):(ue=me.stripBOM(ue),this.options.async?(this.remaining=ue,fe(this.processAsync),this.saxParser):this.saxParser.write(ue).close())}catch(Le){if(Se=Le,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Se}else return this.emit("error",Se),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(ue){return new Promise(function(pe){return function(Se,Le){return pe.parseString(ue,function(De,Fe){return De?Le(De):Se(Fe)})}}(this))},le}(we),Ie.parseString=function(ie,le,ue){var pe,Se,Le;return ue!=null?(typeof ue=="function"&&(pe=ue),typeof le=="object"&&(Se=le)):(typeof le=="function"&&(pe=le),Se={}),Le=new Ie.Parser(Se),Le.parseString(ie,pe)},Ie.parseStringPromise=function(ie,le){var ue,pe;return typeof le=="object"&&(ue=le),pe=new Ie.Parser(ue),pe.parseStringPromise(ie)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(ae,Ge,Ie){(function(){"use strict";var me;me=new RegExp(/(?!xmlns)^.*:/),Ie.normalize=function(de){return de.toLowerCase()},Ie.firstCharLowerCase=function(de){return de.charAt(0).toLowerCase()+de.slice(1)},Ie.stripPrefix=function(de){return de.replace(me,"")},Ie.parseNumbers=function(de){return isNaN(de)||(de=de%1===0?parseInt(de,10):parseFloat(de)),de},Ie.parseBooleans=function(de){return/^(?:true|false)$/i.test(de)&&(de=de.toLowerCase()==="true"),de}}).call(this)},{}],426:[function(ae,Ge,Ie){(function(){"use strict";var me,de,Ee,we,be=function(ve,xe){for(var fe in xe)Te.call(xe,fe)&&(ve[fe]=xe[fe]);function z(){this.constructor=ve}return z.prototype=xe.prototype,ve.prototype=new z,ve.__super__=xe.prototype,ve},Te={}.hasOwnProperty;de=ae("./defaults"),me=ae("./builder"),Ee=ae("./parser"),we=ae("./processors"),Ie.defaults=de.defaults,Ie.processors=we,Ie.ValidationError=function(ve){be(xe,ve);function xe(fe){this.message=fe}return xe}(Error),Ie.Builder=me.Builder,Ie.Parser=Ee.Parser,Ie.parseString=Ee.parseString,Ie.parseStringPromise=Ee.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(ae,Ge,Ie){(function(){Ge.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(ae,Ge,Ie){(function(){Ge.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be,Te,ve,xe=[].slice,fe={}.hasOwnProperty;me=function(){var z,ee,oe,ie,le,ue;if(ue=arguments[0],le=2<=arguments.length?xe.call(arguments,1):[],be(Object.assign))Object.assign.apply(null,arguments);else for(z=0,oe=le.length;z<oe;z++)if(ie=le[z],ie!=null)for(ee in ie)fe.call(ie,ee)&&(ue[ee]=ie[ee]);return ue},be=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Te=function(z){var ee;return!!z&&((ee=typeof z)=="function"||ee==="object")},Ee=function(z){return be(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},we=function(z){var ee;if(Ee(z))return!z.length;for(ee in z)if(fe.call(z,ee))return!1;return!0},ve=function(z){var ee,oe;return Te(z)&&(oe=Object.getPrototypeOf(z))&&(ee=oe.constructor)&&typeof ee=="function"&&ee instanceof ee&&Function.prototype.toString.call(ee)===Function.prototype.toString.call(Object)},de=function(z){return be(z.valueOf)?z.valueOf():z},Ge.exports.assign=me,Ge.exports.isFunction=be,Ge.exports.isObject=Te,Ge.exports.isArray=Ee,Ge.exports.isEmpty=we,Ge.exports.isPlainObject=ve,Ge.exports.getValue=de}).call(this)},{}],430:[function(ae,Ge,Ie){(function(){Ge.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(ae,Ge,Ie){(function(){var me,de,Ee;me=ae("./NodeType"),Ee=ae("./XMLNode"),Ge.exports=de=function(){function we(be,Te,ve){if(this.parent=be,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Te==null)throw new Error("Missing attribute name. "+this.debugInfo(Te));this.name=this.stringify.name(Te),this.value=this.stringify.attValue(ve),this.type=me.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(we.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(we.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(we.prototype,"textContent",{get:function(){return this.value},set:function(be){return this.value=be||""}}),Object.defineProperty(we.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(we.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(we.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(we.prototype,"specified",{get:function(){return!0}}),we.prototype.clone=function(){return Object.create(this)},we.prototype.toString=function(be){return this.options.writer.attribute(this,this.options.writer.filterOptions(be))},we.prototype.debugInfo=function(be){return be=be||this.name,be==null?"parent: <"+this.parent.name+">":"attribute: {"+be+"}, parent: <"+this.parent.name+">"},we.prototype.isEqualNode=function(be){return!(be.namespaceURI!==this.namespaceURI||be.prefix!==this.prefix||be.localName!==this.localName||be.value!==this.value)},we}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;me=ae("./NodeType"),Ee=ae("./XMLCharacterData"),Ge.exports=de=function(Te){we(ve,Te);function ve(xe,fe){if(ve.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=me.CData,this.value=this.stringify.cdata(fe)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(xe){return this.options.writer.cdata(this,this.options.writer.filterOptions(xe))},ve}(Ee)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(ae,Ge,Ie){(function(){var me,de,Ee=function(be,Te){for(var ve in Te)we.call(Te,ve)&&(be[ve]=Te[ve]);function xe(){this.constructor=be}return xe.prototype=Te.prototype,be.prototype=new xe,be.__super__=Te.prototype,be},we={}.hasOwnProperty;de=ae("./XMLNode"),Ge.exports=me=function(be){Ee(Te,be);function Te(ve){Te.__super__.constructor.call(this,ve),this.value=""}return Object.defineProperty(Te.prototype,"data",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Object.defineProperty(Te.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Te.prototype,"textContent",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Te.prototype.clone=function(){return Object.create(this)},Te.prototype.substringData=function(ve,xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.appendData=function(ve){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.insertData=function(ve,xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.deleteData=function(ve,xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.replaceData=function(ve,xe,fe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isEqualNode=function(ve){return!(!Te.__super__.isEqualNode.apply(this,arguments).isEqualNode(ve)||ve.data!==this.data)},Te}(de)}).call(this)},{"./XMLNode":450}],434:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;me=ae("./NodeType"),de=ae("./XMLCharacterData"),Ge.exports=Ee=function(Te){we(ve,Te);function ve(xe,fe){if(ve.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=me.Comment,this.value=this.stringify.comment(fe)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(xe){return this.options.writer.comment(this,this.options.writer.filterOptions(xe))},ve}(de)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(ae,Ge,Ie){(function(){var me,de,Ee;de=ae("./XMLDOMErrorHandler"),Ee=ae("./XMLDOMStringList"),Ge.exports=me=function(){function we(){var be;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new de,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=be=Object.create(this.defaultParams)}return Object.defineProperty(we.prototype,"parameterNames",{get:function(){return new Ee(Object.keys(this.defaultParams))}}),we.prototype.getParameter=function(be){return this.params.hasOwnProperty(be)?this.params[be]:null},we.prototype.canSetParameter=function(be,Te){return!0},we.prototype.setParameter=function(be,Te){return Te!=null?this.params[be]=Te:delete this.params[be]},we}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(ae,Ge,Ie){(function(){var me;Ge.exports=me=function(){function de(){}return de.prototype.handleError=function(Ee){throw new Error(Ee)},de}()}).call(this)},{}],437:[function(ae,Ge,Ie){(function(){var me;Ge.exports=me=function(){function de(){}return de.prototype.hasFeature=function(Ee,we){return!0},de.prototype.createDocumentType=function(Ee,we,be){throw new Error("This DOM method is not implemented.")},de.prototype.createDocument=function(Ee,we,be){throw new Error("This DOM method is not implemented.")},de.prototype.createHTMLDocument=function(Ee){throw new Error("This DOM method is not implemented.")},de.prototype.getFeature=function(Ee,we){throw new Error("This DOM method is not implemented.")},de}()}).call(this)},{}],438:[function(ae,Ge,Ie){(function(){var me;Ge.exports=me=function(){function de(Ee){this.arr=Ee||[]}return Object.defineProperty(de.prototype,"length",{get:function(){return this.arr.length}}),de.prototype.item=function(Ee){return this.arr[Ee]||null},de.prototype.contains=function(Ee){return this.arr.indexOf(Ee)!==-1},de}()}).call(this)},{}],439:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;Ee=ae("./XMLNode"),me=ae("./NodeType"),Ge.exports=de=function(Te){we(ve,Te);function ve(xe,fe,z,ee,oe,ie){if(ve.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(fe));if(!ee)throw new Error("Missing DTD attribute type. "+this.debugInfo(fe));if(!oe)throw new Error("Missing DTD attribute default. "+this.debugInfo(fe));if(oe.indexOf("#")!==0&&(oe="#"+oe),!oe.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(fe));if(ie&&!oe.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(fe));this.elementName=this.stringify.name(fe),this.type=me.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(ee),ie&&(this.defaultValue=this.stringify.dtdAttDefault(ie)),this.defaultValueType=oe}return ve.prototype.toString=function(xe){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(xe))},ve}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;Ee=ae("./XMLNode"),me=ae("./NodeType"),Ge.exports=de=function(Te){we(ve,Te);function ve(xe,fe,z){if(ve.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(fe),this.type=me.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return ve.prototype.toString=function(xe){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(xe))},ve}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be=function(ve,xe){for(var fe in xe)Te.call(xe,fe)&&(ve[fe]=xe[fe]);function z(){this.constructor=ve}return z.prototype=xe.prototype,ve.prototype=new z,ve.__super__=xe.prototype,ve},Te={}.hasOwnProperty;we=ae("./Utility").isObject,Ee=ae("./XMLNode"),me=ae("./NodeType"),Ge.exports=de=function(ve){be(xe,ve);function xe(fe,z,ee,oe){if(xe.__super__.constructor.call(this,fe),ee==null)throw new Error("Missing DTD entity name. "+this.debugInfo(ee));if(oe==null)throw new Error("Missing DTD entity value. "+this.debugInfo(ee));if(this.pe=!!z,this.name=this.stringify.name(ee),this.type=me.EntityDeclaration,!we(oe))this.value=this.stringify.dtdEntityValue(oe),this.internal=!0;else{if(!oe.pubID&&!oe.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(ee));if(oe.pubID&&!oe.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(ee));if(this.internal=!1,oe.pubID!=null&&(this.pubID=this.stringify.dtdPubID(oe.pubID)),oe.sysID!=null&&(this.sysID=this.stringify.dtdSysID(oe.sysID)),oe.nData!=null&&(this.nData=this.stringify.dtdNData(oe.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(ee))}}return Object.defineProperty(xe.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(xe.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(xe.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(xe.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(xe.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(xe.prototype,"xmlVersion",{get:function(){return null}}),xe.prototype.toString=function(fe){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(fe))},xe}(Ee)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;Ee=ae("./XMLNode"),me=ae("./NodeType"),Ge.exports=de=function(Te){we(ve,Te);function ve(xe,fe,z){if(ve.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing DTD notation name. "+this.debugInfo(fe));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(fe));this.name=this.stringify.name(fe),this.type=me.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(ve.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(ve.prototype,"systemId",{get:function(){return this.sysID}}),ve.prototype.toString=function(xe){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(xe))},ve}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be=function(ve,xe){for(var fe in xe)Te.call(xe,fe)&&(ve[fe]=xe[fe]);function z(){this.constructor=ve}return z.prototype=xe.prototype,ve.prototype=new z,ve.__super__=xe.prototype,ve},Te={}.hasOwnProperty;we=ae("./Utility").isObject,Ee=ae("./XMLNode"),me=ae("./NodeType"),Ge.exports=de=function(ve){be(xe,ve);function xe(fe,z,ee,oe){var ie;xe.__super__.constructor.call(this,fe),we(z)&&(ie=z,z=ie.version,ee=ie.encoding,oe=ie.standalone),z||(z="1.0"),this.type=me.Declaration,this.version=this.stringify.xmlVersion(z),ee!=null&&(this.encoding=this.stringify.xmlEncoding(ee)),oe!=null&&(this.standalone=this.stringify.xmlStandalone(oe))}return xe.prototype.toString=function(fe){return this.options.writer.declaration(this,this.options.writer.filterOptions(fe))},xe}(Ee)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be,Te,ve,xe,fe,z=function(oe,ie){for(var le in ie)ee.call(ie,le)&&(oe[le]=ie[le]);function ue(){this.constructor=oe}return ue.prototype=ie.prototype,oe.prototype=new ue,oe.__super__=ie.prototype,oe},ee={}.hasOwnProperty;fe=ae("./Utility").isObject,xe=ae("./XMLNode"),me=ae("./NodeType"),de=ae("./XMLDTDAttList"),we=ae("./XMLDTDEntity"),Ee=ae("./XMLDTDElement"),be=ae("./XMLDTDNotation"),ve=ae("./XMLNamedNodeMap"),Ge.exports=Te=function(oe){z(ie,oe);function ie(le,ue,pe){var Se,Le,De,Fe,Ae,Oe;if(ie.__super__.constructor.call(this,le),this.type=me.DocType,le.children){for(Fe=le.children,Le=0,De=Fe.length;Le<De;Le++)if(Se=Fe[Le],Se.type===me.Element){this.name=Se.name;break}}this.documentObject=le,fe(ue)&&(Ae=ue,ue=Ae.pubID,pe=Ae.sysID),pe==null&&(Oe=[ue,pe],pe=Oe[0],ue=Oe[1]),ue!=null&&(this.pubID=this.stringify.dtdPubID(ue)),pe!=null&&(this.sysID=this.stringify.dtdSysID(pe))}return Object.defineProperty(ie.prototype,"entities",{get:function(){var le,ue,pe,Se,Le;for(Se={},Le=this.children,ue=0,pe=Le.length;ue<pe;ue++)le=Le[ue],le.type===me.EntityDeclaration&&!le.pe&&(Se[le.name]=le);return new ve(Se)}}),Object.defineProperty(ie.prototype,"notations",{get:function(){var le,ue,pe,Se,Le;for(Se={},Le=this.children,ue=0,pe=Le.length;ue<pe;ue++)le=Le[ue],le.type===me.NotationDeclaration&&(Se[le.name]=le);return new ve(Se)}}),Object.defineProperty(ie.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(ie.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(ie.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),ie.prototype.element=function(le,ue){var pe;return pe=new Ee(this,le,ue),this.children.push(pe),this},ie.prototype.attList=function(le,ue,pe,Se,Le){var De;return De=new de(this,le,ue,pe,Se,Le),this.children.push(De),this},ie.prototype.entity=function(le,ue){var pe;return pe=new we(this,!1,le,ue),this.children.push(pe),this},ie.prototype.pEntity=function(le,ue){var pe;return pe=new we(this,!0,le,ue),this.children.push(pe),this},ie.prototype.notation=function(le,ue){var pe;return pe=new be(this,le,ue),this.children.push(pe),this},ie.prototype.toString=function(le){return this.options.writer.docType(this,this.options.writer.filterOptions(le))},ie.prototype.ele=function(le,ue){return this.element(le,ue)},ie.prototype.att=function(le,ue,pe,Se,Le){return this.attList(le,ue,pe,Se,Le)},ie.prototype.ent=function(le,ue){return this.entity(le,ue)},ie.prototype.pent=function(le,ue){return this.pEntity(le,ue)},ie.prototype.not=function(le,ue){return this.notation(le,ue)},ie.prototype.up=function(){return this.root()||this.documentObject},ie.prototype.isEqualNode=function(le){return!(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.name!==this.name||le.publicId!==this.publicId||le.systemId!==this.systemId)},ie}(xe)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be,Te,ve,xe,fe=function(ee,oe){for(var ie in oe)z.call(oe,ie)&&(ee[ie]=oe[ie]);function le(){this.constructor=ee}return le.prototype=oe.prototype,ee.prototype=new le,ee.__super__=oe.prototype,ee},z={}.hasOwnProperty;xe=ae("./Utility").isPlainObject,Ee=ae("./XMLDOMImplementation"),de=ae("./XMLDOMConfiguration"),be=ae("./XMLNode"),me=ae("./NodeType"),ve=ae("./XMLStringifier"),Te=ae("./XMLStringWriter"),Ge.exports=we=function(ee){fe(oe,ee);function oe(ie){oe.__super__.constructor.call(this,null),this.name="#document",this.type=me.Document,this.documentURI=null,this.domConfig=new de,ie||(ie={}),ie.writer||(ie.writer=new Te),this.options=ie,this.stringify=new ve(ie)}return Object.defineProperty(oe.prototype,"implementation",{value:new Ee}),Object.defineProperty(oe.prototype,"doctype",{get:function(){var ie,le,ue,pe;for(pe=this.children,le=0,ue=pe.length;le<ue;le++)if(ie=pe[le],ie.type===me.DocType)return ie;return null}}),Object.defineProperty(oe.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(oe.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(oe.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(oe.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===me.Declaration?this.children[0].encoding:null}}),Object.defineProperty(oe.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===me.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(oe.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===me.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(oe.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(oe.prototype,"origin",{get:function(){return null}}),Object.defineProperty(oe.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(oe.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(oe.prototype,"contentType",{get:function(){return null}}),oe.prototype.end=function(ie){var le;return le={},ie?xe(ie)&&(le=ie,ie=this.options.writer):ie=this.options.writer,ie.document(this,ie.filterOptions(le))},oe.prototype.toString=function(ie){return this.options.writer.document(this,this.options.writer.filterOptions(ie))},oe.prototype.createElement=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createTextNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createComment=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createCDATASection=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createProcessingInstruction=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createAttribute=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createEntityReference=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.getElementsByTagName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.importNode=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createElementNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createAttributeNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.getElementsByTagNameNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.getElementById=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.adoptNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.renameNode=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.getElementsByClassName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createEvent=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createNodeIterator=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createTreeWalker=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe}(be)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be,Te,ve,xe,fe,z,ee,oe,ie,le,ue,pe,Se,Le,De,Fe,Ae,Oe,ze,He,Ye={}.hasOwnProperty;He=ae("./Utility"),Oe=He.isObject,Ae=He.isFunction,ze=He.isPlainObject,Fe=He.getValue,me=ae("./NodeType"),oe=ae("./XMLDocument"),le=ae("./XMLElement"),we=ae("./XMLCData"),be=ae("./XMLComment"),pe=ae("./XMLRaw"),De=ae("./XMLText"),ue=ae("./XMLProcessingInstruction"),z=ae("./XMLDeclaration"),ee=ae("./XMLDocType"),Te=ae("./XMLDTDAttList"),xe=ae("./XMLDTDEntity"),ve=ae("./XMLDTDElement"),fe=ae("./XMLDTDNotation"),Ee=ae("./XMLAttribute"),Le=ae("./XMLStringifier"),Se=ae("./XMLStringWriter"),de=ae("./WriterState"),Ge.exports=ie=function(){function We(Ue,st,dt){var gt;this.name="?xml",this.type=me.Document,Ue||(Ue={}),gt={},Ue.writer?ze(Ue.writer)&&(gt=Ue.writer,Ue.writer=new Se):Ue.writer=new Se,this.options=Ue,this.writer=Ue.writer,this.writerOptions=this.writer.filterOptions(gt),this.stringify=new Le(Ue),this.onDataCallback=st||function(){},this.onEndCallback=dt||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return We.prototype.createChildNode=function(Ue){var st,dt,gt,Et,Ke,et,$e,vt;switch(Ue.type){case me.CData:this.cdata(Ue.value);break;case me.Comment:this.comment(Ue.value);break;case me.Element:gt={},$e=Ue.attribs;for(dt in $e)Ye.call($e,dt)&&(st=$e[dt],gt[dt]=st.value);this.node(Ue.name,gt);break;case me.Dummy:this.dummy();break;case me.Raw:this.raw(Ue.value);break;case me.Text:this.text(Ue.value);break;case me.ProcessingInstruction:this.instruction(Ue.target,Ue.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ue.constructor.name)}for(vt=Ue.children,Ke=0,et=vt.length;Ke<et;Ke++)Et=vt[Ke],this.createChildNode(Et),Et.type===me.Element&&this.up();return this},We.prototype.dummy=function(){return this},We.prototype.node=function(Ue,st,dt){var gt;if(Ue==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(Ue));return this.openCurrent(),Ue=Fe(Ue),st==null&&(st={}),st=Fe(st),Oe(st)||(gt=[st,dt],dt=gt[0],st=gt[1]),this.currentNode=new le(this,Ue,st),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,dt!=null&&this.text(dt),this},We.prototype.element=function(Ue,st,dt){var gt,Et,Ke,et,$e,vt;if(this.currentNode&&this.currentNode.type===me.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ue)||Oe(Ue)||Ae(Ue))for(et=this.options.noValidation,this.options.noValidation=!0,vt=new oe(this.options).element("TEMP_ROOT"),vt.element(Ue),this.options.noValidation=et,$e=vt.children,Et=0,Ke=$e.length;Et<Ke;Et++)gt=$e[Et],this.createChildNode(gt),gt.type===me.Element&&this.up();else this.node(Ue,st,dt);return this},We.prototype.attribute=function(Ue,st){var dt,gt;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ue));if(Ue!=null&&(Ue=Fe(Ue)),Oe(Ue))for(dt in Ue)Ye.call(Ue,dt)&&(gt=Ue[dt],this.attribute(dt,gt));else Ae(st)&&(st=st.apply()),this.options.keepNullAttributes&&st==null?this.currentNode.attribs[Ue]=new Ee(this,Ue,""):st!=null&&(this.currentNode.attribs[Ue]=new Ee(this,Ue,st));return this},We.prototype.text=function(Ue){var st;return this.openCurrent(),st=new De(this,Ue),this.onData(this.writer.text(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.cdata=function(Ue){var st;return this.openCurrent(),st=new we(this,Ue),this.onData(this.writer.cdata(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.comment=function(Ue){var st;return this.openCurrent(),st=new be(this,Ue),this.onData(this.writer.comment(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.raw=function(Ue){var st;return this.openCurrent(),st=new pe(this,Ue),this.onData(this.writer.raw(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.instruction=function(Ue,st){var dt,gt,Et,Ke,et;if(this.openCurrent(),Ue!=null&&(Ue=Fe(Ue)),st!=null&&(st=Fe(st)),Array.isArray(Ue))for(dt=0,Ke=Ue.length;dt<Ke;dt++)gt=Ue[dt],this.instruction(gt);else if(Oe(Ue))for(gt in Ue)Ye.call(Ue,gt)&&(Et=Ue[gt],this.instruction(gt,Et));else Ae(st)&&(st=st.apply()),et=new ue(this,Ue,st),this.onData(this.writer.processingInstruction(et,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},We.prototype.declaration=function(Ue,st,dt){var gt;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return gt=new z(this,Ue,st,dt),this.onData(this.writer.declaration(gt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.doctype=function(Ue,st,dt){if(this.openCurrent(),Ue==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new ee(this,st,dt),this.currentNode.rootNodeName=Ue,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},We.prototype.dtdElement=function(Ue,st){var dt;return this.openCurrent(),dt=new ve(this,Ue,st),this.onData(this.writer.dtdElement(dt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.attList=function(Ue,st,dt,gt,Et){var Ke;return this.openCurrent(),Ke=new Te(this,Ue,st,dt,gt,Et),this.onData(this.writer.dtdAttList(Ke,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.entity=function(Ue,st){var dt;return this.openCurrent(),dt=new xe(this,!1,Ue,st),this.onData(this.writer.dtdEntity(dt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.pEntity=function(Ue,st){var dt;return this.openCurrent(),dt=new xe(this,!0,Ue,st),this.onData(this.writer.dtdEntity(dt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.notation=function(Ue,st){var dt;return this.openCurrent(),dt=new fe(this,Ue,st),this.onData(this.writer.dtdNotation(dt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},We.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},We.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},We.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},We.prototype.openNode=function(Ue){var st,dt,gt,Et;if(!Ue.isOpen){if(!this.root&&this.currentLevel===0&&Ue.type===me.Element&&(this.root=Ue),dt="",Ue.type===me.Element){this.writerOptions.state=de.OpenTag,dt=this.writer.indent(Ue,this.writerOptions,this.currentLevel)+"<"+Ue.name,Et=Ue.attribs;for(gt in Et)Ye.call(Et,gt)&&(st=Et[gt],dt+=this.writer.attribute(st,this.writerOptions,this.currentLevel));dt+=(Ue.children?">":"/>")+this.writer.endline(Ue,this.writerOptions,this.currentLevel),this.writerOptions.state=de.InsideTag}else this.writerOptions.state=de.OpenTag,dt=this.writer.indent(Ue,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ue.rootNodeName,Ue.pubID&&Ue.sysID?dt+=' PUBLIC "'+Ue.pubID+'" "'+Ue.sysID+'"':Ue.sysID&&(dt+=' SYSTEM "'+Ue.sysID+'"'),Ue.children?(dt+=" [",this.writerOptions.state=de.InsideTag):(this.writerOptions.state=de.CloseTag,dt+=">"),dt+=this.writer.endline(Ue,this.writerOptions,this.currentLevel);return this.onData(dt,this.currentLevel),Ue.isOpen=!0}},We.prototype.closeNode=function(Ue){var st;if(!Ue.isClosed)return st="",this.writerOptions.state=de.CloseTag,Ue.type===me.Element?st=this.writer.indent(Ue,this.writerOptions,this.currentLevel)+"</"+Ue.name+">"+this.writer.endline(Ue,this.writerOptions,this.currentLevel):st=this.writer.indent(Ue,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ue,this.writerOptions,this.currentLevel),this.writerOptions.state=de.None,this.onData(st,this.currentLevel),Ue.isClosed=!0},We.prototype.onData=function(Ue,st){return this.documentStarted=!0,this.onDataCallback(Ue,st+1)},We.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},We.prototype.debugInfo=function(Ue){return Ue==null?"":"node: <"+Ue+">"},We.prototype.ele=function(){return this.element.apply(this,arguments)},We.prototype.nod=function(Ue,st,dt){return this.node(Ue,st,dt)},We.prototype.txt=function(Ue){return this.text(Ue)},We.prototype.dat=function(Ue){return this.cdata(Ue)},We.prototype.com=function(Ue){return this.comment(Ue)},We.prototype.ins=function(Ue,st){return this.instruction(Ue,st)},We.prototype.dec=function(Ue,st,dt){return this.declaration(Ue,st,dt)},We.prototype.dtd=function(Ue,st,dt){return this.doctype(Ue,st,dt)},We.prototype.e=function(Ue,st,dt){return this.element(Ue,st,dt)},We.prototype.n=function(Ue,st,dt){return this.node(Ue,st,dt)},We.prototype.t=function(Ue){return this.text(Ue)},We.prototype.d=function(Ue){return this.cdata(Ue)},We.prototype.c=function(Ue){return this.comment(Ue)},We.prototype.r=function(Ue){return this.raw(Ue)},We.prototype.i=function(Ue,st){return this.instruction(Ue,st)},We.prototype.att=function(){return this.currentNode&&this.currentNode.type===me.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},We.prototype.a=function(){return this.currentNode&&this.currentNode.type===me.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},We.prototype.ent=function(Ue,st){return this.entity(Ue,st)},We.prototype.pent=function(Ue,st){return this.pEntity(Ue,st)},We.prototype.not=function(Ue,st){return this.notation(Ue,st)},We}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;Ee=ae("./XMLNode"),me=ae("./NodeType"),Ge.exports=de=function(Te){we(ve,Te);function ve(xe){ve.__super__.constructor.call(this,xe),this.type=me.Dummy}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(xe){return""},ve}(Ee)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be,Te,ve,xe,fe,z=function(oe,ie){for(var le in ie)ee.call(ie,le)&&(oe[le]=ie[le]);function ue(){this.constructor=oe}return ue.prototype=ie.prototype,oe.prototype=new ue,oe.__super__=ie.prototype,oe},ee={}.hasOwnProperty;fe=ae("./Utility"),xe=fe.isObject,ve=fe.isFunction,Te=fe.getValue,be=ae("./XMLNode"),me=ae("./NodeType"),de=ae("./XMLAttribute"),we=ae("./XMLNamedNodeMap"),Ge.exports=Ee=function(oe){z(ie,oe);function ie(le,ue,pe){var Se,Le,De,Fe;if(ie.__super__.constructor.call(this,le),ue==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ue),this.type=me.Element,this.attribs={},this.schemaTypeInfo=null,pe!=null&&this.attribute(pe),le.type===me.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(Fe=le.children,Le=0,De=Fe.length;Le<De;Le++)if(Se=Fe[Le],Se.type===me.DocType){Se.name=this.name;break}}}return Object.defineProperty(ie.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ie.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ie.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new we(this.attribs)),this.attributeMap}}),ie.prototype.clone=function(){var le,ue,pe,Se;pe=Object.create(this),pe.isRoot&&(pe.documentObject=null),pe.attribs={},Se=this.attribs;for(ue in Se)ee.call(Se,ue)&&(le=Se[ue],pe.attribs[ue]=le.clone());return pe.children=[],this.children.forEach(function(Le){var De;return De=Le.clone(),De.parent=pe,pe.children.push(De)}),pe},ie.prototype.attribute=function(le,ue){var pe,Se;if(le!=null&&(le=Te(le)),xe(le))for(pe in le)ee.call(le,pe)&&(Se=le[pe],this.attribute(pe,Se));else ve(ue)&&(ue=ue.apply()),this.options.keepNullAttributes&&ue==null?this.attribs[le]=new de(this,le,""):ue!=null&&(this.attribs[le]=new de(this,le,ue));return this},ie.prototype.removeAttribute=function(le){var ue,pe,Se;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=Te(le),Array.isArray(le))for(pe=0,Se=le.length;pe<Se;pe++)ue=le[pe],delete this.attribs[ue];else delete this.attribs[le];return this},ie.prototype.toString=function(le){return this.options.writer.element(this,this.options.writer.filterOptions(le))},ie.prototype.att=function(le,ue){return this.attribute(le,ue)},ie.prototype.a=function(le,ue){return this.attribute(le,ue)},ie.prototype.getAttribute=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le].value:null},ie.prototype.setAttribute=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNode=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le]:null},ie.prototype.setAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNS=function(le,ue,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNodeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNodeNS=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.hasAttribute=function(le){return this.attribs.hasOwnProperty(le)},ie.prototype.hasAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttribute=function(le,ue){return this.attribs.hasOwnProperty(le)?this.attribs[le].isId:ue},ie.prototype.setIdAttributeNS=function(le,ue,pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttributeNode=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByClassName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.isEqualNode=function(le){var ue,pe,Se;if(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.namespaceURI!==this.namespaceURI||le.prefix!==this.prefix||le.localName!==this.localName||le.attribs.length!==this.attribs.length)return!1;for(ue=pe=0,Se=this.attribs.length-1;0<=Se?pe<=Se:pe>=Se;ue=0<=Se?++pe:--pe)if(!this.attribs[ue].isEqualNode(le.attribs[ue]))return!1;return!0},ie}(be)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(ae,Ge,Ie){(function(){var me;Ge.exports=me=function(){function de(Ee){this.nodes=Ee}return Object.defineProperty(de.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),de.prototype.clone=function(){return this.nodes=null},de.prototype.getNamedItem=function(Ee){return this.nodes[Ee]},de.prototype.setNamedItem=function(Ee){var we;return we=this.nodes[Ee.nodeName],this.nodes[Ee.nodeName]=Ee,we||null},de.prototype.removeNamedItem=function(Ee){var we;return we=this.nodes[Ee],delete this.nodes[Ee],we||null},de.prototype.item=function(Ee){return this.nodes[Object.keys(this.nodes)[Ee]]||null},de.prototype.getNamedItemNS=function(Ee,we){throw new Error("This DOM method is not implemented.")},de.prototype.setNamedItemNS=function(Ee){throw new Error("This DOM method is not implemented.")},de.prototype.removeNamedItemNS=function(Ee,we){throw new Error("This DOM method is not implemented.")},de}()}).call(this)},{}],450:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be,Te,ve,xe,fe,z,ee,oe,ie,le,ue,pe,Se,Le,De,Fe={}.hasOwnProperty;De=ae("./Utility"),Le=De.isObject,Se=De.isFunction,pe=De.isEmpty,ue=De.getValue,xe=null,Ee=null,we=null,be=null,Te=null,ie=null,le=null,oe=null,ve=null,de=null,ee=null,fe=null,me=null,Ge.exports=z=function(){function Ae(Oe){this.parent=Oe,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,xe||(xe=ae("./XMLElement"),Ee=ae("./XMLCData"),we=ae("./XMLComment"),be=ae("./XMLDeclaration"),Te=ae("./XMLDocType"),ie=ae("./XMLRaw"),le=ae("./XMLText"),oe=ae("./XMLProcessingInstruction"),ve=ae("./XMLDummy"),de=ae("./NodeType"),ee=ae("./XMLNodeList"),fe=ae("./XMLNamedNodeMap"),me=ae("./DocumentPosition"))}return Object.defineProperty(Ae.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Ae.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ae.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Ae.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Ae.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new ee(this.children)),this.childNodeList}}),Object.defineProperty(Ae.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Ae.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Ae.prototype,"previousSibling",{get:function(){var Oe;return Oe=this.parent.children.indexOf(this),this.parent.children[Oe-1]||null}}),Object.defineProperty(Ae.prototype,"nextSibling",{get:function(){var Oe;return Oe=this.parent.children.indexOf(this),this.parent.children[Oe+1]||null}}),Object.defineProperty(Ae.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Ae.prototype,"textContent",{get:function(){var Oe,ze,He,Ye,We;if(this.nodeType===de.Element||this.nodeType===de.DocumentFragment){for(We="",Ye=this.children,ze=0,He=Ye.length;ze<He;ze++)Oe=Ye[ze],Oe.textContent&&(We+=Oe.textContent);return We}else return null},set:function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Ae.prototype.setParent=function(Oe){var ze,He,Ye,We,Ue;for(this.parent=Oe,Oe&&(this.options=Oe.options,this.stringify=Oe.stringify),We=this.children,Ue=[],He=0,Ye=We.length;He<Ye;He++)ze=We[He],Ue.push(ze.setParent(this));return Ue},Ae.prototype.element=function(Oe,ze,He){var Ye,We,Ue,st,dt,gt,Et,Ke,et,$e,vt;if(gt=null,ze===null&&He==null&&(et=[{},null],ze=et[0],He=et[1]),ze==null&&(ze={}),ze=ue(ze),Le(ze)||($e=[ze,He],He=$e[0],ze=$e[1]),Oe!=null&&(Oe=ue(Oe)),Array.isArray(Oe))for(Ue=0,Et=Oe.length;Ue<Et;Ue++)We=Oe[Ue],gt=this.element(We);else if(Se(Oe))gt=this.element(Oe.apply());else if(Le(Oe)){for(dt in Oe)if(Fe.call(Oe,dt))if(vt=Oe[dt],Se(vt)&&(vt=vt.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&dt.indexOf(this.stringify.convertAttKey)===0)gt=this.attribute(dt.substr(this.stringify.convertAttKey.length),vt);else if(!this.options.separateArrayItems&&Array.isArray(vt)&&pe(vt))gt=this.dummy();else if(Le(vt)&&pe(vt))gt=this.element(dt);else if(!this.options.keepNullNodes&&vt==null)gt=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(vt))for(st=0,Ke=vt.length;st<Ke;st++)We=vt[st],Ye={},Ye[dt]=We,gt=this.element(Ye);else Le(vt)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&dt.indexOf(this.stringify.convertTextKey)===0?gt=this.element(vt):(gt=this.element(dt),gt.element(vt)):gt=this.element(dt,vt)}else!this.options.keepNullNodes&&He===null?gt=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Oe.indexOf(this.stringify.convertTextKey)===0?gt=this.text(He):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Oe.indexOf(this.stringify.convertCDataKey)===0?gt=this.cdata(He):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Oe.indexOf(this.stringify.convertCommentKey)===0?gt=this.comment(He):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Oe.indexOf(this.stringify.convertRawKey)===0?gt=this.raw(He):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Oe.indexOf(this.stringify.convertPIKey)===0?gt=this.instruction(Oe.substr(this.stringify.convertPIKey.length),He):gt=this.node(Oe,ze,He);if(gt==null)throw new Error("Could not create any elements with: "+Oe+". "+this.debugInfo());return gt},Ae.prototype.insertBefore=function(Oe,ze,He){var Ye,We,Ue,st,dt;if(Oe!=null&&Oe.type)return Ue=Oe,st=ze,Ue.setParent(this),st?(We=children.indexOf(st),dt=children.splice(We),children.push(Ue),Array.prototype.push.apply(children,dt)):children.push(Ue),Ue;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Oe));return We=this.parent.children.indexOf(this),dt=this.parent.children.splice(We),Ye=this.parent.element(Oe,ze,He),Array.prototype.push.apply(this.parent.children,dt),Ye},Ae.prototype.insertAfter=function(Oe,ze,He){var Ye,We,Ue;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Oe));return We=this.parent.children.indexOf(this),Ue=this.parent.children.splice(We+1),Ye=this.parent.element(Oe,ze,He),Array.prototype.push.apply(this.parent.children,Ue),Ye},Ae.prototype.remove=function(){var Oe,ze;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Oe=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Oe,Oe-Oe+1].concat(ze=[])),this.parent},Ae.prototype.node=function(Oe,ze,He){var Ye,We;return Oe!=null&&(Oe=ue(Oe)),ze||(ze={}),ze=ue(ze),Le(ze)||(We=[ze,He],He=We[0],ze=We[1]),Ye=new xe(this,Oe,ze),He!=null&&Ye.text(He),this.children.push(Ye),Ye},Ae.prototype.text=function(Oe){var ze;return Le(Oe)&&this.element(Oe),ze=new le(this,Oe),this.children.push(ze),this},Ae.prototype.cdata=function(Oe){var ze;return ze=new Ee(this,Oe),this.children.push(ze),this},Ae.prototype.comment=function(Oe){var ze;return ze=new we(this,Oe),this.children.push(ze),this},Ae.prototype.commentBefore=function(Oe){var ze,He,Ye;return He=this.parent.children.indexOf(this),Ye=this.parent.children.splice(He),ze=this.parent.comment(Oe),Array.prototype.push.apply(this.parent.children,Ye),this},Ae.prototype.commentAfter=function(Oe){var ze,He,Ye;return He=this.parent.children.indexOf(this),Ye=this.parent.children.splice(He+1),ze=this.parent.comment(Oe),Array.prototype.push.apply(this.parent.children,Ye),this},Ae.prototype.raw=function(Oe){var ze;return ze=new ie(this,Oe),this.children.push(ze),this},Ae.prototype.dummy=function(){var Oe;return Oe=new ve(this),Oe},Ae.prototype.instruction=function(Oe,ze){var He,Ye,We,Ue,st;if(Oe!=null&&(Oe=ue(Oe)),ze!=null&&(ze=ue(ze)),Array.isArray(Oe))for(Ue=0,st=Oe.length;Ue<st;Ue++)He=Oe[Ue],this.instruction(He);else if(Le(Oe))for(He in Oe)Fe.call(Oe,He)&&(Ye=Oe[He],this.instruction(He,Ye));else Se(ze)&&(ze=ze.apply()),We=new oe(this,Oe,ze),this.children.push(We);return this},Ae.prototype.instructionBefore=function(Oe,ze){var He,Ye,We;return Ye=this.parent.children.indexOf(this),We=this.parent.children.splice(Ye),He=this.parent.instruction(Oe,ze),Array.prototype.push.apply(this.parent.children,We),this},Ae.prototype.instructionAfter=function(Oe,ze){var He,Ye,We;return Ye=this.parent.children.indexOf(this),We=this.parent.children.splice(Ye+1),He=this.parent.instruction(Oe,ze),Array.prototype.push.apply(this.parent.children,We),this},Ae.prototype.declaration=function(Oe,ze,He){var Ye,We;return Ye=this.document(),We=new be(Ye,Oe,ze,He),Ye.children.length===0?Ye.children.unshift(We):Ye.children[0].type===de.Declaration?Ye.children[0]=We:Ye.children.unshift(We),Ye.root()||Ye},Ae.prototype.dtd=function(Oe,ze){var He,Ye,We,Ue,st,dt,gt,Et,Ke,et;for(Ye=this.document(),We=new Te(Ye,Oe,ze),Ke=Ye.children,Ue=st=0,gt=Ke.length;st<gt;Ue=++st)if(He=Ke[Ue],He.type===de.DocType)return Ye.children[Ue]=We,We;for(et=Ye.children,Ue=dt=0,Et=et.length;dt<Et;Ue=++dt)if(He=et[Ue],He.isRoot)return Ye.children.splice(Ue,0,We),We;return Ye.children.push(We),We},Ae.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},Ae.prototype.root=function(){var Oe;for(Oe=this;Oe;){if(Oe.type===de.Document)return Oe.rootObject;if(Oe.isRoot)return Oe;Oe=Oe.parent}},Ae.prototype.document=function(){var Oe;for(Oe=this;Oe;){if(Oe.type===de.Document)return Oe;Oe=Oe.parent}},Ae.prototype.end=function(Oe){return this.document().end(Oe)},Ae.prototype.prev=function(){var Oe;if(Oe=this.parent.children.indexOf(this),Oe<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Oe-1]},Ae.prototype.next=function(){var Oe;if(Oe=this.parent.children.indexOf(this),Oe===-1||Oe===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Oe+1]},Ae.prototype.importDocument=function(Oe){var ze;return ze=Oe.root().clone(),ze.parent=this,ze.isRoot=!1,this.children.push(ze),this},Ae.prototype.debugInfo=function(Oe){var ze,He;return Oe=Oe||this.name,Oe==null&&!((ze=this.parent)!=null&&ze.name)?"":Oe==null?"parent: <"+this.parent.name+">":(He=this.parent)!=null&&He.name?"node: <"+Oe+">, parent: <"+this.parent.name+">":"node: <"+Oe+">"},Ae.prototype.ele=function(Oe,ze,He){return this.element(Oe,ze,He)},Ae.prototype.nod=function(Oe,ze,He){return this.node(Oe,ze,He)},Ae.prototype.txt=function(Oe){return this.text(Oe)},Ae.prototype.dat=function(Oe){return this.cdata(Oe)},Ae.prototype.com=function(Oe){return this.comment(Oe)},Ae.prototype.ins=function(Oe,ze){return this.instruction(Oe,ze)},Ae.prototype.doc=function(){return this.document()},Ae.prototype.dec=function(Oe,ze,He){return this.declaration(Oe,ze,He)},Ae.prototype.e=function(Oe,ze,He){return this.element(Oe,ze,He)},Ae.prototype.n=function(Oe,ze,He){return this.node(Oe,ze,He)},Ae.prototype.t=function(Oe){return this.text(Oe)},Ae.prototype.d=function(Oe){return this.cdata(Oe)},Ae.prototype.c=function(Oe){return this.comment(Oe)},Ae.prototype.r=function(Oe){return this.raw(Oe)},Ae.prototype.i=function(Oe,ze){return this.instruction(Oe,ze)},Ae.prototype.u=function(){return this.up()},Ae.prototype.importXMLBuilder=function(Oe){return this.importDocument(Oe)},Ae.prototype.replaceChild=function(Oe,ze){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.removeChild=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.appendChild=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.hasChildNodes=function(){return this.children.length!==0},Ae.prototype.cloneNode=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isSupported=function(Oe,ze){return!0},Ae.prototype.hasAttributes=function(){return this.attribs.length!==0},Ae.prototype.compareDocumentPosition=function(Oe){var ze,He;return ze=this,ze===Oe?0:this.document()!==Oe.document()?(He=me.Disconnected|me.ImplementationSpecific,Math.random()<.5?He|=me.Preceding:He|=me.Following,He):ze.isAncestor(Oe)?me.Contains|me.Preceding:ze.isDescendant(Oe)?me.Contains|me.Following:ze.isPreceding(Oe)?me.Preceding:me.Following},Ae.prototype.isSameNode=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.lookupPrefix=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isDefaultNamespace=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.lookupNamespaceURI=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.isEqualNode=function(Oe){var ze,He,Ye;if(Oe.nodeType!==this.nodeType||Oe.children.length!==this.children.length)return!1;for(ze=He=0,Ye=this.children.length-1;0<=Ye?He<=Ye:He>=Ye;ze=0<=Ye?++He:--He)if(!this.children[ze].isEqualNode(Oe.children[ze]))return!1;return!0},Ae.prototype.getFeature=function(Oe,ze){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.setUserData=function(Oe,ze,He){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.getUserData=function(Oe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ae.prototype.contains=function(Oe){return Oe?Oe===this||this.isDescendant(Oe):!1},Ae.prototype.isDescendant=function(Oe){var ze,He,Ye,We,Ue;for(Ue=this.children,Ye=0,We=Ue.length;Ye<We;Ye++)if(ze=Ue[Ye],Oe===ze||(He=ze.isDescendant(Oe),He))return!0;return!1},Ae.prototype.isAncestor=function(Oe){return Oe.isDescendant(this)},Ae.prototype.isPreceding=function(Oe){var ze,He;return ze=this.treePosition(Oe),He=this.treePosition(this),ze===-1||He===-1?!1:ze<He},Ae.prototype.isFollowing=function(Oe){var ze,He;return ze=this.treePosition(Oe),He=this.treePosition(this),ze===-1||He===-1?!1:ze>He},Ae.prototype.treePosition=function(Oe){var ze,He;return He=0,ze=!1,this.foreachTreeNode(this.document(),function(Ye){if(He++,!ze&&Ye===Oe)return ze=!0}),ze?He:-1},Ae.prototype.foreachTreeNode=function(Oe,ze){var He,Ye,We,Ue,st;for(Oe||(Oe=this.document()),Ue=Oe.children,Ye=0,We=Ue.length;Ye<We;Ye++){if(He=Ue[Ye],st=ze(He))return st;if(st=this.foreachTreeNode(He,ze),st)return st}},Ae}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(ae,Ge,Ie){(function(){var me;Ge.exports=me=function(){function de(Ee){this.nodes=Ee}return Object.defineProperty(de.prototype,"length",{get:function(){return this.nodes.length||0}}),de.prototype.clone=function(){return this.nodes=null},de.prototype.item=function(Ee){return this.nodes[Ee]||null},de}()}).call(this)},{}],452:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;me=ae("./NodeType"),de=ae("./XMLCharacterData"),Ge.exports=Ee=function(Te){we(ve,Te);function ve(xe,fe,z){if(ve.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=me.ProcessingInstruction,this.target=this.stringify.insTarget(fe),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(xe){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(xe))},ve.prototype.isEqualNode=function(xe){return!(!ve.__super__.isEqualNode.apply(this,arguments).isEqualNode(xe)||xe.target!==this.target)},ve}(de)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;me=ae("./NodeType"),de=ae("./XMLNode"),Ge.exports=Ee=function(Te){we(ve,Te);function ve(xe,fe){if(ve.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=me.Raw,this.value=this.stringify.raw(fe)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(xe){return this.options.writer.raw(this,this.options.writer.filterOptions(xe))},ve}(de)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be=function(ve,xe){for(var fe in xe)Te.call(xe,fe)&&(ve[fe]=xe[fe]);function z(){this.constructor=ve}return z.prototype=xe.prototype,ve.prototype=new z,ve.__super__=xe.prototype,ve},Te={}.hasOwnProperty;me=ae("./NodeType"),we=ae("./XMLWriterBase"),de=ae("./WriterState"),Ge.exports=Ee=function(ve){be(xe,ve);function xe(fe,z){this.stream=fe,xe.__super__.constructor.call(this,z)}return xe.prototype.endline=function(fe,z,ee){return fe.isLastRootNode&&z.state===de.CloseTag?"":xe.__super__.endline.call(this,fe,z,ee)},xe.prototype.document=function(fe,z){var ee,oe,ie,le,ue,pe,Se,Le,De;for(Se=fe.children,oe=ie=0,ue=Se.length;ie<ue;oe=++ie)ee=Se[oe],ee.isLastRootNode=oe===fe.children.length-1;for(z=this.filterOptions(z),Le=fe.children,De=[],le=0,pe=Le.length;le<pe;le++)ee=Le[le],De.push(this.writeChildNode(ee,z,0));return De},xe.prototype.attribute=function(fe,z,ee){return this.stream.write(xe.__super__.attribute.call(this,fe,z,ee))},xe.prototype.cdata=function(fe,z,ee){return this.stream.write(xe.__super__.cdata.call(this,fe,z,ee))},xe.prototype.comment=function(fe,z,ee){return this.stream.write(xe.__super__.comment.call(this,fe,z,ee))},xe.prototype.declaration=function(fe,z,ee){return this.stream.write(xe.__super__.declaration.call(this,fe,z,ee))},xe.prototype.docType=function(fe,z,ee){var oe,ie,le,ue;if(ee||(ee=0),this.openNode(fe,z,ee),z.state=de.OpenTag,this.stream.write(this.indent(fe,z,ee)),this.stream.write("<!DOCTYPE "+fe.root().name),fe.pubID&&fe.sysID?this.stream.write(' PUBLIC "'+fe.pubID+'" "'+fe.sysID+'"'):fe.sysID&&this.stream.write(' SYSTEM "'+fe.sysID+'"'),fe.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(fe,z,ee)),z.state=de.InsideTag,ue=fe.children,ie=0,le=ue.length;ie<le;ie++)oe=ue[ie],this.writeChildNode(oe,z,ee+1);z.state=de.CloseTag,this.stream.write("]")}return z.state=de.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(fe,z,ee)),z.state=de.None,this.closeNode(fe,z,ee)},xe.prototype.element=function(fe,z,ee){var oe,ie,le,ue,pe,Se,Le,De,Fe,Ae;ee||(ee=0),this.openNode(fe,z,ee),z.state=de.OpenTag,this.stream.write(this.indent(fe,z,ee)+"<"+fe.name),Fe=fe.attribs;for(Le in Fe)Te.call(Fe,Le)&&(oe=Fe[Le],this.attribute(oe,z,ee));if(le=fe.children.length,ue=le===0?null:fe.children[0],le===0||fe.children.every(function(Oe){return(Oe.type===me.Text||Oe.type===me.Raw)&&Oe.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=de.CloseTag,this.stream.write("</"+fe.name+">")):(z.state=de.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&le===1&&(ue.type===me.Text||ue.type===me.Raw)&&ue.value!=null)this.stream.write(">"),z.state=de.InsideTag,z.suppressPrettyCount++,De=!0,this.writeChildNode(ue,z,ee+1),z.suppressPrettyCount--,De=!1,z.state=de.CloseTag,this.stream.write("</"+fe.name+">");else{for(this.stream.write(">"+this.endline(fe,z,ee)),z.state=de.InsideTag,Ae=fe.children,pe=0,Se=Ae.length;pe<Se;pe++)ie=Ae[pe],this.writeChildNode(ie,z,ee+1);z.state=de.CloseTag,this.stream.write(this.indent(fe,z,ee)+"</"+fe.name+">")}return this.stream.write(this.endline(fe,z,ee)),z.state=de.None,this.closeNode(fe,z,ee)},xe.prototype.processingInstruction=function(fe,z,ee){return this.stream.write(xe.__super__.processingInstruction.call(this,fe,z,ee))},xe.prototype.raw=function(fe,z,ee){return this.stream.write(xe.__super__.raw.call(this,fe,z,ee))},xe.prototype.text=function(fe,z,ee){return this.stream.write(xe.__super__.text.call(this,fe,z,ee))},xe.prototype.dtdAttList=function(fe,z,ee){return this.stream.write(xe.__super__.dtdAttList.call(this,fe,z,ee))},xe.prototype.dtdElement=function(fe,z,ee){return this.stream.write(xe.__super__.dtdElement.call(this,fe,z,ee))},xe.prototype.dtdEntity=function(fe,z,ee){return this.stream.write(xe.__super__.dtdEntity.call(this,fe,z,ee))},xe.prototype.dtdNotation=function(fe,z,ee){return this.stream.write(xe.__super__.dtdNotation.call(this,fe,z,ee))},xe}(we)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(ae,Ge,Ie){(function(){var me,de,Ee=function(be,Te){for(var ve in Te)we.call(Te,ve)&&(be[ve]=Te[ve]);function xe(){this.constructor=be}return xe.prototype=Te.prototype,be.prototype=new xe,be.__super__=Te.prototype,be},we={}.hasOwnProperty;de=ae("./XMLWriterBase"),Ge.exports=me=function(be){Ee(Te,be);function Te(ve){Te.__super__.constructor.call(this,ve)}return Te.prototype.document=function(ve,xe){var fe,z,ee,oe,ie;for(xe=this.filterOptions(xe),oe="",ie=ve.children,z=0,ee=ie.length;z<ee;z++)fe=ie[z],oe+=this.writeChildNode(fe,xe,0);return xe.pretty&&oe.slice(-xe.newline.length)===xe.newline&&(oe=oe.slice(0,-xe.newline.length)),oe},Te}(de)}).call(this)},{"./XMLWriterBase":458}],456:[function(ae,Ge,Ie){(function(){var me,de=function(we,be){return function(){return we.apply(be,arguments)}},Ee={}.hasOwnProperty;Ge.exports=me=function(){function we(be){this.assertLegalName=de(this.assertLegalName,this),this.assertLegalChar=de(this.assertLegalChar,this);var Te,ve,xe;be||(be={}),this.options=be,this.options.version||(this.options.version="1.0"),ve=be.stringify||{};for(Te in ve)Ee.call(ve,Te)&&(xe=ve[Te],this[Te]=xe)}return we.prototype.name=function(be){return this.options.noValidation?be:this.assertLegalName(""+be||"")},we.prototype.text=function(be){return this.options.noValidation?be:this.assertLegalChar(this.textEscape(""+be||""))},we.prototype.cdata=function(be){return this.options.noValidation?be:(be=""+be||"",be=be.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(be))},we.prototype.comment=function(be){if(this.options.noValidation)return be;if(be=""+be||"",be.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+be);return this.assertLegalChar(be)},we.prototype.raw=function(be){return this.options.noValidation?be:""+be||""},we.prototype.attValue=function(be){return this.options.noValidation?be:this.assertLegalChar(this.attEscape(be=""+be||""))},we.prototype.insTarget=function(be){return this.options.noValidation?be:this.assertLegalChar(""+be||"")},we.prototype.insValue=function(be){if(this.options.noValidation)return be;if(be=""+be||"",be.match(/\?>/))throw new Error("Invalid processing instruction value: "+be);return this.assertLegalChar(be)},we.prototype.xmlVersion=function(be){if(this.options.noValidation)return be;if(be=""+be||"",!be.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+be);return be},we.prototype.xmlEncoding=function(be){if(this.options.noValidation)return be;if(be=""+be||"",!be.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+be);return this.assertLegalChar(be)},we.prototype.xmlStandalone=function(be){return this.options.noValidation?be:be?"yes":"no"},we.prototype.dtdPubID=function(be){return this.options.noValidation?be:this.assertLegalChar(""+be||"")},we.prototype.dtdSysID=function(be){return this.options.noValidation?be:this.assertLegalChar(""+be||"")},we.prototype.dtdElementValue=function(be){return this.options.noValidation?be:this.assertLegalChar(""+be||"")},we.prototype.dtdAttType=function(be){return this.options.noValidation?be:this.assertLegalChar(""+be||"")},we.prototype.dtdAttDefault=function(be){return this.options.noValidation?be:this.assertLegalChar(""+be||"")},we.prototype.dtdEntityValue=function(be){return this.options.noValidation?be:this.assertLegalChar(""+be||"")},we.prototype.dtdNData=function(be){return this.options.noValidation?be:this.assertLegalChar(""+be||"")},we.prototype.convertAttKey="@",we.prototype.convertPIKey="?",we.prototype.convertTextKey="#text",we.prototype.convertCDataKey="#cdata",we.prototype.convertCommentKey="#comment",we.prototype.convertRawKey="#raw",we.prototype.assertLegalChar=function(be){var Te,ve;if(this.options.noValidation)return be;if(Te="",this.options.version==="1.0"){if(Te=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=be.match(Te))throw new Error("Invalid character in string: "+be+" at index "+ve.index)}else if(this.options.version==="1.1"&&(Te=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=be.match(Te)))throw new Error("Invalid character in string: "+be+" at index "+ve.index);return be},we.prototype.assertLegalName=function(be){var Te;if(this.options.noValidation)return be;if(this.assertLegalChar(be),Te=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!be.match(Te))throw new Error("Invalid character in name");return be},we.prototype.textEscape=function(be){var Te;return this.options.noValidation?be:(Te=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,be.replace(Te,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},we.prototype.attEscape=function(be){var Te;return this.options.noValidation?be:(Te=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,be.replace(Te,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},we}()}).call(this)},{}],457:[function(ae,Ge,Ie){(function(){var me,de,Ee,we=function(Te,ve){for(var xe in ve)be.call(ve,xe)&&(Te[xe]=ve[xe]);function fe(){this.constructor=Te}return fe.prototype=ve.prototype,Te.prototype=new fe,Te.__super__=ve.prototype,Te},be={}.hasOwnProperty;me=ae("./NodeType"),de=ae("./XMLCharacterData"),Ge.exports=Ee=function(Te){we(ve,Te);function ve(xe,fe){if(ve.__super__.constructor.call(this,xe),fe==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=me.Text,this.value=this.stringify.text(fe)}return Object.defineProperty(ve.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ve.prototype,"wholeText",{get:function(){var xe,fe,z;for(z="",fe=this.previousSibling;fe;)z=fe.data+z,fe=fe.previousSibling;for(z+=this.data,xe=this.nextSibling;xe;)z=z+xe.data,xe=xe.nextSibling;return z}}),ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(xe){return this.options.writer.text(this,this.options.writer.filterOptions(xe))},ve.prototype.splitText=function(xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve.prototype.replaceWholeText=function(xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve}(de)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be,Te,ve,xe,fe,z,ee,oe,ie,le,ue,pe,Se,Le={}.hasOwnProperty;Se=ae("./Utility").assign,me=ae("./NodeType"),fe=ae("./XMLDeclaration"),z=ae("./XMLDocType"),Ee=ae("./XMLCData"),we=ae("./XMLComment"),oe=ae("./XMLElement"),le=ae("./XMLRaw"),ue=ae("./XMLText"),ie=ae("./XMLProcessingInstruction"),ee=ae("./XMLDummy"),be=ae("./XMLDTDAttList"),Te=ae("./XMLDTDElement"),ve=ae("./XMLDTDEntity"),xe=ae("./XMLDTDNotation"),de=ae("./WriterState"),Ge.exports=pe=function(){function De(Fe){var Ae,Oe,ze;Fe||(Fe={}),this.options=Fe,Oe=Fe.writer||{};for(Ae in Oe)Le.call(Oe,Ae)&&(ze=Oe[Ae],this["_"+Ae]=this[Ae],this[Ae]=ze)}return De.prototype.filterOptions=function(Fe){var Ae,Oe,ze,He,Ye,We,Ue,st;return Fe||(Fe={}),Fe=Se({},this.options,Fe),Ae={writer:this},Ae.pretty=Fe.pretty||!1,Ae.allowEmpty=Fe.allowEmpty||!1,Ae.indent=(Oe=Fe.indent)!=null?Oe:" ",Ae.newline=(ze=Fe.newline)!=null?ze:`
`,Ae.offset=(He=Fe.offset)!=null?He:0,Ae.dontPrettyTextNodes=(Ye=(We=Fe.dontPrettyTextNodes)!=null?We:Fe.dontprettytextnodes)!=null?Ye:0,Ae.spaceBeforeSlash=(Ue=(st=Fe.spaceBeforeSlash)!=null?st:Fe.spacebeforeslash)!=null?Ue:"",Ae.spaceBeforeSlash===!0&&(Ae.spaceBeforeSlash=" "),Ae.suppressPrettyCount=0,Ae.user={},Ae.state=de.None,Ae},De.prototype.indent=function(Fe,Ae,Oe){var ze;return!Ae.pretty||Ae.suppressPrettyCount?"":Ae.pretty&&(ze=(Oe||0)+Ae.offset+1,ze>0)?new Array(ze).join(Ae.indent):""},De.prototype.endline=function(Fe,Ae,Oe){return!Ae.pretty||Ae.suppressPrettyCount?"":Ae.newline},De.prototype.attribute=function(Fe,Ae,Oe){var ze;return this.openAttribute(Fe,Ae,Oe),ze=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Ae,Oe),ze},De.prototype.cdata=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe)+"<![CDATA[",Ae.state=de.InsideTag,ze+=Fe.value,Ae.state=de.CloseTag,ze+="]]>"+this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.comment=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe)+"<!-- ",Ae.state=de.InsideTag,ze+=Fe.value,Ae.state=de.CloseTag,ze+=" -->"+this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.declaration=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe)+"<?xml",Ae.state=de.InsideTag,ze+=' version="'+Fe.version+'"',Fe.encoding!=null&&(ze+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(ze+=' standalone="'+Fe.standalone+'"'),Ae.state=de.CloseTag,ze+=Ae.spaceBeforeSlash+"?>",ze+=this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.docType=function(Fe,Ae,Oe){var ze,He,Ye,We,Ue;if(Oe||(Oe=0),this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,We=this.indent(Fe,Ae,Oe),We+="<!DOCTYPE "+Fe.root().name,Fe.pubID&&Fe.sysID?We+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(We+=' SYSTEM "'+Fe.sysID+'"'),Fe.children.length>0){for(We+=" [",We+=this.endline(Fe,Ae,Oe),Ae.state=de.InsideTag,Ue=Fe.children,He=0,Ye=Ue.length;He<Ye;He++)ze=Ue[He],We+=this.writeChildNode(ze,Ae,Oe+1);Ae.state=de.CloseTag,We+="]"}return Ae.state=de.CloseTag,We+=Ae.spaceBeforeSlash+">",We+=this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),We},De.prototype.element=function(Fe,Ae,Oe){var ze,He,Ye,We,Ue,st,dt,gt,Et,Ke,et,$e,vt,wt;Oe||(Oe=0),Ke=!1,et="",this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,et+=this.indent(Fe,Ae,Oe)+"<"+Fe.name,$e=Fe.attribs;for(Et in $e)Le.call($e,Et)&&(ze=$e[Et],et+=this.attribute(ze,Ae,Oe));if(Ye=Fe.children.length,We=Ye===0?null:Fe.children[0],Ye===0||Fe.children.every(function(ht){return(ht.type===me.Text||ht.type===me.Raw)&&ht.value===""}))Ae.allowEmpty?(et+=">",Ae.state=de.CloseTag,et+="</"+Fe.name+">"+this.endline(Fe,Ae,Oe)):(Ae.state=de.CloseTag,et+=Ae.spaceBeforeSlash+"/>"+this.endline(Fe,Ae,Oe));else if(Ae.pretty&&Ye===1&&(We.type===me.Text||We.type===me.Raw)&&We.value!=null)et+=">",Ae.state=de.InsideTag,Ae.suppressPrettyCount++,Ke=!0,et+=this.writeChildNode(We,Ae,Oe+1),Ae.suppressPrettyCount--,Ke=!1,Ae.state=de.CloseTag,et+="</"+Fe.name+">"+this.endline(Fe,Ae,Oe);else{if(Ae.dontPrettyTextNodes){for(vt=Fe.children,Ue=0,dt=vt.length;Ue<dt;Ue++)if(He=vt[Ue],(He.type===me.Text||He.type===me.Raw)&&He.value!=null){Ae.suppressPrettyCount++,Ke=!0;break}}for(et+=">"+this.endline(Fe,Ae,Oe),Ae.state=de.InsideTag,wt=Fe.children,st=0,gt=wt.length;st<gt;st++)He=wt[st],et+=this.writeChildNode(He,Ae,Oe+1);Ae.state=de.CloseTag,et+=this.indent(Fe,Ae,Oe)+"</"+Fe.name+">",Ke&&Ae.suppressPrettyCount--,et+=this.endline(Fe,Ae,Oe),Ae.state=de.None}return this.closeNode(Fe,Ae,Oe),et},De.prototype.writeChildNode=function(Fe,Ae,Oe){switch(Fe.type){case me.CData:return this.cdata(Fe,Ae,Oe);case me.Comment:return this.comment(Fe,Ae,Oe);case me.Element:return this.element(Fe,Ae,Oe);case me.Raw:return this.raw(Fe,Ae,Oe);case me.Text:return this.text(Fe,Ae,Oe);case me.ProcessingInstruction:return this.processingInstruction(Fe,Ae,Oe);case me.Dummy:return"";case me.Declaration:return this.declaration(Fe,Ae,Oe);case me.DocType:return this.docType(Fe,Ae,Oe);case me.AttributeDeclaration:return this.dtdAttList(Fe,Ae,Oe);case me.ElementDeclaration:return this.dtdElement(Fe,Ae,Oe);case me.EntityDeclaration:return this.dtdEntity(Fe,Ae,Oe);case me.NotationDeclaration:return this.dtdNotation(Fe,Ae,Oe);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},De.prototype.processingInstruction=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe)+"<?",Ae.state=de.InsideTag,ze+=Fe.target,Fe.value&&(ze+=" "+Fe.value),Ae.state=de.CloseTag,ze+=Ae.spaceBeforeSlash+"?>",ze+=this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.raw=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe),Ae.state=de.InsideTag,ze+=Fe.value,Ae.state=de.CloseTag,ze+=this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.text=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe),Ae.state=de.InsideTag,ze+=Fe.value,Ae.state=de.CloseTag,ze+=this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.dtdAttList=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe)+"<!ATTLIST",Ae.state=de.InsideTag,ze+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(ze+=" "+Fe.defaultValueType),Fe.defaultValue&&(ze+=' "'+Fe.defaultValue+'"'),Ae.state=de.CloseTag,ze+=Ae.spaceBeforeSlash+">"+this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.dtdElement=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe)+"<!ELEMENT",Ae.state=de.InsideTag,ze+=" "+Fe.name+" "+Fe.value,Ae.state=de.CloseTag,ze+=Ae.spaceBeforeSlash+">"+this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.dtdEntity=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe)+"<!ENTITY",Ae.state=de.InsideTag,Fe.pe&&(ze+=" %"),ze+=" "+Fe.name,Fe.value?ze+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?ze+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(ze+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(ze+=" NDATA "+Fe.nData)),Ae.state=de.CloseTag,ze+=Ae.spaceBeforeSlash+">"+this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.dtdNotation=function(Fe,Ae,Oe){var ze;return this.openNode(Fe,Ae,Oe),Ae.state=de.OpenTag,ze=this.indent(Fe,Ae,Oe)+"<!NOTATION",Ae.state=de.InsideTag,ze+=" "+Fe.name,Fe.pubID&&Fe.sysID?ze+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?ze+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(ze+=' SYSTEM "'+Fe.sysID+'"'),Ae.state=de.CloseTag,ze+=Ae.spaceBeforeSlash+">"+this.endline(Fe,Ae,Oe),Ae.state=de.None,this.closeNode(Fe,Ae,Oe),ze},De.prototype.openNode=function(Fe,Ae,Oe){},De.prototype.closeNode=function(Fe,Ae,Oe){},De.prototype.openAttribute=function(Fe,Ae,Oe){},De.prototype.closeAttribute=function(Fe,Ae,Oe){},De}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(ae,Ge,Ie){(function(){var me,de,Ee,we,be,Te,ve,xe,fe,z;z=ae("./Utility"),xe=z.assign,fe=z.isFunction,Ee=ae("./XMLDOMImplementation"),we=ae("./XMLDocument"),be=ae("./XMLDocumentCB"),ve=ae("./XMLStringWriter"),Te=ae("./XMLStreamWriter"),me=ae("./NodeType"),de=ae("./WriterState"),Ge.exports.create=function(ee,oe,ie,le){var ue,pe;if(ee==null)throw new Error("Root element needs a name.");return le=xe({},oe,ie,le),ue=new we(le),pe=ue.element(ee),le.headless||(ue.declaration(le),(le.pubID!=null||le.sysID!=null)&&ue.dtd(le)),pe},Ge.exports.begin=function(ee,oe,ie){var le;return fe(ee)&&(le=[ee,oe],oe=le[0],ie=le[1],ee={}),oe?new be(ee,oe,ie):new we(ee)},Ge.exports.stringWriter=function(ee){return new ve(ee)},Ge.exports.streamWriter=function(ee,oe){return new Te(ee,oe)},Ge.exports.implementation=new Ee,Ge.exports.nodeType=me,Ge.exports.writerState=de}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(ae,Ge,Ie){Ge.exports=de;var me=Object.prototype.hasOwnProperty;function de(){for(var Ee={},we=0;we<arguments.length;we++){var be=arguments[we];for(var Te in be)me.call(be,Te)&&(Ee[Te]=be[Te])}return Ee}},{}],461:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.fill.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/es.array.join.js"),ae("core-js/modules/es.array.slice.js");var me=ae("buffer").Buffer,de=ae("./sha"),Ee=ae("./md5"),we={sha1:de,md5:Ee},be=64,Te=me.alloc(be);Te.fill(0);function ve(z,ee,oe){me.isBuffer(ee)||(ee=me.from(ee)),me.isBuffer(oe)||(oe=me.from(oe)),ee.length>be?ee=z(ee):ee.length<be&&(ee=me.concat([ee,Te],be));for(var ie=me.alloc(be),le=me.alloc(be),ue=0;ue<be;ue++)ie[ue]=ee[ue]^54,le[ue]=ee[ue]^92;var pe=z(me.concat([ie,oe]));return z(me.concat([le,pe]))}function xe(z,ee){z=z||"sha1";var oe=we[z],ie=[],le=0;return oe||fe("algorithm:",z,"is not yet supported"),{update:function(pe){return me.isBuffer(pe)||(pe=me.from(pe)),ie.push(pe),le+=pe.length,this},digest:function(pe){var Se=me.concat(ie),Le=ee?ve(oe,ee,Se):oe(Se);return ie=null,pe?Le.toString(pe):Le}}}function fe(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}Ie.createHash=function(z){return xe(z)},Ie.createHmac=function(z,ee){return xe(z,ee)},Ie.createCredentials=function(){fe("sorry,createCredentials is not implemented yet")},Ie.createCipher=function(){fe("sorry,createCipher is not implemented yet")},Ie.createCipheriv=function(){fe("sorry,createCipheriv is not implemented yet")},Ie.createDecipher=function(){fe("sorry,createDecipher is not implemented yet")},Ie.createDecipheriv=function(){fe("sorry,createDecipheriv is not implemented yet")},Ie.createSign=function(){fe("sorry,createSign is not implemented yet")},Ie.createVerify=function(){fe("sorry,createVerify is not implemented yet")},Ie.createDiffieHellman=function(){fe("sorry,createDiffieHellman is not implemented yet")},Ie.pbkdf2=function(){fe("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.array.fill.js"),ae("core-js/modules/es.array.concat.js");var me=ae("buffer").Buffer,de=4,Ee=me.alloc(de);Ee.fill(0);var we=8;function be(xe,fe){if(xe.length%de!==0){var z=xe.length+(de-xe.length%de);xe=me.concat([xe,Ee],z)}for(var ee=[],oe=fe?xe.readInt32BE:xe.readInt32LE,ie=0;ie<xe.length;ie+=de)ee.push(oe.call(xe,ie));return ee}function Te(xe,fe,z){for(var ee=me.alloc(fe),oe=z?ee.writeInt32BE:ee.writeInt32LE,ie=0;ie<xe.length;ie++)oe.call(ee,xe[ie],ie*4,!0);return ee}function ve(xe,fe,z,ee){me.isBuffer(xe)||(xe=me.from(xe));var oe=fe(be(xe,ee),xe.length*we);return Te(oe,z,ee)}Ge.exports={hash:ve}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(ae,Ge,Ie){"use strict";var me=ae("./helpers");function de(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function Ee(ee,oe){ee[oe>>5]|=128<<oe%32,ee[(oe+64>>>9<<4)+14]=oe;for(var ie=1732584193,le=-271733879,ue=-1732584194,pe=271733878,Se=0;Se<ee.length;Se+=16){var Le=ie,De=le,Fe=ue,Ae=pe;ie=be(ie,le,ue,pe,ee[Se+0],7,-680876936),pe=be(pe,ie,le,ue,ee[Se+1],12,-389564586),ue=be(ue,pe,ie,le,ee[Se+2],17,606105819),le=be(le,ue,pe,ie,ee[Se+3],22,-1044525330),ie=be(ie,le,ue,pe,ee[Se+4],7,-176418897),pe=be(pe,ie,le,ue,ee[Se+5],12,1200080426),ue=be(ue,pe,ie,le,ee[Se+6],17,-1473231341),le=be(le,ue,pe,ie,ee[Se+7],22,-45705983),ie=be(ie,le,ue,pe,ee[Se+8],7,1770035416),pe=be(pe,ie,le,ue,ee[Se+9],12,-1958414417),ue=be(ue,pe,ie,le,ee[Se+10],17,-42063),le=be(le,ue,pe,ie,ee[Se+11],22,-1990404162),ie=be(ie,le,ue,pe,ee[Se+12],7,1804603682),pe=be(pe,ie,le,ue,ee[Se+13],12,-40341101),ue=be(ue,pe,ie,le,ee[Se+14],17,-1502002290),le=be(le,ue,pe,ie,ee[Se+15],22,1236535329),ie=Te(ie,le,ue,pe,ee[Se+1],5,-165796510),pe=Te(pe,ie,le,ue,ee[Se+6],9,-1069501632),ue=Te(ue,pe,ie,le,ee[Se+11],14,643717713),le=Te(le,ue,pe,ie,ee[Se+0],20,-373897302),ie=Te(ie,le,ue,pe,ee[Se+5],5,-701558691),pe=Te(pe,ie,le,ue,ee[Se+10],9,38016083),ue=Te(ue,pe,ie,le,ee[Se+15],14,-660478335),le=Te(le,ue,pe,ie,ee[Se+4],20,-405537848),ie=Te(ie,le,ue,pe,ee[Se+9],5,568446438),pe=Te(pe,ie,le,ue,ee[Se+14],9,-1019803690),ue=Te(ue,pe,ie,le,ee[Se+3],14,-187363961),le=Te(le,ue,pe,ie,ee[Se+8],20,1163531501),ie=Te(ie,le,ue,pe,ee[Se+13],5,-1444681467),pe=Te(pe,ie,le,ue,ee[Se+2],9,-51403784),ue=Te(ue,pe,ie,le,ee[Se+7],14,1735328473),le=Te(le,ue,pe,ie,ee[Se+12],20,-1926607734),ie=ve(ie,le,ue,pe,ee[Se+5],4,-378558),pe=ve(pe,ie,le,ue,ee[Se+8],11,-2022574463),ue=ve(ue,pe,ie,le,ee[Se+11],16,1839030562),le=ve(le,ue,pe,ie,ee[Se+14],23,-35309556),ie=ve(ie,le,ue,pe,ee[Se+1],4,-1530992060),pe=ve(pe,ie,le,ue,ee[Se+4],11,1272893353),ue=ve(ue,pe,ie,le,ee[Se+7],16,-155497632),le=ve(le,ue,pe,ie,ee[Se+10],23,-1094730640),ie=ve(ie,le,ue,pe,ee[Se+13],4,681279174),pe=ve(pe,ie,le,ue,ee[Se+0],11,-358537222),ue=ve(ue,pe,ie,le,ee[Se+3],16,-722521979),le=ve(le,ue,pe,ie,ee[Se+6],23,76029189),ie=ve(ie,le,ue,pe,ee[Se+9],4,-640364487),pe=ve(pe,ie,le,ue,ee[Se+12],11,-421815835),ue=ve(ue,pe,ie,le,ee[Se+15],16,530742520),le=ve(le,ue,pe,ie,ee[Se+2],23,-995338651),ie=xe(ie,le,ue,pe,ee[Se+0],6,-198630844),pe=xe(pe,ie,le,ue,ee[Se+7],10,1126891415),ue=xe(ue,pe,ie,le,ee[Se+14],15,-1416354905),le=xe(le,ue,pe,ie,ee[Se+5],21,-57434055),ie=xe(ie,le,ue,pe,ee[Se+12],6,1700485571),pe=xe(pe,ie,le,ue,ee[Se+3],10,-1894986606),ue=xe(ue,pe,ie,le,ee[Se+10],15,-1051523),le=xe(le,ue,pe,ie,ee[Se+1],21,-2054922799),ie=xe(ie,le,ue,pe,ee[Se+8],6,1873313359),pe=xe(pe,ie,le,ue,ee[Se+15],10,-30611744),ue=xe(ue,pe,ie,le,ee[Se+6],15,-1560198380),le=xe(le,ue,pe,ie,ee[Se+13],21,1309151649),ie=xe(ie,le,ue,pe,ee[Se+4],6,-145523070),pe=xe(pe,ie,le,ue,ee[Se+11],10,-1120210379),ue=xe(ue,pe,ie,le,ee[Se+2],15,718787259),le=xe(le,ue,pe,ie,ee[Se+9],21,-343485551),ie=fe(ie,Le),le=fe(le,De),ue=fe(ue,Fe),pe=fe(pe,Ae)}return Array(ie,le,ue,pe)}function we(ee,oe,ie,le,ue,pe){return fe(z(fe(fe(oe,ee),fe(le,pe)),ue),ie)}function be(ee,oe,ie,le,ue,pe,Se){return we(oe&ie|~oe&le,ee,oe,ue,pe,Se)}function Te(ee,oe,ie,le,ue,pe,Se){return we(oe&le|ie&~le,ee,oe,ue,pe,Se)}function ve(ee,oe,ie,le,ue,pe,Se){return we(oe^ie^le,ee,oe,ue,pe,Se)}function xe(ee,oe,ie,le,ue,pe,Se){return we(ie^(oe|~le),ee,oe,ue,pe,Se)}function fe(ee,oe){var ie=(ee&65535)+(oe&65535),le=(ee>>16)+(oe>>16)+(ie>>16);return le<<16|ie&65535}function z(ee,oe){return ee<<oe|ee>>>32-oe}Ge.exports=function(oe){return me.hash(oe,Ee,16)}},{"./helpers":462}],464:[function(ae,Ge,Ie){"use strict";var me=ae("./helpers");function de(ve,xe){ve[xe>>5]|=128<<24-xe%32,ve[(xe+64>>9<<4)+15]=xe;for(var fe=Array(80),z=1732584193,ee=-271733879,oe=-1732584194,ie=271733878,le=-1009589776,ue=0;ue<ve.length;ue+=16){for(var pe=z,Se=ee,Le=oe,De=ie,Fe=le,Ae=0;Ae<80;Ae++){Ae<16?fe[Ae]=ve[ue+Ae]:fe[Ae]=Te(fe[Ae-3]^fe[Ae-8]^fe[Ae-14]^fe[Ae-16],1);var Oe=be(be(Te(z,5),Ee(Ae,ee,oe,ie)),be(be(le,fe[Ae]),we(Ae)));le=ie,ie=oe,oe=Te(ee,30),ee=z,z=Oe}z=be(z,pe),ee=be(ee,Se),oe=be(oe,Le),ie=be(ie,De),le=be(le,Fe)}return Array(z,ee,oe,ie,le)}function Ee(ve,xe,fe,z){return ve<20?xe&fe|~xe&z:ve<40?xe^fe^z:ve<60?xe&fe|xe&z|fe&z:xe^fe^z}function we(ve){return ve<20?1518500249:ve<40?1859775393:ve<60?-1894007588:-899497514}function be(ve,xe){var fe=(ve&65535)+(xe&65535),z=(ve>>16)+(xe>>16)+(fe>>16);return z<<16|fe&65535}function Te(ve,xe){return ve<<xe|ve>>>32-xe}Ge.exports=function(xe){return me.hash(xe,de,20,!0)}},{"./helpers":462}],465:[function(ae,Ge,Ie){"use strict";Ge.exports=function(){return function(){}}},{}],466:[function(ae,Ge,Ie){(function(me){(function(){"use strict";var de=ae("@babel/runtime/helpers/interopRequireDefault"),Ee=de(ae("@babel/runtime/helpers/typeof")),we=ae("stream"),be=we.Stream,Te=ae("../lib/common/utils/isArray"),ve=Te.isArray;Ge.exports.string=function(z){return typeof z=="string"},Ge.exports.array=ve,Ge.exports.buffer=me.isBuffer;function xe(fe){return fe instanceof be}Ge.exports.writableStream=function(z){return xe(z)&&typeof z._write=="function"&&(0,Ee.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:ae("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(ae,Ge,Ie){"use strict";var me=ae("immediate"),de=Ge.exports={};de.nextTick=me,de.title="browser",de.browser=!0,de.env={},de.argv=[],de.version="",de.versions={};function Ee(){}de.on=Ee,de.addListener=Ee,de.once=Ee,de.off=Ee,de.removeListener=Ee,de.removeAllListeners=Ee,de.emit=Ee,de.prependListener=Ee,de.prependOnceListener=Ee,de.listeners=function(we){return[]},de.binding=function(we){throw new Error("process.binding is not supported")},de.cwd=function(){return"/"},de.chdir=function(we){throw new Error("process.chdir is not supported")},de.umask=function(){return 0}},{immediate:358}],468:[function(ae,Ge,Ie){(function(me){(function(){"use strict";ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.search.js");var de=ae("./lib/request"),Ee=ae("./lib/response"),we=ae("xtend"),be=ae("builtin-status-codes"),Te=ae("url"),ve=Ie;ve.request=function(xe,fe){typeof xe=="string"?xe=Te.parse(xe):xe=we(xe);var z=me.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=xe.protocol||z,oe=xe.hostname||xe.host,ie=xe.port,le=xe.path||"/";oe&&oe.indexOf(":")!==-1&&(oe="["+oe+"]"),xe.url=(oe?ee+"//"+oe:"")+(ie?":"+ie:"")+le,xe.method=(xe.method||"GET").toUpperCase(),xe.headers=xe.headers||{};var ue=new de(xe);return fe&&ue.on("response",fe),ue},ve.get=function(fe,z){var ee=ve.request(fe,z);return ee.end(),ee},ve.ClientRequest=de,ve.IncomingMessage=Ee.IncomingMessage,ve.Agent=function(){},ve.Agent.defaultMaxSockets=4,ve.globalAgent=new ve.Agent,ve.STATUS_CODES=be,ve.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(ae,Ge,Ie){(function(me){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.array-buffer.constructor.js"),ae("core-js/modules/es.array-buffer.slice.js"),ae("core-js/modules/es.array.slice.js"),Ie.fetch=ve(me.fetch)&&ve(me.ReadableStream),Ie.writableStream=ve(me.WritableStream),Ie.abortController=ve(me.AbortController),Ie.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Ie.blobConstructor=!0}catch(xe){}var de;function Ee(){if(de!==void 0)return de;if(me.XMLHttpRequest){de=new me.XMLHttpRequest;try{de.open("GET",me.XDomainRequest?"/":"https://example.com")}catch(xe){de=null}}else de=null;return de}function we(xe){var fe=Ee();if(!fe)return!1;try{return fe.responseType=xe,fe.responseType===xe}catch(z){}return!1}var be=typeof me.ArrayBuffer!="undefined",Te=be&&ve(me.ArrayBuffer.prototype.slice);Ie.arraybuffer=Ie.fetch||be&&we("arraybuffer"),Ie.msstream=!Ie.fetch&&Te&&we("ms-stream"),Ie.mozchunkedarraybuffer=!Ie.fetch&&be&&we("moz-chunked-arraybuffer"),Ie.overrideMimeType=Ie.fetch||(Ee()?ve(Ee().overrideMimeType):!1),Ie.vbArray=ve(me.VBArray);function ve(xe){return typeof xe=="function"}de=null}).call(this)}).call(this,typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(ae,Ge,Ie){(function(me,de,Ee){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.split.js");var we=ae("./capability"),be=ae("inherits"),Te=ae("./response"),ve=ae("readable-stream"),xe=ae("to-arraybuffer"),fe=Te.IncomingMessage,z=Te.readyStates;function ee(ue,pe){return we.fetch&&pe?"fetch":we.mozchunkedarraybuffer?"moz-chunked-arraybuffer":we.msstream?"ms-stream":we.arraybuffer&&ue?"arraybuffer":we.vbArray&&ue?"text:vbarray":"text"}var oe=Ge.exports=function(ue){var pe=this;ve.Writable.call(pe),pe._opts=ue,pe._body=[],pe._headers={},ue.auth&&pe.setHeader("Authorization","Basic "+new Ee(ue.auth).toString("base64")),Object.keys(ue.headers).forEach(function(De){pe.setHeader(De,ue.headers[De])});var Se,Le=!0;if(ue.mode==="disable-fetch"||"requestTimeout"in ue&&!we.abortController)Le=!1,Se=!0;else if(ue.mode==="prefer-streaming")Se=!1;else if(ue.mode==="allow-wrong-content-type")Se=!we.overrideMimeType;else if(!ue.mode||ue.mode==="default"||ue.mode==="prefer-fast")Se=!0;else throw new Error("Invalid value for opts.mode");pe._mode=ee(Se,Le),pe._fetchTimer=null,pe.on("finish",function(){pe._onFinish()})};be(oe,ve.Writable),oe.prototype.setHeader=function(ue,pe){var Se=this,Le=ue.toLowerCase();le.indexOf(Le)===-1&&(Se._headers[Le]={name:ue,value:pe})},oe.prototype.getHeader=function(ue){var pe=this._headers[ue.toLowerCase()];return pe?pe.value:null},oe.prototype.removeHeader=function(ue){var pe=this;delete pe._headers[ue.toLowerCase()]},oe.prototype._onFinish=function(){var ue=this;if(!ue._destroyed){var pe=ue._opts,Se=ue._headers,Le=null;pe.method!=="GET"&&pe.method!=="HEAD"&&(we.arraybuffer?Le=xe(Ee.concat(ue._body)):we.blobConstructor?Le=new de.Blob(ue._body.map(function(He){return xe(He)}),{type:(Se["content-type"]||{}).value||""}):Le=Ee.concat(ue._body).toString());var De=[];if(Object.keys(Se).forEach(function(He){var Ye=Se[He].name,We=Se[He].value;Array.isArray(We)?We.forEach(function(Ue){De.push([Ye,Ue])}):De.push([Ye,We])}),ue._mode==="fetch"){var Fe=null,Ae=null;if(we.abortController){var Oe=new AbortController;Fe=Oe.signal,ue._fetchAbortController=Oe,"requestTimeout"in pe&&pe.requestTimeout!==0&&(ue._fetchTimer=de.setTimeout(function(){ue.emit("requestTimeout"),ue._fetchAbortController&&ue._fetchAbortController.abort()},pe.requestTimeout))}de.fetch(ue._opts.url,{method:ue._opts.method,headers:De,body:Le||void 0,mode:"cors",credentials:pe.withCredentials?"include":"same-origin",signal:Fe}).then(function(He){ue._fetchResponse=He,ue._connect()},function(He){de.clearTimeout(ue._fetchTimer),ue._destroyed||ue.emit("error",He)})}else{var ze=ue._xhr=new de.XMLHttpRequest;try{ze.open(ue._opts.method,ue._opts.url,!0)}catch(He){me.nextTick(function(){ue.emit("error",He)});return}"responseType"in ze&&(ze.responseType=ue._mode.split(":")[0]),"withCredentials"in ze&&(ze.withCredentials=!!pe.withCredentials),ue._mode==="text"&&"overrideMimeType"in ze&&ze.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in pe&&(ze.timeout=pe.requestTimeout,ze.ontimeout=function(){ue.emit("requestTimeout")}),De.forEach(function(He){ze.setRequestHeader(He[0],He[1])}),ue._response=null,ze.onreadystatechange=function(){switch(ze.readyState){case z.LOADING:case z.DONE:ue._onXHRProgress();break}},ue._mode==="moz-chunked-arraybuffer"&&(ze.onprogress=function(){ue._onXHRProgress()}),ze.onerror=function(){ue._destroyed||ue.emit("error",new Error("XHR error"))};try{ze.send(Le)}catch(He){me.nextTick(function(){ue.emit("error",He)});return}}}};function ie(ue){try{var pe=ue.status;return pe!==null&&pe!==0}catch(Se){return!1}}oe.prototype._onXHRProgress=function(){var ue=this;!ie(ue._xhr)||ue._destroyed||(ue._response||ue._connect(),ue._response._onXHRProgress())},oe.prototype._connect=function(){var ue=this;ue._destroyed||(ue._response=new fe(ue._xhr,ue._fetchResponse,ue._mode,ue._fetchTimer),ue._response.on("error",function(pe){ue.emit("error",pe)}),ue.emit("response",ue._response))},oe.prototype._write=function(ue,pe,Se){var Le=this;Le._body.push(ue),Se()},oe.prototype.abort=oe.prototype.destroy=function(){var ue=this;ue._destroyed=!0,de.clearTimeout(ue._fetchTimer),ue._response&&(ue._response._destroyed=!0),ue._xhr?ue._xhr.abort():ue._fetchAbortController&&ue._fetchAbortController.abort()},oe.prototype.end=function(ue,pe,Se){var Le=this;typeof ue=="function"&&(Se=ue,ue=void 0),ve.Writable.prototype.end.call(Le,ue,pe,Se)},oe.prototype.flushHeaders=function(){},oe.prototype.setTimeout=function(){},oe.prototype.setNoDelay=function(){},oe.prototype.setSocketKeepAlive=function(){};var le=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,ae("_process"),typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ae("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(ae,Ge,Ie){(function(me,de,Ee){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.split.js"),ae("core-js/modules/es.string.match.js"),ae("core-js/modules/es.array.iterator.js"),ae("core-js/modules/es.array-buffer.slice.js"),ae("core-js/modules/es.typed-array.uint8-array.js"),ae("core-js/modules/es.typed-array.copy-within.js"),ae("core-js/modules/es.typed-array.every.js"),ae("core-js/modules/es.typed-array.fill.js"),ae("core-js/modules/es.typed-array.filter.js"),ae("core-js/modules/es.typed-array.find.js"),ae("core-js/modules/es.typed-array.find-index.js"),ae("core-js/modules/es.typed-array.for-each.js"),ae("core-js/modules/es.typed-array.includes.js"),ae("core-js/modules/es.typed-array.index-of.js"),ae("core-js/modules/es.typed-array.iterator.js"),ae("core-js/modules/es.typed-array.join.js"),ae("core-js/modules/es.typed-array.last-index-of.js"),ae("core-js/modules/es.typed-array.map.js"),ae("core-js/modules/es.typed-array.reduce.js"),ae("core-js/modules/es.typed-array.reduce-right.js"),ae("core-js/modules/es.typed-array.reverse.js"),ae("core-js/modules/es.typed-array.set.js"),ae("core-js/modules/es.typed-array.slice.js"),ae("core-js/modules/es.typed-array.some.js"),ae("core-js/modules/es.typed-array.sort.js"),ae("core-js/modules/es.typed-array.subarray.js"),ae("core-js/modules/es.typed-array.to-locale-string.js"),ae("core-js/modules/es.typed-array.to-string.js"),ae("core-js/modules/es.array.slice.js");var we=ae("./capability"),be=ae("inherits"),Te=ae("readable-stream"),ve=Ie.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},xe=Ie.IncomingMessage=function(fe,z,ee,oe){var ie=this;if(Te.Readable.call(ie),ie._mode=ee,ie.headers={},ie.rawHeaders=[],ie.trailers={},ie.rawTrailers=[],ie.on("end",function(){me.nextTick(function(){ie.emit("close")})}),ee==="fetch"){var le=function Fe(){pe.read().then(function(Ae){if(!ie._destroyed){if(Ae.done){de.clearTimeout(oe),ie.push(null);return}ie.push(new Ee(Ae.value)),Fe()}}).catch(function(Ae){de.clearTimeout(oe),ie._destroyed||ie.emit("error",Ae)})};if(ie._fetchResponse=z,ie.url=z.url,ie.statusCode=z.status,ie.statusMessage=z.statusText,z.headers.forEach(function(Fe,Ae){ie.headers[Ae.toLowerCase()]=Fe,ie.rawHeaders.push(Ae,Fe)}),we.writableStream){var ue=new WritableStream({write:function(Ae){return new Promise(function(Oe,ze){ie._destroyed?ze():ie.push(new Ee(Ae))?Oe():ie._resumeFetch=Oe})},close:function(){de.clearTimeout(oe),ie._destroyed||ie.push(null)},abort:function(Ae){ie._destroyed||ie.emit("error",Ae)}});try{z.body.pipeTo(ue).catch(function(Fe){de.clearTimeout(oe),ie._destroyed||ie.emit("error",Fe)});return}catch(Fe){}}var pe=z.body.getReader();le()}else{ie._xhr=fe,ie._pos=0,ie.url=fe.responseURL,ie.statusCode=fe.status,ie.statusMessage=fe.statusText;var Se=fe.getAllResponseHeaders().split(/\r?\n/);if(Se.forEach(function(Fe){var Ae=Fe.match(/^([^:]+):\s*(.*)/);if(Ae){var Oe=Ae[1].toLowerCase();Oe==="set-cookie"?(ie.headers[Oe]===void 0&&(ie.headers[Oe]=[]),ie.headers[Oe].push(Ae[2])):ie.headers[Oe]!==void 0?ie.headers[Oe]+=", "+Ae[2]:ie.headers[Oe]=Ae[2],ie.rawHeaders.push(Ae[1],Ae[2])}}),ie._charset="x-user-defined",!we.overrideMimeType){var Le=ie.rawHeaders["mime-type"];if(Le){var De=Le.match(/;\s*charset=([^;])(;|$)/);De&&(ie._charset=De[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};be(xe,Te.Readable),xe.prototype._read=function(){var fe=this,z=fe._resumeFetch;z&&(fe._resumeFetch=null,z())},xe.prototype._onXHRProgress=function(){var fe=this,z=fe._xhr,ee=null;switch(fe._mode){case"text:vbarray":if(z.readyState!==ve.DONE)break;try{ee=new de.VBArray(z.responseBody).toArray()}catch(pe){}if(ee!==null){fe.push(new Ee(ee));break}case"text":try{ee=z.responseText}catch(pe){fe._mode="text:vbarray";break}if(ee.length>fe._pos){var oe=ee.substr(fe._pos);if(fe._charset==="x-user-defined"){for(var ie=new Ee(oe.length),le=0;le<oe.length;le++)ie[le]=oe.charCodeAt(le)&255;fe.push(ie)}else fe.push(oe,fe._charset);fe._pos=ee.length}break;case"arraybuffer":if(z.readyState!==ve.DONE||!z.response)break;ee=z.response,fe.push(new Ee(new Uint8Array(ee)));break;case"moz-chunked-arraybuffer":if(ee=z.response,z.readyState!==ve.LOADING||!ee)break;fe.push(new Ee(new Uint8Array(ee)));break;case"ms-stream":if(ee=z.response,z.readyState!==ve.LOADING)break;var ue=new de.MSStreamReader;ue.onprogress=function(){ue.result.byteLength>fe._pos&&(fe.push(new Ee(new Uint8Array(ue.result.slice(fe._pos)))),fe._pos=ue.result.byteLength)},ue.onload=function(){fe.push(null)},ue.readAsArrayBuffer(ee);break}fe._xhr.readyState===ve.DONE&&fe._mode!=="ms-stream"&&fe.push(null)}}).call(this)}).call(this,ae("_process"),typeof pn!="undefined"?pn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ae("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/helpers/typeof"));ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.search.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.string.split.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.array.join.js"),ae("core-js/modules/es.string.trim.js"),ae("core-js/modules/es.string.match.js"),ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.splice.js");var Ee=ae("punycode"),we=ae("./util");Ie.parse=Ae,Ie.resolve=ze,Ie.resolveObject=He,Ie.format=Oe,Ie.Url=be;function be(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Te=/^([a-z0-9.+-]+:)/i,ve=/:[0-9]*$/,xe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,fe=["<",">",'"',"`"," ","\r",`
`," "],z=["{","}","|","\\","^","`"].concat(fe),ee=["'"].concat(z),oe=["%","/","?",";","#"].concat(ee),ie=["/","?","#"],le=255,ue=/^[+a-z0-9A-Z_-]{0,63}$/,pe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Se={javascript:!0,"javascript:":!0},Le={javascript:!0,"javascript:":!0},De={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Fe=ae("querystring");function Ae(Ye,We,Ue){if(Ye&&we.isObject(Ye)&&Ye instanceof be)return Ye;var st=new be;return st.parse(Ye,We,Ue),st}be.prototype.parse=function(Ye,We,Ue){if(!we.isString(Ye))throw new TypeError("Parameter 'url' must be a string, not "+(0,de.default)(Ye));var st=Ye.indexOf("?"),dt=st!==-1&&st<Ye.indexOf("#")?"?":"#",gt=Ye.split(dt),Et=/\\/g;gt[0]=gt[0].replace(Et,"/"),Ye=gt.join(dt);var Ke=Ye;if(Ke=Ke.trim(),!Ue&&Ye.split("#").length===1){var et=xe.exec(Ke);if(et)return this.path=Ke,this.href=Ke,this.pathname=et[1],et[2]?(this.search=et[2],We?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):We&&(this.search="",this.query={}),this}var $e=Te.exec(Ke);if($e){$e=$e[0];var vt=$e.toLowerCase();this.protocol=vt,Ke=Ke.substr($e.length)}if(Ue||$e||Ke.match(/^\/\/[^@\/]+@[^@\/]+/)){var wt=Ke.substr(0,2)==="//";wt&&!($e&&Le[$e])&&(Ke=Ke.substr(2),this.slashes=!0)}if(!Le[$e]&&(wt||$e&&!De[$e])){for(var ht=-1,pt=0;pt<ie.length;pt++){var ct=Ke.indexOf(ie[pt]);ct!==-1&&(ht===-1||ct<ht)&&(ht=ct)}var Ct,xt;ht===-1?xt=Ke.lastIndexOf("@"):xt=Ke.lastIndexOf("@",ht),xt!==-1&&(Ct=Ke.slice(0,xt),Ke=Ke.slice(xt+1),this.auth=decodeURIComponent(Ct)),ht=-1;for(var pt=0;pt<oe.length;pt++){var ct=Ke.indexOf(oe[pt]);ct!==-1&&(ht===-1||ct<ht)&&(ht=ct)}ht===-1&&(ht=Ke.length),this.host=Ke.slice(0,ht),Ke=Ke.slice(ht),this.parseHost(),this.hostname=this.hostname||"";var yt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!yt)for(var Tt=this.hostname.split("."),pt=0,St=Tt.length;pt<St;pt++){var nt=Tt[pt];if(nt&&!nt.match(ue)){for(var Qe="",Ce=0,Ne=nt.length;Ce<Ne;Ce++)nt.charCodeAt(Ce)>127?Qe+="x":Qe+=nt[Ce];if(!Qe.match(ue)){var Je=Tt.slice(0,pt),rt=Tt.slice(pt+1),Be=nt.match(pe);Be&&(Je.push(Be[1]),rt.unshift(Be[2])),rt.length&&(Ke="/"+rt.join(".")+Ke),this.hostname=Je.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),yt||(this.hostname=Ee.toASCII(this.hostname));var _e=this.port?":"+this.port:"",Xe=this.hostname||"";this.host=Xe+_e,this.href+=this.host,yt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Ke[0]!=="/"&&(Ke="/"+Ke))}if(!Se[vt])for(var pt=0,St=ee.length;pt<St;pt++){var lt=ee[pt];if(Ke.indexOf(lt)!==-1){var Pt=encodeURIComponent(lt);Pt===lt&&(Pt=escape(lt)),Ke=Ke.split(lt).join(Pt)}}var kt=Ke.indexOf("#");kt!==-1&&(this.hash=Ke.substr(kt),Ke=Ke.slice(0,kt));var zt=Ke.indexOf("?");if(zt!==-1?(this.search=Ke.substr(zt),this.query=Ke.substr(zt+1),We&&(this.query=Fe.parse(this.query)),Ke=Ke.slice(0,zt)):We&&(this.search="",this.query={}),Ke&&(this.pathname=Ke),De[vt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",jt=this.search||"";this.path=_e+jt}return this.href=this.format(),this};function Oe(Ye){return we.isString(Ye)&&(Ye=Ae(Ye)),Ye instanceof be?Ye.format():be.prototype.format.call(Ye)}be.prototype.format=function(){var Ye=this.auth||"";Ye&&(Ye=encodeURIComponent(Ye),Ye=Ye.replace(/%3A/i,":"),Ye+="@");var We=this.protocol||"",Ue=this.pathname||"",st=this.hash||"",dt=!1,gt="";this.host?dt=Ye+this.host:this.hostname&&(dt=Ye+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(dt+=":"+this.port)),this.query&&we.isObject(this.query)&&Object.keys(this.query).length&&(gt=Fe.stringify(this.query));var Et=this.search||gt&&"?"+gt||"";return We&&We.substr(-1)!==":"&&(We+=":"),this.slashes||(!We||De[We])&&dt!==!1?(dt="//"+(dt||""),Ue&&Ue.charAt(0)!=="/"&&(Ue="/"+Ue)):dt||(dt=""),st&&st.charAt(0)!=="#"&&(st="#"+st),Et&&Et.charAt(0)!=="?"&&(Et="?"+Et),Ue=Ue.replace(/[?#]/g,function(Ke){return encodeURIComponent(Ke)}),Et=Et.replace("#","%23"),We+dt+Ue+Et+st};function ze(Ye,We){return Ae(Ye,!1,!0).resolve(We)}be.prototype.resolve=function(Ye){return this.resolveObject(Ae(Ye,!1,!0)).format()};function He(Ye,We){return Ye?Ae(Ye,!1,!0).resolveObject(We):We}be.prototype.resolveObject=function(Ye){if(we.isString(Ye)){var We=new be;We.parse(Ye,!1,!0),Ye=We}for(var Ue=new be,st=Object.keys(this),dt=0;dt<st.length;dt++){var gt=st[dt];Ue[gt]=this[gt]}if(Ue.hash=Ye.hash,Ye.href==="")return Ue.href=Ue.format(),Ue;if(Ye.slashes&&!Ye.protocol){for(var Et=Object.keys(Ye),Ke=0;Ke<Et.length;Ke++){var et=Et[Ke];et!=="protocol"&&(Ue[et]=Ye[et])}return De[Ue.protocol]&&Ue.hostname&&!Ue.pathname&&(Ue.path=Ue.pathname="/"),Ue.href=Ue.format(),Ue}if(Ye.protocol&&Ye.protocol!==Ue.protocol){if(!De[Ye.protocol]){for(var $e=Object.keys(Ye),vt=0;vt<$e.length;vt++){var wt=$e[vt];Ue[wt]=Ye[wt]}return Ue.href=Ue.format(),Ue}if(Ue.protocol=Ye.protocol,!Ye.host&&!Le[Ye.protocol]){for(var St=(Ye.pathname||"").split("/");St.length&&!(Ye.host=St.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),St[0]!==""&&St.unshift(""),St.length<2&&St.unshift(""),Ue.pathname=St.join("/")}else Ue.pathname=Ye.pathname;if(Ue.search=Ye.search,Ue.query=Ye.query,Ue.host=Ye.host||"",Ue.auth=Ye.auth,Ue.hostname=Ye.hostname||Ye.host,Ue.port=Ye.port,Ue.pathname||Ue.search){var ht=Ue.pathname||"",pt=Ue.search||"";Ue.path=ht+pt}return Ue.slashes=Ue.slashes||Ye.slashes,Ue.href=Ue.format(),Ue}var ct=Ue.pathname&&Ue.pathname.charAt(0)==="/",Ct=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",xt=Ct||ct||Ue.host&&Ye.pathname,yt=xt,Tt=Ue.pathname&&Ue.pathname.split("/")||[],St=Ye.pathname&&Ye.pathname.split("/")||[],nt=Ue.protocol&&!De[Ue.protocol];if(nt&&(Ue.hostname="",Ue.port=null,Ue.host&&(Tt[0]===""?Tt[0]=Ue.host:Tt.unshift(Ue.host)),Ue.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(St[0]===""?St[0]=Ye.host:St.unshift(Ye.host)),Ye.host=null),xt=xt&&(St[0]===""||Tt[0]==="")),Ct)Ue.host=Ye.host||Ye.host===""?Ye.host:Ue.host,Ue.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Ue.hostname,Ue.search=Ye.search,Ue.query=Ye.query,Tt=St;else if(St.length)Tt||(Tt=[]),Tt.pop(),Tt=Tt.concat(St),Ue.search=Ye.search,Ue.query=Ye.query;else if(!we.isNullOrUndefined(Ye.search)){if(nt){Ue.hostname=Ue.host=Tt.shift();var Qe=Ue.host&&Ue.host.indexOf("@")>0?Ue.host.split("@"):!1;Qe&&(Ue.auth=Qe.shift(),Ue.host=Ue.hostname=Qe.shift())}return Ue.search=Ye.search,Ue.query=Ye.query,(!we.isNull(Ue.pathname)||!we.isNull(Ue.search))&&(Ue.path=(Ue.pathname?Ue.pathname:"")+(Ue.search?Ue.search:"")),Ue.href=Ue.format(),Ue}if(!Tt.length)return Ue.pathname=null,Ue.search?Ue.path="/"+Ue.search:Ue.path=null,Ue.href=Ue.format(),Ue;for(var Ce=Tt.slice(-1)[0],Ne=(Ue.host||Ye.host||Tt.length>1)&&(Ce==="."||Ce==="..")||Ce==="",Je=0,rt=Tt.length;rt>=0;rt--)Ce=Tt[rt],Ce==="."?Tt.splice(rt,1):Ce===".."?(Tt.splice(rt,1),Je++):Je&&(Tt.splice(rt,1),Je--);if(!xt&&!yt)for(;Je--;Je)Tt.unshift("..");xt&&Tt[0]!==""&&(!Tt[0]||Tt[0].charAt(0)!=="/")&&Tt.unshift(""),Ne&&Tt.join("/").substr(-1)!=="/"&&Tt.push("");var Be=Tt[0]===""||Tt[0]&&Tt[0].charAt(0)==="/";if(nt){Ue.hostname=Ue.host=Be?"":Tt.length?Tt.shift():"";var Qe=Ue.host&&Ue.host.indexOf("@")>0?Ue.host.split("@"):!1;Qe&&(Ue.auth=Qe.shift(),Ue.host=Ue.hostname=Qe.shift())}return xt=xt||Ue.host&&Tt.length,xt&&!Be&&Tt.unshift(""),Tt.length?Ue.pathname=Tt.join("/"):(Ue.pathname=null,Ue.path=null),(!we.isNull(Ue.pathname)||!we.isNull(Ue.search))&&(Ue.path=(Ue.pathname?Ue.pathname:"")+(Ue.search?Ue.search:"")),Ue.auth=Ye.auth||Ue.auth,Ue.slashes=Ue.slashes||Ye.slashes,Ue.href=Ue.format(),Ue},be.prototype.parseHost=function(){var Ye=this.host,We=ve.exec(Ye);We&&(We=We[0],We!==":"&&(this.port=We.substr(1)),Ye=Ye.substr(0,Ye.length-We.length)),Ye&&(this.hostname=Ye)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(ae,Ge,Ie){"use strict";var me=ae("@babel/runtime/helpers/interopRequireDefault"),de=me(ae("@babel/runtime/helpers/typeof"));Ge.exports={isString:function(we){return typeof we=="string"},isObject:function(we){return(0,de.default)(we)==="object"&&we!==null},isNull:function(we){return we===null},isNullOrUndefined:function(we){return we==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(ae,Ge,Ie){"use strict";ae("core-js/modules/es.number.constructor.js"),Ie.encodeURIComponent=function(me){try{return encodeURIComponent(me)}catch(de){return me}},Ie.escape=ae("escape-html"),Ie.timestamp=function(de){if(de){var Ee=de;return typeof Ee=="string"&&(Ee=Number(Ee)),String(de).length===10&&(Ee*=1e3),new Date(Ee)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(ae,Ge,Ie){(function(me,de){(function(){"use strict";var Ee=ae("@babel/runtime/helpers/interopRequireDefault"),we=Ee(ae("@babel/runtime/helpers/typeof"));ae("core-js/modules/es.string.trim.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.split.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.array.concat.js");var be=ae("util"),Te=ae("url"),ve=ae("http"),xe=ae("https"),fe=ae("debug")("urllib"),z=ae("humanize-ms"),ee=0,oe=Math.pow(2,31)-10,ie=/^https?:\/\//i;function le(Le,De){return Le===void 0?De:Le}function ue(Le){return Le?Le.split(";")[0].trim().toLowerCase():""}function pe(Le,De){return function(Fe,Ae,Oe){if(Fe)return De(Fe);Le({data:Ae,status:Oe.statusCode,headers:Oe.headers,res:Oe})}}Ie.TIMEOUTS=[z("300s"),z("300s")];var Se=["json","text"];Ie.request=function(De,Fe,Ae){return arguments.length===2&&typeof Fe=="function"&&(Ae=Fe,Fe=null),typeof Ae=="function"?Ie.requestWithCallback(De,Fe,Ae):new Promise(function(Oe,ze){Ie.requestWithCallback(De,Fe,pe(Oe,ze))})},Ie.requestWithCallback=function(De,Fe,Ae){if(!De||typeof De!="string"&&(0,we.default)(De)!=="object"){var Oe=be.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(Oe)}arguments.length===2&&typeof Fe=="function"&&(Ae=Fe,Fe=null),Fe=Fe||{},ee>=oe&&(ee=0);var ze=++ee;Fe.requestUrls=Fe.requestUrls||[];var He={requestId:ze,url:De,args:Fe,ctx:Fe.ctx};Fe.emitter&&Fe.emitter.emit("request",He),Fe.timeout=Fe.timeout||Ie.TIMEOUTS,Fe.maxRedirects=Fe.maxRedirects||10,Fe.streaming=Fe.streaming||Fe.customResponse;var Ye=Date.now(),We;typeof De=="string"?(ie.test(De)||(De="https://"+De),We=Te.parse(De)):We=De;var Ue=(Fe.type||Fe.method||We.method||"GET").toUpperCase(),st=We.port||80,dt=ve,gt=le(Fe.agent,Ie.agent),Et=Fe.fixJSONCtlChars;We.protocol==="https:"&&(dt=xe,gt=le(Fe.httpsAgent,Ie.httpsAgent),We.port||(st=443));var Ke={host:We.hostname||We.host||"localhost",path:We.path||"/",method:Ue,port:st,agent:gt,headers:Fe.headers||{},lookup:Fe.lookup};Array.isArray(Fe.timeout)?Ke.requestTimeout=Fe.timeout[Fe.timeout.length-1]:typeof Fe.timeout!="undefined"&&(Ke.requestTimeout=Fe.timeout);var et=Fe.auth||We.auth;et&&(Ke.auth=et);var $e=Fe.content||Fe.data,vt=Ue==="GET"||Ue==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&$e&&!(typeof $e=="string"||de.isBuffer($e)))if(vt)$e=Fe.nestedQuerystring?qs.stringify($e):querystring.stringify($e);else{var wt=Ke.headers["Content-Type"]||Ke.headers["content-type"];wt||(Fe.contentType==="json"?wt="application/json":wt="application/x-www-form-urlencoded",Ke.headers["Content-Type"]=wt),ue(wt)==="application/json"?$e=JSON.stringify($e):$e=Fe.nestedQuerystring?qs.stringify($e):querystring.stringify($e)}vt&&$e&&(Ke.path+=(We.query?"&":"?")+$e,$e=null);var ht=0;if($e){var pt=$e.length;de.isBuffer($e)||(pt=de.byteLength($e)),ht=Ke.headers["Content-Length"]=pt}Fe.dataType==="json"&&(Ke.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest(Ke);var ct=null,Ct=null,xt=null,yt=!1,Tt=!1,St=0,nt=-1,Qe=!1,Ce="",Ne="",Je=null;Fe.timing&&(Je={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function rt(){ct&&(clearTimeout(ct),ct=null)}function Be(){Ct&&(clearTimeout(Ct),Ct=null)}function _e($t,On,un){if(Be(),!Ae){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),ze,me.pid,Ke.method,De),$t&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),ze,me.pid,$t.name,$t.message,$t.stack);return}var mn=Ae;Ae=null;var In={};un&&(nt=un.statusCode,In=un.headers);var Sn=Date.now()-Ye;Je&&(Je.contentDownload=Sn),fe("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Sn,St,nt,Ke.method,Ke.host,Ke.path,Tt,Je);var Dn={status:nt,statusCode:nt,headers:In,size:St,aborted:Qe,rt:Sn,keepAliveSocket:Tt,data:On,requestUrls:Fe.requestUrls,timing:Je,remoteAddress:Ce,remotePort:Ne};if($t){var fr="";gt&&typeof gt.getCurrentStatus=="function"&&(fr=", agent status: "+JSON.stringify(gt.getCurrentStatus())),$t.message+=", "+Ke.method+" "+De+" "+nt+" (connected: "+yt+", keepalive socket: "+Tt+fr+`)
headers: `+JSON.stringify(In),$t.data=On,$t.path=Ke.path,$t.status=nt,$t.headers=In,$t.res=Dn}mn($t,On,Fe.streaming?un:Dn),Fe.emitter&&(He.url=De,He.socket=an&&an.connection,He.options=Ke,He.size=ht,Fe.emitter.emit("response",{requestId:ze,error:$t,ctx:Fe.ctx,req:He,res:Dn}))}function Xe($t){var On=null;if(Fe.followRedirect&&statuses.redirect[$t.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var un=$t.headers.location;if(!un)On=new Error("Got statusCode "+$t.statusCode+" but cannot resolve next location from headers"),On.name="FollowRedirectError";else if(Fe._followRedirectCount>Fe.maxRedirects)On=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),On.name="MaxRedirectError";else{var mn=Fe.formatRedirectUrl?Fe.formatRedirectUrl(De,un):Te.resolve(De,un);fe("Request#%d %s: `redirected` from %s to %s",ze,Ke.path,De,mn),Be(),Fe.headers&&Fe.headers.Host&&ie.test(un)&&(Fe.headers.Host=null);var In=Ae;return Ae=null,Ie.requestWithCallback(mn,Fe,In),{redirect:!0,error:null}}}return{redirect:!1,error:On}}Fe.gzip&&!Ke.headers["Accept-Encoding"]&&!Ke.headers["accept-encoding"]&&(Ke.headers["Accept-Encoding"]="gzip");function lt($t,On,un){var mn=$t.headers["content-encoding"];return un(null,On,mn)}var Pt=Fe.writeStream;fe("Request#%d %s %s with headers %j, options.path: %s",ze,Ue,De,Ke.headers,Ke.path),Fe.requestUrls.push(De);function kt($t){if(Je&&(Je.waiting=Date.now()-Ye),fe("Request#%d %s `req response` event emit: status %d, headers: %j",ze,De,$t.statusCode,$t.headers),Fe.streaming){var On=Xe($t);if(On.redirect){$t.resume();return}return On.error?($t.resume(),_e(On.error,null,$t)):_e(null,null,$t)}if($t.on("close",function(){fe("Request#%d %s: `res close` event emit, total size %d",ze,De,St)}),$t.on("error",function(){fe("Request#%d %s: `res error` event emit, total size %d",ze,De,St)}),$t.on("aborted",function(){Qe=!0,fe("Request#%d %s: `res aborted` event emit, total size %d",ze,De,St)}),Pt){var un=Xe($t);if(un.redirect){$t.resume();return}return un.error?($t.resume(),Pt.end(),_e(un.error,null,$t)):(Fe.consumeWriteStream===!1?$t.on("end",_e.bind(null,null,null,$t)):Pt.on("close",function(){fe("Request#%d %s: writeStream close event emitted",ze,De),_e(xt||null,null,$t)}),$t.pipe(Pt))}var mn=[];$t.on("data",function(In){fe("Request#%d %s: `res data` event emit, size %d",ze,De,In.length),St+=In.length,mn.push(In)}),$t.on("end",function(){var In=de.concat(mn,St);if(fe("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",ze,De,St,$t._dumped),xt)return _e(xt,In,$t);var Sn=Xe($t);if(Sn.error)return _e(Sn.error,In,$t);Sn.redirect||lt($t,In,function(Dn,fr,_r){if(Dn)return _e(Dn,In,$t);if(!_r&&Se.indexOf(Fe.dataType)>=0){try{fr=decodeBodyByCharset(fr,$t)}catch(wi){return fe("decodeBodyByCharset error: %s",wi),_e(null,fr,$t)}if(Fe.dataType==="json")if(St===0)fr=null;else{var mr=parseJSON(fr,Et);mr.error?Dn=mr.error:fr=mr.data}}Qe&&fe("Request#%d %s: Remote socket was terminated before `response.end()` was called",ze,De),_e(Dn,fr,$t)})})}var zt,jt;Array.isArray(Fe.timeout)?(zt=z(Fe.timeout[0]),jt=z(Fe.timeout[1])):zt=jt=z(Fe.timeout),fe("ConnectTimeout: %d, ResponseTimeout: %d",zt,jt);function Ht(){fe("Connect timer ticking, timeout: %d",zt),ct=setTimeout(function(){ct=null,nt===-1&&(nt=-2);var $t="Connect timeout for "+zt+"ms",On="ConnectionTimeoutError";an.socket||(On="SocketAssignTimeoutError",$t+=", working sockets is full"),xt=new Error($t),xt.name=On,xt.requestId=ze,fe("ConnectTimeout: Request#%d %s %s: %s, connected: %s",ze,De,xt.name,$t,yt),sn()},zt)}function ln(){fe("Response timer ticking, timeout: %d",jt),Ct=setTimeout(function(){Ct=null;var $t="Response timeout for "+jt+"ms",On="ResponseTimeoutError";xt=new Error($t),xt.name=On,xt.requestId=ze,fe("ResponseTimeout: Request#%d %s %s: %s, connected: %s",ze,De,xt.name,$t,yt),sn()},jt)}var an;Ke.mode=Fe.mode?Fe.mode:"";try{an=dt.request(Ke,kt)}catch($t){return _e($t)}typeof window=="undefined"?Ht():an.on("requestTimeout",function(){nt===-1&&(nt=-2);var $t="Connect timeout for "+zt+"ms",On="ConnectionTimeoutError";xt=new Error($t),xt.name=On,xt.requestId=ze,sn()});function sn(){fe("Request#%d %s abort, connected: %s",ze,De,yt),an.socket||(xt.noSocket=!0,_e(xt)),an.abort()}return Je&&an.on("finish",function(){Je.requestSent=Date.now()-Ye}),an.once("socket",function($t){Je&&(Je.queuing=Date.now()-Ye);var On=$t.readyState;if(On==="opening"){$t.once("lookup",function(un,mn,In){fe("Request#%d %s lookup: %s, %s, %s",ze,De,un,mn,In),Je&&(Je.dnslookup=Date.now()-Ye),mn&&(Ce=mn)}),$t.once("connect",function(){Je&&(Je.connected=Date.now()-Ye),rt(),ln(),fe("Request#%d %s new socket connected",ze,De),yt=!0,Ce||(Ce=$t.remoteAddress),Ne=$t.remotePort});return}fe("Request#%d %s reuse socket connected, readyState: %s",ze,De,On),yt=!0,Tt=!0,Ce||(Ce=$t.remoteAddress),Ne=$t.remotePort,rt(),ln()}),an.on("error",function($t){($t.name==="Error"||$t.name==="TypeError")&&($t.name=yt?"ResponseError":"RequestError"),$t.message+=' (req "error")',fe("Request#%d %s `req error` event emit, %s: %s",ze,De,$t.name,$t.message),_e(xt||$t)}),Pt&&Pt.once("error",function($t){$t.message+=' (writeStream "error")',xt=$t,fe("Request#%d %s `writeStream error` event emit, %s: %s",ze,De,$t.name,$t.message),sn()}),Fe.stream?(Fe.stream.pipe(an),Fe.stream.once("error",function($t){$t.message+=' (stream "error")',xt=$t,fe("Request#%d %s `readStream error` event emit, %s: %s",ze,De,$t.name,$t.message),sn()})):an.end($e),an.requestId=ze,an}}).call(this)}).call(this,ae("_process"),ae("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},88386:function(dn,pn,at){(function(ot){ot(at(4631))})(function(ot){ot.defineOption("placeholder","",function(Ee,we,be){var Te=be&&be!=ot.Init;if(we&&!Te)Ee.on("blur",Ie),Ee.on("change",me),Ee.on("swapDoc",me),ot.on(Ee.getInputField(),"compositionupdate",Ee.state.placeholderCompose=function(){Ge(Ee)}),me(Ee);else if(!we&&Te){Ee.off("blur",Ie),Ee.off("change",me),Ee.off("swapDoc",me),ot.off(Ee.getInputField(),"compositionupdate",Ee.state.placeholderCompose),_t(Ee);var ve=Ee.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}we&&!Ee.hasFocus()&&Ie(Ee)});function _t(Ee){Ee.state.placeholder&&(Ee.state.placeholder.parentNode.removeChild(Ee.state.placeholder),Ee.state.placeholder=null)}function ae(Ee){_t(Ee);var we=Ee.state.placeholder=document.createElement("pre");we.style.cssText="height: 0; overflow: visible",we.style.direction=Ee.getOption("direction"),we.className="CodeMirror-placeholder CodeMirror-line-like";var be=Ee.getOption("placeholder");typeof be=="string"&&(be=document.createTextNode(be)),we.appendChild(be),Ee.display.lineSpace.insertBefore(we,Ee.display.lineSpace.firstChild)}function Ge(Ee){setTimeout(function(){var we=!1,be=Ee.getInputField();be.nodeName=="TEXTAREA"?we=!be.value:Ee.lineCount()==1&&(we=!/[^\u200b]/.test(be.querySelector(".CodeMirror-line").textContent)),we?ae(Ee):_t(Ee)},20)}function Ie(Ee){de(Ee)&&ae(Ee)}function me(Ee){var we=Ee.getWrapperElement(),be=de(Ee);we.className=we.className.replace(" CodeMirror-empty","")+(be?" CodeMirror-empty":""),be?ae(Ee):_t(Ee)}function de(Ee){return Ee.lineCount()===1&&Ee.getLine(0)===""}})},82801:function(dn,pn,at){(function(ot){ot(at(4631))})(function(ot){var _t={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ae=ot.Pos;ot.defineOption("autoCloseBrackets",!1,function(z,ee,oe){oe&&oe!=ot.Init&&(z.removeKeyMap(Ie),z.state.closeBrackets=null),ee&&(me(Ge(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(Ie))});function Ge(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:_t[ee]}var Ie={Backspace:we,Enter:be};function me(z){for(var ee=0;ee<z.length;ee++){var oe=z.charAt(ee),ie="'"+oe+"'";Ie[ie]||(Ie[ie]=de(oe))}}me(_t.pairs+"`");function de(z){return function(ee){return ve(ee,z)}}function Ee(z){var ee=z.state.closeBrackets;if(!ee||ee.override)return ee;var oe=z.getModeAt(z.getCursor());return oe.closeBrackets||ee}function we(z){var ee=Ee(z);if(!ee||z.getOption("disableInput"))return ot.Pass;for(var oe=Ge(ee,"pairs"),ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return ot.Pass;var ue=xe(z,ie[le].head);if(!ue||oe.indexOf(ue)%2!=0)return ot.Pass}for(var le=ie.length-1;le>=0;le--){var pe=ie[le].head;z.replaceRange("",ae(pe.line,pe.ch-1),ae(pe.line,pe.ch+1),"+delete")}}function be(z){var ee=Ee(z),oe=ee&&Ge(ee,"explode");if(!oe||z.getOption("disableInput"))return ot.Pass;for(var ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return ot.Pass;var ue=xe(z,ie[le].head);if(!ue||oe.indexOf(ue)%2!=0)return ot.Pass}z.operation(function(){var pe=z.lineSeparator()||`
`;z.replaceSelection(pe+pe,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var Se=0;Se<ie.length;Se++){var Le=ie[Se].head.line;z.indentLine(Le,null,!0),z.indentLine(Le+1,null,!0)}})}function Te(z){var ee=ot.cmpPos(z.anchor,z.head)>0;return{anchor:new ae(z.anchor.line,z.anchor.ch+(ee?-1:1)),head:new ae(z.head.line,z.head.ch+(ee?1:-1))}}function ve(z,ee){var oe=Ee(z);if(!oe||z.getOption("disableInput"))return ot.Pass;var ie=Ge(oe,"pairs"),le=ie.indexOf(ee);if(le==-1)return ot.Pass;for(var ue=Ge(oe,"closeBefore"),pe=Ge(oe,"triples"),Se=ie.charAt(le+1)==ee,Le=z.listSelections(),De=le%2==0,Fe,Ae=0;Ae<Le.length;Ae++){var Oe=Le[Ae],ze=Oe.head,He,Ye=z.getRange(ze,ae(ze.line,ze.ch+1));if(De&&!Oe.empty())He="surround";else if((Se||!De)&&Ye==ee)Se&&fe(z,ze)?He="both":pe.indexOf(ee)>=0&&z.getRange(ze,ae(ze.line,ze.ch+3))==ee+ee+ee?He="skipThree":He="skip";else if(Se&&ze.ch>1&&pe.indexOf(ee)>=0&&z.getRange(ae(ze.line,ze.ch-2),ze)==ee+ee){if(ze.ch>2&&/\bstring/.test(z.getTokenTypeAt(ae(ze.line,ze.ch-2))))return ot.Pass;He="addFour"}else if(Se){var We=ze.ch==0?" ":z.getRange(ae(ze.line,ze.ch-1),ze);if(!ot.isWordChar(Ye)&&We!=ee&&!ot.isWordChar(We))He="both";else return ot.Pass}else if(De&&(Ye.length===0||/\s/.test(Ye)||ue.indexOf(Ye)>-1))He="both";else return ot.Pass;if(!Fe)Fe=He;else if(Fe!=He)return ot.Pass}var Ue=le%2?ie.charAt(le-1):ee,st=le%2?ee:ie.charAt(le+1);z.operation(function(){if(Fe=="skip")z.execCommand("goCharRight");else if(Fe=="skipThree")for(var dt=0;dt<3;dt++)z.execCommand("goCharRight");else if(Fe=="surround"){for(var gt=z.getSelections(),dt=0;dt<gt.length;dt++)gt[dt]=Ue+gt[dt]+st;z.replaceSelections(gt,"around"),gt=z.listSelections().slice();for(var dt=0;dt<gt.length;dt++)gt[dt]=Te(gt[dt]);z.setSelections(gt)}else Fe=="both"?(z.replaceSelection(Ue+st,null),z.triggerElectric(Ue+st),z.execCommand("goCharLeft")):Fe=="addFour"&&(z.replaceSelection(Ue+Ue+Ue+Ue,"before"),z.execCommand("goCharRight"))})}function xe(z,ee){var oe=z.getRange(ae(ee.line,ee.ch-1),ae(ee.line,ee.ch+1));return oe.length==2?oe:null}function fe(z,ee){var oe=z.getTokenAt(ae(ee.line,ee.ch+1));return/\bstring/.test(oe.type)&&oe.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},57341:function(dn,pn,at){(function(ot){ot(at(4631),at(4786))})(function(ot){ot.defineOption("autoCloseTags",!1,function(we,be,Te){if(Te!=ot.Init&&Te&&we.removeKeyMap("autoCloseTags"),!!be){var ve={name:"autoCloseTags"};(typeof be!="object"||be.whenClosing!==!1)&&(ve["'/'"]=function(xe){return me(xe)}),(typeof be!="object"||be.whenOpening!==!1)&&(ve["'>'"]=function(xe){return Ge(xe)}),we.addKeyMap(ve)}});var _t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ae=["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 Ge(we){if(we.getOption("disableInput"))return ot.Pass;for(var be=we.listSelections(),Te=[],ve=we.getOption("autoCloseTags"),xe=0;xe<be.length;xe++){if(!be[xe].empty())return ot.Pass;var fe=be[xe].head,z=we.getTokenAt(fe),ee=ot.innerMode(we.getMode(),z.state),oe=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(oe),le=ie&&ie.name;if(!le)return ot.Pass;var ue=ee.mode.configuration=="html",pe=typeof ve=="object"&&ve.dontCloseTags||ue&&_t,Se=typeof ve=="object"&&ve.indentTags||ue&&ae;z.end>fe.ch&&(le=le.slice(0,le.length-z.end+fe.ch));var Le=le.toLowerCase();if(!le||z.type=="string"&&(z.end!=fe.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==fe.ch-z.start-1||pe&&de(pe,Le)>-1||Ee(we,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(oe)||[],le,fe,!0))return ot.Pass;var De=typeof ve=="object"&&ve.emptyTags;if(De&&de(De,le)>-1){Te[xe]={text:"/>",newPos:ot.Pos(fe.line,fe.ch+2)};continue}var Fe=Se&&de(Se,Le)>-1;Te[xe]={indent:Fe,text:">"+(Fe?`
`:"")+"</"+le+">",newPos:Fe?ot.Pos(fe.line+1,0):ot.Pos(fe.line,fe.ch+1)}}for(var Ae=typeof ve=="object"&&ve.dontIndentOnAutoClose,xe=be.length-1;xe>=0;xe--){var Oe=Te[xe];we.replaceRange(Oe.text,be[xe].head,be[xe].anchor,"+insert");var ze=we.listSelections().slice(0);ze[xe]={head:Oe.newPos,anchor:Oe.newPos},we.setSelections(ze),!Ae&&Oe.indent&&(we.indentLine(Oe.newPos.line,null,!0),we.indentLine(Oe.newPos.line+1,null,!0))}}function Ie(we,be){for(var Te=we.listSelections(),ve=[],xe=be?"/":"</",fe=we.getOption("autoCloseTags"),z=typeof fe=="object"&&fe.dontIndentOnSlash,ee=0;ee<Te.length;ee++){if(!Te[ee].empty())return ot.Pass;var oe=Te[ee].head,ie=we.getTokenAt(oe),le=ot.innerMode(we.getMode(),ie.state),ue=le.state;if(be&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=oe.ch-1))return ot.Pass;var pe,Se=le.mode.name!="xml"&&we.getMode().name=="htmlmixed";if(Se&&le.mode.name=="javascript")pe=xe+"script";else if(Se&&le.mode.name=="css")pe=xe+"style";else{var Le=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ue);if(!Le||Le.length&&Ee(we,Le,Le[Le.length-1],oe))return ot.Pass;pe=xe+Le[Le.length-1]}we.getLine(oe.line).charAt(ie.end)!=">"&&(pe+=">"),ve[ee]=pe}if(we.replaceSelections(ve),Te=we.listSelections(),!z)for(var ee=0;ee<Te.length;ee++)(ee==Te.length-1||Te[ee].head.line<Te[ee+1].head.line)&&we.indentLine(Te[ee].head.line)}function me(we){return we.getOption("disableInput")?ot.Pass:Ie(we,!0)}ot.commands.closeTag=function(we){return Ie(we)};function de(we,be){if(we.indexOf)return we.indexOf(be);for(var Te=0,ve=we.length;Te<ve;++Te)if(we[Te]==be)return Te;return-1}function Ee(we,be,Te,ve,xe){if(!ot.scanForClosingTag)return!1;var fe=Math.min(we.lastLine()+1,ve.line+500),z=ot.scanForClosingTag(we,ve,null,fe);if(!z||z.tag!=Te)return!1;for(var ee=xe?1:0,oe=be.length-1;oe>=0&&be[oe]==Te;oe--)++ee;ve=z.to;for(var oe=1;oe<ee;oe++){var ie=ot.scanForClosingTag(we,ve,null,fe);if(!ie||ie.tag!=Te)return!1;ve=ie.to}return!0}})},4786:function(dn,pn,at){(function(ot){ot(at(4631))})(function(ot){"use strict";var _t=ot.Pos;function ae(oe,ie){return oe.line-ie.line||oe.ch-ie.ch}var Ge="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",Ie=Ge+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",me=new RegExp("<(/?)(["+Ge+"]["+Ie+"]*)","g");function de(oe,ie,le,ue){this.line=ie,this.ch=le,this.cm=oe,this.text=oe.getLine(ie),this.min=ue?Math.max(ue.from,oe.firstLine()):oe.firstLine(),this.max=ue?Math.min(ue.to-1,oe.lastLine()):oe.lastLine()}function Ee(oe,ie){var le=oe.cm.getTokenTypeAt(_t(oe.line,ie));return le&&/\btag\b/.test(le)}function we(oe){if(!(oe.line>=oe.max))return oe.ch=0,oe.text=oe.cm.getLine(++oe.line),!0}function be(oe){if(!(oe.line<=oe.min))return oe.text=oe.cm.getLine(--oe.line),oe.ch=oe.text.length,!0}function Te(oe){for(;;){var ie=oe.text.indexOf(">",oe.ch);if(ie==-1){if(we(oe))continue;return}if(!Ee(oe,ie+1)){oe.ch=ie+1;continue}var le=oe.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(oe.text.slice(le+1,ie));return oe.ch=ie+1,ue?"selfClose":"regular"}}function ve(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf("<",oe.ch-1):-1;if(ie==-1){if(be(oe))continue;return}if(!Ee(oe,ie+1)){oe.ch=ie;continue}me.lastIndex=ie,oe.ch=ie;var le=me.exec(oe.text);if(le&&le.index==ie)return le}}function xe(oe){for(;;){me.lastIndex=oe.ch;var ie=me.exec(oe.text);if(!ie){if(we(oe))continue;return}if(!Ee(oe,ie.index+1)){oe.ch=ie.index+1;continue}return oe.ch=ie.index+ie[0].length,ie}}function fe(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf(">",oe.ch-1):-1;if(ie==-1){if(be(oe))continue;return}if(!Ee(oe,ie+1)){oe.ch=ie;continue}var le=oe.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(oe.text.slice(le+1,ie));return oe.ch=ie+1,ue?"selfClose":"regular"}}function z(oe,ie){for(var le=[];;){var ue=xe(oe),pe,Se=oe.line,Le=oe.ch-(ue?ue[0].length:0);if(!ue||!(pe=Te(oe)))return;if(pe!="selfClose")if(ue[1]){for(var De=le.length-1;De>=0;--De)if(le[De]==ue[2]){le.length=De;break}if(De<0&&(!ie||ie==ue[2]))return{tag:ue[2],from:_t(Se,Le),to:_t(oe.line,oe.ch)}}else le.push(ue[2])}}function ee(oe,ie){for(var le=[];;){var ue=fe(oe);if(!ue)return;if(ue=="selfClose"){ve(oe);continue}var pe=oe.line,Se=oe.ch,Le=ve(oe);if(!Le)return;if(Le[1])le.push(Le[2]);else{for(var De=le.length-1;De>=0;--De)if(le[De]==Le[2]){le.length=De;break}if(De<0&&(!ie||ie==Le[2]))return{tag:Le[2],from:_t(oe.line,oe.ch),to:_t(pe,Se)}}}}ot.registerHelper("fold","xml",function(oe,ie){for(var le=new de(oe,ie.line,0);;){var ue=xe(le);if(!ue||le.line!=ie.line)return;var pe=Te(le);if(!pe)return;if(!ue[1]&&pe!="selfClose"){var Se=_t(le.line,le.ch),Le=z(le,ue[2]);return Le&&ae(Le.from,Se)>0?{from:Se,to:Le.from}:null}}}),ot.findMatchingTag=function(oe,ie,le){var ue=new de(oe,ie.line,ie.ch,le);if(!(ue.text.indexOf(">")==-1&&ue.text.indexOf("<")==-1)){var pe=Te(ue),Se=pe&&_t(ue.line,ue.ch),Le=pe&&ve(ue);if(!(!pe||!Le||ae(ue,ie)>0)){var De={from:_t(ue.line,ue.ch),to:Se,tag:Le[2]};return pe=="selfClose"?{open:De,close:null,at:"open"}:Le[1]?{open:ee(ue,Le[2]),close:De,at:"close"}:(ue=new de(oe,Se.line,Se.ch,le),{open:De,close:z(ue,Le[2]),at:"open"})}}},ot.findEnclosingTag=function(oe,ie,le,ue){for(var pe=new de(oe,ie.line,ie.ch,le);;){var Se=ee(pe,ue);if(!Se)break;var Le=new de(oe,ie.line,ie.ch,le),De=z(Le,Se.tag);if(De)return{open:Se,close:De}}},ot.scanForClosingTag=function(oe,ie,le,ue){var pe=new de(oe,ie.line,ie.ch,ue?{from:0,to:ue}:null);return z(pe,le)}})},4631:function(dn){(function(pn,at){dn.exports=at()})(this,function(){"use strict";var pn=navigator.userAgent,at=navigator.platform,ot=/gecko\/\d/i.test(pn),_t=/MSIE \d/.test(pn),ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pn),Ge=/Edge\/(\d+)/.exec(pn),Ie=_t||ae||Ge,me=Ie&&(_t?document.documentMode||6:+(Ge||ae)[1]),de=!Ge&&/WebKit\//.test(pn),Ee=de&&/Qt\/\d+\.\d+/.test(pn),we=!Ge&&/Chrome\//.test(pn),be=/Opera\//.test(pn),Te=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(pn),xe=/PhantomJS/.test(pn),fe=!Ge&&/AppleWebKit/.test(pn)&&/Mobile\/\w+/.test(pn),z=/Android/.test(pn),ee=fe||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(pn),oe=fe||/Mac/.test(at),ie=/\bCrOS\b/.test(pn),le=/win/i.test(at),ue=be&&pn.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(be=!1,de=!0);var pe=oe&&(Ee||be&&(ue==null||ue<12.11)),Se=ot||Ie&&me>=9;function Le(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var De=function(re,ce){var ke=re.className,Pe=Le(ce).exec(ke);if(Pe){var je=ke.slice(Pe.index+Pe[0].length);re.className=ke.slice(0,Pe.index)+(je?Pe[1]+je:"")}};function Fe(re){for(var ce=re.childNodes.length;ce>0;--ce)re.removeChild(re.firstChild);return re}function Ae(re,ce){return Fe(re).appendChild(ce)}function Oe(re,ce,ke,Pe){var je=document.createElement(re);if(ke&&(je.className=ke),Pe&&(je.style.cssText=Pe),typeof ce=="string")je.appendChild(document.createTextNode(ce));else if(ce)for(var tt=0;tt<ce.length;++tt)je.appendChild(ce[tt]);return je}function ze(re,ce,ke,Pe){var je=Oe(re,ce,ke,Pe);return je.setAttribute("role","presentation"),je}var He;document.createRange?He=function(re,ce,ke,Pe){var je=document.createRange();return je.setEnd(Pe||re,ke),je.setStart(re,ce),je}:He=function(re,ce,ke){var Pe=document.body.createTextRange();try{Pe.moveToElementText(re.parentNode)}catch(je){return Pe}return Pe.collapse(!0),Pe.moveEnd("character",ke),Pe.moveStart("character",ce),Pe};function Ye(re,ce){if(ce.nodeType==3&&(ce=ce.parentNode),re.contains)return re.contains(ce);do if(ce.nodeType==11&&(ce=ce.host),ce==re)return!0;while(ce=ce.parentNode)}function We(){var re;try{re=document.activeElement}catch(ce){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Ue(re,ce){var ke=re.className;Le(ce).test(ke)||(re.className+=(ke?" ":"")+ce)}function st(re,ce){for(var ke=re.split(" "),Pe=0;Pe<ke.length;Pe++)ke[Pe]&&!Le(ke[Pe]).test(ce)&&(ce+=" "+ke[Pe]);return ce}var dt=function(re){re.select()};fe?dt=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:Ie&&(dt=function(re){try{re.select()}catch(ce){}});function gt(re){var ce=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,ce)}}function Et(re,ce,ke){ce||(ce={});for(var Pe in re)re.hasOwnProperty(Pe)&&(ke!==!1||!ce.hasOwnProperty(Pe))&&(ce[Pe]=re[Pe]);return ce}function Ke(re,ce,ke,Pe,je){ce==null&&(ce=re.search(/[^\s\u00a0]/),ce==-1&&(ce=re.length));for(var tt=Pe||0,mt=je||0;;){var Nt=re.indexOf(" ",tt);if(Nt<0||Nt>=ce)return mt+(ce-tt);mt+=Nt-tt,mt+=ke-mt%ke,tt=Nt+1}}var et=function(){this.id=null,this.f=null,this.time=0,this.handler=gt(this.onTimeout,this)};et.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},et.prototype.set=function(re,ce){this.f=ce;var ke=+new Date+re;(!this.id||ke<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=ke)};function $e(re,ce){for(var ke=0;ke<re.length;++ke)if(re[ke]==ce)return ke;return-1}var vt=50,wt={toString:function(){return"CodeMirror.Pass"}},ht={scroll:!1},pt={origin:"*mouse"},ct={origin:"+move"};function Ct(re,ce,ke){for(var Pe=0,je=0;;){var tt=re.indexOf(" ",Pe);tt==-1&&(tt=re.length);var mt=tt-Pe;if(tt==re.length||je+mt>=ce)return Pe+Math.min(mt,ce-je);if(je+=tt-Pe,je+=ke-je%ke,Pe=tt+1,je>=ce)return Pe}}var xt=[""];function yt(re){for(;xt.length<=re;)xt.push(Tt(xt)+" ");return xt[re]}function Tt(re){return re[re.length-1]}function St(re,ce){for(var ke=[],Pe=0;Pe<re.length;Pe++)ke[Pe]=ce(re[Pe],Pe);return ke}function nt(re,ce,ke){for(var Pe=0,je=ke(ce);Pe<re.length&&ke(re[Pe])<=je;)Pe++;re.splice(Pe,0,ce)}function Qe(){}function Ce(re,ce){var ke;return Object.create?ke=Object.create(re):(Qe.prototype=re,ke=new Qe),ce&&Et(ce,ke),ke}var Ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Je(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Ne.test(re))}function rt(re,ce){return ce?ce.source.indexOf("\\w")>-1&&Je(re)?!0:ce.test(re):Je(re)}function Be(re){for(var ce in re)if(re.hasOwnProperty(ce)&&re[ce])return!1;return!0}var _e=/[\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 Xe(re){return re.charCodeAt(0)>=768&&_e.test(re)}function lt(re,ce,ke){for(;(ke<0?ce>0:ce<re.length)&&Xe(re.charAt(ce));)ce+=ke;return ce}function Pt(re,ce,ke){for(var Pe=ce>ke?-1:1;;){if(ce==ke)return ce;var je=(ce+ke)/2,tt=Pe<0?Math.ceil(je):Math.floor(je);if(tt==ce)return re(tt)?ce:ke;re(tt)?ke=tt:ce=tt+Pe}}function kt(re,ce,ke,Pe){if(!re)return Pe(ce,ke,"ltr",0);for(var je=!1,tt=0;tt<re.length;++tt){var mt=re[tt];(mt.from<ke&&mt.to>ce||ce==ke&&mt.to==ce)&&(Pe(Math.max(mt.from,ce),Math.min(mt.to,ke),mt.level==1?"rtl":"ltr",tt),je=!0)}je||Pe(ce,ke,"ltr")}var zt=null;function jt(re,ce,ke){var Pe;zt=null;for(var je=0;je<re.length;++je){var tt=re[je];if(tt.from<ce&&tt.to>ce)return je;tt.to==ce&&(tt.from!=tt.to&&ke=="before"?Pe=je:zt=je),tt.from==ce&&(tt.from!=tt.to&&ke!="before"?Pe=je:zt=je)}return Pe!=null?Pe:zt}var Ht=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ke(Bt){return Bt<=247?re.charAt(Bt):1424<=Bt&&Bt<=1524?"R":1536<=Bt&&Bt<=1785?ce.charAt(Bt-1536):1774<=Bt&&Bt<=2220?"r":8192<=Bt&&Bt<=8203?"w":Bt==8204?"b":"L"}var Pe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,je=/[stwN]/,tt=/[LRr]/,mt=/[Lb1n]/,Nt=/[1n]/;function Lt(Bt,qt,Ut){this.level=Bt,this.from=qt,this.to=Ut}return function(Bt,qt){var Ut=qt=="ltr"?"L":"R";if(Bt.length==0||qt=="ltr"&&!Pe.test(Bt))return!1;for(var xn=Bt.length,gn=[],Jn=0;Jn<xn;++Jn)gn.push(ke(Bt.charCodeAt(Jn)));for(var er=0,hr=Ut;er<xn;++er){var kr=gn[er];kr=="m"?gn[er]=hr:hr=kr}for(var Yr=0,Rr=Ut;Yr<xn;++Yr){var ri=gn[Yr];ri=="1"&&Rr=="r"?gn[Yr]="n":tt.test(ri)&&(Rr=ri,ri=="r"&&(gn[Yr]="R"))}for(var ji=1,Dr=gn[0];ji<xn-1;++ji){var so=gn[ji];so=="+"&&Dr=="1"&&gn[ji+1]=="1"?gn[ji]="1":so==","&&Dr==gn[ji+1]&&(Dr=="1"||Dr=="n")&&(gn[ji]=Dr),Dr=so}for(var Na=0;Na<xn;++Na){var Ds=gn[Na];if(Ds==",")gn[Na]="N";else if(Ds=="%"){var Va=void 0;for(Va=Na+1;Va<xn&&gn[Va]=="%";++Va);for(var eu=Na&&gn[Na-1]=="!"||Va<xn&&gn[Va]=="1"?"1":"N",kl=Na;kl<Va;++kl)gn[kl]=eu;Na=Va-1}}for(var Ts=0,lu=Ut;Ts<xn;++Ts){var fl=gn[Ts];lu=="L"&&fl=="1"?gn[Ts]="L":tt.test(fl)&&(lu=fl)}for(var Ls=0;Ls<xn;++Ls)if(je.test(gn[Ls])){var Xo=void 0;for(Xo=Ls+1;Xo<xn&&je.test(gn[Xo]);++Xo);for(var ts=(Ls?gn[Ls-1]:Ut)=="L",Xs=(Xo<xn?gn[Xo]:Ut)=="L",dl=ts==Xs?ts?"L":"R":Ut,Qu=Ls;Qu<Xo;++Qu)gn[Qu]=dl;Ls=Xo-1}for(var Xa=[],Bu,ls=0;ls<xn;)if(mt.test(gn[ls])){var Ld=ls;for(++ls;ls<xn&&mt.test(gn[ls]);++ls);Xa.push(new Lt(0,Ld,ls))}else{var Cu=ls,uu=Xa.length,tu=qt=="rtl"?1:0;for(++ls;ls<xn&&gn[ls]!="L";++ls);for(var Sa=Cu;Sa<ls;)if(Nt.test(gn[Sa])){Cu<Sa&&(Xa.splice(uu,0,new Lt(1,Cu,Sa)),uu+=tu);var Ys=Sa;for(++Sa;Sa<ls&&Nt.test(gn[Sa]);++Sa);Xa.splice(uu,0,new Lt(2,Ys,Sa)),uu+=tu,Cu=Sa}else++Sa;Cu<ls&&Xa.splice(uu,0,new Lt(1,Cu,ls))}return qt=="ltr"&&(Xa[0].level==1&&(Bu=Bt.match(/^\s+/))&&(Xa[0].from=Bu[0].length,Xa.unshift(new Lt(0,0,Bu[0].length))),Tt(Xa).level==1&&(Bu=Bt.match(/\s+$/))&&(Tt(Xa).to-=Bu[0].length,Xa.push(new Lt(0,xn-Bu[0].length,xn)))),qt=="rtl"?Xa.reverse():Xa}}();function ln(re,ce){var ke=re.order;return ke==null&&(ke=re.order=Ht(re.text,ce)),ke}var an=[],sn=function(re,ce,ke){if(re.addEventListener)re.addEventListener(ce,ke,!1);else if(re.attachEvent)re.attachEvent("on"+ce,ke);else{var Pe=re._handlers||(re._handlers={});Pe[ce]=(Pe[ce]||an).concat(ke)}};function $t(re,ce){return re._handlers&&re._handlers[ce]||an}function On(re,ce,ke){if(re.removeEventListener)re.removeEventListener(ce,ke,!1);else if(re.detachEvent)re.detachEvent("on"+ce,ke);else{var Pe=re._handlers,je=Pe&&Pe[ce];if(je){var tt=$e(je,ke);tt>-1&&(Pe[ce]=je.slice(0,tt).concat(je.slice(tt+1)))}}}function un(re,ce){var ke=$t(re,ce);if(ke.length)for(var Pe=Array.prototype.slice.call(arguments,2),je=0;je<ke.length;++je)ke[je].apply(null,Pe)}function mn(re,ce,ke){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),un(re,ke||ce.type,re,ce),mr(ce)||ce.codemirrorIgnore}function In(re){var ce=re._handlers&&re._handlers.cursorActivity;if(ce)for(var ke=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),Pe=0;Pe<ce.length;++Pe)$e(ke,ce[Pe])==-1&&ke.push(ce[Pe])}function Sn(re,ce){return $t(re,ce).length>0}function Dn(re){re.prototype.on=function(ce,ke){sn(this,ce,ke)},re.prototype.off=function(ce,ke){On(this,ce,ke)}}function fr(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function _r(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function mr(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function wi(re){fr(re),_r(re)}function no(re){return re.target||re.srcElement}function ro(re){var ce=re.which;return ce==null&&(re.button&1?ce=1:re.button&2?ce=3:re.button&4&&(ce=2)),oe&&re.ctrlKey&&ce==1&&(ce=3),ce}var io=function(){if(Ie&&me<9)return!1;var re=Oe("div");return"draggable"in re||"dragDrop"in re}(),Ji;function lo(re){if(Ji==null){var ce=Oe("span","\u200B");Ae(re,Oe("span",[ce,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Ji=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(Ie&&me<8))}var ke=Ji?Oe("span","\u200B"):Oe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ke.setAttribute("cm-text",""),ke}var Fi;function Jr(re){if(Fi!=null)return Fi;var ce=Ae(re,document.createTextNode("A\u062EA")),ke=He(ce,0,1).getBoundingClientRect(),Pe=He(ce,1,2).getBoundingClientRect();return Fe(re),!ke||ke.left==ke.right?!1:Fi=Pe.right-ke.right<3}var bn=`
b`.split(/\n/).length!=3?function(re){for(var ce=0,ke=[],Pe=re.length;ce<=Pe;){var je=re.indexOf(`
`,ce);je==-1&&(je=re.length);var tt=re.slice(ce,re.charAt(je-1)=="\r"?je-1:je),mt=tt.indexOf("\r");mt!=-1?(ke.push(tt.slice(0,mt)),ce+=mt+1):(ke.push(tt),ce=je+1)}return ke}:function(re){return re.split(/\r\n?|\n/)},Ze=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(ce){return!1}}:function(re){var ce;try{ce=re.ownerDocument.selection.createRange()}catch(ke){}return!ce||ce.parentElement()!=re?!1:ce.compareEndPoints("StartToEnd",ce)!=0},vn=function(){var re=Oe("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),Mn=null;function Rn(re){if(Mn!=null)return Mn;var ce=Ae(re,Oe("span","x")),ke=ce.getBoundingClientRect(),Pe=He(ce,0,1).getBoundingClientRect();return Mn=Math.abs(ke.left-Pe.left)>1}var zn={},Un={};function $n(re,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),zn[re]=ce}function Mr(re,ce){Un[re]=ce}function nn(re){if(typeof re=="string"&&Un.hasOwnProperty(re))re=Un[re];else if(re&&typeof re.name=="string"&&Un.hasOwnProperty(re.name)){var ce=Un[re.name];typeof ce=="string"&&(ce={name:ce}),re=Ce(ce,re),re.name=ce.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return nn("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return nn("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function on(re,ce){ce=nn(ce);var ke=zn[ce.name];if(!ke)return on(re,"text/plain");var Pe=ke(re,ce);if(Kt.hasOwnProperty(ce.name)){var je=Kt[ce.name];for(var tt in je)je.hasOwnProperty(tt)&&(Pe.hasOwnProperty(tt)&&(Pe["_"+tt]=Pe[tt]),Pe[tt]=je[tt])}if(Pe.name=ce.name,ce.helperType&&(Pe.helperType=ce.helperType),ce.modeProps)for(var mt in ce.modeProps)Pe[mt]=ce.modeProps[mt];return Pe}var Kt={};function hn(re,ce){var ke=Kt.hasOwnProperty(re)?Kt[re]:Kt[re]={};Et(ce,ke)}function qn(re,ce){if(ce===!0)return ce;if(re.copyState)return re.copyState(ce);var ke={};for(var Pe in ce){var je=ce[Pe];je instanceof Array&&(je=je.concat([])),ke[Pe]=je}return ke}function tr(re,ce){for(var ke;re.innerMode&&(ke=re.innerMode(ce),!(!ke||ke.mode==re));)ce=ke.state,re=ke.mode;return ke||{mode:re,state:ce}}function ur(re,ce,ke){return re.startState?re.startState(ce,ke):!0}var Qt=function(re,ce,ke){this.pos=this.start=0,this.string=re,this.tabSize=ce||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ke};Qt.prototype.eol=function(){return this.pos>=this.string.length},Qt.prototype.sol=function(){return this.pos==this.lineStart},Qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Qt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Qt.prototype.eat=function(re){var ce=this.string.charAt(this.pos),ke;if(typeof re=="string"?ke=ce==re:ke=ce&&(re.test?re.test(ce):re(ce)),ke)return++this.pos,ce},Qt.prototype.eatWhile=function(re){for(var ce=this.pos;this.eat(re););return this.pos>ce},Qt.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},Qt.prototype.skipToEnd=function(){this.pos=this.string.length},Qt.prototype.skipTo=function(re){var ce=this.string.indexOf(re,this.pos);if(ce>-1)return this.pos=ce,!0},Qt.prototype.backUp=function(re){this.pos-=re},Qt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ke(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ke(this.string,this.lineStart,this.tabSize):0)},Qt.prototype.indentation=function(){return Ke(this.string,null,this.tabSize)-(this.lineStart?Ke(this.string,this.lineStart,this.tabSize):0)},Qt.prototype.match=function(re,ce,ke){if(typeof re=="string"){var Pe=function(mt){return ke?mt.toLowerCase():mt},je=this.string.substr(this.pos,re.length);if(Pe(je)==Pe(re))return ce!==!1&&(this.pos+=re.length),!0}else{var tt=this.string.slice(this.pos).match(re);return tt&&tt.index>0?null:(tt&&ce!==!1&&(this.pos+=tt[0].length),tt)}},Qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Qt.prototype.hideFirstChars=function(re,ce){this.lineStart+=re;try{return ce()}finally{this.lineStart-=re}},Qt.prototype.lookAhead=function(re){var ce=this.lineOracle;return ce&&ce.lookAhead(re)},Qt.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function Cn(re,ce){if(ce-=re.first,ce<0||ce>=re.size)throw new Error("There is no line "+(ce+re.first)+" in the document.");for(var ke=re;!ke.lines;)for(var Pe=0;;++Pe){var je=ke.children[Pe],tt=je.chunkSize();if(ce<tt){ke=je;break}ce-=tt}return ke.lines[ce]}function dr(re,ce,ke){var Pe=[],je=ce.line;return re.iter(ce.line,ke.line+1,function(tt){var mt=tt.text;je==ke.line&&(mt=mt.slice(0,ke.ch)),je==ce.line&&(mt=mt.slice(ce.ch)),Pe.push(mt),++je}),Pe}function Ar(re,ce,ke){var Pe=[];return re.iter(ce,ke,function(je){Pe.push(je.text)}),Pe}function _n(re,ce){var ke=ce-re.height;if(ke)for(var Pe=re;Pe;Pe=Pe.parent)Pe.height+=ke}function Zt(re){if(re.parent==null)return null;for(var ce=re.parent,ke=$e(ce.lines,re),Pe=ce.parent;Pe;ce=Pe,Pe=Pe.parent)for(var je=0;Pe.children[je]!=ce;++je)ke+=Pe.children[je].chunkSize();return ke+ce.first}function ir(re,ce){var ke=re.first;e:do{for(var Pe=0;Pe<re.children.length;++Pe){var je=re.children[Pe],tt=je.height;if(ce<tt){re=je;continue e}ce-=tt,ke+=je.chunkSize()}return ke}while(!re.lines);for(var mt=0;mt<re.lines.length;++mt){var Nt=re.lines[mt],Lt=Nt.height;if(ce<Lt)break;ce-=Lt}return ke+mt}function Nr(re,ce){return ce>=re.first&&ce<re.first+re.size}function si(re,ce){return String(re.lineNumberFormatter(ce+re.firstLineNumber))}function Tn(re,ce,ke){if(ke===void 0&&(ke=null),!(this instanceof Tn))return new Tn(re,ce,ke);this.line=re,this.ch=ce,this.sticky=ke}function vr(re,ce){return re.line-ce.line||re.ch-ce.ch}function yi(re,ce){return re.sticky==ce.sticky&&vr(re,ce)==0}function ko(re){return Tn(re.line,re.ch)}function zi(re,ce){return vr(re,ce)<0?ce:re}function xr(re,ce){return vr(re,ce)<0?re:ce}function gr(re,ce){return Math.max(re.first,Math.min(ce,re.first+re.size-1))}function Lr(re,ce){if(ce.line<re.first)return Tn(re.first,0);var ke=re.first+re.size-1;return ce.line>ke?Tn(ke,Cn(re,ke).text.length):_i(ce,Cn(re,ce.line).text.length)}function _i(re,ce){var ke=re.ch;return ke==null||ke>ce?Tn(re.line,ce):ke<0?Tn(re.line,0):re}function oo(re,ce){for(var ke=[],Pe=0;Pe<ce.length;Pe++)ke[Pe]=Lr(re,ce[Pe]);return ke}var Xn=function(re,ce){this.state=re,this.lookAhead=ce},Ir=function(re,ce,ke,Pe){this.state=ce,this.doc=re,this.line=ke,this.maxLookAhead=Pe||0,this.baseTokens=null,this.baseTokenPos=1};Ir.prototype.lookAhead=function(re){var ce=this.doc.getLine(this.line+re);return ce!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),ce},Ir.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var ce=this.baseTokens[this.baseTokenPos+1];return{type:ce&&ce.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},Ir.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ir.fromSaved=function(re,ce,ke){return ce instanceof Xn?new Ir(re,qn(re.mode,ce.state),ke,ce.lookAhead):new Ir(re,qn(re.mode,ce),ke)},Ir.prototype.save=function(re){var ce=re!==!1?qn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Xn(ce,this.maxLookAhead):ce};function _s(re,ce,ke,Pe){var je=[re.state.modeGen],tt={};Ri(re,ce.text,re.doc.mode,ke,function(Bt,qt){return je.push(Bt,qt)},tt,Pe);for(var mt=ke.state,Nt=function(Bt){ke.baseTokens=je;var qt=re.state.overlays[Bt],Ut=1,xn=0;ke.state=!0,Ri(re,ce.text,qt.mode,ke,function(gn,Jn){for(var er=Ut;xn<gn;){var hr=je[Ut];hr>gn&&je.splice(Ut,1,gn,je[Ut+1],hr),Ut+=2,xn=Math.min(gn,hr)}if(Jn)if(qt.opaque)je.splice(er,Ut-er,gn,"overlay "+Jn),Ut=er+2;else for(;er<Ut;er+=2){var kr=je[er+1];je[er+1]=(kr?kr+" ":"")+"overlay "+Jn}},tt),ke.state=mt,ke.baseTokens=null,ke.baseTokenPos=1},Lt=0;Lt<re.state.overlays.length;++Lt)Nt(Lt);return{styles:je,classes:tt.bgClass||tt.textClass?tt:null}}function Aa(re,ce,ke){if(!ce.styles||ce.styles[0]!=re.state.modeGen){var Pe=ga(re,Zt(ce)),je=ce.text.length>re.options.maxHighlightLength&&qn(re.doc.mode,Pe.state),tt=_s(re,ce,Pe);je&&(Pe.state=je),ce.stateAfter=Pe.save(!je),ce.styles=tt.styles,tt.classes?ce.styleClasses=tt.classes:ce.styleClasses&&(ce.styleClasses=null),ke===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return ce.styles}function ga(re,ce,ke){var Pe=re.doc,je=re.display;if(!Pe.mode.startState)return new Ir(Pe,!0,ce);var tt=Li(re,ce,ke),mt=tt>Pe.first&&Cn(Pe,tt-1).stateAfter,Nt=mt?Ir.fromSaved(Pe,mt,tt):new Ir(Pe,ur(Pe.mode),tt);return Pe.iter(tt,ce,function(Lt){tn(re,Lt.text,Nt);var Bt=Nt.line;Lt.stateAfter=Bt==ce-1||Bt%5==0||Bt>=je.viewFrom&&Bt<je.viewTo?Nt.save():null,Nt.nextLine()}),ke&&(Pe.modeFrontier=Nt.line),Nt}function tn(re,ce,ke,Pe){var je=re.doc.mode,tt=new Qt(ce,re.options.tabSize,ke);for(tt.start=tt.pos=Pe||0,ce==""&&Vr(je,ke.state);!tt.eol();)Ti(je,tt,ke.state),tt.start=tt.pos}function Vr(re,ce){if(re.blankLine)return re.blankLine(ce);if(re.innerMode){var ke=tr(re,ce);if(ke.mode.blankLine)return ke.mode.blankLine(ke.state)}}function Ti(re,ce,ke,Pe){for(var je=0;je<10;je++){Pe&&(Pe[0]=tr(re,ke).mode);var tt=re.token(ce,ke);if(ce.pos>ce.start)return tt}throw new Error("Mode "+re.name+" failed to advance stream.")}var jr=function(re,ce,ke){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=ce||null,this.state=ke};function Fo(re,ce,ke,Pe){var je=re.doc,tt=je.mode,mt;ce=Lr(je,ce);var Nt=Cn(je,ce.line),Lt=ga(re,ce.line,ke),Bt=new Qt(Nt.text,re.options.tabSize,Lt),qt;for(Pe&&(qt=[]);(Pe||Bt.pos<ce.ch)&&!Bt.eol();)Bt.start=Bt.pos,mt=Ti(tt,Bt,Lt.state),Pe&&qt.push(new jr(Bt,mt,qn(je.mode,Lt.state)));return Pe?qt:new jr(Bt,mt,Lt.state)}function Oi(re,ce){if(re)for(;;){var ke=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ke)break;re=re.slice(0,ke.index)+re.slice(ke.index+ke[0].length);var Pe=ke[1]?"bgClass":"textClass";ce[Pe]==null?ce[Pe]=ke[2]:new RegExp("(?:^|\\s)"+ke[2]+"(?:$|\\s)").test(ce[Pe])||(ce[Pe]+=" "+ke[2])}return re}function Ri(re,ce,ke,Pe,je,tt,mt){var Nt=ke.flattenSpans;Nt==null&&(Nt=re.options.flattenSpans);var Lt=0,Bt=null,qt=new Qt(ce,re.options.tabSize,Pe),Ut,xn=re.options.addModeClass&&[null];for(ce==""&&Oi(Vr(ke,Pe.state),tt);!qt.eol();){if(qt.pos>re.options.maxHighlightLength?(Nt=!1,mt&&tn(re,ce,Pe,qt.pos),qt.pos=ce.length,Ut=null):Ut=Oi(Ti(ke,qt,Pe.state,xn),tt),xn){var gn=xn[0].name;gn&&(Ut="m-"+(Ut?gn+" "+Ut:gn))}if(!Nt||Bt!=Ut){for(;Lt<qt.start;)Lt=Math.min(qt.start,Lt+5e3),je(Lt,Bt);Bt=Ut}qt.start=qt.pos}for(;Lt<qt.pos;){var Jn=Math.min(qt.pos,Lt+5e3);je(Jn,Bt),Lt=Jn}}function Li(re,ce,ke){for(var Pe,je,tt=re.doc,mt=ke?-1:ce-(re.doc.mode.innerMode?1e3:100),Nt=ce;Nt>mt;--Nt){if(Nt<=tt.first)return tt.first;var Lt=Cn(tt,Nt-1),Bt=Lt.stateAfter;if(Bt&&(!ke||Nt+(Bt instanceof Xn?Bt.lookAhead:0)<=tt.modeFrontier))return Nt;var qt=Ke(Lt.text,null,re.options.tabSize);(je==null||Pe>qt)&&(je=Nt-1,Pe=qt)}return je}function bi(re,ce){if(re.modeFrontier=Math.min(re.modeFrontier,ce),!(re.highlightFrontier<ce-10)){for(var ke=re.first,Pe=ce-1;Pe>ke;Pe--){var je=Cn(re,Pe).stateAfter;if(je&&(!(je instanceof Xn)||Pe+je.lookAhead<ce)){ke=Pe+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,ke)}}var uo=!1,Ln=!1;function la(){uo=!0}function Nn(){Ln=!0}function vo(re,ce,ke){this.marker=re,this.from=ce,this.to=ke}function bs(re,ce){if(re)for(var ke=0;ke<re.length;++ke){var Pe=re[ke];if(Pe.marker==ce)return Pe}}function Xt(re,ce){for(var ke,Pe=0;Pe<re.length;++Pe)re[Pe]!=ce&&(ke||(ke=[])).push(re[Pe]);return ke}function Jt(re,ce){re.markedSpans=re.markedSpans?re.markedSpans.concat([ce]):[ce],ce.marker.attachLine(re)}function cn(re,ce,ke){var Pe;if(re)for(var je=0;je<re.length;++je){var tt=re[je],mt=tt.marker,Nt=tt.from==null||(mt.inclusiveLeft?tt.from<=ce:tt.from<ce);if(Nt||tt.from==ce&&mt.type=="bookmark"&&(!ke||!tt.marker.insertLeft)){var Lt=tt.to==null||(mt.inclusiveRight?tt.to>=ce:tt.to>ce);(Pe||(Pe=[])).push(new vo(mt,tt.from,Lt?null:tt.to))}}return Pe}function Fn(re,ce,ke){var Pe;if(re)for(var je=0;je<re.length;++je){var tt=re[je],mt=tt.marker,Nt=tt.to==null||(mt.inclusiveRight?tt.to>=ce:tt.to>ce);if(Nt||tt.from==ce&&mt.type=="bookmark"&&(!ke||tt.marker.insertLeft)){var Lt=tt.from==null||(mt.inclusiveLeft?tt.from<=ce:tt.from<ce);(Pe||(Pe=[])).push(new vo(mt,Lt?null:tt.from-ce,tt.to==null?null:tt.to-ce))}}return Pe}function pr(re,ce){if(ce.full)return null;var ke=Nr(re,ce.from.line)&&Cn(re,ce.from.line).markedSpans,Pe=Nr(re,ce.to.line)&&Cn(re,ce.to.line).markedSpans;if(!ke&&!Pe)return null;var je=ce.from.ch,tt=ce.to.ch,mt=vr(ce.from,ce.to)==0,Nt=cn(ke,je,mt),Lt=Fn(Pe,tt,mt),Bt=ce.text.length==1,qt=Tt(ce.text).length+(Bt?je:0);if(Nt)for(var Ut=0;Ut<Nt.length;++Ut){var xn=Nt[Ut];if(xn.to==null){var gn=bs(Lt,xn.marker);gn?Bt&&(xn.to=gn.to==null?null:gn.to+qt):xn.to=je}}if(Lt)for(var Jn=0;Jn<Lt.length;++Jn){var er=Lt[Jn];if(er.to!=null&&(er.to+=qt),er.from==null){var hr=bs(Nt,er.marker);hr||(er.from=qt,Bt&&(Nt||(Nt=[])).push(er))}else er.from+=qt,Bt&&(Nt||(Nt=[])).push(er)}Nt&&(Nt=li(Nt)),Lt&&Lt!=Nt&&(Lt=li(Lt));var kr=[Nt];if(!Bt){var Yr=ce.text.length-2,Rr;if(Yr>0&&Nt)for(var ri=0;ri<Nt.length;++ri)Nt[ri].to==null&&(Rr||(Rr=[])).push(new vo(Nt[ri].marker,null,null));for(var ji=0;ji<Yr;++ji)kr.push(Rr);kr.push(Lt)}return kr}function li(re){for(var ce=0;ce<re.length;++ce){var ke=re[ce];ke.from!=null&&ke.from==ke.to&&ke.marker.clearWhenEmpty!==!1&&re.splice(ce--,1)}return re.length?re:null}function Zr(re,ce,ke){var Pe=null;if(re.iter(ce.line,ke.line+1,function(gn){if(gn.markedSpans)for(var Jn=0;Jn<gn.markedSpans.length;++Jn){var er=gn.markedSpans[Jn].marker;er.readOnly&&(!Pe||$e(Pe,er)==-1)&&(Pe||(Pe=[])).push(er)}}),!Pe)return null;for(var je=[{from:ce,to:ke}],tt=0;tt<Pe.length;++tt)for(var mt=Pe[tt],Nt=mt.find(0),Lt=0;Lt<je.length;++Lt){var Bt=je[Lt];if(!(vr(Bt.to,Nt.from)<0||vr(Bt.from,Nt.to)>0)){var qt=[Lt,1],Ut=vr(Bt.from,Nt.from),xn=vr(Bt.to,Nt.to);(Ut<0||!mt.inclusiveLeft&&!Ut)&&qt.push({from:Bt.from,to:Nt.from}),(xn>0||!mt.inclusiveRight&&!xn)&&qt.push({from:Nt.to,to:Bt.to}),je.splice.apply(je,qt),Lt+=qt.length-3}}return je}function Vn(re){var ce=re.markedSpans;if(ce){for(var ke=0;ke<ce.length;++ke)ce[ke].marker.detachLine(re);re.markedSpans=null}}function Mt(re,ce){if(ce){for(var ke=0;ke<ce.length;++ke)ce[ke].marker.attachLine(re);re.markedSpans=ce}}function yo(re){return re.inclusiveLeft?-1:0}function za(re){return re.inclusiveRight?1:0}function Gs(re,ce){var ke=re.lines.length-ce.lines.length;if(ke!=0)return ke;var Pe=re.find(),je=ce.find(),tt=vr(Pe.from,je.from)||yo(re)-yo(ce);if(tt)return-tt;var mt=vr(Pe.to,je.to)||za(re)-za(ce);return mt||ce.id-re.id}function Ua(re,ce){var ke=Ln&&re.markedSpans,Pe;if(ke)for(var je=void 0,tt=0;tt<ke.length;++tt)je=ke[tt],je.marker.collapsed&&(ce?je.from:je.to)==null&&(!Pe||Gs(Pe,je.marker)<0)&&(Pe=je.marker);return Pe}function Fa(re){return Ua(re,!0)}function Da(re){return Ua(re,!1)}function yl(re,ce){var ke=Ln&&re.markedSpans,Pe;if(ke)for(var je=0;je<ke.length;++je){var tt=ke[je];tt.marker.collapsed&&(tt.from==null||tt.from<ce)&&(tt.to==null||tt.to>ce)&&(!Pe||Gs(Pe,tt.marker)<0)&&(Pe=tt.marker)}return Pe}function fs(re,ce,ke,Pe,je){var tt=Cn(re,ce),mt=Ln&&tt.markedSpans;if(mt)for(var Nt=0;Nt<mt.length;++Nt){var Lt=mt[Nt];if(Lt.marker.collapsed){var Bt=Lt.marker.find(0),qt=vr(Bt.from,ke)||yo(Lt.marker)-yo(je),Ut=vr(Bt.to,Pe)||za(Lt.marker)-za(je);if(!(qt>=0&&Ut<=0||qt<=0&&Ut>=0)&&(qt<=0&&(Lt.marker.inclusiveRight&&je.inclusiveLeft?vr(Bt.to,ke)>=0:vr(Bt.to,ke)>0)||qt>=0&&(Lt.marker.inclusiveRight&&je.inclusiveLeft?vr(Bt.from,Pe)<=0:vr(Bt.from,Pe)<0)))return!0}}}function No(re){for(var ce;ce=Fa(re);)re=ce.find(-1,!0).line;return re}function ea(re){for(var ce;ce=Da(re);)re=ce.find(1,!0).line;return re}function zr(re){for(var ce,ke;ce=Da(re);)re=ce.find(1,!0).line,(ke||(ke=[])).push(re);return ke}function Tr(re,ce){var ke=Cn(re,ce),Pe=No(ke);return ke==Pe?ce:Zt(Pe)}function ti(re,ce){if(ce>re.lastLine())return ce;var ke=Cn(re,ce),Pe;if(!jn(re,ke))return ce;for(;Pe=Da(ke);)ke=Pe.find(1,!0).line;return Zt(ke)+1}function jn(re,ce){var ke=Ln&&ce.markedSpans;if(ke){for(var Pe=void 0,je=0;je<ke.length;++je)if(Pe=ke[je],!!Pe.marker.collapsed){if(Pe.from==null)return!0;if(!Pe.marker.widgetNode&&Pe.from==0&&Pe.marker.inclusiveLeft&&Gi(re,ce,Pe))return!0}}}function Gi(re,ce,ke){if(ke.to==null){var Pe=ke.marker.find(1,!0);return Gi(re,Pe.line,bs(Pe.line.markedSpans,ke.marker))}if(ke.marker.inclusiveRight&&ke.to==ce.text.length)return!0;for(var je=void 0,tt=0;tt<ce.markedSpans.length;++tt)if(je=ce.markedSpans[tt],je.marker.collapsed&&!je.marker.widgetNode&&je.from==ke.to&&(je.to==null||je.to!=ke.from)&&(je.marker.inclusiveLeft||ke.marker.inclusiveRight)&&Gi(re,ce,je))return!0}function So(re){re=No(re);for(var ce=0,ke=re.parent,Pe=0;Pe<ke.lines.length;++Pe){var je=ke.lines[Pe];if(je==re)break;ce+=je.height}for(var tt=ke.parent;tt;ke=tt,tt=ke.parent)for(var mt=0;mt<tt.children.length;++mt){var Nt=tt.children[mt];if(Nt==ke)break;ce+=Nt.height}return ce}function ta(re){if(re.height==0)return 0;for(var ce=re.text.length,ke,Pe=re;ke=Fa(Pe);){var je=ke.find(0,!0);Pe=je.from.line,ce+=je.from.ch-je.to.ch}for(Pe=re;ke=Da(Pe);){var tt=ke.find(0,!0);ce-=Pe.text.length-tt.from.ch,Pe=tt.to.line,ce+=Pe.text.length-tt.to.ch}return ce}function Oo(re){var ce=re.display,ke=re.doc;ce.maxLine=Cn(ke,ke.first),ce.maxLineLength=ta(ce.maxLine),ce.maxLineChanged=!0,ke.iter(function(Pe){var je=ta(Pe);je>ce.maxLineLength&&(ce.maxLineLength=je,ce.maxLine=Pe)})}var Wo=function(re,ce,ke){this.text=re,Mt(this,ce),this.height=ke?ke(this):1};Wo.prototype.lineNo=function(){return Zt(this)},Dn(Wo);function na(re,ce,ke,Pe){re.text=ce,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),Vn(re),Mt(re,ke);var je=Pe?Pe(re):1;je!=re.height&&_n(re,je)}function Ya(re){re.parent=null,Vn(re)}var Ia={},Ol={};function Hl(re,ce){if(!re||/^\s*$/.test(re))return null;var ke=ce.addModeClass?Ol:Ia;return ke[re]||(ke[re]=re.replace(/\S+/g,"cm-$&"))}function rn(re,ce){var ke=ze("span",null,null,de?"padding-right: .1px":null),Pe={pre:ze("pre",[ke],"CodeMirror-line"),content:ke,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};ce.measure={};for(var je=0;je<=(ce.rest?ce.rest.length:0);je++){var tt=je?ce.rest[je-1]:ce.line,mt=void 0;Pe.pos=0,Pe.addToken=ol,Jr(re.display.measure)&&(mt=ln(tt,re.doc.direction))&&(Pe.addToken=co(Pe.addToken,mt)),Pe.map=[];var Nt=ce!=re.display.externalMeasured&&Zt(tt);jl(tt,Pe,Aa(re,tt,Nt)),tt.styleClasses&&(tt.styleClasses.bgClass&&(Pe.bgClass=st(tt.styleClasses.bgClass,Pe.bgClass||"")),tt.styleClasses.textClass&&(Pe.textClass=st(tt.styleClasses.textClass,Pe.textClass||""))),Pe.map.length==0&&Pe.map.push(0,0,Pe.content.appendChild(lo(re.display.measure))),je==0?(ce.measure.map=Pe.map,ce.measure.cache={}):((ce.measure.maps||(ce.measure.maps=[])).push(Pe.map),(ce.measure.caches||(ce.measure.caches=[])).push({}))}if(de){var Lt=Pe.content.lastChild;(/\bcm-tab\b/.test(Lt.className)||Lt.querySelector&&Lt.querySelector(".cm-tab"))&&(Pe.content.className="cm-tab-wrap-hack")}return un(re,"renderLine",re,ce.line,Pe.pre),Pe.pre.className&&(Pe.textClass=st(Pe.pre.className,Pe.textClass||"")),Pe}function us(re){var ce=Oe("span","\u2022","cm-invalidchar");return ce.title="\\u"+re.charCodeAt(0).toString(16),ce.setAttribute("aria-label",ce.title),ce}function ol(re,ce,ke,Pe,je,tt,mt){if(ce){var Nt=re.splitSpaces?au(ce,re.trailingSpace):ce,Lt=re.cm.state.specialChars,Bt=!1,qt;if(!Lt.test(ce))re.col+=ce.length,qt=document.createTextNode(Nt),re.map.push(re.pos,re.pos+ce.length,qt),Ie&&me<9&&(Bt=!0),re.pos+=ce.length;else{qt=document.createDocumentFragment();for(var Ut=0;;){Lt.lastIndex=Ut;var xn=Lt.exec(ce),gn=xn?xn.index-Ut:ce.length-Ut;if(gn){var Jn=document.createTextNode(Nt.slice(Ut,Ut+gn));Ie&&me<9?qt.appendChild(Oe("span",[Jn])):qt.appendChild(Jn),re.map.push(re.pos,re.pos+gn,Jn),re.col+=gn,re.pos+=gn}if(!xn)break;Ut+=gn+1;var er=void 0;if(xn[0]==" "){var hr=re.cm.options.tabSize,kr=hr-re.col%hr;er=qt.appendChild(Oe("span",yt(kr),"cm-tab")),er.setAttribute("role","presentation"),er.setAttribute("cm-text"," "),re.col+=kr}else xn[0]=="\r"||xn[0]==`
`?(er=qt.appendChild(Oe("span",xn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),er.setAttribute("cm-text",xn[0]),re.col+=1):(er=re.cm.options.specialCharPlaceholder(xn[0]),er.setAttribute("cm-text",xn[0]),Ie&&me<9?qt.appendChild(Oe("span",[er])):qt.appendChild(er),re.col+=1);re.map.push(re.pos,re.pos+1,er),re.pos++}}if(re.trailingSpace=Nt.charCodeAt(ce.length-1)==32,ke||Pe||je||Bt||tt||mt){var Yr=ke||"";Pe&&(Yr+=Pe),je&&(Yr+=je);var Rr=Oe("span",[qt],Yr,tt);if(mt)for(var ri in mt)mt.hasOwnProperty(ri)&&ri!="style"&&ri!="class"&&Rr.setAttribute(ri,mt[ri]);return re.content.appendChild(Rr)}re.content.appendChild(qt)}}function au(re,ce){if(re.length>1&&!/ /.test(re))return re;for(var ke=ce,Pe="",je=0;je<re.length;je++){var tt=re.charAt(je);tt==" "&&ke&&(je==re.length-1||re.charCodeAt(je+1)==32)&&(tt="\xA0"),Pe+=tt,ke=tt==" "}return Pe}function co(re,ce){return function(ke,Pe,je,tt,mt,Nt,Lt){je=je?je+" cm-force-border":"cm-force-border";for(var Bt=ke.pos,qt=Bt+Pe.length;;){for(var Ut=void 0,xn=0;xn<ce.length&&(Ut=ce[xn],!(Ut.to>Bt&&Ut.from<=Bt));xn++);if(Ut.to>=qt)return re(ke,Pe,je,tt,mt,Nt,Lt);re(ke,Pe.slice(0,Ut.to-Bt),je,tt,null,Nt,Lt),tt=null,Pe=Pe.slice(Ut.to-Bt),Bt=Ut.to}}}function Sl(re,ce,ke,Pe){var je=!Pe&&ke.widgetNode;je&&re.map.push(re.pos,re.pos+ce,je),!Pe&&re.cm.display.input.needsContentAttribute&&(je||(je=re.content.appendChild(document.createElement("span"))),je.setAttribute("cm-marker",ke.id)),je&&(re.cm.display.input.setUneditable(je),re.content.appendChild(je)),re.pos+=ce,re.trailingSpace=!1}function jl(re,ce,ke){var Pe=re.markedSpans,je=re.text,tt=0;if(!Pe){for(var mt=1;mt<ke.length;mt+=2)ce.addToken(ce,je.slice(tt,tt=ke[mt]),Hl(ke[mt+1],ce.cm.options));return}for(var Nt=je.length,Lt=0,Bt=1,qt="",Ut,xn,gn=0,Jn,er,hr,kr,Yr;;){if(gn==Lt){Jn=er=hr=xn="",Yr=null,kr=null,gn=1/0;for(var Rr=[],ri=void 0,ji=0;ji<Pe.length;++ji){var Dr=Pe[ji],so=Dr.marker;if(so.type=="bookmark"&&Dr.from==Lt&&so.widgetNode)Rr.push(so);else if(Dr.from<=Lt&&(Dr.to==null||Dr.to>Lt||so.collapsed&&Dr.to==Lt&&Dr.from==Lt)){if(Dr.to!=null&&Dr.to!=Lt&&gn>Dr.to&&(gn=Dr.to,er=""),so.className&&(Jn+=" "+so.className),so.css&&(xn=(xn?xn+";":"")+so.css),so.startStyle&&Dr.from==Lt&&(hr+=" "+so.startStyle),so.endStyle&&Dr.to==gn&&(ri||(ri=[])).push(so.endStyle,Dr.to),so.title&&((Yr||(Yr={})).title=so.title),so.attributes)for(var Na in so.attributes)(Yr||(Yr={}))[Na]=so.attributes[Na];so.collapsed&&(!kr||Gs(kr.marker,so)<0)&&(kr=Dr)}else Dr.from>Lt&&gn>Dr.from&&(gn=Dr.from)}if(ri)for(var Ds=0;Ds<ri.length;Ds+=2)ri[Ds+1]==gn&&(er+=" "+ri[Ds]);if(!kr||kr.from==Lt)for(var Va=0;Va<Rr.length;++Va)Sl(ce,0,Rr[Va]);if(kr&&(kr.from||0)==Lt){if(Sl(ce,(kr.to==null?Nt+1:kr.to)-Lt,kr.marker,kr.from==null),kr.to==null)return;kr.to==Lt&&(kr=!1)}}if(Lt>=Nt)break;for(var eu=Math.min(Nt,gn);;){if(qt){var kl=Lt+qt.length;if(!kr){var Ts=kl>eu?qt.slice(0,eu-Lt):qt;ce.addToken(ce,Ts,Ut?Ut+Jn:Jn,hr,Lt+Ts.length==gn?er:"",xn,Yr)}if(kl>=eu){qt=qt.slice(eu-Lt),Lt=eu;break}Lt=kl,hr=""}qt=je.slice(tt,tt=ke[Bt++]),Ut=Hl(ke[Bt++],ce.cm.options)}}}function Kl(re,ce,ke){this.line=ce,this.rest=zr(ce),this.size=this.rest?Zt(Tt(this.rest))-ke+1:1,this.node=this.text=null,this.hidden=jn(re,ce)}function xo(re,ce,ke){for(var Pe=[],je,tt=ce;tt<ke;tt=je){var mt=new Kl(re.doc,Cn(re.doc,tt),tt);je=tt+mt.size,Pe.push(mt)}return Pe}var ma=null;function mi(re){ma?ma.ops.push(re):re.ownsGroup=ma={ops:[re],delayedCallbacks:[]}}function Ai(re){var ce=re.delayedCallbacks,ke=0;do{for(;ke<ce.length;ke++)ce[ke].call(null);for(var Pe=0;Pe<re.ops.length;Pe++){var je=re.ops[Pe];if(je.cursorActivityHandlers)for(;je.cursorActivityCalled<je.cursorActivityHandlers.length;)je.cursorActivityHandlers[je.cursorActivityCalled++].call(null,je.cm)}}while(ke<ce.length)}function Mo(re,ce){var ke=re.ownsGroup;if(ke)try{Ai(ke)}finally{ma=null,ce(ke)}}var Yo=null;function yr(re,ce){var ke=$t(re,ce);if(ke.length){var Pe=Array.prototype.slice.call(arguments,2),je;ma?je=ma.delayedCallbacks:Yo?je=Yo:(je=Yo=[],setTimeout(Ph,0));for(var tt=function(Nt){je.push(function(){return ke[Nt].apply(null,Pe)})},mt=0;mt<ke.length;++mt)tt(mt)}}function Ph(){var re=Yo;Yo=null;for(var ce=0;ce<re.length;++ce)re[ce]()}function Ns(re,ce,ke,Pe){for(var je=0;je<ce.changes.length;je++){var tt=ce.changes[je];tt=="text"?nr(re,ce):tt=="gutter"?Ma(re,ce,ke,Pe):tt=="class"?ba(re,ce):tt=="widget"&&Xl(re,ce,Pe)}ce.changes=null}function Vl(re){return re.node==re.text&&(re.node=Oe("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Ie&&me<8&&(re.node.style.zIndex=2)),re.node}function Ch(re,ce){var ke=ce.bgClass?ce.bgClass+" "+(ce.line.bgClass||""):ce.line.bgClass;if(ke&&(ke+=" CodeMirror-linebackground"),ce.background)ke?ce.background.className=ke:(ce.background.parentNode.removeChild(ce.background),ce.background=null);else if(ke){var Pe=Vl(ce);ce.background=Pe.insertBefore(Oe("div",null,ke),Pe.firstChild),re.display.input.setUneditable(ce.background)}}function Eh(re,ce){var ke=re.display.externalMeasured;return ke&&ke.line==ce.line?(re.display.externalMeasured=null,ce.measure=ke.measure,ke.built):rn(re,ce)}function nr(re,ce){var ke=ce.text.className,Pe=Eh(re,ce);ce.text==ce.node&&(ce.node=Pe.pre),ce.text.parentNode.replaceChild(Pe.pre,ce.text),ce.text=Pe.pre,Pe.bgClass!=ce.bgClass||Pe.textClass!=ce.textClass?(ce.bgClass=Pe.bgClass,ce.textClass=Pe.textClass,ba(re,ce)):ke&&(ce.text.className=ke)}function ba(re,ce){Ch(re,ce),ce.line.wrapClass?Vl(ce).className=ce.line.wrapClass:ce.node!=ce.text&&(ce.node.className="");var ke=ce.textClass?ce.textClass+" "+(ce.line.textClass||""):ce.line.textClass;ce.text.className=ke||""}function Ma(re,ce,ke,Pe){if(ce.gutter&&(ce.node.removeChild(ce.gutter),ce.gutter=null),ce.gutterBackground&&(ce.node.removeChild(ce.gutterBackground),ce.gutterBackground=null),ce.line.gutterClass){var je=Vl(ce);ce.gutterBackground=Oe("div",null,"CodeMirror-gutter-background "+ce.line.gutterClass,"left: "+(re.options.fixedGutter?Pe.fixedPos:-Pe.gutterTotalWidth)+"px; width: "+Pe.gutterTotalWidth+"px"),re.display.input.setUneditable(ce.gutterBackground),je.insertBefore(ce.gutterBackground,ce.text)}var tt=ce.line.gutterMarkers;if(re.options.lineNumbers||tt){var mt=Vl(ce),Nt=ce.gutter=Oe("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?Pe.fixedPos:-Pe.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Nt),mt.insertBefore(Nt,ce.text),ce.line.gutterClass&&(Nt.className+=" "+ce.line.gutterClass),re.options.lineNumbers&&(!tt||!tt["CodeMirror-linenumbers"])&&(ce.lineNumber=Nt.appendChild(Oe("div",si(re.options,ke),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Pe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),tt)for(var Lt=0;Lt<re.display.gutterSpecs.length;++Lt){var Bt=re.display.gutterSpecs[Lt].className,qt=tt.hasOwnProperty(Bt)&&tt[Bt];qt&&Nt.appendChild(Oe("div",[qt],"CodeMirror-gutter-elt","left: "+Pe.gutterLeft[Bt]+"px; width: "+Pe.gutterWidth[Bt]+"px"))}}}function Xl(re,ce,ke){ce.alignable&&(ce.alignable=null);for(var Pe=Le("CodeMirror-linewidget"),je=ce.node.firstChild,tt=void 0;je;je=tt)tt=je.nextSibling,Pe.test(je.className)&&ce.node.removeChild(je);ds(re,ce,ke)}function Ta(re,ce,ke,Pe){var je=Eh(re,ce);return ce.text=ce.node=je.pre,je.bgClass&&(ce.bgClass=je.bgClass),je.textClass&&(ce.textClass=je.textClass),ba(re,ce),Ma(re,ce,ke,Pe),ds(re,ce,Pe),ce.node}function ds(re,ce,ke){if(oi(re,ce.line,ce,ke,!0),ce.rest)for(var Pe=0;Pe<ce.rest.length;Pe++)oi(re,ce.rest[Pe],ce,ke,!1)}function oi(re,ce,ke,Pe,je){if(ce.widgets)for(var tt=Vl(ke),mt=0,Nt=ce.widgets;mt<Nt.length;++mt){var Lt=Nt[mt],Bt=Oe("div",[Lt.node],"CodeMirror-linewidget"+(Lt.className?" "+Lt.className:""));Lt.handleMouseEvents||Bt.setAttribute("cm-ignore-events","true"),vu(Lt,Bt,ke,Pe),re.display.input.setUneditable(Bt),je&&Lt.above?tt.insertBefore(Bt,ke.gutter||ke.text):tt.appendChild(Bt),yr(Lt,"redraw")}}function vu(re,ce,ke,Pe){if(re.noHScroll){(ke.alignable||(ke.alignable=[])).push(ce);var je=Pe.wrapperWidth;ce.style.left=Pe.fixedPos+"px",re.coverGutter||(je-=Pe.gutterTotalWidth,ce.style.paddingLeft=Pe.gutterTotalWidth+"px"),ce.style.width=je+"px"}re.coverGutter&&(ce.style.zIndex=5,ce.style.position="relative",re.noHScroll||(ce.style.marginLeft=-Pe.gutterTotalWidth+"px"))}function al(re){if(re.height!=null)return re.height;var ce=re.doc.cm;if(!ce)return 0;if(!Ye(document.body,re.node)){var ke="position: relative;";re.coverGutter&&(ke+="margin-left: -"+ce.display.gutters.offsetWidth+"px;"),re.noHScroll&&(ke+="width: "+ce.display.wrapper.clientWidth+"px;"),Ae(ce.display.measure,Oe("div",[re.node],null,ke))}return re.height=re.node.parentNode.offsetHeight}function Ps(re,ce){for(var ke=no(ce);ke!=re.wrapper;ke=ke.parentNode)if(!ke||ke.nodeType==1&&ke.getAttribute("cm-ignore-events")=="true"||ke.parentNode==re.sizer&&ke!=re.mover)return!0}function Yl(re){return re.lineSpace.offsetTop}function Yh(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function yc(re){if(re.cachedPaddingH)return re.cachedPaddingH;var ce=Ae(re.measure,Oe("pre","x","CodeMirror-line-like")),ke=window.getComputedStyle?window.getComputedStyle(ce):ce.currentStyle,Pe={left:parseInt(ke.paddingLeft),right:parseInt(ke.paddingRight)};return!isNaN(Pe.left)&&!isNaN(Pe.right)&&(re.cachedPaddingH=Pe),Pe}function Fl(re){return vt-re.display.nativeBarWidth}function yu(re){return re.display.scroller.clientWidth-Fl(re)-re.display.barWidth}function Xc(re){return re.display.scroller.clientHeight-Fl(re)-re.display.barHeight}function gd(re,ce,ke){var Pe=re.options.lineWrapping,je=Pe&&yu(re);if(!ce.measure.heights||Pe&&ce.measure.width!=je){var tt=ce.measure.heights=[];if(Pe){ce.measure.width=je;for(var mt=ce.text.firstChild.getClientRects(),Nt=0;Nt<mt.length-1;Nt++){var Lt=mt[Nt],Bt=mt[Nt+1];Math.abs(Lt.bottom-Bt.bottom)>2&&tt.push((Lt.bottom+Bt.top)/2-ke.top)}}tt.push(ke.bottom-ke.top)}}function Yc(re,ce,ke){if(re.line==ce)return{map:re.measure.map,cache:re.measure.cache};for(var Pe=0;Pe<re.rest.length;Pe++)if(re.rest[Pe]==ce)return{map:re.measure.maps[Pe],cache:re.measure.caches[Pe]};for(var je=0;je<re.rest.length;je++)if(Zt(re.rest[je])>ke)return{map:re.measure.maps[je],cache:re.measure.caches[je],before:!0}}function $d(re,ce){ce=No(ce);var ke=Zt(ce),Pe=re.display.externalMeasured=new Kl(re.doc,ce,ke);Pe.lineN=ke;var je=Pe.built=rn(re,Pe);return Pe.text=je.pre,Ae(re.display.lineMeasure,je.pre),Pe}function md(re,ce,ke,Pe){return Su(re,kh(re,ce),ke,Pe)}function Vu(re,ce){if(ce>=re.display.viewFrom&&ce<re.display.viewTo)return re.display.view[Os(re,ce)];var ke=re.display.externalMeasured;if(ke&&ce>=ke.lineN&&ce<ke.lineN+ke.size)return ke}function kh(re,ce){var ke=Zt(ce),Pe=Vu(re,ke);Pe&&!Pe.text?Pe=null:Pe&&Pe.changes&&(Ns(re,Pe,ke,Ff(re)),re.curOp.forceUpdate=!0),Pe||(Pe=$d(re,ce));var je=Yc(Pe,ce,ke);return{line:ce,view:Pe,rect:null,map:je.map,cache:je.cache,before:je.before,hasHeights:!1}}function Su(re,ce,ke,Pe,je){ce.before&&(ke=-1);var tt=ke+(Pe||""),mt;return ce.cache.hasOwnProperty(tt)?mt=ce.cache[tt]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(gd(re,ce.view,ce.rect),ce.hasHeights=!0),mt=Ba(re,ce,ke,Pe),mt.bogus||(ce.cache[tt]=mt)),{left:mt.left,right:mt.right,top:je?mt.rtop:mt.top,bottom:je?mt.rbottom:mt.bottom}}var Zc={left:0,right:0,top:0,bottom:0};function Tf(re,ce,ke){for(var Pe,je,tt,mt,Nt,Lt,Bt=0;Bt<re.length;Bt+=3)if(Nt=re[Bt],Lt=re[Bt+1],ce<Nt?(je=0,tt=1,mt="left"):ce<Lt?(je=ce-Nt,tt=je+1):(Bt==re.length-3||ce==Lt&&re[Bt+3]>ce)&&(tt=Lt-Nt,je=tt-1,ce>=Lt&&(mt="right")),je!=null){if(Pe=re[Bt+2],Nt==Lt&&ke==(Pe.insertLeft?"left":"right")&&(mt=ke),ke=="left"&&je==0)for(;Bt&&re[Bt-2]==re[Bt-3]&&re[Bt-1].insertLeft;)Pe=re[(Bt-=3)+2],mt="left";if(ke=="right"&&je==Lt-Nt)for(;Bt<re.length-3&&re[Bt+3]==re[Bt+4]&&!re[Bt+5].insertLeft;)Pe=re[(Bt+=3)+2],mt="right";break}return{node:Pe,start:je,end:tt,collapse:mt,coverStart:Nt,coverEnd:Lt}}function vd(re,ce){var ke=Zc;if(ce=="left")for(var Pe=0;Pe<re.length&&(ke=re[Pe]).left==ke.right;Pe++);else for(var je=re.length-1;je>=0&&(ke=re[je]).left==ke.right;je--);return ke}function Ba(re,ce,ke,Pe){var je=Tf(ce.map,ke,Pe),tt=je.node,mt=je.start,Nt=je.end,Lt=je.collapse,Bt;if(tt.nodeType==3){for(var qt=0;qt<4;qt++){for(;mt&&Xe(ce.line.text.charAt(je.coverStart+mt));)--mt;for(;je.coverStart+Nt<je.coverEnd&&Xe(ce.line.text.charAt(je.coverStart+Nt));)++Nt;if(Ie&&me<9&&mt==0&&Nt==je.coverEnd-je.coverStart?Bt=tt.parentNode.getBoundingClientRect():Bt=vd(He(tt,mt,Nt).getClientRects(),Pe),Bt.left||Bt.right||mt==0)break;Nt=mt,mt=mt-1,Lt="right"}Ie&&me<11&&(Bt=qd(re.display.measure,Bt))}else{mt>0&&(Lt=Pe="right");var Ut;re.options.lineWrapping&&(Ut=tt.getClientRects()).length>1?Bt=Ut[Pe=="right"?Ut.length-1:0]:Bt=tt.getBoundingClientRect()}if(Ie&&me<9&&!mt&&(!Bt||!Bt.left&&!Bt.right)){var xn=tt.parentNode.getClientRects()[0];xn?Bt={left:xn.left,right:xn.left+Ou(re.display),top:xn.top,bottom:xn.bottom}:Bt=Zc}for(var gn=Bt.top-ce.rect.top,Jn=Bt.bottom-ce.rect.top,er=(gn+Jn)/2,hr=ce.view.measure.heights,kr=0;kr<hr.length-1&&!(er<hr[kr]);kr++);var Yr=kr?hr[kr-1]:0,Rr=hr[kr],ri={left:(Lt=="right"?Bt.right:Bt.left)-ce.rect.left,right:(Lt=="left"?Bt.left:Bt.right)-ce.rect.left,top:Yr,bottom:Rr};return!Bt.left&&!Bt.right&&(ri.bogus=!0),re.options.singleCursorHeightPerLine||(ri.rtop=gn,ri.rbottom=Jn),ri}function qd(re,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Rn(re))return ce;var ke=screen.logicalXDPI/screen.deviceXDPI,Pe=screen.logicalYDPI/screen.deviceYDPI;return{left:ce.left*ke,right:ce.right*ke,top:ce.top*Pe,bottom:ce.bottom*Pe}}function Lf(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var ce=0;ce<re.rest.length;ce++)re.measure.caches[ce]={}}function Jc(re){re.display.externalMeasure=null,Fe(re.display.lineMeasure);for(var ce=0;ce<re.display.view.length;ce++)Lf(re.display.view[ce])}function Zh(re){Jc(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function xl(){return we&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function zs(){return we&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function is(re){var ce=0;if(re.widgets)for(var ke=0;ke<re.widgets.length;++ke)re.widgets[ke].above&&(ce+=al(re.widgets[ke]));return ce}function ps(re,ce,ke,Pe,je){if(!je){var tt=is(ce);ke.top+=tt,ke.bottom+=tt}if(Pe=="line")return ke;Pe||(Pe="local");var mt=So(ce);if(Pe=="local"?mt+=Yl(re.display):mt-=re.display.viewOffset,Pe=="page"||Pe=="window"){var Nt=re.display.lineSpace.getBoundingClientRect();mt+=Nt.top+(Pe=="window"?0:zs());var Lt=Nt.left+(Pe=="window"?0:xl());ke.left+=Lt,ke.right+=Lt}return ke.top+=mt,ke.bottom+=mt,ke}function Af(re,ce,ke){if(ke=="div")return ce;var Pe=ce.left,je=ce.top;if(ke=="page")Pe-=xl(),je-=zs();else if(ke=="local"||!ke){var tt=re.display.sizer.getBoundingClientRect();Pe+=tt.left,je+=tt.top}var mt=re.display.lineSpace.getBoundingClientRect();return{left:Pe-mt.left,top:je-mt.top}}function Xu(re,ce,ke,Pe,je){return Pe||(Pe=Cn(re.doc,ce.line)),ps(re,Pe,md(re,Pe,ce.ch,je),ke)}function ua(re,ce,ke,Pe,je,tt){Pe=Pe||Cn(re.doc,ce.line),je||(je=kh(re,Pe));function mt(Jn,er){var hr=Su(re,je,Jn,er?"right":"left",tt);return er?hr.left=hr.right:hr.right=hr.left,ps(re,Pe,hr,ke)}var Nt=ln(Pe,re.doc.direction),Lt=ce.ch,Bt=ce.sticky;if(Lt>=Pe.text.length?(Lt=Pe.text.length,Bt="before"):Lt<=0&&(Lt=0,Bt="after"),!Nt)return mt(Bt=="before"?Lt-1:Lt,Bt=="before");function qt(Jn,er,hr){var kr=Nt[er],Yr=kr.level==1;return mt(hr?Jn-1:Jn,Yr!=hr)}var Ut=jt(Nt,Lt,Bt),xn=zt,gn=qt(Lt,Ut,Bt=="before");return xn!=null&&(gn.other=qt(Lt,xn,Bt!="before")),gn}function Nf(re,ce){var ke=0;ce=Lr(re.doc,ce),re.options.lineWrapping||(ke=Ou(re.display)*ce.ch);var Pe=Cn(re.doc,ce.line),je=So(Pe)+Yl(re.display);return{left:ke,right:ke,top:je,bottom:je+Pe.height}}function Of(re,ce,ke,Pe,je){var tt=Tn(re,ce,ke);return tt.xRel=je,Pe&&(tt.outside=Pe),tt}function jf(re,ce,ke){var Pe=re.doc;if(ke+=re.display.viewOffset,ke<0)return Of(Pe.first,0,null,-1,-1);var je=ir(Pe,ke),tt=Pe.first+Pe.size-1;if(je>tt)return Of(Pe.first+Pe.size-1,Cn(Pe,tt).text.length,null,1,1);ce<0&&(ce=0);for(var mt=Cn(Pe,je);;){var Nt=An(re,mt,je,ce,ke),Lt=yl(mt,Nt.ch+(Nt.xRel>0||Nt.outside>0?1:0));if(!Lt)return Nt;var Bt=Lt.find(1);if(Bt.line==je)return Bt;mt=Cn(Pe,je=Bt.line)}}function Br(re,ce,ke,Pe){Pe-=is(ce);var je=ce.text.length,tt=Pt(function(mt){return Su(re,ke,mt-1).bottom<=Pe},je,0);return je=Pt(function(mt){return Su(re,ke,mt).top>Pe},tt,je),{begin:tt,end:je}}function Qc(re,ce,ke,Pe){ke||(ke=kh(re,ce));var je=ps(re,ce,Su(re,ke,Pe),"line").top;return Br(re,ce,ke,je)}function Wt(re,ce,ke,Pe){return re.bottom<=ke?!1:re.top>ke?!0:(Pe?re.left:re.right)>ce}function An(re,ce,ke,Pe,je){je-=So(ce);var tt=kh(re,ce),mt=is(ce),Nt=0,Lt=ce.text.length,Bt=!0,qt=ln(ce,re.doc.direction);if(qt){var Ut=(re.options.lineWrapping?Jh:xu)(re,ce,ke,tt,qt,Pe,je);Bt=Ut.level!=1,Nt=Bt?Ut.from:Ut.to-1,Lt=Bt?Ut.to:Ut.from-1}var xn=null,gn=null,Jn=Pt(function(ji){var Dr=Su(re,tt,ji);return Dr.top+=mt,Dr.bottom+=mt,Wt(Dr,Pe,je,!1)?(Dr.top<=je&&Dr.left<=Pe&&(xn=ji,gn=Dr),!0):!1},Nt,Lt),er,hr,kr=!1;if(gn){var Yr=Pe-gn.left<gn.right-Pe,Rr=Yr==Bt;Jn=xn+(Rr?0:1),hr=Rr?"after":"before",er=Yr?gn.left:gn.right}else{!Bt&&(Jn==Lt||Jn==Nt)&&Jn++,hr=Jn==0?"after":Jn==ce.text.length?"before":Su(re,tt,Jn-(Bt?1:0)).bottom+mt<=je==Bt?"after":"before";var ri=ua(re,Tn(ke,Jn,hr),"line",ce,tt);er=ri.left,kr=je<ri.top?-1:je>=ri.bottom?1:0}return Jn=lt(ce.text,Jn,1),Of(ke,Jn,hr,kr,Pe-er)}function xu(re,ce,ke,Pe,je,tt,mt){var Nt=Pt(function(Ut){var xn=je[Ut],gn=xn.level!=1;return Wt(ua(re,Tn(ke,gn?xn.to:xn.from,gn?"before":"after"),"line",ce,Pe),tt,mt,!0)},0,je.length-1),Lt=je[Nt];if(Nt>0){var Bt=Lt.level!=1,qt=ua(re,Tn(ke,Bt?Lt.from:Lt.to,Bt?"after":"before"),"line",ce,Pe);Wt(qt,tt,mt,!0)&&qt.top>mt&&(Lt=je[Nt-1])}return Lt}function Jh(re,ce,ke,Pe,je,tt,mt){var Nt=Br(re,ce,Pe,mt),Lt=Nt.begin,Bt=Nt.end;/\s/.test(ce.text.charAt(Bt-1))&&Bt--;for(var qt=null,Ut=null,xn=0;xn<je.length;xn++){var gn=je[xn];if(!(gn.from>=Bt||gn.to<=Lt)){var Jn=gn.level!=1,er=Su(re,Pe,Jn?Math.min(Bt,gn.to)-1:Math.max(Lt,gn.from)).right,hr=er<tt?tt-er+1e9:er-tt;(!qt||Ut>hr)&&(qt=gn,Ut=hr)}}return qt||(qt=je[je.length-1]),qt.from<Lt&&(qt={from:Lt,to:qt.to,level:qt.level}),qt.to>Bt&&(qt={from:qt.from,to:Bt,level:qt.level}),qt}var sh;function Yu(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(sh==null){sh=Oe("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)sh.appendChild(document.createTextNode("x")),sh.appendChild(Oe("br"));sh.appendChild(document.createTextNode("x"))}Ae(re.measure,sh);var ke=sh.offsetHeight/50;return ke>3&&(re.cachedTextHeight=ke),Fe(re.measure),ke||1}function Ou(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var ce=Oe("span","xxxxxxxxxx"),ke=Oe("pre",[ce],"CodeMirror-line-like");Ae(re.measure,ke);var Pe=ce.getBoundingClientRect(),je=(Pe.right-Pe.left)/10;return je>2&&(re.cachedCharWidth=je),je||10}function Ff(re){for(var ce=re.display,ke={},Pe={},je=ce.gutters.clientLeft,tt=ce.gutters.firstChild,mt=0;tt;tt=tt.nextSibling,++mt){var Nt=re.display.gutterSpecs[mt].className;ke[Nt]=tt.offsetLeft+tt.clientLeft+je,Pe[Nt]=tt.clientWidth}return{fixedPos:Sc(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:ke,gutterWidth:Pe,wrapperWidth:ce.wrapper.clientWidth}}function Sc(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Pa(re){var ce=Yu(re.display),ke=re.options.lineWrapping,Pe=ke&&Math.max(5,re.display.scroller.clientWidth/Ou(re.display)-3);return function(je){if(jn(re.doc,je))return 0;var tt=0;if(je.widgets)for(var mt=0;mt<je.widgets.length;mt++)je.widgets[mt].height&&(tt+=je.widgets[mt].height);return ke?tt+(Math.ceil(je.text.length/Pe)||1)*ce:tt+ce}}function ni(re){var ce=re.doc,ke=Pa(re);ce.iter(function(Pe){var je=ke(Pe);je!=Pe.height&&_n(Pe,je)})}function Us(re,ce,ke,Pe){var je=re.display;if(!ke&&no(ce).getAttribute("cm-not-content")=="true")return null;var tt,mt,Nt=je.lineSpace.getBoundingClientRect();try{tt=ce.clientX-Nt.left,mt=ce.clientY-Nt.top}catch(Ut){return null}var Lt=jf(re,tt,mt),Bt;if(Pe&&Lt.xRel>0&&(Bt=Cn(re.doc,Lt.line).text).length==Lt.ch){var qt=Ke(Bt,Bt.length,re.options.tabSize)-Bt.length;Lt=Tn(Lt.line,Math.max(0,Math.round((tt-yc(re.display).left)/Ou(re.display))-qt))}return Lt}function Os(re,ce){if(ce>=re.display.viewTo||(ce-=re.display.viewFrom,ce<0))return null;for(var ke=re.display.view,Pe=0;Pe<ke.length;Pe++)if(ce-=ke[Pe].size,ce<0)return Pe}function Ca(re,ce,ke,Pe){ce==null&&(ce=re.doc.first),ke==null&&(ke=re.doc.first+re.doc.size),Pe||(Pe=0);var je=re.display;if(Pe&&ke<je.viewTo&&(je.updateLineNumbers==null||je.updateLineNumbers>ce)&&(je.updateLineNumbers=ce),re.curOp.viewChanged=!0,ce>=je.viewTo)Ln&&Tr(re.doc,ce)<je.viewTo&&Za(re);else if(ke<=je.viewFrom)Ln&&ti(re.doc,ke+Pe)>je.viewFrom?Za(re):(je.viewFrom+=Pe,je.viewTo+=Pe);else if(ce<=je.viewFrom&&ke>=je.viewTo)Za(re);else if(ce<=je.viewFrom){var tt=wl(re,ke,ke+Pe,1);tt?(je.view=je.view.slice(tt.index),je.viewFrom=tt.lineN,je.viewTo+=Pe):Za(re)}else if(ke>=je.viewTo){var mt=wl(re,ce,ce,-1);mt?(je.view=je.view.slice(0,mt.index),je.viewTo=mt.lineN):Za(re)}else{var Nt=wl(re,ce,ce,-1),Lt=wl(re,ke,ke+Pe,1);Nt&&Lt?(je.view=je.view.slice(0,Nt.index).concat(xo(re,Nt.lineN,Lt.lineN)).concat(je.view.slice(Lt.index)),je.viewTo+=Pe):Za(re)}var Bt=je.externalMeasured;Bt&&(ke<Bt.lineN?Bt.lineN+=Pe:ce<Bt.lineN+Bt.size&&(je.externalMeasured=null))}function Wi(re,ce,ke){re.curOp.viewChanged=!0;var Pe=re.display,je=re.display.externalMeasured;if(je&&ce>=je.lineN&&ce<je.lineN+je.size&&(Pe.externalMeasured=null),!(ce<Pe.viewFrom||ce>=Pe.viewTo)){var tt=Pe.view[Os(re,ce)];if(tt.node!=null){var mt=tt.changes||(tt.changes=[]);$e(mt,ke)==-1&&mt.push(ke)}}}function Za(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function wl(re,ce,ke,Pe){var je=Os(re,ce),tt,mt=re.display.view;if(!Ln||ke==re.doc.first+re.doc.size)return{index:je,lineN:ke};for(var Nt=re.display.viewFrom,Lt=0;Lt<je;Lt++)Nt+=mt[Lt].size;if(Nt!=ce){if(Pe>0){if(je==mt.length-1)return null;tt=Nt+mt[je].size-ce,je++}else tt=Nt-ce;ce+=tt,ke+=tt}for(;Tr(re.doc,ke)!=ke;){if(je==(Pe<0?0:mt.length-1))return null;ke+=Pe*mt[je-(Pe<0?1:0)].size,je+=Pe}return{index:je,lineN:ke}}function $o(re,ce,ke){var Pe=re.display,je=Pe.view;je.length==0||ce>=Pe.viewTo||ke<=Pe.viewFrom?(Pe.view=xo(re,ce,ke),Pe.viewFrom=ce):(Pe.viewFrom>ce?Pe.view=xo(re,ce,Pe.viewFrom).concat(Pe.view):Pe.viewFrom<ce&&(Pe.view=Pe.view.slice(Os(re,ce))),Pe.viewFrom=ce,Pe.viewTo<ke?Pe.view=Pe.view.concat(xo(re,Pe.viewTo,ke)):Pe.viewTo>ke&&(Pe.view=Pe.view.slice(0,Os(re,ke)))),Pe.viewTo=ke}function sl(re){for(var ce=re.display.view,ke=0,Pe=0;Pe<ce.length;Pe++){var je=ce[Pe];!je.hidden&&(!je.node||je.changes)&&++ke}return ke}function gs(re){re.display.input.showSelection(re.display.input.prepareSelection())}function Mh(re,ce){ce===void 0&&(ce=!0);for(var ke=re.doc,Pe={},je=Pe.cursors=document.createDocumentFragment(),tt=Pe.selection=document.createDocumentFragment(),mt=0;mt<ke.sel.ranges.length;mt++)if(!(!ce&&mt==ke.sel.primIndex)){var Nt=ke.sel.ranges[mt];if(!(Nt.from().line>=re.display.viewTo||Nt.to().line<re.display.viewFrom)){var Lt=Nt.empty();(Lt||re.options.showCursorWhenSelecting)&&To(re,Nt.head,je),Lt||wo(re,Nt,tt)}}return Pe}function To(re,ce,ke){var Pe=ua(re,ce,"div",null,null,!re.options.singleCursorHeightPerLine),je=ke.appendChild(Oe("div","\xA0","CodeMirror-cursor"));if(je.style.left=Pe.left+"px",je.style.top=Pe.top+"px",je.style.height=Math.max(0,Pe.bottom-Pe.top)*re.options.cursorHeight+"px",Pe.other){var tt=ke.appendChild(Oe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));tt.style.display="",tt.style.left=Pe.other.left+"px",tt.style.top=Pe.other.top+"px",tt.style.height=(Pe.other.bottom-Pe.other.top)*.85+"px"}}function ll(re,ce){return re.top-ce.top||re.left-ce.left}function wo(re,ce,ke){var Pe=re.display,je=re.doc,tt=document.createDocumentFragment(),mt=yc(re.display),Nt=mt.left,Lt=Math.max(Pe.sizerWidth,yu(re)-Pe.sizer.offsetLeft)-mt.right,Bt=je.direction=="ltr";function qt(Rr,ri,ji,Dr){ri<0&&(ri=0),ri=Math.round(ri),Dr=Math.round(Dr),tt.appendChild(Oe("div",null,"CodeMirror-selected","position: absolute; left: "+Rr+`px;
top: `+ri+"px; width: "+(ji==null?Lt-Rr:ji)+`px;
height: `+(Dr-ri)+"px"))}function Ut(Rr,ri,ji){var Dr=Cn(je,Rr),so=Dr.text.length,Na,Ds;function Va(Ts,lu){return Xu(re,Tn(Rr,Ts),"div",Dr,lu)}function eu(Ts,lu,fl){var Ls=Qc(re,Dr,null,Ts),Xo=lu=="ltr"==(fl=="after")?"left":"right",ts=fl=="after"?Ls.begin:Ls.end-(/\s/.test(Dr.text.charAt(Ls.end-1))?2:1);return Va(ts,Xo)[Xo]}var kl=ln(Dr,je.direction);return kt(kl,ri||0,ji==null?so:ji,function(Ts,lu,fl,Ls){var Xo=fl=="ltr",ts=Va(Ts,Xo?"left":"right"),Xs=Va(lu-1,Xo?"right":"left"),dl=ri==null&&Ts==0,Qu=ji==null&&lu==so,Xa=Ls==0,Bu=!kl||Ls==kl.length-1;if(Xs.top-ts.top<=3){var ls=(Bt?dl:Qu)&&Xa,Ld=(Bt?Qu:dl)&&Bu,Cu=ls?Nt:(Xo?ts:Xs).left,uu=Ld?Lt:(Xo?Xs:ts).right;qt(Cu,ts.top,uu-Cu,ts.bottom)}else{var tu,Sa,Ys,Fh;Xo?(tu=Bt&&dl&&Xa?Nt:ts.left,Sa=Bt?Lt:eu(Ts,fl,"before"),Ys=Bt?Nt:eu(lu,fl,"after"),Fh=Bt&&Qu&&Bu?Lt:Xs.right):(tu=Bt?eu(Ts,fl,"before"):Nt,Sa=!Bt&&dl&&Xa?Lt:ts.right,Ys=!Bt&&Qu&&Bu?Nt:Xs.left,Fh=Bt?eu(lu,fl,"after"):Lt),qt(tu,ts.top,Sa-tu,ts.bottom),ts.bottom<Xs.top&&qt(Nt,ts.bottom,null,Xs.top),qt(Ys,Xs.top,Fh-Ys,Xs.bottom)}(!Na||ll(ts,Na)<0)&&(Na=ts),ll(Xs,Na)<0&&(Na=Xs),(!Ds||ll(ts,Ds)<0)&&(Ds=ts),ll(Xs,Ds)<0&&(Ds=Xs)}),{start:Na,end:Ds}}var xn=ce.from(),gn=ce.to();if(xn.line==gn.line)Ut(xn.line,xn.ch,gn.ch);else{var Jn=Cn(je,xn.line),er=Cn(je,gn.line),hr=No(Jn)==No(er),kr=Ut(xn.line,xn.ch,hr?Jn.text.length+1:null).end,Yr=Ut(gn.line,hr?0:null,gn.ch).start;hr&&(kr.top<Yr.top-2?(qt(kr.right,kr.top,null,kr.bottom),qt(Nt,Yr.top,Yr.left,Yr.bottom)):qt(kr.right,kr.top,Yr.left-kr.right,kr.bottom)),kr.bottom<Yr.top&&qt(Nt,kr.bottom,null,Yr.top)}ke.appendChild(tt)}function Zo(re){if(re.state.focused){var ce=re.display;clearInterval(ce.blinker);var ke=!0;ce.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?ce.blinker=setInterval(function(){re.hasFocus()||Qh(re),ce.cursorDiv.style.visibility=(ke=!ke)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(ce.cursorDiv.style.visibility="hidden")}}function ra(re){re.state.focused||(re.display.input.focus(),jo(re))}function La(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Qh(re))},100)}function jo(re,ce){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(un(re,"focus",re,ce),re.state.focused=!0,Ue(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),de&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),Zo(re))}function Qh(re,ce){re.state.delayingBlurEvent||(re.state.focused&&(un(re,"blur",re,ce),re.state.focused=!1,De(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function $r(re){for(var ce=re.display,ke=ce.lineDiv.offsetTop,Pe=0;Pe<ce.view.length;Pe++){var je=ce.view[Pe],tt=re.options.lineWrapping,mt=void 0,Nt=0;if(!je.hidden){if(Ie&&me<8){var Lt=je.node.offsetTop+je.node.offsetHeight;mt=Lt-ke,ke=Lt}else{var Bt=je.node.getBoundingClientRect();mt=Bt.bottom-Bt.top,!tt&&je.text.firstChild&&(Nt=je.text.firstChild.getBoundingClientRect().right-Bt.left-1)}var qt=je.line.height-mt;if((qt>.005||qt<-.005)&&(_n(je.line,mt),yd(je.line),je.rest))for(var Ut=0;Ut<je.rest.length;Ut++)yd(je.rest[Ut]);if(Nt>re.display.sizerWidth){var xn=Math.ceil(Nt/Ou(re.display));xn>re.display.maxLineLength&&(re.display.maxLineLength=xn,re.display.maxLine=je.line,re.display.maxLineChanged=!0)}}}}function yd(re){if(re.widgets)for(var ce=0;ce<re.widgets.length;++ce){var ke=re.widgets[ce],Pe=ke.node.parentNode;Pe&&(ke.height=Pe.offsetHeight)}}function ho(re,ce,ke){var Pe=ke&&ke.top!=null?Math.max(0,ke.top):re.scroller.scrollTop;Pe=Math.floor(Pe-Yl(re));var je=ke&&ke.bottom!=null?ke.bottom:Pe+re.wrapper.clientHeight,tt=ir(ce,Pe),mt=ir(ce,je);if(ke&&ke.ensure){var Nt=ke.ensure.from.line,Lt=ke.ensure.to.line;Nt<tt?(tt=Nt,mt=ir(ce,So(Cn(ce,Nt))+re.wrapper.clientHeight)):Math.min(Lt,ce.lastLine())>=mt&&(tt=ir(ce,So(Cn(ce,Lt))-re.wrapper.clientHeight),mt=Lt)}return{from:tt,to:Math.max(mt,tt+1)}}function ep(re,ce){if(!mn(re,"scrollCursorIntoView")){var ke=re.display,Pe=ke.sizer.getBoundingClientRect(),je=null;if(ce.top+Pe.top<0?je=!0:ce.bottom+Pe.top>(window.innerHeight||document.documentElement.clientHeight)&&(je=!1),je!=null&&!xe){var tt=Oe("div","\u200B",null,`position: absolute;
top: `+(ce.top-ke.viewOffset-Yl(re.display))+`px;
height: `+(ce.bottom-ce.top+Fl(re)+ke.barHeight)+`px;
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");re.display.lineSpace.appendChild(tt),tt.scrollIntoView(je),re.display.lineSpace.removeChild(tt)}}}function xc(re,ce,ke,Pe){Pe==null&&(Pe=0);var je;!re.options.lineWrapping&&ce==ke&&(ce=ce.ch?Tn(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,ke=ce.sticky=="before"?Tn(ce.line,ce.ch+1,"before"):ce);for(var tt=0;tt<5;tt++){var mt=!1,Nt=ua(re,ce),Lt=!ke||ke==ce?Nt:ua(re,ke);je={left:Math.min(Nt.left,Lt.left),top:Math.min(Nt.top,Lt.top)-Pe,right:Math.max(Nt.left,Lt.left),bottom:Math.max(Nt.bottom,Lt.bottom)+Pe};var Bt=Df(re,je),qt=re.doc.scrollTop,Ut=re.doc.scrollLeft;if(Bt.scrollTop!=null&&(qh(re,Bt.scrollTop),Math.abs(re.doc.scrollTop-qt)>1&&(mt=!0)),Bt.scrollLeft!=null&&(uh(re,Bt.scrollLeft),Math.abs(re.doc.scrollLeft-Ut)>1&&(mt=!0)),!mt)break}return je}function $c(re,ce){var ke=Df(re,ce);ke.scrollTop!=null&&qh(re,ke.scrollTop),ke.scrollLeft!=null&&uh(re,ke.scrollLeft)}function Df(re,ce){var ke=re.display,Pe=Yu(re.display);ce.top<0&&(ce.top=0);var je=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:ke.scroller.scrollTop,tt=Xc(re),mt={};ce.bottom-ce.top>tt&&(ce.bottom=ce.top+tt);var Nt=re.doc.height+Yh(ke),Lt=ce.top<Pe,Bt=ce.bottom>Nt-Pe;if(ce.top<je)mt.scrollTop=Lt?0:ce.top;else if(ce.bottom>je+tt){var qt=Math.min(ce.top,(Bt?Nt:ce.bottom)-tt);qt!=je&&(mt.scrollTop=qt)}var Ut=re.options.fixedGutter?0:ke.gutters.offsetWidth,xn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:ke.scroller.scrollLeft-Ut,gn=yu(re)-ke.gutters.offsetWidth,Jn=ce.right-ce.left>gn;return Jn&&(ce.right=ce.left+gn),ce.left<10?mt.scrollLeft=0:ce.left<xn?mt.scrollLeft=Math.max(0,ce.left+Ut-(Jn?0:10)):ce.right>gn+xn-3&&(mt.scrollLeft=ce.right+(Jn?0:10)-gn),mt}function If(re,ce){ce!=null&&(Ws(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+ce)}function lh(re){Ws(re);var ce=re.getCursor();re.curOp.scrollToPos={from:ce,to:ce,margin:re.options.cursorScrollMargin}}function $h(re,ce,ke){(ce!=null||ke!=null)&&Ws(re),ce!=null&&(re.curOp.scrollLeft=ce),ke!=null&&(re.curOp.scrollTop=ke)}function Fr(re,ce){Ws(re),re.curOp.scrollToPos=ce}function Ws(re){var ce=re.curOp.scrollToPos;if(ce){re.curOp.scrollToPos=null;var ke=Nf(re,ce.from),Pe=Nf(re,ce.to);Bf(re,ke,Pe,ce.margin)}}function Bf(re,ce,ke,Pe){var je=Df(re,{left:Math.min(ce.left,ke.left),top:Math.min(ce.top,ke.top)-Pe,right:Math.max(ce.right,ke.right),bottom:Math.max(ce.bottom,ke.bottom)+Pe});$h(re,je.scrollLeft,je.scrollTop)}function qh(re,ce){Math.abs(re.doc.scrollTop-ce)<2||(ot||Oh(re,{top:ce}),Rf(re,ce,!0),ot&&Oh(re),qc(re,100))}function Rf(re,ce,ke){ce=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,ce)),!(re.display.scroller.scrollTop==ce&&!ke)&&(re.doc.scrollTop=ce,re.display.scrollbars.setScrollTop(ce),re.display.scroller.scrollTop!=ce&&(re.display.scroller.scrollTop=ce))}function uh(re,ce,ke,Pe){ce=Math.max(0,Math.min(ce,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((ke?ce==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-ce)<2)&&!Pe)&&(re.doc.scrollLeft=ce,Dt(re),re.display.scroller.scrollLeft!=ce&&(re.display.scroller.scrollLeft=ce),re.display.scrollbars.setScrollLeft(ce))}function su(re){var ce=re.display,ke=ce.gutters.offsetWidth,Pe=Math.round(re.doc.height+Yh(re.display));return{clientHeight:ce.scroller.clientHeight,viewHeight:ce.wrapper.clientHeight,scrollWidth:ce.scroller.scrollWidth,clientWidth:ce.scroller.clientWidth,viewWidth:ce.wrapper.clientWidth,barLeft:re.options.fixedGutter?ke:0,docHeight:Pe,scrollHeight:Pe+Fl(re)+ce.barHeight,nativeBarWidth:ce.nativeBarWidth,gutterWidth:ke}}var ec=function(re,ce,ke){this.cm=ke;var Pe=this.vert=Oe("div",[Oe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),je=this.horiz=Oe("div",[Oe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Pe.tabIndex=je.tabIndex=-1,re(Pe),re(je),sn(Pe,"scroll",function(){Pe.clientHeight&&ce(Pe.scrollTop,"vertical")}),sn(je,"scroll",function(){je.clientWidth&&ce(je.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ie&&me<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ec.prototype.update=function(re){var ce=re.scrollWidth>re.clientWidth+1,ke=re.scrollHeight>re.clientHeight+1,Pe=re.nativeBarWidth;if(ke){this.vert.style.display="block",this.vert.style.bottom=ce?Pe+"px":"0";var je=re.viewHeight-(ce?Pe:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+je)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ce){this.horiz.style.display="block",this.horiz.style.right=ke?Pe+"px":"0",this.horiz.style.left=re.barLeft+"px";var tt=re.viewWidth-re.barLeft-(ke?Pe:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+tt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(Pe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ke?Pe:0,bottom:ce?Pe:0}},ec.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ec.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ec.prototype.zeroWidthHack=function(){var re=oe&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new et,this.disableVert=new et},ec.prototype.enableZeroWidthBar=function(re,ce,ke){re.style.pointerEvents="auto";function Pe(){var je=re.getBoundingClientRect(),tt=ke=="vert"?document.elementFromPoint(je.right-1,(je.top+je.bottom)/2):document.elementFromPoint((je.right+je.left)/2,je.bottom-1);tt!=re?re.style.pointerEvents="none":ce.set(1e3,Pe)}ce.set(1e3,Pe)},ec.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Zu=function(){};Zu.prototype.update=function(){return{bottom:0,right:0}},Zu.prototype.setScrollLeft=function(){},Zu.prototype.setScrollTop=function(){},Zu.prototype.clear=function(){};function Th(re,ce){ce||(ce=su(re));var ke=re.display.barWidth,Pe=re.display.barHeight;_f(re,ce);for(var je=0;je<4&&ke!=re.display.barWidth||Pe!=re.display.barHeight;je++)ke!=re.display.barWidth&&re.options.lineWrapping&&$r(re),_f(re,su(re)),ke=re.display.barWidth,Pe=re.display.barHeight}function _f(re,ce){var ke=re.display,Pe=ke.scrollbars.update(ce);ke.sizer.style.paddingRight=(ke.barWidth=Pe.right)+"px",ke.sizer.style.paddingBottom=(ke.barHeight=Pe.bottom)+"px",ke.heightForcer.style.borderBottom=Pe.bottom+"px solid transparent",Pe.right&&Pe.bottom?(ke.scrollbarFiller.style.display="block",ke.scrollbarFiller.style.height=Pe.bottom+"px",ke.scrollbarFiller.style.width=Pe.right+"px"):ke.scrollbarFiller.style.display="",Pe.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(ke.gutterFiller.style.display="block",ke.gutterFiller.style.height=Pe.bottom+"px",ke.gutterFiller.style.width=ce.gutterWidth+"px"):ke.gutterFiller.style.display=""}var Sd={native:ec,null:Zu};function tp(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&De(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new Sd[re.options.scrollbarStyle](function(ce){re.display.wrapper.insertBefore(ce,re.display.scrollbarFiller),sn(ce,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),ce.setAttribute("cm-not-content","true")},function(ce,ke){ke=="horizontal"?uh(re,ce):qh(re,ce)},re),re.display.scrollbars.addClass&&Ue(re.display.wrapper,re.display.scrollbars.addClass)}var np=0;function Lh(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.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:++np},mi(re.curOp)}function Ah(re){var ce=re.curOp;ce&&Mo(ce,function(ke){for(var Pe=0;Pe<ke.ops.length;Pe++)ke.ops[Pe].cm.curOp=null;am(ke)})}function am(re){for(var ce=re.ops,ke=0;ke<ce.length;ke++)Jp(ce[ke]);for(var Pe=0;Pe<ce.length;Pe++)xd(ce[Pe]);for(var je=0;je<ce.length;je++)Qp(ce[je]);for(var tt=0;tt<ce.length;tt++)Wa(ce[tt]);for(var mt=0;mt<ce.length;mt++)hh(ce[mt])}function Jp(re){var ce=re.cm,ke=ce.display;$p(ce),re.updateMaxLine&&Oo(ce),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<ke.viewFrom||re.scrollToPos.to.line>=ke.viewTo)||ke.maxLineChanged&&ce.options.lineWrapping,re.update=re.mustUpdate&&new Nh(ce,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function xd(re){re.updatedDisplay=re.mustUpdate&&Gf(re.cm,re.update)}function Qp(re){var ce=re.cm,ke=ce.display;re.updatedDisplay&&$r(ce),re.barMeasure=su(ce),ke.maxLineChanged&&!ce.options.lineWrapping&&(re.adjustWidthTo=md(ce,ke.maxLine,ke.maxLine.text.length).left+3,ce.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(ke.scroller.clientWidth,ke.sizer.offsetLeft+re.adjustWidthTo+Fl(ce)+ce.display.barWidth),re.maxScrollLeft=Math.max(0,ke.sizer.offsetLeft+re.adjustWidthTo-yu(ce))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=ke.input.prepareSelection())}function Wa(re){var ce=re.cm;re.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<ce.doc.scrollLeft&&uh(ce,Math.min(ce.display.scroller.scrollLeft,re.maxScrollLeft),!0),ce.display.maxLineChanged=!1);var ke=re.focus&&re.focus==We();re.preparedSelection&&ce.display.input.showSelection(re.preparedSelection,ke),(re.updatedDisplay||re.startHeight!=ce.doc.height)&&Th(ce,re.barMeasure),re.updatedDisplay&&ft(ce,re.barMeasure),re.selectionChanged&&Zo(ce),ce.state.focused&&re.updateInput&&ce.display.input.reset(re.typing),ke&&ra(re.cm)}function hh(re){var ce=re.cm,ke=ce.display,Pe=ce.doc;if(re.updatedDisplay&&Ho(ce,re.update),ke.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(ke.wheelStartX=ke.wheelStartY=null),re.scrollTop!=null&&Rf(ce,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&uh(ce,re.scrollLeft,!0,!0),re.scrollToPos){var je=xc(ce,Lr(Pe,re.scrollToPos.from),Lr(Pe,re.scrollToPos.to),re.scrollToPos.margin);ep(ce,je)}var tt=re.maybeHiddenMarkers,mt=re.maybeUnhiddenMarkers;if(tt)for(var Nt=0;Nt<tt.length;++Nt)tt[Nt].lines.length||un(tt[Nt],"hide");if(mt)for(var Lt=0;Lt<mt.length;++Lt)mt[Lt].lines.length&&un(mt[Lt],"unhide");ke.wrapper.offsetHeight&&(Pe.scrollTop=ce.display.scroller.scrollTop),re.changeObjs&&un(ce,"changes",ce,re.changeObjs),re.update&&re.update.finish()}function Ro(re,ce){if(re.curOp)return ce();Lh(re);try{return ce()}finally{Ah(re)}}function ms(re,ce){return function(){if(re.curOp)return ce.apply(re,arguments);Lh(re);try{return ce.apply(re,arguments)}finally{Ah(re)}}}function vs(re){return function(){if(this.curOp)return re.apply(this,arguments);Lh(this);try{return re.apply(this,arguments)}finally{Ah(this)}}}function Cs(re){return function(){var ce=this.cm;if(!ce||ce.curOp)return re.apply(this,arguments);Lh(ce);try{return re.apply(this,arguments)}finally{Ah(ce)}}}function qc(re,ce){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(ce,gt(Es,re))}function Es(re){var ce=re.doc;if(!(ce.highlightFrontier>=re.display.viewTo)){var ke=+new Date+re.options.workTime,Pe=ga(re,ce.highlightFrontier),je=[];ce.iter(Pe.line,Math.min(ce.first+ce.size,re.display.viewTo+500),function(tt){if(Pe.line>=re.display.viewFrom){var mt=tt.styles,Nt=tt.text.length>re.options.maxHighlightLength?qn(ce.mode,Pe.state):null,Lt=_s(re,tt,Pe,!0);Nt&&(Pe.state=Nt),tt.styles=Lt.styles;var Bt=tt.styleClasses,qt=Lt.classes;qt?tt.styleClasses=qt:Bt&&(tt.styleClasses=null);for(var Ut=!mt||mt.length!=tt.styles.length||Bt!=qt&&(!Bt||!qt||Bt.bgClass!=qt.bgClass||Bt.textClass!=qt.textClass),xn=0;!Ut&&xn<mt.length;++xn)Ut=mt[xn]!=tt.styles[xn];Ut&&je.push(Pe.line),tt.stateAfter=Pe.save(),Pe.nextLine()}else tt.text.length<=re.options.maxHighlightLength&&tn(re,tt.text,Pe),tt.stateAfter=Pe.line%5==0?Pe.save():null,Pe.nextLine();if(+new Date>ke)return qc(re,re.options.workDelay),!0}),ce.highlightFrontier=Pe.line,ce.modeFrontier=Math.max(ce.modeFrontier,Pe.line),je.length&&Ro(re,function(){for(var tt=0;tt<je.length;tt++)Wi(re,je[tt],"text")})}}var Nh=function(re,ce,ke){var Pe=re.display;this.viewport=ce,this.visible=ho(Pe,re.doc,ce),this.editorIsHidden=!Pe.wrapper.offsetWidth,this.wrapperHeight=Pe.wrapper.clientHeight,this.wrapperWidth=Pe.wrapper.clientWidth,this.oldDisplayWidth=yu(re),this.force=ke,this.dims=Ff(re),this.events=[]};Nh.prototype.signal=function(re,ce){Sn(re,ce)&&this.events.push(arguments)},Nh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)un.apply(null,this.events[re])};function $p(re){var ce=re.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=Fl(re)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=Fl(re)+"px",ce.scrollbarsClipped=!0)}function qp(re){if(re.hasFocus())return null;var ce=We();if(!ce||!Ye(re.display.lineDiv,ce))return null;var ke={activeElt:ce};if(window.getSelection){var Pe=window.getSelection();Pe.anchorNode&&Pe.extend&&Ye(re.display.lineDiv,Pe.anchorNode)&&(ke.anchorNode=Pe.anchorNode,ke.anchorOffset=Pe.anchorOffset,ke.focusNode=Pe.focusNode,ke.focusOffset=Pe.focusOffset)}return ke}function Dl(re){if(!(!re||!re.activeElt||re.activeElt==We())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&Ye(document.body,re.anchorNode)&&Ye(document.body,re.focusNode))){var ce=window.getSelection(),ke=document.createRange();ke.setEnd(re.anchorNode,re.anchorOffset),ke.collapse(!1),ce.removeAllRanges(),ce.addRange(ke),ce.extend(re.focusNode,re.focusOffset)}}function Gf(re,ce){var ke=re.display,Pe=re.doc;if(ce.editorIsHidden)return Za(re),!1;if(!ce.force&&ce.visible.from>=ke.viewFrom&&ce.visible.to<=ke.viewTo&&(ke.updateLineNumbers==null||ke.updateLineNumbers>=ke.viewTo)&&ke.renderedView==ke.view&&sl(re)==0)return!1;Rt(re)&&(Za(re),ce.dims=Ff(re));var je=Pe.first+Pe.size,tt=Math.max(ce.visible.from-re.options.viewportMargin,Pe.first),mt=Math.min(je,ce.visible.to+re.options.viewportMargin);ke.viewFrom<tt&&tt-ke.viewFrom<20&&(tt=Math.max(Pe.first,ke.viewFrom)),ke.viewTo>mt&&ke.viewTo-mt<20&&(mt=Math.min(je,ke.viewTo)),Ln&&(tt=Tr(re.doc,tt),mt=ti(re.doc,mt));var Nt=tt!=ke.viewFrom||mt!=ke.viewTo||ke.lastWrapHeight!=ce.wrapperHeight||ke.lastWrapWidth!=ce.wrapperWidth;$o(re,tt,mt),ke.viewOffset=So(Cn(re.doc,ke.viewFrom)),re.display.mover.style.top=ke.viewOffset+"px";var Lt=sl(re);if(!Nt&&Lt==0&&!ce.force&&ke.renderedView==ke.view&&(ke.updateLineNumbers==null||ke.updateLineNumbers>=ke.viewTo))return!1;var Bt=qp(re);return Lt>4&&(ke.lineDiv.style.display="none"),wd(re,ke.updateLineNumbers,ce.dims),Lt>4&&(ke.lineDiv.style.display=""),ke.renderedView=ke.view,Dl(Bt),Fe(ke.cursorDiv),Fe(ke.selectionDiv),ke.gutters.style.height=ke.sizer.style.minHeight=0,Nt&&(ke.lastWrapHeight=ce.wrapperHeight,ke.lastWrapWidth=ce.wrapperWidth,qc(re,400)),ke.updateLineNumbers=null,!0}function Ho(re,ce){for(var ke=ce.viewport,Pe=!0;;Pe=!1){if(!Pe||!re.options.lineWrapping||ce.oldDisplayWidth==yu(re)){if(ke&&ke.top!=null&&(ke={top:Math.min(re.doc.height+Yh(re.display)-Xc(re),ke.top)}),ce.visible=ho(re.display,re.doc,ke),ce.visible.from>=re.display.viewFrom&&ce.visible.to<=re.display.viewTo)break}else Pe&&(ce.visible=ho(re.display,re.doc,ke));if(!Gf(re,ce))break;$r(re);var je=su(re);gs(re),Th(re,je),ft(re,je),ce.force=!1}ce.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(ce.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function Oh(re,ce){var ke=new Nh(re,ce);if(Gf(re,ke)){$r(re),Ho(re,ke);var Pe=su(re);gs(re),Th(re,Pe),ft(re,Pe),ke.finish()}}function wd(re,ce,ke){var Pe=re.display,je=re.options.lineNumbers,tt=Pe.lineDiv,mt=tt.firstChild;function Nt(Jn){var er=Jn.nextSibling;return de&&oe&&re.display.currentWheelTarget==Jn?Jn.style.display="none":Jn.parentNode.removeChild(Jn),er}for(var Lt=Pe.view,Bt=Pe.viewFrom,qt=0;qt<Lt.length;qt++){var Ut=Lt[qt];if(!Ut.hidden)if(!Ut.node||Ut.node.parentNode!=tt){var xn=Ta(re,Ut,Bt,ke);tt.insertBefore(xn,mt)}else{for(;mt!=Ut.node;)mt=Nt(mt);var gn=je&&ce!=null&&ce<=Bt&&Ut.lineNumber;Ut.changes&&($e(Ut.changes,"gutter")>-1&&(gn=!1),Ns(re,Ut,Bt,ke)),gn&&(Fe(Ut.lineNumber),Ut.lineNumber.appendChild(document.createTextNode(si(re.options,Bt)))),mt=Ut.node.nextSibling}Bt+=Ut.size}for(;mt;)mt=Nt(mt)}function ut(re){var ce=re.gutters.offsetWidth;re.sizer.style.marginLeft=ce+"px"}function ft(re,ce){re.display.sizer.style.minHeight=ce.docHeight+"px",re.display.heightForcer.style.top=ce.docHeight+"px",re.display.gutters.style.height=ce.docHeight+re.display.barHeight+Fl(re)+"px"}function Dt(re){var ce=re.display,ke=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!re.options.fixedGutter))){for(var Pe=Sc(ce)-ce.scroller.scrollLeft+re.doc.scrollLeft,je=ce.gutters.offsetWidth,tt=Pe+"px",mt=0;mt<ke.length;mt++)if(!ke[mt].hidden){re.options.fixedGutter&&(ke[mt].gutter&&(ke[mt].gutter.style.left=tt),ke[mt].gutterBackground&&(ke[mt].gutterBackground.style.left=tt));var Nt=ke[mt].alignable;if(Nt)for(var Lt=0;Lt<Nt.length;Lt++)Nt[Lt].style.left=tt}re.options.fixedGutter&&(ce.gutters.style.left=Pe+je+"px")}}function Rt(re){if(!re.options.lineNumbers)return!1;var ce=re.doc,ke=si(re.options,ce.first+ce.size-1),Pe=re.display;if(ke.length!=Pe.lineNumChars){var je=Pe.measure.appendChild(Oe("div",[Oe("div",ke)],"CodeMirror-linenumber CodeMirror-gutter-elt")),tt=je.firstChild.offsetWidth,mt=je.offsetWidth-tt;return Pe.lineGutter.style.width="",Pe.lineNumInnerWidth=Math.max(tt,Pe.lineGutter.offsetWidth-mt)+1,Pe.lineNumWidth=Pe.lineNumInnerWidth+mt,Pe.lineNumChars=Pe.lineNumInnerWidth?ke.length:-1,Pe.lineGutter.style.width=Pe.lineNumWidth+"px",ut(re.display),!0}return!1}function en(re,ce){for(var ke=[],Pe=!1,je=0;je<re.length;je++){var tt=re[je],mt=null;if(typeof tt!="string"&&(mt=tt.style,tt=tt.className),tt=="CodeMirror-linenumbers")if(ce)Pe=!0;else continue;ke.push({className:tt,style:mt})}return ce&&!Pe&&ke.push({className:"CodeMirror-linenumbers",style:null}),ke}function yn(re){var ce=re.gutters,ke=re.gutterSpecs;Fe(ce),re.lineGutter=null;for(var Pe=0;Pe<ke.length;++Pe){var je=ke[Pe],tt=je.className,mt=je.style,Nt=ce.appendChild(Oe("div",null,"CodeMirror-gutter "+tt));mt&&(Nt.style.cssText=mt),tt=="CodeMirror-linenumbers"&&(re.lineGutter=Nt,Nt.style.width=(re.lineNumWidth||1)+"px")}ce.style.display=ke.length?"":"none",ut(re)}function Pn(re){yn(re.display),Ca(re),Dt(re)}function Wn(re,ce,ke,Pe){var je=this;this.input=ke,je.scrollbarFiller=Oe("div",null,"CodeMirror-scrollbar-filler"),je.scrollbarFiller.setAttribute("cm-not-content","true"),je.gutterFiller=Oe("div",null,"CodeMirror-gutter-filler"),je.gutterFiller.setAttribute("cm-not-content","true"),je.lineDiv=ze("div",null,"CodeMirror-code"),je.selectionDiv=Oe("div",null,null,"position: relative; z-index: 1"),je.cursorDiv=Oe("div",null,"CodeMirror-cursors"),je.measure=Oe("div",null,"CodeMirror-measure"),je.lineMeasure=Oe("div",null,"CodeMirror-measure"),je.lineSpace=ze("div",[je.measure,je.lineMeasure,je.selectionDiv,je.cursorDiv,je.lineDiv],null,"position: relative; outline: none");var tt=ze("div",[je.lineSpace],"CodeMirror-lines");je.mover=Oe("div",[tt],null,"position: relative"),je.sizer=Oe("div",[je.mover],"CodeMirror-sizer"),je.sizerWidth=null,je.heightForcer=Oe("div",null,null,"position: absolute; height: "+vt+"px; width: 1px;"),je.gutters=Oe("div",null,"CodeMirror-gutters"),je.lineGutter=null,je.scroller=Oe("div",[je.sizer,je.heightForcer,je.gutters],"CodeMirror-scroll"),je.scroller.setAttribute("tabIndex","-1"),je.wrapper=Oe("div",[je.scrollbarFiller,je.gutterFiller,je.scroller],"CodeMirror"),Ie&&me<8&&(je.gutters.style.zIndex=-1,je.scroller.style.paddingRight=0),!de&&!(ot&&ee)&&(je.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(je.wrapper):re(je.wrapper)),je.viewFrom=je.viewTo=ce.first,je.reportedViewFrom=je.reportedViewTo=ce.first,je.view=[],je.renderedView=null,je.externalMeasured=null,je.viewOffset=0,je.lastWrapHeight=je.lastWrapWidth=0,je.updateLineNumbers=null,je.nativeBarWidth=je.barHeight=je.barWidth=0,je.scrollbarsClipped=!1,je.lineNumWidth=je.lineNumInnerWidth=je.lineNumChars=null,je.alignWidgets=!1,je.cachedCharWidth=je.cachedTextHeight=je.cachedPaddingH=null,je.maxLine=null,je.maxLineLength=0,je.maxLineChanged=!1,je.wheelDX=je.wheelDY=je.wheelStartX=je.wheelStartY=null,je.shift=!1,je.selForContextMenu=null,je.activeTouch=null,je.gutterSpecs=en(Pe.gutters,Pe.lineNumbers),yn(je),ke.init(je)}var Kn=0,Yn=null;Ie?Yn=-.53:ot?Yn=15:we?Yn=-.7:Te&&(Yn=-1/3);function ar(re){var ce=re.wheelDeltaX,ke=re.wheelDeltaY;return ce==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(ce=re.detail),ke==null&&re.detail&&re.axis==re.VERTICAL_AXIS?ke=re.detail:ke==null&&(ke=re.wheelDelta),{x:ce,y:ke}}function cr(re){var ce=ar(re);return ce.x*=Yn,ce.y*=Yn,ce}function wr(re,ce){var ke=ar(ce),Pe=ke.x,je=ke.y,tt=re.display,mt=tt.scroller,Nt=mt.scrollWidth>mt.clientWidth,Lt=mt.scrollHeight>mt.clientHeight;if(Pe&&Nt||je&&Lt){if(je&&oe&&de){e:for(var Bt=ce.target,qt=tt.view;Bt!=mt;Bt=Bt.parentNode)for(var Ut=0;Ut<qt.length;Ut++)if(qt[Ut].node==Bt){re.display.currentWheelTarget=Bt;break e}}if(Pe&&!ot&&!be&&Yn!=null){je&&Lt&&qh(re,Math.max(0,mt.scrollTop+je*Yn)),uh(re,Math.max(0,mt.scrollLeft+Pe*Yn)),(!je||je&&Lt)&&fr(ce),tt.wheelStartX=null;return}if(je&&Yn!=null){var xn=je*Yn,gn=re.doc.scrollTop,Jn=gn+tt.wrapper.clientHeight;xn<0?gn=Math.max(0,gn+xn-50):Jn=Math.min(re.doc.height,Jn+xn+50),Oh(re,{top:gn,bottom:Jn})}Kn<20&&(tt.wheelStartX==null?(tt.wheelStartX=mt.scrollLeft,tt.wheelStartY=mt.scrollTop,tt.wheelDX=Pe,tt.wheelDY=je,setTimeout(function(){if(tt.wheelStartX!=null){var er=mt.scrollLeft-tt.wheelStartX,hr=mt.scrollTop-tt.wheelStartY,kr=hr&&tt.wheelDY&&hr/tt.wheelDY||er&&tt.wheelDX&&er/tt.wheelDX;tt.wheelStartX=tt.wheelStartY=null,kr&&(Yn=(Yn*Kn+kr)/(Kn+1),++Kn)}},200)):(tt.wheelDX+=Pe,tt.wheelDY+=je))}}var sr=function(re,ce){this.ranges=re,this.primIndex=ce};sr.prototype.primary=function(){return this.ranges[this.primIndex]},sr.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var ce=0;ce<this.ranges.length;ce++){var ke=this.ranges[ce],Pe=re.ranges[ce];if(!yi(ke.anchor,Pe.anchor)||!yi(ke.head,Pe.head))return!1}return!0},sr.prototype.deepCopy=function(){for(var re=[],ce=0;ce<this.ranges.length;ce++)re[ce]=new lr(ko(this.ranges[ce].anchor),ko(this.ranges[ce].head));return new sr(re,this.primIndex)},sr.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},sr.prototype.contains=function(re,ce){ce||(ce=re);for(var ke=0;ke<this.ranges.length;ke++){var Pe=this.ranges[ke];if(vr(ce,Pe.from())>=0&&vr(re,Pe.to())<=0)return ke}return-1};var lr=function(re,ce){this.anchor=re,this.head=ce};lr.prototype.from=function(){return xr(this.anchor,this.head)},lr.prototype.to=function(){return zi(this.anchor,this.head)},lr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Pr(re,ce,ke){var Pe=re&&re.options.selectionsMayTouch,je=ce[ke];ce.sort(function(xn,gn){return vr(xn.from(),gn.from())}),ke=$e(ce,je);for(var tt=1;tt<ce.length;tt++){var mt=ce[tt],Nt=ce[tt-1],Lt=vr(Nt.to(),mt.from());if(Pe&&!mt.empty()?Lt>0:Lt>=0){var Bt=xr(Nt.from(),mt.from()),qt=zi(Nt.to(),mt.to()),Ut=Nt.empty()?mt.from()==mt.head:Nt.from()==Nt.head;tt<=ke&&--ke,ce.splice(--tt,2,new lr(Ut?qt:Bt,Ut?Bt:qt))}}return new sr(ce,ke)}function br(re,ce){return new sr([new lr(re,ce||re)],0)}function qr(re){return re.text?Tn(re.from.line+re.text.length-1,Tt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function vi(re,ce){if(vr(re,ce.from)<0)return re;if(vr(re,ce.to)<=0)return qr(ce);var ke=re.line+ce.text.length-(ce.to.line-ce.from.line)-1,Pe=re.ch;return re.line==ce.to.line&&(Pe+=qr(ce).ch-ce.to.ch),Tn(ke,Pe)}function Xr(re,ce){for(var ke=[],Pe=0;Pe<re.sel.ranges.length;Pe++){var je=re.sel.ranges[Pe];ke.push(new lr(vi(je.anchor,ce),vi(je.head,ce)))}return Pr(re.cm,ke,re.sel.primIndex)}function ei(re,ce,ke){return re.line==ce.line?Tn(ke.line,re.ch-ce.ch+ke.ch):Tn(ke.line+(re.line-ce.line),re.ch)}function Di(re,ce,ke){for(var Pe=[],je=Tn(re.first,0),tt=je,mt=0;mt<ce.length;mt++){var Nt=ce[mt],Lt=ei(Nt.from,je,tt),Bt=ei(qr(Nt),je,tt);if(je=Nt.to,tt=Bt,ke=="around"){var qt=re.sel.ranges[mt],Ut=vr(qt.head,qt.anchor)<0;Pe[mt]=new lr(Ut?Bt:Lt,Ut?Lt:Bt)}else Pe[mt]=new lr(Lt,Lt)}return new sr(Pe,re.sel.primIndex)}function or(re){re.doc.mode=on(re.options,re.doc.modeOption),ii(re)}function ii(re){re.doc.iter(function(ce){ce.stateAfter&&(ce.stateAfter=null),ce.styles&&(ce.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,qc(re,100),re.state.modeGen++,re.curOp&&Ca(re)}function pi(re,ce){return ce.from.ch==0&&ce.to.ch==0&&Tt(ce.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function ci(re,ce,ke,Pe){function je(Yr){return ke?ke[Yr]:null}function tt(Yr,Rr,ri){na(Yr,Rr,ri,Pe),yr(Yr,"change",Yr,ce)}function mt(Yr,Rr){for(var ri=[],ji=Yr;ji<Rr;++ji)ri.push(new Wo(Bt[ji],je(ji),Pe));return ri}var Nt=ce.from,Lt=ce.to,Bt=ce.text,qt=Cn(re,Nt.line),Ut=Cn(re,Lt.line),xn=Tt(Bt),gn=je(Bt.length-1),Jn=Lt.line-Nt.line;if(ce.full)re.insert(0,mt(0,Bt.length)),re.remove(Bt.length,re.size-Bt.length);else if(pi(re,ce)){var er=mt(0,Bt.length-1);tt(Ut,Ut.text,gn),Jn&&re.remove(Nt.line,Jn),er.length&&re.insert(Nt.line,er)}else if(qt==Ut)if(Bt.length==1)tt(qt,qt.text.slice(0,Nt.ch)+xn+qt.text.slice(Lt.ch),gn);else{var hr=mt(1,Bt.length-1);hr.push(new Wo(xn+qt.text.slice(Lt.ch),gn,Pe)),tt(qt,qt.text.slice(0,Nt.ch)+Bt[0],je(0)),re.insert(Nt.line+1,hr)}else if(Bt.length==1)tt(qt,qt.text.slice(0,Nt.ch)+Bt[0]+Ut.text.slice(Lt.ch),je(0)),re.remove(Nt.line+1,Jn);else{tt(qt,qt.text.slice(0,Nt.ch)+Bt[0],je(0)),tt(Ut,xn+Ut.text.slice(Lt.ch),gn);var kr=mt(1,Bt.length-1);Jn>1&&re.remove(Nt.line+1,Jn-1),re.insert(Nt.line+1,kr)}yr(re,"change",re,ce)}function Si(re,ce,ke){function Pe(je,tt,mt){if(je.linked)for(var Nt=0;Nt<je.linked.length;++Nt){var Lt=je.linked[Nt];if(Lt.doc!=tt){var Bt=mt&&Lt.sharedHist;ke&&!Bt||(ce(Lt.doc,Bt),Pe(Lt.doc,je,Bt))}}}Pe(re,null,!0)}function Kr(re,ce){if(ce.cm)throw new Error("This document is already in use.");re.doc=ce,ce.cm=re,ni(re),or(re),Ni(re),re.options.lineWrapping||Oo(re),re.options.mode=ce.modeOption,Ca(re)}function Ni(re){(re.doc.direction=="rtl"?Ue:De)(re.display.lineDiv,"CodeMirror-rtl")}function Ei(re){Ro(re,function(){Ni(re),Ca(re)})}function ao(re){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=re||1}function Hi(re,ce){var ke={from:ko(ce.from),to:qr(ce),text:dr(re,ce.from,ce.to)};return Po(re,ke,ce.from.line,ce.to.line+1),Si(re,function(Pe){return Po(Pe,ke,ce.from.line,ce.to.line+1)},!0),ke}function Ki(re){for(;re.length;){var ce=Tt(re);if(ce.ranges)re.pop();else break}}function fo(re,ce){if(ce)return Ki(re.done),Tt(re.done);if(re.done.length&&!Tt(re.done).ranges)return Tt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),Tt(re.done)}function bo(re,ce,ke,Pe){var je=re.history;je.undone.length=0;var tt=+new Date,mt,Nt;if((je.lastOp==Pe||je.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&je.lastModTime>tt-(re.cm?re.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(mt=fo(je,je.lastOp==Pe)))Nt=Tt(mt.changes),vr(ce.from,ce.to)==0&&vr(ce.from,Nt.to)==0?Nt.to=qr(ce):mt.changes.push(Hi(re,ce));else{var Lt=Tt(je.done);for((!Lt||!Lt.ranges)&&Ii(re.sel,je.done),mt={changes:[Hi(re,ce)],generation:je.generation},je.done.push(mt);je.done.length>je.undoDepth;)je.done.shift(),je.done[0].ranges||je.done.shift()}je.done.push(ke),je.generation=++je.maxGeneration,je.lastModTime=je.lastSelTime=tt,je.lastOp=je.lastSelOp=Pe,je.lastOrigin=je.lastSelOrigin=ce.origin,Nt||un(re,"historyAdded")}function Qi(re,ce,ke,Pe){var je=ce.charAt(0);return je=="*"||je=="+"&&ke.ranges.length==Pe.ranges.length&&ke.somethingSelected()==Pe.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function Wr(re,ce,ke,Pe){var je=re.history,tt=Pe&&Pe.origin;ke==je.lastSelOp||tt&&je.lastSelOrigin==tt&&(je.lastModTime==je.lastSelTime&&je.lastOrigin==tt||Qi(re,tt,Tt(je.done),ce))?je.done[je.done.length-1]=ce:Ii(ce,je.done),je.lastSelTime=+new Date,je.lastSelOrigin=tt,je.lastSelOp=ke,Pe&&Pe.clearRedo!==!1&&Ki(je.undone)}function Ii(re,ce){var ke=Tt(ce);ke&&ke.ranges&&ke.equals(re)||ce.push(re)}function Po(re,ce,ke,Pe){var je=ce["spans_"+re.id],tt=0;re.iter(Math.max(re.first,ke),Math.min(re.first+re.size,Pe),function(mt){mt.markedSpans&&((je||(je=ce["spans_"+re.id]={}))[tt]=mt.markedSpans),++tt})}function $i(re){if(!re)return null;for(var ce,ke=0;ke<re.length;++ke)re[ke].marker.explicitlyCleared?ce||(ce=re.slice(0,ke)):ce&&ce.push(re[ke]);return ce?ce.length?ce:null:re}function Do(re,ce){var ke=ce["spans_"+re.id];if(!ke)return null;for(var Pe=[],je=0;je<ce.text.length;++je)Pe.push($i(ke[je]));return Pe}function _o(re,ce){var ke=Do(re,ce),Pe=pr(re,ce);if(!ke)return Pe;if(!Pe)return ke;for(var je=0;je<ke.length;++je){var tt=ke[je],mt=Pe[je];if(tt&&mt)e:for(var Nt=0;Nt<mt.length;++Nt){for(var Lt=mt[Nt],Bt=0;Bt<tt.length;++Bt)if(tt[Bt].marker==Lt.marker)continue e;tt.push(Lt)}else mt&&(ke[je]=mt)}return ke}function zo(re,ce,ke){for(var Pe=[],je=0;je<re.length;++je){var tt=re[je];if(tt.ranges){Pe.push(ke?sr.prototype.deepCopy.call(tt):tt);continue}var mt=tt.changes,Nt=[];Pe.push({changes:Nt});for(var Lt=0;Lt<mt.length;++Lt){var Bt=mt[Lt],qt=void 0;if(Nt.push({from:Bt.from,to:Bt.to,text:Bt.text}),ce)for(var Ut in Bt)(qt=Ut.match(/^spans_(\d+)$/))&&$e(ce,Number(qt[1]))>-1&&(Tt(Nt)[Ut]=Bt[Ut],delete Bt[Ut])}}return Pe}function Io(re,ce,ke,Pe){if(Pe){var je=re.anchor;if(ke){var tt=vr(ce,je)<0;tt!=vr(ke,je)<0?(je=ce,ce=ke):tt!=vr(ce,ke)<0&&(ce=ke)}return new lr(je,ce)}else return new lr(ke||ce,ce)}function ia(re,ce,ke,Pe,je){je==null&&(je=re.cm&&(re.cm.display.shift||re.extend)),Gr(re,new sr([Io(re.sel.primary(),ce,ke,je)],0),Pe)}function hs(re,ce,ke){for(var Pe=[],je=re.cm&&(re.cm.display.shift||re.extend),tt=0;tt<re.sel.ranges.length;tt++)Pe[tt]=Io(re.sel.ranges[tt],ce[tt],null,je);var mt=Pr(re.cm,Pe,re.sel.primIndex);Gr(re,mt,ke)}function ha(re,ce,ke,Pe){var je=re.sel.ranges.slice(0);je[ce]=ke,Gr(re,Pr(re.cm,je,re.sel.primIndex),Pe)}function gi(re,ce,ke,Pe){Gr(re,br(ce,ke),Pe)}function fi(re,ce,ke){var Pe={ranges:ce.ranges,update:function(je){this.ranges=[];for(var tt=0;tt<je.length;tt++)this.ranges[tt]=new lr(Lr(re,je[tt].anchor),Lr(re,je[tt].head))},origin:ke&&ke.origin};return un(re,"beforeSelectionChange",re,Pe),re.cm&&un(re.cm,"beforeSelectionChange",re.cm,Pe),Pe.ranges!=ce.ranges?Pr(re.cm,Pe.ranges,Pe.ranges.length-1):ce}function ui(re,ce,ke){var Pe=re.history.done,je=Tt(Pe);je&&je.ranges?(Pe[Pe.length-1]=ce,Ur(re,ce,ke)):Gr(re,ce,ke)}function Gr(re,ce,ke){Ur(re,ce,ke),Wr(re,re.sel,re.cm?re.cm.curOp.id:NaN,ke)}function Ur(re,ce,ke){(Sn(re,"beforeSelectionChange")||re.cm&&Sn(re.cm,"beforeSelectionChange"))&&(ce=fi(re,ce,ke));var Pe=ke&&ke.bias||(vr(ce.primary().head,re.sel.primary().head)<0?-1:1);di(re,Co(re,ce,Pe,!0)),!(ke&&ke.scroll===!1)&&re.cm&&lh(re.cm)}function di(re,ce){ce.equals(re.sel)||(re.sel=ce,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,In(re.cm)),yr(re,"cursorActivity",re))}function Ui(re){di(re,Co(re,re.sel,null,!1))}function Co(re,ce,ke,Pe){for(var je,tt=0;tt<ce.ranges.length;tt++){var mt=ce.ranges[tt],Nt=ce.ranges.length==re.sel.ranges.length&&re.sel.ranges[tt],Lt=ca(re,mt.anchor,Nt&&Nt.anchor,ke,Pe),Bt=ca(re,mt.head,Nt&&Nt.head,ke,Pe);(je||Lt!=mt.anchor||Bt!=mt.head)&&(je||(je=ce.ranges.slice(0,tt)),je[tt]=new lr(Lt,Bt))}return je?Pr(re.cm,je,ce.primIndex):ce}function qi(re,ce,ke,Pe,je){var tt=Cn(re,ce.line);if(tt.markedSpans)for(var mt=0;mt<tt.markedSpans.length;++mt){var Nt=tt.markedSpans[mt],Lt=Nt.marker,Bt="selectLeft"in Lt?!Lt.selectLeft:Lt.inclusiveLeft,qt="selectRight"in Lt?!Lt.selectRight:Lt.inclusiveRight;if((Nt.from==null||(Bt?Nt.from<=ce.ch:Nt.from<ce.ch))&&(Nt.to==null||(qt?Nt.to>=ce.ch:Nt.to>ce.ch))){if(je&&(un(Lt,"beforeCursorEnter"),Lt.explicitlyCleared))if(tt.markedSpans){--mt;continue}else break;if(!Lt.atomic)continue;if(ke){var Ut=Lt.find(Pe<0?1:-1),xn=void 0;if((Pe<0?qt:Bt)&&(Ut=Ja(re,Ut,-Pe,Ut&&Ut.line==ce.line?tt:null)),Ut&&Ut.line==ce.line&&(xn=vr(Ut,ke))&&(Pe<0?xn<0:xn>0))return qi(re,Ut,ce,Pe,je)}var gn=Lt.find(Pe<0?-1:1);return(Pe<0?Bt:qt)&&(gn=Ja(re,gn,Pe,gn.line==ce.line?tt:null)),gn?qi(re,gn,ce,Pe,je):null}}return ce}function ca(re,ce,ke,Pe,je){var tt=Pe||1,mt=qi(re,ce,ke,tt,je)||!je&&qi(re,ce,ke,tt,!0)||qi(re,ce,ke,-tt,je)||!je&&qi(re,ce,ke,-tt,!0);return mt||(re.cantEdit=!0,Tn(re.first,0))}function Ja(re,ce,ke,Pe){return ke<0&&ce.ch==0?ce.line>re.first?Lr(re,Tn(ce.line-1)):null:ke>0&&ce.ch==(Pe||Cn(re,ce.line)).text.length?ce.line<re.first+re.size-1?Tn(ce.line+1,0):null:new Tn(ce.line,ce.ch+ke)}function Go(re){re.setSelection(Tn(re.firstLine(),0),Tn(re.lastLine()),ht)}function os(re,ce,ke){var Pe={canceled:!1,from:ce.from,to:ce.to,text:ce.text,origin:ce.origin,cancel:function(){return Pe.canceled=!0}};return ke&&(Pe.update=function(je,tt,mt,Nt){je&&(Pe.from=Lr(re,je)),tt&&(Pe.to=Lr(re,tt)),mt&&(Pe.text=mt),Nt!==void 0&&(Pe.origin=Nt)}),un(re,"beforeChange",re,Pe),re.cm&&un(re.cm,"beforeChange",re.cm,Pe),Pe.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:Pe.from,to:Pe.to,text:Pe.text,origin:Pe.origin}}function oa(re,ce,ke){if(re.cm){if(!re.cm.curOp)return ms(re.cm,oa)(re,ce,ke);if(re.cm.state.suppressEdits)return}if(!((Sn(re,"beforeChange")||re.cm&&Sn(re.cm,"beforeChange"))&&(ce=os(re,ce,!0),!ce))){var Pe=uo&&!ke&&Zr(re,ce.from,ce.to);if(Pe)for(var je=Pe.length-1;je>=0;--je)js(re,{from:Pe[je].from,to:Pe[je].to,text:je?[""]:ce.text,origin:ce.origin});else js(re,ce)}}function js(re,ce){if(!(ce.text.length==1&&ce.text[0]==""&&vr(ce.from,ce.to)==0)){var ke=Xr(re,ce);bo(re,ce,ke,re.cm?re.cm.curOp.id:NaN),Qa(re,ce,ke,pr(re,ce));var Pe=[];Si(re,function(je,tt){!tt&&$e(Pe,je.history)==-1&&(ul(je.history,ce),Pe.push(je.history)),Qa(je,ce,null,pr(je,ce))})}}function Ha(re,ce,ke){var Pe=re.cm&&re.cm.state.suppressEdits;if(!(Pe&&!ke)){for(var je=re.history,tt,mt=re.sel,Nt=ce=="undo"?je.done:je.undone,Lt=ce=="undo"?je.undone:je.done,Bt=0;Bt<Nt.length&&(tt=Nt[Bt],!(ke?tt.ranges&&!tt.equals(re.sel):!tt.ranges));Bt++);if(Bt!=Nt.length){for(je.lastOrigin=je.lastSelOrigin=null;;)if(tt=Nt.pop(),tt.ranges){if(Ii(tt,Lt),ke&&!tt.equals(re.sel)){Gr(re,tt,{clearRedo:!1});return}mt=tt}else if(Pe){Nt.push(tt);return}else break;var qt=[];Ii(mt,Lt),Lt.push({changes:qt,generation:je.generation}),je.generation=tt.generation||++je.maxGeneration;for(var Ut=Sn(re,"beforeChange")||re.cm&&Sn(re.cm,"beforeChange"),xn=function(er){var hr=tt.changes[er];if(hr.origin=ce,Ut&&!os(re,hr,!1))return Nt.length=0,{};qt.push(Hi(re,hr));var kr=er?Xr(re,hr):Tt(Nt);Qa(re,hr,kr,_o(re,hr)),!er&&re.cm&&re.cm.scrollIntoView({from:hr.from,to:qr(hr)});var Yr=[];Si(re,function(Rr,ri){!ri&&$e(Yr,Rr.history)==-1&&(ul(Rr.history,hr),Yr.push(Rr.history)),Qa(Rr,hr,null,_o(Rr,hr))})},gn=tt.changes.length-1;gn>=0;--gn){var Jn=xn(gn);if(Jn)return Jn.v}}}}function Hs(re,ce){if(ce!=0&&(re.first+=ce,re.sel=new sr(St(re.sel.ranges,function(je){return new lr(Tn(je.anchor.line+ce,je.anchor.ch),Tn(je.head.line+ce,je.head.ch))}),re.sel.primIndex),re.cm)){Ca(re.cm,re.first,re.first-ce,ce);for(var ke=re.cm.display,Pe=ke.viewFrom;Pe<ke.viewTo;Pe++)Wi(re.cm,Pe,"gutter")}}function Qa(re,ce,ke,Pe){if(re.cm&&!re.cm.curOp)return ms(re.cm,Qa)(re,ce,ke,Pe);if(ce.to.line<re.first){Hs(re,ce.text.length-1-(ce.to.line-ce.from.line));return}if(!(ce.from.line>re.lastLine())){if(ce.from.line<re.first){var je=ce.text.length-1-(re.first-ce.from.line);Hs(re,je),ce={from:Tn(re.first,0),to:Tn(ce.to.line+je,ce.to.ch),text:[Tt(ce.text)],origin:ce.origin}}var tt=re.lastLine();ce.to.line>tt&&(ce={from:ce.from,to:Tn(tt,Cn(re,tt).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=dr(re,ce.from,ce.to),ke||(ke=Xr(re,ce)),re.cm?Ra(re.cm,ce,Pe):ci(re,ce,Pe),Ur(re,ke,ht),re.cantEdit&&ca(re,Tn(re.firstLine(),0))&&(re.cantEdit=!1)}}function Ra(re,ce,ke){var Pe=re.doc,je=re.display,tt=ce.from,mt=ce.to,Nt=!1,Lt=tt.line;re.options.lineWrapping||(Lt=Zt(No(Cn(Pe,tt.line))),Pe.iter(Lt,mt.line+1,function(gn){if(gn==je.maxLine)return Nt=!0,!0})),Pe.sel.contains(ce.from,ce.to)>-1&&In(re),ci(Pe,ce,ke,Pa(re)),re.options.lineWrapping||(Pe.iter(Lt,tt.line+ce.text.length,function(gn){var Jn=ta(gn);Jn>je.maxLineLength&&(je.maxLine=gn,je.maxLineLength=Jn,je.maxLineChanged=!0,Nt=!1)}),Nt&&(re.curOp.updateMaxLine=!0)),bi(Pe,tt.line),qc(re,400);var Bt=ce.text.length-(mt.line-tt.line)-1;ce.full?Ca(re):tt.line==mt.line&&ce.text.length==1&&!pi(re.doc,ce)?Wi(re,tt.line,"text"):Ca(re,tt.line,mt.line+1,Bt);var qt=Sn(re,"changes"),Ut=Sn(re,"change");if(Ut||qt){var xn={from:tt,to:mt,text:ce.text,removed:ce.removed,origin:ce.origin};Ut&&yr(re,"change",re,xn),qt&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(xn)}re.display.selForContextMenu=null}function qo(re,ce,ke,Pe,je){var tt;Pe||(Pe=ke),vr(Pe,ke)<0&&(tt=[Pe,ke],ke=tt[0],Pe=tt[1]),typeof ce=="string"&&(ce=re.splitLines(ce)),oa(re,{from:ke,to:Pe,text:ce,origin:je})}function va(re,ce,ke,Pe){ke<re.line?re.line+=Pe:ce<re.line&&(re.line=ce,re.ch=0)}function Zl(re,ce,ke,Pe){for(var je=0;je<re.length;++je){var tt=re[je],mt=!0;if(tt.ranges){tt.copied||(tt=re[je]=tt.deepCopy(),tt.copied=!0);for(var Nt=0;Nt<tt.ranges.length;Nt++)va(tt.ranges[Nt].anchor,ce,ke,Pe),va(tt.ranges[Nt].head,ce,ke,Pe);continue}for(var Lt=0;Lt<tt.changes.length;++Lt){var Bt=tt.changes[Lt];if(ke<Bt.from.line)Bt.from=Tn(Bt.from.line+Pe,Bt.from.ch),Bt.to=Tn(Bt.to.line+Pe,Bt.to.ch);else if(ce<=Bt.to.line){mt=!1;break}}mt||(re.splice(0,je+1),je=0)}}function ul(re,ce){var ke=ce.from.line,Pe=ce.to.line,je=ce.text.length-(Pe-ke)-1;Zl(re.done,ke,Pe,je),Zl(re.undone,ke,Pe,je)}function ys(re,ce,ke,Pe){var je=ce,tt=ce;return typeof ce=="number"?tt=Cn(re,gr(re,ce)):je=Zt(ce),je==null?null:(Pe(tt,je)&&re.cm&&Wi(re.cm,je,ke),tt)}function as(re){this.lines=re,this.parent=null;for(var ce=0,ke=0;ke<re.length;++ke)re[ke].parent=this,ce+=re[ke].height;this.height=ce}as.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,ce){for(var ke=re,Pe=re+ce;ke<Pe;++ke){var je=this.lines[ke];this.height-=je.height,Ya(je),yr(je,"delete")}this.lines.splice(re,ce)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,ce,ke){this.height+=ke,this.lines=this.lines.slice(0,re).concat(ce).concat(this.lines.slice(re));for(var Pe=0;Pe<ce.length;++Pe)ce[Pe].parent=this},iterN:function(re,ce,ke){for(var Pe=re+ce;re<Pe;++re)if(ke(this.lines[re]))return!0}};function Jo(re){this.children=re;for(var ce=0,ke=0,Pe=0;Pe<re.length;++Pe){var je=re[Pe];ce+=je.chunkSize(),ke+=je.height,je.parent=this}this.size=ce,this.height=ke,this.parent=null}Jo.prototype={chunkSize:function(){return this.size},removeInner:function(re,ce){this.size-=ce;for(var ke=0;ke<this.children.length;++ke){var Pe=this.children[ke],je=Pe.chunkSize();if(re<je){var tt=Math.min(ce,je-re),mt=Pe.height;if(Pe.removeInner(re,tt),this.height-=mt-Pe.height,je==tt&&(this.children.splice(ke--,1),Pe.parent=null),(ce-=tt)==0)break;re=0}else re-=je}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof as))){var Nt=[];this.collapse(Nt),this.children=[new as(Nt)],this.children[0].parent=this}},collapse:function(re){for(var ce=0;ce<this.children.length;++ce)this.children[ce].collapse(re)},insertInner:function(re,ce,ke){this.size+=ce.length,this.height+=ke;for(var Pe=0;Pe<this.children.length;++Pe){var je=this.children[Pe],tt=je.chunkSize();if(re<=tt){if(je.insertInner(re,ce,ke),je.lines&&je.lines.length>50){for(var mt=je.lines.length%25+25,Nt=mt;Nt<je.lines.length;){var Lt=new as(je.lines.slice(Nt,Nt+=25));je.height-=Lt.height,this.children.splice(++Pe,0,Lt),Lt.parent=this}je.lines=je.lines.slice(0,mt),this.maybeSpill()}break}re-=tt}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var ce=re.children.splice(re.children.length-5,5),ke=new Jo(ce);if(re.parent){re.size-=ke.size,re.height-=ke.height;var je=$e(re.parent.children,re);re.parent.children.splice(je+1,0,ke)}else{var Pe=new Jo(re.children);Pe.parent=re,re.children=[Pe,ke],re=Pe}ke.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,ce,ke){for(var Pe=0;Pe<this.children.length;++Pe){var je=this.children[Pe],tt=je.chunkSize();if(re<tt){var mt=Math.min(ce,tt-re);if(je.iterN(re,mt,ke))return!0;if((ce-=mt)==0)break;re=0}else re-=tt}}};var Ka=function(re,ce,ke){if(ke)for(var Pe in ke)ke.hasOwnProperty(Pe)&&(this[Pe]=ke[Pe]);this.doc=re,this.node=ce};Ka.prototype.clear=function(){var re=this.doc.cm,ce=this.line.widgets,ke=this.line,Pe=Zt(ke);if(!(Pe==null||!ce)){for(var je=0;je<ce.length;++je)ce[je]==this&&ce.splice(je--,1);ce.length||(ke.widgets=null);var tt=al(this);_n(ke,Math.max(0,ke.height-tt)),re&&(Ro(re,function(){ju(re,ke,-tt),Wi(re,Pe,"widget")}),yr(re,"lineWidgetCleared",re,this,Pe))}},Ka.prototype.changed=function(){var re=this,ce=this.height,ke=this.doc.cm,Pe=this.line;this.height=null;var je=al(this)-ce;je&&(jn(this.doc,Pe)||_n(Pe,Pe.height+je),ke&&Ro(ke,function(){ke.curOp.forceUpdate=!0,ju(ke,Pe,je),yr(ke,"lineWidgetChanged",ke,re,Zt(Pe))}))},Dn(Ka);function ju(re,ce,ke){So(ce)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&If(re,ke)}function Ss(re,ce,ke,Pe){var je=new Ka(re,ke,Pe),tt=re.cm;return tt&&je.noHScroll&&(tt.display.alignWidgets=!0),ys(re,ce,"widget",function(mt){var Nt=mt.widgets||(mt.widgets=[]);if(je.insertAt==null?Nt.push(je):Nt.splice(Math.min(Nt.length-1,Math.max(0,je.insertAt)),0,je),je.line=mt,tt&&!jn(re,mt)){var Lt=So(mt)<re.scrollTop;_n(mt,mt.height+al(je)),Lt&&If(tt,je.height),tt.curOp.forceUpdate=!0}return!0}),tt&&yr(tt,"lineWidgetAdded",tt,je,typeof ce=="number"?ce:Zt(ce)),je}var ch=0,Vt=function(re,ce){this.lines=[],this.type=ce,this.doc=re,this.id=++ch};Vt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,ce=re&&!re.curOp;if(ce&&Lh(re),Sn(this,"clear")){var ke=this.find();ke&&yr(this,"clear",ke.from,ke.to)}for(var Pe=null,je=null,tt=0;tt<this.lines.length;++tt){var mt=this.lines[tt],Nt=bs(mt.markedSpans,this);re&&!this.collapsed?Wi(re,Zt(mt),"text"):re&&(Nt.to!=null&&(je=Zt(mt)),Nt.from!=null&&(Pe=Zt(mt))),mt.markedSpans=Xt(mt.markedSpans,Nt),Nt.from==null&&this.collapsed&&!jn(this.doc,mt)&&re&&_n(mt,Yu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var Lt=0;Lt<this.lines.length;++Lt){var Bt=No(this.lines[Lt]),qt=ta(Bt);qt>re.display.maxLineLength&&(re.display.maxLine=Bt,re.display.maxLineLength=qt,re.display.maxLineChanged=!0)}Pe!=null&&re&&this.collapsed&&Ca(re,Pe,je+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&Ui(re.doc)),re&&yr(re,"markerCleared",re,this,Pe,je),ce&&Ah(re),this.parent&&this.parent.clear()}},Vt.prototype.find=function(re,ce){re==null&&this.type=="bookmark"&&(re=1);for(var ke,Pe,je=0;je<this.lines.length;++je){var tt=this.lines[je],mt=bs(tt.markedSpans,this);if(mt.from!=null&&(ke=Tn(ce?tt:Zt(tt),mt.from),re==-1))return ke;if(mt.to!=null&&(Pe=Tn(ce?tt:Zt(tt),mt.to),re==1))return Pe}return ke&&{from:ke,to:Pe}},Vt.prototype.changed=function(){var re=this,ce=this.find(-1,!0),ke=this,Pe=this.doc.cm;!ce||!Pe||Ro(Pe,function(){var je=ce.line,tt=Zt(ce.line),mt=Vu(Pe,tt);if(mt&&(Lf(mt),Pe.curOp.selectionChanged=Pe.curOp.forceUpdate=!0),Pe.curOp.updateMaxLine=!0,!jn(ke.doc,je)&&ke.height!=null){var Nt=ke.height;ke.height=null;var Lt=al(ke)-Nt;Lt&&_n(je,je.height+Lt)}yr(Pe,"markerChanged",Pe,re)})},Vt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||$e(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Vt.prototype.detachLine=function(re){if(this.lines.splice($e(this.lines,re),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Dn(Vt);function Jl(re,ce,ke,Pe,je){if(Pe&&Pe.shared)return Fu(re,ce,ke,Pe,je);if(re.cm&&!re.cm.curOp)return ms(re.cm,Jl)(re,ce,ke,Pe,je);var tt=new Vt(re,je),mt=vr(ce,ke);if(Pe&&Et(Pe,tt,!1),mt>0||mt==0&&tt.clearWhenEmpty!==!1)return tt;if(tt.replacedWith&&(tt.collapsed=!0,tt.widgetNode=ze("span",[tt.replacedWith],"CodeMirror-widget"),Pe.handleMouseEvents||tt.widgetNode.setAttribute("cm-ignore-events","true"),Pe.insertLeft&&(tt.widgetNode.insertLeft=!0)),tt.collapsed){if(fs(re,ce.line,ce,ke,tt)||ce.line!=ke.line&&fs(re,ke.line,ce,ke,tt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Nn()}tt.addToHistory&&bo(re,{from:ce,to:ke,origin:"markText"},re.sel,NaN);var Nt=ce.line,Lt=re.cm,Bt;if(re.iter(Nt,ke.line+1,function(Ut){Lt&&tt.collapsed&&!Lt.options.lineWrapping&&No(Ut)==Lt.display.maxLine&&(Bt=!0),tt.collapsed&&Nt!=ce.line&&_n(Ut,0),Jt(Ut,new vo(tt,Nt==ce.line?ce.ch:null,Nt==ke.line?ke.ch:null)),++Nt}),tt.collapsed&&re.iter(ce.line,ke.line+1,function(Ut){jn(re,Ut)&&_n(Ut,0)}),tt.clearOnEnter&&sn(tt,"beforeCursorEnter",function(){return tt.clear()}),tt.readOnly&&(la(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),tt.collapsed&&(tt.id=++ch,tt.atomic=!0),Lt){if(Bt&&(Lt.curOp.updateMaxLine=!0),tt.collapsed)Ca(Lt,ce.line,ke.line+1);else if(tt.className||tt.startStyle||tt.endStyle||tt.css||tt.attributes||tt.title)for(var qt=ce.line;qt<=ke.line;qt++)Wi(Lt,qt,"text");tt.atomic&&Ui(Lt.doc),yr(Lt,"markerAdded",Lt,tt)}return tt}var Ks=function(re,ce){this.markers=re,this.primary=ce;for(var ke=0;ke<re.length;++ke)re[ke].parent=this};Ks.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();yr(this,"clear")}},Ks.prototype.find=function(re,ce){return this.primary.find(re,ce)},Dn(Ks);function Fu(re,ce,ke,Pe,je){Pe=Et(Pe),Pe.shared=!1;var tt=[Jl(re,ce,ke,Pe,je)],mt=tt[0],Nt=Pe.widgetNode;return Si(re,function(Lt){Nt&&(Pe.widgetNode=Nt.cloneNode(!0)),tt.push(Jl(Lt,Lr(Lt,ce),Lr(Lt,ke),Pe,je));for(var Bt=0;Bt<Lt.linked.length;++Bt)if(Lt.linked[Bt].isParent)return;mt=Tt(tt)}),new Ks(tt,mt)}function wu(re){return re.findMarks(Tn(re.first,0),re.clipPos(Tn(re.lastLine())),function(ce){return ce.parent})}function $a(re,ce){for(var ke=0;ke<ce.length;ke++){var Pe=ce[ke],je=Pe.find(),tt=re.clipPos(je.from),mt=re.clipPos(je.to);if(vr(tt,mt)){var Nt=Jl(re,tt,mt,Pe.primary,Pe.primary.type);Pe.markers.push(Nt),Nt.parent=Pe}}}function xi(re){for(var ce=function(Pe){var je=re[Pe],tt=[je.primary.doc];Si(je.primary.doc,function(Lt){return tt.push(Lt)});for(var mt=0;mt<je.markers.length;mt++){var Nt=je.markers[mt];$e(tt,Nt.doc)==-1&&(Nt.parent=null,je.markers.splice(mt--,1))}},ke=0;ke<re.length;ke++)ce(ke)}var Ao=0,Pi=function(re,ce,ke,Pe,je){if(!(this instanceof Pi))return new Pi(re,ce,ke,Pe,je);ke==null&&(ke=0),Jo.call(this,[new as([new Wo("",null)])]),this.first=ke,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ke;var tt=Tn(ke,0);this.sel=br(tt),this.history=new ao(null),this.id=++Ao,this.modeOption=ce,this.lineSep=Pe,this.direction=je=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),ci(this,{from:tt,to:tt,text:re}),Gr(this,br(tt),ht)};Pi.prototype=Ce(Jo.prototype,{constructor:Pi,iter:function(re,ce,ke){ke?this.iterN(re-this.first,ce-re,ke):this.iterN(this.first,this.first+this.size,re)},insert:function(re,ce){for(var ke=0,Pe=0;Pe<ce.length;++Pe)ke+=ce[Pe].height;this.insertInner(re-this.first,ce,ke)},remove:function(re,ce){this.removeInner(re-this.first,ce)},getValue:function(re){var ce=Ar(this,this.first,this.first+this.size);return re===!1?ce:ce.join(re||this.lineSeparator())},setValue:Cs(function(re){var ce=Tn(this.first,0),ke=this.first+this.size-1;oa(this,{from:ce,to:Tn(ke,Cn(this,ke).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&$h(this.cm,0,0),Gr(this,br(ce),ht)}),replaceRange:function(re,ce,ke,Pe){ce=Lr(this,ce),ke=ke?Lr(this,ke):ce,qo(this,re,ce,ke,Pe)},getRange:function(re,ce,ke){var Pe=dr(this,Lr(this,re),Lr(this,ce));return ke===!1?Pe:Pe.join(ke||this.lineSeparator())},getLine:function(re){var ce=this.getLineHandle(re);return ce&&ce.text},getLineHandle:function(re){if(Nr(this,re))return Cn(this,re)},getLineNumber:function(re){return Zt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=Cn(this,re)),No(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return Lr(this,re)},getCursor:function(re){var ce=this.sel.primary(),ke;return re==null||re=="head"?ke=ce.head:re=="anchor"?ke=ce.anchor:re=="end"||re=="to"||re===!1?ke=ce.to():ke=ce.from(),ke},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Cs(function(re,ce,ke){gi(this,Lr(this,typeof re=="number"?Tn(re,ce||0):re),null,ke)}),setSelection:Cs(function(re,ce,ke){gi(this,Lr(this,re),Lr(this,ce||re),ke)}),extendSelection:Cs(function(re,ce,ke){ia(this,Lr(this,re),ce&&Lr(this,ce),ke)}),extendSelections:Cs(function(re,ce){hs(this,oo(this,re),ce)}),extendSelectionsBy:Cs(function(re,ce){var ke=St(this.sel.ranges,re);hs(this,oo(this,ke),ce)}),setSelections:Cs(function(re,ce,ke){if(re.length){for(var Pe=[],je=0;je<re.length;je++)Pe[je]=new lr(Lr(this,re[je].anchor),Lr(this,re[je].head));ce==null&&(ce=Math.min(re.length-1,this.sel.primIndex)),Gr(this,Pr(this.cm,Pe,ce),ke)}}),addSelection:Cs(function(re,ce,ke){var Pe=this.sel.ranges.slice(0);Pe.push(new lr(Lr(this,re),Lr(this,ce||re))),Gr(this,Pr(this.cm,Pe,Pe.length-1),ke)}),getSelection:function(re){for(var ce=this.sel.ranges,ke,Pe=0;Pe<ce.length;Pe++){var je=dr(this,ce[Pe].from(),ce[Pe].to());ke=ke?ke.concat(je):je}return re===!1?ke:ke.join(re||this.lineSeparator())},getSelections:function(re){for(var ce=[],ke=this.sel.ranges,Pe=0;Pe<ke.length;Pe++){var je=dr(this,ke[Pe].from(),ke[Pe].to());re!==!1&&(je=je.join(re||this.lineSeparator())),ce[Pe]=je}return ce},replaceSelection:function(re,ce,ke){for(var Pe=[],je=0;je<this.sel.ranges.length;je++)Pe[je]=re;this.replaceSelections(Pe,ce,ke||"+input")},replaceSelections:Cs(function(re,ce,ke){for(var Pe=[],je=this.sel,tt=0;tt<je.ranges.length;tt++){var mt=je.ranges[tt];Pe[tt]={from:mt.from(),to:mt.to(),text:this.splitLines(re[tt]),origin:ke}}for(var Nt=ce&&ce!="end"&&Di(this,Pe,ce),Lt=Pe.length-1;Lt>=0;Lt--)oa(this,Pe[Lt]);Nt?ui(this,Nt):this.cm&&lh(this.cm)}),undo:Cs(function(){Ha(this,"undo")}),redo:Cs(function(){Ha(this,"redo")}),undoSelection:Cs(function(){Ha(this,"undo",!0)}),redoSelection:Cs(function(){Ha(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,ce=0,ke=0,Pe=0;Pe<re.done.length;Pe++)re.done[Pe].ranges||++ce;for(var je=0;je<re.undone.length;je++)re.undone[je].ranges||++ke;return{undo:ce,redo:ke}},clearHistory:function(){var re=this;this.history=new ao(this.history.maxGeneration),Si(this,function(ce){return ce.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:zo(this.history.done),undone:zo(this.history.undone)}},setHistory:function(re){var ce=this.history=new ao(this.history.maxGeneration);ce.done=zo(re.done.slice(0),null,!0),ce.undone=zo(re.undone.slice(0),null,!0)},setGutterMarker:Cs(function(re,ce,ke){return ys(this,re,"gutter",function(Pe){var je=Pe.gutterMarkers||(Pe.gutterMarkers={});return je[ce]=ke,!ke&&Be(je)&&(Pe.gutterMarkers=null),!0})}),clearGutter:Cs(function(re){var ce=this;this.iter(function(ke){ke.gutterMarkers&&ke.gutterMarkers[re]&&ys(ce,ke,"gutter",function(){return ke.gutterMarkers[re]=null,Be(ke.gutterMarkers)&&(ke.gutterMarkers=null),!0})})}),lineInfo:function(re){var ce;if(typeof re=="number"){if(!Nr(this,re)||(ce=re,re=Cn(this,re),!re))return null}else if(ce=Zt(re),ce==null)return null;return{line:ce,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:Cs(function(re,ce,ke){return ys(this,re,ce=="gutter"?"gutter":"class",function(Pe){var je=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass";if(!Pe[je])Pe[je]=ke;else{if(Le(ke).test(Pe[je]))return!1;Pe[je]+=" "+ke}return!0})}),removeLineClass:Cs(function(re,ce,ke){return ys(this,re,ce=="gutter"?"gutter":"class",function(Pe){var je=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass",tt=Pe[je];if(tt)if(ke==null)Pe[je]=null;else{var mt=tt.match(Le(ke));if(!mt)return!1;var Nt=mt.index+mt[0].length;Pe[je]=tt.slice(0,mt.index)+(!mt.index||Nt==tt.length?"":" ")+tt.slice(Nt)||null}else return!1;return!0})}),addLineWidget:Cs(function(re,ce,ke){return Ss(this,re,ce,ke)}),removeLineWidget:function(re){re.clear()},markText:function(re,ce,ke){return Jl(this,Lr(this,re),Lr(this,ce),ke,ke&&ke.type||"range")},setBookmark:function(re,ce){var ke={replacedWith:ce&&(ce.nodeType==null?ce.widget:ce),insertLeft:ce&&ce.insertLeft,clearWhenEmpty:!1,shared:ce&&ce.shared,handleMouseEvents:ce&&ce.handleMouseEvents};return re=Lr(this,re),Jl(this,re,re,ke,"bookmark")},findMarksAt:function(re){re=Lr(this,re);var ce=[],ke=Cn(this,re.line).markedSpans;if(ke)for(var Pe=0;Pe<ke.length;++Pe){var je=ke[Pe];(je.from==null||je.from<=re.ch)&&(je.to==null||je.to>=re.ch)&&ce.push(je.marker.parent||je.marker)}return ce},findMarks:function(re,ce,ke){re=Lr(this,re),ce=Lr(this,ce);var Pe=[],je=re.line;return this.iter(re.line,ce.line+1,function(tt){var mt=tt.markedSpans;if(mt)for(var Nt=0;Nt<mt.length;Nt++){var Lt=mt[Nt];!(Lt.to!=null&&je==re.line&&re.ch>=Lt.to||Lt.from==null&&je!=re.line||Lt.from!=null&&je==ce.line&&Lt.from>=ce.ch)&&(!ke||ke(Lt.marker))&&Pe.push(Lt.marker.parent||Lt.marker)}++je}),Pe},getAllMarks:function(){var re=[];return this.iter(function(ce){var ke=ce.markedSpans;if(ke)for(var Pe=0;Pe<ke.length;++Pe)ke[Pe].from!=null&&re.push(ke[Pe].marker)}),re},posFromIndex:function(re){var ce,ke=this.first,Pe=this.lineSeparator().length;return this.iter(function(je){var tt=je.text.length+Pe;if(tt>re)return ce=re,!0;re-=tt,++ke}),Lr(this,Tn(ke,ce))},indexFromPos:function(re){re=Lr(this,re);var ce=re.ch;if(re.line<this.first||re.ch<0)return 0;var ke=this.lineSeparator().length;return this.iter(this.first,re.line,function(Pe){ce+=Pe.text.length+ke}),ce},copy:function(re){var ce=new Pi(Ar(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ce.scrollTop=this.scrollTop,ce.scrollLeft=this.scrollLeft,ce.sel=this.sel,ce.extend=!1,re&&(ce.history.undoDepth=this.history.undoDepth,ce.setHistory(this.getHistory())),ce},linkedDoc:function(re){re||(re={});var ce=this.first,ke=this.first+this.size;re.from!=null&&re.from>ce&&(ce=re.from),re.to!=null&&re.to<ke&&(ke=re.to);var Pe=new Pi(Ar(this,ce,ke),re.mode||this.modeOption,ce,this.lineSep,this.direction);return re.sharedHist&&(Pe.history=this.history),(this.linked||(this.linked=[])).push({doc:Pe,sharedHist:re.sharedHist}),Pe.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],$a(Pe,wu(this)),Pe},unlinkDoc:function(re){if(re instanceof Ko&&(re=re.doc),this.linked)for(var ce=0;ce<this.linked.length;++ce){var ke=this.linked[ce];if(ke.doc==re){this.linked.splice(ce,1),re.unlinkDoc(this),xi(wu(this));break}}if(re.history==this.history){var Pe=[re.id];Si(re,function(je){return Pe.push(je.id)},!0),re.history=new ao(null),re.history.done=zo(this.history.done,Pe),re.history.undone=zo(this.history.undone,Pe)}},iterLinkedDocs:function(re){Si(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):bn(re)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Cs(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(ce){return ce.order=null}),this.cm&&Ei(this.cm))})}),Pi.prototype.eachLine=Pi.prototype.iter;var ss=0;function bl(re){var ce=this;if(Vi(ce),!(mn(ce,re)||Ps(ce.display,re))){fr(re),Ie&&(ss=+new Date);var ke=Us(ce,re,!0),Pe=re.dataTransfer.files;if(!(!ke||ce.isReadOnly()))if(Pe&&Pe.length&&window.FileReader&&window.File)for(var je=Pe.length,tt=Array(je),mt=0,Nt=function(){++mt==je&&ms(ce,function(){ke=Lr(ce.doc,ke);var gn={from:ke,to:ke,text:ce.doc.splitLines(tt.filter(function(Jn){return Jn!=null}).join(ce.doc.lineSeparator())),origin:"paste"};oa(ce.doc,gn),ui(ce.doc,br(Lr(ce.doc,ke),Lr(ce.doc,qr(gn))))})()},Lt=function(gn,Jn){if(ce.options.allowDropFileTypes&&$e(ce.options.allowDropFileTypes,gn.type)==-1){Nt();return}var er=new FileReader;er.onerror=function(){return Nt()},er.onload=function(){var hr=er.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(hr)){Nt();return}tt[Jn]=hr,Nt()},er.readAsText(gn)},Bt=0;Bt<Pe.length;Bt++)Lt(Pe[Bt],Bt);else{if(ce.state.draggingText&&ce.doc.sel.contains(ke)>-1){ce.state.draggingText(re),setTimeout(function(){return ce.display.input.focus()},20);return}try{var qt=re.dataTransfer.getData("Text");if(qt){var Ut;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(Ut=ce.listSelections()),Ur(ce.doc,br(ke,ke)),Ut)for(var xn=0;xn<Ut.length;++xn)qo(ce.doc,"",Ut[xn].anchor,Ut[xn].head,"drag");ce.replaceSelection(qt,"around","paste"),ce.display.input.focus()}}catch(gn){}}}}function Bi(re,ce){if(Ie&&(!re.state.draggingText||+new Date-ss<100)){wi(ce);return}if(!(mn(re,ce)||Ps(re.display,ce))&&(ce.dataTransfer.setData("Text",re.getSelection()),ce.dataTransfer.effectAllowed="copyMove",ce.dataTransfer.setDragImage&&!Te)){var ke=Oe("img",null,null,"position: fixed; left: 0; top: 0;");ke.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",be&&(ke.width=ke.height=1,re.display.wrapper.appendChild(ke),ke._top=ke.offsetTop),ce.dataTransfer.setDragImage(ke,0,0),be&&ke.parentNode.removeChild(ke)}}function po(re,ce){var ke=Us(re,ce);if(ke){var Pe=document.createDocumentFragment();To(re,ke,Pe),re.display.dragCursor||(re.display.dragCursor=Oe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),Ae(re.display.dragCursor,Pe)}}function Vi(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function eo(re){if(document.getElementsByClassName){for(var ce=document.getElementsByClassName("CodeMirror"),ke=[],Pe=0;Pe<ce.length;Pe++){var je=ce[Pe].CodeMirror;je&&ke.push(je)}ke.length&&ke[0].operation(function(){for(var tt=0;tt<ke.length;tt++)re(ke[tt])})}}var aa=!1;function Uo(){aa||(Ql(),aa=!0)}function Ql(){var re;sn(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,eo(bu)},100))}),sn(window,"blur",function(){return eo(Qh)})}function bu(re){var ce=re.display;ce.cachedCharWidth=ce.cachedTextHeight=ce.cachedPaddingH=null,ce.scrollbarsClipped=!1,re.setSize()}for(var hl={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"},xs=0;xs<10;xs++)hl[xs+48]=hl[xs+96]=String(xs);for(var Du=65;Du<=90;Du++)hl[Du]=String.fromCharCode(Du);for(var Iu=1;Iu<=12;Iu++)hl[Iu+111]=hl[Iu+63235]="F"+Iu;var cl={};cl.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"},cl.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"},cl.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"},cl.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"]},cl.default=oe?cl.macDefault:cl.pcDefault;function zf(re){var ce=re.split(/-(?!$)/);re=ce[ce.length-1];for(var ke,Pe,je,tt,mt=0;mt<ce.length-1;mt++){var Nt=ce[mt];if(/^(cmd|meta|m)$/i.test(Nt))tt=!0;else if(/^a(lt)?$/i.test(Nt))ke=!0;else if(/^(c|ctrl|control)$/i.test(Nt))Pe=!0;else if(/^s(hift)?$/i.test(Nt))je=!0;else throw new Error("Unrecognized modifier name: "+Nt)}return ke&&(re="Alt-"+re),Pe&&(re="Ctrl-"+re),tt&&(re="Cmd-"+re),je&&(re="Shift-"+re),re}function tc(re){var ce={};for(var ke in re)if(re.hasOwnProperty(ke)){var Pe=re[ke];if(/^(name|fallthrough|(de|at)tach)$/.test(ke))continue;if(Pe=="..."){delete re[ke];continue}for(var je=St(ke.split(" "),zf),tt=0;tt<je.length;tt++){var mt=void 0,Nt=void 0;tt==je.length-1?(Nt=je.join(" "),mt=Pe):(Nt=je.slice(0,tt+1).join(" "),mt="...");var Lt=ce[Nt];if(!Lt)ce[Nt]=mt;else if(Lt!=mt)throw new Error("Inconsistent bindings for "+Nt)}delete re[ke]}for(var Bt in ce)re[Bt]=ce[Bt];return re}function ws(re,ce,ke,Pe){ce=Pu(ce);var je=ce.call?ce.call(re,Pe):ce[re];if(je===!1)return"nothing";if(je==="...")return"multi";if(je!=null&&ke(je))return"handled";if(ce.fallthrough){if(Object.prototype.toString.call(ce.fallthrough)!="[object Array]")return ws(re,ce.fallthrough,ke,Pe);for(var tt=0;tt<ce.fallthrough.length;tt++){var mt=ws(re,ce.fallthrough[tt],ke,Pe);if(mt)return mt}}}function jh(re){var ce=typeof re=="string"?re:hl[re.keyCode];return ce=="Ctrl"||ce=="Alt"||ce=="Shift"||ce=="Mod"}function bd(re,ce,ke){var Pe=re;return ce.altKey&&Pe!="Alt"&&(re="Alt-"+re),(pe?ce.metaKey:ce.ctrlKey)&&Pe!="Ctrl"&&(re="Ctrl-"+re),(pe?ce.ctrlKey:ce.metaKey)&&Pe!="Mod"&&(re="Cmd-"+re),!ke&&ce.shiftKey&&Pe!="Shift"&&(re="Shift-"+re),re}function rp(re,ce){if(be&&re.keyCode==34&&re.char)return!1;var ke=hl[re.keyCode];return ke==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(ke=re.code),bd(ke,re,ce))}function Pu(re){return typeof re=="string"?cl[re]:re}function Il(re,ce){for(var ke=re.doc.sel.ranges,Pe=[],je=0;je<ke.length;je++){for(var tt=ce(ke[je]);Pe.length&&vr(tt.from,Tt(Pe).to)<=0;){var mt=Pe.pop();if(vr(mt.from,tt.from)<0){tt.from=mt.from;break}}Pe.push(tt)}Ro(re,function(){for(var Nt=Pe.length-1;Nt>=0;Nt--)qo(re.doc,"",Pe[Nt].from,Pe[Nt].to,"+delete");lh(re)})}function Pd(re,ce,ke){var Pe=lt(re.text,ce+ke,ke);return Pe<0||Pe>re.text.length?null:Pe}function qa(re,ce,ke){var Pe=Pd(re,ce.ch,ke);return Pe==null?null:new Tn(ce.line,Pe,ke<0?"after":"before")}function ef(re,ce,ke,Pe,je){if(re){ce.doc.direction=="rtl"&&(je=-je);var tt=ln(ke,ce.doc.direction);if(tt){var mt=je<0?Tt(tt):tt[0],Nt=je<0==(mt.level==1),Lt=Nt?"after":"before",Bt;if(mt.level>0||ce.doc.direction=="rtl"){var qt=kh(ce,ke);Bt=je<0?ke.text.length-1:0;var Ut=Su(ce,qt,Bt).top;Bt=Pt(function(xn){return Su(ce,qt,xn).top==Ut},je<0==(mt.level==1)?mt.from:mt.to-1,Bt),Lt=="before"&&(Bt=Pd(ke,Bt,1))}else Bt=je<0?mt.to:mt.from;return new Tn(Pe,Bt,Lt)}}return new Tn(Pe,je<0?ke.text.length:0,je<0?"before":"after")}function Uf(re,ce,ke,Pe){var je=ln(ce,re.doc.direction);if(!je)return qa(ce,ke,Pe);ke.ch>=ce.text.length?(ke.ch=ce.text.length,ke.sticky="before"):ke.ch<=0&&(ke.ch=0,ke.sticky="after");var tt=jt(je,ke.ch,ke.sticky),mt=je[tt];if(re.doc.direction=="ltr"&&mt.level%2==0&&(Pe>0?mt.to>ke.ch:mt.from<ke.ch))return qa(ce,ke,Pe);var Nt=function(kr,Yr){return Pd(ce,kr instanceof Tn?kr.ch:kr,Yr)},Lt,Bt=function(kr){return re.options.lineWrapping?(Lt=Lt||kh(re,ce),Qc(re,ce,Lt,kr)):{begin:0,end:ce.text.length}},qt=Bt(ke.sticky=="before"?Nt(ke,-1):ke.ch);if(re.doc.direction=="rtl"||mt.level==1){var Ut=mt.level==1==Pe<0,xn=Nt(ke,Ut?1:-1);if(xn!=null&&(Ut?xn<=mt.to&&xn<=qt.end:xn>=mt.from&&xn>=qt.begin)){var gn=Ut?"before":"after";return new Tn(ke.line,xn,gn)}}var Jn=function(kr,Yr,Rr){for(var ri=function(Na,Ds){return Ds?new Tn(ke.line,Nt(Na,1),"before"):new Tn(ke.line,Na,"after")};kr>=0&&kr<je.length;kr+=Yr){var ji=je[kr],Dr=Yr>0==(ji.level!=1),so=Dr?Rr.begin:Nt(Rr.end,-1);if(ji.from<=so&&so<ji.to||(so=Dr?ji.from:Nt(ji.to,-1),Rr.begin<=so&&so<Rr.end))return ri(so,Dr)}},er=Jn(tt+Pe,Pe,qt);if(er)return er;var hr=Pe>0?qt.end:Nt(qt.begin,-1);return hr!=null&&!(Pe>0&&hr==ce.text.length)&&(er=Jn(Pe>0?0:je.length-1,Pe,Bt(hr)),er)?er:null}var fh={selectAll:Go,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),ht)},killLine:function(re){return Il(re,function(ce){if(ce.empty()){var ke=Cn(re.doc,ce.head.line).text.length;return ce.head.ch==ke&&ce.head.line<re.lastLine()?{from:ce.head,to:Tn(ce.head.line+1,0)}:{from:ce.head,to:Tn(ce.head.line,ke)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(re){return Il(re,function(ce){return{from:Tn(ce.from().line,0),to:Lr(re.doc,Tn(ce.to().line+1,0))}})},delLineLeft:function(re){return Il(re,function(ce){return{from:Tn(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(re){return Il(re,function(ce){var ke=re.charCoords(ce.head,"div").top+5,Pe=re.coordsChar({left:0,top:ke},"div");return{from:Pe,to:ce.from()}})},delWrappedLineRight:function(re){return Il(re,function(ce){var ke=re.charCoords(ce.head,"div").top+5,Pe=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:ke},"div");return{from:ce.from(),to:Pe}})},undo:function(re){return re.undo()},redo:function(re){return re.redo()},undoSelection:function(re){return re.undoSelection()},redoSelection:function(re){return re.redoSelection()},goDocStart:function(re){return re.extendSelection(Tn(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(Tn(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(ce){return wc(re,ce.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(ce){return Wf(re,ce.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(ce){return nc(re,ce.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(ce){var ke=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:ke},"div")},ct)},goLineLeft:function(re){return re.extendSelectionsBy(function(ce){var ke=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:0,top:ke},"div")},ct)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(ce){var ke=re.cursorCoords(ce.head,"div").top+5,Pe=re.coordsChar({left:0,top:ke},"div");return Pe.ch<re.getLine(Pe.line).search(/\S/)?Wf(re,ce.head):Pe},ct)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var ce=[],ke=re.listSelections(),Pe=re.options.tabSize,je=0;je<ke.length;je++){var tt=ke[je].from(),mt=Ke(re.getLine(tt.line),tt.ch,Pe);ce.push(yt(Pe-mt%Pe))}re.replaceSelections(ce)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return Ro(re,function(){for(var ce=re.listSelections(),ke=[],Pe=0;Pe<ce.length;Pe++)if(ce[Pe].empty()){var je=ce[Pe].head,tt=Cn(re.doc,je.line).text;if(tt){if(je.ch==tt.length&&(je=new Tn(je.line,je.ch-1)),je.ch>0)je=new Tn(je.line,je.ch+1),re.replaceRange(tt.charAt(je.ch-1)+tt.charAt(je.ch-2),Tn(je.line,je.ch-2),je,"+transpose");else if(je.line>re.doc.first){var mt=Cn(re.doc,je.line-1).text;mt&&(je=new Tn(je.line,1),re.replaceRange(tt.charAt(0)+re.doc.lineSeparator()+mt.charAt(mt.length-1),Tn(je.line-1,mt.length-1),je,"+transpose"))}}ke.push(new lr(je,je))}re.setSelections(ke)})},newlineAndIndent:function(re){return Ro(re,function(){for(var ce=re.listSelections(),ke=ce.length-1;ke>=0;ke--)re.replaceRange(re.doc.lineSeparator(),ce[ke].anchor,ce[ke].head,"+input");ce=re.listSelections();for(var Pe=0;Pe<ce.length;Pe++)re.indentLine(ce[Pe].from().line,null,!0);lh(re)})},openLine:function(re){return re.replaceSelection(`
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function wc(re,ce){var ke=Cn(re.doc,ce),Pe=No(ke);return Pe!=ke&&(ce=Zt(Pe)),ef(!0,re,Pe,ce,1)}function nc(re,ce){var ke=Cn(re.doc,ce),Pe=ea(ke);return Pe!=ke&&(ce=Zt(Pe)),ef(!0,re,ke,ce,-1)}function Wf(re,ce){var ke=wc(re,ce.line),Pe=Cn(re.doc,ke.line),je=ln(Pe,re.doc.direction);if(!je||je[0].level==0){var tt=Math.max(ke.ch,Pe.text.search(/\S/)),mt=ce.line==ke.line&&ce.ch<=tt&&ce.ch;return Tn(ke.line,mt?0:tt,ke.sticky)}return ke}function bc(re,ce,ke){if(typeof ce=="string"&&(ce=fh[ce],!ce))return!1;re.display.input.ensurePolled();var Pe=re.display.shift,je=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),ke&&(re.display.shift=!1),je=ce(re)!=wt}finally{re.display.shift=Pe,re.state.suppressEdits=!1}return je}function Hf(re,ce,ke){for(var Pe=0;Pe<re.state.keyMaps.length;Pe++){var je=ws(ce,re.state.keyMaps[Pe],ke,re);if(je)return je}return re.options.extraKeys&&ws(ce,re.options.extraKeys,ke,re)||ws(ce,re.options.keyMap,ke,re)}var Ju=new et;function rc(re,ce,ke,Pe){var je=re.state.keySeq;if(je){if(jh(ce))return"handled";if(/\'$/.test(ce)?re.state.keySeq=null:Ju.set(50,function(){re.state.keySeq==je&&(re.state.keySeq=null,re.display.input.reset())}),Kf(re,je+" "+ce,ke,Pe))return!0}return Kf(re,ce,ke,Pe)}function Kf(re,ce,ke,Pe){var je=Hf(re,ce,Pe);return je=="multi"&&(re.state.keySeq=ce),je=="handled"&&yr(re,"keyHandled",re,ce,ke),(je=="handled"||je=="multi")&&(fr(ke),Zo(re)),!!je}function Vf(re,ce){var ke=rp(ce,!0);return ke?ce.shiftKey&&!re.state.keySeq?rc(re,"Shift-"+ke,ce,function(Pe){return bc(re,Pe,!0)})||rc(re,ke,ce,function(Pe){if(typeof Pe=="string"?/^go[A-Z]/.test(Pe):Pe.motion)return bc(re,Pe)}):rc(re,ke,ce,function(Pe){return bc(re,Pe)}):!1}function tf(re,ce,ke){return rc(re,"'"+ke+"'",ce,function(Pe){return bc(re,Pe,!0)})}var dh=null;function Vo(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&(ce.curOp.focus=We(),!mn(ce,re))){Ie&&me<11&&re.keyCode==27&&(re.returnValue=!1);var ke=re.keyCode;ce.display.shift=ke==16||re.shiftKey;var Pe=Vf(ce,re);be&&(dh=Pe?ke:null,!Pe&&ke==88&&!vn&&(oe?re.metaKey:re.ctrlKey)&&ce.replaceSelection("",null,"cut")),ot&&!oe&&!Pe&&ke==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),ke==18&&!/\bCodeMirror-crosshair\b/.test(ce.display.lineDiv.className)&&Lo(ce)}}function Lo(re){var ce=re.display.lineDiv;Ue(ce,"CodeMirror-crosshair");function ke(Pe){(Pe.keyCode==18||!Pe.altKey)&&(De(ce,"CodeMirror-crosshair"),On(document,"keyup",ke),On(document,"mouseover",ke))}sn(document,"keyup",ke),sn(document,"mouseover",ke)}function Pl(re){re.keyCode==16&&(this.doc.sel.shift=!1),mn(this,re)}function es(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&!(Ps(ce.display,re)||mn(ce,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var ke=re.keyCode,Pe=re.charCode;if(be&&ke==dh){dh=null,fr(re);return}if(!(be&&(!re.which||re.which<10)&&Vf(ce,re))){var je=String.fromCharCode(Pe==null?ke:Pe);je!="\b"&&(tf(ce,re,je)||ce.display.input.onKeyPress(re))}}}var ks=400,Vs=function(re,ce,ke){this.time=re,this.pos=ce,this.button=ke};Vs.prototype.compare=function(re,ce,ke){return this.time+ks>re&&vr(ce,this.pos)==0&&ke==this.button};var $l,Cl;function ph(re,ce){var ke=+new Date;return Cl&&Cl.compare(ke,re,ce)?($l=Cl=null,"triple"):$l&&$l.compare(ke,re,ce)?(Cl=new Vs(ke,re,ce),$l=null,"double"):($l=new Vs(ke,re,ce),Cl=null,"single")}function El(re){var ce=this,ke=ce.display;if(!(mn(ce,re)||ke.activeTouch&&ke.input.supportsTouch())){if(ke.input.ensurePolled(),ke.shift=re.shiftKey,Ps(ke,re)){de||(ke.scroller.draggable=!1,setTimeout(function(){return ke.scroller.draggable=!0},100));return}if(!op(ce,re)){var Pe=Us(ce,re),je=ro(re),tt=Pe?ph(Pe,je):"single";window.focus(),je==1&&ce.state.selectingText&&ce.state.selectingText(re),!(Pe&&gh(ce,je,Pe,tt,re))&&(je==1?Pe?nf(ce,Pe,tt,re):no(re)==ke.scroller&&fr(re):je==2?(Pe&&ia(ce.doc,Pe),setTimeout(function(){return ke.input.focus()},20)):je==3&&(Se?ce.display.input.onContextMenu(re):La(ce)))}}}function gh(re,ce,ke,Pe,je){var tt="Click";return Pe=="double"?tt="Double"+tt:Pe=="triple"&&(tt="Triple"+tt),tt=(ce==1?"Left":ce==2?"Middle":"Right")+tt,rc(re,bd(tt,je),je,function(mt){if(typeof mt=="string"&&(mt=fh[mt]),!mt)return!1;var Nt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Nt=mt(re,ke)!=wt}finally{re.state.suppressEdits=!1}return Nt})}function ic(re,ce,ke){var Pe=re.getOption("configureMouse"),je=Pe?Pe(re,ce,ke):{};if(je.unit==null){var tt=ie?ke.shiftKey&&ke.metaKey:ke.altKey;je.unit=tt?"rectangle":ce=="single"?"char":ce=="double"?"word":"line"}return(je.extend==null||re.doc.extend)&&(je.extend=re.doc.extend||ke.shiftKey),je.addNew==null&&(je.addNew=oe?ke.metaKey:ke.ctrlKey),je.moveOnDrag==null&&(je.moveOnDrag=!(oe?ke.altKey:ke.ctrlKey)),je}function nf(re,ce,ke,Pe){Ie?setTimeout(gt(ra,re),0):re.curOp.focus=We();var je=ic(re,ke,Pe),tt=re.doc.sel,mt;re.options.dragDrop&&io&&!re.isReadOnly()&&ke=="single"&&(mt=tt.contains(ce))>-1&&(vr((mt=tt.ranges[mt]).from(),ce)<0||ce.xRel>0)&&(vr(mt.to(),ce)>0||ce.xRel<0)?eg(re,Pe,ce,je):n0(re,Pe,ce,je)}function eg(re,ce,ke,Pe){var je=re.display,tt=!1,mt=ms(re,function(Bt){de&&(je.scroller.draggable=!1),re.state.draggingText=!1,On(je.wrapper.ownerDocument,"mouseup",mt),On(je.wrapper.ownerDocument,"mousemove",Nt),On(je.scroller,"dragstart",Lt),On(je.scroller,"drop",mt),tt||(fr(Bt),Pe.addNew||ia(re.doc,ke,null,null,Pe.extend),de&&!Te||Ie&&me==9?setTimeout(function(){je.wrapper.ownerDocument.body.focus({preventScroll:!0}),je.input.focus()},20):je.input.focus())}),Nt=function(Bt){tt=tt||Math.abs(ce.clientX-Bt.clientX)+Math.abs(ce.clientY-Bt.clientY)>=10},Lt=function(){return tt=!0};de&&(je.scroller.draggable=!0),re.state.draggingText=mt,mt.copy=!Pe.moveOnDrag,je.scroller.dragDrop&&je.scroller.dragDrop(),sn(je.wrapper.ownerDocument,"mouseup",mt),sn(je.wrapper.ownerDocument,"mousemove",Nt),sn(je.scroller,"dragstart",Lt),sn(je.scroller,"drop",mt),La(re),setTimeout(function(){return je.input.focus()},20)}function tg(re,ce,ke){if(ke=="char")return new lr(ce,ce);if(ke=="word")return re.findWordAt(ce);if(ke=="line")return new lr(Tn(ce.line,0),Lr(re.doc,Tn(ce.line+1,0)));var Pe=ke(re,ce);return new lr(Pe.from,Pe.to)}function n0(re,ce,ke,Pe){var je=re.display,tt=re.doc;fr(ce);var mt,Nt,Lt=tt.sel,Bt=Lt.ranges;if(Pe.addNew&&!Pe.extend?(Nt=tt.sel.contains(ke),Nt>-1?mt=Bt[Nt]:mt=new lr(ke,ke)):(mt=tt.sel.primary(),Nt=tt.sel.primIndex),Pe.unit=="rectangle")Pe.addNew||(mt=new lr(ke,ke)),ke=Us(re,ce,!0,!0),Nt=-1;else{var qt=tg(re,ke,Pe.unit);Pe.extend?mt=Io(mt,qt.anchor,qt.head,Pe.extend):mt=qt}Pe.addNew?Nt==-1?(Nt=Bt.length,Gr(tt,Pr(re,Bt.concat([mt]),Nt),{scroll:!1,origin:"*mouse"})):Bt.length>1&&Bt[Nt].empty()&&Pe.unit=="char"&&!Pe.extend?(Gr(tt,Pr(re,Bt.slice(0,Nt).concat(Bt.slice(Nt+1)),0),{scroll:!1,origin:"*mouse"}),Lt=tt.sel):ha(tt,Nt,mt,pt):(Nt=0,Gr(tt,new sr([mt],0),pt),Lt=tt.sel);var Ut=ke;function xn(Rr){if(vr(Ut,Rr)!=0)if(Ut=Rr,Pe.unit=="rectangle"){for(var ri=[],ji=re.options.tabSize,Dr=Ke(Cn(tt,ke.line).text,ke.ch,ji),so=Ke(Cn(tt,Rr.line).text,Rr.ch,ji),Na=Math.min(Dr,so),Ds=Math.max(Dr,so),Va=Math.min(ke.line,Rr.line),eu=Math.min(re.lastLine(),Math.max(ke.line,Rr.line));Va<=eu;Va++){var kl=Cn(tt,Va).text,Ts=Ct(kl,Na,ji);Na==Ds?ri.push(new lr(Tn(Va,Ts),Tn(Va,Ts))):kl.length>Ts&&ri.push(new lr(Tn(Va,Ts),Tn(Va,Ct(kl,Ds,ji))))}ri.length||ri.push(new lr(ke,ke)),Gr(tt,Pr(re,Lt.ranges.slice(0,Nt).concat(ri),Nt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Rr)}else{var lu=mt,fl=tg(re,Rr,Pe.unit),Ls=lu.anchor,Xo;vr(fl.anchor,Ls)>0?(Xo=fl.head,Ls=xr(lu.from(),fl.anchor)):(Xo=fl.anchor,Ls=zi(lu.to(),fl.head));var ts=Lt.ranges.slice(0);ts[Nt]=sm(re,new lr(Lr(tt,Ls),Xo)),Gr(tt,Pr(re,ts,Nt),pt)}}var gn=je.wrapper.getBoundingClientRect(),Jn=0;function er(Rr){var ri=++Jn,ji=Us(re,Rr,!0,Pe.unit=="rectangle");if(ji)if(vr(ji,Ut)!=0){re.curOp.focus=We(),xn(ji);var Dr=ho(je,tt);(ji.line>=Dr.to||ji.line<Dr.from)&&setTimeout(ms(re,function(){Jn==ri&&er(Rr)}),150)}else{var so=Rr.clientY<gn.top?-20:Rr.clientY>gn.bottom?20:0;so&&setTimeout(ms(re,function(){Jn==ri&&(je.scroller.scrollTop+=so,er(Rr))}),50)}}function hr(Rr){re.state.selectingText=!1,Jn=1/0,Rr&&(fr(Rr),je.input.focus()),On(je.wrapper.ownerDocument,"mousemove",kr),On(je.wrapper.ownerDocument,"mouseup",Yr),tt.history.lastSelOrigin=null}var kr=ms(re,function(Rr){Rr.buttons===0||!ro(Rr)?hr(Rr):er(Rr)}),Yr=ms(re,hr);re.state.selectingText=Yr,sn(je.wrapper.ownerDocument,"mousemove",kr),sn(je.wrapper.ownerDocument,"mouseup",Yr)}function sm(re,ce){var ke=ce.anchor,Pe=ce.head,je=Cn(re.doc,ke.line);if(vr(ke,Pe)==0&&ke.sticky==Pe.sticky)return ce;var tt=ln(je);if(!tt)return ce;var mt=jt(tt,ke.ch,ke.sticky),Nt=tt[mt];if(Nt.from!=ke.ch&&Nt.to!=ke.ch)return ce;var Lt=mt+(Nt.from==ke.ch==(Nt.level!=1)?0:1);if(Lt==0||Lt==tt.length)return ce;var Bt;if(Pe.line!=ke.line)Bt=(Pe.line-ke.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var qt=jt(tt,Pe.ch,Pe.sticky),Ut=qt-mt||(Pe.ch-ke.ch)*(Nt.level==1?-1:1);qt==Lt-1||qt==Lt?Bt=Ut<0:Bt=Ut>0}var xn=tt[Lt+(Bt?-1:0)],gn=Bt==(xn.level==1),Jn=gn?xn.from:xn.to,er=gn?"after":"before";return ke.ch==Jn&&ke.sticky==er?ce:new lr(new Tn(ke.line,Jn,er),Pe)}function ip(re,ce,ke,Pe){var je,tt;if(ce.touches)je=ce.touches[0].clientX,tt=ce.touches[0].clientY;else try{je=ce.clientX,tt=ce.clientY}catch(xn){return!1}if(je>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Pe&&fr(ce);var mt=re.display,Nt=mt.lineDiv.getBoundingClientRect();if(tt>Nt.bottom||!Sn(re,ke))return mr(ce);tt-=Nt.top-mt.viewOffset;for(var Lt=0;Lt<re.display.gutterSpecs.length;++Lt){var Bt=mt.gutters.childNodes[Lt];if(Bt&&Bt.getBoundingClientRect().right>=je){var qt=ir(re.doc,tt),Ut=re.display.gutterSpecs[Lt];return un(re,ke,re,qt,Ut.className,ce),mr(ce)}}}function op(re,ce){return ip(re,ce,"gutterClick",!0)}function ap(re,ce){Ps(re.display,ce)||lm(re,ce)||mn(re,ce,"contextmenu")||Se||re.display.input.onContextMenu(ce)}function lm(re,ce){return Sn(re,"gutterContextMenu")?ip(re,ce,"gutterContextMenu",!1):!1}function sp(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Zh(re)}var Pc={toString:function(){return"CodeMirror.Init"}},ng={},Cd={};function um(re){var ce=re.optionHandlers;function ke(Pe,je,tt,mt){re.defaults[Pe]=je,tt&&(ce[Pe]=mt?function(Nt,Lt,Bt){Bt!=Pc&&tt(Nt,Lt,Bt)}:tt)}re.defineOption=ke,re.Init=Pc,ke("value","",function(Pe,je){return Pe.setValue(je)},!0),ke("mode",null,function(Pe,je){Pe.doc.modeOption=je,or(Pe)},!0),ke("indentUnit",2,or,!0),ke("indentWithTabs",!1),ke("smartIndent",!0),ke("tabSize",4,function(Pe){ii(Pe),Zh(Pe),Ca(Pe)},!0),ke("lineSeparator",null,function(Pe,je){if(Pe.doc.lineSep=je,!!je){var tt=[],mt=Pe.doc.first;Pe.doc.iter(function(Lt){for(var Bt=0;;){var qt=Lt.text.indexOf(je,Bt);if(qt==-1)break;Bt=qt+je.length,tt.push(Tn(mt,qt))}mt++});for(var Nt=tt.length-1;Nt>=0;Nt--)qo(Pe.doc,je,tt[Nt],Tn(tt[Nt].line,tt[Nt].ch+je.length))}}),ke("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Pe,je,tt){Pe.state.specialChars=new RegExp(je.source+(je.test(" ")?"":"| "),"g"),tt!=Pc&&Pe.refresh()}),ke("specialCharPlaceholder",us,function(Pe){return Pe.refresh()},!0),ke("electricChars",!0),ke("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ke("spellcheck",!1,function(Pe,je){return Pe.getInputField().spellcheck=je},!0),ke("autocorrect",!1,function(Pe,je){return Pe.getInputField().autocorrect=je},!0),ke("autocapitalize",!1,function(Pe,je){return Pe.getInputField().autocapitalize=je},!0),ke("rtlMoveVisually",!le),ke("wholeLineUpdateBefore",!0),ke("theme","default",function(Pe){sp(Pe),Pn(Pe)},!0),ke("keyMap","default",function(Pe,je,tt){var mt=Pu(je),Nt=tt!=Pc&&Pu(tt);Nt&&Nt.detach&&Nt.detach(Pe,mt),mt.attach&&mt.attach(Pe,Nt||null)}),ke("extraKeys",null),ke("configureMouse",null),ke("lineWrapping",!1,hm,!0),ke("gutters",[],function(Pe,je){Pe.display.gutterSpecs=en(je,Pe.options.lineNumbers),Pn(Pe)},!0),ke("fixedGutter",!0,function(Pe,je){Pe.display.gutters.style.left=je?Sc(Pe.display)+"px":"0",Pe.refresh()},!0),ke("coverGutterNextToScrollbar",!1,function(Pe){return Th(Pe)},!0),ke("scrollbarStyle","native",function(Pe){tp(Pe),Th(Pe),Pe.display.scrollbars.setScrollTop(Pe.doc.scrollTop),Pe.display.scrollbars.setScrollLeft(Pe.doc.scrollLeft)},!0),ke("lineNumbers",!1,function(Pe,je){Pe.display.gutterSpecs=en(Pe.options.gutters,je),Pn(Pe)},!0),ke("firstLineNumber",1,Pn,!0),ke("lineNumberFormatter",function(Pe){return Pe},Pn,!0),ke("showCursorWhenSelecting",!1,gs,!0),ke("resetSelectionOnContextMenu",!0),ke("lineWiseCopyCut",!0),ke("pasteLinesPerSelection",!0),ke("selectionsMayTouch",!1),ke("readOnly",!1,function(Pe,je){je=="nocursor"&&(Qh(Pe),Pe.display.input.blur()),Pe.display.input.readOnlyChanged(je)}),ke("screenReaderLabel",null,function(Pe,je){je=je===""?null:je,Pe.display.input.screenReaderLabelChanged(je)}),ke("disableInput",!1,function(Pe,je){je||Pe.display.input.reset()},!0),ke("dragDrop",!0,lp),ke("allowDropFileTypes",null),ke("cursorBlinkRate",530),ke("cursorScrollMargin",0),ke("cursorHeight",1,gs,!0),ke("singleCursorHeightPerLine",!0,gs,!0),ke("workTime",100),ke("workDelay",100),ke("flattenSpans",!0,ii,!0),ke("addModeClass",!1,ii,!0),ke("pollInterval",100),ke("undoDepth",200,function(Pe,je){return Pe.doc.history.undoDepth=je}),ke("historyEventDelay",1250),ke("viewportMargin",10,function(Pe){return Pe.refresh()},!0),ke("maxHighlightLength",1e4,ii,!0),ke("moveInputWithCursor",!0,function(Pe,je){je||Pe.display.input.resetPosition()}),ke("tabindex",null,function(Pe,je){return Pe.display.input.getField().tabIndex=je||""}),ke("autofocus",null),ke("direction","ltr",function(Pe,je){return Pe.doc.setDirection(je)},!0),ke("phrases",null)}function lp(re,ce,ke){var Pe=ke&&ke!=Pc;if(!ce!=!Pe){var je=re.display.dragFunctions,tt=ce?sn:On;tt(re.display.scroller,"dragstart",je.start),tt(re.display.scroller,"dragenter",je.enter),tt(re.display.scroller,"dragover",je.over),tt(re.display.scroller,"dragleave",je.leave),tt(re.display.scroller,"drop",je.drop)}}function hm(re){re.options.lineWrapping?(Ue(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(De(re.display.wrapper,"CodeMirror-wrap"),Oo(re)),ni(re),Ca(re),Zh(re),setTimeout(function(){return Th(re)},100)}function Ko(re,ce){var ke=this;if(!(this instanceof Ko))return new Ko(re,ce);this.options=ce=ce?Et(ce):{},Et(ng,ce,!1);var Pe=ce.value;typeof Pe=="string"?Pe=new Pi(Pe,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(Pe.modeOption=ce.mode),this.doc=Pe;var je=new Ko.inputStyles[ce.inputStyle](this),tt=this.display=new Wn(re,Pe,je,ce);tt.wrapper.CodeMirror=this,sp(this),ce.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),tp(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 et,keySeq:null,specialChars:null},ce.autofocus&&!ee&&tt.input.focus(),Ie&&me<11&&setTimeout(function(){return ke.display.input.reset(!0)},20),Xf(this),Uo(),Lh(this),this.curOp.forceUpdate=!0,Kr(this,Pe),ce.autofocus&&!ee||this.hasFocus()?setTimeout(function(){ke.hasFocus()&&!ke.state.focused&&jo(ke)},20):Qh(this);for(var mt in Cd)Cd.hasOwnProperty(mt)&&Cd[mt](this,ce[mt],Pc);Rt(this),ce.finishInit&&ce.finishInit(this);for(var Nt=0;Nt<rf.length;++Nt)rf[Nt](this);Ah(this),de&&ce.lineWrapping&&getComputedStyle(tt.lineDiv).textRendering=="optimizelegibility"&&(tt.lineDiv.style.textRendering="auto")}Ko.defaults=ng,Ko.optionHandlers=Cd;function Xf(re){var ce=re.display;sn(ce.scroller,"mousedown",ms(re,El)),Ie&&me<11?sn(ce.scroller,"dblclick",ms(re,function(Lt){if(!mn(re,Lt)){var Bt=Us(re,Lt);if(!(!Bt||op(re,Lt)||Ps(re.display,Lt))){fr(Lt);var qt=re.findWordAt(Bt);ia(re.doc,qt.anchor,qt.head)}}})):sn(ce.scroller,"dblclick",function(Lt){return mn(re,Lt)||fr(Lt)}),sn(ce.scroller,"contextmenu",function(Lt){return ap(re,Lt)}),sn(ce.input.getField(),"contextmenu",function(Lt){ce.scroller.contains(Lt.target)||ap(re,Lt)});var ke,Pe={end:0};function je(){ce.activeTouch&&(ke=setTimeout(function(){return ce.activeTouch=null},1e3),Pe=ce.activeTouch,Pe.end=+new Date)}function tt(Lt){if(Lt.touches.length!=1)return!1;var Bt=Lt.touches[0];return Bt.radiusX<=1&&Bt.radiusY<=1}function mt(Lt,Bt){if(Bt.left==null)return!0;var qt=Bt.left-Lt.left,Ut=Bt.top-Lt.top;return qt*qt+Ut*Ut>20*20}sn(ce.scroller,"touchstart",function(Lt){if(!mn(re,Lt)&&!tt(Lt)&&!op(re,Lt)){ce.input.ensurePolled(),clearTimeout(ke);var Bt=+new Date;ce.activeTouch={start:Bt,moved:!1,prev:Bt-Pe.end<=300?Pe:null},Lt.touches.length==1&&(ce.activeTouch.left=Lt.touches[0].pageX,ce.activeTouch.top=Lt.touches[0].pageY)}}),sn(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),sn(ce.scroller,"touchend",function(Lt){var Bt=ce.activeTouch;if(Bt&&!Ps(ce,Lt)&&Bt.left!=null&&!Bt.moved&&new Date-Bt.start<300){var qt=re.coordsChar(ce.activeTouch,"page"),Ut;!Bt.prev||mt(Bt,Bt.prev)?Ut=new lr(qt,qt):!Bt.prev.prev||mt(Bt,Bt.prev.prev)?Ut=re.findWordAt(qt):Ut=new lr(Tn(qt.line,0),Lr(re.doc,Tn(qt.line+1,0))),re.setSelection(Ut.anchor,Ut.head),re.focus(),fr(Lt)}je()}),sn(ce.scroller,"touchcancel",je),sn(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(qh(re,ce.scroller.scrollTop),uh(re,ce.scroller.scrollLeft,!0),un(re,"scroll",re))}),sn(ce.scroller,"mousewheel",function(Lt){return wr(re,Lt)}),sn(ce.scroller,"DOMMouseScroll",function(Lt){return wr(re,Lt)}),sn(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(Lt){mn(re,Lt)||wi(Lt)},over:function(Lt){mn(re,Lt)||(po(re,Lt),wi(Lt))},start:function(Lt){return Bi(re,Lt)},drop:ms(re,bl),leave:function(Lt){mn(re,Lt)||Vi(re)}};var Nt=ce.input.getField();sn(Nt,"keyup",function(Lt){return Pl.call(re,Lt)}),sn(Nt,"keydown",ms(re,Vo)),sn(Nt,"keypress",ms(re,es)),sn(Nt,"focus",function(Lt){return jo(re,Lt)}),sn(Nt,"blur",function(Lt){return Qh(re,Lt)})}var rf=[];Ko.defineInitHook=function(re){return rf.push(re)};function Fs(re,ce,ke,Pe){var je=re.doc,tt;ke==null&&(ke="add"),ke=="smart"&&(je.mode.indent?tt=ga(re,ce).state:ke="prev");var mt=re.options.tabSize,Nt=Cn(je,ce),Lt=Ke(Nt.text,null,mt);Nt.stateAfter&&(Nt.stateAfter=null);var Bt=Nt.text.match(/^\s*/)[0],qt;if(!Pe&&!/\S/.test(Nt.text))qt=0,ke="not";else if(ke=="smart"&&(qt=je.mode.indent(tt,Nt.text.slice(Bt.length),Nt.text),qt==wt||qt>150)){if(!Pe)return;ke="prev"}ke=="prev"?ce>je.first?qt=Ke(Cn(je,ce-1).text,null,mt):qt=0:ke=="add"?qt=Lt+re.options.indentUnit:ke=="subtract"?qt=Lt-re.options.indentUnit:typeof ke=="number"&&(qt=Lt+ke),qt=Math.max(0,qt);var Ut="",xn=0;if(re.options.indentWithTabs)for(var gn=Math.floor(qt/mt);gn;--gn)xn+=mt,Ut+=" ";if(xn<qt&&(Ut+=yt(qt-xn)),Ut!=Bt)return qo(je,Ut,Tn(ce,0),Tn(ce,Bt.length),"+input"),Nt.stateAfter=null,!0;for(var Jn=0;Jn<je.sel.ranges.length;Jn++){var er=je.sel.ranges[Jn];if(er.head.line==ce&&er.head.ch<Bt.length){var hr=Tn(ce,Bt.length);ha(je,Jn,new lr(hr,hr));break}}}var ql=null;function of(re){ql=re}function Ed(re,ce,ke,Pe,je){var tt=re.doc;re.display.shift=!1,Pe||(Pe=tt.sel);var mt=+new Date-200,Nt=je=="paste"||re.state.pasteIncoming>mt,Lt=bn(ce),Bt=null;if(Nt&&Pe.ranges.length>1)if(ql&&ql.text.join(`
`)==ce){if(Pe.ranges.length%ql.text.length==0){Bt=[];for(var qt=0;qt<ql.text.length;qt++)Bt.push(tt.splitLines(ql.text[qt]))}}else Lt.length==Pe.ranges.length&&re.options.pasteLinesPerSelection&&(Bt=St(Lt,function(kr){return[kr]}));for(var Ut=re.curOp.updateInput,xn=Pe.ranges.length-1;xn>=0;xn--){var gn=Pe.ranges[xn],Jn=gn.from(),er=gn.to();gn.empty()&&(ke&&ke>0?Jn=Tn(Jn.line,Jn.ch-ke):re.state.overwrite&&!Nt?er=Tn(er.line,Math.min(Cn(tt,er.line).text.length,er.ch+Tt(Lt).length)):Nt&&ql&&ql.lineWise&&ql.text.join(`
`)==Lt.join(`
`)&&(Jn=er=Tn(Jn.line,0)));var hr={from:Jn,to:er,text:Bt?Bt[xn%Bt.length]:Lt,origin:je||(Nt?"paste":re.state.cutIncoming>mt?"cut":"+input")};oa(re.doc,hr),yr(re,"inputRead",re,hr)}ce&&!Nt&&ig(re,ce),lh(re),re.curOp.updateInput<2&&(re.curOp.updateInput=Ut),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function rg(re,ce){var ke=re.clipboardData&&re.clipboardData.getData("Text");if(ke)return re.preventDefault(),!ce.isReadOnly()&&!ce.options.disableInput&&Ro(ce,function(){return Ed(ce,ke,0,null,"paste")}),!0}function ig(re,ce){if(!(!re.options.electricChars||!re.options.smartIndent))for(var ke=re.doc.sel,Pe=ke.ranges.length-1;Pe>=0;Pe--){var je=ke.ranges[Pe];if(!(je.head.ch>100||Pe&&ke.ranges[Pe-1].head.line==je.head.line)){var tt=re.getModeAt(je.head),mt=!1;if(tt.electricChars){for(var Nt=0;Nt<tt.electricChars.length;Nt++)if(ce.indexOf(tt.electricChars.charAt(Nt))>-1){mt=Fs(re,je.head.line,"smart");break}}else tt.electricInput&&tt.electricInput.test(Cn(re.doc,je.head.line).text.slice(0,je.head.ch))&&(mt=Fs(re,je.head.line,"smart"));mt&&yr(re,"electricInput",re,je.head.line)}}}function og(re){for(var ce=[],ke=[],Pe=0;Pe<re.doc.sel.ranges.length;Pe++){var je=re.doc.sel.ranges[Pe].head.line,tt={anchor:Tn(je,0),head:Tn(je+1,0)};ke.push(tt),ce.push(re.getRange(tt.anchor,tt.head))}return{text:ce,ranges:ke}}function ag(re,ce,ke,Pe){re.setAttribute("autocorrect",ke?"":"off"),re.setAttribute("autocapitalize",Pe?"":"off"),re.setAttribute("spellcheck",!!ce)}function sg(){var re=Oe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ce=Oe("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return de?re.style.width="1000px":re.setAttribute("wrap","off"),fe&&(re.style.border="1px solid black"),ag(re),ce}function Cc(re){var ce=re.optionHandlers,ke=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Pe,je){var tt=this.options,mt=tt[Pe];tt[Pe]==je&&Pe!="mode"||(tt[Pe]=je,ce.hasOwnProperty(Pe)&&ms(this,ce[Pe])(this,je,mt),un(this,"optionChange",this,Pe))},getOption:function(Pe){return this.options[Pe]},getDoc:function(){return this.doc},addKeyMap:function(Pe,je){this.state.keyMaps[je?"push":"unshift"](Pu(Pe))},removeKeyMap:function(Pe){for(var je=this.state.keyMaps,tt=0;tt<je.length;++tt)if(je[tt]==Pe||je[tt].name==Pe)return je.splice(tt,1),!0},addOverlay:vs(function(Pe,je){var tt=Pe.token?Pe:re.getMode(this.options,Pe);if(tt.startState)throw new Error("Overlays may not be stateful.");nt(this.state.overlays,{mode:tt,modeSpec:Pe,opaque:je&&je.opaque,priority:je&&je.priority||0},function(mt){return mt.priority}),this.state.modeGen++,Ca(this)}),removeOverlay:vs(function(Pe){for(var je=this.state.overlays,tt=0;tt<je.length;++tt){var mt=je[tt].modeSpec;if(mt==Pe||typeof Pe=="string"&&mt.name==Pe){je.splice(tt,1),this.state.modeGen++,Ca(this);return}}}),indentLine:vs(function(Pe,je,tt){typeof je!="string"&&typeof je!="number"&&(je==null?je=this.options.smartIndent?"smart":"prev":je=je?"add":"subtract"),Nr(this.doc,Pe)&&Fs(this,Pe,je,tt)}),indentSelection:vs(function(Pe){for(var je=this.doc.sel.ranges,tt=-1,mt=0;mt<je.length;mt++){var Nt=je[mt];if(Nt.empty())Nt.head.line>tt&&(Fs(this,Nt.head.line,Pe,!0),tt=Nt.head.line,mt==this.doc.sel.primIndex&&lh(this));else{var Lt=Nt.from(),Bt=Nt.to(),qt=Math.max(tt,Lt.line);tt=Math.min(this.lastLine(),Bt.line-(Bt.ch?0:1))+1;for(var Ut=qt;Ut<tt;++Ut)Fs(this,Ut,Pe);var xn=this.doc.sel.ranges;Lt.ch==0&&je.length==xn.length&&xn[mt].from().ch>0&&ha(this.doc,mt,new lr(Lt,xn[mt].to()),ht)}}}),getTokenAt:function(Pe,je){return Fo(this,Pe,je)},getLineTokens:function(Pe,je){return Fo(this,Tn(Pe),je,!0)},getTokenTypeAt:function(Pe){Pe=Lr(this.doc,Pe);var je=Aa(this,Cn(this.doc,Pe.line)),tt=0,mt=(je.length-1)/2,Nt=Pe.ch,Lt;if(Nt==0)Lt=je[2];else for(;;){var Bt=tt+mt>>1;if((Bt?je[Bt*2-1]:0)>=Nt)mt=Bt;else if(je[Bt*2+1]<Nt)tt=Bt+1;else{Lt=je[Bt*2+2];break}}var qt=Lt?Lt.indexOf("overlay "):-1;return qt<0?Lt:qt==0?null:Lt.slice(0,qt-1)},getModeAt:function(Pe){var je=this.doc.mode;return je.innerMode?re.innerMode(je,this.getTokenAt(Pe).state).mode:je},getHelper:function(Pe,je){return this.getHelpers(Pe,je)[0]},getHelpers:function(Pe,je){var tt=[];if(!ke.hasOwnProperty(je))return tt;var mt=ke[je],Nt=this.getModeAt(Pe);if(typeof Nt[je]=="string")mt[Nt[je]]&&tt.push(mt[Nt[je]]);else if(Nt[je])for(var Lt=0;Lt<Nt[je].length;Lt++){var Bt=mt[Nt[je][Lt]];Bt&&tt.push(Bt)}else Nt.helperType&&mt[Nt.helperType]?tt.push(mt[Nt.helperType]):mt[Nt.name]&&tt.push(mt[Nt.name]);for(var qt=0;qt<mt._global.length;qt++){var Ut=mt._global[qt];Ut.pred(Nt,this)&&$e(tt,Ut.val)==-1&&tt.push(Ut.val)}return tt},getStateAfter:function(Pe,je){var tt=this.doc;return Pe=gr(tt,Pe==null?tt.first+tt.size-1:Pe),ga(this,Pe+1,je).state},cursorCoords:function(Pe,je){var tt,mt=this.doc.sel.primary();return Pe==null?tt=mt.head:typeof Pe=="object"?tt=Lr(this.doc,Pe):tt=Pe?mt.from():mt.to(),ua(this,tt,je||"page")},charCoords:function(Pe,je){return Xu(this,Lr(this.doc,Pe),je||"page")},coordsChar:function(Pe,je){return Pe=Af(this,Pe,je||"page"),jf(this,Pe.left,Pe.top)},lineAtHeight:function(Pe,je){return Pe=Af(this,{top:Pe,left:0},je||"page").top,ir(this.doc,Pe+this.display.viewOffset)},heightAtLine:function(Pe,je,tt){var mt=!1,Nt;if(typeof Pe=="number"){var Lt=this.doc.first+this.doc.size-1;Pe<this.doc.first?Pe=this.doc.first:Pe>Lt&&(Pe=Lt,mt=!0),Nt=Cn(this.doc,Pe)}else Nt=Pe;return ps(this,Nt,{top:0,left:0},je||"page",tt||mt).top+(mt?this.doc.height-So(Nt):0)},defaultTextHeight:function(){return Yu(this.display)},defaultCharWidth:function(){return Ou(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Pe,je,tt,mt,Nt){var Lt=this.display;Pe=ua(this,Lr(this.doc,Pe));var Bt=Pe.bottom,qt=Pe.left;if(je.style.position="absolute",je.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(je),Lt.sizer.appendChild(je),mt=="over")Bt=Pe.top;else if(mt=="above"||mt=="near"){var Ut=Math.max(Lt.wrapper.clientHeight,this.doc.height),xn=Math.max(Lt.sizer.clientWidth,Lt.lineSpace.clientWidth);(mt=="above"||Pe.bottom+je.offsetHeight>Ut)&&Pe.top>je.offsetHeight?Bt=Pe.top-je.offsetHeight:Pe.bottom+je.offsetHeight<=Ut&&(Bt=Pe.bottom),qt+je.offsetWidth>xn&&(qt=xn-je.offsetWidth)}je.style.top=Bt+"px",je.style.left=je.style.right="",Nt=="right"?(qt=Lt.sizer.clientWidth-je.offsetWidth,je.style.right="0px"):(Nt=="left"?qt=0:Nt=="middle"&&(qt=(Lt.sizer.clientWidth-je.offsetWidth)/2),je.style.left=qt+"px"),tt&&$c(this,{left:qt,top:Bt,right:qt+je.offsetWidth,bottom:Bt+je.offsetHeight})},triggerOnKeyDown:vs(Vo),triggerOnKeyPress:vs(es),triggerOnKeyUp:Pl,triggerOnMouseDown:vs(El),execCommand:function(Pe){if(fh.hasOwnProperty(Pe))return fh[Pe].call(null,this)},triggerElectric:vs(function(Pe){ig(this,Pe)}),findPosH:function(Pe,je,tt,mt){var Nt=1;je<0&&(Nt=-1,je=-je);for(var Lt=Lr(this.doc,Pe),Bt=0;Bt<je&&(Lt=kd(this.doc,Lt,Nt,tt,mt),!Lt.hitSide);++Bt);return Lt},moveH:vs(function(Pe,je){var tt=this;this.extendSelectionsBy(function(mt){return tt.display.shift||tt.doc.extend||mt.empty()?kd(tt.doc,mt.head,Pe,je,tt.options.rtlMoveVisually):Pe<0?mt.from():mt.to()},ct)}),deleteH:vs(function(Pe,je){var tt=this.doc.sel,mt=this.doc;tt.somethingSelected()?mt.replaceSelection("",null,"+delete"):Il(this,function(Nt){var Lt=kd(mt,Nt.head,Pe,je,!1);return Pe<0?{from:Lt,to:Nt.head}:{from:Nt.head,to:Lt}})}),findPosV:function(Pe,je,tt,mt){var Nt=1,Lt=mt;je<0&&(Nt=-1,je=-je);for(var Bt=Lr(this.doc,Pe),qt=0;qt<je;++qt){var Ut=ua(this,Bt,"div");if(Lt==null?Lt=Ut.left:Ut.left=Lt,Bt=Ec(this,Ut,Nt,tt),Bt.hitSide)break}return Bt},moveV:vs(function(Pe,je){var tt=this,mt=this.doc,Nt=[],Lt=!this.display.shift&&!mt.extend&&mt.sel.somethingSelected();if(mt.extendSelectionsBy(function(qt){if(Lt)return Pe<0?qt.from():qt.to();var Ut=ua(tt,qt.head,"div");qt.goalColumn!=null&&(Ut.left=qt.goalColumn),Nt.push(Ut.left);var xn=Ec(tt,Ut,Pe,je);return je=="page"&&qt==mt.sel.primary()&&If(tt,Xu(tt,xn,"div").top-Ut.top),xn},ct),Nt.length)for(var Bt=0;Bt<mt.sel.ranges.length;Bt++)mt.sel.ranges[Bt].goalColumn=Nt[Bt]}),findWordAt:function(Pe){var je=this.doc,tt=Cn(je,Pe.line).text,mt=Pe.ch,Nt=Pe.ch;if(tt){var Lt=this.getHelper(Pe,"wordChars");(Pe.sticky=="before"||Nt==tt.length)&&mt?--mt:++Nt;for(var Bt=tt.charAt(mt),qt=rt(Bt,Lt)?function(Ut){return rt(Ut,Lt)}:/\s/.test(Bt)?function(Ut){return/\s/.test(Ut)}:function(Ut){return!/\s/.test(Ut)&&!rt(Ut)};mt>0&&qt(tt.charAt(mt-1));)--mt;for(;Nt<tt.length&&qt(tt.charAt(Nt));)++Nt}return new lr(Tn(Pe.line,mt),Tn(Pe.line,Nt))},toggleOverwrite:function(Pe){Pe!=null&&Pe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ue(this.display.cursorDiv,"CodeMirror-overwrite"):De(this.display.cursorDiv,"CodeMirror-overwrite"),un(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==We()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:vs(function(Pe,je){$h(this,Pe,je)}),getScrollInfo:function(){var Pe=this.display.scroller;return{left:Pe.scrollLeft,top:Pe.scrollTop,height:Pe.scrollHeight-Fl(this)-this.display.barHeight,width:Pe.scrollWidth-Fl(this)-this.display.barWidth,clientHeight:Xc(this),clientWidth:yu(this)}},scrollIntoView:vs(function(Pe,je){Pe==null?(Pe={from:this.doc.sel.primary().head,to:null},je==null&&(je=this.options.cursorScrollMargin)):typeof Pe=="number"?Pe={from:Tn(Pe,0),to:null}:Pe.from==null&&(Pe={from:Pe,to:null}),Pe.to||(Pe.to=Pe.from),Pe.margin=je||0,Pe.from.line!=null?Fr(this,Pe):Bf(this,Pe.from,Pe.to,Pe.margin)}),setSize:vs(function(Pe,je){var tt=this,mt=function(Lt){return typeof Lt=="number"||/^\d+$/.test(String(Lt))?Lt+"px":Lt};Pe!=null&&(this.display.wrapper.style.width=mt(Pe)),je!=null&&(this.display.wrapper.style.height=mt(je)),this.options.lineWrapping&&Jc(this);var Nt=this.display.viewFrom;this.doc.iter(Nt,this.display.viewTo,function(Lt){if(Lt.widgets){for(var Bt=0;Bt<Lt.widgets.length;Bt++)if(Lt.widgets[Bt].noHScroll){Wi(tt,Nt,"widget");break}}++Nt}),this.curOp.forceUpdate=!0,un(this,"refresh",this)}),operation:function(Pe){return Ro(this,Pe)},startOperation:function(){return Lh(this)},endOperation:function(){return Ah(this)},refresh:vs(function(){var Pe=this.display.cachedTextHeight;Ca(this),this.curOp.forceUpdate=!0,Zh(this),$h(this,this.doc.scrollLeft,this.doc.scrollTop),ut(this.display),(Pe==null||Math.abs(Pe-Yu(this.display))>.5||this.options.lineWrapping)&&ni(this),un(this,"refresh",this)}),swapDoc:vs(function(Pe){var je=this.doc;return je.cm=null,this.state.selectingText&&this.state.selectingText(),Kr(this,Pe),Zh(this),this.display.input.reset(),$h(this,Pe.scrollLeft,Pe.scrollTop),this.curOp.forceScroll=!0,yr(this,"swapDoc",this,je),je}),phrase:function(Pe){var je=this.options.phrases;return je&&Object.prototype.hasOwnProperty.call(je,Pe)?je[Pe]:Pe},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}},Dn(re),re.registerHelper=function(Pe,je,tt){ke.hasOwnProperty(Pe)||(ke[Pe]=re[Pe]={_global:[]}),ke[Pe][je]=tt},re.registerGlobalHelper=function(Pe,je,tt,mt){re.registerHelper(Pe,je,mt),ke[Pe]._global.push({pred:tt,val:mt})}}function kd(re,ce,ke,Pe,je){var tt=ce,mt=ke,Nt=Cn(re,ce.line),Lt=je&&re.direction=="rtl"?-ke:ke;function Bt(){var Yr=ce.line+Lt;return Yr<re.first||Yr>=re.first+re.size?!1:(ce=new Tn(Yr,ce.ch,ce.sticky),Nt=Cn(re,Yr))}function qt(Yr){var Rr;if(Pe=="codepoint"){var ri=Nt.text.charCodeAt(ce.ch+(Pe>0?0:-1));isNaN(ri)?Rr=null:Rr=new Tn(ce.line,Math.max(0,Math.min(Nt.text.length,ce.ch+ke*(ri>=55296&&ri<56320?2:1))),-ke)}else je?Rr=Uf(re.cm,Nt,ce,ke):Rr=qa(Nt,ce,ke);if(Rr==null)if(!Yr&&Bt())ce=ef(je,re.cm,Nt,ce.line,Lt);else return!1;else ce=Rr;return!0}if(Pe=="char"||Pe=="codepoint")qt();else if(Pe=="column")qt(!0);else if(Pe=="word"||Pe=="group")for(var Ut=null,xn=Pe=="group",gn=re.cm&&re.cm.getHelper(ce,"wordChars"),Jn=!0;!(ke<0&&!qt(!Jn));Jn=!1){var er=Nt.text.charAt(ce.ch)||`
`,hr=rt(er,gn)?"w":xn&&er==`
`?"n":!xn||/\s/.test(er)?null:"p";if(xn&&!Jn&&!hr&&(hr="s"),Ut&&Ut!=hr){ke<0&&(ke=1,qt(),ce.sticky="after");break}if(hr&&(Ut=hr),ke>0&&!qt(!Jn))break}var kr=ca(re,ce,tt,mt,!0);return yi(tt,kr)&&(kr.hitSide=!0),kr}function Ec(re,ce,ke,Pe){var je=re.doc,tt=ce.left,mt;if(Pe=="page"){var Nt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Lt=Math.max(Nt-.5*Yu(re.display),3);mt=(ke>0?ce.bottom:ce.top)+ke*Lt}else Pe=="line"&&(mt=ke>0?ce.bottom+3:ce.top-3);for(var Bt;Bt=jf(re,tt,mt),!!Bt.outside;){if(ke<0?mt<=0:mt>=je.height){Bt.hitSide=!0;break}mt+=ke*5}return Bt}var ya=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new et,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ya.prototype.init=function(re){var ce=this,ke=this,Pe=ke.cm,je=ke.div=re.lineDiv;ag(je,Pe.options.spellcheck,Pe.options.autocorrect,Pe.options.autocapitalize);function tt(Nt){for(var Lt=Nt.target;Lt;Lt=Lt.parentNode){if(Lt==je)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Lt.className))break}return!1}sn(je,"paste",function(Nt){!tt(Nt)||mn(Pe,Nt)||rg(Nt,Pe)||me<=11&&setTimeout(ms(Pe,function(){return ce.updateFromDOM()}),20)}),sn(je,"compositionstart",function(Nt){ce.composing={data:Nt.data,done:!1}}),sn(je,"compositionupdate",function(Nt){ce.composing||(ce.composing={data:Nt.data,done:!1})}),sn(je,"compositionend",function(Nt){ce.composing&&(Nt.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),sn(je,"touchstart",function(){return ke.forceCompositionEnd()}),sn(je,"input",function(){ce.composing||ce.readFromDOMSoon()});function mt(Nt){if(!(!tt(Nt)||mn(Pe,Nt))){if(Pe.somethingSelected())of({lineWise:!1,text:Pe.getSelections()}),Nt.type=="cut"&&Pe.replaceSelection("",null,"cut");else if(Pe.options.lineWiseCopyCut){var Lt=og(Pe);of({lineWise:!0,text:Lt.text}),Nt.type=="cut"&&Pe.operation(function(){Pe.setSelections(Lt.ranges,0,ht),Pe.replaceSelection("",null,"cut")})}else return;if(Nt.clipboardData){Nt.clipboardData.clearData();var Bt=ql.text.join(`
`);if(Nt.clipboardData.setData("Text",Bt),Nt.clipboardData.getData("Text")==Bt){Nt.preventDefault();return}}var qt=sg(),Ut=qt.firstChild;Pe.display.lineSpace.insertBefore(qt,Pe.display.lineSpace.firstChild),Ut.value=ql.text.join(`
`);var xn=document.activeElement;dt(Ut),setTimeout(function(){Pe.display.lineSpace.removeChild(qt),xn.focus(),xn==je&&ke.showPrimarySelection()},50)}}sn(je,"copy",mt),sn(je,"cut",mt)},ya.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},ya.prototype.prepareSelection=function(){var re=Mh(this.cm,!1);return re.focus=document.activeElement==this.div,re},ya.prototype.showSelection=function(re,ce){!re||!this.cm.display.view.length||((re.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(re))},ya.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ya.prototype.showPrimarySelection=function(){var re=this.getSelection(),ce=this.cm,ke=ce.doc.sel.primary(),Pe=ke.from(),je=ke.to();if(ce.display.viewTo==ce.display.viewFrom||Pe.line>=ce.display.viewTo||je.line<ce.display.viewFrom){re.removeAllRanges();return}var tt=Md(ce,re.anchorNode,re.anchorOffset),mt=Md(ce,re.focusNode,re.focusOffset);if(!(tt&&!tt.bad&&mt&&!mt.bad&&vr(xr(tt,mt),Pe)==0&&vr(zi(tt,mt),je)==0)){var Nt=ce.display.view,Lt=Pe.line>=ce.display.viewFrom&&up(ce,Pe)||{node:Nt[0].measure.map[2],offset:0},Bt=je.line<ce.display.viewTo&&up(ce,je);if(!Bt){var qt=Nt[Nt.length-1].measure,Ut=qt.maps?qt.maps[qt.maps.length-1]:qt.map;Bt={node:Ut[Ut.length-1],offset:Ut[Ut.length-2]-Ut[Ut.length-3]}}if(!Lt||!Bt){re.removeAllRanges();return}var xn=re.rangeCount&&re.getRangeAt(0),gn;try{gn=He(Lt.node,Lt.offset,Bt.offset,Bt.node)}catch(Jn){}gn&&(!ot&&ce.state.focused?(re.collapse(Lt.node,Lt.offset),gn.collapsed||(re.removeAllRanges(),re.addRange(gn))):(re.removeAllRanges(),re.addRange(gn)),xn&&re.anchorNode==null?re.addRange(xn):ot&&this.startGracePeriod()),this.rememberSelection()}},ya.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},ya.prototype.showMultipleSelections=function(re){Ae(this.cm.display.cursorDiv,re.cursors),Ae(this.cm.display.selectionDiv,re.selection)},ya.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},ya.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var ce=re.getRangeAt(0).commonAncestorContainer;return Ye(this.div,ce)},ya.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ya.prototype.blur=function(){this.div.blur()},ya.prototype.getField=function(){return this.div},ya.prototype.supportsTouch=function(){return!0},ya.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():Ro(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function ce(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,ce))}this.polling.set(this.cm.options.pollInterval,ce)},ya.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},ya.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),ce=this.cm;if(z&&we&&this.cm.display.gutterSpecs.length&&lg(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ke=Md(ce,re.anchorNode,re.anchorOffset),Pe=Md(ce,re.focusNode,re.focusOffset);ke&&Pe&&Ro(ce,function(){Gr(ce.doc,br(ke,Pe),ht),(ke.bad||Pe.bad)&&(ce.curOp.selectionChanged=!0)})}}},ya.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,ce=re.display,ke=re.doc.sel.primary(),Pe=ke.from(),je=ke.to();if(Pe.ch==0&&Pe.line>re.firstLine()&&(Pe=Tn(Pe.line-1,Cn(re.doc,Pe.line-1).length)),je.ch==Cn(re.doc,je.line).text.length&&je.line<re.lastLine()&&(je=Tn(je.line+1,0)),Pe.line<ce.viewFrom||je.line>ce.viewTo-1)return!1;var tt,mt,Nt;Pe.line==ce.viewFrom||(tt=Os(re,Pe.line))==0?(mt=Zt(ce.view[0].line),Nt=ce.view[0].node):(mt=Zt(ce.view[tt].line),Nt=ce.view[tt-1].node.nextSibling);var Lt=Os(re,je.line),Bt,qt;if(Lt==ce.view.length-1?(Bt=ce.viewTo-1,qt=ce.lineDiv.lastChild):(Bt=Zt(ce.view[Lt+1].line)-1,qt=ce.view[Lt+1].node.previousSibling),!Nt)return!1;for(var Ut=re.doc.splitLines(Zf(re,Nt,qt,mt,Bt)),xn=dr(re.doc,Tn(mt,0),Tn(Bt,Cn(re.doc,Bt).text.length));Ut.length>1&&xn.length>1;)if(Tt(Ut)==Tt(xn))Ut.pop(),xn.pop(),Bt--;else if(Ut[0]==xn[0])Ut.shift(),xn.shift(),mt++;else break;for(var gn=0,Jn=0,er=Ut[0],hr=xn[0],kr=Math.min(er.length,hr.length);gn<kr&&er.charCodeAt(gn)==hr.charCodeAt(gn);)++gn;for(var Yr=Tt(Ut),Rr=Tt(xn),ri=Math.min(Yr.length-(Ut.length==1?gn:0),Rr.length-(xn.length==1?gn:0));Jn<ri&&Yr.charCodeAt(Yr.length-Jn-1)==Rr.charCodeAt(Rr.length-Jn-1);)++Jn;if(Ut.length==1&&xn.length==1&&mt==Pe.line)for(;gn&&gn>Pe.ch&&Yr.charCodeAt(Yr.length-Jn-1)==Rr.charCodeAt(Rr.length-Jn-1);)gn--,Jn++;Ut[Ut.length-1]=Yr.slice(0,Yr.length-Jn).replace(/^\u200b+/,""),Ut[0]=Ut[0].slice(gn).replace(/\u200b+$/,"");var ji=Tn(mt,gn),Dr=Tn(Bt,xn.length?Tt(xn).length-Jn:0);if(Ut.length>1||Ut[0]||vr(ji,Dr))return qo(re.doc,Ut,ji,Dr,"+input"),!0},ya.prototype.ensurePolled=function(){this.forceCompositionEnd()},ya.prototype.reset=function(){this.forceCompositionEnd()},ya.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ya.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},ya.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&Ro(this.cm,function(){return Ca(re.cm)})},ya.prototype.setUneditable=function(re){re.contentEditable="false"},ya.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||ms(this.cm,Ed)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},ya.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},ya.prototype.onContextMenu=function(){},ya.prototype.resetPosition=function(){},ya.prototype.needsContentAttribute=!0;function up(re,ce){var ke=Vu(re,ce.line);if(!ke||ke.hidden)return null;var Pe=Cn(re.doc,ce.line),je=Yc(ke,Pe,ce.line),tt=ln(Pe,re.doc.direction),mt="left";if(tt){var Nt=jt(tt,ce.ch);mt=Nt%2?"right":"left"}var Lt=Tf(je.map,ce.ch,mt);return Lt.offset=Lt.collapse=="right"?Lt.end:Lt.start,Lt}function lg(re){for(var ce=re;ce;ce=ce.parentNode)if(/CodeMirror-gutter-wrapper/.test(ce.className))return!0;return!1}function Yf(re,ce){return ce&&(re.bad=!0),re}function Zf(re,ce,ke,Pe,je){var tt="",mt=!1,Nt=re.doc.lineSeparator(),Lt=!1;function Bt(gn){return function(Jn){return Jn.id==gn}}function qt(){mt&&(tt+=Nt,Lt&&(tt+=Nt),mt=Lt=!1)}function Ut(gn){gn&&(qt(),tt+=gn)}function xn(gn){if(gn.nodeType==1){var Jn=gn.getAttribute("cm-text");if(Jn){Ut(Jn);return}var er=gn.getAttribute("cm-marker"),hr;if(er){var kr=re.findMarks(Tn(Pe,0),Tn(je+1,0),Bt(+er));kr.length&&(hr=kr[0].find(0))&&Ut(dr(re.doc,hr.from,hr.to).join(Nt));return}if(gn.getAttribute("contenteditable")=="false")return;var Yr=/^(pre|div|p|li|table|br)$/i.test(gn.nodeName);if(!/^br$/i.test(gn.nodeName)&&gn.textContent.length==0)return;Yr&&qt();for(var Rr=0;Rr<gn.childNodes.length;Rr++)xn(gn.childNodes[Rr]);/^(pre|p)$/i.test(gn.nodeName)&&(Lt=!0),Yr&&(mt=!0)}else gn.nodeType==3&&Ut(gn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;xn(ce),ce!=ke;)ce=ce.nextSibling,Lt=!1;return tt}function Md(re,ce,ke){var Pe;if(ce==re.display.lineDiv){if(Pe=re.display.lineDiv.childNodes[ke],!Pe)return Yf(re.clipPos(Tn(re.display.viewTo-1)),!0);ce=null,ke=0}else for(Pe=ce;;Pe=Pe.parentNode){if(!Pe||Pe==re.display.lineDiv)return null;if(Pe.parentNode&&Pe.parentNode==re.display.lineDiv)break}for(var je=0;je<re.display.view.length;je++){var tt=re.display.view[je];if(tt.node==Pe)return cm(tt,ce,ke)}}function cm(re,ce,ke){var Pe=re.text.firstChild,je=!1;if(!ce||!Ye(Pe,ce))return Yf(Tn(Zt(re.line),0),!0);if(ce==Pe&&(je=!0,ce=Pe.childNodes[ke],ke=0,!ce)){var tt=re.rest?Tt(re.rest):re.line;return Yf(Tn(Zt(tt),tt.text.length),je)}var mt=ce.nodeType==3?ce:null,Nt=ce;for(!mt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(mt=ce.firstChild,ke&&(ke=mt.nodeValue.length));Nt.parentNode!=Pe;)Nt=Nt.parentNode;var Lt=re.measure,Bt=Lt.maps;function qt(hr,kr,Yr){for(var Rr=-1;Rr<(Bt?Bt.length:0);Rr++)for(var ri=Rr<0?Lt.map:Bt[Rr],ji=0;ji<ri.length;ji+=3){var Dr=ri[ji+2];if(Dr==hr||Dr==kr){var so=Zt(Rr<0?re.line:re.rest[Rr]),Na=ri[ji]+Yr;return(Yr<0||Dr!=hr)&&(Na=ri[ji+(Yr?1:0)]),Tn(so,Na)}}}var Ut=qt(mt,Nt,ke);if(Ut)return Yf(Ut,je);for(var xn=Nt.nextSibling,gn=mt?mt.nodeValue.length-ke:0;xn;xn=xn.nextSibling){if(Ut=qt(xn,xn.firstChild,0),Ut)return Yf(Tn(Ut.line,Ut.ch-gn),je);gn+=xn.textContent.length}for(var Jn=Nt.previousSibling,er=ke;Jn;Jn=Jn.previousSibling){if(Ut=qt(Jn,Jn.firstChild,-1),Ut)return Yf(Tn(Ut.line,Ut.ch+er),je);er+=Jn.textContent.length}}var Ms=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new et,this.hasSelection=!1,this.composing=null};Ms.prototype.init=function(re){var ce=this,ke=this,Pe=this.cm;this.createField(re);var je=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),fe&&(je.style.width="0px"),sn(je,"input",function(){Ie&&me>=9&&ce.hasSelection&&(ce.hasSelection=null),ke.poll()}),sn(je,"paste",function(mt){mn(Pe,mt)||rg(mt,Pe)||(Pe.state.pasteIncoming=+new Date,ke.fastPoll())});function tt(mt){if(!mn(Pe,mt)){if(Pe.somethingSelected())of({lineWise:!1,text:Pe.getSelections()});else if(Pe.options.lineWiseCopyCut){var Nt=og(Pe);of({lineWise:!0,text:Nt.text}),mt.type=="cut"?Pe.setSelections(Nt.ranges,null,ht):(ke.prevInput="",je.value=Nt.text.join(`
`),dt(je))}else return;mt.type=="cut"&&(Pe.state.cutIncoming=+new Date)}}sn(je,"cut",tt),sn(je,"copy",tt),sn(re.scroller,"paste",function(mt){if(!(Ps(re,mt)||mn(Pe,mt))){if(!je.dispatchEvent){Pe.state.pasteIncoming=+new Date,ke.focus();return}var Nt=new Event("paste");Nt.clipboardData=mt.clipboardData,je.dispatchEvent(Nt)}}),sn(re.lineSpace,"selectstart",function(mt){Ps(re,mt)||fr(mt)}),sn(je,"compositionstart",function(){var mt=Pe.getCursor("from");ke.composing&&ke.composing.range.clear(),ke.composing={start:mt,range:Pe.markText(mt,Pe.getCursor("to"),{className:"CodeMirror-composing"})}}),sn(je,"compositionend",function(){ke.composing&&(ke.poll(),ke.composing.range.clear(),ke.composing=null)})},Ms.prototype.createField=function(re){this.wrapper=sg(),this.textarea=this.wrapper.firstChild},Ms.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Ms.prototype.prepareSelection=function(){var re=this.cm,ce=re.display,ke=re.doc,Pe=Mh(re);if(re.options.moveInputWithCursor){var je=ua(re,ke.sel.primary().head,"div"),tt=ce.wrapper.getBoundingClientRect(),mt=ce.lineDiv.getBoundingClientRect();Pe.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,je.top+mt.top-tt.top)),Pe.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,je.left+mt.left-tt.left))}return Pe},Ms.prototype.showSelection=function(re){var ce=this.cm,ke=ce.display;Ae(ke.cursorDiv,re.cursors),Ae(ke.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Ms.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var ce=this.cm;if(ce.somethingSelected()){this.prevInput="";var ke=ce.getSelection();this.textarea.value=ke,ce.state.focused&&dt(this.textarea),Ie&&me>=9&&(this.hasSelection=ke)}else re||(this.prevInput=this.textarea.value="",Ie&&me>=9&&(this.hasSelection=null))}},Ms.prototype.getField=function(){return this.textarea},Ms.prototype.supportsTouch=function(){return!1},Ms.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||We()!=this.textarea))try{this.textarea.focus()}catch(re){}},Ms.prototype.blur=function(){this.textarea.blur()},Ms.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ms.prototype.receivedFocus=function(){this.slowPoll()},Ms.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Ms.prototype.fastPoll=function(){var re=!1,ce=this;ce.pollingFast=!0;function ke(){var Pe=ce.poll();!Pe&&!re?(re=!0,ce.polling.set(60,ke)):(ce.pollingFast=!1,ce.slowPoll())}ce.polling.set(20,ke)},Ms.prototype.poll=function(){var re=this,ce=this.cm,ke=this.textarea,Pe=this.prevInput;if(this.contextMenuPending||!ce.state.focused||Ze(ke)&&!Pe&&!this.composing||ce.isReadOnly()||ce.options.disableInput||ce.state.keySeq)return!1;var je=ke.value;if(je==Pe&&!ce.somethingSelected())return!1;if(Ie&&me>=9&&this.hasSelection===je||oe&&/[\uf700-\uf7ff]/.test(je))return ce.display.input.reset(),!1;if(ce.doc.sel==ce.display.selForContextMenu){var tt=je.charCodeAt(0);if(tt==8203&&!Pe&&(Pe="\u200B"),tt==8666)return this.reset(),this.cm.execCommand("undo")}for(var mt=0,Nt=Math.min(Pe.length,je.length);mt<Nt&&Pe.charCodeAt(mt)==je.charCodeAt(mt);)++mt;return Ro(ce,function(){Ed(ce,je.slice(mt),Pe.length-mt,null,re.composing?"*compose":null),je.length>1e3||je.indexOf(`
`)>-1?ke.value=re.prevInput="":re.prevInput=je,re.composing&&(re.composing.range.clear(),re.composing.range=ce.markText(re.composing.start,ce.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ms.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ms.prototype.onKeyPress=function(){Ie&&me>=9&&(this.hasSelection=null),this.fastPoll()},Ms.prototype.onContextMenu=function(re){var ce=this,ke=ce.cm,Pe=ke.display,je=ce.textarea;ce.contextMenuPending&&ce.contextMenuPending();var tt=Us(ke,re),mt=Pe.scroller.scrollTop;if(!tt||be)return;var Nt=ke.options.resetSelectionOnContextMenu;Nt&&ke.doc.sel.contains(tt)==-1&&ms(ke,Gr)(ke.doc,br(tt),ht);var Lt=je.style.cssText,Bt=ce.wrapper.style.cssText,qt=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",je.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(re.clientY-qt.top-5)+"px; left: "+(re.clientX-qt.left-5)+`px;
z-index: 1000; background: `+(Ie?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ut;de&&(Ut=window.scrollY),Pe.input.focus(),de&&window.scrollTo(null,Ut),Pe.input.reset(),ke.somethingSelected()||(je.value=ce.prevInput=" "),ce.contextMenuPending=gn,Pe.selForContextMenu=ke.doc.sel,clearTimeout(Pe.detectingSelectAll);function xn(){if(je.selectionStart!=null){var er=ke.somethingSelected(),hr="\u200B"+(er?je.value:"");je.value="\u21DA",je.value=hr,ce.prevInput=er?"":"\u200B",je.selectionStart=1,je.selectionEnd=hr.length,Pe.selForContextMenu=ke.doc.sel}}function gn(){if(ce.contextMenuPending==gn&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=Bt,je.style.cssText=Lt,Ie&&me<9&&Pe.scrollbars.setScrollTop(Pe.scroller.scrollTop=mt),je.selectionStart!=null)){(!Ie||Ie&&me<9)&&xn();var er=0,hr=function(){Pe.selForContextMenu==ke.doc.sel&&je.selectionStart==0&&je.selectionEnd>0&&ce.prevInput=="\u200B"?ms(ke,Go)(ke):er++<10?Pe.detectingSelectAll=setTimeout(hr,500):(Pe.selForContextMenu=null,Pe.input.reset())};Pe.detectingSelectAll=setTimeout(hr,200)}}if(Ie&&me>=9&&xn(),Se){wi(re);var Jn=function(){On(window,"mouseup",Jn),setTimeout(gn,20)};sn(window,"mouseup",Jn)}else setTimeout(gn,50)},Ms.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Ms.prototype.setUneditable=function(){},Ms.prototype.needsContentAttribute=!1;function fm(re,ce){if(ce=ce?Et(ce):{},ce.value=re.value,!ce.tabindex&&re.tabIndex&&(ce.tabindex=re.tabIndex),!ce.placeholder&&re.placeholder&&(ce.placeholder=re.placeholder),ce.autofocus==null){var ke=We();ce.autofocus=ke==re||re.getAttribute("autofocus")!=null&&ke==document.body}function Pe(){re.value=Nt.getValue()}var je;if(re.form&&(sn(re.form,"submit",Pe),!ce.leaveSubmitMethodAlone)){var tt=re.form;je=tt.submit;try{var mt=tt.submit=function(){Pe(),tt.submit=je,tt.submit(),tt.submit=mt}}catch(Lt){}}ce.finishInit=function(Lt){Lt.save=Pe,Lt.getTextArea=function(){return re},Lt.toTextArea=function(){Lt.toTextArea=isNaN,Pe(),re.parentNode.removeChild(Lt.getWrapperElement()),re.style.display="",re.form&&(On(re.form,"submit",Pe),!ce.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=je))}},re.style.display="none";var Nt=Ko(function(Lt){return re.parentNode.insertBefore(Lt,re.nextSibling)},ce);return Nt}function Jf(re){re.off=On,re.on=sn,re.wheelEventPixels=cr,re.Doc=Pi,re.splitLines=bn,re.countColumn=Ke,re.findColumn=Ct,re.isWordChar=Je,re.Pass=wt,re.signal=un,re.Line=Wo,re.changeEnd=qr,re.scrollbarModel=Sd,re.Pos=Tn,re.cmpPos=vr,re.modes=zn,re.mimeModes=Un,re.resolveMode=nn,re.getMode=on,re.modeExtensions=Kt,re.extendMode=hn,re.copyState=qn,re.startState=ur,re.innerMode=tr,re.commands=fh,re.keyMap=cl,re.keyName=rp,re.isModifierKey=jh,re.lookupKey=ws,re.normalizeKeyMap=tc,re.StringStream=Qt,re.SharedTextMarker=Ks,re.TextMarker=Vt,re.LineWidget=Ka,re.e_preventDefault=fr,re.e_stopPropagation=_r,re.e_stop=wi,re.addClass=Ue,re.contains=Ye,re.rmClass=De,re.keyNames=hl}um(Ko),Cc(Ko);var oc="iter insert remove copy getEditor constructor".split(" ");for(var Td in Pi.prototype)Pi.prototype.hasOwnProperty(Td)&&$e(oc,Td)<0&&(Ko.prototype[Td]=function(re){return function(){return re.apply(this.doc,arguments)}}(Pi.prototype[Td]));return Dn(Pi),Ko.inputStyles={textarea:Ms,contenteditable:ya},Ko.defineMode=function(re){!Ko.defaults.mode&&re!="null"&&(Ko.defaults.mode=re),$n.apply(this,arguments)},Ko.defineMIME=Mr,Ko.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),Ko.defineMIME("text/plain","null"),Ko.defineExtension=function(re,ce){Ko.prototype[re]=ce},Ko.defineDocExtension=function(re,ce){Pi.prototype[re]=ce},Ko.fromTextArea=fm,Jf(Ko),Ko.version="5.58.2",Ko})},49047:function(dn,pn,at){(function(ot){ot(at(4631),at(29589),at(52539))})(function(ot){"use strict";ot.defineMode("markdown",function(_t,ae){var Ge=ot.getMode(_t,"text/html"),Ie=Ge.name=="null";function me(Ke){if(ot.findModeByName){var et=ot.findModeByName(Ke);et&&(Ke=et.mime||et.mimes[0])}var $e=ot.getMode(_t,Ke);return $e.name=="null"?null:$e}ae.highlightFormatting===void 0&&(ae.highlightFormatting=!1),ae.maxBlockquoteDepth===void 0&&(ae.maxBlockquoteDepth=0),ae.taskLists===void 0&&(ae.taskLists=!1),ae.strikethrough===void 0&&(ae.strikethrough=!1),ae.emoji===void 0&&(ae.emoji=!1),ae.fencedCodeBlockHighlighting===void 0&&(ae.fencedCodeBlockHighlighting=!0),ae.fencedCodeBlockDefaultMode===void 0&&(ae.fencedCodeBlockDefaultMode="text/plain"),ae.xml===void 0&&(ae.xml=!0),ae.tokenTypeOverrides===void 0&&(ae.tokenTypeOverrides={});var de={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 Ee in de)de.hasOwnProperty(Ee)&&ae.tokenTypeOverrides[Ee]&&(de[Ee]=ae.tokenTypeOverrides[Ee]);var we=/^([*\-_])(?:\s*\1){2,}\s*$/,be=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Te=/^\[(x| )\](?=\s)/i,ve=ae.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,xe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,fe=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,oe=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ie=" ";function le(Ke,et,$e){return et.f=et.inline=$e,$e(Ke,et)}function ue(Ke,et,$e){return et.f=et.block=$e,$e(Ke,et)}function pe(Ke){return!Ke||!/\S/.test(Ke.string)}function Se(Ke){if(Ke.linkTitle=!1,Ke.linkHref=!1,Ke.linkText=!1,Ke.em=!1,Ke.strong=!1,Ke.strikethrough=!1,Ke.quote=0,Ke.indentedCode=!1,Ke.f==De){var et=Ie;if(!et){var $e=ot.innerMode(Ge,Ke.htmlState);et=$e.mode.name=="xml"&&$e.state.tagStart===null&&!$e.state.context&&$e.state.tokenize.isInText}et&&(Ke.f=ze,Ke.block=Le,Ke.htmlState=null)}return Ke.trailingSpace=0,Ke.trailingSpaceNewLine=!1,Ke.prevLine=Ke.thisLine,Ke.thisLine={stream:null},null}function Le(Ke,et){var $e=Ke.column()===et.indentation,vt=pe(et.prevLine.stream),wt=et.indentedCode,ht=et.prevLine.hr,pt=et.list!==!1,ct=(et.listStack[et.listStack.length-1]||0)+3;et.indentedCode=!1;var Ct=et.indentation;if(et.indentationDiff===null&&(et.indentationDiff=et.indentation,pt)){for(et.list=null;Ct<et.listStack[et.listStack.length-1];)et.listStack.pop(),et.listStack.length?et.indentation=et.listStack[et.listStack.length-1]:et.list=!1;et.list!==!1&&(et.indentationDiff=Ct-et.listStack[et.listStack.length-1])}var xt=!vt&&!ht&&!et.prevLine.header&&(!pt||!wt)&&!et.prevLine.fencedCodeEnd,yt=(et.list===!1||ht||vt)&&et.indentation<=ct&&Ke.match(we),Tt=null;if(et.indentationDiff>=4&&(wt||et.prevLine.fencedCodeEnd||et.prevLine.header||vt))return Ke.skipToEnd(),et.indentedCode=!0,de.code;if(Ke.eatSpace())return null;if($e&&et.indentation<=ct&&(Tt=Ke.match(ve))&&Tt[1].length<=6)return et.quote=0,et.header=Tt[1].length,et.thisLine.header=!0,ae.highlightFormatting&&(et.formatting="header"),et.f=et.inline,Ae(et);if(et.indentation<=ct&&Ke.eat(">"))return et.quote=$e?1:et.quote+1,ae.highlightFormatting&&(et.formatting="quote"),Ke.eatSpace(),Ae(et);if(!yt&&!et.setext&&$e&&et.indentation<=ct&&(Tt=Ke.match(be))){var St=Tt[1]?"ol":"ul";return et.indentation=Ct+Ke.current().length,et.list=!0,et.quote=0,et.listStack.push(et.indentation),et.em=!1,et.strong=!1,et.code=!1,et.strikethrough=!1,ae.taskLists&&Ke.match(Te,!1)&&(et.taskList=!0),et.f=et.inline,ae.highlightFormatting&&(et.formatting=["list","list-"+St]),Ae(et)}else{if($e&&et.indentation<=ct&&(Tt=Ke.match(z,!0)))return et.quote=0,et.fencedEndRE=new RegExp(Tt[1]+"+ *$"),et.localMode=ae.fencedCodeBlockHighlighting&&me(Tt[2]||ae.fencedCodeBlockDefaultMode),et.localMode&&(et.localState=ot.startState(et.localMode)),et.f=et.block=Fe,ae.highlightFormatting&&(et.formatting="code-block"),et.code=-1,Ae(et);if(et.setext||(!xt||!pt)&&!et.quote&&et.list===!1&&!et.code&&!yt&&!ee.test(Ke.string)&&(Tt=Ke.lookAhead(1))&&(Tt=Tt.match(xe)))return et.setext?(et.header=et.setext,et.setext=0,Ke.skipToEnd(),ae.highlightFormatting&&(et.formatting="header")):(et.header=Tt[0].charAt(0)=="="?1:2,et.setext=et.header),et.thisLine.header=!0,et.f=et.inline,Ae(et);if(yt)return Ke.skipToEnd(),et.hr=!0,et.thisLine.hr=!0,de.hr;if(Ke.peek()==="[")return le(Ke,et,st)}return le(Ke,et,et.inline)}function De(Ke,et){var $e=Ge.token(Ke,et.htmlState);if(!Ie){var vt=ot.innerMode(Ge,et.htmlState);(vt.mode.name=="xml"&&vt.state.tagStart===null&&!vt.state.context&&vt.state.tokenize.isInText||et.md_inside&&Ke.current().indexOf(">")>-1)&&(et.f=ze,et.block=Le,et.htmlState=null)}return $e}function Fe(Ke,et){var $e=et.listStack[et.listStack.length-1]||0,vt=et.indentation<$e,wt=$e+3;if(et.fencedEndRE&&et.indentation<=wt&&(vt||Ke.match(et.fencedEndRE))){ae.highlightFormatting&&(et.formatting="code-block");var ht;return vt||(ht=Ae(et)),et.localMode=et.localState=null,et.block=Le,et.f=ze,et.fencedEndRE=null,et.code=0,et.thisLine.fencedCodeEnd=!0,vt?ue(Ke,et,et.block):ht}else return et.localMode?et.localMode.token(Ke,et.localState):(Ke.skipToEnd(),de.code)}function Ae(Ke){var et=[];if(Ke.formatting){et.push(de.formatting),typeof Ke.formatting=="string"&&(Ke.formatting=[Ke.formatting]);for(var $e=0;$e<Ke.formatting.length;$e++)et.push(de.formatting+"-"+Ke.formatting[$e]),Ke.formatting[$e]==="header"&&et.push(de.formatting+"-"+Ke.formatting[$e]+"-"+Ke.header),Ke.formatting[$e]==="quote"&&(!ae.maxBlockquoteDepth||ae.maxBlockquoteDepth>=Ke.quote?et.push(de.formatting+"-"+Ke.formatting[$e]+"-"+Ke.quote):et.push("error"))}if(Ke.taskOpen)return et.push("meta"),et.length?et.join(" "):null;if(Ke.taskClosed)return et.push("property"),et.length?et.join(" "):null;if(Ke.linkHref?et.push(de.linkHref,"url"):(Ke.strong&&et.push(de.strong),Ke.em&&et.push(de.em),Ke.strikethrough&&et.push(de.strikethrough),Ke.emoji&&et.push(de.emoji),Ke.linkText&&et.push(de.linkText),Ke.code&&et.push(de.code),Ke.image&&et.push(de.image),Ke.imageAltText&&et.push(de.imageAltText,"link"),Ke.imageMarker&&et.push(de.imageMarker)),Ke.header&&et.push(de.header,de.header+"-"+Ke.header),Ke.quote&&(et.push(de.quote),!ae.maxBlockquoteDepth||ae.maxBlockquoteDepth>=Ke.quote?et.push(de.quote+"-"+Ke.quote):et.push(de.quote+"-"+ae.maxBlockquoteDepth)),Ke.list!==!1){var vt=(Ke.listStack.length-1)%3;vt?vt===1?et.push(de.list2):et.push(de.list3):et.push(de.list1)}return Ke.trailingSpaceNewLine?et.push("trailing-space-new-line"):Ke.trailingSpace&&et.push("trailing-space-"+(Ke.trailingSpace%2?"a":"b")),et.length?et.join(" "):null}function Oe(Ke,et){if(Ke.match(fe,!0))return Ae(et)}function ze(Ke,et){var $e=et.text(Ke,et);if(typeof $e!="undefined")return $e;if(et.list)return et.list=null,Ae(et);if(et.taskList){var vt=Ke.match(Te,!0)[1]===" ";return vt?et.taskOpen=!0:et.taskClosed=!0,ae.highlightFormatting&&(et.formatting="task"),et.taskList=!1,Ae(et)}if(et.taskOpen=!1,et.taskClosed=!1,et.header&&Ke.match(/^#+$/,!0))return ae.highlightFormatting&&(et.formatting="header"),Ae(et);var wt=Ke.next();if(et.linkTitle){et.linkTitle=!1;var ht=wt;wt==="("&&(ht=")"),ht=(ht+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pt="^\\s*(?:[^"+ht+"\\\\]+|\\\\\\\\|\\\\.)"+ht;if(Ke.match(new RegExp(pt),!0))return de.linkHref}if(wt==="`"){var ct=et.formatting;ae.highlightFormatting&&(et.formatting="code"),Ke.eatWhile("`");var Ct=Ke.current().length;if(et.code==0&&(!et.quote||Ct==1))return et.code=Ct,Ae(et);if(Ct==et.code){var xt=Ae(et);return et.code=0,xt}else return et.formatting=ct,Ae(et)}else if(et.code)return Ae(et);if(wt==="\\"&&(Ke.next(),ae.highlightFormatting)){var yt=Ae(et),Tt=de.formatting+"-escape";return yt?yt+" "+Tt:Tt}if(wt==="!"&&Ke.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return et.imageMarker=!0,et.image=!0,ae.highlightFormatting&&(et.formatting="image"),Ae(et);if(wt==="["&&et.imageMarker&&Ke.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return et.imageMarker=!1,et.imageAltText=!0,ae.highlightFormatting&&(et.formatting="image"),Ae(et);if(wt==="]"&&et.imageAltText){ae.highlightFormatting&&(et.formatting="image");var yt=Ae(et);return et.imageAltText=!1,et.image=!1,et.inline=et.f=Ye,yt}if(wt==="["&&!et.image)return et.linkText&&Ke.match(/^.*?\]/)||(et.linkText=!0,ae.highlightFormatting&&(et.formatting="link")),Ae(et);if(wt==="]"&&et.linkText){ae.highlightFormatting&&(et.formatting="link");var yt=Ae(et);return et.linkText=!1,et.inline=et.f=Ke.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:ze,yt}if(wt==="<"&&Ke.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){et.f=et.inline=He,ae.highlightFormatting&&(et.formatting="link");var yt=Ae(et);return yt?yt+=" ":yt="",yt+de.linkInline}if(wt==="<"&&Ke.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){et.f=et.inline=He,ae.highlightFormatting&&(et.formatting="link");var yt=Ae(et);return yt?yt+=" ":yt="",yt+de.linkEmail}if(ae.xml&&wt==="<"&&Ke.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var St=Ke.string.indexOf(">",Ke.pos);if(St!=-1){var nt=Ke.string.substring(Ke.start,St);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(nt)&&(et.md_inside=!0)}return Ke.backUp(1),et.htmlState=ot.startState(Ge),ue(Ke,et,De)}if(ae.xml&&wt==="<"&&Ke.match(/^\/\w*?>/))return et.md_inside=!1,"tag";if(wt==="*"||wt==="_"){for(var Qe=1,Ce=Ke.pos==1?" ":Ke.string.charAt(Ke.pos-2);Qe<3&&Ke.eat(wt);)Qe++;var Ne=Ke.peek()||" ",Je=!/\s/.test(Ne)&&(!oe.test(Ne)||/\s/.test(Ce)||oe.test(Ce)),rt=!/\s/.test(Ce)&&(!oe.test(Ce)||/\s/.test(Ne)||oe.test(Ne)),Be=null,_e=null;if(Qe%2&&(!et.em&&Je&&(wt==="*"||!rt||oe.test(Ce))?Be=!0:et.em==wt&&rt&&(wt==="*"||!Je||oe.test(Ne))&&(Be=!1)),Qe>1&&(!et.strong&&Je&&(wt==="*"||!rt||oe.test(Ce))?_e=!0:et.strong==wt&&rt&&(wt==="*"||!Je||oe.test(Ne))&&(_e=!1)),_e!=null||Be!=null){ae.highlightFormatting&&(et.formatting=Be==null?"strong":_e==null?"em":"strong em"),Be===!0&&(et.em=wt),_e===!0&&(et.strong=wt);var xt=Ae(et);return Be===!1&&(et.em=!1),_e===!1&&(et.strong=!1),xt}}else if(wt===" "&&(Ke.eat("*")||Ke.eat("_"))){if(Ke.peek()===" ")return Ae(et);Ke.backUp(1)}if(ae.strikethrough){if(wt==="~"&&Ke.eatWhile(wt)){if(et.strikethrough){ae.highlightFormatting&&(et.formatting="strikethrough");var xt=Ae(et);return et.strikethrough=!1,xt}else if(Ke.match(/^[^\s]/,!1))return et.strikethrough=!0,ae.highlightFormatting&&(et.formatting="strikethrough"),Ae(et)}else if(wt===" "&&Ke.match(/^~~/,!0)){if(Ke.peek()===" ")return Ae(et);Ke.backUp(2)}}if(ae.emoji&&wt===":"&&Ke.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){et.emoji=!0,ae.highlightFormatting&&(et.formatting="emoji");var Xe=Ae(et);return et.emoji=!1,Xe}return wt===" "&&(Ke.match(/^ +$/,!1)?et.trailingSpace++:et.trailingSpace&&(et.trailingSpaceNewLine=!0)),Ae(et)}function He(Ke,et){var $e=Ke.next();if($e===">"){et.f=et.inline=ze,ae.highlightFormatting&&(et.formatting="link");var vt=Ae(et);return vt?vt+=" ":vt="",vt+de.linkInline}return Ke.match(/^[^>]+/,!0),de.linkInline}function Ye(Ke,et){if(Ke.eatSpace())return null;var $e=Ke.next();return $e==="("||$e==="["?(et.f=et.inline=Ue($e==="("?")":"]"),ae.highlightFormatting&&(et.formatting="link-string"),et.linkHref=!0,Ae(et)):"error"}var We={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ue(Ke){return function(et,$e){var vt=et.next();if(vt===Ke){$e.f=$e.inline=ze,ae.highlightFormatting&&($e.formatting="link-string");var wt=Ae($e);return $e.linkHref=!1,wt}return et.match(We[Ke]),$e.linkHref=!0,Ae($e)}}function st(Ke,et){return Ke.match(/^([^\]\\]|\\.)*\]:/,!1)?(et.f=dt,Ke.next(),ae.highlightFormatting&&(et.formatting="link"),et.linkText=!0,Ae(et)):le(Ke,et,ze)}function dt(Ke,et){if(Ke.match(/^\]:/,!0)){et.f=et.inline=gt,ae.highlightFormatting&&(et.formatting="link");var $e=Ae(et);return et.linkText=!1,$e}return Ke.match(/^([^\]\\]|\\.)+/,!0),de.linkText}function gt(Ke,et){return Ke.eatSpace()?null:(Ke.match(/^[^\s]+/,!0),Ke.peek()===void 0?et.linkTitle=!0:Ke.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),et.f=et.inline=ze,de.linkHref+" url")}var Et={startState:function(){return{f:Le,prevLine:{stream:null},thisLine:{stream:null},block:Le,htmlState:null,indentation:0,inline:ze,text:Oe,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(Ke){return{f:Ke.f,prevLine:Ke.prevLine,thisLine:Ke.thisLine,block:Ke.block,htmlState:Ke.htmlState&&ot.copyState(Ge,Ke.htmlState),indentation:Ke.indentation,localMode:Ke.localMode,localState:Ke.localMode?ot.copyState(Ke.localMode,Ke.localState):null,inline:Ke.inline,text:Ke.text,formatting:!1,linkText:Ke.linkText,linkTitle:Ke.linkTitle,linkHref:Ke.linkHref,code:Ke.code,em:Ke.em,strong:Ke.strong,strikethrough:Ke.strikethrough,emoji:Ke.emoji,header:Ke.header,setext:Ke.setext,hr:Ke.hr,taskList:Ke.taskList,list:Ke.list,listStack:Ke.listStack.slice(0),quote:Ke.quote,indentedCode:Ke.indentedCode,trailingSpace:Ke.trailingSpace,trailingSpaceNewLine:Ke.trailingSpaceNewLine,md_inside:Ke.md_inside,fencedEndRE:Ke.fencedEndRE}},token:function(Ke,et){if(et.formatting=!1,Ke!=et.thisLine.stream){if(et.header=0,et.hr=!1,Ke.match(/^\s*$/,!0))return Se(et),null;if(et.prevLine=et.thisLine,et.thisLine={stream:Ke},et.taskList=!1,et.trailingSpace=0,et.trailingSpaceNewLine=!1,!et.localState&&(et.f=et.block,et.f!=De)){var $e=Ke.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(et.indentation=$e,et.indentationDiff=null,$e>0)return null}}return et.f(Ke,et)},innerMode:function(Ke){return Ke.block==De?{state:Ke.htmlState,mode:Ge}:Ke.localState?{state:Ke.localState,mode:Ke.localMode}:{state:Ke,mode:Et}},indent:function(Ke,et,$e){return Ke.block==De&&Ge.indent?Ge.indent(Ke.htmlState,et,$e):Ke.localState&&Ke.localMode.indent?Ke.localMode.indent(Ke.localState,et,$e):ot.Pass},blankLine:Se,getType:Ae,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Et},"xml"),ot.defineMIME("text/markdown","markdown"),ot.defineMIME("text/x-markdown","markdown")})},52539:function(dn,pn,at){(function(ot){ot(at(4631))})(function(ot){"use strict";ot.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 _t=0;_t<ot.modeInfo.length;_t++){var ae=ot.modeInfo[_t];ae.mimes&&(ae.mime=ae.mimes[0])}ot.findModeByMIME=function(Ge){Ge=Ge.toLowerCase();for(var Ie=0;Ie<ot.modeInfo.length;Ie++){var me=ot.modeInfo[Ie];if(me.mime==Ge)return me;if(me.mimes){for(var de=0;de<me.mimes.length;de++)if(me.mimes[de]==Ge)return me}}if(/\+xml$/.test(Ge))return ot.findModeByMIME("application/xml");if(/\+json$/.test(Ge))return ot.findModeByMIME("application/json")},ot.findModeByExtension=function(Ge){Ge=Ge.toLowerCase();for(var Ie=0;Ie<ot.modeInfo.length;Ie++){var me=ot.modeInfo[Ie];if(me.ext){for(var de=0;de<me.ext.length;de++)if(me.ext[de]==Ge)return me}}},ot.findModeByFileName=function(Ge){for(var Ie=0;Ie<ot.modeInfo.length;Ie++){var me=ot.modeInfo[Ie];if(me.file&&me.file.test(Ge))return me}var de=Ge.lastIndexOf("."),Ee=de>-1&&Ge.substring(de+1,Ge.length);if(Ee)return ot.findModeByExtension(Ee)},ot.findModeByName=function(Ge){Ge=Ge.toLowerCase();for(var Ie=0;Ie<ot.modeInfo.length;Ie++){var me=ot.modeInfo[Ie];if(me.name.toLowerCase()==Ge)return me;if(me.alias){for(var de=0;de<me.alias.length;de++)if(me.alias[de].toLowerCase()==Ge)return me}}}})},80785:function(dn,pn,at){(function(ot){ot(at(4631))})(function(ot){"use strict";ot.defineMode("stex",function(_t,ae){"use strict";function Ge(fe,z){fe.cmdState.push(z)}function Ie(fe){return fe.cmdState.length>0?fe.cmdState[fe.cmdState.length-1]:null}function me(fe){var z=fe.cmdState.pop();z&&z.closeBracket()}function de(fe){for(var z=fe.cmdState,ee=z.length-1;ee>=0;ee--){var oe=z[ee];if(oe.name!="DEFAULT")return oe}return{styleIdentifier:function(){return null}}}function Ee(fe,z,ee){return function(){this.name=fe,this.bracketNo=0,this.style=z,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var we={};we.importmodule=Ee("importmodule","tag",["string","builtin"]),we.documentclass=Ee("documentclass","tag",["","atom"]),we.usepackage=Ee("usepackage","tag",["atom"]),we.begin=Ee("begin","tag",["atom"]),we.end=Ee("end","tag",["atom"]),we.label=Ee("label","tag",["atom"]),we.ref=Ee("ref","tag",["atom"]),we.eqref=Ee("eqref","tag",["atom"]),we.cite=Ee("cite","tag",["atom"]),we.bibitem=Ee("bibitem","tag",["atom"]),we.Bibitem=Ee("Bibitem","tag",["atom"]),we.RBibitem=Ee("RBibitem","tag",["atom"]),we.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function be(fe,z){fe.f=z}function Te(fe,z){var ee;if(fe.match(/^\\[a-zA-Z@]+/)){var oe=fe.current().slice(1);return ee=we.hasOwnProperty(oe)?we[oe]:we.DEFAULT,ee=new ee,Ge(z,ee),be(z,xe),ee.style}if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/\\]/))return"tag";if(fe.match("\\["))return be(z,function(le,ue){return ve(le,ue,"\\]")}),"keyword";if(fe.match("\\("))return be(z,function(le,ue){return ve(le,ue,"\\)")}),"keyword";if(fe.match("$$"))return be(z,function(le,ue){return ve(le,ue,"$$")}),"keyword";if(fe.match("$"))return be(z,function(le,ue){return ve(le,ue,"$")}),"keyword";var ie=fe.next();if(ie=="%")return fe.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(ee=Ie(z),ee)ee.closeBracket(ie),be(z,xe);else return"error";return"bracket"}else return ie=="{"||ie=="["?(ee=we.DEFAULT,ee=new ee,Ge(z,ee),"bracket"):/\d/.test(ie)?(fe.eatWhile(/[\w.%]/),"atom"):(fe.eatWhile(/[\w\-_]/),ee=de(z),ee.name=="begin"&&(ee.argument=fe.current()),ee.styleIdentifier())}function ve(fe,z,ee){if(fe.eatSpace())return null;if(ee&&fe.match(ee))return be(z,Te),"keyword";if(fe.match(/^\\[a-zA-Z@]+/))return"tag";if(fe.match(/^[a-zA-Z]+/))return"variable-2";if(fe.match(/^\\[$&%#{}_]/)||fe.match(/^\\[,;!\/]/)||fe.match(/^[\^_&]/))return"tag";if(fe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(fe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var oe=fe.next();return oe=="{"||oe=="}"||oe=="["||oe=="]"||oe=="("||oe==")"?"bracket":oe=="%"?(fe.skipToEnd(),"comment"):"error"}function xe(fe,z){var ee=fe.peek(),oe;return ee=="{"||ee=="["?(oe=Ie(z),oe.openBracket(ee),fe.eat(ee),be(z,Te),"bracket"):/[ \t\r]/.test(ee)?(fe.eat(ee),null):(be(z,Te),me(z),Te(fe,z))}return{startState:function(){var fe=ae.inMathMode?function(z,ee){return ve(z,ee)}:Te;return{cmdState:[],f:fe}},copyState:function(fe){return{cmdState:fe.cmdState.slice(),f:fe.f}},token:function(fe,z){return z.f(fe,z)},blankLine:function(fe){fe.f=Te,fe.cmdState.length=0},lineComment:"%"}}),ot.defineMIME("text/x-stex","stex"),ot.defineMIME("text/x-latex","stex")})},29589:function(dn,pn,at){(function(ot){ot(at(4631))})(function(ot){"use strict";var _t={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},ae={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ot.defineMode("xml",function(Ge,Ie){var me=Ge.indentUnit,de={},Ee=Ie.htmlMode?_t:ae;for(var we in Ee)de[we]=Ee[we];for(var we in Ie)de[we]=Ie[we];var be,Te;function ve(He,Ye){function We(dt){return Ye.tokenize=dt,dt(He,Ye)}var Ue=He.next();if(Ue=="<")return He.eat("!")?He.eat("[")?He.match("CDATA[")?We(z("atom","]]>")):null:He.match("--")?We(z("comment","-->")):He.match("DOCTYPE",!0,!0)?(He.eatWhile(/[\w\._\-]/),We(ee(1))):null:He.eat("?")?(He.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(be=He.eat("/")?"closeTag":"openTag",Ye.tokenize=xe,"tag bracket");if(Ue=="&"){var st;return He.eat("#")?He.eat("x")?st=He.eatWhile(/[a-fA-F\d]/)&&He.eat(";"):st=He.eatWhile(/[\d]/)&&He.eat(";"):st=He.eatWhile(/[\w\.\-:]/)&&He.eat(";"),st?"atom":"error"}else return He.eatWhile(/[^&<]/),null}ve.isInText=!0;function xe(He,Ye){var We=He.next();if(We==">"||We=="/"&&He.eat(">"))return Ye.tokenize=ve,be=We==">"?"endTag":"selfcloseTag","tag bracket";if(We=="=")return be="equals",null;if(We=="<"){Ye.tokenize=ve,Ye.state=ue,Ye.tagName=Ye.tagStart=null;var Ue=Ye.tokenize(He,Ye);return Ue?Ue+" tag error":"tag error"}else return/[\'\"]/.test(We)?(Ye.tokenize=fe(We),Ye.stringStartCol=He.column(),Ye.tokenize(He,Ye)):(He.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function fe(He){var Ye=function(We,Ue){for(;!We.eol();)if(We.next()==He){Ue.tokenize=xe;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(He,Ye){return function(We,Ue){for(;!We.eol();){if(We.match(Ye)){Ue.tokenize=ve;break}We.next()}return He}}function ee(He){return function(Ye,We){for(var Ue;(Ue=Ye.next())!=null;){if(Ue=="<")return We.tokenize=ee(He+1),We.tokenize(Ye,We);if(Ue==">")if(He==1){We.tokenize=ve;break}else return We.tokenize=ee(He-1),We.tokenize(Ye,We)}return"meta"}}function oe(He,Ye,We){this.prev=He.context,this.tagName=Ye,this.indent=He.indented,this.startOfLine=We,(de.doNotIndent.hasOwnProperty(Ye)||He.context&&He.context.noIndent)&&(this.noIndent=!0)}function ie(He){He.context&&(He.context=He.context.prev)}function le(He,Ye){for(var We;;){if(!He.context||(We=He.context.tagName,!de.contextGrabbers.hasOwnProperty(We)||!de.contextGrabbers[We].hasOwnProperty(Ye)))return;ie(He)}}function ue(He,Ye,We){return He=="openTag"?(We.tagStart=Ye.column(),pe):He=="closeTag"?Se:ue}function pe(He,Ye,We){return He=="word"?(We.tagName=Ye.current(),Te="tag",Fe):de.allowMissingTagName&&He=="endTag"?(Te="tag bracket",Fe(He,Ye,We)):(Te="error",pe)}function Se(He,Ye,We){if(He=="word"){var Ue=Ye.current();return We.context&&We.context.tagName!=Ue&&de.implicitlyClosed.hasOwnProperty(We.context.tagName)&&ie(We),We.context&&We.context.tagName==Ue||de.matchClosing===!1?(Te="tag",Le):(Te="tag error",De)}else return de.allowMissingTagName&&He=="endTag"?(Te="tag bracket",Le(He,Ye,We)):(Te="error",De)}function Le(He,Ye,We){return He!="endTag"?(Te="error",Le):(ie(We),ue)}function De(He,Ye,We){return Te="error",Le(He,Ye,We)}function Fe(He,Ye,We){if(He=="word")return Te="attribute",Ae;if(He=="endTag"||He=="selfcloseTag"){var Ue=We.tagName,st=We.tagStart;return We.tagName=We.tagStart=null,He=="selfcloseTag"||de.autoSelfClosers.hasOwnProperty(Ue)?le(We,Ue):(le(We,Ue),We.context=new oe(We,Ue,st==We.indented)),ue}return Te="error",Fe}function Ae(He,Ye,We){return He=="equals"?Oe:(de.allowMissing||(Te="error"),Fe(He,Ye,We))}function Oe(He,Ye,We){return He=="string"?ze:He=="word"&&de.allowUnquoted?(Te="string",Fe):(Te="error",Fe(He,Ye,We))}function ze(He,Ye,We){return He=="string"?ze:Fe(He,Ye,We)}return{startState:function(He){var Ye={tokenize:ve,state:ue,indented:He||0,tagName:null,tagStart:null,context:null};return He!=null&&(Ye.baseIndent=He),Ye},token:function(He,Ye){if(!Ye.tagName&&He.sol()&&(Ye.indented=He.indentation()),He.eatSpace())return null;be=null;var We=Ye.tokenize(He,Ye);return(We||be)&&We!="comment"&&(Te=null,Ye.state=Ye.state(be||We,He,Ye),Te&&(We=Te=="error"?We+" error":Te)),We},indent:function(He,Ye,We){var Ue=He.context;if(He.tokenize.isInAttribute)return He.tagStart==He.indented?He.stringStartCol+1:He.indented+me;if(Ue&&Ue.noIndent)return ot.Pass;if(He.tokenize!=xe&&He.tokenize!=ve)return We?We.match(/^(\s*)/)[0].length:0;if(He.tagName)return de.multilineTagIndentPastTag!==!1?He.tagStart+He.tagName.length+2:He.tagStart+me*(de.multilineTagIndentFactor||1);if(de.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var st=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(st&&st[1])for(;Ue;)if(Ue.tagName==st[2]){Ue=Ue.prev;break}else if(de.implicitlyClosed.hasOwnProperty(Ue.tagName))Ue=Ue.prev;else break;else if(st)for(;Ue;){var dt=de.contextGrabbers[Ue.tagName];if(dt&&dt.hasOwnProperty(st[2]))Ue=Ue.prev;else break}for(;Ue&&Ue.prev&&!Ue.startOfLine;)Ue=Ue.prev;return Ue?Ue.indent+me:He.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:de.htmlMode?"html":"xml",helperType:de.htmlMode?"html":"xml",skipAttribute:function(He){He.state==Oe&&(He.state=Fe)},xmlCurrentTag:function(He){return He.tagName?{name:He.tagName,close:He.type=="closeTag"}:null},xmlCurrentContext:function(He){for(var Ye=[],We=He.context;We;We=We.prev)We.tagName&&Ye.push(We.tagName);return Ye.reverse()}}}),ot.defineMIME("text/xml","xml"),ot.defineMIME("application/xml","xml"),ot.mimeModes.hasOwnProperty("text/html")||ot.defineMIME("text/html",{name:"xml",htmlMode:!0})})},23495:function(dn,pn,at){"use strict";at.d(pn,{$u:function(){return we},BD:function(){return Qe},E9:function(){return Ee},FF:function(){return Ji},FJ:function(){return ue},Hn:function(){return le},KX:function(){return Se},NB:function(){return kt},S0:function(){return Tt},UL:function(){return be},Vk:function(){return ie},Vm:function(){return jt},YI:function(){return St},ZA:function(){return ae},Zt:function(){return Te},al:function(){return Be},bn:function(){return rt},bx:function(){return Ce},g2:function(){return nt},h1:function(){return Oe},hD:function(){return Dn},l4:function(){return me},rU:function(){return zt},s_:function(){return Ne},uz:function(){return Pt},z6:function(){return ve}}),dn=at.hmd(dn),function(){var Ze;function vn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Mn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:vn(a)}}function Rn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var zn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Un;if(typeof Object.setPrototypeOf=="function")Un=Object.setPrototypeOf;else{var $n;e:{var Mr={a:!0},nn={};try{nn.__proto__=Mr,$n=nn.a;break e}catch(a){}$n=!1}Un=$n?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var on=Un;function Kt(a,y){if(a.prototype=zn(y.prototype),a.prototype.constructor=a,on)on(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var hn=typeof at.g!="undefined"&&at.g!=null?at.g:self,qn=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},tr=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ur(a,y){if(y){var x=hn;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&tr(x,a,{writable:!0,value:y})}}ur("Object.assign",function(a){return a||qn}),ur("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var Qt=typeof globalThis=="object"&&globalThis||typeof at.g=="object"&&at.g.global===at.g&&at.g||typeof self=="object"&&self.self===self&&self||{};Qt.requestAnimationFrame===void 0&&(Qt.setImmediate===void 0?Qt.requestAnimationFrame=function(a){Qt.setTimeout(a,0)}:Qt.requestAnimationFrame=Qt.setImmediate);function Cn(){}function dr(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Qt.clearTimeout(x),x=Ar(function(){x=-1,a.apply(b,E)},y)}}function Ar(a,y){return Qt.setTimeout(a,y)}function _n(a){return Qt.document.createElement(a)}function Zt(a){throw Error(a)}function ir(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Zt(a)}function Nr(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),Zt(x+" is not in the range "+y+": "+a)}function si(a){Qt.console&&Qt.console.log(a)}function Tn(a){return typeof a=="object"&&a!==null}function vr(a){return Array.isArray(a)||Qt.NodeList&&a instanceof Qt.NodeList||Qt.HTMLCollection&&a instanceof Qt.HTMLCollection}function yi(a){return Array.prototype.slice.call(a)}function ko(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Zt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function zi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Zt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function xr(){var a=ga.pop();return a===void 0?[]:a}function gr(a){a.length=0,ga.push(a)}function Lr(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(Tn(a)&&a.constructor)return Lr(a.constructor);return typeof a}function _i(a){var y=a;return Tn(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 oo(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function Xn(a,y,x){Object.defineProperty(ho.prototype,a,{get:y,set:x})}function Ir(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var te="",ne=0;ne<a.length;ne++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,te+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return te.indexOf("GoJS 2.1 evaluation")>-1||te.indexOf("\xA9 1998-2021 Northwoods Software")>-1||te.indexOf("Not for distribution or production use")>-1||te.indexOf("gojs.net")>-1?"":te}var _s=Qt.navigator!==void 0&&0<Qt.navigator.userAgent.indexOf("Trident/7"),Aa=Qt.navigator!==void 0&&Qt.navigator.platform!==void 0&&Qt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,ga=[];Object.freeze([]),Cn.className="Util",Cn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Cn.adym="gojs.net",Cn.vfo="28e645fdb266",Cn.className="Util";function tn(a,y,x){vo(this),this.j=a,this.xa=y,this.o=x}tn.prototype.toString=function(){return"EnumValue."+this.xa};function Vr(a,y){return y==null||y===""?null:a[y]}hn.Object.defineProperties(tn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),tn.className="EnumValue";function Ti(){this.ew=[]}Ti.prototype.toString=function(){return this.ew.join("")},Ti.prototype.add=function(a){a!==""&&this.ew.push(a)},Ti.className="StringBuilder";function jr(){}jr.className="PropertyCollection";var Fo={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Qt.console&&Qt.console.log(a)},HA:function(a,y,x,b){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(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var te=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);te.get!==void 0&&te.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,se){return function(){throw Error("Property "+ne.Zl[se.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Oi(){}Oi.prototype.reset=function(){},Oi.prototype.next=function(){return!1},Oi.prototype.Ad=function(){return!1},Oi.prototype.first=function(){return null},Oi.prototype.any=function(){return!1},Oi.prototype.all=function(){return!0},Oi.prototype.each=function(){return this},Oi.prototype.map=function(){return this},Oi.prototype.filter=function(){return this},Oi.prototype.de=function(){},Oi.prototype.toString=function(){return"EmptyIterator"},hn.Object.defineProperties(Oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Oi.prototype.first=Oi.prototype.first,Oi.prototype.hasNext=Oi.prototype.Ad,Oi.prototype.next=Oi.prototype.next,Oi.prototype.reset=Oi.prototype.reset;var Ri=null;Oi.className="EmptyIterator",Ri=new Oi;function Li(a){this.key=-1,this.value=a}Li.prototype.reset=function(){this.key=-1},Li.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Li.prototype.Ad=function(){return this.next()},Li.prototype.first=function(){return this.key=0,this.value},Li.prototype.any=function(a){return this.key=-1,a(this.value)},Li.prototype.all=function(a){return this.key=-1,a(this.value)},Li.prototype.each=function(a){return this.key=-1,a(this.value),this},Li.prototype.map=function(a){return new Li(a(this.value))},Li.prototype.filter=function(a){return a(this.value)?new Li(this.value):Ri},Li.prototype.de=function(){this.value=null},Li.prototype.toString=function(){return"SingletonIterator("+this.value+")"},hn.Object.defineProperties(Li.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Li.prototype.first=Li.prototype.first,Li.prototype.hasNext=Li.prototype.Ad,Li.prototype.next=Li.prototype.next,Li.prototype.reset=Li.prototype.reset,Li.className="SingletonIterator";function bi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}bi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},bi.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,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},bi.prototype.Ad=function(){return this.next()},bi.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 b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},bi.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&a(te))return!0}return!1},bi.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&!a(te))return!1}return!0},bi.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];(b===null||b(te))&&a(te)}return this},bi.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new Ln,a.s=x,a.xb(),a.iterator},bi.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new Ln,a.s=x,a.xb(),a.iterator},bi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},bi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},hn.Object.defineProperties(bi.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,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),bi.prototype.first=bi.prototype.first,bi.prototype.hasNext=bi.prototype.Ad,bi.prototype.next=bi.prototype.next,bi.prototype.reset=bi.prototype.reset,bi.className="ListIterator";function uo(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}uo.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},uo.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)},uo.prototype.Ad=function(){return this.next()},uo.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},uo.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},uo.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},uo.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},uo.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new Ln,a.s=x,a.xb(),a.iterator},uo.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new Ln,a.s=x,a.xb(),a.iterator},uo.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},uo.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},hn.Object.defineProperties(uo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),uo.prototype.first=uo.prototype.first,uo.prototype.hasNext=uo.prototype.Ad,uo.prototype.next=uo.prototype.next,uo.prototype.reset=uo.prototype.reset,uo.className="ListIteratorBackwards";function Ln(a){vo(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ze=Ln.prototype,Ze.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return this._isFrozen=!1,this},Ze.toString=function(){return"List()#"+Xt(this)},Ze.add=function(a){return a===null?this:(this._isFrozen&&ir(this,a),this.s.push(a),this.xb(),this)},Ze.push=function(a){this.add(a)},Ze.addAll=function(a){if(a===null)return this;this._isFrozen&&ir(this);var y=this.s;if(vr(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Ze.clear=function(){this._isFrozen&&ir(this),this.s.length=0,this.xb()},Ze.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Ze.has=function(a){return this.contains(a)},Ze.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Ze.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Nr(a,"0 <= i < length",Ln,"elt:i"),y[a]},Ze.get=function(a){return this.M(a)},Ze.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Nr(a,"0 <= i < length",Ln,"setElt:i"),this._isFrozen&&ir(this,a),x[a]=y},Ze.set=function(a,y){this.cd(a,y)},Ze.first=function(){var a=this.s;return a.length===0?null:a[0]},Ze.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Ze.pop=function(){this._isFrozen&&ir(this);var a=this.s;return 0<a.length?a.pop():null},Ln.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},Ln.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},Ln.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},Ln.prototype.map=function(a){for(var y=new Ln,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},Ln.prototype.filter=function(a){for(var y=new Ln,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},Ze=Ln.prototype,Ze.Gb=function(a,y){0>a&&Nr(a,">= 0",Ln,"insertAt:i"),this._isFrozen&&ir(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ze.remove=function(a){if(a===null)return!1;this._isFrozen&&ir(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)},Ze.delete=function(a){return this.remove(a)},Ze.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Nr(a,"0 <= i < length",Ln,"removeAt:i"),this._isFrozen&&ir(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ze.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&ir(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},Ln.prototype.copy=function(){var a=new Ln,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Ze=Ln.prototype,Ze.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Ze.Iv=function(){for(var a=new Nn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Ze.sort=function(a){return this._isFrozen&&ir(this),this.s.sort(a),this.xb(),this},Ze.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&ir(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Nr(y,"0 <= from < length",Ln,"sortRange:from"),te===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},Ze.reverse=function(){return this._isFrozen&&ir(this),this.s.reverse(),this.xb(),this},hn.Object.defineProperties(Ln.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 Ri;var a=this.Sa;return a!==null?(a.reset(),a):new bi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Ri;var a=this.Hg;return a!==null?(a.reset(),a):new uo(this)}}}),Ln.prototype.reverse=Ln.prototype.reverse,Ln.prototype.sortRange=Ln.prototype.zi,Ln.prototype.sort=Ln.prototype.sort,Ln.prototype.toSet=Ln.prototype.Iv,Ln.prototype.toArray=Ln.prototype.Fa,Ln.prototype.removeRange=Ln.prototype.removeRange,Ln.prototype.removeAt=Ln.prototype.mb,Ln.prototype.delete=Ln.prototype.delete,Ln.prototype.remove=Ln.prototype.remove,Ln.prototype.insertAt=Ln.prototype.Gb,Ln.prototype.pop=Ln.prototype.pop,Ln.prototype.last=Ln.prototype.jc,Ln.prototype.first=Ln.prototype.first,Ln.prototype.set=Ln.prototype.set,Ln.prototype.setElt=Ln.prototype.cd,Ln.prototype.get=Ln.prototype.get,Ln.prototype.elt=Ln.prototype.M,Ln.prototype.indexOf=Ln.prototype.indexOf,Ln.prototype.has=Ln.prototype.has,Ln.prototype.contains=Ln.prototype.contains,Ln.prototype.clear=Ln.prototype.clear,Ln.prototype.addAll=Ln.prototype.addAll,Ln.prototype.push=Ln.prototype.push,Ln.prototype.add=Ln.prototype.add,Ln.prototype.thaw=Ln.prototype.ka,Ln.prototype.freeze=Ln.prototype.freeze,Ln.className="List";function la(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}la.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},la.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},la.prototype.Ad=function(){return this.next()},la.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},la.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},la.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},la.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},la.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},la.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},la.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},la.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},hn.Object.defineProperties(la.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),la.prototype.first=la.prototype.first,la.prototype.hasNext=la.prototype.Ad,la.prototype.next=la.prototype.next,la.prototype.reset=la.prototype.reset,la.className="SetIterator";function Nn(a){vo(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ze=Nn.prototype,Ze.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return this._isFrozen=!1,this},Ze.toString=function(){return"Set()#"+Xt(this)},Ze.add=function(a){if(a===null)return this;this._isFrozen&&ir(this,a);var y=a;return Tn(a)&&(y=bs(a)),this.Tb[y]===void 0&&(this.Sb++,a=new li(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},Ze.addAll=function(a){if(a===null)return this;if(this._isFrozen&&ir(this),vr(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},Ze.contains=function(a){if(a===null)return!1;var y=a;return Tn(a)&&(y=Xt(a),y===void 0)?!1:this.Tb[y]!==void 0},Ze.has=function(a){return this.contains(a)},Ze.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Ze.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Ze.first=function(){var a=this.ea;return a===null?null:a.value},Nn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Nn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Nn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Nn.prototype.map=function(a){for(var y=new Nn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Nn.prototype.filter=function(a){for(var y=new Nn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Ze=Nn.prototype,Ze.remove=function(a){if(a===null)return!1;this._isFrozen&&ir(this,a);var y=a;if(Tn(a)&&(y=Xt(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},Ze.delete=function(a){return this.remove(a)},Ze.hp=function(a){if(a===null)return this;if(this._isFrozen&&ir(this),vr(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},Ze.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&ir(this);var y=new Nn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},Ze.clear=function(){this._isFrozen&&ir(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Nn.prototype.copy=function(){var a=new Nn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Nn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},Nn.prototype.Hv=function(){var a=new Ln,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function vo(a){a.__gohashid=Jt++}function bs(a){var y=a.__gohashid;return y===void 0&&(y=Jt++,a.__gohashid=y),y}function Xt(a){return a.__gohashid}hn.Object.defineProperties(Nn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Ri;var a=this.Sa;return a!==null?(a.reset(),a):new la(this)}}}),Nn.prototype.toList=Nn.prototype.Hv,Nn.prototype.toArray=Nn.prototype.Fa,Nn.prototype.clear=Nn.prototype.clear,Nn.prototype.retainAll=Nn.prototype.pA,Nn.prototype.removeAll=Nn.prototype.hp,Nn.prototype.delete=Nn.prototype.delete,Nn.prototype.remove=Nn.prototype.remove,Nn.prototype.first=Nn.prototype.first,Nn.prototype.containsAny=Nn.prototype.Ty,Nn.prototype.containsAll=Nn.prototype.Sy,Nn.prototype.has=Nn.prototype.has,Nn.prototype.contains=Nn.prototype.contains,Nn.prototype.addAll=Nn.prototype.addAll,Nn.prototype.add=Nn.prototype.add,Nn.prototype.thaw=Nn.prototype.ka,Nn.prototype.freeze=Nn.prototype.freeze;var Jt=1;Nn.className="Set",Nn.uniqueHash=vo,Nn.hashIdUnique=bs,Nn.hashId=Xt;function cn(a){this.ma=a,this.qa=a.Ja,this.sa=null}cn.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},cn.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)},cn.prototype.Ad=function(){return this.next()},cn.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},cn.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},cn.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},cn.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},cn.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},cn.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},cn.prototype.de=function(){this.value=this.key=null,this.qa=-1},cn.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},hn.Object.defineProperties(cn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),cn.prototype.first=cn.prototype.first,cn.prototype.hasNext=cn.prototype.Ad,cn.prototype.next=cn.prototype.next,cn.prototype.reset=cn.prototype.reset,cn.className="MapKeySetIterator";function Fn(a){Nn.call(this),vo(this),this._isFrozen=!0,this.ma=a}Kt(Fn,Nn),Ze=Fn.prototype,Ze.freeze=function(){return this},Ze.ka=function(){return this},Ze.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ze.add=function(){Zt("This Set is read-only: "+this.toString())},Ze.contains=function(a){return this.ma.contains(a)},Ze.has=function(a){return this.contains(a)},Ze.remove=function(){Zt("This Set is read-only: "+this.toString())},Ze.delete=function(a){return this.remove(a)},Ze.clear=function(){Zt("This Set is read-only: "+this.toString())},Ze.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Fn.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Fn.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Fn.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Fn.prototype.map=function(a){for(var y=new Nn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Fn.prototype.filter=function(a){for(var y=new Nn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Fn.prototype.copy=function(){return new Fn(this.ma)},Fn.prototype.Iv=function(){var a=new Nn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Fn.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Fn.prototype.Hv=function(){var a=new Ln,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},hn.Object.defineProperties(Fn.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Ri:new cn(this.ma)}}}),Fn.prototype.toList=Fn.prototype.Hv,Fn.prototype.toArray=Fn.prototype.Fa,Fn.prototype.toSet=Fn.prototype.Iv,Fn.prototype.first=Fn.prototype.first,Fn.prototype.clear=Fn.prototype.clear,Fn.prototype.delete=Fn.prototype.delete,Fn.prototype.remove=Fn.prototype.remove,Fn.prototype.has=Fn.prototype.has,Fn.prototype.contains=Fn.prototype.contains,Fn.prototype.add=Fn.prototype.add,Fn.prototype.thaw=Fn.prototype.ka,Fn.prototype.freeze=Fn.prototype.freeze,Fn.className="MapKeySet";function pr(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}pr.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},pr.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)},pr.prototype.Ad=function(){return this.next()},pr.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},pr.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},pr.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},pr.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},pr.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},pr.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Ln;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},pr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},pr.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},hn.Object.defineProperties(pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),pr.prototype.first=pr.prototype.first,pr.prototype.hasNext=pr.prototype.Ad,pr.prototype.next=pr.prototype.next,pr.prototype.reset=pr.prototype.reset,pr.className="MapValueSetIterator";function li(a,y){this.key=a,this.value=y,this.ll=this.va=null}li.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},li.className="KeyValuePair";function Zr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Zr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Zr.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)},Zr.prototype.Ad=function(){return this.next()},Zr.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},Zr.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},Zr.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},Zr.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},Zr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Zr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Ln;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Zr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Zr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},hn.Object.defineProperties(Zr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Zr.prototype.first=Zr.prototype.first,Zr.prototype.hasNext=Zr.prototype.Ad,Zr.prototype.next=Zr.prototype.next,Zr.prototype.reset=Zr.prototype.reset,Zr.className="MapIterator";function Vn(a){vo(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"&&Zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ze=Vn.prototype,Ze.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return this._isFrozen=!1,this},Ze.toString=function(){return"Map()#"+Xt(this)},Ze.add=function(a,y){this._isFrozen&&ir(this,a);var x=a;Tn(a)&&(x=bs(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new li(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()):b.value=y,this},Ze.set=function(a,y){return this.add(a,y)},Ze.addAll=function(a){if(a===null)return this;if(vr(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof Vn)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Ze.first=function(){return this.ea},Vn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Vn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Vn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Vn.prototype.map=function(a){for(var y=new Vn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Vn.prototype.filter=function(a){for(var y=new Vn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Ze=Vn.prototype,Ze.contains=function(a){var y=a;return Tn(a)&&(y=Xt(a),y===void 0)?!1:this.Tb[y]!==void 0},Ze.has=function(a){return this.contains(a)},Ze.I=function(a){var y=a;return Tn(a)&&(y=Xt(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Ze.get=function(a){return this.I(a)},Ze.remove=function(a){if(a===null)return!1;this._isFrozen&&ir(this,a);var y=a;if(Tn(a)&&(y=Xt(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},Ze.delete=function(a){return this.remove(a)},Ze.clear=function(){this._isFrozen&&ir(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},Vn.prototype.copy=function(){var a=new Vn,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Vn.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new li(E.key,E.value),x++}return y},Vn.prototype.Lf=function(){return new Fn(this)},hn.Object.defineProperties(Vn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Ri;var a=this.Sa;return a!==null?(a.reset(),a):new Zr(this)}},iteratorKeys:{get:function(){return 0>=this.count?Ri:new cn(this)}},iteratorValues:{get:function(){if(0>=this.count)return Ri;var a=this.jf;return a!==null?(a.reset(),a):new pr(this)}}}),Vn.prototype.toKeySet=Vn.prototype.Lf,Vn.prototype.toArray=Vn.prototype.Fa,Vn.prototype.clear=Vn.prototype.clear,Vn.prototype.delete=Vn.prototype.delete,Vn.prototype.remove=Vn.prototype.remove,Vn.prototype.get=Vn.prototype.get,Vn.prototype.getValue=Vn.prototype.I,Vn.prototype.has=Vn.prototype.has,Vn.prototype.contains=Vn.prototype.contains,Vn.prototype.first=Vn.prototype.first,Vn.prototype.addAll=Vn.prototype.addAll,Vn.prototype.set=Vn.prototype.set,Vn.prototype.add=Vn.prototype.add,Vn.prototype.thaw=Vn.prototype.ka,Vn.prototype.freeze=Vn.prototype.freeze,Vn.className="Map";function Mt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Zt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var yo,za,Gs,Ua,Fa;Mt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Mt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Mt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Mt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Mt.prototype.copy=function(){var a=new Mt;return a.x=this.x,a.y=this.y,a},Ze=Mt.prototype,Ze.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ze.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Da(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new Mt(x,E)}return new Mt}function yl(a){return a.x.toString()+" "+a.y.toString()}Ze.toString=function(){return"Point("+this.x+","+this.y+")"},Ze.D=function(a){return a instanceof Mt?this.x===a.x&&this.y===a.y:!1},Ze.hi=function(a,y){return this.x===a&&this.y===y},Ze.Xa=function(a){return Wt.B(this.x,a.x)&&Wt.B(this.y,a.y)},Ze.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ze.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ze.offset=function(a,y){return this.x+=a,this.y+=y,this},Mt.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},Ze=Mt.prototype,Ze.scale=function(a,y){return this.x*=a,this.y*=y,this},Ze.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ze.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ze.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},Ze.ab=function(a){return fs(a.x-this.x,a.y-this.y)},Ze.direction=function(a,y){return fs(a-this.x,y-this.y)};function fs(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}Ze.Ry=function(a,y){return Wt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ze.fA=function(a,y,x,b){return Wt.qh(a,y,x,b,this.x,this.y,this),this},Ze.gA=function(a,y){return Wt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ze.uA=function(a,y,x,b){return Wt.No(this.x,this.y,a,y,x,b,this),this},Ze.vA=function(a,y){return Wt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ze.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},Ze.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},Ze.transform=function(a){return a.Ga(this),this};function No(a,y){return y.Cd(a),a}function ea(a,y,x,b,E,te){var ne=E-x,se=te-b,he=ne*ne+se*se;x-=a,b-=y;var ge=-x*ne-b*se;return 0>=ge||ge>=he?(ne=E-a,se=te-y,Math.min(x*x+b*b,ne*ne+se*se)):(a=ne*b-se*x,a*a/he)}function zr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Tr(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}Ze.w=function(){return isFinite(this.x)&&isFinite(this.y)},Mt.alloc=function(){var a=ti.pop();return a===void 0?new Mt:a},Mt.allocAt=function(a,y){var x=ti.pop();return x===void 0?new Mt(a,y):(x.x=a,x.y=y,x)},Mt.free=function(a){ti.push(a)},Mt.prototype.isReal=Mt.prototype.w,Mt.prototype.setSpot=Mt.prototype.yi,Mt.prototype.setRectSpot=Mt.prototype.xi,Mt.prototype.snapToGridPoint=Mt.prototype.vA,Mt.prototype.snapToGrid=Mt.prototype.uA,Mt.prototype.projectOntoLineSegmentPoint=Mt.prototype.gA,Mt.prototype.projectOntoLineSegment=Mt.prototype.fA,Mt.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return Wt.Rl(a,y,x,b,E,te,ne,se)},Mt.prototype.compareWithLineSegmentPoint=Mt.prototype.Ry,Mt.compareWithLineSegment=function(a,y,x,b,E,te){return Wt.Fl(a,y,x,b,E,te)},Mt.prototype.direction=Mt.prototype.direction,Mt.prototype.directionPoint=Mt.prototype.ab,Mt.prototype.normalize=Mt.prototype.normalize,Mt.prototype.distanceSquared=Mt.prototype.zd,Mt.prototype.distanceSquaredPoint=Mt.prototype.Bf,Mt.prototype.scale=Mt.prototype.scale,Mt.prototype.rotate=Mt.prototype.rotate,Mt.prototype.offset=Mt.prototype.offset,Mt.prototype.subtract=Mt.prototype.re,Mt.prototype.add=Mt.prototype.add,Mt.prototype.equalsApprox=Mt.prototype.Xa,Mt.prototype.equalTo=Mt.prototype.hi,Mt.prototype.equals=Mt.prototype.D,Mt.prototype.set=Mt.prototype.set,Mt.prototype.setTo=Mt.prototype.sg;var ti=[];Mt.className="Point",Mt.parse=Da,Mt.stringify=yl,Mt.distanceLineSegmentSquared=ea,Mt.distanceSquared=zr,Mt.direction=Tr,Mt.Origin=yo=new Mt(0,0).ja(),Mt.InfiniteTopLeft=za=new Mt(-1/0,-1/0).ja(),Mt.InfiniteBottomRight=Gs=new Mt(1/0,1/0).ja(),Mt.SixPoint=Ua=new Mt(6,6).ja(),Mt.NoPoint=Fa=new Mt(NaN,NaN).ja(),Mt.parse=Da,Mt.stringify=yl,Mt.distanceLineSegmentSquared=ea,Mt.distanceSquared=zr,Mt.direction=Tr;function jn(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):Zt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Gi,So,ta,Oo,Wo,na,Ya;jn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},jn.prototype.h=function(a,y){return this.width=a,this.height=y,this},jn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},jn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},jn.prototype.copy=function(){var a=new jn;return a.width=this.width,a.height=this.height,a},Ze=jn.prototype,Ze.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ze.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ia(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new jn(x,E)}return new jn}function Ol(a){return a.width.toString()+" "+a.height.toString()}Ze.toString=function(){return"Size("+this.width+","+this.height+")"},Ze.D=function(a){return a instanceof jn?this.width===a.width&&this.height===a.height:!1},Ze.hi=function(a,y){return this.width===a&&this.height===y},Ze.Xa=function(a){return Wt.B(this.width,a.width)&&Wt.B(this.height,a.height)},Ze.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},Ze.w=function(){return isFinite(this.width)&&isFinite(this.height)},jn.alloc=function(){var a=Hl.pop();return a===void 0?new jn:a},jn.free=function(a){Hl.push(a)},jn.prototype.isReal=jn.prototype.w,jn.prototype.inflate=jn.prototype.Bc,jn.prototype.equalsApprox=jn.prototype.Xa,jn.prototype.equalTo=jn.prototype.hi,jn.prototype.equals=jn.prototype.D,jn.prototype.set=jn.prototype.set,jn.prototype.setTo=jn.prototype.sg;var Hl=[];jn.className="Size",jn.parse=Ia,jn.stringify=Ol,jn.ZeroSize=Gi=new jn(0,0).ja(),jn.OneSize=So=new jn(1,1).ja(),jn.SixSize=ta=new jn(6,6).ja(),jn.EightSize=Oo=new jn(8,8).ja(),jn.TenSize=Wo=new jn(10,10).ja(),jn.InfiniteSize=na=new jn(1/0,1/0).ja(),jn.NoSize=Ya=new jn(NaN,NaN).ja(),jn.parse=Ia,jn.stringify=Ol;function rn(a,y,x,b){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 b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof Mt?(x=a.x,a=a.y,y instanceof Mt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof jn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Zt("Incorrect second argument supplied to Rect constructor "+y)):Zt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ze=rn.prototype,Ze.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ze.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function us(a,y,x){a.width=y,a.height=x}Ze.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Ze.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ze.dd=function(a){return this.x=a.x,this.y=a.y,this},Ze.tA=function(a){return this.width=a.width,this.height=a.height,this},rn.prototype.copy=function(){var a=new rn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ze=rn.prototype,Ze.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ze.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ol(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;(b=a[y++])&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new rn(x,E,te,ne)}return new rn}function au(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ze.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ze.D=function(a){return a instanceof rn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ze.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Ze.Xa=function(a){return Wt.B(this.x,a.x)&&Wt.B(this.y,a.y)&&Wt.B(this.width,a.width)&&Wt.B(this.height,a.height)};function co(a,y){return Wt.$(a.x,y.x)&&Wt.$(a.y,y.y)&&Wt.$(a.width,y.width)&&Wt.$(a.height,y.height)}Ze.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ze.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},Ze.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},Ze.offset=function(a,y){return this.x+=a,this.y+=y,this},Ze.Bc=function(a,y){return Sl(this,y,a,y,a)},Ze.Co=function(a){return Sl(this,a.top,a.right,a.bottom,a.left)},Ze.Fv=function(a){return Sl(this,-a.top,-a.right,-a.bottom,-a.left)},Ze.Hz=function(a,y,x,b){return Sl(this,a,y,x,b)};function Sl(a,y,x,b,E){var te=a.width;return x+E<=-te?(a.x+=te/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}Ze.Ex=function(a){return jl(this,a.x,a.y,a.width,a.height)},Ze.Uu=function(a,y,x,b){return jl(this,a,y,x,b)};function jl(a,y,x,b,E){var te=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=Math.max(0,y-te),a.height=Math.max(0,x-ne),a}Ze.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ze.Vu=function(a,y,x,b){var E=this.width,te=this.x;return E!==1/0&&x!==1/0&&(E+=te,x+=a,isNaN(x)||isNaN(E)||te>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function Kl(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}Ze.Ye=function(a){return xo(this,a.x,a.y,0,0)},Ze.ed=function(a){return xo(this,a.x,a.y,a.width,a.height)},Ze.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),xo(this,a,y,x,b)};function xo(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}Ze.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 ma(a,y,x,b,E,te,ne,se){return ne===void 0&&(ne=0),se===void 0&&(se=0),a<=E&&E+ne<=a+x&&y<=te&&te+se<=y+b}function mi(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}Ze.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ze.Mz=function(){return this.width===0&&this.height===0},rn.alloc=function(){var a=Yo.pop();return a===void 0?new rn:a},rn.allocAt=function(a,y,x,b){var E=Yo.pop();return E===void 0?new rn(a,y,x,b):E.h(a,y,x,b)},rn.free=function(a){Yo.push(a)},hn.Object.defineProperties(rn.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 Mt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new jn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Mt(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}}}),rn.prototype.isEmpty=rn.prototype.Mz,rn.prototype.isReal=rn.prototype.w,rn.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Wt.Fx(a,y,x,b,E,te,ne,se)},rn.prototype.setSpot=rn.prototype.yi,rn.prototype.union=rn.prototype.Kv,rn.prototype.unionRect=rn.prototype.ed,rn.prototype.unionPoint=rn.prototype.Ye,rn.prototype.intersects=rn.prototype.Vu,rn.prototype.intersectsRect=rn.prototype.Yc,rn.prototype.intersect=rn.prototype.Uu,rn.prototype.intersectRect=rn.prototype.Ex,rn.prototype.grow=rn.prototype.Hz,rn.prototype.subtractMargin=rn.prototype.Fv,rn.prototype.addMargin=rn.prototype.Co,rn.prototype.inflate=rn.prototype.Bc,rn.prototype.offset=rn.prototype.offset,rn.prototype.contains=rn.prototype.contains,rn.prototype.containsRect=rn.prototype.Re,rn.prototype.containsPoint=rn.prototype.ca,rn.prototype.equalsApprox=rn.prototype.Xa,rn.prototype.equalTo=rn.prototype.hi,rn.prototype.equals=rn.prototype.D,rn.prototype.setSize=rn.prototype.tA,rn.prototype.setPoint=rn.prototype.dd,rn.prototype.set=rn.prototype.set,rn.prototype.setTo=rn.prototype.sg;var Ai=null,Mo=null,Yo=[];rn.className="Rect",rn.parse=ol,rn.stringify=au,rn.contains=ma,rn.intersects=mi,rn.ZeroRect=Ai=new rn(0,0,0,0).ja(),rn.NoRect=Mo=new rn(NaN,NaN,NaN,NaN).ja(),rn.parse=ol,rn.stringify=au,rn.contains=ma,rn.intersects=mi;function yr(a,y,x,b){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):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):Zt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}yr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},yr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},yr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},yr.prototype.copy=function(){var a=new yr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ze=yr.prototype,Ze.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ze.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ph(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new yr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new yr(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new yr(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new yr(x,E):new yr(x,E,te,ne)}return new yr}function Ns(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ze.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ze.D=function(a){return a instanceof yr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ze.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Ze.Xa=function(a){return Wt.B(this.top,a.top)&&Wt.B(this.right,a.right)&&Wt.B(this.bottom,a.bottom)&&Wt.B(this.left,a.left)},Ze.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},yr.alloc=function(){var a=Eh.pop();return a===void 0?new yr:a},yr.free=function(a){Eh.push(a)},yr.prototype.isReal=yr.prototype.w,yr.prototype.equalsApprox=yr.prototype.Xa,yr.prototype.equalTo=yr.prototype.hi,yr.prototype.equals=yr.prototype.D,yr.prototype.set=yr.prototype.set,yr.prototype.setTo=yr.prototype.sg;var Vl=null,Ch=null,Eh=[];yr.className="Margin",yr.parse=Ph,yr.stringify=Ns,yr.ZeroMargin=Vl=new yr(0,0,0,0).ja(),yr.TwoMargin=Ch=new yr(2,2,2,2).ja(),yr.parse=Ph,yr.stringify=Ns;function nr(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var ba,Ma,Xl,Ta,ds,oi,vu,al,Ps,Yl,Yh,yc,Fl,yu,Xc,gd,Yc,$d,md,Vu,kh,Su,Zc,Tf,vd,Ba,qd,Lf,Jc,Zh,xl,zs,is,ps,Af,Xu;nr.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},nr.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},nr.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},nr.prototype.copy=function(){var a=new nr;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ze=nr.prototype,Ze.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ze.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ua(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Nf(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ba;if(a==="TopLeft")return Ma;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Xl;if(a==="TopRight")return Ta;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return ds;if(a==="Center")return oi;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return vu;if(a==="BottomLeft")return al;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ps;if(a==="BottomRight")return Yl;if(a==="TopSide")return Yh;if(a==="LeftSide")return yc;if(a==="RightSide")return Fl;if(a==="BottomSide")return yu;if(a==="TopBottomSides")return Xc;if(a==="LeftRightSides")return gd;if(a==="TopLeftSides")return Yc;if(a==="TopRightSides")return $d;if(a==="BottomLeftSides")return md;if(a==="BottomRightSides")return Vu;if(a==="NotTopSide")return kh;if(a==="NotLeftSide")return Su;if(a==="NotRightSide")return Zc;if(a==="NotBottomSide")return Tf;if(a==="AllSides")return vd;if(a==="Default")return Ba;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new nr(x,E,te,ne)}return new nr}function Of(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Ze.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(ba)?"None":this.D(Ma)?"TopLeft":this.D(Xl)?"Top":this.D(Ta)?"TopRight":this.D(ds)?"Left":this.D(oi)?"Center":this.D(vu)?"Right":this.D(al)?"BottomLeft":this.D(Ps)?"Bottom":this.D(Yl)?"BottomRight":this.D(Yh)?"TopSide":this.D(yc)?"LeftSide":this.D(Fl)?"RightSide":this.D(yu)?"BottomSide":this.D(Xc)?"TopBottomSides":this.D(gd)?"LeftRightSides":this.D(Yc)?"TopLeftSides":this.D($d)?"TopRightSides":this.D(md)?"BottomLeftSides":this.D(Vu)?"BottomRightSides":this.D(kh)?"NotTopSide":this.D(Su)?"NotLeftSide":this.D(Zc)?"NotRightSide":this.D(Tf)?"NotBottomSide":this.D(vd)?"AllSides":this.D(Ba)?"Default":"None"},Ze.D=function(a){return a instanceof nr?(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},Ze.gv=function(){return new nr(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Ze.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(qd))a=yc;else if(a.D(Lf))a=Fl;else if(a.D(Jc))a=Yh;else if(a.D(Zh))a=yu;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Ze.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Ze.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Ze.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Ze.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Ze.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},nr.alloc=function(){var a=jf.pop();return a===void 0?new nr:a},nr.free=function(a){jf.push(a)},nr.prototype.isDefault=nr.prototype.Xb,nr.prototype.isNone=nr.prototype.ys,nr.prototype.isSide=nr.prototype.$c,nr.prototype.isNoSpot=nr.prototype.Mc,nr.prototype.isSpot=nr.prototype.sb,nr.prototype.includesSide=nr.prototype.Hf,nr.prototype.opposite=nr.prototype.gv,nr.prototype.equals=nr.prototype.D,nr.prototype.set=nr.prototype.set,nr.prototype.setTo=nr.prototype.sg;var jf=[];nr.className="Spot",nr.parse=Nf,nr.stringify=Of,nr.None=ba=ua(new nr(0,0,0,0),0).ja(),nr.Default=Ba=ua(new nr(0,0,-1,0),-1).ja(),nr.TopLeft=Ma=new nr(0,0,0,0).ja(),nr.TopCenter=Xl=new nr(.5,0,0,0).ja(),nr.TopRight=Ta=new nr(1,0,0,0).ja(),nr.LeftCenter=ds=new nr(0,.5,0,0).ja(),nr.Center=oi=new nr(.5,.5,0,0).ja(),nr.RightCenter=vu=new nr(1,.5,0,0).ja(),nr.BottomLeft=al=new nr(0,1,0,0).ja(),nr.BottomCenter=Ps=new nr(.5,1,0,0).ja(),nr.BottomRight=Yl=new nr(1,1,0,0).ja(),nr.MiddleTop=xl=Xl,nr.MiddleLeft=zs=ds,nr.MiddleRight=is=vu,nr.MiddleBottom=ps=Ps,nr.Top=Jc=Xl,nr.Left=qd=ds,nr.Right=Lf=vu,nr.Bottom=Zh=Ps,nr.TopSide=Yh=ua(new nr(0,0,1,1),1).ja(),nr.LeftSide=yc=ua(new nr(0,0,1,2),1).ja(),nr.RightSide=Fl=ua(new nr(0,0,1,4),1).ja(),nr.BottomSide=yu=ua(new nr(0,0,1,8),1).ja(),nr.TopBottomSides=Xc=ua(new nr(0,0,1,9),1).ja(),nr.LeftRightSides=gd=ua(new nr(0,0,1,6),1).ja(),nr.TopLeftSides=Yc=ua(new nr(0,0,1,3),1).ja(),nr.TopRightSides=$d=ua(new nr(0,0,1,5),1).ja(),nr.BottomLeftSides=md=ua(new nr(0,0,1,10),1).ja(),nr.BottomRightSides=Vu=ua(new nr(0,0,1,12),1).ja(),nr.NotTopSide=kh=ua(new nr(0,0,1,14),1).ja(),nr.NotLeftSide=Su=ua(new nr(0,0,1,13),1).ja(),nr.NotRightSide=Zc=ua(new nr(0,0,1,11),1).ja(),nr.NotBottomSide=Tf=ua(new nr(0,0,1,7),1).ja(),nr.AllSides=vd=ua(new nr(0,0,1,15),1).ja(),Af=new nr(.156,.156).ja(),Xu=new nr(.844,.844).ja(),nr.parse=Nf,nr.stringify=Of;function Br(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Br.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},Br.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},Br.prototype.copy=function(){var a=new Br;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},Br.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Br.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},Br.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Br.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Br.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=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=b,this.m22=E,this},Br.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,te=a.m11*y,ne=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*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Br.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),te=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},Br.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},Ze=Br.prototype,Ze.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ze.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ze.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)},Ze.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ze.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ze.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,se=this.m21,he=this.m22,ge=this.dx,ye=this.dy,Me=y*te+x*se+ge,Re=y*ne+x*he+ye,Ve=b*te+x*se+ge,qe=b*ne+x*he+ye;return x=y*te+E*se+ge,y=y*ne+E*he+ye,te=b*te+E*se+ge,b=b*ne+E*he+ye,E=Math.min(Me,Ve),Me=Math.max(Me,Ve),Ve=Math.min(Re,qe),Re=Math.max(Re,qe),E=Math.min(E,x),Me=Math.max(Me,x),Ve=Math.min(Ve,y),Re=Math.max(Re,y),E=Math.min(E,te),Me=Math.max(Me,te),Ve=Math.min(Ve,b),Re=Math.max(Re,b),a.h(E,Ve,Me-E,Re-Ve),a},Br.alloc=function(){var a=Qc.pop();return a===void 0?new Br:a},Br.free=function(a){Qc.push(a)},Br.prototype.transformRect=Br.prototype.pp,Br.prototype.transformPoint=Br.prototype.Ga,Br.prototype.scale=Br.prototype.scale,Br.prototype.translate=Br.prototype.translate,Br.prototype.rotate=Br.prototype.rotate,Br.prototype.invert=Br.prototype.Vj,Br.prototype.multiplyInverted=Br.prototype.bv,Br.prototype.multiply=Br.prototype.multiply,Br.prototype.reset=Br.prototype.reset,Br.prototype.isIdentity=Br.prototype.ws,Br.prototype.equals=Br.prototype.D,Br.prototype.setTransform=Br.prototype.setTransform,Br.prototype.set=Br.prototype.set;var Qc=[];Br.className="Transform",Br.xF="54a702f3e53909c447824c6706603faf4c";var Wt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Wt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Wt.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,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var se=a,he=x;else se=x,he=a;if(y<b)var ge=y,ye=b;else ge=b,ye=y;if(a===x)return ge<=ne&&ne<=ye&&a-E<=te&&te<=a+E;if(y===b)return se<=te&&te<=he&&y-E<=ne&&ne<=y+E;if(he+=E,se-=E,se<=te&&te<=he&&(ye+=E,ge-=E,ge<=ne&&ne<=ye))if(he-se>ye-ge)if(a-x>E||x-a>E){if(te=(b-y)/(x-a)*(te-a)+y,te-E<=ne&&ne<=te+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=te&&te<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,te,ne,se,he,ge,ye,Me){if(Wt.Yb(a,y,ne,se,Me,x,b)&&Wt.Yb(a,y,ne,se,Me,E,te))return Wt.Yb(a,y,ne,se,Me,ge,ye);var Re=(a+x)/2,Ve=(y+b)/2,qe=(x+E)/2,it=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Re+qe)/2,x=(Ve+it)/2,qe=(qe+E)/2,it=(it+te)/2;var At=(b+qe)/2,bt=(x+it)/2;return Wt.cs(a,y,Re,Ve,b,x,At,bt,he,ge,ye,Me)||Wt.cs(At,bt,qe,it,E,te,ne,se,he,ge,ye,Me)},ax:function(a,y,x,b,E,te,ne,se,he){var ge=(x+E)/2,ye=(b+te)/2;return he.h((((a+x)/2+ge)/2+(ge+(E+ne)/2)/2)/2,(((y+b)/2+ye)/2+(ye+(te+se)/2)/2)/2),he},My:function(a,y,x,b,E,te,ne,se){var he=(x+E)/2,ge=(b+te)/2;return Tr(((a+x)/2+he)/2,((y+b)/2+ge)/2,(he+(E+ne)/2)/2,(ge+(te+se)/2)/2)},Dl:function(a,y,x,b,E,te,ne,se,he,ge){if(Wt.Yb(a,y,ne,se,he,x,b)&&Wt.Yb(a,y,ne,se,he,E,te))xo(ge,a,y,0,0),xo(ge,ne,se,0,0);else{var ye=(a+x)/2,Me=(y+b)/2,Re=(x+E)/2,Ve=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+Re)/2,x=(Me+Ve)/2,Re=(Re+E)/2,Ve=(Ve+te)/2;var qe=(b+Re)/2,it=(x+Ve)/2;Wt.Dl(a,y,ye,Me,b,x,qe,it,he,ge),Wt.Dl(qe,it,Re,Ve,E,te,ne,se,he,ge)}return ge},Qe:function(a,y,x,b,E,te,ne,se,he,ge){if(Wt.Yb(a,y,ne,se,he,x,b)&&Wt.Yb(a,y,ne,se,he,E,te))ge.length===0&&(ge.push(a),ge.push(y)),ge.push(ne),ge.push(se);else{var ye=(a+x)/2,Me=(y+b)/2,Re=(x+E)/2,Ve=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+Re)/2,x=(Me+Ve)/2,Re=(Re+E)/2,Ve=(Ve+te)/2;var qe=(b+Re)/2,it=(x+Ve)/2;Wt.Qe(a,y,ye,Me,b,x,qe,it,he,ge),Wt.Qe(qe,it,Re,Ve,E,te,ne,se,he,ge)}return ge},jv:function(a,y,x,b,E,te,ne,se,he,ge){if(Wt.Yb(a,y,E,te,ge,x,b))return Wt.Yb(a,y,E,te,ge,se,he);var ye=(a+x)/2,Me=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Re=(ye+x)/2,Ve=(Me+b)/2;return Wt.jv(a,y,ye,Me,Re,Ve,ne,se,he,ge)||Wt.jv(Re,Ve,x,b,E,te,ne,se,he,ge)},OA:function(a,y,x,b,E,te,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+te)/2)/2),ne},iv:function(a,y,x,b,E,te,ne,se){if(Wt.Yb(a,y,E,te,ne,x,b))xo(se,a,y,0,0),xo(se,E,te,0,0);else{var he=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Me=(ge+b)/2;Wt.iv(a,y,he,ge,ye,Me,ne,se),Wt.iv(ye,Me,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(Wt.Yb(a,y,E,te,ne,x,b))se.length===0&&(se.push(a),se.push(y)),se.push(E),se.push(te);else{var he=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Me=(ge+b)/2;Wt.ep(a,y,he,ge,ye,Me,ne,se),Wt.ep(ye,Me,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,ge,ye,Me,Re,Ve){if(Wt.Yb(a,y,ne,se,Re,x,b)&&Wt.Yb(a,y,ne,se,Re,E,te))return!Wt.Rl(a,y,ne,se,he,ge,ye,Me)||(Re=(a-ne)*(ge-Me)-(y-se)*(he-ye),Re===0)?!1:(Ve.h(((a*se-y*ne)*(he-ye)-(a-ne)*(he*Me-ge*ye))/Re,((a*se-y*ne)*(ge-Me)-(y-se)*(he*Me-ge*ye))/Re),!0);var qe=(a+x)/2,it=(y+b)/2,At=(x+E)/2,bt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(qe+At)/2,x=(it+bt)/2,At=(At+E)/2,bt=(bt+te)/2;var Ot=(b+At)/2,Ft=(x+bt)/2,It=1/0,Gt=!1,Yt=0,Bn=0;return Wt.Eo(a,y,qe,it,b,x,Ot,Ft,he,ge,ye,Me,Re,Ve)&&(a=(Ve.x-he)*(Ve.x-he)+(Ve.y-ge)*(Ve.y-ge),a<It&&(It=a,Gt=!0,Yt=Ve.x,Bn=Ve.y)),Wt.Eo(Ot,Ft,At,bt,E,te,ne,se,he,ge,ye,Me,Re,Ve)&&(Ve.x-he)*(Ve.x-he)+(Ve.y-ge)*(Ve.y-ge)<It&&(Gt=!0,Yt=Ve.x,Bn=Ve.y),Gt&&(Ve.x=Yt,Ve.y=Bn),Gt},Fo:function(a,y,x,b,E,te,ne,se,he,ge,ye,Me,Re){var Ve=0;if(Wt.Yb(a,y,ne,se,Re,x,b)&&Wt.Yb(a,y,ne,se,Re,E,te)){if(Re=(a-ne)*(ge-Me)-(y-se)*(he-ye),Re===0)return Ve;var qe=((a*se-y*ne)*(he-ye)-(a-ne)*(he*Me-ge*ye))/Re,it=((a*se-y*ne)*(ge-Me)-(y-se)*(he*Me-ge*ye))/Re;if(qe>=ye)return Ve;if((he>ye?he-ye:ye-he)<(ge>Me?ge-Me:Me-ge)){if(y<se?(he=y,a=se):(he=se,a=y),it<he||it>a)return Ve}else if(a<ne?(he=a,a=ne):he=ne,qe<he||qe>a)return Ve;0<Re?Ve++:0>Re&&Ve--}else{qe=(a+x)/2,it=(y+b)/2;var At=(x+E)/2,bt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(qe+At)/2,x=(it+bt)/2,At=(At+E)/2,bt=(bt+te)/2;var Ot=(b+At)/2,Ft=(x+bt)/2;Ve+=Wt.Fo(a,y,qe,it,b,x,Ot,Ft,he,ge,ye,Me,Re),Ve+=Wt.Fo(Ot,Ft,At,bt,E,te,ne,se,he,ge,ye,Me,Re)}return Ve},qh:function(a,y,x,b,E,te,ne){return Wt.$(a,x)?(y<b?(x=y,y=b):x=b,te<x?(ne.h(a,x),!1):te>y?(ne.h(a,y),!1):(ne.h(a,te),!0)):Wt.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-te)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,te,ne,se,he){return Wt.B(a,x)&&Wt.B(y,b)?(he.h(a,y),!1):Wt.$(E,ne)?Wt.$(a,x)?(Wt.qh(a,y,x,b,E,te,he),!1):Wt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),Wt.$(a,x)?(x=se*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(he.h(a,E),!1):x>y?(he.h(a,y),!1):(he.h(a,x),!0)):(ne=(b-y)/(x-a),Wt.$(se,ne)?(Wt.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),Wt.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(he.h(b,y),!1):E>a?(he.h(a,y),!1):(he.h(E,y),!0)):Wt.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return Wt.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,se,he,ge){function ye(At,bt){var Ot=(At-a)*(At-a)+(bt-y)*(bt-y);Ot<Me&&(Me=Ot,he.h(At,bt))}var Me=1/0;ye(he.x,he.y);var Re=0,Ve=0,qe=0,it=0;if(E<ne?(Re=E,Ve=ne):(Re=ne,Ve=E),te<se?(qe=E,it=ne):(qe=ne,it=E),Re=(Ve-Re)/2+ge,ge=(it-qe)/2+ge,E=(E+ne)/2,te=(te+se)/2,Re===0||ge===0)return he;if(.5>(x>a?x-a:a-x)){if(Re=1-(x-E)*(x-E)/(Re*Re),0>Re)return he;Re=Math.sqrt(Re),b=-ge*Re+te,ye(x,ge*Re+te),ye(x,b)}else{if(x=(b-y)/(x-a),b=1/(Re*Re)+x*x/(ge*ge),se=2*x*(y-x*a)/(ge*ge)-2*x*te/(ge*ge)-2*E/(Re*Re),Re=se*se-4*b*(2*x*a*te/(ge*ge)-2*y*te/(ge*ge)+te*te/(ge*ge)+E*E/(Re*Re)-1+(y-x*a)*(y-x*a)/(ge*ge)),0>Re)return he;Re=Math.sqrt(Re),ge=(-se+Re)/(2*b),ye(ge,x*ge-x*a+y),Re=(-se-Re)/(2*b),ye(Re,x*Re-x*a+y)}return he},Ff:function(a,y,x,b,E,te,ne,se,he){var ge=1e21,ye=a,Me=y;if(Wt.Ve(a,y,a,b,E,te,ne,se,he)){var Re=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te);Re<ge&&(ge=Re,ye=he.x,Me=he.y)}return Wt.Ve(x,y,x,b,E,te,ne,se,he)&&(Re=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),Re<ge&&(ge=Re,ye=he.x,Me=he.y)),Wt.Ve(a,y,x,y,E,te,ne,se,he)&&(y=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),y<ge&&(ge=y,ye=he.x,Me=he.y)),Wt.Ve(a,b,x,b,E,te,ne,se,he)&&(a=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),a<ge&&(ge=a,ye=he.x,Me=he.y)),he.h(ye,Me),1e21>ge},us:function(a,y,x){return Wt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,se){var he=a+x,ge=y+b;return E===ne?(te<se?(ne=te,te=se):ne=se,a<=E&&E<=he&&ne<=ge&&te>=y):te===se?(E<ne?(se=E,E=ne):se=ne,y<=te&&te<=ge&&se<=he&&E>=a):!!(ma(a,y,x,b,E,te)||ma(a,y,x,b,ne,se)||Wt.Rl(a,y,he,y,E,te,ne,se)||Wt.Rl(he,y,he,ge,E,te,ne,se)||Wt.Rl(he,ge,a,ge,E,te,ne,se)||Wt.Rl(a,ge,a,y,E,te,ne,se))},Rl:function(a,y,x,b,E,te,ne,se){return a===x&&y===b&&E===ne&&te===se?a===E&&y===te:0>=Wt.Fl(a,y,x,b,E,te)*Wt.Fl(a,y,x,b,ne,se)&&0>=Wt.Fl(E,te,ne,se,a,y)*Wt.Fl(E,te,ne,se,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var se=b>E?-1:1;te=[];var he=ne/2,ge=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return he=ge+se*Math.min(b,he),se=a+x*Math.cos(ge),ge=y+x*Math.sin(ge),a+=x*Math.cos(he),y+=x*Math.sin(he),x=(se+a)/2,he=(ge+y)/2,te.push([se,ge,x,he,x,he,a,y]),te;for(;1e-5<b;)E=ge+se*Math.min(b,he),te.push(Wt.Vy(x,ge,E,a,y)),b-=Math.abs(E-ge),ge=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),se=a*Math.sin(te),he=-se,ge=ne*ne+he*he,ye=ge+ne*ne+he*se;return ge=4/3*(Math.sqrt(2*ge*ye)-ye)/(ne*se-he*ne),se=ne-ge*he,ne=he+ge*ne,he=-ne,ge=te+y,te=Math.cos(ge),ge=Math.sin(ge),[b+a*Math.cos(y),E+a*Math.sin(y),b+se*te-ne*ge,E+se*ge+ne*te,b+se*te-he*ge,E+se*ge+he*te,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,te,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/te)*te+b;var se=x;return x+E-a<E/2&&(se=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(se,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,te=0>b;if(a<y)var ne=1,se=0;else ne=0,se=1;var he=ne===0?a:y,ge=ne===0?x:b;return(ne===0?E:te)&&(ge=-ge),ne=se,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),Wt.az(he,ne===0?a:y,ge,x,0,0)},az:function(a,y,x,b,E,te){if(0<b)if(0<x){E=a*a,te=y*y,a*=x;var ne=y*b,se=-te+ne,he=-te+Math.sqrt(a*a+ne*ne);y=se;for(var ge=0;9999999999>ge&&(y=.5*(se+he),!(y===se||y===he));++ge){var ye=a/(y+E),Me=ne/(y+te);if(ye=ye*ye+Me*Me-1,0<ye)se=y;else if(0>ye)he=y;else break}x=E*x/(y+E)-x,b=te*b/(y+te)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,te=a*x,te<b?(b=te/b,te=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+te*te)):x=Math.abs(x-a);return x},Ze:new jr,um:new jr,Mf:new jr,Nf:0,vm:100};Wt.za=Wt.AA;function An(a){vo(this),this.l=2,a===void 0&&(a=An.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===An.o?this.ee=new Ln:(An.V===null&&(An.V=new Ln().freeze()),this.ee=An.V),this.aq=this.ee.Ja,this.Ip=new rn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ma,this.gg=Yl,this.Rk=this.Sk=NaN,this.Uf=xn}An.prototype.copy=function(){var a=new An;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===An.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].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},An.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},An.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==An.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},An.prototype.ka=function(){if(Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==An.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},An.prototype.Xa=function(a){if(!(a instanceof An))return!1;if(this.type!==a.type)return this.type===An.j&&a.type===An.o?xu(this,a):a.type===An.j&&this.type===An.o?xu(a,this):!1;if(this.type===An.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return Wt.B(this.startX,a.startX)&&Wt.B(this.startY,a.startY)&&Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY)};function xu(a,y){return a.type!==An.j||y.type!==An.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Wt.B(a.startX,y.startX)&&Wt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Wi&&Wt.B(a.endX,y.endX)&&Wt.B(a.endY,y.endY))))}An.ia=function(a){return a.toString()},An.prototype.qb=function(a){a.classType===An&&(this.type=a)},An.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case An.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 An.u:var y=new rn(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 An.F:if(y=new rn(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 An.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var te=x[E];0<E&&(y+=" x "),te.isFilled&&(y+="F "),y+=te.toString(a)}return y;default:return this.type.toString()}},An.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},An.parse=function(a,y){function x(){return it>=It-1?!0:ge[it+1].match(Gt)!==null}function b(){return it++,ge[it]}function E(Cr){var Sr=parseFloat(b()),hi=parseFloat(b());At===At.toLowerCase()&&(Sr=Ft.x+Sr,hi=Ft.y+hi),Cr.h(Sr,hi)}function te(){return E(Ft),Ft}function ne(){return E(Ot),Ot}function se(){var Cr=bt.toLowerCase();return Cr!=="c"&&Cr!=="s"&&Cr!=="q"&&Cr!=="t"?Ft:new Mt(2*Ft.x-Ot.x,2*Ft.y-Ot.y)}y===void 0&&(y=!1);var he=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(he,"$1 $2"),a=a.replace(he,"$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 ge=a.split(" ");for(a=0;a<ge.length;a++){var ye=ge[a];if(ye.match(/(\.[0-9]*)(\.)/gm)!==null){he=xr();for(var Me="",Re=!1,Ve=0;Ve<ye.length;Ve++){var qe=ye[Ve];qe!=="."||Re?qe==="."?(he.push(Me),Me="."):Me+=qe:(Re=!0,Me+=qe)}for(he.push(Me),ge.splice(a,1),ye=0;ye<he.length;ye++)ge.splice(a+ye,0,he[ye]);a+=he.length-1,gr(he)}}var it=-1,At="",bt="";he=new Mt(0,0);var Ot=new Mt(0,0),Ft=new Mt(0,0),It=ge.length;a=N1(null),Re=Me=ye=!1,Ve=!0,qe=null;for(var Gt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(it>=It-1);)if(bt=At,At=b(),At!=="")switch(At.toUpperCase()){case"X":Ve=!0,Me=ye=!1;break;case"M":for(qe=te(),a.mc===null||Ve===!0?(Pp(a,qe.x,qe.y,ye,!Me,Re),Ve=!1):a.moveTo(qe.x,qe.y),he.assign(Ft);!x();)qe=te(),a.lineTo(qe.x,qe.y);break;case"L":for(;!x();)qe=te(),a.lineTo(qe.x,qe.y);break;case"H":for(;!x();)Ft=new Mt((At===At.toLowerCase()?Ft.x:0)+parseFloat(b()),Ft.y),a.lineTo(Ft.x,Ft.y);break;case"V":for(;!x();)Ft=new Mt(Ft.x,(At===At.toLowerCase()?Ft.y:0)+parseFloat(b())),a.lineTo(Ft.x,Ft.y);break;case"C":for(;!x();){qe=new Mt,E(qe);var Yt=ne(),Bn=te();Lc(a,qe.x,qe.y,Yt.x,Yt.y,Bn.x,Bn.y)}break;case"S":for(;!x();)qe=se(),Yt=ne(),Bn=te(),Lc(a,qe.x,qe.y,Yt.x,Yt.y,Bn.x,Bn.y);break;case"Q":for(;!x();)qe=ne(),Yt=te(),Um(a,qe.x,qe.y,Yt.x,Yt.y);break;case"T":for(;!x();)Ot=qe=se(),Yt=te(),Um(a,qe.x,qe.y,Yt.x,Yt.y);break;case"B":for(;!x();){qe=parseFloat(b()),Yt=parseFloat(b()),Bn=parseFloat(b());var Zn=parseFloat(b()),Hn=parseFloat(b()),En=Hn,fn=!1;x()||(En=parseFloat(b()),x()||(fn=parseFloat(b())!==0)),At===At.toLowerCase()&&(Bn+=Ft.x,Zn+=Ft.y),a.arcTo(qe,Yt,Bn,Zn,Hn,En,fn)}break;case"A":for(;!x();)qe=Math.abs(parseFloat(b())),Yt=Math.abs(parseFloat(b())),Bn=parseFloat(b()),Hn=Zn=!1,fn=En=0,En=b(),En.length===1?(Zn=!!parseFloat(En),Hn=!!parseFloat(b()),En=parseFloat(b())):En.length===2?(Zn=!!parseFloat(En[0]),Hn=!!parseFloat(En[1]),En=parseFloat(b())):(Zn=!!parseFloat(En[0]),Hn=!!parseFloat(En[1]),En=parseFloat(En.slice(2))),fn=parseFloat(b()),At===At.toLowerCase()&&(En=Ft.x+En,fn=Ft.y+fn),Ft.h(En,fn),Px(a,qe,Yt,Bn,Zn,Hn,En,fn);break;case"Z":bx(a),Ft.assign(he);break;case"F":for(qe="",Yt=1;ge[it+Yt];)if(ge[it+Yt]==="0")Re=!0,Yt++;else if(ge[it+Yt].match(/[Uu]/)!==null)Yt++;else if(ge[it+Yt].match(Gt)===null)Yt++;else{qe=ge[it+Yt];break}qe.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(qe="",Yt=1;ge[it+Yt];)if(ge[it+Yt].match(/[Ff]/)!==null)Yt++;else if(ge[it+Yt].match(Gt)===null)Yt++;else{qe=ge[it+Yt];break}qe.match(/[Mm]/)?Me=!0:a.mc.isShadowed=!1}if(he=a.os,Wm=a,y)for(y=he.figures.iterator;y.next();)y.value.isFilled=!0;return he},An.Ha=function(a,y){for(var x=a.length,b=Mt.alloc(),E=0;E<x;E++){var te=a[E];b.x=te[0],b.y=te[1],y.Ga(b),te[0]=b.x,te[1]=b.y,b.x=te[2],b.y=te[3],y.Ga(b),te[2]=b.x,te[3]=b.y,b.x=te[4],b.y=te[5],y.Ga(b),te[4]=b.x,te[5]=b.y,b.x=te[6],b.y=te[7],y.Ga(b),te[6]=b.x,te[7]=b.y}Mt.free(b)},An.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===An.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},An.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===An.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var te=0;te<E;te++){var ne=b[te];ne._isInvalidBounds=!1,ne.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),Jh(this,a,!1),xo(a,0,0,0,0),a.freeze()},An.prototype.ix=function(){var a=new rn;return Jh(this,a,!0),a};function Jh(a,y,x){switch(a.type){case An.j:case An.u:case An.F:x?y.h(a.od,a.pd,0,0):xo(y,a.od,a.pd,0,0),xo(y,a.Dc,a.Ec,0,0);break;case An.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var te=a[E];x&&E===0?y.h(te.startX,te.startY,0,0):xo(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,se=ne.length,he=te.startX,ge=te.startY,ye=0;ye<se;ye++){var Me=ne[ye];switch(Me.type){case Wi:case Ca:he=Me.endX,ge=Me.endY,xo(y,he,ge,0,0);break;case Za:Wt.Dl(he,ge,Me.point1X,Me.point1Y,Me.point2X,Me.point2Y,Me.endX,Me.endY,.5,y),he=Me.endX,ge=Me.endY;break;case wl:Wt.iv(he,ge,Me.point1X,Me.point1Y,Me.endX,Me.endY,.5,y),he=Me.endX,ge=Me.endY;break;case $o:case sl:var Re=Me.type===$o?Us(Me,te):Os(Me,te,he,ge),Ve=Re.length;if(Ve===0){he=Me.type===$o?Me.centerX:Me.endX,ge=Me.type===$o?Me.centerY:Me.endY,xo(y,he,ge,0,0);break}Me=null;for(var qe=0;qe<Ve;qe++)Me=Re[qe],Wt.Dl(Me[0],Me[1],Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.5,y);Me!==null&&(he=Me[6],ge=Me[7]);break;default:Zt("Unknown Segment type: "+Me.type)}}}break;default:Zt("Unknown Geometry type: "+a.type)}}An.prototype.normalize=function(){this._isFrozen&&ir(this);var a=this.ix();return this.offset(-a.x,-a.y),new Mt(-a.x,-a.y)},An.prototype.offset=function(a,y){return this._isFrozen&&ir(this),this.transform(1,0,0,1,a,y),this},An.prototype.scale=function(a,y){return this._isFrozen&&ir(this),this.transform(a,0,0,y,0,0),this},An.prototype.rotate=function(a,y,x){this._isFrozen&&ir(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Br.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Br.free(b),this},Ze=An.prototype,Ze.transform=function(a,y,x,b,E,te){switch(this.type){case An.j:case An.u:case An.F:var ne=this.od,se=this.pd;this.od=ne*a+se*x+E,this.pd=ne*y+se*b+te,ne=this.Dc,se=this.Ec,this.Dc=ne*a+se*x+E,this.Ec=ne*y+se*b+te;break;case An.o:for(var he=this.figures.s,ge=he.length,ye=0;ye<ge;ye++){var Me=he[ye];ne=Me.startX,se=Me.startY,Me.startX=ne*a+se*x+E,Me.startY=ne*y+se*b+te,Me=Me.segments.s;for(var Re=Me.length,Ve=0;Ve<Re;Ve++){var qe=Me[Ve];switch(qe.type){case Wi:case Ca:ne=qe.endX,se=qe.endY,qe.endX=ne*a+se*x+E,qe.endY=ne*y+se*b+te;break;case Za:ne=qe.point1X,se=qe.point1Y,qe.point1X=ne*a+se*x+E,qe.point1Y=ne*y+se*b+te,ne=qe.point2X,se=qe.point2Y,qe.point2X=ne*a+se*x+E,qe.point2Y=ne*y+se*b+te,ne=qe.endX,se=qe.endY,qe.endX=ne*a+se*x+E,qe.endY=ne*y+se*b+te;break;case wl:ne=qe.point1X,se=qe.point1Y,qe.point1X=ne*a+se*x+E,qe.point1Y=ne*y+se*b+te,ne=qe.endX,se=qe.endY,qe.endX=ne*a+se*x+E,qe.endY=ne*y+se*b+te;break;case $o:ne=qe.centerX,se=qe.centerY,qe.centerX=ne*a+se*x+E,qe.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),qe.startAngle+=ne),0>a&&(qe.startAngle=180-qe.startAngle,qe.sweepAngle=-qe.sweepAngle),0>b&&(qe.startAngle=-qe.startAngle,qe.sweepAngle=-qe.sweepAngle),qe.radiusX*=Math.sqrt(a*a+x*x),qe.radiusY!==void 0&&(qe.radiusY*=Math.sqrt(y*y+b*b));break;case sl:if(ne=qe.endX,se=qe.endY,qe.endX=ne*a+se*x+E,qe.endY=ne*y+se*b+te,qe.radiusX===0||qe.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),qe.xAxisRotation+=ne),0>a&&(qe.xAxisRotation=180-qe.xAxisRotation,qe.isClockwiseArc=!qe.isClockwiseArc),0>b&&(qe.xAxisRotation=-qe.xAxisRotation,qe.isClockwiseArc=!qe.isClockwiseArc),qe.radiusX*=Math.sqrt(a*a+x*x),qe.radiusY*=Math.sqrt(y*y+b*b);break;default:Zt("Unknown Segment type: "+qe.type)}}}}return this._isInvalidBounds=!0,this},Ze.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,te=this.Ec;switch(this.type){case An.j:return Wt.Yb(x,b,E,te,y,a.x,a.y);case An.u:var ne=rn.allocAt(Math.min(x,E)-y,Math.min(b,te)-y,Math.abs(E-x)+2*y,Math.abs(te-b)+2*y);return a=ne.ca(a),rn.free(ne),a;case An.F:ne=Math.min(x,E)-y;var se=Math.min(b,te)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(te-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),se=a.y-(se+y),1>=ne*ne/(x*x)+se*se/(y*y));case An.o:return sh(this,a,y,!0,!1);default:return!1}};function sh(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,se=0,he,ge,ye,Me,Re=a.figures.s,Ve=Re.length,qe=0;qe<Ve;qe++){var it=Re[qe],At=!it.isEvenOdd;if(it.isFilled){if(b&&it.ca(te,y,x))return!0;var bt=it.segments;he=it.startX,ge=it.startY;for(var Ot=he,Ft=ge,It=bt.s,Gt=0;Gt<=bt.length;Gt++){var Yt=void 0;if(Gt!==bt.length){Yt=It[Gt];var Bn=Yt.type;a=Yt.endX,Me=Yt.endY}else Bn=Wi,a=Ot,Me=Ft;switch(Bn){case Ca:if(Ot=Yu(te,y,ne,y,he,ge,Ot,Ft),isNaN(Ot))return!0;se+=Ot,Ot=a,Ft=Me;break;case Wi:if(he=Yu(te,y,ne,y,he,ge,a,Me),isNaN(he))return!0;se+=he;break;case Za:ye=Wt.Fo(he,ge,Yt.point1X,Yt.point1Y,Yt.point2X,Yt.point2Y,a,Me,ne,y,te,y,.5),se+=ye;break;case wl:ye=Wt.Fo(he,ge,(he+2*Yt.point1X)/3,(ge+2*Yt.point1Y)/3,(2*Yt.point1X+a)/3,(2*Yt.point1Y+Me)/3,a,Me,ne,y,te,y,.5),se+=ye;break;case $o:case sl:Bn=Yt.type===$o?Us(Yt,it):Os(Yt,it,he,ge);var Zn=Bn.length;if(Zn===0){if(he=Yu(te,y,ne,y,he,ge,Yt.type===$o?Yt.centerX:Yt.endX,Yt.type===$o?Yt.centerY:Yt.endY),isNaN(he))return!0;se+=he;break}Yt=null;for(var Hn=0;Hn<Zn;Hn++){if(Yt=Bn[Hn],Hn===0){if(ye=Yu(te,y,ne,y,he,ge,Yt[0],Yt[1]),isNaN(ye))return!0;se+=ye}ye=Wt.Fo(Yt[0],Yt[1],Yt[2],Yt[3],Yt[4],Yt[5],Yt[6],Yt[7],ne,y,te,y,.5),se+=ye}Yt!==null&&(a=Yt[6],Me=Yt[7]);break;default:Zt("Unknown Segment type: "+Yt.type)}he=a,ge=Me}if(At){if(se!==0)return!0}else if(se%2!==0)return!0;se=0}else if(it.ca(te,y,E?x:x+2))return!0}return!1}function Yu(a,y,x,b,E,te,ne,se){if(Wt.Yb(E,te,ne,se,.05,a,y))return NaN;var he=(a-x)*(te-se);if(he===0)return 0;var ge=((a*b-y*x)*(E-ne)-(a-x)*(E*se-te*ne))/he;if(y=(a*b-y*x)*(te-se)/he,ge>=a)return 0;if((E>ne?E-ne:ne-E)<(te>se?te-se:se-te)){if(te<se){if(y<te||y>se)return 0}else if(y<se||y>te)return 0}else if(E<ne){if(ge<E||ge>ne)return 0}else if(ge<ne||ge>E)return 0;return 0<he?1:-1}function Ou(a,y,x,b){a=a.figures.s;for(var E=a.length,te=0;te<E;te++)if(a[te].ca(y,x,b))return!0;return!1}Ze.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Mt),this.type===An.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],ge=he.length;for(a=0;a<ge;a++){var ye=he[a];if(ne+ye>=te)return b=te-ne,b=ye===0?0:b/ye,x=x[se],se=x[2*a],E=x[2*a+1],y.h(se+(x[2*a+2]-se)*b,E+(x[2*a+3]-E)*b),y;ne+=ye}}return y},Ze.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===An.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,te=0,ne=0;ne<b;ne++){var se=x[ne],he=se.length;for(a=0;a<he;a++){var ge=se[a];if(te+ge>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;te+=ge}}return NaN},Ze.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===An.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,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],ge=he.length;for(a=0;a<ge;a++){var ye=he[a];if(ne+ye>=te)return b=te-ne,b=ye===0?0:b/ye,ye=x[se],x=ye[2*a],se=ye[2*a+1],E=ye[2*a+2],a=ye[2*a+3],y[0]=x+(E-x)*b,y[1]=se+(a-se)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-se)?0:1>Math.abs(E-x)?0<=a-se?90:270:1>Math.abs(a-se)?0<=E-x?0:180:180*Math.atan2(a-se,E-x)/Math.PI,y;ne+=ye}}return y},Ze.xx=function(a){if(this.type===An.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var te=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),te<=ne?ne===y?0:1:te>=b?b===y?0:1:Math.abs(te-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var se=Mt.alloc();return Wt.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,Mt.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===An.u){ne=this.startX,se=this.startY;var he=this.endX;if(E=this.endY,ne!==he||se!==E){y=he-ne,x=E-se,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),he),a=Math.min(Math.max(a,se),E),ne=Math.abs(b-ne),he=Math.abs(b-he),se=Math.abs(a-se),E=Math.abs(a-E);var ge=Math.min(ne,he,se,E);if(ge===se)return b/te;if(ge===he)return(y+a)/te;if(ge===E)return(2*y+x-b)/te;if(ge===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=Mt.alloc(),E=1/0,se=ne=0,he=y.length;for(var ye=ge=0,Me=0;Me<he;Me++)for(var Re=y[Me],Ve=x[Me],qe=Re.length,it=0;it<qe;it+=2){var At=Re[it],bt=Re[it+1];if(it!==0){Wt.qh(ge,ye,At,bt,a.x,a.y,b);var Ot=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Ot<E&&(E=Ot,ne=se,ne+=Math.sqrt((b.x-ge)*(b.x-ge)+(b.y-ye)*(b.y-ye))),se+=Ve[(it-2)/2]}ge=At,ye=bt}return Mt.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function Ff(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===An.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===An.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===An.F){var te=new Pa;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new ni($o);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,te.add(ne),a=Us(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var se=0;se<E;se++){var he=a[se];Wt.Qe(ne,te,he[2],he[3],he[4],he[5],he[6],he[7],.5,b),ne=he[6],te=he[7]}}y.push(b),x.push(Sc(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,te=E.startY,se=ne,he=te;for(var ge=E.segments.s,ye=ge.length,Me=0;Me<ye;Me++){var Re=ge[Me];switch(Re.type){case Ca:4<=b.length&&(y.push(b),x.push(Sc(b))),b=[],b.push(Re.endX),b.push(Re.endY),ne=Re.endX,te=Re.endY,se=ne,he=te;break;case Wi:b.push(Re.endX),b.push(Re.endY),ne=Re.endX,te=Re.endY;break;case Za:Wt.Qe(ne,te,Re.point1X,Re.point1Y,Re.point2X,Re.point2Y,Re.endX,Re.endY,.5,b),ne=Re.endX,te=Re.endY;break;case wl:Wt.ep(ne,te,Re.point1X,Re.point1Y,Re.endX,Re.endY,.5,b),ne=Re.endX,te=Re.endY;break;case $o:var Ve=Us(Re,E),qe=Ve.length;if(qe===0){b.push(Re.centerX),b.push(Re.centerY),ne=Re.centerX,te=Re.centerY;break}for(var it=0;it<qe;it++){var At=Ve[it];Wt.Qe(ne,te,At[2],At[3],At[4],At[5],At[6],At[7],.5,b),ne=At[6],te=At[7]}break;case sl:if(Ve=Os(Re,E,ne,te),qe=Ve.length,it=Re.endX,At=Re.endY,qe===0){b.push(it),b.push(At),ne=it,te=At;break}for(it=0;it<qe;it++)At=Ve[it],Wt.Qe(ne,te,At[2],At[3],At[4],At[5],At[6],At[7],.5,b),ne=At[6],te=At[7];break;default:Zt("Segment not of valid type: "+Re.type)}Re.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(Sc(b)))}}}function Sc(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],se=a[te+1];te!==0&&y.push(Math.sqrt(zr(x,b,ne,se))),x=ne,b=se}return y}Ze.add=function(a){return this.ee.add(a),this},Ze.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&ir(this),this.fg=new nr(a,y,E,te).freeze(),this.gg=new nr(x,b,ne,se).freeze(),this},hn.Object.defineProperties(An.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 Ff(this),this.tk}},flattenedLengths:{get:function(){return Ff(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===An.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===An.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,b=a=0;b<x;b++)for(var E=y[b],te=E.length,ne=0;ne<te;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&ir(this,a),this.na=a,a===An.o?this.ee=new Ln:(An.V===null&&(An.V=new Ln().freeze()),this.ee=An.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&ir(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&ir(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&ir(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&ir(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&ir(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&ir(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&ir(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&ir(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),An.prototype.setSpots=An.prototype.pm,An.prototype.add=An.prototype.add,An.prototype.getFractionForPoint=An.prototype.xx,An.prototype.getPointAndAngleAlongPath=An.prototype.Qu,An.prototype.getAngleAlongPath=An.prototype.wx,An.prototype.getPointAlongPath=An.prototype.Pu,An.prototype.containsPoint=An.prototype.ca,An.prototype.transform=An.prototype.transform,An.prototype.rotate=An.prototype.rotate,An.prototype.scale=An.prototype.scale,An.prototype.offset=An.prototype.offset,An.prototype.normalize=An.prototype.normalize,An.prototype.computeBoundsWithoutOrigin=An.prototype.ix,An.prototype.equalsApprox=An.prototype.Xa,An.className="Geometry",An.j=new tn(An,"Line",0),An.u=new tn(An,"Rectangle",1),An.F=new tn(An,"Ellipse",2),An.o=new tn(An,"Path",3),An.V=null,An.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",An.className="Geometry",An.stringify=An.ia,An.fillPath=An.nb,An.parse=An.parse,An.Line=An.j,An.Rectangle=An.u,An.Ellipse=An.F,An.Path=An.o;function Pa(a,y,x,b,E){vo(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new Ln,this.sr=this.pl.Ja,this.fw=null}Pa.prototype.copy=function(){var a=new Pa;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},Ze=Pa.prototype,Ze.Xa=function(a){if(!(a instanceof Pa&&Wt.B(this.startX,a.startX)&&Wt.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 b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},Ze.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,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},Ze.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},Ze.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},Ze.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},Ze.add=function(a){return this.pl.add(a),this},Ze.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,se=this.segments.s,he=se.length,ge=0;ge<he;ge++){var ye=se[ge];switch(ye.type){case Ca:te=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case Wi:if(Wt.Yb(b,E,ye.endX,ye.endY,x,a,y))return!0;b=ye.endX,E=ye.endY;break;case Za:if(Wt.cs(b,E,ye.point1X,ye.point1Y,ye.point2X,ye.point2Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case wl:if(Wt.jv(b,E,ye.point1X,ye.point1Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case $o:case sl:var Me=ye.type===$o?Us(ye,this):Os(ye,this,b,E),Re=Me.length,Ve=ye.type===$o?ye.centerX:ye.endX,qe=ye.type===$o?ye.centerY:ye.endY;if(Re===0){if(Wt.Yb(b,E,Ve,qe,x,a,y))return!0;b=Ve,E=qe;break}for(Ve=null,qe=0;qe<Re;qe++)if(Ve=Me[qe],qe===0&&Wt.Yb(b,E,Ve[0],Ve[1],x,a,y)||Wt.cs(Ve[0],Ve[1],Ve[2],Ve[3],Ve[4],Ve[5],Ve[6],Ve[7],.5,a,y,x))return!0;Ve!==null&&(b=Ve[6],E=Ve[7]);break;default:Zt("Unknown Segment type: "+ye.type)}if(ye.isClosed&&(b!==te||E!==ne)&&Wt.Yb(b,E,te,ne,x,a,y))return!0}return!1},hn.Object.defineProperties(Pa.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&&ir(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&ir(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&ir(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&ir(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&ir(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&ir(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Pa.prototype.add=Pa.prototype.add,Pa.prototype.equalsApprox=Pa.prototype.Xa,Pa.className="PathFigure";function ni(a,y,x,b,E,te,ne,se){vo(this),a===void 0&&(a=Wi),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),te===void 0&&(te=0),ne===void 0&&(ne=0),a===sl?(a=te%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),se&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===$o&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===$o&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}ni.prototype.copy=function(){var a=new ni;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},Ze=ni.prototype,Ze.Xa=function(a){if(!(a instanceof ni)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ca:case Wi:return Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY);case Za:return Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY)&&Wt.B(this.point1X,a.point1X)&&Wt.B(this.point1Y,a.point1Y)&&Wt.B(this.point2X,a.point2X)&&Wt.B(this.point2Y,a.point2Y);case wl:return Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY)&&Wt.B(this.point1X,a.point1X)&&Wt.B(this.point1Y,a.point1Y);case $o:return Wt.B(this.startAngle,a.startAngle)&&Wt.B(this.sweepAngle,a.sweepAngle)&&Wt.B(this.centerX,a.centerX)&&Wt.B(this.centerY,a.centerY)&&Wt.B(this.radiusX,a.radiusX)&&Wt.B(this.radiusY,a.radiusY);case sl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Wt.B(this.xAxisRotation,a.xAxisRotation)&&Wt.B(this.endX,a.endX)&&Wt.B(this.endY,a.endY)&&Wt.B(this.radiusX,a.radiusX)&&Wt.B(this.radiusY,a.radiusY);default:return!1}},Ze.qb=function(a){a.classType===ni&&(this.type=a)},Ze.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ca:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Wi:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Za: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 wl: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 $o: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 sl: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":"")},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return this._isFrozen=!1,this},Ze.close=function(){return this.isClosed=!0,this};function Us(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,te=Wt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=Br.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),An.Ha(te,ne),Br.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function Os(a,y,x,b){function E(it,At,bt,Ot){return(it*Ot<At*bt?-1:1)*Math.acos((it*bt+At*Ot)/(Math.sqrt(it*it+At*At)*Math.sqrt(bt*bt+Ot*Ot)))}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 te=a.Pg;y===0&&(y=1e-4),te===0&&(te=1e-4);var ne=Math.PI/180*a.Ne,se=a.isLargeArc,he=a.isClockwiseArc,ge=a.Dc,ye=a.Ec,Me=Math.cos(ne),Re=Math.sin(ne),Ve=Me*(x-ge)/2+Re*(b-ye)/2;ne=-Re*(x-ge)/2+Me*(b-ye)/2;var qe=Ve*Ve/(y*y)+ne*ne/(te*te);return 1<qe&&(y*=Math.sqrt(qe),te*=Math.sqrt(qe)),qe=(se===he?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Ve*Ve)/(y*y*ne*ne+te*te*Ve*Ve)),isNaN(qe)&&(qe=0),se=qe*y*ne/te,qe=qe*-te*Ve/y,isNaN(se)&&(se=0),isNaN(qe)&&(qe=0),x=(x+ge)/2+Me*se-Re*qe,b=(b+ye)/2+Re*se+Me*qe,ye=E(1,0,(Ve-se)/y,(ne-qe)/te),Me=(Ve-se)/y,ge=(ne-qe)/te,Ve=(-Ve-se)/y,se=(-ne-qe)/te,ne=E(Me,ge,Ve,se),Ve=(Me*Ve+ge*se)/(Math.sqrt(Me*Me+ge*ge)*Math.sqrt(Ve*Ve+se*se)),-1>=Ve?ne=Math.PI:1<=Ve&&(ne=0),!he&&0<ne&&(ne-=2*Math.PI),he&&0>ne&&(ne+=2*Math.PI),he=y>te?1:y/te,Ve=y>te?te/y:1,y=Wt.jx(0,0,y>te?y:te,ye,ye+ne,!0),te=Br.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Ve),An.Ha(y,te),Br.free(te),a.ae=y,a.ae}hn.Object.defineProperties(ni.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&&ir(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ir(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&ir(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ir(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ir(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&ir(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&ir(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&ir(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&ir(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Nr(a,">= zero",ni,"radiusX"),this._isFrozen&&ir(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Nr(a,">= zero",ni,"radiusY"),this._isFrozen&&ir(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&ir(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&&ir(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&&ir(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&&ir(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&&ir(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),ni.prototype.equalsApprox=ni.prototype.Xa;var Ca=new tn(ni,"Move",0),Wi=new tn(ni,"Line",1),Za=new tn(ni,"Bezier",2),wl=new tn(ni,"QuadraticBezier",3),$o=new tn(ni,"Arc",4),sl=new tn(ni,"SvgArc",4);ni.className="PathSegment",ni.Move=Ca,ni.Line=Wi,ni.Bezier=Za,ni.QuadraticBezier=wl,ni.Arc=$o,ni.SvgArc=sl;function gs(){this.H=null,this.xu=new Mt(0,0).freeze(),this.mt=new Mt(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}gs.prototype.copy=function(){var a=new gs;return this.clone(a)},gs.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},gs.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},gs.prototype.So=function(a,y){var x=this.diagram;return x===null||bd(x,a,y),y},gs.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(bd(x,a,y),y.assign(x.Ps(y))),y},hn.Object.defineProperties(gs.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}}}),gs.prototype.getMultiTouchDocumentPoint=gs.prototype.Bz,gs.prototype.getMultiTouchViewPoint=gs.prototype.So,gs.className="InputEvent";function Mh(){this.H=null,this.xa="",this.ar=this.Lr=null}Mh.prototype.copy=function(){var a=new Mh;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Mh.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},hn.Object.defineProperties(Mh.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}}}),Mh.className="DiagramEvent";function To(){this.Fm=wo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}To.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},To.prototype.copy=function(){var a=new To;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=Tn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Tn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Tn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Tn(y)&&typeof y.J=="function"?y.J():y,a},To.prototype.qb=function(a){a.classType===To&&(this.change=a)},To.prototype.toString=function(){var a="";return a=this.change===ll?a+"* ":this.change===wo?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===ll?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=_i(this.object)),this.oldValue!==null&&(a+=" old: "+_i(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+_i(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},To.prototype.I=function(a){return a?this.oldValue:this.newValue},To.prototype.Dz=function(a){return a?this.oldParam:this.newParam},To.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},To.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},To.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},To.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},hn.Object.defineProperties(To.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===ll&&(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}}}),To.prototype.redo=To.prototype.redo,To.prototype.canRedo=To.prototype.canRedo,To.prototype.undo=To.prototype.undo,To.prototype.canUndo=To.prototype.canUndo,To.prototype.getParam=To.prototype.Dz,To.prototype.getValue=To.prototype.I,To.prototype.clear=To.prototype.clear;var ll=new tn(To,"Transaction",-1),wo=new tn(To,"Property",0),Zo=new tn(To,"Insert",1),ra=new tn(To,"Remove",2);To.className="ChangedEvent",To.Transaction=ll,To.Property=wo,To.Insert=Zo,To.Remove=ra;function La(){this.o=new Ln().freeze(),this.xa="",this.j=!1}La.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 b=this.changes.M(x);b!==null&&(y+=`
`+b.toString())}}return y},La.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()},La.prototype.canUndo=function(){return this.isComplete},La.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()}},La.prototype.canRedo=function(){return this.isComplete},La.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()}},La.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Vn,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===wo&&b.object){var E=y.get(b.object);E||(E=new Vn,y.set(b.object,E));var te=E.get(b.propertyName);te===null?E.set(b.propertyName,-1):(0<te&&a.cd(te,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},hn.Object.defineProperties(La.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}}}),La.prototype.optimize=La.prototype.ak,La.prototype.redo=La.prototype.redo,La.prototype.canRedo=La.prototype.canRedo,La.prototype.undo=La.prototype.undo,La.prototype.canUndo=La.prototype.canUndo,La.prototype.clear=La.prototype.clear,La.className="Transaction";function jo(){this.Pt=new Nn,this.Jd=!1,this.u=new Ln().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Ln().freeze(),this.hl=new Ln,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}jo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
`+this.history.M(b).toString(a-1);return y},jo.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},jo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Ze=jo.prototype,Ze.Xw=function(a){this.Pt.add(a)},Ze.Rx=function(a){this.Pt.remove(a)},Ze.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},Ze.eb=function(a){return a===void 0&&(a=""),Qh(this,!0,a)},Ze.Kf=function(){return Qh(this,!1,"")};function Qh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&si("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var te=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=te,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}Ze.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()}},jo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},jo.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){si("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},jo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},jo.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){si("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},jo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new To;for(b.change=ll,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},jo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new La);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||si("Change not within a transaction: "+x.toString()))}},jo.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},hn.Object.defineProperties(jo.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}}}),jo.prototype.handleChanged=jo.prototype.Tu,jo.prototype.redo=jo.prototype.redo,jo.prototype.undo=jo.prototype.undo,jo.prototype.canUndo=jo.prototype.canUndo,jo.prototype.discardHistoryAfterIndex=jo.prototype.lx,jo.prototype.rollbackTransaction=jo.prototype.Kf,jo.prototype.commitTransaction=jo.prototype.eb,jo.prototype.startTransaction=jo.prototype.Ea,jo.prototype.removeModel=jo.prototype.Rx,jo.prototype.addModel=jo.prototype.Xw,jo.prototype.clear=jo.prototype.clear,jo.className="UndoManager";function $r(){vo(this),this.H=Ks,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new gs,this.Zr=-1}$r.prototype.toString=function(){return this.name!==""?this.name+" Tool":Lr(this.constructor)},$r.prototype.updateAdornments=function(){},$r.prototype.canStart=function(){return this.isEnabled},$r.prototype.doStart=function(){},$r.prototype.doActivate=function(){this.isActive=!0},$r.prototype.doDeactivate=function(){this.isActive=!1},$r.prototype.doStop=function(){},$r.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},$r.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},$r.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},$r.prototype.doMouseMove=function(){},$r.prototype.doMouseUp=function(){this.stopTool()},$r.prototype.doMouseWheel=function(){},$r.prototype.canStartMultiTouch=function(){return!0},$r.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Mt.allocAt(NaN,NaN)),b=y.So(1,Mt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,te=b.y-x.y;a.Jw=Math.sqrt(E*E+te*te),y.bubbles=!1}Mt.free(x),Mt.free(b)},$r.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Mt.allocAt(NaN,NaN)),b=y.So(1,Mt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,te=b.y-x.y;te=Math.sqrt(E*E+te*te)/a.Jw,E=new Mt((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),te*=a.Bw;var ne=a.commandHandler;if(te!==a.scale&&ne.canResetZoom(te)){var se=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(te),a.zoomPoint=se}y.bubbles=!1}Mt.free(x),Mt.free(b)},$r.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},$r.prototype.doKeyUp=function(){},$r.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},$r.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},$r.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Aa?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||(Aa?y.meta:y.control)||y.shift||a.clearSelection()}},$r.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,yd(a,b,x),b.handled};function yd(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){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,b){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)}}}$r.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var te=a.Ck,ne=te;for(a.Ck=b,this.doCurrentObjectChanged(te,b),y.handled=!1;te!==null;){var se=te.mouseLeave;if(se!==null&&(b===te||b!==null&&b.rg(te)||(se(y,te,b),E=!0,y.handled)))break;te=te.panel}for(te=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(te===b||te!==null&&te.rg(b)||(ne(y,b,te),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(te=b,ne="";te!==null&&(ne=te.cursor,ne==="");)te=te.panel;for(a.currentCursor=ne,y.handled=!1,te=b;te!==null&&(b=te.mouseOver,!(b!==null&&(b(y,te),E=!0,y.handled)));)te=te.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},$r.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},$r.prototype.doCurrentObjectChanged=function(){},$r.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===$c&&!y.shift||E===xc&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===$c&&y.shift||E===xc&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var se="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(se,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(se,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:se="pixel";break;case 1:se="line";break;case 2:se="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(se,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(se,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},$r.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},$r.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Ar(function(){x.doWaitAfter(b)},a)},$r.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Qt.clearTimeout(this.Zr),this.Zr=-1},$r.prototype.doWaitAfter=function(){},$r.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof ai);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},$r.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},hn.Object.defineProperties($r.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Vt&&(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}}}),$r.prototype.startTransaction=$r.prototype.Ea,$r.className="Tool";function ho(){$r.call(this),this.name="ToolManager",this.hb=new Ln,this.ob=new Ln,this.Hb=new Ln,this.F=this.V=850,this.o=new jn(2,2).ja(),this.Ha=5e3,this.ia=xc,this.u=If,this.Mp=this.j=null,this.zj=-1}Kt(ho,$r),ho.prototype.initializeStandardTools=function(){},ho.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof ai&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},ho.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===lh&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===$h){y.bubbles=!0;return}if(this.gestureBehavior===lh)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===xc?this.mouseWheelBehavior=$c:this.mouseWheelBehavior===$c&&(this.mouseWheelBehavior=xc)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},ho.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===$h){y.bubbles=!0;return}if(this.gestureBehavior===lh)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}ep(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function ep(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}ho.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof ai&&(y===a||y.rg(a))||this.hideToolTip()},ho.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()))},ho.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)},ho.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 ai)||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()},ho.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof ai){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof ar&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Qt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Ar(function(){E.hideToolTip()},a)}},ho.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},ho.prototype.hideToolTip=function(){this.zj!==-1&&(Qt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof ai?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof ar&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},ho.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},ho.prototype.doMouseWheel=function(){this.standardMouseWheel()},ho.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},ho.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},ho.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},ho.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},ho.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)},hn.Object.defineProperties(ho.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 ai?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}}}),ho.prototype.replaceStandardTool=ho.prototype.gb;var xc=new tn(ho,"WheelScroll",0),$c=new tn(ho,"WheelZoom",1),Df=new tn(ho,"WheelNone",2),If=new tn(ho,"GestureZoom",3),lh=new tn(ho,"GestureCancel",4),$h=new tn(ho,"GestureNone",5);ho.className="ToolManager",ho.WheelScroll=xc,ho.WheelZoom=$c,ho.WheelNone=Df,ho.GestureZoom=If,ho.GestureCancel=lh,ho.GestureNone=$h;function Fr(){$r.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 Mt(NaN,NaN),this.Fr=new Mt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Nn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Ws;Kt(Fr,$r),Fr.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},Fr.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},Fr.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,(Aa?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Fr.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),Wa=null,this.isActive=!0,this.tl.set(a.position),Bf(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&&Pi(a),tf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Wa=this,hh=this.diagram,this.doSimulatedDragOut()))};function Bf(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof kn?(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 Dl,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Fr.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Fr.prototype.Pd=function(a){return a===void 0?new oc(yo):this.isGridSnapEnabled?new oc(new Mt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new oc(a.copy())},Fr.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),qh(this),dh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Ws.count){for(var y=Ws,x=y.length,b=0;b<x;b++){var E=y.M(b);ec(E),su(E),qh(E),E.diagram.ug()}y.clear()}ec(this),this.tl.h(NaN,NaN),hh!==null&&(hh.currentCursor=""),Wa=hh=null,su(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),ss(a,!0)},Fr.prototype.stopTransaction=function(){var a=this.diagram,y=$r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function qh(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Sd(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Rf(){var a=Wa;su(a),Th(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Fr.prototype.doCancel=function(){su(this),Th(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Fr.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Fr.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function uh(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Th(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Vn,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var te=y.I(E);te!==null&&(te.location=E.location,te.Va(),x.add(te,a.Pd(te.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof kn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,Bf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Oc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function su(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 kn&&(x.value.point=new Mt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ec(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 Zu(a,y,x){var b=a.diagram,E=a.startPoint,te=Mt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),Mt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Pi(b),b.hk())}Fr.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&rc(b,a,y,this.dragOptions,x)};function Th(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof kn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Oc(b,-E.x,-E.y)}y.bd()}}function _f(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Lh(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var te=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Sd(a,E,b),!a.isActive&&Wa===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof Er)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&Wa===null||(a.doDragOver(y,b),!a.isActive&&Wa===null))return}finally{x.skipsUndoManager=te,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}Fr.prototype.findDragOverObject=function(a){var y=this;return hl(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof ai||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Fr.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 Sd(a,y,x){var b=!1,E=a.Cg.length,te=0<E?a.Cg[0]:null;if(x===te)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var se=a.Cg[ne],he=se.mouseDragLeave;if(he!==null&&(he(y,se,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Wa===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=tp(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],se=ne.mouseDragEnter,se===null||(se(y,ne,te),b=!0,!y.handled));x++);return b}function tp(a){var y=a.panel;return y!==null?y:a instanceof rr&&!(a instanceof Er)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function np(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(ge){return b.findValidLinkablePort(ge,x)});a=Mt.alloc();var te=1/0,ne=null;for(E=E.iterator;E.next();){var se=E.value;if(se.part!==null){var he=se.ga(oi,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return Mt.free(a),ne}function Lh(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var te=null,ne=null;x.fromNode===null&&(te=np(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=np(a,x.i(x.pointsCount-1),!0),se!==null&&(he=se.part)),E.isValidLink(ne,te,he,se)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,te!==null&&(x.fromPortId=te.portId),x.toNode=he,se!==null&&(x.toPortId=se.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):Gf(E,ne,te,he,se):Gf(E,null,null,null,null)}}}}Fr.prototype.doDragOver=function(){};function Ah(a,y){var x=a.diagram;a.dragsLink&&Lh(a,!0),qh(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var te=b;te!==null;){var ne=te.mouseDrop;if(ne!==null&&(ne(E,te),E.handled))break;am(a,E,te),te=tp(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||Wa!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof Gn&&te.linksConnected.each(function(se){se.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||Wa!==null){for(a=rn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Gn&&Jp(x,b,a);rn.free(a)}}}function am(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Er||(x=a.mouseDrop,x!==null&&x(y))}function Jp(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof kn},!0,function(E){return E instanceof kn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Fr.prototype.doDropOnto=function(){},Fr.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()?(uh(this,!1),tf(a,this.copiedParts),Zu(this,this.copiedParts,!1),dh(a,this.copiedParts)):this.mayMove()?(su(this),Zu(this,this.draggedParts,!0)):this.mayDragOut()?(uh(this,!1),Zu(this,this.copiedParts,!1)):su(this),_f(this,a.lastInput.documentPoint))}},Fr.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?(su(this),uh(this,!0),tf(a,this.copiedParts),Zu(this,this.copiedParts,!1),dh(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,su(this),this.mayMove()&&(Zu(this,this.draggedParts,!0),_f(this,a.lastInput.documentPoint))),this.Ym=!0,Ah(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&xd(this),a.Ya(),dh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Fr.prototype.simulatedMouseMove=function(a,y,x){if(Wa===null)return!1;var b=Wa.diagram;x instanceof Vt||(x=null);var E=hh;return x!==E&&(E!==null&&E!==b&&(E.ug(),Wa.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),hh=x,x!==null&&x!==b&&(Rf(),E=x.toolManager.findTool("Dragging"),E!==null&&(Ws.contains(E)||Ws.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==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,b.doSimulatedDragOver()),!0)},Fr.prototype.simulatedMouseUp=function(a,y,x){if(Wa===null)return!1;var b=hh,E=Wa.diagram;if(x===null)return Wa.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),Wa.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;hh=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Rf(),Ws.contains(b)||Ws.add(b),b.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 Mt),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=Wa,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function xd(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Gn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Fr.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Aa?!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())},Fr.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())},Fr.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())},Fr.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Fr.prototype.Az=function(){return Wa},Fr.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Wa;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Fr.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Il(a),a.animationManager.Cc(),a=Wa,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Fr.prototype.doSimulatedDragLeave=function(){var a=Wa;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Fr.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Wa;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Qp(this,y.draggedParts.Lf(),!1,a.firstInput),Zu(this,this.copiedParts,!1),_f(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Fr.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Wa;if(y!==null){var x=y.diagram;if(y.Ym=!0,su(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Qp(this,y.draggedParts.Lf(),!0,a.lastInput),Zu(this,this.copiedParts,!1);var b=new Nn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Ah(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Qp(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var te=rn.alloc();E=b=1/0;for(var ne=-1/0,se=-1/0,he=y.iterator;he.next();){var ge=he.value;if(ge.isVisible()){var ye=ge.location;ge=ye.x,ye=ye.y,isNaN(ge)||isNaN(ye)||(ge<b&&(b=ge),ye<E&&(E=ye),ge>ne&&(ne=ge),ye>se&&(se=ye))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,se-E),b=te.x+te.width/2,E=te.y+te.height/2,rn.free(te),te=a.Fr,ne=new Vn,se=Mt.alloc(),he=y.iterator;he.next();)ge=he.value,ge instanceof kn&&ge.canCopy()&&(ye=x.I(ge),ye!==null&&(ye.points=ge.points,Oc(ye,te.x-b,te.y-E),ye.suspendsRouting=!0,ne.add(ye,a.Pd())));for(y=y.iterator;y.next();)ge=y.value,ge.Zc()&&ge.canCopy()&&(he=x.I(ge),he!==null&&(ge=ge.location,se.h(te.x-(b-ge.x),te.y-(E-ge.y)),he.location=se,he.Va(),ne.add(he,a.Pd(se))));Mt.free(se),a.copiedParts=ne,Bf(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Oc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Fr.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Fr.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Mt},hn.Object.defineProperties(Fr.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}}}),Fr.prototype.getDraggingSource=Fr.prototype.Az;var Wa=null,hh=null;Fr.className="DraggingTool",Ws=new Ln,Xn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),ho.prototype.doCancel=function(){Wa!==null&&Wa.doCancel(),$r.prototype.doCancel.call(this)};function Ro(){$r.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new kn,y=new Or;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Or,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Gn,y=new Or,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=So,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Gn,y=new Or,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=So,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new Vn,this.Of=this.gj=this.Pf=null}Kt(Ro,$r),Ro.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Ro.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=jn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,jn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=oi,te=Mt.alloc(),x.location=y.ga(oi,te),Mt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Ro.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=So,y.fromSpot=ba,y.toSpot=ba),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Ro.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Ro.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Gn){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)}},Ro.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Gn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Gn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Ro.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,te=y.og(x,b,function(Me){return E.findValidLinkablePort(Me,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,se=ne.part;if(se instanceof Gn){var he=ne.ga(oi,Mt.alloc()),ge=x.x-he.x,ye=x.y-he.y;Mt.free(he),he=ge*ge+ye*ye,he<b&&(ge=this.validPortsCache.I(ne),ge!==null?ge&&(y=ne,b=he):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,se,ne)||!a&&this.isValidLink(se,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=he):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof Gn&&(x.layer===null||x.layer.allowLink))?y:null},Ro.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},Ro.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},Ro.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Ro.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Gn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Gn))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},Ro.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||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 E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},Ro.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 b=new Nn;return b.add(a),ms(this,x,y,b)};function ms(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),ms(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),ms(a,y.labeledLink,x,b))))}Ro.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==Ed){if(b===ag){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!vs(this,a,y,x,!0)}if(b===sg){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!vs(this,a,y,x,!0)}if(b===rg)return a===y?a=!0:(b=new Nn,b.add(y),a=Cs(this,b,a,y,x)),!a;if(b===ig)return!vs(this,a,y,x,!1);if(b===og)return a===y?a=!0:(b=new Nn,b.add(y),a=qc(this,b,a,y,x)),!a}return!0};function vs(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var te=y.linksConnected;te.next();){var ne=te.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&vs(a,ne,x,b,E)))return!0}return!1}function Cs(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Cs(a,y,ne,b,E)))return!0}return!1}function qc(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E){var se=ne.fromNode;if(ne=ne.toNode,se=se===x?ne:se,se!==x&&qc(a,y,se,b,E))return!0}}return!1}hn.Object.defineProperties(Ro.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}}}),Ro.className="LinkingBaseTool";function Es(){Ro.call(this),this.name="Linking",this.V={},this.F=null,this.K=Nh,this.Xd=null}Kt(Es,Ro),Es.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},Es.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 Gn)))return null;var x=this.direction;if(x===Nh||x===$p){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Nh||x===qp)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Es.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 Gn&&(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 Gn&&(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)},Es.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()},Es.prototype.doStop=function(){Ro.prototype.doStop.call(this),this.startObject=null},Es.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,te=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var se=ne.part;se instanceof Gn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=se,E=ne):(y=se,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(te=this.insertLink(y,x,b,E),te!==null?(ne===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),te.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",te)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),te&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Es.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof kn)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)},Es.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Es.prototype.doNoLink=function(){},hn.Object.defineProperties(Es.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 Nh=new tn(Es,"Either",0),$p=new tn(Es,"ForwardsOnly",0),qp=new tn(Es,"BackwardsOnly",0);Es.className="LinkingTool",Es.Either=Nh,Es.ForwardsOnly=$p,Es.BackwardsOnly=qp;function Dl(){Ro.call(this),this.name="Relinking";var a=new Or;a.figure="Diamond",a.desiredSize=Oo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Or,a.figure="Diamond",a.desiredSize=Oo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new rn}Kt(Dl,Ro),Dl.prototype.updateAdornments=function(a){if(a!==null&&a instanceof kn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Dl.prototype.makeAdornment=function(a,y){var x=new ai;return x.type=wn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Dl.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},Dl.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 ai&&x.adornedPart instanceof kn))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=Gi),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Gi),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},Dl.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===kp||x===jc)&&(x=Qs),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}},Dl.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()},Dl.prototype.doStop=function(){Ro.prototype.doStop.call(this),this.handle=null},Dl.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,te=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof Gn&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:te=null;te!==null?(this.reconnectLink(te,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint,te.bb()),this.transactionResult=this.name,a.R("LinkRelinked",te,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Dl.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Dl.prototype.doNoRelink=function(){};function Gf(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}hn.Object.defineProperties(Dl.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 ai))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Dl.className="RelinkingTool",Xn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Xn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Ho(){$r.call(this),this.name="LinkReshaping";var a=new Or;a.figure="Rectangle",a.desiredSize=ta,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Or,a.figure="Diamond",a.desiredSize=Oo,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Mt,this.Yq=new Ln}Kt(Ho,$r),Ho.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:wd},Ho.prototype.om=function(a,y){a.reshapingBehavior=y},Ho.prototype.updateAdornments=function(a){if(a!==null&&a instanceof kn){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)}},Ho.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new ai,E.type=wn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==ru)for(var se=x+ne;se<te-ne;se++){var he=this.makeResegmentHandle(a,se);he!==null&&(he.segmentIndex=se,he.segmentFraction=.5,he.fromMaxLinks=999,E.add(he))}for(ne=x+1;ne<te;ne++)if(se=this.makeHandle(a,ne),se!==null){if(se.segmentIndex=ne,ne!==x)if(ne===x+1&&b){he=y.i(x);var ge=y.i(x+1);Wt.B(he.x,ge.x)&&Wt.B(he.y,ge.y)&&(ge=y.i(x-1)),Wt.B(he.x,ge.x)?(this.om(se,ft),se.cursor="n-resize"):Wt.B(he.y,ge.y)&&(this.om(se,ut),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),ge=y.i(te),Wt.B(he.x,ge.x)&&Wt.B(he.y,ge.y)&&(he=y.i(te+1)),Wt.B(he.x,ge.x)?(this.om(se,ft),se.cursor="n-resize"):Wt.B(he.y,ge.y)&&(this.om(se,ut),se.cursor="w-resize")):ne!==te&&(this.om(se,Dt),se.cursor="move");E.add(se)}E.adornedObject=a}return E},Ho.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Ho.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Ho.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},Ho.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 kn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),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}}},Ho.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Ho.prototype.stopTransaction=function(){var a=this.diagram,y=$r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ho.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Ho.prototype.getResegmentingPoint=function(){return this.handle.ga(oi)},Ho.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Ho.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,b=y.i(x-1),E=y.i(x),te=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(Oh(this,ne,b,E,te,!0)||Oh(this,ne,b,E,te,!1))){var se=y.points.copy();Oh(this,ne,b,E,te,!0)?(se.cd(x-2,new Mt(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new Mt(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new Mt((te.x+ne.x)/2,ne.y)),se.cd(x+1,new Mt((te.x+ne.x)/2,te.y))),se.mb(x),se.mb(x-1),y.points=se,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(Oh(this,b,E,te,ne,!0)||Oh(this,b,E,te,ne,!1))&&(se=y.points.copy(),Oh(this,b,E,te,ne,!0)?(se.cd(x-1,new Mt(b.x,(b.y+ne.y)/2)),se.cd(x+2,new Mt(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new Mt((b.x+ne.x)/2,b.y)),se.cd(x+2,new Mt((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=Mt.alloc(),Wt.qh(b.x,b.y,te.x,te.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),Mt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Oh(a,y,x,b,E,te){return te?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}Ho.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===ft?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===ut&&(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,b===ft?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===ut&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),te=y.i(b-1),ne=y.i(b+1);Wt.B(te.x,E.x)&&Wt.B(E.y,ne.y)?(Wt.B(te.x,y.i(b-2).x)&&!Wt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Wt.B(ne.y,y.i(b+2).y)&&!Wt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Wt.B(te.y,E.y)&&Wt.B(E.x,ne.x)?(Wt.B(te.y,y.i(b-2).y)&&!Wt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Wt.B(ne.x,y.i(b+2).x)&&!Wt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Wt.B(te.x,E.x)&&Wt.B(E.x,ne.x)?(Wt.B(te.x,y.i(b-2).x)&&!Wt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Wt.B(ne.x,y.i(b+2).x)&&!Wt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Wt.B(te.y,E.y)&&Wt.B(E.y,ne.y)&&(Wt.B(te.y,y.i(b-2).y)&&!Wt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Wt.B(ne.y,y.i(b+2).y)&&!Wt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(te=E.ga(oi,Mt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,Mt.alloc()),y.L(0,b.x,b.y),Mt.free(te),Mt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(oi,Mt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Mt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Mt.free(x),Mt.free(a));y.zf()},Ho.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Dt:return a;case ft:return new Mt(y.i(x).x,a.y);case ut:return new Mt(a.x,y.i(x).y);default:case wd:return y.i(x)}},hn.Object.defineProperties(Ho.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 ai))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}}}),Ho.prototype.setReshapingBehavior=Ho.prototype.om,Ho.prototype.getReshapingBehavior=Ho.prototype.Ru;var wd=new tn(Ho,"None",0),ut=new tn(Ho,"Horizontal",1),ft=new tn(Ho,"Vertical",2),Dt=new tn(Ho,"All",3);Ho.className="LinkReshapingTool",Ho.None=wd,Ho.Horizontal=ut,Ho.Vertical=ft,Ho.All=Dt,Xn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Rt(){$r.call(this),this.name="Resizing",this.o=new jn(1,1).freeze(),this.j=new jn(9999,9999).freeze(),this.yg=new jn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Or;a.alignmentFocus=oi,a.figure="Rectangle",a.desiredSize=ta,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Mt,this.Dw=new jn,this.Tn=new Mt,this.rt=new jn(0,0),this.qt=new jn(1/0,1/0),this.pt=new jn(1,1)}Kt(Rt,$r),Rt.prototype.updateAdornments=function(a){if(!(a===null||a instanceof kn)){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(),lf(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Rt.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new ai,y.type=wn.Spot,y.locationSpot=oi;var x=new Js;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ma)),y.add(this.makeHandle(a,Ta)),y.add(this.makeHandle(a,Yl)),y.add(this.makeHandle(a,al)),y.add(this.makeHandle(a,xl)),y.add(this.makeHandle(a,is)),y.add(this.makeHandle(a,ps)),y.add(this.makeHandle(a,zs))}else if(ku(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Rt.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Rt.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=oi),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break e;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof wn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Rt.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},Rt.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))},Rt.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Rt.prototype.stopTransaction=function(){var a=this.diagram,y=$r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Rt.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Rt.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Mt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),Mt.free(E)}},Rt.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Mt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),Mt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Rt.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 Er){var b=new Ln;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ce;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Rt.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=oi);var ne=this.adornedObject.naturalBounds,se=ne.x,he=ne.y,ge=ne.x+ne.width,ye=ne.y+ne.height,Me=1;if(!te){Me=ne.width;var Re=ne.height;0>=Me&&(Me=1),0>=Re&&(Re=1),Me=Re/Me}return Re=Mt.alloc(),Wt.No(a.x,a.y,se,he,E.width,E.height,Re),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Re.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.y=Math.max(Re.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width),a.x=ge-a.width,a.y=ye-a.height)):1<=y.y?(a.x=Math.max(Re.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.height=Math.max(Math.min(Re.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width),a.x=ge-a.width)):(a.x=Math.max(Re.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=ge-a.x,te||(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me,a.y=he+.5*(ye-he-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Re.x-se,b.width),x.width),a.y=Math.max(Re.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width),a.y=ye-a.height)):1<=y.y?(a.width=Math.max(Math.min(Re.x-se,b.width),x.width),a.height=Math.max(Math.min(Re.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width))):(a.width=Math.max(Math.min(Re.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me,a.y=he+.5*(ye-he-a.height))):0>=y.y?(a.y=Math.max(Re.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=ye-a.y,te||(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width,a.x=se+.5*(ge-se-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Re.y-he,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width,a.x=se+.5*(ge-se-a.width))),Mt.free(Re),a},Rt.prototype.computeReshape=function(){var a=gn;return this.adornedObject instanceof Or&&(a=E0(this.adornedObject)),!(a===Jn||this.diagram.lastInput.shift)},Rt.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},Rt.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},Rt.prototype.computeCellSize=function(){var a=new jn(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},hn.Object.defineProperties(Rt.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 ai))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 ai)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}}}),Rt.className="ResizingTool",Xn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function en(){$r.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Mt,this.ue=null;var a=new Or;a.figure="Ellipse",a.desiredSize=Oo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Mt(NaN,NaN),this.u=0,this.F=50}Kt(en,$r),en.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)}},en.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new ai,y.type=wn.Position,y.locationSpot=oi;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(ku(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},en.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},en.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)},en.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(oi)},en.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 b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},en.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Mt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},en.prototype.stopTransaction=function(){var a=this.diagram,y=$r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},en.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},en.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},en.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()},en.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},en.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},hn.Object.defineProperties(en.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 ai))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 ai)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}}}),en.className="RotatingTool",Xn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function yn(){$r.call(this),this.name="ClickSelecting"}Kt(yn,$r),yn.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},yn.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},yn.className="ClickSelectingTool";function Pn(){$r.call(this),this.name="Action",this.pk=null}Kt(Pn,$r),Pn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},Pn.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()},Pn.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))}},Pn.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()},Pn.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())},Pn.prototype.doStop=function(){this.pk=null},Pn.className="ActionTool";function Wn(){$r.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Mt(0,0)}Kt(Wn,$r),Wn.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)},Wn.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Wn.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof rr)x.Zc()&&(ku(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Tn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=Mt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Vf(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Mt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},hn.Object.defineProperties(Wn.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}}}),Wn.className="ClickCreatingTool";function Kn(){$r.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new rr;a.layerName="Tool",a.selectable=!1;var y=new Or;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Kt(Kn,$r),Kn.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))},Kn.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Kn.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Kn.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 b=jn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),jn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Kn.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()},Kn.prototype.computeBoxBounds=function(){var a=this.diagram;return new rn(a.firstInput.documentPoint,a.lastInput.documentPoint)},Kn.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Aa?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 Ln,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},hn.Object.defineProperties(Kn.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}}}),Kn.className="DragSelectingTool";function Yn(){$r.call(this),this.name="Panning",this.Xt=new Mt,this.xy=new Mt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Qt.document,"scroll",a.Kw,!1),a.stopTool()}}Kt(Yn,$r),Yn.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())},Yn.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Qt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Yn.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Yn.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Yn.prototype.doMouseMove=function(){this.move()},Yn.prototype.doMouseUp=function(){this.move(),this.stopTool()},Yn.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,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},hn.Object.defineProperties(Yn.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Yn.className="PanningTool",Xn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Xn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Xn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Xn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Xn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function ar(){this.F=this.u=this.j=this.o=null}hn.Object.defineProperties(ar.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}}}),ar.className="HTMLInfo";function cr(a,y,x){this.text=a,this.hx=y,this.visible=x}cr.className="ContextMenuButtonInfo";function wr(){$r.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Mt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Kt(wr,$r);function sr(a){var y=new ar;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},vi=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 b=_n("style");Qt.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",lr,!1),b.addEventListener(y,"selectstart",lr,!1),b.addEventListener(x,"contextmenu",lr,!1)),y.className="goCXforeground",x.className="goCXbackground",Qt.document.body&&(Qt.document.body.appendChild(y),Qt.document.body.appendChild(x)),Di=y,ei=x,Xr=!0}function lr(a){return a.preventDefault(),!1}wr.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)},wr.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},wr.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},wr.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Vt||(a instanceof Ut?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},wr.prototype.doActivate=function(){},wr.prototype.doMouseDown=function(){if($r.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof ai){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Pr(this)},wr.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof ai){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Pr(this)};function Pr(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof ar||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(br(a,!0),a.isActive||a.stopTool())}wr.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function br(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=vi,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Ut?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof ai&&!a.currentContextMenu.visible&&a.stopTool()}}wr.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},wr.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof ai){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof ar&&a.show(y,x,this);this.currentContextMenu=a},wr.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},wr.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof ai?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof ar&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function qr(a){var y=new Ln;return y.add(new cr("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new cr("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new cr("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new cr("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new cr("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new cr("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new cr("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new cr("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new cr("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new cr("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new cr("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new cr("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new cr("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}wr.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=qr(this)),Di.innerHTML="",ei.addEventListener("pointerdown",this.tu,!1);var y=this,x=_n("ul");x.className="goCXul",Di.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,te=E.visible;if(typeof E.hx=="function"&&(typeof te!="function"||te(a))){te=_n("li"),te.className="goCXli";var ne=_n("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(se){return this.ky(a),y.stopTool(),se.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}Di.style.display="block",ei.style.display="block"},wr.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===vi){Di.style.display="none",ei.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ei,"pointerdown",this.tu,!1),this.currentContextMenu=null}},hn.Object.defineProperties(wr.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof ai?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Xr===!1&&vi===null&&Ko&&sr(this),vi},set:function(a){a===null&&(Xr=!0),vi=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var vi=null,Xr=!1,ei=null,Di=null;wr.className="ContextMenuTool",Xn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function or(){$r.call(this),this.name="TextEditing",this.Zh=new Yi,this.ia=null,this.V=ao,this.vj=null,this.qa=Ki,this.u=1,this.F=!0,this.o=null,this.j=new ar,this.kt=null,ii(this,this.j)}Kt(or,$r);function ii(a,y){if(Ko){var x=_n("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(Ni)):E==="Tab"?(a.acceptText(Kr),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Ki){var b=a.kt;a.qa===fo&&(a.qa=bo),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Ki){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,te){if(b instanceof Yi&&te instanceof or)if(te.state===Wr)x.style.border="3px solid red",x.focus();else{var ne=b.ga(oi),se=E.position,he=E.scale,ge=b.Df()*he;ge<te.minimumEditorScale&&(ge=te.minimumEditorScale);var ye=b.naturalBounds.width*ge+6,Me=b.naturalBounds.height*ge+2,Re=(ne.x-se.x)*he;ne=(ne.y-se.y)*he,se=b.verticalAlignment,he=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*ge,Me=se.y*Me-se.y*he+se.offsetY-(.5*Me-.5*he)-he/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*ge+"%",x.style.lineHeight="normal",x.style.width=ye+"px",x.style.left=(Re-ye/2|0)-1+"px",x.style.top=(ne+Me|0)-1+"px",x.style.textAlign=b.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=b.lineCount,x.wA=ge,x.className="goTXarea",E.div.appendChild(x),x.focus(),te.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}or.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Po&&Po!==this&&(Po.acceptText(Si),Po&&Po!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Yi&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===ao&&!y.isSelected||this.starting===Hi&&2>a.lastInput.clickCount)):!1},or.prototype.doStart=function(){Po=this,this.textBlock!==null&&this.doActivate()},or.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof Yi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=fo;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new rn(this.textBlock.ga(Ma),this.textBlock.ga(Yl));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},or.prototype.doCancel=function(){this.stopTool()},or.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},or.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Si)},or.prototype.acceptText=function(a){switch(a){case Si:this.qa===Ii?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===fo||this.qa===Wr||this.qa===bo)&&(this.qa=Qi,pi(this));break;case ci:case Ni:case Kr:(Ni!==a||this.textBlock.isMultiline!==!0)&&(this.qa===fo||this.qa===Wr||this.qa===bo)&&(this.qa=Qi,pi(this))}};function pi(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,te="";b.valueFunction!==null&&(te=b.valueFunction()),a.isValidText(y,E,te)?(a.Ea(a.name),a.qa=Ii,a.transactionResult=a.name,y.text=te,a.doSuccess(E,te),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Wr,a.doError(E,te))}}or.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},or.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},or.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Ki,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},or.prototype.doStop=function(){Po=null},or.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},or.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},hn.Object.defineProperties(or.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),or.prototype.measureTemporaryTextBlock=or.prototype.Lx;var ci=new tn(or,"LostFocus",0),Si=new tn(or,"MouseDown",1),Kr=new tn(or,"Tab",2),Ni=new tn(or,"Enter",3),Ei=new tn(or,"SingleClick",0),ao=new tn(or,"SingleClickSelected",1),Hi=new tn(or,"DoubleClick",2),Ki=new tn(or,"StateNone",0),fo=new tn(or,"StateActive",1),bo=new tn(or,"StateEditing",2),Qi=new tn(or,"StateValidating",3),Wr=new tn(or,"StateInvalid",4),Ii=new tn(or,"StateValidated",5),Po=null;or.className="TextEditingTool",or.LostFocus=ci,or.MouseDown=Si,or.Tab=Kr,or.Enter=Ni,or.SingleClick=Ei,or.SingleClickSelected=ao,or.DoubleClick=Hi,or.StateNone=Ki,or.StateActive=fo,or.StateEditing=bo,or.StateValidating=Qi,or.StateInvalid=Wr,or.StateValidated=Ii,Xn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function $i(a){Co||(di(),Co=!0),this.H=Ks,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=qi,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Nn,this.ce=new Go,this.ce.Yd=this,this.Ei=new Nn,this.pu=new Nn,this.Sr=new Nn,this.pr=new Nn,a&&Object.assign(this,a)}$i.prototype.Xe=function(a){this.H=a},$i.prototype.canStart=function(){return!0};function Do(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),qa(a.H),a.zb=!0)}function _o(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===qi?(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===Ja&&y.vc.clear(),a.Qw=!!(a.Pk===ca&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),os(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Fs&&b!==null&&(delete b.start.scale,delete b.end.scale),Qt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Pi(x),bl(x),a.zb=!1,y.start(),y.bc&&(ha(a),x.Ya(),Hs(y,0),Il(x,!0),gi(a),x.R("AnimationStarting",a)))}))}}function zo(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Io(a,y,x,b){a.isTicking||zo(a)||y instanceof kn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Ze=$i.prototype,Ze.fv=function(a){return this.ce.fv(a)},Ze.Xu=function(a){return this.ce.Xu(a)};function ia(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var te=E.pu.iterator;te.next();){var ne=te.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var se=!0;else{for(se=ne.vc.iterator;se.next();){var he=se.key;if(he instanceof Ut&&he.diagram!==null||he instanceof Vt){se=!0;break e}}se=!1}se?Ha(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(ha(E),Il(E.H),gi(E)),Qt.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Qt.requestAnimationFrame(function(){x()}))}function hs(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ha(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 gi(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Ze.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(),os(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),os(y,this.H)},Ze.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))},Ze.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Gr(this,a))},Ze.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),oa(this.ce,y,"position",y.position,y.position),Gr(this,a))};function fi(a,y,x){!a.zb||y.D(x)||zo(a)||(a.H.pi||(y=x.copy()),oa(a.ce,a.H,"position",y,x))}function ui(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Gr(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Ur(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],se=a[2];a=a[3];var he=y[0],ge=y[1],ye=y[2];return y=y[3],se===0||se===100?(te=he,ne=ge):(ye===0||ye===100)&&(he=te,ge=ne),180<Math.abs(he-te)&&(he>te?te+=360:he+=360),te=E(x,te,he-te,b)%360,ne=E(x,ne,ge-ne,b),se=E(x,se,ye-se,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+se+"%, "+x+")"}function di(){function a(x,b,E,te,ne,se){x.position=new Mt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new Vn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new Mt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("location",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!0):x.location=new Mt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:placeholder",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new Mt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,se){var he=x.actualBounds,ge=E.actualBounds;E=ge.x+ge.width/2-he.width/2,he=ge.y+ge.height/2-he.height/2,ne<se?x.mm(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se),!1):x.position=new Mt(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se))}),y.add("desiredSize",function(x,b,E,te,ne,se){x.desiredSize=new rn(te(ne,b.width,E.width-b.width,se),te(ne,b.height,E.height-b.height,se))}),y.add("width",function(x,b,E,te,ne,se){x.width=te(ne,b,E-b,se)}),y.add("height",function(x,b,E,te,ne,se){x.height=te(ne,b,E-b,se)}),y.add("fill",function(x,b,E,te,ne,se){x.fill=Ur(b,E,ne,se,te)}),y.add("stroke",function(x,b,E,te,ne,se){x.stroke=Ur(b,E,ne,se,te)}),y.add("strokeWidth",function(x,b,E,te,ne,se){x.strokeWidth=te(ne,b,E-b,se)}),y.add("strokeDashOffset",function(x,b,E,te,ne,se){x.strokeDashOffset=te(ne,b,E-b,se)}),y.add("background",function(x,b,E,te,ne,se){x.background=Ur(b,E,ne,se,te)}),y.add("areaBackground",function(x,b,E,te,ne,se){x.areaBackground=Ur(b,E,ne,se,te)}),y.add("opacity",function(x,b,E,te,ne,se){x.opacity=te(ne,b,E-b,se)}),y.add("scale",function(x,b,E,te,ne,se){x.scale=te(ne,b,E-b,se)}),y.add("angle",function(x,b,E,te,ne,se){x.angle=te(ne,b,E-b,se)}),Ui=y}hn.Object.defineProperties($i.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&&Nr(a,">= 1",$i,"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}}}),$i.prototype.stopAnimation=$i.prototype.Cc;var Ui=null,Co=!1,qi=new tn($i,"Default",1),ca=new tn($i,"AnimateLocations",2),Ja=new tn($i,"None",3);$i.className="AnimationManager",$i.defineAnimationEffect=function(a,y){Co||(di(),Co=!0),Ui.add(a,y)},$i.Default=qi,$i.AnimateLocations=ca,$i.None=Ja;function Go(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=Qa,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=yo,this.vc=new Vn,this.Tt=new Vn,this.yl=new Nn,this.Ut=new Nn,this.dw=Cc,a&&Object.assign(this,a)}Go.prototype.suspend=function(){this.Xk=!0},Go.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Ha(this,!0),ha(this.Yd),Il(this.H),gi(this.Yd),this.H.redraw()};function os(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}Ze=Go.prototype,Ze.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 Vt?a=x:x instanceof Ut&&(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===qi&&this===y.defaultAnimation&&(this.Lp=Ra,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=kd),ha(y),this.yl.each(function(b){b.data=null,a.add(b)}),gi(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,ia(y,this),this)},Ze.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Ze.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Vt?this.H=a:a instanceof Ut&&a.diagram!==null&&(this.H=a.diagram)),a instanceof rr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return oa(this,a,y,x,b,E),this};function oa(a,y,x,b,E,te){var ne=a.vc;if(y instanceof Vt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(sc(b),s0(),b=[nu.j,nu.u,nu.o,nu.F],sc(E),s0(),E=[nu.j,nu.u,nu.o,nu.F]),ne.contains(y)){var se=ne.I(y),he=se.start,ge=se.end;he[x]===void 0&&(he[x]=js(b)),ge[x]=js(E)}else he={},ge={},he[x]=js(b),ge[x]=js(E),se=he.position,y instanceof Ut&&se instanceof Mt&&!se.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&se.assign(ge.position),se=new qo(he,ge,te),ne.add(y,se);ne=he[x],ne instanceof Mt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof rr?se.Ku.location=js(y.location):te&&(se.Ku[x]=js(b))}function js(a){return a instanceof Mt||a instanceof jn?a.copy():a}Ze.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Ze.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Ha(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),ha(x),Hs(a,E),Il(a.H,!0),gi(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function Hs(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof Ut&&te.diagram===null)){var ne=b.value,se=E?ne.end:ne.start;ne=E?ne.start:ne.end;var he=Ui,ge;for(ge in ne)ge==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||he.get(ge)===null||he.get(ge)(te,se[ge],ne[ge],a.Lp,y,x,a)}}}Ze.stop=function(){return this.bc?(this.Ml(!0),this):this},Ze.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,ha(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var te=Ui;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,ge=E?se.start:se.end,ye=se.Ku,Me;for(Me in ge)if(te.get(Me)!==null){var Re=Me;!se.Hu||Re!=="position:nodeCollapse"&&Re!=="position:placeholder"||(Re="position"),te.get(Re)(ne,he[Me],ye[Me]!==void 0?ye[Me]:se.Hu?he[Me]:ge[Me],this.Lp,this.Gd,this.Gd,this)}se.Hu&&ye.location!==void 0&&ne instanceof rr&&(ne.location=ye.location),se.nv&&ne instanceof rr&&ne.Zb(!1)}if(y.As.clear(),ss(y,!1),y.Ya(),y.N(),Il(y,!0),x.defaultAnimation===this){for(Me=x.pr.iterator;Me.next();)E=Me.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Il(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),gi(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),os(this,null),x.Ml(this),y.$b())}},Ze.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Er&&(b=y.placeholder),b!==null?(x=b.ga(Ma),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Mt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Er)for(a=a.memberParts;a.next();)b=a.value,b instanceof Gn&&this.Cj(b,y)},Ze.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Er&&(x=y.placeholder),x!==null){var b=x.ga(Ma);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof Er)for(a=a.memberParts;a.next();)b=a.value,b instanceof Gn&&this.Aj(b,y)}},Ze.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},hn.Object.defineProperties(Go.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Nr(a,">= 1",Go,"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:Zt("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}}}),Go.prototype.getTemporaryState=Go.prototype.Ez,Go.prototype.stop=Go.prototype.stop,Go.prototype.add=Go.prototype.add,Go.prototype.addTemporaryPart=Go.prototype.Iy;function Qa(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Ra(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Go.className="Animation",Go.EaseLinear=function(a,y,x,b){return x*a/b+y},Go.EaseInOutQuad=Qa,Go.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Go.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Go.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Go.EaseOutExpo=Ra;function qo(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}qo.className="AnimationState";function va(a,y,x){this.xd=null,this.rf=a,this.so=x||ul,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=ys))}va.prototype.copy=function(){var a=new va(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 Zl(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))}hn.Object.defineProperties(va.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 ul=new tn(va,"Default",1),ys=new tn(va,"Immediate",2),as=new tn(va,"Bundled",3);va.className="AnimationTrigger",va.Default=ul,va.Immediate=ys,va.Bundled=as;function Jo(a){vo(this),this.H=null,this.Pa=new Ln,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)}Ze=Jo.prototype,Ze.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Ls(x)}a.clear(),this.Zq.length=0},Ze.Xe=function(a){this.H=a},Ze.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,te=0,ne=0,se=this.Pa.iterator;se.next();){var he=se.value;he instanceof Er?E++:he instanceof Gn?b++:he instanceof kn?te++:he instanceof ai?ne++:x++}if(se="",0<x&&(se+=x+" Parts "),0<b&&(se+=b+" Nodes "),0<E&&(se+=E+" Groups "),0<te&&(se+=te+" Links "),0<ne&&(se+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,se+=`
`+x.toString(),b=x.data,b!==null&&Xt(b)&&(se+=" #"+Xt(b)),x instanceof Gn?se+=" "+_i(b):x instanceof kn&&(se+=" "+_i(x.fromNode)+" "+_i(x.toNode));return y+" "+this.Pa.count+": "+se},Ze.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=Mt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||lf(se)!==!1)&&se.isVisible()&&(E.assign(a),No(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return Mt.free(E),se}return Mt.free(E),null},Ze.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Ln||b instanceof Nn||(b=new Nn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=Mt.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||lf(he)!==!1)&&he.isVisible()){te.assign(a),No(te,he.oe);var ge=he;he.ji(te,y,x,b)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||b.add(ge))}}return Mt.free(te),b},Ze.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Ln||E instanceof Nn||(E=new Nn),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((te!==!0||lf(he)!==!1)&&he.isVisible()){var ge=he;he.Cf(a,y,x,b,E)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||E.add(ge))}}return E},Ze.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var se=this.Pa.s,he=se.length;he--;){var ge=se[he];if((ne!==!0||lf(ge)!==!1)&&te(ge)&&ge.isVisible()){var ye=ge;ge.Cf(a,y,x,b,E)&&(y!==null&&(ye=y(ye)),ye===null||x!==null&&!x(ye)||E.add(ye))}}return E},Ze.og=function(a,y,x,b,E,te){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Ln||E instanceof Nn)&&(te=E),E=!0),te instanceof Ln||te instanceof Nn||(te=new Nn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var se=Mt.alloc(),he=Mt.alloc(),ge=this.Pa.s,ye=ge.length;ye--;){var Me=ge[ye];if((ne!==!0||lf(Me)!==!1)&&Me.isVisible()){se.assign(a),No(se,Me.oe),he.h(a.x+y,a.y),No(he,Me.oe);var Re=Me;Me.og(se,he,x,b,E,te)&&(x!==null&&(Re=x(Re)),Re===null||b!==null&&!b(Re)||te.add(Re))}}return Mt.free(se),Mt.free(he),te},Ze.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=xr();for(var E=xr(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof kn){if(ne.fd===!1)continue}else if(ne instanceof ai&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&Kl(se,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],I0(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)I0(E[y]);gr(a),gr(E)}}};function Ka(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Ze.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Ka(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=rn.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(rn.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function ju(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var te=E.length;if(te!==0){var ne=Ka(a,y),se=a.Zq;se.length=0;for(var he=x.scale,ge=rn.alloc(),ye=0;ye<te;ye++){var Me=E[ye];b.contains(Me)&&a.Oj(y,Me,x,se,he,ge,!1)}rn.free(ge),y.globalAlpha=ne}}}Ze.Oj=function(a,y,x,b,E,te,ne){if(ne&&!lf(y))a.Hs(y);else{if(b!==null&&y instanceof kn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&te.Ex(b.tb):b.tb!==null&&(ne=!0,te.assign(b.tb)),b=b.containingGroup;var se=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(se)){a.Hs(y);return}b=!te.Re(se)}b&&(a.save(),a instanceof Bl?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),se.width*E>x.Oq||se.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,te=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Xo(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Xo(y,a,"rgba(0,0,0,0.3)",!0,!1,te,E),a.fillRect(E.x,E.y,E.width,E.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,te,E),a.fillRect(0,0,te.width/2,te.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)))))),b&&(a.restore(),a.Vc(!0))}},Ze.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(wo,a,this,y,x,b,E)},Ze.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&Ls(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),Ss(this,a,y),a},Ze.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,Ls(y),a};function Ss(a,y,x){if(y=ch(a,y,x),x instanceof Er&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];if(se===x&&(y=ne,0<=b)||0>b&&se.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&Ss(a,-1,y)}x.svg!==null&&x.svg.remove()}function ch(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var te=y-1,ne=NaN;0<=te&&(ne=a.M(te).zOrder,!!isNaN(ne));)te--;for(var se=y+1,he=NaN;se<E&&(he=a.M(se).zOrder,!!isNaN(he));)se++;if(!isNaN(ne)&&ne>b)for(;;){if(te===-1||ne<=b){if(te++,te===y)break;return a.mb(y),a.Gb(te,x),te}for(ne=NaN;0<=--te&&(ne=a.M(te).zOrder,isNaN(ne)););}else if(!isNaN(he)&&he<b)for(;;){if(se===E||he>=b){if(se--,se===y)break;return a.mb(y),a.Gb(se,x),se}for(he=NaN;++se<E&&(he=a.M(se).zOrder,isNaN(he)););}return y}hn.Object.defineProperties(Jo.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===""&&Zt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Zt("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)&&Nr(a,"0 <= value <= 1",Jo,"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))}}}),Jo.prototype.findObjectsNear=Jo.prototype.og,Jo.prototype.findObjectsIn=Jo.prototype.Cf,Jo.prototype.findObjectsAt=Jo.prototype.ji,Jo.prototype.findObjectAt=Jo.prototype.ic,Jo.className="Layer";function Vt(a,y){if(cm||(Ms(),cm=!0),vo(this),Ks=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Ko){var x=this,b=function(){x.removeEventListener(Qt.document,"DOMContentLoaded",b,!1),x.setRTL()};Qt.document.body!==null?this.setRTL():x.addEventListener(Qt.document,"DOMContentLoaded",b,!1)}this.ol=null,lp.add("Model",ki);var E=this;return this.Hb=function(te){var ne=E.partManager;if(te.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var se=te.change;te.modelChange===""&&se===wo&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,Fu(this),this.model=cy(),this.Wg=!0,Bi(this),this.layout=new Eo,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 fm,a!==void 0&&(typeof a=="string"||Qt.Element&&a instanceof Element?xi(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Jl,Ks;function Fu(a){a.Yd=new $i,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Ln,a.pj=new Vn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Mt(NaN,NaN).freeze(),a.du=new Mt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Mt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Br,a.zu=new Mt(NaN,NaN).freeze(),a.ut=new rn(NaN,NaN,NaN,NaN).freeze(),a.rj=new yr(0,0,0,0).freeze(),a.sj=Cc,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Fs,a.zk=Ba,a.Fg=Fs,a.pq=Ba,a.yt=Ma,a.Bt=Ma,a.Fc=!0,a.pn=!1,a.De=new Nn,a.Eh=new Vn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new yr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new gs,a.bq.diagram=a,a.Qg=new gs,a.Qg.diagram=a,a.cj=new gs,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new Nn,a.Ht=!0,a.uu=Ec,a.pw=!1,a.wu=Ed,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new Vn,a.Xn=new Ln,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 yr(5).freeze(),a.Hw=new Nn().freeze(),a.Nt=999999999,a.nw=new Nn().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 Nn,a.ow=new Nn,a.Xh=null,a.aw=new jn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Mt,bounds:new rn,Py:new jn,bA:new jn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new rn(NaN,NaN,NaN,NaN).freeze(),a.wo=new jn(NaN,NaN).freeze(),a.Sp=new rn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Vn;var y=new Gn,x=new Yi;x.bind(new fa("text","",_i)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Gn,x=new Yi,x.stroke="brown",x.bind(new fa("text","",_i)),y.add(x),a.Lg.add("Comment",y),y=new Gn,y.selectable=!1,y.avoidable=!1,x=new Or,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new jn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Vn,y=new Er,y.selectionObjectName="GROUPPANEL",y.type=wn.Vertical,x=new Yi,x.font="bold 12pt sans-serif",x.bind(new fa("text","",_i)),y.add(x),x=new wn(wn.Auto),x.name="GROUPPANEL";var b=new Or;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Js,b.padding=new yr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Vn,y=new kn,x=new Or,x.isPanelMain=!0,y.add(x),x=new Or,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new kn,x=new Or,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new ai,y.type=wn.Auto,x=new Or,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Js,x.margin=new yr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new ai,y.type=wn.Link,x=new Or,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 ki,a.toolManager=new ho,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ce,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=$a(),a.eq=null,a.fq=Fa,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 Mt,a.zy=500,a.wp=new Mt,a.wq=!1}Vt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Xf=null,rf="",wu(this,!1),this.Xn.clear(),wp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function wu(a,y){a.animationManager.Cc(!0),a.Hw=new Nn().freeze(),a.nw=new Nn().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var te=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var se=a.Wa.s[y].parts;se.next();){var he=se.value;he!==E&&he.data===null&&te.push(he)}for(y=0;y<te.length;y++)a.remove(te[y])}for(y=0;y<ne;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(),wp(),a.Og.clear(),ga=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function $a(){return null}Vt.prototype.reset=function(){this.clear(),this.vb=!0,Fu(this),El(this),this.Wg=!0,Bi(this),this.layout=new Eo,this.Wg=!1,this.model=cy(),this.model.undoManager=new jo,this.vb=this.rn=!1,this.N()},Vt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Qt.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},Vt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Qt.document.body);var y=0;if(Ko){var x=hm;y=Jl,x===null&&(x=hm=_n("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Jl=_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 b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||Aa||(y=11)}this.Db=y,this.Gw=!0},Vt.prototype.qb=function(a){a.classType===Vt&&(this.autoScale=a)},Vt.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 xi(a,y){if(Ko){if(y!=null||Zt("Diagram setup requires an argument DIV."),a.Ka!==null&&Zt("Diagram has already completed setup."),typeof y=="string"?a.Ka=Qt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Zt("No DIV or DIV id supplied: "+y),a.Ka===null&&Zt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Zt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Qt.ResizeObserver){var x=dr(function(){a.$b()},250);a.ol=new Qt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Qt.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=Qt.go;var E=new Eu(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Qt.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Wf(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Eu(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Ko){E=_n("div");var te=_n("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",te.style.position="absolute",te.style.width="1px",te.style.height="1px",a.Ka.appendChild(E),E.appendChild(te),E.onscroll=Vi,E.addEventListener("pointerdown",eo),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=dr(function(){a.Yh=null,a.N()},300),a.Ov=dr(function(){bl(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=cl(a,ne,!0);se.bubbles=!0;var he=0,ge=0;se.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(he=0<ne.deltaX?1:-1),ne.deltaY!==0&&(ge=0<ne.deltaY?1:-1),se.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-he:-ge):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(he=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(ge=0<ne.wheelDeltaY?-1:1),se.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-he:-ge):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(se.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),ws(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,cl(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.Yt;se[ne.pointerId]===void 0&&(se[ne.pointerId]=ne),se=a.oj;var he=!1;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType)if(se[1]!==null&&se[1].pointerId===ne.pointerId)se[1]=ne,he=!0;else if(se[0]===null)se[0]=ne;else if(se[1]===null)se[1]=ne,he=!0;else{ne.preventDefault();return}else se[0]=ne;(se=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var ge=he;he=tc(a,ne,!0,!1,!0,ge),jh(a,ne,he),he.targetDiagram=zf(ne,ne.target),he.targetObject=null,ge||he.clone(a.bq),ge=a.uw,se=se?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(ge.x-ne.screenX)>se||Math.abs(ge.y-ne.screenY)>se)?a.yq++:a.yq=1,he.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():ws(he,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.oj;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType){if(se[1]!==null&&se[1].pointerId===ne.pointerId){se[1]=ne;return}if(se[0]===null)se[0]=ne;else return}else se[0]=ne;if(se[0].pointerId===ne.pointerId){se=tc(a,ne,!1,!1,!1,se[1]!==null);var he=Qt.document.elementFromPoint(ne.clientX,ne.clientY)||null;he!==null&&he.shadowRoot!==void 0&&he.shadowRoot!==null&&(he=he.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var ge=a,ye=ne;he&&he.H&&(ye=ne,ge=he.H),se.targetDiagram=ge,jh(a,ye,se),se.targetObject=null,a.doMouseMove(),ws(se,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var se=ne.pointerType==="touch"||ne.pointerType==="pen",he=a.Yt;if(se&&a.qu)delete he[ne.pointerId],ne.preventDefault();else if(he=a.oj,he[0]===null||he[0].pointerId!==ne.pointerId&&he[0].pointerType===ne.pointerType)he[1]!==null&&he[1].pointerId===ne.pointerId&&(he[1]=null);else{he[0]=null,he=tc(a,ne,!1,!0,!0,!1);var ge=Qt.document.elementFromPoint(ne.clientX,ne.clientY)||null;ge!==null&&ge.shadowRoot!==void 0&&ge.shadowRoot!==null&&(ge=ge.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),ge!==null&&ge.H instanceof Vt&&ge.H!==a&&jh(ge.H,ne,he),ge===null&&(ge=ne.target),jh(a,ne,he),he.clickCount=a.yq,he.targetDiagram=zf(ne,ge),he.targetObject=null,a.doMouseUp(),ws(he,ne),se&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var se=a.Yt;se[ne.pointerId]&&delete se[ne.pointerId],se=a.oj,se[0]!==null&&se[0].pointerId===ne.pointerId&&(se[0]=null),se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var se=a.oj;se[0]!==null&&se[0].pointerId===ne.pointerId?(se[0]=null,a.wq=!1):se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null)},a.Vp=b.Z["d"+Td[1]+Td[2]+"wI"+Zf.slice(1,5)]["b"+jx.slice(1,y)](b.Z,Md,y,y),b.Vc(!0),Ao(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Vt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Vt.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Ao(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(Qt,"resize",a.Ov,!1)}function Pi(a){30<a.Sq&&(a.Yh=1)}function ss(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Fo&&Fo.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Vt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Qt.devicePixelRatio||1},Vt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Vt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Vt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Vt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Vt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Vt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Vt.prototype.doFocus=function(){this.focus()},Vt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Qt.scrollX||Qt.pageXOffset,y=Qt.scrollY||Qt.pageYOffset;this.ta.focus(),Qt.scrollTo(a,y)}},Vt.prototype.Oy=function(){this.H.R("GainedFocus")},Vt.prototype.Ny=function(){this.H.R("LostFocus")};function bl(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,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Fs&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Bi(a){var y=new Jo;y.name="Background",a.Al(y),y=new Jo,y.name="",a.Al(y),y=new Jo,y.name="Foreground",a.Al(y),y=new Jo,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Jo,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Jo,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function po(a){var y=new wn(wn.Grid);y.name="GRID";var x=new Or;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Or,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Or,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Or,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Or,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Or,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new rr,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 Vi(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):bc(this.H)}function eo(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):bc(this.H)}Vt.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,te=this.rj,ne=b.x-te.left,se=b.y-te.top,he=b.width+te.left+te.right,ge=b.height+te.top+te.bottom,ye=b.right+te.right;te=b.bottom+te.bottom;var Me=E.x;b=E.y;var Re=E.width,Ve=E.height,qe=E.right,it=E.bottom;E=this.scale;var At=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":At=At+a.scrollWidth-a.clientWidth;break;case"reverse":At=a.scrollWidth-At-a.clientWidth}var bt=At;Re<he||Ve<ge?(At=Mt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==bt&&(At.x=bt/E+ne,this.ju=bt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(At.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=At,Mt.free(At),this.Ee=this.qr=!1):(At=Mt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Me&&(this.position=At.h(bt+ne,this.position.y)),ye>qe&&(this.position=At.h(-(y.scrollWidth-this.Aa)+bt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=At.h(this.position.x,a.scrollTop+se)),te>it&&(this.position=At.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),Mt.free(At),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ye=b.right,qe=E.right,te=b.bottom,it=E.bottom,ne=b.x,Me=E.x,se=b.y,b=E.y,Re>=he&&ne>=Me&&ye<=qe&&(x.style.width="1px"),Ve>=ge&&se>=b&&te<=it&&(x.style.height="1px"))}},Vt.prototype.computeBounds=function(a){return a===void 0&&(a=new rn),qa(this),aa(this,a)};function aa(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var se=ne.length,he=0;he<se;he++){var ge=ne[he];ge.isInDocumentBounds&&ge.isVisible()&&(ge=ge.actualBounds,ge.w()&&(x?(x=!1,y.assign(ge)):y.ed(ge)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Vt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(vr(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof kn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof kn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new rn(NaN,NaN,0,0):x};function Uo(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=Mt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=rn.allocAt(0,0,b.width,b.height);var E=Mt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,rn.free(b),Mt.free(E),Mt.free(x)}x=a.yh,y&&a.Fg!==Fs&&(x=a.Fg);var te=x!==Fs?Ql(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,se=a.zk,he=a.pq;y&&!se.sb()&&(he.sb()||he.Xb())&&(se=he.Xb()?oi:he),bu(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,Wt.B(te.x,x)&&Wt.B(te.y,b)&&Wt.B(te.width,E)&&Wt.B(te.height,ne)||a.onViewportBoundsChanged(new rn(x,b,E,ne),te,y,!1)}}function Ql(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var te=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),se=te/E,he=ne/b;return y===ql?(y=Math.min(he,se),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===of?(y=he>se?(ne-a.Db)/b:(te-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Vt.prototype.zoomToFit=function(){var a=this.sj;this.sj=Cc,this.scale=Ql(this,ql),a!==Cc&&(Uo(this,!1),bu(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ze=Vt.prototype,Ze.BA=function(a,y){y===void 0&&(y=ql);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===ql||y===of)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var te=this.ya;E=y===of?te/b>E/x?(te-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(te/b,E/x)}this.scale=E,this.position=new Mt(a.x,a.y)}},Ze.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Mt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},Ze.zz=function(a){if(a instanceof Ut){this.eq=a;var y=Mt.alloc();this.fq=this.op(a.ga(Ma,y)),Mt.free(y)}else this.eq=null,this.fq=Fa};function bu(a,y,x,b,E,te){var ne=Mt.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var ge=Mt.alloc();ge=a.eq.ga(Ma,ge),se=ge.x-a.fq.x/a.scale,he=ge.y-a.fq.y/a.scale,E=ba,Mt.free(ge)}(te||a.scrollMode===Cc)&&(E.sb()&&(x>y.width&&(se=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(he=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,te=x-y.width,x<y.width+E.left+E.right?(se=Math.min(se+x/2,y.right+Math.max(te,E.right)-x/2),se=Math.max(se,y.left-Math.max(te,E.left)+x/2),se-=x/2):se>y.left?se=y.left:se<y.right-x&&(se=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(he=Math.min(he+b/2,y.bottom+Math.max(x,E.bottom)-b/2),he=Math.max(he,y.top-Math.max(x,E.top)+b/2),he-=b/2):he>y.top?he=y.top:he<y.bottom-b&&(he=y.bottom-b)),ne.x=isFinite(se)?se:-a.yb.left,ne.y=isFinite(he)?he:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),fi(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),El(a),Mt.free(ne)}Ze.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=hl(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof rr)return a}else if(a=hl(this,a,function(x){return x.part}),a instanceof rr)return a;return null},Ze.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),qa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function hl(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),qa(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}Ze.lz=function(a,y,x){return y===void 0&&(y=!0),xs(this,a,function(b){return b.part},y?function(b){return b instanceof rr&&b.canSelect()}:null,x)};function xs(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof Ln||E instanceof Nn||(E=new Nn),qa(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}Ze.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof Ln||b instanceof Nn||(b=new Nn),qa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},Ze.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Du(this,a,function(E){return E instanceof rr&&(!x||E.canSelect())},y,b)},Ze.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Ln||E instanceof Nn||(E=new Nn),qa(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},Ze.Nu=function(a,y,x,b,E,te){var ne=new Nn;qa(this);for(var se=this.Wa.iteratorBackwards;se.next();){var he=se.value;he.visible&&he.Nu(a,y,x,b,ne,E,te)}return ne};function Du(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof Ln||E instanceof Nn||(E=new Nn),qa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}Ze.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Iu(this,a,y,function(te){return te instanceof rr&&(!b||te.canSelect())},x,E)},Ze.og=function(a,y,x,b,E,te){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Ln||E instanceof Nn)&&(te=E),E=!0),te instanceof Ln||te instanceof Nn||(te=new Nn),qa(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var se=ne.value;se.visible&&se.og(a,y,x,b,E,te)}return te};function Iu(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof Ln||E instanceof Nn)&&(te=E),E=!0),te instanceof Ln||te instanceof Nn||(te=new Nn),qa(a),a=a.Wa.iteratorBackwards;a.next();){var se=a.value;se.visible&&!se.isTemporary&&se.og(y,x,ne,b,E,te)}return te}Vt.prototype.acceptEvent=function(a){return cl(this,a,a instanceof MouseEvent)};function cl(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?jh(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),Aa&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=zf(y,y.target),b.targetObject=null,b}function zf(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 tc(a,y,x,b,E,te){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,Aa&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=te,ne}function ws(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Vt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=cl(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(),ws(x,a)},Vt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=cl(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(),ws(x,a)},Vt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=cl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),ws(x,a)},Vt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=cl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),ws(x,a)},Vt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Mt(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?No(new Mt(y,a),this.Ab):new Mt(y,a)};function jh(a,y,x){var b=a.ta,E=a.Aa,te=a.ya,ne=0,se=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,se=y.clientY-te/b.height*b.top),x.viewPoint.h(ne,se),a.Ab!==null?(y=Mt.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),Mt.free(y)):x.documentPoint.h(ne,se)}function bd(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}Vt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function rp(a){a.ld||qa(a),a.Va()}Vt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Ze=Vt.prototype,Ze.Pz=function(){return this.kg},Ze.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Il(this),this.hf=!1,this.du=new Mt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Ar(function(){b.ld=!1,Do(y,"Model"),a(b)},1)},Ze.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Qt.requestAnimationFrame(function(){y.kg&&y.bd()})}},Ze.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Il(this))};function Pu(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||bc(a)||(y&&qa(a),x&&Uo(a,!1))}function Il(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];Sa(se,!1),se.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(he){he.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||bl(a),Pu(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(es(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),qa(a),te=!1,(!a.hf||a.xh)&&(a.hf?eg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),eg(a,!1)),te=!0),a.Jk=!1,qa(a),a.ou||rp(a),Pu(a,!0,!1),ne=!1,te?(x=rn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Pd(a)),a.R("LayoutCompleted"),Pu(a,!0,!1),rn.free(x)):x.Ok&&x.Qw&&(a.Fg!==Fs?a.scale=Ql(a,a.Fg):a.yh!==Fs?a.scale=Ql(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Uo(a,!0)),te&&ne&&a.eb("Initial Layout"),qa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Pd(a){if(a.Fg!==Fs)a.scale=Ql(a,a.Fg);else if(a.yh!==Fs)a.scale=Ql(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Uo(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),es(a)}function qa(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 Nn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Er&&b.U&65536&&(b.U=b.U^65536)})}}Ze.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Er||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Er&&x.isVisible()&&ef(this,x);for(a.reset();a.next();)x=a.value,x instanceof kn&&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 ai&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function ef(a,y){for(var x=xr(),b=xr(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof Er?(tu(te)||Ys(te)||sf(te))&&ef(a,te):te instanceof kn?te.fromNode===y||te.toNode===y?b.push(te):x.push(te):(te.measure(1/0,1/0),te.arrange()))}for(a=x.length,E=0;E<a;E++)te=x[E],te.measure(1/0,1/0),te.arrange();for(gr(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();gr(b)}Ze.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Ze.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Zt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){nc(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,te=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,se=this.Ab;for(se.reset(),E!==1&&se.scale(E),y.x===0&&y.y===0||se.translate(-te,-ne),a.ti=null,Zy(a,se.m11,se.m12,se.m21,se.m22,se.dx,se.dy),this.pb!==1&&(a.globalAlpha=this.pb),fh(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<b;y++)x[y].gc(a,this);a=!1,this.Yf?Jf(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Br.prototype.Cd=Br.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,nc(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!te.isAnimating)break e;te=this.Ab,te.reset(),ne=this.Mb,se=this.pa;var he=this.Ca,ge=Math.round(se.x*he)/he,ye=Math.round(se.y*he)/he;for(he!==1&&te.scale(he),se.x===0&&se.y===0||te.translate(-ge,-ye),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),fh(this,a),se=0;se<E;se++)a.setTransform(ne,0,0,ne,0,0),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.yc(),y[se].gc(a,this);if(y=!1,this.Yf?Jf(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Br.prototype.Cd=Br.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Fo&&Fo.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function Uf(a,y,x,b,E,te,ne,se,he,ge){if(a.Ka!==null){a.ta===null&&Zt("No canvas specified"),ne===void 0&&(ne=null),se===void 0&&(se=null),he===void 0&&(he=!1),ge===void 0&&(ge=!1),nc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ye=a.Ca;a.Ca=E;var Me=a.Wa.s,Re=Me.length;try{var Ve=new rn(te.x,te.y,b.width/E,b.height/E),qe=Ve.copy();qe.Co(x),es(a,qe),qa(a),a.Fd(Me,Re,a,Ve),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),se!==null&&se!==""&&(y.fillStyle=se,y.ox(0,0,b.width,b.height));var it=a.Mb;y.scale(it,it);var At=Br.alloc();At.reset(),At.translate(x.left,x.top),At.scale(E),te.x===0&&te.y===0||At.translate(-te.x,-te.y),y.setTransform(At.m11,At.m12,At.m21,At.m22,At.dx,At.dy),y.yc(),y instanceof Bl&&Zy(y,At.m11,At.m12,At.m21,At.m22,At.dx,At.dy),Br.free(At),fh(a,y),y.globalAlpha=a.pb;var bt=a.Qj("Grid");if(ne){var Ot=new Nn,Ft=ne.iterator;for(Ft.reset();Ft.next();){var It=Ft.value;It instanceof rr&&(ge||It.layer!==bt)&&(It.Gj(),Ot.add(It))}for(ge=0;ge<Re;ge++)ju(Me[ge],y,a,Ot,he);Ot.each(function(Yt){return Yt.Gj()})}else for(Ot=0;Ot<Re;Ot++){var Gt=Me[Ot];Gt===bt?ge&&Gt.gc(y,a,!0):Gt.gc(y,a,he)}a.$i=!1,a.Yf&&Jf(a.Yf,a)&&a.Vp()}finally{a.Ca=ye,a.ib.Vc(!0),a.vd=!0,a.Fd(Me,Re,a,a.viewportBounds),es(a),a.ib instanceof Bl&&(a.ib.Nj.PA(),a.redraw())}}}Ze.Gf=function(a){return this.Rg[a]},Ze.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Ze.Tx=function(){this.Rg=new jr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Aa||_s),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function fh(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Ze.Ql=function(a){return this.on[a]},Ze.sA=function(a,y){this.on[a]=y},Ze.Sx=function(){this.on=new jr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Ze.set=function(a){return Object.assign(this,a),this},Ze.Du=function(a){return this.nm(a)},Ze.nm=function(a){return wc(this,a),this};function wc(a,y){var x=a instanceof wn,b=a instanceof Vt,E;for(E in y){E===""&&Zt("Setting properties requires non-empty property names");var te=a,ne=E;if(x||b){var se=E.indexOf(".");if(0<se){var he=E.substring(0,se);x?te=a.fb(he):(te=a[he],te==null&&(te=a.toolManager[he])),Tn(te)?ne=E.substr(se+1):Zt("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!oo(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&oo(a.toolManager,ne))te=a.toolManager;else if(b&&sm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof Qn&&ne==="Changed"){a.Pe(y[ne]);continue}else Zt('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof Ut&&te.Vw(ne)}}Ze.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Vn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Ze.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")},Vt.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!==kd&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),te=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))*b&&0<Math.max(0,te-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=rn.alloc(),gh(this,this.computeBounds(b)),rn.free(b)),b=this.ta,b===null||b instanceof mh)))){var ne=this.Mb;E=this.Aa*ne;var se=this.ya*ne,he=this.scale*ne;te=Math.round(Math.round(y.x*he)-Math.round(a.x*he)),y=Math.round(Math.round(y.y*he)-Math.round(a.y*he)),he=this.jw,a=this.oy,he.width!==E&&(he.width=E),he.height!==se&&(he.height=se),a.clearRect(0,0,E,se),he=190*ne;var ge=70*ne,ye=Math.max(te,0),Me=Math.max(y,0),Re=Math.floor(E-ye),Ve=Math.floor(se-Me);a.drawImage(b.Oa,ye,Me,Re,Ve,0,0,Re,Ve),Jf(this.Yf,this)&&a.clearRect(0,0,he,ge),b=xr(),a=xr(),Ve=Math.abs(te),Re=Math.abs(y);var qe=ye===0?0:E-Ve;ye=Mt.allocAt(qe,0),Ve=Mt.allocAt(Ve+qe,se),a.push(new rn(Math.min(ye.x,Ve.x),Math.min(ye.y,Ve.y),Math.abs(ye.x-Ve.x),Math.abs(ye.y-Ve.y)));var it=this.Ab;if(it.reset(),it.scale(ne,ne),this.Ca!==1&&it.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&it.translate(-ne.x,-ne.y),No(ye,it),No(Ve,it),b.push(new rn(Math.min(ye.x,Ve.x),Math.min(ye.y,Ve.y),Math.abs(ye.x-Ve.x),Math.abs(ye.y-Ve.y))),qe=Me===0?0:se-Re,ye.h(0,qe),Ve.h(E,Re+qe),a.push(new rn(Math.min(ye.x,Ve.x),Math.min(ye.y,Ve.y),Math.abs(ye.x-Ve.x),Math.abs(ye.y-Ve.y))),No(ye,it),No(Ve,it),b.push(new rn(Math.min(ye.x,Ve.x),Math.min(ye.y,Ve.y),Math.abs(ye.x-Ve.x),Math.abs(ye.y-Ve.y))),Jf(this.Yf,this)&&(E=0<te?0:-te,se=0<y?0:-y,ye.h(E,se),Ve.h(he+E,ge+se),a.push(new rn(Math.min(ye.x,Ve.x),Math.min(ye.y,Ve.y),Math.abs(ye.x-Ve.x),Math.abs(ye.y-Ve.y))),No(ye,it),No(Ve,it),b.push(new rn(Math.min(ye.x,Ve.x),Math.min(ye.y,Ve.y),Math.abs(ye.x-Ve.x),Math.abs(ye.y-Ve.y)))),Mt.free(ye),Mt.free(Ve),Pu(this,!1,!0),this.Ka===null&&Zt("No div specified"),this.ta===null&&Zt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(nc(this),se=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*se,this.ya*se),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,he=Math.round(te.x*ne)/ne,ge=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-he,-ge),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)he=a[ne],he.width!==0&&he.height!==0&&E.rect(Math.floor(he.x),Math.floor(he.y),Math.ceil(he.width),Math.ceil(he.height));for(E.clip(),E.setTransform(se,0,0,se,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,te=y.length,this.Fd(y,te,this,this.viewportBounds),fh(this,E),E.globalAlpha=this.pb,se=0;se<te;se++)if(ne=y[se],he=b,ne.visible&&ne.pb!==0){ge=Ka(ne,E),Me=ne.Zq,Me.length=0,ye=this.scale,Re=rn.alloc(),Ve=ne.Pa.s,it=Ve.length,qe=he.length;for(var At=0;At<it;At++){var bt=Ve[At],Ot=rd(bt,bt.actualBounds);e:{for(var Ft=2/ye,It=4/ye,Gt=0;Gt<qe;Gt++){var Yt=he[Gt];if(Yt.width!==0&&Yt.height!==0&&Ot.Vu(Yt.x-Ft,Yt.y-Ft,Yt.width+It,Yt.height+It)){Ot=!0;break e}}Ot=!1}Ot&&ne.Oj(E,bt,this,Me,ye,Re,!0)}rn.free(Re),E.globalAlpha=ge}E.restore(),E.Vc(!0),this.Yf&&Jf(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}gr(b),gr(a),this.ld=!1}}else this.bd();x&&(Pi(this),this.bd(),ss(this,!0))}else x?(Pi(this),this.bd(),ss(this,!0)):this.bd()}};function nc(a){a.pn!==!1&&(a.pn=!1,Wf(a,a.Aa,a.ya))}function Wf(a,y,x){El(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function bc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,te=!1,ne=a.gf?a.Db:0,se=a.Be?a.Db:0,he=E.clientWidth||x+ne,ge=E.clientHeight||b+se,ye=a.viewportBounds;E=ye.x;var Me=ye.y,Re=ye.width,Ve=ye.height;if((he!==x+ne||ge!==b+se)&&(a.gf=!1,a.Be=!1,se=ne=0,a.Aa=he,a.ya=ge,te=a.pn=!0,El(a)),!a.hf||!a.viewportBounds.w())return!0;var qe=a.ku,it=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var At=a.documentBounds,bt=0,Ot=0,Ft=0,It=0,Gt=ye.width,Yt=ye.height,Bn=a.rj;a.contentAlignment.sb()?(At.width>Gt&&(bt=Bn.left,Ot=Bn.right),At.height>Yt&&(Ft=Bn.top,It=Bn.bottom)):(bt=Bn.left,Ot=Bn.right,Ft=Bn.top,It=Bn.bottom);var Zn=At.width+bt+Ot,Hn=At.height+Ft+It;Bn=a.scale;var En=Zn>he/Bn,fn=Hn>ge/Bn;if(!(te||a.gf||a.Be||En||fn))return!0;bt=At.x-bt,he=ye.x,Ot=At.right+Ot,ge=ye.right+ne,Ft=At.y-Ft;var Cr=ye.y;At=At.bottom+It,ye=ye.bottom+se;var Sr="1px";if(It="1px",a.scrollMode===Cc&&(En||fn)&&(En&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(En=1,bt+1<he&&(En=Math.max((he-bt)*Bn+a.Aa,En)),Ot>ge+1&&(En=Math.max((Ot-ge)*Bn+a.Aa,En)),Gt+ne+1<Zn&&(En=Math.max((Zn-Gt)*Bn+a.Aa,En)),Sr=En.toString()+"px"),fn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(En=1,Ft+1<Cr&&(En=Math.max((Cr-Ft)*Bn+a.ya,En)),At>ye+1&&(En=Math.max((At-ye)*Bn+a.ya,En)),Yt+se+1<Hn&&(En=Math.max((Hn-Yt)*Bn+a.ya,En)),It=En.toString()+"px")),En=Sr!=="1px",fn=It!=="1px",En&&fn||!En&&!fn||(fn&&(ge-=a.Db),En&&(ye-=a.Db),Zn<Gt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,bt+1<he&&(ne=Math.max((he-bt)*Bn+a.Aa,ne)),Ot>ge+1&&(ne=Math.max((Ot-ge)*Bn+a.Aa,ne)),Gt+1<Zn&&(ne=Math.max((Zn-Gt)*Bn+a.Aa,ne)),Sr=ne.toString()+"px"),En=Sr!=="1px",ne=a.ya,En!==a.Be&&(ne=En?a.ya-a.Db:a.ya+a.Db),Hn<Yt+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,Ft+1<Cr&&(se=Math.max((Cr-Ft)*Bn+ne,se)),At>ye+1&&(se=Math.max((At-ye)*Bn+ne,se)),Yt+1<Hn&&(se=Math.max((Hn-Yt)*Bn+ne,se)),It=se.toString()+"px"),fn=It!=="1px"),a.qr&&En===a.Be&&fn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(En!==a.Be&&(Sr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=En,it.style.width=Sr,fn!==a.gf&&(It==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=Mt.alloc(),fn?(y.style.left=a.Db+"px",a.position=se.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=se.h(a.pa.x-a.Db/a.scale,a.pa.y)),Mt.free(se))),te&&El(a),a.gf=fn,it.style.height=It,a.gu=!0,te&&(a.pn=!0),y=qe.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Gt+1<Zn?y=(a.position.x-bt)*Bn:bt+1<he?y=qe.scrollWidth-qe.clientWidth:Ot>ge+1&&(y=a.position.x*Bn)),a.tn)switch(a.bu){case"negative":y=-(qe.scrollWidth-y-qe.clientWidth);break;case"reverse":y=qe.scrollWidth-y-qe.clientWidth}return qe.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Yt+1<Hn?qe.scrollTop=(a.position.y-Ft)*Bn:Ft+1<Cr?qe.scrollTop=qe.scrollHeight-qe.clientHeight:At>ye+1&&(qe.scrollTop=a.position.y*Bn)),he=a.Aa,ge=a.ya,qe.style.width=he+(a.gf?a.Db:0)+"px",qe.style.height=ge+(a.Be?a.Db:0)+"px",x!==he||b!==ge||a.animationManager.zb?(x=rn.allocAt(E,Me,Re,Ve),a.onViewportBoundsChanged(x,a.viewportBounds,Bn,te),rn.free(x),!1):!0}Ze=Vt.prototype,Ze.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Zt("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&&Zt('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(Zo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Ze.oi=function(a){this.partManager.oi(a);var y=this;ed(a,function(x){$l(y,x)}),(a instanceof ai||a instanceof Er&&a.placeholder!==null)&&a.v(),a.data!==null&&ed(a,function(x){ly(y.partManager,x)}),Ys(a)!==!0&&sf(a)!==!0||this.De.add(a),R1(a,!0,this),G1(a)?(a.actualBounds.w()&&this.N(rd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(rd(a,a.actualBounds)),this.$b()},Ze.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&ed(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),G1(a)?(a.actualBounds.w()&&this.N(rd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(rd(a,a.actualBounds)),this.$b()},Ze.remove=function(a){Hf(this,a,!0)};function Hf(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(ra,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Ze.Is=function(a,y){if(y===void 0&&(y=!1),vr(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new Nn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Ze.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Vt.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Kf(this)),this.toolManager!==null){var E=new Vn;if(a!==null)if(vr(a))for(var te=0;te<a.length;te++)Ju(this,E,a[te],x,b);else for(a=a.iterator;a.next();)Ju(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Ju(this,E,a.value,x,b);for(a=this.nodes;a.next();)Ju(this,E,a.value,x,b);for(a=this.links;a.next();)Ju(this,E,a.value,x,b)}rc(this,E,y,b,x)}};function Ju(a,y,x,b,E,te){if(!y.contains(x)&&(te===void 0&&(te=!1),!b||te||x.canMove()||x.canCopy()))if(E===void 0&&(E=Kf(a)),x instanceof Gn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Er&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)Ju(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var se=ne.fromNode,he=ne.toNode;se!==null&&y.contains(se)&&he!==null&&y.contains(he)&&Ju(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Ju(a,y,x.value,b,E)}else if(x instanceof kn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Ju(a,y,x.value,b,E);else x instanceof ai||y.add(x,a.Pd(E,x,x.location))}function rc(a,y,x,b,E){if(y!==null&&y.count!==0){var te=Mt.alloc(),ne=Mt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||tf(a,y);for(var se=xr(),he=xr(),ge=y.iterator,ye=Mt.alloc();ge.next();){var Me=ge.key,Re=ge.value;if(Me.Zc()){var Ve=Vo(a,Me,y);Ve!==null?se.push(new re(Me,Re,Ve)):(!E||Me.canMove())&&(Ve=Re.point,te.assign(Ve),a.computeMove(Me,te.add(ne),b,ye),Me.location=ye,Re.shifted===void 0&&(Re.shifted=new Mt),Re.shifted.assign(ye.re(Ve)))}else ge.key instanceof kn&&he.push(ge.sa)}for(Mt.free(ye),E=se.length,ge=0;ge<E;ge++)Me=se[ge],te.assign(Me.info.point),Me.Su.shifted===void 0&&(Me.Su.shifted=new Mt),Me.node.location=te.add(Me.Su.shifted);for(E=Mt.alloc(),ge=Mt.alloc(),Me=he.length,Re=0;Re<Me;Re++){var qe=he[Re];if(Ve=qe.key,Ve instanceof kn)if(Ve.suspendsRouting){Ve.Tg=null,ye=Ve.fromNode;var it=Ve.toNode;if(a.draggedLink!==null&&b.dragsLink)if(it=qe.value.point,Ve.dragComputation===null)y.add(Ve,a.Pd(b,Ve,ne)),Oc(Ve,ne.x-it.x,ne.y-it.y);else{qe=Mt.allocAt(0,0),(ye=Ve.i(0))&&ye.w()&&qe.assign(ye);var At=ye=Mt.alloc().assign(qe).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(At=Mt.alloc(),Vf(a,Ve,ye,At,b)),ye.assign(Ve.dragComputation(Ve,ye,At)).re(qe),y.add(Ve,a.Pd(b,Ve,ye)),Oc(Ve,ye.x-it.x,ye.y-it.y),Mt.free(qe),Mt.free(ye),At!==ye&&Mt.free(At)}else ye!==null&&(E.assign(ye.location),At=y.I(ye),At!==null&&E.re(At.point)),it!==null&&(ge.assign(it.location),At=y.I(it),At!==null&&ge.re(At.point)),ye!==null&&it!==null?E.Xa(ge)?(ye=qe.value.point,it=te,it.assign(E),it.re(ye),y.add(Ve,a.Pd(b,Ve,E)),Oc(Ve,it.x,it.y)):(Ve.suspendsRouting=!1,Ve.bb()):(qe=qe.value.point,ye=ye!==null?E:it!==null?ge:ne,y.add(Ve,a.Pd(b,Ve,ye)),Oc(Ve,ye.x-qe.x,ye.y-qe.y))}else(Ve.fromNode===null||Ve.toNode===null)&&(ye=qe.value.point,y.add(Ve,a.Pd(b,Ve,ne)),Oc(Ve,ne.x-ye.x,ne.y-ye.y))}Mt.free(te),Mt.free(ne),Mt.free(E),Mt.free(ge),gr(se),gr(he),x||(qa(a),dh(a,y))}}Vt.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Mt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Mt.alloc(),Vf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,se=ne.x;isNaN(se)&&(se=te?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=te?Math.round(1e3*a.location.y)/1e3:a.location.y);var he=a.maxLocation,ge=he.x;return isNaN(ge)&&(ge=te?Math.round(1e3*a.location.x)/1e3:a.location.x),he=he.y,isNaN(he)&&(he=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(se,Math.min(x.x,ge)),Math.max(ne,Math.min(x.y,he))),E!==y&&Mt.free(E),b};function Kf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Vf(a,y,x,b,E){if(E===void 0&&(E=Kf(a)),b.assign(x),y!==null){var te=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,se=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,te!==null){var he=te.gridCellSize;isNaN(a)&&(a=he.width),isNaN(y)&&(y=he.height),te=te.gridOrigin,isNaN(se)&&(se=te.x),isNaN(ne)&&(ne=te.y)}te=Mt.allocAt(0,0),te.yi(0,0,a,y,E),Wt.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),Mt.free(te)}}function tf(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof kn&&(y.suspendsRouting=!0)}function dh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof kn&&(x.suspendsRouting=!1,Y0(x)&&x.bb())}a.Mr=!1}}function Vo(a,y,x){return y=y.containingGroup,y!==null&&(a=Vo(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Ze=Vt.prototype,Ze.Pd=function(a,y,x){if(x===void 0)return new oc(yo);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new oc(new Mt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new oc(x.copy())};function Lo(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Zt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Zt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Zt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Zt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&Zt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Ze.Al=function(a){Lo(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(Zo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Ze.Ww=function(a,y){Lo(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(ra,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te,a);break}return this.cc!==null&&this.cb(Zo,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},Ze.Cy=function(a,y){Lo(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(ra,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te+1,a);break}return this.cc!==null&&this.cb(Zo,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},Ze.kA=function(a){if(a.diagram!==this&&Zt("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 b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(ra,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Ze.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ze.Yw=function(a){return this.pf===null&&(this.pf=new Ln),this.pf.add(a),this.model.Pe(a),this},Ze.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ze.Pe=function(a){return this.zg===null&&(this.zg=new Ln),this.zg.add(a),this},Ze.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ze.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ll&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},Ze.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var se=new To;se.diagram=this,se.change=a,se.propertyName=y,se.object=x,se.oldValue=b,se.oldParam=te,se.newValue=E,se.newParam=ne,this.ds(se)},Ze.g=function(a,y,x,b,E){this.cb(wo,a,this,y,x,b,E)},Vt.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===wo){var E=a.object;if(mo(E,a.propertyName,a.I(y)),E instanceof Ut){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===Zo){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof wn)if(typeof se=="number"&&he instanceof Ut){y?ne.pc(se):ne.Gb(se,he);var ge=ne.part;ge!==null&&ge.Wb()}else typeof se=="number"&&he instanceof xa&&(he.isRow?c1(ne,se,y?void 0:he):f1(ne,se,y?void 0:he));else if(ne instanceof Jo){var ye=a.oldParam===!0;typeof se=="number"&&he instanceof rr&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(ye?se:-1,he,ye)):ne.oi(se,he,ye))}else ne instanceof Vt?typeof se=="number"&&he instanceof Jo&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):Zt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===ra){var Me=a.object,Re=a.oldParam,Ve=a.oldValue;if(Me instanceof wn)typeof Re=="number"&&Ve instanceof Ut?y?Me.Gb(Re,Ve):Me.pc(Re):typeof Re=="number"&&Ve instanceof xa&&(Ve.isRow?c1(Me,Re,y?Ve:void 0):f1(Me,Re,y?Ve:void 0));else if(Me instanceof Jo){var qe=a.newParam===!0;typeof Re=="number"&&Ve instanceof rr&&(y?0>Me.Pa.indexOf(Ve)&&Me.oi(Re,Ve,qe):(Ve.isSelected=!1,Ve.isHighlighted=!1,Ve.Wb(),Me.pc(qe?Re:-1,Ve,qe)))}else Me instanceof Vt?typeof Re=="number"&&Ve instanceof Jo&&(y?(Ve.Xe(this),this.Wa.Gb(Re,Ve)):this.Wa.mb(Re)):Zt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==ll&&Zt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Vt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Vt.prototype.eb=function(a){return this.undoManager.eb(a)},Vt.prototype.Kf=function(){return this.undoManager.Kf()},Vt.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Vt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Vt.prototype.rp=function(){this.partManager.rp()};function Pl(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,El(a),a.N(),a.Ee=!0,b.zb&&(zo(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,El(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,se=a.zoomPoint.x,he=a.zoomPoint.y,ge=a.contentAlignment;isNaN(se)&&(ge.$c()?ge.Hf(yc)?se=0:ge.Hf(Fl)&&(se=te-1):se=ge.sb()?ge.x*(te-1):te/2),isNaN(he)&&(ge.$c()?ge.Hf(Yh)?he=0:ge.Hf(yu)&&(he=ne-1):he=ge.sb()?ge.y*(ne-1):ne/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),te=Mt.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,Mt.free(te),a.Ca=x,El(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Uo(a,!1),b.zb&&(zo(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Vt.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==Fs||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof ho&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),ep(E,this)),this.vb||this.invalidateViewport(a,y),es(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=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(te){te.isAvoiding&&te.actualBounds.Yc(y)&&te.bb()})}};function es(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=jn.alloc(),E=1,te=1,ne=x.O.s,se=ne.length,he=0;he<se;he++){var ge=ne[he],ye=Math.abs(ge.interval);2>ye||(m0(ge.figure)?te=te*ye/Wt.vx(te,ye):E=E*ye/Wt.vx(E,ye))}if(ne=x.gridCellSize,b.h(te*ne.width,E*ne.height),y!==void 0)E=y.width,te=y.height,a=y.x,ne=y.y;else{if(y=rn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){rn.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,rn.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=Mt.alloc(),Wt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),jn.free(b),x.part.location=y,Mt.free(y)}}Vt.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(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Vt.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))},Vt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),vr(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof rr||Zt("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof rr||Zt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Vt.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Ze=Vt.prototype,Ze.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Ze.Jz=function(a){a=new Nn().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 rr||Zt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Ze.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=Mt.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=te.h(x.x,E.y):y==="left"?this.position=te.h(E.x,x.y):y==="down"?this.position=te.h(x.x,E.bottom-x.height):y==="right"&&(this.position=te.h(E.right-x.width,x.y)),Mt.free(te);return}Zt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=te.h(x.x,x.y-E):y==="down"?this.position=te.h(x.x,x.y+E):y==="left"?this.position=te.h(x.x-E,x.y):y==="right"?this.position=te.h(x.x+E,x.y):Zt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Mt.free(te)},Ze.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)},Ze.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Ze.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)},Ze.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,se=y.m12,he=y.m21,ge=y.m22,ye=y.dx,Me=y.dy,Re=x*ne+b*he+ye;y=x*se+b*ge+Me;var Ve=E*ne+b*he+ye;return a=E*se+b*ge+Me,b=x*ne+te*he+ye,x=x*se+te*ge+Me,ne=E*ne+te*he+ye,E=E*se+te*ge+Me,te=Math.min(Re,Ve),Re=Math.max(Re,Ve),Ve=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Re=Math.max(Re,b),Ve=Math.min(Ve,x),y=Math.max(y,x),te=Math.min(te,ne),Re=Math.max(Re,ne),Ve=Math.min(Ve,E),y=Math.max(y,E),new rn(te,Ve,Re-te,y-Ve)},Ze.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),No(a.copy(),this.Ab)};function ks(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Vs(a){return a=lp.get(a),a!==null?new a:new ki}Vt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===ll&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(he){return he.diagram=E}),a.mouseMoveTools.each(function(he){return he.diagram=E}),a.mouseUpTools.each(function(he){return he.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===ll){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),qa(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||_o(te),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(ks(this),this.As.clear(),hs(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;Ar(function(){se.currentTool.standardMouseOver(),se.Rt=!1},10)}}}finally{this.aa=!0}}}};function $l(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)Cl(a,y[b])}function Cl(a,y){if(y instanceof gl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Nn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function ph(a,y){if(y instanceof gl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Nn&&x.Bg.remove(a),wp(b));break}}}}}Vt.prototype.Wd=function(){this.partManager.Wd()},Vt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Vt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Vt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Vt.prototype.Vb=function(a){return this.partManager.Vb(a)},Vt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Ze=Vt.prototype,Ze.Lc=function(a){return this.partManager.Lc(a)},Ze.ii=function(a){return this.partManager.ii(a)},Ze.Kc=function(a){return this.partManager.Kc(a)},Ze.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:Rn(Mn(y)))},Ze.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:Rn(Mn(y)))};function El(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 gh(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Uo(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Ze.Va=function(){if(this.Zi){var a=rn.alloc();gh(this,this.computeBounds(a)),rn.free(a)}},Ze.rz=function(){for(var a=new Nn,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},Ze.qz=function(){return this.ai.iterator},Ze.Uz=function(a){qa(this),a&&ic(this,!0),this.ld?eg(this,!1):(this.Jk=!0,Il(this))};function ic(a,y){for(var x=a.ai.iterator;x.next();)nf(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function nf(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)nf(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function eg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,te=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!te.defaultAnimation.isAnimating&&!te.zb&&(y||Do(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)tg(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),qa(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||_o(te),a.aa=x}}}function tg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)tg(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),ef(a,y),E.isValidLayout=!0):a.xh=!0)}}Ze.yz=function(){for(var a=new Ln,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function n0(a){function y(E){var te=E.toLowerCase(),ne=new Ln;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new Vn,b=new Vn;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function sm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function ip(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Zt("Unknown DiagramEvent name: "+y)}Ze.Bj=function(a,y){return a=ip(this,a),a!==null&&a.add(y),this},Ze.am=function(a,y){a=ip(this,a),a!==null&&a.remove(y)},Ze.R=function(a,y,x){var b=ip(this,a),E=new Mh;if(E.diagram=this,a=sm(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function op(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Ze.Yj=function(a,y){return ap(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Vt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?aa(this,a):a.assign(this.documentBounds)};function ap(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new Ag(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=lm(a,x)),x===null){y=rn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,se=ne.layer;se!==null&&se.visible&&!se.isTemporary&&sp(a,ne,b,y)}rn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=rn.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof Gn&&sp(a,ne,b,y);rn.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function lm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?lm(a,y.containingGroup):null}function sp(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,te=y.y;if(Mp(a,E,te))for(x=(te-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((te+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(te=a.ac[E],te.fill)te.fill(Fc,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=Fc}else if(y instanceof Er)for(y=y.memberParts;y.next();)E=y.value,E instanceof Gn&&sp(a,E,x,b)}}function Pc(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Vt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():ng(this)};function ng(a){a.vk===-1&&(a.vk=Ar(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=rn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),gh(a,y),rn.free(y),a.Fc=!0,a.bd(),ng(a))}},a.vp))}Vt.prototype.ug=function(){this.vk!==-1&&(Qt.clearTimeout(this.vk),this.vk=-1)},Vt.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 b=this.viewportBounds,E=this.scale;b=rn.allocAt(0,0,b.width*E,b.height*E);var te=Mt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,te.x-=ne,a.x<b.x+x.left/2&&(te.x-=ne),a.x<b.x+x.left/4&&(te.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,te.x+=ne,a.x>b.x+b.width-x.right/2&&(te.x+=ne),a.x>b.x+b.width-x.right/4&&(te.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y-=ne,a.y<b.y+x.top/2&&(te.y-=ne),a.y<b.y+x.top/4&&(te.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y+=ne,a.y>b.y+b.height-x.bottom/2&&(te.y+=ne),a.y>b.y+b.height-x.bottom/4&&(te.y+=4*ne)),te.Xa(yo)||(y=new Mt(y.x+te.x/E,y.y+te.y/E)),rn.free(b),Mt.free(te),y},Ze=Vt.prototype,Ze.Cs=function(){return null},Ze.av=function(){return null},Ze.bs=function(a,y){this.pj.add(a,y)},Ze.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Er&&(y.$p=null)})};function Cd(a,y,x){function b(){var ye=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||ye-ge>he?y(x,E,se):Qt.requestAnimationFrame(b)}for(var E=x.callback,te=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){te=!1;break}if(typeof E!="function"||te)return y(x,E,a);var se=a,he=x.callbackTimeout||300,ge=+new Date;return Qt.requestAnimationFrame(function(){b()}),null}Ze.Wz=function(a){return Ko?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ze.Jx=function(a){return a===void 0&&(a={}),Cd(this,this.Xz,a)},Ze.Xz=function(a,y,x){var b=um(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case Zf+"data":E=b.getImageData(0,0,x.width,x.height);break;case Zf:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Zt('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:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function um(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Zt("properties argument must be an Object.");var E=y.size||null,te=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(te="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new jn(1/0,1/0):new jn(2e3,2e3));var se=y.position||null,he=y.parts||null,ge=y.padding===void 0?1:y.padding,ye=y.background||null,Me=y.omitTemporary;Me===void 0&&(Me=!0);var Re=y.document||document,Ve=y.elementFinished||null,qe=y.showTemporary;qe===void 0&&(qe=!Me),y=y.showGrid,y===void 0&&(y=qe),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ge=="number"?ge=new yr(ge):ge instanceof yr||Zt("MakeImage padding must be a Margin or a number."),ge.left=Math.max(ge.left,0),ge.right=Math.max(ge.right,0),ge.top=Math.max(ge.top,0),ge.bottom=Math.max(ge.bottom,0),a.ib.Vc(!0),Me=new Eu(null,Re,void 0,!0);var it=Me.context;if(!(E||te||he||se))return Me.width=a.Aa+Math.ceil(ge.left+ge.right),Me.height=a.ya+Math.ceil(ge.top+ge.bottom),x==="SVG"?b===null?null:(b.resize(Me.width,Me.height,Me.width,Me.height),b.ownerDocument=Re,b.hs=Ve,Uf(a,b.context,ge,new jn(Me.width,Me.height),a.Ca,a.pa,he,ye,qe,y),b.context):(a.Xm=!1,Uf(a,it,ge,new jn(Me.width,Me.height),a.Ca,a.pa,he,ye,qe,y),a.Xm=!0,Me.context);var At=a.Pp,bt=a.documentBounds.copy();if(bt.Fv(a.yb),qe)for(var Ot=a.Wa.s,Ft=Ot.length,It=0;It<Ft;It++){var Gt=Ot[It];if(Gt.visible&&Gt.isTemporary){Gt=Gt.Pa.s;for(var Yt=Gt.length,Bn=0;Bn<Yt;Bn++){var Zn=Gt[Bn];Zn.isInDocumentBounds&&Zn.isVisible()&&(Zn=Zn.actualBounds,Zn.w()&&bt.ed(Zn))}}}if(Ot=new Mt(bt.x,bt.y),he!==null){for(Ft=new rn(0,0,0,0),It=!0,Gt=he.iterator,Gt.reset();Gt.next();)Yt=Gt.value,Yt instanceof rr&&(Bn=Yt.layer,Bn!==null&&!Bn.visible||Bn!==null&&!qe&&Bn.isTemporary||!Yt.isVisible()||(Yt=Yt.actualBounds,Yt.w()&&(It?(It=!1,Ft.assign(Yt)):Ft.ed(Yt))));bt.width=Ft.width,bt.height=Ft.height,Ot.x=Ft.x,Ot.y=Ft.y}return se!==null&&se.w()&&(Ot=se,te||(te=At)),Ft=se=0,ge!==null&&(se=ge.left+ge.right,Ft=ge.top+ge.bottom),It=Gt=0,E!==null&&(Gt=E.width,It=E.height,isFinite(Gt)&&(Gt=Math.max(0,Gt-se)),isFinite(It)&&(It=Math.max(0,It-Ft))),E!==null&&te!==null?(te==="NaN"&&(te=At),E.w()?(E=Gt,bt=It):isNaN(It)?(E=Gt,bt=bt.height*te):(E=bt.width*te,bt=It)):E!==null?E.w()?(te=Math.min(Gt/bt.width,It/bt.height),E=Gt,bt=It):isNaN(It)?(te=Gt/bt.width,E=Gt,bt=bt.height*te):(te=It/bt.height,E=bt.width*te,bt=It):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/bt.width,(ne.height-Ft)/bt.height),te>At?(te=At,E=bt.width,bt=bt.height):(E=ne.width,bt=ne.height)):(E=bt.width*te,bt=bt.height*te):(te=At,E=bt.width,bt=bt.height),ge!==null?(E+=se,bt+=Ft):ge=new yr(0),ne!==null&&(At=ne.width,ne=ne.height,isNaN(At)&&(At=2e3),isNaN(ne)&&(ne=2e3),isFinite(At)&&(E=Math.min(E,At)),isFinite(ne)&&(bt=Math.min(bt,ne))),Me.width=Math.ceil(E),Me.height=Math.ceil(bt),x==="SVG"?b===null?null:(b.resize(Me.width,Me.height,Me.width,Me.height),b.ownerDocument=Re,b.hs=Ve,Uf(a,b.context,ge,new jn(Math.ceil(E),Math.ceil(bt)),te,Ot,he,ye,qe,y),b.context):(a.Xm=!1,Uf(a,it,ge,new jn(Math.ceil(E),Math.ceil(bt)),te,Ot,he,ye,qe,y),a.Xm=!0,Me.context)}hn.Object.defineProperties(Vt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof je||(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 mh(this,Qt.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 mh(this,Qt.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(Qt,"resize",this.Ov,!1),this.removeEventListener(Qt,"wheel",this.$j,!0),Ks===this&&(Ks=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),xi(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)&&Nr(a,"0 <= value <= 1",Vt,"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),Uo(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),Uo(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),Uo(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),Uo(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Nr(a,">= 0",Vt,"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&&Nr(a,">= 0",Vt,"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 b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(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 Nr(a,">= 0",Vt,"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||ks(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&&Zt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=wu(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Do(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(te){return y.ik(te)}),y.ik(this.Oc)),this.cc=a,this.partManager=Vs(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(te){return a.Pe(te)}),this.vb=b,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(Qt,"pointermove",this.dk,!0),this.addEventListener(Qt,"pointerdown",this.ui,!0),this.addEventListener(Qt,"pointerup",this.fk,!0),this.addEventListener(Qt,"pointerout",this.ek,!0),this.addEventListener(Qt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Qt,"wheel",this.$j,!0),this.addEventListener(Qt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Qt,"pointermove",this.dk,!0),this.removeEventListener(Qt,"pointerdown",this.ui,!0),this.removeEventListener(Qt,"pointerup",this.fk,!0),this.removeEventListener(Qt,"pointerout",this.ek,!0),this.removeEventListener(Qt,"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(Qt,"wheel",this.$j,!0),this.removeEventListener(Qt,"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=Mt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),fi(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?El(this):(this.vb=!0,a=this.scale,bu(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)}Mt.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=po(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=po(this)),a.type!==wn.Grid&&Zt("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),es(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),El(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||Zt("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 yr(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===Cc&&Uo(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,Uo(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,Pl(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&&Pl(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!==Fs&&Uo(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()||Zt("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()||Zt("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)):Nr(a,"> 0",Vt,"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)):Nr(a,"> 0",Vt,"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),Uo(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 yr(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&&Zt("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();)xg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Ec&&a!==ya&&a!==up&&Zt("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 jn(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 yr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),hn.Object.defineProperties(Vt,{licenseKey:{get:function(){return lg.jc()},set:function(a){lg.add(a.replace(/\s/g,""))}},version:{get:function(){return Yf}}}),Vt.prototype.makeImageData=Vt.prototype.Jx,Vt.prototype.makeImage=Vt.prototype.Wz,Vt.prototype.cacheGroupExternalLinks=Vt.prototype.Fu,Vt.prototype.addRenderer=Vt.prototype.bs,Vt.prototype.makeSVG=Vt.prototype.av,Vt.prototype.makeSvg=Vt.prototype.Cs,Vt.prototype.stopAutoScroll=Vt.prototype.ug,Vt.prototype.doAutoScroll=Vt.prototype.gs,Vt.prototype.isUnoccupied=Vt.prototype.Yj,Vt.prototype.raiseDiagramEvent=Vt.prototype.R,Vt.prototype.removeDiagramListener=Vt.prototype.am,Vt.prototype.addDiagramListener=Vt.prototype.Bj,Vt.prototype.findTreeRoots=Vt.prototype.yz,Vt.prototype.layoutDiagram=Vt.prototype.Uz,Vt.prototype.findTopLevelGroups=Vt.prototype.qz,Vt.prototype.findTopLevelNodesAndLinks=Vt.prototype.rz,Vt.prototype.ensureBounds=Vt.prototype.Va,Vt.prototype.findLinksByExample=Vt.prototype.ls,Vt.prototype.findNodesByExample=Vt.prototype.ms,Vt.prototype.findLinkForData=Vt.prototype.Kc,Vt.prototype.findNodeForData=Vt.prototype.ii,Vt.prototype.findPartForData=Vt.prototype.Lc,Vt.prototype.findLinkForKey=Vt.prototype.findLinkForKey,Vt.prototype.findNodeForKey=Vt.prototype.Vb,Vt.prototype.findPartForKey=Vt.prototype.findPartForKey,Vt.prototype.rebuildParts=Vt.prototype.Wd,Vt.prototype.transformViewToDoc=Vt.prototype.Ps,Vt.prototype.transformRectDocToView=Vt.prototype.zA,Vt.prototype.transformDocToView=Vt.prototype.op,Vt.prototype.centerRect=Vt.prototype.es,Vt.prototype.scrollToRect=Vt.prototype.tv,Vt.prototype.scroll=Vt.prototype.scroll,Vt.prototype.highlightCollection=Vt.prototype.Jz,Vt.prototype.highlight=Vt.prototype.Iz,Vt.prototype.selectCollection=Vt.prototype.rA,Vt.prototype.select=Vt.prototype.select,Vt.prototype.updateAllRelationshipsFromData=Vt.prototype.rp,Vt.prototype.updateAllTargetBindings=Vt.prototype.updateAllTargetBindings,Vt.prototype.commit=Vt.prototype.commit,Vt.prototype.rollbackTransaction=Vt.prototype.Kf,Vt.prototype.commitTransaction=Vt.prototype.eb,Vt.prototype.startTransaction=Vt.prototype.Ea,Vt.prototype.raiseChanged=Vt.prototype.g,Vt.prototype.raiseChangedEvent=Vt.prototype.cb,Vt.prototype.removeChangedListener=Vt.prototype.ik,Vt.prototype.addChangedListener=Vt.prototype.Pe,Vt.prototype.removeModelChangedListener=Vt.prototype.mA,Vt.prototype.addModelChangedListener=Vt.prototype.Yw,Vt.prototype.findLayer=Vt.prototype.Qj,Vt.prototype.removeLayer=Vt.prototype.kA,Vt.prototype.addLayerAfter=Vt.prototype.Cy,Vt.prototype.addLayerBefore=Vt.prototype.Ww,Vt.prototype.addLayer=Vt.prototype.Al,Vt.prototype.moveParts=Vt.prototype.moveParts,Vt.prototype.copyParts=Vt.prototype.Kj,Vt.prototype.removeParts=Vt.prototype.Is,Vt.prototype.remove=Vt.prototype.remove,Vt.prototype.add=Vt.prototype.add,Vt.prototype.clearDelayedGeometries=Vt.prototype.bx,Vt.prototype.setProperties=Vt.prototype.nm,Vt.prototype.attach=Vt.prototype.Du,Vt.prototype.set=Vt.prototype.set,Vt.prototype.resetInputOptions=Vt.prototype.Sx,Vt.prototype.setInputOption=Vt.prototype.sA,Vt.prototype.getInputOption=Vt.prototype.Ql,Vt.prototype.resetRenderingHints=Vt.prototype.Tx,Vt.prototype.setRenderingHint=Vt.prototype.Xx,Vt.prototype.getRenderingHint=Vt.prototype.Gf,Vt.prototype.maybeUpdate=Vt.prototype.bd,Vt.prototype.requestUpdate=Vt.prototype.$b,Vt.prototype.delayInitialization=Vt.prototype.Xy,Vt.prototype.isUpdateRequested=Vt.prototype.Pz,Vt.prototype.invalidateDocumentBounds=Vt.prototype.Ya,Vt.prototype.findObjectsNear=Vt.prototype.og,Vt.prototype.findPartsNear=Vt.prototype.mz,Vt.prototype.findObjectsIn=Vt.prototype.Cf,Vt.prototype.findPartsIn=Vt.prototype.ux,Vt.prototype.findObjectsAt=Vt.prototype.ji,Vt.prototype.findPartsAt=Vt.prototype.lz,Vt.prototype.findObjectAt=Vt.prototype.ic,Vt.prototype.findPartAt=Vt.prototype.Ol,Vt.prototype.focusObject=Vt.prototype.zz,Vt.prototype.alignDocument=Vt.prototype.Jy,Vt.prototype.zoomToRect=Vt.prototype.BA,Vt.prototype.zoomToFit=Vt.prototype.zoomToFit,Vt.prototype.diagramScroll=Vt.prototype.kx,Vt.prototype.focus=Vt.prototype.focus;var lp=new Vn,hm=null,Ko=Qt.document!==void 0,Xf=null,rf="",Fs=new tn(Vt,"None",0),ql=new tn(Vt,"Uniform",1),of=new tn(Vt,"UniformToFill",2),Ed=new tn(Vt,"CycleAll",10),rg=new tn(Vt,"CycleNotDirected",11),ig=new tn(Vt,"CycleNotDirectedFast",12),og=new tn(Vt,"CycleNotUndirected",13),ag=new tn(Vt,"CycleDestinationTree",14),sg=new tn(Vt,"CycleSourceTree",15),Cc=new tn(Vt,"DocumentScroll",1),kd=new tn(Vt,"InfiniteScroll",2),Ec=new tn(Vt,"TreeParentCollapsed",21),ya=new tn(Vt,"AllParentsCollapsed",22),up=new tn(Vt,"AnyParentsCollapsed",23),lg=new Ln,Yf="2.3.10",Zf="image",Md=null,cm=!1;function Ms(){if(Ko){var a=Qt.document.createElement("canvas"),y=a.getContext("2d"),x=Ir("7ca11abfd022028846");y[x]=Ir("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Cn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Br.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Wt.za],E=1;5>E;E++)y[Ir("7ca11abfd7330390")](Ir(b[E-1]),10,15*E);for(y[x]=Ir("39f046ebb36e4b"),x=1;5>x;x++)y[Ir("7ca11abfd7330390")](Ir(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Br.prototype.Cd=Br.prototype.Eu),Md=a}}Vt.className="Diagram",Vt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Qt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Vt?y.H:null},Vt.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},Vt.useDOM=function(a){Ko=a?Qt.document!==void 0:!1},Vt.isUsingDOM=function(){return Ko},Vt.None=Fs,Vt.Uniform=ql,Vt.UniformToFill=of,Vt.CycleAll=Ed,Vt.CycleNotDirected=rg,Vt.CycleNotDirectedFast=ig,Vt.CycleNotUndirected=og,Vt.CycleDestinationTree=ag,Vt.CycleSourceTree=sg,Vt.DocumentScroll=Cc,Vt.InfiniteScroll=kd,Vt.TreeParentCollapsed=Ec,Vt.AllParentsCollapsed=ya,Vt.AnyParentsCollapsed=up;function fm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Jf(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=Qt[Ir("76a715b2f73f148a")][Ir("72ba13b5")]||"";if(a.Rc=!0,Ko){var b=Vt[Ir("76a115b6ed251eaf4692")];if(b)for(var E=lg.iterator;E.next()&&(b=E.value,b=Ir(b).split(Ir("39e9")),!(6>b.length));){var te=Ir(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=Ir(Cn[Ir("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=Qt[Ir("74a900bae4370f8b51")][Ir("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[Ir("73a612b6fb191d")](Ir("3aad1ab6e022098b4dc4")),te=Ir(b[2]),-1<ne&&(se=se[Ir("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[Ir("76ad18b4f73e")],se=x[Ir("73a612b6fb191d")](Ir("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[Ir("73a612b6fb191d")](te),0>ne&&te!==Ir("7da71ca0ad381e90")&&(ne=y[Ir("73a612b6fb191d")](Ir("76a715b2ef3e149757"))),0>ne&&(ne=y[Ir("73a612b6fb191d")](Ir("76a715b2ef3e149757"))),0>ne&&(ne=y[Ir("73a612b6fb191d")](Ir("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Ir("73a612b6fb191d")](Ir("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Ir("73a612b6fb191d")](Ir("35"))||y[Ir("73a612b6fb191d")](Ir("35"))===-1),!a.Rc||x[Ir("73a612b6fb191d")](Ir("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Ir("73a612b6fb191d")](te)),!a.Rc)||(ne=Qt[Ir("76a715b2f73f148a")][Ir("69ad17a1e03e")],se=ne[Ir("73a612b6fb191d")](Ir("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[Ir("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=Qt.document.createElement("div");for(var he=b[0].replace(/[A-Za-z]/g,"");4>he.length;)he+="9";if(se=he,he=he.substr(he.length-4),b="",b+=["gsh","gsf"][parseInt(he.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(he.substr(0,1),10)%4],ne[Ir("79a417a0f0181a8946")]=b,Qt.document[Ir("78a712aa")]){Qt.document[Ir("78a712aa")][Ir("7bb806b6ed32388c4a875b")](ne),he=Qt.getComputedStyle(ne).getPropertyValue(Ir("78a704b7e62456904c9b12701b6532a8"));var ge=Qt.getComputedStyle(ne).getPropertyValue(Ir("75b817b0ea2202"));if(Qt.document[Ir("78a712aa")][Ir("68ad1bbcf533388c4a875b")](ne),he){if(ne=Qt[Ir("77a902b0eb1b1e804a8a")],ge==="0."+parseInt(se,10)%100||he.indexOf(parseInt(te[1]+te[2],16))!==-1&&he.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(Ir("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var ye in ne)if(b===ne[ye].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ye=x[Ir("76ad18b4f73e")],E=x[Ir("73a612b6fb191d")](Ir("35e7"))+2;E<ye;E++)y+=x[E];x=y[Ir("73a612b6fb191d")](Ir("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Ir("73a612b6fb191d")](Ir("35")))}}}return 0<a.Rc&&a!==a.wy}fm.className="DiagramHelper";function oc(a){this.j=a===void 0?new Mt:a,this.o=new Mt}hn.Object.defineProperties(oc.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 Td="DraggingInfo";oc.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function ce(){this.reset()}ce.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new jn(NaN,NaN).freeze(),this.gridSnapCellSpot=Ma,this.gridSnapOrigin=new Mt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ce.className="DraggingOptions";function ke(a,y){if(typeof a=="string"||Qt.Element&&a instanceof Element)var x=Vt.call(this,a)||this;else x=Vt.call(this)||this,y=a;return Pe(x),y&&x.nm(y),x}Kt(ke,Vt);function Pe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Xl,a.layout=new ns}ke.prototype.reset=function(){Vt.prototype.reset.call(this),Pe(this)},ke.className="Palette";function je(a,y){if(typeof a=="string"||Qt.Element&&a instanceof Element)var x=Vt.call(this,a)||this;else x=Vt.call(this)||this,y=a;var b=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 rr;var E=new Or;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new yr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Nt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new Mt(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),mt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&mt(b)},x.autoScale=ql,x.vb=!1,y&&Object.assign(x,y),x}Kt(je,Vt),je.prototype.computePixelRatio=function(){return 1},je.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(nc(this),this.ql===null){var x=new Eu(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),tt(this)}finally{this.ta=a,this.ib=y}}}Vt.prototype.redraw.call(this)},je.prototype.gc=function(){if(this.Ka===null&&Zt("No div specified"),this.ta===null&&Zt("No canvas specified"),!(this.ta instanceof mh)&&(I0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){nc(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?tt(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,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function tt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=rn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),es(y,E),rn.free(E),qa(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var se=y[ne],he=a;if(se.visible&&se.opacity!==0){var ge=se.diagram.grid.part;if(!x&&se.isTemporary)b&&ge.layer===se&&(se=Ka(se,E),ge.gc(E,he),E.globalAlpha=se);else{for(var ye=Ka(se,E),Me=he.scale,Re=rn.alloc(),Ve=se.Pa.s,qe=Ve.length,it=0;it<qe;it++){var At=Ve[it];(b||At!==ge)&&se.Oj(E,At,he,null,Me,Re,!1)}rn.free(Re),E.globalAlpha=ye}}}}}function mt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=jn.alloc();E.h(x.width,x.height),b.desiredSize=E,jn.free(E),a=2/a.scale,b instanceof Or&&(b.strokeWidth=a),y.location=new Mt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}je.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Ai;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},je.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},je.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),mt(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=b,this.R("ViewportBoundsChanged",this.fc,a))},hn.Object.defineProperties(je.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof je&&Zt("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,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),mt(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),mt(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)}}}),je.className="Overview";function Nt(){Fr.call(this),this.j=null}Kt(Nt,Fr),Nt.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 Mt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Mt(a.x-this.j.x,a.y-this.j.y)),!0)},Nt.prototype.doActivate=function(){this.j=null,Fr.prototype.doActivate.call(this)},Nt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Nt.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 b=a.firstInput.documentPoint;x=x.location,this.j=new Mt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Mt(a.x-this.j.x,a.y-this.j.y)}}},Nt.className="OverviewDraggingTool";function Lt(){vo(this),this.H=Ks,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=Ai,this.hb=!0,this.cg=null,this.ob=200}Lt.prototype.toString=function(){return"CommandHandler"},Lt.prototype.Xe=function(a){this.H=a},Lt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Aa?y.meta:y.control,b=y.shift,E=y.alt,te=y.key;!x||te!=="C"&&te!=="Insert"?x&&te==="X"||b&&te==="Del"?this.canCutSelection()&&this.cutSelection():x&&te==="V"||b&&te==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&te==="Y"||E&&b&&te==="Backspace"?this.canRedo()&&this.redo():x&&te==="Z"||E&&te==="Backspace"?this.canUndo()&&this.undo():te==="Del"||te==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&te==="A"?this.canSelectAll()&&this.selectAll():te==="Esc"?this.canStopCommand()&&this.stopCommand():te==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):te==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):te==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):te==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):te==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):te==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):te==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):te==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):te===" "?this.canScrollToPart()&&this.scrollToPart():te==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():te==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&te==="0"?this.canResetZoom()&&this.resetZoom():b&&te==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&te==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&te==="G"?this.canUngroupSelection()&&this.ungroupSelection():te==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():te==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Lt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Lt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof ho&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Lt.prototype.canStopCommand=function(){return!0},Lt.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 b=a.links;b.next();)b.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Lt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Lt.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 Nn,x=a.selection.iterator;x.next();)uf(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Lt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Lt.prototype.copySelection=function(){var a=this.diagram,y=new Nn;for(a=a.selection.iterator;a.next();)uf(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Lt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Lt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Lt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Lt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Xf=null,rf="";else{x=y.model;var b=!1,E=!1,te=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),te=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new Ln,x.addAll(te),Xf=x,rf=y.model.dataFormat}}y.R("ClipboardChanged",x)},Lt.prototype.pasteFromClipboard=function(){var a=new Nn,y=Xf;if(y===null)return a;var x=this.diagram;if(rf!==x.model.dataFormat)return a;var b=x.model,E=!1,te=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(te=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=te),y=ne.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},Lt.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 b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var te=this.computeEffectiveCollection(y.selection,y.Wm);rc(y,te,new Mt(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Lt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Xf===null||Xf.count===0||rf!==a.model.dataFormat)},Lt.prototype.undo=function(){this.diagram.undoManager.undo()},Lt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Lt.prototype.redo=function(){this.diagram.undoManager.redo()},Lt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Lt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Fs&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Lt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Fs?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Lt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Fs&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Lt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Fs?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Lt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Lt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Lt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Do(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Ai):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),_o(y)},Lt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Lt.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(he){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;Do(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Bt(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var te=function(){y.Ea();for(var he=E.pop();0<E.length&&he instanceof Gn&&he.isTreeExpanded&&(!(he instanceof Er)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof rr&&y.tv(he.actualBounds),he instanceof Gn&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof Er&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof rr&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Ar(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var se=y.position.copy();y.es(a.actualBounds),se.Xa(y.position)&&x.Cc()}}};function Bt(a,y,x){if(y.isVisible())return x;if(y instanceof ai)Bt(a,y.adornedPart,x);else if(y instanceof kn){var b=y.fromNode;b!==null&&Bt(a,b,x),y=y.toNode,y!==null&&Bt(a,y,x)}else y instanceof Gn&&(b=y.labeledLink,b!==null&&Bt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Bt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Bt(a,y,x));return x}Lt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof rr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Lt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Do(y.animationManager,"Collapse Tree");var x=new Ln;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Gn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Lt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Gn&&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 Gn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Lt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Do(y.animationManager,"Expand Tree");var x=new Ln;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Gn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Lt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Gn)||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 Gn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Lt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new Ln,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new Ln,he=E.iterator;he.next();){var ge=he.value;te=!1;for(var ye=E.iterator;ye.next();)if(ge.Td(ye.value)){te=!0;break}te||se.add(ge)}if(0<se.count){var Me=se.first().containingGroup;if(Me!==null)for(;Me!==null;){E=!1;for(var Re=se.iterator;Re.next();)if(!Re.value.Td(Me)){E=!0;break}if(E)Me=Me.containingGroup;else break}if(x instanceof Er)ku(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ve=y.copyNodeData(x);Tn(Ve)&&(y.xf(Ve),b=a.ii(Ve))}if(b!==null){Me!==null&&this.isValidMember(Me,b)&&(b.containingGroup=Me);for(var qe=se.iterator;qe.next();){var it=qe.value;this.isValidMember(b,it)&&(it.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Lt.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 qt(a){var y=xr();for(a=a.iterator;a.next();){var x=a.value;x instanceof kn||y.push(x)}a=new Nn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],te=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){te=!1;break}te&&a.add(E)}return gr(y),a}Lt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof kn)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},Lt.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 b=new Ln;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof Er&&te.canUngroup()&&b.add(te)}var ne=new Ln;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var ge=he.containingGroup,ye=ge!==null&&ge.data!==null?x.wa(ge.data):void 0;ne.addAll(he.memberParts);for(var Me=ne.iterator;Me.next();){var Re=Me.value;if(Re.isSelected=!0,!(Re instanceof kn)){var Ve=Re.data;Ve!==null?x.mp(Ve,ye):Re.containingGroup=ge}}y.remove(he)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Lt.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 Er))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Er&&y.canUngroup())return!0;return!1},Lt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=qt(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},Lt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Do(y.animationManager,"Collapse SubGraph");var x=new Ln;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Er&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Lt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Er&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Er&&y.isSubGraphExpanded)return!0;return!1},Lt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Do(y.animationManager,"Expand SubGraph");var x=new Ln;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Er&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Lt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Er&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Er&&!y.isSubGraphExpanded)return!0;return!1},Lt.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 b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(te){return te instanceof Yi&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Lt.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 Yi))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 Yi&&x.editable}),a!==null))return!0;return!1},Lt.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 b=y.lastInput,E=null;a instanceof Ut?E=a.ga(oi):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Mt(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,br(x,!1,a)}},Lt.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)},Lt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new Vn,a===null)return b;for(var te=a.iterator;te.next();)Ju(x,b,te.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(te=a.iterator;te.next();)a=te.value,a instanceof kn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},hn.Object.defineProperties(Lt.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||Zt("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}}}),Lt.className="CommandHandler",$a=function(){return new Lt};function Ut(){vo(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Mt(NaN,NaN).freeze(),this.jd=Ya,this.Ab=new Br,this.wh=new Br,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Vl,this.uc=new rn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new rn(NaN,NaN,NaN,NaN).freeze(),this.dc=new rn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Ba,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 xn,gn,Jn,er,hr,kr,Yr,Rr,ri,ji;Ut.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=yi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Ut.prototype.Vw=function(a){var y=this.Dh;if(vr(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Ut.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Ut.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},Ut.prototype.copy=function(){return this.clone()},Ze=Ut.prototype,Ze.qb=function(a){a.classType===kn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Zt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Ut&&(this.stretch=a)},Ze.toString=function(){return Lr(this.constructor)+"#"+Xt(this)},Ze.th=function(){this.A!==null&&(this.A.nc=!0)};function Dr(a){a.A===null?a.A=new Ad:a.A.nc&&(a.A=a.A.copy())}Ze.Xc=function(){if(this.ba===null){var a=new ug;a.Xi=ba,a.yj=ba,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Ze.cb=function(a,y,x,b,E,te,ne){var se=this.part;if(se!==null&&(se.gk(a,y,x,b,E,te,ne),x===this&&a===wo&&ls(this)&&so(this,se,y),te=this.diagram,this.animationTriggers===null||te===null||!te.pi||te.undoManager.isUndoingRedoing||te.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&te.animationManager.isEnabled&&!te.animationManager.isTicking&&(this.jo===null&&(this.jo=new Vn),ne=te.undoManager.transactionLevel===0,a.startCondition===ys?ne=!0:a.startCondition===as&&(ne=!1),ne?(te=new Go,Zl(a,te),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,te),te.vu=this,te.Nw=a,te.add(this,y,b,E),te.start()):(Do(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof wn&&x===se&&(se.l&16777216)!==0&&se.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)se=x[E],se instanceof wn&&ed(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function so(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var te=E.value,ne=null;if(te.sourceName!==null){if(ne=MS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var se=y.diagram;se===null||se.skipsModelSourceBindings||te.sp(a,se.model.modelData,x,b)}else{if(se=b.data,se===null)continue;var he=y.diagram;he===null||he.skipsModelSourceBindings||te.sp(a,se,x,b)}ne===a&&(se=b.ks(te.Ai),se!==null&&te.Mv(se,ne,x))}}Ze.ks=function(a){return this.bindingId===a?this:null},Ze.g=function(a,y,x){this.cb(wo,a,this,y,x)},Ze.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Br);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function Na(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}Ze.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?ea(a.x,a.y,0,0,0,b.height)<=y||ea(a.x,a.y,0,b.height,b.width,b.height)<=y||ea(a.x,a.y,b.width,b.height,b.width,0)<=y||ea(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},Ze.se=function(){return!0},Ze.ca=function(a){var y=Mt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Mt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,se=this.naturalBounds;b=this.Df()*b.scale;var he=1/b;if(se.width*b<E&&se.height*b<E)return a=ma(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),Mt.free(y),a}return E=!1,(this instanceof ai||this instanceof Or?ma(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)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),Mt.free(y),E},Ze.gh=function(a){var y=this.naturalBounds;return ma(0,0,y.width,y.height,a.x,a.y)},Ze.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=rn.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Mt.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),Mt.free(E),rn.free(y),b},Ze.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Mt.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),Mt.free(E),b},Ze.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Mt.allocAt(0,0),E=Mt.allocAt(0,x.height),te=Mt.allocAt(x.width,x.height),ne=Mt.allocAt(x.width,0),se=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(te))||a.ca(y.Ga(ne)))se=!0;else{x=rn.allocAt(0,0,x.width,x.height);var he=Mt.allocAt(a.x,a.y);x.ca(y.Cd(he))?se=!0:(he.h(a.x,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.y),x.ca(y.Cd(he))&&(se=!0)))),Mt.free(he),rn.free(x),!se&&(Wt.us(a,b,E)||Wt.us(a,E,te)||Wt.us(a,te,ne)||Wt.us(a,ne,b))&&(se=!0)}return Mt.free(b),Mt.free(E),Mt.free(te),Mt.free(ne),se},Ze.ga=function(a,y){if(y===void 0&&(y=new Mt),a instanceof nr){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},Ze.mi=function(a){a===void 0&&(a=new rn);var y=this.naturalBounds,x=this.oe,b=Mt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),xo(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),xo(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),xo(a,b.x,b.y,0,0),Mt.free(b),a},Ze.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},Ze.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ze.qs=function(a,y){return y===void 0&&(y=new Mt),y.assign(a),this.oe.Cd(y),y},Ze.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ze.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,ge=-te.m21*ne,ye=te.m11*ne,Me=ne*(te.m21*te.dy-te.m22*te.dx),Re=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,Wt.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*ge+Me,a=a*he+y*ye+Re,y=x*se+b*ge+Me,x=x*he+b*ye+Re,E.h(0,0),b=this.naturalBounds,x=Wt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},Ut.prototype.measure=function(a,y,x,b){if(tu(this)!==!1){var E=this.Kg,te=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-te,0),y=Math.max(y-E,0),x=Math.max((x||0)-te,0),b=Math.max((b||0)-E,0),te=this.angle,E=this.desiredSize;var ne=this.kq();te===90||te===270?(a=isFinite(E.height)?E.height+ne:a,y=isFinite(E.width)?E.width+ne:y):(a=isFinite(E.width)?E.width+ne:a,y=isFinite(E.height)?E.height+ne:y),E=x||0,ne=b||0;var se=this instanceof wn;switch(dl(this,!0)){case gn:ne=E=0,se&&(y=a=1/0);break;case xn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case er:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case hr:isFinite(y)&&y>b&&(ne=y),E=0,se&&(a=1/0)}se=this.maxSize;var he=this.minSize;E>se.width&&he.width<se.width&&(E=se.width),ne>se.height&&he.height<se.height&&(ne=se.height),x=Math.max(E,he.width),b=Math.max(ne,he.height),se.width<x&&(x=Math.min(he.width,x)),se.height<b&&(b=Math.min(he.height,b)),a=Math.min(se.width,a),y=Math.min(se.height,y),a=Math.max(x,a),y=Math.max(b,y),(te===90||te===270)&&(te=a,a=y,y=te,te=x,x=b,b=te),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||Zt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Sa(this,!1)}},Ut.prototype.Wl=function(){},Ut.prototype.Dd=function(){return!1},Ut.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=rn.alloc();te.assign(this.Ib),this.Ib.ka(),Ys(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&Tc(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Yi&&(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()||Zt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),Fh(this,!1),rn.free(te)},Ze=Ut.prototype,Ze.eh=function(){};function Ds(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var te=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=te.width+y,te=te.height+ne,b+=y,E+=ne,y=dl(a,!0),x===b&&te===E&&(y=gn),y){case gn:(x>b||te>E)&&(Sa(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case xn:Sa(a,!0),a.measure(b,E,0,0);break;case er:Sa(a,!0),a.measure(b,te,0,0);break;case hr:Sa(a,!0),a.measure(x,E,0,0)}}}Ze.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_0(x,!0),this.N(),co(a,y)||(x.oh(),this.Pn(x)))},Ze.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Gn&&H1(a,this))},Ze.gc=function(a,y){if(!lu(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var te=this instanceof wn&&Tc(this),ne=this.Ib;if(te){var se=this.Ib,he=this.dc,ge=this.areaBackground,ye=this.Ma;ge===null&&ye===null||a.yc(),ge!==null&&(Xo(this,a,ge,!0,!0,he,se),ge instanceof Ci&&ge.type===cu?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(ge)):a.fillRect(se.x,se.y,se.width,se.height)),ye!==null&&(Xo(this,a,ye,!0,!1,he,se),ye instanceof Ci&&ye.type===cu?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(ye)):a.fillRect(se.x,se.y,se.width,se.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,se=this.panel,this.l&4096&&ts(this),ge=this.part,he=!1;var Me=0;ge&&y.Gf("drawShadows")&&(he=ge.isShadowed)&&(ye=ge.shadowOffset,Me=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var Re;if(!(Re=y.$i||!ye)){var Ve=this.naturalBounds;Re=this.wh;var qe=Re.m11,it=Re.m21,At=Re.dx,bt=Re.m12,Ot=Re.m22,Ft=Re.dy,It,Gt=It=0;Re=It*qe+Gt*it+At;var Yt=It*bt+Gt*Ot+Ft;It=Ve.width+Me,Gt=0;var Bn=It*qe+Gt*it+At;It=It*bt+Gt*Ot+Ft,Gt=Math.min(Re,Bn);var Zn=Math.min(Yt,It),Hn=Math.max(Re+0,Bn)-Gt,En=Math.max(Yt+0,It)-Zn;Re=Gt,Yt=Zn,It=Ve.width+Me,Gt=Ve.height+Me,Bn=It*qe+Gt*it+At,It=It*bt+Gt*Ot+Ft,Gt=Math.min(Re,Bn),Zn=Math.min(Yt,It),Hn=Math.max(Re+Hn,Bn)-Gt,En=Math.max(Yt+En,It)-Zn,Re=Gt,Yt=Zn,It=0,Gt=Ve.height+Me,Bn=It*qe+Gt*it+At,It=It*bt+Gt*Ot+Ft,Gt=Math.min(Re,Bn),Zn=Math.min(Yt,It),Hn=Math.max(Re+Hn,Bn)-Gt,En=Math.max(Yt+En,It)-Zn,Re=Gt,Yt=Zn,Me=y.viewportBounds,Ve=Me.x,qe=Me.y,Re=!(Re>Me.width+Ve||Ve>Hn+Re||Yt>Me.height+qe||qe>En+Yt)}if(Re){if(Re=(this.l&256)!==0,a.clipInsteadOfFill&&(Re=!1),this instanceof Yi&&(a.font=this.font),Re){if(Yt=se.se()?se.naturalBounds:se.actualBounds,Hn=Math.max(ne.x,Yt.x),En=Math.max(ne.y,Yt.y),Me=Math.min(ne.right,Yt.right)-Hn,Ve=Math.min(ne.bottom,Yt.bottom)-En,qe=this.tb,qe!==null&&(Hn=qe.x,En=qe.y,Me=qe.width,Ve=qe.height),Hn>ne.width+ne.x||ne.x>Yt.width+Yt.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Hn,En,Me,Ve),a.clip()}if(ye){if(!ge.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(Yt=ge.shadowOffset,a.Ev(Yt.x*y.scale*this.scale*y.Mb,Yt.y*y.scale*this.scale*y.Mb,ge.shadowBlur),ac(a),a.shadowColor=ge.shadowColor)}he&&this.shadowVisible===!0?ac(a):he&&this.shadowVisible===!1&&Dh(a),ge=this.naturalBounds,this.areaBackground!==null&&(a.yc(),eu(this,a,ge,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&Va(this,se)&&this.shadowVisible===null&&Dh(a),this.Ma!==null&&(a.yc(),kl(this,a,ge,ne)),he&&(this.Ma!==null||this.areaBackground!==null||Va(this,se))?(Bu(this,!0),this.shadowVisible===null&&Dh(a)):Bu(this,!1),this.hh(a,y),he&&this.l&512&&ac(a),ye&&he&&Dh(a),Re&&(a.restore(),a.Vc(this instanceof wn)),te.ws()||(y=1/(te.m11*te.m22-te.m12*te.m21),a.transform(te.m22*y,-te.m12*y,-te.m21*y,te.m11*y,y*(te.m21*te.dy-te.m22*te.dx),y*(te.m12*te.dx-te.m11*te.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function Va(a,y){return y===null?!1:(Tc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===wn.Auto||y.type===wn.Spot)&&y.Pb()!==a)}Ze.Dv=function(){};function eu(a,y,x,b){Xo(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Ci&&a.areaBackground.type===cu?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function kl(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,se=x.width+E,he=x.height+E;Xo(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Ci&&a.Ma.type===cu?(y.beginPath(),y.rect(te-E/2,ne-E/2,se,he),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,se,he)}function Ts(a,y,x){for(var b=y.O.s,E=b.length,te=-1,ne=0;ne<E;ne++)if(b[ne]===a){te=ne;break}if(a=te,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===wn.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 lu(a,y,x){if(!(y instanceof Bl))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 b=a.panel,E=a.nk(y);if(a.kk(y,x,E))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):b&&Ts(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var te=a.shadowOffset;y.Ev(te.x*x.scale*a.scale*x.Mb,te.y*x.scale*a.scale*x.Mb,a.shadowBlur),ac(y),y.shadowColor=a.shadowColor}a instanceof Yi&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof wn;var se=a instanceof wn?Tc(a):!1;a.l&4096&&ts(a);var he=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&se?(hg(y,1,0,0,1,0,0),a.svg=y.ad):te?(hg(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):hg(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var ge=ne.copy().Vj();y.rb.ha=[ge.m11,ge.m12,ge.m21,ge.m22,ge.dx,ge.dy],eu(a,y,E,he),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return te||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(te?(se&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),kl(a,y,E,he),se&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],kl(a,y,E,he)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,se=!1,E&&x.Gf("drawShadows")&&(se=E.isShadowed),y.clipInsteadOfFill&&(se=!1),a.Dd()&&se&&ac(y),se&&a.shadowVisible===!0?ac(y):se&&a.shadowVisible===!1&&Dh(y),E=a.panel,se&&Va(a,E)&&a.shadowVisible===null&&Dh(y),y.Il&&(ge=x.computePixelRatio(),ge="drop-shadow("+y.shadowOffsetX/ge+"px "+y.shadowOffsetY/ge+"px "+y.shadowBlur/ge/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",ge),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",ge)),se&&(a.Ma!==null||a.areaBackground!==null||Va(a,E))?(Bu(a,!0),a.shadowVisible===null&&Dh(y)):Bu(a,!1),E=se,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,se=te?a.svg:y.yd,ge=a.svg,!te&&ge!==null&&se!==ge&&ge.parentNode===a.panel.svg?(a.svg.replaceWith(se),a.svg=se,se!==null&&a.$o(y,b,he,se),fl(y,ge),!0):(a.svg=se,ne!==null&&se===null&&(pm(y),y.nh.pop()),se===null||(a.$o(y,b,he,se),y.Il&&(x=x.computePixelRatio(),a.Dv(se,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&ac(y),a.Dd()&&Dh(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&se.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&se.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(se):y.Nj.prepend(se),y.ti=se):b!==null&&Ts(a,b,se),ne!==null&&ne(a,se)),!0)}Ze.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var se=null;te!==null&&(se=a.svg.getElementById(te.split("#")[1].slice(0,-1))),se===null?(te="CLIP"+Jt++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof wn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),se.appendChild(y),a.svg.appendChild(se),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=se.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),fl(a,b)};function fl(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Ls(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Mn(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}Ze.hh=function(){},Ze.lv=function(){this.Uc=!0},Ze.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 b=this.transform,E=this instanceof wn?Tc(this):!1;if(!(this instanceof wn&&E))if(this instanceof gl){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&Jy(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Qy(a)):y.setAttributeNS(null,"transform",Qy(a))}else if(!x||this instanceof wn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Or){te=y.getElementsByTagName("path");for(var ne=0;ne<te.length;ne++)te[ne].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return te=this.Dd()?this.opacity*a.globalAlpha:this.opacity,te===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",te.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(te=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],eu(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),te&&gm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof wn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),kl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),te&&gm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},Ze.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,b,E,te,ne){if(x!==null){var se=1,he=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Mc)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ge=a.kq();if(se=te.width,he=te.height,E?(se=ne.width,he=ne.height):b||(se+=ge,he+=ge),(te=y instanceof qf)&&x.xe&&(x.type===mp||x.yk===se&&x.ft===he))var ye=x.xe;else{var Me=0,Re=0,Ve=0,qe=0,it=0,At=0;if(At=it=0,E?(it=ne.x,At=ne.y):b||(it-=ge/2,At-=ge/2),Me=x.start.x*se+x.start.offsetX,Re=x.start.y*he+x.start.offsetY,Ve=x.end.x*se+x.end.offsetX,qe=x.end.y*he+x.end.offsetY,Me+=it,Ve+=it,Re+=At,qe+=At,x.type===lc)ye=y.createLinearGradient(Me,Re,Ve,qe);else if(x.type===cu)At=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(it=0,At=Math.max(se,he)/2):it=x.startRadius,ye=y.createRadialGradient(Me,Re,it,Ve,qe,At);else if(x.type===mp)try{ye=y.createPattern(x.pattern,"repeat")}catch(Ot){ye=null}if(x.type!==mp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ye.addColorStop(E.key,E.value);if(te&&(x.xe=ye,ye!==null&&(x.yk=se,x.ft=he),ye===null&&x.type===mp&&x.yk!==-1)){x.yk=-1;var bt=a.diagram;bt!==null&&x.yk===-1&&Ar(function(){bt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}Ze.rg=function(a){if(a instanceof wn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},Ze.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Ze.If=function(){for(var a=this instanceof wn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ts(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Cu(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)}Cu(a,!1),uu(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,uu(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,uu(a,!1)))}Ze.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Mt.alloc();te.yi(y,x,b,E,oi),a.rotate(this.Kb,te.x,te.y),Mt.free(te)}},Ze.v=function(a){if(!tu(this)){a===void 0&&(a=!1),Sa(this,!0),Fh(this,!0);var y=this.panel;y===null||a||y.v()}},Ze.Uj=function(){tu(this)||(Sa(this,!0),Fh(this,!0))};function Xs(a){if(!Ys(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Gn&&a.Bd(),y.$b())),Fh(a,!0)}}Ze.Uk=function(){!(this.l&2048)&&(Cu(this,!0),uu(this,!0))},Ze.Wu=function(){uu(this,!0)},Ze.N=function(){var a=this.part;a!==null&&a.N()};function dl(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===wn.Table?Qu(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===wn.Auto&&b.Pb()===a?Xa(a,xn,y):x===kr?b!==null?b.type===wn.Spot&&b.Pb()===a?Xa(a,xn,y):(x=b.defaultStretch,x===kr?Xa(a,gn,y):Xa(a,x,y)):Xa(a,gn,y):Xa(a,x,y)}function Qu(a,y,x,b){var E=a.stretch;if(E!==kr)return Xa(a,E,b);var te=E=null;switch(y.stretch){case hr:te=!0;break;case xn:te=!0}switch(x.stretch){case er:E=!0;break;case xn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===er||y===xn),te===null&&(te=y===hr||y===xn),E===!0&&te===!0?Xa(a,xn,b):E===!0?Xa(a,er,b):te===!0?Xa(a,hr,b):Xa(a,gn,b)}function Xa(a,y,x){if(x)return y;if(y===gn||(x=a.desiredSize,x.w()))return gn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===er)return gn;if(y===xn)return hr}else{if(y===hr)return gn;if(y===xn)return er}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===hr)return gn;if(y===xn)return er}else{if(y===er)return gn;if(y===xn)return hr}return y}function Bu(a,y){a.l=y?a.l|512:a.l&-513}function ls(a){return(a.l&1024)!==0}function Ld(a,y){a.l=y?a.l|1024:a.l&-1025}function Cu(a,y){a.l=y?a.l|2048:a.l&-2049}function uu(a,y){a.l=y?a.l|4096:a.l&-4097}function tu(a){return(a.l&8192)!==0}function Sa(a,y){a.l=y?a.l|8192:a.l&-8193}function Ys(a){return(a.l&16384)!==0}function Fh(a,y){a.l=y?a.l|16384:a.l&-16385}Ze.Gj=function(){this.svg=null},Ze.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Ze.Av=function(){},Ze.zv=function(a){return this.pa=a,Xs(this),!0},Ze.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Ze.kq=function(){return 0};function Qf(a){var y=a.part;if(y instanceof Gn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||H1(y,a)}}function Yy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof wn?a instanceof Gn?a.Bd():a.qm(a,function(x){Qf(x)}):Qf(a))}Ze.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new fa(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&Zt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new Ln),this.localBindings.add(E),this},Ze.set=function(a){return Object.assign(this,a),this},Ze.Du=function(a){return r0(this,a),this},Ze.apply=function(a){return a(this),this},Ze.nm=function(a){return wc(this,a),this},Ze.pz=function(){return this.ih()},Ze.ih=function(){for(var a=this instanceof wn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Ze.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Vn),this.animationTriggers.add(a.propertyName,a),this};function hu(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var te=hp.I(a);typeof te=="function"?(x=yi(arguments),b=te(x),Tn(b)||Zt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Qt.go[a]}if(b===null&&(E!=null&&E.constructor||Zt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof Vt&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(xi(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?Zt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):r0(b,te);return b}function r0(a,y){if(typeof y=="string")if(a instanceof Yi)a.text=y;else if(a instanceof Or)a.figure=y;else if(a instanceof gl)a.source=y;else if(a instanceof wn)y=Ru.I(y),y!==null&&(a.type=y);else if(a instanceof Ci){var x=Vr(Ci,y);x!==null?a.type=x:Zt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof An?(y=Vr(An,y),y!==null&&(a.type=y)):a instanceof ni&&(y=Vr(ni,y),y!==null&&(a.type=y));else if(y instanceof Ut)a instanceof wn||Zt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof xa){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof xa?Nm(b,y):Zt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof tn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Ea)a.type=y;else if(y instanceof fa)a instanceof Ut||a instanceof xa?a.bind(y):Zt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof va)a instanceof Ut?a.Jv(y):Zt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Pa)a instanceof An&&a.type===An.o?a.figures.add(y):Zt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof ni)a instanceof Pa?a.segments.add(y):Zt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Eo)a instanceof Vt||a instanceof Er?a.layout=y:Zt("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++)r0(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ci){x=new jr;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);wc(a,x)}else if(a instanceof xa){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Zt("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&Zt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new jr;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);wc(a,E)}else wc(a,y);else Zt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function kc(a,y){hp.add(a,y)}function dm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}hn.Object.defineProperties(Ut.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Ad),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 Ad),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 Ad),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Dr(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&&(Dr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Qs},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new af),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Qs&&(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 af),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 af),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:yo},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new af),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:kr},set:function(a){var y=this.stretch;y!==a&&(Dr(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&&(Dr(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)&&Nr(a,"0 <= value <= 1",Ut,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(rd(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(rd(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(),Yy(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&&Od(a,"GraphObject.areaBackground"),a instanceof Ci&&a.freeze(),Dr(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&&Od(a,"GraphObject.background"),a instanceof Ci&&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 rr)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,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new Mt(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Zt("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,Yy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,te=b.height;(E===y||isNaN(E)&&isNaN(y))&&(te===x||isNaN(te)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Or&&this.qc(),this.g("desiredSize",b,a),ls(this)&&(a=this.part,a!==null&&(so(this,a,"width"),so(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 jn(a,this.jd.height).freeze(),this.v(),this instanceof Or&&this.qc(),this.g("desiredSize",y,a),ls(this)&&(a=this.part,a!==null&&so(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 jn(this.jd.width,a).freeze(),this.v(),this instanceof Or&&this.qc(),this.g("desiredSize",y,a),ls(this)&&(a=this.part,a!==null&&so(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Gi},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(),Dr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:na},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(),Dr(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 yr(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&&ts(this),this.Ab}},oe:{get:function(){return this.l&4096&&ts(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Dr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:gn},set:function(a){this.reshapingBehavior!==a&&(Dr(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()&&Zt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Xs(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&&Nr(a,">= 0",Ut,"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&&Nr(a,">= 1",Ut,"columnSpan"),Dr(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&&Nr(a,">= 0",Ut,"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&&Nr(a,">= 1",Ut,"rowSpan"),Dr(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&&(Dr(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 Gn||Zt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&W0(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,X1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ba},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Qf(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Nr(a,">= 0",Ut,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Qf(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),Qf(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&&Nr(a,">= 0",Ut,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ba},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Qf(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Nr(a,">= 0",Ut,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Qf(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),Qf(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&&Nr(a,">= 0",Ut,"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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(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&&(Dr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Ut.prototype.trigger=Ut.prototype.Jv,Ut.prototype.findBindingPanel=Ut.prototype.ih,Ut.prototype.findTemplateBinder=Ut.prototype.pz,Ut.prototype.setProperties=Ut.prototype.nm,Ut.prototype.apply=Ut.prototype.apply,Ut.prototype.attach=Ut.prototype.Du,Ut.prototype.set=Ut.prototype.set,Ut.prototype.isEnabledObject=Ut.prototype.If,Ut.prototype.isVisibleObject=Ut.prototype.Ed,Ut.prototype.isContainedBy=Ut.prototype.rg,Ut.prototype.getNearestIntersectionPoint=Ut.prototype.rs,Ut.prototype.getLocalPoint=Ut.prototype.qs,Ut.prototype.getDocumentScale=Ut.prototype.Df,Ut.prototype.getDocumentAngle=Ut.prototype.li,Ut.prototype.getDocumentBounds=Ut.prototype.mi,Ut.prototype.getDocumentPoint=Ut.prototype.ga,Ut.prototype.intersectsRect=Ut.prototype.Yc,Ut.prototype.containedInRect=Ut.prototype.fh,Ut.prototype.containsRect=Ut.prototype.Re,Ut.prototype.containsPoint=Ut.prototype.ca,Ut.prototype.raiseChanged=Ut.prototype.g,Ut.prototype.raiseChangedEvent=Ut.prototype.cb,Ut.prototype.addCopyProperty=Ut.prototype.Vw;var hp=null;Ut.className="GraphObject",hp=new Vn,kc("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=hu(wn,wn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof wn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},hu(Or,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new nr(0,0,2.76142374915397,2.761423749153969),spot2:new nr(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof wn&&(x=b.fb("ButtonBorder"),x instanceof Or)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof wn&&(x=b.fb("ButtonBorder"),x instanceof Or&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof wn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Or){x=x.diagram;var te=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=ne,ne=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=ne,x.skipsUndoManager=te}}},y.actionUp=function(x,b){if(b.If()&&b instanceof wn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Or){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof wn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Or){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof wn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Or))){var te=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=te}}},y}),kc("TreeExpanderButton",function(){var a=hu("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},hu(Or,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Oo},new fa("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new fa("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof ai&&(x=x.adornedPart),x instanceof Gn){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),kc("SubGraphExpanderButton",function(){var a=hu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},hu(Or,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Oo},new fa("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 ai&&(x=x.adornedPart),x instanceof Er){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),kc("ToolTip",function(){return hu(ai,wn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Mt(0,3),shadowBlur:5},hu(Or,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new nr(0,0,4,6),spot2:new nr(1,1,-4,-4)}))}),kc("ContextMenu",function(){return hu(ai,wn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Mt(0,3),shadowBlur:5},new fa("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),kc("ContextMenuButton",function(){var a=hu("Button");a.stretch=er;var y=a.fb("ButtonBorder");return y instanceof Or&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new nr(0,0,2,3),y.spot2=new nr(1,1,-2,-2)),a}),kc("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=hu("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},hu(Or,{name:"ButtonIcon",strokeWidth:2},new fa("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Or&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var te=E.diagram;if(te!==null&&!te.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,te.Ea("Collapse/Expand Panel"),E.visible=!E.visible,te.eb("Collapse/Expand Panel")))}},x}),kc("CheckBoxButton",function(a){var y=dm(a);return a=hu("Button",{desiredSize:new jn(14,14)},hu(Or,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:xn,geometryStretch:Jn,visible:!1},y!==""?new fa("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof wn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var te=b.fb("ButtonIcon");E.Ea("checkbox"),te.visible=!te.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),kc("CheckBox",function(a){a=dm(a),a=hu("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new yr(0,1,0,0)});var y=hu(wn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new yr(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}),Ut.None=gn=new tn(Ut,"None",0),Ut.Default=kr=new tn(Ut,"Default",0),Ut.Vertical=hr=new tn(Ut,"Vertical",4),Ut.Horizontal=er=new tn(Ut,"Horizontal",5),Ut.Fill=xn=new tn(Ut,"Fill",3),Ut.Uniform=Jn=new tn(Ut,"Uniform",1),Ut.UniformToFill=Yr=new tn(Ut,"UniformToFill",2),Ut.FlipVertical=Rr=new tn(Ut,"FlipVertical",1),Ut.FlipHorizontal=ri=new tn(Ut,"FlipHorizontal",2),Ut.FlipBoth=ji=new tn(Ut,"FlipBoth",3),Ut.make=hu,Ut.getBuilders=function(){var a=new Vn,y;for(y in hp)if(y!==y.toLowerCase()){var x=hp.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Ut.defineBuilder=kc,Ut.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=hp.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Ut))return y&&b.set(y),b;Zt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Ut.takeBuilderArgument=dm;function Ad(){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=Gi,this.o=na,this.hg=kr,this.ob=this.Bi=1,this.Pf=gn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Ad.prototype.copy=function(){var a=new Ad;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 af(){this.u=-1/0,this.o=0,this.F=yo,this.rr=Qs,this.j=this.V="None"}af.prototype.copy=function(){var a=new af;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},af.className="LinkElementSettings";function ug(){this.yj=this.Xi=Ba,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}ug.prototype.copy=function(){var a=new ug;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},ug.className="LinkSettings";function $f(){this.ha=[1,0,0,1,0,0]}$f.prototype.copy=function(){var a=new $f;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},$f.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},$f.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},$f.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 b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,te=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=te,this.ha[3]=ne,this.translate(-y,-x)}},$f.className="STransform";function Nd(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Nd.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Nd.className="SGradient";function mh(a,y,x){this.ownerDocument=a=y===void 0?Qt.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 Bl(this,x)}mh.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},mh.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Tn(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},mh.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},mh.prototype.focus=function(){this.Oa.focus()},mh.prototype.mx=function(){this.ownerDocument=null},hn.Object.defineProperties(mh.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}}}),mh.className="SVGSurface";function Bl(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 $f,this.j=pm(this),this.Nj=pm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Jt++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Zy(a,y,x,b,E,te,ne){a.Nj===void 0?hg(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}Ze=Bl.prototype,Ze.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,ge=he-1e-6,ye=x*Math.cos(b),Me=x*Math.sin(b),Re=a+ye,Ve=y+Me,qe=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Re)||1e-6<Math.abs(se-Ve))&&this.path.push(["L",Re,+Ve]),0>b&&(b=b%he+he),b>ge?(this.path.push(["A",x,x,0,1,qe,a-ye,y-Me]),this.path.push(["A",x,x,0,1,qe,Re,Ve])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),qe,a+x*Math.cos(E),y+x*Math.sin(E)])},Ze.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ze.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ze.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},Ze.clearRect=function(){},Ze.clip=function(){this.Yl.clipPath=!0},Ze.closePath=function(){this.path.push(["z"])},Ze.createLinearGradient=function(a,y,x,b){var E=new Nd("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Ze.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 b="PATTERN"+Jt++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Zf,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Ze.createRadialGradient=function(a,y,x,b,E,te){var ne=new Nd("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function Jy(a,y,x,b,E,te,ne,se,he){b=se/b,E=he/E,te===0&&ne===0||a.rb.translate(te,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Ze.drawImage=function(a,y,x,b,E,te,ne,se,he){var ge="";a instanceof HTMLCanvasElement&&(ge=a.toDataURL()),a instanceof HTMLImageElement&&(ge=a.getAttribute("src"));var ye=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,se=b=ye,he=E=a),b=b||0,E=E||0,se=se||0,he=he||0,Jy(this,y,x,b,E,te||0,ne||0,se,he),te={x:0,y:0,width:ye||b,height:a||E,href:ge},Wt.$(b,se)&&Wt.$(E,he)?ge.toLowerCase().indexOf(".svg")===-1&&ge.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==ye||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),cp(this,Zf,te,this.rb),this.addElement(Zf,te)},Ze.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},Ze.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ze.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},cp(this,"fill",a,this.rb),this.addElement("rect",a)},Ze.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},cp(this,"fill",a,this.rb),i0(this,a),this.svg.prepend(this.Ud("rect",a))},Ze.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},cp(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Ze.lineTo=function(a,y){this.path.push(["L",a,y])},Ze.moveTo=function(a,y){this.path.push(["M",a,y])},Ze.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Ze.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},Ze.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},Ze.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())},Ze.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||hg(this,a,y,x,b,E,te)};function Qy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Ze.scale=function(a,y){this.rb.scale(a,y)},Ze.translate=function(a,y){this.rb.translate(a,y)},Ze.transform=function(){},Ze.yc=function(){},Ze.stroke=function(){qy(this,this.Yl)},Ze.jk=function(){this.clipInsteadOfFill||this.stroke()},Ze.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Ze.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 cp(a,y,x,b){y==="fill"?i0(a,x):y==="stroke"&&qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function i0(a,y){a.fillStyle instanceof Nd?y.fill=o0(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 $y(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Nd?y.setAttributeNS(null,"fill",o0(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 qy(a,y){if(a.strokeStyle instanceof Nd)y.stroke=o0(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 o0(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+Jt++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,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:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var te=[],ne=0;ne<y;ne++){var se=E[ne],he=se.color;se={offset:se.offset,"stop-color":he},/^rgba\(/.test(he)&&(he=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(he),se["stop-color"]="rgb("+he[1]+","+he[2]+","+he[3]+")",se["stop-opacity"]=he[4]),te.push(se)}for(te.sort(function(ge,ye){return ge.offset>ye.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}Ze.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=yi(a[E]),ne=[te.shift()];if(ne[0]==="A")ne.push(te.shift()+","+te.shift(),te.shift(),te.shift()+","+te.shift(),te.shift()+","+te.shift());else for(;te.length;)ne.push(te.shift()+","+te.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,cp(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var se in a)se!=="transform"&&y.setAttributeNS(null,se,a[se]);else{se=y.getElementsByTagName("path");for(var he in a)he!=="transform"&&se[x].setAttributeNS(null,he,a[he])}else this.addElement("path",a)};function hg(a,y,x,b,E,te,ne){var se=new $f;se.ha=[y,x,b,E,te,ne],y={},cp(a,"g",y,se),se=a.addElement("g",y),a.nh.push(se)}function pm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Ze.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Dh(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function ac(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Ze.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Ze.fs=function(){this.Ct=!1},Ze.Vc=function(){},Ze.Wx=function(){},Bl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Bl.prototype.getImageData=function(){return null},Bl.prototype.measureText=function(){return null};function gm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Bl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Bl.className="SVGContext",Vt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new mh(this,Qt.document));var y=new mh(this,Qt.document,!0);a===void 0&&(a=new jr);var x=this;return Cd(this,function(b,E){return b=um(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Vt.prototype.makeSvg=Vt.prototype.Cs,Vt.prototype.av=function(a){return this.Cs(a)},Vt.prototype.makeSVG=Vt.prototype.av;function Eu(a,y,x,b){this.ownerDocument=y=y===void 0?Qt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new qf(y,x,b),y.H=a}Eu.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},Eu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Eu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Eu.prototype.focus=function(){this.Oa.focus()},Eu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},hn.Object.defineProperties(Eu.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}}}),Eu.className="CanvasSurface";function qf(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Zt("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 Br,this.isTemporary=!!x}Ze=qf.prototype,Ze.Wx=function(a){this.Z.imageSmoothingEnabled=a},Ze.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},Ze.beginPath=function(){this.Z.beginPath()},Ze.Se=function(){},Ze.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},Ze.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Ze.clip=function(){this.Z.clip()},Ze.closePath=function(){this.Z.closePath()},Ze.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Ze.createPattern=function(a,y){return this.Z.createPattern(a,y)},Ze.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},Ze.drawImage=function(a,y,x,b,E,te,ne,se,he){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,se,he)},Ze.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Ze.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Ze.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Ze.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Ze.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Ze.lineTo=function(a,y){this.Z.lineTo(a,y)},Ze.measureText=function(a){return this.Z.measureText(a)},Ze.moveTo=function(a,y){this.Z.moveTo(a,y)},Ze.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Ze.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Ze.restore=function(){this.Z.restore()},Ze.save=function(){this.yc(),this.Z.save()},qf.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Ze=qf.prototype,Ze.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},Ze.scale=function(a,y){this.El.scale(a,y)},Ze.translate=function(a,y){this.El.translate(a,y)},Ze.stroke=function(){this.Z.stroke()},Ze.transform=function(a,y,x,b,E,te){if(a!==1||y!==0||x!==0||b!==1||E!==0||te!==0){var ne=this.El,se=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*te+ne.dx,ne.dy=ne.m12*E+ne.m22*te+ne.dy,ne.m11=se,ne.m12=a,ne.m21=y,ne.m22=x}},Ze.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Ze.ng=function(a,y){if(a instanceof Ci&&a.type===cu){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)},Ze.jk=function(){this.Hm||this.stroke()},Ze.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ze.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ze.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},Ze.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ze.Hs=function(){},hn.Object.defineProperties(qf.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 vx=Object.freeze([]);qf.className="CanvasSurfaceContext";function cg(){this.F=this.o=this.u=this.j=0}cg.className="ColorNumbers";function Ci(a,y){gp||(c0(),gp=!0),vo(this),this._isFrozen=!1,a===void 0?(this.na=Mc,this.xk="black"):typeof a=="string"?(this.na=Mc,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===lc?(this.Qd=Xl,this.Lk=Ps):this.Lk=a===cu?this.Qd=oi:this.Qd=ba,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ci.prototype.copy=function(){var a=new Ci;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},Ze=Ci.prototype,Ze.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ze.ka=function(){return Object.isFrozen(this)&&Zt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ze.qb=function(a){a.classType===Ci&&(this.type=a)},Ze.toString=function(){var a="Brush(";if(this.type===Mc)a+=this.color;else if(a=this.type===lc?a+"Linear ":this.type===cu?a+"Radial ":this.type===mp?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+")"},Ze.addColorStop=function(a,y){return this._isFrozen&&ir(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Nr(a,"0 <= loc <= 1",Ci,"addColorStop:loc"),this.we===null&&(this.we=new Vn),this.we.add(a,y),this.na===Mc&&(this.type=lc),this.xe=null,this},Ze.Vz=function(a,y){if(this._isFrozen&&ir(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?vp:y,this.type===Mc)sc(this.color),this.color=dp(a,y);else if((this.type===lc||this.type===cu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)sc(x.value),this.addColorStop(x.key,dp(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?vp:x,sc(a),dp(y,x)}Ze.Wy=function(a,y){if(this._isFrozen&&ir(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?vp:y,this.type===Mc)sc(this.color),this.color=dp(-a,y);else if((this.type===lc||this.type===cu)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)sc(x.value),this.addColorStop(x.key,dp(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?vp:x,sc(a),dp(-y,x)}function a0(a,y,x){sc(a),a=to.j;var b=to.u,E=to.o,te=to.F;return sc(y),x===void 0&&(x=.5),"rgba("+Math.round((to.j-a)*x+a)+", "+Math.round((to.u-b)*x+b)+", "+Math.round((to.o-E)*x+E)+", "+Math.round((to.F-te)*x+te)+")"}Ze.Gx=function(){if(this.type===Mc)return fp(this.color);if((this.type===lc||this.type===cu)&&this.colorStops!==null){var a=this.colorStops;if(this.type===cu)return fp(a.first().value);if(a.get(.5)!==null)return fp(a.get(.5));if(a.count===2)return a=a.Fa(),fp(a0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,te=1;y.next();){var ne=y.key,se=Math.abs(.5-y.key);E>te&&se<E?(x=ne,E=se):te>=E&&se<te&&(b=ne,te=se)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,fp(a0(a.get(x),a.get(b),1-te/E))}return!1};function fp(a){return a?a instanceof Ci?a.Gx():(sc(a),128>(299*to.j+587*to.u+114*to.o)/1e3):!1}function dp(a,y){switch(y){case vp:y=100*l0(to.j);var x=100*l0(to.u),b=100*l0(to.o);return Zs.j=.4124564*y+.3575761*x+.1804375*b,Zs.u=.2126729*y+.7151522*x+.072175*b,Zs.o=.0193339*y+.119192*x+.9503041*b,Zs.F=to.F,y=h0(Zs.j/pp[0]),x=h0(Zs.u/pp[1]),b=h0(Zs.o/pp[2]),Ih.j=116*x-16,Ih.u=500*(y-x),Ih.o=200*(x-b),Ih.F=Zs.F,Ih.j=Math.min(100,Math.max(0,Ih.j+100*a)),a=(Ih.j+16)/116,y=a-Ih.o/200,Zs.j=pp[0]*n1(Ih.u/500+a),Zs.u=pp[1]*(Ih.j>mm*f0?Math.pow(a,3):Ih.j/mm),Zs.o=pp[2]*n1(y),Zs.F=Ih.F,a=-.969266*Zs.j+1.8760108*Zs.u+.041556*Zs.o,y=.0556434*Zs.j+-.2040259*Zs.u+1.0572252*Zs.o,to.j=255*u0((3.2404542*Zs.j+-1.5371385*Zs.u+-.4985314*Zs.o)/100),to.u=255*u0(a/100),to.o=255*u0(y/100),to.F=Zs.F,to.j=Math.round(to.j),255<to.j?to.j=255:0>to.j&&(to.j=0),to.u=Math.round(to.u),255<to.u?to.u=255:0>to.u&&(to.u=0),to.o=Math.round(to.o),255<to.o?to.o=255:0>to.o&&(to.o=0),"rgba("+to.j+", "+to.u+", "+to.o+", "+to.F+")";case r1:return s0(),nu.o=Math.min(100,Math.max(0,nu.o+100*a)),"hsla("+nu.j+", "+nu.u+"%, "+nu.o+"%, "+nu.F+")";default:Zt("Unknown color space: "+y)}}function sc(a){gp||(c0(),gp=!0);var y=d0;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,to.j=a[0],to.u=a[1],to.o=a[2],to.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,to.j=0,to.u=0,to.o=0,to.F=1)}}function s0(){var a=to.j/255,y=to.u/255,x=to.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),te=b-E;if(E=(b+E)/2,te===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/te%6;break;case y:ne=(x-a)/te+2;break;case x:ne=(a-y)/te+4}ne*=60,0>ne&&(ne+=360),a=te/(1-Math.abs(2*E-1))}nu.j=Math.round(ne),nu.u=Math.round(100*a),nu.o=Math.round(100*E),nu.F=to.F}function l0(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function u0(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function h0(a){return a>f0?Math.pow(a,1/3):(mm*a+16)/116}function n1(a){var y=a*a*a;return y>f0?y:(116*a-16)/mm}function Od(a,y){typeof a!="string"&&(a instanceof Ci||Zt("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=Ko?new Eu(null,void 0,{willReadFrequently:!0}).context:null}hn.Object.defineProperties(Ci.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&ir(this,a),this.na=a,this.start.Mc()&&(a===lc?this.start=Xl:a===cu&&(this.start=oi)),this.end.Mc()&&(a===lc?this.end=Ps:a===cu&&(this.end=oi)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&ir(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&ir(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&ir(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&ir(this,a),0>a&&Nr(a,">= zero",Ci,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&ir(this,a),0>a&&Nr(a,">= zero",Ci,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&ir(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&ir(this,a),this.cr=a,this.xe=null}}}),Ci.prototype.isDark=Ci.prototype.Gx,Ci.prototype.darkenBy=Ci.prototype.Wy,Ci.prototype.lightenBy=Ci.prototype.Vz,Ci.prototype.addColorStop=Ci.prototype.addColorStop;var f0=216/24389,mm=24389/27,pp=[95.047,100,108.883],d0=null,to=new cg,nu=new cg,Zs=new cg,Ih=new cg,gp=!1;Ci.className="Brush";var Mc;Ci.Solid=Mc=new tn(Ci,"Solid",0);var lc;Ci.Linear=lc=new tn(Ci,"Linear",1);var cu;Ci.Radial=cu=new tn(Ci,"Radial",2);var mp;Ci.Pattern=mp=new tn(Ci,"Pattern",4);var vp;Ci.Lab=vp=new tn(Ci,"Lab",5);var r1;Ci.HSL=r1=new tn(Ci,"HSL",6),Ci.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 b=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>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},Ci.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;gp||(c0(),gp=!0);var y=d0;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)},Ci.lighten=function(a){return e1(a)},Ci.lightenBy=e1,Ci.darken=function(a){return t1(a)},Ci.darkenBy=t1,Ci.mix=a0,Ci.isDark=fp;function Ea(){this.xa="Base"}Ea.prototype.measure=function(){},Ea.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Ea.prototype.arrange=function(){},Ea.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},Ea.prototype.iA=function(a){a.Uj()},Ea.prototype.gc=function(){},hn.Object.defineProperties(Ea.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return wn}}}),Ea.prototype.remeasureObject=Ea.prototype.iA,Ea.prototype.arrangeElement=Ea.prototype.Ly,Ea.prototype.measureElement=Ea.prototype.Yz,Ea.className="PanelLayout";function vm(){this.xa="Base"}Kt(vm,Ea),vm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;a=uc(a);for(var he=0;he<se;he++){var ge=b[he];if(ge.visible||ge===a){var ye=ge.margin,Me=ye.right+ye.left;ye=ye.top+ye.bottom,ge.measure(y,x,te,ne);var Re=ge.measuredBounds;Me=Math.max(Re.width+Me,0),ye=Math.max(Re.height+ye,0),Re=ge.position.x;var Ve=ge.position.y;isFinite(Re)||(Re=0),isFinite(Ve)||(Ve=0),ge instanceof Or&&ge.isGeometryPositioned&&(ge=ge.strokeWidth/2,Re-=ge,Ve-=ge),xo(E,Re,Ve,Me,ye)}}},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var te=y[E],ne=te.measuredBounds,se=te.margin,he=te.position.x,ge=te.position.y;if(he=isNaN(he)?-a:he-a,ge=isNaN(ge)?-x:ge-x,te instanceof Or&&te.isGeometryPositioned){var ye=te.strokeWidth/2;he-=ye,ge-=ye}te.visible&&te.arrange(he+se.left,ge+se.top,ne.width,ne.height)}};function ym(){this.xa="Base"}Kt(ym,Ea),ym.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=xr(),te=uc(a);for(var he=0;he<se;he++){var ge=b[he];if(ge.visible||ge===te){var ye=dl(ge,!1);if(ye!==gn&&ye!==er)y.push(ge);else{ge.measure(1/0,x,0,ne),ye=ge.margin,ge=ge.measuredBounds;var Me=Math.max(ge.height+ye.top+ye.bottom,0);E.width+=Math.max(ge.width+ye.right+ye.left,0),E.height=Math.max(E.height,Me)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)he=y[a],(he.visible||he===te)&&(ye=he.margin,se=ye.right+ye.left,ye=ye.top+ye.bottom,he.measure(1/0,x,0,ne),he=he.measuredBounds,ye=Math.max(he.height+ye,0),E.width+=Math.max(he.width+se,0),E.height=Math.max(E.height,ye));gr(y)},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,se=ne?x.width:E.left,he=0;he<b;he++){var ge=te,ye=y[he];if(ye.visible){var Me=ye.measuredBounds,Re=ye.margin,Ve=Re.top+Re.bottom,qe=te+E.bottom,it=Me.height,At=dl(ye,!1);(isNaN(ye.desiredSize.height)&&At===xn||At===hr)&&(it=Math.max(x.height-Ve-qe,0)),Ve=it+Ve+qe,qe=ye.alignment,qe.Xb()&&(qe=a.defaultAlignment),qe.sb()||(qe=oi),ne&&(se-=Me.width+Re.left+Re.right),ye.arrange(se+qe.offsetX+Re.left,ge+qe.offsetY+Re.top+(x.height*qe.y-Ve*qe.y),Me.width,it),ne||(se+=Me.width+Re.left+Re.right)}}};function Sm(){this.xa="Base"}Kt(Sm,Ea),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=xr();for(var se=uc(a),he=0;he<ne;he++){var ge=b[he];if(ge.visible||ge===se){var ye=dl(ge,!1);if(ye!==gn&&ye!==hr)x.push(ge);else{var Me=ge.margin;ye=Me.right+Me.left,Me=Me.top+Me.bottom,ge.measure(y,1/0,te,0),ge=ge.measuredBounds,us(E,Math.max(E.width,Math.max(ge.width+ye,0)),E.height+Math.max(ge.height+Me,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)he=x[a],(he.visible||he===se)&&(ge=he.margin,ne=ge.right+ge.left,ge=ge.top+ge.bottom,he.measure(y,1/0,te,0),he=he.measuredBounds,ge=Math.max(he.height+ge,0),E.width=Math.max(E.width,Math.max(he.width+ne,0)),E.height+=ge);gr(x)}},Sm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,se=ne?x.height:E.top,he=0;he<b;he++){var ge=te,ye=y[he];if(ye.visible){var Me=ye.measuredBounds,Re=ye.margin,Ve=Re.left+Re.right,qe=te+E.right,it=Me.width,At=dl(ye,!1);(isNaN(ye.desiredSize.width)&&At===xn||At===er)&&(it=Math.max(x.width-Ve-qe,0)),Ve=it+Ve+qe,qe=ye.alignment,qe.Xb()&&(qe=a.defaultAlignment),qe.sb()||(qe=oi),ne&&(se-=Me.height+Re.bottom+Re.top),ye.arrange(ge+qe.offsetX+Re.left+(x.width*qe.x-Ve*qe.x),se+qe.offsetY+Re.top,it,Me.height),ne||(se+=Me.height+Re.bottom+Re.top)}}};function xm(){this.xa="Base"}Kt(xm,Ea),xm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),ge=he.margin,ye=ge.right+ge.left,Me=ge.top+ge.bottom;he.measure(y,x,te,ne);var Re=he.measuredBounds;te=Re.width,ne=Re.height;var Ve=Math.max(te+ye,0),qe=Math.max(ne+Me,0),it=a.isClipping,At=rn.allocAt(-ge.left,-ge.top,Ve,qe),bt=rn.allocAt(0,0,te,ne);p0(he,bt,!0),te=bt.width,ne=bt.height;for(var Ot=!0,Ft=uc(a),It=0;It<se;It++){var Gt=b[It];Re=y;var Yt=x;if(Gt!==he&&(Gt.visible||Gt===Ft)){ge=Gt.margin;var Bn=ge.left,Zn=ge.top;switch(Ve=ge.right+ge.left,qe=ge.top+ge.bottom,ge=dl(Gt,!1),ge){case xn:Re=te,Yt=ne,Zn=Bn=qe=Ve=0;break;case er:Re=te,Bn=Ve=0;break;case hr:Yt=ne,Zn=qe=0}Gt.measure(Re,Yt,0,0),Re=Gt.measuredBounds,Ve=Math.max(Re.width+Ve,0),qe=Math.max(Re.height+qe,0),ge=Gt.alignment,ge.Xb()&&(ge=a.defaultAlignment),ge.sb()||(ge=oi);var Hn=Gt.alignmentFocus;if(Hn.Xb()&&(Hn=oi),Yt=null,Gt instanceof wn&&Gt.$e!==""&&(Yt=Gt.fb(Gt.$e),Yt===Gt&&(Yt=null)),Bn=bt.x-Bn,Zn=bt.y-Zn,Yt!==null){for(Gt.arrange(0,0,Re.width,Re.height),Re=Yt.actualBounds,Re=Mt.allocAt(Re.x+(Hn.x*Re.width-Hn.offsetX),Re.y+(Hn.y*Re.height-Hn.offsetY)),Yt=Yt.panel;Yt!==Gt;)Yt.transform.Ga(Re),Yt=Yt.panel;Bn+=ge.x*te+ge.offsetX-Re.x,Zn+=ge.y*ne+ge.offsetY-Re.y,Mt.free(Re)}else Bn+=ge.x*te+ge.offsetX-(Hn.x*Re.width+Hn.offsetX),Zn+=ge.y*ne+ge.offsetY-(Hn.y*Re.height+Hn.offsetY);Ot?(Ot=!1,E.h(Bn,Zn,Ve,qe)):xo(E,Bn,Zn,Ve,qe)}}switch(Ot?E.assign(At):it?E.Uu(bt.x,bt.y,bt.width,bt.height):xo(E,At.x,At.y,At.width,At.height),rn.free(At),rn.free(bt),ge=he.stretch,ge===kr&&(ge=dl(he,!1)),ge){case gn:return;case xn:if(!isFinite(y)&&!isFinite(x))return;break;case er:if(!isFinite(y))return;break;case hr:if(!isFinite(x))return}for(Re=he.measuredBounds,te=Re.width,ne=Re.height,Ve=Math.max(te+ye,0),qe=Math.max(ne+Me,0),ge=he.margin,bt=rn.allocAt(-ge.left,-ge.top,Ve,qe),p0(he,bt,!0),te=bt.width,ne=bt.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==Ft||(ge=x.margin,Ve=ge.right+ge.left,qe=ge.top+ge.bottom,Re=x.measuredBounds,Ve=Math.max(Re.width+Ve,0),qe=Math.max(Re.height+qe,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=oi),x=x.alignmentFocus,x.Xb()&&(x=oi),Ot?(Ot=!1,E.h(ye.x*te+ye.offsetX-(x.x*Re.width+x.offsetX)-ge.left,ye.y*ne+ye.offsetY-(x.y*Re.height+x.offsetY)-ge.top,Ve,qe)):xo(E,ye.x*te+ye.offsetX-(x.x*Re.width+x.offsetX)-ge.left,ye.y*ne+ye.offsetY-(x.y*Re.height+x.offsetY)-ge.top,Ve,qe));Ot?E.assign(At):it?E.Uu(bt.x,bt.y,bt.width,bt.height):xo(E,At.x,At.y,At.width,At.height),rn.free(bt)},xm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,se=te.height,he=a.padding;te=he.left,he=he.top;var ge=te-x.x,ye=he-x.y;for(E.arrange(ge,ye,ne,se),ne=rn.allocAt(0,0,ne,se),p0(E,ne,!1),se=0;se<b;se++){var Me=y[se];if(Me!==E){ge=Me.measuredBounds;var Re=ge.width,Ve=ge.height;ye=Me.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=oi);var qe=Me.alignmentFocus;if(qe.Xb()&&(qe=oi),ge=null,Me instanceof wn&&Me.$e!==""&&(ge=Me.fb(Me.$e),ge===Me&&(ge=null)),ge!==null){var it=ge.actualBounds;for(qe=Mt.allocAt(it.x+(qe.x*it.width-qe.offsetX),it.y+(qe.y*it.height-qe.offsetY)),ge=ge.panel;ge!==Me;)ge.transform.Ga(qe),ge=ge.panel;ge=ye.x*ne.width+ye.offsetX-qe.x,ye=ye.y*ne.height+ye.offsetY-qe.y,Mt.free(qe)}else ge=ye.x*ne.width+ye.offsetX-(qe.x*Re+qe.offsetX),ye=ye.y*ne.height+ye.offsetY-(qe.y*Ve+qe.offsetY);ge+=ne.x-x.x,ye+=ne.y-x.y,Me.visible&&Me.arrange(te+ge,he+ye,Re,Ve)}}rn.free(ne)};function p0(a,y,x){var b=null;if(a instanceof wn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function wm(){this.xa="Base"}Kt(wm,Ea),wm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),ge=he.margin,ye=y,Me=x,Re=ge.right+ge.left,Ve=ge.top+ge.bottom;he.measure(y,x,te,ne),ge=he.measuredBounds;var qe=0,it=null;he instanceof Or&&(it=he,qe=it.strokeWidth*it.scale);var At=Math.max(ge.width+Re,0);ge=Math.max(ge.height+Ve,0);var bt=y0(he),Ot=bt.x*At+bt.offsetX;bt=bt.y*ge+bt.offsetY;var Ft=S0(he),It=Ft.x*At+Ft.offsetX;for(Ft=Ft.y*ge+Ft.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(Ot-It)-qe,0)),isFinite(x)&&(Me=Math.max(Math.abs(bt-Ft)-qe,0)),qe=jn.alloc(),qe.h(0,0),a=uc(a),Ft=0;Ft<se;Ft++)bt=b[Ft],bt===he||!bt.visible&&bt!==a||(ge=bt.margin,At=ge.right+ge.left,Ot=ge.top+ge.bottom,bt.measure(ye,Me,0,0),ge=bt.measuredBounds,At=Math.max(ge.width+At,0),ge=Math.max(ge.height+Ot,0),qe.h(Math.max(At,qe.width),Math.max(ge,qe.height)));if(se===1)E.width=At,E.height=ge,jn.free(qe);else{switch(bt=y0(he),Ft=S0(he),se=b=0,Ft.x!==bt.x&&Ft.y!==bt.y&&(b=qe.width/Math.abs(Ft.x-bt.x),se=qe.height/Math.abs(Ft.y-bt.y)),jn.free(qe),qe=0,it!==null&&(qe=it.strokeWidth*it.scale,E0(it)===Jn&&(b=se=Math.max(b,se))),b+=Math.abs(bt.offsetX)+Math.abs(Ft.offsetX)+qe,se+=Math.abs(bt.offsetY)+Math.abs(Ft.offsetY)+qe,it=he.stretch,it===kr&&(it=dl(he,!1)),it){case gn:ne=te=0;break;case xn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case er:isFinite(y)&&(b=y),ne=0;break;case hr:te=0,isFinite(x)&&(se=x)}he.Uj(),he.measure(b,se,te,ne),E.width=he.measuredBounds.width+Re,E.height=he.measuredBounds.height+Ve}},wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=rn.alloc();te.h(0,0,1,1);var ne=b.margin,se=ne.left;ne=ne.top;var he=a.padding,ge=he.left;he=he.top,b.arrange(ge+se,he+ne,E.width,E.height);var ye=y0(b),Me=S0(b),Re=ye.y*E.height+ye.offsetY,Ve=Me.x*E.width+Me.offsetX;for(Me=Me.y*E.height+Me.offsetY,te.x=ye.x*E.width+ye.offsetX,te.y=Re,xo(te,Ve,Me,0,0),te.x+=se+ge,te.y+=ne+he,E=0;E<x;E++)se=y[E],se!==b&&(ge=se.measuredBounds,ne=se.margin,he=Math.max(ge.width+ne.right+ne.left,0),ye=Math.max(ge.height+ne.top+ne.bottom,0),Re=se.alignment,Re.Xb()&&(Re=a.defaultAlignment),Re.sb()||(Re=oi),he=te.width*Re.x+Re.offsetX-he*Re.x+ne.left+te.x,ne=te.height*Re.y+Re.offsetY-ye*Re.y+ne.top+te.y,se.visible&&(ma(te.x,te.y,te.width,te.height,he,ne,ge.width,ge.height)?se.arrange(he,ne,ge.width,ge.height):se.arrange(he,ne,ge.width,ge.height,new rn(te.x,te.y,te.width,te.height))));rn.free(te)};function bm(){this.xa="Base",this.name="Table"}Kt(bm,Ea),bm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=xr(),se=xr(),he=0;he<te;he++){var ge=b[he],ye=ge instanceof wn?ge:null;if(ye!==null&&Tc(ye)&&ge.visible){se.push(ye);for(var Me=ye.O.s,Re=Me.length,Ve=0;Ve<Re;Ve++){var qe=Me[Ve];ye.type===wn.TableRow?qe.row=ge.row:ye.type===wn.TableColumn&&(qe.column=ge.column),ne.push(qe)}}else ne.push(ge)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var it=[],At=0;At<te;At++){var bt=ne[At];bt.visible&&(Sa(bt,!0),Fh(bt,!0),it[bt.row]||(it[bt.row]=[]),it[bt.row][bt.column]||(it[bt.row][bt.column]=[]),it[bt.row][bt.column].push(bt))}gr(ne);var Ot=xr(),Ft=xr(),It=xr(),Gt={count:0},Yt={count:0},Bn=y,Zn=x,Hn=a.rowDefs,En=a.colDefs,fn=null;te=Hn.length;for(var Cr=0;Cr<te;Cr++)fn=Hn[Cr],fn!==void 0&&(fn.actual=0);te=En.length;for(var Sr=0;Sr<te;Sr++)fn=En[Sr],fn!==void 0&&(fn.actual=0);for(var hi=it.length,Xi=0,Oa=0;Oa<hi;Oa++)it[Oa]&&(Xi=Math.max(Xi,it[Oa].length));var Ga=Math.min(a.topIndex,hi-1),Is=Math.min(a.leftIndex,Xi-1),ja=0;hi=it.length;for(var Rc=uc(a),da=0;da<hi;da++)if(it[da]){Xi=it[da].length;var nh=a.Fb(da);nh.actual=0;for(var Bs=nh.oc=0;Bs<Xi;Bs++)if(it[da][Bs]){var _c=a.Eb(Bs);Ot[Bs]===void 0&&(_c.actual=0,_c.oc=0,Ot[Bs]=!0);for(var ou=it[da][Bs],Lu=ou.length,Gl=0;Gl<Lu;Gl++){var Tl=ou[Gl];if(Tl.visible||Tl===Rc){var xf=1<Tl.rowSpan||1<Tl.columnSpan;xf&&(da<Ga||Bs<Is||Ft.push(Tl));var rh=Tl.margin,Gp=rh.right+rh.left,zl=rh.top+rh.bottom,Rs=Qu(Tl,nh,_c,!1),$g=Tl.desiredSize,Hd=!isNaN($g.height),Sh=!isNaN($g.width)&&Hd;if(xf||Rs===gn||Sh||da<Ga||Bs<Is||(Gt[Bs]!==void 0||Rs!==xn&&Rs!==er||(Gt[Bs]=-1,Gt.count++),Yt[da]!==void 0||Rs!==xn&&Rs!==hr||(Yt[da]=-1,Yt.count++),It.push(Tl)),Tl.measure(1/0,1/0,0,0),!(da<Ga||Bs<Is)){var Ll=Tl.measuredBounds,ld=Math.max(Ll.width+Gp,0),Ul=Math.max(Ll.height+zl,0);if(Tl.rowSpan===1&&(Rs===gn||Rs===er)){fn=a.Fb(da);var wf=fn.Wc();ja=Math.max(Ul-fn.actual,0),ja+wf>Zn&&(ja=Math.max(Zn-wf,0));var Kv=fn.oa===0;fn.oc=fn.oc+ja,fn.actual=fn.oa+ja,Zn=Math.max(Zn-(ja+(Kv?wf:0)),0)}if(Tl.columnSpan===1&&(Rs===gn||Rs===hr)){fn=a.Eb(Bs);var qg=fn.Wc();ja=Math.max(ld-fn.actual,0),ja+qg>Bn&&(ja=Math.max(Bn-qg,0));var zy=fn.oa===0;fn.oc=fn.oc+ja,fn.actual=fn.oa+ja,Bn=Math.max(Bn-(ja+(zy?qg:0)),0)}xf&&Tl.Uj()}}}}}gr(Ot);var Kh=0,fc=0;te=a.columnCount;for(var Kd=0;Kd<te;Kd++){var bf=En[Kd];bf!==void 0&&(Kh+=isNaN(bf.Hc)?bf.oc:bf.Hc,bf.oc!==0&&(Kh+=bf.Wc()))}te=a.rowCount;for(var zp=0;zp<te;zp++){var Pf=Hn[zp];Pf!==void 0&&(fc+=isNaN(Pf.Hc)?Pf.oc:Pf.Hc,Pf.oc!==0&&(fc+=Pf.Wc()))}Bn=Math.max(y-Kh,0);var Vh=Zn=Math.max(x-fc,0),Gc=Bn;te=It.length;for(var Al=0;Al<te;Al++){var xh=It[Al],Vv=a.Fb(xh.row),dc=a.Eb(xh.column),Up=xh.measuredBounds,ih=xh.margin,ud=ih.right+ih.left,wh=ih.top+ih.bottom;Gt[xh.column]=dc.oc===0&&Gt[xh.column]!==void 0?Math.max(Up.width+ud,Gt[xh.column]):null,Yt[xh.row]=Vv.oc===0&&Yt[xh.row]!==void 0?Math.max(Up.height+wh,Yt[xh.row]):null}var Vd=0,Wp=0,Hu;for(Hu in Yt)Hu!=="count"&&(Vd+=Yt[Hu]);for(Hu in Gt)Hu!=="count"&&(Wp+=Gt[Hu]);for(var rs=jn.alloc(),em=0;em<te;em++){var rl=It[em];if(rl.visible||rl===Rc){var pa=a.Fb(rl.row),il=a.Eb(rl.column),pc=0;isFinite(il.width)?pc=il.width:(isFinite(Bn)&&Gt[rl.column]!==null?Wp===0?pc=il.actual+Bn:pc=Gt[rl.column]/Wp*Gc:Gt[rl.column]!==null?pc=Bn:pc=il.actual||Bn,pc=Math.max(0,pc-il.Wc()));var zc=0;switch(isFinite(pa.height)?zc=pa.height:(isFinite(Zn)&&Yt[rl.row]!==null?Vd===0?zc=pa.actual+Zn:zc=Yt[rl.row]/Vd*Vh:Yt[rl.row]!==null?zc=Zn:zc=pa.actual||Zn,zc=Math.max(0,zc-pa.Wc())),rs.h(Math.max(il.minimum,Math.min(pc,il.maximum)),Math.max(pa.minimum,Math.min(zc,pa.maximum))),Rs=Qu(rl,pa,il,!1),Rs){case er:rs.height=Math.max(rs.height,pa.actual+Zn);break;case hr:rs.width=Math.max(rs.width,il.actual+Bn)}var hd=rl.margin,Uy=hd.right+hd.left,Xv=hd.top+hd.bottom;rl.Uj(),rl.measure(rs.width,rs.height,il.minimum,pa.minimum);var Hp=rl.measuredBounds,cd=Math.max(Hp.width+Uy,0),Xd=Math.max(Hp.height+Xv,0);isFinite(Bn)&&(cd=Math.min(cd,rs.width)),isFinite(Zn)&&(Xd=Math.min(Xd,rs.height));var Nl=0;Nl=pa.actual,pa.actual=Math.max(pa.actual,Xd),pa.oc=Math.max(pa.oc,Xd),ja=pa.actual-Nl,Zn=Math.max(Zn-ja,0),Yt[rl.row]===null&&(Vh=Math.max(Vh-ja,0)),Nl=il.actual,il.actual=Math.max(il.actual,cd),il.oc=Math.max(il.oc,cd),ja=il.actual-Nl,Bn=Math.max(Bn-ja,0),Gt[rl.column]===null&&(Gc=Math.max(Gc-ja,0))}}gr(It);var gc=jn.alloc(),oh=xr(),mu=xr();if(te=Ft.length,te!==0){for(var Cf=0;Cf<hi;Cf++)if(it[Cf]){Xi=it[Cf].length;var Kp=a.Fb(Cf);oh[Cf]=Kp.actual;for(var Ef=0;Ef<Xi;Ef++)if(it[Cf][Ef]){var Yv=a.Eb(Ef);mu[Ef]=Yv.actual}}}for(var Vp=0;Vp<te;Vp++){var Qo=Ft[Vp];if(Qo.visible||Qo===Rc){var Ku=a.Fb(Qo.row),Au=a.Eb(Qo.column);switch(rs.h(Math.max(Au.minimum,Math.min(y,Au.maximum)),Math.max(Ku.minimum,Math.min(x,Ku.maximum))),Rs=Qu(Qo,Ku,Au,!1),Rs){case xn:mu[Au.index]!==0&&(rs.width=Math.min(rs.width,mu[Au.index])),oh[Ku.index]!==0&&(rs.height=Math.min(rs.height,oh[Ku.index]));break;case er:mu[Au.index]!==0&&(rs.width=Math.min(rs.width,mu[Au.index]));break;case hr:oh[Ku.index]!==0&&(rs.height=Math.min(rs.height,oh[Ku.index]))}isFinite(Au.width)&&(rs.width=Au.width),isFinite(Ku.height)&&(rs.height=Ku.height),gc.h(0,0);for(var Zv=Au.minimum,Wl=Ku.minimum,Uc=1;Uc<Qo.rowSpan&&!(Qo.row+Uc>=a.rowCount);Uc++)fn=a.Fb(Qo.row+Uc),ja=0,ja=Rs===xn||Rs===hr?Math.max(fn.minimum,oh[Qo.row+Uc]===0?fn.maximum:Math.min(oh[Qo.row+Uc],fn.maximum)):Math.max(fn.minimum,isNaN(fn.Hc)?fn.maximum:Math.min(fn.Hc,fn.maximum)),gc.height+=ja,Wl+=fn.minimum;for(var Nu=1;Nu<Qo.columnSpan&&!(Qo.column+Nu>=a.columnCount);Nu++)fn=a.Eb(Qo.column+Nu),ja=0,ja=Rs===xn||Rs===er?Math.max(fn.minimum,mu[Qo.column+Nu]===0?fn.maximum:Math.min(mu[Qo.column+Nu],fn.maximum)):Math.max(fn.minimum,isNaN(fn.Hc)?fn.maximum:Math.min(fn.Hc,fn.maximum)),gc.width+=ja,Zv+=fn.minimum;rs.width+=gc.width,rs.height+=gc.height;var Xp=Qo.margin,kf=Xp.right+Xp.left,tm=Xp.top+Xp.bottom;Qo.measure(rs.width,rs.height,Zv,Wl);for(var Yp=Qo.measuredBounds,bh=Math.max(Yp.width+kf,0),fd=Math.max(Yp.height+tm,0),Mf=0,Zp=0;Zp<Qo.rowSpan&&!(Qo.row+Zp>=a.rowCount);Zp++)fn=a.Fb(Qo.row+Zp),Mf+=fn.total||0;if(Mf<fd){var Wc=fd-Mf,Xh=fd-Mf;if(Qo.spanAllocation!==null)for(var Hc=Qo.spanAllocation,mc=0;mc<Qo.rowSpan&&!(0>=Wc)&&!(Qo.row+mc>=a.rowCount);mc++){fn=a.Fb(Qo.row+mc);var Kc=fn.oa||0,dd=Hc(Qo,fn,Xh);fn.actual=Math.min(fn.maximum,Kc+dd),fn.oa!==Kc&&(Wc-=fn.oa-Kc)}for(;0<Wc;){var ah=fn.oa||0;if(isNaN(fn.height)&&fn.maximum>ah&&(fn.actual=Math.min(fn.maximum,ah+Wc),fn.oa!==ah&&(Wc-=fn.oa-ah)),fn.index===0)break;fn=a.Fb(fn.index-1)}}for(var Yd=0,Vc=0;Vc<Qo.columnSpan&&!(Qo.column+Vc>=a.columnCount);Vc++)fn=a.Eb(Qo.column+Vc),Yd+=fn.total||0;if(Yd<bh){var Zd=bh-Yd,Wy=bh-Yd;if(Qo.spanAllocation!==null)for(var vc=Qo.spanAllocation,pd=0;pd<Qo.columnSpan&&!(0>=Zd)&&!(Qo.column+pd>=a.columnCount);pd++){fn=a.Eb(Qo.column+pd);var nm=fn.oa||0,Hy=vc(Qo,fn,Wy);fn.actual=Math.min(fn.maximum,nm+Hy),fn.oa!==nm&&(Zd-=fn.oa-nm)}for(;0<Zd;){var Jv=fn.oa||0;if(isNaN(fn.width)&&fn.maximum>Jv&&(fn.actual=Math.min(fn.maximum,Jv+Zd),fn.oa!==Jv&&(Zd-=fn.oa-Jv)),fn.index===0)break;fn=a.Eb(fn.index-1)}}}}gr(Ft),jn.free(gc),jn.free(rs),oh!==void 0&&gr(oh),mu!==void 0&&gr(mu);var Jd=0,Qd=0,Qv=a.desiredSize,gx=a.maxSize;Rs=dl(a,!0);var rm=fc=Kh=0,im=0;te=a.columnCount;for(var $v=0;$v<te;$v++)En[$v]!==void 0&&(fn=a.Eb($v),isFinite(fn.width)?(rm+=fn.width,rm+=fn.Wc()):Om(fn)===gg?(rm+=fn.oa,rm+=fn.Wc()):fn.oa!==0&&(Kh+=fn.oa,Kh+=fn.Wc()));isFinite(Qv.width)?Jd=Math.min(Qv.width,gx.width):Jd=Rs!==gn&&isFinite(y)?y:Kh,Jd=Math.max(Jd,a.minSize.width),Jd=Math.max(Jd-rm,0);for(var $x=Kh===0?1:Math.max(Jd/Kh,1),qv=0;qv<te;qv++)En[qv]!==void 0&&(fn=a.Eb(qv),isFinite(fn.width)||Om(fn)===gg||(fn.actual=fn.oa*$x),fn.position=E.width,fn.oa!==0&&(E.width+=fn.oa,E.width+=fn.Wc()));te=a.rowCount;for(var e0=0;e0<te;e0++)Hn[e0]!==void 0&&(fn=a.Fb(e0),isFinite(fn.height)?(im+=fn.height,im+=fn.Wc()):Om(fn)===gg?(im+=fn.oa,im+=fn.Wc()):fn.oa!==0&&(fc+=fn.oa,fc+=fn.Wc()));isFinite(Qv.height)?Qd=Math.min(Qv.height,gx.height):Qd=Rs!==gn&&isFinite(x)?x:fc,Qd=Math.max(Qd,a.minSize.height),Qd=Math.max(Qd-im,0);for(var qx=fc===0?1:Math.max(Qd/fc,1),t0=0;t0<te;t0++)Hn[t0]!==void 0&&(fn=a.Fb(t0),isFinite(fn.height)||Om(fn)===gg||(fn.actual=fn.oa*qx),fn.position=E.height,fn.oa!==0&&(E.height+=fn.oa,E.height+=fn.Wc()));te=se.length;for(var Ky=0;Ky<te;Ky++){var om=se[Ky],Vy=0,Xy=0;om.type===wn.TableRow?(Vy=E.width,fn=a.Fb(om.row),Xy=fn.actual):(fn=a.Eb(om.column),Vy=fn.actual,Xy=E.height),om.measuredBounds.h(0,0,Vy,Xy),Sa(om,!1)}gr(se),a.inRowsCols=it},bm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,te=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var se,he,ge=ne.length,ye=0,Me=0;Me<ge;Me++)ne[Me]&&(ye=Math.max(ye,ne[Me].length));he=a.rowDefs,se=a.colDefs;var Re=Me=0,Ve=Math.min(a.topIndex,ge-1);if(0<he.length){for(;Ve!==ge&&(he[Ve]===void 0||he[Ve].oa===0);)Ve++;Ve=Math.max(Math.min(Ve,ge-1),0),Me=-he[Ve].position}var qe=Math.min(a.leftIndex,ye-1);if(0<se.length){for(;qe!==ye&&(se[qe]===void 0||se[qe].oa===0);)qe++;qe=Math.max(Math.min(qe,ye-1),0),Re=-se[qe].position}for(var it=0,At=0;it!==ge&&he[it]===void 0;)it++;for(;At!==ge&&se[At]===void 0;)At++;ye=a.part,a.Fb(it),a.Eb(At);for(var bt=0;bt<y.length;bt++){var Ot=y[bt];if(Ot instanceof wn&&Ot.visible&&Tc(Ot)){if(Ot.type===wn.TableRow){se=a.Fb(Ot.row);var Ft=a.Eb(At)}else se=a.Fb(it),Ft=a.Eb(Ot.column);he=se.position+Me+E,se.oa!==0&&(he+=se.Io(Math.max(it,Ve))),se=Ft.position+Re+te,Ft.oa!==0&&(se+=Ft.Io(Math.max(At,qe))),Ft=Ot.measuredBounds,Ot.Uk(),Ot.actualBounds.ka();var It=Ot.actualBounds,Gt=rn.allocAt(It.x,It.y,It.width,It.height);It.x=Ot.type===wn.TableRow?te:se,It.y=Ot.type===wn.TableColumn?E:he,It.width=Ft.width,It.height=Ft.height,Ot.actualBounds.freeze(),Fh(Ot,!1),co(Gt,It)||ye===null||(ye.oh(),Ot.Pn(ye)),rn.free(Gt)}}for(bt=jn.alloc(),Ot=0;Ot<ge;Ot++)if(ne[Ot]){for(ye=ne[Ot].length,Ft=a.Fb(Ot),he=Ft.position+Me+E,Ft.oa!==0&&(he+=Ft.Io(Math.max(it,Ve))),It=0;It<ye;It++)if(ne[Ot][It]){Gt=a.Eb(It),se=Gt.position+Re+te,Gt.oa!==0&&(se+=Gt.Io(Math.max(At,qe)));for(var Yt=ne[Ot][It],Bn=Yt.length,Zn=0;Zn<Bn;Zn++){var Hn=Yt[Zn],En=Hn.measuredBounds;bt.h(0,0);for(var fn=1;fn<Hn.rowSpan&&!(Ot+fn>=a.rowCount);fn++){var Cr=a.Fb(Ot+fn);Cr.oa!==0&&(bt.height+=Cr.total)}for(fn=1;fn<Hn.columnSpan&&!(It+fn>=a.columnCount);fn++)Cr=a.Eb(It+fn),Cr.oa!==0&&(bt.width+=Cr.total);var Sr=Gt.oa+bt.width,hi=Ft.oa+bt.height;fn=se,Cr=he;var Xi=Sr,Oa=hi,Ga=se,Is=he,ja=Sr,Rc=hi;se+Sr>x.width&&(ja=Math.max(x.width-se,0)),he+hi>x.height&&(Rc=Math.max(x.height-he,0));var da=Hn.alignment;if(da.Xb()){da=a.defaultAlignment,da.sb()||(da=oi);var nh=da.x,Bs=da.y,_c=da.offsetX;da=da.offsetY;var ou=Gt.alignment,Lu=Ft.alignment;ou.sb()&&(nh=ou.x,_c=ou.offsetX),Lu.sb()&&(Bs=Lu.y,da=Lu.offsetY)}else nh=da.x,Bs=da.y,_c=da.offsetX,da=da.offsetY;(isNaN(nh)||isNaN(Bs))&&(Bs=nh=.5,da=_c=0),ou=En.width,Lu=En.height;var Gl=Hn.margin,Tl=Gl.left+Gl.right,xf=Gl.top+Gl.bottom,rh=Qu(Hn,Ft,Gt,!1);!isNaN(Hn.desiredSize.width)||rh!==xn&&rh!==er||(ou=Math.max(Sr-Tl,0)),!isNaN(Hn.desiredSize.height)||rh!==xn&&rh!==hr||(Lu=Math.max(hi-xf,0)),Sr=Hn.maxSize,hi=Hn.minSize,ou=Math.min(Sr.width,ou),Lu=Math.min(Sr.height,Lu),ou=Math.max(hi.width,ou),Lu=Math.max(hi.height,Lu),Sr=Lu+xf,fn+=Xi*nh-(ou+Tl)*nh+_c+Gl.left,Cr+=Oa*Bs-Sr*Bs+da+Gl.top,Hn.visible&&(ma(Ga,Is,ja,Rc,fn,Cr,En.width,En.height)?Hn.arrange(fn,Cr,ou,Lu):Hn.arrange(fn,Cr,ou,Lu,new rn(Ga,Is,ja,Rc)))}}}for(jn.free(bt),a=0;a<b;a++)x=y[a],te=x instanceof wn?x:null,te!==null&&Tc(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function Pm(){this.xa="Base"}Kt(Pm,Ea),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Kt(Cm,Ea),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Em(){this.xa="Base"}Kt(Em,Ea),Em.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Zt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,te,ne);var se=b.measuredBounds,he=b.margin,ge=he.right+he.left;if(he=he.top+he.bottom,isFinite(y)||isFinite(x)){var ye=b.scale,Me=se.width;se=se.height;var Re=Math.max(y-ge,0),Ve=Math.max(x-he,0),qe=1;a.viewboxStretch===Jn?Me!==0&&se!==0&&(qe=Math.min(Re/Me,Ve/se)):Me!==0&&se!==0&&(qe=Math.max(Re/Me,Ve/se)),qe===0&&(qe=1e-4),b.Ca*=qe,ye!==b.scale&&(Sa(b,!0),b.measure(1/0,1/0,te,ne))}se=b.measuredBounds,E.width=isFinite(y)?y:Math.max(se.width+ge,0),E.height=isFinite(x)?x:Math.max(se.height+he,0)},Em.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,te=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=oi),y.arrange(x.width*ne.x-te*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function fg(){this.xa="Base"}Kt(fg,Ea),fg.prototype.measure=function(){},fg.prototype.arrange=function(){},fg.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var te=a.naturalBounds,ne=a.actualBounds,se=te.width,he=te.height,ge=Math.ceil(se/E),ye=Math.ceil(he/b),Me=a.gridOrigin,Re=Me.x;Me=Me.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Ve=[],qe=a.O.s,it=qe.length,At=0;At<it;At++){var bt=qe[At],Ot=[];if(Ve.push(Ot),bt.visible){var Ft=bt.interval;if(!(0>Ft)){bt=m0(bt.figure);for(var It=0;It<it;It++)if(It!==At){var Gt=qe[It];Gt.visible&&m0(Gt.figure)===bt&&(Gt=Gt.interval,Gt>Ft&&Ot.push(Gt))}}}}for(qe=a.O.s,it=qe.length,At=0;At<it;At++){var Yt=qe[At];if(Yt.visible&&(Ot=Yt.interval||1,bt=Math.abs(Ot),!(2>E*bt*x))){if(Ft=Yt.segmentIndex,(!isFinite(Ft)||isNaN(Ft))&&(Ft=0),0>Ft&&(Ft=bt-Math.min(-Ft,bt)),Ft=Math.round(Ft%bt),bt=Yt.opacity,It=1,bt!==1){if(bt===0)continue;It=y.globalAlpha,y.globalAlpha=It*bt}Gt=Ve[At];var Bn=!1,Zn=Yt.strokeDashArray;if(Zn!==null&&(Bn=!0,y.js(Zn,Yt.strokeDashOffset)),Yt.figure==="LineV"&&Yt.stroke!==null&&0<Yt.strokeWidth){for(y.lineWidth=Yt.strokeWidth,Xo(a,y,Yt.stroke,!1,!1,te,ne),y.beginPath(),Zn=Yt=Math.floor((Re-E)/E);Zn<=Yt+ge;Zn++){var Hn=Zn*E+Re;0<=Hn&&Hn<=se&&km(Zn,Ot,Ft,Gt)&&(y.moveTo(Hn,0),y.lineTo(Hn,he))}y.stroke(),y.Se()}else if(Yt.figure==="LineH"&&Yt.stroke!==null&&0<Yt.strokeWidth){for(y.lineWidth=Yt.strokeWidth,Xo(a,y,Yt.stroke,!1,!1,te,ne),y.beginPath(),Zn=Yt=Math.floor((Me-b)/b);Zn<=Yt+ye;Zn++)Hn=Zn*b+Me,0<=Hn&&Hn<=he&&km(Zn,Ot,Ft,Gt)&&(y.moveTo(0,Hn),y.lineTo(se,Hn));y.stroke(),y.Se()}else if(Yt.figure==="BarV"&&Yt.fill!==null)for(Xo(a,y,Yt.fill,!0,!1,te,ne),Yt=Yt.width,isNaN(Yt)&&(Yt=E),Hn=Zn=Math.floor((Re-E)/E);Hn<=Zn+ge;Hn++){var En=Hn*E+Re;0<=En+Yt&&En<=se&&km(Hn,Ot,Ft,Gt)&&y.fillRect(En,0,Yt,he)}else if(Yt.figure==="BarH"&&Yt.fill!==null)for(Xo(a,y,Yt.fill,!0,!1,te,ne),Yt=Yt.height,isNaN(Yt)&&(Yt=b),Hn=Zn=Math.floor((Me-b)/b);Hn<=Zn+ye;Hn++)En=Hn*b+Me,0<=En+Yt&&En<=he&&km(Hn,Ot,Ft,Gt)&&y.fillRect(0,En,se,Yt);Bn&&y.fs(),bt!==1&&(y.globalAlpha=It)}}y.restore(),y.Vc(!1)};function km(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Mm(){this.xa="Base"}Kt(Mm,Ea),Mm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof ai||a instanceof kn){var ne=null,se=null;if(a instanceof kn&&(ne=a),a instanceof ai&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof kn){var he=ne;if(te===0)us(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ge=a instanceof ai?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=he.points,Me=ne.pointsCount;se!==null?se.Ul(!1):ne!==null&&ne.Ul(!1),se=y.width;var Re=y.height,Ve=a.j;if(Ve.length=0,ge!==null){i1(a,se,Re,ge);var qe=ge.measuredBounds;x.ed(qe),Ve.push(qe)}qe=Br.alloc();for(var it=Mt.alloc(),At=Mt.alloc(),bt=0;bt<te;bt++){var Ot=b[bt];if(Ot!==ge)if(Ot.isPanelMain&&Ot instanceof Or){i1(a,se,Re,Ot);var Ft=Ot.measuredBounds;x.ed(Ft),Ve.push(Ft)}else if(2>Me)Ot.measure(1/0,1/0,0,0),Ft=Ot.measuredBounds,x.ed(Ft),Ve.push(Ft);else{var It=Ot.segmentIndex,Gt=Ot.segmentFraction,Yt=Ot.alignmentFocus;Yt.Mc()&&(Yt=oi);var Bn=Ot.segmentOrientation,Zn=Ot.segmentOffset;if(isNaN(It)){var Hn=he.ua;Ft=xr(),Hn.Qu(Gt,Ft);var En=Mt.allocAt(Ft[0],Ft[1]);if(En.add(he.i(0)),Hn.type===An.j?En.offset(-Hn.startX,-Hn.startY):(Hn=Hn.figures.first(),Hn!==null&&En.offset(-Hn.startX,-Hn.startY)),Hn=Ft[2],Bn!==Qs){var fn=he.computeAngle(Ot,Bn,Hn);Ot.Kb=fn}fn=En.x-y.x;var Cr=En.y-y.y;Mt.free(En),gr(Ft)}else if(It<-Me||It>=Me)Ft=Mt.alloc(),he.vg(),he.computeMidPoint(Ft),Hn=he.midAngle,Bn!==Qs&&(fn=he.computeAngle(Ot,Bn,Hn),Ot.Kb=fn),fn=Ft.x-y.x,Cr=Ft.y-y.y,Mt.free(Ft);else{if(fn=0,0<=It?(Cr=ye.M(It),Ft=It<Me-1?ye.M(It+1):Cr):(fn=Me+It,Cr=ye.M(fn),Ft=0<fn?ye.M(fn-1):Cr),Cr.Xa(Ft)){0<=It?(Hn=0<It?ye.M(It-1):Cr,fn=It<Me-2?ye.M(It+2):Ft):(Hn=fn<Me-1?ye.M(fn+1):Cr,fn=1<fn?ye.M(fn-2):Ft),En=Hn.Bf(Cr);var Sr=Ft.Bf(fn);Hn=En>Sr+10?0<=It?Hn.ab(Cr):Cr.ab(Hn):Sr>En+10?0<=It?Ft.ab(fn):fn.ab(Ft):0<=It?Hn.ab(fn):fn.ab(Hn)}else Hn=0<=It?Cr.ab(Ft):Ft.ab(Cr);Bn!==Qs&&(fn=he.computeAngle(Ot,Bn,Hn),Ot.Kb=fn),fn=Cr.x+(Ft.x-Cr.x)*Gt-y.x,Cr=Cr.y+(Ft.y-Cr.y)*Gt-y.y}Ot.measure(1/0,1/0,0,0),Ft=Ot.measuredBounds,En=Ot.naturalBounds;var hi=0;Ot instanceof Or&&(hi=Ot.strokeWidth),Sr=En.width+hi;var Xi=En.height+hi;qe.reset(),qe.translate(-Ft.x,-Ft.y),qe.scale(Ot.scale,Ot.scale),qe.rotate(Bn===Qs?Ot.angle:Hn,Sr/2,Xi/2),Bn!==Eg&&Bn!==Mg||qe.rotate(90,Sr/2,Xi/2),Bn!==kg&&Bn!==Tg||qe.rotate(-90,Sr/2,Xi/2),Bn===rv&&(45<Hn&&135>Hn||225<Hn&&315>Hn)&&qe.rotate(-Hn,Sr/2,Xi/2),En=new rn(0,0,Sr,Xi),it.xi(En,Yt),qe.Ga(it),Yt=-it.x+hi/2*Ot.scale,Ot=-it.y+hi/2*Ot.scale,At.assign(Zn),hi=isNaN(Zn.x);var Oa=isNaN(Zn.y);if(hi||Oa){Sr=Sr/2+3,Xi=Xi/2+3;var Ga=45<=Hn&&135>=Hn,Is=225<=Hn&&315>=Hn;Bn===Qs&&(Ga||Is)?(At.x=Oa?Sr:Zn.y,At.y=hi?Xi:Zn.x,Ga?0<=It||isNaN(It)&&.5>Gt||!hi||(At.y=-Xi):Is&&((0<=It||isNaN(It)&&.5>Gt)&&hi&&(At.y=-Xi),Oa&&(At.x=-Sr))):(hi&&(At.x=0<=It||isNaN(It)&&.5>Gt?Sr:-Sr),Oa&&(At.y=-Xi),At.rotate(Hn))}else At.rotate(Hn);fn+=At.x,Cr+=At.y,En.set(Ft),En.h(fn+Yt,Cr+Ot,Ft.width,Ft.height),Ve.push(En),x.ed(En)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),us(E,x.width||0,x.height||0),Br.free(qe),Mt.free(it),Mt.free(At)}}}},Mm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof ai||a instanceof kn){var b=a,E=null;a instanceof ai&&(E=a,b=E.adornedPart);var te=a instanceof ai?null:b.path,ne=a.j;if(ne.length!==0){var se=0;if(te!==null&&se<ne.length){var he=ne[se];se++,te.arrange(he.x-a.jg.x,he.y-a.jg.y,he.width,he.height)}for(he=0;he<x;he++){var ge=y[he];if(ge!==te&&se<ne.length){var ye=ne[se];se++,ge.arrange(ye.x-a.jg.x,ye.y-a.jg.y,ye.width,ye.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof kn)for(te=a.labelNodes;te.next();){var Me=a;ne=te.value,se=ne.segmentIndex,he=ne.segmentFraction;var Re=ne.alignmentFocus;if(ge=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(se)){var Ve=Me.ua,qe=xr();Ve.Qu(he,qe);var it=Mt.allocAt(qe[0],qe[1]);it.add(Me.i(0)),Ve.type===An.j||(Ve=Ve.figures.first()),it.offset(-Ve.startX,-Ve.startY),Ve=qe[2],ge!==Qs&&(Me=Me.computeAngle(ne,ge,Ve),ne.angle=Me),Me=it.x;var At=it.y;Mt.free(it),gr(qe)}else if(se<-x||se>=x)qe=Mt.alloc(),Ve=Me,At=qe,Ve.vg(),Ve.computeMidPoint(At),Ve=Me.midAngle,ge!==Qs&&(Me=Me.computeAngle(ne,ge,Ve),ne.angle=Me),Me=qe.x,At=qe.y,Mt.free(qe);else{if(it=0,0<=se?(qe=y.s[se],At=se<x-1?y.s[se+1]:qe):(it=x+se,qe=y.s[it],At=0<it?y.s[it-1]:qe),qe.Xa(At)){0<=se?(Ve=0<se?y.s[se-1]:qe,it=se<x-2?y.s[se+2]:At):(Ve=it<x-1?y.s[it+1]:qe,it=1<it?y.s[it-2]:At);var bt=Ve.Bf(qe),Ot=At.Bf(it);Ve=bt>Ot+10?0<=se?Ve.ab(qe):qe.ab(Ve):Ot>bt+10?0<=se?At.ab(it):it.ab(At):0<=se?Ve.ab(it):it.ab(Ve)}else Ve=0<=se?qe.ab(At):At.ab(qe);ge!==Qs&&(Me=Me.computeAngle(ne,ge,Ve),ne.angle=Me),Me=qe.x+(At.x-qe.x)*he,At=qe.y+(At.y-qe.y)*he}if(Re.ys())ne.location=new Mt(Me,At);else{Re.Mc()&&(Re=oi),qe=Br.alloc(),qe.reset(),qe.scale(ne.scale,ne.scale),qe.rotate(ne.angle,0,0);var Ft=ne.naturalBounds;it=rn.allocAt(0,0,Ft.width,Ft.height),bt=Mt.alloc(),bt.xi(it,Re),qe.Ga(bt),Re=-bt.x,Ot=-bt.y;var It=Ft.width,Gt=Ft.height;Ft=Mt.alloc(),Ft.assign(ye);var Yt=isNaN(ye.x),Bn=isNaN(ye.y);if(Yt||Bn){It=It/2+3,Gt=Gt/2+3;var Zn=45<=Ve&&135>=Ve,Hn=225<=Ve&&315>=Ve;ge===Qs&&(Zn||Hn)?(Ft.x=Bn?It:ye.y,Ft.y=Yt?Gt:ye.x,Zn?0<=se||isNaN(se)&&.5>he||!Yt||(Ft.y=-Gt):Hn&&((0<=se||isNaN(se)&&.5>he)&&Yt&&(Ft.y=-Gt),Bn&&(Ft.x=-It))):(Yt&&(Ft.x=0<=se||isNaN(se)&&.5>he?It:-It),Bn&&(Ft.y=-Gt),Ft.rotate(Ve))}else Ft.rotate(Ve);Me+=Ft.x,At+=Ft.y,qe.pp(it),Re+=it.x,Ot+=it.y,se=Mt.allocAt(Me+Re,At+Ot),ne.move(se),Mt.free(se),Mt.free(Ft),Mt.free(bt),rn.free(it),Br.free(qe)}}E!==null?E.Ul(!1):b.Ul(!1),b=j1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Mt.free(b)}};function i1(a,y,x,b){if(tu(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof ai&&a.type===wn.Link&&a.adornedObject instanceof Or&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof kn&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof ai&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),Sa(b,!1)}}function dg(){this.xa="Base"}Kt(dg,Ea),dg.prototype.measure=function(a,y,x,b,E,te,ne){var se=a.Pb();a.graduatedBounds=[];var he=se.margin,ge=he.right+he.left,ye=he.top+he.bottom;se.measure(y,x,te,ne);var Me=se.measuredBounds,Re=new rn(-he.left,-he.top,Math.max(Me.width+ge,0),Math.max(Me.height+ye,0));a.graduatedBounds.push(Re),E.assign(Re);for(var Ve=se.geometry,qe=se.strokeWidth,it=Ve.flattenedSegments,At=Ve.flattenedLengths,bt=Ve.flattenedTotalLength,Ot=it.length,Ft=0,It=0,Gt=xr(),Yt=0;Yt<Ot;Yt++){var Bn=it[Yt],Zn=[];It=Ft=0;for(var Hn=Bn.length,En=0;En<Hn;En+=2){var fn=Bn[En],Cr=Bn[En+1];if(En!==0){var Sr=180*Math.atan2(Cr-It,fn-Ft)/Math.PI;0>Sr&&(Sr+=360),Zn.push(Sr)}Ft=fn,It=Cr}Gt.push(Zn)}if(a.graduatedIntervals===null){for(var hi=[],Xi=a.O.s,Oa=Xi.length,Ga=0;Ga<Oa;Ga++){var Is=Xi[Ga],ja=[];if(hi.push(ja),Is.visible){var Rc=Is.interval;if(!(0>Rc)){for(var da=0;da<Oa;da++)if(da!==Ga){var nh=Xi[da];if(nh.visible&&Is.constructor===nh.constructor){var Bs=nh.interval;Bs>Rc&&ja.push(Bs)}}}}}a.graduatedIntervals=hi}var _c=a.graduatedIntervals,ou=a.O.s,Lu=ou.length,Gl=0,Tl=0,xf=bt;a.graduatedMarks=[];for(var rh,Gp=0;Gp<Lu;Gp++){var zl=ou[Gp];if(rh=[],zl.visible&&zl!==se){var Rs=Math.abs(zl.interval),$g=a.graduatedTickUnit;if(!(2>$g*Rs*bt/a.graduatedRange&&zl.graduatedSkip===null)){var Hd=At[0][0],Sh=0,Ll=0;Tl=bt*zl.graduatedStart-1e-4,xf=bt*zl.graduatedEnd+1e-4;var ld=$g*Rs,Ul=a.graduatedTickBase;if(Ul<a.graduatedMin){var wf=(a.graduatedMin-Ul)/ld;wf=wf%1===0?wf:Math.floor(wf+1),Ul+=wf*ld}else Ul>a.graduatedMin+ld&&(Ul-=Math.floor((Ul-a.graduatedMin)/ld)*ld);for(var Kv=_c[Gp],qg=Ul,zy=1e-6*a.graduatedMax,Kh=1;Ul<=a.graduatedMax+zy;Kh++){e:{for(var fc=Kv.length,Kd=0;Kd<fc;Kd++){var bf=(Ul-a.graduatedTickBase)%(Kv[Kd]*a.graduatedTickUnit),zp=1e-6*a.graduatedTickUnit;if(bf<zp&&bf>-zp){var Pf=!1;break e}}Pf=!0}if(Pf&&(Ul>a.graduatedMax&&(Ul=a.graduatedMax),zl.graduatedSkip===null||zl instanceof Yi&&!zl.graduatedSkip(Ul,zl)||zl instanceof Or&&!zl.graduatedSkip(Ul,zl))&&(Gl=(Ul-a.graduatedMin)*bt/a.graduatedRange,Gl>bt&&(Gl=bt),Tl<=Gl&&Gl<=xf)){for(var Vh=Gt[Sh][Ll],Gc=At[Sh][Ll];Sh<At.length;){for(;Gl>Hd&&Ll<At[Sh].length-1;)Ll++,Vh=Gt[Sh][Ll],Gc=At[Sh][Ll],Hd+=Gc;if(Gl<=Hd)break;Sh++,Ll=0,Vh=Gt[Sh][Ll],Gc=At[Sh][Ll],Hd+=Gc}var Al=it[Sh],xh=Al[2*Ll],Vv=Al[2*Ll+1],dc=(Gl-(Hd-Gc))/Gc,Up=new Mt(xh+(Al[2*Ll+2]-xh)*dc+qe/2-Ve.bounds.x,Vv+(Al[2*Ll+3]-Vv)*dc+qe/2-Ve.bounds.y);Up.scale(se.scale,se.scale);e:{var ih=Vh,ud=Gt[Sh];if(!(.5005>dc&&.4995<dc)){var wh=ih;if(.5>dc?0<Ll?wh=ud[Ll-1]:Wt.$(Al[0],Al[Al.length-2])&&Wt.$(Al[1],Al[Al.length-1])&&(wh=ud[ud.length-1]):.5<dc&&(Ll+1<ud.length?wh=ud[Ll+1]:Wt.$(Al[0],Al[Al.length-2])&&Wt.$(Al[1],Al[Al.length-1])&&(wh=ud[0])),ih!==wh){var Vd=Math.abs(ih-wh);if(180<Vd&&(ih<wh?ih+=360:wh+=360,Vd=Math.abs(ih-wh)),5e-4>dc||.9995<dc){Vh=(ih+wh)/2%360;break e}if(10>Vd){var Wp=1-Math.abs(.5-dc);Vh=(ih*Wp+wh*(1-Wp))%360;break e}}}Vh=ih}if(zl instanceof Yi){var Hu="";zl.graduatedFunction!==null?(Hu=zl.graduatedFunction(Ul,zl),Hu=Hu!=null?Hu.toString():""):Hu=(+Ul.toFixed(2)).toString(),Hu!==""&&rh.push({$l:Up,angle:Vh,text:Hu})}else rh.push({$l:Up,angle:Vh})}Ul=qg+Kh*ld}}}a.graduatedMarks.push(rh)}gr(Gt);var rs=a.graduatedMarks;if(rs!==null)for(var em=b.length,rl=0;rl<em;rl++){var pa=b[rl],il=rs[rl];if(pa.visible&&pa!==se&&il.length!==0){if(pa instanceof Or){var pc=a,zc=E,hd=pa.alignmentFocus;hd.Mc()&&(hd=Xl);var Uy=pa.angle;pa.Kb=0,pa.measure(1/0,1/0,0,0),pa.Kb=Uy;var Xv=pa.measuredBounds,Hp=Xv.width,cd=Xv.height,Xd=rn.allocAt(0,0,Hp,cd),Nl=Mt.alloc();Nl.xi(Xd,hd),rn.free(Xd);for(var gc=-Nl.x,oh=-Nl.y,mu=new rn,Cf=il.length,Kp=0;Kp<Cf;Kp++)for(var Ef=il[Kp],Yv=Ef.$l.x,Vp=Ef.$l.y,Qo=Ef.angle,Ku=0;4>Ku;Ku++){switch(Ku){case 0:Nl.h(gc,oh);break;case 1:Nl.h(gc+Hp,oh);break;case 2:Nl.h(gc,oh+cd);break;case 3:Nl.h(gc+Hp,oh+cd)}Nl.rotate(Qo+pa.angle),Nl.offset(Yv,Vp),Kp===0&&Ku===0?mu.h(Nl.x,Nl.y,0,0):mu.Ye(Nl),Nl.offset(-Yv,-Vp),Nl.rotate(-Qo-pa.angle)}Mt.free(Nl),pc.graduatedBounds!==null&&pc.graduatedBounds.push(mu),xo(zc,mu.x,mu.y,mu.width,mu.height)}else if(pa instanceof Yi){var Au=a,Zv=E;Au.temporaryTextBlock===null&&(Au.temporaryTextBlock=new Yi);var Wl=Au.temporaryTextBlock;S1(Wl,pa);var Uc=pa.alignmentFocus;Uc.Mc()&&(Uc=Xl);for(var Nu=pa.segmentOrientation,Xp=pa.segmentOffset,kf=new rn,tm=0,Yp=0,bh=0,fd=0,Mf=0,Zp=il.length,Wc=0;Wc<Zp;Wc++){var Xh=il[Wc];tm=Xh.$l.x,Yp=Xh.$l.y,bh=Xh.angle,Mf=fd=pa.angle,Nu!==Qs&&(Mf=Nu===Cg||Nu===nv?bh+pa.angle:bh,fd=kn.computeAngle(Nu,Mf)),Wl.Kb=fd,Wl.text=Xh.text||"",Wl.measure(1/0,1/0,0,0);var Hc=Wl.measuredBounds,mc=Wl.naturalBounds,Kc=mc.width,dd=mc.height,ah=Br.alloc();ah.reset(),ah.translate(-Hc.x,-Hc.y),ah.scale(Wl.scale,Wl.scale),ah.rotate(Mf,Kc/2,dd/2),Nu!==Eg&&Nu!==Mg||ah.rotate(90,Kc/2,dd/2),Nu!==kg&&Nu!==Tg||ah.rotate(-90,Kc/2,dd/2),Nu===rv&&(45<bh&&135>bh||225<bh&&315>bh)&&ah.rotate(-bh,Kc/2,dd/2);var Yd=rn.allocAt(0,0,Kc,dd),Vc=Mt.alloc();Vc.xi(Yd,Uc),ah.Ga(Vc);var Zd=-Vc.x,Wy=-Vc.y,vc=Mt.alloc();vc.assign(Xp),isNaN(vc.x)&&(vc.x=Kc/2+3),isNaN(vc.y)&&(vc.y=-(dd/2+3)),vc.rotate(bh),tm+=vc.x+Zd,Yp+=vc.y+Wy;var pd=new rn(tm,Yp,Hc.width,Hc.height),nm=new rn(Hc.x,Hc.y,Hc.width,Hc.height),Hy=new rn(mc.x,mc.y,mc.width,mc.height);Xh.Sz=fd,Xh.lineCount=Wl.lineCount,Xh.lines=[Wl.Cb,Wl.Ih,Wl.df,Wl.Le,Wl.Qc,Wl.Qb,Wl.ze],Xh.actualBounds=pd,Xh.measuredBounds=nm,Xh.naturalBounds=Hy,Wc===0?kf.assign(pd):kf.ed(pd),Mt.free(vc),Mt.free(Vc),rn.free(Yd),Br.free(ah)}Au.graduatedBounds!==null&&Au.graduatedBounds.push(kf),xo(Zv,kf.x,kf.y,kf.width,kf.height)}Sa(pa,!1)}}},dg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var te=a.graduatedBounds,ne=0,se=te[ne];ne++,b!==null&&b.arrange(se.x-x.x,se.y-x.y,se.width,se.height);for(var he=y.length,ge=0;ge<he;ge++){var ye=y[ge];se=E[ge],ye.visible&&ye!==b&&se.length!==0&&(se=te[ne],ne++,ye.arrange(se.x-x.x,se.y-x.y,se.width,se.height))}a.graduatedBounds=null}}},dg.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,te=E.width,ne=E.height;E=y instanceof Bl,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var se=te.actualBounds,he=a.O.s,ge=a.graduatedMarks,ye=he.length,Me=0;Me<ye;Me++){var Re=he[Me],Ve=ge[Me],qe=Ve.length;if(Re.visible&&Re!==te&&Ve.length!==0){if(Re instanceof Or){if(!(2>a.graduatedTickUnit*Re.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Re.graduatedSkip===null)){var it=Re.measuredBounds,At=Re.strokeWidth*Re.scale,bt=Re.alignmentFocus;bt.Mc()&&(bt=Xl);for(var Ot=0;Ot<qe;Ot++){var Ft=Ve[Ot].$l,It=Ve[Ot].angle,Gt=bt,Yt=Re.Ab;Yt.reset(),Yt.translate(Ft.x+se.x,Ft.y+se.y),Yt.rotate(It+Re.angle,0,0),Yt.translate(-it.width*Gt.x+Gt.offsetX+At/2,-it.height*Gt.y+Gt.offsetY+At/2),Yt.scale(Re.scale,Re.scale),Cu(Re,!1),Re.wh.set(Re.Ab),Re.Kk=Re.scale,uu(Re,!1),Re.gc(y,x),E&&(a.svg.appendChild(Re.svg),Re.svg=null),Re.Ab.reset()}}}else if(Re instanceof Yi)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Yi),it=a.temporaryTextBlock,S1(it,Re),At=0;At<qe;At++)bt=Ve[At],bt.actualBounds&&bt.measuredBounds&&bt.naturalBounds&&(it.ec=bt.text||"",it.Kb=bt.Sz||0,it.Gc=bt.lineCount||0,Ot=bt.lines,Ot!==void 0&&(it.Cb=Ot[0],it.Ih=Ot[1],it.df=Ot[2],it.Le=Ot[3],it.Qc=Ot[4],it.Qb=Ot[5],it.ze=Ot[6]),bt.naturalBounds&&(it.dc=bt.naturalBounds),bt.actualBounds&&(Ot=bt.actualBounds,it.arrange(Ot.x,Ot.y,Ot.width,Ot.height)),Ot=bt.actualBounds,it.arrange(Ot.x,Ot.y,Ot.width,Ot.height),Ft=bt.measuredBounds,bt=bt.naturalBounds,It=it.Ab,It.reset(),It.translate(Ot.x+se.x,Ot.y+se.y),It.translate(-Ft.x,-Ft.y),it.no(It,bt.x,bt.y,bt.width,bt.height),Cu(it,!1),it.wh.set(it.Ab),it.Kk=it.scale,uu(it,!1),it.Ng=Re.part,it.Me=Re.panel,it.gc(y,x),it.Me=null,it.Ng=null,E&&(a.svg.appendChild(it.svg),it.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function wn(a,y){if(Ut.call(this),this.na=null,a===void 0)this.na=wn.Position;else if(typeof a=="string"){var x=Ru.I(a);x!==null&&(this.na=x)}else a instanceof Ea?this.na=a:a&&(this.na=wn.Position,y=a);this.na===null&&Zt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===wn.Grid?1048576:0),this.O=new Ln,this.yb=Vl,this.Tm=Ba,this.Uf=kr,this.$g=null,this.$e="",this.jg=new rn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Jn,this.jn=Wo,this.kn=yo,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Kt(wn,Ut),wn.prototype.cloneProtected=function(a){Ut.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},wn.prototype.Af=function(a){Ut.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},wn.prototype.copy=function(){var a=Ut.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var te=a.O,ne=te.count;if(te.Gb(ne,E),te=a.part,te!==null){te.Rh=null,E.portId!==null&&te instanceof Gn&&(te.Te=!0);var se=a.diagram;se!==null&&se.undoManager.isUndoingRedoing||te.cb(Zo,"elements",a,null,E,null,ne)}}return a}return null},Ze=wn.prototype,Ze.toString=function(){return"Panel("+this.type.name+")#"+Xt(this)},Ze.Pn=function(a){Ut.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},Ze.hh=function(a,y){if(this.na===wn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===wn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===wn.Table)if(a.yc(),a instanceof Bl){var x=a.yd;a.yd=pm(a,"gojs-ts"),g0(this,a),a.nh.pop(),a.yd=x}else g0(this,a);(x=this.isClipping&&this.na===wn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x&&se===b&&(a.clipInsteadOfFill=!0),se.gc(a,y),x&&se===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function g0(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Tm(a,y,!0,x,!0),b!==null&&Tm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Tm(a,y,!0,x,!1),b!==null&&Tm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,se=!0,he=0;he<E;he++){var ge=b[he];if(ge!==void 0&&ge.actual!==0)if(se)se=!1;else{if(x){if(ge.position>ne.height)continue}else if(ge.position>ne.width)continue;var ye=ge.separatorStrokeWidth;isNaN(ye)&&(ye=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Me=ge.separatorStroke;if(Me===null&&(Me=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Me!==null){Xo(a,y,Me,!1,!1,ne,te),Me=!1;var Re=ge.separatorDashArray;Re===null&&(Re=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Re!==null&&(Me=!0,y.js(Re,0)),y.beginPath(),Re=ge.position+ye,x?Re>ne.height&&(ye-=Re-ne.height):Re>ne.width&&(ye-=Re-ne.width),ge=ge.position+ye/2,y.lineWidth=ye,ye=a.yb,x?(ge+=ye.top,Re=ne.width-ye.right,y.moveTo(ye.left,ge),y.lineTo(Re,ge)):(ge+=ye.left,Re=ne.height-ye.bottom,y.moveTo(ge,ye.top),y.lineTo(ge,Re)),y.stroke(),y.Se(),Me&&y.fs()}}}}function Tm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,se=a.naturalBounds,he=a1(a,!0),ge=a1(a,!1),ye=0;ye<te;ye++){var Me=b[ye];if(Me!==void 0&&Me.background!==null&&Me.coversSeparators!==E&&Me.actual!==0){var Re=x?ne.height:ne.width;if(!(Me.position>Re)){var Ve=Me.Wc(),qe=Me.separatorStrokeWidth;isNaN(qe)&&(qe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var it=Me.separatorStroke;it===null&&(it=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(it===null||Me.index===(x?he:ge))&&(qe=0),Ve-=qe,qe=Me.position+qe,Ve+=Me.actual,qe+Ve>Re&&(Ve=Re-qe),0>=Ve||(Re=a.yb,Xo(a,y,Me.background,!0,!1,se,ne),x?y.fillRect(Re.left,qe+Re.top,ne.width-(Re.left+Re.right),Ve):y.fillRect(qe+Re.left,Re.top,Ve,ne.height-(Re.top+Re.bottom)))}}}}function a1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function m0(a){return a==="LineV"||a==="BarV"}Ze.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Ze.kk=function(a,y,x){if(!Ut.prototype.kk.call(this,a,y,x))return!1;if(this.type===wn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,g0(this,a),a.yd=null;else if(this.na===wn.Grid||this.na===wn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},Ze.nk=function(){return!0},Ze.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,te=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var se=y[ne].actualBounds;E=ne===0?se.x:Math.min(se.x,E),te=ne===0?se.y:Math.min(se.y,te)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-te)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Ut.prototype.$o.call(this,a,y,x,b)},Ze.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,se=1/(ne.m11*ne.m22-ne.m12*ne.m21),he=ne.m22*se,ge=-ne.m12*se,ye=-ne.m21*se,Me=ne.m11*se,Re=se*(ne.m21*ne.dy-ne.m22*ne.dx),Ve=se*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Wt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*he+y*ye+Re,se=a*ge+y*Me+Ve,a=x*he+b*ye+Re,he=x*ge+b*Me+Ve,E.h(0,0),x=this.naturalBounds,te=Wt.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,ye=ge=0,Me=1,Ve=Re=0),se=a*he+y*ye+Re,a=a*ge+y*Me+Ve,he=x*he+b*ye+Re,x=x*ge+b*Me+Ve,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),ge=!1,Me=this.O.s,Ve=Me.length,ye=Mt.alloc(),Re=null,y=1/0;var qe=null,it=this.isClipping&&this.na===wn.Spot;it&&(qe=Mt.alloc(),Re=this.Pb(),(ge=Re.Sj(se,a,he,x,qe))&&(y=(se-qe.x)*(se-qe.x)+(a-qe.y)*(a-qe.y)));for(var At=0;At<Ve;At++){var bt=Me[At];bt.visible&&bt!==Re&&bt.Sj(se,a,he,x,ye)&&(ge=!0,bt=(se-ye.x)*(se-ye.x)+(a-ye.y)*(a-ye.y),bt<b&&(b=bt,E.set(ye)))}return it&&(y>b&&E.set(qe),Mt.free(qe)),Mt.free(ye),te&&E.transform(ne),ge},Ze.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Ut.prototype.Gj.call(this)},Ze.v=function(a){if(!tu(this)){Ut.prototype.v.call(this,a),a=null,(this.na===wn.Auto||this.na===wn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var te=dl(E,!1);(E instanceof Js||E instanceof wn||E instanceof Yi||te!==gn)&&E.v(!0)}}}},Ze.Uj=function(){if(!tu(this)){Sa(this,!0),Fh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Ze.Uk=function(){if(!(this.l&2048)){Cu(this,!0),uu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Ze.Wu=function(){uu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Ze.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var se=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,se.width)),isNaN(te.height)||(y=Math.min(te.height,se.height)),a=Math.max(x,a),y=Math.max(b,y);var he=this.yb;a=Math.max(a-he.left-he.right,0),y=Math.max(y-he.top-he.bottom,0);var ge=this.O.s;ge.length!==0&&this.na.measure(this,a,y,ge,E,x,b),a=E.width+he.left+he.right,he=E.height+he.top+he.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(he=te.height),a=Math.min(se.width,a),he=Math.min(se.height,he),a=Math.max(ne.width,a),he=Math.max(ne.height,he),a=Math.max(x,a),he=Math.max(b,he),us(E,a,he),us(this.naturalBounds,a,he),this.Ge(0,0,a,he)},Ze.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 b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function uc(a){return a.part!==null?a.part.locationObject:null}Ze.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=dl(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,se=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=gn),a){case gn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case xn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case er:this.v(!0),this.measure(x+se,te+ne,0,0);break;case hr:this.v(!0),this.measure(y+se,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},Ze.gh=function(a){var y=this.naturalBounds,x=uc(this);if(ma(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Mt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(No(E.set(a),te.transform),te.ca(E)))return Mt.free(E),!0}return Mt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Ze.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},Ze.qm=function(a,y){if(y(this,a),a instanceof wn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function ed(a,y){s1(a,a,y)}function s1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=y[E];te instanceof wn&&s1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof wn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}Ze.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof wn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=u1(a,y[E],x);if(te!==null)return te}}return null}Ze.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=pg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof wn){var te=E.fb(a);if(te!==null)return te}if(E.name===a)return E}return null};function h1(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof wn?x=Math.max(x,h1(E)):E instanceof Or&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Ze.se=function(){return!(this.type===wn.TableRow||this.type===wn.TableColumn)};function Tc(a){return a.type===wn.TableRow||a.type===wn.TableColumn}Ze.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Ys(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:No(Mt.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,ge=5;if(se!==null&&(he=se.Ql("extraTouchArea"),ge=he/2),ma(-(ge*E),-(ge*E),b.width+he*E,b.height+he*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var ye=E.length;if(se=Mt.alloc(),ge=(he=this.isClipping&&this.na===wn.Spot)?this.Pb():null,he&&(ge.se()?No(se.set(a),ge.transform):se.set(a),!ge.ca(se)))return Mt.free(se),te||Mt.free(ne),null;for(var Me=uc(this);ye--;){var Re=E[ye];if((Re.visible||Re===Me)&&(Re.se()?No(se.set(a),Re.transform):se.set(a),!he||Re!==ge)){var Ve=null;if(Re instanceof wn?Ve=Re.ic(se,y,x):Re.pickable===!0&&Re.ca(se)&&(Ve=Re),Ve!==null&&(y!==null&&(Ve=y(Ve)),Ve!==null&&(x===null||x(Ve))))return Mt.free(se),te||Mt.free(ne),Ve}}Mt.free(se)}return this.background===null&&this.areaBackground===null?(te||Mt.free(ne),null):(a=ma(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||Mt.free(ne),a)}return te||Mt.free(ne),null},Ze.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,te=this.se(),ne=te?a:No(Mt.allocAt(a.x,a.y),this.transform);if(E=ma(0,0,E.width,E.height,ne.x,ne.y),Tc(this)||E){if(!this.isAtomic){for(var se=this.O.s,he=se.length,ge=Mt.alloc(),ye=uc(this);he--;){var Me=se[he];if(Me.visible||Me===ye){Me.se()?No(ge.set(a),Me.transform):ge.set(a);var Re=Me;Me=Me instanceof wn?Me:null,(Me!==null?Me.ji(ge,y,x,b):Re.ca(ge))&&Re.pickable!==!1&&(y!==null&&(Re=y(Re)),Re===null||x!==null&&!x(Re)||b.add(Re))}}Mt.free(ge)}return te||Mt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||Mt.free(ne),!1},Ze.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Br.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),te===void 0&&Br.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var se=uc(this),he=this.O.s,ge=he.length;ge--;){var ye=he[ge];if(ye.visible||ye===se){var Me=ye.actualBounds,Re=this.naturalBounds;Me.x>Re.width||Me.y>Re.height||0>Me.x+Me.width||0>Me.y+Me.height||(Me=ye,ye=ye instanceof wn?ye:null,Re=Br.alloc(),Re.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,Re):Na(Me,a,b,Re))&&(y!==null&&(Me=y(Me)),Me===null||x!==null&&!x(Me)||E.add(Me)),Br.free(Re))}}return te===void 0&&Br.free(ne),b}return te===void 0&&Br.free(ne),!1};function v0(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var se=ne.actualBounds,he=a.naturalBounds;se.x>he.width||se.y>he.height||0>se.x+se.width||0>se.y+se.height||(ne instanceof wn&&v0(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}Ze.og=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,se=this.se(),he=se?a:No(Mt.allocAt(a.x,a.y),this.transform),ge=se?y:No(Mt.allocAt(y.x,y.y),this.transform),ye=he.Bf(ge),Me=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||ea(he.x,he.y,0,0,0,ne.height)<=ye||ea(he.x,he.y,0,ne.height,ne.width,ne.height)<=ye||ea(he.x,he.y,ne.width,ne.height,ne.width,0)<=ye||ea(he.x,he.y,ne.width,0,0,0)<=ye;if(ne=he.zd(0,0)<=ye&&he.zd(0,ne.height)<=ye&&he.zd(ne.width,0)<=ye&&he.zd(ne.width,ne.height)<=ye,se||(Mt.free(he),Mt.free(ge)),Me){if(!this.isAtomic){he=Mt.alloc(),ge=Mt.alloc(),ye=uc(this);for(var Re=this.O.s,Ve=Re.length;Ve--;){var qe=Re[Ve];if(qe.visible||qe===ye){var it=qe.actualBounds,At=this.naturalBounds;(!se||!(it.x>At.width||it.y>At.height||0>it.x+it.width||0>it.y+it.height))&&(qe.se()?(it=qe.transform,No(he.set(a),it),No(ge.set(y),it)):(he.set(a),ge.set(y)),it=qe,qe=qe instanceof wn?qe:null,(qe!==null?qe.og(he,ge,x,b,E,te):it.tx(he,ge,E))&&(x!==null&&(it=x(it)),it===null||b!==null&&!b(it)||te.add(it)))}}Mt.free(he),Mt.free(ge)}return E?Me:ne}return!1};function y0(a){var y=null;return a instanceof Or&&(y=a.spot1,y===Ba&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ma),y}function S0(a){var y=null;return a instanceof Or&&(y=a.spot2,y===Ba&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Yl),y}Ze.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},Ze.M=function(a){return this.O.M(a)},Ze.Gb=function(a,y){y instanceof rr&&Zt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Zt("Cannot make a Panel contain itself: "+this.toString()),Zt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Zt("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!==wn.Grid||y instanceof Or||Zt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==wn.Graduated||y instanceof Or||y instanceof Yi||Zt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new Vn),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,se=ne.length,he=0;he<se;he++)if(ne[he]===y){te=he;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else Zt("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),tu(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof wn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Am(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Gn&&(x.Te=!0),x.Te&&x instanceof Gn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(ra,"elements",this,y,null,b,null),x.cb(Zo,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}Ze.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},Ze.mb=function(a){0<=a&&this.pc(a,!0)},Ze.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),Sa(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var te=this.part;te!==null&&(te.Rh=null,te.ag=NaN,te.Wb(),te instanceof Gn&&(b instanceof wn?b.qm(b,function(ne,se){W0(te,se,y)}):W0(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(ra,"elements",this,b,null,a,null))},Ze.Fb=function(a){0>a&&Nr(a,">= 0",wn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new xa;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Zo,"rowdefs",this,null,x,null,a)}return y[a]},Ze.oA=function(a){if(0>a&&Nr(a,">= 0",wn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(ra,"rowdefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof xa?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Ze.Eb=function(a){0>a&&Nr(a,">= 0",wn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new xa;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Zo,"coldefs",this,null,x,null,a)}return y[a]},Ze.jA=function(a){if(0>a&&Nr(a,">= 0",wn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(ra,"coldefs",this,x,null,a,null),this.v()}}};function f1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof xa?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Ze.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Nm(y,a),this},Ze.Hy=function(a,y){return(a=this.Fb(a))&&Nm(a,new xa(y)),this},Ze.By=function(a,y){return(a=this.Eb(a))&&Nm(a,new xa(y)),this},Ze.nz=function(a){if(0>a||this.type!==wn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},Ze.fz=function(a){if(0>a||this.type!==wn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},Ze.Fz=function(a,y){if(y===void 0&&(y=new Mt(NaN,NaN)),this.type!==wn.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)},Ze.Gz=function(a){if(this.type!==wn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function ku(a){var y=a.allBindings;if(y===null)a.data!==null&&Zt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Ln;else if(y._isFrozen)return;var x=new Ln;x0(a,!1),a.qm(a,function(ge,ye){ye.th();var Me=ye.localBindings;if(Me!==null)for(Ld(ye,!1),Me=Me.iterator;Me.next();){var Re=Me.value;Re.mode===Ig&&Ld(ye,!0);var Ve=Re.sourceName;Ve!==null&&(Ve==="/"&&x0(ge,!0),Ve=MS(Re,ge,ye),Ve!==null&&(x.add(Ve),Ve.srcBindings===null&&(Ve.srcBindings=new Ln),Ve.srcBindings.add(Re))),y.add(Re)}if(ye instanceof wn&&ye.type===wn.Table){if(0<ye.rowCount){for(ge=ye.rowDefs,Me=ge.length,Re=0;Re<Me;Re++)if(Ve=ge[Re],Ve!==void 0&&Ve.be!==null)for(var qe=Ve.be.iterator;qe.next();){var it=qe.value;it.xd=Ve,it.to=2,it.wl=Ve.index,y.add(it)}}if(0<ye.columnCount){for(ye=ye.colDefs,ge=ye.length,Me=0;Me<ge;Me++)if(Re=ye[Me],Re!==void 0&&Re.be!==null)for(Ve=Re.be.iterator;Ve.next();)qe=Ve.value,qe.xd=Re,qe.to=1,qe.wl=Re.index,y.add(qe)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Ld(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new Ln),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var se=E.targetProperty,he=se.indexOf(".");0<he&&te instanceof wn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):si('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof xa?(ne=Xt(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof Ut?(ne=Xt(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Zt("Unknown type of binding target: "+te)}y.freeze(),a instanceof rr&&a.Zc()&&a.Va()}Ze.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof wn&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&ku(y),y},Ze.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var te=this,ne=x.Ai;if(ne!==-1){if(te=this.ks(ne),te===null)continue}else x.xd!==null&&(te=x.xd);if(E==="/"?b=te.part:E==="."?b=te:E===".."&&(b=te.panel),E=x.to,E!==0){if(!(te instanceof wn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},Ze.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Sx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,te=null;E<x&&(te=a[E],!(te instanceof wn&&te.data!==null));)E++,te=a[E];if(x-E!==b)return!0;if(te===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(te=a[E],!(te instanceof wn)||te.data!==y[ne])return!0;E++,ne++}return!1}function pg(a){if(a.type===wn.Spot||a.type===wn.Auto)return Math.min(a.O.length,1);if(a.type===wn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Or&&b.isPanelMain))break}return x}return a.type===wn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof wn&&Tc(a))?1:0}Ze.mv=function(){for(var a=pg(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=pg(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 b=0;b<x;b++)Lm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var te=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof wn){if(ne.data!==te){var se=b0(a,ne.data),he=b0(a,te),ge=he!==se;ge||(se=P0(a,se),ge=P0(a,he)!==se),ge?(a.pc(b,!1),Lm(a,te,E,!1)):ne.data=te}}else Lm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,w0(a,x,0),tu(a)||a.v(),a.graduatedIntervals=null,a.If()||Am(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Gn&&(y.Te=!0),y.Te&&y instanceof Gn&&(y.wc=null))}}function Lm(a,y,x,b){if(!(y==null||0>x)){var E=b0(a,y);if(E=P0(a,E),E!==null){if(ku(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&x0(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Vn),a.ge.add(y,E)),te=x+pg(a),a.Gb(te,E),b&&(E.ub=y,w0(a,te,x),E.ub=null),E.data=y}}}function w0(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof wn){var E=y,te=x;b.type===wn.TableRow?b.row=E:b.type===wn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function b0(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=sa(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Zt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function P0(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,si('No item template Panel found for category "'+y+'" on '+a),si(" Using default item template."),a=new wn,y=new Yi,y.bind(new fa("text","",_i)),a.add(y),m1=a),b=m1)),b}function Am(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof wn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof wn&&!te.isEnabled||Am(a,te,x)}}}function vh(a,y){y.name=a,Ru.add(a,y)}hn.Object.defineProperties(wn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===wn.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&&Nr(a,">= 0",wn,"padding"),a=new yr(a)):(0>a.left&&Nr(a.left,">= 0",wn,"padding:value.left"),0>a.right&&Nr(a.right,">= 0",wn,"padding:value.right"),0>a.top&&Nr(a.top,">= 0",wn,"padding:value.top"),0>a.bottom&&Nr(a.bottom,">= 0",wn,"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:Vl},set:function(a){typeof a=="number"&&(a=new yr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new fu),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 Ci)&&(a instanceof Ci&&a.freeze(),this.T===null&&(this.T=new fu),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 fu),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,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Zt("defaultRowSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new fu),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 Ci)&&(a instanceof Ci&&a.freeze(),this.T===null&&(this.T=new fu),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 fu),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,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Zt("defaultColumnSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new fu),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 fu),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||Zt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&es(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()||Zt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&es(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 hc),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),ls(this)&&(a=this.part,a!==null&&so(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 hc),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),ls(this)&&(a=this.part,a!==null&&so(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 hc),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 hc),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 hc,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 hc,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 hc,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 hc,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 fu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new fu),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:jm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new fu),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:jm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new fu),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)&&Zt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new fu),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)&&Zt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new fu),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 rr&&!(this instanceof ai);ku(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof kn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof rr&&(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),b!==null&&b.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 Ad),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new Vn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof rr||a.isPanelMain)&&Zt("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(););Dr(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&&(Dr(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 Er&&(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&&Am(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))}}}),hn.Object.defineProperties(wn,{Position:{get:function(){return Ru.I("Position")}},Horizontal:{get:function(){return Ru.I("Horizontal")}},Vertical:{get:function(){return Ru.I("Vertical")}},Spot:{get:function(){return Ru.I("Spot")}},Auto:{get:function(){return Ru.I("Auto")}},Table:{get:function(){return Ru.I("Table")}},Viewbox:{get:function(){return Ru.I("Viewbox")}},TableRow:{get:function(){return Ru.I("TableRow")}},TableColumn:{get:function(){return Ru.I("TableColumn")}},Link:{get:function(){return Ru.I("Link")}},Grid:{get:function(){return Ru.I("Grid")}},Graduated:{get:function(){return Ru.I("Graduated")}}}),wn.prototype.rebuildItemElements=wn.prototype.mv,wn.prototype.findItemPanelForData=wn.prototype.sx,wn.prototype.updateTargetBindings=wn.prototype.La,wn.prototype.copyTemplate=wn.prototype.Uy,wn.prototype.graduatedValueForPoint=wn.prototype.Gz,wn.prototype.graduatedPointForValue=wn.prototype.Fz,wn.prototype.findColumnForLocalX=wn.prototype.fz,wn.prototype.findRowForLocalY=wn.prototype.nz,wn.prototype.addColumnDefinition=wn.prototype.By,wn.prototype.addRowDefinition=wn.prototype.Hy,wn.prototype.addRowColumnDefinition=wn.prototype.Gy,wn.prototype.removeColumnDefinition=wn.prototype.jA,wn.prototype.getColumnDefinition=wn.prototype.Eb,wn.prototype.removeRowDefinition=wn.prototype.oA,wn.prototype.getRowDefinition=wn.prototype.Fb,wn.prototype.removeAt=wn.prototype.mb,wn.prototype.remove=wn.prototype.remove,wn.prototype.insertAt=wn.prototype.Gb,wn.prototype.elt=wn.prototype.M,wn.prototype.add=wn.prototype.add,wn.prototype.findObject=wn.prototype.fb,wn.prototype.findInVisualTree=wn.prototype.Nl,wn.prototype.walkVisualTreeFrom=wn.prototype.qm,wn.prototype.findMainElement=wn.prototype.Pb;var g1=!1,m1=null,Ru=new Vn;wn.className="Panel",wn.definePanelLayout=vh,vh("Position",new vm),vh("Vertical",new Sm),vh("Auto",new wm),vh("Link",new Mm);function hc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}hc.prototype.copy=function(){var a=new hc;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},hc.className="GradPanelSettings";function fu(){this.Pc=[],this.Oc=[],this.j=this.ob=jm,this.hb=this.Hb=0,this.Qp=Vl,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}fu.prototype.copy=function(a){for(var y=new fu,x=this.Pc,b=x.length,E=y.Pc,te=0;te<b;te++)if(x[te]!==void 0){var ne=x[te].copy();ne.wi(a),E[te]=ne}for(x=this.Oc,b=x.length,E=y.Oc,te=0;te<b;te++)x[te]!==void 0&&(ne=x[te].copy(),ne.wi(a),E[te]=ne);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},fu.className="TablePanelSettings";function xa(a){vo(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Ba,this.pa=this.oc=this.oa=0,this.be=null,this.oo=C0,this.hg=kr,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))}xa.prototype.copy=function(){var a=new xa;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=yi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Nm(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=yi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Ze=xa.prototype,Ze.qb=function(a){a.classType===xa&&(this.sizing=a)},Ze.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Xt(this)},Ze.wi=function(a){this.Me=a},Ze.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)},Ze.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===wn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,te=0;te<E;te++){var ne=b?y.rowDefs[te]:y.colDefs[te];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},Ze.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(wo,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Om(a){if(a.sizing===C0){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Ze.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new fa(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Zt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new Ln),this.be.add(E),this},hn.Object.defineProperties(xa.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&&Nr(a,">= 0",xa,"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&&Nr(a,">= 0",xa,"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))&&Nr(a,">= 0",xa,"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&&Nr(a,">= 0",xa,"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 yr(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&&Od(a,"RowColumnDefinition.separatorStroke"),a instanceof Ci&&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,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Zt("separatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===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&&Od(a,"RowColumnDefinition.background"),a instanceof Ci&&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}}}),xa.prototype.computeEffectiveSpacing=xa.prototype.Wc,xa.prototype.computeEffectiveSpacingTop=xa.prototype.Io;var C0=new tn(xa,"Default",0),gg=new tn(xa,"None",1),jm=new tn(xa,"ProportionalExtra",2);xa.className="RowColumnDefinition",xa.Default=C0,xa.None=gg,xa.ProportionalExtra=jm;function Or(a,y){Ut.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)}Kt(Or,Ut),Or.prototype.cloneProtected=function(a){Ut.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=yi(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 td(a){a.Na===null?a.Na=new M0:a.Na.nc&&(a.Na=a.Na.copy())}Ze=Or.prototype,Ze.th=function(){Ut.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Ze.qb=function(a){a===gn||a===Jn||a===Yr||a===kr?this.geometryStretch=a:Ut.prototype.qb.call(this,a)},Ze.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Xt(this)};function yp(a,y,x,b){var E=x.length;if(!(4>E)){var te=b.measuredBounds,ne=Math.max(1,te.width);te=te.height;for(var se=x[0],he=x[1],ge,ye,Me,Re,Ve,qe,it=0,At=xr(),bt=2;bt<E;bt+=2)ge=x[bt],ye=x[bt+1],Me=ge-se,se=ye-he,Me===0&&(Me=.001),Re=se/Me,Ve=Math.atan2(se,Me),qe=Math.sqrt(Me*Me+se*se),At.push([Me,Ve,Re,qe]),it+=qe,se=ge,he=ye;se=x[0],he=x[1],Me=b.measuredBounds.width,b instanceof Or&&(Me-=b.strokeWidth),1>Me&&(Me=1),E=x=Me,ge=ne/2,ye=ge!==0,bt=0,qe=At[bt],Me=qe[0],Ve=qe[1],Re=qe[2],qe=qe[3];for(var Ot=0;.1<=it;){if(Ot===0&&(ye?(E=x,E-=ge,it-=ge,ye=!1):E=x,E===0&&(E=1)),E>it){gr(At);return}E>qe?(Ot=E-qe,E=qe):Ot=0;var Ft=Math.sqrt(E*E/(1+Re*Re));if(0>Me&&(Ft=-Ft),se+=Ft,he+=Re*Ft,a.translate(se,he),a.rotate(Ve),a.translate(-(ne/2),-(te/2)),Ot===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Ve),a.translate(-se,-he),it-=E,qe-=E,Ot!==0){if(bt++,bt===At.length){gr(At);return}qe=At[bt],Me=qe[0],Ve=qe[1],Re=qe[2],qe=qe[3],E=Ot}}gr(At)}}Ze.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var te=this.actualBounds,ne=this.naturalBounds;b!==null&&Xo(this,a,b,!0,!1,ne,te);var se=this.part,he=this.ig;if(x===null||he!==0||se===null||!this.isPanelMain&&se.Pb()!==this||(he=se.type===wn.Link&&se instanceof ai&&se.category==="Selection"&&se.adornedObject instanceof Or&&se.adornedPart.Pb()===se.adornedObject?se.adornedObject.strokeWidth:0),he===0&&(x=null),x!==null&&he!==0&&(Xo(this,a,x,!1,!1,ne,te),a.lineWidth=he,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,se&&y.Gf("drawShadows")&&(te=se.isShadowed),a.Il===!1&&(te=!1),se=!0,x===null||b!==null&&b!=="transparent"||(se=!1),ne=!1,he=this.strokeDashArray,he!==null&&(ne=!0,a.js(he,this.strokeDashOffset)),E.type===An.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===An.u){var ge=E.startX;he=E.startY;var ye=E.endX,Me=E.endY;E=Math.min(ge,ye);var Re=Math.min(he,Me);ge=Math.abs(ye-ge),he=Math.abs(Me-he),a.beginPath(),a.rect(E,Re,ge,he),b!==null&&a.ng(b),x!==null&&(se&&te&&Dh(a),a.jk(),se&&te&&ac(a)),a.Se()}else if(E.type===An.F)ge=E.startX,he=E.startY,ye=E.endX,Me=E.endY,E=Math.abs(ye-ge)/2,Re=Math.abs(Me-he)/2,ge=Math.min(ge,ye)+E,he=Math.min(he,Me)+Re,a.beginPath(),a.moveTo(ge,he-Re),a.bezierCurveTo(ge+Wt.wg*E,he-Re,ge+E,he-Wt.wg*Re,ge+E,he),a.bezierCurveTo(ge+E,he+Wt.wg*Re,ge+Wt.wg*E,he+Re,ge,he+Re),a.bezierCurveTo(ge-Wt.wg*E,he+Re,ge-E,he+Wt.wg*Re,ge-E,he),a.bezierCurveTo(ge-E,he-Wt.wg*Re,ge-Wt.wg*E,he-Re,ge,he-Re),a.closePath(),b!==null&&a.ng(b),x!==null&&(se&&te&&Dh(a),a.jk(),se&&te&&ac(a)),a.Se();else if(E.type===An.o)for(E=E.figures,he=E.length,Re=0;Re<he;Re++){ge=E.s[Re],a.beginPath(),a.moveTo(ge.startX,ge.startY),ye=ge.segments.s,Me=ye.length;for(var Ve=null,qe=0;qe<Me;qe++){var it=ye[qe];switch(it.type){case Ca:a.moveTo(it.endX,it.endY);break;case Wi:a.lineTo(it.endX,it.endY);break;case Za:a.bezierCurveTo(it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY);break;case wl:a.quadraticCurveTo(it.point1X,it.point1Y,it.endX,it.endY);break;case $o:if(it.radiusX===it.radiusY){var At=Math.PI/180;a.arc(it.point1X,it.point1Y,it.radiusX,it.startAngle*At,(it.startAngle+it.sweepAngle)*At,0>it.sweepAngle,Ve!==null?Ve.endX:ge.startX,Ve!==null?Ve.endY:ge.startY)}else if(Ve=Us(it,ge),At=Ve.length,At===0)a.lineTo(it.centerX,it.centerY);else for(var bt=0;bt<At;bt++){var Ot=Ve[bt];bt===0&&a.lineTo(Ot[0],Ot[1]),a.bezierCurveTo(Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7])}break;case sl:if(bt=At=0,Ve!==null&&Ve.type===$o){if(Ve=Us(Ve,ge),Ot=Ve.length,Ot===0){a.lineTo(it.endX,it.endY);break}Ve=Ve[Ot-1]||null,Ve!==null&&(At=Ve[6],bt=Ve[7])}else At=Ve!==null?Ve.endX:ge.startX,bt=Ve!==null?Ve.endY:ge.startY;if(Ve=Os(it,ge,At,bt),At=Ve.length,At===0){a.lineTo(it.endX,it.endY);break}for(bt=0;bt<At;bt++)Ot=Ve[bt],a.bezierCurveTo(Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7]);break;default:Zt("Segment not of valid type: "+it.type)}it.isClosed&&a.closePath(),Ve=it}ye=ge.isFilled,te?ge.isShadowed?(ye===!0&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&(ye&&se&&Dh(a),a.jk(),ye&&se&&ac(a))):(Dh(a),ye&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk(),ac(a)):(ye&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk()),a.Se(Re)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),te=this.geometry,a.save(),a.beginPath(),b=xr(),te.type===An.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),yp(a,y,b,x);else if(te.type===An.o)for(te=te.figures.iterator;te.next();){for(se=te.value,b.length=0,b.push(se.startX),b.push(se.startY),ne=se.startX,E=se.startY,he=ne,Re=E,ge=se.segments.s,ye=ge.length,Me=0;Me<ye;Me++){switch(qe=ge[Me],qe.type){case Ca:yp(a,y,b,x),b.length=0,b.push(qe.endX),b.push(qe.endY),ne=qe.endX,E=qe.endY,he=ne,Re=E;break;case Wi:b.push(qe.endX),b.push(qe.endY),ne=qe.endX,E=qe.endY;break;case Za:Wt.Qe(ne,E,qe.point1X,qe.point1Y,qe.point2X,qe.point2Y,qe.endX,qe.endY,.5,b),ne=qe.endX,E=qe.endY;break;case wl:Wt.ep(ne,E,qe.point1X,qe.point1Y,qe.endX,qe.endY,.5,b),ne=qe.endX,E=qe.endY;break;case $o:if(it=Us(qe,se),Ve=it.length,Ve===0){b.push(qe.centerX),b.push(qe.centerY),ne=qe.centerX,E=qe.centerY;break}for(At=0;At<Ve;At++)bt=it[At],Wt.Qe(ne,E,bt[2],bt[3],bt[4],bt[5],bt[6],bt[7],.5,b),ne=bt[6],E=bt[7];break;case sl:if(it=Os(qe,se,ne,E),Ve=it.length,Ve===0){b.push(qe.endX),b.push(qe.endY),ne=qe.endX,E=qe.endY;break}for(At=0;At<Ve;At++)bt=it[At],Wt.Qe(ne,E,bt[2],bt[3],bt[4],bt[5],bt[6],bt[7],.5,b),ne=bt[6],E=bt[7];break;default:Zt("Segment not of valid type: "+qe.type)}qe.isClosed&&(b.push(he),b.push(Re),yp(a,y,b,x))}yp(a,y,b,x)}else if(te.type===An.u)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.startY),b.push(te.endX),b.push(te.endY),b.push(te.startX),b.push(te.endY),b.push(te.startX),b.push(te.startY),yp(a,y,b,x);else if(te.type===An.F){if(E=new Pa,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new ni($o),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(te.startX+te.endX)/2,ne.centerY=(te.startY+te.endY)/2,ne.radiusX=Math.abs(te.startX-te.endX)/2,ne.radiusY=Math.abs(te.startY-te.endY)/2,E.add(ne),te=Us(ne,E),se=te.length,se===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,he=0;he<se;he++)Re=te[he],Wt.Qe(ne,E,Re[2],Re[3],Re[4],Re[5],Re[6],Re[7],.5,b),ne=Re[6],E=Re[7];yp(a,y,b,x)}gr(b),a.restore(),a.Vc(!1)}}}},Ze.kk=function(a,y,x){return!Ut.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)},Ze.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Ut.prototype.nk.call(this,a)},Ze.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)}},Ze.ga=function(a,y){if(y===void 0&&(y=new Mt),a instanceof nr){a.Mc()&&Zt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Ze.mi=function(a){a===void 0&&(a=new rn);var y=this.naturalBounds,x=this.oe;y=rn.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Mt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),xo(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),xo(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),xo(a,b.x,b.y,0,0),rn.free(y),Mt.free(b),a},Ze.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==An.j||y||(E+=2);var te=rn.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return rn.free(te),!1;if(b=E+1e-4,x.type===An.j)return this.stroke===null||(b=(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>b)?!1:(rn.free(te),Wt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===An.u){y=x.startX;var ne=x.startY,se=x.endX;if(x=x.endY,te.x=Math.min(y,se),te.y=Math.min(ne,x),te.width=Math.abs(se-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return rn.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),rn.free(te),a}if(x.type===An.F){ne=x.startX,E=x.startY,se=x.endX;var he=x.endY;if(x=Math.min(ne,se),y=Math.min(E,he),ne=Math.abs(se-ne)/2,E=Math.abs(he-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return rn.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),rn.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===An.o)return rn.free(te),this.fill===null?Ou(x,a.x,a.y,E):sh(x,a,E,1<this.strokeWidth,y);Zt("Unknown Geometry type: "+x.type)},Ze.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var se=this.figure,he=k0[se];if(he===void 0){var ge=Wt.Ze[se];typeof ge=="string"&&(ge=Wt.Ze[ge]),typeof ge=="function"?(he=ge(null,100,100),k0[se]=he):Zt("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,ge=ne.width;var ye=ne.height;switch(dl(this,!0)){case gn:b=x=0;break;case xn:ge=Math.max(a-te,0),ye=Math.max(y-te,0);break;case er:ge=Math.max(a-te,0),b=0;break;case hr:x=0,ye=Math.max(y-te,0)}isFinite(E.width)&&(ge=E.width),isFinite(E.height)&&(ye=E.height);var Me=this.maxSize,Re=this.minSize;switch(x=Math.max(x-te,Re.width),b=Math.max(b-te,Re.height),ge=Math.min(Me.width,ge),ye=Math.min(Me.height,ye),ge=isFinite(ge)?Math.max(x,ge):Math.max(se,x),ye=isFinite(ye)?Math.max(b,ye):Math.max(he,b),x=E0(this),x){case gn:break;case xn:se=ge,he=ye;break;case Jn:x=Math.min(ge/se,ye/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:Zt(x+" is not a valid geometryStretch.")}this.Rd!==null?(se===0&&(se=.001),he===0&&(he=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=se/ne.width,ne=he/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&Wt.$(this.ua.Sk,a-te)&&Wt.$(this.ua.Rk,y-te)||(this.ua=Or.makeGeometry(this,se,he)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-te/2,ne.y-te/2,a===0&&se===0?0:ne.width+te,y===0&&he===0?0:ne.height+te):this.Ge(-(te/2),-(te/2),ge+te,ye+te),E.w()?(ge=E.width,ye=E.height,ge=Math.min(Me.width,ge),ye=Math.min(Me.height,ye),ge=Math.max(Re.width,ge),ye=Math.max(Re.height,ye),this.dc.h(0,0,ge,ye)):this.dc.assign(ne)};function E0(a){var y=a.geometryStretch;return a.Rd!==null?y===kr?xn:y:y===kr?k0[a.figure].defaultStretch:y}Ze.eh=function(a,y,x,b){Ds(this,a,y,x,b)},Ze.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ze.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,ge=-te.m21*ne,ye=te.m11*ne,Me=ne*(te.m21*te.dy-te.m22*te.dx),Re=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*ge+Me,ne=a*he+y*ye+Re,se=x*se+b*ge+Me,he=x*he+b*ye+Re,Me=this.ig/2,ge=this.ua,ge===null&&(this.measure(1/0,1/0),ge=this.ua);var Ve=ge.bounds;if(ye=!1,ge.type===An.j)if(1.5>=this.strokeWidth)ye=Wt.Ve(ge.startX,ge.startY,ge.endX,ge.endY,te,ne,se,he,E);else{if(ge.startX===ge.endX?(b=Me,ye=0):(y=(ge.endY-ge.startY)/(ge.endX-ge.startX),ye=Me/Math.sqrt(1+y*y),b=ye*y),y=xr(),a=new Mt,Wt.Ve(ge.startX+b,ge.startY+ye,ge.endX+b,ge.endY+ye,te,ne,se,he,a)&&y.push(a),a=new Mt,Wt.Ve(ge.startX-b,ge.startY-ye,ge.endX-b,ge.endY-ye,te,ne,se,he,a)&&y.push(a),a=new Mt,Wt.Ve(ge.startX+b,ge.startY+ye,ge.startX-b,ge.startY-ye,te,ne,se,he,a)&&y.push(a),a=new Mt,Wt.Ve(ge.endX+b,ge.endY+ye,ge.endX-b,ge.endY-ye,te,ne,se,he,a)&&y.push(a),se=y.length,se===0)return gr(y),!1;for(ye=!0,he=1/0,b=0;b<se;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<he&&(he=x,E.x=a.x,E.y=a.y);gr(y)}else if(ge.type===An.u)ye=Wt.Ff(Ve.x-Me,Ve.y-Me,Ve.x+Ve.width+Me,Ve.y+Ve.height+Me,te,ne,se,he,E);else if(ge.type===An.F){y=rn.allocAt(Ve.x,Ve.y,Ve.width,Ve.height).Bc(Me,Me);e:if(y.width===0)ye=Wt.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)ye=Wt.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,se,he,E);else{if(a=y.width/2,ge=y.height/2,b=y.x+a,ye=y.y+ge,x=9999,te!==se&&(x=(ne-he)/(te-se)),9999>Math.abs(x)){if(he=ne-ye-x*(te-b),0>a*a*x*x+ge*ge-he*he){E.x=NaN,E.y=NaN,ye=!1;break e}Me=Math.sqrt(a*a*x*x+ge*ge-he*he),se=(-(a*a*x*he)+a*ge*Me)/(ge*ge+a*a*x*x)+b,a=(-(a*a*x*he)-a*ge*Me)/(ge*ge+a*a*x*x)+b,ge=x*(se-b)+he+ye,he=x*(a-b)+he+ye,Math.abs((te-se)*(te-se))+Math.abs((ne-ge)*(ne-ge))<Math.abs((te-a)*(te-a))+Math.abs((ne-he)*(ne-he))?(E.x=se,E.y=ge):(E.x=a,E.y=he)}else{if(se=ge*ge,he=te-b,se-=se/(a*a)*he*he,0>se){E.x=NaN,E.y=NaN,ye=!1;break e}he=Math.sqrt(se),se=ye+he,he=ye-he,Math.abs(se-ne)<Math.abs(he-ne)?(E.x=te,E.y=se):(E.x=te,E.y=he)}ye=!0}rn.free(y)}else if(ge.type===An.o){Re=Mt.alloc();var qe=se-te,it=he-ne,At=qe*qe+it*it,bt=te,Ot=ne;if(0<At&&Ve.contains(bt,Ot)&&(Re.x=bt,Re.y=Ot,this.ca(Re)))for(qe!==0&&.5>Math.abs(qe)?(it*=.5/qe,qe=.5):it!==0&&.5>Math.abs(it)&&(qe*=.5/it,it=.5),bt-=qe,Ot-=it;Ve.contains(bt,Ot);)bt-=qe,Ot-=it;for(E.x=se,E.y=he,it=0;it<ge.figures.count;it++){var Ft=ge.figures.s[it],It=Ft.isFilled?bt:te,Gt=Ft.isFilled?Ot:ne,Yt=Ft.segments;Ve=Ft.startX,qe=Ft.startY;for(var Bn=Ve,Zn=qe,Hn=0;Hn<Yt.count;Hn++){var En=Yt.s[Hn],fn=En.type,Cr=En.endX,Sr=En.endY,hi=!1;switch(fn){case Ca:Bn=Cr,Zn=Sr;break;case Wi:hi=Dm(Ve,qe,Cr,Sr,It,Gt,se,he,Re);break;case Za:hi=Wt.Eo(Ve,qe,En.point1X,En.point1Y,En.point2X,En.point2Y,Cr,Sr,It,Gt,se,he,.6,Re);break;case wl:hi=Wt.Eo(Ve,qe,Ve+2/3*(En.point1X-Ve),qe+2/3*(En.point1Y-qe),Cr+2/3*(En.point1X-Cr),Sr+2/3*(En.point1Y-Sr),Cr,Sr,It,Gt,se,he,.6,Re);break;case $o:case sl:fn=En.type===$o?Us(En,Ft):Os(En,Ft,Ve,qe);var Xi=fn.length;if(Xi===0){hi=Dm(Ve,qe,En.type===$o?En.centerX:En.endX,En.type===$o?En.centerY:En.endY,It,Gt,se,he,Re);break}for(Sr=null,Cr=0;Cr<Xi;Cr++){if(Sr=fn[Cr],Cr===0&&Dm(Ve,qe,Sr[0],Sr[1],It,Gt,se,he,Re)){var Oa=Fm(It,Gt,Re,At,E);Oa<At&&(At=Oa,ye=!0)}Wt.Eo(Sr[0],Sr[1],Sr[2],Sr[3],Sr[4],Sr[5],Sr[6],Sr[7],It,Gt,se,he,.6,Re)&&(Oa=Fm(It,Gt,Re,At,E),Oa<At&&(At=Oa,ye=!0))}Cr=Sr[6],Sr=Sr[7];break;default:Zt("Unknown Segment type: "+fn)}Ve=Cr,qe=Sr,hi&&(hi=Fm(It,Gt,Re,At,E),hi<At&&(At=hi,ye=!0)),En.isClosed&&(Cr=Bn,Sr=Zn,Dm(Ve,qe,Cr,Sr,It,Gt,se,he,Re)&&(En=Fm(It,Gt,Re,At,E),En<At&&(At=En,ye=!0)))}}te=x-a,ne=b-y,se=Math.sqrt(te*te+ne*ne),se!==0&&(te/=se,ne/=se),E.x-=te*Me,E.y-=ne*Me,Mt.free(Re)}else Zt("Unknown Geometry type: "+ge.type);return ye?(this.transform.Ga(E),!0):!1};function Fm(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Dm(a,y,x,b,E,te,ne,se,he){if(Wt.$(a,x)&&Wt.$(y,b)||Wt.$(E,ne)&&Wt.$(te,se))return!1;var ge=!1,ye=(E-ne)*(y-b)-(te-se)*(a-x);return ye===0?!1:(he.x=((E*se-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/ye,he.y=((E*se-te*ne)*(y-b)-(te-se)*(a*b-y*x))/ye,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(he.y>a||Wt.$(he.y,a))&&(he.y<y||Wt.$(he.y,y))&&(ge=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||Wt.$(he.x,y))&&(he.x<a||Wt.$(he.x,a))&&(ge=!0)),ge)}Ze.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 b=this.strokeWidth/2,E=!1,te=Mt.alloc();return te.h(x.x-b,x.y-b),a.ca(y.Ga(te))&&(te.h(x.x-b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.y-b),a.ca(y.Ga(te))&&(E=!0)))),Mt.free(te),E},Ze.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Br.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=Mt.alloc();if(ne.h(b,te),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,te),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0)))return Mt.free(ne),!0;var se=Mt.alloc(),he=Mt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),se.x=E,se.y=te,se.transform(x),ne.x=b,ne.y=te,ne.transform(x),y=!1,nd(this,ne,se,he)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),nd(this,ne,se,he)?y=!0:(se.x=b,se.y=a,se.transform(x),nd(this,ne,se,he)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),nd(this,ne,se,he)&&(y=!0)))),Mt.free(ne),Br.free(x),Mt.free(se),Mt.free(he),y};function nd(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,te=x.y;return x=b.x,b=b.y,a===E?(y<te?(a=y,y=te):a=te,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}Ze.tx=function(a,y,x){function b(At,bt){for(var Ot=At.length,Ft=0;Ft<Ot;Ft+=2)if(bt.zd(At[Ft],At[Ft+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),te=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,se=ne.x,he=ne.y,ge=ne.x+ne.width;if(ne=ne.y+ne.height,zr(a.x,a.y,se,he)<=E&&zr(a.x,a.y,ge,he)<=E&&zr(a.x,a.y,se,ne)<=E&&zr(a.x,a.y,ge,ne)<=E)return!0}if(se=y.startX,he=y.startY,ge=y.endX,ne=y.endY,y.type===An.j){if(x=(se-ge)*(a.x-ge)+(he-ne)*(a.y-ne),ea(a.x,a.y,se,he,ge,ne)<=(0<=(ge-se)*(a.x-se)+(ne-he)*(a.y-he)&&0<=x?E:te))return!0}else{if(y.type===An.u)return y=!1,x&&(y=ea(a.x,a.y,se,he,se,ne)<=E||ea(a.x,a.y,se,he,ge,he)<=E||ea(a.x,a.y,ge,he,ge,ne)<=E||ea(a.x,a.y,se,ne,ge,ne)<=E),y;if(y.type===An.F){y=a.x-(se+ge)/2,te=a.y-(he+ne)/2;var ye=Math.abs(ge-se)/2,Me=Math.abs(ne-he)/2;if(ye===0||Me===0)return ea(a.x,a.y,se,he,ge,ne)<=E;if(x){if(a=Wt.$y(ye,Me,y,te),a*a<=E)return!0}else return!(zr(y,te,-ye,0)>=E||zr(y,te,0,-Me)>=E||zr(y,te,0,Me)>=E||zr(y,te,ye,0)>=E)}else if(y.type===An.o){if(ge=y.bounds,te=ge.x,se=ge.y,he=ge.x+ge.width,ge=ge.y+ge.height,a.x>he&&a.x<te&&a.y>ge&&a.y<se&&ea(a.x,a.y,te,se,te,ge)>E&&ea(a.x,a.y,te,se,he,se)>E&&ea(a.x,a.y,he,ge,te,ge)>E&&ea(a.x,a.y,he,ge,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?Ou(y,a.x,a.y,te):sh(y,a,te,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(te=x.s[y],ne=te.startX,ye=te.startY,a.zd(ne,ye)>E)return!1;for(se=te.segments.s,he=se.length,ge=0;ge<he;ge++)switch(Me=se[ge],Me.type){case Ca:case Wi:if(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E)return!1;break;case Za:var Re=xr();if(Wt.Qe(ne,ye,Me.point1X,Me.point1Y,Me.point2X,Me.point2Y,Me.endX,Me.endY,.8,Re),ne=b(Re,a),gr(Re),ne||(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E))return!1;break;case wl:if(Re=xr(),Wt.ep(ne,ye,Me.point1X,Me.point1Y,Me.endX,Me.endY,.8,Re),ne=b(Re,a),gr(Re),ne||(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E))return!1;break;case $o:case sl:Re=Me.type===$o?Us(Me,te):Os(Me,te,ne,ye);var Ve=Re.length;if(Ve===0){if(ne=Me.type===$o?Me.centerX:Me.endX,ye=Me.type===$o?Me.centerY:Me.endY,a.zd(ne,ye)>E)return!1;break}Me=null;for(var qe=xr(),it=0;it<Ve;it++)if(Me=Re[it],qe.length=0,Wt.Qe(Me[0],Me[1],Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.8,qe),b(qe,a))return gr(qe),!1;gr(qe),Me!==null&&(ne=Me[6],ye=Me[7]);break;default:Zt("Unknown Segment type: "+Me.type)}}return!0}}}return!1},Ze.qc=function(){this.ua=null},Ze.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Cg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=is):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new nr(1-is.x,is.y)))}Or.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Bh[a.toArrow];else a.fromArrow!=="None"?b=Bh[a.fromArrow]:(b=Wt.Ze[a.figure],typeof b=="string"&&(b=Wt.Ze[b]),b===void 0&&Zt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Wt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=Bh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Bh[x],y===void 0){var b=null,E;for(E in Wt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=An.parse(Wt.um[b],!1),Bh[b]=a,x!==b&&(Bh[x]=b),b}}return typeof y=="string"?y:y instanceof An?a:null}hn.Object.defineProperties(Or.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 b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),ls(this)&&(a=this.part,a!==null&&so(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=An.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Mt.allocAt(-y.x,-y.y),Mt.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&&Od(a,"Shape.fill"),a instanceof Ci&&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&&Od(a,"Shape.stroke"),a instanceof Ci&&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 Nr(a,"value >= 0",Or,"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"?Nr(a,'"butt", "round", or "square"',Or,"strokeCap"):(td(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"?Nr(a,'"miter", "bevel", or "round"',Or,"strokeJoin"):(td(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){td(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,b=0,E=0;E<x;E++){var te=a[E];0<=te&&isFinite(te)||Zt("strokeDashArray:value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===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&&(td(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=Wt.Ze[a];typeof x=="function"?x=a:(x=Wt.Ze[a.toLowerCase()])||Zt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Zt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new af),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Zt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new af),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Ba},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),td(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Ba},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),td(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&&(td(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:kr},set:function(a){var y=this.geometryStretch;y!==a&&(td(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 Rh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&es(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 Rh),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 Rh),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 Rh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Or.prototype.intersectsRect=Or.prototype.Yc,Or.prototype.containedInRect=Or.prototype.fh,Or.prototype.getNearestIntersectionPoint=Or.prototype.rs,Or.prototype.getDocumentBounds=Or.prototype.mi,Or.prototype.getDocumentPoint=Or.prototype.ga;var Bh=new jr,k0=new jr;Or.className="Shape",Or.getFigureGenerators=function(){var a=new Vn,y;for(y in Wt.Ze)y!==y.toLowerCase()&&a.add(y,Wt.Ze[y]);return a.freeze(),a},Or.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Wt.Ze;b[a]=y,b[x]=a},Or.getArrowheadGeometries=function(){var a=new Vn;for(b in Wt.um)if(Bh[b]===void 0){var y=An.parse(Wt.um[b],!1);Bh[b]=y,y=b.toLowerCase(),y!==b&&(Bh[y]=b)}for(var x in Bh)if(x!==x.toLowerCase()){var b=Bh[x];b instanceof An&&a.add(x,b)}return a.freeze(),a},Or.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=An.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Zt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Bh;b[a]=x,b[y]=a};function M0(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=kr,this.gg=this.fg=Ba}M0.prototype.copy=function(){var a=new M0;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 Yi(a,y){return Ut.call(this),Gm||(pl=Ko?new Eu(null).context:null,Gm=!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}Kt(Yi,Ut),Yi.prototype.cloneProtected=function(a){Ut.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 yh(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}Ze=Yi.prototype,Ze.th=function(){Ut.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Ze.qb=function(a){a.classType===Yi?this.wrap=a:Ut.prototype.qb.call(this,a)},Ze.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Ze.v=function(){Ut.prototype.v.call(this)},Ze.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,te=x.height,ne=vg(this),se=a.textAlign=this.textAlign,he=y.tn;se==="start"?se=he?"right":"left":se==="end"&&(se=he?"left":"right"),he=this.isUnderline;var ge=this.isStrikethrough;Xo(this,a,this.xc,!0,!1,x,b),(he||ge)&&Xo(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ye=this.oe,Me=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var Re=y.scale;switch(8>(Me*Me+ye*ye)*Re*Re&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Bl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Me=this.spacingBelow,this.flip){case ri:a.translate(E,0),a.scale(-1,1);break;case Rr:a.translate(0,te),a.scale(1,-1);break;case ji:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),ye=this.Gc,Re=(y+ne+Me)*ye,te>Re&&(b=this.verticalAlignment,b=b.y*te-b.y*Re+b.offsetY),ye===1&&this.ze!==null)Me=this.Cb,Me>E&&(Me=E),this.Oj(this.ze,a,0,b+y,E,ne,Me,x,se,he,ge);else if(this.Qc!==null&&this.Qb!==null)for(Re=0;Re<ye;Re++){var Ve=this.Qc[Re];Ve>E&&(Ve=E),b+=y,this.Oj(this.Qb[Re],a,0,b,E,ne,Ve,x,se,he,ge),b+=ne+Me}switch(this.flip){case ri:a.scale(-1,1),a.translate(-E,0);break;case Rr:a.scale(1,-1),a.translate(0,-te);break;case ji:a.scale(-1,-1),a.translate(-E,-te)}}},Ze.Oj=function(a,y,x,b,E,te,ne,se,he,ge,ye){var Me=0;if(se)he==="left"?Me=0:he==="right"?Me=E-ne:he==="center"&&(Me=(E-ne)/2),y.fillRect(x+Me,b+.25*te,ne,1);else{if(he==="left"?Me=0:he==="right"?Me=E:he==="center"&&(Me=E/2),E=Im!==null?Im(this,te):.75*te,y.fillText(a,x+Me,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Me-=ne:he==="center"&&(Me-=ne/2),ge){se=Bm!==null?Bm(this,te):.8*te,he=x+Me,ge=b+se,E=x+Me+ne,se=b+se;var Re=a;y.beginPath(),y.lineWidth=Re,y.moveTo(he,ge),y.lineTo(E,se),y.stroke(),y.Se(),y instanceof Bl&&y.ad.classList.add("gojs-td")}ye&&(ye=b+te-te/2.2|0,a%2!==0&&(ye+=.5),b=x+Me,te=ye,x=x+Me+ne,ne=ye,Me=a,y.beginPath(),y.lineWidth=Me,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Bl&&y.ad.classList.add("gojs-td"))}},Ze.kk=function(a,y,x){if(!Ut.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++)$y(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,$y(a,y,!0);return!0},Ze.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Ut.prototype.nk.call(this,a)},Ze.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)}},Ze.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;pl!==null&&k1!==te&&(k1=pl.font=te),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(te=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),te.length===0)te=8;else if(this.isMultiline){for(var se=ne=0,he=!1;!he;){var ge=te.indexOf(`
`,se);ge===-1&&(ge=te.length,he=!0),se=te.substr(se,ge-se),this.formatting===yg&&(se=se.trim()),ne=Math.max(ne,_u(se)),se=ge+1}te=ne}else ne=te.indexOf(`
`,0),0<=ne&&(te=te.substr(0,ne)),te=_u(te);te=Math.min(te,a/this.scale)}else te=this.desiredSize.width;if(this.panel!==null&&(te=Math.min(te,this.panel.maxSize.width)),ne=w1(this,te),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,he=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Rm&&(y=this.Ae,y=this.overflow===Rm?x1(y):0,ge=this.spacingAbove+this.spacingBelow,ge=Math.max(0,vg(this)+ge),he=Math.min(this.maxLines-1,Math.max(Math.floor(he/ge+.01)-1,0)),!(he+1>=this.Qb.length))){for(this.l|=16777216,ge=this.Qb[he],y=Math.max(1,a-y);_u(ge)>y&&1<ge.length;)ge=ge.substr(0,ge.length-1);ge+=Sg,y=_u(ge),this.Qb[he]=ge,this.Qb=this.Qb.slice(0,he+1),this.Qc[he]=y,this.Qc=this.Qc.slice(0,he+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===b1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),us(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Ze.eh=function(a,y,x,b){Ds(this,a,y,x,b)};function mg(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 T0(a,y,x,b){var E=a.formatting===yg;E&&(y=y.trim());var te=0,ne=a.Ae,se=a.spacingAbove+a.spacingBelow;se=Math.max(0,vg(a)+se);var he=a.overflow===Rm?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,se);else if(ne=y,a.wrap===L0){a.Le=1;var ge=_u(y);if(he===0||ge<=x)a.Cb=Math.max(a.Cb,ge),mg(a,y,a.Cb),b!==null&&b.h(ge,se);else{for(te=Sp(a,ne),ne=ne.substr(te.length),y=Sp(a,ne),ge=_u(te+y);0<y.length&&ge<=x;)te+=y,ne=ne.substr(y.length),y=Sp(a,ne),ge=te+y,E&&(ge=ge.trim()),ge=_u(ge);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);_u(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=Sg;var ye=_u(te);a.Cb=ye,mg(a,te,ye),b!==null&&b.h(ye,se)}}else{for(he=0,ne.length===0&&(he=1,mg(a,ne,0));0<ne.length;){for(y=Sp(a,ne),ne=ne.substr(y.length);_u(y)>x;){var Me=1;for(ge=_u(y.substr(0,Me)),ye=0;ge<=x;)Me++,ye=ge,ge=_u(y.substr(0,Me));if(Me===1){var Re=ge;te=Math.max(te,ge)}else Re=ye,te=Math.max(te,ye);if(Me--,1>Me&&(Me=1),mg(a,y.substr(0,Me),Re),he++,y=y.substr(Me),a.Gc+he>a.maxLines)break}for(ye=Sp(a,ne),ge=_u(y+ye);0<ye.length&&ge<=x;)y+=ye,ne=ne.substr(ye.length),ye=Sp(a,ne),ge=y+ye,E&&(ge=ge.trim()),ge=_u(ge);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ye.length===0?(Me=ge,te=Math.max(te,ge)):(Me=ye=_u(y),te=Math.max(te,ye)),mg(a,y,Me),he++,a.Gc+he>a.maxLines))break}a.Le=Math.min(a.maxLines,he),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,se*a.Le)}}function Sp(a,y){if(a.wrap===P1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===C1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function _u(a){return pl===null?8*a.length:pl.measureText(a).width}function vg(a){if(a.df!==null)return a.df;var y=a.Ae;if(pl===null){var x=16;return a.df=x}return O0[y]!==void 0&&5e3>E1?x=O0[y]:(x=1.3*pl.measureText("M").width,O0[y]=x,E1++),a.df=x}function x1(a){if(pl===null)return 6;if(_m[a]!==void 0&&5e3>j0)var y=_m[a];else y=pl.measureText(Sg).width,_m[a]=y,j0++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,vg(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var te=a.Gc=0,ne,se=!1;!se;){if(ne=x.indexOf(`
`,te),ne===-1&&(ne=x.length,se=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==L0){a.Le=0;var he=jn.alloc();T0(a,te,y,he),E+=he.height,jn.free(he),a.Gc+=a.Le}else T0(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(se=!0)}te=ne+1}return a.Lq=E}hn.Object.defineProperties(Yi.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"||(yh(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:gn},set:function(a){var y=this.flip;y!==a&&(yh(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Jc},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),yh(this),this.da.Yr=a,Xs(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=jn.alloc();T0(this,this.ec,999999,a);var y=a.width;jn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),us(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:A0},set:function(a){var y=this.wrap;y!==a&&(yh(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:N0},set:function(a){var y=this.overflow;y!==a&&(yh(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&&Od(a,"TextBlock.stroke"),a instanceof Ci&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return vg(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&&(yh(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&&(yh(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 Rh),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 Rh),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 Rh),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 Rh),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 Rh),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&&(yh(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&&(yh(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&&(yh(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&&(yh(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:yg},set:function(a){var y=this.formatting;y!==a&&(yh(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&&Nr(a,"> 0",Yi,"maxLines"),yh(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Im=null,Bm=null,L0=new tn(Yi,"None",0),b1=new tn(Yi,"WrapFit",1),A0=new tn(Yi,"WrapDesiredSize",2),P1=new tn(Yi,"WrapBreakAll",3),N0=new tn(Yi,"OverflowClip",0),Rm=new tn(Yi,"OverflowEllipsis",1),yg=new tn(Yi,"FormatTrim",0),C1=new tn(Yi,"FormatNone",0),xx=/[ \u200b\u00ad]/,O0=new jr,E1=0,_m=new jr,j0=0,Sg="...",k1="",pl=null,Gm=!1;Yi.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=gn,this.gq=yg,this.Jq=1/0,this.$q=N0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Jc,this.$r=A0}F0.prototype.copy=function(){var a=new F0;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},Yi.getEllipsis=function(){return Sg},Yi.setEllipsis=function(a){Sg=a,_m=new jr,j0=0},Yi.getBaseline=function(){return Im},Yi.setBaseline=function(a){Im=a},Yi.getUnderline=function(){return Bm},Yi.setUnderline=function(a){Bm=a},Yi.isValidFont=function(a){if(Gm||(pl=Ko?new Eu(null).context:null,Gm=!0),pl===null)return!0;var y=pl.font;if(a===y||a==="10px sans-serif")return!0;pl.font="10px sans-serif",pl.font=a;var x=pl.font;if(x!=="10px sans-serif")return pl.font=y,!0;pl.font="19px serif";var b=pl.font;return pl.font=a,x=pl.font,pl.font=y,x!==b},Yi.FormatNone=C1,Yi.FormatTrim=yg,Yi.None=L0,Yi.OverflowClip=N0,Yi.OverflowEllipsis=Rm,Yi.WrapBreakAll=P1,Yi.WrapDesiredSize=A0,Yi.WrapFit=b1;function Rh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Rh.prototype.copy=function(){var a=new Rh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Rh.className="GradElementSettings";function gl(a,y){Ut.call(this),this.Eg=null,this.qo="",this.Xg=Mo,this.Nk=xn,this.Zg=this.Hd=null,this.Mk=oi,this.Xf=gn,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 xp;Kt(gl,Ut),gl.prototype.cloneProtected=function(a){Ut.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},gl.prototype.qb=function(a){a===gn||a===Jn||a===Yr?this.imageStretch=a:Ut.prototype.qb.call(this,a)},gl.prototype.toString=function(){return"Picture("+this.source+")#"+Xt(this)};function wp(a){a===void 0&&(a=""),a!==""?xp[a]&&(delete xp[a],zm--):(xp=new jr,zm=0)}function M1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null)for(var se=ne.length,he=0;he<se;he++)te=ne[he],E.Xn.add(te),te.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),te.Zg!==null&&te.Zg(te,x))}y.Bg.clear()}a.desiredSize.w()||(Sa(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null){E=ne.length,te=xr();for(var se=0;se<E;se++)te.push(ne[se]);if(y.hn)for(se=0;se<E;se++)ne=te[se],ne.Hd!==null&&ne.Hd(ne,x);gr(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}gl.prototype.hA=function(){if(this.source!==""){wp(this.source);var a=this.source;this.source="",this.source=a}},gl.prototype.redraw=function(){this.N(),this.Uc=!0},gl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof qf)){var E=a instanceof Bl;b=this.naturalBounds;var te=0,ne=0,se=this.qn,he=se?+x.width:x.naturalWidth;if(se=se?+x.height:x.naturalHeight,he===void 0&&x.videoWidth&&(he=x.videoWidth),se===void 0&&x.videoHeight&&(se=x.videoHeight),he=he||b.width,se=se||b.height,he!==0&&se!==0){var ge=he,ye=se;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,he=this.Xg.width,se=this.Xg.height);var Me=he,Re=se,Ve=this.Nk,qe=this.Mk;switch(Ve){case gn:if(this.sourceRect.w())break;Me>=b.width&&(te=te+qe.offsetX+(Me*qe.x-b.width*qe.x)),Re>=b.height&&(ne=ne+qe.offsetY+(Re*qe.y-b.height*qe.y)),he=Math.min(b.width,Me),se=Math.min(b.height,Re);break;case xn:Me=b.width,Re=b.height;break;case Jn:case Yr:Ve===Jn?(Ve=Math.min(b.height/Re,b.width/Me),Me*=Ve,Re*=Ve):Ve===Yr&&(Ve=Math.max(b.height/Re,b.width/Me),Me*=Ve,Re*=Ve,Me>=b.width&&(te=(te+qe.offsetX+(Me*qe.x-b.width*qe.x)/Me)*he),Re>=b.height&&(ne=(ne+qe.offsetY+(Re*qe.y-b.height*qe.y)/Re)*se),he*=1/(Me/b.width),se*=1/(Re/b.height),Me=b.width,Re=b.height)}Ve=this.Df()*y.scale;var it=Me*Ve*Re*Ve,At=he*se/it,bt=x.__goCache;Ve=null;var Ot=wx;if(!E){if(x.sq&&bt!==void 0&&4<it&&At>Ot*Ot)for(bt.gi===null&&(L1(bt,4,ge,ye,x),L1(bt,16,ge,ye,x)),E=bt.gi,ge=E.length,ye=0;ye<ge&&E[ye].ratio*E[ye].ratio<At;ye++)Ve=E[ye];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new Eu(null).context;try{E.drawImage(this.Eg,0,0)}catch(Ft){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Ft){this.vl=!0}}if(this.vl)return}}switch(E=Me<b.width?qe.offsetX+(b.width*qe.x-Me*qe.x):0,qe=Re<b.height?qe.offsetY+(b.height*qe.y-Re*qe.y):0,this.flip){case ri:a.translate(Math.min(b.width,Me),0),a.scale(-1,1);break;case Rr:a.translate(0,Math.min(b.height,Re)),a.scale(1,-1);break;case ji:a.translate(Math.min(b.width,Me),Math.min(b.height,Re)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&bt!==void 0&&Ve!==null&&Ve.ratio!==1){a.save(),y=Ve.ratio;try{a.drawImage(Ve.source,te/y,ne/y,Math.min(Ve.source.width,he/y),Math.min(Ve.source.height,se/y),E,qe,Math.min(b.width,Me),Math.min(b.height,Re)),a instanceof Bl&&(this.bt=[te/y,ne/y,Math.min(Ve.source.width,he/y),Math.min(Ve.source.height,se/y),E,qe,Math.min(b.width,Me),Math.min(b.height,Re)])}catch(Ft){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,qe,Math.min(b.width,Me),Math.min(b.height,Re)),a instanceof Bl&&(this.bt=[te,ne,he,se,E,qe,Math.min(b.width,Me),Math.min(b.height,Re)])}catch(Ft){this.en=!1}switch(this.flip){case ri:a.scale(-1,1),a.translate(-Math.min(b.width,Me),0);break;case Rr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Re));break;case ji:a.scale(-1,-1),a.translate(-Math.min(b.width,Me),-Math.min(b.height,Re))}}}}},gl.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=dl(this,!0),ne=this.Eg,se=this.qn,he=0,ge=0;(se||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(he=se?+ne.width:ne.naturalWidth,ge=se?+ne.height:ne.naturalHeight),isFinite(E.width)||te===xn||te===er?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=he)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:he),isFinite(E.height)||te===xn||te===hr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=ge)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ge),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,te=this.minSize,x=Math.max(x||0,te.width),b=Math.max(b||0,te.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),us(this.dc,a,y),this.Ge(0,0,a,y)},gl.prototype.eh=function(a,y,x,b){Ds(this,a,y,x,b)},hn.Object.defineProperties(gl.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||Zt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&ph(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Nn),b!==null&&x&&Cl(b,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()||(Sa(this,!1),this.v())):x&&M1(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=xp;if(Ko){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<zm&&(wp(),x=xp),b=_n("img"),b.hn=!0,M1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,zm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new T1),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}}}),gl.prototype.redraw=gl.prototype.redraw,gl.prototype.reloadSource=gl.prototype.hA;var zm=0,wx=4;gl.className="Picture",xp=new jr,gl.clearCache=wp;function T1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new Eu(null),ne=te.context,se=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new A1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(se*x,0,0,se*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}T1.className="PictureCacheArray";function A1(a,y){this.source=a,this.ratio=y}A1.className="PictureCacheInstance";function bp(){this.os=new An,this.mc=null}bp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new An,this.mc=null};function Pp(a,y,x,b,E,te){a.mc=new Pa,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=te||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function bx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}bp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new ni(Ca);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},bp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new ni(Wi);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Lc(a,y,x,b,E,te,ne){var se;se===void 0&&(se=!1);var he=new ni(Za);he.point1X=y,he.point1Y=x,he.point2X=b,he.point2Y=E,he.endX=te,he.endY=ne,se&&he.close(),a.mc.segments.add(he)}function Um(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new ni(wl);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}bp.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var se=new ni($o);se.startAngle=a,se.sweepAngle=y,se.centerX=x,se.centerY=b,se.radiusX=E,se.radiusY=te!==0?te:E,ne&&se.close(),this.mc.segments.add(se)};function Px(a,y,x,b,E,te,ne,se){var he;he===void 0&&(he=!1),y=new ni(sl,ne,se,y,x,b,E,te),he&&y.close(),a.mc.segments.add(y)}function N1(a){var y=Wm;return y!==null?(Wm=null,y.reset(a),y):(y=new bp,y.reset(a),y)}var Wm=null;bp.className="StreamGeometryContext";function As(a,y){var x=a.toLowerCase(),b=Wt.Ze;b[a]=y,b[x]=a}As("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Wt.Mf[a];return b!==void 0||(b=new An(An.u),b.endX=y,b.endY=x,Wt.Nf<Wt.vm&&(Wt.Mf[a]=b,Wt.Nf++)),b}),As("Square",function(a,y,x){a="s"+y+","+x;var b=Wt.Mf[a];return b!==void 0||(b=new An(An.u),b.endX=y,b.endY=x,b.defaultStretch=Jn,Wt.Nf<Wt.vm&&(Wt.Mf[a]=b,Wt.Nf++)),b}),As("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 b="rr"+y+","+x+","+a,E=Wt.Mf[b];if(E!==void 0)return E;var te=a*Wt.wg;return E=new An().add(new Pa(a,0,!0).add(new ni(Wi,y-a,0)).add(new ni(Za,y,a,y-te,0,y,te)).add(new ni(Wi,y,x-a)).add(new ni(Za,y-a,x,y,x-te,y-te,x)).add(new ni(Wi,a,x)).add(new ni(Za,0,x-a,te,x,0,x-te)).add(new ni(Wi,0,a)).add(new ni(Za,a,0,0,te,te,0).close())),1<te&&(E.spot1=new nr(0,0,te,te),E.spot2=new nr(1,1,-te,-te)),Wt.Nf<Wt.vm&&(Wt.Mf[b]=E,Wt.Nf++),E}),As("Border","RoundedRectangle"),As("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Wt.Mf[a];return b!==void 0||(b=new An(An.F),b.endX=y,b.endY=x,b.spot1=Af,b.spot2=Xu,Wt.Nf<Wt.vm&&(Wt.Mf[a]=b,Wt.Nf++)),b}),As("Circle",function(a,y,x){a="c"+y+","+x;var b=Wt.Mf[a];return b!==void 0||(b=new An(An.F),b.endX=y,b.endY=x,b.spot1=Af,b.spot2=Xu,b.defaultStretch=Jn,Wt.Nf<Wt.vm&&(Wt.Mf[a]=b,Wt.Nf++)),b}),As("TriangleRight",function(a,y,x){return new An().add(new Pa(0,0).add(new ni(Wi,y,.5*x)).add(new ni(Wi,0,x).close())).pm(0,.25,.5,.75)}),As("TriangleDown",function(a,y,x){return new An().add(new Pa(0,0).add(new ni(Wi,y,0)).add(new ni(Wi,.5*y,x).close())).pm(.25,0,.75,.5)}),As("TriangleLeft",function(a,y,x){return new An().add(new Pa(y,x).add(new ni(Wi,0,.5*x)).add(new ni(Wi,y,0).close())).pm(.5,.25,1,.75)}),As("TriangleUp",function(a,y,x){return new An().add(new Pa(y,x).add(new ni(Wi,0,x)).add(new ni(Wi,.5*y,0).close())).pm(.25,.5,.75,1)}),As("Triangle","TriangleUp"),As("Diamond",function(a,y,x){return new An().add(new Pa(.5*y,0).add(new ni(Wi,0,.5*x)).add(new ni(Wi,.5*y,x)).add(new ni(Wi,y,.5*x).close())).pm(.25,.25,.75,.75)}),As("LineH",function(a,y,x){return a=new An(An.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),As("LineV",function(a,y,x){return a=new An(An.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),As("None","Rectangle"),As("BarH","Rectangle"),As("BarV","Rectangle"),As("MinusLine","LineH"),As("PlusLine",function(a,y,x){return new An().add(new Pa(0,x/2,!1).add(new ni(Wi,y,x/2)).add(new ni(Ca,y/2,0)).add(new ni(Wi,y/2,x)))}),As("XLine",function(a,y,x){return new An().add(new Pa(0,x,!1).add(new ni(Wi,y,0)).add(new ni(Ca,0,0)).add(new ni(Wi,y,x)))}),As("LineRight",function(a,y,x){return new An().add(new Pa(.25*y,0,!1).add(new ni(Wi,.75*y,.5*x)).add(new ni(Wi,.25*y,x)))}),As("LineDown",function(a,y,x){return new An().add(new Pa(0,.25*x,!1).add(new ni(Wi,.5*y,.75*x)).add(new ni(Wi,y,.25*x)))}),As("LineLeft",function(a,y,x){return new An().add(new Pa(.75*y,0,!1).add(new ni(Wi,.25*y,.5*x)).add(new ni(Wi,.75*y,x)))}),As("LineUp",function(a,y,x){return new An().add(new Pa(0,.75*x,!1).add(new ni(Wi,.5*y,.25*x)).add(new ni(Wi,y,.75*x)))}),Wt.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 D0(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Ya,this.ir=null,this.jr="",this.lr=Ba,this.Gq="",this.Hq=Ma,this.Pq=za,this.Kq=Gs,this.Up=null,this.Cq=127,this.zr=Ua,this.yr="gray",this.Vg=4}D0.prototype.copy=function(){var a=new D0;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 rr(a,y){a===void 0||a instanceof Ea||typeof a=="string"?wn.call(this,a):(wn.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 Mt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new rn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Kt(rr,wn),rr.prototype.cloneProtected=function(a){wn.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},Ze=rr.prototype,Ze.Af=function(a){wn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Ze.toString=function(){var a=Lr(this.constructor)+"#"+Xt(this);return this.data!==null&&(a+="("+_i(this.data)+")"),a};function ml(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}Ze.th=function(){wn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Ze.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===Zo&&y==="elements"?E instanceof wn?ed(E,function(he){ly(se.partManager,he),$l(se,he)}):Cl(se,E):a===ra&&y==="elements"&&(E instanceof wn?ed(E,function(he){uy(se.partManager,he,se)}):ph(se,E)),se.cb(a,y,x,b,E,te,ne))},Ze.La=function(a){if(wn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof wn&&ed(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},rr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},rr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},rr.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new Vn),y.Tf!==a&&(y.category=a),b.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)))}}},rr.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},rr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=xr();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);gr(y)}},rr.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Er?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof ai))break e;ku(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=wn.Link),x.adornedObject=y)}if(x!==null){x.type===wn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},rr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function I0(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Hm(a){if(sf(a)===!1){R0(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function O1(a){if(a.G|=2097152,sf(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=rn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),rn.free(b),R0(a,!1)}}rr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new Br);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},rr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=oi;this.locationSpot.sb()&&(te=this.locationSpot);var ne=Mt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,te),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),te=y.panel;te!==null&&te!==this;)te.Lb!==null&&te.Lb.Ga(ne),ne.offset(-te.measuredBounds.x,-te.measuredBounds.y),te=te.panel;else ne.yi(y,x,b,E,te);a.rotate(this.Kb,ne.x,ne.y),Mt.free(ne)}},rr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},rr.prototype.moveTo=function(a,y,x){a=Mt.allocAt(a,y),this.move(a,x),Mt.free(a)},rr.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())},rr.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())},rr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Vn),y.I(a)!==null)return y.I(a);var x=wn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Ac(a,y,x,b){b===void 0&&(b=new Mt),x=x.Mc()?oi:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}rr.prototype.mi=function(a){return a===void 0&&(a=new rn),a.assign(this.actualBounds)},rr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function j1(a){var y=Mt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Or?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/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 rd(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=h1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var te=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,te+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?te+=a.x:(b+=a.x,te-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,te+2,y+2),x}rr.prototype.arrange=function(){if(Ys(this)===!1)O1(this);else{Fh(this,!1);var a=this.Ib,y=rn.alloc();y.assign(a);var x=lf(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;D1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Wt.B(y.width,a.width)&&Wt.B(y.height,a.height)||0<=this.vw&&this.C(16),rn.free(y),R0(this,!1)}},Ze=rr.prototype,Ze.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=rn.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),rn.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||co(a,y)||(this instanceof Gn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Ze.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&F1(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new Mt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),sf(this)===!1&&Ys(this)===!1&&(Hm(this),O1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof ai||(y=y.animationManager,y.zb&&Io(y,a,new Mt(b,E),x))}Ze.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;sf(this)||Ys(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}Hm(this)},Ze.Av=function(){this.G&=-2097153,Hm(this)};function D1(a,y,x){var b=j1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?I1(a,y,x,E,b):B1(a,y,x,E,b):te?I1(a,y,x,E,b):ne&&B1(a,y,x,E,b),a.G|=2097152,Mt.free(b),a.Uk()}function I1(a,y,x,b,E){var te=y.x,ne=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof ai||Io(x,a,new Mt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new Mt(te,ne),y.copy()))}function B1(a,y,x,b,E){var te=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(te)||b===null||a.g("location",te,x.copy())}function R1(a,y,x){_0(a,!1),a instanceof Gn&&Pc(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?lf(a)?(Kl(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Ze.si=function(){return!0},Ze.Zc=function(){return!0},Ze.ph=function(){return!1},Ze.Dd=function(){return!0};function B0(a,y,x,b){y.constructor===a.constructor||z1||(z1=!0,si('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),si(" Old class: "+Lr(a.constructor)+", new class: "+Lr(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,se=!0,he=!0,ge=!1;a instanceof Gn&&(se=a.isTreeLeaf,he=a.isTreeExpanded,ge=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=te?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof Gn&&(a.U=se?a.U|4:a.U&-5,a.U=he?a.U|1:a.U&-2,a.U=ge?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}rr.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},rr.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},rr.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},rr.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},rr.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},rr.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},rr.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},rr.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},rr.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 sf(a){return(a.G&32768)!==0}function R0(a,y){a.G=y?a.G|32768:a.G&-32769}function _0(a,y){a.G=y?a.G|65536:a.G&-65537}function lf(a){return(a.G&131072)!==0}Ze=rr.prototype,Ze.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Km(a,y){a.G=y?a.G|1048576:a.G&-1048577}Ze.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Ze.N=function(){var a=this.diagram;a!==null&&!Ys(this)&&!sf(this)&&this.isVisible()&&this.Ib.w()&&a.N(rd(this,this.Ib))},Ze.v=function(){wn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Gn&&this.labeledLink!==null&&Xs(this.labeledLink),a.$b(!0))},Ze.Vo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},Ze.Wo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},Ze.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Ze.oz=function(){return G0(this,this)};function G0(a,y){var x=y.containingGroup;return x!==null?1+G0(a,x):y instanceof Gn&&(y=y.labeledLink,y!==null)?G0(a,y):0}Ze.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Gn&&(x=y.labeledLink,x!==null)?_1(a,x):y}Ze.Td=function(a){return a instanceof Er?z0(this,this,a):!1};function z0(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!z0(a,b,x)?y instanceof Gn&&(y=y.labeledLink,y!==null)?z0(a,y,x):!1:!0}Ze.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Er&&Km(y,!0),y instanceof Gn){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 Gn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Er&&Km(y,!1),y instanceof Gn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},rr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Gn&&this.isLinkLabel)},rr.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 Gn&&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 G1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function uf(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof ai)){if(a.add(y),y instanceof Gn){if(x&&y instanceof Er)for(var ne=y.memberParts;ne.next();)uf(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var se=ne.value;if(!a.contains(se)){var he=se.fromNode,ge=se.toNode;he=he===null||a.contains(he),ge=ge===null||a.contains(ge),(E?he&&ge:he||ge)&&uf(a,se,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)uf(a,y.value,x,b-1,E,te)}else if(y instanceof kn)for(y=y.labelNodes;y.next();)uf(a,y.value,x,b,E,te)}}hn.Object.defineProperties(rr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Ri: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 b=y.pc(-1,this,!0);if(0<=b&&x.cb(ra,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(Zo,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(ml(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&&Ss(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 ai?this.type!==wn.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:za},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),ml(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Gs},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),ml(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&&(ml(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:Ma},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),ml(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,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Ys(this)===!1&&(Hm(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var te=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),F1(this,E,x,te.x,te.y),this.g("position",te,x.copy())}}y=!0}y&&this.g("location",b,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,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof ai)){var te=x.model.undoManager;te.isEnabled&&!te.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof ai?this instanceof ai&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(te=x.model,te.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(ku(x),x=x.copy(),x!==null&&B0(this,x,y,a))):(te!==null&&te.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(ku(x),x=x.copy(),x===null||x instanceof kn||(b=this.location.copy(),B0(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){B0(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 b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},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&&(ml(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&&(ml(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&&(ml(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 kn?(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&&(ml(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&&(ml(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&&(ml(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:Ya},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),ml(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&&(ml(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&&(ml(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:Ba},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),ml(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&&Zt("Cannot make a Group a member of itself: "+this.toString()),Zt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?V0(y,this):this instanceof Er&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?K0(a,this):this instanceof Er&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var te=E.wa(a!==null?a.data:null);E.mp(b,te)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof Er){for(x=new Nn,uf(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Gn)for(b=b.linksConnected;b.next();)Cp(b.value)}if(this instanceof Gn){for(x=this.linksConnected;x.next();)Cp(x.value);x=this.labeledLink,x!==null&&Cp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Ss(y,-1,a))}}else Zt("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&&(ml(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Gn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(ml(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&&(ml(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Ua},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),ml(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&&(ml(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&&(ml(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),rr.prototype.invalidateLayout=rr.prototype.C,rr.prototype.findCommonContainingGroup=rr.prototype.px,rr.prototype.isMemberOf=rr.prototype.Td,rr.prototype.findTopLevelPart=rr.prototype.sz,rr.prototype.findSubGraphLevel=rr.prototype.oz,rr.prototype.ensureBounds=rr.prototype.Va,rr.prototype.getDocumentBounds=rr.prototype.mi,rr.prototype.findObject=rr.prototype.fb,rr.prototype.moveTo=rr.prototype.moveTo,rr.prototype.invalidateAdornments=rr.prototype.Wb,rr.prototype.clearAdornments=rr.prototype.Ej,rr.prototype.removeAdornment=rr.prototype.Jf,rr.prototype.addAdornment=rr.prototype.bh,rr.prototype.findAdornment=rr.prototype.Pj,rr.prototype.updateTargetBindings=rr.prototype.La;var z1=!1;rr.className="Part",rr.LayoutNone=0,rr.LayoutAdded=1,rr.LayoutRemoved=2,rr.LayoutShown=4,rr.LayoutHidden=8,rr.LayoutNodeSized=16,rr.LayoutGroupLayout=32,rr.LayoutNodeReplaced=64,rr.LayoutStandard=127,rr.LayoutAll=16777215;function ai(a,y){a===void 0||a instanceof Ea||typeof a=="string"?rr.call(this,a):(rr.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)}Kt(ai,rr),ai.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},ai.prototype.updateRelationshipsFromData=function(){},ai.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof kn&&y instanceof Or){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof Or&&(E.ua=a)}}},ai.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ys(a))},ai.prototype.Zc=function(){return!1},ai.prototype.gk=function(a,y,x,b,E,te,ne){if(a===Zo&&y==="elements"){if(E instanceof Js)this.$a===null&&(this.$a=E);else if(E instanceof wn){var se=E.Nl(function(he){return he instanceof Js});se instanceof Js&&this.$a===null&&(this.$a=se)}}else a===ra&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof wn&&this.$a.rg(b)&&(this.$a=null));rr.prototype.gk.call(this,a,y,x,b,E,te,ne)},ai.prototype.updateAdornments=function(){},ai.prototype.Lj=function(){},hn.Object.defineProperties(ai.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}}}),ai.className="Adornment";function U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ch,this.er=Ym,this.Kr=this.ij=this.Nq=this.Mq=null}U0.prototype.copy=function(){var a=new U0;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 Gn(a,y){a===void 0||a instanceof Ea||typeof a=="string"?rr.call(this,a):(rr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Ln,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Kt(Gn,rr),Gn.prototype.cloneProtected=function(a){rr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Ze=Gn.prototype,Ze.Af=function(a){rr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Nc(a){a.Ba===null?a.Ba=new U0:a.Ba.nc&&(a.Ba=a.Ba.copy())}Ze.th=function(){rr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new Nn),a.af.add(y))}function W1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var te=E.value;if(te.Ds===a&&te.cv===y&&te.Ox===x&&te.Px===b||te.Ds===y&&te.cv===a&&te.Ox===b&&te.Px===x)return te}return null}Ze.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},Ze.gk=function(a,y,x,b,E,te,ne){a===Zo&&y==="elements"?this.wc=null:a===ra&&y==="elements"&&(this.wc=null),rr.prototype.gk.call(this,a,y,x,b,E,te,ne)},Ze.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Rl(x.fromPort),Rl(x.toPort),x.bb())}};function H1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Rl(x.fromPort),Rl(x.toPort),x.bb())}}function Rl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Rl(y.port)}}Ze.si=function(){return!0},Gn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Gn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Gn.prototype.isVisible=function(){if(!rr.prototype.isVisible.call(this))return!1;var a=!0,y=Ec,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Ec){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===ya){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===up&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Gn.prototype.Zb=function(a){rr.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},Gn.prototype.qx=function(){var a=new Nn,y=new Nn;return K1(this,this,a,y),y.iterator};function K1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,te=a.diagram;te!==null&&(E=te.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&K1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}Gn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new bi(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Ze=Gn.prototype,Ze.Mo=function(a){a===void 0&&(a=null);var y=new bi(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},Ze.Sd=function(a){a===void 0&&(a=null);var y=new bi(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},Ze.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Li(x):Ri},Ze.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Li(x):Ri},Ze.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new Nn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Li(x):Ri},Ze.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new bi(this.jb),E=this;return b.predicate=function(te){return!((te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)&&(te.fromNode!==a||te.toNode!==E||x!==null&&te.fromPortId!==x||y!==null&&te.toPortId!==y))},b},Ze.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new bi(this.jb),E=this;return b.predicate=function(te){return!(te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)},b};function Vm(a,y,x){Rl(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=te)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,te=b?x:y,E.ci||(E.ci=te),!te.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===te&&(te.isTreeLeaf=!1):y===te&&(te.isTreeLeaf=!1))))}function Xm(a,y,x){Rl(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.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,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):xg(y)))}function xg(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 b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Gn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Ze=Gn.prototype,Ze.Vo=function(a){rr.prototype.Vo.call(this,a),a||(xg(this),a=this.Yk,a!==null&&eS(a,this))},Ze.Wo=function(a){rr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Ze.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 b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,rr.prototype.Lj.call(this)},Ze.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new Vn:a.wc.clear(),a.qm(a,function(y,x){X1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function X1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function W0(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=xr()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);gr(x)}}}Ze.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 b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Ze.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 b=x.value;if(b.isTreeLink&&(a=b.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()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Ze.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Km(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;)Km(y,!1),y=y.pg();return x},Ze.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},Ze.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Gn)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},Ze.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new Nn;return a(this,y),y},Ze.uz=function(){return Y1(this,this)};function Y1(a,y){return y=y.pg(),y===null?0:1+Y1(a,y)}Ze.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new bi(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},Ze.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Ln,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new Ln,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Li(x):Ri},Ze.wz=function(a){a===void 0&&(a=1/0);var y=new Nn;return uf(y,this,!1,a,!0),y},Gn.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 Nn;x.add(this),Z1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ec),y.Ue=!1}};function Z1(a,y,x,b,E,te,ne){if(1<b)for(var se=x?a.Mo():a.Sd();se.next();){var he=se.value;he.isTreeLink&&(he=he.To(a),he===null||he===a||y.contains(he)||(y.add(he),Z1(he,y,x,b-1,E,te,ne)))}else J1(a,y,x,E,te,ne)}function J1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,se=x?a.Mo():a.Sd(),he={};se.next();){var ge=se.value;if(ge.isTreeLink&&(ge=ge.To(a),ge!==null&&ge!==a)){var ye=y.contains(ge);if(ye||y.add(ge),ne){var Me=x?ge.Oo():ge.Po();he.uv=a,Me.all(function(Re){return function(Ve){return Ve===Re.uv||!Ve.isTreeExpanded}}(he))&&b.Aj(ge,E),ge.oh(),ge.Zb(!1)}ge.isTreeExpanded&&(ge.wasTreeExpanded=ge.isTreeExpanded,ye||J1(ge,y,x,b,E,te))}he={uv:he.uv}}a.isTreeExpanded=!1}Gn.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 Nn;x.add(this),Q1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ec),y.Ue=!1}};function Q1(a,y,x,b,E,te,ne){for(var se=te===a?!1:a.isTreeExpanded,he=x?a.Mo():a.Sd(),ge={};he.next();){var ye=he.value;if(ye.isTreeLink&&(se||ye.fd||ye.bb(),ye=ye.To(a),ye!==null&&ye!==a&&!y.contains(ye))){if(y.add(ye),!se){ye.Zb(!0),ye.oh();var Me=x?ye.Oo():ye.Po();ge.vv=a,Me.all(function(Re){return function(Ve){return Ve===Re.vv||!Ve.isTreeExpanded}}(ge))&&E.Cj(ye,te)}(2<b||ye.wasTreeExpanded)&&(ye.wasTreeExpanded=!1,Q1(ye,y,x,b-1,E,te,ne))}ge={vv:ge.vv}}a.isTreeExpanded=!0}hn.Object.defineProperties(Gn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Ym},set:function(a){var y=this.portSpreading;y!==a&&(Nc(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&&Pc(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Ch},set:function(a){typeof a=="number"&&(a=new yr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Nc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Pc(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&&(Nc(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&&(Nc(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&&(Nc(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,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,te=x.model;if(E!==null&&te.ri()){var ne=te.wa(b);ne!==void 0&&te.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),Xs(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}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&&(Nc(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))}}}),Gn.prototype.expandTree=Gn.prototype.expandTree,Gn.prototype.collapseTree=Gn.prototype.collapseTree,Gn.prototype.findTreeParts=Gn.prototype.wz,Gn.prototype.findTreeChildrenNodes=Gn.prototype.Ou,Gn.prototype.findTreeChildrenLinks=Gn.prototype.Qo,Gn.prototype.findTreeLevel=Gn.prototype.uz,Gn.prototype.findTreeParentChain=Gn.prototype.vz,Gn.prototype.findTreeParentNode=Gn.prototype.pg,Gn.prototype.findTreeParentLink=Gn.prototype.kh,Gn.prototype.findCommonTreeParent=Gn.prototype.gz,Gn.prototype.findTreeRoot=Gn.prototype.xz,Gn.prototype.isInTreeOf=Gn.prototype.Nz,Gn.prototype.findPort=Gn.prototype.ns,Gn.prototype.findLinksTo=Gn.prototype.kz,Gn.prototype.findLinksBetween=Gn.prototype.jz,Gn.prototype.findNodesInto=Gn.prototype.Oo,Gn.prototype.findNodesOutOf=Gn.prototype.Po,Gn.prototype.findNodesConnected=Gn.prototype.Mu,Gn.prototype.findLinksInto=Gn.prototype.Sd,Gn.prototype.findLinksOutOf=Gn.prototype.Mo,Gn.prototype.findExternalTreeLinksConnected=Gn.prototype.qx,Gn.prototype.invalidateConnectedLinks=Gn.prototype.Bd,Gn.prototype.invalidateLinkBundle=Gn.prototype.Lz;var Ex=new tn(Gn,"SpreadingNone",10),Ym=new tn(Gn,"SpreadingEvenly",11),H0=new tn(Gn,"SpreadingPacked",12);Gn.className="Node",Gn.SpreadingNone=Ex,Gn.SpreadingEvenly=Ym,Gn.SpreadingPacked=H0;function Er(a,y){a===void 0||a instanceof Ea||typeof a=="string"?Gn.call(this,a):(Gn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Nn,this.$a=null,this.Sc=new Eo,this.Sc.group=this,this.gl=new Nn,this.tb=this.$p=null,y&&Object.assign(this,y)}Kt(Er,Gn),Er.prototype.cloneProtected=function(a){Gn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Js});y instanceof Js?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())},Ze=Er.prototype,Ze.Af=function(a){Gn.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 Gn)x.Bd(y);else if(x instanceof kn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Ze.gk=function(a,y,x,b,E,te,ne){if(a===Zo&&y==="elements"){if(E instanceof Js)this.$a===null?this.$a=E:this.$a!==E&&Zt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof wn){var se=E.Nl(function(he){return he instanceof Js});se instanceof Js&&(this.$a===null?this.$a=se:this.$a!==se&&Zt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ra&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof wn&&this.$a.rg(b)&&(this.$a=null));Gn.prototype.gk.call(this,a,y,x,b,E,te,ne)},Ze.Xl=function(a,y){Gn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==wn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof wn&&(a=a.Pb()),this.tb===null&&(this.tb=new rn),a.mi(this.tb),a instanceof Or&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Ze.eh=function(a,y,x,b){this.nf=this.$a,Gn.prototype.eh.call(this,a,y,x,b)},Ze.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof kn||y.Va()}),Gn.prototype.Va.call(this)},Ze.si=function(){if(!Gn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Gn){if(y.isVisible()&&Ys(y))return!1}else if(y instanceof kn&&y.isVisible()&&Ys(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function K0(a,y){if(a.Gn.add(y)){y instanceof Er&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof kn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function V0(a,y){if(a.Gn.remove(y)){y instanceof Er&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof kn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Ze.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)}Gn.prototype.Lj.call(this)},Er.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=qt(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Er.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=qt(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Er.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))},Ze=Er.prototype,Ze.Bd=function(a){var y=(this.U&65536)!==0;if(Gn.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 b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Rl(x.fromPort),Rl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Rl(x.fromPort),Rl(x.toPort),x.bb()))}}},Ze.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 Nn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Gn)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},Ze.iz=function(){var a=this.Rj();a.add(this);for(var y=new Nn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Gn)for(b=b.linksConnected;b.next();){var E=b.value,te=E.fromNode;te===null||a.contains(te)&&te!==this||y.add(te),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},Ze.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new Nn;return a(this,y),y},Ze.Rj=function(){var a=new Nn;return uf(a,this,!0,0,!0),a.remove(this),a},Ze.Zb=function(a){Gn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Er.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$1(this,y,a,this),a.Ue=!1}};function $1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!1),te instanceof Er&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,$1(te,y,x,b)),te instanceof Gn)te.Bd(y),x.Aj(te,b);else if(te instanceof kn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}Er.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();q1(this,y,a,this),a.Ue=!1}};function q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!0),te instanceof Er&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof Gn)te.Bd(y),x.Cj(te,b);else if(te instanceof kn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}Er.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,te=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===te||isNaN(x)&&isNaN(te))){for(b=E-(isNaN(b)?0:b),x=te-(isNaN(x)?0:x),te=Mt.alloc(),Gn.prototype.move.call(this,a,y),a=new Nn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof kn&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof Gn&&E.isLinkLabel)){var ne=E.position,se=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):se.w()&&(te.x=se.x+b,te.y=se.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof kn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,te.x=ne.x+b,te.y=ne.y+x,te.w()?E.move(te):E.bb(),Y0(E)&&E.bb());Mt.free(te)}},hn.Object.defineProperties(Er.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&&Zt("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&&(Nc(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&&(Nc(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&&(Nc(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 b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.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&&(Nc(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)}}}),Er.prototype.expandSubGraph=Er.prototype.expandSubGraph,Er.prototype.collapseSubGraph=Er.prototype.collapseSubGraph,Er.prototype.findSubGraphParts=Er.prototype.Rj,Er.prototype.findContainingGroupChain=Er.prototype.hz,Er.prototype.findExternalNodesConnected=Er.prototype.iz,Er.prototype.findExternalLinksConnected=Er.prototype.Lu,Er.prototype.ensureBounds=Er.prototype.Va,Er.className="Group";function Js(a){Ut.call(this),this.yb=Vl,this.ko=new rn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Kt(Js,Ut),Js.prototype.cloneProtected=function(a){Ut.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Js.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return ma(0,0,y.width,y.height,a.x,a.y)},Js.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Er||a instanceof ai)||Zt("Placeholder is not inside a Group or Adornment."),a instanceof Er){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(us(b,(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,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Mt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Mt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,te=a.adornedObject;a.angle=te.li();var ne=0;te instanceof Or&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,ge=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==wn.Link&&(se=te.ga(a.category==="Selection"?Ma:a.locationSpot,Mt.alloc()),a.location=se,Mt.free(se)),isNaN(ge)||isNaN(ne)?(a=te.ga(Ma,Mt.alloc()),ge=rn.allocAt(a.x,a.y,0,0),ge.Ye(te.ga(Yl,a)),ge.Ye(te.ga(Ta,a)),ge.Ye(te.ga(al,a)),us(y,ge.width+b||0,ge.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Mt.free(a),rn.free(ge)):(us(y,ge+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Js.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Js.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Er&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=rn.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof Er&&!y.isSubGraphExpanded?a.h(E.x-te.left,E.y-te.top,0,0):a.h(E.x-te.left,E.y-te.top,Math.max(E.width+te.left+te.right,0),Math.max(E.height+te.top+te.bottom,0)),rn.free(x),b&&y instanceof Er&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Js.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Er))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,te=-1/0,ne=y.memberParts;ne.next();){var se=ne.value;if(se.isVisible()){if(se instanceof kn&&(!y.computesBoundsIncludingLinks||tu(se)||se.fromNode===y||se.toNode===y))continue;se=se.actualBounds,se.left<x&&(x=se.left),se.top<b&&(b=se.top),se.right>E&&(E=se.right),se.bottom>te&&(te=se.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,te-b):(y=y.location,a.h(y.x,y.y,0,0)),a},hn.Object.defineProperties(Js.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new yr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Js.className="Placeholder";function kn(a){rr.call(this,wn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Qs,this.Om=0,this.Qm=Qs,this.Rm=NaN,this.qj=Q0,this.po=.5,this.wd=null,this.Nb=new Ln().freeze(),this.Tg=this.Mg=null,this.ml=new rn,this.ua=new An,this.u=this.o=this.Sf=this.Wf=null,this.su=new Mt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Kt(kn,rr),kn.prototype.cloneProtected=function(a){rr.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())},Ze=kn.prototype,Ze.Af=function(a){rr.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&&Rl(y),a=a.toPort,a!==null&&Rl(a)},Ze.qb=function(a){a.classType===kn?(a.value&2)===2?this.routing=a:a===ru||a===jc||a===kp?this.curve=a:a===Pg||a===ev||a===tv?this.adjusting=a:a!==Q0&&a!==Qs&&Zt("Unknown Link enum value for a Link property: "+a):rr.prototype.qb.call(this,a)},Ze.Xc=function(){this.ba===null&&(this.ba=new ug)},Ze.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ys(a)||sf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ys(a)||sf(a)))},Ze.zv=function(){return!1},Ze.Av=function(){},Ze.Zc=function(){return!1},kn.prototype.computeAngle=function(a,y,x){return kn.computeAngle(y,x)},kn.computeAngle=function(a,y){switch(a){default:case Qs:a=0;break;case Cg:a=y;break;case Eg:a=y+90;break;case kg:a=y-90;break;case $0:a=y+180;break;case nv:a=Wt.bp(y),90<a&&270>a&&(a-=180);break;case Mg:a=Wt.bp(y+90),90<a&&270>a&&(a-=180);break;case Tg:a=Wt.bp(y-90),90<a&&270>a&&(a-=180);break;case rv:if(a=Wt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Wt.bp(a)};function Cp(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&V0(x,a),a.Ah=y,y!==null&&K0(y,a);var E=a.containingGroupChanged;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=te)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}Ze=kn.prototype,Ze.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&rr.prototype.oh.call(this)},Ze.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ze.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new Nn),a.wd.add(y),a.v()}Ze.Vo=function(a){if(rr.prototype.Vo.call(this,a),id(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Vm(x,this,b)}wg(this)}},Ze.Wo=function(a){if(rr.prototype.Wo.call(this,a),id(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Xm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Xm(x,this,b)}bg(this)}},Ze.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))},kn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},kn.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?rr.prototype.move.call(this,a,!1):(a=Mt.allocAt(x.x+b,x.y+E),rr.prototype.move.call(this,a,!1),Mt.free(a)),Oc(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},kn.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},kn.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},kn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Fa),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ru))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()===ru){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Wt.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var te=this.i(x+2);x=this.i(x+3),Wt.ax(b.x,b.y,E.x,E.y,te.x,te.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=te=b=0;b<x/2&&te<y&&(E=ne[te],!(b+E>x/2));)b+=E,te++;return y=this.i(te),te=this.i(te+1),1>Math.abs(y.x-te.x)?y.y>te.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-te.y)?y.x>te.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(te.x-y.x),y.y+x*(te.y-y.y))),a},kn.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()===ru))return this.ua.wx(.5);if(this.computeCurve()===ru&&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 b=this.i(x+2);return x=this.i(x+3),Wt.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},Ze=kn.prototype,Ze.i=function(a){return this.Nb.s[a]},Ze.dd=function(a,y){this.Nb.cd(a,y)},Ze.L=function(a,y,x){this.Nb.cd(a,new Mt(y,x))},Ze.Kz=function(a,y){this.Nb.Gb(a,y)},Ze.m=function(a,y,x){this.Nb.Gb(a,new Mt(y,x))},Ze.ne=function(a){this.Nb.add(a)},Ze.yf=function(a,y){this.Nb.add(new Mt(a,y))},Ze.pv=function(a){this.Nb.mb(a)},Ze.Fj=function(){this.Nb.clear()};function Oc(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 b=a.fd,E=new Ln,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new Mt(ne.x+y,ne.y+x).freeze())}E.freeze(),te=a.Nb,a.Nb=E,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.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),Xs(a)),b?Zm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ui(ne.animationManager,a,E),a.g("points",te,E)}}Ze.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ze.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x=Math.min(se.x,x),b=Math.min(se.y,b)}se=ne=1/0;for(var he=y.s,ge=he.length,ye=0;ye<ge;ye++){var Me=he[ye];ne=Math.min(Me.x,ne),se=Math.min(Me.y,se),Me.freeze()}if(y.freeze(),ge===te){for(te=0;te<ge;te++)if(ye=E[te],Me=he[te],ye.x-x!==Me.x-ne||ye.y-b!==Me.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ui(x.animationManager,this,y),Zm(this),this.g("points",a,y)}},Ze.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Zm(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),qm(a,!1))}Ze.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())}},Ze.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()}}},kn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Dd||(Dd=new Gn,Dd.desiredSize=Gi,Dd.Va()),this.defaultFromPoint&&(Dd.location=this.defaultFromPoint,Dd.Va(),y=a=Dd)):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 b=this.toNode,E=null;if(b===null?(Id||(Id=new Gn,Id.desiredSize=Gi,Id.Va()),this.defaultToPoint&&(Id.location=this.defaultToPoint,Id.Va(),E=b=Id)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var te=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var se=Ep(ne),he=Ep(x),ge=y===E&&y!==null,ye=this.isOrthogonal,Me=this.curve===ru;this.Wf=ge&&!ye?Me=!0:!1;var Re=this.computeAdjusting()===Qs||ge;if(!ye&&!ge&&se&&he){if(se=!1,!Re&&3<=te&&(Re=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),se=this.adjustPoints(0,Re,te-1,he))&&(Re=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Re,te-1,he)),!se)if(this.Fj(),Me){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Re=this.getLinkPoint(b,E,x,!1,!1,a,y),se=Re.x-te.x,he=Re.y-te.y,ge=this.computeCurviness(),Me=ye=0;var Ve=te.x+se/3,qe=te.y+he/3,it=Ve,At=qe;Wt.B(he,0)?At=0<se?At-ge:At+ge:(ye=-se/he,Me=Math.sqrt(ge*ge/(ye*ye+1)),0>ge&&(Me=-Me),it=(0>he?-1:1)*Me+Ve,At=ye*(it-Ve)+qe),Ve=te.x+2*se/3,qe=te.y+2*he/3;var bt=Ve,Ot=qe;Wt.B(he,0)?Ot=0<se?Ot-ge:Ot+ge:(bt=(0>he?-1:1)*Me+Ve,Ot=ye*(bt-Ve)+qe),this.Fj(),this.ne(te),this.yf(it,At),this.yf(bt,Ot),this.ne(Re),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else te=b,Re=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Re),E=this.getLinkPoint(te,Re,x,!1,!1,a,y),this.hasCurviness()?(Re=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Re/2,y=b.y+x/2,te=a,se=y,Wt.B(x,0)?se=0<Re?se-ne:se+ne:(Re=-Re/x,te=Math.sqrt(ne*ne/(Re*Re+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,se=Re*(te-a)+y),this.ne(b),this.yf(te,se),this.ne(E)):(this.ne(b),this.ne(E),se=rn.alloc(),y.mi(se),he=se.ca(E),Re.mi(se),ge=se.ca(b),(he||ge)&&(ne=y.ga(Qm(ne),new Mt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Re.ga(Qm(x),new Mt),this.dd(1,this.getLinkPointFromPoint(te,Re,x,b,!1,x))),rn.free(se))}else{Me=this.isAvoiding,Re&&(ye&&Me||ge)&&this.Fj();var Ft=ge?this.computeCurviness():0;Me=this.getLinkPoint(a,y,ne,!0,ye,b,E),Ve=it=qe=0,(ye||!se||ge)&&(At=this.computeEndSegmentLength(a,y,ne,!0),Ve=this.getLinkDirection(a,y,Me,ne,!0,ye,b,E),ge&&(se||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ve-=ye?90:30,0>Ft&&(Ve-=180)),0>Ve?Ve+=360:360<=Ve&&(Ve-=360),ge&&(At+=Math.abs(Ft)*(ye?1:2)),Ve===0?qe=At:Ve===90?it=At:Ve===180?qe=-At:Ve===270?it=-At:(qe=At*Math.cos(Ve*Math.PI/180),it=At*Math.sin(Ve*Math.PI/180)),ne.Mc()&&ge&&(At=y.ga(oi,Mt.alloc()),bt=Mt.allocAt(At.x+1e3*qe,At.y+1e3*it),this.getLinkPointFromPoint(a,y,At,bt,!0,Me),Mt.free(At),Mt.free(bt))),At=this.getLinkPoint(b,E,x,!1,ye,a,y);var It=Ot=bt=0;if(ye||!he||ge){var Gt=this.computeEndSegmentLength(b,E,x,!1);It=this.getLinkDirection(b,E,At,x,!1,ye,a,y),ge&&(he||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(It+=ye?0:30,0>Ft&&(It+=180)),0>It?It+=360:360<=It&&(It-=360),ge&&(Gt+=Math.abs(Ft)*(ye?1:2)),It===0?bt=Gt:It===90?Ot=Gt:It===180?bt=-Gt:It===270?Ot=-Gt:(bt=Gt*Math.cos(It*Math.PI/180),Ot=Gt*Math.sin(It*Math.PI/180)),x.Mc()&&ge&&(x=E.ga(oi,Mt.alloc()),ne=Mt.allocAt(x.x+1e3*bt,x.y+1e3*Ot),this.getLinkPointFromPoint(b,E,x,ne,!1,At),Mt.free(x),Mt.free(ne))}x=Me,(ye||!se||ge)&&(x=new Mt(Me.x+qe,Me.y+it)),ne=At,(ye||!he||ge)&&(ne=new Mt(At.x+bt,At.y+Ot)),!Re&&!ye&&se&&3<te&&this.adjustPoints(0,Me,te-2,ne)?this.dd(te-1,At):!Re&&!ye&&he&&3<te&&this.adjustPoints(1,x,te-1,At)?this.dd(0,Me):!Re&&(ye?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Me),this.dd(te-1,At)):(this.Fj(),this.ne(Me),(ye||!se||ge)&&this.ne(x),ye&&this.addOrthoPoints(x,Ve,ne,It,a,b),(ye||!he||ge)&&this.ne(ne),this.ne(At))}return!0};function X0(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}kn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new Mt),a===null||y===null)return te.assign(x),te;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var se=-a.m12*E,he=-a.m21*E,ge=a.m11*E,ye=E*(a.m21*a.dy-a.m22*a.dx),Me=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+ye,b=b.x*se+b.y*ge+Me,ne=x.x*ne+x.y*he+ye,x=x.x*se+x.y*ge+Me}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Jm(a,y){var x=y.Zn;return x===null&&(x=new Bd,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}kn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,se){if(se===void 0&&(se=new Mt),x.sb()&&!Ep(x))return y.ga(x,se),se;if(x.$c()){var he=Jm(this,y);if(he!==null){if(se.assign(he.Zo),E&&this.routing===nS){var ge=Jm(this,ne);if(ge!==null&&he.Gl<ge.Gl){he=Mt.alloc(),ge=Mt.alloc();var ye=new rn(y.ga(Ma,he),y.ga(Yl,ge)),Me=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Me,!b,E,a,y,ge),(x.Hf(yc)||x.Hf(Fl))&&a.y>=ye.y&&a.y<=ye.y+ye.height?se.y=a.y:(x.Hf(Yh)||x.Hf(yu))&&a.x>=ye.x&&a.x<=ye.x+ye.width&&(se.x=a.x),Mt.free(he),Mt.free(ge)}}return se}}return x=y.ga(Qm(x),Mt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=X0(x,ne.copy()))):(he=this.computeSpot(!b,ne),te=Mt.alloc(),ne=ne.ga(Qm(he),te),E&&(ne=X0(x,ne)),Mt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),Mt.free(x),se},kn.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,se){e:if(b.sb())var he=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(he=Jm(this,y),he!==null))switch(he.Nc){case 1:he=270;break e;case 2:he=180;break e;default:case 4:he=0;break e;case 8:he=90;break e}he=y.ga(oi,Mt.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?X0(he,se.copy()):x):(x=Mt.alloc(),se=se.ga(oi,x),Mt.free(x)),x=Math.abs(se.x-he.x)>Math.abs(se.y-he.y)?se.x>=he.x?0:180:se.y>=he.y?90:270,Mt.free(he),he=x}return b.Mc()&&ne.Td(a)&&(he+=180,360<=he&&(he-=360)),Ep(b)||(a=y.li(),a===0)||(45<=a&&135>a?he+=90:135<=a&&225>a?he+=180:225<=a&&315>a&&(he+=270),360<=he&&(he-=360)),he},kn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Jm(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},kn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=oi:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Ba?ba:y)):(a=y||this.toPort,a===null?a=oi:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Ba?ba:y)),a};function Ep(a){return a===ba||a.x===.5&&a.y===.5}function Qm(a){return a.x===.5&&a.y===.5?a:oi}kn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Qs&&4<this.pointsCount?this.computeMidPoint(new Mt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(oi))},kn.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},kn.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Br.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),te===void 0&&Br.free(ne),!0;if(this.Yc(a,ne)){var se=!1;if(!this.isAtomic)for(var he=this.O.s,ge=he.length;ge--;){var ye=he[ge];if(ye.visible||ye===this.locationObject){var Me=ye.actualBounds,Re=this.naturalBounds;if(!(Me.x>Re.width||Me.y>Re.height||0>Me.x+Me.width||0>Me.y+Me.height)){if(Me=Br.alloc(),Me.set(ne),ye instanceof wn)se=ye.Cf(a,y,x,b,E,Me);else if(this.path===ye){if(ye instanceof Or)if(se=a,Re=b,ye.pickable===!1)se=!1;else if(Me.multiply(ye.transform),Re)e:{var Ve=se,qe=Me;if(ye.fh(Ve,qe))se=!0;else{if(qe===void 0&&(qe=ye.transform,Ve.Re(ye.actualBounds))){se=!0;break e}se=Ve.left,Re=Ve.right;var it=Ve.top;Ve=Ve.bottom;var At=Mt.alloc(),bt=Mt.alloc(),Ot=Mt.alloc(),Ft=Br.alloc();Ft.set(qe),Ft.bv(ye.transform),Ft.Vj(),bt.x=Re,bt.y=it,bt.transform(Ft),At.x=se,At.y=it,At.transform(Ft),qe=!1,nd(ye,At,bt,Ot)?qe=!0:(At.x=Re,At.y=Ve,At.transform(Ft),nd(ye,At,bt,Ot)?qe=!0:(bt.x=se,bt.y=Ve,bt.transform(Ft),nd(ye,At,bt,Ot)?qe=!0:(At.x=se,At.y=it,At.transform(Ft),nd(ye,At,bt,Ot)&&(qe=!0)))),Br.free(Ft),Mt.free(At),Mt.free(bt),Mt.free(Ot),se=qe}}else se=ye.fh(se,Me)}else se=Na(ye,a,b,Me);se&&(Re=ye,y!==null&&(Re=y(ye)),Re&&(x===null||x(Re))&&E.add(Re)),Br.free(Me)}}}return te===void 0&&Br.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&Br.free(ne),!1},kn.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?ru:this.curve},kn.prototype.computeCorner=function(){if(this.curve===ru)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},kn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},kn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,te=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+te.left+te.right;E=isNaN(E.height)?14:E.height*b.scale+te.top+te.bottom,b=b.segmentOrientation,b===Cg||b===nv||b===$0?a=Math.max(a,E):b===kg||b===Tg||b===Eg||b===Mg?a=Math.max(a,ne):(y=y.ga(oi).ab(x.ga(oi))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===ru&&(a*=1.333)}}return a},kn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Qs&&x.bb()}},kn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=xr(),b=0,E=y.links,te=0;te<E.length;te++){var ne=E[te].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,te=0;te<E.length;te++){if(E[te]===this){a=b+x[te]/2;break}b+=x[te]}y.Ds===this.fromNode&&(a=-a),gr(x)}}return a},kn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},kn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},kn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===ev)return!1;E===tv&&(E=Pg)}switch(E){case ev:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var se=ne.x-E,he=ne.y-te,ge=Math.sqrt(se*se+he*he);if(!Wt.$(ge,0)){if(Wt.$(se,0))var ye=0>he?-Math.PI/2:Math.PI/2;else ye=Math.atan(he/Math.abs(se)),0>se&&(ye=Math.PI-ye);ne=y.x;var Me=y.y;se=b.x-ne;var Re=b.y-Me;for(he=Math.sqrt(se*se+Re*Re),Wt.$(se,0)?Re=0>Re?-Math.PI/2:Math.PI/2:(Re=Math.atan(Re/Math.abs(se)),0>se&&(Re=Math.PI-Re)),ge=he/ge,ye=Re-ye,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),se=y.x-E,he=y.y-te,y=Math.sqrt(se*se+he*he),Wt.$(y,0)||(Wt.$(se,0)?he=0>he?-Math.PI/2:Math.PI/2:(he=Math.atan(he/Math.abs(se)),0>se&&(he=Math.PI-he)),se=he+ye,y*=ge,this.L(a,ne+y*Math.cos(se),Me+y*Math.sin(se)));this.dd(x,b)}}return!0;case tv:if(te=this.i(a),Me=this.i(x),!te.Xa(y)||!Me.Xa(b)){E=te.x,te=te.y,ne=Me.x,Me=Me.y,ge=(ne-E)*(ne-E)+(Me-te)*(Me-te),se=y.x,ye=y.y,he=b.x,Re=b.y;var Ve=1;if(he-se!==0){var qe=(Re-ye)/(he-se);Ve=Math.sqrt(1+1/(qe*qe))}else qe=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var it=y.x,At=y.y,bt=.5;ge!==0&&(bt=((E-it)*(E-ne)+(te-At)*(te-Me))/ge);var Ot=E+bt*(ne-E),Ft=te+bt*(Me-te);y=Math.sqrt((it-Ot)*(it-Ot)+(At-Ft)*(At-Ft)),At<qe*(it-Ot)+Ft&&(y=-y),0<qe&&(y=-y),it=se+bt*(he-se),bt=ye+bt*(Re-ye),qe!==0?(y=it+y/Ve,this.L(a,y,bt-(y-it)/qe)):this.L(a,it,bt+y)}this.dd(x,b)}return!0;case Pg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),se=te.x,ye=te.y,Me=se,ge=ye,Wt.B(E.y,te.y)?Wt.B(te.x,ne.x)?ye=y.y:Wt.B(te.y,ne.y)&&(se=y.x):Wt.B(E.x,te.x)&&(Wt.B(te.y,ne.y)?se=y.x:Wt.B(te.x,ne.x)&&(ye=y.y)),this.L(a+1,se,ye),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),se=te.x,ye=te.y,he=se,Re=ye,Wt.B(E.y,te.y)?Wt.B(te.x,ne.x)?ye=b.y:Wt.B(te.y,ne.y)&&(se=b.x):Wt.B(E.x,te.x)&&(Wt.B(te.y,ne.y)?se=b.x:Wt.B(te.x,ne.x)&&(ye=b.y)),this.L(x-1,se,ye),Y0(this))){this.L(a+1,Me,ge),this.L(x-1,he,Re),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},kn.prototype.addOrthoPoints=function(a,y,x,b,E,te){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var se=E.actualBounds.copy(),he=te.actualBounds.copy();if(se.w()&&he.w()){se.Bc(Lg,Lg),he.Bc(Lg,Lg),se.Ye(a),he.Ye(x);var ge=Mt.alloc(),ye=Mt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&he.right>a.x||b===90&&x.y>a.y&&he.right>a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===180?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x<he.left?this.computeMidOrthoPosition(a.x,a.y,he.left,x.y,!1):a.x<he.right&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.right,ye.x=ge.x,ye.y=x.y):b===0&&a.x<he.left&&a.y>he.top&&a.y<he.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===180&&(he.ca(a)||se.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?ge.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===180||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>se.top&&ge.y<se.bottom&&(x.x>=se.left&&x.x<=a.x||a.x<=he.right&&a.x>=x.x?(b===90||b===270)&&(ge.h(Math.max((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===0?se.bottom:Math.max(se.bottom,he.bottom)),ye.x=x.x,ye.y=ge.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&he.left<a.x||b===90&&x.y>a.y&&he.left<a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===0?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x>he.right?this.computeMidOrthoPosition(a.x,a.y,he.right,x.y,!1):a.x>he.left&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.left,ye.x=ge.x,ye.y=x.y):b===180&&a.x>he.right&&a.y>he.top&&a.y<he.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===0&&(he.ca(a)||se.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?ge.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===0||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>se.top&&ge.y<se.bottom&&(x.x<=se.right&&x.x>=a.x||a.x>=he.left&&a.x<=x.x?(b===90||b===270)&&(ge.h(Math.min((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===180?se.bottom:Math.max(se.bottom,he.bottom)),ye.x=x.x,ye.y=ge.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&he.bottom>a.y||b===0&&x.x>a.x&&he.bottom>a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===270?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(ge.y=a.y<he.top?this.computeMidOrthoPosition(a.x,a.y,x.x,he.top,!0):a.y<he.bottom&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.bottom,ye.x=x.x,ye.y=ge.y):b===90&&a.y<he.top&&a.x>he.left&&a.x<he.right&&(ge.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===270&&(he.ca(a)||se.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?ge.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(ge.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>se.left&&ge.x<se.right&&(x.y>=se.top&&x.y<=a.y||a.y<=he.bottom&&a.y>=x.y?(b===0||b===180)&&(ge.h(a.x,Math.max((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===90?se.right:Math.max(se.right,he.right)),ye.x=ge.x,ye.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&he.top<a.y||b===0&&x.x>a.x&&he.top<a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===90?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(ge.y=a.y>he.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,he.bottom,!0):a.y>he.top&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.top,ye.x=x.x,ye.y=ge.y):b===270&&a.y>he.bottom&&a.x>he.left&&a.x<he.right&&(ge.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===90&&(he.ca(a)||se.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?ge.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(ge.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>se.left&&ge.x<se.right&&(x.y<=se.bottom&&x.y>=a.y||a.y>=he.top&&a.y<=x.y?(b===0||b===180)&&(ge.h(a.x,Math.min((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===270?se.right:Math.max(se.right,he.right)),ye.x=ge.x,ye.y=x.y)));var Me=x;if(this.isAvoiding){var Re=this.diagram;if(Re===null||E===te||this.layer.isTemporary||!op(Re)||se.ca(Me)&&!te.Td(E)||he.ca(a)&&!E.Td(te))y=!1;else{var Ve=ap(Re,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ve.Yj(Math.min(a.x,ge.x),Math.min(a.y,ge.y),Math.abs(a.x-ge.x),Math.abs(a.y-ge.y))&&Ve.Yj(Math.min(ge.x,ye.x),Math.min(ge.y,ye.y),Math.abs(ge.x-ye.x),Math.abs(ge.y-ye.y))&&Ve.Yj(Math.min(ye.x,Me.x),Math.min(ye.y,Me.y),Math.abs(ye.x-Me.x),Math.abs(ye.y-Me.y)))y=!1;else{E=a,te=Me;var qe=x=null;if(Re.isVirtualized){Re=Ve.bounds.copy(),Re.Bc(-Ve.Ho,-Ve.Go);var it=Mt.alloc();Mp(Ve,a.x,a.y)||(Wt.Ff(Re.x,Re.y,Re.x+Re.width,Re.y+Re.height,a.x,a.y,ge.x,ge.y,it)?(x=a=it.copy(),y=it.ab(ge)):Wt.Ff(Re.x,Re.y,Re.x+Re.width,Re.y+Re.height,ge.x,ge.y,ye.x,ye.y,it)?(x=a=it.copy(),y=it.ab(ye)):Wt.Ff(Re.x,Re.y,Re.x+Re.width,Re.y+Re.height,ye.x,ye.y,Me.x,Me.y,it)&&(x=a=it.copy(),y=it.ab(Me))),Mp(Ve,Me.x,Me.y)||(Wt.Ff(Re.x,Re.y,Re.x+Re.width,Re.y+Re.height,Me.x,Me.y,ye.x,ye.y,it)?(qe=Me=it.copy(),b=ye.ab(it)):Wt.Ff(Re.x,Re.y,Re.x+Re.width,Re.y+Re.height,ye.x,ye.y,ge.x,ge.y,it)?(qe=Me=it.copy(),b=ge.ab(it)):Wt.Ff(Re.x,Re.y,Re.x+Re.width,Re.y+Re.height,ge.x,ge.y,a.x,a.y,it)&&(qe=Me=it.copy(),b=a.ab(it))),Mt.free(it)}se=se.copy().ed(he),se.Bc(Ve.Ho*Ve.Os,Ve.Go*Ve.Os),aS(Ve,a,y,Me,b,se,!0),he=_h(Ve,Me.x,Me.y),!Ve.abort&&he>=Tp&&(oS(Ve),se.Bc(Ve.Ho*Ve.Hx,Ve.Go*Ve.Ix),aS(Ve,a,y,Me,b,se,!1),he=_h(Ve,Me.x,Me.y)),!Ve.abort&&he<Tp&&_h(Ve,Me.x,Me.y)!==Fc?(Z0(this,Ve,Me.x,Me.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Me.y):(se.x=Me.x,se.y=a.y),this.L(2,se.x,se.y),this.m(3,se.x,se.y)):(ne=this.i(3),y===0||y===180?Wt.B(se.x,ne.x)?(se=y===0?Math.max(se.x,a.x):Math.min(se.x,a.x),this.L(2,se,a.y),this.L(3,se,ne.y)):Wt.B(se.y,ne.y)?(Math.abs(a.y-se.y)<=Ve.Go/2&&(this.L(2,se.x,a.y),this.L(3,ne.x,a.y)),this.m(2,se.x,a.y)):this.L(2,a.x,se.y):(y===90||y===270)&&(Wt.B(se.y,ne.y)?(se=y===90?Math.max(se.y,a.y):Math.min(se.y,a.y),this.L(2,a.x,se),this.L(3,ne.x,se)):Wt.B(se.x,ne.x)?(Math.abs(a.x-se.x)<=Ve.Ho/2&&(this.L(2,a.x,se.y),this.L(3,a.x,ne.y)),this.m(2,a.x,se.y)):this.L(2,se.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),qe!==null&&(b===0||b===180?this.yf(te.x,qe.y):this.yf(qe.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ge.copy()),this.ne(ye.copy())),Mt.free(ge),Mt.free(ye)}},kn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var te=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(te=this.computeCurviness()),E?(y+b)/2+te:(a+x)/2+te};function Y0(a){if(a.diagram===null||!a.isAvoiding||!op(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=ap(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],te=y[b+1];if(!a.Yj(Math.min(E.x,te.x),Math.min(E.y,te.y),Math.abs(E.x-te.x),Math.abs(E.y-te.y)))return!0}return!1}function Z0(a,y,x,b,E,te,ne){var se=y.Ho,he=y.Go,ge=_h(y,x,b),ye=x,Me=b;for(E===0?ye+=se:E===90?Me+=he:E===180?ye-=se:Me-=he,E!==ne&&ge>od&&_h(y,ye,Me)!==ge-1&&(_h(y,x-se,b)===ge-1?(E=180,ye=x-se,Me=b):_h(y,x+se,b)===ge-1?(E=0,ye=x+se,Me=b):_h(y,x,b-he)===ge-1?(E=270,ye=x,Me=b-he):_h(y,x,b+he)===ge-1&&(E=90,ye=x,Me=b+he));ge>od&&_h(y,ye,Me)===ge-1;)x=ye,b=Me,E===0?ye+=se:E===90?Me+=he:E===180?ye-=se:Me-=he,--ge;te?ge>od&&(E===180||E===0?x=Math.floor(x/se)*se+se/2:(E===90||E===270)&&(b=Math.floor(b/he)*he+he/2)):(x=Math.floor(x/se)*se+se/2,b=Math.floor(b/he)*he+he/2),ge>od&&(te=E,ne=x,ye=b,E===0?(te=90,ye+=he):E===90?(te=180,ne-=se):E===180?(te=270,ye-=he):E===270&&(te=0,ne+=se),_h(y,ne,ye)===ge-1?Z0(a,y,ne,ye,te,!1,te):(ne=x,ye=b,E===0?(te=270,ye-=he):E===90?(te=0,ne+=se):E===180?(te=90,ye+=he):E===270&&(te=180,ne-=se),_h(y,ne,ye)===ge-1&&Z0(a,y,ne,ye,te,!1,te))),a.yf(x,b)}kn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=ea(y,a,x.x,x.y,b.x,b.y),te=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var se=ea(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},kn.prototype.qc=function(){this.lk=!1,this.v()},kn.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,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof Or&&(E.ua=this.ua)}}},kn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&id(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),te=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===ru&&3<=y&&!Wt.$(this.smoothness,0))if(y===3){var se=this.i(1);b=Math.min(E.x,se.x);var he=Math.min(E.y,se.y);se=this.i(2),b=Math.min(b,se.x),he=Math.min(he,se.y)}else{if(this.isOrthogonal)for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),he=this.i(b),te.x=Math.min(he.x,te.x),te.y=Math.min(he.y,te.y);b=te.x,he=te.y}else{for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);b=te.x,he=te.y}if(b-=this.su.x,he-=this.su.y,E.x-=b,E.y-=he,y!==2||id(this)){if(a.type=An.o,se=N1(a),this.computeShortLength(!0)!==0&&(E=jd(this,E,!0,te)),Pp(se,E.x,E.y,!1),ne===ru&&3<=y&&!Wt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-he,E=this.i(2).copy(),E.x-=b,E.y-=he,this.computeShortLength(!1)!==0&&(E=jd(this,E,!1,te)),Lc(se,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=Mt.allocAt(b,he),x=Mt.alloc(),x.assign(this.i(1)),te=Mt.allocAt(b,he),E=Mt.allocAt(b,he),ne=this.i(0);for(var ge,ye=this.smoothness/3,Me=1;Me<this.pointsCount-1;Me++){ge=this.i(Me);var Re=ne,Ve=ge,qe=this.i(J0(this,ge,Me,!1));if((!Wt.$(Re.x,Ve.x)||!Wt.$(Ve.x,qe.x))&&(!Wt.$(Re.y,Ve.y)||!Wt.$(Ve.y,qe.y))){var it=ye;isNaN(it)&&(it=this.smoothness/3);var At=Re.x;Re=Re.y;var bt=Ve.x;Ve=Ve.y;var Ot=qe.x;qe=qe.y;var Ft=it*$m(At,Re,bt,Ve);it*=$m(bt,Ve,Ot,qe),Wt.$(Re,Ve)&&Wt.$(bt,Ot)&&(bt>At?qe>Ve?(te.x=bt-Ft,te.y=Ve-Ft,E.x=bt+it,E.y=Ve+it):(te.x=bt-Ft,te.y=Ve+Ft,E.x=bt+it,E.y=Ve-it):qe>Ve?(te.x=bt+Ft,te.y=Ve-Ft,E.x=bt-it,E.y=Ve+it):(te.x=bt+Ft,te.y=Ve+Ft,E.x=bt-it,E.y=Ve-it)),Wt.$(At,bt)&&Wt.$(Ve,qe)&&(Ve>Re?(Ot>bt?(te.x=bt-Ft,te.y=Ve-Ft,E.x=bt+it):(te.x=bt+Ft,te.y=Ve-Ft,E.x=bt-it),E.y=Ve+it):(Ot>bt?(te.x=bt-Ft,te.y=Ve+Ft,E.x=bt+it):(te.x=bt+Ft,te.y=Ve+Ft,E.x=bt-it),E.y=Ve-it)),(Wt.$(At,bt)&&Wt.$(bt,Ot)||Wt.$(Re,Ve)&&Wt.$(Ve,qe))&&(At=.5*(At+Ot),Re=.5*(Re+qe),te.x=At,te.y=Re,E.x=At,E.y=Re),(Me===1||Me===2&&Wt.$(ne.x,this.i(0).x)&&Wt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+ge.x),x.y=.5*(ne.y+ge.y)),Lc(se,x.x-b,x.y-he,te.x-b,te.y-he,ge.x-b,ge.y-he),y.set(te),x.set(E),ne=ge}}ge=ne.x,ne=ne.y,ye=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ye=jd(this,ye.copy(),!1,yo)),ge=.5*(ge+ye.x),ne=.5*(ne+ye.y),Lc(se,E.x-b,E.y-he,ge-b,ne-he,ye.x-b,ye.y-he),Mt.free(y),Mt.free(x),Mt.free(te),Mt.free(E)}else for(x=3;x<y;x+=3)te=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=jd(this,ne.copy(),!1,yo)),Lc(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=Mt.alloc(),te.assign(this.i(0)),E=Mt.alloc(),E.assign(te),ne=this.computeCorner(),Me=1,ge=0;Me<y;){if(Me=J0(this,te,Me,1<Me),ye=this.i(Me),Me>=y-1){if(!te.D(ye))this.computeShortLength(!1)!==0&&(ye=jd(this,ye.copy(),!1,yo)),Fd(this,se,-b,-he,te,ye,x);else if(ge===0)for(Me=1;Me<y;)E.assign(te),ye=this.i(Me++),Fd(this,se,-b,-he,te,ye,x),te.assign(ye);break}if(ge=J0(this,ye,Me+1,Me<y-3),Me=-b,At=-he,Re=ye,bt=this.i(ge),it=x,Wt.B(te.y,Re.y)&&Wt.B(Re.x,bt.x))if(qe=Math.min(ne,Math.abs(Re.x-E.x)/2),qe=Ft=Math.min(qe,Math.abs(bt.y-Re.y)/2),Wt.B(qe,0))Fd(this,se,Me,At,te,Re,it),te.assign(Re);else{var It=Re.x,Gt=Re.y;Ve=It,Ot=Gt,Re.x>te.x?It=Re.x-qe:It=Re.x+qe,bt.y>Re.y?Ot=Re.y+Ft:Ot=Re.y-Ft,bt=Mt.allocAt(It,Gt),Fd(this,se,Me,At,te,bt,it),Mt.free(bt),Um(se,Re.x+Me,Re.y+At,Ve+Me,Ot+At),te.h(Ve,Ot)}else Wt.B(te.x,Re.x)&&Wt.B(Re.y,bt.y)?(qe=Math.min(ne,Math.abs(Re.y-E.y)/2),qe=Ft=Math.min(qe,Math.abs(bt.x-Re.x)/2),Wt.B(Ft,0)?(Fd(this,se,Me,At,te,Re,it),te.assign(Re)):(It=Re.x,Gt=Re.y,Ve=It,Ot=Gt,Re.y>te.y?Gt=Re.y-qe:Gt=Re.y+qe,bt.x>Re.x?Ve=Re.x+Ft:Ve=Re.x-Ft,bt=Mt.allocAt(It,Gt),Fd(this,se,Me,At,te,bt,it),Mt.free(bt),Um(se,Re.x+Me,Re.y+At,Ve+Me,Ot+At),te.h(Ve,Ot))):(Fd(this,se,Me,At,te,Re,it),te.assign(Re));E.assign(ye),Me=ge}Mt.free(te)}Wm=se}else se=this.i(1).copy(),se.x-=b,se.y-=he,this.computeShortLength(!0)!==0&&(E=jd(this,E,!0,te)),this.computeShortLength(!1)!==0&&(se=jd(this,se,!1,te)),a.type=An.j,a.startX=E.x,a.startY=E.y,a.endX=se.x,a.endY=se.y;return this.lk=!0,a};function $m(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Wt.$(a,0)?y:Wt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function jd(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var te=a.i(1);if(x=te.x-b.x,te=te.y-b.y,b=$m(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(te-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(te=a.i(E-2),x=te.x-b.x,te=te.y-b.y,b=$m(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-te)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function J0(a,y,x,b){for(var E=a.pointsCount,te=y;Wt.$(y.x,te.x)&&Wt.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!Wt.$(y.x,te.x)&&!Wt.$(y.y,te.y))return x-1;for(var ne=te;Wt.$(y.x,te.x)&&Wt.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||Wt.$(y.y,te.y)&&Wt.$(te.y,ne.y)&&(!b||(y.x>=te.x?te.x>=ne.x:te.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}kn.prototype.computeJumpLength=function(){return 10};function Fd(a,y,x,b,E,te,ne){if(!ne&&id(a)){ne=a.computeJumpLength();var se=ne/2,he=[],ge=0;if(a.isVisible()&&(ge=kx(a,E,te,he)),0<ge){if(Wt.B(E.y,te.y))if(E.x<te.x)for(var ye=0;ye<ge;){var Me=Math.max(E.x,Math.min(he[ye++]-se,te.x-ne));y.lineTo(Me+x,te.y+b);for(var Re=Me+x,Ve=Math.min(Me+ne,te.x);ye<ge&&(Me=he[ye],Me<Ve+ne);)ye++,Ve=Math.min(Me+se,te.x);Me=te.y-ne+b,Ve+=x;var qe=te.y+b;a.curve===jc?Pp(y,Ve,qe,!1):Lc(y,Re,Me,Ve,Me,Ve,qe)}else for(--ge;0<=ge;){for(ye=Math.min(E.x,Math.max(he[ge--]+se,te.x+ne)),y.lineTo(ye+x,te.y+b),Re=ye+x,Me=Math.max(ye-ne,te.x);0<=ge&&(ye=he[ge],ye>Me-ne);)ge--,Me=Math.max(ye-se,te.x);ye=te.y-ne+b,Me+=x,Ve=te.y+b,a.curve===jc?Pp(y,Me,Ve,!1):Lc(y,Re,ye,Me,ye,Me,Ve)}else if(Wt.B(E.x,te.x))if(E.y<te.y)for(ye=0;ye<ge;){for(Me=Math.max(E.y,Math.min(he[ye++]-se,te.y-ne)),y.lineTo(te.x+x,Me+b),Re=Me+b,Me=Math.min(Me+ne,te.y);ye<ge&&(Ve=he[ye],Ve<Me+ne);)ye++,Me=Math.min(Ve+se,te.y);Ve=te.x-ne+x,qe=te.x+x,Me+=b,a.curve===jc?Pp(y,qe,Me,!1):Lc(y,Ve,Re,Ve,Me,qe,Me)}else for(--ge;0<=ge;){for(ye=Math.min(E.y,Math.max(he[ge--]+se,te.y+ne)),y.lineTo(te.x+x,ye+b),Re=ye+b,ye=Math.max(ye-ne,te.y);0<=ge&&(Me=he[ge],Me>ye-ne);)ge--,ye=Math.max(Me-se,te.y);Me=te.x-ne+x,Ve=te.x+x,ye+=b,a.curve===jc?Pp(y,Ve,ye,!1):Lc(y,Me,Re,Me,ye,Ve,ye)}}}y.lineTo(te.x+x,te.y+b)}function kx(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var te=E.value;if(te!==null&&te.visible){te=te.Pa.s;for(var ne=te.length,se=0;se<ne;se++){var he=te[se];if(he instanceof kn){if(he===a)return 0<b.length&&b.sort(function(ye,Me){return ye-Me}),b.length;if(he.isVisible()&&id(he)){var ge=he.routeBounds;ge.w()&&a.routeBounds.Yc(ge)&&!a.usesSamePort(he)&&(ge=he.path,ge!==null&&ge.Ed()&&Mx(y,x,b,he))}}}}}return 0<b.length&&b.sort(function(ye,Me){return ye-Me}),b.length}function Mx(a,y,x,b){for(var E=Wt.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=Mt.alloc(),he=1;he<te;he++){var ge=b.i(he);if(he<te-1){var ye=b.i(he+1);if(ne.y===ge.y&&ge.y===ye.y){if(ge.x>ne.x&&ye.x>=ge.x||ge.x<ne.x&&ye.x<=ge.x)continue}else if(ne.x===ge.x&&ge.x===ye.x&&(ge.y>ne.y&&ye.y>=ge.y||ge.y<ne.y&&ye.y<=ge.y))continue}e:{ye=a.x;var Me=a.y,Re=y.x,Ve=y.y,qe=ne.x;ne=ne.y;var it=ge.x,At=ge.y;if(Wt.B(ye,Re)){if(!Wt.B(Me,Ve)&&Wt.B(ne,At)&&Math.min(Me,Ve)<ne&&Math.max(Me,Ve)>ne&&Math.min(qe,it)<ye&&Math.max(qe,it)>ye&&!Wt.B(qe,it)){se.x=ye,se.y=ne,ye=!0;break e}}else if(Wt.B(Me,Ve)&&Wt.B(qe,it)&&Math.min(ye,Re)<qe&&Math.max(ye,Re)>qe&&Math.min(ne,At)<Me&&Math.max(ne,At)>Me&&!Wt.B(ne,At)){se.x=qe,se.y=Me,ye=!0;break e}se.x=0,se.y=0,ye=!1}ye&&(E?x.push(se.x):x.push(se.y)),ne=ge}Mt.free(se)}function id(a){return a=a.curve,a===kp||a===jc}function qm(a,y){(y||id(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()))}kn.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 b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var te=!1;E=E.Pa.s;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];he instanceof kn&&(he===this?te=!0:te&&tS(this,he,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)se=te[ne],se instanceof kn&&tS(this,se,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&id(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}kn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},kn.prototype.isVisible=function(){if(!rr.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 b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.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},kn.prototype.Zb=function(a){if(rr.prototype.Zb.call(this,a),a&&qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},kn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?Pg:this.qk};function wg(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,te=a=null,ne=y.jb.s,se=ne.length,he=0;he<se;he++){var ge=ne[he];(ge.ef===y&&ge.ff===b&&ge.uf===x&&ge.vf===E||ge.ef===x&&ge.ff===E&&ge.uf===y&&ge.vf===b)&&(te===null?te=ge:(a===null&&(a=[],a.push(te)),a.push(ge)))}if(a!==null){for(te=W1(y,x,b,E),te===null&&(te=new iv(y,b,x,E),U1(y,te),U1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function bg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(zi(y.links,a),y.Sl()))}kn.prototype.ph=function(){return!0},hn.Object.defineProperties(kn.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&&Xm(y,this,x),bg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Vm(a,this,E),wg(this),this.C(1)),this.g("fromNode",y,a),Cp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Rl(x),bg(this),this.ff=a;var b=this.fromPort;b!==null&&Rl(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.xv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.fromPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),wg(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&&Xm(y,this,x),bg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,te=this.toPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Vm(a,this,E),wg(this),this.C(1)),this.g("toNode",y,a),Cp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Rl(x),bg(this),this.vf=a;var b=this.toPort;b!==null&&Rl(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.Cv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.toPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),wg(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:Ba},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&&Rl(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&&Nr(a,">= 0",kn,"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:Ba},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&&Rl(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&&Nr(a,">= 0",kn,"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?Ri: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&&xg(this.fromNode),this.toNode!==null&&xg(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Or?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===ru&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var te=this.i(2);y=Math.min(te.x,y),x=Math.min(te.y,x),Wt.Dl(E.x,E.y,b.x,b.y,b.x,b.y,te.x,te.y,.5,a)}else for(te=3;te<b;te+=3){var ne=this.i(te-2);te+3>=b&&(te=b-1);var se=this.i(te-1),he=this.i(te);Wt.Dl(E.x,E.y,ne.x,ne.y,se.x,se.y,he.x,he.y,.5,a),y=Math.min(he.x,y),x=Math.min(he.y,x),E=he}else for(E=this.i(0),te=this.i(1),y=Math.min(E.x,te.x),x=Math.min(E.y,te.y),a.h(E.x,E.y,0,0),a.Ye(te),E=2;E<b;E++)te=this.i(E),y=Math.min(te.x,y),x=Math.min(te.y,x),a.Ye(te);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Mt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Zm(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var b=this.i(x),E=this.i(x+1);Wt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Wt.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];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 b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new Ln,b=0;b<a.length/2;b++)E=new Mt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var te=a[E];if(!Tn(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new Ln,b=0;b<a.length;b++)E=a[b],x.add(new Mt(E.x,E.y).freeze())}}else if(a instanceof Ln)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Zt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Zm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ui(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||!Ep(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Ep(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(),qm(this,y===jc||y===kp||a===jc||a===kp),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(),qm(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)}}}),kn.prototype.invalidateOtherJumpOvers=kn.prototype.Xo,kn.prototype.findClosestSegment=kn.prototype.ez,kn.prototype.updateRoute=kn.prototype.vg,kn.prototype.invalidateRoute=kn.prototype.bb,kn.prototype.rollbackRoute=kn.prototype.rv,kn.prototype.commitRoute=kn.prototype.zf,kn.prototype.startRoute=kn.prototype.uh,kn.prototype.clearPoints=kn.prototype.Fj,kn.prototype.removePoint=kn.prototype.pv,kn.prototype.addPointAt=kn.prototype.yf,kn.prototype.addPoint=kn.prototype.ne,kn.prototype.insertPointAt=kn.prototype.m,kn.prototype.insertPoint=kn.prototype.Kz,kn.prototype.setPointAt=kn.prototype.L,kn.prototype.setPoint=kn.prototype.dd,kn.prototype.getPoint=kn.prototype.i,kn.prototype.getOtherPort=kn.prototype.Cz,kn.prototype.getOtherNode=kn.prototype.To;var Dd=null,Id=null,Q0=new tn(kn,"Normal",1),Tx=new tn(kn,"Orthogonal",2),Lx=new tn(kn,"AvoidsNodes",6),nS=new tn(kn,"AvoidsNodesStraight",7),Qs=new tn(kn,"None",0),ru=new tn(kn,"Bezier",9),jc=new tn(kn,"JumpGap",10),kp=new tn(kn,"JumpOver",11),Pg=new tn(kn,"End",17),ev=new tn(kn,"Scale",18),tv=new tn(kn,"Stretch",19),Cg=new tn(kn,"OrientAlong",21),Eg=new tn(kn,"OrientPlus90",22),kg=new tn(kn,"OrientMinus90",23),$0=new tn(kn,"OrientOpposite",24),nv=new tn(kn,"OrientUpright",25),Mg=new tn(kn,"OrientPlus90Upright",26),Tg=new tn(kn,"OrientMinus90Upright",27),rv=new tn(kn,"OrientUpright45",28),rS=16,iS=14,Lg=8;kn.className="Link",kn.Normal=Q0,kn.Orthogonal=Tx,kn.AvoidsNodes=Lx,kn.AvoidsNodesStraight=nS,kn.None=Qs,kn.Bezier=ru,kn.JumpGap=jc,kn.JumpOver=kp,kn.End=Pg,kn.Scale=ev,kn.Stretch=tv,kn.OrientAlong=Cg,kn.OrientPlus90=Eg,kn.OrientMinus90=kg,kn.OrientOpposite=$0,kn.OrientUpright=nv,kn.OrientPlus90Upright=Mg,kn.OrientMinus90Upright=Tg,kn.OrientUpright45=rv,kn.EndSegmentStep=8,kn.CurvinessStart=rS,kn.SpacingMin=iS,kn.OrthoShortCut=Lg;function iv(a,y,x,b){vo(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}iv.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},iv.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))}},iv.className="LinkBundle";function Ag(a){vo(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}Ag.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=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((b+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=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=q0,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function Mp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function _h(a,y,x){return Mp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):q0}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=od&&(x[b]=q0)}Ag.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<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 E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var te=y;te<=x;te++)if(E[te]===Fc)return!1}return!0};function Gh(a,y,x,b,E,te,ne,se,he){if(!(y<te||y>ne||x<se||x>he)){var ge=y|0,ye=x|0,Me=a.ac[ge][ye];if(Me>=od&&Me<Tp)for(E?ye+=b:ge+=b,Me+=1;te<=ge&&ge<=ne&&se<=ye&&ye<=he&&!(Me>=a.ac[ge][ye]);)a.ac[ge][ye]=Me,Me+=1,E?ye+=b:ge+=b;if(ge=E?ye:ge,E)if(0<b)for(x+=b;x<ge;x+=b)Gh(a,y,x,1,!E,te,ne,se,he),Gh(a,y,x,-1,!E,te,ne,se,he);else for(x+=b;x>ge;x+=b)Gh(a,y,x,1,!E,te,ne,se,he),Gh(a,y,x,-1,!E,te,ne,se,he);else if(0<b)for(y+=b;y<ge;y+=b)Gh(a,y,x,1,!E,te,ne,se,he),Gh(a,y,x,-1,!E,te,ne,se,he);else for(y+=b;y>ge;y+=b)Gh(a,y,x,1,!E,te,ne,se,he),Gh(a,y,x,-1,!E,te,ne,se,he)}}function ov(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var ge=Fc,ye=od;for(a.ac[y][x]=ye;ge===Fc&&y>te&&y<ne&&x>se&&x<he;)ye+=1,a.ac[y][x]=ye,E?x+=b:y+=b,ge=a.ac[y][x]}function av(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var ge=Fc,ye=Tp;for(a.ac[y][x]=ye;ge===Fc&&y>te&&y<ne&&x>se&&x<he;)a.ac[y][x]=ye,E?x+=b:y+=b,ge=a.ac[y][x]}function aS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var se=y.x,he=y.y;if(Mp(a,se,he)){se-=a.Nd,se/=a.rc,he-=a.Od,he/=a.sc;var ge=b.x,ye=b.y;if(Mp(a,ge,ye))if(ge-=a.Nd,ge/=a.rc,ye-=a.Od,ye/=a.sc,1>=Math.abs(se-ge)&&1>=Math.abs(he-ye))a.abort=!0;else{var Me=te.x;b=te.y,y=te.x+te.width;var Re=te.y+te.height;Me-=a.Nd,Me/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Re-=a.Od,Re/=a.sc,te=Math.max(0,Math.min(a.di,Me|0)),y=Math.min(a.di,Math.max(0,y|0)),Me=Math.max(0,Math.min(a.ei,b|0)),Re=Math.min(a.ei,Math.max(0,Re|0)),b=a.ac,se|=0,he|=0,ge|=0,ye|=0;var Ve=x===0||x===90?1:-1;if(x=x===90||x===270,b[se][he]===Fc?(ov(a,se,he,Ve,x,te,y,Me,Re),ov(a,se,he,1,!x,te,y,Me,Re),ov(a,se,he,-1,!x,te,y,Me,Re)):ov(a,se,he,Ve,x,se,he,se,he),b[ge][ye]===Fc?(av(a,ge,ye,E===0||E===90?1:-1,E===90||E===270,te,y,Me,Re),av(a,ge,ye,1,!(E===90||E===270),te,y,Me,Re),av(a,ge,ye,-1,!(E===90||E===270),te,y,Me,Re)):av(a,ge,ye,Ve,x,ge,ye,ge,ye),x=xr(),ne&&sS(a,ge,ye,E,se,he,x))for((x[0]!==ge||x[1]!==ye)&&(x.unshift(ye),x.unshift(ge)),(x[x.length-2]!==se||x[x.length-1]!==he)&&(x.push(se),x.push(he)),a=od,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,te=x.length-4;0<=te;te-=2)for(E=x[te+2],ne=x[te+3],y=x[te],ge=x[te+1];y>E?E++:y<E?E--:ge>ne?ne++:ge<ne&&ne--,b[E][ne]=a++,E!==y||ne!==ge;);else Gh(a,se,he,1,!1,te,y,Me,Re),Gh(a,se,he,-1,!1,te,y,Me,Re),Gh(a,se,he,1,!0,te,y,Me,Re),Gh(a,se,he,-1,!0,te,y,Me,Re);gr(x)}}}}function sS(a,y,x,b,E,te,ne){for(var se=a.ac,he=y,ge=x;;){if(he===E&&ge===te)return!0;var ye=he,Me=ge;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Me<te)Me++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Me>te)Me--;else break;var Re=se[ye][Me];if(Re===0||Re===ey)break;he=ye,ge=Me}for(;;){if(ye=b,Me=he,Re=ge,b===0?Re<te?(ye=90,Re++):Re>te&&(ye=270,Re--):b===90?Me<E?(ye=0,Me++):Me>E&&(ye=180,Me--):b===180?Re<te?(ye=90,Re++):Re>te&&(ye=270,Re--):Me<E?(ye=0,Me++):Me>E&&(ye=180,Me--),Me=se[Me][Re],ye!==b&&Me!==0&&Me!==ey){if(ne.push(he),ne.push(ge),sS(a,he,ge,ye,E,te,ne))return!0;ne.pop(),ne.pop()}if(se[he][ge]=ey,b===0){if(he===y)return!1;he--}else if(b===90){if(ge===x)return!1;ge--}else if(b===180){if(he===y)return!1;he++}else{if(ge===x)return!1;ge++}}}hn.Object.defineProperties(Ag.prototype,{bounds:{get:function(){return new rn(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 Fc=0,od=1,Tp=999999,q0=Tp+1,ey=Tp+2;Ag.className="PositionArray";function Bd(){vo(this),this.port=this.node=null,this.pe=[],this.ap=!1}Bd.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
`+b.toString())}return y};function Ax(a,y,x,b){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 b&&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}Bd.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,te=E instanceof Er?E:null;if(te===null||te.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!te.actualBounds.w()){a.ap=x;break e}b=te,ne=b.Lu()}te=a.pe.length=0;var se=a.port.ga(Ma,Mt.alloc()),he=a.port.ga(Yl,Mt.alloc());for(E=rn.allocAt(se.x,se.y,0,0),E.Ye(he),Mt.free(se),Mt.free(he),se=Mt.allocAt(E.x+E.width/2,E.y+E.height/2),he=a.port.li(),ne=ne.iterator;ne.next();){var ge=ne.value;if(ge.isVisible()&&ge.fromPort!==ge.toPort){var ye=ge.fromPort===a.port||ge.fromNode!==null&&ge.fromNode.Td(b),Me=ge.computeSpot(ye,a.port);if(Me.$c()&&(ye=ye?ge.toPort:ge.fromPort,ye!==null)){var Re=ye.part;if(Re!==null){var Ve=Re.findVisibleNode();Ve!==null&&Ve!==Re&&(Re=Ve,ye=Re.port),ye=ge.computeOtherPoint(Re,ye),Re=se.ab(ye),Re-=he,0>Re?Re+=360:360<=Re&&(Re-=360),Me=Ax(E,Me,Re,ge.isOrthogonal),Me===0?(Me=4,180<Re&&(Re-=360)):Me===90?(Me=8,270<Re&&(Re-=360)):Me===180?Me=2:(Me=1,90>Re&&(Re+=360)),Ve=a.pe[te],Ve===void 0?(Ve=new ty(ge,Re,Me),a.pe[te]=Ve):(Ve.link=ge,Ve.angle=Re,Ve.Nc=Me),Ve.hv.set(ye),te++}}}}for(Mt.free(se),a.pe.sort(Bd.prototype.j),he=a.pe.length,b=-1,te=se=0;te<he;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,se=0),ne.Uo=se,se++);for(b=-1,se=0,te=he-1;0<=te;te--)he=a.pe[te],he!==void 0&&(he.Nc!==b&&(b=he.Nc,se=he.Uo+1),he.Gl=se);if(te=a.pe,Me=a.port,b=a.node.portSpreading,se=Mt.alloc(),he=Mt.alloc(),ne=Mt.alloc(),ge=Mt.alloc(),Me.ga(Ma,se),Me.ga(Ta,he),Me.ga(Yl,ne),Me.ga(al,ge),Ve=Re=ye=Me=0,b===H0)for(var qe=0;qe<te.length;qe++){var it=te[qe];if(it!==null){var At=it.link.computeThickness();switch(it.Nc){case 8:Re+=At;break;case 2:Ve+=At;break;case 1:Me+=At;break;default:case 4:ye+=At}}}var bt=qe=0,Ot=1,Ft=it=0;for(At=0;At<te.length;At++){var It=te[At];if(It!==null){if(qe!==It.Nc){switch(qe=It.Nc,qe){case 8:var Gt=ne;bt=ge;break;case 2:Gt=ge,bt=se;break;case 1:Gt=se,bt=he;break;default:case 4:Gt=he,bt=ne}switch(it=bt.x-Gt.x,Ft=bt.y-Gt.y,qe){case 8:Re>Math.abs(it)?(Ot=Math.abs(it)/Re,Re=Math.abs(it)):Ot=1;break;case 2:Ve>Math.abs(Ft)?(Ot=Math.abs(Ft)/Ve,Ve=Math.abs(Ft)):Ot=1;break;case 1:Me>Math.abs(it)?(Ot=Math.abs(it)/Me,Me=Math.abs(it)):Ot=1;break;default:case 4:ye>Math.abs(Ft)?(Ot=Math.abs(Ft)/ye,ye=Math.abs(Ft)):Ot=1}bt=0}var Yt=It.Zo;if(b===H0){switch(It=It.link.computeThickness(),It*=Ot,Yt.set(Gt),qe){case 8:Yt.x=Gt.x+it/2+Re/2-bt-It/2;break;case 2:Yt.y=Gt.y+Ft/2+Ve/2-bt-It/2;break;case 1:Yt.x=Gt.x+it/2-Me/2+bt+It/2;break;default:case 4:Yt.y=Gt.y+Ft/2-ye/2+bt+It/2}bt+=It}else{var Bn=.5;b===Ym&&(Bn=(It.Uo+1)/(It.Gl+1)),Yt.x=Gt.x+it*Bn,Yt.y=Gt.y+Ft*Bn}}}for(Mt.free(se),Mt.free(he),Mt.free(ne),Mt.free(ge),Gt=a.pe,te=0;te<Gt.length;te++)b=Gt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,rn.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}Bd.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},Bd.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ba,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},Bd.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Mt,this.Gl=this.Uo=0,this.Zo=new Mt,this.Ju=0}ty.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()},ty.className="LinkInfo";function Eo(a){vo(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Mt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Eo.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},Eo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Eo.prototype.qb=function(){},Eo.prototype.toString=function(){var a=Lr(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Eo.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())}}},Eo.prototype.createNetwork=function(){return new Zi(this)},Eo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Vt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Er?y.lg(a.memberParts):y.lg(a.iterator),y},Eo.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")}},Eo.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()}},Eo.prototype.doLayout=function(a){var y=new Nn;a instanceof Vt?(hf(this,y,a.nodes,!0,this.rh,!0,!1,!0),hf(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Er?hf(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},Eo.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,te=0,ne=0;for(a=a.iterator;a.next();){var se=a.value;Ng(se);var he=se.measuredBounds,ge=he.width;he=he.height,se.moveTo(b,E),se instanceof Er&&(se.rh=!1),b+=Math.max(ge,50)+20,ne=Math.max(ne,Math.max(he,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},Eo.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,b=this.arrangementOrigin.y,E=0,te=0,ne=this.network.vertexes.iterator;ne.next();){var se=ne.value.node;if(!(se===null||se instanceof kn)&&(Ng(se),this.rh(se))){var he=se.measuredBounds,ge=he.width;he=he.height,se.moveTo(x,b),se instanceof Er&&(se.rh=!1),x+=Math.max(ge,50)+20,te=Math.max(te,Math.max(he,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},Eo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Er&&a.rh)};function hf(a,y,x,b,E,te,ne,se){for(x=x.iterator;x.next();){var he=x.value;b&&!he.isTopLevel||E!==null&&!E(he)||!he.canLayout()||(te&&he instanceof Gn?he.isLinkLabel||(he instanceof Er&&he.layout===null?hf(a,y,he.memberParts,!1,E,te,ne,se):(Ng(he),y.add(he))):ne&&he instanceof kn?y.add(he):!se||!he.Zc()||he instanceof Gn||(Ng(he),y.add(he)))}}function Ng(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Eo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new rn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Eo.prototype.ex=function(a){var y=new Nn;return a instanceof Vt?(hf(this,y,a.nodes,!0,null,!0,!0,!0),hf(this,y,a.links,!0,null,!0,!0,!0),hf(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Er?hf(this,y,a.memberParts,!1,null,!0,!0,!0):hf(this,y,a.iterator,!1,null,!0,!0,!0),y},Eo.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(Ma),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},hn.Object.defineProperties(Eo.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())}}}),Eo.prototype.collectParts=Eo.prototype.ex,Eo.prototype.getLayoutBounds=Eo.prototype.ni,Eo.prototype.invalidateLayout=Eo.prototype.C,Eo.className="Layout";function Zi(a){vo(this),this.Sc=a,this.wf=new Nn,this.ye=new Nn,this.Es=new Vn,this.zs=new Vn}Zi.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 Nn,this.ye=new Nn,this.Es=new Vn,this.zs=new Vn},Zi.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},Zi.prototype.createVertex=function(){return new ka(this)},Zi.prototype.createEdge=function(){return new _l(this)},Zi.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof Gn)return!ne.isLinkLabel;if(ne instanceof kn){var se=ne.fromNode;return se===null||se.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Gn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Er&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof kn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var te=b.fromNode;E=b.toNode,te!==null&&E!==null&&te!==E&&(te=this.findGroupVertex(te),E=this.findGroupVertex(E),te!==null&&E!==null&&this.Zj(te,E,b))}}},Zi.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},Ze=Zi.prototype,Ze.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Ze.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},Ze.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function uS(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Ze.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Ze.ki=function(a){return a===null?null:this.Es.I(a)},Ze.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(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}}Ze.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},Ze.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ry(this,a)}};function ry(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Ze.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Ze.Lo=function(a){return a===null?null:this.zs.I(a)},Ze.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},Ze.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))}},Ze.Ko=function(){for(var a=xr(),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]);gr(a)},Zi.prototype.deleteArtificialVertexes=function(){for(var a=xr(),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=xr(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);gr(a),gr(y)};function Nx(a){for(var y=xr(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);gr(y)}Zi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new Ln;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,b),y=!0;break}}}return a.sort(function(E,te){return E===null||te===null||E===te?0:te.vertexes.count-E.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(ry(a,E),ny(y,E),iy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(ry(a,x),ny(y,x),iy(a,y,x.toVertex))}}Zi.prototype.dz=function(){for(var a=new Nn,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},hn.Object.defineProperties(Zi.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}}}),Zi.prototype.findAllParts=Zi.prototype.dz,Zi.prototype.splitIntoSubNetworks=Zi.prototype.Zx,Zi.prototype.deleteSelfEdges=Zi.prototype.Ko,Zi.prototype.reverseEdge=Zi.prototype.gm,Zi.prototype.linkVertexes=Zi.prototype.Zj,Zi.prototype.findEdge=Zi.prototype.Lo,Zi.prototype.deleteLink=Zi.prototype.Yy,Zi.prototype.deleteEdge=Zi.prototype.Mj,Zi.prototype.addLink=Zi.prototype.Dy,Zi.prototype.addEdge=Zi.prototype.Bo,Zi.prototype.findVertex=Zi.prototype.ki,Zi.prototype.deleteNode=Zi.prototype.Zy,Zi.prototype.deleteVertex=Zi.prototype.Iu,Zi.prototype.addNode=Zi.prototype.Bl,Zi.prototype.addVertex=Zi.prototype.dh,Zi.prototype.addParts=Zi.prototype.lg,Zi.className="LayoutNetwork";function ka(a){vo(this),this.ob=a,this.j=new rn(0,0,10,10).freeze(),this.o=new Mt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Ln,this.mg=new Ln}ka.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Ln,this.mg=new Ln},ka.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Xt(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var te=b.value;x?x=!1:E+=",",E+=te.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},ka.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Tn(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 Er)){x=rn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(oi);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),rn.free(x);return}rn.free(x)}a.moveTo(y.x,y.y)}},ka.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ka.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ka.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ka.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(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}hn.Object.defineProperties(ka.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,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,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=rn.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,te=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,te,b),rn.free(x),!(a instanceof Er)&&(a=a.locationObject.ga(oi),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(te/2,b/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 Nn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Nn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Nn,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 Ln,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}}}),ka.prototype.deleteDestinationEdge=ka.prototype.Jl,ka.prototype.addDestinationEdge=ka.prototype.zl,ka.prototype.deleteSourceEdge=ka.prototype.Kl,ka.prototype.addSourceEdge=ka.prototype.Cl,ka.className="LayoutVertex",ka.standardComparer=oy,ka.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 b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}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 _l(a){vo(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}_l.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},_l.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Xt(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},_l.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},_l.prototype.commit=function(){},_l.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},hn.Object.defineProperties(_l.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)}}}),_l.prototype.getOtherVertex=_l.prototype.Ax,_l.className="LayoutEdge";function ns(a){Eo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new jn(NaN,NaN).freeze(),this.tf=new jn(10,10).freeze(),this.Jb=Og,this.Rb=lv,this.nd=jg,this.hd=hS,a&&Object.assign(this,a)}Kt(ns,Eo),ns.prototype.cloneProtected=function(a){Eo.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},ns.prototype.qb=function(a){a.classType===ns?a===jg||a===hv||a===ay||a===uv?this.sorting=a:a===lv||a===$u?this.arrangement=a:a===Og||a===sv?this.alignment=a:Zt("Unknown enum value: "+a):Eo.prototype.qb.call(this,a)},ns.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 b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof Er)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case uv:E.reverse();break;case jg:E.sort(this.comparer);break;case hv:E.sort(this.comparer),E.reverse()}var te=this.wrappingColumn;isNaN(te)&&(te=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=te&&0>=ne&&(te=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case sv:var se=y,he=x,ge=rn.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Me=ye=0;Me<E.length;Me++){var Re=this.ni(E[Me],ge);ye=Math.max(ye,Re.width)}if(ye=Math.max(ye+se,1),Me=Math.max(this.cellSize.height,1),!isFinite(Me))for(Re=Me=0;Re<E.length;Re++){var Ve=this.ni(E[Re],ge);Me=Math.max(Me,Ve.height)}Me=Math.max(Me+he,1),Re=this.arrangement;for(var qe=Ve=this.arrangementOrigin.x,it=this.arrangementOrigin.y,At=0,bt=0,Ot=0;Ot<E.length;Ot++){var Ft=E[Ot],It=this.ni(Ft,ge),Gt=Math.ceil((It.width+se)/ye)*ye,Yt=Math.ceil((It.height+he)/Me)*Me;switch(Re){case $u:var Bn=Math.abs(qe-It.width);break;default:Bn=qe+It.width}switch((0<te&&At>te-1||0<ne&&0<At&&Bn-Ve>ne)&&(b.push(new rn(0,it,ne+se,bt)),At=0,qe=Ve,it+=bt,bt=0),bt=Math.max(bt,Yt),Re){case $u:It=-It.width;break;default:It=0}switch(Ft.moveTo(qe+It,it),Re){case $u:qe-=Gt;break;default:qe+=Gt}At++}b.push(new rn(0,it,ne+se,bt)),rn.free(ge);break;case Og:for(he=ne,ye=te,Me=y,Re=x,ne=rn.alloc(),Ve=Math.max(this.cellSize.width,1),te=it=ge=0,se=Mt.alloc(),qe=0;qe<E.length;qe++)bt=E[qe],At=this.ni(bt,ne),bt=Ac(bt,bt.locationObject,bt.locationSpot,se),ge=Math.max(ge,bt.x),it=Math.max(it,At.width-bt.x),te=Math.max(te,bt.y);switch(qe=this.arrangement,qe){case $u:ge+=Me;break;default:it+=Me}Ve=isFinite(Ve)?Math.max(Ve+Me,1):Math.max(ge+it,1);var Zn=bt=this.arrangementOrigin.x;for(Ot=this.arrangementOrigin.y,it=0,he>=ge&&(he-=ge),ge=Ft=0,Gt=Math.max(this.cellSize.height,1),It=te=0,Yt=!0,At=Mt.alloc(),Bn=0;Bn<E.length;Bn++){var Hn=E[Bn],En=this.ni(Hn,ne),fn=Ac(Hn,Hn.locationObject,Hn.locationSpot,se);if(0<it)switch(qe){case $u:Zn=(Zn-bt-(En.width-fn.x))/Ve,Zn=Wt.$(Math.round(Zn),Zn)?Math.round(Zn):Math.floor(Zn),Zn=Zn*Ve+bt;break;default:Zn=(Zn-bt+fn.x)/Ve,Zn=Wt.$(Math.round(Zn),Zn)?Math.round(Zn):Math.ceil(Zn),Zn=Zn*Ve+bt}else switch(qe){case $u:Ft=Zn+fn.x+En.width;break;default:Ft=Zn-fn.x}switch(qe){case $u:var Cr=-(Zn+fn.x)+Ft;break;default:Cr=Zn+En.width-fn.x-Ft}if(0<ye&&it>ye-1||0<he&&0<it&&Cr>he){for(b.push(new rn(0,Yt?Ot-te:Ot,he+Me,It+te+Re)),Zn=0;Zn<it&&Bn!==it;Zn++){Cr=E[Bn-it+Zn];var Sr=Ac(Cr,Cr.locationObject,Cr.locationSpot,At);Cr.moveTo(Cr.position.x,Cr.position.y+te-Sr.y)}It+=Re,Ot=Yt?Ot+It:Ot+(It+te),it=It=te=0,Zn=bt,Yt=!1}switch(Zn===bt&&(ge=qe===$u?Math.max(ge,En.width-fn.x):Math.min(ge,-fn.x)),te=Math.max(te,fn.y),It=Math.max(It,En.height-fn.y),isFinite(Gt)&&(It=Math.max(It,Math.max(En.height,Gt)-fn.y)),Yt?Hn.moveTo(Zn-fn.x,Ot-fn.y):Hn.moveTo(Zn-fn.x,Ot),qe){case $u:Zn-=fn.x+Me;break;default:Zn+=En.width-fn.x+Me}it++}if(b.push(new rn(0,Ot,he+Me,(Yt?It:It+te)+Re)),E.length!==it)for(he=0;he<it;he++)ye=E[E.length-it+he],Me=Ac(ye,ye.locationObject,ye.locationSpot,se),ye.moveTo(ye.position.x,ye.position.y+te-Me.y);if(Mt.free(se),Mt.free(At),qe===$u)for(E=0;E<b.length;E++)te=b[E],te.width+=ge,te.x-=ge;else for(E=0;E<b.length;E++)te=b[E],te.x>ge&&(te.width+=te.x-ge,te.x=ge);rn.free(ne)}for(se=te=ne=E=0;se<b.length;se++)he=b[se],E=Math.min(E,he.x),ne=Math.min(ne,he.y),te=Math.max(te,he.x+he.width);this.arrangement===$u?this.commitLayers(b,new Mt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new Mt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},ns.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}hn.Object.defineProperties(ns.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!==Og&&a!==sv||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==lv&&a!==$u||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==uv&&a!==jg&&a!==hv||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var sv=new tn(ns,"Position",0),Og=new tn(ns,"Location",1),lv=new tn(ns,"LeftToRight",2),$u=new tn(ns,"RightToLeft",3),ay=new tn(ns,"Forward",4),uv=new tn(ns,"Reverse",5),jg=new tn(ns,"Ascending",6),hv=new tn(ns,"Descending",7);ns.className="GridLayout",ns.standardComparer=hS,ns.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 b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},ns.Position=sv,ns.Location=Og,ns.LeftToRight=lv,ns.RightToLeft=$u,ns.Forward=ay,ns.Reverse=uv,ns.Ascending=jg,ns.Descending=hv;function ki(){this.On=new Nn,this.Dn=new Nn,this.Pa=new Nn,this.cf=new Vn,this.bf=new Vn,this.aj=new Vn,this.H=null,this.tp=!1}Ze=ki.prototype,Ze.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Ze.Xe=function(a){this.H=a},Ze.oi=function(a){if(a instanceof Gn){if(this.On.add(a),a instanceof Er){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 kn?this.Dn.add(a):a instanceof ai||this.Pa.add(a);y=a.data,y===null||a instanceof ai||(a instanceof kn?this.bf.add(y,a):this.cf.add(y,a))},Ze.pc=function(a){if(a.Ej(),a instanceof Gn){if(this.On.remove(a),a instanceof Er){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 kn?this.Dn.remove(a):a instanceof ai||this.Pa.remove(a);y=a.data,y===null||a instanceof ai||(a instanceof kn?this.bf.remove(y):this.cf.remove(y))},Ze.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof Er)&&Zt('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Er||Zt('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof kn||Zt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=xr(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=xr(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=xr(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);gr(y),gr(x),gr(a)}},ki.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},ki.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&cS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&ic(this.diagram,!1)};function cS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=fS(a,y,b);if(E!==null&&(ku(E),E=E.copy(),E!==null)){var te=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=te,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}ki.prototype.insertLink=function(){return null},ki.prototype.resolveReferencesForData=function(){},ki.prototype.Ro=function(a){return this.H.model.Ro(a)};function fS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,si('No Group template found for category "'+x+'"'),si(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,si('No Node template found for category "'+x+'"'),si(" Using default node template")),y=a.ny))),y}ki.prototype.getLinkCategoryForData=function(){return""},ki.prototype.setLinkCategoryForData=function(){},ki.prototype.setFromNodeForLink=function(){},ki.prototype.setToNodeForLink=function(){},ki.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,si('No Link template found for category "'+a+'"'),si(" Using default link template")),x=y.my)),x},ki.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},ki.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},ki.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Hf(this.diagram,a,!1),this.unresolveReferencesForPart(a))},ki.prototype.unresolveReferencesForPart=function(){},ki.prototype.removeDataForLink=function(){},ki.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},ki.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Gn?a:null)},ki.prototype.findLinkForKey=function(){return null},Ze=ki.prototype,Ze.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Ze.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Gn?a:null)},Ze.Kc=function(a){return a===null?null:this.bf.I(a)},Ze.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Nn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(Tn(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},Ze.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Nn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(Tn(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator};function sy(a,y,x){for(var b in x){var E=y[b],te=x[b];if(vr(te)){if(!vr(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var se=te[ne];if(se!==void 0&&!dS(a,E[ne],se))return!1}}else if(!dS(a,E,te))return!1}return!0}function dS(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(Tn(y)&&Tn(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}ki.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 b=a.modelChange;if(b!=="")if(x===wo){if(b==="nodeCategory"){var E=this.Lc(a.object),te=a.newValue;E!==null&&typeof te=="string"&&(E.category=te)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===Zo){var ne=a.newValue;b==="nodeDataArray"&&Tn(ne)&&cS(this,ne),y.isModified=!0}else if(x===ra){var se=a.oldValue;b==="nodeDataArray"&&Tn(se)&&this.ip(se),y.isModified=!0}else x===ll&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===wo){var he=a.propertyName,ge=a.object;ge===y.model?(he==="nodeKeyProperty"||he==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ge,he),y.isModified=!0}else if(x===Zo||x===ra){var ye=a.change===Zo,Me=ye?a.newParam:a.oldParam,Re=ye?a.newValue:a.oldValue,Ve=this.aj.I(a.object);if(Array.isArray(Ve))for(a=0;a<Ve.length;a++){var qe=Ve[a];if(ye)Lm(qe,Re,Me,!0);else if(!(0>Me)){var it=Me+pg(qe);qe.pc(it,!0),w0(qe,it,Me)}}y.isModified=!0}}finally{y.aa=!0}}}}},ki.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)},ki.prototype.rp=function(){for(var a=this.H.model,y=new Nn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){ES(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&CS(a,te,!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()},ki.prototype.refreshDataBoundLinks=function(){},ki.prototype.updateRelationshipsFromData=function(){},ki.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 b=this.aj.iterator;b.next();){for(var E=b.value,te=0;te<E.length;te++){var ne=E[te].sx(a);ne!==null&&(x===null&&(x=xr()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);gr(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(vr(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){ed(y,function(ne){ne=ne.O.s;for(var se=ne.length,he=0;he<se;he++)ph(x,ne[he])});var b=y.Hh;if(vr(b)){var E=a.aj.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&a.aj.remove(b);break}}}}ki.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Vn;if(vr(a))for(var E=0;E<a.length;E++)cv(this,a[E],y,b,x);else for(a=a.iterator;a.next();)cv(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new Nn;for(var te=new Vn,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof kn)a||se.fromNode!==null&&se.toNode!==null||E.add(se);else if(se instanceof Gn&&se.data!==null&&x.Tl()){var he=se;se=ne.key;var ge=se.pg();ge!==null&&(ge=b.I(ge),ge!==null?(x.qe(he.data,x.wa(ge.data)),he=y.Kc(he.data),se=se.kh(),se!==null&&he!==null&&te.add(se,he)):x.qe(he.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<te.count)for(x=te.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ye=new Vn;b.each(function(Me){Me.key.data!==null&&ye.add(Me.key.data,Me.value.data)}),x(ye,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function cv(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var te=a.copyPartData(y,x);if(!(te instanceof rr))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof Gn){for(var ne=y.linksConnected;ne.next();){var se=ne.value;if(se.fromNode===y){var he=b.I(se);he!==null&&(he.fromNode=te)}se.toNode===y&&(se=b.I(se),se!==null&&(se.toNode=te))}if(y instanceof Er&&te instanceof Er)for(y=y.memberParts;y.next();)ne=cv(a,y.value,x,b,E),ne instanceof kn||ne===null||(ne.containingGroup=te)}else if(y instanceof kn&&te instanceof kn)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.toNode=ne)),y=y.labelNodes;y.next();)ne=cv(a,y.value,x,b,E),ne!==null&&ne instanceof Gn&&(ne.labeledLink=te);return te}ki.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof kn||(b=E.copyNodeData(b),Tn(b)&&(E.xf(b),x=y.Lc(b)))}else ku(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof kn||(E=y.copyNodeData(b)),Tn(E)&&(x.data=E)));return x},hn.Object.defineProperties(ki.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}}}),ki.prototype.updateAllRelationshipsFromData=ki.prototype.rp,ki.prototype.findLinksByExample=ki.prototype.ls,ki.prototype.findNodesByExample=ki.prototype.ms,ki.prototype.findLinkForData=ki.prototype.Kc,ki.prototype.findNodeForData=ki.prototype.ii,ki.prototype.findPartForData=ki.prototype.Lc,ki.prototype.findNodeForKey=ki.prototype.Vb,ki.prototype.removeModeledPart=ki.prototype.ip,ki.prototype.removeModeledParts=ki.prototype.Gs,ki.prototype.rebuildParts=ki.prototype.Wd;var pS=!1,gS=!1,mS=!1;ki.className="PartManager";function _a(a){ki.apply(this,arguments)}Kt(_a,ki),_a.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},_a.prototype.addModeledParts=function(a){for(ki.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Cp(a.value);ic(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),ic(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){ku(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var te=gv(x,y,!0);te!==""&&(E.fromPortId=te),te=iu(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof Gn&&(E.fromNode=te)),te=gv(x,y,!1),te!==""&&(E.toPortId=te),te=iu(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof Gn&&(E.toNode=te)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}_a.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}_a.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},_a.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},_a.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},_a.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},_a.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},_a.prototype.findPartForKey=function(a){var y=ki.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},_a.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},_a.prototype.doModelChanged=function(a){var y=this;if(ki.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===wo){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var se=this.Kc(a.object);if(se!==null){var he=this.Vb(a.newValue);se.toNode=he}}else if(E==="linkFromPortId"){var ge=this.Kc(a.object);if(ge!==null){var ye=a.newValue;typeof ye=="string"&&(ge.fromPortId=ye)}}else if(E==="linkToPortId"){var Me=this.Kc(a.object);if(Me!==null){var Re=a.newValue;typeof Re=="string"&&(Me.toPortId=Re)}}else if(E==="nodeGroupKey"){var Ve=this.Lc(a.object);if(Ve!==null){var qe=a.newValue;if(qe!==void 0){var it=this.Vb(qe);it instanceof Er?Ve.containingGroup=it:Ve.containingGroup=null}else Ve.containingGroup=null}}else if(E==="linkLabelKeys"){var At=this.Kc(a.object);if(At!==null){var bt=a.oldValue,Ot=a.newValue;Array.isArray(bt)&&bt.forEach(function(fn){0<=Ot.indexOf(fn)||(fn=y.Vb(fn),fn!==null&&(fn.labeledLink=null))}),Array.isArray(Ot)&&Ot.forEach(function(fn){fn=y.Vb(fn),fn!==null&&(fn.labeledLink=At)})}}else if(E==="linkCategory"){var Ft=this.Kc(a.object),It=a.newValue;Ft!==null&&typeof It=="string"&&(Ft.category=It)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===Zo){var Gt=a.newValue;if(E==="linkDataArray"&&typeof Gt=="object"&&Gt!==null)yS(this,Gt);else if(E==="linkLabelKeys"&&ff(Gt)){var Yt=this.Kc(a.object),Bn=this.Vb(Gt);Yt!==null&&Bn!==null&&(Bn.labeledLink=Yt)}x.isModified=!0}else if(b===ra){var Zn=a.oldValue;if(E==="linkDataArray"&&typeof Zn=="object"&&Zn!==null)this.ip(Zn);else if(E==="linkLabelKeys"&&ff(Zn)){var Hn=this.Vb(Zn);Hn!==null&&(Hn.labeledLink=null)}x.isModified=!0}}else if(b===wo){var En=a.propertyName;a.object!==x.model||En!=="linkFromKeyProperty"&&En!=="linkToKeyProperty"&&En!=="linkFromPortIdProperty"&&En!=="linkToPortIdProperty"&&En!=="linkLabelKeysProperty"&&En!=="nodeIsGroupProperty"&&En!=="nodeGroupKeyProperty"&&En!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},_a.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Nn,b=y.linkDataArray;b.forEach(function(te){x.add(te)});var E=[];this.links.each(function(te){te.data===null||x.contains(te.data)||E.push(te.data)}),E.forEach(function(te){NS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&AS(y,te,!1)})},_a.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof kn){var E=iu(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=iu(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var te=a.labelNodes.first();if(b.wa(te.data)===E)return}E=new Nn().addAll(y);var ne=new Nn;a.labelNodes.each(function(se){se.data!==null&&(se=b.wa(se.data),se!==void 0&&ne.add(se))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink===a&&(se.labeledLink=null)}),E.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink!==a&&(se.labeledLink=a)}))}}else!(a instanceof ai)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Er)&&(a.containingGroup=y)}}},_a.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var te={};b.next();){var ne=b.value;y.lb(ne)?E instanceof Er&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof Gn&&(iu(y,ne,!0)===x&&(te.link.fromNode=E),iu(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(se){return function(he){return he===x?(E.labeledLink=se.link,!0):!1}}(te)))),te={link:te.link}}eh(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Er&&(E.containingGroup=a))}},_a.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Gn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)qu(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&qu(y,x,b.data)),a instanceof Er)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&qu(y,x,b)}}},_a.prototype.copyPartData=function(a,y){var x=ki.prototype.copyPartData.call(this,a,y);if(a instanceof kn)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.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},_a.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),se="";if(a!==null&&(y===null&&(y=a),se=y.portId,se===null&&(se="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof kn){if(ku(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=se,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof Gn&&(ku(a),a=a.copy(),a!==null&&(a.labeledLink=te,E.add(a))),te}else if(b!==null&&(b=te.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Ap(te,b,te.wa(a.data),!0),Np(te,b,se,!0),x!==null&&Ap(te,b,te.wa(x.data),!1),Np(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof Gn||(a=te.copyNodeData(a),typeof a=="object"&&a!==null&&(te.xf(a),a=te.wa(a),a!==void 0&&te.Bu(b,a))),E.Kc(b);return null},_a.prototype.findLinkForKey=_a.prototype.findLinkForKey,_a.prototype.findPartForKey=_a.prototype.findPartForKey,_a.prototype.removeAllModeledParts=_a.prototype.removeAllModeledParts,_a.prototype.addModeledParts=_a.prototype.addModeledParts,_a.prototype.addAllModeledParts=_a.prototype.addAllModeledParts,_a.className="GraphLinksPartManager";function du(){ki.apply(this,arguments),this.Sg=null}Kt(du,ki);function fv(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,te=x;if(a.diagram.isTreePathToChildren||(E=x,te=y),(b===null||!vs(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(ku(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=te,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}du.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},du.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},du.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},du.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},du.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},du.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},du.prototype.doModelChanged=function(a){if(ki.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 b=a.modelChange;if(b!==""){if(x===wo){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var se=ne.kh();se!==null?te===null?y.remove(se):y.isTreePathToChildren?se.fromNode=te:se.toNode=te:fv(this,te,ne)}}else if(b==="parentLinkCategory"){var he=this.ii(a.object),ge=a.newValue;if(he!==null&&typeof ge=="string"){var ye=he.kh();ye!==null&&(ye.category=ge)}}y.isModified=!0}}else if(x===wo){var Me=a.propertyName;a.object===y.model&&Me==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},du.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Gn&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:fv(this,y,a):b!==null&&Hf(x,b,!1)))}}},du.prototype.updateDataBindings=function(a,y){ki.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},du.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var te=b.value;y.lb(te)&&E instanceof Gn&&y.mh(te)===x&&fv(this,E,this.ii(te))}eh(y,x)}a=y.mh(a),a!==void 0&&E instanceof Gn&&(a=this.Vb(a),fv(this,a,E))}},du.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Gn){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var te=E.pc(-1,b,!1);0<=te&&this.diagram.cb(ra,"parts",E,b,null,te,null),te=b.layerChanged,te!==null&&te(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&qu(y,x,E)}},du.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},du.prototype.findLinkForKey=du.prototype.findLinkForKey,du.className="TreePartManager";function Qn(a,y){this.kl=new Nn,this.il=new Nn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,vo(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Vn,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new Vn,this.Lt=new Ln,this.Wg=!1,this.o=null,this.undoManager=new jo,a!==void 0&&(vr(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Qn.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},Qn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Qn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Qn.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,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+_i(E)}}return y},Qn.prototype.xA=function(a){a.change!==ll&&Zt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof La?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Qn.prototype.Qv=function(a,y){var x=this,b=!1,E=new Nn,te=new Nn,ne=new Nn,se=this.vh;a.changes.each(function(Me){Me.model===x&&(Me.modelChange==="nodeDataArray"?Me.change===Zo?E.add(Me.newValue):Me.change===ra&&ne.add(Me.oldValue):x.lb(Me.object)?te.add(Me.object):Me.change!==wo||x.modelData!==Me.object&&Me.propertyName!=="modelData"?Me.object!==null&&(se&&se.contains(Me.object)?se.get(Me.object).each(function(Re){x.lb(Re)&&te.add(Re)}):Me.object instanceof Qn||x.ri()&&x.Jc(Me.object)||bS(x,Me.object).each(function(Re){te.add(Re)})):b=!0)});var he=this.il;he.clear(),E.each(function(Me){he.add(x.wa(Me)),y||te.add(Me)});var ge=this.kl;ge.clear(),ne.each(function(Me){ge.add(x.wa(Me)),y&&te.add(Me)}),a=x.cloneDeep(te.Fa());var ye=null;return b&&(ye===null&&(ye={}),ye.modelData=this.cloneDeep(this.modelData)),0<he.count&&(ye===null&&(ye={}),y?ye.removedNodeKeys=he.Fa():ye.insertedNodeKeys=he.Fa()),0<a.length&&(ye===null&&(ye={}),ye.modifiedNodeData=a),0<ge.count&&(ye===null&&(ye={}),y?ye.insertedNodeKeys=ge.Fa():ye.removedNodeKeys=ge.Fa()),ge.clear(),he.clear(),ye},Qn.prototype.cloneDeep=function(a){return Lp(this,a,!0)};function Lp(a,y,x,b,E,te){function ne(Me,Re){se?(Me.__gohashid===void 0&&te.push(Me),b.set(Me,Re)):(Me=Jt++,b.set(Me,Re),E.set(Me,y))}if(!Tn(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new Vn),se){var he=b.get(y);if(he)return he}else for(E||(E=new Vn),he=E.iterator;he.next();){var ge=he.key;if(he.value===y&&(ge=b.get(ge)))return ge}if(Array.isArray(y)){he=[],ne(y,he);for(var ye=0;ye<y.length;ye++)he.push(Lp(a,y[ye],!1,b,E,te))}else if(y instanceof Mt||y instanceof jn||y instanceof rn||y instanceof yr||y instanceof nr)he=y.copy(),ne(y,he);else{if(y instanceof Ci||y instanceof An||y instanceof tn)return y;if(y instanceof Ln)he=new Ln().addAll(Lp(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Nn)he=new Nn().addAll(Lp(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Vn)he=new Vn().addAll(Lp(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Date)he=new Date(y.getTime()),ne(y,he);else if(y instanceof RegExp)he=new RegExp(y),ne(y,he),he.lastIndex=y.lastIndex;else if(typeof y.copy=="function")he=y.copy(),ne(y,he);else for(ye in he={},ne(y,he),y)ye!=="__gohashid"&&(he[ye]=Lp(a,y[ye],!1,b,E,te))}return x&&te.forEach(function(Me){delete Me.__gohashid}),he}Ze=Qn.prototype,Ze.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Ze.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},Ze.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function xS(a,y){y=y.modelData,Tn(y)&&(a.dm(y),a.modelData=y)}Ze.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!PS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+hy(this,this.modelData)),a+`,
"nodeDataArray": `+cf(this,this.nodeDataArray,!0)},Ze.kv=function(a){xS(this,a),a=a.nodeDataArray,vr(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,te){if((te=te.part)&&(te=te.data,E!==te)){var ne=b.get(E);ne===null?(ne=new Nn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new Vn,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===wo?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===Zo||te===ra)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function bS(a,y){for(var x=new Nn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];dv(a,y,E,E,x)}return x}function dv(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(dv(a,y,ne,b,E))return!0}else if(Tn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(dv(a,y,ne,b,E))return!0}return!1}Ze.Pv=function(a,y){var x=this,b=!1,E=new Nn,te=new Nn,ne=new Nn,se=this.vh;a.changes.each(function(ye){ye.model===x&&(ye.modelChange==="nodeDataArray"?ye.change===Zo?E.add(ye.newValue):ye.change===ra&&ne.add(ye.oldValue):x.lb(ye.object)?te.add(ye.object):ye.change!==wo||x.modelData!==ye.object&&ye.propertyName!=="modelData"?ye.object!==null&&(se&&se.contains(ye.object)?se.get(ye.object).each(function(Me){x.lb(Me)&&te.add(Me)}):ye.object instanceof Qn||x.ri()&&x.Jc(ye.object)||bS(x,ye.object).each(function(Me){te.add(Me)})):b=!0)});var he=this.il;he.clear(),E.each(function(ye){he.add(x.wa(ye)),y||te.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(x.wa(ye)),y&&te.add(ye)}),a="",b&&(a+=`,
"modelData": `+hy(this,this.modelData)),0<he.count&&(a+=(y?this.Yv:this.Wv)+cf(this,he.Fa(),!0)),0<te.count&&(a+=this.jy+cf(this,te.Fa(),!0)),0<ge.count&&(a+=(y?this.Wv:this.Yv)+cf(this,ge.Fa(),!0)),ge.clear(),he.clear(),a},Ze.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)&&Zt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Vn;if(Array.isArray(x))for(var E=0;E<x.length;E++){var te=x[E],ne=this.wa(te);ne!=null&&b.set(ne,te)}if(Array.isArray(y))for(E=y.length,te=0;te<E;te++){ne=y[te];var se=this.hc(ne);se===null&&(se=(se=b.get(ne))?se:this.copyNodeData({}),this.km(se,ne),this.xf(se))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],te=this.wa(E),te=this.hc(te),te!==null){for(var he in E)he==="__gohashid"||he===this.nodeKeyProperty||this.Wj()&&he===this.nodeIsGroupProperty||this.setDataProperty(te,he,E[he]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,he=0;he<x;he++)y=this.hc(a[he]),y!==null&&this.cm(y)},Ze.$x=function(a,y){a.change!==ll&&Zt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof La?(y===void 0&&(y=Dg(this,this)),wS(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},Ze.yA=function(a,y){return this.$x(a,y)},Ze.np=function(a){return a===void 0&&(a=Dg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Ze.toJSON=function(a){return this.np(a)},Ze.Zw=function(a){var y=null;if(typeof a=="string")try{y=Qt.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Zt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Zt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Ze.Ky=function(a){return this.Zw(a)},Qn.constructGraphLinksModel=function(){return new Qn},Ze=Qn.prototype,Ze.dm=function(a){if(vr(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Tn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Zt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(Tn(a)){for(y in a)if(x=a[y],Tn(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new Ln,b=0;b<x.length/2;b++)E.add(new Mt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return Ox(a)}return a},Ze.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()):vr(a)?cf(this,a):Tn(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function cf(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new Ti;E.add("["),x&&1<b&&E.add(`
`);for(var te=0;te<b;te++){var ne=y[te];ne!==void 0&&(0<te&&(E.add(","),x&&E.add(`
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
`),E.add("]"),E.toString()}function PS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function $s(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof Mt)y={class:"go.Point",x:$s(x.x),y:$s(x.y)};else if(x instanceof jn)y={class:"go.Size",width:$s(x.width),height:$s(x.height)};else if(x instanceof rn)y={class:"go.Rect",x:$s(x.x),y:$s(x.y),width:$s(x.width),height:$s(x.height)};else if(x instanceof yr)y={class:"go.Margin",top:$s(x.top),right:$s(x.right),bottom:$s(x.bottom),left:$s(x.left)};else if(x instanceof nr)x.sb()?y={class:"go.Spot",x:$s(x.x),y:$s(x.y),offsetX:$s(x.offsetX),offsetY:$s(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ci){if(y={class:"go.Brush",type:x.type.name},x.type===Mc?y.color=x.color:(x.type===lc||x.type===cu)&&(y.start=x.start,y.end=x.end,x.type===cu&&(x.startRadius!==0&&(y.startRadius=$s(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=$s(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof An?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=$s(x.startX)),x.startY!==0&&(y.startY=$s(x.startY)),x.endX!==0&&(y.endX=$s(x.endX)),x.endY!==0&&(y.endY=$s(x.endY)),x.spot1.D(Ma)||(y.spot1=x.spot1),x.spot2.D(Yl)||(y.spot2=x.spot2),x.type===An.o&&(y.path=An.ia(x))):x instanceof tn&&(y={class:"go.EnumValue",classType:Dg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=sa(y,E);if(!PS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof Ln){var ne="[";for(te=te.iterator;te.next();){var se=te.value;1<ne.length&&(ne+=","),ne+=a.sm(se.x),ne+=",",ne+=a.sm(se.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function el(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Ox(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 Mt(el(a.x),el(a.y));else if(y==="Size")x=new jn(el(a.width),el(a.height));else if(y==="Rect")x=new rn(el(a.x),el(a.y),el(a.width),el(a.height));else if(y==="Margin")x=new yr(el(a.top),el(a.right),el(a.bottom),el(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Nf(a.enum):x=new nr(el(a.x),el(a.y),el(a.offsetX),el(a.offsetY));else if(y==="Brush"){if(x=new Ci,x.type=Vr(Ci,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof nr&&(x.start=a.start),a.end instanceof nr&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=el(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=el(a.endRadius)),a=a.colorStops,Tn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=An.parse(a.path):x=new An,x.type=Vr(An,a.type),typeof a.startX=="number"&&(x.startX=el(a.startX)),typeof a.startY=="number"&&(x.startY=el(a.startY)),typeof a.endX=="number"&&(x.endX=el(a.endX)),typeof a.endY=="number"&&(x.endY=el(a.endY)),a.spot1 instanceof nr&&(x.spot1=a.spot1),a.spot2 instanceof nr&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Vr(b,a.name)));return x}Ze.Pe=function(a){return this.Lt.add(a),this},Ze.ik=function(a){this.Lt.remove(a)},Ze.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},Ze.cb=function(a,y,x,b,E,te,ne){wa(this,"",a,y,x,b,E,te,ne)},Ze.g=function(a,y,x,b,E){wa(this,"",wo,a,this,y,x,b,E)},Ze.Fs=function(a,y,x,b,E,te){wa(this,"",wo,y,a,x,b,E,te)};function wa(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var ge=new To;ge.model=a,ge.change=x,ge.modelChange=y,ge.propertyName=b,ge.object=E,ge.oldValue=te,ge.oldParam=se,ge.newValue=ne,ge.newParam=he,a.ds(ge)}Qn.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===wo){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),mo(x,b,E)}else a.change===Zo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Tn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&zi(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&ko(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!vr(b)&&a.propertyName&&(b=sa(a.object,a.propertyName)),vr(b)&&typeof x=="number"&&(a=a.newValue,y?zi(b,x):ko(b,x,a))):Zt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ra?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Tn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&ko(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&zi(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!vr(b)&&a.propertyName&&(b=sa(a.object,a.propertyName)),vr(b)&&typeof x=="number"&&(a=a.oldValue,y?ko(b,x,a):zi(b,x))):Zt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ll&&Zt("unknown ChangedEvent: "+a.toString())},Qn.prototype.Ea=function(a){return this.undoManager.Ea(a)},Qn.prototype.eb=function(a){return this.undoManager.eb(a)},Qn.prototype.Kf=function(){return this.undoManager.Kf()},Qn.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Ze=Qn.prototype,Ze.La=function(a,y){y===void 0&&(y=""),wa(this,"SourceChanged",ll,y,a,null,null)},Ze.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=sa(a,y),y!==void 0)){if(ff(y))return y;Zt("Key value for node data "+a+" is not a number or a string: "+y)}}},Ze.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=sa(a,x);b!==y&&this.hc(y)===null&&(mo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),wa(this,"nodeKey",wo,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else mo(a,x,y)}};function ff(a){return typeof a=="number"||typeof a=="string"}Ze.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Ze.hc=function(a){return a===null&&Zt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ff(a)?this.kb.I(a):null},Ze.$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 b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){mo(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;mo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;mo(a,y,x)}}}}},Ze.xf=function(a){a!==null&&(bs(a),this.lb(a)||CS(this,a,!0))};function CS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&Zt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,ko(a.Tc,b,y)),wa(a,"nodeDataArray",Zo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Ze.Fy=function(a){if(vr(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)},Ze.cm=function(a){a!==null&&ES(this,a,!0)};function ES(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;zi(a.Tc,b)}wa(a,"nodeDataArray",ra,"nodeDataArray",a,y,null,b,null),a.qp(y)}Ze.nA=function(a){if(vr(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)},Ze.$z=function(a){if(a!==this.nodeDataArray&&vr(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.wa(te);if(ne!==void 0){x.add(ne);var se=this.hc(ne);se!==te&&(se!==null?(this.Do(se,te),this.lm(te,se)):(te=this.cloneDeep(te),this.km(te,ne),this.xf(te)))}else ne=this.cloneDeep(te),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},Ze.jp=function(a,y){y!==void 0&&(a=Fg(this,a),a instanceof Nn&&this.Vf.add(y,a))},Ze.Lv=function(){},Ze.fm=function(){},Ze.em=function(){},Ze.qp=function(){};function qu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new Nn,a.Vf.add(y,b)),b.add(x)}}function eh(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof Nn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function Fg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Nn?a:null)}Ze.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Qn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):pv(this,a,!0),Tn(a)&&vo(a),a};function pv(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=pv(a,y[x],a.copiesArrayObjects);b.push(E)}return vo(b),b}if(x&&Tn(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var te=sa(y,b),ne=Dg(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof Qn||te instanceof jo||te instanceof La||te instanceof To||(te=pv(a,te,!1)),mo(x,b,te)}return vo(x),x}return y instanceof Mt||y instanceof jn||y instanceof rn||y instanceof nr||y instanceof yr?y.copy():y}Qn.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!kS&&a instanceof Ut&&(kS=!0,si('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),si(" Is that really your intent?"));var b=sa(a,y);b!==x&&(mo(a,y,x),this.Fs(a,y,b,x))},Ze=Qn.prototype,Ze.set=function(a,y,x){this.setDataProperty(a,y,x)},Ze.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},Ze.Ay=function(a,y){this.ts(a,-1,y)},Ze.ts=function(a,y,x){0>y&&(y=a.length),ko(a,y,x),wa(this,"",Zo,"",a,null,x,null,y)},Ze.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Zt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];zi(a,y),wa(this,"",ra,"",a,x,null,y,null)},Ze.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=sa(a,y),y===void 0))return"";if(typeof y=="string")return y;Zt("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ze.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=sa(a,x);b===void 0&&(b=""),b!==y&&(mo(a,x,y),wa(this,"nodeCategory",wo,x,a,b,y))}else mo(a,x,y)}},Ze.lm=function(a,y){this.jm(y,this.Ro(a))},Ze.Tl=function(){return!1},Ze.Wj=function(){return!1},Ze.ri=function(){return!1},Ze.xs=function(){return!1},Ze.Xj=function(){return!1};function cy(){return new Qn}function Dg(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 Dg(a,y.constructor);return typeof y}function fy(a){return Gu[a]?Gu[a]:Qt.go!==void 0&&Qt.go[a]?Qt.go[a]:null}function sa(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(b){}return x}function mo(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(b){}}hn.Object.defineProperties(Qn.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===""&&Zt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Zt("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,b=0;b<x;b++){var E=a[b];Tn(E)||Zt("Model.nodeDataArray must only contain Objects, not: "+E),bs(E)}for(this.Tc=a,b=new Ln,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(wa(this,"nodeDataArray",wo,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);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"}}}),Qn.prototype.setCategoryForNodeData=Qn.prototype.jm,Qn.prototype.getCategoryForNodeData=Qn.prototype.Ro,Qn.prototype.removeArrayItem=Qn.prototype.ov,Qn.prototype.insertArrayItem=Qn.prototype.ts,Qn.prototype.addArrayItem=Qn.prototype.Ay,Qn.prototype.assignAllDataProperties=Qn.prototype.Do,Qn.prototype.set=Qn.prototype.set,Qn.prototype.clearUnresolvedReferences=Qn.prototype.Qy,Qn.prototype.mergeNodeDataArray=Qn.prototype.$z,Qn.prototype.removeNodeDataCollection=Qn.prototype.nA,Qn.prototype.removeNodeData=Qn.prototype.cm,Qn.prototype.addNodeDataCollection=Qn.prototype.Fy,Qn.prototype.addNodeData=Qn.prototype.xf,Qn.prototype.makeNodeDataKeyUnique=Qn.prototype.$u,Qn.prototype.findNodeDataForKey=Qn.prototype.hc,Qn.prototype.containsNodeData=Qn.prototype.lb,Qn.prototype.setKeyForNodeData=Qn.prototype.km,Qn.prototype.getKeyForNodeData=Qn.prototype.wa,Qn.prototype.updateTargetBindings=Qn.prototype.La,Qn.prototype.commit=Qn.prototype.commit,Qn.prototype.rollbackTransaction=Qn.prototype.Kf,Qn.prototype.commitTransaction=Qn.prototype.eb,Qn.prototype.startTransaction=Qn.prototype.Ea,Qn.prototype.raiseDataChanged=Qn.prototype.Fs,Qn.prototype.raiseChanged=Qn.prototype.g,Qn.prototype.raiseChangedEvent=Qn.prototype.cb,Qn.prototype.removeChangedListener=Qn.prototype.ik,Qn.prototype.addChangedListener=Qn.prototype.Pe,Qn.prototype.writeJsonValue=Qn.prototype.sm,Qn.prototype.replaceJsonObjects=Qn.prototype.dm,Qn.prototype.applyIncrementalJSON=Qn.prototype.Ky,Qn.prototype.applyIncrementalJson=Qn.prototype.Zw,Qn.prototype.toJSON=Qn.prototype.toJSON,Qn.prototype.toJson=Qn.prototype.np,Qn.prototype.toIncrementalJSON=Qn.prototype.yA,Qn.prototype.toIncrementalJson=Qn.prototype.$x,Qn.prototype.toIncrementalData=Qn.prototype.xA,Qn.prototype.clear=Qn.prototype.clear;var kS=!1,Gu={};Qn.className="Model",Qn.fromJSON=Qn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Qt.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Zt("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=fy(b)):(E=fy(b),E===null&&(E=Qt[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof Qn?y=a:Zt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Qn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Qn.safePropertyValue=sa,Qn.safePropertySet=mo,Gu.Brush=Ci,Gu.ChangedEvent=To,Gu.Geometry=An,Gu.Margin=yr,Gu.Panel=wn,Gu.Point=Mt,Gu.Rect=rn,Gu.Size=jn,Gu.Spot=nr,Gu.Transaction=La,Gu.UndoManager=jo;function fa(a,y,x,b){vo(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,b===void 0?(this.el=TS,this.wk=null):(this.el=Ig,this.wk=b),this.st=new Nn}fa.prototype.copy=function(){var a=new fa;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},Ze=fa.prototype,Ze.qb=function(a){a.classType===fa&&(this.mode=a)},Ze.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Ze.freeze=function(){return this._isFrozen=!0,this},Ze.ka=function(){return this._isFrozen=!1,this},Ze.Kx=function(a){return a===void 0&&(a=null),this.mode=Ig,this.backConverter=a,this},Ze.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Ze.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function MS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Ze.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")si("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=sa(y,b)),te!==void 0)if(E===null)x!==""&&mo(a,x,te);else try{if(x!==""){var ne=E(te,a);mo(a,x,ne)}else E(te,a)}catch(se){}}}},Ze.sp=function(a,y,x,b){if(this.el===Ig){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=sa(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var se=b!==null?b.diagram:null,he=se!==null?se.model:null;if(te===null){if(x!=="")he!==null?he.setDataProperty(y,x,ne):mo(y,x,ne);else if(he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var ge=b.itemIndex,ye=b.panel.itemArray;he.ov(ye,ge),he.ts(ye,ge,ne)}}else try{if(x!==""){var Me=te(ne,y,he);he!==null?he.setDataProperty(y,x,Me):mo(y,x,Me)}else{var Re=te(ne,y,he);if(Re!==void 0&&he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ve=b.itemIndex,qe=b.panel.itemArray;he.ov(qe,Ve),he.ts(qe,Ve,Re)}}}catch(it){}}finally{this.st.remove(a)}}}},hn.Object.defineProperties(fa.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&ir(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&ir(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&ir(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&ir(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&ir(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&ir(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&ir(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&ir(this),this.el=a}}}),fa.prototype.updateSource=fa.prototype.sp,fa.prototype.updateTarget=fa.prototype.Mv,fa.prototype.ofModel=fa.prototype.dA,fa.prototype.ofObject=fa.prototype.cp,fa.prototype.makeTwoWay=fa.prototype.Kx;var jx="Binding",TS=new tn(fa,"OneWay",1),Ig=new tn(fa,"TwoWay",2);fa.className="Binding",fa.parseEnum=function(a,y){return function(x){return x=Vr(a,x),x===null?y:x}},fa.toString=_i,fa.OneWay=TS,fa.TwoWay=Ig;function Qr(a,y,x){Qn.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Nn,this.wb=new Vn,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(vr(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Kt(Qr,Qn),Qr.constructGraphLinksModel=Qn.constructGraphLinksModel,Qr.prototype.cloneProtected=function(a){Qn.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},Ze=Qr.prototype,Ze.clear=function(){Qn.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Ze.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,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+_i(E)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+iu(this,E,!0)+"-->"+iu(this,E,!1)}return y},Ze.Qv=function(a,y){this.linkKeyProperty===""&&Zt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Qn.prototype.Qv.call(this,a,y),b=this,E=new Nn,te=new Nn,ne=new Nn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===Zo?E.add(ye.newValue):ye.change===ra&&ne.add(ye.oldValue):b.Jc(ye.object)?te.add(ye.object):ye.object!==null&&(ye.object!==null&&se&&se.contains(ye.object)?se.get(ye.object).each(function(Me){b.Jc(Me)&&te.add(Me)}):ye.object instanceof Qn||b.lb(ye.object)||LS(b,ye.object).each(function(Me){te.add(Me)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&te.add(ye)}),a=b.cloneDeep(te.Fa()),0<he.count&&(x===null&&(x={}),y?x.removedLinkKeys=he.Fa():x.insertedLinkKeys=he.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ge.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ge.Fa():x.removedLinkKeys=ge.Fa()),ge.clear(),he.clear(),x},Ze.rm=function(){var a=Qn.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},Ze.gp=function(a){Qn.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)},Ze.Rv=function(){var a=Qn.prototype.Rv.call(this),y=`,
"linkDataArray": `+cf(this,this.linkDataArray,!0);return a+y},Ze.kv=function(a){Qn.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function LS(a,y){for(var x=new Nn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];dv(a,y,E,E,x)}return x}Ze.Pv=function(a,y){this.linkKeyProperty===""&&Zt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Qn.prototype.Pv.call(this,a,y),b=this,E=new Nn,te=new Nn,ne=new Nn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===Zo?E.add(ye.newValue):ye.change===ra&&ne.add(ye.oldValue):b.Jc(ye.object)?te.add(ye.object):ye.object!==null&&(ye.object!==null&&se&&se.contains(ye.object)?se.get(ye.object).each(function(Me){b.Jc(Me)&&te.add(Me)}):ye.object instanceof Qn||b.lb(ye.object)||LS(b,ye.object).each(function(Me){te.add(Me)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&te.add(ye)}),a=x,0<he.count&&(a+=(y?this.Xv:this.Vv)+cf(this,he.Fa(),!0)),0<te.count&&(a+=this.iy+cf(this,te.Fa(),!0)),0<ge.count&&(a+=(y?this.Vv:this.Xv)+cf(this,ge.Fa(),!0)),ge.clear(),he.clear(),a},Ze.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)&&Zt("applyIncrementalJson cannot change Model properties"),Qn.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],te=this.jh(E);te===null&&(te=this.Jo({}),this.Ks(te,E),this.fi(te))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],te=this.Ac(E),te=this.jh(te),te!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(te,ne,E[ne]);OS(this,E,te)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Qr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===wo){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),mo(x,b,E);return}}else if(a.change===Zo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Tn(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===ra){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Tn(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}Qn.prototype.changeState.call(this,a,y)}},Ze=Qr.prototype,Ze.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),mo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ze.yx=function(a){return iu(this,a,!0)},Ze.wv=function(a,y){Ap(this,a,y,!0)},Ze.Bx=function(a){return iu(this,a,!1)},Ze.Bv=function(a,y){Ap(this,a,y,!1)};function iu(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=sa(y,a),a!==void 0))){if(ff(a))return a;Zt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ap(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var te=sa(y,E);te!==x&&(eh(a,te,y),mo(y,E,x),a.hc(x)===null&&qu(a,x,y),wa(a,b?"linkFromKey":"linkToKey",wo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else mo(y,E,x)}}Ze.zx=function(a){return gv(this,a,!0)},Ze.xv=function(a,y){Np(this,a,y,!0)},Ze.Cx=function(a){return gv(this,a,!1)},Ze.Cv=function(a,y){Np(this,a,y,!1)};function gv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=sa(y,a),y===void 0?"":y)}function Np(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=sa(y,E);te===void 0&&(te=""),te!==x&&(mo(y,E,x),wa(a,b?"linkFromPortId":"linkToPortId",wo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else mo(y,E,x)}}Ze.Ef=function(a){if(a===null)return mv;var y=this.je;return y===""?mv:(a=sa(a,y),a===void 0?mv:a)},Ze.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=sa(a,x);if(b===void 0&&(b=mv),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)eh(this,b[te],a);for(mo(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&qu(this,ne,a)}wa(this,"linkLabelKeys",wo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else mo(a,x,y)}},Ze.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=sa(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&qu(this,y,a),wa(this,"linkLabelKeys",Zo,x,a,null,y,null,E)))}else Zt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Ze.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=sa(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(eh(this,y,a),wa(this,"linkLabelKeys",ra,x,a,y,null,E,null)))}else b!==void 0&&Zt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ze.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=sa(a,y),y!==void 0)){if(ff(y))return y;Zt("Key value for link data "+a+" is not a number or a string: "+y)}}},Ze.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=sa(a,x);b!==y&&this.jh(y)===null&&(mo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),wa(this,"linkKey",wo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else mo(a,x,y)}},Ze.jh=function(a){return a===null&&Zt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ff(a)?this.wb.I(a):null},Ze.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 b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){mo(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;mo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;mo(a,y,x)}}}}},Ze.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ze.fi=function(a){a!==null&&(bs(a),this.Jc(a)||AS(this,a,!0))};function AS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&Zt("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),wa(a,"linkDataArray",Zo,"linkDataArray",a,null,y,null,b),dy(a,y)}Ze.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)},Ze.bm=function(a){a!==null&&NS(this,a,!0)};function NS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(wa(a,"linkDataArray",ra,"linkDataArray",a,y,null,b,null),x=iu(a,y,!0),eh(a,x,y),x=iu(a,y,!1),eh(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],eh(a,x,y)}Ze.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)},Ze.Zz=function(a){if(this.linkKeyProperty===""&&Zt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&vr(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.Ac(te);if(ne!==void 0){x.add(ne);var se=this.jh(ne);se!==te&&(se!==null?(this.Do(se,te),OS(this,te,se)):(te=this.cloneDeep(te),this.Ks(te,ne),this.fi(te)))}else ne=this.cloneDeep(te),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function dy(a,y){var x=iu(a,y,!0);x=a.Vl(x),a.hc(x)===null&&qu(a,x,y),x=iu(a,y,!1),x=a.Vl(x),a.hc(x)===null&&qu(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],a.hc(x)===null&&qu(a,x,y)}Ze.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):pv(this,a,!0),Tn(a)&&(vo(a),this.lf!==""&&mo(a,this.lf,void 0),this.mf!==""&&mo(a,this.mf,void 0),this.je!==""&&mo(a,this.je,[])),a},Ze.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!sa(a,y)},Ze.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=sa(a,y),y!==void 0)){if(ff(y))return y;Zt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Ze.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=sa(a,x);b!==y&&(eh(this,b,a),mo(a,x,y),this.hc(y)===null&&qu(this,y,a),wa(this,"nodeGroupKey",wo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else mo(a,x,y)}},Qr.prototype.copyNodeData=function(a){return a===null?null:(a=Qn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||sa(a,this.Je)===void 0||mo(a,this.Je,void 0),a)},Qr.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){Ap(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ap(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Np(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Np(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 b=sa(a,y);b!==x&&(mo(a,y,x),this.Fs(a,y,b,x))},Ze=Qr.prototype,Ze.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&sa(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Ze.jp=function(a,y){Qn.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 b=x.value,E=a,te=y;if(iu(this,b,!0)===E){var ne=this.lf;mo(b,ne,te),wa(this,"linkFromKey",wo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(iu(this,b,!1)===E&&(ne=this.mf,mo(b,ne,te),wa(this,"linkToKey",wo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var se=ne.length,he=this.je,ge=0;ge<se;ge++)ne[ge]===E&&(ne[ge]=te,wa(this,"linkLabelKeys",Zo,he,b,E,te,ge,ge))}},Ze.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;mo(a,b,x),wa(this,"nodeGroupKey",wo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Ze.Lv=function(){Qn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},Ze.fm=function(a){Qn.prototype.fm.call(this,a),a=this.wa(a);var y=Fg(this,a);if(y!==null){var x=xr();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;wa(this,"nodeGroupKey",wo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(iu(this,b,!0)===a&&(E=this.lf,wa(this,"linkFromKey",wo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),iu(this,b,!1)===a&&(E=this.mf,wa(this,"linkToKey",wo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var te=E.length,ne=this.je,se=0;se<te;se++)E[se]===a&&(wa(this,"linkLabelKeys",Zo,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)eh(this,a,x[y]);gr(x)}},Ze.em=function(a){Qn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&qu(this,y,a)},Ze.qp=function(a){Qn.prototype.qp.call(this,a);var y=this.lh(a);eh(this,y,a)},Ze.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=sa(a,y),y===void 0))return"";if(typeof y=="string")return y;Zt("getCategoryForLinkData found a non-string category for "+a+": "+y)},Qr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Qr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=sa(a,x);b===void 0&&(b=""),b!==y&&(mo(a,x,y),wa(this,"linkCategory",wo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else mo(a,x,y)}},Qr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Ze=Qr.prototype,Ze.lm=function(a,y){Qn.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function OS(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))}Ze.Wj=function(){return!0},Ze.ri=function(){return!0},Ze.xs=function(){return!0},Ze.Xj=function(){return!0},hn.Object.defineProperties(Qr.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,b=0;b<x;b++){var E=a[b];Tn(E)||Zt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),bs(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new Ln,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new Nn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,wa(this,"linkDataArray",wo,"linkDataArray",this,y,a),y=0;y<x;y++)dy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,b=0;b<x;b++){var E=this.linkDataArray[b],te=this.Ac(E);te===void 0&&(this.Bs(E),te=this.Ac(E)),te!==void 0&&this.wb.add(te,E)}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"}}}),Qr.prototype.setCategoryForLinkData=Qr.prototype.lp,Qr.prototype.getCategoryForLinkData=Qr.prototype.ps,Qr.prototype.assignAllDataProperties=Qr.prototype.Do,Qr.prototype.setGroupKeyForNodeData=Qr.prototype.mp,Qr.prototype.getGroupKeyForNodeData=Qr.prototype.lh,Qr.prototype.isGroupForNodeData=Qr.prototype.Yu,Qr.prototype.copyLinkData=Qr.prototype.Jo,Qr.prototype.mergeLinkDataArray=Qr.prototype.Zz,Qr.prototype.removeLinkDataCollection=Qr.prototype.lA,Qr.prototype.removeLinkData=Qr.prototype.bm,Qr.prototype.addLinkDataCollection=Qr.prototype.Ey,Qr.prototype.addLinkData=Qr.prototype.fi,Qr.prototype.containsLinkData=Qr.prototype.Jc,Qr.prototype.makeLinkDataKeyUnique=Qr.prototype.Bs,Qr.prototype.findLinkDataForKey=Qr.prototype.jh,Qr.prototype.setKeyForLinkData=Qr.prototype.Ks,Qr.prototype.getKeyForLinkData=Qr.prototype.Ac,Qr.prototype.removeLabelKeyForLinkData=Qr.prototype.Qx,Qr.prototype.addLabelKeyForLinkData=Qr.prototype.Bu,Qr.prototype.setLabelKeysForLinkData=Qr.prototype.Ls,Qr.prototype.getLabelKeysForLinkData=Qr.prototype.Ef,Qr.prototype.setToPortIdForLinkData=Qr.prototype.Cv,Qr.prototype.getToPortIdForLinkData=Qr.prototype.Cx,Qr.prototype.setFromPortIdForLinkData=Qr.prototype.xv,Qr.prototype.getFromPortIdForLinkData=Qr.prototype.zx,Qr.prototype.setToKeyForLinkData=Qr.prototype.Bv,Qr.prototype.getToKeyForLinkData=Qr.prototype.Bx,Qr.prototype.setFromKeyForLinkData=Qr.prototype.wv,Qr.prototype.getFromKeyForLinkData=Qr.prototype.yx,Qr.prototype.clear=Qr.prototype.clear;var mv=Object.freeze([]);Qr.className="GraphLinksModel",Gu.GraphLinksModel=Qr,Qn.constructGraphLinksModel=Qn.constructGraphLinksModel=function(){return new Qr},Qn.initDiagramModel=cy=function(){return new Qr};function tl(a,y){Qn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(vr(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Kt(tl,Qn),tl.constructGraphLinksModel=Qn.constructGraphLinksModel,tl.prototype.cloneProtected=function(a){Qn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Ze=tl.prototype,Ze.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,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+_i(E)}}return y},Ze.rm=function(){var a=Qn.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Ze.gp=function(a){Qn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Ze.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Zt("applyIncrementalJson cannot change Model properties"),Qn.prototype.fp.call(this,a)},Ze.Vl=function(a){return a},Ze.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=sa(a,y),y!==void 0)){if(ff(y))return y;Zt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Ze.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 b=sa(a,x);b!==y&&(eh(this,b,a),mo(a,x,y),this.hc(y)===null&&qu(this,y,a),wa(this,"nodeParentKey",wo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else mo(a,x,y)}},Ze.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=sa(a,y),y===void 0)?"":typeof y=="string"?y:(Zt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},tl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},tl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=sa(a,x);b===void 0&&(b=""),b!==y&&(mo(a,x,y),wa(this,"parentLinkCategory",wo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else mo(a,x,y)}},tl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},tl.prototype.copyNodeData=function(a){return a===null?null:(a=Qn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||sa(a,this.Ke)===void 0||mo(a,this.Ke,void 0),a)},tl.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 b=sa(a,y);b!==x&&(mo(a,y,x),this.Fs(a,y,b,x))},Ze=tl.prototype,Ze.jp=function(a,y){Qn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Ze.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;mo(a,b,x),wa(this,"nodeParentKey",wo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Ze.fm=function(a){Qn.prototype.fm.call(this,a),a=this.wa(a);var y=Fg(this,a);if(y!==null){var x=xr();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;wa(this,"nodeParentKey",wo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)eh(this,a,x[y]);gr(x)}},Ze.em=function(a){Qn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&qu(this,y,a)},Ze.qp=function(a){Qn.prototype.qp.call(this,a);var y=this.mh(a);eh(this,y,a)},Ze.lm=function(a,y){Qn.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Ze.Tl=function(){return!0},Ze.xs=function(){return!0},hn.Object.defineProperties(tl.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"}}}),tl.prototype.setParentLinkCategoryForNodeData=tl.prototype.Ms,tl.prototype.getParentLinkCategoryForNodeData=tl.prototype.ss,tl.prototype.setParentKeyForNodeData=tl.prototype.qe,tl.prototype.getParentKeyForNodeData=tl.prototype.mh,tl.className="TreeModel",Gu.TreeModel=tl;function Bo(a){Eo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=zu,this.Ti=0,this.Zv=new Mt,this.Jp=this.me=0,this.Xr=new Gg,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=nl,this.nd=jp,this.hd=oy,this.tf=6,this.Nn=Pv,a&&Object.assign(this,a)}Kt(Bo,Eo),Bo.prototype.cloneProtected=function(a){Eo.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},Bo.prototype.qb=function(a){a.classType===Bo?a===wv||a===bv||a===Sv||a===xv||a===jp?this.sorting=a:a===ad||a===Op||a===nl||a===pf?this.direction=a:a===Dc||a===df||a===zu||a===Uu?this.arrangement=a:(a===Rd||a===Pv)&&(this.nodeDiameterFormula=a):Eo.prototype.qb.call(this,a)},Bo.prototype.createNetwork=function(){return new Fp(this)},Bo.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 Ln;y.addAll(a.iterator),a=new Ln;var x=new Ln,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,ge=this.radius;(!isFinite(ge)||0>=ge)&&(ge=NaN);var ye=this.aspectRatio;(!isFinite(ye)||0>=ye)&&(ye=1);var Me=this.startAngle;isFinite(Me)||(Me=0);var Re=this.sweepAngle;if((!isFinite(Re)||360<Re||1>Re)&&(Re=360),y=this.spacing,isFinite(y)||(y=NaN),se===Uu&&he===Rd?se=zu:se===Uu&&he!==Rd&&(se=this.arrangement),(this.direction===ad||this.direction===Op)&&this.sorting!==jp){for(he=0;!(he>=b.length)&&(a.add(b.M(he)),!(he+1>=b.length));he+=2)x.add(b.M(he+1));this.direction===ad?(this.arrangement===Uu&&a.reverse(),b=new Ln,b.addAll(a),b.addAll(x)):(this.arrangement===Uu&&x.reverse(),b=new Ln,b.addAll(x),b.addAll(a))}he=b.length;for(var Ve=te=E=0;Ve<b.length;Ve++){var qe=Me+Re*te*(this.direction===nl?1:-1)/he,it=b.M(Ve).diameter;isNaN(it)&&(it=gf(b.M(Ve),qe)),360>Re&&(Ve===0||Ve===b.length-1)&&(it/=2),E+=it,te++}if(isNaN(ge)||se===Uu){if(isNaN(y)&&(y=6),se!==zu&&se!==Uu){for(te=-1/0,ne=0;ne<he;ne++)Ve=b.M(ne),E=b.M(ne===he-1?0:ne+1),isNaN(Ve.diameter)&&gf(Ve,0),isNaN(E.diameter)&&gf(E,0),te=Math.max(te,(Ve.diameter+E.diameter)/2);ne=te+y,se===Dc?ge=(te+y)/(2*Math.PI/he):ge=vv(this,ne*(360<=Re?he:he-1),ye,Me*Math.PI/180,Re*Math.PI/180)}else ge=vv(this,E+(360<=Re?he:he-1)*(se!==Uu?y:1.6*y),ye,Me*Math.PI/180,Re*Math.PI/180);te=ge*ye}else if(te=ge*ye,Ve=py(this,ge,te,Me*Math.PI/180,Re*Math.PI/180),isNaN(y))(se===zu||se===Uu)&&(y=(Ve-E)/(360<=Re?he:he-1));else if(se===zu||se===Uu)Ve=(Ve-E)/(360<=Re?he:he-1),Ve<y?(ge=vv(this,E+y*(360<=Re?he:he-1),ye,Me*Math.PI/180,Re*Math.PI/180),te=ge*ye):y=Ve;else{for(ne=-1/0,E=0;E<he;E++)qe=b.M(E),it=b.M(E===he-1?0:E+1),isNaN(qe.diameter)&&gf(qe,0),isNaN(it.diameter)&&gf(it,0),ne=Math.max(ne,(qe.diameter+it.diameter)/2);ne+=y,E=vv(this,ne*(360<=Re?he:he-1),ye,Me*Math.PI/180,Re*Math.PI/180),E>ge?(ge=E,te=ge*ye):ne=Ve/(360<=Re?he:he-1)}if(this.kw=se,this.lc=ge,this.Zm=ye,this.lw=Me,this.Wp=Re,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,se=this.lc,ge=this.lw,ye=this.Wp,Me=this.Ti,Re=this.me,he=this.Jp,this.direction!==ad&&this.direction!==Op||b!==Uu)if(this.direction===ad||this.direction===Op){switch(ne=0,b){case df:ne=180*yv(this,se,Re,ge,he)/Math.PI;break;case zu:he=y=0,ne=a.first(),ne!==null&&(y=gf(ne,Math.PI/2)),ne=x.first(),ne!==null&&(he=gf(ne,Math.PI/2)),ne=180*yv(this,se,Re,ge,Me+(y+he)/2)/Math.PI;break;case Dc:ne=ye/y.length}if(this.direction===ad){switch(b){case df:_g(this,a,ge,pf);break;case zu:Rg(this,a,ge,pf);break;case Dc:Bg(this,a,ye/2,ge,pf)}switch(b){case df:_g(this,x,ge+ne,nl);break;case zu:Rg(this,x,ge+ne,nl);break;case Dc:Bg(this,x,ye/2,ge+ne,nl)}}else{switch(b){case df:_g(this,x,ge,pf);break;case zu:Rg(this,x,ge,pf);break;case Dc:Bg(this,x,ye/2,ge,pf)}switch(b){case df:_g(this,a,ge+ne,nl);break;case zu:Rg(this,a,ge+ne,nl);break;case Dc:Bg(this,a,ye/2,ge+ne,nl)}}}else switch(b){case df:_g(this,y,ge,this.direction);break;case zu:Rg(this,y,ge,this.direction);break;case Dc:Bg(this,y,ye,ge,this.direction);break;case Uu:jS(this,y,ye,ge,this.direction)}else jS(this,y,ye,ge-ye/2,nl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Bg(a,y,x,b,E){var te=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var ge=b+(E===nl?he*x/(360<=te?se:se-1):-(he*x)/se),ye=y.M(he),Me=ne*Math.tan(ge)/a;Me=Math.sqrt((ne*ne+a*a*Me*Me)/(1+Me*Me)),ye.centerX=Me*Math.cos(ge),ye.centerY=Me*Math.sin(ge),ye.actualAngle=180*ge/Math.PI}}function Rg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Ti;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var ge=y.M(he),ye=y.M(he===se-1?0:he+1),Me=te*Math.sin(x);ge.centerX=E*Math.cos(x),ge.centerY=Me,ge.actualAngle=180*x/Math.PI,isNaN(ge.diameter)&&gf(ge,0),isNaN(ye.diameter)&&gf(ye,0),ge=yv(a,E,te,b===nl?x:-x,(ge.diameter+ye.diameter)/2+ne),x+=b===nl?ge:-ge}}function _g(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var ge=y.M(he);ge.centerX=E*Math.cos(x),ge.centerY=te*Math.sin(x),ge.actualAngle=180*x/Math.PI,ge=yv(a,E,te,b===nl?x:-x,ne),x+=b===nl?ge:-ge}}function jS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new Gg,360>x){for(te=b+(E===nl?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,DS(a,y,x,b,E)}else FS(a,y,x,b,E);a.Xr.commit(y)}function FS(a,y,x,b,E){var te=a.lc,ne=a.Ti,se=a.Zm,he=te*Math.cos(b*Math.PI/180),ge=a.me*Math.sin(b*Math.PI/180),ye=y.Fa();if(ye.length===3)ye[0].centerX=te,ye[0].centerY=0,ye[1].centerX=ye[0].centerX-ye[0].width/2-ye[1].width/2-ne,ye[1].y=ye[0].y,ye[2].centerX=(ye[0].centerX+ye[1].centerX)/2,ye[2].y=ye[0].y-ye[2].height-ne;else if(ye.length===4)ye[0].centerX=te,ye[0].centerY=0,ye[2].centerX=-ye[0].centerX,ye[2].centerY=ye[0].centerY,ye[1].centerX=0,ye[1].y=Math.min(ye[0].y,ye[2].y)-ye[1].height-ne,ye[3].centerX=0,ye[3].y=Math.max(ye[0].y+ye[0].height+ne,ye[2].y+ye[2].height+ne);else{te=Mt.alloc();for(var Me=0;Me<ye.length&&(ye[Me].centerX=he,ye[Me].centerY=ge,!(Me>=ye.length-1));Me++)IS(a,he,ge,ye,Me,E,te)||BS(a,he,ge,ye,Me,E,te),he=te.x,ge=te.y;if(Mt.free(te),a.mj++,!(23<a.mj)){he=ye[0].centerX,ge=ye[0].centerY,te=ye[ye.length-1].centerX,Me=ye[ye.length-1].centerY;var Re=Math.abs(he-te)-((ye[0].width+ye[ye.length-1].width)/2+ne),Ve=Math.abs(ge-Me)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(Ve)?Math.abs(he-te)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<Ve?Ve:1>Math.abs(Re)?0:Re,he=Math.abs(te)>Math.abs(Me)?0<te!=ge>Me:0<Me!=he<te,(he=E===nl?he:!he)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ye[ye.length-1].width),ne=Math.min(ne,-ye[ye.length-1].height)),a.Xr.compare(ne,ye),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ye.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*se,FS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var te=a.lc,ne=a.me,se=a.Zm,he=te*Math.cos(b*Math.PI/180),ge=ne*Math.sin(b*Math.PI/180),ye=Mt.alloc(),Me=y.Fa(),Re=0;Re<Me.length&&(Me[Re].centerX=he,Me[Re].centerY=ge,!(Re>=Me.length-1));Re++)IS(a,he,ge,Me,Re,E,ye)||BS(a,he,ge,Me,Re,E,ye),he=ye.x,ge=ye.y;if(Mt.free(ye),a.mj++,!(23<a.mj)){if(he=Math.atan2(ge,he),he=E===nl?a.gt-he:he-a.gt,he=Math.abs(he)<Math.abs(he-2*Math.PI)?he:he-2*Math.PI,te=he*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],he=0;he<Me.length;he++)ne.mk[he]=Me[he].bounds.x,ne.tm[he]=Me[he].bounds.y;1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):a.lc-(0<te?1.7:-2.3),a.me=a.lc*se,DS(a,y,x,b,E))}}function IS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,ge=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ye=!1;if(0<=x!=(te===nl)){if(te=y+a,te>se){if(te=y-a,te<-se)return ne.x=te,ne.y=ge,!1;ye=!0}}else if(te=y-a,te<-se){if(te=y+a,te>se)return ne.x=te,ne.y=ge,!1;ye=!0}return ge=Math.sqrt(1-Math.min(1,te*te/(se*se)))*he,0>x!==ye&&(ge=-ge),Math.abs(x-ge)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=ge,!1):(ne.x=te,ne.y=ge,!0)}function BS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,ge=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===nl)){if(te=x-a,te<-he){if(te=x+a,te>he){ne.x=ge,ne.y=te;return}b=!0}}else if(te=x+a,te>he){if(te=x-a,te<-he){ne.x=ge,ne.y=te;return}b=!0}ge=Math.sqrt(1-Math.min(1,te*te/(he*he)))*se,0>y!==b&&(ge=-ge),ne.x=ge,ne.y=te}Bo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Bo.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 Mt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.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))},Bo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var te=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,se=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),he=0,ge=0;ge<=te;ge++){b!==void 0&&E!==void 0?he=b+ge*E/te:he=ge*Math.PI/(2*te);var ye=Math.sin(he);ne+=Math.sqrt(1-a*a*ye*ye)*se}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function vv(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function yv(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var te=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var se=0;;se++){var he=Math.sin(b+se*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*he*he)*a,ne>=E)return se*a}}Bo.prototype.sort=function(a){switch(this.sorting){case Sv:break;case xv:a.reverse();break;case wv:a.sort(this.comparer);break;case bv:a.sort(this.comparer),a.reverse();break;case jp:return this.ak(Fx(a));default:Zt("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Ln;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var se=a.M(ne).edgesCount;se>E&&(E=se,te=ne)}else for(ne=0;ne<a.length;ne++)se=y[ne],se>E&&(E=se,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}Bo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],se=[];b=[],E=new Ln;for(var he=0,ge=0;ge<y.length;ge++){var ye=y[ge].length;if(ye===1)b.push(ge);else if(ye===0)E.add(a.M(ge));else{if(he===0)x.push(ge);else{for(var Me=ye=1/0,Re=-1,Ve=[],qe=0;qe<x.length;qe++)0>y[x[qe]].indexOf(x[qe===x.length-1?0:qe+1])&&Ve.push(qe===x.length-1?0:qe+1);if(Ve.length===0)for(qe=0;qe<x.length;qe++)Ve.push(qe);for(qe=0;qe<Ve.length;qe++){for(var it=Ve[qe],At=y[ge],bt=0,Ot=0;Ot<ne.length;Ot++){var Ft=te[ne[Ot]],It=te[se[Ot]];if(Ft<It){var Gt=Ft;Ft=It}else Gt=It;if(Gt<it&&it<=Ft)for(It=0;It<At.length;It++){var Yt=At[It];0>x.indexOf(Yt)||Gt<te[Yt]&&te[Yt]<Ft||Gt===te[Yt]||Ft===te[Yt]||bt++}else for(It=0;It<At.length;It++)Yt=At[It],0>x.indexOf(Yt)||Gt<te[Yt]&&te[Yt]<Ft&&Gt!==te[Yt]&&Ft!==te[Yt]&&bt++}for(At=bt,Ot=bt=0;Ot<y[ge].length;Ot++)Gt=x.indexOf(y[ge][Ot]),0<=Gt&&(Gt=Math.abs(it-(Gt>=it?Gt+1:Gt)),bt+=Gt<x.length+1-Gt?Gt:x.length+1-Gt);for(Ot=0;Ot<ne.length;Ot++)Gt=te[ne[Ot]],Ft=te[se[Ot]],Gt>=it&&Gt++,Ft>=it&&Ft++,Gt>Ft&&(It=Ft,Ft=Gt,Gt=It),Ft-Gt<(x.length+2)/2==(Gt<it&&it<=Ft)&&bt++;(At<ye||At===ye&&bt<Me)&&(ye=At,Me=bt,Re=it)}for(x.splice(Re,0,ge),ye=0;ye<x.length;ye++)te[x[ye]]=ye;for(ye=0;ye<y[ge].length;ye++)Me=y[ge][ye],0<=x.indexOf(Me)&&(ne.push(ge),se.push(Me))}he++}}for(ne=x.length;;){for(te=!0,se=0;se<b.length;se++)if(he=b[se],ge=y[he][0],ye=x.indexOf(ge),0<=ye){for(Re=Me=0;Re<y[ge].length;Re++)Ve=x.indexOf(y[ge][Re]),0>Ve||Ve===ye||(qe=Ve>ye?Ve-ye:ye-Ve,Me+=Ve<ye!=qe>ne-qe?1:-1);x.splice(0>Me?ye:ye+1,0,he),b.splice(se,1),se--}else te=!1;if(te)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},hn.Object.defineProperties(Bo.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!==Uu&&a!==zu&&a!==df&&a!==Dc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==nl&&a!==pf&&a!==ad&&a!==Op||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==Sv&&a!==xv&&a!==wv&&!bv&&a!==jp||(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!==Pv&&a!==Rd||(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 tn(Bo,"ConstantSpacing",0),df=new tn(Bo,"ConstantDistance",1),Dc=new tn(Bo,"ConstantAngle",2),Uu=new tn(Bo,"Packed",3),nl=new tn(Bo,"Clockwise",4),pf=new tn(Bo,"Counterclockwise",5),ad=new tn(Bo,"BidirectionalLeft",6),Op=new tn(Bo,"BidirectionalRight",7),Sv=new tn(Bo,"Forwards",8),xv=new tn(Bo,"Reverse",9),wv=new tn(Bo,"Ascending",10),bv=new tn(Bo,"Descending",11),jp=new tn(Bo,"Optimized",12),Pv=new tn(Bo,"Pythagorean",13),Rd=new tn(Bo,"Circular",14);Bo.className="CircularLayout",Bo.ConstantSpacing=zu,Bo.ConstantDistance=df,Bo.ConstantAngle=Dc,Bo.Packed=Uu,Bo.Clockwise=nl,Bo.Counterclockwise=pf,Bo.BidirectionalLeft=ad,Bo.BidirectionalRight=Op,Bo.Forwards=Sv,Bo.Reverse=xv,Bo.Ascending=wv,Bo.Descending=bv,Bo.Optimized=jp,Bo.Pythagorean=Pv,Bo.Circular=Rd;function Gg(){this.Pl=-1/0,this.tm=this.mk=null}Gg.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},Gg.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]}},Gg.className="VertexArrangement";function Fp(a){Zi.call(this,a)}Kt(Fp,Zi),Fp.prototype.createVertex=function(){return new zg(this)},Fp.prototype.createEdge=function(){return new Cv(this)},Fp.className="CircularNetwork";function zg(a){ka.call(this,a),this.u=this.Si=NaN}Kt(zg,ka);function gf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Uu)if(x.nodeDiameterFormula===Rd)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===Rd?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}hn.Object.defineProperties(zg.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)}}}),zg.className="CircularVertex";function Cv(a){_l.call(this,a)}Kt(Cv,_l),Cv.className="CircularEdge";function cs(a){Eo.call(this),this.ah=null,this.An=0,this.$d=new jn(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)}Kt(cs,Eo),cs.prototype.cloneProtected=function(a){Eo.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},cs.prototype.createNetwork=function(){return new _d(this)},cs.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 b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var te=E.value;te.Vd=te.vertexes.count,te.sh=1,te.Hj=null,te.We=null}RS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var se=ne.count,he=!0;te=E=0;for(var ge=xr(),ye=0;ye<se+y.vertexes.count+2;ye++)ge[ye]=null;se=0,ne.reset();for(var Me=rn.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Me),he)he=!1,E=Me.x+Me.width/2,te=Me.y+Me.height/2,ge[0]=new Mt(Me.x+Me.width+b.width,Me.y),ge[1]=new Mt(Me.x,Me.y+Me.height+b.height),se=2;else{var Re=_S(ge,se,E,te,Me.width,Me.height,b),Ve=ge[Re],qe=new Mt(Ve.x+Me.width+b.width,Ve.y),it=new Mt(Ve.x,Ve.y+Me.height+b.height);for(Re+1<se&&ge.splice(Re+1,0,null),ge[Re]=qe,ge[Re+1]=it,se++,Re=Ve.x-Me.x,Ve=Ve.y-Me.y,ye=ye.vertexes.iterator;ye.next();)qe=ye.value,qe.centerX+=Re,qe.centerY+=Ve}for(rn.free(Me),ye=y.vertexes.iterator;ye.next();)ne=ye.value,Re=ne.bounds,2>se?(E=Re.x+Re.width/2,te=Re.y+Re.height/2,ge[0]=new Mt(Re.x+Re.width+b.width,Re.y),ge[1]=new Mt(Re.x,Re.y+Re.height+b.height),se=2):(he=_S(ge,se,E,te,Re.width,Re.height,b),Me=ge[he],Ve=new Mt(Me.x+Re.width+b.width,Me.y),Re=new Mt(Me.x,Me.y+Re.height+b.height),he+1<se&&ge.splice(he+1,0,null),ge[he]=Ve,ge[he+1]=Re,se++,ne.centerX=Me.x+ne.width/2,ne.centerY=Me.y+ne.height/2);for(gr(ge),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}zS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},cs.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},cs.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function RS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Ix(a,y),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,RS(a,y+1,x),zS(a,te),Bx(a,E),y=E.vertexes.Fa(),y.sort(function(ne,se){return ne===null||se===null||ne===se?0:se.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Ix(a,y){for(var x=a.network,b=new _d(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new US;ne.Rs=te.Vd,ne.Ss=te.width,ne.Qs=te.height,ne.Sv=te.focus.x,ne.Tv=te.focus.y,te.We===null&&(te.We=new Ln),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var se=te.value;E=se.fromVertex,ne=se.toVertex,E.network===b&&ne.network===b?b.Bo(se):E.network===b?(se=E.Hj,se===null&&(se=new Ln,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new Ln,ne.Hj=se),se.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,Wt.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var he=E.Hj;if(he!==null&&0<he.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var ge=se=0,ye=he.count-ne;ye<he.count;ye++){var Me=he.M(ye),Re=null;for(te=Me.edges.iterator;te.next();){var Ve=te.value;if(Ve.Ax(Me)===E){Re=Ve;break}}Re!==null&&(ge+=Re.length,se+=Me.width*Me.height)}te=E.centerX,he=E.centerY,ye=E.width,Me=E.height,Re=E.focus,Ve=ye*Me,1>Ve&&(Ve=1),se=Wt.sqrt((se+Ve+ge*ge*4/(ne*ne))/Ve),ne=(se-1)*ye/2,se=(se-1)*Me/2,E.bounds=new rn(te-Re.x-ne,he-Re.y-se,ye+2*ne,Me+2*se),E.focus=new Mt(Re.x+ne,Re.y+se)}}return a.network=b,x}function Bx(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var te=E.Sv,ne=E.Tv;b.bounds=new rn(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new Mt(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,te=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),te=ne.Ss,ne=ne.Qs),te=Wt.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,ge=0,ye=y.vertexes.iterator;ye.next();){var Me=ye.value;1>=Me.Vd?he++:(se=!0,ge++,ne+=Math.atan2(y.centerY-Me.centerY,y.centerX-Me.centerX))}if(he!==0){for(0<ge&&(ne/=ge),ge=y=0,y=se?2*Math.PI/(he+1):2*Math.PI/he,he%2===0&&(ge=y/2),1<x.count&&x.sort(function(Ve,qe){return Ve===null||qe===null||Ve===qe?0:qe.width*qe.height-Ve.width*Ve.height}),se=he%2===0?0:1,x=x.iterator;x.next();)if(he=x.value,!(1<he.Vd||a.isFixed(he))){for(ye=null,Me=he.edges.iterator;Me.next();){ye=Me.value;break}Me=he.width;var Re=he.height;Me=Wt.sqrt(Me*Me+Re*Re)/2,ye=te+ye.length+Me,Me=ne+(y*(se/2>>1)+ge)*(se%2===0?1:-1),he.centerX=b+ye*Math.cos(Me),he.centerY=E+ye*Math.sin(Me),se++}}}}function _S(a,y,x,b,E,te,ne){var se=9e19,he=-1,ge=0;e:for(;ge<y;ge++){var ye=a[ge],Me=ye.x-x,Re=ye.y-b;if(Me=Me*Me+Re*Re,Me<se){for(Re=ge-1;0<=Re;Re--)if(a[Re].y>ye.y&&a[Re].x-ye.x<E+ne.width)continue e;for(Re=ge+1;Re<y;Re++)if(a[Re].x>ye.x&&a[Re].y-ye.y<te+ne.height)continue e;he=ge,se=Me}}return he}cs.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},cs.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 b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var te=E.value;if(te.toVertex===a){x=te;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(te=E.value,te.fromVertex===a){x=te;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function GS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var te=y.bounds,ne=te.x;y=te.y;var se=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,Wt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Wt.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,Wt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,Wt.sqrt(b*b+a*a)):b-(ne+se):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function zS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,_x(a)););a.ah=null}function _x(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 b=x.centerX,E=b,te=x=x.centerY,ne=1;ne<y.length;ne++){var se=y[ne];se.forceX=0,se.forceY=0;var he=se.centerX;se=se.centerY,b=Math.min(b,he),E=Math.max(E,he),x=Math.min(x,se),te=Math.max(te,se)}(E=E-b>te-x)?y.sort(function(it,At){return it===null||At===null||it===At?0:it.centerX-At.centerX}):y.sort(function(it,At){return it===null||At===null||it===At?0:it.centerY-At.centerY}),x=a.Zf;var ge=b=se=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,se=ne.focus,he=b.x+se.x;var ye=b.y+se.y;b=ne.charge*a.electricalFieldX(he,ye),ge=ne.charge*a.electricalFieldY(he,ye),b+=ne.mass*a.gravitationalFieldX(he,ye),ge+=ne.mass*a.gravitationalFieldY(he,ye),ne.forceX+=b,ne.forceY+=ge;for(var Me=te+1;Me<y.length;Me++){var Re=y[Me];if(Re!==ne){b=Re.bounds,se=Re.focus,ge=b.x+se.x;var Ve=b.y+se.y;if(he-ge>x||ge-he>x){if(E)break}else if(ye-Ve>x||Ve-ye>x){if(!E)break}else{var qe=GS(ne,Re);1>qe?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new Ev),qe=b.random(),se=b.random(),he>ge?(b=Math.abs(Re.bounds.right-ne.bounds.x),b=(1+b)*qe):he<ge?(b=Math.abs(Re.bounds.x-ne.bounds.right),b=-(1+b)*qe):(b=Math.max(Re.width,ne.width),b=(1+b)*qe-b/2),ye>Ve?(ge=Math.abs(Re.bounds.bottom-ne.bounds.y),ge=(1+ge)*se):he<ge?(ge=Math.abs(Re.bounds.y-ne.bounds.bottom),ge=-(1+ge)*se):(ge=Math.max(Re.height,ne.height),ge=(1+ge)*se-ge/2)):(se=-(ne.charge*Re.charge)/(qe*qe),b=(ge-he)/qe*se,ge=(Ve-ye)/qe*se),ne.forceX+=b,ne.forceY+=ge,Re.forceX-=b,Re.forceY-=ge}}}}for(E=a.network.edges.iterator;E.next();)se=E.value,x=se.fromVertex,te=se.toVertex,ne=x.bounds,he=x.focus,b=ne.x+he.x,ne=ne.y+he.y,ye=te.bounds,Me=te.focus,he=ye.x+Me.x,ye=ye.y+Me.y,Me=GS(x,te),1>Me?(Me=a.randomNumberGenerator,Me===null&&(a.randomNumberGenerator=Me=new Ev),se=Me.random(),Me=Me.random(),b=(b>he?1:-1)*(1+(te.width>x.width?te.width:x.width))*se,ge=(ne>ye?1:-1)*(1+(te.height>x.height?te.height:x.height))*Me):(se=se.stiffness*(Me-se.length),b=(he-b)/Me*se,ge=(ye-ne)/Me*se),x.forceX+=b,x.forceY+=ge,te.forceX-=b,te.forceY-=ge;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}cs.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},cs.prototype.moveFixedVertex=function(){},cs.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},cs.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Ba,y.toSpot=Ba)}},cs.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=rn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,rn.free(x)}x=rn.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}rn.free(x)},cs.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},cs.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},cs.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},cs.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},cs.prototype.electricalFieldX=function(){return 0},cs.prototype.electricalFieldY=function(){return 0},cs.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},cs.prototype.gravitationalFieldX=function(){return 0},cs.prototype.gravitationalFieldY=function(){return 0},cs.prototype.isFixed=function(a){return a.isFixed},hn.Object.defineProperties(cs.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"&&Zt('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())}}}),cs.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function _d(a){Zi.call(this,a)}Kt(_d,Zi),_d.prototype.createVertex=function(){return new Ug(this)},_d.prototype.createEdge=function(){return new Wg(this)},_d.className="ForceDirectedNetwork";function Ug(a){ka.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}Kt(Ug,ka),hn.Object.defineProperties(Ug.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)}}}),Ug.className="ForceDirectedVertex";function Wg(a){_l.call(this,a),this.j=this.o=NaN}Kt(Wg,_l),hn.Object.defineProperties(Wg.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)}}}),Wg.className="ForceDirectedEdge";function Ev(){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()}Ev.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},Ev.className="RandomNumberGenerator";function Mi(a){Eo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=Av,this.Zk=Nv,this.Qk=Ov,this.bj=4,this.rk=jv,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 Mt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Kt(Mi,Eo),Mi.prototype.cloneProtected=function(a){Eo.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},Mi.prototype.qb=function(a){a.classType===Mi?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:Zt("Unknown enum value: "+a):Eo.prototype.qb.call(this,a)},Mi.prototype.createNetwork=function(){return new Ip(this)},Mi.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!==Kg&&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===Kg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,te=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||te.node===null&&te.data===null)&&E.layer===te.layer)){var ne=0,se=0,he=0,ge=0;if(b.link!==null){if(se=b.link,se===null)continue;var ye=E.node;if(ne=te.node,ye===null||ne===null)continue;var Me=se.fromNode;he=se.toNode;for(var Re=se.fromPort;Re!==null&&!Re.Ed();)Re=Re.panel;for(se=se.toPort;se!==null&&!se.Ed();)se=se.panel;if(b.rev){ge=Me;var Ve=Re;Me=he,Re=se,he=ge,se=Ve}var qe=E.focus;ge=te.focus;var it=b.rev?te.bounds:E.bounds;Ve=Mt.alloc(),ye!==Me?it.w()&&Me.isVisible()?Me.actualBounds.w()?(Ac(Me,Re,oi,Ve),Ve.x+=Me.actualBounds.x-it.x,Ve.y+=Me.actualBounds.y-it.y):(Ac(Me,Re,oi,Ve),Ve.w()||Ve.assign(qe)):Ve.assign(qe):it.w()?(Ac(Me,Re,oi,Ve),Ve.w()||Ve.assign(qe)):Ve.assign(qe),Me=b.rev?E.bounds:te.bounds,ye=Mt.alloc(),ne!==he?Me.w()&&he.isVisible()?he.actualBounds.w()?(Ac(he,se,oi,ye),ye.x+=he.actualBounds.x-Me.x,ye.y+=he.actualBounds.y-Me.y):(Ac(he,se,oi,ye),ye.w()||ye.assign(ge)):ye.assign(ge):Me.w()?(Ac(he,se,oi,ye),ye.w()||ye.assign(ge)):ye.assign(ge),this.K===90||this.K===270?(ne=Math.round((Ve.x-qe.x)/this.kc),he=Ve.x,se=Math.round((ye.x-ge.x)/this.kc),ge=ye.x):(ne=Math.round((Ve.y-qe.y)/this.kc),he=Ve.y,se=Math.round((ye.y-ge.y)/this.kc),ge=ye.y),Mt.free(Ve),Mt.free(ye),b.portFromColOffset=ne,b.portFromPos=he,b.portToColOffset=se,b.portToPos=ge}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ve=E.layer,ye=te.layer,Me=0,it=b.link,it!==null){var At=it.fromPort,bt=it.toPort;if(At!==null&&bt!==null){var Ot=it.fromNode;if(Re=it.toNode,Ot!==null&&Re!==null){var Ft=Lv(this,!0),It=Lv(this,!1),Gt=this.setsPortSpots?Ft:it.computeSpot(!0,At);qe=this.setsPortSpots?It:it.computeSpot(!1,bt);var Yt=it.isOrthogonal;Gt.$c()&&Gt.Hf(It)&&qe.$c()&&qe.Hf(Ft)?Me=0:(Ft=it.getLinkPoint(Ot,At,Gt,!0,Yt,Re,bt,Mt.alloc()),It=it.getLinkDirection(Ot,At,Ft,Gt,!0,Yt,Re,bt),Mt.free(Ft),Gt.ys()||It!==QS(this,b,!0)?this.setsPortSpots&&Ot!==null&&Ot.ports.count===1&&b.rev&&(Me+=1):Me+=1,Gt=it.getLinkPoint(Re,bt,qe,!1,Yt,Ot,At,Mt.alloc()),it=it.getLinkDirection(Re,bt,Gt,qe,!1,Yt,Ot,At),Mt.free(Gt),qe.ys()||it!==QS(this,b,!1)?this.setsPortSpots&&Re!==null&&Re.ports.count===1&&b.rev&&(Me+=2):Me+=2)}}}if(Re=Me,Me=Re===1||Re===3,(Re=Re===2||Re===3)&&(qe=a.createVertex(),qe.node=null,qe.Dj=1,qe.layer=Ve,qe.near=E,a.dh(qe),E=a.Zj(E,qe,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=qe),it=1,Me&&it--,Ve-ye>it&&0<Ve){for(b.valid=!1,qe=a.createVertex(),qe.node=null,qe.Dj=2,qe.layer=Ve-1,a.dh(qe),E=a.Zj(E,qe,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Re?0:ne,E.portToColOffset=0,E.portFromPos=Re?0:he,E.portToPos=0,E=qe,Ve--;Ve-ye>it&&0<Ve;)qe=a.createVertex(),qe.node=null,qe.Dj=3,qe.layer=Ve-1,a.dh(qe),E=a.Zj(E,qe,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=qe,Ve--;E=a.Zj(qe,te,b.link),E.valid=!Me,Me&&(qe.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=se,E.portFromPos=0,E.portToPos=ge}else b.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=mf(this,a),x=0,b=this.tc[a],te=0;te<b;te++)E=y[te],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),vf(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Mi.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}Mi.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},Mi.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 vl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function pu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function WS(a,y,x){var b=mf(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var te=a.Jn,ne=0;ne<E;ne++){var se=0,he=b[ne],ge=he.near;if(ge!==null&&ge.layer===he.layer)if(he=ge.index,he>ne)for(var ye=ne+1;ye<he;ye++){var Me=b[ye];Me.near===ge&&Me.Dj===ge.Dj||se++}else for(ye=ne-1;ye>he;ye--)Me=b[ye],Me.near===ge&&Me.Dj===ge.Dj||se++;var Re;if(0<=x)for(he=b[ne].sourceEdgesArrayAccess,ge=0;ge<he.length;ge++){var Ve=he[ge];if(Ve.valid&&Ve.fromVertex.layer!==y)for(Me=Ve.fromVertex.index,ye=Ve.portToPos,Ve=Ve.portFromPos,Re=ge+1;Re<he.length;Re++){var qe=he[Re];if(qe.valid&&qe.fromVertex.layer!==y){var it=qe.fromVertex.index,At=qe.portToPos;qe=qe.portFromPos,ye<At&&(Me>it||Me===it&&Ve>qe)&&se++,At<ye&&(it>Me||it===Me&&qe>Ve)&&se++}}}if(0>=x){for(he=b[ne].destinationEdgesArrayAccess,ge=0;ge<he.length;ge++)if(Ve=he[ge],Ve.valid&&Ve.toVertex.layer!==y)for(Me=Ve.toVertex.index,ye=Ve.portToPos,Ve=Ve.portFromPos,Re=ge+1;Re<he.length;Re++)qe=he[Re],qe.valid&&qe.toVertex.layer!==y&&(it=qe.toVertex.index,At=qe.portToPos,qe=qe.portFromPos,Ve<qe&&(Me>it||Me===it&&ye>At)&&se++,qe<Ve&&(it>Me||it===Me&&At>ye)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var bt=0,Ot=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var Ft=b[he].sourceEdgesArrayAccess;for(ge=0;ge<se.length;ge++)if(Ve=se[ge],Ve.valid&&Ve.fromVertex.layer!==y)for(Me=Ve.fromVertex.index,Ve=Ve.portFromPos,Re=0;Re<Ft.length;Re++)qe=Ft[Re],qe.valid&&qe.fromVertex.layer!==y&&(it=qe.fromVertex.index,qe=qe.portFromPos,(Me<it||Me===it&&Ve<qe)&&Ot++,(it<Me||it===Me&&qe<Ve)&&bt++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,Ft=b[he].destinationEdgesArrayAccess,ge=0;ge<se.length;ge++)if(Ve=se[ge],Ve.valid&&Ve.toVertex.layer!==y)for(Me=Ve.toVertex.index,ye=Ve.portToPos,Re=0;Re<Ft.length;Re++)qe=Ft[Re],qe.valid&&qe.toVertex.layer!==y&&(it=qe.toVertex.index,At=qe.portToPos,(Me<it||Me===it&&ye<At)&&Ot++,(it<Me||it===Me&&At<ye)&&bt++)}te[ne*E+he]=bt,te[he*E+ne]=Ot}}return vf(a,y,b),te}Mi.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=WS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var te=E;te<b;te++)a+=x[E*b+te];return a};function kv(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=mf(b,E),ne=b.tc[E],se=0,he=0;he<ne;he++){var ge=te[he].destinationEdgesArrayAccess;if(ge!==null)for(var ye=0;ye<ge.length;ye++){var Me=ge[ye];if(Me.valid&&Me.toVertex.layer!==E){var Re=Me.fromVertex.column+Me.portFromColOffset,Ve=Me.toVertex.column+Me.portToColOffset;se+=(Math.abs(Re-Ve)+1)*gy(Me)}}}vf(b,E,te),y+=se}return y}Mi.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 my(a,y,x){for(var b=mf(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=se.destinationEdgesArrayAccess);var ye=0,Me=0,Re=se.near;if(Re!==null&&Re.layer===se.layer&&(ye+=Re.column-1,Me++),he!==null)for(Re=0;Re<he.length;Re++){se=he[Re];var Ve=se.fromVertex;se.valid&&!se.rev&&Ve.layer!==y&&(ye+=Ve.column,Me++)}if(ge!==null)for(he=0;he<ge.length;he++)se=ge[he],Re=se.toVertex,se.valid&&!se.rev&&Re.layer!==y&&(ye+=Re.column,Me++);te[ne]=Me===0?-1:ye/Me}return vf(a,y,b),te}function HS(a,y,x){for(var b=mf(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=se.destinationEdgesArrayAccess);var ye=0,Me=[],Re=se.near;if(Re!==null&&Re.layer===se.layer&&(Me[ye]=Re.column-1,ye++),se=void 0,he!==null)for(Re=0;Re<he.length;Re++){se=he[Re];var Ve=se.fromVertex;se.valid&&!se.rev&&Ve.layer!==y&&(Me[ye]=Ve.column+se.portFromColOffset,ye++)}if(ge!==null)for(he=0;he<ge.length;he++)se=ge[he],Re=se.toVertex,se.valid&&!se.rev&&Re.layer!==y&&(Me[ye]=Re.column+se.portToColOffset,ye++);ye===0?te[ne]=-1:(Me.sort(function(qe,it){return qe-it}),ge=ye>>1,te[ne]=ye&1?Me[ge]:Me[ge-1]+Me[ge]>>1)}return vf(a,y,b),te}function Hg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var se=ne.value,he=se.toVertex,ge=y.layer-he.layer;se=a.linkMinLength(se),ge===se&&Hg(a,he,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)se=ne.value,he=se.fromVertex,ge=he.layer-y.layer,se=a.linkMinLength(se),ge===se&&Hg(a,he,x,b,E,te)}}function vy(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,te);if(te)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,te)}}Mi.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;Gx(a)!==null;){for(E=KS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=KS(a);for(E=VS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=VS(a);E=null;for(var te=0,ne=this.network.vertexes.iterator;ne.next();){var se=ne.value;if(se.valid){for(var he=0,ge=se.destinationEdges;ge.next();)ge.value.toVertex.valid&&he++;ge=0;for(var ye=se.sourceEdges;ye.next();)ye.value.fromVertex.valid&&ge++;(E===null||te<he-ge)&&(E=se,te=he-ge)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case Av:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,te=E.finish,E.Ll<y.Ll&&x<te&&(this.network.gm(b),b.rev=!0));break;case Kg:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(te=0;te<E.length;te++)E[te].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function Gx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}Mi.prototype.assignLayers=function(){switch(this.Zk){case wy:XS(this);break;case by:for(var a,y=this.network.vertexes.iterator;y.next();)a=ZS(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 Nv:for(XS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&JS(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 XS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=YS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,te=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function ZS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,te=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,ZS(a,te)+E)}y.layer=x}else x=y.layer;return x}function JS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)JS(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,te=0;te<E;te++){var ne=b[te],se=ne.fromVertex,he=ne.toVertex;ne=a.linkMinLength(ne),se.layer-he.layer>ne&&Hg(a,se,0,-1,!0,!1)}for(Hg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,se=0,he=null,ne=a.network.vertexes.iterator;ne.next();){var ge=ne.value;if(ge.component===1){var ye=0,Me=!1,Re=ge.sourceEdgesArrayAccess;E=Re.length;for(var Ve=0;Ve<E;Ve++){var qe=Re[Ve],it=qe.fromVertex;ye+=1,it.component!==1&&(te+=1,it=it.layer-ge.layer,qe=a.linkMinLength(qe),b=Math.min(b,it-qe))}for(Re=ge.destinationEdgesArrayAccess,E=Re.length,Ve=0;Ve<E;Ve++)qe=Re[Ve].toVertex,--ye,qe.component!==1?--te:Me=!0;(he===null||ye<se)&&!Me&&(he=ge,se=ye)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else he.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Hg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,se=null,he=a.network.vertexes.iterator;he.next();)if(ne=he.value,ne.component===1){for(ge=0,ye=!1,Re=ne.sourceEdgesArrayAccess,Me=Re.length,Ve=0;Ve<Me;Ve++)qe=Re[Ve].fromVertex,ge+=1,qe.component!==1?b+=1:ye=!0;for(Re=ne.destinationEdgesArrayAccess,Me=Re.length,Ve=0;Ve<Me;Ve++)qe=Re[Ve],it=qe.toVertex,--ge,it.component!==1&&(--b,it=ne.layer-it.layer,qe=a.linkMinLength(qe),E=Math.min(E,it-qe));(se===null||ge>te)&&!ye&&(se=ne,te=ge)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else se.component=0}}}function QS(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}Mi.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case Ov:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&$S(this,x);break;case Py:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qS(this,x)}};function $S(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;b<y.length-1;b++){var E=y[b],te=y[b+1];E.portFromColOffset>te.portFromColOffset&&(x=!0,y[b]=te,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&$S(a,b))}function qS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],te=y[x+1];E.portToColOffset>te.portToColOffset&&(b=!0,y[x]=te,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&qS(a,b))}Mi.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=vl(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)Mv(this,b,1),Mu(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=vl(this)),b=this.Ia;0<=b;b--)Mv(this,b,-1),Mu(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=vl(this))}for(pu(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)Mv(this,b,0),Mu(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=vl(this)),b=this.Ia;0<=b;b--)Mv(this,b,0),Mu(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=vl(this))}pu(this,y);var te,ne,se;switch(this.rk){case Ey:break;case ky:for(se=a+1;(b=this.countCrossings())<se;)for(se=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Mu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Mu(this,b,1)||te;for(E=this.countCrossings(),E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Mu(this,b,1)||te;for(E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Mu(this,b,-1)||te;for(E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Mu(this,b,0)||te;for(E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Mu(this,b,0)||te;E>=a?pu(this,y):(a=E,y=vl(this))}break;default:case jv:for(x=this.Ia,ne=0,se=a+1;(b=this.countCrossings())<se;){for(se=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Mu(this,b,-1)||te;for(E=this.countCrossings(),E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Mu(this,b,1)||te;for(E=this.countCrossings(),E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Mu(this,b,1)||te;for(E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Mu(this,b,-1)||te;for(E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=Mu(this,b,0)||te;for(E>=a?pu(this,y):(a=E,y=vl(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=Mu(this,b,0)||te;E>=a?pu(this,y):(a=E,y=vl(this))}}pu(this,y)};function Mv(a,y,x){var b=mf(a,y),E=a.tc[y],te=HS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),te[x]===-1&&(te[x]=b[x].column);for(var se=!0,he;se;)for(se=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(se=!0,he=te[x],te[x]=te[x+1],te[x+1]=he,he=ne[x],ne[x]=ne[x+1],ne[x+1]=he,he=b[x],b[x]=b[x+1],b[x+1]=he);for(x=te=0;x<E;x++)he=b[x],he.index=x,te+=a.nodeMinColumnSpace(he,!0),he.column=te,te+=1,te+=a.nodeMinColumnSpace(he,!1);vf(a,y,b)}function Mu(a,y,x){var b=mf(a,y),E=a.tc[y];x=WS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var se=[];for(te=0;te<E;te++)se[te]=-1;for(var he=!1,ge=!0;ge;)for(ge=!1,te=0;te<E-1;te++){var ye=x[b[te].index*E+b[te+1].index],Me=x[b[te+1].index*E+b[te].index],Re=0,Ve=0,qe=b[te].column,it=b[te+1].column,At=a.nodeMinColumnSpace(b[te],!0),bt=a.nodeMinColumnSpace(b[te],!1),Ot=a.nodeMinColumnSpace(b[te+1],!0),Ft=a.nodeMinColumnSpace(b[te+1],!1);At=qe-At+Ot,bt=it-bt+Ft;var It=b[te].sourceEdges.iterator;for(It.reset();It.next();)if(Ot=It.value,Ft=Ot.fromVertex,Ot.valid&&Ft.layer===y){for(Ot=0;b[Ot]!==Ft;)Ot++;Ot<te&&(Re+=2*(te-Ot),Ve+=2*(te+1-Ot)),Ot===te+1&&(Re+=1),Ot>te+1&&(Re+=4*(Ot-te),Ve+=4*(Ot-(te+1)))}for(It=b[te].destinationEdges.iterator,It.reset();It.next();)if(Ot=It.value,Ft=Ot.toVertex,Ot.valid&&Ft.layer===y){for(Ot=0;b[Ot]!==Ft;)Ot++;Ot===te+1&&(Ve+=1)}for(It=b[te+1].sourceEdges.iterator,It.reset();It.next();)if(Ot=It.value,Ft=Ot.fromVertex,Ot.valid&&Ft.layer===y){for(Ot=0;b[Ot]!==Ft;)Ot++;Ot<te&&(Re+=2*(te+1-Ot),Ve+=2*(te-Ot)),Ot===te&&(Ve+=1),Ot>te+1&&(Re+=4*(Ot-(te+1)),Ve+=4*(Ot-te))}for(It=b[te+1].destinationEdges.iterator,It.reset();It.next();)if(Ot=It.value,Ft=Ot.toVertex,Ot.valid&&Ft.layer===y){for(Ot=0;b[Ot]!==Ft;)Ot++;Ot===te&&(Re+=1)}Ot=Ft=0,It=ne[b[te].index];var Gt=se[b[te].index],Yt=ne[b[te+1].index],Bn=se[b[te+1].index];It!==-1&&(Ft+=Math.abs(It-qe),Ot+=Math.abs(It-bt)),Gt!==-1&&(Ft+=Math.abs(Gt-qe),Ot+=Math.abs(Gt-bt)),Yt!==-1&&(Ft+=Math.abs(Yt-it),Ot+=Math.abs(Yt-At)),Bn!==-1&&(Ft+=Math.abs(Bn-it),Ot+=Math.abs(Bn-At)),(Ve<Re-.5||Ve===Re&&Me<ye-.5||Ve===Re&&Me===ye&&Ot<Ft-.5)&&(ge=he=!0,b[te].column=bt,b[te+1].column=At,ye=b[te],b[te]=b[te+1],b[te+1]=ye)}for(te=0;te<E;te++)b[te].index=te;return vf(a,y,b),he}Mi.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Yx)!==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 b,E=this.network.vertexes.iterator;E.next();){var te=E.value;y=te.layer,b=te.column,te=this.nodeMinColumnSpace(te,!1),x[y]=Math.max(x[y],b+te)}for(E.reset();E.next();)te=E.value,y=te.layer,b=te.column,te.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Dp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Dp(this,y,-1)||x;x=Dp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Dp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Dp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Dp(this,y,0)||x}}else Hx(this)};function Dp(a,y,x){for(var b=!1;zx(a,y,x);)b=!0;return b}function zx(a,y,x){var b,E=mf(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var se=my(a,y,1);if(0>x)for(b=0;b<te;b++)se[b]=-1;for(var he=!1,ge=!0;ge;)for(ge=!1,b=0;b<te;b++){var ye=E[b].column,Me=a.nodeMinColumnSpace(E[b],!0),Re=a.nodeMinColumnSpace(E[b],!1),Ve=0;0>b-1||ye-E[b-1].column-1>Me+a.nodeMinColumnSpace(E[b-1],!1)?Ve=ye-1:Ve=ye,Me=b+1>=te||E[b+1].column-ye-1>Re+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var qe=Re=0,it=0;if(0>=x)for(var At=E[b].sourceEdges.iterator;At.next();){var bt=At.value,Ot=bt.fromVertex;if(bt.valid&&Ot.layer!==y){var Ft=gy(bt),It=bt.portFromColOffset;bt=bt.portToColOffset,Ot=Ot.column,Re+=(Math.abs(ye+bt-(Ot+It))+1)*Ft,qe+=(Math.abs(Ve+bt-(Ot+It))+1)*Ft,it+=(Math.abs(Me+bt-(Ot+It))+1)*Ft}}if(0<=x)for(At=E[b].destinationEdges.iterator;At.next();)bt=At.value,Ot=bt.toVertex,bt.valid&&Ot.layer!==y&&(Ft=gy(bt),It=bt.portFromColOffset,bt=bt.portToColOffset,Ot=Ot.column,Re+=(Math.abs(ye+It-(Ot+bt))+1)*Ft,qe+=(Math.abs(Ve+It-(Ot+bt))+1)*Ft,it+=(Math.abs(Me+It-(Ot+bt))+1)*Ft);bt=It=Ft=0,At=ne[E[b].index],Ot=se[E[b].index],At!==-1&&(Ft+=Math.abs(At-ye),It+=Math.abs(At-Ve),bt+=Math.abs(At-Me)),Ot!==-1&&(Ft+=Math.abs(Ot-ye),It+=Math.abs(Ot-Ve),bt+=Math.abs(Ot-Me)),qe<Re||qe===Re&&It<Ft?(ge=he=!0,E[b].column=Ve):(it<Re||it===Re&&bt<Ft)&&(ge=he=!0,E[b].column=Me)}return vf(a,y,E),a.normalize(),he}function Sy(a,y,x){var b=mf(a,y),E=a.tc[y],te=HS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=te[x];for(te=!0;te;)for(te=!1,x=0;x<E;x++){var se=b[x].column,he=a.nodeMinColumnSpace(b[x],!0),ge=a.nodeMinColumnSpace(b[x],!1),ye=0;if(ne[x]===-1)if(x===0&&x===E-1)ye=se;else if(x===0){var Me=b[x+1].column;Me-se===ge+a.nodeMinColumnSpace(b[x+1],!0)?ye=se-1:ye=se}else x===E-1?(Me=b[x-1].column,ye=se-Me===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Me=b[x-1].column,he=Me+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Me=b[x+1].column,ge=Me-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=(he+ge)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Me=b[x+1].column,ge=Me-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=Math.min(ne[x],ge)):x===E-1?(Me=b[x-1].column,he=Me+a.nodeMinColumnSpace(b[x-1],!1)+he+1,ye=Math.max(ne[x],he)):(Me=b[x-1].column,he=Me+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Me=b[x+1].column,ge=Me-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,he<ne[x]&&ne[x]<ge?ye=ne[x]:he>=ne[x]?ye=he:ge<=ne[x]&&(ye=ge));ye!==se&&(te=!0,b[x].column=ye)}vf(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,te=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-te<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Wx(a,y){var x=y+1,b,E=[],te=[];for(b=0;b<=a.Ia;b++)E[b]=!1,te[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var se=b.column-a.nodeMinColumnSpace(b,!0),he=b.column+a.nodeMinColumnSpace(b,!1);se<=y&&he>=y&&(E[b.layer]=!0),se<=x&&he>=x&&(te[b.layer]=!0)}for(se=!0,x=!1,b=0;b<=a.Ia;b++)se=se&&!(E[b]&&te[b]);if(se)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Wx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=vl(a),te=kv(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=kv(a);ne>te?pu(a,E):ne<te&&(te=ne,E=vl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=vl(a),te=kv(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=kv(a),ne>te?pu(a,E):ne<te&&(te=ne,E=vl(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var te;for(y=[],te=0;te<a.le*a.le;te++)y[te]=!1;for(E=[],te=0;te<(a.Ia+1)*(a.Ra+1);te++)E[te]=-1;for(b.reset();b.next();){te=b.value;for(var ne=te.layer,se=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),he=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));se<=he;se++)E[ne*(a.Ra+1)+se]=te.component}for(te=0;te<=a.Ia;te++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne+1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne+1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne-1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne-1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne-1]]=!0)}for(E=[],te=0;te<a.le;te++)E[te]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(he=ne[ne.length-1],ne.pop(),E[he])for(E[he]=!1,te=0;te<a.le;te++)y[he*a.le+te]&&ne.splice(0,0,te);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Hx(a){for(var y=xr(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new Nn,Kx(y,x);var te=null,ne=null,se=null,he=null,ge=(a.ve&1)!==0,ye=(a.ve&2)!==0,Me=(a.ve&4)!==0,Re=(a.ve&8)!==0;for(ge&&(a.verticalAlignment(y,x,!0),te=Tv(a,y,!0,!1)),y.reverse(),Me&&(a.verticalAlignment(y,x,!1),se=Tv(a,y,!1,!1)),b=Mn(y),E=b.next();!E.done;E=b.next())E.value.reverse();Re&&(a.verticalAlignment(y,x,!1),he=Tv(a,y,!1,!0)),y.reverse(),ye&&(a.verticalAlignment(y,x,!0),ne=Tv(a,y,!0,!0)),gr(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Ve){var qe=xr();ge&&qe.push(te.get(Ve)),ye&&qe.push(ne.get(Ve)),Me&&qe.push(se.get(Ve)),Re&&qe.push(he.get(Ve)),qe.sort(function(At,bt){return At-bt});var it=qe.length;it=(qe[Math.floor((it-1)/2)]+qe[Math.ceil((it-1)/2)])/2,gr(qe),Ve.zc=it})}function Kx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],se=a[b+1],he=0;te<se.length;he++){var ge=se[he];e:{if(ge.node===null){var ye=My(ge);if(0<ye.length){ye=ye[0].node===null;break e}}ye=!1}var Me=ye;if(he===se.length-1||Me){for(ye=ne.length-1,Me&&(ye=My(ge)[0].index);te<=he;){if(ge=se[te],!ge.bo){Me=[];for(var Re=Mn(ge.sourceEdgesArrayAccess),Ve=Re.next();!Ve.done;Ve=Re.next())Ve=Ve.value,Ve.valid&&Me.push(Ve);ge.bo=Me}for(ge=Mn(ge.bo),Me=ge.next();!Me.done;Me=ge.next())Me=Me.value,Re=Me.fromVertex.index,(Re<E||Re>ye)&&y.add(Me);te++}E=ye}}}Mi.prototype.verticalAlignment=function(a,y,x){Vx(a),a=Mn(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Mn(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?My(te):Zx(te),se=ne.length;if(0<se){ne.sort(function(Me,Re){return Me.vi-Re.vi});var he=(se-1)/2;for(se=Math.floor(he),he=Math.ceil(he);se<=he;se++)if(te.align===te){var ge=ne[se],ye=void 0;ye=x?Fv(ge,te):Fv(te,ge),!y.contains(ye)&&E<ge.vi&&(ge.align=te,te.root=ge.root,te.align=ge.root,E=ge.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function Tv(a,y,x,b){for(var E=a.K===90||a.K===270,te=Mn(y),ne=te.next();!ne.done;ne=te.next()){var se=Mn(ne.value);for(ne=se.next();!ne.done;ne=se.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,te=Mn(y),se=te.next();!se.done;se=te.next()){se=Mn(se.value);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.root===he){for(var ge=0,ye=he;ye.align!==he;){var Me=ye.align,Re=ne?ye.width:ye.height,Ve=ne?Me.width:Me.height;if(x){var qe=Fv(ye,Me),it=qe.portFromPos,At=qe.portToPos;qe.link!==null&&(ye.node&&ye.node!==qe.link.fromNode&&(it=ne?ye.focusX:ye.focusY),Me.node&&Me.node!==qe.link.toNode&&(At=ne?Me.focusX:Me.focusY))}else qe=Fv(Me,ye),it=qe.portToPos,At=qe.portFromPos,qe.link!==null&&(ye.node&&ye.node!==qe.link.toNode&&(it=ne?ye.focusX:ye.focusY),Me.node&&Me.node!==qe.link.fromNode&&(At=ne?Me.focusX:Me.focusY));Re=b?ye.qg+(Re-it)-(Ve-At):ye.qg+it-At,Me.qg=Re,ge=Math.min(ge,Re),ye=ye.align}ye=he;do ye.qg=ye.qg-ge,ye=ye.align;while(ye!==he)}}for(x=Mn(y),ne=x.next();!ne.done;ne=x.next())for(te=Mn(ne.value),ne=te.next();!ne.done;ne=te.next())ne=ne.value,ne.root===ne&&nx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,se=0;do{for(te=y[ne][se];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(se=rx(te,y),se.sd.shift=Math.min(se.sd.shift,te.sd.shift+te.zc+te.qg-(se.zc+se.qg+(E?se.width:se.height)+a.columnSpacing)));se=te.vi+1}while(ne<y.length&&se<y[ne].length&&te.sd===y[ne][se].sd)}for(a=new Vn,y=Mn(y),ne=y.next();!ne.done;ne=y.next())for(x=Mn(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,te=E?ne.width:ne.height,a.add(ne,b?-ne.zc-te:ne.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=rx(b,x),te=E.root;nx(a,te,x),y.sd===y&&(y.sd=te.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===te.sd&&(y.zc=Math.max(y.zc,te.zc+E.qg+ne-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function rx(a,y){var x=a.Tz;return a=a.vi,1>a&&Zt("Could not determine previous vertex in layer"),y[x][a-1]}Mi.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=xr(),E=xr(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var se=Xx(this,y[ne],b,E,ne);se<te&&(x=ne,te=se)}for(te={},ne=0;4>ne;te={delta:te.delta},ne++)y[ne]&&(te.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],te.delta!==0&&y[ne].each(function(he){return function(ge){ge.value+=he.delta}}(te)));gr(b),gr(E)};function Xx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var te=1/0,ne=-1/0;return y.each(function(se){var he=se.key;se=se.value,he=a.K===90||a.K===270?he.width:he.height,se<te&&(te=se),se+he>ne&&(ne=se+he)}),x[E]=te,b[E]=ne,ne-te}Mi.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Lv(this,!0),y=Lv(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function Lv(a,y){return a.K===270?y?xl:ps:a.K===90?y?ps:xl:a.K===180?y?zs:is:y?is:zs}Mi.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 b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var te=1/0,ne=E=1/0,se=-1/0;a.next();){var he=a.value,ge=he.layer,ye=he.column|0;b?(ne=y.x+this.kc*ye,ge=this.Kd[ge]):(ne=this.Kd[ge],ge=y.y+this.kc*ye),he.centerX=ne,he.centerY=ge,x&&isFinite(he.zc)&&(b?he.node?he.x=y.x+he.zc:he.centerX=y.x+he.zc:he.node?he.y=y.y+he.zc:he.centerY=y.y+he.zc),te=Math.min(he.x,te),E=Math.min(he.y,E),b?(ne=te,se=Math.max(se,he.bounds.right)):(ne=E,se=Math.max(se,he.bounds.bottom))}for(this.xw=se-ne,te=y.x-te,y=y.y-E,this.Rf=new Mt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},Mi.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 b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new rn(0,0,x,Math.abs(this.Ta[0]))):y.push(new rn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new rn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new rn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new rn(0,0,Math.abs(this.Ta[0]),x)):y.push(new rn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new rn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new rn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Mi.prototype.commitLayers=function(){},Mi.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 b=y,E=b.fromNode,te=b.toNode,ne=b.fromPort,se=b.toPort;if(E!==null){var he=E.findVisibleNode();he!==null&&he!==E&&(E=he,ne=he.port)}te!==null&&(he=te.findVisibleNode(),he!==null&&he!==te&&(te=he,se=he.port));var ge=y.computeSpot(!0,ne);he=y.computeSpot(!1,se);var ye=x.fromVertex,Me=x.toVertex;if(x.valid)y.curve===ru&&y.pointsCount===4&&(ye.column===Me.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,ge,!0,!1,te,se),se=y.getLinkPoint(te,se,he,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),se.w()||se.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+se.x)/3,(2*x.y+se.y)/3),y.yf((x.x+2*se.x)/3,(x.y+2*se.y)/3),y.yf(se.x,se.y)):(x=b=!1,ne!==null&&ge===ba&&(b=!0),se!==null&&he===ba&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(oi),y.i(3),!0),he.w()||he.set(E.actualBounds.center),y.L(0,he.x,he.y)),E=null,x&&(E=y.getLinkPointFromPoint(te,se,se.ga(oi),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),he&&(te=y.i(2),y.L(1,(2*he.x+te.x)/3,(2*he.y+te.y)/3)),E&&(te=y.i(1),y.L(2,(2*E.x+te.x)/3,(2*E.y+te.y)/3))))),y.zf();else if(ye.layer===Me.layer)y.zf();else{var Re=!1,Ve=!1,qe=this.ie,it=y.firstPickIndex+1;if(y.isOrthogonal){Ve=!0;var At=y.pointsCount;4<At&&y.points.removeRange(2,At-3)}else if(y.curve===ru)Re=!0,At=y.pointsCount,4<At&&y.points.removeRange(2,At-3),At===4&&(it=2);else{At=y.pointsCount;var bt=ge===ba,Ot=he===ba;2<At&&bt&&Ot?y.points.removeRange(1,At-2):3<At&&bt&&!Ot?y.points.removeRange(1,At-3):3<At&&!bt&&Ot?y.points.removeRange(2,At-2):4<At&&!bt&&!Ot&&y.points.removeRange(2,At-3)}if(x.rev){for(;Me!==null&&ye!==Me;){var Ft=At=null;for(bt=Me.sourceEdges.iterator;bt.next()&&(Ot=bt.value,Ot.link!==x.link||(At=Ot.fromVertex,Ft=Ot.toVertex,At.node!==null)););if(At===null)break;if(At!==ye){bt=y.i(it-1).x,Ot=y.i(it-1).y;var It=At.centerX,Gt=At.centerY;if(Ve)this.K===180||this.K===0?it===y.firstPickIndex+1?(y.m(it++,bt,Ot),y.m(it++,bt,Gt)):(Ft!==null?Ft.centerY:Ot)!==Gt&&(Ft=this.Ta[At.layer-1]+this.Rf.x,y.m(it++,Ft,Ot),y.m(it++,Ft,Gt)):it===y.firstPickIndex+1?(y.m(it++,bt,Ot),y.m(it++,It,Ot)):(Ft!==null?Ft.centerX:bt)!==It&&(Ft=this.Ta[At.layer-1]+this.Rf.y,y.m(it++,bt,Ft),y.m(it++,It,Ft));else if(it===y.firstPickIndex+1){Ft=Math.max(10,this.he[Me.layer]);var Yt=Math.max(10,this.Ld[Me.layer]);if(Re)this.K===180?It<=Me.bounds.x?(Me=Me.bounds.x,y.m(it++,Me-Ft,Gt),y.m(it++,Me,Gt),y.m(it++,Me+Yt,Gt)):(y.m(it++,It-Ft,Gt),y.m(it++,It,Gt),y.m(it++,It+Yt,Gt)):this.K===90?Gt>=Me.bounds.bottom?(Me=Me.bounds.y+Me.bounds.height,y.m(it++,It,Me+Yt),y.m(it++,It,Me),y.m(it++,It,Me-Ft)):(y.m(it++,It,Gt+Yt),y.m(it++,It,Gt),y.m(it++,It,Gt-Ft)):this.K===270?Gt<=Me.bounds.y?(Me=Me.bounds.y,y.m(it++,It,Me-Ft),y.m(it++,It,Me),y.m(it++,It,Me+Yt)):(y.m(it++,It,Gt-Ft),y.m(it++,It,Gt),y.m(it++,It,Gt+Yt)):this.K===0&&(It>=Me.bounds.right?(Me=Me.bounds.x+Me.bounds.width,y.m(it++,Me+Yt,Gt),y.m(it++,Me,Gt),y.m(it++,Me-Ft,Gt)):(y.m(it++,It+Yt,Gt),y.m(it++,It,Gt),y.m(it++,It-Ft,Gt)));else{y.m(it++,bt,Ot);var Bn=0;this.K===180||this.K===0?((this.K===180?It>=Me.bounds.right:It<=Me.bounds.x)&&(Bn=(this.K===0?-Ft:Yt)/2),y.m(it++,bt+Bn,Gt)):((this.K===270?Gt>=Me.bounds.bottom:Gt<=Me.bounds.y)&&(Bn=(this.K===90?-Ft:Yt)/2),y.m(it++,It,Ot+Bn)),y.m(it++,It,Gt)}}else Ft=Math.max(10,this.he[At.layer]),Yt=Math.max(10,this.Ld[At.layer]),Re?this.K===180?(y.m(it++,It-Ft-qe,Gt),y.m(it++,Math.min(It-Ft+qe/2,It),Gt),y.m(it++,It,Gt),y.m(it++,It,Gt),y.m(it++,Math.max(It+Yt-qe/2,It),Gt),y.m(it++,It+Yt+qe,Gt)):this.K===90?(y.m(it++,It,Gt+Yt+qe),y.m(it++,It,Math.max(Gt+Yt-qe/2,Gt)),y.m(it++,It,Gt),y.m(it++,It,Gt),y.m(it++,It,Math.min(Gt-Ft+qe/2,Gt)),y.m(it++,It,Gt-Ft-qe)):this.K===270?(y.m(it++,It,Gt-Ft-qe),y.m(it++,It,Math.min(Gt-Ft+qe/2,Gt)),y.m(it++,It,Gt),y.m(it++,It,Gt),y.m(it++,It,Math.max(Gt+Yt-qe/2,Gt)),y.m(it++,It,Gt+Yt+qe)):(y.m(it++,It+Yt+qe,Gt),y.m(it++,Math.max(It+Yt-qe/2,It),Gt),y.m(it++,It,Gt),y.m(it++,It,Gt),y.m(it++,Math.min(It-Ft+qe/2,It),Gt),y.m(it++,It-Ft-qe,Gt)):y.m(it++,It,Gt)}Me=At}(se===null||ge!==ba||Ve)&&(bt=y.i(it-1).x,Ot=y.i(it-1).y,It=y.i(it).x,Gt=y.i(it).y,Ve?(qe=this.Ld[ye.layer],this.K===180||this.K===0?(Ve=Ot,Ve>=ye.bounds.y&&Ve<=ye.bounds.bottom&&(this.K===180?It>=ye.bounds.x:It<=ye.bounds.right)&&(Me=ye.centerX+(this.K===180?-qe:qe),Ve<ye.bounds.y+ye.bounds.height/2?Ve=ye.bounds.y-this.kc/2:Ve=ye.bounds.bottom+this.kc/2,y.m(it++,Me,Ot),y.m(it++,Me,Ve)),y.m(it++,It,Ve)):(Ve=bt,Ve>=ye.bounds.x&&Ve<=ye.bounds.right&&(this.K===270?Gt>=ye.bounds.y:Gt<=ye.bounds.bottom)&&(Me=ye.centerY+(this.K===270?-qe:qe),Ve<ye.bounds.x+ye.bounds.width/2?Ve=ye.bounds.x-this.kc/2:Ve=ye.bounds.right+this.kc/2,y.m(it++,bt,Me),y.m(it++,Ve,Me)),y.m(it++,Ve,Gt)),y.m(it++,It,Gt)):Re?(Ft=Math.max(10,this.he[ye.layer]),Yt=Math.max(10,this.Ld[ye.layer]),this.K===180&&It>=ye.bounds.x?(Me=ye.bounds.x+ye.bounds.width,y.L(it-2,Me,Ot),y.L(it-1,Me+Yt,Ot)):this.K===90&&Gt<=ye.bounds.bottom?(Me=ye.bounds.y,y.L(it-2,bt,Me),y.L(it-1,bt,Me-Ft)):this.K===270&&Gt>=ye.bounds.y?(Me=ye.bounds.y+ye.bounds.height,y.L(it-2,bt,Me),y.L(it-1,bt,Me+Yt)):this.K===0&&It<=ye.bounds.right&&(Me=ye.bounds.x,y.L(it-2,Me,Ot),y.L(it-1,Me-Ft,Ot))):(Ft=Math.max(10,this.he[ye.layer]),Yt=Math.max(10,this.Ld[ye.layer]),Ve=0,this.K===180||this.K===0?((this.K===180?It<=ye.bounds.x:It>=ye.bounds.right)&&(Ve=(this.K===0?Yt:-Ft)/2),y.m(it++,It+Ve,Ot)):((this.K===270?Gt<=ye.bounds.y:Gt>=ye.bounds.bottom)&&(Ve=(this.K===90?Yt:-Ft)/2),y.m(it++,bt,Gt+Ve)),y.m(it++,It,Gt)))}else{for(;ye!==null&&ye!==Me;){for(Ft=At=null,ye=ye.destinationEdges.iterator;ye.next()&&(bt=ye.value,bt.link!==x.link||(At=bt.toVertex,Ft=bt.fromVertex,Ft.node!==null&&(Ft=null),At.node!==null)););if(At===null)break;At!==Me&&(bt=y.i(it-1).x,Ot=y.i(it-1).y,It=At.centerX,Gt=At.centerY,Ve?this.K===180||this.K===0?(Ft!==null?Ft.centerY:Ot)!==Gt&&(Ft=this.Ta[At.layer]+this.Rf.x,it===y.firstPickIndex+1&&(Ft=this.K===0?Math.max(Ft,bt):Math.min(Ft,bt)),y.m(it++,Ft,Ot),y.m(it++,Ft,Gt)):(Ft!==null?Ft.centerX:bt)!==It&&(Ft=this.Ta[At.layer]+this.Rf.y,it===y.firstPickIndex+1&&(Ft=this.K===90?Math.max(Ft,Ot):Math.min(Ft,Ot)),y.m(it++,bt,Ft),y.m(it++,It,Ft)):(Ft=Math.max(10,this.he[At.layer]),Yt=Math.max(10,this.Ld[At.layer]),Re?this.K===180?(y.m(it++,It+Yt+qe,Gt),y.m(it++,Math.max(It+Yt-qe/2,It),Gt),y.m(it++,It,Gt),y.m(it++,It,Gt),y.m(it++,Math.min(It-Ft+qe/2,It),Gt),y.m(it++,It-Ft-qe,Gt)):this.K===90?(y.m(it++,It,Gt-Ft-qe),y.m(it++,It,Math.min(Gt-Ft+qe/2,Gt)),y.m(it++,It,Gt),y.m(it++,It,Gt),y.m(it++,It,Math.max(Gt+Yt-qe/2,Gt)),y.m(it++,It,Gt+Yt+qe)):this.K===270?(y.m(it++,It,Gt+Yt+qe),y.m(it++,It,Math.max(Gt+Yt-qe/2,Gt)),y.m(it++,It,Gt),y.m(it++,It,Gt),y.m(it++,It,Math.min(Gt-Ft+qe/2,Gt)),y.m(it++,It,Gt-Ft-qe)):(y.m(it++,It-Ft-qe,Gt),y.m(it++,Math.min(It-Ft+qe/2,It),Gt),y.m(it++,It,Gt),y.m(it++,It,Gt),y.m(it++,Math.max(It+Yt-qe/2,It),Gt),y.m(it++,It+Yt+qe,Gt)):this.K===180?(y.m(it++,It+Yt,Gt),y.m(it++,It-Ft,Gt)):this.K===90?(y.m(it++,It,Gt-Ft),y.m(it++,It,Gt+Yt)):this.K===270?(y.m(it++,It,Gt+Yt),y.m(it++,It,Gt-Ft)):(y.m(it++,It-Ft,Gt),y.m(it++,It+Yt,Gt)))),ye=At}Ve&&(bt=y.i(it-1).x,Ot=y.i(it-1).y,It=y.i(it).x,Gt=y.i(it).y,this.K===180||this.K===0?Ot!==Gt&&(Ft=this.K===0?Math.min(Math.max((It+bt)/2,this.Ta[Me.layer]+this.Rf.x),It):Math.max(Math.min((It+bt)/2,this.Ta[Me.layer]+this.Rf.x),It),y.m(it++,Ft,Ot),y.m(it++,Ft,Gt)):bt!==It&&(Ft=this.K===90?Math.min(Math.max((Gt+Ot)/2,this.Ta[Me.layer]+this.Rf.y),Gt):Math.max(Math.min((Gt+Ot)/2,this.Ta[Me.layer]+this.Rf.y),Gt),y.m(it++,bt,Ft),y.m(it++,It,Ft)))}b!==null&&Re&&4<=y.pointsCount&&(ne!==null&&(ne=ge===ba?y.getLinkPointFromPoint(E,ne,ne.ga(oi),y.i(3),!0):y.i(0),ge===ba&&(ge=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+ge.x)/2,ge.y),y.L(2,b.x,(ge.y+b.y)/2)):(y.L(1,ge.x,(ne.y+ge.y)/2),y.L(2,(ge.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),se!==null&&(E=he===ba?y.getLinkPointFromPoint(te,se,se.ga(oi),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===ba&&(se=y.i(y.pointsCount-3),he=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+se.x)/2,se.y),y.L(y.pointsCount-2,he.x,(se.y+he.y)/2)):(y.L(y.pointsCount-2,se.x,(E.y+se.y)/2),y.L(y.pointsCount-3,(se.x+he.x)/2,he.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Mi.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Ln,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 b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var se=new yf;se.layer=Math.floor(te.y/2);var he=b.i(0),ge=b.i(b.pointsCount-1);if(se.first=he.x*he.x+he.y,se.jc=ge.x*ge.x+ge.y,se.rd=Math.min(te.x,ne.x),se.Ic=Math.max(te.x,ne.x),se.index=E,se.link=b,E+2<b.pointsCount){he=b.i(E-1),ge=b.i(E+2);var ye=0;he.y<te.y?ye=ge.y<te.y?3:te.x<ne.x?2:1:he.y>te.y&&(ye=ge.y>te.y?0:ne.x<te.x?2:1),se.j=ye}x.push(se)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),ye=1,se=x[te].jc,he=te;he<E;he++)ge=x[he],ge.jc!==se&&(ye++,se=ge.jc);this.zi(x,this.Ux,te,te+ne);var Me=1;for(se=x[te].first,he=te;he<E;he++)ge=x[he],ge.first!==se&&(Me++,se=ge.first);for(he=!0,ge=Me,ye<Me?(he=!1,ge=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Me=te;Me<E;Me++){var Re=x[Me];(he?Re.first:Re.jc)!==se&&(ye++,se=he?Re.first:Re.jc);var Ve=Re.link;te=Ve.i(Re.index),ne=Ve.i(Re.index+1);var qe=this.linkSpacing*(ye-(ge-1)/2);y++,Ve.uh(),Ve.L(Re.index,te.x,te.y+qe),Ve.L(Re.index+1,ne.x,ne.y+qe),Ve.zf()}}te=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)te=b.i(E),ne=b.i(E+1),this.B(te.x,ne.x)&&!this.B(te.y,ne.y)&&(se=new yf,se.layer=Math.floor(te.x/2),he=b.i(0),ge=b.i(b.pointsCount-1),se.first=he.x+he.y*he.y,se.jc=ge.x+ge.y*ge.y,se.rd=Math.min(te.y,ne.y),se.Ic=Math.max(te.y,ne.y),se.index=E,se.link=b,E+2<b.pointsCount&&(he=b.i(E-1),ge=b.i(E+2),ye=0,he.x<te.x?ye=ge.x<te.x?3:te.y<ne.y?2:1:he.x>te.x&&(ye=ge.x>te.x?0:ne.y<te.y?2:1),se.j=ye),x.push(se));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),ye=1,se=x[te].jc,he=te;he<E;he++)ge=x[he],ge.jc!==se&&(ye++,se=ge.jc);for(this.zi(x,this.Ux,te,te+ne),Me=1,se=x[te].first,he=te;he<E;he++)ge=x[he],ge.first!==se&&(Me++,se=ge.first);for(he=!0,ge=Me,ye<Me?(he=!1,ge=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Me=te;Me<E;Me++)Re=x[Me],(he?Re.first:Re.jc)!==se&&(ye++,se=he?Re.first:Re.jc),Ve=Re.link,te=Ve.i(Re.index),ne=Ve.i(Re.index+1),qe=this.linkSpacing*(ye-(ge-1)/2),y++,Ve.uh(),Ve.L(Re.index,te.x+qe,te.y),Ve.L(Re.index+1,ne.x+qe,ne.y),Ve.zf()}te=E}a=b}}}},Ze=Mi.prototype,Ze.Vx=function(a,y){return a instanceof yf&&y instanceof yf&&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},Ze.Ux=function(a,y){return a instanceof yf&&y instanceof yf&&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},Ze.Js=function(a,y){return a instanceof yf&&y instanceof yf&&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},Ze.B=function(a,y){return a-=y,-1<a&&1>a},Ze.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Zt("not in range 0 <= from < length: "+x),te===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function mf(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function vf(a,y,x){a.He[a.tc[y]]=x}hn.Object.defineProperties(Mi.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()):Zt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==Av&&a!==Kg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Nv&&a!==wy&&a!==by||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==Ov&&a!==Py&&a!==Cy||(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!==Ey&&a!==jv&&a!==ky||(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 Av=new tn(Mi,"CycleDepthFirst",0),xy=new tn(Mi,"CycleGreedy",1),Kg=new tn(Mi,"CycleFromLayers",2),Nv=new tn(Mi,"LayerOptimalLinkLength",0),wy=new tn(Mi,"LayerLongestPathSink",1),by=new tn(Mi,"LayerLongestPathSource",2),Ov=new tn(Mi,"InitDepthFirstOut",0),Py=new tn(Mi,"InitDepthFirstIn",1),Cy=new tn(Mi,"InitNaive",2),Ey=new tn(Mi,"AggressiveNone",0),jv=new tn(Mi,"AggressiveLess",1),ky=new tn(Mi,"AggressiveMore",2),Yx=8;Mi.className="LayeredDigraphLayout",Mi.CycleDepthFirst=Av,Mi.CycleGreedy=xy,Mi.CycleFromLayers=Kg,Mi.LayerOptimalLinkLength=Nv,Mi.LayerLongestPathSink=wy,Mi.LayerLongestPathSource=by,Mi.InitDepthFirstOut=Ov,Mi.InitDepthFirstIn=Py,Mi.InitNaive=Cy,Mi.AggressiveNone=Ey,Mi.AggressiveLess=jv,Mi.AggressiveMore=ky,Mi.PackNone=0,Mi.PackExpand=1,Mi.PackStraighten=2,Mi.PackMedian=4,Mi.PackAll=15,Mi.AlignNone=0,Mi.AlignUpperLeft=1,Mi.AlignUpperRight=2,Mi.AlignLowerLeft=4,Mi.AlignLowerRight=8,Mi.AlignAll=15;function yf(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}yf.className="SegInfo";function Ip(a){Zi.call(this,a)}Kt(Ip,Zi),Ip.prototype.createVertex=function(){return new gu(this)},Ip.prototype.createEdge=function(){return new Vg(this)},Ip.className="LayeredDigraphNetwork";function gu(a){ka.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}Kt(gu,ka);function ix(a,y){return a.index-y.index}function Fv(a,y){if(!a.$n){for(var x=[],b=Mn(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Mn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Zt("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=Mn(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ix),a.co=y}return a.co}function Zx(a){if(!a.ao){for(var y=[],x=Mn(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ix),a.ao=y}return a.ao}gu.prototype.Cl=function(a){ka.prototype.Cl.call(this,a),this.bo=this.co=null},gu.prototype.Kl=function(a){ka.prototype.Kl.call(this,a),this.bo=this.co=null},gu.prototype.zl=function(a){ka.prototype.zl.call(this,a),this.$n=this.ao=null},gu.prototype.Jl=function(a){ka.prototype.Jl.call(this,a),this.$n=this.ao=null},hn.Object.defineProperties(gu.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)}}}),gu.prototype.deleteDestinationEdge=gu.prototype.Jl,gu.prototype.addDestinationEdge=gu.prototype.zl,gu.prototype.deleteSourceEdge=gu.prototype.Kl,gu.prototype.addSourceEdge=gu.prototype.Cl,gu.className="LayeredDigraphVertex";function Vg(a){_l.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Kt(Vg,_l),hn.Object.defineProperties(Vg.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)}}}),Vg.className="LayeredDigraphEdge";function Hr(a){Eo.call(this),this.Ub=new Nn,this.Wn=Rv,this.ud=zh,this.vo=Gv,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=zv,this.$d=new jn(10,10).freeze();var y=new Wd(this);this.W=new Tu(y),this.Y=new Tu(y),this.ru=[],a&&Object.assign(this,a)}Kt(Hr,Eo),Hr.prototype.cloneProtected=function(a){Eo.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:Zt("Unknown enum value: "+a):Eo.prototype.qb.call(this,a)},Hr.prototype.createNetwork=function(){return new Wd(this)},Hr.prototype.makeNetwork=function(a){function y(b){if(b instanceof Gn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof kn){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Vt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Er?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!==Uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Vt&&(y=a),this.path===Rv&&y!==null?this.ud=y.isTreePathToChildren?zh:zd:this.ud=this.path===Rv?zh: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 Nn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Gn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Tu&&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,Ty(this,y));for(y=this.network.vertexes,a=null;a=Jx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ty(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Tu&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Tu&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Tu&&ux(this,y);if(this.Cu(),this.layerStyle===Wv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?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,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===_y)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var te=y.children[E];b=Math.max(b,x?te.width:te.height)}if(0<=b)for(E=0;E<y.children.length;E++)te=y.children[E],x?(y.angle===180&&(te.focusX+=b-te.width),te.width=b):(y.angle===270&&(te.focusY+=b-te.height),te.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Tu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Nn,this.isValidLayout=!0};function Jx(a){var y=new Nn;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 zh:x.sourceEdges.count===0&&this.Ub.add(x);break;case zd:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Zt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case zh:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case zd:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Zt("Unhandled path value "+a.ud.toString())}}return b}function Ty(a,y){if(y!==null){switch(a.ud){case zh:if(0<y.destinationEdges.count){for(var x=new Ln,b=y.destinationVertexes;b.next();){var E=b.value;ax(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case zd:if(0<y.sourceEdges.count){for(x=new Ln,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Zt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var te=x[E];te.initialized=!0,te.level=y.level+1,te.parent=y,a.Ub.remove(te)}for(y=0;y<b;y++)Ty(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||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,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var te=E=0;te<x.length;te++)x[te]!==y&&(b[E++]=x[te]);a.children=b}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Hh&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,te=y.children,ne=te.length,se=0;se<ne;se++){var he=te[se];sx(a,he),x+=he.descendantCount+1,b=Math.max(b,he.maxChildrenCount),E=Math.max(E,he.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Qx(a,y){switch(a.vo){default:case Gv:return y.parent!==null?y.parent:a.W;case Iy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Fy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,te=0;te<E;te++)if(0<b[te].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(Qx(this,a)),a.parent!==null&&a.parent.alignment===Hh){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}Hr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Hh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Hr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Bp:break;case Yg:a.children.reverse();break;case Zg:a.children.sort(a.comparer);break;case Jg:a.children.sort(a.comparer),a.children.reverse();break;default:Zt("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,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=Sf(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,se=0,he=a.commentSpacing;if(a.node!==null)for(var ge=a.node.Mu();ge.next();){var ye=ge.value;ye.category==="Comment"&&ye.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ye),ye.Va(),ye=ye.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,ye.width),ne+=ye.height+Math.abs(se)):(te+=ye.width+Math.abs(se),ne=Math.max(ne,ye.height)),se=he)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(te+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),te=Math.max(0,te-a.width)),E=rn.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,rn.free(E))};function Sf(a){return a===Ic||a===Hh||a===Bc||a===cc}function Xg(a){return a===Ic||a===Hh}function Ly(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Sf(x)){if(Xg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Bc)return!0}}return!1}Hr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,te=!1;x!==null&&(E=x.angle,te=x.alignment,te=Sf(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,se=Ly(a),he=0,ge=a.comments,ye=ge.length,Me=Mt.alloc(),Re=0;Re<ye;Re++){var Ve=ge[Re],qe=Ve.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Me.h(a.bounds.x-a.commentMargin-qe.width,a.bounds.y+he),Ve.move(Me),Ve=Ve.Sd();Ve.next();){var it=Ve.value;it.fromSpot=zs,it.toSpot=is}else for(Me.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Ve.move(Me),Ve=Ve.Sd();Ve.next();)it=Ve.value,it.fromSpot=is,it.toSpot=zs;else if(0<=a.commentMargin)for(Me.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Ve.move(Me),Ve=Ve.Sd();Ve.next();)it=Ve.value,it.fromSpot=is,it.toSpot=zs;else for(Me.h(a.bounds.x+a.commentMargin-qe.width,a.bounds.y+he),Ve.move(Me),Ve=Ve.Sd();Ve.next();)it=Ve.value,it.fromSpot=zs,it.toSpot=is;he=0<=a.commentSpacing?he+(qe.height+a.commentSpacing):he+(a.commentSpacing-qe.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Me.h(a.bounds.x+he,a.bounds.y-a.commentMargin-qe.height),Ve.move(Me),Ve=Ve.Sd();Ve.next();)it=Ve.value,it.fromSpot=xl,it.toSpot=ps;else for(Me.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Ve.move(Me),Ve=Ve.Sd();Ve.next();)it=Ve.value,it.fromSpot=ps,it.toSpot=xl;else if(0<=a.commentMargin)for(Me.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Ve.move(Me),Ve=Ve.Sd();Ve.next();)it=Ve.value,it.fromSpot=ps,it.toSpot=xl;else for(Me.h(a.bounds.x+he,a.bounds.y+a.commentMargin-qe.height),Ve.move(Me),Ve=Ve.Sd();Ve.next();)it=Ve.value,it.fromSpot=xl,it.toSpot=ps;he=0<=a.commentSpacing?he+(qe.width+a.commentSpacing):he+(a.commentSpacing-qe.width)}}if(Mt.free(Me),y=he-a.commentSpacing-(b?y.height:y.width),this.ud===zh)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},Hr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case _v:hx(this,a);break;case Qg:if(a.alignment===Hh)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=Sf(x)),b=Ly(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?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 E=Wu(a);y=E===90||E===270;var te=0,ne=a.children,se=ne.length;for(x=0;x<se;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var he=a.alignment;b=he===Uh;var ge=he===Wh,ye=Sf(he),Me=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Re=a.nodeSpacing,Ve=this.computeNodeIndent(a),qe=a.rowSpacing,it=0;(b||ge||a.hm||a.im&&a.maxGenerationCount===1)&&(it=Math.max(0,a.rowIndent)),b=a.width;var At=a.height,bt=0,Ot=0,Ft=0,It=null,Gt=null,Yt=0,Bn=0,Zn=0,Hn=0,En=0,fn=0,Cr=0,Sr=0;if(ye&&!Xg(he)&&135<E&&ne.reverse(),Xg(he))if(1<se)for(var hi=0;hi<se;hi++)hi%2===0&&hi!==se-1&&(Sr=Math.max(Sr,y?ne[hi].Da.width:ne[hi].Da.height));else se===1&&(Sr=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(he){case Ic:Ot=135>E?cx(this,a,ne,Sr,bt,Ot):fx(this,a,ne,Sr,bt,Ot),Sr=Ot.x,bt=Ot.width,Ot=Ot.height;break;case Bc:for(It=0;It<se;It++)Gt=ne[It],Me=Gt.Da,Ft=fn===0?0:qe,y?(Gt.S.h(te-Me.width,Hn+Ft),bt=Math.max(bt,Me.width),Ot=Math.max(Ot,Hn+Ft+Me.height),Hn+=Ft+Me.height):(Gt.S.h(Zn+Ft,te-Me.height),bt=Math.max(bt,Zn+Ft+Me.width),Ot=Math.max(Ot,Me.height),Zn+=Ft+Me.width),fn++;break;case cc:for(It=0;It<se;It++)Gt=ne[It],te=Gt.Da,Me=fn===0?0:qe,y?(Gt.S.h(Re/2+a.focus.x,Hn+Me),bt=Math.max(bt,te.width),Ot=Math.max(Ot,Hn+Me+te.height),Hn+=Me+te.height):(Gt.S.h(Zn+Me,Re/2+a.focus.y),bt=Math.max(bt,Zn+Me+te.width),Ot=Math.max(Ot,te.height),Zn+=Me+te.width),fn++}It=Ml(this,2),Gt=Ml(this,2),y?(It[0].h(0,0),It[1].h(0,Ot),Gt[0].h(bt,0)):(It[0].h(0,0),It[1].h(bt,0),Gt[0].h(0,Ot)),Gt[1].h(bt,Ot)}else for(hi=0;hi<se;hi++){var Xi=ne[hi],Oa=Xi.Da;if(y){0<Me&&0<fn&&Zn+Re+Oa.width>Me&&(Zn<te&&sd(a,he,te-Zn,0,Cr,hi-1),En++,fn=0,Cr=hi,Ft=Ot,Zn=0,Hn=135<E?-Ot-qe:Ot+qe),Iv(this,Xi,0,Hn);var Ga=0;if(fn===0)It=Xi.Yo,Gt=Xi.kp,Yt=Oa.width,Bn=Oa.height,(It===null||Gt===null||E!==Wu(Xi))&&(It=Ml(this,2),Gt=Ml(this,2),It[0].h(0,0),It[1].h(0,Bn),Gt[0].h(Yt,0),Gt[1].h(Yt,Bn));else{var Is=xr();Bn=dx(this,a,Xi,It,Gt,Yt,Bn,Is),Ga=Bn.x,It=Is[0],Gt=Is[1],Yt=Bn.width,Bn=Bn.height,gr(Is),Zn<Oa.width&&0>Ga&&(Gd(a,-Ga,0,Cr,hi-1),Bv(It,-Ga,0),Bv(Gt,-Ga,0),Ga=0)}Xi.S.h(Ga,Hn),bt=Math.max(bt,Yt),Ot=Math.max(Ot,Ft+(En===0?0:qe)+Oa.height),Zn=Yt}else 0<Me&&0<fn&&Hn+Re+Oa.height>Me&&(Hn<te&&sd(a,he,0,te-Hn,Cr,hi-1),En++,fn=0,Cr=hi,Ft=bt,Hn=0,Zn=135<E?-bt-qe:bt+qe),Iv(this,Xi,Zn,0),Ga=0,fn===0?(It=Xi.Yo,Gt=Xi.kp,Yt=Oa.width,Bn=Oa.height,(It===null||Gt===null||E!==Wu(Xi))&&(It=Ml(this,2),Gt=Ml(this,2),It[0].h(0,0),It[1].h(Yt,0),Gt[0].h(0,Bn),Gt[1].h(Yt,Bn))):(Is=xr(),Bn=dx(this,a,Xi,It,Gt,Yt,Bn,Is),Ga=Bn.x,It=Is[0],Gt=Is[1],Yt=Bn.width,Bn=Bn.height,gr(Is),Hn<Oa.height&&0>Ga&&(Gd(a,0,-Ga,Cr,hi-1),Bv(It,0,-Ga),Bv(Gt,0,-Ga),Ga=0)),Xi.S.h(Zn,Ga),Ot=Math.max(Ot,Bn),bt=Math.max(bt,Ft+(En===0?0:qe)+Oa.width),Hn=Bn;fn++}switch(0<En&&(y?(Ot+=Math.max(0,x),Zn<bt&&sd(a,he,bt-Zn,0,Cr,se-1),0<it&&(ge||Gd(a,it,0,0,se-1),bt+=it)):(bt+=Math.max(0,x),Hn<Ot&&sd(a,he,0,Ot-Hn,Cr,se-1),0<it&&(ge||Gd(a,0,it,0,se-1),Ot+=it))),it=ge=0,he){case Rp:y?ge+=bt/2-a.focus.x-Ve/2:it+=Ot/2-a.focus.y-Ve/2;break;case Ud:0<En?y?ge+=bt/2-a.focus.x-Ve/2:it+=Ot/2-a.focus.y-Ve/2:y?(Sr=ne[0].S.x+ne[0].la.x,ge+=Sr+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-Sr)/2-a.focus.x-Ve/2):(Sr=ne[0].S.y+ne[0].la.y,it+=Sr+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-Sr)/2-a.focus.y-Ve/2);break;case Uh:y?(ge-=Ve,bt+=Ve):(it-=Ve,Ot+=Ve);break;case Wh:y?(ge+=bt-a.width+Ve,bt+=Ve):(it+=Ot-a.height+Ve,Ot+=Ve);break;case Ic:y?1<se?ge+=Sr+Re/2-a.focus.x:ge+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?it+=Sr+Re/2-a.focus.y:it+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Bc:y?ge+=bt+Re/2-a.focus.x:it+=Ot+Re/2-a.focus.y;break;case cc:break;default:Ot=this.customAlignment(a,ge,it,bt,Ot),ge=Ot[0],it=Ot[1],bt=Ot[2],Ot=Ot[3]}for(Ve=0;Ve<se;Ve++)Sr=ne[Ve],y?Sr.S.h(Sr.S.x+Sr.la.x-ge,Sr.S.y+(135<E?(ye?-Ot:-Sr.Da.height)+Sr.la.y-x:At+x+Sr.la.y)):Sr.S.h(Sr.S.x+(135<E?(ye?-bt:-Sr.Da.width)+Sr.la.x-x:b+x+Sr.la.x),Sr.S.y+Sr.la.y-it);if(se=ne=0,ye?y?(bt=Ay(a,bt,ge),0>ge&&(ge=0),135<E&&(it+=Ot+x),Ot+=At+x,he===cc&&(ne+=Re/2+a.focus.x),se+=At+x):(135<E&&(ge+=bt+x),bt+=b+x,Ot=Ny(a,Ot,it),0>it&&(it=0),he===cc&&(se+=Re/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>bt&&(bt=Oy(he,b-bt,0),ne=bt.x,se=bt.y,bt=b,ge=0):bt=Ay(a,bt,ge),0>ge&&(ne-=ge,ge=0),135<E&&(it+=Ot+x),Ot=Math.max(Math.max(Ot,At),Ot+At+x),se+=At+x):(135<E&&(ge+=bt+x),bt=Math.max(Math.max(bt,b),bt+b+x),a.comments===null?At>Ot&&(Ot=Oy(he,0,At-Ot),ne=Ot.x,se=Ot.y,Ot=At,it=0):Ot=Ny(a,Ot,it),0>it&&(se-=it,it=0),ne+=b+x),0<En)E=Ml(this,4),En=Ml(this,4),y?(E[2].h(0,At+x),E[3].h(E[2].x,Ot),En[2].h(bt,E[2].y),En[3].h(En[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(bt,E[2].y),En[2].h(E[2].x,Ot),En[3].h(E[3].x,En[2].y));else{for(E=Ml(this,It.length+2),En=Ml(this,Gt.length+2),he=0;he<It.length;he++)ye=It[he],E[he+2].h(ye.x+ne,ye.y+se);for(he=0;he<Gt.length;he++)ye=Gt[he],En[he+2].h(ye.x+ne,ye.y+se)}y?(E[0].h(ge,0),E[1].h(E[0].x,At),E[2].y<E[1].y&&(E[2].x>E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].y<E[2].y&&(E[3].x>E[0].x?E[3].assign(E[2]):E[2].assign(E[3])),En[0].h(ge+b,0),En[1].h(En[0].x,At),En[2].y<En[1].y&&(En[2].x<En[0].x?En[2].assign(En[1]):En[1].assign(En[2])),En[3].y<En[2].y&&(En[3].x<En[0].x?En[3].assign(En[2]):En[2].assign(En[3])),E[2].y-=x/2,En[2].y-=x/2):(E[0].h(0,it),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),En[0].h(0,it+At),En[1].h(b,En[0].y),En[2].x<En[1].x&&(En[2].y<En[0].y?En[2].assign(En[1]):En[1].assign(En[2])),En[3].x<En[2].x&&(En[3].y<En[0].y?En[3].assign(En[2]):En[2].assign(En[3])),E[2].x-=x/2,En[2].x-=x/2),th(this,It),th(this,Gt),a.Yo=E,a.kp=En,a.la.h(ge,it),a.Da.h(bt,Ot)}break;default:Zt("Unhandled compaction value "+a.compaction.toString())}}};function hx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=Sf(x));var E=Ly(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=Wu(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];te=Math.max(te,x?he.Da.width:he.Da.height)}var ge=y.alignment,ye=ge===Uh,Me=ge===Wh;se=Sf(ge);var Re=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Ve=y.nodeSpacing,qe=a.computeNodeIndent(y),it=ye||Me?0:qe/2,At=y.rowSpacing,bt=0;(ye||Me||y.hm||y.im&&y.maxGenerationCount===1)&&(bt=Math.max(0,y.rowIndent)),ye=y.width;var Ot=y.height,Ft=0,It=0,Gt=0,Yt=0,Bn=0,Zn=0,Hn=0,En=0,fn=0,Cr=0;if(se&&!Xg(ge)&&135<b&&E.reverse(),Xg(ge))if(1<ne)for(var Sr=0;Sr<ne;Sr++){var hi=E[Sr],Xi=hi.Da;Sr%2===0&&Sr!==ne-1?fn=Math.max(fn,(x?Xi.width:Xi.height)+a.computeBusNodeSpacing(hi)-Ve):Sr%2!==0&&(Cr=Math.max(Cr,(x?Xi.width:Xi.height)+a.computeBusNodeSpacing(hi)-Ve))}else ne===1&&(fn=x?E[0].Da.width:E[0].Da.height);if(se)switch(ge){case Ic:case Hh:It=135>b?cx(a,y,E,fn,Ft,It):fx(a,y,E,fn,Ft,It),fn=It.x,Ft=It.width,It=It.height;break;case Bc:for(Re=0;Re<ne;Re++)it=E[Re],Gt=it.Da,Cr=Hn===0?0:At,x?(it.S.h(te-Gt.width,Bn+Cr),Ft=Math.max(Ft,Gt.width),It=Math.max(It,Bn+Cr+Gt.height),Bn+=Cr+Gt.height):(it.S.h(Yt+Cr,te-Gt.height),Ft=Math.max(Ft,Yt+Cr+Gt.width),It=Math.max(It,Gt.height),Yt+=Cr+Gt.width),Hn++;break;case cc:for(te=0;te<ne;te++)Re=E[te],it=Re.Da,Gt=Hn===0?0:At,x?(Re.S.h(Ve/2+y.focus.x,Bn+Gt),Ft=Math.max(Ft,it.width),It=Math.max(It,Bn+Gt+it.height),Bn+=Gt+it.height):(Re.S.h(Yt+Gt,Ve/2+y.focus.y),Ft=Math.max(Ft,Yt+Gt+it.width),It=Math.max(It,it.height),Yt+=Gt+it.width),Hn++}else for(Cr=0;Cr<ne;Cr++)Sr=E[Cr],hi=Sr.Da,x?(0<Re&&0<Hn&&Yt+Ve+hi.width>Re&&(Yt<te&&sd(y,ge,te-Yt,0,En,Cr-1),Zn++,Hn=0,En=Cr,Gt=It,Yt=0,Bn=135<b?-It-At:It+At),Xi=Hn===0?it:Ve,Iv(a,Sr,0,Bn),Sr.S.h(Yt+Xi,Bn),Ft=Math.max(Ft,Yt+Xi+hi.width),It=Math.max(It,Gt+(Zn===0?0:At)+hi.height),Yt+=Xi+hi.width):(0<Re&&0<Hn&&Bn+Ve+hi.height>Re&&(Bn<te&&sd(y,ge,0,te-Bn,En,Cr-1),Zn++,Hn=0,En=Cr,Gt=Ft,Bn=0,Yt=135<b?-Ft-At:Ft+At),Xi=Hn===0?it:Ve,Iv(a,Sr,Yt,0),Sr.S.h(Yt,Bn+Xi),It=Math.max(It,Bn+Xi+hi.height),Ft=Math.max(Ft,Gt+(Zn===0?0:At)+hi.width),Bn+=Xi+hi.height),Hn++;switch(0<Zn&&(x?(It+=Math.max(0,he),Yt<Ft&&sd(y,ge,Ft-Yt,0,En,ne-1),0<bt&&(Me||Gd(y,bt,0,0,ne-1),Ft+=bt)):(Ft+=Math.max(0,he),Bn<It&&sd(y,ge,0,It-Bn,En,ne-1),0<bt&&(Me||Gd(y,0,bt,0,ne-1),It+=bt))),bt=Me=0,ge){case Rp:x?Me+=Ft/2-y.focus.x-qe/2:bt+=It/2-y.focus.y-qe/2;break;case Ud:0<Zn?x?Me+=Ft/2-y.focus.x-qe/2:bt+=It/2-y.focus.y-qe/2:x?(a=E[0].S.x+E[0].la.x,Me+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-qe/2):(a=E[0].S.y+E[0].la.y,bt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-qe/2);break;case Uh:x?(Me-=qe,Ft+=qe):(bt-=qe,It+=qe);break;case Wh:x?(Me+=Ft-y.width+qe,Ft+=qe):(bt+=It-y.height+qe,It+=qe);break;case Ic:case Hh:x?1<ne?Me+=fn+Ve/2-y.focus.x:Me+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?bt+=fn+Ve/2-y.focus.y:bt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Bc:x?Me+=Ft+Ve/2-y.focus.x:bt+=It+Ve/2-y.focus.y;break;case cc:break;default:a=a.customAlignment(y,Me,bt,Ft,It),Me=a[0],bt=a[1],Ft=a[2],It=a[3]}for(a=0;a<ne;a++)qe=E[a],x?qe.S.h(qe.S.x+qe.la.x-Me,qe.S.y+(135<b?(se?-It:-qe.Da.height)+qe.la.y-he:Ot+he+qe.la.y)):qe.S.h(qe.S.x+(135<b?(se?-Ft:-qe.Da.width)+qe.la.x-he:ye+he+qe.la.x),qe.S.y+qe.la.y-bt);x?(Ft=Ay(y,Ft,Me),0>Me&&(Me=0),135<b&&(bt+=It+he),It=Math.max(Math.max(It,Ot),It+Ot+he)):(135<b&&(Me+=Ft+he),Ft=Math.max(Math.max(Ft,ye),Ft+ye+he),It=Ny(y,It,bt),0>bt&&(bt=0)),y.la.h(Me,bt),y.Da.h(Ft,It)}}Hr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new rn(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new rn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,ge=Wu(y)===90,ye=0,Me=0,Re=0,Ve=0;Ve<ne;Ve++)if(!(Ve%2!==0||1<ne&&Ve===ne-1)){var qe=x[Ve],it=qe.Da,At=ye===0?0:he;if(ge){var bt=a.computeBusNodeSpacing(qe)-se;qe.S.h(b-(it.width+bt),Re+At),E=Math.max(E,it.width+bt),te=Math.max(te,Re+At+it.height),Re+=At+it.height}else bt=a.computeBusNodeSpacing(qe)-se,qe.S.h(Me+At,b-(it.height+bt)),te=Math.max(te,it.height+bt),E=Math.max(E,Me+At+it.width),Me+=At+it.width;ye++}for(ye=0,qe=Me,Ve=Re,ge?(Me=b+se,Re=0):(Me=0,Re=b+se),it=0;it<ne;it++)if(it%2!==0){At=x[it],bt=At.Da;var Ot=ye===0?0:he;if(ge){var Ft=a.computeBusNodeSpacing(At)-se;At.S.h(Me+Ft,Re+Ot),E=Math.max(E,Me+bt.width+Ft),te=Math.max(te,Re+Ot+bt.height),Re+=Ot+bt.height}else Ft=a.computeBusNodeSpacing(At)-se,At.S.h(Me+Ot,Re+Ft),E=Math.max(E,Me+Ot+bt.width),te=Math.max(te,Re+bt.height+Ft),Me+=Ot+bt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ge?Math.max(Math.abs(Ve),Math.abs(Re)):Math.max(Math.abs(qe),Math.abs(Me))),ge?(x.S.h(b+se/2-x.focus.x-x.la.x,te+a),ge=b+se/2-x.focus.x-x.la.x,E=Math.max(E,ge+ne.width),0>ge&&(E-=ge),te=Math.max(te,Math.max(Ve,Re)+a+ne.height),0>x.S.x&&(b=Dv(y,x.S.x,!1,b,se))):(x.S.h(E+a,b+se/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(qe,Me)+a+ne.width),Re=b+se/2-x.focus.y-x.la.y,te=Math.max(te,Re+ne.height),0>Re&&(te-=Re),0>x.S.y&&(b=Dv(y,x.S.y,!0,b,se)))),new rn(b,0,E,te)}function fx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new rn(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new rn(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,ge=Wu(y)===270,ye=0,Me=0,Re=0,Ve=0;Ve<ne;Ve++)if(!(Ve%2!==0||1<ne&&Ve===ne-1)){var qe=x[Ve],it=qe.Da,At=ye===0?0:he;if(ge){var bt=a.computeBusNodeSpacing(qe)-se;Re-=At+it.height,qe.S.h(b-(it.width+bt),Re),E=Math.max(E,it.width+bt),te=Math.max(te,Math.abs(Re))}else bt=a.computeBusNodeSpacing(qe)-se,Me-=At+it.width,qe.S.h(Me,b-(it.height+bt)),te=Math.max(te,it.height+bt),E=Math.max(E,Math.abs(Me));ye++}for(ye=0,qe=Me,Ve=Re,ge?(Me=b+se,Re=0):(Me=0,Re=b+se),it=0;it<ne;it++)if(it%2!==0){At=x[it],bt=At.Da;var Ot=ye===0?0:he;if(ge){var Ft=a.computeBusNodeSpacing(At)-se;Re-=Ot+bt.height,At.S.h(Me+Ft,Re),E=Math.max(E,Me+bt.width+Ft),te=Math.max(te,Math.abs(Re))}else Ft=a.computeBusNodeSpacing(At)-se,Me-=Ot+bt.width,At.S.h(Me,Re+Ft),te=Math.max(te,Re+bt.height+Ft),E=Math.max(E,Math.abs(Me));ye++}for(1<ne&&ne%2===1&&(he=x[ne-1],ye=he.Da,a=a.computeBusLastRowSpacing(he,ge?Math.max(Math.abs(Ve),Math.abs(Re)):Math.max(Math.abs(qe),Math.abs(Me))),ge?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-ye.height-a),Me=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Me+ye.width),0>Me&&(E-=Me),te=Math.max(te,Math.abs(Math.min(Ve,Re))+a+ye.height),0>he.S.x&&(b=Dv(y,he.S.x,!1,b,se))):(he.S.h(-E-ye.width-a,b+se/2-he.focus.y-he.la.y),E=Math.max(E,Math.abs(Math.min(qe,Me))+a+ye.width),Re=b+se/2-he.focus.y-he.la.y,te=Math.max(te,Re+ye.height),0>Re&&(te-=Re),0>he.S.y&&(b=Dv(y,he.S.y,!0,b,se)))),y=0;y<ne;y++)se=x[y],ge?se.S.h(se.S.x,se.S.y+te):se.S.h(se.S.x+E,se.S.y);return new rn(b,0,E,te)}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 Dv(a,y,x,b,E){a=a.children;for(var te=a.length,ne=0;ne<te;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[te-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ay(a,y,x){switch(a.alignment){case Ud:case Rp:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Uh:return a.width>y?a.width:y;case Wh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Ic:case Hh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Bc:return a.width-a.focus.x+a.nodeSpacing/2+y;case cc:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case Ud:case Rp:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Uh:return a.height>y?a.height:y;case Wh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Ic:case Hh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Bc:return a.height-a.focus.y+a.nodeSpacing/2+y;case cc:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Oy(a,y,x){switch(a){case Rp:y/=2,x/=2;break;case Ud:y/=2,x/=2;break;case Uh:x=y=0;break;case Wh:break;default:Zt("Unhandled alignment value "+a.toString())}return new Mt(y,x)}function sd(a,y,x,b,E,te){y=Oy(y,x,b),Gd(a,y.x,y.y,E,te)}function Gd(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var te=a[b].S;te.x+=y,te.y+=x}}function Iv(a,y,x,b){var E=y.parent;switch(a.ud){case zh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case zd:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Zt("Unhandled path value "+a.ud.toString())}}function Bv(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function dx(a,y,x,b,E,te,ne,se){var he=Wu(y),ge=he===90||he===270,ye=y.nodeSpacing;y=b;var Me=E;b=te;var Re=ne,Ve=x.Yo,qe=x.kp;ne=x.Da;var it=ge?Math.max(Re,ne.height):Math.max(b,ne.width);if((Ve===null||he!==Wu(x))&&(Ve=Ml(a,2),qe=Ml(a,2),ge?(Ve[0].h(0,0),Ve[1].h(0,ne.height),qe[0].h(ne.width,0),qe[1].h(qe[0].x,Ve[1].y)):(Ve[0].h(0,0),Ve[1].h(ne.width,0),qe[0].h(0,ne.height),qe[1].h(Ve[1].x,qe[0].y))),ge){if(Re=9999999,!(Me===null||2>Me.length||Ve===null||2>Ve.length))for(E=x=0;x<Me.length&&E<Ve.length;){te=Me[x];var At=Ve[E];he=At.x,ge=At.y,he+=b;var bt=te;x+1<Me.length&&(bt=Me[x+1]);var Ot=At;At=Ot.x,Ot=Ot.y,E+1<Ve.length&&(Ot=Ve[E+1],At=Ot.x,Ot=Ot.y,At+=b);var Ft=Re;te.y===ge?Ft=he-te.x:te.y>ge&&te.y<Ot?Ft=he+(te.y-ge)/(Ot-ge)*(At-he)-te.x:ge>te.y&&ge<bt.y&&(Ft=he-(te.x+(ge-te.y)/(bt.y-te.y)*(bt.x-te.x))),Ft<Re&&(Re=Ft),bt.y<=te.y?x++:Ot<=ge?E++:(bt.y<=Ot&&x++,Ot<=bt.y&&E++)}if(Re=b-Re,Re+=ye,x=Ve,E=Re,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=Ml(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].y<y[0].y;)ge=x[te++],ye[b++].h(ge.x+E,ge.y);for(;he<y.length;)ge=y[he++],ye[b++].h(ge.x,ge.y);for(he=y[y.length-1].y;te<x.length&&x[te].y<=he;)te++;for(;te<x.length&&x[te].y>he;)ge=x[te++],ye[b++].h(ge.x+E,ge.y);for(x=Ml(a,b),he=0;he<b;he++)x[he].assign(ye[he]);th(a,ye),b=x}if(te=qe,he=Re,Me===null||2>Me.length||te===null||2>te.length)E=null;else{for(ye=Ml(a,Me.length+te.length),E=ge=x=0;x<Me.length&&Me[x].y<te[0].y;)bt=Me[x++],ye[E++].h(bt.x,bt.y);for(;ge<te.length;)bt=te[ge++],ye[E++].h(bt.x+he,bt.y);for(te=te[te.length-1].y;x<Me.length&&Me[x].y<=te;)x++;for(;x<Me.length&&Me[x].y>te;)he=Me[x++],ye[E++].h(he.x,he.y);for(te=Ml(a,E),x=0;x<E;x++)te[x].assign(ye[x]);th(a,ye),E=te}return te=Math.max(0,Re)+ne.width,ne=it,th(a,y),th(a,Ve),th(a,Me),th(a,qe),se[0]=b,se[1]=E,new rn(Re,0,te,ne)}if(b=9999999,!(Me===null||2>Me.length||Ve===null||2>Ve.length))for(E=x=0;x<Me.length&&E<Ve.length;)te=Me[x],At=Ve[E],he=At.x,ge=At.y,ge+=Re,bt=te,x+1<Me.length&&(bt=Me[x+1]),Ot=At,At=Ot.x,Ot=Ot.y,E+1<Ve.length&&(Ot=Ve[E+1],At=Ot.x,Ot=Ot.y,Ot+=Re),Ft=b,te.x===he?Ft=ge-te.y:te.x>he&&te.x<At?Ft=ge+(te.x-he)/(At-he)*(Ot-ge)-te.y:he>te.x&&he<bt.x&&(Ft=ge-(te.y+(he-te.x)/(bt.x-te.x)*(bt.y-te.y))),Ft<b&&(b=Ft),bt.x<=te.x?x++:At<=he?E++:(bt.x<=At&&x++,At<=bt.x&&E++);if(Re-=b,Re+=ye,x=Ve,E=Re,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=Ml(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].x<y[0].x;)ge=x[te++],ye[b++].h(ge.x,ge.y+E);for(;he<y.length;)ge=y[he++],ye[b++].h(ge.x,ge.y);for(he=y[y.length-1].x;te<x.length&&x[te].x<=he;)te++;for(;te<x.length&&x[te].x>he;)ge=x[te++],ye[b++].h(ge.x,ge.y+E);for(x=Ml(a,b),he=0;he<b;he++)x[he].assign(ye[he]);th(a,ye),b=x}if(te=qe,he=Re,Me===null||2>Me.length||te===null||2>te.length)E=null;else{for(ye=Ml(a,Me.length+te.length),E=ge=x=0;x<Me.length&&Me[x].x<te[0].x;)bt=Me[x++],ye[E++].h(bt.x,bt.y);for(;ge<te.length;)bt=te[ge++],ye[E++].h(bt.x,bt.y+he);for(te=te[te.length-1].x;x<Me.length&&Me[x].x<=te;)x++;for(;x<Me.length&&Me[x].x>te;)he=Me[x++],ye[E++].h(he.x,he.y);for(te=Ml(a,E),x=0;x<E;x++)te[x].assign(ye[x]);th(a,ye),E=te}return te=it,ne=Math.max(0,Re)+ne.height,th(a,y),th(a,Ve),th(a,Me),th(a,qe),se[0]=b,se[1]=E,new rn(Re,0,te,ne)}function Ml(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 Mt;return a}function th(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Hr.prototype.arrangeTrees=function(){if(this.Rb===Uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Tu){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),jy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Tu&&a.push(x);switch(this.sorting){case Bp:break;case Yg:a.reverse();break;case Zg:a.sort(this.comparer);break;case Jg:a.sort(this.comparer),a.reverse();break;default:Zt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(jy(this,E,y+E.la.x,x+E.la.y),this.Rb){case zv:x+=E.Da.height+this.$d.height;break;case By:y+=E.Da.width+this.$d.width;break;default:Zt("Unhandled arrangement value "+this.Rb.toString())}}}};function jy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,te=0;te<E;te++){var ne=y[te];jy(a,ne,x+ne.S.x,b+ne.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===Wv){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var te=y[E.level];te===void 0?te=this.computeLayerSpacing(E):te=Math.max(te,this.computeLayerSpacing(E)),y[E.level]=te}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new Mt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Mt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,te=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)te+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var se=a[ne]+y[ne];this.angle===270?(te-=se,E.push(new rn(0,te,x,se))):this.angle===90?(E.push(new rn(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new rn(te,0,se,x))):(E.push(new rn(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},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 Tu&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}Hr.prototype.setPortSpots=function(a){var y=a.alignment;if(Sf(y)){var x=this.ud===zh,b=Wu(a);switch(b){case 0:var E=is;break;case 90:E=ps;break;case 180:E=zs;break;default:E=xl}var te=a.children,ne=te.length;switch(y){case Ic:case Hh:for(y=0;y<ne;y++){var se=te[y];if(se=(x?se.sourceEdges:se.destinationEdges).first(),se!==null&&(se=se.link,se!==null)){var he=b===90||b===270?zs:xl;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=zs;break;case 90:he=xl;break;case 180:he=is;break;default:he=ps}else y%2===0&&(he=b===90||b===270?is:ps);x?(a.setsPortSpot&&(se.fromSpot=E),a.setsChildPortSpot&&(se.toSpot=he)):(a.setsPortSpot&&(se.fromSpot=he),a.setsChildPortSpot&&(se.toSpot=E))}}break;case Bc:for(b=b===90||b===270?is:ps,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case cc:for(b=b===90||b===270?zs:xl,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=Wu(a),this.ud===zh){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=is;break;case 90:b.fromSpot=ps;break;case 180:b.fromSpot=zs;break;default:b.fromSpot=xl}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=zs;break;case 90:b.toSpot=xl;break;case 180:b.toSpot=is;break;default:b.toSpot=ps}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=is;break;case 90:b.toSpot=ps;break;case 180:b.toSpot=zs;break;default:b.toSpot=xl}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=zs;break;case 90:b.fromSpot=xl;break;case 180:b.fromSpot=is;break;default:b.fromSpot=ps}else b.fromSpot=a.childPortSpot}};function Wu(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=Wu(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Hr.prototype.computeNodeIndent=function(a){var y=Wu(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},hn.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!==Gv&&a!==Dy&&a!==Fy&&a!==Iy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==_y&&a!==Wv||(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!==zv&&a!==By&&a!==Uv||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Bp&&a!==Yg&&a!==Zg&&!Jg||(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()):Zt("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!==_v&&a!==Qg||(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!==Bp&&a!==Yg&&a!==Zg&&!Jg||(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!==_v&&a!==Qg||(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 Rv=new tn(Hr,"PathDefault",-1),zh=new tn(Hr,"PathDestination",0),zd=new tn(Hr,"PathSource",1),Bp=new tn(Hr,"SortingForwards",10),Yg=new tn(Hr,"SortingReverse",11),Zg=new tn(Hr,"SortingAscending",12),Jg=new tn(Hr,"SortingDescending",13),Rp=new tn(Hr,"AlignmentCenterSubtrees",20),Ud=new tn(Hr,"AlignmentCenterChildren",21),Uh=new tn(Hr,"AlignmentStart",22),Wh=new tn(Hr,"AlignmentEnd",23),Ic=new tn(Hr,"AlignmentBus",24),Hh=new tn(Hr,"AlignmentBusBranching",25),Bc=new tn(Hr,"AlignmentTopLeftBus",26),cc=new tn(Hr,"AlignmentBottomRightBus",27),_v=new tn(Hr,"CompactionNone",30),Qg=new tn(Hr,"CompactionBlock",31),Gv=new tn(Hr,"StyleLayered",40),Fy=new tn(Hr,"StyleLastParents",41),Dy=new tn(Hr,"StyleAlternating",42),Iy=new tn(Hr,"StyleRootOnly",43),zv=new tn(Hr,"ArrangementVertical",50),By=new tn(Hr,"ArrangementHorizontal",51),Uv=new tn(Hr,"ArrangementFixedRoots",52),Ry=new tn(Hr,"LayerIndividual",60),_y=new tn(Hr,"LayerSiblings",61),Wv=new tn(Hr,"LayerUniform",62);Hr.className="TreeLayout",Hr.PathDefault=Rv,Hr.PathDestination=zh,Hr.PathSource=zd,Hr.SortingForwards=Bp,Hr.SortingReverse=Yg,Hr.SortingAscending=Zg,Hr.SortingDescending=Jg,Hr.AlignmentCenterSubtrees=Rp,Hr.AlignmentCenterChildren=Ud,Hr.AlignmentStart=Uh,Hr.AlignmentEnd=Wh,Hr.AlignmentBus=Ic,Hr.AlignmentBusBranching=Hh,Hr.AlignmentTopLeftBus=Bc,Hr.AlignmentBottomRightBus=cc,Hr.CompactionNone=_v,Hr.CompactionBlock=Qg,Hr.StyleLayered=Gv,Hr.StyleLastParents=Fy,Hr.StyleAlternating=Dy,Hr.StyleRootOnly=Iy,Hr.ArrangementVertical=zv,Hr.ArrangementHorizontal=By,Hr.ArrangementFixedRoots=Uv,Hr.LayerIndividual=Ry,Hr.LayerSiblings=_y,Hr.LayerUniform=Wv;function Wd(a){Zi.call(this,a)}Kt(Wd,Zi),Wd.prototype.createVertex=function(){return new Tu(this)},Wd.prototype.createEdge=function(){return new _p(this)},Wd.className="TreeNetwork";function Tu(a){ka.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 Mt(0,0),this.Da=new jn(0,0),this.la=new Mt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Bp,this.hd=oy,this.Kb=0,this.Jb=Ud,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Qg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Ba,this.wr=!0,this.Dp=Ba}Kt(Tu,ka),Tu.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)},hn.Object.defineProperties(Tu.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)}}}),Tu.className="TreeVertex";function _p(a){_l.call(this,a),this.$t=new Mt(0,0)}Kt(_p,_l),_p.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case zh:x=this.fromVertex,b=this.toVertex;break;case zd:x=this.toVertex,b=this.fromVertex;break;default:Zt("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var te=Wu(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===ru,ge=a.isOrthogonal,ye;if(a.uh(),ge||he){for(ye=2;4<a.pointsCount;)a.pv(2);var Me=a.i(1),Re=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Me=a.i(0),Re=a.i(a.pointsCount-1)}var Ve=a.i(a.pointsCount-1);te===0?(x.alignment===Wh?(te=b.bottom+E.y,E.y===0&&Me.y>Ve.y+x.rowIndent&&(te=Math.min(te,Math.max(Me.y,te-y.computeNodeIndent(x))))):x.alignment===Uh?(te=b.top+E.y,E.y===0&&Me.y<Ve.y-x.rowIndent&&(te=Math.max(te,Math.min(Me.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(ye,Me.x,te),ye++,a.m(ye,b.right+ne,te),ye++,a.m(ye,b.right+ne+(E.x-se)/3,te),ye++,a.m(ye,b.right+ne+2*(E.x-se)/3,te),ye++,a.m(ye,b.right+ne+(E.x-se),te),ye++,a.m(ye,Re.x,te)):(ge&&(a.m(ye,b.right+ne/2,Me.y),ye++),a.m(ye,b.right+ne/2,te),ye++,a.m(ye,b.right+ne+E.x-(ge?se/2:se),te),ye++,ge&&a.m(ye,a.i(ye-1).x,Re.y))):te===90?(x.alignment===Wh?(te=b.right+E.x,E.x===0&&Me.x>Ve.x+x.rowIndent&&(te=Math.min(te,Math.max(Me.x,te-y.computeNodeIndent(x))))):x.alignment===Uh?(te=b.left+E.x,E.x===0&&Me.x<Ve.x-x.rowIndent&&(te=Math.max(te,Math.min(Me.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(ye,te,Me.y),ye++,a.m(ye,te,b.bottom+ne),ye++,a.m(ye,te,b.bottom+ne+(E.y-se)/3),ye++,a.m(ye,te,b.bottom+ne+2*(E.y-se)/3),ye++,a.m(ye,te,b.bottom+ne+(E.y-se)),ye++,a.m(ye,te,Re.y)):(ge&&(a.m(ye,Me.x,b.bottom+ne/2),ye++),a.m(ye,te,b.bottom+ne/2),ye++,a.m(ye,te,b.bottom+ne+E.y-(ge?se/2:se)),ye++,ge&&a.m(ye,Re.x,a.i(ye-1).y))):te===180?(x.alignment===Wh?(te=b.bottom+E.y,E.y===0&&Me.y>Ve.y+x.rowIndent&&(te=Math.min(te,Math.max(Me.y,te-y.computeNodeIndent(x))))):x.alignment===Uh?(te=b.top+E.y,E.y===0&&Me.y<Ve.y-x.rowIndent&&(te=Math.max(te,Math.min(Me.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(ye,Me.x,te),ye++,a.m(ye,b.left-ne,te),ye++,a.m(ye,b.left-ne+(E.x+se)/3,te),ye++,a.m(ye,b.left-ne+2*(E.x+se)/3,te),ye++,a.m(ye,b.left-ne+(E.x+se),te),ye++,a.m(ye,Re.x,te)):(ge&&(a.m(ye,b.left-ne/2,Me.y),ye++),a.m(ye,b.left-ne/2,te),ye++,a.m(ye,b.left-ne+E.x+(ge?se/2:se),te),ye++,ge&&a.m(ye,a.i(ye-1).x,Re.y))):te===270?(x.alignment===Wh?(te=b.right+E.x,E.x===0&&Me.x>Ve.x+x.rowIndent&&(te=Math.min(te,Math.max(Me.x,te-y.computeNodeIndent(x))))):x.alignment===Uh?(te=b.left+E.x,E.x===0&&Me.x<Ve.x-x.rowIndent&&(te=Math.max(te,Math.min(Me.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(ye,te,Me.y),ye++,a.m(ye,te,b.top-ne),ye++,a.m(ye,te,b.top-ne+(E.y+se)/3),ye++,a.m(ye,te,b.top-ne+2*(E.y+se)/3),ye++,a.m(ye,te,b.top-ne+(E.y+se)),ye++,a.m(ye,te,Re.y)):(ge&&(a.m(ye,Me.x,b.top-ne/2),ye++),a.m(ye,te,b.top-ne/2),ye++,a.m(ye,te,b.top-ne+E.y+(ge?se/2:se)),ye++,ge&&a.m(ye,Re.x,a.i(ye-1).y))):Zt("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Wu(x),y!==Wu(E)&&(ne=b.computeLayerSpacing(x),se=x.bounds,x=E.bounds,y===0&&x.left-se.right<ne+1||y===90&&x.top-se.bottom<ne+1||y===180&&se.left-x.right<ne+1||y===270&&se.top-x.bottom<ne+1||(a.vg(),x=a.curve===ru,E=a.isOrthogonal,b=Sf(this.fromVertex.alignment),a.uh(),y===0?(y=se.right+ne/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)):E?b?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=se.bottom+ne/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)):E?b?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=se.left-ne/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)):E?b?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=se.top-ne/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)):E?b?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()))}}},hn.Object.defineProperties(_p.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),_p.className="TreeEdge",ho.prototype.initializeStandardTools=function(){this.gb("Action",new Pn,this.mouseDownTools),this.gb("Relinking",new Dl,this.mouseDownTools),this.gb("LinkReshaping",new Ho,this.mouseDownTools),this.gb("Rotating",new en,this.mouseDownTools),this.gb("Resizing",new Rt,this.mouseDownTools),this.gb("Linking",new Es,this.mouseMoveTools),this.gb("Dragging",new Fr,this.mouseMoveTools),this.gb("DragSelecting",new Kn,this.mouseMoveTools),this.gb("Panning",new Yn,this.mouseMoveTools),this.gb("ContextMenu",new wr,this.mouseUpTools),this.gb("TextEditing",new or,this.mouseUpTools),this.gb("ClickCreating",new Wn,this.mouseUpTools),this.gb("ClickSelecting",new yn,this.mouseUpTools)},vh("Horizontal",new ym),vh("Spot",new xm),vh("Table",new bm),vh("Viewbox",new Em),vh("TableRow",new Pm),vh("TableColumn",new Cm),vh("Graduated",new dg),vh("Grid",new fg),lp.add("GraphLinksModel",_a),lp.add("TreeModel",du);var Hv=Qt.go,Gy={get licenseKey(){return Vt.licenseKey},set licenseKey(a){Vt.licenseKey=a},get version(){return Vt.version},Group:Er,EnumValue:tn,List:Ln,Set:Nn,Map:Vn,Point:Mt,Size:jn,Rect:rn,Margin:yr,Spot:nr,Geometry:An,PathFigure:Pa,PathSegment:ni,InputEvent:gs,DiagramEvent:Mh,ChangedEvent:To,Model:Qn,GraphLinksModel:Qr,TreeModel:tl,Binding:fa,Transaction:La,UndoManager:jo,CommandHandler:Lt,Tool:$r,DraggingTool:Fr,DraggingInfo:oc,DraggingOptions:ce,LinkingBaseTool:Ro,LinkingTool:Es,RelinkingTool:Dl,LinkReshapingTool:Ho,ResizingTool:Rt,RotatingTool:en,ClickSelectingTool:yn,ActionTool:Pn,ClickCreatingTool:Wn,HTMLInfo:ar,ContextMenuTool:wr,DragSelectingTool:Kn,PanningTool:Yn,TextEditingTool:or,ToolManager:ho,Animation:Go,AnimationManager:$i,AnimationTrigger:va,Layer:Jo,Diagram:Vt,Palette:ke,Overview:je,Brush:Ci,GraphObject:Ut,Panel:wn,RowColumnDefinition:xa,Shape:Or,TextBlock:Yi,Picture:gl,Part:rr,Adornment:ai,Node:Gn,Link:kn,Placeholder:Js,Layout:Eo,LayoutNetwork:Zi,LayoutVertex:ka,LayoutEdge:_l,GridLayout:ns,PanelLayout:Ea,CircularLayout:Bo,CircularNetwork:Fp,CircularVertex:zg,CircularEdge:Cv,ForceDirectedLayout:cs,ForceDirectedNetwork:_d,ForceDirectedVertex:Ug,ForceDirectedEdge:Wg,LayeredDigraphLayout:Mi,LayeredDigraphNetwork:Ip,LayeredDigraphVertex:gu,LayeredDigraphEdge:Vg,TreeLayout:Hr,TreeNetwork:Wd,TreeVertex:Tu,TreeEdge:_p};typeof Hv=="object"&&Hv.version&&si("WARNING: a `go` object on the root object is already defined. "+("Debug"in Hv?"debug ":"")+"version: "+Hv.version+", replaced with version: "+Gy.version),Vt.prototype.go=Gy,Qt.go=Gy,typeof dn.exports=="object"&&(dn.exports=typeof at.g!="undefined"?at.g.go:self.go)}();var ot=typeof at.g!="undefined"?at.g.go:self.go;const _t=typeof at.g!="undefined"?at.g.go:self.go,ae=_t.Group,Ge=_t.EnumValue,Ie=_t.List,me=_t.Set,de=_t.Map,Ee=_t.Point,we=_t.Size,be=_t.Rect,Te=_t.Margin,ve=_t.Spot,xe=_t.Geometry,fe=_t.PathFigure,z=_t.PathSegment,ee=_t.InputEvent,oe=_t.DiagramEvent,ie=_t.ChangedEvent,le=_t.Model,ue=_t.GraphLinksModel,pe=_t.TreeModel,Se=_t.Binding,Le=_t.Transaction,De=_t.UndoManager,Fe=_t.CommandHandler,Ae=_t.Tool,Oe=_t.DraggingTool,ze=_t.DraggingInfo,He=_t.LinkingBaseTool,Ye=_t.LinkingTool,We=_t.RelinkingTool,Ue=_t.LinkReshapingTool,st=_t.ResizingTool,dt=_t.RotatingTool,gt=_t.ClickSelectingTool,Et=_t.ActionTool,Ke=_t.ClickCreatingTool,et=_t.HTMLInfo,$e=_t.ContextMenuTool,vt=_t.DragSelectingTool,wt=_t.PanningTool,ht=_t.TextEditingTool,pt=_t.ToolManager,ct=_t.Animation,Ct=_t.AnimationManager,xt=_t.AnimationTrigger,yt=_t.Layer,Tt=_t.Diagram,St=_t.Palette,nt=_t.Overview,Qe=_t.Brush,Ce=_t.GraphObject,Ne=_t.Panel,Je=_t.RowColumnDefinition,rt=_t.Shape,Be=_t.TextBlock,_e=_t.TextBlockMetrics,Xe=_t.Picture,lt=_t.Part,Pt=_t.Adornment,kt=_t.Node,zt=_t.Link,jt=_t.Placeholder,Ht=_t.Layout,ln=_t.LayoutNetwork,an=_t.LayoutVertex,sn=_t.LayoutEdge,$t=_t.GridLayout,On=_t.PanelLayout,un=_t.CircularLayout,mn=_t.CircularNetwork,In=_t.CircularVertex,Sn=_t.CircularEdge,Dn=_t.ForceDirectedLayout,fr=_t.ForceDirectedNetwork,_r=_t.ForceDirectedVertex,mr=_t.ForceDirectedEdge,wi=_t.LayeredDigraphLayout,no=_t.LayeredDigraphNetwork,ro=_t.LayeredDigraphVertex,io=_t.LayeredDigraphEdge,Ji=_t.TreeLayout,lo=_t.TreeNetwork,Fi=_t.TreeVertex,Jr=_t.TreeEdge,bn=_t.version},19575:function(dn,pn,at){var ot,_t;(function(ae,Ge){dn.exports=Ge(ae)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof at.g!="undefined"?at.g:this,function(ae){"use strict";ae=ae||{};var Ge=ae.Base64,Ie="2.6.4",me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",de=function(We){for(var Ue={},st=0,dt=We.length;st<dt;st++)Ue[We.charAt(st)]=st;return Ue}(me),Ee=String.fromCharCode,we=function(We){if(We.length<2){var Ue=We.charCodeAt(0);return Ue<128?We:Ue<2048?Ee(192|Ue>>>6)+Ee(128|Ue&63):Ee(224|Ue>>>12&15)+Ee(128|Ue>>>6&63)+Ee(128|Ue&63)}else{var Ue=65536+(We.charCodeAt(0)-55296)*1024+(We.charCodeAt(1)-56320);return Ee(240|Ue>>>18&7)+Ee(128|Ue>>>12&63)+Ee(128|Ue>>>6&63)+Ee(128|Ue&63)}},be=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Te=function(We){return We.replace(be,we)},ve=function(We){var Ue=[0,2,1][We.length%3],st=We.charCodeAt(0)<<16|(We.length>1?We.charCodeAt(1):0)<<8|(We.length>2?We.charCodeAt(2):0),dt=[me.charAt(st>>>18),me.charAt(st>>>12&63),Ue>=2?"=":me.charAt(st>>>6&63),Ue>=1?"=":me.charAt(st&63)];return dt.join("")},xe=ae.btoa&&typeof ae.btoa=="function"?function(We){return ae.btoa(We)}:function(We){if(We.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return We.replace(/[\s\S]{1,3}/g,ve)},fe=function(We){return xe(Te(String(We)))},z=function(We){return We.replace(/[+\/]/g,function(Ue){return Ue=="+"?"-":"_"}).replace(/=/g,"")},ee=function(We,Ue){return Ue?z(fe(We)):fe(We)},oe=function(We){return ee(We,!0)},ie;ae.Uint8Array&&(ie=function(We,Ue){for(var st="",dt=0,gt=We.length;dt<gt;dt+=3){var Et=We[dt],Ke=We[dt+1],et=We[dt+2],$e=Et<<16|Ke<<8|et;st+=me.charAt($e>>>18)+me.charAt($e>>>12&63)+(typeof Ke!="undefined"?me.charAt($e>>>6&63):"=")+(typeof et!="undefined"?me.charAt($e&63):"=")}return Ue?z(st):st});var le=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=function(We){switch(We.length){case 4:var Ue=(7&We.charCodeAt(0))<<18|(63&We.charCodeAt(1))<<12|(63&We.charCodeAt(2))<<6|63&We.charCodeAt(3),st=Ue-65536;return Ee((st>>>10)+55296)+Ee((st&1023)+56320);case 3:return Ee((15&We.charCodeAt(0))<<12|(63&We.charCodeAt(1))<<6|63&We.charCodeAt(2));default:return Ee((31&We.charCodeAt(0))<<6|63&We.charCodeAt(1))}},pe=function(We){return We.replace(le,ue)},Se=function(We){var Ue=We.length,st=Ue%4,dt=(Ue>0?de[We.charAt(0)]<<18:0)|(Ue>1?de[We.charAt(1)]<<12:0)|(Ue>2?de[We.charAt(2)]<<6:0)|(Ue>3?de[We.charAt(3)]:0),gt=[Ee(dt>>>16),Ee(dt>>>8&255),Ee(dt&255)];return gt.length-=[0,0,2,1][st],gt.join("")},Le=ae.atob&&typeof ae.atob=="function"?function(We){return ae.atob(We)}:function(We){return We.replace(/\S{1,4}/g,Se)},De=function(We){return Le(String(We).replace(/[^A-Za-z0-9\+\/]/g,""))},Fe=function(We){return pe(Le(We))},Ae=function(We){return String(We).replace(/[-_]/g,function(Ue){return Ue=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Oe=function(We){return Fe(Ae(We))},ze;ae.Uint8Array&&(ze=function(We){return Uint8Array.from(De(Ae(We)),function(Ue){return Ue.charCodeAt(0)})});var He=function(){var We=ae.Base64;return ae.Base64=Ge,We};if(ae.Base64={VERSION:Ie,atob:De,btoa:xe,fromBase64:Oe,toBase64:ee,utob:Te,encode:ee,encodeURI:oe,btou:pe,decode:Oe,noConflict:He,fromUint8Array:ie,toUint8Array:ze},typeof Object.defineProperty=="function"){var Ye=function(We){return{value:We,enumerable:!1,writable:!0,configurable:!0}};ae.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Ye(function(){return Oe(this)})),Object.defineProperty(String.prototype,"toBase64",Ye(function(We){return ee(this,We)})),Object.defineProperty(String.prototype,"toBase64URI",Ye(function(){return ee(this,!0)}))}}return ae.Meteor&&(Base64=ae.Base64),dn.exports?dn.exports.Base64=ae.Base64:(ot=[],_t=function(){return ae.Base64}.apply(pn,ot),_t!==void 0&&(dn.exports=_t)),{Base64:ae.Base64}})},15979:function(dn,pn,at){"use strict";at.d(pn,{hP:function(){return nt}});var ot=function(Qe,Ce){return(ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,Je){Ne.__proto__=Je}||function(Ne,Je){for(var rt in Je)Object.prototype.hasOwnProperty.call(Je,rt)&&(Ne[rt]=Je[rt])})(Qe,Ce)};function _t(Qe,Ce){function Ne(){this.constructor=Qe}ot(Qe,Ce),Qe.prototype=Ce===null?Object.create(Ce):(Ne.prototype=Ce.prototype,new Ne)}function ae(Qe,Ce,Ne,Je){return new(Ne||(Ne=Promise))(function(rt,Be){function _e(Pt){try{lt(Je.next(Pt))}catch(kt){Be(kt)}}function Xe(Pt){try{lt(Je.throw(Pt))}catch(kt){Be(kt)}}function lt(Pt){var kt;Pt.done?rt(Pt.value):(kt=Pt.value,kt instanceof Ne?kt:new Ne(function(zt){zt(kt)})).then(_e,Xe)}lt((Je=Je.apply(Qe,Ce||[])).next())})}function Ge(Qe,Ce){var Ne,Je,rt,Be,_e={label:0,sent:function(){if(1&rt[0])throw rt[1];return rt[1]},trys:[],ops:[]};return Be={next:Xe(0),throw:Xe(1),return:Xe(2)},typeof Symbol=="function"&&(Be[Symbol.iterator]=function(){return this}),Be;function Xe(lt){return function(Pt){return function(kt){if(Ne)throw new TypeError("Generator is already executing.");for(;_e;)try{if(Ne=1,Je&&(rt=2&kt[0]?Je.return:kt[0]?Je.throw||((rt=Je.return)&&rt.call(Je),0):Je.next)&&!(rt=rt.call(Je,kt[1])).done)return rt;switch(Je=0,rt&&(kt=[2&kt[0],rt.value]),kt[0]){case 0:case 1:rt=kt;break;case 4:return _e.label++,{value:kt[1],done:!1};case 5:_e.label++,Je=kt[1],kt=[0];continue;case 7:kt=_e.ops.pop(),_e.trys.pop();continue;default:if(rt=_e.trys,!((rt=rt.length>0&&rt[rt.length-1])||kt[0]!==6&&kt[0]!==2)){_e=0;continue}if(kt[0]===3&&(!rt||kt[1]>rt[0]&&kt[1]<rt[3])){_e.label=kt[1];break}if(kt[0]===6&&_e.label<rt[1]){_e.label=rt[1],rt=kt;break}if(rt&&_e.label<rt[2]){_e.label=rt[2],_e.ops.push(kt);break}rt[2]&&_e.ops.pop(),_e.trys.pop();continue}kt=Ce.call(Qe,_e)}catch(zt){kt=[6,zt],Je=0}finally{Ne=rt=0}if(5&kt[0])throw kt[1];return{value:kt[0]?kt[1]:void 0,done:!0}}([lt,Pt])}}}function Ie(){for(var Qe=0,Ce=0,Ne=arguments.length;Ce<Ne;Ce++)Qe+=arguments[Ce].length;var Je=Array(Qe),rt=0;for(Ce=0;Ce<Ne;Ce++)for(var Be=arguments[Ce],_e=0,Xe=Be.length;_e<Xe;_e++,rt++)Je[rt]=Be[_e];return Je}var me=function(){function Qe(){}return Qe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Qe.setAttributes=function(Ce,Ne){for(var Je=0,rt=Ne;Je<rt.length;Je++){var Be=rt[Je],_e=Be[0],Xe=Be[1];Ce.setAttribute(_e,Xe)}},Qe.createRect=function(Ce,Ne,Je){var rt=document.createElementNS("http://www.w3.org/2000/svg","rect");return rt.setAttribute("width",Ce.toString()),rt.setAttribute("height",Ne.toString()),Je&&Qe.setAttributes(rt,Je),rt},Qe.createLine=function(Ce,Ne,Je,rt,Be){var _e=document.createElementNS("http://www.w3.org/2000/svg","line");return _e.setAttribute("x1",Ce.toString()),_e.setAttribute("y1",Ne.toString()),_e.setAttribute("x2",Je.toString()),_e.setAttribute("y2",rt.toString()),Be&&Qe.setAttributes(_e,Be),_e},Qe.createPolygon=function(Ce,Ne){var Je=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Je.setAttribute("points",Ce),Ne&&Qe.setAttributes(Je,Ne),Je},Qe.createCircle=function(Ce,Ne){var Je=document.createElementNS("http://www.w3.org/2000/svg","circle");return Je.setAttribute("cx",(Ce/2).toString()),Je.setAttribute("cy",(Ce/2).toString()),Je.setAttribute("r",Ce.toString()),Ne&&Qe.setAttributes(Je,Ne),Je},Qe.createEllipse=function(Ce,Ne,Je){var rt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return rt.setAttribute("cx",(Ce/2).toString()),rt.setAttribute("cy",(Ne/2).toString()),rt.setAttribute("rx",(Ce/2).toString()),rt.setAttribute("ry",(Ne/2).toString()),Je&&Qe.setAttributes(rt,Je),rt},Qe.createGroup=function(Ce){var Ne=document.createElementNS("http://www.w3.org/2000/svg","g");return Ce&&Qe.setAttributes(Ne,Ce),Ne},Qe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Qe.createMarker=function(Ce,Ne,Je,rt,Be,_e,Xe){var lt=document.createElementNS("http://www.w3.org/2000/svg","marker");return Qe.setAttributes(lt,[["id",Ce],["orient",Ne],["markerWidth",Je.toString()],["markerHeight",rt.toString()],["refX",Be.toString()],["refY",_e.toString()]]),lt.appendChild(Xe),lt},Qe.createText=function(Ce){var Ne=document.createElementNS("http://www.w3.org/2000/svg","text");return Ne.setAttribute("x","0"),Ne.setAttribute("y","0"),Ce&&Qe.setAttributes(Ne,Ce),Ne},Qe.createTSpan=function(Ce,Ne){var Je=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Je.textContent=Ce,Ne&&Qe.setAttributes(Je,Ne),Je},Qe.createImage=function(Ce){var Ne=document.createElementNS("http://www.w3.org/2000/svg","image");return Ce&&Qe.setAttributes(Ne,Ce),Ne},Qe.createPoint=function(Ce,Ne){var Je=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Je.x=Ce,Je.y=Ne,Je},Qe.createPath=function(Ce,Ne){var Je=document.createElementNS("http://www.w3.org/2000/svg","path");return Je.setAttribute("d",Ce),Ne&&Qe.setAttributes(Je,Ne),Je},Qe}(),de=function(){function Qe(){}return Qe.addKey=function(Ce){Qe.key=Ce},Object.defineProperty(Qe,"isLicensed",{get:function(){return!!Qe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Qe.key)},enumerable:!1,configurable:!0}),Qe}(),Ee=function(){function Qe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Qe.prototype.rasterize=function(Ce,Ne,Je){var rt=this;return new Promise(function(Be){var _e=Je!==void 0?Je:document.createElement("canvas");Ce===null&&(rt.markersOnly=!0,rt.naturalSize=!1);var Xe=document.createElementNS("http://www.w3.org/2000/svg","svg");Xe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Xe.setAttribute("width",Ne.width.baseVal.valueAsString),Xe.setAttribute("height",Ne.height.baseVal.valueAsString),Xe.setAttribute("viewBox","0 0 "+Ne.viewBox.baseVal.width.toString()+" "+Ne.viewBox.baseVal.height.toString()),Xe.innerHTML=Ne.innerHTML,rt.naturalSize===!0?(Xe.width.baseVal.value=Ce.naturalWidth,Xe.height.baseVal.value=Ce.naturalHeight):rt.width!==void 0&&rt.height!==void 0&&(Xe.width.baseVal.value=rt.width,Xe.height.baseVal.value=rt.height),_e.width=Xe.width.baseVal.value,_e.height=Xe.height.baseVal.value;var lt=Xe.outerHTML,Pt=_e.getContext("2d");rt.markersOnly!==!0&&Pt.drawImage(Ce,0,0,_e.width,_e.height);var kt=window.URL,zt=new Image(_e.width,_e.height);zt.setAttribute("crossOrigin","anonymous");var jt=new Blob([lt],{type:"image/svg+xml"}),Ht=kt.createObjectURL(jt);zt.onload=function(){Pt.drawImage(zt,0,0),kt.revokeObjectURL(Ht);var ln=_e.toDataURL(rt.imageType,rt.imageQuality);Be(ln)},zt.src=Ht})},Qe}(),we=function(){},be=function(){function Qe(Ce){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ce+"_"}return Object.defineProperty(Qe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.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(Qe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Qe.prototype.addClass=function(Ce){return this.styleSheet===void 0&&this.addStyleSheet(),Ce.name=""+this.classNamePrefix+Ce.localName,this.classes.push(Ce),this.styleSheet.sheet.insertRule("."+Ce.name+" {"+Ce.style+"}",this.styleSheet.sheet.cssRules.length),Ce},Qe.prototype.addRule=function(Ce){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ce),this.styleSheet.sheet.insertRule(Ce.selector+" {"+Ce.style+"}",this.styleSheet.sheet.cssRules.length)},Qe.prototype.addStyleSheet=function(){var Ce;this.styleSheet=document.createElement("style"),((Ce=this.styleSheetRoot)!==null&&Ce!==void 0?Ce:document.head).appendChild(this.styleSheet),this.addRule(new Te("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Te("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Te("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ve("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ve("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Qe.prototype.removeStyleSheet=function(){var Ce;this.styleSheet&&(((Ce=this.styleSheetRoot)!==null&&Ce!==void 0?Ce:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Qe}(),Te=function(Qe,Ce){this.selector=Qe,this.style=Ce},ve=function(Qe,Ce){this.localName=Qe,this.style=Ce},xe=function(){function Qe(Ce,Ne,Je,rt,Be){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ce,this.displayMode=Ne,this.markerItems=Je,this.uiStyleSettings=rt,this.styles=Be,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Qe.prototype.show=function(Ce){var Ne=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ce,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Je=document.createElement("div");Je.className=this.toolbarBlockStyleClass.name,Je.style.whiteSpace="nowrap",this.uiContainer.appendChild(Je),this.addActionButton(Je,'<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(Je,'<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(Je,'<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(Je,'<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(Je,'<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(Je,'<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(Je,'<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(Je,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Be){var _e=document.createElement("div");_e.className=""+Ne.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",Be.typeName),_e.innerHTML=Be.icon,_e.addEventListener("click",function(){Ne.markerToolbarButtonClicked(_e,Be)}),Ne.buttons.push(_e),Ne.markerButtons.push(_e)}),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 rt=document.createElement("div");rt.className=this.toolbarBlockStyleClass.name,rt.style.whiteSpace="nowrap",rt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(rt),this.addActionButton(rt,'<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(rt,'<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()},Qe.prototype.addButtonClickListener=function(Ce){this.buttonClickListeners.push(Ce)},Qe.prototype.removeButtonClickListener=function(Ce){this.buttonClickListeners.indexOf(Ce)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ce),1)},Qe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Qe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ce=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ne=0;Ne<this.markerButtons.length;Ne++)Ne<Ce||Ne===Ce&&this.markerButtons.length-1===Ce?this.markerButtonBlock.appendChild(this.markerButtons[Ne]):(Ne===Ce&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ne]))}},Qe.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")},Qe.prototype.resetButtonStyles=function(){var Ce=this;this.buttons.forEach(function(Ne){Ne.className=Ne.className.replace(Ce.uiStyleSettings.toolbarButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarButtonStyleColorsClassName:Ce.toolbarButtonStyleColorsClass.name,"").trim(),Ne.className=Ne.className.replace(Ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ce.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ne.className+=" "+(Ce.uiStyleSettings.toolbarButtonStyleColorsClassName?Ce.uiStyleSettings.toolbarButtonStyleColorsClassName:Ce.toolbarButtonStyleColorsClass.name)})},Qe.prototype.addActionButton=function(Ce,Ne,Je){var rt=this,Be=document.createElement("div");switch(Be.className=""+this.toolbarButtonStyleClass.name,Be.innerHTML=Ne,Be.setAttribute("data-action",Je),Be.addEventListener("click",function(){rt.actionToolbarButtonClicked(Be,Je)}),Je){case"select":Be.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Be.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Be.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Be.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Be.style.fill=this.uiStyleSettings.closeButtonColor}Ce.appendChild(Be),this.buttons.push(Be)},Qe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("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 ve("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("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 ve("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Ce=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
padding: `+Ce+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Te("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Te("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Qe.prototype.markerToolbarButtonClicked=function(Ce,Ne){this.setActiveButton(Ce),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Je){return Je("marker",Ne)}),this.markerButtonOverflowBlock.style.display="none"},Qe.prototype.actionToolbarButtonClicked=function(Ce,Ne){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Je){return Je("action",Ne)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Qe.prototype.setActiveButton=function(Ce){this.resetButtonStyles(),Ce.className=Ce.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ce.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Qe.prototype.setActiveMarkerButton=function(Ce){var Ne=this.markerButtons.find(function(Je){return Je.getAttribute("data-type-name")===Ce});Ne&&this.setActiveButton(Ne)},Qe.prototype.setCurrentMarker=function(Ce){var Ne=this;this.currentMarker=Ce,this.buttons.filter(function(Je){return/delete|notes/.test(Je.getAttribute("data-action"))}).forEach(function(Je){Ne.currentMarker===void 0?(Je.style.fillOpacity="0.4",Je.style.pointerEvents="none"):(Je.style.fillOpacity="1",Je.style.pointerEvents="all")})},Qe}(),fe=function(){function Qe(Ce,Ne,Je,rt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ce,this.displayMode=Ne,this.uiStyleSettings=Je,this.styles=rt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Qe.prototype.addStyles=function(){var Ce;this.toolboxStyleClass=this.styles.addClass(new ve("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 ve("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Ne=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("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 ve("toolbox-panel-row_colors",`
background-color: `+((Ce=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ce!==void 0?Ce:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
padding: `+Ne+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Te("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Te("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Qe.prototype.show=function(Ce){var Ne;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ce,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Qe.prototype.setPanelButtons=function(Ce){var Ne,Je,rt=this;this.panels=Ce,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Je=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Je!==void 0?Je:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Be){var _e;Be.uiStyleSettings=rt.uiStyleSettings;var Xe=document.createElement("div");Xe.className=rt.toolboxButtonStyleClass.name+" "+((_e=rt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:rt.toolboxButtonStyleColorsClass.name),Xe.innerHTML=Be.icon,Xe.title=Be.title,Xe.addEventListener("click",function(){rt.panelButtonClick(Be)}),rt.panelButtons.push(Xe),rt.buttonRow.appendChild(Xe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Qe.prototype.panelButtonClick=function(Ce){var Ne=this,Je=-1;if(Ce!==this.activePanel){Je=this.panels.indexOf(Ce),this.panelRow.innerHTML="";var rt=Ce.getUi();rt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(rt),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=Ce}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ne.displayMode==="inline"?Ne.panelRow.style.display="none":Ne.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Be,_e){var Xe,lt;Be.className=Ne.toolboxButtonStyleClass.name+" "+(_e===Je?""+((Xe=Ne.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Xe!==void 0?Xe:Ne.toolboxActiveButtonStyleColorsClass.name):""+((lt=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&lt!==void 0?lt:Ne.toolboxButtonStyleColorsClass.name))})},Qe}(),z=function(Qe,Ce){this.title=Qe,this.icon=Ce},ee=function(Qe){function Ce(Ne,Je,rt,Be){var _e=Qe.call(this,Ne,Be||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return _e.colors=[],_e.addTransparent=!1,_e.colorBoxes=[],_e.colors=Je,_e.currentColor=rt,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return _t(Ce,Qe),Ce.prototype.getUi=function(){var Ne=this,Je=document.createElement("div");return Je.style.overflow="hidden",Je.style.whiteSpace="nowrap",this.colors.forEach(function(rt){var Be=Ne.getColorBox(rt);Je.appendChild(Be),Ne.colorBoxes.push(Be)}),Je},Ce.prototype.getColorBox=function(Ne){var Je=this,rt=this.uiStyleSettings.toolbarHeight/4,Be=this.uiStyleSettings.toolbarHeight-rt,_e=document.createElement("div");_e.style.display="inline-block",_e.style.boxSizing="content-box",_e.style.width=Be-2+"px",_e.style.height=Be-2+"px",_e.style.padding="1px",_e.style.marginRight="2px",_e.style.marginBottom="2px",_e.style.borderWidth="2px",_e.style.borderStyle="solid",_e.style.borderRadius=(Be+2)/2+"px",_e.style.borderColor=Ne===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){Je.setCurrentColor(Ne,_e)});var Xe=document.createElement("div");return Xe.style.display="inline-block",Xe.style.width=Be-2+"px",Xe.style.height=Be-2+"px",Xe.style.backgroundColor=Ne,Xe.style.borderRadius=Be/2+"px",Ne==="transparent"&&(Xe.style.fill=this.uiStyleSettings.toolboxAccentColor,Xe.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>`),_e.appendChild(Xe),_e},Ce.prototype.setCurrentColor=function(Ne,Je){var rt=this;this.currentColor=Ne,this.colorBoxes.forEach(function(Be){Be.style.borderColor=Be===Je?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ne)},Ce}(z),oe=function(){function Qe(Ce,Ne,Je){this._state="new",this._isSelected=!1,this._container=Ce,this._overlayContainer=Ne,this.globalSettings=Je,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Qe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Qe.prototype.ownsTarget=function(Ce){return!1},Object.defineProperty(Qe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Qe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Qe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Qe.prototype.pointerDown=function(Ce,Ne){},Qe.prototype.dblClick=function(Ce,Ne){},Qe.prototype.manipulate=function(Ce){},Qe.prototype.pointerUp=function(Ce){this.stateChanged()},Qe.prototype.dispose=function(){},Qe.prototype.addMarkerVisualToContainer=function(Ce){this.container.childNodes.length>0?this.container.insertBefore(Ce,this.container.childNodes[0]):this.container.appendChild(Ce)},Qe.prototype.getState=function(){return{typeName:Qe.typeName,state:this.state,notes:this.notes}},Qe.prototype.restoreState=function(Ce){this._state=Ce.state,this.notes=Ce.notes},Qe.prototype.scale=function(Ce,Ne){},Qe.prototype.colorChanged=function(Ce){this.onColorChanged&&this.onColorChanged(Ce),this.stateChanged()},Qe.prototype.fillColorChanged=function(Ce){this.onFillColorChanged&&this.onFillColorChanged(Ce),this.stateChanged()},Qe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ce=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ce.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ce)&&this.onStateChanged(this)}},Qe.typeName="MarkerBase",Qe}(),ie=function(){function Qe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Qe.prototype.findGripByVisual=function(Ce){return this.topLeft.ownsTarget(Ce)?this.topLeft:this.topCenter.ownsTarget(Ce)?this.topCenter:this.topRight.ownsTarget(Ce)?this.topRight:this.centerLeft.ownsTarget(Ce)?this.centerLeft:this.centerRight.ownsTarget(Ce)?this.centerRight:this.bottomLeft.ownsTarget(Ce)?this.bottomLeft:this.bottomCenter.ownsTarget(Ce)?this.bottomCenter:this.bottomRight.ownsTarget(Ce)?this.bottomRight:void 0},Qe}(),le=function(){function Qe(){this.GRIP_SIZE=10,this.visual=me.createGroup(),this.visual.appendChild(me.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(me.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Qe.prototype.ownsTarget=function(Ce){return Ce===this.visual||Ce===this.visual.childNodes[0]||Ce===this.visual.childNodes[1]},Qe}(),ue=function(){function Qe(){}return Qe.toITransformMatrix=function(Ce){return{a:Ce.a,b:Ce.b,c:Ce.c,d:Ce.d,e:Ce.e,f:Ce.f}},Qe.toSVGMatrix=function(Ce,Ne){return Ce.a=Ne.a,Ce.b=Ne.b,Ce.c=Ne.c,Ce.d=Ne.d,Ce.e=Ne.e,Ce.f=Ne.f,Ce},Qe}(),pe=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.left=0,Be.top=0,Be.width=0,Be.height=0,Be.defaultSize={x:50,y:20},Be.offsetX=0,Be.offsetY=0,Be.rotationAngle=0,Be.CB_DISTANCE=10,Be._suppressMarkerCreateEvent=!1,Be.container.transform.baseVal.appendItem(me.createTransform()),Be.setupControlBox(),Be}return _t(Ce,Qe),Object.defineProperty(Ce.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"visual",{get:function(){return this._visual},set:function(Ne){this._visual=Ne;var Je=me.createTransform();this._visual.transform.baseVal.appendItem(Je)},enumerable:!1,configurable:!0}),Ce.prototype.ownsTarget=function(Ne){return!!Qe.prototype.ownsTarget.call(this,Ne)||!!(this.controlGrips.findGripByVisual(Ne)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne))},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.state==="new"&&(this.left=Ne.x,this.top=Ne.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var rt=this.unrotatePoint(Ne);if(this.manipulationStartX=rt.x,this.manipulationStartY=rt.y,this.offsetX=rt.x-this.left,this.offsetY=rt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Je),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Je)){this.activeGrip=this.rotatorGrip;var Be=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Be.x-this.width/2,this.top=Be.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _e=this.container.transform.baseVal.getItem(0);_e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_e,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ce.prototype.pointerUp=function(Ne){var Je=this.state;Qe.prototype.pointerUp.call(this,Ne),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ne),this._state="select",Je==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ce.prototype.moveVisual=function(Ne){this.visual.style.transform="translate("+Ne.x+"px, "+Ne.y+"px)"},Ce.prototype.manipulate=function(Ne){var Je=this.unrotatePoint(Ne);this.state==="creating"?this.resize(Ne):this.state==="move"?(this.left=this.manipulationStartLeft+(Je.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Je.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Je):this.state==="rotate"&&this.rotate(Ne)},Ce.prototype.resize=function(Ne){var Je=this.manipulationStartLeft,rt=this.manipulationStartWidth,Be=this.manipulationStartTop,_e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Je=this.manipulationStartLeft+Ne.x-this.manipulationStartX,rt=this.manipulationStartWidth+this.manipulationStartLeft-Je;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:rt=this.manipulationStartWidth+Ne.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Be=this.manipulationStartTop+Ne.y-this.manipulationStartY,_e=this.manipulationStartHeight+this.manipulationStartTop-Be;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_e=this.manipulationStartHeight+Ne.y-this.manipulationStartY}rt>=0?(this.left=Je,this.width=rt):(this.left=Je+rt,this.width=-rt),_e>=0?(this.top=Be,this.height=_e):(this.top=Be+_e,this.height=-_e),this.setSize()},Ce.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ce.prototype.rotate=function(Ne){if(Math.abs(Ne.x-this.centerX)>.1){var Je=Math.sign(Ne.x-this.centerX);this.rotationAngle=180*Math.atan((Ne.y-this.centerY)/(Ne.x-this.centerX))/Math.PI+90*Je,this.applyRotation()}},Ce.prototype.applyRotation=function(){var Ne=this.container.transform.baseVal.getItem(0);Ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ne,0)},Ce.prototype.rotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var Je=this.container.getCTM(),rt=me.createPoint(Ne.x,Ne.y);return{x:(rt=rt.matrixTransform(Je)).x,y:rt.y}},Ce.prototype.unrotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var Je=this.container.getCTM();Je=Je.inverse();var rt=me.createPoint(Ne.x,Ne.y);return{x:(rt=rt.matrixTransform(Je)).x,y:rt.y}},Ce.prototype.select=function(){Qe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ce.prototype.deselect=function(){Qe.prototype.deselect.call(this),this.controlBox.style.display="none"},Ce.prototype.setupControlBox=function(){this.controlBox=me.createGroup();var Ne=me.createTransform();Ne.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ne),this.container.appendChild(this.controlBox),this.controlRect=me.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=me.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 ie,this.addControlGrips(),this.controlBox.style.display="none"},Ce.prototype.adjustControlBox=function(){var Ne=this.controlBox.transform.baseVal.getItem(0);Ne.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ne,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()},Ce.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()},Ce.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},Ce.prototype.positionGrips=function(){var Ne=this.controlGrips.topLeft.GRIP_SIZE,Je=-Ne/2,rt=Je,Be=(this.width+this.CB_DISTANCE)/2-Ne/2,_e=(this.height+this.CB_DISTANCE)/2-Ne/2,Xe=this.height+this.CB_DISTANCE-Ne/2,lt=this.width+this.CB_DISTANCE-Ne/2;this.positionGrip(this.controlGrips.topLeft.visual,Je,rt),this.positionGrip(this.controlGrips.topCenter.visual,Be,rt),this.positionGrip(this.controlGrips.topRight.visual,lt,rt),this.positionGrip(this.controlGrips.centerLeft.visual,Je,_e),this.positionGrip(this.controlGrips.centerRight.visual,lt,_e),this.positionGrip(this.controlGrips.bottomLeft.visual,Je,Xe),this.positionGrip(this.controlGrips.bottomCenter.visual,Be,Xe),this.positionGrip(this.controlGrips.bottomRight.visual,lt,Xe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Be,rt-3*this.CB_DISTANCE)},Ce.prototype.positionGrip=function(Ne,Je,rt){var Be=Ne.transform.baseVal.getItem(0);Be.setTranslate(Je,rt),Ne.transform.baseVal.replaceItem(Be,0)},Ce.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ce.prototype.showControlBox=function(){this.controlBox.style.display=""},Ce.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ue.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ue.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Qe.prototype.getState.call(this))},Ce.prototype.restoreState=function(Ne){Qe.prototype.restoreState.call(this,Ne);var Je=Ne;this.left=Je.left,this.top=Je.top,this.width=Je.width,this.height=Je.height,this.rotationAngle=Je.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Je.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Je.containerTransformMatrix))},Ce.prototype.scale=function(Ne,Je){Qe.prototype.scale.call(this,Ne,Je);var rt=this.rotatePoint({x:this.left,y:this.top}),Be=this.unrotatePoint({x:rt.x*Ne,y:rt.y*Je});this.left=Be.x,this.top=Be.y,this.width=this.width*Ne,this.height=this.height*Je,this.adjustControlBox()},Ce}(oe),Se=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.fillColor="transparent",Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.opacity=1,Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setFillColor=Be.setFillColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.createVisual=Be.createVisual.bind(Be),Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return!(!Qe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},Ce.prototype.createVisual=function(){this.visual=me.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)},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Ce.prototype.manipulate=function(Ne){Qe.prototype.manipulate.call(this,Ne)},Ce.prototype.resize=function(Ne){Qe.prototype.resize.call(this,Ne),this.setSize()},Ce.prototype.setSize=function(){Qe.prototype.setSize.call(this),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ce.prototype.pointerUp=function(Ne){Qe.prototype.pointerUp.call(this,Ne),this.setSize()},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Ce.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ce.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Qe.prototype.getState.call(this))},Ce.prototype.restoreState=function(Ne){var Je=Ne;this.fillColor=Je.fillColor,this.strokeColor=Je.strokeColor,this.strokeWidth=Je.strokeWidth,this.strokeDasharray=Je.strokeDasharray,this.opacity=Je.opacity,this.createVisual(),Qe.prototype.restoreState.call(this,Ne),this.setSize()},Ce.prototype.scale=function(Ne,Je){Qe.prototype.scale.call(this,Ne,Je),this.setSize()},Ce.title="Rectangle marker",Ce}(pe),Le=function(Qe){function Ce(Ne,Je,rt,Be){var _e=Qe.call(this,Ne,Be||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return _e.widths=[],_e.widthBoxes=[],_e.widths=Je,_e.currentWidth=rt,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return _t(Ce,Qe),Ce.prototype.getUi=function(){var Ne=this,Je=document.createElement("div");return Je.style.display="flex",Je.style.overflow="hidden",Je.style.flexGrow="2",this.widths.forEach(function(rt){var Be=document.createElement("div");Be.style.display="flex",Be.style.flexGrow="2",Be.style.alignItems="center",Be.style.justifyContent="space-between",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.borderColor=rt===Ne.currentWidth?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){Ne.setCurrentWidth(rt,Be)}),Je.appendChild(Be);var _e=document.createElement("div");_e.innerText=rt.toString(),_e.style.marginRight="5px",Be.appendChild(_e);var Xe=document.createElement("div");Xe.style.minHeight="20px",Xe.style.flexGrow="2",Xe.style.display="flex",Xe.style.alignItems="center";var lt=document.createElement("hr");lt.style.minWidth="20px",lt.style.border="0px",lt.style.borderTop=rt+"px solid "+Ne.uiStyleSettings.toolboxColor,lt.style.flexGrow="2",Xe.appendChild(lt),Be.appendChild(Xe),Ne.widthBoxes.push(Be)}),Je},Ce.prototype.setCurrentWidth=function(Ne,Je){var rt=this;this.currentWidth=Ne,this.widthBoxes.forEach(function(Be){Be.style.borderColor=Be===Je?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ce}(z),De=function(Qe){function Ce(Ne,Je,rt,Be){var _e=Qe.call(this,Ne,Be||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return _e.styles=[],_e.styleBoxes=[],_e.styles=Je,_e.currentStyle=rt,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return _t(Ce,Qe),Ce.prototype.getUi=function(){var Ne=this,Je=document.createElement("div");return Je.style.display="flex",Je.style.overflow="hidden",Je.style.flexGrow="2",this.styles.forEach(function(rt){var Be=document.createElement("div");Be.style.display="flex",Be.style.alignItems="center",Be.style.justifyContent="space-between",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.overflow="hidden",Be.style.maxWidth=100/Ne.styles.length-5+"%",Be.style.borderColor=rt===Ne.currentStyle?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){Ne.setCurrentStyle(rt,Be)}),Je.appendChild(Be);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.overflow="hidden";var Xe=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ne.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(rt!==""?'stroke-dasharray="'+rt+'"':"")+` />
</svg>`;_e.innerHTML=Xe,Be.appendChild(_e),Ne.styleBoxes.push(Be)}),Je},Ce.prototype.setCurrentStyle=function(Ne,Je){var rt=this;this.currentStyle=Ne,this.styleBoxes.forEach(function(Be){Be.style.borderColor=Be===Je?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ce}(z),Fe=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.strokeColor=rt.defaultColor,Be.strokeWidth=rt.defaultStrokeWidth,Be.strokeDasharray=rt.defaultStrokeDasharray,Be.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.strokeWidthPanel=new Le("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new De("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be}return _t(Ce,Qe),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Qe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.typeName="FrameMarker",Ce.title="Frame marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ce}(Se),Ae=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"},Oe=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.x1=0,Be.y1=0,Be.x2=0,Be.y2=0,Be.defaultLength=50,Be.manipulationStartX=0,Be.manipulationStartY=0,Be.manipulationStartX1=0,Be.manipulationStartY1=0,Be.manipulationStartX2=0,Be.manipulationStartY2=0,Be.setupControlBox(),Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return!!Qe.prototype.ownsTarget.call(this,Ne)||!(!this.grip1.ownsTarget(Ne)&&!this.grip2.ownsTarget(Ne))},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.state==="new"&&(this.x1=Ne.x,this.y1=Ne.y,this.x2=Ne.x,this.y2=Ne.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(Je)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Je)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ce.prototype.pointerUp=function(Ne){var Je=this.state;Qe.prototype.pointerUp.call(this,Ne),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(Ne),this._state="select",Je==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ce.prototype.adjustVisual=function(){},Ce.prototype.manipulate=function(Ne){this.state==="creating"?this.resize(Ne):this.state==="move"?(this.x1=this.manipulationStartX1+Ne.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ne.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ne.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ne.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ne)},Ce.prototype.resize=function(Ne){switch(this.activeGrip){case this.grip1:this.x1=Ne.x,this.y1=Ne.y;break;case this.grip2:case void 0:this.x2=Ne.x,this.y2=Ne.y}this.adjustVisual(),this.adjustControlBox()},Ce.prototype.select=function(){Qe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ce.prototype.deselect=function(){Qe.prototype.deselect.call(this),this.controlBox.style.display="none"},Ce.prototype.setupControlBox=function(){this.controlBox=me.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ce.prototype.adjustControlBox=function(){this.positionGrips()},Ce.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ce.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(me.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},Ce.prototype.positionGrips=function(){var Ne=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ne/2,this.y1-Ne/2),this.positionGrip(this.grip2.visual,this.x2-Ne/2,this.y2-Ne/2)},Ce.prototype.positionGrip=function(Ne,Je,rt){var Be=Ne.transform.baseVal.getItem(0);Be.setTranslate(Je,rt),Ne.transform.baseVal.replaceItem(Be,0)},Ce.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Qe.prototype.getState.call(this))},Ce.prototype.restoreState=function(Ne){Qe.prototype.restoreState.call(this,Ne);var Je=Ne;this.x1=Je.x1,this.y1=Je.y1,this.x2=Je.x2,this.y2=Je.y2},Ce.prototype.scale=function(Ne,Je){Qe.prototype.scale.call(this,Ne,Je),this.x1=this.x1*Ne,this.y1=this.y1*Je,this.x2=this.x2*Ne,this.y2=this.y2*Je,this.adjustVisual(),this.adjustControlBox()},Ce}(oe),ze=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.strokeColor=rt.defaultColor,Be.strokeWidth=rt.defaultStrokeWidth,Be.strokeDasharray=rt.defaultStrokeDasharray,Be.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.strokeWidthPanel=new Le("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new De("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return!(!Qe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorLine&&Ne!==this.visibleLine)},Ce.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorLine=me.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=me.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)},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ce.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()),me.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Qe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){Qe.prototype.restoreState.call(this,Ne);var Je=Ne;this.strokeColor=Je.strokeColor,this.strokeWidth=Je.strokeWidth,this.strokeDasharray=Je.strokeDasharray,this.createVisual(),this.adjustVisual()},Ce.typeName="LineMarker",Ce.title="Line marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ce}(Oe),He=function(Qe){function Ce(Ne,Je,rt,Be){var _e=Qe.call(this,Ne,Be||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return _e.fonts=[],_e.fontBoxes=[],_e.fonts=Je,_e.currentFont=rt,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return _t(Ce,Qe),Ce.prototype.getUi=function(){var Ne=this,Je=document.createElement("div");return Je.style.overflow="hidden",Je.style.flexGrow="2",this.fonts.forEach(function(rt){var Be=document.createElement("div");Be.style.display="inline-block",Be.style.alignItems="center",Be.style.justifyContent="space-between",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.overflow="hidden",Be.style.maxWidth=100/Ne.fonts.length-5+"%",Be.style.borderColor=rt===Ne.currentFont?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){Ne.setCurrentFont(rt,Be)}),Je.appendChild(Be);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=rt,_e.style.overflow="hidden";var Xe=document.createElement("div");Xe.style.whiteSpace="nowrap",Xe.style.overflow="hidden",Xe.style.textOverflow="ellipsis",Xe.innerHTML="The quick brown fox jumps over the lazy dog",_e.appendChild(Xe),Be.appendChild(_e),Ne.fontBoxes.push(Be)}),Je},Ce.prototype.setCurrentFont=function(Ne,Je){var rt=this;this.currentFont=Ne,this.fontBoxes.forEach(function(Be){Be.style.borderColor=Be===Je?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ce}(z),Ye=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.color="transparent",Be.padding=5,Be.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Be.text=Be.DEFAULT_TEXT,Be.isMoved=!1,Be.color=rt.defaultColor,Be.fontFamily=rt.defaultFontFamily,Be.defaultSize={x:100,y:30},Be.setColor=Be.setColor.bind(Be),Be.setFont=Be.setFont.bind(Be),Be.renderText=Be.renderText.bind(Be),Be.sizeText=Be.sizeText.bind(Be),Be.textEditDivClicked=Be.textEditDivClicked.bind(Be),Be.showTextEditor=Be.showTextEditor.bind(Be),Be.setSize=Be.setSize.bind(Be),Be.positionTextEditor=Be.positionTextEditor.bind(Be),Be.colorPanel=new ee("Color",rt.defaultColorSet,rt.defaultColor),Be.colorPanel.onColorChanged=Be.setColor,Be.fontFamilyPanel=new He("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Be.fontFamilyPanel.onFontChanged=Be.setFont,Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){if(Qe.prototype.ownsTarget.call(this,Ne)||Ne===this.visual||Ne===this.textElement||Ne===this.bgRectangle)return!0;var Je=!1;return this.textElement.childNodes.forEach(function(rt){rt===Ne&&(Je=!0)}),Je},Ce.prototype.createVisual=function(){this.visual=me.createGroup(),this.bgRectangle=me.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=me.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.textElement.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Ce.prototype.renderText=function(){var Ne=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(Je){Ne.textElement.appendChild(me.createTSpan(Je.trim()===""?" ":Je.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ce.prototype.getTextScale=function(){var Ne=this.textElement.getBBox(),Je=1;if(Ne.width>0&&Ne.height>0){var rt=(1*this.width-this.width*this.padding*2/100)/Ne.width,Be=(1*this.height-this.height*this.padding*2/100)/Ne.height;Je=Math.min(rt,Be)}return Je},Ce.prototype.getTextPosition=function(Ne){var Je=this.textElement.getBBox(),rt=0,Be=0;return Je.width>0&&Je.height>0&&(rt=(this.width-Je.width*Ne)/2,Be=this.height/2-Je.height*Ne/2),{x:rt,y:Be}},Ce.prototype.sizeText=function(){var Ne=this.textElement.getBBox(),Je=this.getTextScale(),rt=this.getTextPosition(Je);rt.y-=Ne.y*Je,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+rt.x+"px, "+rt.y+"px) scale("+Je+", "+Je+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(rt.x,rt.y),this.textElement.transform.baseVal.getItem(1).setScale(Je,Je))},Ce.prototype.manipulate=function(Ne){Qe.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},Ce.prototype.resize=function(Ne){Qe.prototype.resize.call(this,Ne),this.isMoved=!0,this.setSize(),this.sizeText()},Ce.prototype.setSize=function(){Qe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ce.prototype.pointerUp=function(Ne){var Je=this.state;Je==="creating"&&(this._suppressMarkerCreateEvent=!0),Qe.prototype.pointerUp.call(this,Ne),this.setSize(),(Je==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ce.prototype.showTextEditor=function(){var Ne=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(Je){Je.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Je=Number.parseFloat(Ne.textEditor.style.fontSize);Ne.textEditor.clientWidth>=Number.parseInt(Ne.textEditor.style.maxWidth)&&Je>.9;)Je-=.1,Ne.textEditor.style.fontSize=Math.max(Je,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Je){Je.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Je){if(Je.clipboardData){var rt=Je.clipboardData.getData("text"),Be=window.getSelection();if(!Be.rangeCount)return!1;Be.deleteFromDocument(),Be.getRangeAt(0).insertNode(document.createTextNode(rt)),Je.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ne.textEditDivClicked(Ne.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ce.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ne=this.getTextScale(),Je=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),rt=this.textElement.getBBox(),Be={x:rt.width*Ne,y:rt.height*Ne};Je.x-=Be.x/2,Je.y-=Be.y/2,this.textEditor.style.top=Je.y+"px",this.textEditor.style.left=Je.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Je.x+"px",this.textEditor.style.fontSize=Math.max(16*Ne,12)+"px",this.textElement.style.display="none"}},Ce.prototype.textEditDivClicked=function(Ne){this.text=Ne.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ce.prototype.select=function(){Qe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ce.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Qe.prototype.deselect.call(this)},Ce.prototype.dblClick=function(Ne,Je){Qe.prototype.dblClick.call(this,Ne,Je),this.showTextEditor()},Ce.prototype.setColor=function(Ne){this.textElement&&me.setAttributes(this.textElement,[["fill",Ne]]),this.color=Ne,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ne)},Ce.prototype.setFont=function(Ne){this.textElement&&me.setAttributes(this.textElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ce.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ce.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Qe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){var Je=Ne;this.color=Je.color,this.fontFamily=Je.fontFamily,this.padding=Je.padding,this.text=Je.text,this.createVisual(),Qe.prototype.restoreState.call(this,Ne),this.setSize()},Ce.prototype.scale=function(Ne,Je){Qe.prototype.scale.call(this,Ne,Je),this.setSize(),this.sizeText(),this.positionTextEditor()},Ce.typeName="TextMarker",Ce.title="Text marker",Ce.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>',Ce}(pe),We=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.color="transparent",Be.lineWidth=3,Be.drawing=!1,Be.pixelRatio=1,Be.color=rt.defaultColor,Be.lineWidth=rt.defaultStrokeWidth,Be.pixelRatio=rt.freehandPixelRatio,Be.setColor=Be.setColor.bind(Be),Be.addCanvas=Be.addCanvas.bind(Be),Be.finishCreation=Be.finishCreation.bind(Be),Be.setLineWidth=Be.setLineWidth.bind(Be),Be.colorPanel=new ee("Color",rt.defaultColorSet,rt.defaultColor),Be.colorPanel.onColorChanged=Be.setColor,Be.lineWidthPanel=new Le("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Be.lineWidthPanel.onWidthChanged=Be.setLineWidth,Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return!(!Qe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.drawingImage)},Ce.prototype.createVisual=function(){this.visual=me.createGroup(),this.drawingImage=me.createImage(),this.visual.appendChild(this.drawingImage);var Ne=me.createTransform();this.visual.transform.baseVal.appendItem(Ne),this.addMarkerVisualToContainer(this.visual)},Ce.prototype.pointerDown=function(Ne,Je){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(Ne.x,Ne.y),this.drawing=!0):Qe.prototype.pointerDown.call(this,Ne,Je)},Ce.prototype.manipulate=function(Ne){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ne.x,Ne.y),this.canvasContext.stroke()):Qe.prototype.manipulate.call(this,Ne)},Ce.prototype.resize=function(Ne){Qe.prototype.resize.call(this,Ne),me.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ce.prototype.pointerUp=function(Ne){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Qe.prototype.pointerUp.call(this,Ne)},Ce.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)},Ce.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Qe.prototype.select.call(this)},Ce.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Qe.prototype.deselect.call(this)},Ce.prototype.finishCreation=function(){for(var Ne=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Je=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],rt=Je[0],Be=Je[1],_e=Je[2],Xe=Je[3],lt=!1,Pt=0;Pt<this.canvasElement.height;Pt++)for(var kt=0;kt<this.canvasElement.width;kt++)Ne.data[Pt*this.canvasElement.width*4+4*kt+3]>0&&(lt=!0,Pt<Be&&(Be=Pt),kt<rt&&(rt=kt),Pt>Xe&&(Xe=Pt),kt>_e&&(_e=kt));if(lt){this.left=rt/this.pixelRatio,this.top=Be/this.pixelRatio,this.width=(_e-rt)/this.pixelRatio,this.height=(Xe-Be)/this.pixelRatio;var zt=document.createElement("canvas");zt.width=_e-rt,zt.height=Xe-Be,zt.getContext("2d").putImageData(this.canvasContext.getImageData(rt,Be,_e-rt,Xe-Be),0,0),this.drawingImgUrl=zt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ce.prototype.setDrawingImage=function(){me.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),me.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ce.prototype.setColor=function(Ne){this.color=Ne,this.colorChanged(Ne)},Ce.prototype.setLineWidth=function(Ne){this.lineWidth=Ne},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({drawingImgUrl:this.drawingImgUrl},Qe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){this.createVisual(),Qe.prototype.restoreState.call(this,Ne),this.drawingImgUrl=Ne.drawingImgUrl,this.setDrawingImage()},Ce.prototype.scale=function(Ne,Je){Qe.prototype.scale.call(this,Ne,Je),this.setDrawingImage()},Ce.typeName="FreehandMarker",Ce.title="Freehand marker",Ce.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>',Ce}(pe),Ue=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,rt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Be.typeBoxes=[],Be.currentType=Je,Be.setCurrentType=Be.setCurrentType.bind(Be),Be}return _t(Ce,Qe),Ce.prototype.getUi=function(){var Ne=this,Je=document.createElement("div");Je.style.display="flex",Je.style.overflow="hidden",Je.style.flexGrow="2";for(var rt=function(Xe){var lt="both";switch(Xe){case 0:lt="both";break;case 1:lt="start";break;case 2:lt="end";break;case 3:lt="none"}var Pt=document.createElement("div");if(Pt.style.display="flex",Pt.style.flexGrow="2",Pt.style.alignItems="center",Pt.style.justifyContent="space-between",Pt.style.padding="5px",Pt.style.borderWidth="2px",Pt.style.borderStyle="solid",Pt.style.borderColor=lt===Be.currentType?Be.uiStyleSettings.toolboxAccentColor:"transparent",Pt.addEventListener("click",function(){Ne.setCurrentType(lt,Pt)}),Je.appendChild(Pt),lt==="both"||lt==="start"){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.minHeight="20px",kt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(Be.uiStyleSettings!==void 0?Be.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,kt.style.marginLeft="5px",Pt.appendChild(kt)}var zt=document.createElement("div");zt.style.display="flex",zt.style.alignItems="center",zt.style.minHeight="20px",zt.style.flexGrow="2";var jt=document.createElement("hr");if(jt.style.minWidth="20px",jt.style.border="0px",jt.style.borderTop="3px solid "+(Be.uiStyleSettings!==void 0?Be.uiStyleSettings.toolboxColor:"#eeeeee"),jt.style.flexGrow="2",zt.appendChild(jt),Pt.appendChild(zt),lt==="both"||lt==="end"){var Ht=document.createElement("div");Ht.style.display="flex",Ht.style.alignItems="center",Ht.style.minHeight="20px",Ht.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(Be.uiStyleSettings!==void 0?Be.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ht.style.marginRight="5px",Pt.appendChild(Ht)}Be.typeBoxes.push(Pt)},Be=this,_e=0;_e<4;_e++)rt(_e);return Je},Ce.prototype.setCurrentType=function(Ne,Je){var rt=this;this.currentType=Ne,this.typeBoxes.forEach(function(Be){Be.style.borderColor=Be===Je?rt.uiStyleSettings!==void 0?rt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ce}(z),st=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.arrowType="end",Be.arrowBaseHeight=10,Be.arrowBaseWidth=10,Be.getArrowPoints=Be.getArrowPoints.bind(Be),Be.setArrowType=Be.setArrowType.bind(Be),Be.arrowTypePanel=new Ue("Arrow type","end"),Be.arrowTypePanel.onArrowTypeChanged=Be.setArrowType,Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return!(!Qe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.arrow1&&Ne!==this.arrow2)},Ce.prototype.getArrowPoints=function(Ne,Je){var rt=this.arrowBaseWidth+2*this.strokeWidth,Be=this.arrowBaseHeight+2*this.strokeWidth;return Ne-rt/2+","+(Je+Be/2)+" "+Ne+","+(Je-Be/2)+" "+(Ne+rt/2)+","+(Je+Be/2)},Ce.prototype.createTips=function(){this.arrow1=me.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=me.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(me.createTransform()),this.visual.appendChild(this.arrow2)},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.state==="creating"&&this.createTips()},Ce.prototype.adjustVisual=function(){if(Qe.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",me.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),me.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ne=0;Math.abs(this.x1-this.x2)>.1&&(Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Je=this.arrow1.transform.baseVal.getItem(0);Je.setRotate(Ne,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Je,0);var rt=this.arrow2.transform.baseVal.getItem(0);rt.setRotate(Ne+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(rt,0)}},Ce.prototype.setArrowType=function(Ne){this.arrowType=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({arrowType:this.arrowType},Qe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){Qe.prototype.restoreState.call(this,Ne);var Je=Ne;this.arrowType=Je.arrowType,this.createTips(),this.adjustVisual()},Ce.typeName="ArrowMarker",Ce.title="Arrow marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ce}(ze),dt=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.fillColor=rt.defaultFillColor,Be.strokeWidth=0,Be.fillPanel=new ee("Color",rt.defaultColorSet,rt.defaultFillColor),Be.fillPanel.onColorChanged=Be.setFillColor,Be}return _t(Ce,Qe),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Qe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.typeName="CoverMarker",Ce.title="Cover marker",Ce.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ce}(Se),gt=function(Qe){function Ce(Ne,Je,rt,Be){var _e=Qe.call(this,Ne,Be||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return _e.opacities=[],_e.opacityBoxes=[],_e.opacities=Je,_e.currentOpacity=rt,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return _t(Ce,Qe),Ce.prototype.getUi=function(){var Ne=this,Je=document.createElement("div");return Je.style.display="flex",Je.style.overflow="hidden",Je.style.flexGrow="2",Je.style.justifyContent="space-between",this.opacities.forEach(function(rt){var Be=document.createElement("div");Be.style.display="flex",Be.style.alignItems="center",Be.style.justifyContent="center",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.borderColor=rt===Ne.currentOpacity?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){Ne.setCurrentOpacity(rt,Be)}),Je.appendChild(Be);var _e=document.createElement("div");_e.innerText=100*rt+"%",Be.appendChild(_e),Ne.opacityBoxes.push(Be)}),Je},Ce.prototype.setCurrentOpacity=function(Ne,Je){var rt=this;this.currentOpacity=Ne,this.opacityBoxes.forEach(function(Be){Be.style.borderColor=Be===Je?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ce}(z),Et=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.setOpacity=Be.setOpacity.bind(Be),Be.fillColor=rt.defaultHighlightColor,Be.strokeWidth=0,Be.opacity=rt.defaultHighlightOpacity,Be.fillPanel=new ee("Color",rt.defaultColorSet,Be.fillColor),Be.fillPanel.onColorChanged=Be.setFillColor,Be.opacityPanel=new gt("Opacity",rt.defaultOpacitySteps,Be.opacity),Be.opacityPanel.onOpacityChanged=Be.setOpacity,Be}return _t(Ce,Qe),Ce.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Qe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.typeName="HighlightMarker",Ce.title="Highlight marker",Ce.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>',Ce}(dt),Ke='<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>',et='<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>',$e=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.bgColor="transparent",Be.tipPosition={x:0,y:0},Be.tipBase1Position={x:0,y:0},Be.tipBase2Position={x:0,y:0},Be.tipMoving=!1,Be.color=rt.defaultStrokeColor,Be.bgColor=rt.defaultFillColor,Be.fontFamily=rt.defaultFontFamily,Be.defaultSize={x:100,y:30},Be.setBgColor=Be.setBgColor.bind(Be),Be.getTipPoints=Be.getTipPoints.bind(Be),Be.positionTip=Be.positionTip.bind(Be),Be.setTipPoints=Be.setTipPoints.bind(Be),Be.colorPanel=new ee("Text color",rt.defaultColorSet,Be.color,Ke),Be.colorPanel.onColorChanged=Be.setColor,Be.bgColorPanel=new ee("Fill color",rt.defaultColorSet,Be.bgColor,et),Be.bgColorPanel.onColorChanged=Be.setBgColor,Be.fontFamilyPanel=new He("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Be.fontFamilyPanel.onFontChanged=Be.setFont,Be.tipGrip=new le,Be.tipGrip.visual.transform.baseVal.appendItem(me.createTransform()),Be.controlBox.appendChild(Be.tipGrip.visual),Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return Qe.prototype.ownsTarget.call(this,Ne)||this.tipGrip.ownsTarget(Ne)||this.tip===Ne},Ce.prototype.createTip=function(){me.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=me.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ce.prototype.pointerDown=function(Ne,Je){this.state==="new"&&Qe.prototype.pointerDown.call(this,Ne,Je),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Je)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Qe.prototype.pointerDown.call(this,Ne,Je)},Ce.prototype.pointerUp=function(Ne){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Qe.prototype.pointerUp.call(this,Ne);else{var Je=this.state==="creating";Qe.prototype.pointerUp.call(this,Ne),this.setTipPoints(Je),this.positionTip()}},Ce.prototype.manipulate=function(Ne){if(this.tipMoving){var Je=this.unrotatePoint(Ne);this.tipPosition={x:Je.x-this.manipulationStartLeft,y:Je.y-this.manipulationStartTop},this.positionTip()}else Qe.prototype.manipulate.call(this,Ne)},Ce.prototype.setBgColor=function(Ne){this.bgRectangle&&this.tip&&(me.setAttributes(this.bgRectangle,[["fill",Ne]]),me.setAttributes(this.tip,[["fill",Ne]])),this.bgColor=Ne,this.fillColorChanged(Ne)},Ce.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},Ce.prototype.setTipPoints=function(Ne){Ne===void 0&&(Ne=!1);var Je=Math.min(this.height/2,15),rt=this.height/5;Ne&&(this.tipPosition={x:Je+rt/2,y:this.height+20});var Be=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Be<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(rt=this.width/5,Je=Math.min(this.width/2,15),this.tipBase1Position={x:Je,y:0},this.tipBase2Position={x:Je+rt,y:0}):(this.tipBase1Position={x:0,y:Je},this.tipBase2Position={x:0,y:Je+rt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Be<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(rt=this.width/5,Je=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Je-rt,y:0},this.tipBase2Position={x:this.width-Je,y:0}):(this.tipBase1Position={x:this.width,y:Je},this.tipBase2Position={x:this.width,y:Je+rt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Be<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(rt=this.width/5,Je=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Je-rt,y:this.height},this.tipBase2Position={x:this.width-Je,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Je-rt},this.tipBase2Position={x:this.width,y:this.height-Je}):Be<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(rt=this.width/5,Je=Math.min(this.width/2,15),this.tipBase1Position={x:Je,y:this.height},this.tipBase2Position={x:Je+rt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Je},this.tipBase2Position={x:0,y:this.height-Je-rt})},Ce.prototype.resize=function(Ne){Qe.prototype.resize.call(this,Ne),this.positionTip()},Ce.prototype.positionTip=function(){me.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ne=this.tipGrip.visual.transform.baseVal.getItem(0);Ne.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ne,0)},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ce.prototype.select=function(){this.positionTip(),Qe.prototype.select.call(this)},Ce.prototype.getState=function(){var Ne=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Qe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){var Je=Ne;this.bgColor=Je.bgColor,this.tipPosition=Je.tipPosition,Qe.prototype.restoreState.call(this,Ne),this.createTip(),this.setTipPoints()},Ce.prototype.scale=function(Ne,Je){Qe.prototype.scale.call(this,Ne,Je),this.tipPosition={x:this.tipPosition.x*Ne,y:this.tipPosition.y*Je},this.positionTip()},Ce.typeName="CalloutMarker",Ce.title="Callout marker",Ce.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>',Ce}(Ye),vt=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.fillColor="transparent",Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.opacity=1,Be.strokeColor=rt.defaultColor,Be.strokeWidth=rt.defaultStrokeWidth,Be.strokeDasharray=rt.defaultStrokeDasharray,Be.fillColor=rt.defaultFillColor,Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setFillColor=Be.setFillColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.setOpacity=Be.setOpacity.bind(Be),Be.createVisual=Be.createVisual.bind(Be),Be.strokePanel=new ee("Line color",Ie(rt.defaultColorSet,["transparent"]),rt.defaultColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.fillPanel=new ee("Fill color",Ie(rt.defaultColorSet,["transparent"]),Be.fillColor,et),Be.fillPanel.onColorChanged=Be.setFillColor,Be.strokeWidthPanel=new Le("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new De("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be.opacityPanel=new gt("Opacity",rt.defaultOpacitySteps,Be.opacity),Be.opacityPanel.onOpacityChanged=Be.setOpacity,Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return!(!Qe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},Ce.prototype.createVisual=function(){this.visual=me.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)},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Ce.prototype.manipulate=function(Ne){Qe.prototype.manipulate.call(this,Ne)},Ce.prototype.resize=function(Ne){Qe.prototype.resize.call(this,Ne),this.setSize()},Ce.prototype.setSize=function(){Qe.prototype.setSize.call(this),me.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ce.prototype.pointerUp=function(Ne){Qe.prototype.pointerUp.call(this,Ne),this.setSize()},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&me.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Ce.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&me.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&me.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&me.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ce.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&me.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Qe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){var Je=Ne;this.fillColor=Je.fillColor,this.strokeColor=Je.strokeColor,this.strokeWidth=Je.strokeWidth,this.strokeDasharray=Je.strokeDasharray,this.opacity=Je.opacity,this.createVisual(),Qe.prototype.restoreState.call(this,Ne),this.setSize()},Ce.prototype.scale=function(Ne,Je){Qe.prototype.scale.call(this,Ne,Je),this.setSize()},Ce.typeName="EllipseMarker",Ce.title="Ellipse marker",Ce.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>',Ce}(pe),wt=function(Qe){function Ce(Ne,Je,rt){return Qe.call(this,Ne,Je,rt)||this}return _t(Ce,Qe),Object.defineProperty(Ce.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ce.prototype.ownsTarget=function(Ne){return!(!Qe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.tip1&&Ne!==this.tip2)},Ce.prototype.createTips=function(){this.tip1=me.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(me.createTransform()),this.visual.appendChild(this.tip1),this.tip2=me.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(me.createTransform()),this.visual.appendChild(this.tip2)},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.state==="creating"&&this.createTips()},Ce.prototype.adjustVisual=function(){if(Qe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(me.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()]]),me.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 Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Je=this.tip1.transform.baseVal.getItem(0);Je.setRotate(Ne,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Je,0);var rt=this.tip2.transform.baseVal.getItem(0);rt.setRotate(Ne+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(rt,0)}},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Qe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){Qe.prototype.restoreState.call(this,Ne),this.createTips(),this.adjustVisual()},Ce.typeName="MeasurementMarker",Ce.title="Measurement marker",Ce.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>',Ce}(ze),ht=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.strokePanel.colors=rt.defaultColorSet,Be.fillColor="transparent",Be}return _t(Ce,Qe),Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Qe.prototype.getState.call(this);return Ne.typeName=Ce.typeName,Ne},Ce.typeName="EllipseFrameMarker",Ce.title="Ellipse frame marker",Ce.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>',Ce}(vt),pt=function(){function Qe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Qe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Qe.prototype.addUndoStep=function(Ce){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ce)||(this.undoStack.push(Ce),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ce)&&this.redoStack.splice(0,this.redoStack.length))},Qe.prototype.replaceLastUndoStep=function(Ce){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ce)},Qe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Qe.prototype.undo=function(){if(this.undoStack.length>1){var Ce=this.undoStack.pop();return Ce!==void 0&&this.redoStack.push(Ce),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Qe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Qe}(),ct=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.curveX=0,Be.curveY=0,Be.manipulationStartCurveX=0,Be.manipulationStartCurveY=0,Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.positionGrips=Be.positionGrips.bind(Be),Be.addControlGrips=Be.addControlGrips.bind(Be),Be.adjustVisual=Be.adjustVisual.bind(Be),Be.setupControlBox=Be.setupControlBox.bind(Be),Be.resize=Be.resize.bind(Be),Be.strokeColor=rt.defaultColor,Be.strokeWidth=rt.defaultStrokeWidth,Be.strokeDasharray=rt.defaultStrokeDasharray,Be.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.strokeWidthPanel=new Le("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new De("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return!(!Qe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorCurve&&Ne!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ne))},Ce.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ce.prototype.createVisual=function(){this.visual=me.createGroup(),this.selectorCurve=me.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=me.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)},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ne.x,this.curveY=Ne.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Je)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ce.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),me.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),me.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),me.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ce.prototype.setupControlBox=function(){Qe.prototype.setupControlBox.call(this),this.curveControlLine1=me.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=me.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)},Ce.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Qe.prototype.addControlGrips.call(this)},Ce.prototype.positionGrips=function(){Qe.prototype.positionGrips.call(this);var Ne=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ne/2,this.curveY-Ne/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()))},Ce.prototype.manipulate=function(Ne){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ne.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ne.y-this.manipulationStartY),Qe.prototype.manipulate.call(this,Ne)},Ce.prototype.resize=function(Ne){this.activeGrip===this.curveGrip&&(this.curveX=Ne.x,this.curveY=Ne.y),Qe.prototype.resize.call(this,Ne),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual()},Ce.prototype.scale=function(Ne,Je){this.curveX=this.curveX*Ne,this.curveY=this.curveY*Je,Qe.prototype.scale.call(this,Ne,Je)},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Qe.prototype.getState.call(this));return Ne.typeName=Ce.typeName,Ne},Ce.prototype.restoreState=function(Ne){Qe.prototype.restoreState.call(this,Ne);var Je=Ne;this.strokeColor=Je.strokeColor,this.strokeWidth=Je.strokeWidth,this.strokeDasharray=Je.strokeDasharray,this.curveX=Je.curveX,this.curveY=Je.curveY,this.createVisual(),this.adjustVisual()},Ce.typeName="CurveMarker",Ce.title="Curve marker",Ce.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>',Ce}(Oe),Ct=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,Je,rt)||this;return Be.fillColor="transparent",Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.textColor="transparent",Be.fontSize="1rem",Be.isMoved=!1,Be.captionText="Caption",Be.PADDING=5,Be.captionBoxWidth=0,Be.captionBoxHeight=0,Be.strokeColor=rt.defaultColor,Be.strokeWidth=rt.defaultStrokeWidth,Be.strokeDasharray=rt.defaultStrokeDasharray,Be.fillColor=rt.defaultFillColor,Be.textColor=rt.defaultStrokeColor,Be.fontFamily=rt.defaultFontFamily,Be.fontSize=rt.defaultCaptionFontSize,Be.captionText=rt.defaultCaptionText,Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setFillColor=Be.setFillColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.createVisual=Be.createVisual.bind(Be),Be.sizeCaption=Be.sizeCaption.bind(Be),Be.setCaptionText=Be.setCaptionText.bind(Be),Be.showTextEditor=Be.showTextEditor.bind(Be),Be.positionTextEditor=Be.positionTextEditor.bind(Be),Be.finishTextEditing=Be.finishTextEditing.bind(Be),Be.setFont=Be.setFont.bind(Be),Be.setTextColor=Be.setTextColor.bind(Be),Be.strokePanel=new ee("Line color",Ie(rt.defaultColorSet,["transparent"]),Be.strokeColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.fillPanel=new ee("Fill color",Ie(rt.defaultColorSet,["transparent"]),Be.fillColor,et),Be.fillPanel.onColorChanged=Be.setFillColor,Be.strokeWidthPanel=new Le("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new De("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be.fontFamilyPanel=new He("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Be.fontFamilyPanel.onFontChanged=Be.setFont,Be.textColorPanel=new ee("Text color",rt.defaultColorSet,Be.textColor,Ke),Be.textColorPanel.onColorChanged=Be.setTextColor,Be}return _t(Ce,Qe),Ce.prototype.ownsTarget=function(Ne){return!(!Qe.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.frame&&Ne!==this.captionBg&&Ne!==this.captionElement)},Ce.prototype.createVisual=function(){this.visual=me.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=me.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=me.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=me.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()},Ce.prototype.setCaptionText=function(Ne){this.captionText=Ne,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ce.prototype.pointerDown=function(Ne,Je){Qe.prototype.pointerDown.call(this,Ne,Je),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Ce.prototype.manipulate=function(Ne){Qe.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},Ce.prototype.resize=function(Ne){Qe.prototype.resize.call(this,Ne),this.setSize()},Ce.prototype.sizeCaption=function(){var Ne=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ne.width+2*this.PADDING,this.captionBoxHeight=Ne.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),me.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')"]]),me.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')"]])},Ce.prototype.showTextEditor=function(){var Ne=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(Je){Je.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Je){Je.key==="Enter"&&Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Je){Je.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ce.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"))},Ce.prototype.finishTextEditing=function(Ne){this.setCaptionText(Ne.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ce.prototype.setFont=function(Ne){this.captionElement&&me.setAttributes(this.captionElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ce.prototype.setTextColor=function(Ne){this.captionElement&&me.setAttributes(this.captionElement,[["fill",Ne]]),this.textColor=Ne,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ce.prototype.setSize=function(){Qe.prototype.setSize.call(this),me.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ce.prototype.pointerUp=function(Ne){Qe.prototype.pointerUp.call(this,Ne),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ce.prototype.dblClick=function(Ne,Je){Qe.prototype.dblClick.call(this,Ne,Je),this.showTextEditor()},Ce.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.frame&&me.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Ce.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.captionBg&&me.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},Ce.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.frame&&me.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ce.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.frame&&me.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ce.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ce.prototype.getState=function(){var Ne=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},Qe.prototype.getState.call(this));return Ne.typeName=this.typeName,Ne},Ce.prototype.restoreState=function(Ne){var Je=Ne;this.fillColor=Je.fillColor,this.strokeColor=Je.strokeColor,this.strokeWidth=Je.strokeWidth,this.strokeDasharray=Je.strokeDasharray,this.textColor=Je.textColor,this.fontFamily=Je.fontFamily,this.captionText=Je.captionText,this.fontSize=Je.fontSize,this.createVisual(),Qe.prototype.restoreState.call(this,Ne),this.setSize()},Ce.prototype.scale=function(Ne,Je){Qe.prototype.scale.call(this,Ne,Je),this.setSize()},Ce.typeName="CaptionFrameMarker",Ce.title="Caption frame marker",Ce.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>',Ce}(pe),xt=function(){function Qe(Ce,Ne){Ne===void 0&&(Ne=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ce,this.cancelable=Ne}return Object.defineProperty(Qe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Qe.prototype.preventDefault=function(){this._defaultPrevented=!0},Qe}(),yt=function(Qe){function Ce(Ne,Je,rt){var Be=Qe.call(this,Ne,!1)||this;return Be.dataUrl=Je,Be.state=rt,Be}return _t(Ce,Qe),Ce}(xt),Tt=function(Qe){function Ce(Ne,Je,rt){rt===void 0&&(rt=!1);var Be=Qe.call(this,Ne,rt)||this;return Be.marker=Je,Be}return _t(Ce,Qe),Ce}(xt),St=function(){function Qe(){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 Qe.prototype.addEventListener=function(Ce,Ne){this[Ce].push(Ne)},Qe.prototype.removeEventListener=function(Ce,Ne){var Je=this[Ce].indexOf(Ne);Je>-1&&this[Ce].splice(Je,1)},Qe}(),nt=function(){function Qe(Ce){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ae,this._isOpen=!1,this.undoRedoManager=new pt,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 St,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Qe.instanceCounter++,this.styles=new be(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ce,this.targetRoot=document.body,this.width=Ce.clientWidth,this.height=Ce.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(Qe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,We,st,Ye,ht,vt,Et,$e,wt,dt,ze,ct,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,We,st,Ye,vt,Et,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,We,st,Ye,Et]},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ce){var Ne=this;this._availableMarkerTypes.splice(0),Ce.forEach(function(Je){if(typeof Je=="string"){var rt=Ne.ALL_MARKER_TYPES.find(function(Be){return Be.typeName===Je});rt!==void 0&&Ne._availableMarkerTypes.push(rt)}else Ne._availableMarkerTypes.push(Je)})},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Qe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ce){this._zoomLevel=Ce,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(Qe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Qe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),de.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Qe.prototype.show=function(){var Ce=this;this.styles.styleSheetRoot===void 0&&we.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=we.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ne){return Ne(new xt(Ce))})},Qe.prototype.render=function(){return ae(this,void 0,void 0,function(){var Ce;return Ge(this,function(Ne){switch(Ne.label){case 0:return this.setCurrentMarker(),(Ce=new Ee).naturalSize=this.renderAtNaturalSize,Ce.imageType=this.renderImageType,Ce.imageQuality=this.renderImageQuality,Ce.markersOnly=this.renderMarkersOnly,Ce.width=this.renderWidth,Ce.height=this.renderHeight,[4,Ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ne.sent(),[4,Ce.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ne.sent()]}})})},Qe.prototype.close=function(Ce){var Ne=this;if(Ce===void 0&&(Ce=!1),this.isOpen){var Je=!1;Ce||this.eventListeners.beforeclose.forEach(function(rt){var Be=new xt(Ne,!0);rt(Be),Be.defaultPrevented&&(Je=!0)}),Je||(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(rt){return rt(new xt(Ne))}),this.detachEvents(),this._isOpen=!1)}},Qe.prototype.addMarkersToToolbar=function(){for(var Ce,Ne=[],Je=0;Je<arguments.length;Je++)Ne[Je]=arguments[Je];(Ce=this._availableMarkerTypes).push.apply(Ce,Ne)},Qe.prototype.addRenderEventListener=function(Ce){this.addEventListener("render",function(Ne){Ce(Ne.dataUrl,Ne.state)})},Qe.prototype.removeRenderEventListener=function(Ce){},Qe.prototype.addCloseEventListener=function(Ce){this.addEventListener("close",function(){Ce()})},Qe.prototype.removeCloseEventListener=function(Ce){},Qe.prototype.setupResizeObserver=function(){var Ce=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ce.resize(Ce.target.clientWidth,Ce.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ce.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Qe.prototype.onPopupTargetResize=function(){var Ce=1*this.target.clientWidth/this.target.clientHeight,Ne=this.editorCanvas.clientWidth/Ce>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ce:this.editorCanvas.clientWidth,Je=Ne<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ce;this.resize(Ne,Je)},Qe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Qe.prototype.resize=function(Ce,Ne){this._isResizing=!0;var Je=Ce/this.imageWidth,rt=Ne/this.imageHeight;this.imageWidth=Math.round(Ce),this.imageHeight=Math.round(Ne),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(Je,rt),this._isResizing=!1},Qe.prototype.scaleMarkers=function(Ce,Ne){var Je,rt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(Ce,Ne):(Je=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Be){Be!==rt._currentMarker&&Be.scale(Ce,Ne)}),Je!==void 0&&this.setCurrentMarker(Je)},Qe.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"},Qe.prototype.setTopLeft=function(){var Ce=this.editingTarget.getBoundingClientRect(),Ne=this.editorCanvas.getBoundingClientRect();this.left=Ce.left-Ne.left,this.top=Ce.top-Ne.top},Qe.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)},Qe.prototype.addDefs=function(){for(var Ce,Ne=[],Je=0;Je<arguments.length;Je++)Ne[Je]=arguments[Je];this.defs=me.createDefs(),this.addDefsToImage(),(Ce=this.defs).append.apply(Ce,Ne)},Qe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Qe.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)},Qe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Qe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Qe.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)},Qe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Qe.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)},Qe.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 Ce=document.createElement("a");Ce.href="https://markerjs.com/",Ce.target="_blank",Ce.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>',Ce.title="Powered by marker.js",Ce.style.display="grid",Ce.style.alignItems="center",Ce.style.justifyItems="center",Ce.style.padding="3px",Ce.style.width="20px",Ce.style.height="20px",this.logoUI.appendChild(Ce),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Qe.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")},Qe.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"},Qe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Qe.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 Ce=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=Ce+"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 xe(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 fe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Qe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Qe.prototype.removeMarker=function(Ce){this.markerImage.removeChild(Ce.container),this.markers.indexOf(Ce)>-1&&this.markers.splice(this.markers.indexOf(Ce),1),Ce.dispose()},Qe.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())},Qe.prototype.toolbarButtonClicked=function(Ce,Ne){if(Ce==="marker"&&Ne!==void 0)this.createNewMarker(Ne);else if(Ce==="action")switch(Ne){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()}},Qe.prototype.deleteSelectedMarker=function(){var Ce=this;if(this._currentMarker!==void 0){var Ne=!1;if(this.eventListeners.markerbeforedelete.forEach(function(rt){var Be=new Tt(Ce,Ce._currentMarker,!0);rt(Be),Be.defaultPrevented&&(Ne=!0)}),!Ne){var Je=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(rt){return rt(new Tt(Ce,Je))})}}},Qe.prototype.clear=function(){var Ce=this,Ne=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var Xe=new Tt(Ce,void 0,!0);_e(Xe),Xe.defaultPrevented&&(Ne=!0)}),!Ne)){this.setCurrentMarker();for(var Je=function(_e){var Xe=rt.markers[_e];rt.setCurrentMarker(rt.markers[_e]),rt._currentMarker.dispose(),rt.markerImage.removeChild(rt._currentMarker.container),rt.markers.splice(rt.markers.indexOf(rt._currentMarker),1),rt.eventListeners.markerdelete.forEach(function(lt){return lt(new Tt(Ce,Xe))})},rt=this,Be=this.markers.length-1;Be>=0;Be--)Je(Be);this.addUndoStep()}},Object.defineProperty(Qe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Qe.prototype.showNotesEditor=function(){var Ce;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=(Ce=this._currentMarker.notes)!==null&&Ce!==void 0?Ce:"",this.overlayContainer.appendChild(this.notesArea))},Qe.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)},Qe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Qe.prototype.addUndoStep=function(){var Ce=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ne=this.getState(),Je=this.undoRedoManager.getLastUndoStep();if(!Je||Je.width===Ne.width&&Je.height===Ne.height){var rt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ne),rt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Be){return Be(new xt(Ce))})}else this.undoRedoManager.replaceLastUndoStep(Ne),this.eventListeners.statechange.forEach(function(Be){return Be(new xt(Ce))})}},Qe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Qe.prototype.undoStep=function(){var Ce=this,Ne=this.undoRedoManager.undo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Je){return Je(new xt(Ce))}))},Qe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Qe.prototype.redoStep=function(){var Ce=this,Ne=this.undoRedoManager.redo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Je){return Je(new xt(Ce))}))},Qe.prototype.stepZoom=function(){var Ce=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ce<this.zoomSteps.length-1?this.zoomSteps[Ce+1]:this.zoomSteps[0]},Qe.prototype.panTo=function(Ce){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ce.x,top:this.prevPanPoint.y-Ce.y}),this.prevPanPoint=Ce},Qe.prototype.startRenderAndClose=function(){return ae(this,void 0,void 0,function(){var Ce,Ne,Je=this;return Ge(this,function(rt){switch(rt.label){case 0:return[4,this.render()];case 1:return Ce=rt.sent(),Ne=this.getState(),this.eventListeners.render.forEach(function(Be){return Be(new yt(Je,Ce,Ne))}),this.close(!0),[2]}})})},Qe.prototype.getState=function(Ce){Ce===!0&&this.setCurrentMarker();var Ne={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Je){return Ne.markers.push(Je.getState())}),Ne},Qe.prototype.restoreState=function(Ce){var Ne=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ce.markers.forEach(function(Je){var rt=Ne._availableMarkerTypes.find(function(_e){return _e.typeName===Je.typeName});if(rt!==void 0){var Be=Ne.addNewMarker(rt);Be.restoreState(Je),Ne.markers.push(Be)}}),Ce.width&&Ce.height&&(Ce.width!==this.imageWidth||Ce.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ce.width,this.imageHeight/Ce.height),this.eventListeners.restorestate.forEach(function(Je){return Je(new xt(Ne))})},Qe.prototype.addNewMarker=function(Ce){var Ne=me.createGroup();return this.markerImage.appendChild(Ne),new Ce(Ne,this.overlayContainer,this.settings)},Qe.prototype.createNewMarker=function(Ce){var Ne,Je=this;(Ne=typeof Ce=="string"?this._availableMarkerTypes.find(function(rt){return rt.typeName===Ce}):Ce)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ne),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(Ne.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(rt){return rt(new Tt(Je,Je._currentMarker))}))},Qe.prototype.markerCreated=function(Ce){var Ne=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ce),this.setCurrentMarker(Ce),Ce instanceof We&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(We):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Je){return Je(new Tt(Ne,Ne._currentMarker))})},Qe.prototype.colorChanged=function(Ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ce,this.settings.defaultStrokeColor=Ce)},Qe.prototype.fillColorChanged=function(Ce){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ce)},Qe.prototype.markerStateChanged=function(Ce){var Ne=this;this.eventListeners.markerchange.forEach(function(Je){return Je(new Tt(Ne,Ce))})},Qe.prototype.setCurrentMarker=function(Ce){var Ne=this;this._currentMarker!==Ce&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Je){return Je(new Tt(Ne,Ne._currentMarker))})),this._currentMarker=Ce,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(Je){return Je(new Tt(Ne,Ne._currentMarker))}))},Qe.prototype.onPointerDown=function(Ce){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ce.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Ne=this.markers.find(function(Je){return Je.ownsTarget(Ce.target)});Ne!==void 0?(this.setCurrentMarker(Ne),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY),Ce.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ce.clientX,y:Ce.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY))},Qe.prototype.onDblClick=function(Ce){if(this._isFocused||this.focus(),this.mode==="select"){var Ne=this.markers.find(function(Je){return Je.ownsTarget(Ce.target)});Ne!==void 0&&Ne!==this._currentMarker&&this.setCurrentMarker(Ne),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY),Ce.target):this.setCurrentMarker()}},Qe.prototype.onPointerMove=function(Ce){this.touchPoints!==1&&Ce.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ce.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY)):this.zoomLevel>1&&this.panTo({x:Ce.clientX,y:Ce.clientY}))},Qe.prototype.onPointerUp=function(Ce){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ce.clientX,Ce.clientY)),this.isDragging=!1,this.addUndoStep()},Qe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Qe.prototype.onKeyUp=function(Ce){this._currentMarker===void 0||this.notesArea!==void 0||Ce.key!=="Delete"&&Ce.key!=="Backspace"||this.deleteSelectedMarker()},Qe.prototype.clientToLocalCoordinates=function(Ce,Ne){var Je=this.markerImage.getBoundingClientRect();return{x:(Ce-Je.left)/this.zoomLevel,y:(Ne-Je.top)/this.zoomLevel}},Qe.prototype.onWindowResize=function(){this.positionUI()},Qe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ce=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ce+"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()},Qe.prototype.addLicenseKey=function(Ce){de.addKey(Ce)},Qe.prototype.addEventListener=function(Ce,Ne){this.eventListeners.addEventListener(Ce,Ne)},Qe.prototype.removeEventListener=function(Ce,Ne){this.eventListeners.removeEventListener(Ce,Ne)},Qe.prototype.renderState=function(Ce){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ce),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Qe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Qe.prototype.focus=function(){var Ce=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ne){return Ne(new xt(Ce))}))},Qe.prototype.blur=function(){var Ce=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ne){return Ne(new xt(Ce))}))},Qe.instanceCounter=0,Qe}()},13272:function(dn,pn,at){"use strict";at.d(pn,{s:function(){return Nh},default:function(){return wd}});function ot(){return ot=Object.assign?Object.assign.bind():function(ut){for(var ft=1;ft<arguments.length;ft++){var Dt=arguments[ft];for(var Rt in Dt)({}).hasOwnProperty.call(Dt,Rt)&&(ut[Rt]=Dt[Rt])}return ut},ot.apply(null,arguments)}function _t(ut){"@babel/helpers - typeof";return _t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ft){return typeof ft}:function(ft){return ft&&typeof Symbol=="function"&&ft.constructor===Symbol&&ft!==Symbol.prototype?"symbol":typeof ft},_t(ut)}function ae(ut,ft){if(_t(ut)!="object"||!ut)return ut;var Dt=ut[Symbol.toPrimitive];if(Dt!==void 0){var Rt=Dt.call(ut,ft||"default");if(_t(Rt)!="object")return Rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ft==="string"?String:Number)(ut)}function Ge(ut){var ft=ae(ut,"string");return _t(ft)=="symbol"?ft:ft+""}function Ie(ut,ft,Dt){return(ft=Ge(ft))in ut?Object.defineProperty(ut,ft,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):ut[ft]=Dt,ut}function me(ut,ft){var Dt=Object.keys(ut);if(Object.getOwnPropertySymbols){var Rt=Object.getOwnPropertySymbols(ut);ft&&(Rt=Rt.filter(function(en){return Object.getOwnPropertyDescriptor(ut,en).enumerable})),Dt.push.apply(Dt,Rt)}return Dt}function de(ut){for(var ft=1;ft<arguments.length;ft++){var Dt=arguments[ft]!=null?arguments[ft]:{};ft%2?me(Object(Dt),!0).forEach(function(Rt){Ie(ut,Rt,Dt[Rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ut,Object.getOwnPropertyDescriptors(Dt)):me(Object(Dt)).forEach(function(Rt){Object.defineProperty(ut,Rt,Object.getOwnPropertyDescriptor(Dt,Rt))})}return ut}function Ee(ut,ft){(ft==null||ft>ut.length)&&(ft=ut.length);for(var Dt=0,Rt=Array(ft);Dt<ft;Dt++)Rt[Dt]=ut[Dt];return Rt}function we(ut){if(Array.isArray(ut))return Ee(ut)}function be(ut){if(typeof Symbol!="undefined"&&ut[Symbol.iterator]!=null||ut["@@iterator"]!=null)return Array.from(ut)}function Te(ut,ft){if(ut){if(typeof ut=="string")return Ee(ut,ft);var Dt={}.toString.call(ut).slice(8,-1);return Dt==="Object"&&ut.constructor&&(Dt=ut.constructor.name),Dt==="Map"||Dt==="Set"?Array.from(ut):Dt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Dt)?Ee(ut,ft):void 0}}function ve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(ut){return we(ut)||be(ut)||Te(ut)||ve()}function fe(ut){if(Array.isArray(ut))return ut}function z(ut,ft){var Dt=ut==null?null:typeof Symbol!="undefined"&&ut[Symbol.iterator]||ut["@@iterator"];if(Dt!=null){var Rt,en,yn,Pn,Wn=[],Kn=!0,Yn=!1;try{if(yn=(Dt=Dt.call(ut)).next,ft===0){if(Object(Dt)!==Dt)return;Kn=!1}else for(;!(Kn=(Rt=yn.call(Dt)).done)&&(Wn.push(Rt.value),Wn.length!==ft);Kn=!0);}catch(ar){Yn=!0,en=ar}finally{try{if(!Kn&&Dt.return!=null&&(Pn=Dt.return(),Object(Pn)!==Pn))return}finally{if(Yn)throw en}}return Wn}}function ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oe(ut,ft){return fe(ut)||z(ut,ft)||Te(ut,ft)||ee()}function ie(ut,ft){if(ut==null)return{};var Dt={};for(var Rt in ut)if({}.hasOwnProperty.call(ut,Rt)){if(ft.indexOf(Rt)!==-1)continue;Dt[Rt]=ut[Rt]}return Dt}function le(ut,ft){if(ut==null)return{};var Dt,Rt,en=ie(ut,ft);if(Object.getOwnPropertySymbols){var yn=Object.getOwnPropertySymbols(ut);for(Rt=0;Rt<yn.length;Rt++)Dt=yn[Rt],ft.indexOf(Dt)===-1&&{}.propertyIsEnumerable.call(ut,Dt)&&(en[Dt]=ut[Dt])}return en}function ue(){return ue=Object.assign?Object.assign.bind():function(ut){for(var ft=1;ft<arguments.length;ft++){var Dt=arguments[ft];for(var Rt in Dt)Object.prototype.hasOwnProperty.call(Dt,Rt)&&(ut[Rt]=Dt[Rt])}return ut},ue.apply(this,arguments)}function pe(ut,ft){(ft==null||ft>ut.length)&&(ft=ut.length);for(var Dt=0,Rt=new Array(ft);Dt<ft;Dt++)Rt[Dt]=ut[Dt];return Rt}function Se(ut){if(Array.isArray(ut))return pe(ut)}function Le(ut){if(typeof Symbol!="undefined"&&ut[Symbol.iterator]!=null||ut["@@iterator"]!=null)return Array.from(ut)}function De(ut,ft){if(ut){if(typeof ut=="string")return pe(ut,ft);var Dt=Object.prototype.toString.call(ut).slice(8,-1);if(Dt==="Object"&&ut.constructor&&(Dt=ut.constructor.name),Dt==="Map"||Dt==="Set")return Array.from(ut);if(Dt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Dt))return pe(ut,ft)}}function Fe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ae(ut){return Se(ut)||Le(ut)||De(ut)||Fe()}function Oe(ut){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ft){return typeof ft}:function(ft){return ft&&typeof Symbol=="function"&&ft.constructor===Symbol&&ft!==Symbol.prototype?"symbol":typeof ft},Oe(ut)}function ze(ut,ft){if(Oe(ut)!=="object"||ut===null)return ut;var Dt=ut[Symbol.toPrimitive];if(Dt!==void 0){var Rt=Dt.call(ut,ft||"default");if(Oe(Rt)!=="object")return Rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ft==="string"?String:Number)(ut)}function He(ut){var ft=ze(ut,"string");return Oe(ft)==="symbol"?ft:String(ft)}function Ye(ut,ft,Dt){return ft=He(ft),ft in ut?Object.defineProperty(ut,ft,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):ut[ft]=Dt,ut}function We(ut,ft){var Dt=Object.keys(ut);if(Object.getOwnPropertySymbols){var Rt=Object.getOwnPropertySymbols(ut);ft&&(Rt=Rt.filter(function(en){return Object.getOwnPropertyDescriptor(ut,en).enumerable})),Dt.push.apply(Dt,Rt)}return Dt}function Ue(ut){for(var ft=1;ft<arguments.length;ft++){var Dt=arguments[ft]!=null?arguments[ft]:{};ft%2?We(Object(Dt),!0).forEach(function(Rt){Ye(ut,Rt,Dt[Rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ut,Object.getOwnPropertyDescriptors(Dt)):We(Object(Dt)).forEach(function(Rt){Object.defineProperty(ut,Rt,Object.getOwnPropertyDescriptor(Dt,Rt))})}return ut}function st(ut){if(Array.isArray(ut))return ut}function dt(ut,ft){var Dt=ut==null?null:typeof Symbol!="undefined"&&ut[Symbol.iterator]||ut["@@iterator"];if(Dt!=null){var Rt,en,yn,Pn,Wn=[],Kn=!0,Yn=!1;try{if(yn=(Dt=Dt.call(ut)).next,ft===0){if(Object(Dt)!==Dt)return;Kn=!1}else for(;!(Kn=(Rt=yn.call(Dt)).done)&&(Wn.push(Rt.value),Wn.length!==ft);Kn=!0);}catch(ar){Yn=!0,en=ar}finally{try{if(!Kn&&Dt.return!=null&&(Pn=Dt.return(),Object(Pn)!==Pn))return}finally{if(Yn)throw en}}return Wn}}function gt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Et(ut,ft){return st(ut)||dt(ut,ft)||De(ut,ft)||gt()}function Ke(ut,ft){if(ut==null)return{};var Dt={},Rt=Object.keys(ut),en,yn;for(yn=0;yn<Rt.length;yn++)en=Rt[yn],!(ft.indexOf(en)>=0)&&(Dt[en]=ut[en]);return Dt}function et(ut,ft){if(ut==null)return{};var Dt=Ke(ut,ft),Rt,en;if(Object.getOwnPropertySymbols){var yn=Object.getOwnPropertySymbols(ut);for(en=0;en<yn.length;en++)Rt=yn[en],!(ft.indexOf(Rt)>=0)&&Object.prototype.propertyIsEnumerable.call(ut,Rt)&&(Dt[Rt]=ut[Rt])}return Dt}var $e=at(67294);function vt(ut){var ft=$e.useRef();ft.current=ut;var Dt=$e.useCallback(function(){for(var Rt,en=arguments.length,yn=new Array(en),Pn=0;Pn<en;Pn++)yn[Pn]=arguments[Pn];return(Rt=ft.current)===null||Rt===void 0?void 0:Rt.call.apply(Rt,[ft].concat(yn))},[]);return Dt}function wt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ht=wt()?$e.useLayoutEffect:$e.useEffect,pt=ht,ct=function(ft,Dt){var Rt=$e.useRef(!0);ht(function(){if(!Rt.current)return ft()},Dt),ht(function(){return Rt.current=!1,function(){Rt.current=!0}},[])};function Ct(ut){var ft=$e.useRef(!1),Dt=$e.useState(ut),Rt=Et(Dt,2),en=Rt[0],yn=Rt[1];$e.useEffect(function(){return ft.current=!1,function(){ft.current=!0}},[]);function Pn(Wn,Kn){Kn&&ft.current||yn(Wn)}return[en,Pn]}function xt(ut){return ut!==void 0}function yt(ut,ft){var Dt=ft||{},Rt=Dt.defaultValue,en=Dt.value,yn=Dt.onChange,Pn=Dt.postState,Wn=Ct(function(){return xt(en)?en:xt(Rt)?typeof Rt=="function"?Rt():Rt:typeof ut=="function"?ut():ut}),Kn=Et(Wn,2),Yn=Kn[0],ar=Kn[1],cr=en!==void 0?en:Yn,wr=Pn?Pn(cr):cr,sr=vt(yn),lr=Ct([cr]),Pr=Et(lr,2),br=Pr[0],qr=Pr[1];ct(function(){var Xr=br[0];Yn!==Xr&&sr(Yn,Xr)},[br]),ct(function(){xt(en)||ar(en)},[en]);var vi=vt(function(Xr,ei){ar(Xr,ei),qr([cr],ei)});return[wr,vi]}var Tt={};function St(ut,ft){}function nt(ut,ft){}function Qe(){Tt={}}function Ce(ut,ft,Dt){!ft&&!Tt[Dt]&&(ut(!1,Dt),Tt[Dt]=!0)}function Ne(ut,ft){Ce(St,ut,ft)}function Je(ut,ft){Ce(nt,ut,ft)}var rt=Ne,Be=at(94184),_e=at.n(Be),Xe=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ut=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ut)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ut==null?void 0:ut.substr(0,4))},lt=at(16357);function Pt(ut,ft,Dt){var Rt=$e.useRef({});return(!("value"in Rt.current)||Dt(Rt.current.condition,ft))&&(Rt.current.value=ut(),Rt.current.condition=ft),Rt.current.value}function kt(ut,ft){typeof ut=="function"?ut(ft):Oe(ut)==="object"&&ut&&"current"in ut&&(ut.current=ft)}function zt(){for(var ut=arguments.length,ft=new Array(ut),Dt=0;Dt<ut;Dt++)ft[Dt]=arguments[Dt];var Rt=ft.filter(function(en){return en});return Rt.length<=1?Rt[0]:function(en){ft.forEach(function(yn){kt(yn,en)})}}function jt(){for(var ut=arguments.length,ft=new Array(ut),Dt=0;Dt<ut;Dt++)ft[Dt]=arguments[Dt];return Pt(function(){return zt.apply(void 0,ft)},ft,function(Rt,en){return Rt.length===en.length&&Rt.every(function(yn,Pn){return yn===en[Pn]})})}function Ht(ut){var ft,Dt,Rt=isMemo(ut)?ut.type.type:ut.type;return!(typeof Rt=="function"&&!((ft=Rt.prototype)!==null&&ft!==void 0&&ft.render)||typeof ut=="function"&&!((Dt=ut.prototype)!==null&&Dt!==void 0&&Dt.render))}var ln=function(ft){var Dt=ft.className,Rt=ft.customizeIcon,en=ft.customizeIconProps,yn=ft.children,Pn=ft.onMouseDown,Wn=ft.onClick,Kn=typeof Rt=="function"?Rt(en):Rt;return $e.createElement("span",{className:Dt,onMouseDown:function(ar){ar.preventDefault(),Pn==null||Pn(ar)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Wn,"aria-hidden":!0},Kn!==void 0?Kn:$e.createElement("span",{className:_e()(Dt.split(/\s+/).map(function(Yn){return"".concat(Yn,"-icon")}))},yn))},an=ln,sn=function(ft,Dt,Rt,en,yn){var Pn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Wn=arguments.length>6?arguments[6]:void 0,Kn=arguments.length>7?arguments[7]:void 0,Yn=$e.useMemo(function(){if(Oe(en)==="object")return en.clearIcon;if(yn)return yn},[en,yn]),ar=$e.useMemo(function(){return!!(!Pn&&en&&(Rt.length||Wn)&&!(Kn==="combobox"&&Wn===""))},[en,Pn,Rt.length,Wn,Kn]);return{allowClear:ar,clearIcon:$e.createElement(an,{className:"".concat(ft,"-clear"),onMouseDown:Dt,customizeIcon:Yn},"\xD7")}},$t=$e.createContext(null);function On(){return $e.useContext($t)}function un(){var ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ft=$e.useState(!1),Dt=Et(ft,2),Rt=Dt[0],en=Dt[1],yn=$e.useRef(null),Pn=function(){window.clearTimeout(yn.current)};$e.useEffect(function(){return Pn},[]);var Wn=function(Yn,ar){Pn(),yn.current=window.setTimeout(function(){en(Yn),ar&&ar()},ut)};return[Rt,Wn,Pn]}function mn(){var ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ft=$e.useRef(null),Dt=$e.useRef(null);$e.useEffect(function(){return function(){window.clearTimeout(Dt.current)}},[]);function Rt(en){(en||ft.current===null)&&(ft.current=en),window.clearTimeout(Dt.current),Dt.current=window.setTimeout(function(){ft.current=null},ut)}return[function(){return ft.current},Rt]}function In(ut,ft,Dt,Rt){var en=$e.useRef(null);en.current={open:ft,triggerOpen:Dt,customizedTrigger:Rt},$e.useEffect(function(){function yn(Pn){var Wn;if(!((Wn=en.current)!==null&&Wn!==void 0&&Wn.customizedTrigger)){var Kn=Pn.target;Kn.shadowRoot&&Pn.composed&&(Kn=Pn.composedPath()[0]||Kn),en.current.open&&ut().filter(function(Yn){return Yn}).every(function(Yn){return!Yn.contains(Kn)&&Yn!==Kn})&&en.current.triggerOpen(!1)}}return window.addEventListener("mousedown",yn),function(){return window.removeEventListener("mousedown",yn)}},[])}var Sn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(ft){var Dt=ft.keyCode;if(ft.altKey&&!ft.ctrlKey||ft.metaKey||Dt>=Sn.F1&&Dt<=Sn.F12)return!1;switch(Dt){case Sn.ALT:case Sn.CAPS_LOCK:case Sn.CONTEXT_MENU:case Sn.CTRL:case Sn.DOWN:case Sn.END:case Sn.ESC:case Sn.HOME:case Sn.INSERT:case Sn.LEFT:case Sn.MAC_FF_META:case Sn.META:case Sn.NUMLOCK:case Sn.NUM_CENTER:case Sn.PAGE_DOWN:case Sn.PAGE_UP:case Sn.PAUSE:case Sn.PRINT_SCREEN:case Sn.RIGHT:case Sn.SHIFT:case Sn.UP:case Sn.WIN_KEY:case Sn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(ft){if(ft>=Sn.ZERO&&ft<=Sn.NINE||ft>=Sn.NUM_ZERO&&ft<=Sn.NUM_MULTIPLY||ft>=Sn.A&&ft<=Sn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&ft===0)return!0;switch(ft){case Sn.SPACE:case Sn.QUESTION_MARK:case Sn.NUM_PLUS:case Sn.NUM_MINUS:case Sn.NUM_PERIOD:case Sn.NUM_DIVISION:case Sn.SEMICOLON:case Sn.DASH:case Sn.EQUALS:case Sn.COMMA:case Sn.PERIOD:case Sn.SLASH:case Sn.APOSTROPHE:case Sn.SINGLE_QUOTE:case Sn.OPEN_SQUARE_BRACKET:case Sn.BACKSLASH:case Sn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Dn=Sn;function fr(ut){return ut&&![Dn.ESC,Dn.SHIFT,Dn.BACKSPACE,Dn.TAB,Dn.WIN_KEY,Dn.ALT,Dn.META,Dn.WIN_KEY_RIGHT,Dn.CTRL,Dn.SEMICOLON,Dn.EQUALS,Dn.CAPS_LOCK,Dn.CONTEXT_MENU,Dn.F1,Dn.F2,Dn.F3,Dn.F4,Dn.F5,Dn.F6,Dn.F7,Dn.F8,Dn.F9,Dn.F10,Dn.F11,Dn.F12].includes(ut)}var _r=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,mr=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,wi="".concat(_r," ").concat(mr).split(/[\s\n]+/),no="aria-",ro="data-";function io(ut,ft){return ut.indexOf(ft)===0}function Ji(ut){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dt;ft===!1?Dt={aria:!0,data:!0,attr:!0}:ft===!0?Dt={aria:!0}:Dt=Ue({},ft);var Rt={};return Object.keys(ut).forEach(function(en){(Dt.aria&&(en==="role"||io(en,no))||Dt.data&&io(en,ro)||Dt.attr&&wi.includes(en))&&(Rt[en]=ut[en])}),Rt}function lo(){return lo=Object.assign?Object.assign.bind():function(ut){for(var ft=1;ft<arguments.length;ft++){var Dt=arguments[ft];for(var Rt in Dt)Object.prototype.hasOwnProperty.call(Dt,Rt)&&(ut[Rt]=Dt[Rt])}return ut},lo.apply(this,arguments)}function Fi(ut){"@babel/helpers - typeof";return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ft){return typeof ft}:function(ft){return ft&&typeof Symbol=="function"&&ft.constructor===Symbol&&ft!==Symbol.prototype?"symbol":typeof ft},Fi(ut)}function Jr(ut,ft){if(Fi(ut)!=="object"||ut===null)return ut;var Dt=ut[Symbol.toPrimitive];if(Dt!==void 0){var Rt=Dt.call(ut,ft||"default");if(Fi(Rt)!=="object")return Rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ft==="string"?String:Number)(ut)}function bn(ut){var ft=Jr(ut,"string");return Fi(ft)==="symbol"?ft:String(ft)}function Ze(ut,ft,Dt){return ft=bn(ft),ft in ut?Object.defineProperty(ut,ft,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):ut[ft]=Dt,ut}function vn(ut,ft){var Dt=Object.keys(ut);if(Object.getOwnPropertySymbols){var Rt=Object.getOwnPropertySymbols(ut);ft&&(Rt=Rt.filter(function(en){return Object.getOwnPropertyDescriptor(ut,en).enumerable})),Dt.push.apply(Dt,Rt)}return Dt}function Mn(ut){for(var ft=1;ft<arguments.length;ft++){var Dt=arguments[ft]!=null?arguments[ft]:{};ft%2?vn(Object(Dt),!0).forEach(function(Rt){Ze(ut,Rt,Dt[Rt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ut,Object.getOwnPropertyDescriptors(Dt)):vn(Object(Dt)).forEach(function(Rt){Object.defineProperty(ut,Rt,Object.getOwnPropertyDescriptor(Dt,Rt))})}return ut}function Rn(ut){if(Array.isArray(ut))return ut}function zn(ut,ft){var Dt=ut==null?null:typeof Symbol!="undefined"&&ut[Symbol.iterator]||ut["@@iterator"];if(Dt!=null){var Rt,en,yn,Pn,Wn=[],Kn=!0,Yn=!1;try{if(yn=(Dt=Dt.call(ut)).next,ft===0){if(Object(Dt)!==Dt)return;Kn=!1}else for(;!(Kn=(Rt=yn.call(Dt)).done)&&(Wn.push(Rt.value),Wn.length!==ft);Kn=!0);}catch(ar){Yn=!0,en=ar}finally{try{if(!Kn&&Dt.return!=null&&(Pn=Dt.return(),Object(Pn)!==Pn))return}finally{if(Yn)throw en}}return Wn}}function Un(ut,ft){(ft==null||ft>ut.length)&&(ft=ut.length);for(var Dt=0,Rt=new Array(ft);Dt<ft;Dt++)Rt[Dt]=ut[Dt];return Rt}function $n(ut,ft){if(ut){if(typeof ut=="string")return Un(ut,ft);var Dt=Object.prototype.toString.call(ut).slice(8,-1);if(Dt==="Object"&&ut.constructor&&(Dt=ut.constructor.name),Dt==="Map"||Dt==="Set")return Array.from(ut);if(Dt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Dt))return Un(ut,ft)}}function Mr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nn(ut,ft){return Rn(ut)||zn(ut,ft)||$n(ut,ft)||Mr()}function on(ut,ft){if(ut==null)return{};var Dt={},Rt=Object.keys(ut),en,yn;for(yn=0;yn<Rt.length;yn++)en=Rt[yn],!(ft.indexOf(en)>=0)&&(Dt[en]=ut[en]);return Dt}function Kt(ut,ft){if(ut==null)return{};var Dt=on(ut,ft),Rt,en;if(Object.getOwnPropertySymbols){var yn=Object.getOwnPropertySymbols(ut);for(en=0;en<yn.length;en++)Rt=yn[en],!(ft.indexOf(Rt)>=0)&&Object.prototype.propertyIsEnumerable.call(ut,Rt)&&(Dt[Rt]=ut[Rt])}return Dt}var hn=at(48555);function qn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var tr=qn()?$e.useLayoutEffect:$e.useEffect,ur=function(ft,Dt){var Rt=$e.useRef(!0);tr(function(){return ft(Rt.current)},Dt),tr(function(){return Rt.current=!1,function(){Rt.current=!0}},[])},Qt=function(ft,Dt){ur(function(Rt){if(!Rt)return ft()},Dt)},Cn=ur,dr=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ar=void 0;function _n(ut,ft){var Dt=ut.prefixCls,Rt=ut.invalidate,en=ut.item,yn=ut.renderItem,Pn=ut.responsive,Wn=ut.responsiveDisabled,Kn=ut.registerSize,Yn=ut.itemKey,ar=ut.className,cr=ut.style,wr=ut.children,sr=ut.display,lr=ut.order,Pr=ut.component,br=Pr===void 0?"div":Pr,qr=Kt(ut,dr),vi=Pn&&!sr;function Xr(pi){Kn(Yn,pi)}$e.useEffect(function(){return function(){Xr(null)}},[]);var ei=yn&&en!==Ar?yn(en):wr,Di;Rt||(Di={opacity:vi?0:1,height:vi?0:Ar,overflowY:vi?"hidden":Ar,order:Pn?lr:Ar,pointerEvents:vi?"none":Ar,position:vi?"absolute":Ar});var or={};vi&&(or["aria-hidden"]=!0);var ii=$e.createElement(br,lo({className:_e()(!Rt&&Dt,ar),style:Mn(Mn({},Di),cr)},or,qr,{ref:ft}),ei);return Pn&&(ii=$e.createElement(hn.Z,{onResize:function(ci){var Si=ci.offsetWidth;Xr(Si)},disabled:Wn},ii)),ii}var Zt=$e.forwardRef(_n);Zt.displayName="Item";var ir=Zt;function Nr(ut){var ft=$e.useRef();ft.current=ut;var Dt=$e.useCallback(function(){for(var Rt,en=arguments.length,yn=new Array(en),Pn=0;Pn<en;Pn++)yn[Pn]=arguments[Pn];return(Rt=ft.current)===null||Rt===void 0?void 0:Rt.call.apply(Rt,[ft].concat(yn))},[]);return Dt}var si=at(73935),Tn=function(ft){return+setTimeout(ft,16)},vr=function(ft){return clearTimeout(ft)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Tn=function(ft){return window.requestAnimationFrame(ft)},vr=function(ft){return window.cancelAnimationFrame(ft)});var yi=0,ko=new Map;function zi(ut){ko.delete(ut)}var xr=function(ft){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;yi+=1;var Rt=yi;function en(yn){if(yn===0)zi(Rt),ft();else{var Pn=Tn(function(){en(yn-1)});ko.set(Rt,Pn)}}return en(Dt),Rt};xr.cancel=function(ut){var ft=ko.get(ut);return zi(ft),vr(ft)};var gr=xr;function Lr(ut){if(typeof MessageChannel=="undefined")gr(ut);else{var ft=new MessageChannel;ft.port1.onmessage=function(){return ut()},ft.port2.postMessage(void 0)}}function _i(){var ut=$e.useRef(null),ft=function(Rt){ut.current||(ut.current=[],Lr(function(){(0,si.unstable_batchedUpdates)(function(){ut.current.forEach(function(en){en()}),ut.current=null})})),ut.current.push(Rt)};return ft}function oo(ut,ft){var Dt=$e.useState(ft),Rt=nn(Dt,2),en=Rt[0],yn=Rt[1],Pn=Nr(function(Wn){ut(function(){yn(Wn)})});return[en,Pn]}var Xn=$e.createContext(null),Ir=["component"],_s=["className"],Aa=["className"],ga=function(ft,Dt){var Rt=$e.useContext(Xn);if(!Rt){var en=ft.component,yn=en===void 0?"div":en,Pn=Kt(ft,Ir);return $e.createElement(yn,lo({},Pn,{ref:Dt}))}var Wn=Rt.className,Kn=Kt(Rt,_s),Yn=ft.className,ar=Kt(ft,Aa);return $e.createElement(Xn.Provider,{value:null},$e.createElement(ir,lo({ref:Dt,className:_e()(Wn,Yn)},Kn,ar)))},tn=$e.forwardRef(ga);tn.displayName="RawItem";var Vr=tn,Ti=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],jr="responsive",Fo="invalidate";function Oi(ut){return"+ ".concat(ut.length," ...")}function Ri(ut,ft){var Dt=ut.prefixCls,Rt=Dt===void 0?"rc-overflow":Dt,en=ut.data,yn=en===void 0?[]:en,Pn=ut.renderItem,Wn=ut.renderRawItem,Kn=ut.itemKey,Yn=ut.itemWidth,ar=Yn===void 0?10:Yn,cr=ut.ssr,wr=ut.style,sr=ut.className,lr=ut.maxCount,Pr=ut.renderRest,br=ut.renderRawRest,qr=ut.suffix,vi=ut.component,Xr=vi===void 0?"div":vi,ei=ut.itemComponent,Di=ut.onVisibleChange,or=Kt(ut,Ti),ii=cr==="full",pi=_i(),ci=oo(pi,null),Si=nn(ci,2),Kr=Si[0],Ni=Si[1],Ei=Kr||0,ao=oo(pi,new Map),Hi=nn(ao,2),Ki=Hi[0],fo=Hi[1],bo=oo(pi,0),Qi=nn(bo,2),Wr=Qi[0],Ii=Qi[1],Po=oo(pi,0),$i=nn(Po,2),Do=$i[0],_o=$i[1],zo=oo(pi,0),Io=nn(zo,2),ia=Io[0],hs=Io[1],ha=(0,$e.useState)(null),gi=nn(ha,2),fi=gi[0],ui=gi[1],Gr=(0,$e.useState)(null),Ur=nn(Gr,2),di=Ur[0],Ui=Ur[1],Co=$e.useMemo(function(){return di===null&&ii?Number.MAX_SAFE_INTEGER:di||0},[di,Kr]),qi=(0,$e.useState)(!1),ca=nn(qi,2),Ja=ca[0],Go=ca[1],os="".concat(Rt,"-item"),oa=Math.max(Wr,Do),js=lr===jr,Ha=yn.length&&js,Hs=lr===Fo,Qa=Ha||typeof lr=="number"&&yn.length>lr,Ra=(0,$e.useMemo)(function(){var xi=yn;return Ha?Kr===null&&ii?xi=yn:xi=yn.slice(0,Math.min(yn.length,Ei/ar)):typeof lr=="number"&&(xi=yn.slice(0,lr)),xi},[yn,ar,Kr,lr,Ha]),qo=(0,$e.useMemo)(function(){return Ha?yn.slice(Co+1):yn.slice(Ra.length)},[yn,Ra,Ha,Co]),va=(0,$e.useCallback)(function(xi,Ao){var Pi;return typeof Kn=="function"?Kn(xi):(Pi=Kn&&(xi==null?void 0:xi[Kn]))!==null&&Pi!==void 0?Pi:Ao},[Kn]),Zl=(0,$e.useCallback)(Pn||function(xi){return xi},[Pn]);function ul(xi,Ao,Pi){di===xi&&(Ao===void 0||Ao===fi)||(Ui(xi),Pi||(Go(xi<yn.length-1),Di==null||Di(xi)),Ao!==void 0&&ui(Ao))}function ys(xi,Ao){Ni(Ao.clientWidth)}function as(xi,Ao){fo(function(Pi){var ss=new Map(Pi);return Ao===null?ss.delete(xi):ss.set(xi,Ao),ss})}function Jo(xi,Ao){_o(Ao),Ii(Do)}function Ka(xi,Ao){hs(Ao)}function ju(xi){return Ki.get(va(Ra[xi],xi))}Cn(function(){if(Ei&&typeof oa=="number"&&Ra){var xi=ia,Ao=Ra.length,Pi=Ao-1;if(!Ao){ul(0,null);return}for(var ss=0;ss<Ao;ss+=1){var bl=ju(ss);if(ii&&(bl=bl||0),bl===void 0){ul(ss-1,void 0,!0);break}if(xi+=bl,Pi===0&&xi<=Ei||ss===Pi-1&&xi+ju(Pi)<=Ei){ul(Pi,null);break}else if(xi+oa>Ei){ul(ss-1,xi-bl-ia+Do);break}}qr&&ju(0)+ia>Ei&&ui(null)}},[Ei,Ki,Do,ia,va,Ra]);var Ss=Ja&&!!qo.length,ch={};fi!==null&&Ha&&(ch={position:"absolute",left:fi,top:0});var Vt={prefixCls:os,responsive:Ha,component:ei,invalidate:Hs},Jl=Wn?function(xi,Ao){var Pi=va(xi,Ao);return $e.createElement(Xn.Provider,{key:Pi,value:Mn(Mn({},Vt),{},{order:Ao,item:xi,itemKey:Pi,registerSize:as,display:Ao<=Co})},Wn(xi,Ao))}:function(xi,Ao){var Pi=va(xi,Ao);return $e.createElement(ir,lo({},Vt,{order:Ao,key:Pi,item:xi,renderItem:Zl,itemKey:Pi,registerSize:as,display:Ao<=Co}))},Ks,Fu={order:Ss?Co:Number.MAX_SAFE_INTEGER,className:"".concat(os,"-rest"),registerSize:Jo,display:Ss};if(br)br&&(Ks=$e.createElement(Xn.Provider,{value:Mn(Mn({},Vt),Fu)},br(qo)));else{var wu=Pr||Oi;Ks=$e.createElement(ir,lo({},Vt,Fu),typeof wu=="function"?wu(qo):wu)}var $a=$e.createElement(Xr,lo({className:_e()(!Hs&&Rt,sr),style:wr,ref:ft},or),Ra.map(Jl),Qa?Ks:null,qr&&$e.createElement(ir,lo({},Vt,{responsive:js,responsiveDisabled:!Ha,order:Co,className:"".concat(os,"-suffix"),registerSize:Ka,display:!0,style:ch}),qr));return js&&($a=$e.createElement(hn.Z,{onResize:ys,disabled:!Ha},$a)),$a}var Li=$e.forwardRef(Ri);Li.displayName="Overflow",Li.Item=Vr,Li.RESPONSIVE=jr,Li.INVALIDATE=Fo;var bi=Li,uo=bi,Ln=function(ft,Dt){var Rt,en=ft.prefixCls,yn=ft.id,Pn=ft.inputElement,Wn=ft.disabled,Kn=ft.tabIndex,Yn=ft.autoFocus,ar=ft.autoComplete,cr=ft.editable,wr=ft.activeDescendantId,sr=ft.value,lr=ft.maxLength,Pr=ft.onKeyDown,br=ft.onMouseDown,qr=ft.onChange,vi=ft.onPaste,Xr=ft.onCompositionStart,ei=ft.onCompositionEnd,Di=ft.onBlur,or=ft.open,ii=ft.attrs,pi=Pn||$e.createElement("input",null),ci=pi,Si=ci.ref,Kr=ci.props,Ni=Kr.onKeyDown,Ei=Kr.onChange,ao=Kr.onMouseDown,Hi=Kr.onCompositionStart,Ki=Kr.onCompositionEnd,fo=Kr.onBlur,bo=Kr.style;return"maxLength"in pi.props,pi=$e.cloneElement(pi,Ue(Ue(Ue({type:"search"},Kr),{},{id:yn,ref:zt(Dt,Si),disabled:Wn,tabIndex:Kn,autoComplete:ar||"off",autoFocus:Yn,className:_e()("".concat(en,"-selection-search-input"),(Rt=pi)===null||Rt===void 0||(Rt=Rt.props)===null||Rt===void 0?void 0:Rt.className),role:"combobox","aria-expanded":or||!1,"aria-haspopup":"listbox","aria-owns":"".concat(yn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(yn,"_list"),"aria-activedescendant":or?wr:void 0},ii),{},{value:cr?sr:"",maxLength:lr,readOnly:!cr,unselectable:cr?null:"on",style:Ue(Ue({},bo),{},{opacity:cr?null:0}),onKeyDown:function(Wr){Pr(Wr),Ni&&Ni(Wr)},onMouseDown:function(Wr){br(Wr),ao&&ao(Wr)},onChange:function(Wr){qr(Wr),Ei&&Ei(Wr)},onCompositionStart:function(Wr){Xr(Wr),Hi&&Hi(Wr)},onCompositionEnd:function(Wr){ei(Wr),Ki&&Ki(Wr)},onPaste:vi,onBlur:function(Wr){Di(Wr),fo&&fo(Wr)}})),pi},la=$e.forwardRef(Ln),Nn=la;function vo(ut){return Array.isArray(ut)?ut:ut!==void 0?[ut]:[]}var bs=typeof window!="undefined"&&window.document&&window.document.documentElement,Xt=bs;function Jt(ut){return ut!=null}function cn(ut){return!ut&&ut!==0}function Fn(ut){return["string","number"].includes(Oe(ut))}function pr(ut){var ft=void 0;return ut&&(Fn(ut.title)?ft=ut.title.toString():Fn(ut.label)&&(ft=ut.label.toString())),ft}function li(ut,ft){Xt?$e.useLayoutEffect(ut,ft):$e.useEffect(ut,ft)}function Zr(ut){var ft;return(ft=ut.key)!==null&&ft!==void 0?ft:ut.value}var Vn=function(ft){ft.preventDefault(),ft.stopPropagation()},Mt=function(ft){var Dt=ft.id,Rt=ft.prefixCls,en=ft.values,yn=ft.open,Pn=ft.searchValue,Wn=ft.autoClearSearchValue,Kn=ft.inputRef,Yn=ft.placeholder,ar=ft.disabled,cr=ft.mode,wr=ft.showSearch,sr=ft.autoFocus,lr=ft.autoComplete,Pr=ft.activeDescendantId,br=ft.tabIndex,qr=ft.removeIcon,vi=ft.maxTagCount,Xr=ft.maxTagTextLength,ei=ft.maxTagPlaceholder,Di=ei===void 0?function(Gr){return"+ ".concat(Gr.length," ...")}:ei,or=ft.tagRender,ii=ft.onToggleOpen,pi=ft.onRemove,ci=ft.onInputChange,Si=ft.onInputPaste,Kr=ft.onInputKeyDown,Ni=ft.onInputMouseDown,Ei=ft.onInputCompositionStart,ao=ft.onInputCompositionEnd,Hi=ft.onInputBlur,Ki=$e.useRef(null),fo=(0,$e.useState)(0),bo=Et(fo,2),Qi=bo[0],Wr=bo[1],Ii=(0,$e.useState)(!1),Po=Et(Ii,2),$i=Po[0],Do=Po[1],_o="".concat(Rt,"-selection"),zo=yn||cr==="multiple"&&Wn===!1||cr==="tags"?Pn:"",Io=cr==="tags"||cr==="multiple"&&Wn===!1||wr&&(yn||$i);li(function(){Wr(Ki.current.scrollWidth)},[zo]);var ia=function(Ur,di,Ui,Co,qi){return $e.createElement("span",{title:pr(Ur),className:_e()("".concat(_o,"-item"),Ye({},"".concat(_o,"-item-disabled"),Ui))},$e.createElement("span",{className:"".concat(_o,"-item-content")},di),Co&&$e.createElement(an,{className:"".concat(_o,"-item-remove"),onMouseDown:Vn,onClick:qi,customizeIcon:qr},"\xD7"))},hs=function(Ur,di,Ui,Co,qi,ca){var Ja=function(os){Vn(os),ii(!yn)};return $e.createElement("span",{onMouseDown:Ja},or({label:di,value:Ur,disabled:Ui,closable:Co,onClose:qi,isMaxTag:!!ca}))},ha=function(Ur){var di=Ur.disabled,Ui=Ur.label,Co=Ur.value,qi=!ar&&!di,ca=Ui;if(typeof Xr=="number"&&(typeof Ui=="string"||typeof Ui=="number")){var Ja=String(ca);Ja.length>Xr&&(ca="".concat(Ja.slice(0,Xr),"..."))}var Go=function(oa){oa&&oa.stopPropagation(),pi(Ur)};return typeof or=="function"?hs(Co,ca,di,qi,Go):ia(Ur,ca,di,qi,Go)},gi=function(Ur){if(!en.length)return null;var di=typeof Di=="function"?Di(Ur):Di;return typeof or=="function"?hs(void 0,di,!1,!1,void 0,!0):ia({title:di},di,!1)},fi=$e.createElement("div",{className:"".concat(_o,"-search"),style:{width:Qi},onFocus:function(){Do(!0)},onBlur:function(){Do(!1)}},$e.createElement(Nn,{ref:Kn,open:yn,prefixCls:Rt,id:Dt,inputElement:null,disabled:ar,autoFocus:sr,autoComplete:lr,editable:Io,activeDescendantId:Pr,value:zo,onKeyDown:Kr,onMouseDown:Ni,onChange:ci,onPaste:Si,onCompositionStart:Ei,onCompositionEnd:ao,onBlur:Hi,tabIndex:br,attrs:Ji(ft,!0)}),$e.createElement("span",{ref:Ki,className:"".concat(_o,"-search-mirror"),"aria-hidden":!0},zo,"\xA0")),ui=$e.createElement(uo,{prefixCls:"".concat(_o,"-overflow"),data:en,renderItem:ha,renderRest:gi,suffix:fi,itemKey:Zr,maxCount:vi});return $e.createElement("span",{className:"".concat(_o,"-wrap")},ui,!en.length&&!zo&&$e.createElement("span",{className:"".concat(_o,"-placeholder")},Yn))},yo=Mt,za=function(ft){var Dt=ft.inputElement,Rt=ft.prefixCls,en=ft.id,yn=ft.inputRef,Pn=ft.disabled,Wn=ft.autoFocus,Kn=ft.autoComplete,Yn=ft.activeDescendantId,ar=ft.mode,cr=ft.open,wr=ft.values,sr=ft.placeholder,lr=ft.tabIndex,Pr=ft.showSearch,br=ft.searchValue,qr=ft.activeValue,vi=ft.maxLength,Xr=ft.onInputKeyDown,ei=ft.onInputMouseDown,Di=ft.onInputChange,or=ft.onInputPaste,ii=ft.onInputCompositionStart,pi=ft.onInputCompositionEnd,ci=ft.onInputBlur,Si=ft.title,Kr=$e.useState(!1),Ni=Et(Kr,2),Ei=Ni[0],ao=Ni[1],Hi=ar==="combobox",Ki=Hi||Pr,fo=wr[0],bo=br||"";Hi&&qr&&!Ei&&(bo=qr),$e.useEffect(function(){Hi&&ao(!1)},[Hi,qr]);var Qi=ar!=="combobox"&&!cr&&!Pr?!1:!!bo,Wr=Si===void 0?pr(fo):Si,Ii=$e.useMemo(function(){return fo?null:$e.createElement("span",{className:"".concat(Rt,"-selection-placeholder"),style:Qi?{visibility:"hidden"}:void 0},sr)},[fo,Qi,sr,Rt]);return $e.createElement("span",{className:"".concat(Rt,"-selection-wrap")},$e.createElement("span",{className:"".concat(Rt,"-selection-search")},$e.createElement(Nn,{ref:yn,prefixCls:Rt,id:en,open:cr,inputElement:Dt,disabled:Pn,autoFocus:Wn,autoComplete:Kn,editable:Ki,activeDescendantId:Yn,value:bo,onKeyDown:Xr,onMouseDown:ei,onChange:function($i){ao(!0),Di($i)},onPaste:or,onCompositionStart:ii,onCompositionEnd:pi,onBlur:ci,tabIndex:lr,attrs:Ji(ft,!0),maxLength:Hi?vi:void 0})),!Hi&&fo?$e.createElement("span",{className:"".concat(Rt,"-selection-item"),title:Wr,style:Qi?{visibility:"hidden"}:void 0},fo.label):null,Ii)},Gs=za,Ua=function(ft,Dt){var Rt=(0,$e.useRef)(null),en=(0,$e.useRef)(!1),yn=ft.prefixCls,Pn=ft.open,Wn=ft.mode,Kn=ft.showSearch,Yn=ft.tokenWithEnter,ar=ft.disabled,cr=ft.prefix,wr=ft.autoClearSearchValue,sr=ft.onSearch,lr=ft.onSearchSubmit,Pr=ft.onToggleOpen,br=ft.onInputKeyDown,qr=ft.onInputBlur,vi=ft.domRef;$e.useImperativeHandle(Dt,function(){return{focus:function(Wr){Rt.current.focus(Wr)},blur:function(){Rt.current.blur()}}});var Xr=mn(0),ei=Et(Xr,2),Di=ei[0],or=ei[1],ii=function(Wr){var Ii=Wr.which,Po=Rt.current instanceof HTMLTextAreaElement;!Po&&Pn&&(Ii===Dn.UP||Ii===Dn.DOWN)&&Wr.preventDefault(),br&&br(Wr),Ii===Dn.ENTER&&Wn==="tags"&&!en.current&&!Pn&&(lr==null||lr(Wr.target.value)),!(Po&&!Pn&&~[Dn.UP,Dn.DOWN,Dn.LEFT,Dn.RIGHT].indexOf(Ii))&&fr(Ii)&&Pr(!0)},pi=function(){or(!0)},ci=(0,$e.useRef)(null),Si=function(Wr){sr(Wr,!0,en.current)!==!1&&Pr(!0)},Kr=function(){en.current=!0},Ni=function(Wr){en.current=!1,Wn!=="combobox"&&Si(Wr.target.value)},Ei=function(Wr){var Ii=Wr.target.value;if(Yn&&ci.current&&/[\r\n]/.test(ci.current)){var Po=ci.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ii=Ii.replace(Po,ci.current)}ci.current=null,Si(Ii)},ao=function(Wr){var Ii=Wr.clipboardData,Po=Ii==null?void 0:Ii.getData("text");ci.current=Po||""},Hi=function(Wr){var Ii=Wr.target;if(Ii!==Rt.current){var Po=document.body.style.msTouchAction!==void 0;Po?setTimeout(function(){Rt.current.focus()}):Rt.current.focus()}},Ki=function(Wr){var Ii=Di();Wr.target!==Rt.current&&!Ii&&!(Wn==="combobox"&&ar)&&Wr.preventDefault(),(Wn!=="combobox"&&(!Kn||!Ii)||!Pn)&&(Pn&&wr!==!1&&sr("",!0,!1),Pr())},fo={inputRef:Rt,onInputKeyDown:ii,onInputMouseDown:pi,onInputChange:Ei,onInputPaste:ao,onInputCompositionStart:Kr,onInputCompositionEnd:Ni,onInputBlur:qr},bo=Wn==="multiple"||Wn==="tags"?$e.createElement(yo,ue({},ft,fo)):$e.createElement(Gs,ue({},ft,fo));return $e.createElement("div",{ref:vi,className:"".concat(yn,"-selector"),onClick:Hi,onMouseDown:Ki},cr&&$e.createElement("div",{className:"".concat(yn,"-prefix")},cr),bo)},Fa=$e.forwardRef(Ua),Da=Fa,yl=at(98280),fs=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],No=function(ft){var Dt=ft===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Dt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Dt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Dt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Dt,adjustY:1},htmlRegion:"scroll"}}},ea=function(ft,Dt){var Rt=ft.prefixCls,en=ft.disabled,yn=ft.visible,Pn=ft.children,Wn=ft.popupElement,Kn=ft.animation,Yn=ft.transitionName,ar=ft.dropdownStyle,cr=ft.dropdownClassName,wr=ft.direction,sr=wr===void 0?"ltr":wr,lr=ft.placement,Pr=ft.builtinPlacements,br=ft.dropdownMatchSelectWidth,qr=ft.dropdownRender,vi=ft.dropdownAlign,Xr=ft.getPopupContainer,ei=ft.empty,Di=ft.getTriggerDOMNode,or=ft.onPopupVisibleChange,ii=ft.onPopupMouseEnter,pi=et(ft,fs),ci="".concat(Rt,"-dropdown"),Si=Wn;qr&&(Si=qr(Wn));var Kr=$e.useMemo(function(){return Pr||No(br)},[Pr,br]),Ni=Kn?"".concat(ci,"-").concat(Kn):Yn,Ei=typeof br=="number",ao=$e.useMemo(function(){return Ei?null:br===!1?"minWidth":"width"},[br,Ei]),Hi=ar;Ei&&(Hi=Ue(Ue({},Hi),{},{width:br}));var Ki=$e.useRef(null);return $e.useImperativeHandle(Dt,function(){return{getPopupElement:function(){var bo;return(bo=Ki.current)===null||bo===void 0?void 0:bo.popupElement}}}),$e.createElement(yl.Z,ue({},pi,{showAction:or?["click"]:[],hideAction:or?["click"]:[],popupPlacement:lr||(sr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Kr,prefixCls:ci,popupTransitionName:Ni,popup:$e.createElement("div",{onMouseEnter:ii},Si),ref:Ki,stretch:ao,popupAlign:vi,popupVisible:yn,getPopupContainer:Xr,popupClassName:_e()(cr,Ye({},"".concat(ci,"-empty"),ei)),popupStyle:Hi,getTriggerDOMNode:Di,onPopupVisibleChange:or}),Pn)},zr=$e.forwardRef(ea),Tr=zr;function ti(ut){return st(ut)||Le(ut)||De(ut)||gt()}function jn(ut,ft){var Dt=ut.key,Rt;return"value"in ut&&(Rt=ut.value),Dt!=null?Dt:Rt!==void 0?Rt:"rc-index-key-".concat(ft)}function Gi(ut){return typeof ut!="undefined"&&!Number.isNaN(ut)}function So(ut,ft){var Dt=ut||{},Rt=Dt.label,en=Dt.value,yn=Dt.options,Pn=Dt.groupLabel,Wn=Rt||(ft?"children":"label");return{label:Wn,value:en||"value",options:yn||"options",groupLabel:Pn||Wn}}function ta(ut){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Dt=ft.fieldNames,Rt=ft.childrenAsData,en=[],yn=So(Dt,!1),Pn=yn.label,Wn=yn.value,Kn=yn.options,Yn=yn.groupLabel;function ar(cr,wr){Array.isArray(cr)&&cr.forEach(function(sr){if(wr||!(Kn in sr)){var lr=sr[Wn];en.push({key:jn(sr,en.length),groupOption:wr,data:sr,label:sr[Pn],value:lr})}else{var Pr=sr[Yn];Pr===void 0&&Rt&&(Pr=sr.label),en.push({key:jn(sr,en.length),group:!0,data:sr,label:Pr}),ar(sr[Kn],!0)}})}return ar(ut,!1),en}function Oo(ut){var ft=Ue({},ut);return"props"in ft||Object.defineProperty(ft,"props",{get:function(){return rt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ft}}),ft}var Wo=function(ft,Dt,Rt){if(!Dt||!Dt.length)return null;var en=!1,yn=function Wn(Kn,Yn){var ar=ti(Yn),cr=ar[0],wr=ar.slice(1);if(!cr)return[Kn];var sr=Kn.split(cr);return en=en||sr.length>1,sr.reduce(function(lr,Pr){return[].concat(Ae(lr),Ae(Wn(Pr,wr)))},[]).filter(Boolean)},Pn=yn(ft,Dt);return en?typeof Rt!="undefined"?Pn.slice(0,Rt):Pn:null},na=$e.createContext(null),Ya=na;function Ia(ut){var ft=ut.visible,Dt=ut.values;if(!ft)return null;var Rt=50;return $e.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Dt.slice(0,Rt).map(function(en){var yn=en.label,Pn=en.value;return["number","string"].includes(Oe(yn))?yn:Pn}).join(", ")),Dt.length>Rt?", ...":null)}var Ol=["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"],Hl=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],rn=function(ft){return ft==="tags"||ft==="multiple"},us=$e.forwardRef(function(ut,ft){var Dt,Rt=ut.id,en=ut.prefixCls,yn=ut.className,Pn=ut.showSearch,Wn=ut.tagRender,Kn=ut.direction,Yn=ut.omitDomProps,ar=ut.displayValues,cr=ut.onDisplayValuesChange,wr=ut.emptyOptions,sr=ut.notFoundContent,lr=sr===void 0?"Not Found":sr,Pr=ut.onClear,br=ut.mode,qr=ut.disabled,vi=ut.loading,Xr=ut.getInputElement,ei=ut.getRawInputElement,Di=ut.open,or=ut.defaultOpen,ii=ut.onDropdownVisibleChange,pi=ut.activeValue,ci=ut.onActiveValueChange,Si=ut.activeDescendantId,Kr=ut.searchValue,Ni=ut.autoClearSearchValue,Ei=ut.onSearch,ao=ut.onSearchSplit,Hi=ut.tokenSeparators,Ki=ut.allowClear,fo=ut.prefix,bo=ut.suffixIcon,Qi=ut.clearIcon,Wr=ut.OptionList,Ii=ut.animation,Po=ut.transitionName,$i=ut.dropdownStyle,Do=ut.dropdownClassName,_o=ut.dropdownMatchSelectWidth,zo=ut.dropdownRender,Io=ut.dropdownAlign,ia=ut.placement,hs=ut.builtinPlacements,ha=ut.getPopupContainer,gi=ut.showAction,fi=gi===void 0?[]:gi,ui=ut.onFocus,Gr=ut.onBlur,Ur=ut.onKeyUp,di=ut.onKeyDown,Ui=ut.onMouseDown,Co=et(ut,Ol),qi=rn(br),ca=(Pn!==void 0?Pn:qi)||br==="combobox",Ja=Ue({},Co);Hl.forEach(function(Vo){delete Ja[Vo]}),Yn==null||Yn.forEach(function(Vo){delete Ja[Vo]});var Go=$e.useState(!1),os=Et(Go,2),oa=os[0],js=os[1];$e.useEffect(function(){js(Xe())},[]);var Ha=$e.useRef(null),Hs=$e.useRef(null),Qa=$e.useRef(null),Ra=$e.useRef(null),qo=$e.useRef(null),va=$e.useRef(!1),Zl=un(),ul=Et(Zl,3),ys=ul[0],as=ul[1],Jo=ul[2];$e.useImperativeHandle(ft,function(){var Vo,Lo;return{focus:(Vo=Ra.current)===null||Vo===void 0?void 0:Vo.focus,blur:(Lo=Ra.current)===null||Lo===void 0?void 0:Lo.blur,scrollTo:function(es){var ks;return(ks=qo.current)===null||ks===void 0?void 0:ks.scrollTo(es)},nativeElement:Ha.current||Hs.current}});var Ka=$e.useMemo(function(){var Vo;if(br!=="combobox")return Kr;var Lo=(Vo=ar[0])===null||Vo===void 0?void 0:Vo.value;return typeof Lo=="string"||typeof Lo=="number"?String(Lo):""},[Kr,br,ar]),ju=br==="combobox"&&typeof Xr=="function"&&Xr()||null,Ss=typeof ei=="function"&&ei(),ch=jt(Hs,Ss==null||(Dt=Ss.props)===null||Dt===void 0?void 0:Dt.ref),Vt=$e.useState(!1),Jl=Et(Vt,2),Ks=Jl[0],Fu=Jl[1];pt(function(){Fu(!0)},[]);var wu=yt(!1,{defaultValue:or,value:Di}),$a=Et(wu,2),xi=$a[0],Ao=$a[1],Pi=Ks?xi:!1,ss=!lr&&wr;(qr||ss&&Pi&&br==="combobox")&&(Pi=!1);var bl=ss?!1:Pi,Bi=$e.useCallback(function(Vo){var Lo=Vo!==void 0?Vo:!Pi;qr||(Ao(Lo),Pi!==Lo&&(ii==null||ii(Lo)))},[qr,Pi,Ao,ii]),po=$e.useMemo(function(){return(Hi||[]).some(function(Vo){return[`
`,`\r
`].includes(Vo)})},[Hi]),Vi=$e.useContext(Ya)||{},eo=Vi.maxCount,aa=Vi.rawValues,Uo=function(Lo,Pl,es){if(!(qi&&Gi(eo)&&(aa==null?void 0:aa.size)>=eo)){var ks=!0,Vs=Lo;ci==null||ci(null);var $l=Wo(Lo,Hi,Gi(eo)?eo-aa.size:void 0),Cl=es?null:$l;return br!=="combobox"&&Cl&&(Vs="",ao==null||ao(Cl),Bi(!1),ks=!1),Ei&&Ka!==Vs&&Ei(Vs,{source:Pl?"typing":"effect"}),ks}},Ql=function(Lo){!Lo||!Lo.trim()||Ei(Lo,{source:"submit"})};$e.useEffect(function(){!Pi&&!qi&&br!=="combobox"&&Uo("",!1,!1)},[Pi]),$e.useEffect(function(){xi&&qr&&Ao(!1),qr&&!va.current&&as(!1)},[qr]);var bu=mn(),hl=Et(bu,2),xs=hl[0],Du=hl[1],Iu=$e.useRef(!1),cl=function(Lo){var Pl=xs(),es=Lo.key,ks=es==="Enter";if(ks&&(br!=="combobox"&&Lo.preventDefault(),Pi||Bi(!0)),Du(!!Ka),es==="Backspace"&&!Pl&&qi&&!Ka&&ar.length){for(var Vs=Ae(ar),$l=null,Cl=Vs.length-1;Cl>=0;Cl-=1){var ph=Vs[Cl];if(!ph.disabled){Vs.splice(Cl,1),$l=ph;break}}$l&&cr(Vs,{type:"remove",values:[$l]})}for(var El=arguments.length,gh=new Array(El>1?El-1:0),ic=1;ic<El;ic++)gh[ic-1]=arguments[ic];if(Pi&&(!ks||!Iu.current)){var nf;ks&&(Iu.current=!0),(nf=qo.current)===null||nf===void 0||nf.onKeyDown.apply(nf,[Lo].concat(gh))}di==null||di.apply(void 0,[Lo].concat(gh))},zf=function(Lo){for(var Pl=arguments.length,es=new Array(Pl>1?Pl-1:0),ks=1;ks<Pl;ks++)es[ks-1]=arguments[ks];if(Pi){var Vs;(Vs=qo.current)===null||Vs===void 0||Vs.onKeyUp.apply(Vs,[Lo].concat(es))}Lo.key==="Enter"&&(Iu.current=!1),Ur==null||Ur.apply(void 0,[Lo].concat(es))},tc=function(Lo){var Pl=ar.filter(function(es){return es!==Lo});cr(Pl,{type:"remove",values:[Lo]})},ws=function(){Iu.current=!1},jh=$e.useRef(!1),bd=function(){as(!0),qr||(ui&&!jh.current&&ui.apply(void 0,arguments),fi.includes("focus")&&Bi(!0)),jh.current=!0},rp=function(){va.current=!0,as(!1,function(){jh.current=!1,va.current=!1,Bi(!1)}),!qr&&(Ka&&(br==="tags"?Ei(Ka,{source:"submit"}):br==="multiple"&&Ei("",{source:"blur"})),Gr&&Gr.apply(void 0,arguments))},Pu=[];$e.useEffect(function(){return function(){Pu.forEach(function(Vo){return clearTimeout(Vo)}),Pu.splice(0,Pu.length)}},[]);var Il=function(Lo){var Pl,es=Lo.target,ks=(Pl=Qa.current)===null||Pl===void 0?void 0:Pl.getPopupElement();if(ks&&ks.contains(es)){var Vs=setTimeout(function(){var El=Pu.indexOf(Vs);if(El!==-1&&Pu.splice(El,1),Jo(),!oa&&!ks.contains(document.activeElement)){var gh;(gh=Ra.current)===null||gh===void 0||gh.focus()}});Pu.push(Vs)}for(var $l=arguments.length,Cl=new Array($l>1?$l-1:0),ph=1;ph<$l;ph++)Cl[ph-1]=arguments[ph];Ui==null||Ui.apply(void 0,[Lo].concat(Cl))},Pd=$e.useState({}),qa=Et(Pd,2),ef=qa[1];function Uf(){ef({})}var fh;Ss&&(fh=function(Lo){Bi(Lo)}),In(function(){var Vo;return[Ha.current,(Vo=Qa.current)===null||Vo===void 0?void 0:Vo.getPopupElement()]},bl,Bi,!!Ss);var wc=$e.useMemo(function(){return Ue(Ue({},ut),{},{notFoundContent:lr,open:Pi,triggerOpen:bl,id:Rt,showSearch:ca,multiple:qi,toggleOpen:Bi})},[ut,lr,bl,Pi,Rt,ca,qi,Bi]),nc=!!bo||vi,Wf;nc&&(Wf=$e.createElement(an,{className:_e()("".concat(en,"-arrow"),Ye({},"".concat(en,"-arrow-loading"),vi)),customizeIcon:bo,customizeIconProps:{loading:vi,searchValue:Ka,open:Pi,focused:ys,showSearch:ca}}));var bc=function(){var Lo;Pr==null||Pr(),(Lo=Ra.current)===null||Lo===void 0||Lo.focus(),cr([],{type:"clear",values:ar}),Uo("",!1,!1)},Hf=sn(en,bc,ar,Ki,Qi,qr,Ka,br),Ju=Hf.allowClear,rc=Hf.clearIcon,Kf=$e.createElement(Wr,{ref:qo}),Vf=_e()(en,yn,Ye(Ye(Ye(Ye(Ye(Ye(Ye(Ye(Ye(Ye({},"".concat(en,"-focused"),ys),"".concat(en,"-multiple"),qi),"".concat(en,"-single"),!qi),"".concat(en,"-allow-clear"),Ki),"".concat(en,"-show-arrow"),nc),"".concat(en,"-disabled"),qr),"".concat(en,"-loading"),vi),"".concat(en,"-open"),Pi),"".concat(en,"-customize-input"),ju),"".concat(en,"-show-search"),ca)),tf=$e.createElement(Tr,{ref:Qa,disabled:qr,prefixCls:en,visible:bl,popupElement:Kf,animation:Ii,transitionName:Po,dropdownStyle:$i,dropdownClassName:Do,direction:Kn,dropdownMatchSelectWidth:_o,dropdownRender:zo,dropdownAlign:Io,placement:ia,builtinPlacements:hs,getPopupContainer:ha,empty:wr,getTriggerDOMNode:function(Lo){return Hs.current||Lo},onPopupVisibleChange:fh,onPopupMouseEnter:Uf},Ss?$e.cloneElement(Ss,{ref:ch}):$e.createElement(Da,ue({},ut,{domRef:Hs,prefixCls:en,inputElement:ju,ref:Ra,id:Rt,prefix:fo,showSearch:ca,autoClearSearchValue:Ni,mode:br,activeDescendantId:Si,tagRender:Wn,values:ar,open:Pi,onToggleOpen:Bi,activeValue:pi,searchValue:Ka,onSearch:Uo,onSearchSubmit:Ql,onRemove:tc,tokenWithEnter:po,onInputBlur:ws}))),dh;return Ss?dh=tf:dh=$e.createElement("div",ue({className:Vf},Ja,{ref:Ha,onMouseDown:Il,onKeyDown:cl,onKeyUp:zf,onFocus:bd,onBlur:rp}),$e.createElement(Ia,{visible:ys&&!Pi,values:ar}),tf,Wf,Ju&&rc),$e.createElement($t.Provider,{value:wc},dh)}),ol=us,au=function(){return null};au.isSelectOptGroup=!0;var co=au,Sl=function(){return null};Sl.isSelectOption=!0;var jl=Sl;function Kl(ut,ft){var Dt=Ue({},ut);return Array.isArray(ft)&&ft.forEach(function(Rt){delete Dt[Rt]}),Dt}var xo=at(73299);function ma(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var mi=["disabled","title","children","style","className"];function Ai(ut){return typeof ut=="string"||typeof ut=="number"}var Mo=function(ft,Dt){var Rt=On(),en=Rt.prefixCls,yn=Rt.id,Pn=Rt.open,Wn=Rt.multiple,Kn=Rt.mode,Yn=Rt.searchValue,ar=Rt.toggleOpen,cr=Rt.notFoundContent,wr=Rt.onPopupScroll,sr=$e.useContext(Ya),lr=sr.maxCount,Pr=sr.flattenOptions,br=sr.onActiveValue,qr=sr.defaultActiveFirstOption,vi=sr.onSelect,Xr=sr.menuItemSelectedIcon,ei=sr.rawValues,Di=sr.fieldNames,or=sr.virtual,ii=sr.direction,pi=sr.listHeight,ci=sr.listItemHeight,Si=sr.optionRender,Kr="".concat(en,"-item"),Ni=Pt(function(){return Pr},[Pn,Pr],function(gi,fi){return fi[0]&&gi[1]!==fi[1]}),Ei=$e.useRef(null),ao=$e.useMemo(function(){return Wn&&Gi(lr)&&(ei==null?void 0:ei.size)>=lr},[Wn,lr,ei==null?void 0:ei.size]),Hi=function(fi){fi.preventDefault()},Ki=function(fi){var ui;(ui=Ei.current)===null||ui===void 0||ui.scrollTo(typeof fi=="number"?{index:fi}:fi)},fo=$e.useCallback(function(gi){return Kn==="combobox"?!1:ei.has(gi)},[Kn,Ae(ei).toString(),ei.size]),bo=function(fi){for(var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Gr=Ni.length,Ur=0;Ur<Gr;Ur+=1){var di=(fi+Ur*ui+Gr)%Gr,Ui=Ni[di]||{},Co=Ui.group,qi=Ui.data;if(!Co&&!(qi!=null&&qi.disabled)&&(fo(qi.value)||!ao))return di}return-1},Qi=$e.useState(function(){return bo(0)}),Wr=Et(Qi,2),Ii=Wr[0],Po=Wr[1],$i=function(fi){var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Po(fi);var Gr={source:ui?"keyboard":"mouse"},Ur=Ni[fi];if(!Ur){br(null,-1,Gr);return}br(Ur.value,fi,Gr)};(0,$e.useEffect)(function(){$i(qr!==!1?bo(0):-1)},[Ni.length,Yn]);var Do=$e.useCallback(function(gi){return Kn==="combobox"?String(gi).toLowerCase()===Yn.toLowerCase():ei.has(gi)},[Kn,Yn,Ae(ei).toString(),ei.size]);(0,$e.useEffect)(function(){var gi=setTimeout(function(){if(!Wn&&Pn&&ei.size===1){var ui=Array.from(ei)[0],Gr=Ni.findIndex(function(Ur){var di=Ur.data;return di.value===ui});Gr!==-1&&($i(Gr),Ki(Gr))}});if(Pn){var fi;(fi=Ei.current)===null||fi===void 0||fi.scrollTo(void 0)}return function(){return clearTimeout(gi)}},[Pn,Yn]);var _o=function(fi){fi!==void 0&&vi(fi,{selected:!ei.has(fi)}),Wn||ar(!1)};if($e.useImperativeHandle(Dt,function(){return{onKeyDown:function(fi){var ui=fi.which,Gr=fi.ctrlKey;switch(ui){case Dn.N:case Dn.P:case Dn.UP:case Dn.DOWN:{var Ur=0;if(ui===Dn.UP?Ur=-1:ui===Dn.DOWN?Ur=1:ma()&&Gr&&(ui===Dn.N?Ur=1:ui===Dn.P&&(Ur=-1)),Ur!==0){var di=bo(Ii+Ur,Ur);Ki(di),$i(di,!0)}break}case Dn.TAB:case Dn.ENTER:{var Ui,Co=Ni[Ii];Co&&!(Co!=null&&(Ui=Co.data)!==null&&Ui!==void 0&&Ui.disabled)&&!ao?_o(Co.value):_o(void 0),Pn&&fi.preventDefault();break}case Dn.ESC:ar(!1),Pn&&fi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(fi){Ki(fi)}}}),Ni.length===0)return $e.createElement("div",{role:"listbox",id:"".concat(yn,"_list"),className:"".concat(Kr,"-empty"),onMouseDown:Hi},cr);var zo=Object.keys(Di).map(function(gi){return Di[gi]}),Io=function(fi){return fi.label};function ia(gi,fi){var ui=gi.group;return{role:ui?"presentation":"option",id:"".concat(yn,"_list_").concat(fi)}}var hs=function(fi){var ui=Ni[fi];if(!ui)return null;var Gr=ui.data||{},Ur=Gr.value,di=ui.group,Ui=Ji(Gr,!0),Co=Io(ui);return ui?$e.createElement("div",ue({"aria-label":typeof Co=="string"&&!di?Co:null},Ui,{key:fi},ia(ui,fi),{"aria-selected":Do(Ur)}),Ur):null},ha={role:"listbox",id:"".concat(yn,"_list")};return $e.createElement($e.Fragment,null,or&&$e.createElement("div",ue({},ha,{style:{height:0,width:0,overflow:"hidden"}}),hs(Ii-1),hs(Ii),hs(Ii+1)),$e.createElement(xo.Z,{itemKey:"key",ref:Ei,data:Ni,height:pi,itemHeight:ci,fullHeight:!1,onMouseDown:Hi,onScroll:wr,virtual:or,direction:ii,innerProps:or?null:ha},function(gi,fi){var ui=gi.group,Gr=gi.groupOption,Ur=gi.data,di=gi.label,Ui=gi.value,Co=Ur.key;if(ui){var qi,ca=(qi=Ur.title)!==null&&qi!==void 0?qi:Ai(di)?di.toString():void 0;return $e.createElement("div",{className:_e()(Kr,"".concat(Kr,"-group"),Ur.className),title:ca},di!==void 0?di:Co)}var Ja=Ur.disabled,Go=Ur.title,os=Ur.children,oa=Ur.style,js=Ur.className,Ha=et(Ur,mi),Hs=Kl(Ha,zo),Qa=fo(Ui),Ra=Ja||!Qa&&ao,qo="".concat(Kr,"-option"),va=_e()(Kr,qo,js,Ye(Ye(Ye(Ye({},"".concat(qo,"-grouped"),Gr),"".concat(qo,"-active"),Ii===fi&&!Ra),"".concat(qo,"-disabled"),Ra),"".concat(qo,"-selected"),Qa)),Zl=Io(gi),ul=!Xr||typeof Xr=="function"||Qa,ys=typeof Zl=="number"?Zl:Zl||Ui,as=Ai(ys)?ys.toString():void 0;return Go!==void 0&&(as=Go),$e.createElement("div",ue({},Ji(Hs),or?{}:ia(gi,fi),{"aria-selected":Do(Ui),className:va,title:as,onMouseMove:function(){Ii===fi||Ra||$i(fi)},onClick:function(){Ra||_o(Ui)},style:oa}),$e.createElement("div",{className:"".concat(qo,"-content")},typeof Si=="function"?Si(gi,{index:fi}):ys),$e.isValidElement(Xr)||Qa,ul&&$e.createElement(an,{className:"".concat(Kr,"-option-state"),customizeIcon:Xr,customizeIconProps:{value:Ui,disabled:Ra,isSelected:Qa}},Qa?"\u2713":null))}))},Yo=$e.forwardRef(Mo),yr=Yo,Ph=function(ut,ft){var Dt=$e.useRef({values:new Map,options:new Map}),Rt=$e.useMemo(function(){var yn=Dt.current,Pn=yn.values,Wn=yn.options,Kn=ut.map(function(cr){if(cr.label===void 0){var wr;return Ue(Ue({},cr),{},{label:(wr=Pn.get(cr.value))===null||wr===void 0?void 0:wr.label})}return cr}),Yn=new Map,ar=new Map;return Kn.forEach(function(cr){Yn.set(cr.value,cr),ar.set(cr.value,ft.get(cr.value)||Wn.get(cr.value))}),Dt.current.values=Yn,Dt.current.options=ar,Kn},[ut,ft]),en=$e.useCallback(function(yn){return ft.get(yn)||Dt.current.options.get(yn)},[ft]);return[Rt,en]};function Ns(ut,ft){return vo(ut).join("").toUpperCase().includes(ft)}var Vl=function(ut,ft,Dt,Rt,en){return $e.useMemo(function(){if(!Dt||Rt===!1)return ut;var yn=ft.options,Pn=ft.label,Wn=ft.value,Kn=[],Yn=typeof Rt=="function",ar=Dt.toUpperCase(),cr=Yn?Rt:function(sr,lr){return en?Ns(lr[en],ar):lr[yn]?Ns(lr[Pn!=="children"?Pn:"label"],ar):Ns(lr[Wn],ar)},wr=Yn?function(sr){return Oo(sr)}:function(sr){return sr};return ut.forEach(function(sr){if(sr[yn]){var lr=cr(Dt,wr(sr));if(lr)Kn.push(sr);else{var Pr=sr[yn].filter(function(br){return cr(Dt,wr(br))});Pr.length&&Kn.push(Ue(Ue({},sr),{},Ye({},yn,Pr)))}return}cr(Dt,wr(sr))&&Kn.push(sr)}),Kn},[ut,Rt,en,Dt,ft])},Ch=0,Eh=wt();function nr(){var ut;return Eh?(ut=Ch,Ch+=1):ut="TEST_OR_SSR",ut}function ba(ut){var ft=$e.useState(),Dt=Et(ft,2),Rt=Dt[0],en=Dt[1];return $e.useEffect(function(){en("rc_select_".concat(nr()))},[]),ut||Rt}function Ma(ut){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Dt=[];return $e.Children.forEach(ut,function(Rt){Rt==null&&!ft.keepEmpty||(Array.isArray(Rt)?Dt=Dt.concat(Ma(Rt)):(0,lt.isFragment)(Rt)&&Rt.props?Dt=Dt.concat(Ma(Rt.props.children,ft)):Dt.push(Rt))}),Dt}var Xl=["children","value"],Ta=["children"];function ds(ut){var ft=ut,Dt=ft.key,Rt=ft.props,en=Rt.children,yn=Rt.value,Pn=et(Rt,Xl);return Ue({key:Dt,value:yn!==void 0?yn:Dt,children:en},Pn)}function oi(ut){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ma(ut).map(function(Dt,Rt){if(!$e.isValidElement(Dt)||!Dt.type)return null;var en=Dt,yn=en.type.isSelectOptGroup,Pn=en.key,Wn=en.props,Kn=Wn.children,Yn=et(Wn,Ta);return ft||!yn?ds(Dt):Ue(Ue({key:"__RC_SELECT_GRP__".concat(Pn===null?Rt:Pn,"__"),label:Pn},Yn),{},{options:oi(Kn)})}).filter(function(Dt){return Dt})}var vu=function(ft,Dt,Rt,en,yn){return $e.useMemo(function(){var Pn=ft,Wn=!ft;Wn&&(Pn=oi(Dt));var Kn=new Map,Yn=new Map,ar=function(sr,lr,Pr){Pr&&typeof Pr=="string"&&sr.set(lr[Pr],lr)},cr=function wr(sr){for(var lr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pr=0;Pr<sr.length;Pr+=1){var br=sr[Pr];!br[Rt.options]||lr?(Kn.set(br[Rt.value],br),ar(Yn,br,Rt.label),ar(Yn,br,en),ar(Yn,br,yn)):wr(br[Rt.options],!0)}};return cr(Pn),{options:Pn,valueOptions:Kn,labelOptions:Yn}},[ft,Dt,Rt,en,yn])},al=vu;function Ps(ut){var ft=$e.useRef();ft.current=ut;var Dt=$e.useCallback(function(){return ft.current.apply(ft,arguments)},[]);return Dt}function Yl(ut){var ft=ut.mode,Dt=ut.options,Rt=ut.children,en=ut.backfill,yn=ut.allowClear,Pn=ut.placeholder,Wn=ut.getInputElement,Kn=ut.showSearch,Yn=ut.onSearch,ar=ut.defaultOpen,cr=ut.autoFocus,wr=ut.labelInValue,sr=ut.value,lr=ut.inputValue,Pr=ut.optionLabelProp,br=isMultiple(ft),qr=Kn!==void 0?Kn:br||ft==="combobox",vi=Dt||convertChildrenToData(Rt);if(warning(ft!=="tags"||vi.every(function(or){return!or.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ft==="tags"||ft==="combobox"){var Xr=vi.some(function(or){return or.options?or.options.some(function(ii){return typeof("value"in ii?ii.value:ii.key)=="number"}):typeof("value"in or?or.value:or.key)=="number"});warning(!Xr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ft!=="combobox"||!Pr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ft==="combobox"||!en,"`backfill` only works with `combobox` mode."),warning(ft==="combobox"||!Wn,"`getInputElement` only work with `combobox` mode."),noteOnce(ft!=="combobox"||!Wn||!yn||!Pn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Yn&&!qr&&ft!=="combobox"&&ft!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!ar||cr,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),sr!=null){var ei=toArray(sr);warning(!wr||ei.every(function(or){return _typeof(or)==="object"&&("key"in or||"value"in or)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!br||Array.isArray(sr),"`value` should be array when `mode` is `multiple` or `tags`")}if(Rt){var Di=null;toNodeArray(Rt).some(function(or){if(!React.isValidElement(or)||!or.type)return!1;var ii=or,pi=ii.type;if(pi.isSelectOption)return!1;if(pi.isSelectOptGroup){var ci=toNodeArray(or.props.children).every(function(Si){return!React.isValidElement(Si)||!or.type||Si.type.isSelectOption?!0:(Di=Si.type,!1)});return!ci}return Di=pi,!0}),Di&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Di.displayName||Di.name||Di,"`.")),warning(lr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Yh(ut,ft){if(ut){var Dt=function Rt(en){for(var yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pn=0;Pn<en.length;Pn++){var Wn=en[Pn];if(Wn[ft==null?void 0:ft.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!yn&&Array.isArray(Wn[ft==null?void 0:ft.options])&&Rt(Wn[ft==null?void 0:ft.options],!0))break}};Dt(ut)}}var yc=null,Fl=["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"],yu=["inputValue"];function Xc(ut){return!ut||Oe(ut)!=="object"}var gd=$e.forwardRef(function(ut,ft){var Dt=ut.id,Rt=ut.mode,en=ut.prefixCls,yn=en===void 0?"rc-select":en,Pn=ut.backfill,Wn=ut.fieldNames,Kn=ut.inputValue,Yn=ut.searchValue,ar=ut.onSearch,cr=ut.autoClearSearchValue,wr=cr===void 0?!0:cr,sr=ut.onSelect,lr=ut.onDeselect,Pr=ut.dropdownMatchSelectWidth,br=Pr===void 0?!0:Pr,qr=ut.filterOption,vi=ut.filterSort,Xr=ut.optionFilterProp,ei=ut.optionLabelProp,Di=ut.options,or=ut.optionRender,ii=ut.children,pi=ut.defaultActiveFirstOption,ci=ut.menuItemSelectedIcon,Si=ut.virtual,Kr=ut.direction,Ni=ut.listHeight,Ei=Ni===void 0?200:Ni,ao=ut.listItemHeight,Hi=ao===void 0?20:ao,Ki=ut.labelRender,fo=ut.value,bo=ut.defaultValue,Qi=ut.labelInValue,Wr=ut.onChange,Ii=ut.maxCount,Po=et(ut,Fl),$i=ba(Dt),Do=rn(Rt),_o=!!(!Di&&ii),zo=$e.useMemo(function(){return qr===void 0&&Rt==="combobox"?!1:qr},[qr,Rt]),Io=$e.useMemo(function(){return So(Wn,_o)},[JSON.stringify(Wn),_o]),ia=yt("",{value:Yn!==void 0?Yn:Kn,postState:function(po){return po||""}}),hs=Et(ia,2),ha=hs[0],gi=hs[1],fi=al(Di,ii,Io,Xr,ei),ui=fi.valueOptions,Gr=fi.labelOptions,Ur=fi.options,di=$e.useCallback(function(Bi){var po=vo(Bi);return po.map(function(Vi){var eo,aa,Uo,Ql,bu;if(Xc(Vi))eo=Vi;else{var hl;Uo=Vi.key,aa=Vi.label,eo=(hl=Vi.value)!==null&&hl!==void 0?hl:Uo}var xs=ui.get(eo);if(xs){var Du;if(aa===void 0&&(aa=xs==null?void 0:xs[ei||Io.label]),Uo===void 0&&(Uo=(Du=xs==null?void 0:xs.key)!==null&&Du!==void 0?Du:eo),Ql=xs==null?void 0:xs.disabled,bu=xs==null?void 0:xs.title,0)var Iu}return{label:aa,value:eo,key:Uo,disabled:Ql,title:bu}})},[Io,ei,ui]),Ui=yt(bo,{value:fo}),Co=Et(Ui,2),qi=Co[0],ca=Co[1],Ja=$e.useMemo(function(){var Bi,po=Do&&qi===null?[]:qi,Vi=di(po);return Rt==="combobox"&&cn((Bi=Vi[0])===null||Bi===void 0?void 0:Bi.value)?[]:Vi},[qi,di,Rt,Do]),Go=Ph(Ja,ui),os=Et(Go,2),oa=os[0],js=os[1],Ha=$e.useMemo(function(){if(!Rt&&oa.length===1){var Bi=oa[0];if(Bi.value===null&&(Bi.label===null||Bi.label===void 0))return[]}return oa.map(function(po){var Vi;return Ue(Ue({},po),{},{label:(Vi=typeof Ki=="function"?Ki(po):po.label)!==null&&Vi!==void 0?Vi:po.value})})},[Rt,oa,Ki]),Hs=$e.useMemo(function(){return new Set(oa.map(function(Bi){return Bi.value}))},[oa]);$e.useEffect(function(){if(Rt==="combobox"){var Bi,po=(Bi=oa[0])===null||Bi===void 0?void 0:Bi.value;gi(Jt(po)?String(po):"")}},[oa]);var Qa=Ps(function(Bi,po){var Vi=po!=null?po:Bi;return Ye(Ye({},Io.value,Bi),Io.label,Vi)}),Ra=$e.useMemo(function(){if(Rt!=="tags")return Ur;var Bi=Ae(Ur),po=function(eo){return ui.has(eo)};return Ae(oa).sort(function(Vi,eo){return Vi.value<eo.value?-1:1}).forEach(function(Vi){var eo=Vi.value;po(eo)||Bi.push(Qa(eo,Vi.label))}),Bi},[Qa,Ur,ui,oa,Rt]),qo=Vl(Ra,Io,ha,zo,Xr),va=$e.useMemo(function(){return Rt!=="tags"||!ha||qo.some(function(Bi){return Bi[Xr||"value"]===ha})||qo.some(function(Bi){return Bi[Io.value]===ha})?qo:[Qa(ha)].concat(Ae(qo))},[Qa,Xr,Rt,qo,ha,Io]),Zl=function Bi(po){var Vi=Ae(po).sort(function(eo,aa){return vi(eo,aa,{searchValue:ha})});return Vi.map(function(eo){return Array.isArray(eo.options)?Ue(Ue({},eo),{},{options:eo.options.length>0?Bi(eo.options):eo.options}):eo})},ul=$e.useMemo(function(){return vi?Zl(va):va},[va,vi,ha]),ys=$e.useMemo(function(){return ta(ul,{fieldNames:Io,childrenAsData:_o})},[ul,Io,_o]),as=function(po){var Vi=di(po);if(ca(Vi),Wr&&(Vi.length!==oa.length||Vi.some(function(Uo,Ql){var bu;return((bu=oa[Ql])===null||bu===void 0?void 0:bu.value)!==(Uo==null?void 0:Uo.value)}))){var eo=Qi?Vi:Vi.map(function(Uo){return Uo.value}),aa=Vi.map(function(Uo){return Oo(js(Uo.value))});Wr(Do?eo:eo[0],Do?aa:aa[0])}},Jo=$e.useState(null),Ka=Et(Jo,2),ju=Ka[0],Ss=Ka[1],ch=$e.useState(0),Vt=Et(ch,2),Jl=Vt[0],Ks=Vt[1],Fu=pi!==void 0?pi:Rt!=="combobox",wu=$e.useCallback(function(Bi,po){var Vi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},eo=Vi.source,aa=eo===void 0?"keyboard":eo;Ks(po),Pn&&Rt==="combobox"&&Bi!==null&&aa==="keyboard"&&Ss(String(Bi))},[Pn,Rt]),$a=function(po,Vi,eo){var aa=function(){var tc,ws=js(po);return[Qi?{label:ws==null?void 0:ws[Io.label],value:po,key:(tc=ws==null?void 0:ws.key)!==null&&tc!==void 0?tc:po}:po,Oo(ws)]};if(Vi&&sr){var Uo=aa(),Ql=Et(Uo,2),bu=Ql[0],hl=Ql[1];sr(bu,hl)}else if(!Vi&&lr&&eo!=="clear"){var xs=aa(),Du=Et(xs,2),Iu=Du[0],cl=Du[1];lr(Iu,cl)}},xi=Ps(function(Bi,po){var Vi,eo=Do?po.selected:!0;eo?Vi=Do?[].concat(Ae(oa),[Bi]):[Bi]:Vi=oa.filter(function(aa){return aa.value!==Bi}),as(Vi),$a(Bi,eo),Rt==="combobox"?Ss(""):(!rn||wr)&&(gi(""),Ss(""))}),Ao=function(po,Vi){as(po);var eo=Vi.type,aa=Vi.values;(eo==="remove"||eo==="clear")&&aa.forEach(function(Uo){$a(Uo.value,!1,eo)})},Pi=function(po,Vi){if(gi(po),Ss(null),Vi.source==="submit"){var eo=(po||"").trim();if(eo){var aa=Array.from(new Set([].concat(Ae(Hs),[eo])));as(aa),$a(eo,!0),gi("")}return}Vi.source!=="blur"&&(Rt==="combobox"&&as(po),ar==null||ar(po))},ss=function(po){var Vi=po;Rt!=="tags"&&(Vi=po.map(function(aa){var Uo=Gr.get(aa);return Uo==null?void 0:Uo.value}).filter(function(aa){return aa!==void 0}));var eo=Array.from(new Set([].concat(Ae(Hs),Ae(Vi))));as(eo),eo.forEach(function(aa){$a(aa,!0)})},bl=$e.useMemo(function(){var Bi=Si!==!1&&br!==!1;return Ue(Ue({},fi),{},{flattenOptions:ys,onActiveValue:wu,defaultActiveFirstOption:Fu,onSelect:xi,menuItemSelectedIcon:ci,rawValues:Hs,fieldNames:Io,virtual:Bi,direction:Kr,listHeight:Ei,listItemHeight:Hi,childrenAsData:_o,maxCount:Ii,optionRender:or})},[Ii,fi,ys,wu,Fu,xi,ci,Hs,Io,Si,br,Kr,Ei,Hi,_o,or]);return $e.createElement(Ya.Provider,{value:bl},$e.createElement(ol,ue({},Po,{id:$i,prefixCls:yn,ref:ft,omitDomProps:yu,mode:Rt,displayValues:Ha,onDisplayValuesChange:Ao,direction:Kr,searchValue:ha,onSearch:Pi,autoClearSearchValue:wr,onSearchSplit:ss,dropdownMatchSelectWidth:br,OptionList:yr,emptyOptions:!ys.length,activeValue:ju,activeDescendantId:"".concat($i,"_list_").concat(Jl)})))}),Yc=gd;Yc.Option=jl,Yc.OptGroup=co;var $d=null,md=null;function Vu(ut){var ft=$e.useRef();ft.current=ut;var Dt=$e.useCallback(function(){for(var Rt,en=arguments.length,yn=new Array(en),Pn=0;Pn<en;Pn++)yn[Pn]=arguments[Pn];return(Rt=ft.current)===null||Rt===void 0?void 0:Rt.call.apply(Rt,[ft].concat(yn))},[]);return Dt}function kh(ut){if(Array.isArray(ut))return ut}function Su(ut,ft){var Dt=ut==null?null:typeof Symbol!="undefined"&&ut[Symbol.iterator]||ut["@@iterator"];if(Dt!=null){var Rt,en,yn,Pn,Wn=[],Kn=!0,Yn=!1;try{if(yn=(Dt=Dt.call(ut)).next,ft===0){if(Object(Dt)!==Dt)return;Kn=!1}else for(;!(Kn=(Rt=yn.call(Dt)).done)&&(Wn.push(Rt.value),Wn.length!==ft);Kn=!0);}catch(ar){Yn=!0,en=ar}finally{try{if(!Kn&&Dt.return!=null&&(Pn=Dt.return(),Object(Pn)!==Pn))return}finally{if(Yn)throw en}}return Wn}}function Zc(ut,ft){(ft==null||ft>ut.length)&&(ft=ut.length);for(var Dt=0,Rt=new Array(ft);Dt<ft;Dt++)Rt[Dt]=ut[Dt];return Rt}function Tf(ut,ft){if(ut){if(typeof ut=="string")return Zc(ut,ft);var Dt=Object.prototype.toString.call(ut).slice(8,-1);if(Dt==="Object"&&ut.constructor&&(Dt=ut.constructor.name),Dt==="Map"||Dt==="Set")return Array.from(ut);if(Dt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Dt))return Zc(ut,ft)}}function vd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ba(ut,ft){return kh(ut)||Su(ut,ft)||Tf(ut,ft)||vd()}function qd(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Lf=qd()?$e.useLayoutEffect:$e.useEffect,Jc=function(ft,Dt){var Rt=$e.useRef(!0);Lf(function(){return ft(Rt.current)},Dt),Lf(function(){return Rt.current=!1,function(){Rt.current=!0}},[])},Zh=function(ft,Dt){Jc(function(Rt){if(!Rt)return ft()},Dt)},xl=null;function zs(ut){var ft=$e.useRef(!1),Dt=$e.useState(ut),Rt=Ba(Dt,2),en=Rt[0],yn=Rt[1];$e.useEffect(function(){return ft.current=!1,function(){ft.current=!0}},[]);function Pn(Wn,Kn){Kn&&ft.current||yn(Wn)}return[en,Pn]}function is(ut){return ut!==void 0}function ps(ut,ft){var Dt=ft||{},Rt=Dt.defaultValue,en=Dt.value,yn=Dt.onChange,Pn=Dt.postState,Wn=zs(function(){return is(en)?en:is(Rt)?typeof Rt=="function"?Rt():Rt:typeof ut=="function"?ut():ut}),Kn=Ba(Wn,2),Yn=Kn[0],ar=Kn[1],cr=en!==void 0?en:Yn,wr=Pn?Pn(cr):cr,sr=Vu(yn),lr=zs([cr]),Pr=Ba(lr,2),br=Pr[0],qr=Pr[1];Zh(function(){var Xr=br[0];Yn!==Xr&&sr(Yn,Xr)},[br]),Zh(function(){is(en)||ar(en)},[en]);var vi=Vu(function(Xr,ei){ar(Xr,ei),qr([cr],ei)});return[wr,vi]}var Af=$e.createContext({}),Xu=Af,ua="__rc_cascader_search_mark__",Nf=function(ft,Dt,Rt){var en=Rt.label,yn=en===void 0?"":en;return Dt.some(function(Pn){return String(Pn[yn]).toLowerCase().includes(ft.toLowerCase())})},Of=function(ft,Dt,Rt,en){return Dt.map(function(yn){return yn[en.label]}).join(" / ")},jf=function(ft,Dt,Rt,en,yn,Pn){var Wn=yn.filter,Kn=Wn===void 0?Nf:Wn,Yn=yn.render,ar=Yn===void 0?Of:Yn,cr=yn.limit,wr=cr===void 0?50:cr,sr=yn.sort;return $e.useMemo(function(){var lr=[];if(!ft)return[];function Pr(br,qr){var vi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;br.forEach(function(Xr){if(!(!sr&&wr!==!1&&wr>0&&lr.length>=wr)){var ei=[].concat(xe(qr),[Xr]),Di=Xr[Rt.children],or=vi||Xr.disabled;if((!Di||Di.length===0||Pn)&&Kn(ft,ei,{label:Rt.label})){var ii;lr.push(de(de({},Xr),{},(ii={disabled:or},Ie(ii,Rt.label,ar(ft,ei,en,Rt)),Ie(ii,ua,ei),Ie(ii,Rt.children,void 0),ii)))}Di&&Pr(Xr[Rt.children],ei,or)}})}return Pr(Dt,[]),sr&&lr.sort(function(br,qr){return sr(br[ua],qr[ua],ft,Rt)}),wr!==!1&&wr>0?lr.slice(0,wr):lr},[ft,Dt,Rt,en,ar,Pn,Kn,sr,wr])},Br=jf,Qc="__RC_CASCADER_SPLIT__",Wt="SHOW_PARENT",An="SHOW_CHILD";function xu(ut){return ut.join(Qc)}function Jh(ut){return ut.map(xu)}function sh(ut){return ut.split(Qc)}function Yu(ut){var ft=ut||{},Dt=ft.label,Rt=ft.value,en=ft.children,yn=Rt||"value";return{label:Dt||"label",value:yn,key:yn,children:en||"children"}}function Ou(ut,ft){var Dt,Rt;return(Dt=ut.isLeaf)!==null&&Dt!==void 0?Dt:!((Rt=ut[ft.children])!==null&&Rt!==void 0&&Rt.length)}function Ff(ut){var ft=ut.parentElement;if(ft){var Dt=ut.offsetTop-ft.offsetTop;Dt-ft.scrollTop<0?ft.scrollTo({top:Dt}):Dt+ut.offsetHeight-ft.scrollTop>ft.offsetHeight&&ft.scrollTo({top:Dt+ut.offsetHeight-ft.offsetHeight})}}function Sc(ut,ft){return ut.map(function(Dt){var Rt;return(Rt=Dt[ua])===null||Rt===void 0?void 0:Rt.map(function(en){return en[ft.value]})})}function Pa(ut){return Array.isArray(ut)&&Array.isArray(ut[0])}function ni(ut){return ut?Pa(ut)?ut:(ut.length===0?[]:[ut]).map(function(ft){return Array.isArray(ft)?ft:[ft]}):[]}function Us(ut,ft,Dt){var Rt=new Set(ut),en=ft();return ut.filter(function(yn){var Pn=en[yn],Wn=Pn?Pn.parent:null,Kn=Pn?Pn.children:null;return Pn&&Pn.node.disabled?!0:Dt===An?!(Kn&&Kn.some(function(Yn){return Yn.key&&Rt.has(Yn.key)})):!(Wn&&!Wn.node.disabled&&Rt.has(Wn.key))})}function Os(ut,ft,Dt){for(var Rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,en=ft,yn=[],Pn=function(){var Yn,ar,cr,wr=ut[Wn],sr=(Yn=en)===null||Yn===void 0?void 0:Yn.findIndex(function(Pr){var br=Pr[Dt.value];return Rt?String(br)===String(wr):br===wr}),lr=sr!==-1?(ar=en)===null||ar===void 0?void 0:ar[sr]:null;yn.push({value:(cr=lr==null?void 0:lr[Dt.value])!==null&&cr!==void 0?cr:wr,index:sr,option:lr}),en=lr==null?void 0:lr[Dt.children]},Wn=0;Wn<ut.length;Wn+=1)Pn();return yn}var Ca=function(ut,ft,Dt,Rt,en){return $e.useMemo(function(){var yn=en||function(Pn){var Wn=Rt?Pn.slice(-1):Pn,Kn=" / ";return Wn.every(function(Yn){return["string","number"].includes(_t(Yn))})?Wn.join(Kn):Wn.reduce(function(Yn,ar,cr){var wr=$e.isValidElement(ar)?$e.cloneElement(ar,{key:cr}):ar;return cr===0?[wr]:[].concat(xe(Yn),[Kn,wr])},[])};return ut.map(function(Pn){var Wn,Kn=Os(Pn,ft,Dt),Yn=yn(Kn.map(function(cr){var wr,sr=cr.option,lr=cr.value;return(wr=sr==null?void 0:sr[Dt.label])!==null&&wr!==void 0?wr:lr}),Kn.map(function(cr){var wr=cr.option;return wr})),ar=xu(Pn);return{label:Yn,value:ar,key:ar,valueCells:Pn,disabled:(Wn=Kn[Kn.length-1])===null||Wn===void 0||(Wn=Wn.option)===null||Wn===void 0?void 0:Wn.disabled}})},[ut,ft,Dt,en,Rt])};function Wi(ut,ft){return $e.useCallback(function(Dt){var Rt=[],en=[];return Dt.forEach(function(yn){var Pn=Os(yn,ut,ft);Pn.every(function(Wn){return Wn.option})?en.push(yn):Rt.push(yn)}),[en,Rt]},[ut,ft])}var Za=at(1089),wl=function(ut,ft){var Dt=$e.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),Rt=$e.useCallback(function(){return Dt.current.options!==ut&&(Dt.current.options=ut,Dt.current.info=(0,Za.I8)(ut,{fieldNames:ft,initWrapper:function(yn){return de(de({},yn),{},{pathKeyEntities:{}})},processEntity:function(yn,Pn){var Wn=yn.nodes.map(function(Kn){return Kn[ft.value]}).join(Qc);Pn.pathKeyEntities[Wn]=yn,yn.key=Wn}})),Dt.current.info.pathKeyEntities},[ft,ut]);return Rt};function $o(ut,ft){var Dt=$e.useMemo(function(){return ft||[]},[ft]),Rt=wl(Dt,ut),en=$e.useCallback(function(yn){var Pn=Rt();return yn.map(function(Wn){var Kn=Pn[Wn].nodes;return Kn.map(function(Yn){return Yn[ut.value]})})},[Rt,ut]);return[Dt,Rt,en]}var sl={},gs=[],Mh=function(ft){gs.push(ft)};function To(ut,ft){if(0)var Dt}function ll(ut,ft){if(0)var Dt}function wo(){sl={}}function Zo(ut,ft,Dt){!ft&&!sl[Dt]&&(ut(!1,Dt),sl[Dt]=!0)}function ra(ut,ft){Zo(To,ut,ft)}function La(ut,ft){Zo(ll,ut,ft)}ra.preMessage=Mh,ra.resetWarned=wo,ra.noteOnce=La;var jo=null;function Qh(ut){return $e.useMemo(function(){if(!ut)return[!1,{}];var ft={matchInputWidth:!0,limit:50};return ut&&_t(ut)==="object"&&(ft=de(de({},ft),ut)),ft.limit<=0&&(ft.limit=!1),[!0,ft]},[ut])}var $r=at(17341);function yd(ut,ft,Dt,Rt,en,yn,Pn,Wn){return function(Kn){if(!ut)ft(Kn);else{var Yn=xu(Kn),ar=Jh(Dt),cr=Jh(Rt),wr=ar.includes(Yn),sr=en.some(function(or){return xu(or)===Yn}),lr=Dt,Pr=en;if(sr&&!wr)Pr=en.filter(function(or){return xu(or)!==Yn});else{var br=wr?ar.filter(function(or){return or!==Yn}):[].concat(xe(ar),[Yn]),qr=yn(),vi;if(wr){var Xr=(0,$r.S)(br,{checked:!1,halfCheckedKeys:cr},qr);vi=Xr.checkedKeys}else{var ei=(0,$r.S)(br,!0,qr);vi=ei.checkedKeys}var Di=Us(vi,yn,Wn);lr=Pn(Di)}ft([].concat(xe(Pr),xe(lr)))}}}function ho(ut,ft,Dt,Rt,en){return $e.useMemo(function(){var yn=en(ft),Pn=oe(yn,2),Wn=Pn[0],Kn=Pn[1];if(!ut||!ft.length)return[Wn,[],Kn];var Yn=Jh(Wn),ar=Dt(),cr=(0,$r.S)(Yn,!0,ar),wr=cr.checkedKeys,sr=cr.halfCheckedKeys;return[Rt(wr),Rt(sr),Kn]},[ut,ft,Dt,Rt,en])}var ep=$e.memo(function(ut){var ft=ut.children;return ft},function(ut,ft){return!ft.open}),xc=ep;function $c(ut){var ft,Dt=ut.prefixCls,Rt=ut.checked,en=ut.halfChecked,yn=ut.disabled,Pn=ut.onClick,Wn=ut.disableCheckbox,Kn=$e.useContext(Xu),Yn=Kn.checkable,ar=typeof Yn!="boolean"?Yn:null;return $e.createElement("span",{className:_e()("".concat(Dt),(ft={},Ie(ft,"".concat(Dt,"-checked"),Rt),Ie(ft,"".concat(Dt,"-indeterminate"),!Rt&&en),Ie(ft,"".concat(Dt,"-disabled"),yn||Wn),ft)),onClick:Pn},ar)}var Df="__cascader_fix_label__";function If(ut){var ft=ut.prefixCls,Dt=ut.multiple,Rt=ut.options,en=ut.activeValue,yn=ut.prevValuePath,Pn=ut.onToggleOpen,Wn=ut.onSelect,Kn=ut.onActive,Yn=ut.checkedSet,ar=ut.halfCheckedSet,cr=ut.loadingKeys,wr=ut.isSelectable,sr=ut.disabled,lr="".concat(ft,"-menu"),Pr="".concat(ft,"-menu-item"),br=$e.useContext(Xu),qr=br.fieldNames,vi=br.changeOnSelect,Xr=br.expandTrigger,ei=br.expandIcon,Di=br.loadingIcon,or=br.dropdownMenuColumnStyle,ii=br.optionRender,pi=Xr==="hover",ci=function(Ni){return sr||Ni},Si=$e.useMemo(function(){return Rt.map(function(Kr){var Ni,Ei=Kr.disabled,ao=Kr.disableCheckbox,Hi=Kr[ua],Ki=(Ni=Kr[Df])!==null&&Ni!==void 0?Ni:Kr[qr.label],fo=Kr[qr.value],bo=Ou(Kr,qr),Qi=Hi?Hi.map(function(Do){return Do[qr.value]}):[].concat(xe(yn),[fo]),Wr=xu(Qi),Ii=cr.includes(Wr),Po=Yn.has(Wr),$i=ar.has(Wr);return{disabled:Ei,label:Ki,value:fo,isLeaf:bo,isLoading:Ii,checked:Po,halfChecked:$i,option:Kr,disableCheckbox:ao,fullPath:Qi,fullPathKey:Wr}})},[Rt,Yn,qr,ar,cr,yn]);return $e.createElement("ul",{className:lr,role:"menu"},Si.map(function(Kr){var Ni,Ei=Kr.disabled,ao=Kr.label,Hi=Kr.value,Ki=Kr.isLeaf,fo=Kr.isLoading,bo=Kr.checked,Qi=Kr.halfChecked,Wr=Kr.option,Ii=Kr.fullPath,Po=Kr.fullPathKey,$i=Kr.disableCheckbox,Do=function(){if(!ci(Ei)){var ia=xe(Ii);pi&&Ki&&ia.pop(),Kn(ia)}},_o=function(){wr(Wr)&&!ci(Ei)&&Wn(Ii,Ki)},zo;return typeof Wr.title=="string"?zo=Wr.title:typeof ao=="string"&&(zo=ao),$e.createElement("li",{key:Po,className:_e()(Pr,(Ni={},Ie(Ni,"".concat(Pr,"-expand"),!Ki),Ie(Ni,"".concat(Pr,"-active"),en===Hi||en===Po),Ie(Ni,"".concat(Pr,"-disabled"),ci(Ei)),Ie(Ni,"".concat(Pr,"-loading"),fo),Ni)),style:or,role:"menuitemcheckbox",title:zo,"aria-checked":bo,"data-path-key":Po,onClick:function(){Do(),!$i&&(!Dt||Ki)&&_o()},onDoubleClick:function(){vi&&Pn(!1)},onMouseEnter:function(){pi&&Do()},onMouseDown:function(ia){ia.preventDefault()}},Dt&&$e.createElement($c,{prefixCls:"".concat(ft,"-checkbox"),checked:bo,halfChecked:Qi,disabled:ci(Ei)||$i,disableCheckbox:$i,onClick:function(ia){$i||(ia.stopPropagation(),_o())}}),$e.createElement("div",{className:"".concat(Pr,"-content")},ii?ii(Wr):ao),!fo&&ei&&!Ki&&$e.createElement("div",{className:"".concat(Pr,"-expand-icon")},ei),fo&&Di&&$e.createElement("div",{className:"".concat(Pr,"-loading-icon")},Di))}))}var lh=function(ft,Dt){var Rt=$e.useContext(Xu),en=Rt.values,yn=en[0],Pn=$e.useState([]),Wn=oe(Pn,2),Kn=Wn[0],Yn=Wn[1];return $e.useEffect(function(){ft||Yn(yn||[])},[Dt,yn]),[Kn,Yn]},$h=lh,Fr={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(ft){var Dt=ft.keyCode;if(ft.altKey&&!ft.ctrlKey||ft.metaKey||Dt>=Fr.F1&&Dt<=Fr.F12)return!1;switch(Dt){case Fr.ALT:case Fr.CAPS_LOCK:case Fr.CONTEXT_MENU:case Fr.CTRL:case Fr.DOWN:case Fr.END:case Fr.ESC:case Fr.HOME:case Fr.INSERT:case Fr.LEFT:case Fr.MAC_FF_META:case Fr.META:case Fr.NUMLOCK:case Fr.NUM_CENTER:case Fr.PAGE_DOWN:case Fr.PAGE_UP:case Fr.PAUSE:case Fr.PRINT_SCREEN:case Fr.RIGHT:case Fr.SHIFT:case Fr.UP:case Fr.WIN_KEY:case Fr.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(ft){if(ft>=Fr.ZERO&&ft<=Fr.NINE||ft>=Fr.NUM_ZERO&&ft<=Fr.NUM_MULTIPLY||ft>=Fr.A&&ft<=Fr.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&ft===0)return!0;switch(ft){case Fr.SPACE:case Fr.QUESTION_MARK:case Fr.NUM_PLUS:case Fr.NUM_MINUS:case Fr.NUM_PERIOD:case Fr.NUM_DIVISION:case Fr.SEMICOLON:case Fr.DASH:case Fr.EQUALS:case Fr.COMMA:case Fr.PERIOD:case Fr.SLASH:case Fr.APOSTROPHE:case Fr.SINGLE_QUOTE:case Fr.OPEN_SQUARE_BRACKET:case Fr.BACKSLASH:case Fr.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ws=Fr,Bf=function(ut,ft,Dt,Rt,en,yn,Pn){var Wn=Pn.direction,Kn=Pn.searchValue,Yn=Pn.toggleOpen,ar=Pn.open,cr=Wn==="rtl",wr=$e.useMemo(function(){for(var or=-1,ii=ft,pi=[],ci=[],Si=Rt.length,Kr=Sc(ft,Dt),Ni=function(fo){var bo=ii.findIndex(function(Qi,Wr){return(Kr[Wr]?xu(Kr[Wr]):Qi[Dt.value])===Rt[fo]});if(bo===-1)return 1;or=bo,pi.push(or),ci.push(Rt[fo]),ii=ii[or][Dt.children]},Ei=0;Ei<Si&&ii&&!Ni(Ei);Ei+=1);for(var ao=ft,Hi=0;Hi<pi.length-1;Hi+=1)ao=ao[pi[Hi]][Dt.children];return[ci,or,ao,Kr]},[Rt,Dt,ft]),sr=oe(wr,4),lr=sr[0],Pr=sr[1],br=sr[2],qr=sr[3],vi=function(ii){en(ii)},Xr=function(ii){var pi=br.length,ci=Pr;ci===-1&&ii<0&&(ci=pi);for(var Si=0;Si<pi;Si+=1){ci=(ci+ii+pi)%pi;var Kr=br[ci];if(Kr&&!Kr.disabled){var Ni=lr.slice(0,-1).concat(qr[ci]?xu(qr[ci]):Kr[Dt.value]);vi(Ni);return}}},ei=function(){if(lr.length>1){var ii=lr.slice(0,-1);vi(ii)}else Yn(!1)},Di=function(){var ii,pi=((ii=br[Pr])===null||ii===void 0?void 0:ii[Dt.children])||[],ci=pi.find(function(Kr){return!Kr.disabled});if(ci){var Si=[].concat(xe(lr),[ci[Dt.value]]);vi(Si)}};$e.useImperativeHandle(ut,function(){return{onKeyDown:function(ii){var pi=ii.which;switch(pi){case Ws.UP:case Ws.DOWN:{var ci=0;pi===Ws.UP?ci=-1:pi===Ws.DOWN&&(ci=1),ci!==0&&Xr(ci);break}case Ws.LEFT:{if(Kn)break;cr?Di():ei();break}case Ws.RIGHT:{if(Kn)break;cr?ei():Di();break}case Ws.BACKSPACE:{Kn||ei();break}case Ws.ENTER:{if(lr.length){var Si=br[Pr],Kr=(Si==null?void 0:Si[ua])||[];Kr.length?yn(Kr.map(function(Ni){return Ni[Dt.value]}),Kr[Kr.length-1]):yn(lr,br[Pr])}break}case Ws.ESC:Yn(!1),ar&&ii.stopPropagation()}},onKeyUp:function(){}}})},qh=$e.forwardRef(function(ut,ft){var Dt,Rt,en,yn=ut.prefixCls,Pn=ut.multiple,Wn=ut.searchValue,Kn=ut.toggleOpen,Yn=ut.notFoundContent,ar=ut.direction,cr=ut.open,wr=ut.disabled,sr=$e.useRef(null),lr=ar==="rtl",Pr=$e.useContext(Xu),br=Pr.options,qr=Pr.values,vi=Pr.halfValues,Xr=Pr.fieldNames,ei=Pr.changeOnSelect,Di=Pr.onSelect,or=Pr.searchOptions,ii=Pr.dropdownPrefixCls,pi=Pr.loadData,ci=Pr.expandTrigger,Si=ii||yn,Kr=$e.useState([]),Ni=oe(Kr,2),Ei=Ni[0],ao=Ni[1],Hi=function(Gr){if(!(!pi||Wn)){var Ur=Os(Gr,br,Xr),di=Ur.map(function(qi){var ca=qi.option;return ca}),Ui=di[di.length-1];if(Ui&&!Ou(Ui,Xr)){var Co=xu(Gr);ao(function(qi){return[].concat(xe(qi),[Co])}),pi(di)}}};$e.useEffect(function(){Ei.length&&Ei.forEach(function(ui){var Gr=sh(ui),Ur=Os(Gr,br,Xr,!0).map(function(Ui){var Co=Ui.option;return Co}),di=Ur[Ur.length-1];(!di||di[Xr.children]||Ou(di,Xr))&&ao(function(Ui){return Ui.filter(function(Co){return Co!==ui})})})},[br,Ei,Xr]);var Ki=$e.useMemo(function(){return new Set(Jh(qr))},[qr]),fo=$e.useMemo(function(){return new Set(Jh(vi))},[vi]),bo=$h(Pn,cr),Qi=oe(bo,2),Wr=Qi[0],Ii=Qi[1],Po=function(Gr){Ii(Gr),Hi(Gr)},$i=function(Gr){if(wr)return!1;var Ur=Gr.disabled,di=Ou(Gr,Xr);return!Ur&&(di||ei||Pn)},Do=function(Gr,Ur){var di=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Di(Gr),!Pn&&(Ur||ei&&(ci==="hover"||di))&&Kn(!1)},_o=$e.useMemo(function(){return Wn?or:br},[Wn,or,br]),zo=$e.useMemo(function(){for(var ui=[{options:_o}],Gr=_o,Ur=Sc(Gr,Xr),di=function(){var qi=Wr[Ui],ca=Gr.find(function(Go,os){return(Ur[os]?xu(Ur[os]):Go[Xr.value])===qi}),Ja=ca==null?void 0:ca[Xr.children];if(!(Ja!=null&&Ja.length))return 1;Gr=Ja,ui.push({options:Ja})},Ui=0;Ui<Wr.length&&!di();Ui+=1);return ui},[_o,Wr,Xr]),Io=function(Gr,Ur){$i(Ur)&&Do(Gr,Ou(Ur,Xr),!0)};Bf(ft,_o,Xr,Wr,Po,Io,{direction:ar,searchValue:Wn,toggleOpen:Kn,open:cr}),$e.useEffect(function(){if(!Wn)for(var ui=0;ui<Wr.length;ui+=1){var Gr,Ur=Wr.slice(0,ui+1),di=xu(Ur),Ui=(Gr=sr.current)===null||Gr===void 0?void 0:Gr.querySelector('li[data-path-key="'.concat(di.replace(/\\{0,2}"/g,'\\"'),'"]'));Ui&&Ff(Ui)}},[Wr,Wn]);var ia=!((Dt=zo[0])!==null&&Dt!==void 0&&(Dt=Dt.options)!==null&&Dt!==void 0&&Dt.length),hs=[(Rt={},Ie(Rt,Xr.value,"__EMPTY__"),Ie(Rt,Df,Yn),Ie(Rt,"disabled",!0),Rt)],ha=de(de({},ut),{},{multiple:!ia&&Pn,onSelect:Do,onActive:Po,onToggleOpen:Kn,checkedSet:Ki,halfCheckedSet:fo,loadingKeys:Ei,isSelectable:$i}),gi=ia?[{options:hs}]:zo,fi=gi.map(function(ui,Gr){var Ur=Wr.slice(0,Gr),di=Wr[Gr];return $e.createElement(If,ot({key:Gr},ha,{prefixCls:Si,options:ui.options,prevValuePath:Ur,activeValue:di}))});return $e.createElement(xc,{open:cr},$e.createElement("div",{className:_e()("".concat(Si,"-menus"),(en={},Ie(en,"".concat(Si,"-menu-empty"),ia),Ie(en,"".concat(Si,"-rtl"),lr),en)),ref:sr},fi))}),Rf=qh,uh=$e.forwardRef(function(ut,ft){var Dt=On();return $e.createElement(Rf,ot({},ut,Dt,{ref:ft}))}),su=uh,ec=at(80705);function Zu(ut,ft,Dt){var Rt=React.useRef({});return(!("value"in Rt.current)||Dt(Rt.current.condition,ft))&&(Rt.current.value=ut(),Rt.current.condition=ft),Rt.current.value}var Th=Symbol.for("react.element"),_f=Symbol.for("react.transitional.element"),Sd=Symbol.for("react.fragment");function tp(ut){return ut&&_typeof(ut)==="object"&&(ut.$$typeof===Th||ut.$$typeof===_f)&&ut.type===Sd}var np=Number($e.version.split(".")[0]),Lh=function(ft,Dt){typeof ft=="function"?ft(Dt):_typeof(ft)==="object"&&ft&&"current"in ft&&(ft.current=Dt)},Ah=function(){for(var ft=arguments.length,Dt=new Array(ft),Rt=0;Rt<ft;Rt++)Dt[Rt]=arguments[Rt];var en=Dt.filter(Boolean);return en.length<=1?en[0]:function(yn){Dt.forEach(function(Pn){Lh(Pn,yn)})}},am=function(){for(var ft=arguments.length,Dt=new Array(ft),Rt=0;Rt<ft;Rt++)Dt[Rt]=arguments[Rt];return useMemo(function(){return Ah.apply(void 0,Dt)},Dt,function(en,yn){return en.length!==yn.length||en.every(function(Pn,Wn){return Pn!==yn[Wn]})})},Jp=function(ft){var Dt,Rt;if(!ft)return!1;if(xd(ft)&&np>=19)return!0;var en=isMemo(ft)?ft.type.type:ft.type;return!(typeof en=="function"&&!((Dt=en.prototype)!==null&&Dt!==void 0&&Dt.render)&&en.$$typeof!==ForwardRef||typeof ft=="function"&&!((Rt=ft.prototype)!==null&&Rt!==void 0&&Rt.render)&&ft.$$typeof!==ForwardRef)};function xd(ut){return isValidElement(ut)&&!isFragment(ut)}var Qp=function(ft){return xd(ft)&&Jp(ft)},Wa=function(ft){if(ft&&xd(ft)){var Dt=ft;return Dt.props.propertyIsEnumerable("ref")?Dt.props.ref:Dt.ref}return null};function hh(ut,ft,Dt,Rt){if(!ft.length)return Dt;var en=_toArray(ft),yn=en[0],Pn=en.slice(1),Wn;return!ut&&typeof yn=="number"?Wn=[]:Array.isArray(ut)?Wn=_toConsumableArray(ut):Wn=_objectSpread({},ut),Rt&&Dt===void 0&&Pn.length===1?delete Wn[yn][Pn[0]]:Wn[yn]=hh(Wn[yn],Pn,Dt,Rt),Wn}function Ro(ut,ft,Dt){var Rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return ft.length&&Rt&&Dt===void 0&&!get(ut,ft.slice(0,-1))?ut:hh(ut,ft,Dt,Rt)}function ms(ut){return _typeof(ut)==="object"&&ut!==null&&Object.getPrototypeOf(ut)===Object.prototype}function vs(ut){return Array.isArray(ut)?[]:{}}var Cs=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function qc(){for(var ut=arguments.length,ft=new Array(ut),Dt=0;Dt<ut;Dt++)ft[Dt]=arguments[Dt];var Rt=vs(ft[0]);return ft.forEach(function(en){function yn(Pn,Wn){var Kn=new Set(Wn),Yn=get(en,Pn),ar=Array.isArray(Yn);if(ar||ms(Yn)){if(!Kn.has(Yn)){Kn.add(Yn);var cr=get(Rt,Pn);ar?Rt=Ro(Rt,Pn,[]):(!cr||_typeof(cr)!=="object")&&(Rt=Ro(Rt,Pn,vs(Yn))),Cs(Yn).forEach(function(wr){yn([].concat(_toConsumableArray(Pn),[wr]),Kn)})}}else Rt=Ro(Rt,Pn,Yn)}yn([])}),Rt}function Es(){}function Nh(ut){var ft,Dt=ut,Rt=Dt.prefixCls,en=Rt===void 0?"rc-cascader":Rt,yn=Dt.style,Pn=Dt.className,Wn=Dt.options,Kn=Dt.checkable,Yn=Dt.defaultValue,ar=Dt.value,cr=Dt.fieldNames,wr=Dt.changeOnSelect,sr=Dt.onChange,lr=Dt.showCheckedStrategy,Pr=Dt.loadData,br=Dt.expandTrigger,qr=Dt.expandIcon,vi=qr===void 0?">":qr,Xr=Dt.loadingIcon,ei=Dt.direction,Di=Dt.notFoundContent,or=Di===void 0?"Not Found":Di,ii=Dt.disabled,pi=!!Kn,ci=ps(Yn,{value:ar,postState:ni}),Si=oe(ci,2),Kr=Si[0],Ni=Si[1],Ei=$e.useMemo(function(){return Yu(cr)},[JSON.stringify(cr)]),ao=$o(Ei,Wn),Hi=oe(ao,3),Ki=Hi[0],fo=Hi[1],bo=Hi[2],Qi=Wi(Ki,Ei),Wr=ho(pi,Kr,fo,bo,Qi),Ii=oe(Wr,3),Po=Ii[0],$i=Ii[1],Do=Ii[2],_o=Vu(function(gi){if(Ni(gi),sr){var fi=ni(gi),ui=fi.map(function(di){return Os(di,Ki,Ei).map(function(Ui){return Ui.option})}),Gr=pi?fi:fi[0],Ur=pi?ui:ui[0];sr(Gr,Ur)}}),zo=yd(pi,_o,Po,$i,Do,fo,bo,lr),Io=Vu(function(gi){zo(gi)}),ia=$e.useMemo(function(){return{options:Ki,fieldNames:Ei,values:Po,halfValues:$i,changeOnSelect:wr,onSelect:Io,checkable:Kn,searchOptions:[],dropdownPrefixCls:void 0,loadData:Pr,expandTrigger:br,expandIcon:vi,loadingIcon:Xr,dropdownMenuColumnStyle:void 0}},[Ki,Ei,Po,$i,wr,Io,Kn,Pr,br,vi,Xr]),hs="".concat(en,"-panel"),ha=!Ki.length;return $e.createElement(Xu.Provider,{value:ia},$e.createElement("div",{className:_e()(hs,(ft={},Ie(ft,"".concat(hs,"-rtl"),ei==="rtl"),Ie(ft,"".concat(hs,"-empty"),ha),ft),Pn),style:yn},ha?or:$e.createElement(Rf,{prefixCls:en,searchValue:"",multiple:pi,toggleOpen:Es,open:!0,direction:ei,disabled:ii})))}function $p(ut){var ft=ut.onPopupVisibleChange,Dt=ut.popupVisible,Rt=ut.popupClassName,en=ut.popupPlacement;warning(!ft,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Dt===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(Rt===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(en===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function qp(ut,ft){if(ut){var Dt=function Rt(en){for(var yn=0;yn<en.length;yn++){var Pn=en[yn];if(Pn[ft==null?void 0:ft.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Pn[ft==null?void 0:ft.children])&&Rt(Pn[ft==null?void 0:ft.children]))return!0}};Dt(ut)}}var Dl=null,Gf=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],Ho=$e.forwardRef(function(ut,ft){var Dt=ut.id,Rt=ut.prefixCls,en=Rt===void 0?"rc-cascader":Rt,yn=ut.fieldNames,Pn=ut.defaultValue,Wn=ut.value,Kn=ut.changeOnSelect,Yn=ut.onChange,ar=ut.displayRender,cr=ut.checkable,wr=ut.autoClearSearchValue,sr=wr===void 0?!0:wr,lr=ut.searchValue,Pr=ut.onSearch,br=ut.showSearch,qr=ut.expandTrigger,vi=ut.options,Xr=ut.dropdownPrefixCls,ei=ut.loadData,Di=ut.popupVisible,or=ut.open,ii=ut.popupClassName,pi=ut.dropdownClassName,ci=ut.dropdownMenuColumnStyle,Si=ut.dropdownStyle,Kr=ut.popupPlacement,Ni=ut.placement,Ei=ut.onDropdownVisibleChange,ao=ut.onPopupVisibleChange,Hi=ut.expandIcon,Ki=Hi===void 0?">":Hi,fo=ut.loadingIcon,bo=ut.children,Qi=ut.dropdownMatchSelectWidth,Wr=Qi===void 0?!1:Qi,Ii=ut.showCheckedStrategy,Po=Ii===void 0?Wt:Ii,$i=ut.optionRender,Do=le(ut,Gf),_o=ba(Dt),zo=!!cr,Io=ps(Pn,{value:Wn,postState:ni}),ia=oe(Io,2),hs=ia[0],ha=ia[1],gi=$e.useMemo(function(){return Yu(yn)},[JSON.stringify(yn)]),fi=$o(gi,vi),ui=oe(fi,3),Gr=ui[0],Ur=ui[1],di=ui[2],Ui=ps("",{value:lr,postState:function(xi){return xi||""}}),Co=oe(Ui,2),qi=Co[0],ca=Co[1],Ja=function(xi,Ao){ca(xi),Ao.source!=="blur"&&Pr&&Pr(xi)},Go=Qh(br),os=oe(Go,2),oa=os[0],js=os[1],Ha=Br(qi,Gr,gi,Xr||en,js,Kn||zo),Hs=Wi(Gr,gi),Qa=ho(zo,hs,Ur,di,Hs),Ra=oe(Qa,3),qo=Ra[0],va=Ra[1],Zl=Ra[2],ul=$e.useMemo(function(){var $a=Jh(qo),xi=Us($a,Ur,Po);return[].concat(xe(Zl),xe(di(xi)))},[qo,Ur,di,Zl,Po]),ys=Ca(ul,Gr,gi,zo,ar),as=Vu(function($a){if(ha($a),Yn){var xi=ni($a),Ao=xi.map(function(bl){return Os(bl,Gr,gi).map(function(Bi){return Bi.option})}),Pi=zo?xi:xi[0],ss=zo?Ao:Ao[0];Yn(Pi,ss)}}),Jo=yd(zo,as,qo,va,Zl,Ur,di,Po),Ka=Vu(function($a){(!zo||sr)&&ca(""),Jo($a)}),ju=function(xi,Ao){if(Ao.type==="clear"){as([]);return}var Pi=Ao.values[0],ss=Pi.valueCells;Ka(ss)},Ss=or!==void 0?or:Di,ch=pi||ii,Vt=Ni||Kr,Jl=function(xi){Ei==null||Ei(xi),ao==null||ao(xi)},Ks=$e.useMemo(function(){return{options:Gr,fieldNames:gi,values:qo,halfValues:va,changeOnSelect:Kn,onSelect:Ka,checkable:cr,searchOptions:Ha,dropdownPrefixCls:Xr,loadData:ei,expandTrigger:qr,expandIcon:Ki,loadingIcon:fo,dropdownMenuColumnStyle:ci,optionRender:$i}},[Gr,gi,qo,va,Kn,Ka,cr,Ha,Xr,ei,qr,Ki,fo,ci,$i]),Fu=!(qi?Ha:Gr).length,wu=qi&&js.matchInputWidth||Fu?{}:{minWidth:"auto"};return $e.createElement(Xu.Provider,{value:Ks},$e.createElement(ol,ot({},Do,{ref:ft,id:_o,prefixCls:en,autoClearSearchValue:sr,dropdownMatchSelectWidth:Wr,dropdownStyle:de(de({},wu),Si),displayValues:ys,onDisplayValuesChange:ju,mode:zo?"multiple":void 0,searchValue:qi,onSearch:Ja,showSearch:oa,OptionList:su,emptyOptions:Fu,open:Ss,dropdownClassName:ch,placement:Vt,onDropdownVisibleChange:Jl,getRawInputElement:function(){return bo}})))});Ho.SHOW_PARENT=Wt,Ho.SHOW_CHILD=An,Ho.Panel=Nh;var Oh=Ho,wd=Oh},42767:function(dn,pn){"use strict";var at;var ot=typeof Symbol=="function"&&Symbol.for,_t=ot?Symbol.for("react.element"):60103,ae=ot?Symbol.for("react.portal"):60106,Ge=ot?Symbol.for("react.fragment"):60107,Ie=ot?Symbol.for("react.strict_mode"):60108,me=ot?Symbol.for("react.profiler"):60114,de=ot?Symbol.for("react.provider"):60109,Ee=ot?Symbol.for("react.context"):60110,we=ot?Symbol.for("react.async_mode"):60111,be=ot?Symbol.for("react.concurrent_mode"):60111,Te=ot?Symbol.for("react.forward_ref"):60112,ve=ot?Symbol.for("react.suspense"):60113,xe=ot?Symbol.for("react.suspense_list"):60120,fe=ot?Symbol.for("react.memo"):60115,z=ot?Symbol.for("react.lazy"):60116,ee=ot?Symbol.for("react.block"):60121,oe=ot?Symbol.for("react.fundamental"):60117,ie=ot?Symbol.for("react.responder"):60118,le=ot?Symbol.for("react.scope"):60119;function ue(Se){if(typeof Se=="object"&&Se!==null){var Le=Se.$$typeof;switch(Le){case _t:switch(Se=Se.type,Se){case we:case be:case Ge:case me:case Ie:case ve:return Se;default:switch(Se=Se&&Se.$$typeof,Se){case Ee:case Te:case z:case fe:case de:return Se;default:return Le}}case ae:return Le}}}function pe(Se){return ue(Se)===be}at=we,at=be,at=Ee,at=de,at=_t,at=Te,at=Ge,at=z,at=fe,at=ae,at=me,at=Ie,at=ve,at=function(Se){return pe(Se)||ue(Se)===we},at=pe,at=function(Se){return ue(Se)===Ee},at=function(Se){return ue(Se)===de},at=function(Se){return typeof Se=="object"&&Se!==null&&Se.$$typeof===_t},at=function(Se){return ue(Se)===Te},pn.isFragment=function(Se){return ue(Se)===Ge},at=function(Se){return ue(Se)===z},at=function(Se){return ue(Se)===fe},at=function(Se){return ue(Se)===ae},at=function(Se){return ue(Se)===me},at=function(Se){return ue(Se)===Ie},at=function(Se){return ue(Se)===ve},at=function(Se){return typeof Se=="string"||typeof Se=="function"||Se===Ge||Se===be||Se===me||Se===Ie||Se===ve||Se===xe||typeof Se=="object"&&Se!==null&&(Se.$$typeof===z||Se.$$typeof===fe||Se.$$typeof===de||Se.$$typeof===Ee||Se.$$typeof===Te||Se.$$typeof===oe||Se.$$typeof===ie||Se.$$typeof===le||Se.$$typeof===ee)},at=ue},16357:function(dn,pn,at){"use strict";dn.exports=at(42767)},16404:function(dn,pn){"use strict";var at;var ot=Symbol.for("react.element"),_t=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),Ie=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),de=Symbol.for("react.context"),Ee=Symbol.for("react.server_context"),we=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),fe=Symbol.for("react.offscreen"),z;z=Symbol.for("react.module.reference");function ee(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case ot:switch(oe=oe.type,oe){case ae:case Ie:case Ge:case be:case Te:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case Ee:case de:case we:case xe:case ve:case me:return oe;default:return ie}}case _t:return ie}}}at=de,at=me,at=ot,at=we,at=ae,at=xe,at=ve,at=_t,at=Ie,at=Ge,at=be,at=Te,at=function(){return!1},at=function(){return!1},at=function(oe){return ee(oe)===de},at=function(oe){return ee(oe)===me},at=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===ot},at=function(oe){return ee(oe)===we},at=function(oe){return ee(oe)===ae},at=function(oe){return ee(oe)===xe},at=function(oe){return ee(oe)===ve},at=function(oe){return ee(oe)===_t},at=function(oe){return ee(oe)===Ie},at=function(oe){return ee(oe)===Ge},at=function(oe){return ee(oe)===be},at=function(oe){return ee(oe)===Te},at=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===ae||oe===Ie||oe===Ge||oe===be||oe===Te||oe===fe||typeof oe=="object"&&oe!==null&&(oe.$$typeof===xe||oe.$$typeof===ve||oe.$$typeof===me||oe.$$typeof===de||oe.$$typeof===we||oe.$$typeof===z||oe.getModuleId!==void 0)},at=ee},80705:function(dn,pn,at){"use strict";at(16404)},3510:function(dn,pn,at){"use strict";at.r(pn),at.d(pn,{Panel:function(){return We},default:function(){return Ye}});var ot=at(87462),_t=at(74902),ae=at(97685),Ge=at(71002),Ie=at(94184),me=at.n(Ie),de=at(21770),Ee=at(80334),we=at(67294),be=at(45987),Te=at(50344),ve=at(1413),xe=at(4942),fe=at(62874),z=at(15105),ee=we.forwardRef(function(Ue,st){var dt=Ue.prefixCls,gt=Ue.forceRender,Et=Ue.className,Ke=Ue.style,et=Ue.children,$e=Ue.isActive,vt=Ue.role,wt=Ue.classNames,ht=Ue.styles,pt=we.useState($e||gt),ct=(0,ae.Z)(pt,2),Ct=ct[0],xt=ct[1];return we.useEffect(function(){(gt||$e)&&xt(!0)},[gt,$e]),Ct?we.createElement("div",{ref:st,className:me()("".concat(dt,"-content"),(0,xe.Z)((0,xe.Z)({},"".concat(dt,"-content-active"),$e),"".concat(dt,"-content-inactive"),!$e),Et),style:Ke,role:vt},we.createElement("div",{className:me()("".concat(dt,"-content-box"),wt==null?void 0:wt.body),style:ht==null?void 0:ht.body},et)):null});ee.displayName="PanelContent";var oe=ee,ie=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],le=we.forwardRef(function(Ue,st){var dt=Ue.showArrow,gt=dt===void 0?!0:dt,Et=Ue.headerClass,Ke=Ue.isActive,et=Ue.onItemClick,$e=Ue.forceRender,vt=Ue.className,wt=Ue.classNames,ht=wt===void 0?{}:wt,pt=Ue.styles,ct=pt===void 0?{}:pt,Ct=Ue.prefixCls,xt=Ue.collapsible,yt=Ue.accordion,Tt=Ue.panelKey,St=Ue.extra,nt=Ue.header,Qe=Ue.expandIcon,Ce=Ue.openMotion,Ne=Ue.destroyInactivePanel,Je=Ue.children,rt=(0,be.Z)(Ue,ie),Be=xt==="disabled",_e=St!=null&&typeof St!="boolean",Xe=(0,xe.Z)((0,xe.Z)((0,xe.Z)({onClick:function(){et==null||et(Tt)},onKeyDown:function(ln){(ln.key==="Enter"||ln.keyCode===z.Z.ENTER||ln.which===z.Z.ENTER)&&(et==null||et(Tt))},role:yt?"tab":"button"},"aria-expanded",Ke),"aria-disabled",Be),"tabIndex",Be?-1:0),lt=typeof Qe=="function"?Qe(Ue):we.createElement("i",{className:"arrow"}),Pt=lt&&we.createElement("div",(0,ot.Z)({className:"".concat(Ct,"-expand-icon")},["header","icon"].includes(xt)?Xe:{}),lt),kt=me()("".concat(Ct,"-item"),(0,xe.Z)((0,xe.Z)({},"".concat(Ct,"-item-active"),Ke),"".concat(Ct,"-item-disabled"),Be),vt),zt=me()(Et,"".concat(Ct,"-header"),(0,xe.Z)({},"".concat(Ct,"-collapsible-").concat(xt),!!xt),ht.header),jt=(0,ve.Z)({className:zt,style:ct.header},["header","icon"].includes(xt)?{}:Xe);return we.createElement("div",(0,ot.Z)({},rt,{ref:st,className:kt}),we.createElement("div",jt,gt&&Pt,we.createElement("span",(0,ot.Z)({className:"".concat(Ct,"-header-text")},xt==="header"?Xe:{}),nt),_e&&we.createElement("div",{className:"".concat(Ct,"-extra")},St)),we.createElement(fe.Z,(0,ot.Z)({visible:Ke,leavedClassName:"".concat(Ct,"-content-hidden")},Ce,{forceRender:$e,removeOnLeave:Ne}),function(Ht,ln){var an=Ht.className,sn=Ht.style;return we.createElement(oe,{ref:ln,prefixCls:Ct,className:an,classNames:ht,style:sn,styles:ct,isActive:Ke,forceRender:$e,role:yt?"tabpanel":void 0},Je)}))}),ue=le,pe=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Se=function(st,dt){var gt=dt.prefixCls,Et=dt.accordion,Ke=dt.collapsible,et=dt.destroyInactivePanel,$e=dt.onItemClick,vt=dt.activeKey,wt=dt.openMotion,ht=dt.expandIcon;return st.map(function(pt,ct){var Ct=pt.children,xt=pt.label,yt=pt.key,Tt=pt.collapsible,St=pt.onItemClick,nt=pt.destroyInactivePanel,Qe=(0,be.Z)(pt,pe),Ce=String(yt!=null?yt:ct),Ne=Tt!=null?Tt:Ke,Je=nt!=null?nt:et,rt=function(Xe){Ne!=="disabled"&&($e(Xe),St==null||St(Xe))},Be=!1;return Et?Be=vt[0]===Ce:Be=vt.indexOf(Ce)>-1,we.createElement(ue,(0,ot.Z)({},Qe,{prefixCls:gt,key:Ce,panelKey:Ce,isActive:Be,accordion:Et,openMotion:wt,expandIcon:ht,header:xt,collapsible:Ne,onItemClick:rt,destroyInactivePanel:Je}),Ct)})},Le=function(st,dt,gt){if(!st)return null;var Et=gt.prefixCls,Ke=gt.accordion,et=gt.collapsible,$e=gt.destroyInactivePanel,vt=gt.onItemClick,wt=gt.activeKey,ht=gt.openMotion,pt=gt.expandIcon,ct=st.key||String(dt),Ct=st.props,xt=Ct.header,yt=Ct.headerClass,Tt=Ct.destroyInactivePanel,St=Ct.collapsible,nt=Ct.onItemClick,Qe=!1;Ke?Qe=wt[0]===ct:Qe=wt.indexOf(ct)>-1;var Ce=St!=null?St:et,Ne=function(Be){Ce!=="disabled"&&(vt(Be),nt==null||nt(Be))},Je={key:ct,panelKey:ct,header:xt,headerClass:yt,isActive:Qe,prefixCls:Et,destroyInactivePanel:Tt!=null?Tt:$e,openMotion:ht,accordion:Ke,children:st.props.children,onItemClick:Ne,expandIcon:pt,collapsible:Ce};return typeof st.type=="string"?st:(Object.keys(Je).forEach(function(rt){typeof Je[rt]=="undefined"&&delete Je[rt]}),we.cloneElement(st,Je))};function De(Ue,st,dt){return Array.isArray(Ue)?Se(Ue,dt):(0,Te.Z)(st).map(function(gt,Et){return Le(gt,Et,dt)})}var Fe=De,Ae=at(64217);function Oe(Ue){var st=Ue;if(!Array.isArray(st)){var dt=(0,Ge.Z)(st);st=dt==="number"||dt==="string"?[st]:[]}return st.map(function(gt){return String(gt)})}var ze=we.forwardRef(function(Ue,st){var dt=Ue.prefixCls,gt=dt===void 0?"rc-collapse":dt,Et=Ue.destroyInactivePanel,Ke=Et===void 0?!1:Et,et=Ue.style,$e=Ue.accordion,vt=Ue.className,wt=Ue.children,ht=Ue.collapsible,pt=Ue.openMotion,ct=Ue.expandIcon,Ct=Ue.activeKey,xt=Ue.defaultActiveKey,yt=Ue.onChange,Tt=Ue.items,St=me()(gt,vt),nt=(0,de.Z)([],{value:Ct,onChange:function(_e){return yt==null?void 0:yt(_e)},defaultValue:xt,postState:Oe}),Qe=(0,ae.Z)(nt,2),Ce=Qe[0],Ne=Qe[1],Je=function(_e){return Ne(function(){if($e)return Ce[0]===_e?[]:[_e];var Xe=Ce.indexOf(_e),lt=Xe>-1;return lt?Ce.filter(function(Pt){return Pt!==_e}):[].concat((0,_t.Z)(Ce),[_e])})};(0,Ee.ZP)(!wt,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var rt=Fe(Tt,wt,{prefixCls:gt,accordion:$e,openMotion:pt,expandIcon:ct,collapsible:ht,destroyInactivePanel:Ke,onItemClick:Je,activeKey:Ce});return we.createElement("div",(0,ot.Z)({ref:st,className:St,style:et,role:$e?"tablist":void 0},(0,Ae.Z)(Ue,{aria:!0,data:!0})),rt)}),He=Object.assign(ze,{Panel:ue}),Ye=He,We=He.Panel},42289:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return bs}});function ot(Xt){"@babel/helpers - typeof";return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Jt){return typeof Jt}:function(Jt){return Jt&&typeof Symbol=="function"&&Jt.constructor===Symbol&&Jt!==Symbol.prototype?"symbol":typeof Jt},ot(Xt)}function _t(Xt,Jt){if(ot(Xt)!="object"||!Xt)return Xt;var cn=Xt[Symbol.toPrimitive];if(cn!==void 0){var Fn=cn.call(Xt,Jt||"default");if(ot(Fn)!="object")return Fn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Jt==="string"?String:Number)(Xt)}function ae(Xt){var Jt=_t(Xt,"string");return ot(Jt)=="symbol"?Jt:Jt+""}function Ge(Xt,Jt,cn){return(Jt=ae(Jt))in Xt?Object.defineProperty(Xt,Jt,{value:cn,enumerable:!0,configurable:!0,writable:!0}):Xt[Jt]=cn,Xt}function Ie(Xt,Jt){var cn=Object.keys(Xt);if(Object.getOwnPropertySymbols){var Fn=Object.getOwnPropertySymbols(Xt);Jt&&(Fn=Fn.filter(function(pr){return Object.getOwnPropertyDescriptor(Xt,pr).enumerable})),cn.push.apply(cn,Fn)}return cn}function me(Xt){for(var Jt=1;Jt<arguments.length;Jt++){var cn=arguments[Jt]!=null?arguments[Jt]:{};Jt%2?Ie(Object(cn),!0).forEach(function(Fn){Ge(Xt,Fn,cn[Fn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Xt,Object.getOwnPropertyDescriptors(cn)):Ie(Object(cn)).forEach(function(Fn){Object.defineProperty(Xt,Fn,Object.getOwnPropertyDescriptor(cn,Fn))})}return Xt}function de(Xt){if(Array.isArray(Xt))return Xt}function Ee(Xt,Jt){var cn=Xt==null?null:typeof Symbol!="undefined"&&Xt[Symbol.iterator]||Xt["@@iterator"];if(cn!=null){var Fn,pr,li,Zr,Vn=[],Mt=!0,yo=!1;try{if(li=(cn=cn.call(Xt)).next,Jt===0){if(Object(cn)!==cn)return;Mt=!1}else for(;!(Mt=(Fn=li.call(cn)).done)&&(Vn.push(Fn.value),Vn.length!==Jt);Mt=!0);}catch(za){yo=!0,pr=za}finally{try{if(!Mt&&cn.return!=null&&(Zr=cn.return(),Object(Zr)!==Zr))return}finally{if(yo)throw pr}}return Vn}}function we(Xt,Jt){(Jt==null||Jt>Xt.length)&&(Jt=Xt.length);for(var cn=0,Fn=Array(Jt);cn<Jt;cn++)Fn[cn]=Xt[cn];return Fn}function be(Xt,Jt){if(Xt){if(typeof Xt=="string")return we(Xt,Jt);var cn={}.toString.call(Xt).slice(8,-1);return cn==="Object"&&Xt.constructor&&(cn=Xt.constructor.name),cn==="Map"||cn==="Set"?Array.from(Xt):cn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(cn)?we(Xt,Jt):void 0}}function Te(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(Xt,Jt){return de(Xt)||Ee(Xt,Jt)||be(Xt,Jt)||Te()}function xe(Xt){if(Array.isArray(Xt))return Xt}function fe(Xt,Jt){var cn=Xt==null?null:typeof Symbol!="undefined"&&Xt[Symbol.iterator]||Xt["@@iterator"];if(cn!=null){var Fn,pr,li,Zr,Vn=[],Mt=!0,yo=!1;try{if(li=(cn=cn.call(Xt)).next,Jt===0){if(Object(cn)!==cn)return;Mt=!1}else for(;!(Mt=(Fn=li.call(cn)).done)&&(Vn.push(Fn.value),Vn.length!==Jt);Mt=!0);}catch(za){yo=!0,pr=za}finally{try{if(!Mt&&cn.return!=null&&(Zr=cn.return(),Object(Zr)!==Zr))return}finally{if(yo)throw pr}}return Vn}}function z(Xt,Jt){(Jt==null||Jt>Xt.length)&&(Jt=Xt.length);for(var cn=0,Fn=new Array(Jt);cn<Jt;cn++)Fn[cn]=Xt[cn];return Fn}function ee(Xt,Jt){if(Xt){if(typeof Xt=="string")return z(Xt,Jt);var cn=Object.prototype.toString.call(Xt).slice(8,-1);if(cn==="Object"&&Xt.constructor&&(cn=Xt.constructor.name),cn==="Map"||cn==="Set")return Array.from(Xt);if(cn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(cn))return z(Xt,Jt)}}function oe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ie(Xt,Jt){return xe(Xt)||fe(Xt,Jt)||ee(Xt,Jt)||oe()}var le=at(67294),ue=at(73935);function pe(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Se={};function Le(Xt,Jt){}function De(Xt,Jt){}function Fe(){Se={}}function Ae(Xt,Jt,cn){!Jt&&!Se[cn]&&(Xt(!1,cn),Se[cn]=!0)}function Oe(Xt,Jt){Ae(Le,Xt,Jt)}function ze(Xt,Jt){Ae(De,Xt,Jt)}var He=null;function Ye(Xt){"@babel/helpers - typeof";return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Jt){return typeof Jt}:function(Jt){return Jt&&typeof Symbol=="function"&&Jt.constructor===Symbol&&Jt!==Symbol.prototype?"symbol":typeof Jt},Ye(Xt)}var We=at(18459);function Ue(Xt,Jt,cn){var Fn=le.useRef({});return(!("value"in Fn.current)||cn(Fn.current.condition,Jt))&&(Fn.current.value=Xt(),Fn.current.condition=Jt),Fn.current.value}function st(Xt,Jt){typeof Xt=="function"?Xt(Jt):Ye(Xt)==="object"&&Xt&&"current"in Xt&&(Xt.current=Jt)}function dt(){for(var Xt=arguments.length,Jt=new Array(Xt),cn=0;cn<Xt;cn++)Jt[cn]=arguments[cn];var Fn=Jt.filter(function(pr){return pr});return Fn.length<=1?Fn[0]:function(pr){Jt.forEach(function(li){st(li,pr)})}}function gt(){for(var Xt=arguments.length,Jt=new Array(Xt),cn=0;cn<Xt;cn++)Jt[cn]=arguments[cn];return Ue(function(){return dt.apply(void 0,Jt)},Jt,function(Fn,pr){return Fn.length===pr.length&&Fn.every(function(li,Zr){return li===pr[Zr]})})}function Et(Xt){var Jt,cn,Fn=(0,We.isMemo)(Xt)?Xt.type.type:Xt.type;return!(typeof Fn=="function"&&!((Jt=Fn.prototype)!==null&&Jt!==void 0&&Jt.render)||typeof Xt=="function"&&!((cn=Xt.prototype)!==null&&cn!==void 0&&cn.render))}var Ke=le.createContext(null),et=Ke;function $e(Xt){if(Array.isArray(Xt))return z(Xt)}function vt(Xt){if(typeof Symbol!="undefined"&&Xt[Symbol.iterator]!=null||Xt["@@iterator"]!=null)return Array.from(Xt)}function wt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ht(Xt){return $e(Xt)||vt(Xt)||ee(Xt)||wt()}var pt=pe()?le.useLayoutEffect:le.useEffect,ct=pt,Ct=function(Jt,cn){var Fn=React.useRef(!0);pt(function(){if(!Fn.current)return Jt()},cn),pt(function(){return Fn.current=!1,function(){Fn.current=!0}},[])},xt=[];function yt(Xt,Jt){var cn=le.useState(function(){if(!pe())return null;var Da=document.createElement("div");return Da}),Fn=ie(cn,1),pr=Fn[0],li=le.useRef(!1),Zr=le.useContext(et),Vn=le.useState(xt),Mt=ie(Vn,2),yo=Mt[0],za=Mt[1],Gs=Zr||(li.current?void 0:function(Da){za(function(yl){var fs=[Da].concat(ht(yl));return fs})});function Ua(){pr.parentElement||document.body.appendChild(pr),li.current=!0}function Fa(){var Da;(Da=pr.parentElement)===null||Da===void 0||Da.removeChild(pr),li.current=!1}return ct(function(){return Xt?Zr?Zr(Ua):Ua():Fa(),Fa},[Xt]),ct(function(){yo.length&&(yo.forEach(function(Da){return Da()}),za(xt))},[yo]),[pr,Gs]}function Tt(Xt,Jt){if(!Xt)return!1;if(Xt.contains)return Xt.contains(Jt);for(var cn=Jt;cn;){if(cn===Xt)return!0;cn=cn.parentNode}return!1}var St="data-rc-order",nt="rc-util-key",Qe=new Map;function Ce(){var Xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Jt=Xt.mark;return Jt?Jt.startsWith("data-")?Jt:"data-".concat(Jt):nt}function Ne(Xt){if(Xt.attachTo)return Xt.attachTo;var Jt=document.querySelector("head");return Jt||document.body}function Je(Xt){return Xt==="queue"?"prependQueue":Xt?"prepend":"append"}function rt(Xt){return Array.from((Qe.get(Xt)||Xt).children).filter(function(Jt){return Jt.tagName==="STYLE"})}function Be(Xt){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!pe())return null;var cn=Jt.csp,Fn=Jt.prepend,pr=document.createElement("style");pr.setAttribute(St,Je(Fn)),cn!=null&&cn.nonce&&(pr.nonce=cn==null?void 0:cn.nonce),pr.innerHTML=Xt;var li=Ne(Jt),Zr=li.firstChild;if(Fn){if(Fn==="queue"){var Vn=rt(li).filter(function(Mt){return["prepend","prependQueue"].includes(Mt.getAttribute(St))});if(Vn.length)return li.insertBefore(pr,Vn[Vn.length-1].nextSibling),pr}li.insertBefore(pr,Zr)}else li.appendChild(pr);return pr}function _e(Xt){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},cn=Ne(Jt);return rt(cn).find(function(Fn){return Fn.getAttribute(Ce(Jt))===Xt})}function Xe(Xt){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},cn=_e(Xt,Jt);if(cn){var Fn=Ne(Jt);Fn.removeChild(cn)}}function lt(Xt,Jt){var cn=Qe.get(Xt);if(!cn||!Tt(document,cn)){var Fn=Be("",Jt),pr=Fn.parentNode;Qe.set(Xt,pr),Xt.removeChild(Fn)}}function Pt(){Qe.clear()}function kt(Xt,Jt){var cn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Fn=Ne(cn);lt(Fn,cn);var pr=_e(Jt,cn);if(pr){var li,Zr;if((li=cn.csp)!==null&&li!==void 0&&li.nonce&&pr.nonce!==((Zr=cn.csp)===null||Zr===void 0?void 0:Zr.nonce)){var Vn;pr.nonce=(Vn=cn.csp)===null||Vn===void 0?void 0:Vn.nonce}return pr.innerHTML!==Xt&&(pr.innerHTML=Xt),pr}var Mt=Be(Xt,cn);return Mt.setAttribute(Ce(cn),Jt),Mt}var zt;function jt(Xt){if(typeof document=="undefined")return 0;if(Xt||zt===void 0){var Jt=document.createElement("div");Jt.style.width="100%",Jt.style.height="200px";var cn=document.createElement("div"),Fn=cn.style;Fn.position="absolute",Fn.top="0",Fn.left="0",Fn.pointerEvents="none",Fn.visibility="hidden",Fn.width="200px",Fn.height="150px",Fn.overflow="hidden",cn.appendChild(Jt),document.body.appendChild(cn);var pr=Jt.offsetWidth;cn.style.overflow="scroll";var li=Jt.offsetWidth;pr===li&&(li=cn.clientWidth),document.body.removeChild(cn),zt=pr-li}return zt}function Ht(Xt){var Jt=Xt.match(/^(.*)px$/),cn=Number(Jt==null?void 0:Jt[1]);return Number.isNaN(cn)?jt():cn}function ln(Xt){if(typeof document=="undefined"||!Xt||!(Xt instanceof Element))return{width:0,height:0};var Jt=getComputedStyle(Xt,"::-webkit-scrollbar"),cn=Jt.width,Fn=Jt.height;return{width:Ht(cn),height:Ht(Fn)}}function an(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var sn="rc-util-locker-".concat(Date.now()),$t=0;function On(Xt){var Jt=!!Xt,cn=le.useState(function(){return $t+=1,"".concat(sn,"_").concat($t)}),Fn=ie(cn,1),pr=Fn[0];ct(function(){if(Jt){var li=ln(document.body).width,Zr=an();kt(`
html body {
overflow-y: hidden;
`.concat(Zr?"width: calc(100% - ".concat(li,"px);"):"",`
}`),pr)}else Xe(pr);return function(){Xe(pr)}},[Jt,pr])}var un=!1;function mn(Xt){return typeof Xt=="boolean"&&(un=Xt),un}var In=function(Jt){return Jt===!1?!1:!pe()||!Jt?null:typeof Jt=="string"?document.querySelector(Jt):typeof Jt=="function"?Jt():Jt},Sn=le.forwardRef(function(Xt,Jt){var cn=Xt.open,Fn=Xt.autoLock,pr=Xt.getContainer,li=Xt.debug,Zr=Xt.autoDestroy,Vn=Zr===void 0?!0:Zr,Mt=Xt.children,yo=le.useState(cn),za=ie(yo,2),Gs=za[0],Ua=za[1],Fa=Gs||cn;le.useEffect(function(){(Vn||cn)&&Ua(cn)},[cn,Vn]);var Da=le.useState(function(){return In(pr)}),yl=ie(Da,2),fs=yl[0],No=yl[1];le.useEffect(function(){var na=In(pr);No(na!=null?na:null)});var ea=yt(Fa&&!fs,li),zr=ie(ea,2),Tr=zr[0],ti=zr[1],jn=fs!=null?fs:Tr;On(Fn&&cn&&pe()&&(jn===Tr||jn===document.body));var Gi=null;if(Mt&&Et(Mt)&&Jt){var So=Mt;Gi=So.ref}var ta=gt(Gi,Jt);if(!Fa||!pe()||fs===void 0)return null;var Oo=jn===!1||mn(),Wo=Mt;return Jt&&(Wo=le.cloneElement(Mt,{ref:ta})),le.createElement(et.Provider,{value:ti},Oo?Wo:(0,ue.createPortal)(Wo,jn))}),Dn=Sn,fr=Dn;function _r(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var mr=_r()?le.useLayoutEffect:le.useEffect,wi=function(Jt,cn){var Fn=le.useRef(!0);mr(function(){return Jt(Fn.current)},cn),mr(function(){return Fn.current=!1,function(){Fn.current=!0}},[])},no=function(Jt,cn){wi(function(Fn){if(!Fn)return Jt()},cn)},ro=wi,io=le.createContext(null),Ji=le.createContext({}),lo=io;function Fi(){return Fi=Object.assign?Object.assign.bind():function(Xt){for(var Jt=1;Jt<arguments.length;Jt++){var cn=arguments[Jt];for(var Fn in cn)({}).hasOwnProperty.call(cn,Fn)&&(Xt[Fn]=cn[Fn])}return Xt},Fi.apply(null,arguments)}var Jr=at(94184),bn=at.n(Jr),Ze=at(62874),vn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Jt){var cn=Jt.keyCode;if(Jt.altKey&&!Jt.ctrlKey||Jt.metaKey||cn>=vn.F1&&cn<=vn.F12)return!1;switch(cn){case vn.ALT:case vn.CAPS_LOCK:case vn.CONTEXT_MENU:case vn.CTRL:case vn.DOWN:case vn.END:case vn.ESC:case vn.HOME:case vn.INSERT:case vn.LEFT:case vn.MAC_FF_META:case vn.META:case vn.NUMLOCK:case vn.NUM_CENTER:case vn.PAGE_DOWN:case vn.PAGE_UP:case vn.PAUSE:case vn.PRINT_SCREEN:case vn.RIGHT:case vn.SHIFT:case vn.UP:case vn.WIN_KEY:case vn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Jt){if(Jt>=vn.ZERO&&Jt<=vn.NINE||Jt>=vn.NUM_ZERO&&Jt<=vn.NUM_MULTIPLY||Jt>=vn.A&&Jt<=vn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Jt===0)return!0;switch(Jt){case vn.SPACE:case vn.QUESTION_MARK:case vn.NUM_PLUS:case vn.NUM_MINUS:case vn.NUM_PERIOD:case vn.NUM_DIVISION:case vn.SEMICOLON:case vn.DASH:case vn.EQUALS:case vn.COMMA:case vn.PERIOD:case vn.SLASH:case vn.APOSTROPHE:case vn.SINGLE_QUOTE:case vn.OPEN_SQUARE_BRACKET:case vn.BACKSLASH:case vn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Mn=vn;function Rn(Xt){"@babel/helpers - typeof";return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Jt){return typeof Jt}:function(Jt){return Jt&&typeof Symbol=="function"&&Jt.constructor===Symbol&&Jt!==Symbol.prototype?"symbol":typeof Jt},Rn(Xt)}function zn(Xt,Jt){if(Rn(Xt)!=="object"||Xt===null)return Xt;var cn=Xt[Symbol.toPrimitive];if(cn!==void 0){var Fn=cn.call(Xt,Jt||"default");if(Rn(Fn)!=="object")return Fn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Jt==="string"?String:Number)(Xt)}function Un(Xt){var Jt=zn(Xt,"string");return Rn(Jt)==="symbol"?Jt:String(Jt)}function $n(Xt,Jt,cn){return Jt=Un(Jt),Jt in Xt?Object.defineProperty(Xt,Jt,{value:cn,enumerable:!0,configurable:!0,writable:!0}):Xt[Jt]=cn,Xt}function Mr(Xt,Jt){var cn=Object.keys(Xt);if(Object.getOwnPropertySymbols){var Fn=Object.getOwnPropertySymbols(Xt);Jt&&(Fn=Fn.filter(function(pr){return Object.getOwnPropertyDescriptor(Xt,pr).enumerable})),cn.push.apply(cn,Fn)}return cn}function nn(Xt){for(var Jt=1;Jt<arguments.length;Jt++){var cn=arguments[Jt]!=null?arguments[Jt]:{};Jt%2?Mr(Object(cn),!0).forEach(function(Fn){$n(Xt,Fn,cn[Fn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Xt,Object.getOwnPropertyDescriptors(cn)):Mr(Object(cn)).forEach(function(Fn){Object.defineProperty(Xt,Fn,Object.getOwnPropertyDescriptor(cn,Fn))})}return Xt}var on=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,Kt=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,hn="".concat(on," ").concat(Kt).split(/[\s\n]+/),qn="aria-",tr="data-";function ur(Xt,Jt){return Xt.indexOf(Jt)===0}function Qt(Xt){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,cn;Jt===!1?cn={aria:!0,data:!0,attr:!0}:Jt===!0?cn={aria:!0}:cn=nn({},Jt);var Fn={};return Object.keys(Xt).forEach(function(pr){(cn.aria&&(pr==="role"||ur(pr,qn))||cn.data&&ur(pr,tr)||cn.attr&&hn.includes(pr))&&(Fn[pr]=Xt[pr])}),Fn}function Cn(Xt,Jt){if(Xt==null)return{};var cn={};for(var Fn in Xt)if({}.hasOwnProperty.call(Xt,Fn)){if(Jt.indexOf(Fn)!==-1)continue;cn[Fn]=Xt[Fn]}return cn}function dr(Xt,Jt){if(Xt==null)return{};var cn,Fn,pr=Cn(Xt,Jt);if(Object.getOwnPropertySymbols){var li=Object.getOwnPropertySymbols(Xt);for(Fn=0;Fn<li.length;Fn++)cn=li[Fn],Jt.indexOf(cn)===-1&&{}.propertyIsEnumerable.call(Xt,cn)&&(pr[cn]=Xt[cn])}return pr}var Ar=at(33993);function _n(Xt,Jt,cn){var Fn=le.useRef({});return(!("value"in Fn.current)||cn(Fn.current.condition,Jt))&&(Fn.current.value=Xt(),Fn.current.condition=Jt),Fn.current.value}var Zt=Symbol.for("react.element"),ir=Symbol.for("react.transitional.element"),Nr=Symbol.for("react.fragment");function si(Xt){return Xt&&_typeof(Xt)==="object"&&(Xt.$$typeof===Zt||Xt.$$typeof===ir)&&Xt.type===Nr}var Tn=Number(le.version.split(".")[0]),vr=function(Jt,cn){typeof Jt=="function"?Jt(cn):Rn(Jt)==="object"&&Jt&&"current"in Jt&&(Jt.current=cn)},yi=function(){for(var Jt=arguments.length,cn=new Array(Jt),Fn=0;Fn<Jt;Fn++)cn[Fn]=arguments[Fn];var pr=cn.filter(Boolean);return pr.length<=1?pr[0]:function(li){cn.forEach(function(Zr){vr(Zr,li)})}},ko=function(){for(var Jt=arguments.length,cn=new Array(Jt),Fn=0;Fn<Jt;Fn++)cn[Fn]=arguments[Fn];return _n(function(){return yi.apply(void 0,cn)},cn,function(pr,li){return pr.length!==li.length||pr.every(function(Zr,Vn){return Zr!==li[Vn]})})},zi=function(Jt){var cn,Fn;if(!Jt)return!1;if(xr(Jt)&&Tn>=19)return!0;var pr=isMemo(Jt)?Jt.type.type:Jt.type;return!(typeof pr=="function"&&!((cn=pr.prototype)!==null&&cn!==void 0&&cn.render)&&pr.$$typeof!==ForwardRef||typeof Jt=="function"&&!((Fn=Jt.prototype)!==null&&Fn!==void 0&&Fn.render)&&Jt.$$typeof!==ForwardRef)};function xr(Xt){return isValidElement(Xt)&&!isFragment(Xt)}var gr=function(Jt){return xr(Jt)&&zi(Jt)},Lr=function(Jt){if(Jt&&xr(Jt)){var cn=Jt;return cn.props.propertyIsEnumerable("ref")?cn.props.ref:cn.ref}return null},_i=["prefixCls","className","containerRef"],oo=function(Jt){var cn=Jt.prefixCls,Fn=Jt.className,pr=Jt.containerRef,li=dr(Jt,_i),Zr=le.useContext(Ji),Vn=Zr.panel,Mt=ko(Vn,pr);return le.createElement("div",Fi({className:bn()("".concat(cn,"-content"),Fn),role:"dialog",ref:Mt},Qt(Jt,{aria:!0}),{"aria-modal":"true"},li))},Xn=oo,Ir={},_s=[],Aa=function(Jt){_s.push(Jt)};function ga(Xt,Jt){if(0)var cn}function tn(Xt,Jt){if(0)var cn}function Vr(){Ir={}}function Ti(Xt,Jt,cn){!Jt&&!Ir[cn]&&(Xt(!1,cn),Ir[cn]=!0)}function jr(Xt,Jt){Ti(ga,Xt,Jt)}function Fo(Xt,Jt){Ti(tn,Xt,Jt)}jr.preMessage=Aa,jr.resetWarned=Vr,jr.noteOnce=Fo;var Oi=jr;function Ri(Xt){return typeof Xt=="string"&&String(Number(Xt))===Xt?(Oi(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Xt)):Xt}function Li(Xt){warning(!("wrapperClassName"in Xt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Xt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var bi={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function uo(Xt,Jt){var cn,Fn,pr,li=Xt.prefixCls,Zr=Xt.open,Vn=Xt.placement,Mt=Xt.inline,yo=Xt.push,za=Xt.forceRender,Gs=Xt.autoFocus,Ua=Xt.keyboard,Fa=Xt.classNames,Da=Xt.rootClassName,yl=Xt.rootStyle,fs=Xt.zIndex,No=Xt.className,ea=Xt.id,zr=Xt.style,Tr=Xt.motion,ti=Xt.width,jn=Xt.height,Gi=Xt.children,So=Xt.mask,ta=Xt.maskClosable,Oo=Xt.maskMotion,Wo=Xt.maskClassName,na=Xt.maskStyle,Ya=Xt.afterOpenChange,Ia=Xt.onClose,Ol=Xt.onMouseEnter,Hl=Xt.onMouseOver,rn=Xt.onMouseLeave,us=Xt.onClick,ol=Xt.onKeyDown,au=Xt.onKeyUp,co=Xt.styles,Sl=Xt.drawerRender,jl=le.useRef(),Kl=le.useRef(),xo=le.useRef();le.useImperativeHandle(Jt,function(){return jl.current});var ma=function(ds){var oi=ds.keyCode,vu=ds.shiftKey;switch(oi){case Mn.TAB:{if(oi===Mn.TAB){if(!vu&&document.activeElement===xo.current){var al;(al=Kl.current)===null||al===void 0||al.focus({preventScroll:!0})}else if(vu&&document.activeElement===Kl.current){var Ps;(Ps=xo.current)===null||Ps===void 0||Ps.focus({preventScroll:!0})}}break}case Mn.ESC:{Ia&&Ua&&(ds.stopPropagation(),Ia(ds));break}}};le.useEffect(function(){if(Zr&&Gs){var Ta;(Ta=jl.current)===null||Ta===void 0||Ta.focus({preventScroll:!0})}},[Zr]);var mi=le.useState(!1),Ai=ve(mi,2),Mo=Ai[0],Yo=Ai[1],yr=le.useContext(lo),Ph;typeof yo=="boolean"?Ph=yo?{}:{distance:0}:Ph=yo||{};var Ns=(cn=(Fn=(pr=Ph)===null||pr===void 0?void 0:pr.distance)!==null&&Fn!==void 0?Fn:yr==null?void 0:yr.pushDistance)!==null&&cn!==void 0?cn:180,Vl=le.useMemo(function(){return{pushDistance:Ns,push:function(){Yo(!0)},pull:function(){Yo(!1)}}},[Ns]);le.useEffect(function(){if(Zr){var Ta;yr==null||(Ta=yr.push)===null||Ta===void 0||Ta.call(yr)}else{var ds;yr==null||(ds=yr.pull)===null||ds===void 0||ds.call(yr)}},[Zr]),le.useEffect(function(){return function(){var Ta;yr==null||(Ta=yr.pull)===null||Ta===void 0||Ta.call(yr)}},[]);var Ch=So&&le.createElement(Ze.Z,Fi({key:"mask"},Oo,{visible:Zr}),function(Ta,ds){var oi=Ta.className,vu=Ta.style;return le.createElement("div",{className:bn()("".concat(li,"-mask"),oi,Fa==null?void 0:Fa.mask,Wo),style:me(me(me({},vu),na),co==null?void 0:co.mask),onClick:ta&&Zr?Ia:void 0,ref:ds})}),Eh=typeof Tr=="function"?Tr(Vn):Tr,nr={};if(Mo&&Ns)switch(Vn){case"top":nr.transform="translateY(".concat(Ns,"px)");break;case"bottom":nr.transform="translateY(".concat(-Ns,"px)");break;case"left":nr.transform="translateX(".concat(Ns,"px)");break;default:nr.transform="translateX(".concat(-Ns,"px)");break}Vn==="left"||Vn==="right"?nr.width=Ri(ti):nr.height=Ri(jn);var ba={onMouseEnter:Ol,onMouseOver:Hl,onMouseLeave:rn,onClick:us,onKeyDown:ol,onKeyUp:au},Ma=le.createElement(Ze.Z,Fi({key:"panel"},Eh,{visible:Zr,forceRender:za,onVisibleChanged:function(ds){Ya==null||Ya(ds)},removeOnLeave:!1,leavedClassName:"".concat(li,"-content-wrapper-hidden")}),function(Ta,ds){var oi=Ta.className,vu=Ta.style,al=le.createElement(Xn,Fi({id:ea,containerRef:ds,prefixCls:li,className:bn()(No,Fa==null?void 0:Fa.content),style:me(me({},zr),co==null?void 0:co.content)},Qt(Xt,{aria:!0}),ba),Gi);return le.createElement("div",Fi({className:bn()("".concat(li,"-content-wrapper"),Fa==null?void 0:Fa.wrapper,oi),style:me(me(me({},nr),vu),co==null?void 0:co.wrapper)},Qt(Xt,{data:!0})),Sl?Sl(al):al)}),Xl=me({},yl);return fs&&(Xl.zIndex=fs),le.createElement(lo.Provider,{value:Vl},le.createElement("div",{className:bn()(li,"".concat(li,"-").concat(Vn),Da,Ge(Ge({},"".concat(li,"-open"),Zr),"".concat(li,"-inline"),Mt)),style:Xl,tabIndex:-1,ref:jl,onKeyDown:ma},Ch,le.createElement("div",{tabIndex:0,ref:Kl,style:bi,"aria-hidden":"true","data-sentinel":"start"}),Ma,le.createElement("div",{tabIndex:0,ref:xo,style:bi,"aria-hidden":"true","data-sentinel":"end"})))}var Ln=le.forwardRef(uo),la=Ln,Nn=function(Jt){var cn=Jt.open,Fn=cn===void 0?!1:cn,pr=Jt.prefixCls,li=pr===void 0?"rc-drawer":pr,Zr=Jt.placement,Vn=Zr===void 0?"right":Zr,Mt=Jt.autoFocus,yo=Mt===void 0?!0:Mt,za=Jt.keyboard,Gs=za===void 0?!0:za,Ua=Jt.width,Fa=Ua===void 0?378:Ua,Da=Jt.mask,yl=Da===void 0?!0:Da,fs=Jt.maskClosable,No=fs===void 0?!0:fs,ea=Jt.getContainer,zr=Jt.forceRender,Tr=Jt.afterOpenChange,ti=Jt.destroyOnClose,jn=Jt.onMouseEnter,Gi=Jt.onMouseOver,So=Jt.onMouseLeave,ta=Jt.onClick,Oo=Jt.onKeyDown,Wo=Jt.onKeyUp,na=Jt.panelRef,Ya=le.useState(!1),Ia=ve(Ya,2),Ol=Ia[0],Hl=Ia[1],rn=le.useState(!1),us=ve(rn,2),ol=us[0],au=us[1];ro(function(){au(!0)},[]);var co=ol?Fn:!1,Sl=le.useRef(),jl=le.useRef();ro(function(){co&&(jl.current=document.activeElement)},[co]);var Kl=function(Mo){var Yo;if(Hl(Mo),Tr==null||Tr(Mo),!Mo&&jl.current&&!((Yo=Sl.current)!==null&&Yo!==void 0&&Yo.contains(jl.current))){var yr;(yr=jl.current)===null||yr===void 0||yr.focus({preventScroll:!0})}},xo=le.useMemo(function(){return{panel:na}},[na]);if(!zr&&!Ol&&!co&&ti)return null;var ma={onMouseEnter:jn,onMouseOver:Gi,onMouseLeave:So,onClick:ta,onKeyDown:Oo,onKeyUp:Wo},mi=me(me({},Jt),{},{open:co,prefixCls:li,placement:Vn,autoFocus:yo,keyboard:Gs,width:Fa,mask:yl,maskClosable:No,inline:ea===!1,afterOpenChange:Kl,ref:Sl},ma);return le.createElement(Ji.Provider,{value:xo},le.createElement(fr,{open:co||zr||Ol,autoDestroy:!1,getContainer:ea,autoLock:yl&&(co||Ol)},le.createElement(la,mi)))},vo=Nn,bs=vo},26819:function(dn,pn){"use strict";var at;var ot=typeof Symbol=="function"&&Symbol.for,_t=ot?Symbol.for("react.element"):60103,ae=ot?Symbol.for("react.portal"):60106,Ge=ot?Symbol.for("react.fragment"):60107,Ie=ot?Symbol.for("react.strict_mode"):60108,me=ot?Symbol.for("react.profiler"):60114,de=ot?Symbol.for("react.provider"):60109,Ee=ot?Symbol.for("react.context"):60110,we=ot?Symbol.for("react.async_mode"):60111,be=ot?Symbol.for("react.concurrent_mode"):60111,Te=ot?Symbol.for("react.forward_ref"):60112,ve=ot?Symbol.for("react.suspense"):60113,xe=ot?Symbol.for("react.suspense_list"):60120,fe=ot?Symbol.for("react.memo"):60115,z=ot?Symbol.for("react.lazy"):60116,ee=ot?Symbol.for("react.block"):60121,oe=ot?Symbol.for("react.fundamental"):60117,ie=ot?Symbol.for("react.responder"):60118,le=ot?Symbol.for("react.scope"):60119;function ue(Se){if(typeof Se=="object"&&Se!==null){var Le=Se.$$typeof;switch(Le){case _t:switch(Se=Se.type,Se){case we:case be:case Ge:case me:case Ie:case ve:return Se;default:switch(Se=Se&&Se.$$typeof,Se){case Ee:case Te:case z:case fe:case de:return Se;default:return Le}}case ae:return Le}}}function pe(Se){return ue(Se)===be}at=we,at=be,at=Ee,at=de,at=_t,at=Te,at=Ge,at=z,at=fe,at=ae,at=me,at=Ie,at=ve,at=function(Se){return pe(Se)||ue(Se)===we},at=pe,at=function(Se){return ue(Se)===Ee},at=function(Se){return ue(Se)===de},at=function(Se){return typeof Se=="object"&&Se!==null&&Se.$$typeof===_t},at=function(Se){return ue(Se)===Te},at=function(Se){return ue(Se)===Ge},at=function(Se){return ue(Se)===z},pn.isMemo=function(Se){return ue(Se)===fe},at=function(Se){return ue(Se)===ae},at=function(Se){return ue(Se)===me},at=function(Se){return ue(Se)===Ie},at=function(Se){return ue(Se)===ve},at=function(Se){return typeof Se=="string"||typeof Se=="function"||Se===Ge||Se===be||Se===me||Se===Ie||Se===ve||Se===xe||typeof Se=="object"&&Se!==null&&(Se.$$typeof===z||Se.$$typeof===fe||Se.$$typeof===de||Se.$$typeof===Ee||Se.$$typeof===Te||Se.$$typeof===oe||Se.$$typeof===ie||Se.$$typeof===le||Se.$$typeof===ee)},at=ue},18459:function(dn,pn,at){"use strict";dn.exports=at(26819)},16651:function(dn,pn){"use strict";var at;var ot=Symbol.for("react.element"),_t=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),Ie=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),de=Symbol.for("react.context"),Ee=Symbol.for("react.server_context"),we=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),fe=Symbol.for("react.offscreen"),z;z=Symbol.for("react.module.reference");function ee(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case ot:switch(oe=oe.type,oe){case ae:case Ie:case Ge:case be:case Te:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case Ee:case de:case we:case xe:case ve:case me:return oe;default:return ie}}case _t:return ie}}}at=de,at=me,at=ot,at=we,at=ae,at=xe,at=ve,at=_t,at=Ie,at=Ge,at=be,at=Te,at=function(){return!1},at=function(){return!1},at=function(oe){return ee(oe)===de},at=function(oe){return ee(oe)===me},at=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===ot},at=function(oe){return ee(oe)===we},at=function(oe){return ee(oe)===ae},at=function(oe){return ee(oe)===xe},at=function(oe){return ee(oe)===ve},at=function(oe){return ee(oe)===_t},at=function(oe){return ee(oe)===Ie},at=function(oe){return ee(oe)===Ge},at=function(oe){return ee(oe)===be},at=function(oe){return ee(oe)===Te},at=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===ae||oe===Ie||oe===Ge||oe===be||oe===Te||oe===fe||typeof oe=="object"&&oe!==null&&(oe.$$typeof===xe||oe.$$typeof===ve||oe.$$typeof===me||oe.$$typeof===de||oe.$$typeof===we||oe.$$typeof===z||oe.getModuleId!==void 0)},at=ee},33993:function(dn,pn,at){"use strict";at(16651)},43579:function(dn,pn,at){"use strict";at.d(pn,{Cd:function(){return ze}});var ot=at(87462),_t=at(1413),ae=at(45987),Ge=at(67294),Ie=at(94184),me=at.n(Ie),de={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ee=function(){var We=(0,Ge.useRef)([]),Ue=(0,Ge.useRef)(null);return(0,Ge.useEffect)(function(){var st=Date.now(),dt=!1;We.current.forEach(function(gt){if(gt){dt=!0;var Et=gt.style;Et.transitionDuration=".3s, .3s, .3s, .06s",Ue.current&&st-Ue.current<100&&(Et.transitionDuration="0s, 0s")}}),dt&&(Ue.current=Date.now())}),We.current},we=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],be=function(We){var Ue=(0,_t.Z)((0,_t.Z)({},de),We),st=Ue.className,dt=Ue.percent,gt=Ue.prefixCls,Et=Ue.strokeColor,Ke=Ue.strokeLinecap,et=Ue.strokeWidth,$e=Ue.style,vt=Ue.trailColor,wt=Ue.trailWidth,ht=Ue.transition,pt=(0,ae.Z)(Ue,we);delete pt.gapPosition;var ct=Array.isArray(dt)?dt:[dt],Ct=Array.isArray(Et)?Et:[Et],xt=Ee(),yt=et/2,Tt=100-et/2,St="M ".concat(Ke==="round"?yt:0,",").concat(yt,`
L `).concat(Ke==="round"?Tt:100,",").concat(yt),nt="0 0 100 ".concat(et),Qe=0;return Ge.createElement("svg",(0,ot.Z)({className:me()("".concat(gt,"-line"),st),viewBox:nt,preserveAspectRatio:"none",style:$e},pt),Ge.createElement("path",{className:"".concat(gt,"-line-trail"),d:St,strokeLinecap:Ke,stroke:vt,strokeWidth:wt||et,fillOpacity:"0"}),ct.map(function(Ce,Ne){var Je=1;switch(Ke){case"round":Je=1-et/100;break;case"square":Je=1-et/2/100;break;default:Je=1;break}var rt={strokeDasharray:"".concat(Ce*Je,"px, 100px"),strokeDashoffset:"-".concat(Qe,"px"),transition:ht||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Be=Ct[Ne]||Ct[Ct.length-1];return Qe+=Ce,Ge.createElement("path",{key:Ne,className:"".concat(gt,"-line-path"),d:St,strokeLinecap:Ke,stroke:Be,strokeWidth:et,fillOpacity:"0",ref:function(Xe){xt[Ne]=Xe},style:rt})}))},Te=be,ve=at(71002),xe=at(97685),fe=at(98924),z=0,ee=(0,fe.Z)();function oe(){var Ye;return ee?(Ye=z,z+=1):Ye="TEST_OR_SSR",Ye}var ie=function(Ye){var We=Ge.useState(),Ue=(0,xe.Z)(We,2),st=Ue[0],dt=Ue[1];return Ge.useEffect(function(){dt("rc_progress_".concat(oe()))},[]),Ye||st},le=function(We){var Ue=We.bg,st=We.children;return Ge.createElement("div",{style:{width:"100%",height:"100%",background:Ue}},st)};function ue(Ye,We){return Object.keys(Ye).map(function(Ue){var st=parseFloat(Ue),dt="".concat(Math.floor(st*We),"%");return"".concat(Ye[Ue]," ").concat(dt)})}var pe=Ge.forwardRef(function(Ye,We){var Ue=Ye.prefixCls,st=Ye.color,dt=Ye.gradientId,gt=Ye.radius,Et=Ye.style,Ke=Ye.ptg,et=Ye.strokeLinecap,$e=Ye.strokeWidth,vt=Ye.size,wt=Ye.gapDegree,ht=st&&(0,ve.Z)(st)==="object",pt=ht?"#FFF":void 0,ct=vt/2,Ct=Ge.createElement("circle",{className:"".concat(Ue,"-circle-path"),r:gt,cx:ct,cy:ct,stroke:pt,strokeLinecap:et,strokeWidth:$e,opacity:Ke===0?0:1,style:Et,ref:We});if(!ht)return Ct;var xt="".concat(dt,"-conic"),yt=wt?"".concat(180+wt/2,"deg"):"0deg",Tt=ue(st,(360-wt)/360),St=ue(st,1),nt="conic-gradient(from ".concat(yt,", ").concat(Tt.join(", "),")"),Qe="linear-gradient(to ".concat(wt?"bottom":"top",", ").concat(St.join(", "),")");return Ge.createElement(Ge.Fragment,null,Ge.createElement("mask",{id:xt},Ct),Ge.createElement("foreignObject",{x:0,y:0,width:vt,height:vt,mask:"url(#".concat(xt,")")},Ge.createElement(le,{bg:Qe},Ge.createElement(le,{bg:nt}))))}),Se=pe,Le=100,De=function(We,Ue,st,dt,gt,Et,Ke,et,$e,vt){var wt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ht=st/100*360*((360-Et)/360),pt=Et===0?0:{bottom:0,top:180,left:90,right:-90}[Ke],ct=(100-dt)/100*Ue;$e==="round"&&dt!==100&&(ct+=vt/2,ct>=Ue&&(ct=Ue-.01));var Ct=Le/2;return{stroke:typeof et=="string"?et:void 0,strokeDasharray:"".concat(Ue,"px ").concat(We),strokeDashoffset:ct+wt,transform:"rotate(".concat(gt+ht+pt,"deg)"),transformOrigin:"".concat(Ct,"px ").concat(Ct,"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}},Fe=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ae(Ye){var We=Ye!=null?Ye:[];return Array.isArray(We)?We:[We]}var Oe=function(We){var Ue=(0,_t.Z)((0,_t.Z)({},de),We),st=Ue.id,dt=Ue.prefixCls,gt=Ue.steps,Et=Ue.strokeWidth,Ke=Ue.trailWidth,et=Ue.gapDegree,$e=et===void 0?0:et,vt=Ue.gapPosition,wt=Ue.trailColor,ht=Ue.strokeLinecap,pt=Ue.style,ct=Ue.className,Ct=Ue.strokeColor,xt=Ue.percent,yt=(0,ae.Z)(Ue,Fe),Tt=Le/2,St=ie(st),nt="".concat(St,"-gradient"),Qe=Tt-Et/2,Ce=Math.PI*2*Qe,Ne=$e>0?90+$e/2:-90,Je=Ce*((360-$e)/360),rt=(0,ve.Z)(gt)==="object"?gt:{count:gt,gap:2},Be=rt.count,_e=rt.gap,Xe=Ae(xt),lt=Ae(Ct),Pt=lt.find(function(sn){return sn&&(0,ve.Z)(sn)==="object"}),kt=Pt&&(0,ve.Z)(Pt)==="object",zt=kt?"butt":ht,jt=De(Ce,Je,0,100,Ne,$e,vt,wt,zt,Et),Ht=Ee(),ln=function(){var $t=0;return Xe.map(function(On,un){var mn=lt[un]||lt[lt.length-1],In=De(Ce,Je,$t,On,Ne,$e,vt,mn,zt,Et);return $t+=On,Ge.createElement(Se,{key:un,color:mn,ptg:On,radius:Qe,prefixCls:dt,gradientId:nt,style:In,strokeLinecap:zt,strokeWidth:Et,gapDegree:$e,ref:function(Dn){Ht[un]=Dn},size:Le})}).reverse()},an=function(){var $t=Math.round(Be*(Xe[0]/100)),On=100/Be,un=0;return new Array(Be).fill(null).map(function(mn,In){var Sn=In<=$t-1?lt[0]:wt,Dn=Sn&&(0,ve.Z)(Sn)==="object"?"url(#".concat(nt,")"):void 0,fr=De(Ce,Je,un,On,Ne,$e,vt,Sn,"butt",Et,_e);return un+=(Je-fr.strokeDashoffset+_e)*100/Je,Ge.createElement("circle",{key:In,className:"".concat(dt,"-circle-path"),r:Qe,cx:Tt,cy:Tt,stroke:Dn,strokeWidth:Et,opacity:1,style:fr,ref:function(mr){Ht[In]=mr}})})};return Ge.createElement("svg",(0,ot.Z)({className:me()("".concat(dt,"-circle"),ct),viewBox:"0 0 ".concat(Le," ").concat(Le),style:pt,id:st,role:"presentation"},yt),!Be&&Ge.createElement("circle",{className:"".concat(dt,"-circle-trail"),r:Qe,cx:Tt,cy:Tt,stroke:wt,strokeLinecap:zt,strokeWidth:Ke||Et,style:jt}),Be?an():ln())},ze=Oe,He={Line:Te,Circle:ze}},71032:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return ue}});var ot=at(87462),_t=at(4942),ae=at(97685),Ge=at(45987),Ie=at(94184),me=at.n(Ie),de=at(21770),Ee=at(15105),we=at(64217),be=at(67294);function Te(pe,Se){var Le=pe.disabled,De=pe.prefixCls,Fe=pe.character,Ae=pe.characterRender,Oe=pe.index,ze=pe.count,He=pe.value,Ye=pe.allowHalf,We=pe.focused,Ue=pe.onHover,st=pe.onClick,dt=function(ht){Ue(ht,Oe)},gt=function(ht){st(ht,Oe)},Et=function(ht){ht.keyCode===Ee.Z.ENTER&&st(ht,Oe)},Ke=Oe+1,et=new Set([De]);He===0&&Oe===0&&We?et.add("".concat(De,"-focused")):Ye&&He+.5>=Ke&&He<Ke?(et.add("".concat(De,"-half")),et.add("".concat(De,"-active")),We&&et.add("".concat(De,"-focused"))):(Ke<=He?et.add("".concat(De,"-full")):et.add("".concat(De,"-zero")),Ke===He&&We&&et.add("".concat(De,"-focused")));var $e=typeof Fe=="function"?Fe(pe):Fe,vt=be.createElement("li",{className:me()(Array.from(et)),ref:Se},be.createElement("div",{onClick:Le?null:gt,onKeyDown:Le?null:Et,onMouseMove:Le?null:dt,role:"radio","aria-checked":He>Oe?"true":"false","aria-posinset":Oe+1,"aria-setsize":ze,tabIndex:Le?-1:0},be.createElement("div",{className:"".concat(De,"-first")},$e),be.createElement("div",{className:"".concat(De,"-second")},$e)));return Ae&&(vt=Ae(vt,pe)),vt}var ve=be.forwardRef(Te);function xe(){var pe=be.useRef({});function Se(De){return pe.current[De]}function Le(De){return function(Fe){pe.current[De]=Fe}}return[Se,Le]}function fe(pe){var Se=pe.pageXOffset,Le="scrollLeft";if(typeof Se!="number"){var De=pe.document;Se=De.documentElement[Le],typeof Se!="number"&&(Se=De.body[Le])}return Se}function z(pe){var Se,Le,De=pe.ownerDocument,Fe=De.body,Ae=De&&De.documentElement,Oe=pe.getBoundingClientRect();return Se=Oe.left,Le=Oe.top,Se-=Ae.clientLeft||Fe.clientLeft||0,Le-=Ae.clientTop||Fe.clientTop||0,{left:Se,top:Le}}function ee(pe){var Se=z(pe),Le=pe.ownerDocument,De=Le.defaultView||Le.parentWindow;return Se.left+=fe(De),Se.left}var oe=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function ie(pe,Se){var Le=pe.prefixCls,De=Le===void 0?"rc-rate":Le,Fe=pe.className,Ae=pe.defaultValue,Oe=pe.value,ze=pe.count,He=ze===void 0?5:ze,Ye=pe.allowHalf,We=Ye===void 0?!1:Ye,Ue=pe.allowClear,st=Ue===void 0?!0:Ue,dt=pe.keyboard,gt=dt===void 0?!0:dt,Et=pe.character,Ke=Et===void 0?"\u2605":Et,et=pe.characterRender,$e=pe.disabled,vt=pe.direction,wt=vt===void 0?"ltr":vt,ht=pe.tabIndex,pt=ht===void 0?0:ht,ct=pe.autoFocus,Ct=pe.onHoverChange,xt=pe.onChange,yt=pe.onFocus,Tt=pe.onBlur,St=pe.onKeyDown,nt=pe.onMouseLeave,Qe=(0,Ge.Z)(pe,oe),Ce=xe(),Ne=(0,ae.Z)(Ce,2),Je=Ne[0],rt=Ne[1],Be=be.useRef(null),_e=function(){if(!$e){var Jr;(Jr=Be.current)===null||Jr===void 0||Jr.focus()}};be.useImperativeHandle(Se,function(){return{focus:_e,blur:function(){if(!$e){var Jr;(Jr=Be.current)===null||Jr===void 0||Jr.blur()}}}});var Xe=(0,de.Z)(Ae||0,{value:Oe}),lt=(0,ae.Z)(Xe,2),Pt=lt[0],kt=lt[1],zt=(0,de.Z)(null),jt=(0,ae.Z)(zt,2),Ht=jt[0],ln=jt[1],an=function(Jr,bn){var Ze=wt==="rtl",vn=Jr+1;if(We){var Mn=Je(Jr),Rn=ee(Mn),zn=Mn.clientWidth;(Ze&&bn-Rn>zn/2||!Ze&&bn-Rn<zn/2)&&(vn-=.5)}return vn},sn=function(Jr){kt(Jr),xt==null||xt(Jr)},$t=be.useState(!1),On=(0,ae.Z)($t,2),un=On[0],mn=On[1],In=function(){mn(!0),yt==null||yt()},Sn=function(){mn(!1),Tt==null||Tt()},Dn=be.useState(null),fr=(0,ae.Z)(Dn,2),_r=fr[0],mr=fr[1],wi=function(Jr,bn){var Ze=an(bn,Jr.pageX);Ze!==Ht&&(mr(Ze),ln(null)),Ct==null||Ct(Ze)},no=function(Jr){$e||(mr(null),ln(null),Ct==null||Ct(void 0)),Jr&&(nt==null||nt(Jr))},ro=function(Jr,bn){var Ze=an(bn,Jr.pageX),vn=!1;st&&(vn=Ze===Pt),no(),sn(vn?0:Ze),ln(vn?Ze:null)},io=function(Jr){var bn=Jr.keyCode,Ze=wt==="rtl",vn=We?.5:1;gt&&(bn===Ee.Z.RIGHT&&Pt<He&&!Ze?(sn(Pt+vn),Jr.preventDefault()):bn===Ee.Z.LEFT&&Pt>0&&!Ze||bn===Ee.Z.RIGHT&&Pt>0&&Ze?(sn(Pt-vn),Jr.preventDefault()):bn===Ee.Z.LEFT&&Pt<He&&Ze&&(sn(Pt+vn),Jr.preventDefault())),St==null||St(Jr)};be.useEffect(function(){ct&&!$e&&_e()},[]);var Ji=new Array(He).fill(0).map(function(Fi,Jr){return be.createElement(ve,{ref:rt(Jr),index:Jr,count:He,disabled:$e,prefixCls:"".concat(De,"-star"),allowHalf:We,value:_r===null?Pt:_r,onClick:ro,onHover:wi,key:Fi||Jr,character:Ke,characterRender:et,focused:un})}),lo=me()(De,Fe,(0,_t.Z)((0,_t.Z)({},"".concat(De,"-disabled"),$e),"".concat(De,"-rtl"),wt==="rtl"));return be.createElement("ul",(0,ot.Z)({className:lo,onMouseLeave:no,tabIndex:$e?-1:pt,onFocus:$e?null:In,onBlur:$e?null:Sn,onKeyDown:$e?null:io,ref:Be},(0,we.Z)(Qe,{aria:!0,data:!0,attr:!0})),Ji)}var le=be.forwardRef(ie),ue=le},58212:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return Et}});function ot(){return ot=Object.assign?Object.assign.bind():function(Ke){for(var et=1;et<arguments.length;et++){var $e=arguments[et];for(var vt in $e)Object.prototype.hasOwnProperty.call($e,vt)&&(Ke[vt]=$e[vt])}return Ke},ot.apply(this,arguments)}function _t(Ke){"@babel/helpers - typeof";return _t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_t(Ke)}function ae(Ke,et){if(_t(Ke)!=="object"||Ke===null)return Ke;var $e=Ke[Symbol.toPrimitive];if($e!==void 0){var vt=$e.call(Ke,et||"default");if(_t(vt)!=="object")return vt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(Ke)}function Ge(Ke){var et=ae(Ke,"string");return _t(et)==="symbol"?et:String(et)}function Ie(Ke,et,$e){return et=Ge(et),et in Ke?Object.defineProperty(Ke,et,{value:$e,enumerable:!0,configurable:!0,writable:!0}):Ke[et]=$e,Ke}function me(Ke){if(Array.isArray(Ke))return Ke}function de(Ke,et){var $e=Ke==null?null:typeof Symbol!="undefined"&&Ke[Symbol.iterator]||Ke["@@iterator"];if($e!=null){var vt,wt,ht,pt,ct=[],Ct=!0,xt=!1;try{if(ht=($e=$e.call(Ke)).next,et===0){if(Object($e)!==$e)return;Ct=!1}else for(;!(Ct=(vt=ht.call($e)).done)&&(ct.push(vt.value),ct.length!==et);Ct=!0);}catch(yt){xt=!0,wt=yt}finally{try{if(!Ct&&$e.return!=null&&(pt=$e.return(),Object(pt)!==pt))return}finally{if(xt)throw wt}}return ct}}function Ee(Ke,et){(et==null||et>Ke.length)&&(et=Ke.length);for(var $e=0,vt=new Array(et);$e<et;$e++)vt[$e]=Ke[$e];return vt}function we(Ke,et){if(Ke){if(typeof Ke=="string")return Ee(Ke,et);var $e=Object.prototype.toString.call(Ke).slice(8,-1);if($e==="Object"&&Ke.constructor&&($e=Ke.constructor.name),$e==="Map"||$e==="Set")return Array.from(Ke);if($e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($e))return Ee(Ke,et)}}function be(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(Ke,et){return me(Ke)||de(Ke,et)||we(Ke,et)||be()}function ve(Ke,et){if(Ke==null)return{};var $e={},vt=Object.keys(Ke),wt,ht;for(ht=0;ht<vt.length;ht++)wt=vt[ht],!(et.indexOf(wt)>=0)&&($e[wt]=Ke[wt]);return $e}function xe(Ke,et){if(Ke==null)return{};var $e=ve(Ke,et),vt,wt;if(Object.getOwnPropertySymbols){var ht=Object.getOwnPropertySymbols(Ke);for(wt=0;wt<ht.length;wt++)vt=ht[wt],!(et.indexOf(vt)>=0)&&Object.prototype.propertyIsEnumerable.call(Ke,vt)&&($e[vt]=Ke[vt])}return $e}var fe=at(67294),z=at(94184),ee=at.n(z);function oe(Ke){if(Array.isArray(Ke))return Ke}function ie(Ke,et){var $e=Ke==null?null:typeof Symbol!="undefined"&&Ke[Symbol.iterator]||Ke["@@iterator"];if($e!=null){var vt,wt,ht,pt,ct=[],Ct=!0,xt=!1;try{if(ht=($e=$e.call(Ke)).next,et===0){if(Object($e)!==$e)return;Ct=!1}else for(;!(Ct=(vt=ht.call($e)).done)&&(ct.push(vt.value),ct.length!==et);Ct=!0);}catch(yt){xt=!0,wt=yt}finally{try{if(!Ct&&$e.return!=null&&(pt=$e.return(),Object(pt)!==pt))return}finally{if(xt)throw wt}}return ct}}function le(Ke,et){(et==null||et>Ke.length)&&(et=Ke.length);for(var $e=0,vt=new Array(et);$e<et;$e++)vt[$e]=Ke[$e];return vt}function ue(Ke,et){if(Ke){if(typeof Ke=="string")return le(Ke,et);var $e=Object.prototype.toString.call(Ke).slice(8,-1);if($e==="Object"&&Ke.constructor&&($e=Ke.constructor.name),$e==="Map"||$e==="Set")return Array.from(Ke);if($e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($e))return le(Ke,et)}}function pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Se(Ke,et){return oe(Ke)||ie(Ke,et)||ue(Ke,et)||pe()}function Le(Ke){var et=fe.useRef();et.current=Ke;var $e=fe.useCallback(function(){for(var vt,wt=arguments.length,ht=new Array(wt),pt=0;pt<wt;pt++)ht[pt]=arguments[pt];return(vt=et.current)===null||vt===void 0?void 0:vt.call.apply(vt,[et].concat(ht))},[]);return $e}function De(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Fe=De()?fe.useLayoutEffect:fe.useEffect,Ae=function(et,$e){var vt=fe.useRef(!0);Fe(function(){return et(vt.current)},$e),Fe(function(){return vt.current=!1,function(){vt.current=!0}},[])},Oe=function(et,$e){Ae(function(vt){if(!vt)return et()},$e)},ze=null;function He(Ke){var et=fe.useRef(!1),$e=fe.useState(Ke),vt=Se($e,2),wt=vt[0],ht=vt[1];fe.useEffect(function(){return et.current=!1,function(){et.current=!0}},[]);function pt(ct,Ct){Ct&&et.current||ht(ct)}return[wt,pt]}function Ye(Ke){return Ke!==void 0}function We(Ke,et){var $e=et||{},vt=$e.defaultValue,wt=$e.value,ht=$e.onChange,pt=$e.postState,ct=He(function(){return Ye(wt)?wt:Ye(vt)?typeof vt=="function"?vt():vt:typeof Ke=="function"?Ke():Ke}),Ct=Se(ct,2),xt=Ct[0],yt=Ct[1],Tt=wt!==void 0?wt:xt,St=pt?pt(Tt):Tt,nt=Le(ht),Qe=He([Tt]),Ce=Se(Qe,2),Ne=Ce[0],Je=Ce[1];Oe(function(){var Be=Ne[0];xt!==Be&&nt(xt,Be)},[Ne]),Oe(function(){Ye(wt)||yt(wt)},[wt]);var rt=Le(function(Be,_e){yt(Be,_e),Je([Tt],_e)});return[St,rt]}var Ue={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(et){var $e=et.keyCode;if(et.altKey&&!et.ctrlKey||et.metaKey||$e>=Ue.F1&&$e<=Ue.F12)return!1;switch($e){case Ue.ALT:case Ue.CAPS_LOCK:case Ue.CONTEXT_MENU:case Ue.CTRL:case Ue.DOWN:case Ue.END:case Ue.ESC:case Ue.HOME:case Ue.INSERT:case Ue.LEFT:case Ue.MAC_FF_META:case Ue.META:case Ue.NUMLOCK:case Ue.NUM_CENTER:case Ue.PAGE_DOWN:case Ue.PAGE_UP:case Ue.PAUSE:case Ue.PRINT_SCREEN:case Ue.RIGHT:case Ue.SHIFT:case Ue.UP:case Ue.WIN_KEY:case Ue.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(et){if(et>=Ue.ZERO&&et<=Ue.NINE||et>=Ue.NUM_ZERO&&et<=Ue.NUM_MULTIPLY||et>=Ue.A&&et<=Ue.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&et===0)return!0;switch(et){case Ue.SPACE:case Ue.QUESTION_MARK:case Ue.NUM_PLUS:case Ue.NUM_MINUS:case Ue.NUM_PERIOD:case Ue.NUM_DIVISION:case Ue.SEMICOLON:case Ue.DASH:case Ue.EQUALS:case Ue.COMMA:case Ue.PERIOD:case Ue.SLASH:case Ue.APOSTROPHE:case Ue.SINGLE_QUOTE:case Ue.OPEN_SQUARE_BRACKET:case Ue.BACKSLASH:case Ue.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},st=Ue,dt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],gt=fe.forwardRef(function(Ke,et){var $e,vt=Ke.prefixCls,wt=vt===void 0?"rc-switch":vt,ht=Ke.className,pt=Ke.checked,ct=Ke.defaultChecked,Ct=Ke.disabled,xt=Ke.loadingIcon,yt=Ke.checkedChildren,Tt=Ke.unCheckedChildren,St=Ke.onClick,nt=Ke.onChange,Qe=Ke.onKeyDown,Ce=xe(Ke,dt),Ne=We(!1,{value:pt,defaultValue:ct}),Je=Te(Ne,2),rt=Je[0],Be=Je[1];function _e(kt,zt){var jt=rt;return Ct||(jt=kt,Be(jt),nt==null||nt(jt,zt)),jt}function Xe(kt){kt.which===st.LEFT?_e(!1,kt):kt.which===st.RIGHT&&_e(!0,kt),Qe==null||Qe(kt)}function lt(kt){var zt=_e(!rt,kt);St==null||St(zt,kt)}var Pt=ee()(wt,ht,($e={},Ie($e,"".concat(wt,"-checked"),rt),Ie($e,"".concat(wt,"-disabled"),Ct),$e));return fe.createElement("button",ot({},Ce,{type:"button",role:"switch","aria-checked":rt,disabled:Ct,className:Pt,ref:et,onKeyDown:Xe,onClick:lt}),xt,fe.createElement("span",{className:"".concat(wt,"-inner")},fe.createElement("span",{className:"".concat(wt,"-inner-checked")},yt),fe.createElement("span",{className:"".concat(wt,"-inner-unchecked")},Tt)))});gt.displayName="Switch";var Et=gt},86128:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return ue}});var ot=at(87462),_t=at(4942),ae=at(1413),Ge=at(97685),Ie=at(45987),me=at(67294),de=at(94184),Ee=at.n(de),we=at(64217),be=at(27822),Te=function(Se){for(var Le=Se.prefixCls,De=Se.level,Fe=Se.isStart,Ae=Se.isEnd,Oe="".concat(Le,"-indent-unit"),ze=[],He=0;He<De;He+=1)ze.push(me.createElement("span",{key:He,className:Ee()(Oe,(0,_t.Z)((0,_t.Z)({},"".concat(Oe,"-start"),Fe[He]),"".concat(Oe,"-end"),Ae[He]))}));return me.createElement("span",{"aria-hidden":"true",className:"".concat(Le,"-indent")},ze)},ve=me.memo(Te),xe=at(35381),fe=at(1089),z=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ee="open",oe="close",ie="---",le=function(Se){var Le,De,Fe,Ae=Se.eventKey,Oe=Se.className,ze=Se.style,He=Se.dragOver,Ye=Se.dragOverGapTop,We=Se.dragOverGapBottom,Ue=Se.isLeaf,st=Se.isStart,dt=Se.isEnd,gt=Se.expanded,Et=Se.selected,Ke=Se.checked,et=Se.halfChecked,$e=Se.loading,vt=Se.domRef,wt=Se.active,ht=Se.data,pt=Se.onMouseMove,ct=Se.selectable,Ct=(0,Ie.Z)(Se,z),xt=me.useContext(be.k),yt=me.useContext(be.y),Tt=me.useRef(null),St=me.useState(!1),nt=(0,Ge.Z)(St,2),Qe=nt[0],Ce=nt[1],Ne=!!(xt.disabled||Se.disabled||(Le=yt.nodeDisabled)!==null&&Le!==void 0&&Le.call(yt,ht)),Je=me.useMemo(function(){return!xt.checkable||Se.checkable===!1?!1:xt.checkable},[xt.checkable,Se.checkable]),rt=function(Mn){Ne||xt.onNodeSelect(Mn,(0,fe.F)(Se))},Be=function(Mn){Ne||!Je||Se.disableCheckbox||xt.onNodeCheck(Mn,(0,fe.F)(Se),!Ke)},_e=me.useMemo(function(){return typeof ct=="boolean"?ct:xt.selectable},[ct,xt.selectable]),Xe=function(Mn){xt.onNodeClick(Mn,(0,fe.F)(Se)),_e?rt(Mn):Be(Mn)},lt=function(Mn){xt.onNodeDoubleClick(Mn,(0,fe.F)(Se))},Pt=function(Mn){xt.onNodeMouseEnter(Mn,(0,fe.F)(Se))},kt=function(Mn){xt.onNodeMouseLeave(Mn,(0,fe.F)(Se))},zt=function(Mn){xt.onNodeContextMenu(Mn,(0,fe.F)(Se))},jt=me.useMemo(function(){return!!(xt.draggable&&(!xt.draggable.nodeDraggable||xt.draggable.nodeDraggable(ht)))},[xt.draggable,ht]),Ht=function(Mn){Mn.stopPropagation(),Ce(!0),xt.onNodeDragStart(Mn,Se);try{Mn.dataTransfer.setData("text/plain","")}catch(Rn){}},ln=function(Mn){Mn.preventDefault(),Mn.stopPropagation(),xt.onNodeDragEnter(Mn,Se)},an=function(Mn){Mn.preventDefault(),Mn.stopPropagation(),xt.onNodeDragOver(Mn,Se)},sn=function(Mn){Mn.stopPropagation(),xt.onNodeDragLeave(Mn,Se)},$t=function(Mn){Mn.stopPropagation(),Ce(!1),xt.onNodeDragEnd(Mn,Se)},On=function(Mn){Mn.preventDefault(),Mn.stopPropagation(),Ce(!1),xt.onNodeDrop(Mn,Se)},un=function(Mn){$e||xt.onNodeExpand(Mn,(0,fe.F)(Se))},mn=me.useMemo(function(){var vn=(0,xe.Z)(xt.keyEntities,Ae)||{},Mn=vn.children;return!!(Mn||[]).length},[xt.keyEntities,Ae]),In=me.useMemo(function(){return Ue===!1?!1:Ue||!xt.loadData&&!mn||xt.loadData&&Se.loaded&&!mn},[Ue,xt.loadData,mn,Se.loaded]);me.useEffect(function(){$e||typeof xt.loadData=="function"&&gt&&!In&&!Se.loaded&&xt.onNodeLoad((0,fe.F)(Se))},[$e,xt.loadData,xt.onNodeLoad,gt,In,Se]);var Sn=me.useMemo(function(){var vn;return(vn=xt.draggable)!==null&&vn!==void 0&&vn.icon?me.createElement("span",{className:"".concat(xt.prefixCls,"-draggable-icon")},xt.draggable.icon):null},[xt.draggable]),Dn=function(Mn){var Rn=Se.switcherIcon||xt.switcherIcon;return typeof Rn=="function"?Rn((0,ae.Z)((0,ae.Z)({},Se),{},{isLeaf:Mn})):Rn},fr=function(){if(In){var Mn=Dn(!0);return Mn!==!1?me.createElement("span",{className:Ee()("".concat(xt.prefixCls,"-switcher"),"".concat(xt.prefixCls,"-switcher-noop"))},Mn):null}var Rn=Dn(!1);return Rn!==!1?me.createElement("span",{onClick:un,className:Ee()("".concat(xt.prefixCls,"-switcher"),"".concat(xt.prefixCls,"-switcher_").concat(gt?ee:oe))},Rn):null},_r=me.useMemo(function(){if(!Je)return null;var vn=typeof Je!="boolean"?Je:null;return me.createElement("span",{className:Ee()("".concat(xt.prefixCls,"-checkbox"),(0,_t.Z)((0,_t.Z)((0,_t.Z)({},"".concat(xt.prefixCls,"-checkbox-checked"),Ke),"".concat(xt.prefixCls,"-checkbox-indeterminate"),!Ke&&et),"".concat(xt.prefixCls,"-checkbox-disabled"),Ne||Se.disableCheckbox)),onClick:Be,role:"checkbox","aria-checked":et?"mixed":Ke,"aria-disabled":Ne||Se.disableCheckbox,"aria-label":"Select ".concat(typeof Se.title=="string"?Se.title:"tree node")},vn)},[Je,Ke,et,Ne,Se.disableCheckbox,Se.title]),mr=me.useMemo(function(){return In?null:gt?ee:oe},[In,gt]),wi=me.useMemo(function(){return me.createElement("span",{className:Ee()("".concat(xt.prefixCls,"-iconEle"),"".concat(xt.prefixCls,"-icon__").concat(mr||"docu"),(0,_t.Z)({},"".concat(xt.prefixCls,"-icon_loading"),$e))})},[xt.prefixCls,mr,$e]),no=me.useMemo(function(){var vn=!!xt.draggable,Mn=!Se.disabled&&vn&&xt.dragOverNodeKey===Ae;return Mn?xt.dropIndicatorRender({dropPosition:xt.dropPosition,dropLevelOffset:xt.dropLevelOffset,indent:xt.indent,prefixCls:xt.prefixCls,direction:xt.direction}):null},[xt.dropPosition,xt.dropLevelOffset,xt.indent,xt.prefixCls,xt.direction,xt.draggable,xt.dragOverNodeKey,xt.dropIndicatorRender]),ro=me.useMemo(function(){var vn=Se.title,Mn=vn===void 0?ie:vn,Rn="".concat(xt.prefixCls,"-node-content-wrapper"),zn;if(xt.showIcon){var Un=Se.icon||xt.icon;zn=Un?me.createElement("span",{className:Ee()("".concat(xt.prefixCls,"-iconEle"),"".concat(xt.prefixCls,"-icon__customize"))},typeof Un=="function"?Un(Se):Un):wi}else xt.loadData&&$e&&(zn=wi);var $n;return typeof Mn=="function"?$n=Mn(ht):xt.titleRender?$n=xt.titleRender(ht):$n=Mn,me.createElement("span",{ref:Tt,title:typeof Mn=="string"?Mn:"",className:Ee()(Rn,"".concat(Rn,"-").concat(mr||"normal"),(0,_t.Z)({},"".concat(xt.prefixCls,"-node-selected"),!Ne&&(Et||Qe))),onMouseEnter:Pt,onMouseLeave:kt,onContextMenu:zt,onClick:Xe,onDoubleClick:lt},zn,me.createElement("span",{className:"".concat(xt.prefixCls,"-title")},$n),no)},[xt.prefixCls,xt.showIcon,Se,xt.icon,wi,xt.titleRender,ht,mr,Pt,kt,zt,Xe,lt]),io=(0,we.Z)(Ct,{aria:!0,data:!0}),Ji=(0,xe.Z)(xt.keyEntities,Ae)||{},lo=Ji.level,Fi=dt[dt.length-1],Jr=!Ne&&jt,bn=xt.draggingNodeKey===Ae,Ze=ct!==void 0?{"aria-selected":!!ct}:void 0;return me.createElement("div",(0,ot.Z)({ref:vt,role:"treeitem","aria-expanded":Ue?void 0:gt,className:Ee()(Oe,"".concat(xt.prefixCls,"-treenode"),(Fe={},(0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)(Fe,"".concat(xt.prefixCls,"-treenode-disabled"),Ne),"".concat(xt.prefixCls,"-treenode-switcher-").concat(gt?"open":"close"),!Ue),"".concat(xt.prefixCls,"-treenode-checkbox-checked"),Ke),"".concat(xt.prefixCls,"-treenode-checkbox-indeterminate"),et),"".concat(xt.prefixCls,"-treenode-selected"),Et),"".concat(xt.prefixCls,"-treenode-loading"),$e),"".concat(xt.prefixCls,"-treenode-active"),wt),"".concat(xt.prefixCls,"-treenode-leaf-last"),Fi),"".concat(xt.prefixCls,"-treenode-draggable"),jt),"dragging",bn),(0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)((0,_t.Z)(Fe,"drop-target",xt.dropTargetKey===Ae),"drop-container",xt.dropContainerKey===Ae),"drag-over",!Ne&&He),"drag-over-gap-top",!Ne&&Ye),"drag-over-gap-bottom",!Ne&&We),"filter-node",(De=xt.filterTreeNode)===null||De===void 0?void 0:De.call(xt,(0,fe.F)(Se))),"".concat(xt.prefixCls,"-treenode-leaf"),In))),style:ze,draggable:Jr,onDragStart:Jr?Ht:void 0,onDragEnter:jt?ln:void 0,onDragOver:jt?an:void 0,onDragLeave:jt?sn:void 0,onDrop:jt?On:void 0,onDragEnd:jt?$t:void 0,onMouseMove:pt},Ze,io),me.createElement(ve,{prefixCls:xt.prefixCls,level:lo,isStart:st,isEnd:dt}),Sn,fr(),_r,ro)};le.isTreeNode=1;var ue=le},27822:function(dn,pn,at){"use strict";at.d(pn,{k:function(){return _t},y:function(){return ae}});var ot=at(67294),_t=ot.createContext(null),ae=ot.createContext({})},70593:function(dn,pn,at){"use strict";at.d(pn,{OF:function(){return Ae.Z},y6:function(){return oe.y},ZP:function(){return Ne}});var ot=at(87462),_t=at(71002),ae=at(1413),Ge=at(74902),Ie=at(15671),me=at(43144),de=at(97326),Ee=at(60136),we=at(29388),be=at(4942),Te=at(94184),ve=at.n(Te),xe=at(15105),fe=at(64217),z=at(80334),ee=at(67294),oe=at(27822),ie=function(rt){var Be=rt.dropPosition,_e=rt.dropLevelOffset,Xe=rt.indent,lt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Be){case-1:lt.top=0,lt.left=-_e*Xe;break;case 1:lt.bottom=0,lt.left=-_e*Xe;break;case 0:lt.bottom=0,lt.left=Xe;break}return ee.createElement("div",{style:lt})},le=ie;function ue(Je){if(Je==null)throw new TypeError("Cannot destructure "+Je)}var pe=at(97685),Se=at(45987),Le=at(8410),De=at(73299),Fe=at(62874),Ae=at(86128);function Oe(Je,rt){var Be=ee.useState(!1),_e=(0,pe.Z)(Be,2),Xe=_e[0],lt=_e[1];(0,Le.Z)(function(){if(Xe)return Je(),function(){rt()}},[Xe]),(0,Le.Z)(function(){return lt(!0),function(){lt(!1)}},[])}var ze=Oe,He=at(1089),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],We=ee.forwardRef(function(Je,rt){var Be=Je.className,_e=Je.style,Xe=Je.motion,lt=Je.motionNodes,Pt=Je.motionType,kt=Je.onMotionStart,zt=Je.onMotionEnd,jt=Je.active,Ht=Je.treeNodeRequiredProps,ln=(0,Se.Z)(Je,Ye),an=ee.useState(!0),sn=(0,pe.Z)(an,2),$t=sn[0],On=sn[1],un=ee.useContext(oe.k),mn=un.prefixCls,In=lt&&Pt!=="hide";(0,Le.Z)(function(){lt&&In!==$t&&On(In)},[lt]);var Sn=function(){lt&&kt()},Dn=ee.useRef(!1),fr=function(){lt&&!Dn.current&&(Dn.current=!0,zt())};ze(Sn,fr);var _r=function(wi){In===wi&&fr()};return lt?ee.createElement(Fe.Z,(0,ot.Z)({ref:rt,visible:$t},Xe,{motionAppear:Pt==="show",onVisibleChanged:_r}),function(mr,wi){var no=mr.className,ro=mr.style;return ee.createElement("div",{ref:wi,className:ve()("".concat(mn,"-treenode-motion"),no),style:ro},lt.map(function(io){var Ji=Object.assign({},(ue(io.data),io.data)),lo=io.title,Fi=io.key,Jr=io.isStart,bn=io.isEnd;delete Ji.children;var Ze=(0,He.H8)(Fi,Ht);return ee.createElement(Ae.Z,(0,ot.Z)({},Ji,Ze,{title:lo,active:jt,data:io.data,key:Fi,isStart:Jr,isEnd:bn}))}))}):ee.createElement(Ae.Z,(0,ot.Z)({domRef:rt,className:Be,style:_e},ln,{active:jt}))}),Ue=We;function st(){var Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Be=Je.length,_e=rt.length;if(Math.abs(Be-_e)!==1)return{add:!1,key:null};function Xe(lt,Pt){var kt=new Map;lt.forEach(function(jt){kt.set(jt,!0)});var zt=Pt.filter(function(jt){return!kt.has(jt)});return zt.length===1?zt[0]:null}return Be<_e?{add:!0,key:Xe(Je,rt)}:{add:!1,key:Xe(rt,Je)}}function dt(Je,rt,Be){var _e=Je.findIndex(function(kt){return kt.key===Be}),Xe=Je[_e+1],lt=rt.findIndex(function(kt){return kt.key===Be});if(Xe){var Pt=rt.findIndex(function(kt){return kt.key===Xe.key});return rt.slice(lt+1,Pt)}return rt.slice(lt+1)}var gt=["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"],Et={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ke=function(){},et="RC_TREE_MOTION_".concat(Math.random()),$e={key:et},vt={key:et,level:0,index:0,pos:"0",node:$e,nodes:[$e]},wt={parent:null,children:[],pos:vt.pos,data:$e,title:null,key:et,isStart:[],isEnd:[]};function ht(Je,rt,Be,_e){return rt===!1||!Be?Je:Je.slice(0,Math.ceil(Be/_e)+1)}function pt(Je){var rt=Je.key,Be=Je.pos;return(0,He.km)(rt,Be)}function ct(Je){for(var rt=String(Je.data.key),Be=Je;Be.parent;)Be=Be.parent,rt="".concat(Be.data.key," > ").concat(rt);return rt}var Ct=ee.forwardRef(function(Je,rt){var Be=Je.prefixCls,_e=Je.data,Xe=Je.selectable,lt=Je.checkable,Pt=Je.expandedKeys,kt=Je.selectedKeys,zt=Je.checkedKeys,jt=Je.loadedKeys,Ht=Je.loadingKeys,ln=Je.halfCheckedKeys,an=Je.keyEntities,sn=Je.disabled,$t=Je.dragging,On=Je.dragOverNodeKey,un=Je.dropPosition,mn=Je.motion,In=Je.height,Sn=Je.itemHeight,Dn=Je.virtual,fr=Je.scrollWidth,_r=Je.focusable,mr=Je.activeItem,wi=Je.focused,no=Je.tabIndex,ro=Je.onKeyDown,io=Je.onFocus,Ji=Je.onBlur,lo=Je.onActiveChange,Fi=Je.onListChangeStart,Jr=Je.onListChangeEnd,bn=(0,Se.Z)(Je,gt),Ze=ee.useRef(null),vn=ee.useRef(null);ee.useImperativeHandle(rt,function(){return{scrollTo:function(ko){Ze.current.scrollTo(ko)},getIndentWidth:function(){return vn.current.offsetWidth}}});var Mn=ee.useState(Pt),Rn=(0,pe.Z)(Mn,2),zn=Rn[0],Un=Rn[1],$n=ee.useState(_e),Mr=(0,pe.Z)($n,2),nn=Mr[0],on=Mr[1],Kt=ee.useState(_e),hn=(0,pe.Z)(Kt,2),qn=hn[0],tr=hn[1],ur=ee.useState([]),Qt=(0,pe.Z)(ur,2),Cn=Qt[0],dr=Qt[1],Ar=ee.useState(null),_n=(0,pe.Z)(Ar,2),Zt=_n[0],ir=_n[1],Nr=ee.useRef(_e);Nr.current=_e;function si(){var yi=Nr.current;on(yi),tr(yi),dr([]),ir(null),Jr()}(0,Le.Z)(function(){Un(Pt);var yi=st(zn,Pt);if(yi.key!==null)if(yi.add){var ko=nn.findIndex(function(oo){var Xn=oo.key;return Xn===yi.key}),zi=ht(dt(nn,_e,yi.key),Dn,In,Sn),xr=nn.slice();xr.splice(ko+1,0,wt),tr(xr),dr(zi),ir("show")}else{var gr=_e.findIndex(function(oo){var Xn=oo.key;return Xn===yi.key}),Lr=ht(dt(_e,nn,yi.key),Dn,In,Sn),_i=_e.slice();_i.splice(gr+1,0,wt),tr(_i),dr(Lr),ir("hide")}else nn!==_e&&(on(_e),tr(_e))},[Pt,_e]),ee.useEffect(function(){$t||si()},[$t]);var Tn=mn?qn:_e,vr={expandedKeys:Pt,selectedKeys:kt,loadedKeys:jt,loadingKeys:Ht,checkedKeys:zt,halfCheckedKeys:ln,dragOverNodeKey:On,dropPosition:un,keyEntities:an};return ee.createElement(ee.Fragment,null,wi&&mr&&ee.createElement("span",{style:Et,"aria-live":"assertive"},ct(mr)),ee.createElement("div",null,ee.createElement("input",{style:Et,disabled:_r===!1||sn,tabIndex:_r!==!1?no:null,onKeyDown:ro,onFocus:io,onBlur:Ji,value:"",onChange:Ke,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Be,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Be,"-indent")},ee.createElement("div",{ref:vn,className:"".concat(Be,"-indent-unit")}))),ee.createElement(De.Z,(0,ot.Z)({},bn,{data:Tn,itemKey:pt,height:In,fullHeight:!1,virtual:Dn,itemHeight:Sn,scrollWidth:fr,prefixCls:"".concat(Be,"-list"),ref:Ze,role:"tree",onVisibleChange:function(ko){ko.every(function(zi){return pt(zi)!==et})&&si()}}),function(yi){var ko=yi.pos,zi=Object.assign({},(ue(yi.data),yi.data)),xr=yi.title,gr=yi.key,Lr=yi.isStart,_i=yi.isEnd,oo=(0,He.km)(gr,ko);delete zi.key,delete zi.children;var Xn=(0,He.H8)(oo,vr);return ee.createElement(Ue,(0,ot.Z)({},zi,Xn,{title:xr,active:!!mr&&gr===mr.key,pos:ko,data:yi.data,isStart:Lr,isEnd:_i,motion:mn,motionNodes:gr===et?Cn:null,motionType:Zt,onMotionStart:Fi,onMotionEnd:si,treeNodeRequiredProps:vr,onMouseMove:function(){lo(null)}}))}))}),xt=Ct,yt=at(10225),Tt=at(17341),St=at(35381),nt=10,Qe=function(Je){(0,Ee.Z)(Be,Je);var rt=(0,we.Z)(Be);function Be(){var _e;(0,Ie.Z)(this,Be);for(var Xe=arguments.length,lt=new Array(Xe),Pt=0;Pt<Xe;Pt++)lt[Pt]=arguments[Pt];return _e=rt.call.apply(rt,[this].concat(lt)),(0,be.Z)((0,de.Z)(_e),"destroyed",!1),(0,be.Z)((0,de.Z)(_e),"delayedDragEnterLogic",void 0),(0,be.Z)((0,de.Z)(_e),"loadingRetryTimes",{}),(0,be.Z)((0,de.Z)(_e),"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,He.w$)()}),(0,be.Z)((0,de.Z)(_e),"dragStartMousePosition",null),(0,be.Z)((0,de.Z)(_e),"dragNodeProps",null),(0,be.Z)((0,de.Z)(_e),"currentMouseOverDroppableNodeKey",null),(0,be.Z)((0,de.Z)(_e),"listRef",ee.createRef()),(0,be.Z)((0,de.Z)(_e),"onNodeDragStart",function(kt,zt){var jt=_e.state,Ht=jt.expandedKeys,ln=jt.keyEntities,an=_e.props.onDragStart,sn=zt.eventKey;_e.dragNodeProps=zt,_e.dragStartMousePosition={x:kt.clientX,y:kt.clientY};var $t=(0,yt._5)(Ht,sn);_e.setState({draggingNodeKey:sn,dragChildrenKeys:(0,yt.wA)(sn,ln),indent:_e.listRef.current.getIndentWidth()}),_e.setExpandedKeys($t),window.addEventListener("dragend",_e.onWindowDragEnd),an==null||an({event:kt,node:(0,He.F)(zt)})}),(0,be.Z)((0,de.Z)(_e),"onNodeDragEnter",function(kt,zt){var jt=_e.state,Ht=jt.expandedKeys,ln=jt.keyEntities,an=jt.dragChildrenKeys,sn=jt.flattenNodes,$t=jt.indent,On=_e.props,un=On.onDragEnter,mn=On.onExpand,In=On.allowDrop,Sn=On.direction,Dn=zt.pos,fr=zt.eventKey;if(_e.currentMouseOverDroppableNodeKey!==fr&&(_e.currentMouseOverDroppableNodeKey=fr),!_e.dragNodeProps){_e.resetDragState();return}var _r=(0,yt.OM)(kt,_e.dragNodeProps,zt,$t,_e.dragStartMousePosition,In,sn,ln,Ht,Sn),mr=_r.dropPosition,wi=_r.dropLevelOffset,no=_r.dropTargetKey,ro=_r.dropContainerKey,io=_r.dropTargetPos,Ji=_r.dropAllowed,lo=_r.dragOverNodeKey;if(an.includes(no)||!Ji){_e.resetDragState();return}if(_e.delayedDragEnterLogic||(_e.delayedDragEnterLogic={}),Object.keys(_e.delayedDragEnterLogic).forEach(function(Fi){clearTimeout(_e.delayedDragEnterLogic[Fi])}),_e.dragNodeProps.eventKey!==zt.eventKey&&(kt.persist(),_e.delayedDragEnterLogic[Dn]=window.setTimeout(function(){if(_e.state.draggingNodeKey!==null){var Fi=(0,Ge.Z)(Ht),Jr=(0,St.Z)(ln,zt.eventKey);Jr&&(Jr.children||[]).length&&(Fi=(0,yt.L0)(Ht,zt.eventKey)),_e.props.hasOwnProperty("expandedKeys")||_e.setExpandedKeys(Fi),mn==null||mn(Fi,{node:(0,He.F)(zt),expanded:!0,nativeEvent:kt.nativeEvent})}},800)),_e.dragNodeProps.eventKey===no&&wi===0){_e.resetDragState();return}_e.setState({dragOverNodeKey:lo,dropPosition:mr,dropLevelOffset:wi,dropTargetKey:no,dropContainerKey:ro,dropTargetPos:io,dropAllowed:Ji}),un==null||un({event:kt,node:(0,He.F)(zt),expandedKeys:Ht})}),(0,be.Z)((0,de.Z)(_e),"onNodeDragOver",function(kt,zt){var jt=_e.state,Ht=jt.dragChildrenKeys,ln=jt.flattenNodes,an=jt.keyEntities,sn=jt.expandedKeys,$t=jt.indent,On=_e.props,un=On.onDragOver,mn=On.allowDrop,In=On.direction;if(_e.dragNodeProps){var Sn=(0,yt.OM)(kt,_e.dragNodeProps,zt,$t,_e.dragStartMousePosition,mn,ln,an,sn,In),Dn=Sn.dropPosition,fr=Sn.dropLevelOffset,_r=Sn.dropTargetKey,mr=Sn.dropContainerKey,wi=Sn.dropTargetPos,no=Sn.dropAllowed,ro=Sn.dragOverNodeKey;Ht.includes(_r)||!no||(_e.dragNodeProps.eventKey===_r&&fr===0?_e.state.dropPosition===null&&_e.state.dropLevelOffset===null&&_e.state.dropTargetKey===null&&_e.state.dropContainerKey===null&&_e.state.dropTargetPos===null&&_e.state.dropAllowed===!1&&_e.state.dragOverNodeKey===null||_e.resetDragState():Dn===_e.state.dropPosition&&fr===_e.state.dropLevelOffset&&_r===_e.state.dropTargetKey&&mr===_e.state.dropContainerKey&&wi===_e.state.dropTargetPos&&no===_e.state.dropAllowed&&ro===_e.state.dragOverNodeKey||_e.setState({dropPosition:Dn,dropLevelOffset:fr,dropTargetKey:_r,dropContainerKey:mr,dropTargetPos:wi,dropAllowed:no,dragOverNodeKey:ro}),un==null||un({event:kt,node:(0,He.F)(zt)}))}}),(0,be.Z)((0,de.Z)(_e),"onNodeDragLeave",function(kt,zt){_e.currentMouseOverDroppableNodeKey===zt.eventKey&&!kt.currentTarget.contains(kt.relatedTarget)&&(_e.resetDragState(),_e.currentMouseOverDroppableNodeKey=null);var jt=_e.props.onDragLeave;jt==null||jt({event:kt,node:(0,He.F)(zt)})}),(0,be.Z)((0,de.Z)(_e),"onWindowDragEnd",function(kt){_e.onNodeDragEnd(kt,null,!0),window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,be.Z)((0,de.Z)(_e),"onNodeDragEnd",function(kt,zt){var jt=_e.props.onDragEnd;_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),jt==null||jt({event:kt,node:(0,He.F)(zt)}),_e.dragNodeProps=null,window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,be.Z)((0,de.Z)(_e),"onNodeDrop",function(kt,zt){var jt,Ht=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ln=_e.state,an=ln.dragChildrenKeys,sn=ln.dropPosition,$t=ln.dropTargetKey,On=ln.dropTargetPos,un=ln.dropAllowed;if(un){var mn=_e.props.onDrop;if(_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),$t!==null){var In=(0,ae.Z)((0,ae.Z)({},(0,He.H8)($t,_e.getTreeNodeRequiredProps())),{},{active:((jt=_e.getActiveItem())===null||jt===void 0?void 0:jt.key)===$t,data:(0,St.Z)(_e.state.keyEntities,$t).node}),Sn=an.includes($t);(0,z.ZP)(!Sn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Dn=(0,yt.yx)(On),fr={event:kt,node:(0,He.F)(In),dragNode:_e.dragNodeProps?(0,He.F)(_e.dragNodeProps):null,dragNodesKeys:[_e.dragNodeProps.eventKey].concat(an),dropToGap:sn!==0,dropPosition:sn+Number(Dn[Dn.length-1])};Ht||mn==null||mn(fr),_e.dragNodeProps=null}}}),(0,be.Z)((0,de.Z)(_e),"cleanDragState",function(){var kt=_e.state.draggingNodeKey;kt!==null&&_e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_e.dragStartMousePosition=null,_e.currentMouseOverDroppableNodeKey=null}),(0,be.Z)((0,de.Z)(_e),"triggerExpandActionExpand",function(kt,zt){var jt=_e.state,Ht=jt.expandedKeys,ln=jt.flattenNodes,an=zt.expanded,sn=zt.key,$t=zt.isLeaf;if(!($t||kt.shiftKey||kt.metaKey||kt.ctrlKey)){var On=ln.filter(function(mn){return mn.key===sn})[0],un=(0,He.F)((0,ae.Z)((0,ae.Z)({},(0,He.H8)(sn,_e.getTreeNodeRequiredProps())),{},{data:On.data}));_e.setExpandedKeys(an?(0,yt._5)(Ht,sn):(0,yt.L0)(Ht,sn)),_e.onNodeExpand(kt,un)}}),(0,be.Z)((0,de.Z)(_e),"onNodeClick",function(kt,zt){var jt=_e.props,Ht=jt.onClick,ln=jt.expandAction;ln==="click"&&_e.triggerExpandActionExpand(kt,zt),Ht==null||Ht(kt,zt)}),(0,be.Z)((0,de.Z)(_e),"onNodeDoubleClick",function(kt,zt){var jt=_e.props,Ht=jt.onDoubleClick,ln=jt.expandAction;ln==="doubleClick"&&_e.triggerExpandActionExpand(kt,zt),Ht==null||Ht(kt,zt)}),(0,be.Z)((0,de.Z)(_e),"onNodeSelect",function(kt,zt){var jt=_e.state.selectedKeys,Ht=_e.state,ln=Ht.keyEntities,an=Ht.fieldNames,sn=_e.props,$t=sn.onSelect,On=sn.multiple,un=zt.selected,mn=zt[an.key],In=!un;In?On?jt=(0,yt.L0)(jt,mn):jt=[mn]:jt=(0,yt._5)(jt,mn);var Sn=jt.map(function(Dn){var fr=(0,St.Z)(ln,Dn);return fr?fr.node:null}).filter(Boolean);_e.setUncontrolledState({selectedKeys:jt}),$t==null||$t(jt,{event:"select",selected:In,node:zt,selectedNodes:Sn,nativeEvent:kt.nativeEvent})}),(0,be.Z)((0,de.Z)(_e),"onNodeCheck",function(kt,zt,jt){var Ht=_e.state,ln=Ht.keyEntities,an=Ht.checkedKeys,sn=Ht.halfCheckedKeys,$t=_e.props,On=$t.checkStrictly,un=$t.onCheck,mn=zt.key,In,Sn={event:"check",node:zt,checked:jt,nativeEvent:kt.nativeEvent};if(On){var Dn=jt?(0,yt.L0)(an,mn):(0,yt._5)(an,mn),fr=(0,yt._5)(sn,mn);In={checked:Dn,halfChecked:fr},Sn.checkedNodes=Dn.map(function(io){return(0,St.Z)(ln,io)}).filter(Boolean).map(function(io){return io.node}),_e.setUncontrolledState({checkedKeys:Dn})}else{var _r=(0,Tt.S)([].concat((0,Ge.Z)(an),[mn]),!0,ln),mr=_r.checkedKeys,wi=_r.halfCheckedKeys;if(!jt){var no=new Set(mr);no.delete(mn);var ro=(0,Tt.S)(Array.from(no),{checked:!1,halfCheckedKeys:wi},ln);mr=ro.checkedKeys,wi=ro.halfCheckedKeys}In=mr,Sn.checkedNodes=[],Sn.checkedNodesPositions=[],Sn.halfCheckedKeys=wi,mr.forEach(function(io){var Ji=(0,St.Z)(ln,io);if(Ji){var lo=Ji.node,Fi=Ji.pos;Sn.checkedNodes.push(lo),Sn.checkedNodesPositions.push({node:lo,pos:Fi})}}),_e.setUncontrolledState({checkedKeys:mr},!1,{halfCheckedKeys:wi})}un==null||un(In,Sn)}),(0,be.Z)((0,de.Z)(_e),"onNodeLoad",function(kt){var zt,jt=kt.key,Ht=_e.state.keyEntities,ln=(0,St.Z)(Ht,jt);if(!(ln!=null&&(zt=ln.children)!==null&&zt!==void 0&&zt.length)){var an=new Promise(function(sn,$t){_e.setState(function(On){var un=On.loadedKeys,mn=un===void 0?[]:un,In=On.loadingKeys,Sn=In===void 0?[]:In,Dn=_e.props,fr=Dn.loadData,_r=Dn.onLoad;if(!fr||mn.includes(jt)||Sn.includes(jt))return null;var mr=fr(kt);return mr.then(function(){var wi=_e.state.loadedKeys,no=(0,yt.L0)(wi,jt);_r==null||_r(no,{event:"load",node:kt}),_e.setUncontrolledState({loadedKeys:no}),_e.setState(function(ro){return{loadingKeys:(0,yt._5)(ro.loadingKeys,jt)}}),sn()}).catch(function(wi){if(_e.setState(function(ro){return{loadingKeys:(0,yt._5)(ro.loadingKeys,jt)}}),_e.loadingRetryTimes[jt]=(_e.loadingRetryTimes[jt]||0)+1,_e.loadingRetryTimes[jt]>=nt){var no=_e.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_e.setUncontrolledState({loadedKeys:(0,yt.L0)(no,jt)}),sn()}$t(wi)}),{loadingKeys:(0,yt.L0)(Sn,jt)}})});return an.catch(function(){}),an}}),(0,be.Z)((0,de.Z)(_e),"onNodeMouseEnter",function(kt,zt){var jt=_e.props.onMouseEnter;jt==null||jt({event:kt,node:zt})}),(0,be.Z)((0,de.Z)(_e),"onNodeMouseLeave",function(kt,zt){var jt=_e.props.onMouseLeave;jt==null||jt({event:kt,node:zt})}),(0,be.Z)((0,de.Z)(_e),"onNodeContextMenu",function(kt,zt){var jt=_e.props.onRightClick;jt&&(kt.preventDefault(),jt({event:kt,node:zt}))}),(0,be.Z)((0,de.Z)(_e),"onFocus",function(){var kt=_e.props.onFocus;_e.setState({focused:!0});for(var zt=arguments.length,jt=new Array(zt),Ht=0;Ht<zt;Ht++)jt[Ht]=arguments[Ht];kt==null||kt.apply(void 0,jt)}),(0,be.Z)((0,de.Z)(_e),"onBlur",function(){var kt=_e.props.onBlur;_e.setState({focused:!1}),_e.onActiveChange(null);for(var zt=arguments.length,jt=new Array(zt),Ht=0;Ht<zt;Ht++)jt[Ht]=arguments[Ht];kt==null||kt.apply(void 0,jt)}),(0,be.Z)((0,de.Z)(_e),"getTreeNodeRequiredProps",function(){var kt=_e.state,zt=kt.expandedKeys,jt=kt.selectedKeys,Ht=kt.loadedKeys,ln=kt.loadingKeys,an=kt.checkedKeys,sn=kt.halfCheckedKeys,$t=kt.dragOverNodeKey,On=kt.dropPosition,un=kt.keyEntities;return{expandedKeys:zt||[],selectedKeys:jt||[],loadedKeys:Ht||[],loadingKeys:ln||[],checkedKeys:an||[],halfCheckedKeys:sn||[],dragOverNodeKey:$t,dropPosition:On,keyEntities:un}}),(0,be.Z)((0,de.Z)(_e),"setExpandedKeys",function(kt){var zt=_e.state,jt=zt.treeData,Ht=zt.fieldNames,ln=(0,He.oH)(jt,kt,Ht);_e.setUncontrolledState({expandedKeys:kt,flattenNodes:ln},!0)}),(0,be.Z)((0,de.Z)(_e),"onNodeExpand",function(kt,zt){var jt=_e.state.expandedKeys,Ht=_e.state,ln=Ht.listChanging,an=Ht.fieldNames,sn=_e.props,$t=sn.onExpand,On=sn.loadData,un=zt.expanded,mn=zt[an.key];if(!ln){var In=jt.includes(mn),Sn=!un;if((0,z.ZP)(un&&In||!un&&!In,"Expand state not sync with index check"),jt=Sn?(0,yt.L0)(jt,mn):(0,yt._5)(jt,mn),_e.setExpandedKeys(jt),$t==null||$t(jt,{node:zt,expanded:Sn,nativeEvent:kt.nativeEvent}),Sn&&On){var Dn=_e.onNodeLoad(zt);Dn&&Dn.then(function(){var fr=(0,He.oH)(_e.state.treeData,jt,an);_e.setUncontrolledState({flattenNodes:fr})}).catch(function(){var fr=_e.state.expandedKeys,_r=(0,yt._5)(fr,mn);_e.setExpandedKeys(_r)})}}}),(0,be.Z)((0,de.Z)(_e),"onListChangeStart",function(){_e.setUncontrolledState({listChanging:!0})}),(0,be.Z)((0,de.Z)(_e),"onListChangeEnd",function(){setTimeout(function(){_e.setUncontrolledState({listChanging:!1})})}),(0,be.Z)((0,de.Z)(_e),"onActiveChange",function(kt){var zt=_e.state.activeKey,jt=_e.props,Ht=jt.onActiveChange,ln=jt.itemScrollOffset,an=ln===void 0?0:ln;zt!==kt&&(_e.setState({activeKey:kt}),kt!==null&&_e.scrollTo({key:kt,offset:an}),Ht==null||Ht(kt))}),(0,be.Z)((0,de.Z)(_e),"getActiveItem",function(){var kt=_e.state,zt=kt.activeKey,jt=kt.flattenNodes;return zt===null?null:jt.find(function(Ht){var ln=Ht.key;return ln===zt})||null}),(0,be.Z)((0,de.Z)(_e),"offsetActiveKey",function(kt){var zt=_e.state,jt=zt.flattenNodes,Ht=zt.activeKey,ln=jt.findIndex(function($t){var On=$t.key;return On===Ht});ln===-1&&kt<0&&(ln=jt.length),ln=(ln+kt+jt.length)%jt.length;var an=jt[ln];if(an){var sn=an.key;_e.onActiveChange(sn)}else _e.onActiveChange(null)}),(0,be.Z)((0,de.Z)(_e),"onKeyDown",function(kt){var zt=_e.state,jt=zt.activeKey,Ht=zt.expandedKeys,ln=zt.checkedKeys,an=zt.fieldNames,sn=_e.props,$t=sn.onKeyDown,On=sn.checkable,un=sn.selectable;switch(kt.which){case xe.Z.UP:{_e.offsetActiveKey(-1),kt.preventDefault();break}case xe.Z.DOWN:{_e.offsetActiveKey(1),kt.preventDefault();break}}var mn=_e.getActiveItem();if(mn&&mn.data){var In=_e.getTreeNodeRequiredProps(),Sn=mn.data.isLeaf===!1||!!(mn.data[an.children]||[]).length,Dn=(0,He.F)((0,ae.Z)((0,ae.Z)({},(0,He.H8)(jt,In)),{},{data:mn.data,active:!0}));switch(kt.which){case xe.Z.LEFT:{Sn&&Ht.includes(jt)?_e.onNodeExpand({},Dn):mn.parent&&_e.onActiveChange(mn.parent.key),kt.preventDefault();break}case xe.Z.RIGHT:{Sn&&!Ht.includes(jt)?_e.onNodeExpand({},Dn):mn.children&&mn.children.length&&_e.onActiveChange(mn.children[0].key),kt.preventDefault();break}case xe.Z.ENTER:case xe.Z.SPACE:{On&&!Dn.disabled&&Dn.checkable!==!1&&!Dn.disableCheckbox?_e.onNodeCheck({},Dn,!ln.includes(jt)):!On&&un&&!Dn.disabled&&Dn.selectable!==!1&&_e.onNodeSelect({},Dn);break}}}$t==null||$t(kt)}),(0,be.Z)((0,de.Z)(_e),"setUncontrolledState",function(kt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,jt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_e.destroyed){var Ht=!1,ln=!0,an={};Object.keys(kt).forEach(function(sn){if(_e.props.hasOwnProperty(sn)){ln=!1;return}Ht=!0,an[sn]=kt[sn]}),Ht&&(!zt||ln)&&_e.setState((0,ae.Z)((0,ae.Z)({},an),jt))}}),(0,be.Z)((0,de.Z)(_e),"scrollTo",function(kt){_e.listRef.current.scrollTo(kt)}),_e}return(0,me.Z)(Be,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Xe=this.props,lt=Xe.activeKey,Pt=Xe.itemScrollOffset,kt=Pt===void 0?0:Pt;lt!==void 0&&lt!==this.state.activeKey&&(this.setState({activeKey:lt}),lt!==null&&this.scrollTo({key:lt,offset:kt}))}},{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 Xe=this.state,lt=Xe.focused,Pt=Xe.flattenNodes,kt=Xe.keyEntities,zt=Xe.draggingNodeKey,jt=Xe.activeKey,Ht=Xe.dropLevelOffset,ln=Xe.dropContainerKey,an=Xe.dropTargetKey,sn=Xe.dropPosition,$t=Xe.dragOverNodeKey,On=Xe.indent,un=this.props,mn=un.prefixCls,In=un.className,Sn=un.style,Dn=un.showLine,fr=un.focusable,_r=un.tabIndex,mr=_r===void 0?0:_r,wi=un.selectable,no=un.showIcon,ro=un.icon,io=un.switcherIcon,Ji=un.draggable,lo=un.checkable,Fi=un.checkStrictly,Jr=un.disabled,bn=un.motion,Ze=un.loadData,vn=un.filterTreeNode,Mn=un.height,Rn=un.itemHeight,zn=un.scrollWidth,Un=un.virtual,$n=un.titleRender,Mr=un.dropIndicatorRender,nn=un.onContextMenu,on=un.onScroll,Kt=un.direction,hn=un.rootClassName,qn=un.rootStyle,tr=(0,fe.Z)(this.props,{aria:!0,data:!0}),ur;Ji&&((0,_t.Z)(Ji)==="object"?ur=Ji:typeof Ji=="function"?ur={nodeDraggable:Ji}:ur={});var Qt={prefixCls:mn,selectable:wi,showIcon:no,icon:ro,switcherIcon:io,draggable:ur,draggingNodeKey:zt,checkable:lo,checkStrictly:Fi,disabled:Jr,keyEntities:kt,dropLevelOffset:Ht,dropContainerKey:ln,dropTargetKey:an,dropPosition:sn,dragOverNodeKey:$t,indent:On,direction:Kt,dropIndicatorRender:Mr,loadData:Ze,filterTreeNode:vn,titleRender:$n,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 ee.createElement(oe.k.Provider,{value:Qt},ee.createElement("div",{className:ve()(mn,In,hn,(0,be.Z)((0,be.Z)((0,be.Z)({},"".concat(mn,"-show-line"),Dn),"".concat(mn,"-focused"),lt),"".concat(mn,"-active-focused"),jt!==null)),style:qn},ee.createElement(xt,(0,ot.Z)({ref:this.listRef,prefixCls:mn,style:Sn,data:Pt,disabled:Jr,selectable:wi,checkable:!!lo,motion:bn,dragging:zt!==null,height:Mn,itemHeight:Rn,virtual:Un,focusable:fr,focused:lt,tabIndex:mr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:nn,onScroll:on,scrollWidth:zn},this.getTreeNodeRequiredProps(),tr))))}}],[{key:"getDerivedStateFromProps",value:function(Xe,lt){var Pt=lt.prevProps,kt={prevProps:Xe};function zt(mr){return!Pt&&Xe.hasOwnProperty(mr)||Pt&&Pt[mr]!==Xe[mr]}var jt,Ht=lt.fieldNames;if(zt("fieldNames")&&(Ht=(0,He.w$)(Xe.fieldNames),kt.fieldNames=Ht),zt("treeData")?jt=Xe.treeData:zt("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),jt=(0,He.zn)(Xe.children)),jt){kt.treeData=jt;var ln=(0,He.I8)(jt,{fieldNames:Ht});kt.keyEntities=(0,ae.Z)((0,be.Z)({},et,vt),ln.keyEntities)}var an=kt.keyEntities||lt.keyEntities;if(zt("expandedKeys")||Pt&&zt("autoExpandParent"))kt.expandedKeys=Xe.autoExpandParent||!Pt&&Xe.defaultExpandParent?(0,yt.r7)(Xe.expandedKeys,an):Xe.expandedKeys;else if(!Pt&&Xe.defaultExpandAll){var sn=(0,ae.Z)({},an);delete sn[et];var $t=[];Object.keys(sn).forEach(function(mr){var wi=sn[mr];wi.children&&wi.children.length&&$t.push(wi.key)}),kt.expandedKeys=$t}else!Pt&&Xe.defaultExpandedKeys&&(kt.expandedKeys=Xe.autoExpandParent||Xe.defaultExpandParent?(0,yt.r7)(Xe.defaultExpandedKeys,an):Xe.defaultExpandedKeys);if(kt.expandedKeys||delete kt.expandedKeys,jt||kt.expandedKeys){var On=(0,He.oH)(jt||lt.treeData,kt.expandedKeys||lt.expandedKeys,Ht);kt.flattenNodes=On}if(Xe.selectable&&(zt("selectedKeys")?kt.selectedKeys=(0,yt.BT)(Xe.selectedKeys,Xe):!Pt&&Xe.defaultSelectedKeys&&(kt.selectedKeys=(0,yt.BT)(Xe.defaultSelectedKeys,Xe))),Xe.checkable){var un;if(zt("checkedKeys")?un=(0,yt.E6)(Xe.checkedKeys)||{}:!Pt&&Xe.defaultCheckedKeys?un=(0,yt.E6)(Xe.defaultCheckedKeys)||{}:jt&&(un=(0,yt.E6)(Xe.checkedKeys)||{checkedKeys:lt.checkedKeys,halfCheckedKeys:lt.halfCheckedKeys}),un){var mn=un,In=mn.checkedKeys,Sn=In===void 0?[]:In,Dn=mn.halfCheckedKeys,fr=Dn===void 0?[]:Dn;if(!Xe.checkStrictly){var _r=(0,Tt.S)(Sn,!0,an);Sn=_r.checkedKeys,fr=_r.halfCheckedKeys}kt.checkedKeys=Sn,kt.halfCheckedKeys=fr}}return zt("loadedKeys")&&(kt.loadedKeys=Xe.loadedKeys),kt}}]),Be}(ee.Component);(0,be.Z)(Qe,"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:le,allowDrop:function(){return!0},expandAction:!1}),(0,be.Z)(Qe,"TreeNode",Ae.Z);var Ce=Qe,Ne=Ce},10225:function(dn,pn,at){"use strict";at.d(pn,{BT:function(){return ee},E6:function(){return le},L0:function(){return be},OM:function(){return z},_5:function(){return we},r7:function(){return ue},wA:function(){return ve},yx:function(){return Te}});var ot=at(74902),_t=at(71002),ae=at(80334),Ge=at(67294),Ie=at(86128),me=at(35381),de=at(1089),Ee=null;function we(pe,Se){if(!pe)return[];var Le=pe.slice(),De=Le.indexOf(Se);return De>=0&&Le.splice(De,1),Le}function be(pe,Se){var Le=(pe||[]).slice();return Le.indexOf(Se)===-1&&Le.push(Se),Le}function Te(pe){return pe.split("-")}function ve(pe,Se){var Le=[],De=(0,me.Z)(Se,pe);function Fe(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ae.forEach(function(Oe){var ze=Oe.key,He=Oe.children;Le.push(ze),Fe(He)})}return Fe(De.children),Le}function xe(pe){if(pe.parent){var Se=Te(pe.pos);return Number(Se[Se.length-1])===pe.parent.children.length-1}return!1}function fe(pe){var Se=Te(pe.pos);return Number(Se[Se.length-1])===0}function z(pe,Se,Le,De,Fe,Ae,Oe,ze,He,Ye){var We,Ue=pe.clientX,st=pe.clientY,dt=pe.target.getBoundingClientRect(),gt=dt.top,Et=dt.height,Ke=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Ue),et=(Ke-12)/De,$e=He.filter(function(Ne){var Je;return(Je=ze[Ne])===null||Je===void 0||(Je=Je.children)===null||Je===void 0?void 0:Je.length}),vt=(0,me.Z)(ze,Le.eventKey);if(st<gt+Et/2){var wt=Oe.findIndex(function(Ne){return Ne.key===vt.key}),ht=wt<=0?0:wt-1,pt=Oe[ht].key;vt=(0,me.Z)(ze,pt)}var ct=vt.key,Ct=vt,xt=vt.key,yt=0,Tt=0;if(!$e.includes(ct))for(var St=0;St<et&&xe(vt);St+=1)vt=vt.parent,Tt+=1;var nt=Se.data,Qe=vt.node,Ce=!0;return fe(vt)&&vt.level===0&&st<gt+Et/2&&Ae({dragNode:nt,dropNode:Qe,dropPosition:-1})&&vt.key===Le.eventKey?yt=-1:(Ct.children||[]).length&&$e.includes(xt)?Ae({dragNode:nt,dropNode:Qe,dropPosition:0})?yt=0:Ce=!1:Tt===0?et>-1.5?Ae({dragNode:nt,dropNode:Qe,dropPosition:1})?yt=1:Ce=!1:Ae({dragNode:nt,dropNode:Qe,dropPosition:0})?yt=0:Ae({dragNode:nt,dropNode:Qe,dropPosition:1})?yt=1:Ce=!1:Ae({dragNode:nt,dropNode:Qe,dropPosition:1})?yt=1:Ce=!1,{dropPosition:yt,dropLevelOffset:Tt,dropTargetKey:vt.key,dropTargetPos:vt.pos,dragOverNodeKey:xt,dropContainerKey:yt===0?null:((We=vt.parent)===null||We===void 0?void 0:We.key)||null,dropAllowed:Ce}}function ee(pe,Se){if(pe){var Le=Se.multiple;return Le?pe.slice():pe.length?[pe[0]]:pe}}var oe=function(Se){return Se};function ie(pe,Se){if(!pe)return[];var Le=Se||{},De=Le.processProps,Fe=De===void 0?oe:De,Ae=Array.isArray(pe)?pe:[pe];return Ae.map(function(Oe){var ze=Oe.children,He=_objectWithoutProperties(Oe,Ee),Ye=ie(ze,Se);return React.createElement(TreeNode,_extends({key:He.key},Fe(He)),Ye)})}function le(pe){if(!pe)return null;var Se;if(Array.isArray(pe))Se={checkedKeys:pe,halfCheckedKeys:void 0};else if((0,_t.Z)(pe)==="object")Se={checkedKeys:pe.checked||void 0,halfCheckedKeys:pe.halfChecked||void 0};else return(0,ae.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Se}function ue(pe,Se){var Le=new Set;function De(Fe){if(!Le.has(Fe)){var Ae=(0,me.Z)(Se,Fe);if(Ae){Le.add(Fe);var Oe=Ae.parent,ze=Ae.node;ze.disabled||Oe&&De(Oe.key)}}}return(pe||[]).forEach(function(Fe){De(Fe)}),(0,ot.Z)(Le)}},17341:function(dn,pn,at){"use strict";at.d(pn,{S:function(){return de}});var ot=at(80334),_t=at(35381);function ae(Ee,we){var be=new Set;return Ee.forEach(function(Te){we.has(Te)||be.add(Te)}),be}function Ge(Ee){var we=Ee||{},be=we.disabled,Te=we.disableCheckbox,ve=we.checkable;return!!(be||Te)||ve===!1}function Ie(Ee,we,be,Te){for(var ve=new Set(Ee),xe=new Set,fe=0;fe<=be;fe+=1){var z=we.get(fe)||new Set;z.forEach(function(le){var ue=le.key,pe=le.node,Se=le.children,Le=Se===void 0?[]:Se;ve.has(ue)&&!Te(pe)&&Le.filter(function(De){return!Te(De.node)}).forEach(function(De){ve.add(De.key)})})}for(var ee=new Set,oe=be;oe>=0;oe-=1){var ie=we.get(oe)||new Set;ie.forEach(function(le){var ue=le.parent,pe=le.node;if(!(Te(pe)||!le.parent||ee.has(le.parent.key))){if(Te(le.parent.node)){ee.add(ue.key);return}var Se=!0,Le=!1;(ue.children||[]).filter(function(De){return!Te(De.node)}).forEach(function(De){var Fe=De.key,Ae=ve.has(Fe);Se&&!Ae&&(Se=!1),!Le&&(Ae||xe.has(Fe))&&(Le=!0)}),Se&&ve.add(ue.key),Le&&xe.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(ae(xe,ve))}}function me(Ee,we,be,Te,ve){for(var xe=new Set(Ee),fe=new Set(we),z=0;z<=Te;z+=1){var ee=be.get(z)||new Set;ee.forEach(function(ue){var pe=ue.key,Se=ue.node,Le=ue.children,De=Le===void 0?[]:Le;!xe.has(pe)&&!fe.has(pe)&&!ve(Se)&&De.filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){xe.delete(Fe.key)})})}fe=new Set;for(var oe=new Set,ie=Te;ie>=0;ie-=1){var le=be.get(ie)||new Set;le.forEach(function(ue){var pe=ue.parent,Se=ue.node;if(!(ve(Se)||!ue.parent||oe.has(ue.parent.key))){if(ve(ue.parent.node)){oe.add(pe.key);return}var Le=!0,De=!1;(pe.children||[]).filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){var Ae=Fe.key,Oe=xe.has(Ae);Le&&!Oe&&(Le=!1),!De&&(Oe||fe.has(Ae))&&(De=!0)}),Le||xe.delete(pe.key),De&&fe.add(pe.key),oe.add(pe.key)}})}return{checkedKeys:Array.from(xe),halfCheckedKeys:Array.from(ae(fe,xe))}}function de(Ee,we,be,Te){var ve=[],xe;Te?xe=Te:xe=Ge;var fe=new Set(Ee.filter(function(ie){var le=!!(0,_t.Z)(be,ie);return le||ve.push(ie),le})),z=new Map,ee=0;Object.keys(be).forEach(function(ie){var le=be[ie],ue=le.level,pe=z.get(ue);pe||(pe=new Set,z.set(ue,pe)),pe.add(le),ee=Math.max(ee,ue)}),(0,ot.ZP)(!ve.length,"Tree missing follow keys: ".concat(ve.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var oe;return we===!0?oe=Ie(fe,z,ee,xe):oe=me(fe,we.halfCheckedKeys,z,ee,xe),oe}},35381:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return ot}});function ot(_t,ae){return _t[ae]}},1089:function(dn,pn,at){"use strict";at.d(pn,{F:function(){return ue},H8:function(){return le},I8:function(){return ie},km:function(){return ve},oH:function(){return ee},w$:function(){return xe},zn:function(){return z}});var ot=at(71002),_t=at(74902),ae=at(1413),Ge=at(45987),Ie=at(50344),me=at(98423),de=at(80334),Ee=at(35381),we=["children"];function be(pe,Se){return"".concat(pe,"-").concat(Se)}function Te(pe){return pe&&pe.type&&pe.type.isTreeNode}function ve(pe,Se){return pe!=null?pe:Se}function xe(pe){var Se=pe||{},Le=Se.title,De=Se._title,Fe=Se.key,Ae=Se.children,Oe=Le||"title";return{title:Oe,_title:De||[Oe],key:Fe||"key",children:Ae||"children"}}function fe(pe,Se){var Le=new Map;function De(Fe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Oe){var ze=Oe[Se.key],He=Oe[Se.children];warning(ze!=null,"Tree node must have a certain key: [".concat(Ae).concat(ze,"]"));var Ye=String(ze);warning(!Le.has(Ye)||ze===null||ze===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),Le.set(Ye,!0),De(He,"".concat(Ae).concat(Ye," > "))})}De(pe)}function z(pe){function Se(Le){var De=(0,Ie.Z)(Le);return De.map(function(Fe){if(!Te(Fe))return(0,de.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var Ae=Fe.key,Oe=Fe.props,ze=Oe.children,He=(0,Ge.Z)(Oe,we),Ye=(0,ae.Z)({key:Ae},He),We=Se(ze);return We.length&&(Ye.children=We),Ye}).filter(function(Fe){return Fe})}return Se(pe)}function ee(pe,Se,Le){var De=xe(Le),Fe=De._title,Ae=De.key,Oe=De.children,ze=new Set(Se===!0?[]:Se),He=[];function Ye(We){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return We.map(function(st,dt){for(var gt=be(Ue?Ue.pos:"0",dt),Et=ve(st[Ae],gt),Ke,et=0;et<Fe.length;et+=1){var $e=Fe[et];if(st[$e]!==void 0){Ke=st[$e];break}}var vt=Object.assign((0,me.Z)(st,[].concat((0,_t.Z)(Fe),[Ae,Oe])),{title:Ke,key:Et,parent:Ue,pos:gt,children:null,data:st,isStart:[].concat((0,_t.Z)(Ue?Ue.isStart:[]),[dt===0]),isEnd:[].concat((0,_t.Z)(Ue?Ue.isEnd:[]),[dt===We.length-1])});return He.push(vt),Se===!0||ze.has(Et)?vt.children=Ye(st[Oe]||[],vt):vt.children=[],vt})}return Ye(pe),He}function oe(pe,Se,Le){var De={};(0,ot.Z)(Le)==="object"?De=Le:De={externalGetKey:Le},De=De||{};var Fe=De,Ae=Fe.childrenPropName,Oe=Fe.externalGetKey,ze=Fe.fieldNames,He=xe(ze),Ye=He.key,We=He.children,Ue=Ae||We,st;Oe?typeof Oe=="string"?st=function(Et){return Et[Oe]}:typeof Oe=="function"&&(st=function(Et){return Oe(Et)}):st=function(Et,Ke){return ve(Et[Ye],Ke)};function dt(gt,Et,Ke,et){var $e=gt?gt[Ue]:pe,vt=gt?be(Ke.pos,Et):"0",wt=gt?[].concat((0,_t.Z)(et),[gt]):[];if(gt){var ht=st(gt,vt),pt={node:gt,index:Et,pos:vt,key:ht,parentPos:Ke.node?Ke.pos:null,level:Ke.level+1,nodes:wt};Se(pt)}$e&&$e.forEach(function(ct,Ct){dt(ct,Ct,{node:gt,pos:vt,level:Ke?Ke.level+1:-1},wt)})}dt(null)}function ie(pe){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=Se.initWrapper,De=Se.processEntity,Fe=Se.onProcessFinished,Ae=Se.externalGetKey,Oe=Se.childrenPropName,ze=Se.fieldNames,He=arguments.length>2?arguments[2]:void 0,Ye=Ae||He,We={},Ue={},st={posEntities:We,keyEntities:Ue};return Le&&(st=Le(st)||st),oe(pe,function(dt){var gt=dt.node,Et=dt.index,Ke=dt.pos,et=dt.key,$e=dt.parentPos,vt=dt.level,wt=dt.nodes,ht={node:gt,nodes:wt,index:Et,key:et,pos:Ke,level:vt},pt=ve(et,Ke);We[Ke]=ht,Ue[pt]=ht,ht.parent=We[$e],ht.parent&&(ht.parent.children=ht.parent.children||[],ht.parent.children.push(ht)),De&&De(ht,st)},{externalGetKey:Ye,childrenPropName:Oe,fieldNames:ze}),Fe&&Fe(st),st}function le(pe,Se){var Le=Se.expandedKeys,De=Se.selectedKeys,Fe=Se.loadedKeys,Ae=Se.loadingKeys,Oe=Se.checkedKeys,ze=Se.halfCheckedKeys,He=Se.dragOverNodeKey,Ye=Se.dropPosition,We=Se.keyEntities,Ue=(0,Ee.Z)(We,pe),st={eventKey:pe,expanded:Le.indexOf(pe)!==-1,selected:De.indexOf(pe)!==-1,loaded:Fe.indexOf(pe)!==-1,loading:Ae.indexOf(pe)!==-1,checked:Oe.indexOf(pe)!==-1,halfChecked:ze.indexOf(pe)!==-1,pos:String(Ue?Ue.pos:""),dragOver:He===pe&&Ye===0,dragOverGapTop:He===pe&&Ye===-1,dragOverGapBottom:He===pe&&Ye===1};return st}function ue(pe){var Se=pe.data,Le=pe.expanded,De=pe.selected,Fe=pe.checked,Ae=pe.loaded,Oe=pe.loading,ze=pe.halfChecked,He=pe.dragOver,Ye=pe.dragOverGapTop,We=pe.dragOverGapBottom,Ue=pe.pos,st=pe.active,dt=pe.eventKey,gt=(0,ae.Z)((0,ae.Z)({},Se),{},{expanded:Le,selected:De,checked:Fe,loaded:Ae,loading:Oe,halfChecked:ze,dragOver:He,dragOverGapTop:Ye,dragOverGapBottom:We,pos:Ue,active:st,key:dt});return"props"in gt||Object.defineProperty(gt,"props",{get:function(){return(0,de.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),pe}}),gt}},36356:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return dt}});var ot=at(87462),_t=at(15671),ae=at(43144),Ge=at(97326),Ie=at(60136),me=at(29388),de=at(4942),Ee=at(67294),we=at(1413),be=at(45987),Te=at(71002),ve=at(74165),xe=at(15861),fe=at(74902),z=at(94184),ee=at.n(z),oe=at(64217),ie=at(80334),le=function(gt,Et){if(gt&&Et){var Ke=Array.isArray(Et)?Et:Et.split(","),et=gt.name||"",$e=gt.type||"",vt=$e.replace(/\/.*$/,"");return Ke.some(function(wt){var ht=wt.trim();if(/^\*(\/\*)?$/.test(wt))return!0;if(ht.charAt(0)==="."){var pt=et.toLowerCase(),ct=ht.toLowerCase(),Ct=[ct];return(ct===".jpg"||ct===".jpeg")&&(Ct=[".jpg",".jpeg"]),Ct.some(function(xt){return pt.endsWith(xt)})}return/\/\*$/.test(ht)?vt===ht.replace(/\/.*$/,""):$e===ht?!0:/^\w+$/.test(ht)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ht,"'.Skip for check.")),!0):!1})}return!0};function ue(gt,Et){var Ke="cannot ".concat(gt.method," ").concat(gt.action," ").concat(Et.status,"'"),et=new Error(Ke);return et.status=Et.status,et.method=gt.method,et.url=gt.action,et}function pe(gt){var Et=gt.responseText||gt.response;if(!Et)return Et;try{return JSON.parse(Et)}catch(Ke){return Et}}function Se(gt){var Et=new XMLHttpRequest;gt.onProgress&&Et.upload&&(Et.upload.onprogress=function(vt){vt.total>0&&(vt.percent=vt.loaded/vt.total*100),gt.onProgress(vt)});var Ke=new FormData;gt.data&&Object.keys(gt.data).forEach(function($e){var vt=gt.data[$e];if(Array.isArray(vt)){vt.forEach(function(wt){Ke.append("".concat($e,"[]"),wt)});return}Ke.append($e,vt)}),gt.file instanceof Blob?Ke.append(gt.filename,gt.file,gt.file.name):Ke.append(gt.filename,gt.file),Et.onerror=function(vt){gt.onError(vt)},Et.onload=function(){return Et.status<200||Et.status>=300?gt.onError(ue(gt,Et),pe(Et)):gt.onSuccess(pe(Et),Et)},Et.open(gt.method,gt.action,!0),gt.withCredentials&&"withCredentials"in Et&&(Et.withCredentials=!0);var et=gt.headers||{};return et["X-Requested-With"]!==null&&Et.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(et).forEach(function($e){et[$e]!==null&&Et.setRequestHeader($e,et[$e])}),Et.send(Ke),{abort:function(){Et.abort()}}}var Le=function(){var gt=(0,xe.Z)((0,ve.Z)().mark(function Et(Ke,et){var $e,vt,wt,ht,pt,ct,Ct,xt;return(0,ve.Z)().wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:ct=function(){return ct=(0,xe.Z)((0,ve.Z)().mark(function nt(Qe){return(0,ve.Z)().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.abrupt("return",new Promise(function(Je){Qe.file(function(rt){et(rt)?(Qe.fullPath&&!rt.webkitRelativePath&&(Object.defineProperties(rt,{webkitRelativePath:{writable:!0}}),rt.webkitRelativePath=Qe.fullPath.replace(/^\//,""),Object.defineProperties(rt,{webkitRelativePath:{writable:!1}})),Je(rt)):Je(null)})}));case 1:case"end":return Ne.stop()}},nt)})),ct.apply(this,arguments)},pt=function(nt){return ct.apply(this,arguments)},ht=function(){return ht=(0,xe.Z)((0,ve.Z)().mark(function nt(Qe){var Ce,Ne,Je,rt,Be;return(0,ve.Z)().wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:Ce=Qe.createReader(),Ne=[];case 2:return Xe.next=5,new Promise(function(lt){Ce.readEntries(lt,function(){return lt([])})});case 5:if(Je=Xe.sent,rt=Je.length,rt){Xe.next=9;break}return Xe.abrupt("break",12);case 9:for(Be=0;Be<rt;Be++)Ne.push(Je[Be]);Xe.next=2;break;case 12:return Xe.abrupt("return",Ne);case 13:case"end":return Xe.stop()}},nt)})),ht.apply(this,arguments)},wt=function(nt){return ht.apply(this,arguments)},$e=[],vt=[],Ke.forEach(function(St){return vt.push(St.webkitGetAsEntry())}),Ct=function(){var St=(0,xe.Z)((0,ve.Z)().mark(function nt(Qe,Ce){var Ne,Je;return(0,ve.Z)().wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:if(Qe){Be.next=2;break}return Be.abrupt("return");case 2:if(Qe.path=Ce||"",!Qe.isFile){Be.next=10;break}return Be.next=6,pt(Qe);case 6:Ne=Be.sent,Ne&&$e.push(Ne),Be.next=15;break;case 10:if(!Qe.isDirectory){Be.next=15;break}return Be.next=13,wt(Qe);case 13:Je=Be.sent,vt.push.apply(vt,(0,fe.Z)(Je));case 15:case"end":return Be.stop()}},nt)}));return function(Qe,Ce){return St.apply(this,arguments)}}(),xt=0;case 9:if(!(xt<vt.length)){Tt.next=15;break}return Tt.next=12,Ct(vt[xt]);case 12:xt++,Tt.next=9;break;case 15:return Tt.abrupt("return",$e);case 16:case"end":return Tt.stop()}},Et)}));return function(Ke,et){return gt.apply(this,arguments)}}(),De=Le,Fe=+new Date,Ae=0;function Oe(){return"rc-upload-".concat(Fe,"-").concat(++Ae)}var ze=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],He=function(gt){(0,Ie.Z)(Ke,gt);var Et=(0,me.Z)(Ke);function Ke(){var et;(0,_t.Z)(this,Ke);for(var $e=arguments.length,vt=new Array($e),wt=0;wt<$e;wt++)vt[wt]=arguments[wt];return et=Et.call.apply(Et,[this].concat(vt)),(0,de.Z)((0,Ge.Z)(et),"state",{uid:Oe()}),(0,de.Z)((0,Ge.Z)(et),"reqs",{}),(0,de.Z)((0,Ge.Z)(et),"fileInput",void 0),(0,de.Z)((0,Ge.Z)(et),"_isMounted",void 0),(0,de.Z)((0,Ge.Z)(et),"onChange",function(ht){var pt=et.props,ct=pt.accept,Ct=pt.directory,xt=ht.target.files,yt=(0,fe.Z)(xt).filter(function(Tt){return!Ct||le(Tt,ct)});et.uploadFiles(yt),et.reset()}),(0,de.Z)((0,Ge.Z)(et),"onClick",function(ht){var pt=et.fileInput;if(pt){var ct=ht.target,Ct=et.props.onClick;if(ct&&ct.tagName==="BUTTON"){var xt=pt.parentNode;xt.focus(),ct.blur()}pt.click(),Ct&&Ct(ht)}}),(0,de.Z)((0,Ge.Z)(et),"onKeyDown",function(ht){ht.key==="Enter"&&et.onClick(ht)}),(0,de.Z)((0,Ge.Z)(et),"onFileDrop",function(){var ht=(0,xe.Z)((0,ve.Z)().mark(function pt(ct){var Ct,xt,yt;return(0,ve.Z)().wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(Ct=et.props.multiple,ct.preventDefault(),ct.type!=="dragover"){St.next=4;break}return St.abrupt("return");case 4:if(!et.props.directory){St.next=11;break}return St.next=7,De(Array.prototype.slice.call(ct.dataTransfer.items),function(nt){return le(nt,et.props.accept)});case 7:xt=St.sent,et.uploadFiles(xt),St.next=14;break;case 11:yt=(0,fe.Z)(ct.dataTransfer.files).filter(function(nt){return le(nt,et.props.accept)}),Ct===!1&&(yt=yt.slice(0,1)),et.uploadFiles(yt);case 14:case"end":return St.stop()}},pt)}));return function(pt){return ht.apply(this,arguments)}}()),(0,de.Z)((0,Ge.Z)(et),"uploadFiles",function(ht){var pt=(0,fe.Z)(ht),ct=pt.map(function(Ct){return Ct.uid=Oe(),et.processFile(Ct,pt)});Promise.all(ct).then(function(Ct){var xt=et.props.onBatchStart;xt==null||xt(Ct.map(function(yt){var Tt=yt.origin,St=yt.parsedFile;return{file:Tt,parsedFile:St}})),Ct.filter(function(yt){return yt.parsedFile!==null}).forEach(function(yt){et.post(yt)})})}),(0,de.Z)((0,Ge.Z)(et),"processFile",function(){var ht=(0,xe.Z)((0,ve.Z)().mark(function pt(ct,Ct){var xt,yt,Tt,St,nt,Qe,Ce,Ne,Je;return(0,ve.Z)().wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:if(xt=et.props.beforeUpload,yt=ct,!xt){Be.next=14;break}return Be.prev=3,Be.next=6,xt(ct,Ct);case 6:yt=Be.sent,Be.next=12;break;case 9:Be.prev=9,Be.t0=Be.catch(3),yt=!1;case 12:if(yt!==!1){Be.next=14;break}return Be.abrupt("return",{origin:ct,parsedFile:null,action:null,data:null});case 14:if(Tt=et.props.action,typeof Tt!="function"){Be.next=21;break}return Be.next=18,Tt(ct);case 18:St=Be.sent,Be.next=22;break;case 21:St=Tt;case 22:if(nt=et.props.data,typeof nt!="function"){Be.next=29;break}return Be.next=26,nt(ct);case 26:Qe=Be.sent,Be.next=30;break;case 29:Qe=nt;case 30:return Ce=((0,Te.Z)(yt)==="object"||typeof yt=="string")&&yt?yt:ct,Ce instanceof File?Ne=Ce:Ne=new File([Ce],ct.name,{type:ct.type}),Je=Ne,Je.uid=ct.uid,Be.abrupt("return",{origin:ct,data:Qe,parsedFile:Je,action:St});case 35:case"end":return Be.stop()}},pt,null,[[3,9]])}));return function(pt,ct){return ht.apply(this,arguments)}}()),(0,de.Z)((0,Ge.Z)(et),"saveFileInput",function(ht){et.fileInput=ht}),et}return(0,ae.Z)(Ke,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function($e){var vt=this,wt=$e.data,ht=$e.origin,pt=$e.action,ct=$e.parsedFile;if(this._isMounted){var Ct=this.props,xt=Ct.onStart,yt=Ct.customRequest,Tt=Ct.name,St=Ct.headers,nt=Ct.withCredentials,Qe=Ct.method,Ce=ht.uid,Ne=yt||Se,Je={action:pt,filename:Tt,data:wt,file:ct,headers:St,withCredentials:nt,method:Qe||"post",onProgress:function(Be){var _e=vt.props.onProgress;_e==null||_e(Be,ct)},onSuccess:function(Be,_e){var Xe=vt.props.onSuccess;Xe==null||Xe(Be,ct,_e),delete vt.reqs[Ce]},onError:function(Be,_e){var Xe=vt.props.onError;Xe==null||Xe(Be,_e,ct),delete vt.reqs[Ce]}};xt(ht),this.reqs[Ce]=Ne(Je)}}},{key:"reset",value:function(){this.setState({uid:Oe()})}},{key:"abort",value:function($e){var vt=this.reqs;if($e){var wt=$e.uid?$e.uid:$e;vt[wt]&&vt[wt].abort&&vt[wt].abort(),delete vt[wt]}else Object.keys(vt).forEach(function(ht){vt[ht]&&vt[ht].abort&&vt[ht].abort(),delete vt[ht]})}},{key:"render",value:function(){var $e=this.props,vt=$e.component,wt=$e.prefixCls,ht=$e.className,pt=$e.classNames,ct=pt===void 0?{}:pt,Ct=$e.disabled,xt=$e.id,yt=$e.name,Tt=$e.style,St=$e.styles,nt=St===void 0?{}:St,Qe=$e.multiple,Ce=$e.accept,Ne=$e.capture,Je=$e.children,rt=$e.directory,Be=$e.openFileDialogOnClick,_e=$e.onMouseEnter,Xe=$e.onMouseLeave,lt=$e.hasControlInside,Pt=(0,be.Z)($e,ze),kt=ee()((0,de.Z)((0,de.Z)((0,de.Z)({},wt,!0),"".concat(wt,"-disabled"),Ct),ht,ht)),zt=rt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},jt=Ct?{}:{onClick:Be?this.onClick:function(){},onKeyDown:Be?this.onKeyDown:function(){},onMouseEnter:_e,onMouseLeave:Xe,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:lt?void 0:"0"};return Ee.createElement(vt,(0,ot.Z)({},jt,{className:kt,role:lt?void 0:"button",style:Tt}),Ee.createElement("input",(0,ot.Z)({},(0,oe.Z)(Pt,{aria:!0,data:!0}),{id:xt,name:yt,disabled:Ct,type:"file",ref:this.saveFileInput,onClick:function(ln){return ln.stopPropagation()},key:this.state.uid,style:(0,we.Z)({display:"none"},nt.input),className:ct.input,accept:Ce},zt,{multiple:Qe,onChange:this.onChange},Ne!=null?{capture:Ne}:{})),Je)}}]),Ke}(Ee.Component),Ye=He;function We(){}var Ue=function(gt){(0,Ie.Z)(Ke,gt);var Et=(0,me.Z)(Ke);function Ke(){var et;(0,_t.Z)(this,Ke);for(var $e=arguments.length,vt=new Array($e),wt=0;wt<$e;wt++)vt[wt]=arguments[wt];return et=Et.call.apply(Et,[this].concat(vt)),(0,de.Z)((0,Ge.Z)(et),"uploader",void 0),(0,de.Z)((0,Ge.Z)(et),"saveUploader",function(ht){et.uploader=ht}),et}return(0,ae.Z)(Ke,[{key:"abort",value:function($e){this.uploader.abort($e)}},{key:"render",value:function(){return Ee.createElement(Ye,(0,ot.Z)({},this.props,{ref:this.saveUploader}))}}]),Ke}(Ee.Component);(0,de.Z)(Ue,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:We,onError:We,onSuccess:We,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var st=Ue,dt=st},73299:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return Jr}});var ot=at(87462),_t=at(1413),ae=at(71002),Ge=at(97685),Ie=at(4942),me=at(45987),de=at(67294),Ee=at(73935),we=at(94184),be=at.n(we),Te=at(48555),ve=de.forwardRef(function(bn,Ze){var vn=bn.height,Mn=bn.offsetY,Rn=bn.offsetX,zn=bn.children,Un=bn.prefixCls,$n=bn.onInnerResize,Mr=bn.innerProps,nn=bn.rtl,on=bn.extra,Kt={},hn={display:"flex",flexDirection:"column"};if(Mn!==void 0){var qn;Kt={height:vn,position:"relative",overflow:"hidden"},hn=(0,_t.Z)((0,_t.Z)({},hn),{},(qn={transform:"translateY(".concat(Mn,"px)")},(0,Ie.Z)(qn,nn?"marginRight":"marginLeft",-Rn),(0,Ie.Z)(qn,"position","absolute"),(0,Ie.Z)(qn,"left",0),(0,Ie.Z)(qn,"right",0),(0,Ie.Z)(qn,"top",0),qn))}return de.createElement("div",{style:Kt},de.createElement(Te.Z,{onResize:function(ur){var Qt=ur.offsetHeight;Qt&&$n&&$n()}},de.createElement("div",(0,ot.Z)({style:hn,className:be()((0,Ie.Z)({},"".concat(Un,"-holder-inner"),Un)),ref:Ze},Mr),zn,on)))});ve.displayName="Filler";var xe=ve,fe=function(Ze){return+setTimeout(Ze,16)},z=function(Ze){return clearTimeout(Ze)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(fe=function(Ze){return window.requestAnimationFrame(Ze)},z=function(Ze){return window.cancelAnimationFrame(Ze)});var ee=0,oe=new Map;function ie(bn){oe.delete(bn)}var le=function(Ze){var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ee+=1;var Mn=ee;function Rn(zn){if(zn===0)ie(Mn),Ze();else{var Un=fe(function(){Rn(zn-1)});oe.set(Mn,Un)}}return Rn(vn),Mn};le.cancel=function(bn){var Ze=oe.get(bn);return ie(Ze),z(Ze)};var ue=le;function pe(bn,Ze){var vn="touches"in bn?bn.touches[0]:bn;return vn[Ze?"pageX":"pageY"]}var Se=de.forwardRef(function(bn,Ze){var vn,Mn=bn.prefixCls,Rn=bn.rtl,zn=bn.scrollOffset,Un=bn.scrollRange,$n=bn.onStartMove,Mr=bn.onStopMove,nn=bn.onScroll,on=bn.horizontal,Kt=bn.spinSize,hn=bn.containerSize,qn=bn.style,tr=bn.thumbStyle,ur=de.useState(!1),Qt=(0,Ge.Z)(ur,2),Cn=Qt[0],dr=Qt[1],Ar=de.useState(null),_n=(0,Ge.Z)(Ar,2),Zt=_n[0],ir=_n[1],Nr=de.useState(null),si=(0,Ge.Z)(Nr,2),Tn=si[0],vr=si[1],yi=!Rn,ko=de.useRef(),zi=de.useRef(),xr=de.useState(!1),gr=(0,Ge.Z)(xr,2),Lr=gr[0],_i=gr[1],oo=de.useRef(),Xn=function(){clearTimeout(oo.current),_i(!0),oo.current=setTimeout(function(){_i(!1)},3e3)},Ir=Un-hn||0,_s=hn-Kt||0,Aa=Ir>0,ga=de.useMemo(function(){if(zn===0||Ir===0)return 0;var bi=zn/Ir;return bi*_s},[zn,Ir,_s]),tn=function(uo){uo.stopPropagation(),uo.preventDefault()},Vr=de.useRef({top:ga,dragging:Cn,pageY:Zt,startTop:Tn});Vr.current={top:ga,dragging:Cn,pageY:Zt,startTop:Tn};var Ti=function(uo){dr(!0),ir(pe(uo,on)),vr(Vr.current.top),$n(),uo.stopPropagation(),uo.preventDefault()};de.useEffect(function(){var bi=function(Nn){Nn.preventDefault()},uo=ko.current,Ln=zi.current;return uo.addEventListener("touchstart",bi),Ln.addEventListener("touchstart",Ti),function(){uo.removeEventListener("touchstart",bi),Ln.removeEventListener("touchstart",Ti)}},[]);var jr=de.useRef();jr.current=Ir;var Fo=de.useRef();Fo.current=_s,de.useEffect(function(){if(Cn){var bi,uo=function(Nn){var vo=Vr.current,bs=vo.dragging,Xt=vo.pageY,Jt=vo.startTop;if(ue.cancel(bi),bs){var cn=pe(Nn,on)-Xt,Fn=Jt;!yi&&on?Fn-=cn:Fn+=cn;var pr=jr.current,li=Fo.current,Zr=li?Fn/li:0,Vn=Math.ceil(Zr*pr);Vn=Math.max(Vn,0),Vn=Math.min(Vn,pr),bi=ue(function(){nn(Vn,on)})}},Ln=function(){dr(!1),Mr()};return window.addEventListener("mousemove",uo),window.addEventListener("touchmove",uo),window.addEventListener("mouseup",Ln),window.addEventListener("touchend",Ln),function(){window.removeEventListener("mousemove",uo),window.removeEventListener("touchmove",uo),window.removeEventListener("mouseup",Ln),window.removeEventListener("touchend",Ln),ue.cancel(bi)}}},[Cn]),de.useEffect(function(){Xn()},[zn]),de.useImperativeHandle(Ze,function(){return{delayHidden:Xn}});var Oi="".concat(Mn,"-scrollbar"),Ri={position:"absolute",visibility:Lr&&Aa?null:"hidden"},Li={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return on?(Ri.height=8,Ri.left=0,Ri.right=0,Ri.bottom=0,Li.height="100%",Li.width=Kt,yi?Li.left=ga:Li.right=ga):(Ri.width=8,Ri.top=0,Ri.bottom=0,yi?Ri.right=0:Ri.left=0,Li.width="100%",Li.height=Kt,Li.top=ga),de.createElement("div",{ref:ko,className:be()(Oi,(vn={},(0,Ie.Z)(vn,"".concat(Oi,"-horizontal"),on),(0,Ie.Z)(vn,"".concat(Oi,"-vertical"),!on),(0,Ie.Z)(vn,"".concat(Oi,"-visible"),Lr),vn)),style:(0,_t.Z)((0,_t.Z)({},Ri),qn),onMouseDown:tn,onMouseMove:Xn},de.createElement("div",{ref:zi,className:be()("".concat(Oi,"-thumb"),(0,Ie.Z)({},"".concat(Oi,"-thumb-moving"),Cn)),style:(0,_t.Z)((0,_t.Z)({},Li),tr),onMouseDown:Ti}))}),Le=Se;function De(bn){var Ze=bn.children,vn=bn.setRef,Mn=de.useCallback(function(Rn){vn(Rn)},[]);return de.cloneElement(Ze,{ref:Mn})}function Fe(bn,Ze,vn,Mn,Rn,zn,Un){var $n=Un.getKey;return bn.slice(Ze,vn+1).map(function(Mr,nn){var on=Ze+nn,Kt=zn(Mr,on,{style:{width:Mn}}),hn=$n(Mr);return de.createElement(De,{key:hn,setRef:function(tr){return Rn(Mr,tr)}},Kt)})}function Ae(bn){return bn instanceof HTMLElement||bn instanceof SVGElement}function Oe(bn){return Ae(bn)?bn:bn instanceof de.Component?Ee.findDOMNode(bn):null}var ze=at(15671),He=at(43144),Ye=function(){function bn(){(0,ze.Z)(this,bn),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,He.Z)(bn,[{key:"set",value:function(vn,Mn){this.maps[vn]=Mn,this.id+=1}},{key:"get",value:function(vn){return this.maps[vn]}}]),bn}(),We=Ye;function Ue(bn,Ze,vn){var Mn=de.useState(0),Rn=(0,Ge.Z)(Mn,2),zn=Rn[0],Un=Rn[1],$n=(0,de.useRef)(new Map),Mr=(0,de.useRef)(new We),nn=(0,de.useRef)();function on(){ue.cancel(nn.current)}function Kt(){var qn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;on();var tr=function(){$n.current.forEach(function(Qt,Cn){if(Qt&&Qt.offsetParent){var dr=Oe(Qt),Ar=dr.offsetHeight;Mr.current.get(Cn)!==Ar&&Mr.current.set(Cn,dr.offsetHeight)}}),Un(function(Qt){return Qt+1})};qn?tr():nn.current=ue(tr)}function hn(qn,tr){var ur=bn(qn),Qt=$n.current.get(ur);tr?($n.current.set(ur,tr),Kt()):$n.current.delete(ur),!Qt!=!tr&&(tr?Ze==null||Ze(qn):vn==null||vn(qn))}return(0,de.useEffect)(function(){return on},[]),[hn,Kt,Mr.current,zn]}function st(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var dt=st()?de.useLayoutEffect:de.useEffect,gt=function(Ze,vn){var Mn=de.useRef(!0);dt(function(){return Ze(Mn.current)},vn),dt(function(){return Mn.current=!1,function(){Mn.current=!0}},[])},Et=function(Ze,vn){gt(function(Mn){if(!Mn)return Ze()},vn)},Ke=gt;function et(bn){var Ze=de.useRef();Ze.current=bn;var vn=de.useCallback(function(){for(var Mn,Rn=arguments.length,zn=new Array(Rn),Un=0;Un<Rn;Un++)zn[Un]=arguments[Un];return(Mn=Ze.current)===null||Mn===void 0?void 0:Mn.call.apply(Mn,[Ze].concat(zn))},[]);return vn}function $e(bn){var Ze=React.useRef(!1),vn=React.useState(bn),Mn=_slicedToArray(vn,2),Rn=Mn[0],zn=Mn[1];React.useEffect(function(){return Ze.current=!1,function(){Ze.current=!0}},[]);function Un($n,Mr){Mr&&Ze.current||zn($n)}return[Rn,Un]}function vt(bn){return bn!==void 0}function wt(bn,Ze){var vn=Ze||{},Mn=vn.defaultValue,Rn=vn.value,zn=vn.onChange,Un=vn.postState,$n=useState(function(){return vt(Rn)?Rn:vt(Mn)?typeof Mn=="function"?Mn():Mn:typeof bn=="function"?bn():bn}),Mr=_slicedToArray($n,2),nn=Mr[0],on=Mr[1],Kt=Rn!==void 0?Rn:nn,hn=Un?Un(Kt):Kt,qn=useEvent(zn),tr=useState([Kt]),ur=_slicedToArray(tr,2),Qt=ur[0],Cn=ur[1];useLayoutUpdateEffect(function(){var Ar=Qt[0];nn!==Ar&&qn(nn,Ar)},[Qt]),useLayoutUpdateEffect(function(){vt(Rn)||on(Rn)},[Rn]);var dr=useEvent(function(Ar,_n){on(Ar,_n),Cn([Kt],_n)});return[hn,dr]}var ht=at(31461);function pt(bn,Ze,vn){var Mn=React.useRef({});return(!("value"in Mn.current)||vn(Mn.current.condition,Ze))&&(Mn.current.value=bn(),Mn.current.condition=Ze),Mn.current.value}function ct(bn,Ze){typeof bn=="function"?bn(Ze):_typeof(bn)==="object"&&bn&&"current"in bn&&(bn.current=Ze)}function Ct(){for(var bn=arguments.length,Ze=new Array(bn),vn=0;vn<bn;vn++)Ze[vn]=arguments[vn];var Mn=Ze.filter(function(Rn){return Rn});return Mn.length<=1?Mn[0]:function(Rn){Ze.forEach(function(zn){ct(zn,Rn)})}}function xt(){for(var bn=arguments.length,Ze=new Array(bn),vn=0;vn<bn;vn++)Ze[vn]=arguments[vn];return useMemo(function(){return Ct.apply(void 0,Ze)},Ze,function(Mn,Rn){return Mn.length!==Rn.length||Mn.every(function(zn,Un){return zn!==Rn[Un]})})}function yt(bn){var Ze,vn,Mn=isMemo(bn)?bn.type.type:bn.type;return!(typeof Mn=="function"&&!((Ze=Mn.prototype)!==null&&Ze!==void 0&&Ze.render)||typeof bn=="function"&&!((vn=bn.prototype)!==null&&vn!==void 0&&vn.render))}function Tt(bn){return!isValidElement(bn)||isFragment(bn)?!1:yt(bn)}function St(bn,Ze,vn,Mn){if(!Ze.length)return vn;var Rn=_toArray(Ze),zn=Rn[0],Un=Rn.slice(1),$n;return!bn&&typeof zn=="number"?$n=[]:Array.isArray(bn)?$n=_toConsumableArray(bn):$n=_objectSpread({},bn),Mn&&vn===void 0&&Un.length===1?delete $n[zn][Un[0]]:$n[zn]=St($n[zn],Un,vn,Mn),$n}function nt(bn,Ze,vn){var Mn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Ze.length&&Mn&&vn===void 0&&!get(bn,Ze.slice(0,-1))?bn:St(bn,Ze,vn,Mn)}function Qe(bn){return _typeof(bn)==="object"&&bn!==null&&Object.getPrototypeOf(bn)===Object.prototype}function Ce(bn){return Array.isArray(bn)?[]:{}}var Ne=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Je(){for(var bn=arguments.length,Ze=new Array(bn),vn=0;vn<bn;vn++)Ze[vn]=arguments[vn];var Mn=Ce(Ze[0]);return Ze.forEach(function(Rn){function zn(Un,$n){var Mr=new Set($n),nn=get(Rn,Un),on=Array.isArray(nn);if(on||Qe(nn)){if(!Mr.has(nn)){Mr.add(nn);var Kt=get(Mn,Un);on?Mn=nt(Mn,Un,[]):(!Kt||_typeof(Kt)!=="object")&&(Mn=nt(Mn,Un,Ce(nn))),Ne(nn).forEach(function(hn){zn([].concat(_toConsumableArray(Un),[hn]),Mr)})}}else Mn=nt(Mn,Un,nn)}zn([])}),Mn}var rt={},Be=[],_e=function(Ze){Be.push(Ze)};function Xe(bn,Ze){if(0)var vn}function lt(bn,Ze){if(0)var vn}function Pt(){rt={}}function kt(bn,Ze,vn){!Ze&&!rt[vn]&&(bn(!1,vn),rt[vn]=!0)}function zt(bn,Ze){kt(Xe,bn,Ze)}function jt(bn,Ze){kt(lt,bn,Ze)}zt.preMessage=_e,zt.resetWarned=Pt,zt.noteOnce=jt;var Ht=null,ln=10;function an(bn,Ze,vn,Mn,Rn,zn,Un,$n){var Mr=de.useRef(),nn=de.useState(null),on=(0,Ge.Z)(nn,2),Kt=on[0],hn=on[1];return Ke(function(){if(Kt&&Kt.times<ln){if(!bn.current){hn(function(Xn){return(0,_t.Z)({},Xn)});return}zn();var qn=Kt.targetAlign,tr=Kt.originAlign,ur=Kt.index,Qt=Kt.offset,Cn=bn.current.clientHeight,dr=!1,Ar=qn,_n=null;if(Cn){for(var Zt=qn||tr,ir=0,Nr=0,si=0,Tn=Math.min(Ze.length-1,ur),vr=0;vr<=Tn;vr+=1){var yi=Rn(Ze[vr]);Nr=ir;var ko=vn.get(yi);si=Nr+(ko===void 0?Mn:ko),ir=si}for(var zi=Zt==="top"?Qt:Cn-Qt,xr=Tn;xr>=0;xr-=1){var gr=Rn(Ze[xr]),Lr=vn.get(gr);if(Lr===void 0){dr=!0;break}if(zi-=Lr,zi<=0)break}switch(Zt){case"top":_n=Nr-Qt;break;case"bottom":_n=si-Cn+Qt;break;default:{var _i=bn.current.scrollTop,oo=_i+Cn;Nr<_i?Ar="top":si>oo&&(Ar="bottom")}}_n!==null&&Un(_n),_n!==Kt.lastTop&&(dr=!0)}dr&&hn(function(Xn){return(0,_t.Z)((0,_t.Z)({},Xn),{},{times:Xn.times+1,targetAlign:Ar,lastTop:_n})})}},[Kt,bn.current]),function(qn){if(qn==null){$n();return}if(ue.cancel(Mr.current),typeof qn=="number")Un(qn);else if(qn&&(0,ae.Z)(qn)==="object"){var tr,ur=qn.align;"index"in qn?tr=qn.index:tr=Ze.findIndex(function(dr){return Rn(dr)===qn.key});var Qt=qn.offset,Cn=Qt===void 0?0:Qt;hn({times:0,index:tr,offset:Cn,originAlign:ur})}}}function sn(bn,Ze,vn,Mn){var Rn=vn-bn,zn=Ze-vn,Un=Math.min(Rn,zn)*2;if(Mn<=Un){var $n=Math.floor(Mn/2);return Mn%2?vn+$n+1:vn-$n}return Rn>zn?vn-(Mn-zn):vn+(Mn-Rn)}function $t(bn,Ze,vn){var Mn=bn.length,Rn=Ze.length,zn,Un;if(Mn===0&&Rn===0)return null;Mn<Rn?(zn=bn,Un=Ze):(zn=Ze,Un=bn);var $n={__EMPTY_ITEM__:!0};function Mr(tr){return tr!==void 0?vn(tr):$n}for(var nn=null,on=Math.abs(Mn-Rn)!==1,Kt=0;Kt<Un.length;Kt+=1){var hn=Mr(zn[Kt]),qn=Mr(Un[Kt]);if(hn!==qn){nn=Kt,on=on||hn!==Mr(Un[Kt+1]);break}}return nn===null?null:{index:nn,multiple:on}}function On(bn,Ze,vn){var Mn=de.useState(bn),Rn=(0,Ge.Z)(Mn,2),zn=Rn[0],Un=Rn[1],$n=de.useState(null),Mr=(0,Ge.Z)($n,2),nn=Mr[0],on=Mr[1];return de.useEffect(function(){var Kt=$t(zn||[],bn||[],Ze);(Kt==null?void 0:Kt.index)!==void 0&&(vn==null||vn(Kt.index),on(bn[Kt.index])),Un(bn)},[bn]),[nn]}var un=(typeof navigator=="undefined"?"undefined":(0,ae.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),mn=un,In=function(bn,Ze){var vn=(0,de.useRef)(!1),Mn=(0,de.useRef)(null);function Rn(){clearTimeout(Mn.current),vn.current=!0,Mn.current=setTimeout(function(){vn.current=!1},50)}var zn=(0,de.useRef)({top:bn,bottom:Ze});return zn.current.top=bn,zn.current.bottom=Ze,function(Un){var $n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Mr=Un<0&&zn.current.top||Un>0&&zn.current.bottom;return $n&&Mr?(clearTimeout(Mn.current),vn.current=!1):(!Mr||vn.current)&&Rn(),!vn.current&&Mr}};function Sn(bn,Ze,vn,Mn,Rn){var zn=(0,de.useRef)(0),Un=(0,de.useRef)(null),$n=(0,de.useRef)(null),Mr=(0,de.useRef)(!1),nn=In(Ze,vn);function on(Qt,Cn){ue.cancel(Un.current),zn.current+=Cn,$n.current=Cn,!nn(Cn)&&(mn||Qt.preventDefault(),Un.current=ue(function(){var dr=Mr.current?10:1;Rn(zn.current*dr),zn.current=0}))}function Kt(Qt,Cn){Rn(Cn,!0),mn||Qt.preventDefault()}var hn=(0,de.useRef)(null),qn=(0,de.useRef)(null);function tr(Qt){if(bn){ue.cancel(qn.current),qn.current=ue(function(){hn.current=null},2);var Cn=Qt.deltaX,dr=Qt.deltaY,Ar=Qt.shiftKey,_n=Cn,Zt=dr;(hn.current==="sx"||!hn.current&&Ar&&dr&&!Cn)&&(_n=dr,Zt=0,hn.current="sx");var ir=Math.abs(_n),Nr=Math.abs(Zt);hn.current===null&&(hn.current=Mn&&ir>Nr?"x":"y"),hn.current==="y"?on(Qt,Zt):Kt(Qt,_n)}}function ur(Qt){bn&&(Mr.current=Qt.detail===$n.current)}return[tr,ur]}var Dn=14/15;function fr(bn,Ze,vn){var Mn=(0,de.useRef)(!1),Rn=(0,de.useRef)(0),zn=(0,de.useRef)(null),Un=(0,de.useRef)(null),$n,Mr=function(hn){if(Mn.current){var qn=Math.ceil(hn.touches[0].pageY),tr=Rn.current-qn;Rn.current=qn,vn(tr)&&hn.preventDefault(),clearInterval(Un.current),Un.current=setInterval(function(){tr*=Dn,(!vn(tr,!0)||Math.abs(tr)<=.1)&&clearInterval(Un.current)},16)}},nn=function(){Mn.current=!1,$n()},on=function(hn){$n(),hn.touches.length===1&&!Mn.current&&(Mn.current=!0,Rn.current=Math.ceil(hn.touches[0].pageY),zn.current=hn.target,zn.current.addEventListener("touchmove",Mr),zn.current.addEventListener("touchend",nn))};$n=function(){zn.current&&(zn.current.removeEventListener("touchmove",Mr),zn.current.removeEventListener("touchend",nn))},Ke(function(){return bn&&Ze.current.addEventListener("touchstart",on),function(){var Kt;(Kt=Ze.current)===null||Kt===void 0||Kt.removeEventListener("touchstart",on),$n(),clearInterval(Un.current)}},[bn])}var _r=20;function mr(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,vn=bn/Ze*100;return isNaN(vn)&&(vn=0),vn=Math.max(vn,_r),vn=Math.min(vn,bn/2),Math.floor(vn)}function wi(bn,Ze,vn,Mn){var Rn=de.useMemo(function(){return[new Map,[]]},[bn,vn.id,Mn]),zn=(0,Ge.Z)(Rn,2),Un=zn[0],$n=zn[1],Mr=function(on){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:on,hn=Un.get(on),qn=Un.get(Kt);if(hn===void 0||qn===void 0)for(var tr=bn.length,ur=$n.length;ur<tr;ur+=1){var Qt,Cn=bn[ur],dr=Ze(Cn);Un.set(dr,ur);var Ar=(Qt=vn.get(dr))!==null&&Qt!==void 0?Qt:Mn;if($n[ur]=($n[ur-1]||0)+Ar,dr===on&&(hn=ur),dr===Kt&&(qn=ur),hn!==void 0&&qn!==void 0)break}return{top:$n[hn-1]||0,bottom:$n[qn]}};return Mr}var no=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],ro=[],io={overflowY:"auto",overflowAnchor:"none"};function Ji(bn,Ze){var vn=bn.prefixCls,Mn=vn===void 0?"rc-virtual-list":vn,Rn=bn.className,zn=bn.height,Un=bn.itemHeight,$n=bn.fullHeight,Mr=$n===void 0?!0:$n,nn=bn.style,on=bn.data,Kt=bn.children,hn=bn.itemKey,qn=bn.virtual,tr=bn.direction,ur=bn.scrollWidth,Qt=bn.component,Cn=Qt===void 0?"div":Qt,dr=bn.onScroll,Ar=bn.onVirtualScroll,_n=bn.onVisibleChange,Zt=bn.innerProps,ir=bn.extraRender,Nr=bn.styles,si=(0,me.Z)(bn,no),Tn=!!(qn!==!1&&zn&&Un),vr=Tn&&on&&(Un*on.length>zn||!!ur),yi=tr==="rtl",ko=be()(Mn,(0,Ie.Z)({},"".concat(Mn,"-rtl"),yi),Rn),zi=on||ro,xr=(0,de.useRef)(),gr=(0,de.useRef)(),Lr=(0,de.useState)(0),_i=(0,Ge.Z)(Lr,2),oo=_i[0],Xn=_i[1],Ir=(0,de.useState)(0),_s=(0,Ge.Z)(Ir,2),Aa=_s[0],ga=_s[1],tn=(0,de.useState)(!1),Vr=(0,Ge.Z)(tn,2),Ti=Vr[0],jr=Vr[1],Fo=function(){jr(!0)},Oi=function(){jr(!1)},Ri=de.useCallback(function(mi){return typeof hn=="function"?hn(mi):mi==null?void 0:mi[hn]},[hn]),Li={getKey:Ri};function bi(mi){Xn(function(Ai){var Mo;typeof mi=="function"?Mo=mi(Ai):Mo=mi;var Yo=ti(Mo);return xr.current.scrollTop=Yo,Yo})}var uo=(0,de.useRef)({start:0,end:zi.length}),Ln=(0,de.useRef)(),la=On(zi,Ri),Nn=(0,Ge.Z)(la,1),vo=Nn[0];Ln.current=vo;var bs=Ue(Ri,null,null),Xt=(0,Ge.Z)(bs,4),Jt=Xt[0],cn=Xt[1],Fn=Xt[2],pr=Xt[3],li=de.useMemo(function(){if(!Tn)return{scrollHeight:void 0,start:0,end:zi.length-1,offset:void 0};if(!vr){var mi;return{scrollHeight:((mi=gr.current)===null||mi===void 0?void 0:mi.offsetHeight)||0,start:0,end:zi.length-1,offset:void 0}}for(var Ai=0,Mo,Yo,yr,Ph=zi.length,Ns=0;Ns<Ph;Ns+=1){var Vl=zi[Ns],Ch=Ri(Vl),Eh=Fn.get(Ch),nr=Ai+(Eh===void 0?Un:Eh);nr>=oo&&Mo===void 0&&(Mo=Ns,Yo=Ai),nr>oo+zn&&yr===void 0&&(yr=Ns),Ai=nr}return Mo===void 0&&(Mo=0,Yo=0,yr=Math.ceil(zn/Un)),yr===void 0&&(yr=zi.length-1),yr=Math.min(yr+1,zi.length-1),{scrollHeight:Ai,start:Mo,end:yr,offset:Yo}},[vr,Tn,oo,zi,pr,zn]),Zr=li.scrollHeight,Vn=li.start,Mt=li.end,yo=li.offset;uo.current.start=Vn,uo.current.end=Mt;var za=de.useState({width:0,height:zn}),Gs=(0,Ge.Z)(za,2),Ua=Gs[0],Fa=Gs[1],Da=function(Ai){Fa({width:Ai.width||Ai.offsetWidth,height:Ai.height||Ai.offsetHeight})},yl=(0,de.useRef)(),fs=(0,de.useRef)(),No=de.useMemo(function(){return mr(Ua.width,ur)},[Ua.width,ur]),ea=de.useMemo(function(){return mr(Ua.height,Zr)},[Ua.height,Zr]),zr=Zr-zn,Tr=(0,de.useRef)(zr);Tr.current=zr;function ti(mi){var Ai=mi;return Number.isNaN(Tr.current)||(Ai=Math.min(Ai,Tr.current)),Ai=Math.max(Ai,0),Ai}var jn=oo<=0,Gi=oo>=zr,So=In(jn,Gi),ta=function(){return{x:yi?-Aa:Aa,y:oo}},Oo=(0,de.useRef)(ta()),Wo=et(function(){if(Ar){var mi=ta();(Oo.current.x!==mi.x||Oo.current.y!==mi.y)&&(Ar(mi),Oo.current=mi)}});function na(mi,Ai){var Mo=mi;Ai?((0,Ee.flushSync)(function(){ga(Mo)}),Wo()):bi(Mo)}function Ya(mi){var Ai=mi.currentTarget.scrollTop;Ai!==oo&&bi(Ai),dr==null||dr(mi),Wo()}var Ia=function(Ai){var Mo=Ai,Yo=ur-Ua.width;return Mo=Math.max(Mo,0),Mo=Math.min(Mo,Yo),Mo},Ol=et(function(mi,Ai){Ai?((0,Ee.flushSync)(function(){ga(function(Mo){var Yo=Mo+(yi?-mi:mi);return Ia(Yo)})}),Wo()):bi(function(Mo){var Yo=Mo+mi;return Yo})}),Hl=Sn(Tn,jn,Gi,!!ur,Ol),rn=(0,Ge.Z)(Hl,2),us=rn[0],ol=rn[1];fr(Tn,xr,function(mi,Ai){return So(mi,Ai)?!1:(us({preventDefault:function(){},deltaY:mi}),!0)}),Ke(function(){function mi(Mo){Tn&&Mo.preventDefault()}var Ai=xr.current;return Ai.addEventListener("wheel",us),Ai.addEventListener("DOMMouseScroll",ol),Ai.addEventListener("MozMousePixelScroll",mi),function(){Ai.removeEventListener("wheel",us),Ai.removeEventListener("DOMMouseScroll",ol),Ai.removeEventListener("MozMousePixelScroll",mi)}},[Tn]),Ke(function(){ur&&ga(function(mi){return Ia(mi)})},[Ua.width,ur]);var au=function(){var Ai,Mo;(Ai=yl.current)===null||Ai===void 0||Ai.delayHidden(),(Mo=fs.current)===null||Mo===void 0||Mo.delayHidden()},co=an(xr,zi,Fn,Un,Ri,function(){return cn(!0)},bi,au);de.useImperativeHandle(Ze,function(){return{getScrollInfo:ta,scrollTo:function(Ai){function Mo(Yo){return Yo&&(0,ae.Z)(Yo)==="object"&&("left"in Yo||"top"in Yo)}Mo(Ai)?(Ai.left!==void 0&&ga(Ia(Ai.left)),co(Ai.top)):co(Ai)}}}),Ke(function(){if(_n){var mi=zi.slice(Vn,Mt+1);_n(mi,zi)}},[Vn,Mt,zi]);var Sl=wi(zi,Ri,Fn,Un),jl=ir==null?void 0:ir({start:Vn,end:Mt,virtual:vr,offsetX:Aa,offsetY:yo,rtl:yi,getSize:Sl}),Kl=Fe(zi,Vn,Mt,ur,Jt,Kt,Li),xo=null;zn&&(xo=(0,_t.Z)((0,Ie.Z)({},Mr?"height":"maxHeight",zn),io),Tn&&(xo.overflowY="hidden",ur&&(xo.overflowX="hidden"),Ti&&(xo.pointerEvents="none")));var ma={};return yi&&(ma.dir="rtl"),de.createElement("div",(0,ot.Z)({style:(0,_t.Z)((0,_t.Z)({},nn),{},{position:"relative"}),className:ko},ma,si),de.createElement(Te.Z,{onResize:Da},de.createElement(Cn,{className:"".concat(Mn,"-holder"),style:xo,ref:xr,onScroll:Ya,onMouseEnter:au},de.createElement(xe,{prefixCls:Mn,height:Zr,offsetX:Aa,offsetY:yo,scrollWidth:ur,onInnerResize:cn,ref:gr,innerProps:Zt,rtl:yi,extra:jl},Kl))),vr&&Zr>zn&&de.createElement(Le,{ref:yl,prefixCls:Mn,scrollOffset:oo,scrollRange:Zr,rtl:yi,onScroll:na,onStartMove:Fo,onStopMove:Oi,spinSize:ea,containerSize:Ua.height,style:Nr==null?void 0:Nr.verticalScrollBar,thumbStyle:Nr==null?void 0:Nr.verticalScrollBarThumb}),vr&&ur&&de.createElement(Le,{ref:fs,prefixCls:Mn,scrollOffset:Aa,scrollRange:ur,rtl:yi,onScroll:na,onStartMove:Fo,onStopMove:Oi,spinSize:No,containerSize:Ua.width,horizontal:!0,style:Nr==null?void 0:Nr.horizontalScrollBar,thumbStyle:Nr==null?void 0:Nr.horizontalScrollBarThumb}))}var lo=de.forwardRef(Ji);lo.displayName="List";var Fi=lo,Jr=Fi},66392:function(dn,pn){"use strict";var at;var ot=Symbol.for("react.element"),_t=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),Ie=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),de=Symbol.for("react.context"),Ee=Symbol.for("react.server_context"),we=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),fe=Symbol.for("react.offscreen"),z;z=Symbol.for("react.module.reference");function ee(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case ot:switch(oe=oe.type,oe){case ae:case Ie:case Ge:case be:case Te:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case Ee:case de:case we:case xe:case ve:case me:return oe;default:return ie}}case _t:return ie}}}at=de,at=me,at=ot,at=we,at=ae,at=xe,at=ve,at=_t,at=Ie,at=Ge,at=be,at=Te,at=function(){return!1},at=function(){return!1},at=function(oe){return ee(oe)===de},at=function(oe){return ee(oe)===me},at=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===ot},at=function(oe){return ee(oe)===we},at=function(oe){return ee(oe)===ae},at=function(oe){return ee(oe)===xe},at=function(oe){return ee(oe)===ve},at=function(oe){return ee(oe)===_t},at=function(oe){return ee(oe)===Ie},at=function(oe){return ee(oe)===Ge},at=function(oe){return ee(oe)===be},at=function(oe){return ee(oe)===Te},at=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===ae||oe===Ie||oe===Ge||oe===be||oe===Te||oe===fe||typeof oe=="object"&&oe!==null&&(oe.$$typeof===xe||oe.$$typeof===ve||oe.$$typeof===me||oe.$$typeof===de||oe.$$typeof===we||oe.$$typeof===z||oe.getModuleId!==void 0)},at=ee},31461:function(dn,pn,at){"use strict";at(66392)},58971:function(dn,pn,at){var ot=at(62195),_t=at(39015),ae=[at(19257)];dn.exports=ot.createStore(_t,ae)},19257:function(dn,pn,at){dn.exports=ot;function ot(){return at(55703),{}}},55703:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(dn){return dn<10?"0"+dn:dn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(dn){return rx_escapable.lastIndex=0,rx_escapable.test(dn)?'"'+dn.replace(rx_escapable,function(pn){var at=meta[pn];return typeof at=="string"?at:"\\u"+("0000"+pn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+dn+'"'}function str(dn,pn){var at,ot,_t,ae,Ge=gap,Ie,me=pn[dn];switch(me&&typeof me=="object"&&typeof me.toJSON=="function"&&(me=me.toJSON(dn)),typeof rep=="function"&&(me=rep.call(pn,dn,me)),typeof me){case"string":return quote(me);case"number":return isFinite(me)?String(me):"null";case"boolean":case"null":return String(me);case"object":if(!me)return"null";if(gap+=indent,Ie=[],Object.prototype.toString.apply(me)==="[object Array]"){for(ae=me.length,at=0;at<ae;at+=1)Ie[at]=str(at,me)||"null";return _t=Ie.length===0?"[]":gap?`[
`+gap+Ie.join(`,
`+gap)+`
`+Ge+"]":"["+Ie.join(",")+"]",gap=Ge,_t}if(rep&&typeof rep=="object")for(ae=rep.length,at=0;at<ae;at+=1)typeof rep[at]=="string"&&(ot=rep[at],_t=str(ot,me),_t&&Ie.push(quote(ot)+(gap?": ":":")+_t));else for(ot in me)Object.prototype.hasOwnProperty.call(me,ot)&&(_t=str(ot,me),_t&&Ie.push(quote(ot)+(gap?": ":":")+_t));return _t=Ie.length===0?"{}":gap?`{
`+gap+Ie.join(`,
`+gap)+`
`+Ge+"}":"{"+Ie.join(",")+"}",gap=Ge,_t}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(dn,pn,at){var ot;if(gap="",indent="",typeof at=="number")for(ot=0;ot<at;ot+=1)indent+=" ";else typeof at=="string"&&(indent=at);if(rep=pn,pn&&typeof pn!="function"&&(typeof pn!="object"||typeof pn.length!="number"))throw new Error("JSON.stringify");return str("",{"":dn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(dn,pn){var at,ot,_t=dn[pn];if(_t&&typeof _t=="object")for(at in _t)Object.prototype.hasOwnProperty.call(_t,at)&&(ot=walk(_t,at),ot!==void 0?_t[at]=ot:delete _t[at]);return reviver.call(dn,pn,_t)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(dn){return"\\u"+("0000"+dn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},62195:function(dn,pn,at){var ot=at(69078),_t=ot.slice,ae=ot.pluck,Ge=ot.each,Ie=ot.bind,me=ot.create,de=ot.isList,Ee=ot.isFunction,we=ot.isObject;dn.exports={createStore:ve};var be={version:"2.0.12",enabled:!1,get:function(xe,fe){var z=this.storage.read(this._namespacePrefix+xe);return this._deserialize(z,fe)},set:function(xe,fe){return fe===void 0?this.remove(xe):(this.storage.write(this._namespacePrefix+xe,this._serialize(fe)),fe)},remove:function(xe){this.storage.remove(this._namespacePrefix+xe)},each:function(xe){var fe=this;this.storage.each(function(z,ee){xe.call(fe,fe._deserialize(z),(ee||"").replace(fe._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(xe){return this._namespacePrefix=="__storejs_"+xe+"_"},createStore:function(){return ve.apply(this,arguments)},addPlugin:function(xe){this._addPlugin(xe)},namespace:function(xe){return ve(this.storage,this.plugins,xe)}};function Te(){var xe=typeof console=="undefined"?null:console;if(xe){var fe=xe.warn?xe.warn:xe.log;fe.apply(xe,arguments)}}function ve(xe,fe,z){z||(z=""),xe&&!de(xe)&&(xe=[xe]),fe&&!de(fe)&&(fe=[fe]);var ee=z?"__storejs_"+z+"_":"",oe=z?new RegExp("^"+ee):null,ie=/^[a-zA-Z0-9_\-]*$/;if(!ie.test(z))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var le={_namespacePrefix:ee,_namespaceRegexp:oe,_testStorage:function(pe){try{var Se="__storejs__test__";pe.write(Se,Se);var Le=pe.read(Se)===Se;return pe.remove(Se),Le}catch(De){return!1}},_assignPluginFnProp:function(pe,Se){var Le=this[Se];this[Se]=function(){var Fe=_t(arguments,0),Ae=this;function Oe(){if(Le)return Ge(arguments,function(He,Ye){Fe[Ye]=He}),Le.apply(Ae,Fe)}var ze=[Oe].concat(Fe);return pe.apply(Ae,ze)}},_serialize:function(pe){return JSON.stringify(pe)},_deserialize:function(pe,Se){if(!pe)return Se;var Le="";try{Le=JSON.parse(pe)}catch(De){Le=pe}return Le!==void 0?Le:Se},_addStorage:function(pe){this.enabled||this._testStorage(pe)&&(this.storage=pe,this.enabled=!0)},_addPlugin:function(pe){var Se=this;if(de(pe)){Ge(pe,function(Fe){Se._addPlugin(Fe)});return}var Le=ae(this.plugins,function(Fe){return pe===Fe});if(!Le){if(this.plugins.push(pe),!Ee(pe))throw new Error("Plugins must be function values that return objects");var De=pe.call(this);if(!we(De))throw new Error("Plugins must return an object of function properties");Ge(De,function(Fe,Ae){if(!Ee(Fe))throw new Error("Bad plugin property: "+Ae+" from plugin "+pe.name+". Plugins should only return functions.");Se._assignPluginFnProp(Fe,Ae)})}},addStorage:function(pe){Te("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(pe)}},ue=me(le,be,{plugins:[]});return ue.raw={},Ge(ue,function(pe,Se){Ee(pe)&&(ue.raw[Se]=Ie(ue,pe))}),Ge(xe,function(pe){ue._addStorage(pe)}),Ge(fe,function(pe){ue._addPlugin(pe)}),ue}},69078:function(dn,pn,at){var ot=Ie(),_t=me(),ae=de(),Ge=typeof window!="undefined"?window:at.g;dn.exports={assign:ot,create:_t,trim:ae,bind:Ee,slice:we,each:be,map:Te,pluck:ve,isList:xe,isFunction:fe,isObject:z,Global:Ge};function Ie(){return Object.assign?Object.assign:function(oe,ie,le,ue){for(var pe=1;pe<arguments.length;pe++)be(Object(arguments[pe]),function(Se,Le){oe[Le]=Se});return oe}}function me(){if(Object.create)return function(ie,le,ue,pe){var Se=we(arguments,1);return ot.apply(this,[Object.create(ie)].concat(Se))};{let oe=function(){};var ee=oe;return function(le,ue,pe,Se){var Le=we(arguments,1);return oe.prototype=le,ot.apply(this,[new oe].concat(Le))}}}function de(){return String.prototype.trim?function(oe){return String.prototype.trim.call(oe)}:function(oe){return oe.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function Ee(ee,oe){return function(){return oe.apply(ee,Array.prototype.slice.call(arguments,0))}}function we(ee,oe){return Array.prototype.slice.call(ee,oe||0)}function be(ee,oe){ve(ee,function(ie,le){return oe(ie,le),!1})}function Te(ee,oe){var ie=xe(ee)?[]:{};return ve(ee,function(le,ue){return ie[ue]=oe(le,ue),!1}),ie}function ve(ee,oe){if(xe(ee)){for(var ie=0;ie<ee.length;ie++)if(oe(ee[ie],ie))return ee[ie]}else for(var le in ee)if(ee.hasOwnProperty(le)&&oe(ee[le],le))return ee[le]}function xe(ee){return ee!=null&&typeof ee!="function"&&typeof ee.length=="number"}function fe(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},39015:function(dn,pn,at){dn.exports=[at(39627),at(95347),at(34524),at(45580),at(58855),at(8728)]},45580:function(dn,pn,at){var ot=at(69078),_t=ot.Global,ae=ot.trim;dn.exports={name:"cookieStorage",read:Ie,write:de,each:me,remove:Ee,clearAll:we};var Ge=_t.document;function Ie(Te){if(!Te||!be(Te))return null;var ve="(?:^|.*;\\s*)"+escape(Te).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Ge.cookie.replace(new RegExp(ve),"$1"))}function me(Te){for(var ve=Ge.cookie.split(/; ?/g),xe=ve.length-1;xe>=0;xe--)if(ae(ve[xe])){var fe=ve[xe].split("="),z=unescape(fe[0]),ee=unescape(fe[1]);Te(ee,z)}}function de(Te,ve){Te&&(Ge.cookie=escape(Te)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function Ee(Te){!Te||!be(Te)||(Ge.cookie=escape(Te)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function we(){me(function(Te,ve){Ee(ve)})}function be(Te){return new RegExp("(?:^|;\\s*)"+escape(Te).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Ge.cookie)}},39627:function(dn,pn,at){var ot=at(69078),_t=ot.Global;dn.exports={name:"localStorage",read:Ge,write:Ie,each:me,remove:de,clearAll:Ee};function ae(){return _t.localStorage}function Ge(we){return ae().getItem(we)}function Ie(we,be){return ae().setItem(we,be)}function me(we){for(var be=ae().length-1;be>=0;be--){var Te=ae().key(be);we(Ge(Te),Te)}}function de(we){return ae().removeItem(we)}function Ee(){return ae().clear()}},8728:function(dn){dn.exports={name:"memoryStorage",read:at,write:ot,each:_t,remove:ae,clearAll:Ge};var pn={};function at(Ie){return pn[Ie]}function ot(Ie,me){pn[Ie]=me}function _t(Ie){for(var me in pn)pn.hasOwnProperty(me)&&Ie(pn[me],me)}function ae(Ie){delete pn[Ie]}function Ge(Ie){pn={}}},95347:function(dn,pn,at){var ot=at(69078),_t=ot.Global;dn.exports={name:"oldFF-globalStorage",read:Ge,write:Ie,each:me,remove:de,clearAll:Ee};var ae=_t.globalStorage;function Ge(we){return ae[we]}function Ie(we,be){ae[we]=be}function me(we){for(var be=ae.length-1;be>=0;be--){var Te=ae.key(be);we(ae[Te],Te)}}function de(we){return ae.removeItem(we)}function Ee(){me(function(we,be){delete ae[we]})}},34524:function(dn,pn,at){var ot=at(69078),_t=ot.Global;dn.exports={name:"oldIE-userDataStorage",write:de,read:Ee,each:we,remove:be,clearAll:Te};var ae="storejs",Ge=_t.document,Ie=fe(),me=(_t.navigator?_t.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function de(z,ee){if(!me){var oe=xe(z);Ie(function(ie){ie.setAttribute(oe,ee),ie.save(ae)})}}function Ee(z){if(!me){var ee=xe(z),oe=null;return Ie(function(ie){oe=ie.getAttribute(ee)}),oe}}function we(z){Ie(function(ee){for(var oe=ee.XMLDocument.documentElement.attributes,ie=oe.length-1;ie>=0;ie--){var le=oe[ie];z(ee.getAttribute(le.name),le.name)}})}function be(z){var ee=xe(z);Ie(function(oe){oe.removeAttribute(ee),oe.save(ae)})}function Te(){Ie(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(ae);for(var oe=ee.length-1;oe>=0;oe--)z.removeAttribute(ee[oe].name);z.save(ae)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function xe(z){return z.replace(/^\d/,"___$&").replace(ve,"___")}function fe(){if(!Ge||!Ge.documentElement||!Ge.documentElement.addBehavior)return null;var z="script",ee,oe,ie;try{oe=new ActiveXObject("htmlfile"),oe.open(),oe.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),oe.close(),ee=oe.w.frames[0].document,ie=ee.createElement("div")}catch(le){ie=Ge.createElement("div"),ee=Ge.body}return function(le){var ue=[].slice.call(arguments,0);ue.unshift(ie),ee.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(ae),le.apply(this,ue),ee.removeChild(ie)}}},58855:function(dn,pn,at){var ot=at(69078),_t=ot.Global;dn.exports={name:"sessionStorage",read:Ge,write:Ie,each:me,remove:de,clearAll:Ee};function ae(){return _t.sessionStorage}function Ge(we){return ae().getItem(we)}function Ie(we,be){return ae().setItem(we,be)}function me(we){for(var be=ae().length-1;be>=0;be--){var Te=ae().key(be);we(Ge(Te),Te)}}function de(we){return ae().removeItem(we)}function Ee(){return ae().clear()}},4977:function(dn){"use strict";dn.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(dn){"use strict";dn.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(dn){"use strict";dn.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(dn){"use strict";dn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},17423:function(dn,pn,at){"use strict";at.d(pn,{Z:function(){return Ee}});const ot=we=>typeof we=="object"&&we!=null&&we.nodeType===1,_t=(we,be)=>(!be||we!=="hidden")&&we!=="visible"&&we!=="clip",ae=(we,be)=>{if(we.clientHeight<we.scrollHeight||we.clientWidth<we.scrollWidth){const Te=getComputedStyle(we,null);return _t(Te.overflowY,be)||_t(Te.overflowX,be)||(ve=>{const xe=(fe=>{if(!fe.ownerDocument||!fe.ownerDocument.defaultView)return null;try{return fe.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!xe&&(xe.clientHeight<ve.scrollHeight||xe.clientWidth<ve.scrollWidth)})(we)}return!1},Ge=(we,be,Te,ve,xe,fe,z,ee)=>fe<we&&z>be||fe>we&&z<be?0:fe<=we&&ee<=Te||z>=be&&ee>=Te?fe-we-ve:z>be&&ee<Te||fe<we&&ee>Te?z-be+xe:0,Ie=we=>{const be=we.parentElement;return be==null?we.getRootNode().host||null:be},me=(we,be)=>{var Te,ve,xe,fe;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:oe,boundary:ie,skipOverflowHiddenElements:le}=be,ue=typeof ie=="function"?ie:wt=>wt!==ie;if(!ot(we))throw new TypeError("Invalid target");const pe=document.scrollingElement||document.documentElement,Se=[];let Le=we;for(;ot(Le)&&ue(Le);){if(Le=Ie(Le),Le===pe){Se.push(Le);break}Le!=null&&Le===document.body&&ae(Le)&&!ae(document.documentElement)||Le!=null&&ae(Le,le)&&Se.push(Le)}const De=(ve=(Te=window.visualViewport)==null?void 0:Te.width)!=null?ve:innerWidth,Fe=(fe=(xe=window.visualViewport)==null?void 0:xe.height)!=null?fe:innerHeight,{scrollX:Ae,scrollY:Oe}=window,{height:ze,width:He,top:Ye,right:We,bottom:Ue,left:st}=we.getBoundingClientRect(),{top:dt,right:gt,bottom:Et,left:Ke}=(wt=>{const ht=window.getComputedStyle(wt);return{top:parseFloat(ht.scrollMarginTop)||0,right:parseFloat(ht.scrollMarginRight)||0,bottom:parseFloat(ht.scrollMarginBottom)||0,left:parseFloat(ht.scrollMarginLeft)||0}})(we);let et=ee==="start"||ee==="nearest"?Ye-dt:ee==="end"?Ue+Et:Ye+ze/2-dt+Et,$e=oe==="center"?st+He/2-Ke+gt:oe==="end"?We+gt:st-Ke;const vt=[];for(let wt=0;wt<Se.length;wt++){const ht=Se[wt],{height:pt,width:ct,top:Ct,right:xt,bottom:yt,left:Tt}=ht.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&st>=0&&Ue<=Fe&&We<=De&&Ye>=Ct&&Ue<=yt&&st>=Tt&&We<=xt)return vt;const St=getComputedStyle(ht),nt=parseInt(St.borderLeftWidth,10),Qe=parseInt(St.borderTopWidth,10),Ce=parseInt(St.borderRightWidth,10),Ne=parseInt(St.borderBottomWidth,10);let Je=0,rt=0;const Be="offsetWidth"in ht?ht.offsetWidth-ht.clientWidth-nt-Ce:0,_e="offsetHeight"in ht?ht.offsetHeight-ht.clientHeight-Qe-Ne:0,Xe="offsetWidth"in ht?ht.offsetWidth===0?0:ct/ht.offsetWidth:0,lt="offsetHeight"in ht?ht.offsetHeight===0?0:pt/ht.offsetHeight:0;if(pe===ht)Je=ee==="start"?et:ee==="end"?et-Fe:ee==="nearest"?Ge(Oe,Oe+Fe,Fe,Qe,Ne,Oe+et,Oe+et+ze,ze):et-Fe/2,rt=oe==="start"?$e:oe==="center"?$e-De/2:oe==="end"?$e-De:Ge(Ae,Ae+De,De,nt,Ce,Ae+$e,Ae+$e+He,He),Je=Math.max(0,Je+Oe),rt=Math.max(0,rt+Ae);else{Je=ee==="start"?et-Ct-Qe:ee==="end"?et-yt+Ne+_e:ee==="nearest"?Ge(Ct,yt,pt,Qe,Ne+_e,et,et+ze,ze):et-(Ct+pt/2)+_e/2,rt=oe==="start"?$e-Tt-nt:oe==="center"?$e-(Tt+ct/2)+Be/2:oe==="end"?$e-xt+Ce+Be:Ge(Tt,xt,ct,nt,Ce+Be,$e,$e+He,He);const{scrollLeft:Pt,scrollTop:kt}=ht;Je=lt===0?0:Math.max(0,Math.min(kt+Je/lt,ht.scrollHeight-pt/lt+_e)),rt=Xe===0?0:Math.max(0,Math.min(Pt+rt/Xe,ht.scrollWidth-ct/Xe+Be)),et+=kt-Je,$e+=Pt-rt}vt.push({el:ht,top:Je,left:rt})}return vt},de=we=>we===!1?{block:"end",inline:"nearest"}:(be=>be===Object(be)&&Object.keys(be).length!==0)(we)?we:{block:"start",inline:"nearest"};function Ee(we,be){if(!we.isConnected||!(xe=>{let fe=xe;for(;fe&&fe.parentNode;){if(fe.parentNode===document)return!0;fe=fe.parentNode instanceof ShadowRoot?fe.parentNode.host:fe.parentNode}return!1})(we))return;const Te=(xe=>{const fe=window.getComputedStyle(xe);return{top:parseFloat(fe.scrollMarginTop)||0,right:parseFloat(fe.scrollMarginRight)||0,bottom:parseFloat(fe.scrollMarginBottom)||0,left:parseFloat(fe.scrollMarginLeft)||0}})(we);if((xe=>typeof xe=="object"&&typeof xe.behavior=="function")(be))return be.behavior(me(we,be));const ve=typeof be=="boolean"||be==null?void 0:be.behavior;for(const{el:xe,top:fe,left:z}of me(we,de(be))){const ee=fe-Te.top+Te.bottom,oe=z-Te.left+Te.right;xe.scroll({top:ee,left:oe,behavior:ve})}}}}]);