You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Question__AddOrEdit__ind...

1245 lines
2.6 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[6913],{65363:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ke}});var ct=at(14809),Bt=at(59301),oe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},ze=oe,De=at(7657),fe=function(Se,Me){return Bt.createElement(De.Z,(0,ct.Z)({},Se,{ref:Me,icon:ze}))},me=Bt.forwardRef(fe),ke=me},76618:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ke}});var ct=at(14809),Bt=at(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},ze=oe,De=at(7657),fe=function(Se,Me){return Bt.createElement(De.Z,(0,ct.Z)({},Se,{ref:Me,icon:ze}))},me=Bt.forwardRef(fe),ke=me},8336:function(){"use strict"},12469:function(){"use strict"},99587:function(gn,cn){"use strict";cn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},39744:function(){"use strict"},63720:function(){"use strict";function gn(de,z,ee,ae){ee===void 0&&(ee=0),ae===void 0&&(ae=1/0),this._name=de,this._defaultValue=z,this._minimum=ee,this._maximum=ae}Object.defineProperty(gn.prototype,"name",{get:function(){return this._name},set:function(de){if(typeof de!="string"||de==="")throw new Error("Shape name must be a valid string.");this._name=de}}),Object.defineProperty(gn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("The default value must be a real number, not: "+de);this._defaultValue=de}}),Object.defineProperty(gn.prototype,"minimum",{get:function(){return this._minimum},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("Minimum must be a real number, not: "+de);this._minimum=de}}),Object.defineProperty(gn.prototype,"maximum",{get:function(){return this._maximum},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("Maximum must be a real number, not: "+de);this._maximum=de}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(de,z){var ee=go.Shape._FigureParameters[de];return ee?ee[z]:null},go.Shape.setFigureParameter=function(de,z,ee){if(!(ee instanceof gn))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 ae=go.Shape._FigureParameters[de];ae||(ae=[],go.Shape._FigureParameters[de]=ae),ae[z]=ee};var cn=[];function at(de,z){var ee=cn.pop();return ee===void 0?new go.Point(de,z):(ee.x=de,ee.y=z,ee)}function ct(){var de=cn.pop();return de===void 0?new go.Point:de}function Bt(de){cn.push(de)}function oe(de,z,ee,ae,ie,le,ue,ge,Pe){Pe||(Pe=new go.Point);var je=de-ee,Be=ie-ue,Fe=NaN,Ne=NaN;if(je===0)if(Be===0)de===ee&&(Fe=de,Ne=z);else{var Ae=(le-ge)/Be,Ie=le-Ae*ie;Fe=de,Ne=Ae*Fe+Ie}else if(Be===0){var We=(z-ae)/je,Ye=z-We*de;Fe=ie,Ne=We*Fe+Ye}else{var We=(z-ae)/je,Ae=(le-ge)/Be,Ye=z-We*de,Ie=le-Ae*ie;Fe=(Ie-Ye)/(We-Ae),Ne=We*Fe+Ye}return Pe.x=Fe,Pe.y=Ne,Pe}function ze(de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae){var Ie=1-Pe,We=Pe,Ye=de*Ie+ee*We,Ue=z*Ie+ae*We,Ke=ee*Ie+ie*We,ot=ae*Ie+le*We,st=ie*Ie+ue*We,dt=le*Ie+ge*We,Ct=Ye*Ie+Ke*We,$e=Ue*Ie+ot*We,rt=Ke*Ie+st*We,St=ot*Ie+dt*We,Pt=Ct*Ie+rt*We,wt=$e*Ie+St*We;je.x=Ye,je.y=Ue,Be.x=Ct,Be.y=$e,Fe.x=Pt,Fe.y=wt,Ne.x=rt,Ne.y=St,Ae.x=st,Ae.y=dt}var De=new go.Spot(.156,.156),fe=new go.Spot(.844,.844),me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new gn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=5),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var ie=ae*me,le=new go.Geometry().add(new go.PathFigure(ae,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-ae,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-ie,0,z,ie)).add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)).add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,ee-ie,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ae,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,ie,ee,0,ee-ie)).add(new go.PathSegment(go.PathSegment.Line,0,ae)).add(new go.PathSegment(go.PathSegment.Bezier,ae,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(de,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(de,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(de,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(de,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(de,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(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=ee/2,ae.endX=z,ae.endY=ee/2,ae}),go.Shape.defineFigureGenerator("LineV",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z/2,ae.startY=0,ae.endX=z/2,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(de,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(de,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(de,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(de,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(de,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(de,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(de,z,ee){var ae=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ae*z,(1-ae)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,(1-ae)*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(de,z,ee){var ae=z/2,ie=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ae,ae,ae,ae).close()));return ie.spot1=De,ie.spot2=fe,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=0,ae.endX=z,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Line2",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z,ae.startY=0,ae.endX=0,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Curve1",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,me*z,0,z,(1-me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,0,me*ee,(1-me)*z,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,me*ee,me*z,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-me)*z,0,0,(1-me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(de,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(de,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(de,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(de,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 gn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=.1:ae<-1?ae=-1:ae>1&&(ae=1);var ie=Math.abs(ae)*z;if(ae===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 ae>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 gn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=10:ae<-z?ae=-z:ae>z&&(ae=z);var ie=Math.abs(ae);if(ae===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 ae>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 gn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=.2:ae<.5?ae=-.5:ae>.5&&(ae=.5);var ie=Math.abs(ae)*z;if(ae===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 ae>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 gn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=20:ae<-z?ae=-z/2:ae>z&&(ae=z/2);var ie=Math.abs(ae);if(ae===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 ae>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 gn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=10:ae<-z?ae=-z/2:ae>z&&(ae=z/2);var ie=Math.abs(ae);if(ae===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 ae>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 ke=[];function Ce(){var de=ke.pop();return de===void 0?[]:de}function Se(de){de.length=0,ke.push(de)}function Me(de){for(var z=Ce(),ee=.5,ae=.5,ie=Math.PI*1.5,le=0,ue=0;ue<de;ue++)le=2*Math.PI/de*ue+ie,z[ue]=new go.Point(ae+ee*Math.cos(le),ae+ee*Math.sin(le));return z.push(z[0]),z}function ve(de){var z=we(de),ee=Ce();ee[0]=z[0];for(var ae=1,ie=1;ae<z.length;ae+=2,ie+=3)ee[ie]=z[ae],ee[ie+1]=z[ae],ee[ie+2]=z[ae+1];return Se(z),ee}function we(de){for(var z=Me(de),ee=Ce(),ae=Math.floor(z.length/2),ie=z.length-1,le=de%2===0?2:1,ue=0;ue<ie;ue++){var ge=z[ue],Pe=z[ue+1],je=z[(ae+ue-1)%ie],Be=z[(ae+ue+le)%ie];ee[ue*2]=ge,ee[ue*2+1]=oe(ge.x,ge.y,je.x,je.y,Pe.x,Pe.y,Be.x,Be.y,new go.Point)}return ee[ee.length]=ee[0],Se(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(de,z,ee){var ae=Me(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<5;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(de,z,ee){var ae=Me(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<6;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(de,z,ee){var ae=Me(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<7;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(de,z,ee){var ae=Me(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<8;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(de,z,ee){var ae=Me(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<9;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(de,z,ee){var ae=Me(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(de,z,ee){var ae=Me(12),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(de,z,ee){var ae=we(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(de,z,ee){var ae=we(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(de,z,ee){var ae=we(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<14;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(de,z,ee){var ae=we(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<16;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(de,z,ee){var ae=we(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<18;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(de,z,ee){var ae=we(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<20;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(de,z,ee){var ae=ve(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(de,z,ee){var ae=ve(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(de,z,ee){var ae=ve(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(de,z,ee){var ae=ve(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(de,z,ee){var ae=ve(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(de,z,ee){var ae=ve(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new gn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new gn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(de,z,ee){var ae=de?de.parameter1:NaN,ie=de?de.parameter2:NaN;isNaN(ae)&&(ae=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()),ae<z/2&&ie<ee/2&&(ue.add(new go.PathSegment(go.PathSegment.Move,ae,ie)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,ie).close())),le.setSpots(0,0,1,1,ae,ie,-ae,-ie),le}),go.Shape.setFigureParameter("Ring",0,new gn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=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 ge=Math.max(ie-ae,0);return ge>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+ge,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,ge,ge).close())),le.spot1=De,le.spot2=fe,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(de,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(de,z,ee){var ae=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ae*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close())).setSpots(ae/2,ae/2,1-ae/2,1-ae/2)}),go.Shape.setFigureParameter("Pie",0,new gn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new gn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(de,z,ee){var ae=de?de.parameter1:NaN,ie=de?de.parameter2:NaN;isNaN(ae)&&(ae=0),isNaN(ie)&&(ie=315);var le=ae%360;le<0&&(le+=360);var ue=ie%360,ge=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(ge,ge).add(new go.PathSegment(go.PathSegment.Arc,le,ue,ge,ge,ge,ge).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(de,z,ee){var ae=me/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-ae)*ee,(ie+ae)*z,(le+ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new gn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30);var ie=Math.min(ae,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 gn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var ie=Math.min(ae,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 gn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(de,z,ee){var ae=de?de.parameter1:NaN;if((isNaN(ae)||ae<0)&&(ae=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,ge=Math.atan2(ee,z),Pe=ae-Math.min(Math.cos(ge)*ae/2,le),je=ae-Math.min(Math.sin(ge)*ae/2,ue),ie=new go.Geometry,Be=new go.PathFigure(Pe,0,!0);return ie.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,le,.2*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,z-Pe,0)),Be.add(new go.PathSegment(go.PathSegment.Line,z,je)),Be.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,z,ee-je)),Be.add(new go.PathSegment(go.PathSegment.Line,z-Pe,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,le,.8*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,Pe,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ee-je)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,0,je).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new gn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=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 gn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.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,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*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-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new gn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.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-ae)*z,.25*ee,Math.abs(1-ae)*z,.75*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,me*z,0,z,(.5-me/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,(.5+me/2)*ee,me*z,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(de,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(de,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(de,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(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.4*z,.6*ee,!0);ae.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,ge=0,Pe=le*me;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+ge)*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue)*z,(.5-Pe+ge)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue+.05)*z,(.5-Pe+ge-.02)*ee)),le=.2,ue=0,ge=-.3,Pe=le*me,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+ge)*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue)*z,(.5-Pe+ge)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+ge)*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue)*z,(.5-Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Pe+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),le=.2,ue=-.3,ge=0,Pe=le*me,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue-.05)*z,(.5-Pe+ge-.02)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+ge)*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue)*z,(.5-Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee).close()),ae.setSpots(.06,.33,.93,.68),ae}),go.Shape.defineFigureGenerator("YinYang",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.5,0,!0);ae.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,ge=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ue+le)*z,ge*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*ge,le*z,le*z).close()),ie=new go.PathFigure(z*.5,0,!1),ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),ge=.75,ie=new go.PathFigure((ue+le)*z,ge*ee,!0),ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*ge,le*z,le*z).close()),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Peace",function(de,z,ee){var ae=.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-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ae*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=.5,ge=.5,Pe=new go.PathFigure(ue*z,(ge-le)*ee);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),le=.4,ie=me*.4;var je=ct(),Be=ct(),Fe=ct(),Ne=ct();ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.42,je,Be,Fe,Ne,Ne);var Ae=ct(),Ie=ct(),We=ct();ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.58,Ne,Ne,We,Ae,Ie);var Ye=ct(),Ue=ct(),Ke=ct();ze(ue,ge+le,ue-ie,ge+le,ue-le,ge+ie,ue-le,ge,.42,Ye,Ue,Ke,Ne,Ne);var ot=ct(),st=ct(),dt=ct();return ze(ue,ge+le,ue-ie,ge+le,ue-le,ge+ie,ue-le,ge,.58,Ne,Ne,dt,ot,st),Pe.add(new go.PathSegment(go.PathSegment.Move,dt.x*z,dt.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,ot.x*z,ot.y*ee,st.x*z,st.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*z,Fe.y*ee,je.x*z,je.y*ee,Be.x*z,Be.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,dt.x*z,dt.y*ee).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,Ke.x*z,Ke.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,We.x*z,We.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Ae.x*z,Ae.y*ee,Ie.x*z,Ie.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ke.x*z,Ke.y*ee,Ye.x*z,Ye.y*ee,Ue.x*z,Ue.y*ee).close()),Bt(je),Bt(Be),Bt(Fe),Bt(Ne),Bt(Ae),Bt(Ie),Bt(We),Bt(Ye),Bt(Ue),Bt(Ke),Bt(ot),Bt(st),Bt(dt),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Fragile",function(de,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 gn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30),ae>z&&(ae=z);var ie=(z-ae)/2,le=ie+ae;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(de,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(de,z,ee){var ae=new go.Geometry,ie=me*.4,le=.4,ue=.5,ge=.5,Pe=ct(),je=ct(),Be=ct(),Fe=ct(),Ne=new go.PathFigure((ue-le)*z,ge*ee,!1);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.44,Be,Fe,je,Pe,Pe),Ne.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee));var Ae=at(je.x,je.y);ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.56,Pe,Pe,je,Be,Fe);var Ie=at(je.x,je.y);Ne.add(new go.PathSegment(go.PathSegment.Line,(Ae.x*.1+.95*.9)*z,Ae.y*.1*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,Ae.y*.1*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Ie.x*.1+.9)*z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Ie.x*.1+.9)*z,(Ie.y*.1+.05*.9)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Ie.x*z,Ie.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),le=.35,ie=me*.35;var We=new go.PathFigure(ue*z,(ge-le)*ee,!1);ae.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee));var Ye=new go.PathFigure((ue-le)*z,ge*ee,!1);return ae.add(Ye),Bt(Pe),Bt(je),Bt(Be),Bt(Fe),Bt(Ae),Bt(Ie),ae.spot1=new go.Spot(.202,.257),ae.spot2=new go.Spot(.792,.739),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("GenderFemale",function(de,z,ee){var ae=new go.Geometry,ie=.375,le=0,ue=-.125,ge=ie*me,Pe=new go.PathFigure((.525+le)*z,(.5+ie+ue)*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ue)*ee,(.5+ge+le)*z,(.5+ie+ue)*ee,(.5+ie+le)*z,(.5+ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ue)*ee,(1-.5+ie+le)*z,(.5-ge+ue)*ee,(.5+ge+le)*z,(.5-ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+ie+ue)*ee,(.5-ie+le)*z,(.5+ge+ue)*ee,(.5-ge+le)*z,(.5+ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee).close()),ie=.325,le=0,ue=-.125,ge=ie*me;var Pe=new go.PathFigure((1-.5+ie+le)*z,(.5+ue)*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+ie+ue)*ee,(.5+ie+le)*z,(.5+ge+ue)*ee,(.5+ge+le)*z,(.5+ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5+ie+ue)*ee,(.5-ie+le)*z,(.5+ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ue)*ee,(.5+ge+le)*z,(.5-ie+ue)*ee,(1-.5+ie+le)*z,(.5-ge+ue)*ee));var Pe=new go.PathFigure((.525+le)*z,(.5+ie+ue)*ee,!1);return ae.add(Pe),ae.spot1=new go.Spot(.232,.136),ae.spot2=new go.Spot(.682,.611),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicImplies",function(de,z,ee){var ae=de?de.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*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(de,z,ee){var ae=de?de.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*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,ae*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(de,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(de,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(de,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(de,z,ee){var ae=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 ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicTruth",function(de,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(de,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(de,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(de,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(de,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(de,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(de,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new gn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new gn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=.3);var le=(1-ae)*z,ue=(.5-ie/2)*ee,ge=(.5+ie/2)*ee,Pe=new go.Geometry,je=new go.PathFigure(0,ue,!0);Pe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ue)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ge)),je.add(new go.PathSegment(go.PathSegment.Line,0,ge).close()),Pe.spot1=new go.Spot(0,ue/ee);var Be=oe(0,ge/ee,1,ge/ee,le/z,1,1,.5,ct());return Pe.spot2=new go.Spot(Be.x,Be.y),Bt(Be),Pe}),go.Shape.setFigureParameter("Arrow2",0,new gn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new gn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=30),ae>z&&(ae=z);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,ee/2);var le=z-ae,ue=(ee-ie)/2,ge=ue+ie,Pe=new go.Geometry,je=new go.PathFigure(0,ue,!0);Pe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ue)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ge)),je.add(new go.PathSegment(go.PathSegment.Line,0,ge).close()),Pe.spot1=new go.Spot(0,ue/ee);var Be=oe(0,ge/ee,1,ge/ee,le/z,1,1,.5,ct());return Pe.spot2=new go.Spot(Be.x,Be.y),Bt(Be),Pe}),go.Shape.defineFigureGenerator("Chevron",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("DoubleArrow",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.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()),ae}),go.Shape.setFigureParameter("DoubleEndArrow",0,new gn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var Pe=oe(0,.5,.3,0,0,ie/ee,.1,ie/ee,ct());return ue.spot1=new go.Spot(Pe.x,Pe.y),Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,Pe),ue.spot2=new go.Spot(Pe.x,Pe.y),Bt(Pe),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new gn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new gn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=40);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(ee-ae)/2,ue=le+ae,ge=(ee-ie)/2,Pe=ge+ie;(ae>ee||ie>ee)&&(ie>ae?(ae=ae*ee/ie,le=(ee-ae)/2,ue=le+ae,ge=0,Pe=ee):(le=0,ue=ee,ge=0,Pe=ee));var je=new go.Geometry,Be=new go.PathFigure(z,.5*ee,!0);je.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ge).close());var Fe=oe(0,.5,.3,ge/ee,0,le/ee,1,le/ee,ct());return je.spot1=new go.Spot(Fe.x,Fe.y),Fe=oe(.7,Pe/ee,1,.5,0,ue/ee,1,ue/ee,Fe),je.spot2=new go.Spot(Fe.x,Fe.y),Bt(Fe),je}),go.Shape.setFigureParameter("IBeamArrow",0,new gn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(0,ie/ee);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,ct());return ue.spot2=new go.Spot(Pe.x,Pe.y),Bt(Pe),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new gn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new gn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=40);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(ee-ae)/2,ue=le+ae,ge=(ee-ie)/2,Pe=ge+ie;(ae>ee||ie>ee)&&(ie>ae?(ae=ae*ee/ie,le=(ee-ae)/2,ue=le+ae,ge=0,Pe=ee):(le=0,ue=ee,ge=0,Pe=ee));var je=new go.Geometry,Be=new go.PathFigure(z,.5*ee,!0);je.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ge).close()),je.spot1=new go.Spot(0,le/ee);var Fe=oe(.7,Pe/ee,1,.5,0,ue/ee,1,ue/ee,ct());return je.spot2=new go.Spot(Fe.x,Fe.y),Bt(Fe),je}),go.Shape.setFigureParameter("Pointer",0,new gn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.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,ae*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(ae,.35);var ue=oe(.2,.65,1,.65,0,1,1,.5,ct());return ie.spot2=new go.Spot(ue.x,ue.y),Bt(ue),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new gn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.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,ae*z,.75*ee,ae*z,.25*ee).close()),ie.spot1=new go.Spot(ae,.35);var ue=oe(0,.65,1,.65,0,1,1,.5,ct());return ie.spot2=new go.Spot(ue.x,ue.y),Bt(ue),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new gn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.4);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,0,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,.3);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,ct());return ue.spot2=new go.Spot(Pe.x,Pe.y),Bt(Pe),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new gn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=50);var ie=(ee-ae)/2,le=ie+ae;ae>ee&&(ie=0,le=ee);var ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,0,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,ie/ee);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,ct());return ue.spot2=new go.Spot(Pe.x,Pe.y),Bt(Pe),ue}),go.Shape.setFigureParameter("SquareArrow",0,new gn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.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,ae*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,ae*z,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(ae,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(0,.9*ee,!0);return ae.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()),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.97),ae}),go.Shape.defineFigureGenerator("Cone2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.9*ee,!0);ae.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 ae.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,.8*ee,.85/.9*z,.8*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.82),ae}),go.Shape.defineFigureGenerator("Cube1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,ee,!0);ae.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 ae.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)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.5,.85),ae}),go.Shape.defineFigureGenerator("Cube2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.3*ee,!0);ae.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 ae.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)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.7,1),ae}),go.Shape.defineFigureGenerator("Cylinder1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(0,ae,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,me*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*z,ae,(.5+le)*z,0,1*z,me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-me*ae,(.5+le)*z,1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,1*ee,0,ee-me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae));var ge=new go.PathFigure(z,ae,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*ae,1*z,2*ae-me*ae,(.5+le)*z,2*ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,ae,(.5-le)*z,2*ae,0,2*ae-me*ae)),ie.spot1=new go.Spot(0,0,0,2*ae),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(0,ee-ae,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,me*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,(.5+le)*z,0,z,me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-me*ae,(.5+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,ee,0,ee-me*ae));var ge=new go.PathFigure(0,ee-ae,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*ae,0,ee-ae-me*ae,(.5-le)*z,ee-2*ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z,ee-ae,(.5+le)*z,ee-2*ae,z,ee-ae-me*ae)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*ae),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(ae,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-me*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-me*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,me*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,me*ae,0));var ge=new go.PathFigure(ae,0,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,2*ae,.5*ee,ae+me*ae,0,2*ae,(.5-le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ae,ee,2*ae,(.5+le)*ee,ae+me*ae,ee)),ie.spot1=new go.Spot(0,0,2*ae,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(z-ae,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-me*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-me*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,me*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,me*ae,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0));var ge=new go.PathFigure(z-ae,0,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-2*ae,.5*ee,z-ae-me*ae,0,z-2*ae,(.5-le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z-2*ae,(.5+le)*ee,z-ae-me*ae,ee)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*ae,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,.25*ee,!0);ae.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 ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.408,.172),ae.spot2=new go.Spot(.833,.662),ae}),go.Shape.defineFigureGenerator("Prism2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!0);ae.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 ae.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)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("Pyramid1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.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 ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Pyramid2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.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 ae.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)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Actor",function(de,z,ee){var ae=new go.Geometry,ie=.2,le=.1,ue=me*ie,ge=me*le,Pe=.5,je=.1,Be=new go.PathFigure(Pe*z,(je+le)*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ie)*z,je*ee,(Pe-ue)*z,(je+le)*ee,(Pe-ie)*z,(je+ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-le)*ee,(Pe-ie)*z,(je-ge)*ee,(Pe-ue)*z,(je-le)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ie)*z,je*ee,(Pe+ue)*z,(je-le)*ee,(Pe+ie)*z,(je-ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+le)*ee,(Pe+ie)*z,(je+ge)*ee,(Pe+ue)*z,(je+le)*ee));var Fe=.05,Ne=me*Fe;Pe=.05,je=.25;var Ae=new go.PathFigure(.5*z,.2*ee,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),Pe=.95,je=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Fe)*z,je*ee,(Pe+Ne)*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),Fe=.025,Ne=me*Fe,Pe=.825,je=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),Fe=.05,Ne=me*Fe,Pe=.5,je=.7,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),Fe=.025,Ne=me*Fe,Pe=.175,je=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Fe=.05,Ne=me*Fe,Pe=.05,je=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee,(Pe-Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ae.spot1=new go.Spot(.2,.2),ae.spot2=new go.Spot(.8,.65),ae}),go.Shape.setFigureParameter("Card",0,new gn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.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,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),ie.spot1=new go.Spot(0,ae),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,.5*ee,!0);ae.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 ae.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)),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,.25),ae}),go.Shape.defineFigureGenerator("CreateRequest",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("Database",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.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 ge=new go.PathFigure(z,.1*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+ie)*z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+ie)*z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+le)*ee,(.5+ie)*z,.4*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-ie)*z,.4*ee,0,(.3+le)*ee)),ae.spot1=new go.Spot(0,.4),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("DataStorage",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.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()),ae.spot1=new go.Spot(.226,0),ae.spot2=new go.Spot(.81,1),ae}),go.Shape.defineFigureGenerator("DiskStorage",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.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 ge=new go.PathFigure(z,.1*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+ie)*z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+ie)*z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+le)*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("Display",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return ae.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()),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("DividedEvent",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var le=me*.2,ue=new go.PathFigure(0,.2*ee,!0);ae.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 ge=new go.PathFigure(0,ie*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ae}),go.Shape.defineFigureGenerator("DividedProcess",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.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 ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ae}),go.Shape.defineFigureGenerator("Document",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return ae.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()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("ExternalOrganization",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var le=new go.PathFigure(0,0,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("ExternalProcess",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.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 ae.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)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("File",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.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 ae.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)),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Interrupt",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,.5*ee,!0);ae.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);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee));var ue=new go.PathFigure(z,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("InternalStorage",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.1);var ue=new go.PathFigure(0,0,!0);ae.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 ge=new go.PathFigure(ie*z,0,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Move,0,le*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,z,le*ee)),ae}),go.Shape.defineFigureGenerator("Junction",function(de,z,ee){var ae=new go.Geometry,ie=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ue=me*.5,ge=.5,Pe=new go.PathFigure(z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,ee,z,(ge+ue)*ee,(ge+ue)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*ee,(ge-ue)*z,ee,0,(ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,0,0,(ge-ue)*ee,(ge-ue)*z,0)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,ge*ee,(ge+ue)*z,0,z,(ge-ue)*ee));var je=new go.PathFigure((le+ie)*z,(le+ie)*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le*z,le*ee)),je.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Line,(le+ie)*z,le*ee)),ae}),go.Shape.defineFigureGenerator("LinedDocument",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);ae.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 ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*ee)),ae.spot1=new go.Spot(.1,0),ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("LoopLimit",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.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()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MagneticTape",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(.5*z,ee,!0);return ae.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)),ae.spot1=new go.Spot(.15,.15),ae.spot2=new go.Spot(.85,.8),ae}),go.Shape.defineFigureGenerator("ManualInput",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!0);return ae.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()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MessageFromUser",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.7);var le=new go.PathFigure(0,0,!0);return ae.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()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("MicroformProcessing",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(0,0,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("MicroformRecording",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.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()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("MultiDocument",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(z,0,!0);ae.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 ae.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)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.8,.77),ae}),go.Shape.defineFigureGenerator("MultiProcess",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,.1*ee,!0);ae.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 ae.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)),ae.spot1=new go.Spot(0,.2),ae.spot2=new go.Spot(.8,1),ae}),go.Shape.defineFigureGenerator("OfflineStorage",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=1-ie,ue=new go.PathFigure(0,0,!0);ae.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 ge=new go.PathFigure(.5*ie*z,ie*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*ee)),ae}),go.Shape.defineFigureGenerator("OffPageConnector",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.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()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("Or",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.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 ge=new go.PathFigure(z,.5*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ae}),go.Shape.defineFigureGenerator("PaperTape",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return ae.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()),ae.spot1=new go.Spot(0,.49),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Procedure",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("Process",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.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 ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Sort",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.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 ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.5),ae}),go.Shape.defineFigureGenerator("Start",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(ie*z,0,!0);ae.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 ae.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)),ae.spot1=new go.Spot(ie,0),ae.spot2=new go.Spot(1-ie,1),ae}),go.Shape.defineFigureGenerator("Terminator",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return ae.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)),ae.spot1=new go.Spot(.23,0),ae.spot2=new go.Spot(.77,1),ae}),go.Shape.defineFigureGenerator("TransmittalTape",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);return ae.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()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("AndGate",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=new go.PathFigure(0,0,!0);return ae.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()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.55,1),ae}),go.Shape.defineFigureGenerator("Buffer",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Clock",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.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 ge=new go.PathFigure(z,le*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,le*ee));var Pe=new go.PathFigure(.8*z,.75*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*ee)),ae}),go.Shape.defineFigureGenerator("Ground",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("Inverter",function(de,z,ee){var ae=new go.Geometry,ie=me*.1,le=.1,ue=.9,ge=.5,Pe=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Pe),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,.8*z,.5*ee));var je=new go.PathFigure((ue+le)*z,ge*ee,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.4,.75),ae}),go.Shape.defineFigureGenerator("NandGate",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.4,ue=me*.1,ge=.1,Pe=.9,je=.5,Be=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+le)*ee,(.4+ie)*z,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,0)),Be.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),Be.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((Pe+ge)*z,je*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z,je*ee,(Pe-ue)*z,(je+ge)*ee,(Pe-ge)*z,(je+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z,je*ee,(Pe+ue)*z,(je-ge)*ee,(Pe+ge)*z,(je-ue)*ee)),ae.spot1=new go.Spot(0,.05),ae.spot2=new go.Spot(.55,.95),ae}),go.Shape.defineFigureGenerator("NorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=0,ge=.5,Pe=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(ge-ie)*ee,.7*z,(ge-le)*ee)),ie=.1,le=me*.1,ue=.9,ge=.5;var je=new go.PathFigure((ue-ie)*z,ge*ee,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.6,.75),ae}),go.Shape.defineFigureGenerator("OrGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=0,ge=.5,Pe=new go.PathFigure(0,0,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le+le)*z,(ge-ie)*ee,.8*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(ge+le)*ee,(ue+le+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee).close()),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("XnorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=.2,ge=.5,Pe=new go.PathFigure(.1*z,0,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var je=new go.PathFigure(.8*z,.5*ee,!0);ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(ge-ie)*ee,.7*z,(ge-le)*ee)),ie=.1,le=me*.1,ue=.9,ge=.5;var Be=new go.PathFigure((ue-ie)*z,ge*ee,!0);return ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.65,.75),ae}),go.Shape.defineFigureGenerator("XorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=.2,ge=.5,Pe=new go.PathFigure(.1*z,0,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var je=new go.PathFigure(.2*z,0,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le)*z,(ge-ie)*ee,.9*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee).close()),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.8,.75),ae}),go.Shape.defineFigureGenerator("Capacitor",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("Resistor",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("Inductor",function(de,z,ee){var ae=new go.Geometry,ie=me*.1,le=.1,ue=.1,ge=.5,Pe=new go.PathFigure((ue-ie*.5)*z,ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.3,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.5,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.7,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.9,Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie*.5)*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),ae}),go.Shape.defineFigureGenerator("ACvoltageSource",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-le)*z,ge*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Move,(ue-le+.1)*z,ge*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le-.1)*z,ge*ee,ue*z,(ge-le)*ee,ue*z,(ge+le)*ee)),ae}),go.Shape.defineFigureGenerator("DCvoltageSource",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("Diode",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!1);return ae.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)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Wifi",function(de,z,ee){var ae=new go.Geometry,ie=z,le=ee;z=z*.38,ee=ee*.6;var ue=me*.8,ge=.8,Pe=0,je=.5,Be=(ie-z)/2,Fe=(le-ee)/2,Ne=new go.PathFigure(Pe*z+Be,(je+ge)*ee+Fe,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge+ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je-ue)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je+ue)*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe).close()),ue=me*.4,ge=.4,Pe=.2,je=.5;var Ae=new go.PathFigure(Pe*z+Be,(je+ge)*ee+Fe,!0);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge+ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je-ue)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je+ue)*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe).close()),ue=me*.2,ge=.2,Pe=.5,je=.5;var Ie=new go.PathFigure((Pe-ge)*z+Be,je*ee+Fe,!0);ae.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),ue=me*.4,ge=.4,Pe=.8,je=.5;var We=new go.PathFigure(Pe*z+Be,(je-ge)*ee+Fe,!0);ae.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge-ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je+ue)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je-ue)*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe).close()),ue=me*.8,ge=.8,Pe=1,je=.5;var Ye=new go.PathFigure(Pe*z+Be,(je-ge)*ee+Fe,!0);return ae.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge-ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je+ue)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je-ue)*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe).close()),ae}),go.Shape.defineFigureGenerator("Email",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("Ethernet",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);ae.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);ae.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);ae.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 ge=new go.PathFigure(0,.5*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Power",function(de,z,ee){var ae=new go.Geometry,ie=me*.4,le=.4,ue=.5,ge=.5,Pe=ct(),je=ct(),Be=ct(),Fe=ct();ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.5,Pe,Pe,je,Be,Fe);var Ne=at(je.x,je.y),Ae=new go.PathFigure(je.x*z,je.y*ee,!0);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),ze(ue-le,ge,ue-le,ge-ie,ue-ie,ge-le,ue,ge-le,.5,Be,Fe,je,Pe,Pe),Ae.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),ie=me*.3,le=.3,ze(ue-le,ge,ue-le,ge-ie,ue-ie,ge-le,ue,ge-le,.5,Be,Fe,je,Pe,Pe),Ae.add(new go.PathSegment(go.PathSegment.Line,je.x*z,je.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,Fe.x*z,Fe.y*ee,Be.x*z,Be.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.5,Pe,Pe,je,Be,Fe),Ae.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Fe.x*z,Fe.y*ee,Be.x*z,Be.y*ee).close());var Ae=new go.PathFigure(.45*z,0,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Bt(Pe),Bt(je),Bt(Be),Bt(Fe),Bt(Ne),ae.spot1=new go.Spot(.25,.45),ae.spot2=new go.Spot(.75,.8),ae}),go.Shape.defineFigureGenerator("Fallout",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee/2,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,ee/2,z/2,ee/2));function le(ue,ge,Pe){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+ge)*z,(.8+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+ge)*z,(.5+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+ge)*z,(.5+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+ge)*z,(.8+Pe)*ee).close())}return le(ie,0,0),le(ie,.4,0),le(ie,.2,-.3),ae}),go.Shape.defineFigureGenerator("IrritationHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.2*z,0,!0);return ae.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()),ae.spot1=new go.Spot(.3,.3),ae.spot2=new go.Spot(.7,.7),ae}),go.Shape.defineFigureGenerator("ElectricalHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.37*z,0,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("FireHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,ee,!0);return ae.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()),ae.spot1=new go.Spot(.07,.445),ae.spot2=new go.Spot(.884,.958),ae}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=0,ue=0,ge=ie*me,Pe=.4*Math.SQRT2/2+.5,je=.5-.5*Math.SQRT2/2,Be=1,Fe=.5,Ne=.5,Ae=0,Ie=new go.PathFigure(Pe*z,(1-je)*ee,!1);return ae.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,Fe*ee,Be*z,.7*ee,Be*z,Fe*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+le)*z,(Ae+le)*ee,(.5+ie+le)*z,(.5-ge+le)*ee,(.5+ge+le)*z,(.5-ie+le)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*ee,(.5-ie+le)*z,(.5+ge+ue)*ee,(.5-ge+le)*z,.9*ee)),Ie.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*ee)),Ie.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(0,.5*ee,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.7*z,ee,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(.335*z,(1-.555)*ee,!0);ae.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,ge=.5,Pe=ue,je=Math.PI/4,Be=4*(1-Math.cos(je))/(3*Math.sin(je)),Fe=Be*.5,Ne=ue,Ae=ue,Ie=Be*Ne,We=Be*Ae;le.add(new go.PathSegment(go.PathSegment.Bezier,(ge-Ne)*z,Pe*ee,(ge-(Ie+Ne)/2)*z,(Pe+(Ae+We)/2)*ee,(ge-Ne)*z,(Pe+We)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,(Pe-Ae)*ee,(ge-Ne)*z,(Pe-We)*ee,(ge-Ie)*z,(Pe-Ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(ge+Ne)*z,Pe*ee,(ge+Ie)*z,(Pe-Ae)*ee,(ge+Ne)*z,(Pe-We)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(ge+Ne)*z,(Pe+We)*ee,(ge+(Ie+Ne)/2)*z,(Pe+(Ae+We)/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);ae.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var Ue=new go.PathFigure(.8*z,ee,!1);return ae.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,0,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("BpmnEventError",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(.1*z,ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Caution",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.05*z,ee,!0);ae.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)),ae}),go.Shape.defineFigureGenerator("Recycle",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.45*z,.95*ee,!1);ae.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);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=new go.PathFigure(z,ie*ee,!0);ae.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 ge=new go.PathFigure(ie*z,0,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,0,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Package",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.15*ee,!0);ae.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 ae.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()),ae.spot1=new go.Spot(0,.1),ae.spot2=new go.Spot(1,1),ae}),go.Shape.defineFigureGenerator("Class",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.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);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Component",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,ee,!0);ae.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);ae.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 ae.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()),ae}),go.Shape.defineFigureGenerator("Boat Shipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.15*z,.6*ee,!0);ae.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 ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Customer/Supplier",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Workcell",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Supermarket",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("TruckShipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.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);ae.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,ge=me*.1,Pe=.2,je=.9,Be=new go.PathFigure((Pe-ue)*z,je*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ue)*z,je*ee,(Pe+ge)*z,(je-ue)*ee,(Pe+ue)*z,(je-ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ue)*z,je*ee,(Pe-ge)*z,(je+ue)*ee,(Pe-ue)*z,(je+ge)*ee).close()),ue=.1,ge=me*.1,Pe=.8,je=.9;var Fe=new go.PathFigure((Pe-ue)*z,je*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ue)*z,je*ee,(Pe+ge)*z,(je-ue)*ee,(Pe+ue)*z,(je-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ue)*z,je*ee,(Pe-ge)*z,(je+ue)*ee,(Pe-ue)*z,(je+ge)*ee).close()),ae}),go.Shape.defineFigureGenerator("KanbanPost",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("Forklift",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.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);ae.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);ae.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 ge=new go.PathFigure(.5*z,.7*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var Pe=.1,je=me*.1,Be=.1,Fe=.9,Ne=new go.PathFigure((Be-Pe)*z,Fe*ee,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe-Pe)*ee,(Be-Pe)*z,(Fe-je)*ee,(Be-je)*z,(Fe-Pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Pe)*z,Fe*ee,(Be+je)*z,(Fe-Pe)*ee,(Be+Pe)*z,(Fe-je)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe+Pe)*ee,(Be+Pe)*z,(Fe+je)*ee,(Be+je)*z,(Fe+Pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Pe)*z,Fe*ee,(Be-je)*z,(Fe+Pe)*ee,(Be-Pe)*z,(Fe+je)*ee)),Pe=.1,je=me*.1,Be=.4,Fe=.9;var Ae=new go.PathFigure((Be-Pe)*z,Fe*ee,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe-Pe)*ee,(Be-Pe)*z,(Fe-je)*ee,(Be-je)*z,(Fe-Pe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Pe)*z,Fe*ee,(Be+je)*z,(Fe-Pe)*ee,(Be+Pe)*z,(Fe-je)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe+Pe)*ee,(Be+Pe)*z,(Fe+je)*ee,(Be+je)*z,(Fe+Pe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Pe)*z,Fe*ee,(Be-je)*z,(Fe+Pe)*ee,(Be-Pe)*z,(Fe+je)*ee)),ae}),go.Shape.defineFigureGenerator("RailShipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,.4*ee,!0);ae.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);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee));var ue=new go.PathFigure(.55*z,.4*ee,!0);ae.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 Be=.05,Fe=me*.05,Ne=.175,Ae=.95,ge=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.375,Ae=.95,Pe=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.625,Ae=.95,je=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.825,Ae=.95,Ie=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(Ie),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),Ie.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee).close());var We=new go.PathFigure(0,ee,!1);return ae.add(We),We.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Warehouse",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.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);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(.15*z,ee,!0);ae.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 ge=.05,Pe=me*.05,je=.35,Be=.775,Fe=new go.PathFigure((je-ge)*z,Be*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Be-ge)*ee,(je-ge)*z,(Be-Pe)*ee,(je-Pe)*z,(Be-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je+ge)*z,Be*ee,(je+Pe)*z,(Be-ge)*ee,(je+ge)*z,(Be-Pe)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Be+ge)*ee,(je+ge)*z,(Be+Pe)*ee,(je+Pe)*z,(Be+ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je-ge)*z,Be*ee,(je-Pe)*z,(Be+ge)*ee,(je-ge)*z,(Be+Pe)*ee).close()),ae}),go.Shape.defineFigureGenerator("ControlCenter",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Bluetooth",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.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)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.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)),ae}),go.Shape.defineFigureGenerator("Globe",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("Wave",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!1);return ae.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)),ae}),go.Shape.defineFigureGenerator("Operator",function(de,z,ee){var ae=new go.Geometry,ie=.3,le=me*.3,ue=.5,ge=.7,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee));var je=new go.PathFigure(0,.7*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),ae}),go.Shape.defineFigureGenerator("TripleFanBlades",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return ae.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)),ae}),go.Shape.defineFigureGenerator("CentrifugalPump",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!0);return ae.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)),ae}),go.Shape.defineFigureGenerator("Battery",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);ae.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 ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Delete",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee));var je=new go.PathFigure(.15*z,.5*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Flag",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.1*ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Help",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee).close()),ie=.05,le=me*.05,ue=.5,ge=.8;var je=new go.PathFigure((ue-ie)*z,ge*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee).close()),je.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*ee,.4*z,.2*ee,.3*z,.25*ee)),ae}),go.Shape.defineFigureGenerator("Location",function(de,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(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("Unlocked",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);ae.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 ae.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)),ae}),go.Shape.defineFigureGenerator("Gear",function(de,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(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Map",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);return ae.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)),ae}),go.Shape.defineFigureGenerator("Eject",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);ae.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 ae.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()),ae}),go.Shape.defineFigureGenerator("Pencil",function(de,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(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*1,ee*1,!1);ae.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);ae.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);ae.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 ge=new go.PathFigure(.678*z,.85*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*ee).close());var Pe=new go.PathFigure(.5*z,.1*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*ee).close()),ae}),go.Shape.defineFigureGenerator("Staircase",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("5Bars",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);ae.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);ae.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);ae.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 ge=new go.PathFigure(z*.612,ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),ge.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),ge.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*1).close());var Pe=new go.PathFigure(z*.816,ee,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.816,ee*(1-.184*4))),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-.184*5))),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1).close()),ae}),go.Shape.defineFigureGenerator("PC",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.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);ae.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);ae.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 ge=new go.PathFigure(z*.055,.18*ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.21).close());var Pe=new go.PathFigure(z*1,0,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.65)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.65).close()),ae}),go.Shape.defineFigureGenerator("Plane",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.55*z,ee,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Key",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*1,ee*.5,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("FilmTape",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.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);ae.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);ae.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 ge=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),ee*.8).close());var Pe=new go.PathFigure(z*(.11+.24133333*2+.028*2),ee*.1,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.1)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.8)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),ee*.8).close()),ae}),go.Shape.defineFigureGenerator("FloppyDisk",function(de,z,ee){var ae=new go.Geometry,ie=8,le=ie*me,ue=new go.PathFigure(ie,0,!1);ae.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 ge=new go.PathFigure(z*.83,0,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*0).close());var Pe=new go.PathFigure(z*.83,ee*1,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*1).close());var je=new go.PathFigure(z*.78,ee*.05,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),je.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("SpeechBubble",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=15),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var ie=ae*me,le=ee*.8,ue=new go.Geometry,ge=new go.PathFigure(ae,0,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-ie,0,z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,z,le-ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,le,z,le-ie,z-ie,le)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.7,le)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.55,le)),ge.add(new go.PathSegment(go.PathSegment.Line,ae,le)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,le-ae,ie,le,0,le-ie)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ae,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(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*.45,!0);ae.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 ae.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()),ae}),go.Shape.defineFigureGenerator("Windows",function(de,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(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*.1,!1);ae.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);ae.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 ae.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()),ae}),go.Shape.defineFigureGenerator("Beaker",function(de,z,ee){var ae=new go.Geometry,ie=15,le=ie*me,ue=new go.PathFigure(z*.62,ee*.475,!0);return ae.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?(ae.spot1=new go.Spot(0,0,le,le),ae.spot2=new go.Spot(1,1,-le,-le)):(ae.spot1=go.Spot.TopLeft,ae.spot2=go.Spot.BottomRight),ae}),go.Shape.defineFigureGenerator("Download",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.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 ae.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()),ae}),go.Shape.defineFigureGenerator("Bin",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.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()),ae}),go.Shape.defineFigureGenerator("Upload",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.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 ae.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()),ae}),go.Shape.defineFigureGenerator("EmptyDrink",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);return ae.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()),ae}),go.Shape.defineFigureGenerator("Drink",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);ae.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 ae.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()),ae}),go.Shape.defineFigureGenerator("4Arrows",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.5,ee*0,!0);return ae.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()),ae}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},43001:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var gn={},cn="5.0",at={},ct=null,Bt=!1,oe=!1,ze=null,De=!1,fe=null,me=null,ke=0;ke<arguments.length;ke++){var Ce=arguments[ke];if(Ce!==null)switch(typeof Ce){case"number":cn=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?cn=Ce:ze=Ce;break;case"object":typeof Ce.is3D!="undefined"?ct=Ce:at=Ce;break;case"boolean":Bt=Ce,oe=!0;break}}ct===null&&(ct={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&&!oe&&(Bt=!0)),ze!==null&&at.id===void 0&&(at.id=ze);var Se="",Me="",ve=!1,we=null,de=null,z=null,ee=!1,ae=null,ie=null,le=null,ue=null,ge=null;at.height!==void 0&&(at.height=Math.round(at.height)),at.width!==void 0&&(at.width=Math.round(at.width));var Pe=function(pt){return parseFloat(pt)>4?parseFloat(pt):5};gn.setHTML5Codebase=function(pt,ft){me=pt,St(pt,ft)},gn.setJavaCodebase=gn.setJavaCodebaseVersion=gn.isCompiledInstalled=gn.setPreCompiledScriptPath=gn.setPreCompiledResourcePath=function(){},gn.setHTML5CodebaseVersion=function(pt,ft){var ht=parseFloat(pt);if(ht!==NaN&&ht<5){console.log("The GeoGebra HTML5 codebase version "+ht+" is deprecated. Using version latest instead.");return}fe=pt,rt(pt,ft)},gn.getHTML5CodebaseVersion=function(){return de},gn.getParameters=function(){return at},gn.setFontsCSSURL=function(pt){ue=pt},gn.setGiacJSURL=function(pt){},gn.setJNLPFile=function(pt){Se=pt},gn.setJNLPBaseDir=function(pt){},gn.inject=function(){function pt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ft="auto",ht=at.id,Et,mt=!1,yt=0;yt<arguments.length;yt++){var At=arguments[yt];typeof At=="string"?(At=At.toLowerCase(),At.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ft=At:ht=arguments[yt]):typeof At=="boolean"?mt=At:At instanceof HTMLElement&&(Et=At)}xt();function xt(){if(!De){setTimeout(xt,200);return}ft=Ct(ft);var tt=Et||document.getElementById(ht);if(!tt){console.log("possibly bug on ajax loading? ");return}if(gn.removeExistingApplet(tt,!1),at.width===void 0&&tt.clientWidth&&(at.width=tt.clientWidth),at.height===void 0&&tt.clientHeight&&(at.height=tt.clientHeight),!(at.width&&at.height)&&ft==="html5"&&(delete at.width,delete at.height),we=ft,ft==="screenshot")Ue(tt,at);else{var Ve=!1;at.hasOwnProperty("playButton")&&at.playButton||at.hasOwnProperty("clickToLoad")&&at.clickToLoad?Ve=!0:at.hasOwnProperty("playButtonAutoDecide")&&at.playButtonAutoDecide&&(Ve=(!je()||pt())&&Be()),Ve?(we="screenshot",ot(tt,at,mt,ft)):Ye(tt,at,mt)}}};function je(){try{return window.self!==window.top}catch(pt){return!0}}function Be(){return at.hasOwnProperty("screenshotGenerator")&&at.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}gn.getViews=function(){return ct},gn.isJavaInstalled=function(){return!1};var Fe=function(pt){var ft=function(yt){var At=JSON.parse(yt),xt=function(xe){return xe.type=="G"||xe.type=="E"},tt=At.elements?At.elements.filter(xt)[0]:At;if(!tt||!tt.url){ht();return}at.fileName=tt.url,Ne(tt.settings||{}),ct.is3D=!0;var Ve="https://www.geogebra.org/images/";gn.setPreviewImage(ae||tt.previewUrl,Ve+"GeoGebra_loading.png",Ve+"applet_play.png"),pt()},ht=function(){at.onError&&at.onError(),Pt("Error: Fetching material (id "+at.material_id+") failed.",at)},Et=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",mt="/materials/"+at.material_id+"?scope=basic";Ae("https://"+Et+"/api/proxy.php?path="+encodeURIComponent(mt),ft,ht)};function Ne(pt){var ft=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ht){pt[ht]=!!pt[ht]}),ft.forEach(function(ht){at[ht]===void 0&&pt[ht]!==void 0&&(at[ht]=pt[ht])}),at.showToolBarHelp===void 0&&(at.showToolBarHelp=at.showToolBar)}function Ae(pt,ft,ht){var Et=new XMLHttpRequest;Et.open("GET",pt),Et.onload=function(){ft(Et.responseText)},Et.onerror=ht,Et.send()}gn.isHTML5Installed=function(){return!0},gn.getLoadedAppletType=function(){return we},gn.setPreviewImage=function(pt,ft,ht){ae=pt,ie=ft,le=ht},gn.removeExistingApplet=function(pt,ft){var ht;typeof pt=="string"&&(pt=document.getElementById(pt)),we=null;var Et=null;for(ht=0;ht<pt.childNodes.length;ht++){var mt=pt.childNodes[ht],yt=mt.className;yt==="applet_screenshot"?ft?(mt.style.display="block",we="screenshot"):mt.style.display="none":yt!=="applet_scaler prerender"&&(pt.removeChild(mt),Et=yt&&yt.indexOf("appletParameters")!=-1?mt.id:null,ht--)}var At=at.id!==void 0?at.id:Et,xt=window[At];xt&&typeof xt.getBase64=="function"&&(xt.remove(),window[At]=null)},gn.refreshHitPoints=function(){if(Pe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var pt=gn.getAppletObject();return pt&&typeof pt.recalculateEnvironments=="function"?(pt.recalculateEnvironments(),!0):!1},gn.startAnimation=function(){var pt=gn.getAppletObject();return pt&&typeof pt.startAnimation=="function"?(pt.startAnimation(),!0):!1},gn.stopAnimation=function(){var pt=gn.getAppletObject();return pt&&typeof pt.stopAnimation=="function"?(pt.stopAnimation(),!0):!1},gn.getAppletObject=function(){var pt=at.id!==void 0?at.id:"ggbApplet";return window[pt]},gn.resize=function(){};var Ie=function(pt,ft,ht){var Et=document.createElement("param");Et.setAttribute("name",ft),Et.setAttribute("value",ht),pt.appendChild(Et)},We=function(pt){return pt&&pt!=="false"},Ye=function(pt,ft,ht){Pe(de)<=4.2&&(ht=!0);var Et=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==de||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Et=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var mt=document.createElement("div");mt.classList.add("appletParameters","notranslate");var yt=ft.width,At=ft.height;if(ft.disableAutoScale=ft.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ft.disableAutoScale,ft.width!==void 0)if(Pe(de)<=4.4)We(ft.showToolBar)&&(ft.height-=7),We(ft.showAlgebraInput)&&(ft.height-=37),ft.width<605&&We(ft.showToolBar)&&(ft.width=605,yt=605);else{var xt=100;(We(ft.showToolBar)||We(ft.showMenuBar))&&(ft.hasOwnProperty("customToolBar")&&(ft.customToolbar=ft.customToolBar),xt=We(ft.showMenuBar)?245:155),yt<xt&&(ft.width=xt,yt=xt)}mt.style.border="none",mt.style.display="inline-block";for(var tt in ft)ft.hasOwnProperty(tt)&&tt!=="appletOnLoad"&&mt.setAttribute("data-param-"+tt,ft[tt]);ue&&mt.setAttribute("data-param-fontscssurl",ue),gn.resize=function(){GGBAppletUtils.responsiveResize(pt,ft)},window.addEventListener("resize",function(Nt){gn.resize()});var Ve=typeof ft.appletOnLoad=="function"?ft.appletOnLoad:function(){};if(!ht&&ft.width!==void 0){ft.hasOwnProperty("showSplash")||mt.setAttribute("data-param-showSplash","false");var xe=pt.querySelector(".applet_scaler.prerender"),Le=xe!==null;if(Le)var Ze=xe.querySelector(".ggb_preview");else{var Ze=dt(yt,At,ft.borderColor,!1);xe=document.createElement("div"),xe.className="applet_scaler",xe.style.position="relative",xe.style.display="block",xe.style.width=yt+"px",xe.style.height=At+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(xe,"66%"),Pe(de)>=5?(ft.appletOnLoad=function(Nt){var Dt=pt.querySelector(".ggb_preview");Dt&&Dt.parentNode.removeChild(Dt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(xe),window.GGBT_wsf_view&&$(window).trigger("resize"),Ve(Nt)},Le||xe.appendChild(Ze)):mt.appendChild(Ze),xe.appendChild(mt),Le||pt.appendChild(xe),setTimeout(function(){gn.resize()},1)}else{var nt=document.createElement("div");nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.appendChild(mt),pt.appendChild(nt),ft.appletOnLoad=function(Nt){gn.resize(),Ve(Nt)}}function Re(Nt,Dt){Dt&&typeof Dt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Nt,Dt.appletOnLoad):renderGGBElement(Nt),Pt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Dt)}function _e(Nt,Dt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Nt,params:Dt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Ht){Re(Ht.article,Ht.params)}),html5AppletsToProcess=null)},Pe(de)<5&&(Nt.className+=" geogebraweb")):Re(Nt,Dt)}if(Et){scriptLoadStarted=!0;for(var He=0;He<mt.childNodes.length;He++){var Qe=mt.childNodes[He].tagName;Qe==="TABLE"&&(mt.removeChild(mt.childNodes[He]),He--)}if(ggbHTML5LoadedScript!==null){var ut=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ut!=null&&ut.parentNode.removeChild(ut)}var gt=document.createElement("script"),Mt=function(){_e(mt,ft)};gt.src=Me+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=de,ggbHTML5LoadedScript=gt.src,Pt("GeoGebra HTML5 codebase loaded: '"+Me+"'.",ft),!me&&(!fe||fe=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Mt()):Me.requirejs?__webpack_require__.e(7963).then(function(){var Nt=[__webpack_require__(87963)];Mt.apply(null,Nt)}.bind(this)).catch(__webpack_require__.oe):(gt.onload=Mt,pt.appendChild(gt))}else _e(mt,ft);ft.height=At,ft.width=yt},Ue=function(pt,ft,ht){var Et=dt(ft.width,ft.height,ft.borderColor,ht),mt=document.createElement("div");mt.style.position="relative",mt.style.display="block",mt.style.width=ft.width+"px",mt.style.height=ft.height+"px",mt.className="applet_screenshot applet_scaler"+(ht?" applet_screenshot_play":""),mt.appendChild(Et);var yt=GGBAppletUtils.getScale(ft,pt,ht);ht?(pt.appendChild(st()),window.GGBT_wsf_view||(pt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(mt,"66%"),pt.appendChild(mt),yt!==1&&!isNaN(yt)&&(GGBAppletUtils.scaleElement(mt,yt),mt.style.width=ft.width+"px",mt.style.height=ft.height+"px",mt.parentNode.style.width=ft.width*yt+"px",mt.parentNode.style.height=ft.height*yt+"px"),gn.resize=function(){Ke(pt,Et,mt,ht)},window.addEventListener("resize",function(At){gn.resize()}),gn.resize()};function Ke(pt,ft,ht,Et){if(pt.contains(ft)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(pt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(pt)}var mt=GGBAppletUtils.getScale(at,pt,Et);ht.parentNode!==null&&(!isNaN(mt)&&mt!==1?(GGBAppletUtils.scaleElement(ht,mt),ht.parentNode.style.width=at.width*mt+"px",ht.parentNode.style.height=at.height*mt+"px"):(GGBAppletUtils.scaleElement(ht,1),ht.parentNode.style.width=at.width+"px",ht.parentNode.style.height=at.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(pt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}gn.onExitFullscreen=function(pt,ft){ft.appendChild(pt)};var ot=function(pt,ft,ht,Et){Ue(pt,ft,!0);for(var mt=function(){var xt=[];for(At=0;At<pt.childNodes.length;At++)xt.push(pt.childNodes[At]);if(window.GGBT_wsf_view){var tt=window.GGBT_wsf_view.renderFullScreen(pt,ft.id),Ve=document.getElementById("fullscreencontainer"),xe=jQuery(pt).find(".fullscreencontent");xe.length>0?(tt.remove(),xe.attr("id","fullscreencontent").show(),jQuery(Ve).append(xe),window.dispatchEvent(new Event("resize"))):Ye(tt,ft,!1),window.GGBT_wsf_view.launchFullScreen(Ve)}else we=Et,Ye(pt,ft,!1);if(!window.GGBT_wsf_view)for(At=0;At<xt.length;At++)pt.removeChild(xt[At])},yt=pt.getElementsByClassName("ggb_preview_play"),At=0;At<yt.length;At++)yt[At].addEventListener("click",mt,!1),yt[At].addEventListener("ontouchstart",mt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(pt),Be()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},st=function(){var pt=document.createElement("div");if(pt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ft='.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");}',ht=document.createElement("style");ht.styleSheet?ht.styleSheet.cssText=ft:ht.appendChild(document.createTextNode(ft)),document.getElementsByTagName("head")[0].appendChild(ht)}return pt},dt=function(pt,ft,ht,Et){var mt=document.createElement("div");mt.className="ggb_preview",mt.style.position="absolute",mt.style.zIndex="90",mt.style.width=pt-2+"px",mt.style.height=ft-2+"px",mt.style.top="0px",mt.style.left="0px",mt.style.overflow="hidden",mt.style.backgroundColor="white";var yt="lightgrey";ht!==void 0&&(ht==="none"?yt="transparent":yt=ht),mt.style.border="1px solid "+yt;var At=document.createElement("img");if(At.style.position="relative",At.style.zIndex="1000",At.style.top="-1px",At.style.left="-1px",ae!==null&&At.setAttribute("src",ae),At.style.opacity=.7,ie!==null){var xt,tt,Ve;if(!Et){xt=document.createElement("img"),xt.style.position="absolute",xt.style.zIndex="1001",xt.style.opacity=1,At.style.opacity=.3,tt=360,tt>pt/4*3&&(tt=pt/4*3),Ve=tt/5.8,xt.setAttribute("src",ie),xt.setAttribute("width",tt),xt.setAttribute("height",Ve);var xe=(pt-tt)/2,Le=(ft-Ve)/2;xt.style.left=xe+"px",xt.style.top=Le+"px",mt.appendChild(xt)}}return mt.appendChild(At),mt},Ct=function(pt){return pt=pt.toLowerCase(),pt==="html5"||pt==="screenshot"?pt:"html5"},$e=["web","webSimple","web3d","tablet","tablet3d","phone"],rt=function(pt,ft){if(de=pt,ft){St(de,!0);return}var ht=!Bt;if(ht){var Et=Pe(de);!isNaN(Et)&&Et<4.4&&(ht=!1)}var mt,yt;window.location.protocol.substr(0,4)==="http"?mt=window.location.protocol:mt="http:";var At=de.indexOf("//");At>0?yt=de:At===0?yt=mt+de:yt="https://www.geogebra.org/apps/5.2.814.0/";for(var xt in $e)if(de.slice($e[xt].length*-1)===$e[xt]||de.slice(($e[xt].length+1)*-1)===$e[xt]+"/"){St(yt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ht&&!ct.is3D&&!ct.AV&&!ct.SV&&!ct.CV&&!ct.EV2&&!ct.CP&&!ct.PC&&!ct.DA&&!ct.FI&&!ct.PV&&!We(at.showToolBar)&&!We(at.showMenuBar)&&!We(at.showAlgebraInput)&&!We(at.enableRightClick)&&(!at.appName||at.appName=="classic")?yt+="webSimple/":yt+="web3d/",St(yt,!1)},St=function(pt,ft){if(pt.requirejs){Me=pt;return}pt.slice(-1)!=="/"&&(pt+="/"),Me=pt,ft===null&&(ft=pt.indexOf("http")===-1),ve=ft,z="web.nocache.js",ee=!1;var ht=Me.split("/");ht.length>1&&(!ft&&ht[ht.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):$e.indexOf(ht[ht.length-2])>=0&&(z=ht[ht.length-2]+".nocache.js")),ht=pt.split("/"),de=ht[ht.length-3],de.substr(0,4)==="test"?de=de.substr(4,1)+"."+de.substr(5,1):(de.substr(0,3)==="war"||de.substr(0,4)==="beta")&&(de="5.0");var Et=parseFloat(de);Et!==NaN&&Et<5&&pt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Et+" is deprecated. Using version latest instead."),rt("5.0",ft))},Pt=function(pt,ft){window.console&&window.console.log&&(!ft||typeof ft.showLogging=="undefined"||ft.showLogging&&ft.showLogging!=="false")&&console.log(pt)};at.material_id!==void 0?Fe(wt):wt();function wt(){var pt=cn;fe!==null?pt=fe:parseFloat(pt)<5&&(pt="5.0"),rt(pt,!1),me!==null&&St(me,ve),De=!0}return gn},GGBAppletUtils=function(){"use strict";function gn(){return window.GGBT_wsf_edit!==void 0}function cn(De,fe){fe!=1?(De.style.transformOrigin="0% 0% 0px",De.style.webkitTransformOrigin="0% 0% 0px",De.style.transform="scale("+fe+","+fe+")",De.style.webkitTransform="scale("+fe+","+fe+")",De.style.maxWidth="initial",De.querySelector(".ggb_preview")!==null&&(De.querySelector(".ggb_preview").style.maxWidth="initial"),De.querySelectorAll(".ggb_preview img")[0]!==void 0&&(De.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),De.querySelectorAll(".ggb_preview img")[1]!==void 0&&(De.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(De.style.transform="none",De.style.webkitTransform="none")}function at(De,fe,me,ke,Ce,Se){var Me=null;if(Se!=null&&Se!="")for(var ve=De.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+Se+" ")>-1){Me=ve;break}else ve=ve.parentNode;var we=0,de=0,z=0,ee=0,ae=0,ie=0,le=0;if(Me)we=Me.offsetWidth,de=Math.max(ke?Me.offsetWidth:0,Me.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(we=Math.min(window.innerWidth,document.documentElement.clientWidth),de=Math.min(window.innerHeight,document.documentElement.clientHeight),z=we):(we=window.innerWidth,de=window.innerHeight,z=window.innerWidth),De){var ue=De.getBoundingClientRect();ue.left>0&&ue.left<=we&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ae=we-ue.width-ue.left,ie=z<=480?10:30):(ie=ue.left,ae=z<=480?10:30),ee=ie+ae)}if(De&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ge=De.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,le=40)}}return De&&((me===void 0||!me)&&fe>0&&fe+ee<we?we=fe:we-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(me===void 0||!me)&&(de-=le)),{width:we,height:de}}function ct(De,fe,me,ke,Ce){if(De.isScreenshoGenerator)return 1;var Se=ke!==void 0&&ke,Me=De.noScaleMargin!=null&&De.noScaleMargin,ve=function(ge){return ge&&ge!=="false"},we=ve(De.autoHeight),de=at(fe,De.width,me,we,Se&&window.GGBT_wsf_view||Me,Ce),z=parseInt(de.width),ee=De.width,ae=De.height;if(ee===void 0){var ie=fe.querySelector(".appletParameters");ie&&(ee=ie.offsetWidth,ae=ie.offsetHeight)}var le=z/ee,ue=Se?1:de.height/ae;return me!==void 0&&!me&&(le=Math.min(1,le),ue=Math.min(1,ue)),Math.min(le,ue)}function Bt(De,fe,me){var ke=1,Ce,Se=!1;if(De.hasOwnProperty("allowUpscale")&&(Se=De.allowUpscale),De.hasOwnProperty("scale")&&(ke=parseFloat(De.scale),(isNaN(ke)||ke===null||ke===0)&&(ke=1),ke>1&&(Se=!0)),fe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Se=!0),!(De.hasOwnProperty("disableAutoScale")&&De.disableAutoScale))Ce=ct(De,fe,Se,me,De.scaleContainerClass);else return ke;return Se&&(!De.hasOwnProperty("scale")||ke===1)?Ce:Math.min(ke,Ce)}function oe(De){var fe=Math.min(window.innerWidth,document.documentElement.clientWidth),me=Math.min(window.innerHeight,document.documentElement.clientHeight),ke=De.getBoundingClientRect(),Ce=(fe-ke.width)/2,Se=(me-ke.height)/2;Se<0&&(Se=0),De.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?De.style.left="40px":De.style.left=Ce+"px",De.style.top=Se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Se<40?De.style.top="40px":De.style.top=Se+"px",De.style.left=Ce+"px")}function ze(De,fe){var me=De.querySelector(".appletParameters");if(me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(fe.id!==me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(De)}if(me.parentElement&&/fullscreen/.test(me.parentElement.className))return;var ke=Bt(fe,De);gn()&&me.setAttribute("data-param-scale",ke);for(var Ce=null,Se=0;Se<De.childNodes.length;Se++)if(De.childNodes[Se].className!==void 0&&De.childNodes[Se].className.match(/^applet_scaler/)){Ce=De.childNodes[Se];break}if(Ce!==null&&Ce.querySelector(".noscale")!==null)return;var Me=fe.id!==void 0?fe.id:"ggbApplet",ve=window[Me];(ve==null||!ve.recalculateEnvironments)&&Ce!==null&&!Ce.className.match(/fullscreen/)&&(Ce.parentNode.style.transform="",!isNaN(ke)&&ke!==1?(Ce.parentNode.style.width=fe.width*ke+"px",Ce.parentNode.style.height=fe.height*ke+"px",cn(Ce,ke)):(cn(Ce,1),Ce.parentNode.style.width=fe.width+"px",Ce.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&oe(De),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(me).parents(".content-added-content"))}}return{responsiveResize:ze,isFlexibleWorksheetEditor:gn,positionCenter:oe,getScale:Bt,scaleElement:cn}}();__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 gn=n.location.search;return gn.indexOf(J)!=-1||gn.indexOf(K)!=-1}function q(gn,cn){}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(gn){var cn=s[L].bindings;s[L].bindings=function(){for(var at=cn?cn():{},ct=gn[webModule.__softPermutationId],Bt=O;Bt<ct.length;Bt++){var oe=ct[Bt];at[oe[O]]=oe[P]}return at}};var t;function u(){return v(),t}function v(){if(!t){var gn=o.createElement(Q);if(gn.id=L,gn.style.cssText=R+S,gn.tabIndex=-1,o.body.appendChild(gn),t=gn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var cn=document.compatMode==U?V:W;t.write(cn+X),t.close()}}}function w(gn){function cn(ct){function Bt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var oe=Bt();if(oe){ct();return}function ze(){if(!oe){if(!Bt())return;oe=!0,ct(),o.removeEventListener&&o.removeEventListener(Z,ze,!1),De&&clearInterval(De)}}o.addEventListener&&o.addEventListener(Z,ze,!1);var De=setInterval(function(){ze()},$)}function at(ct){var Bt=u(),oe=Bt.body,ze=Bt.createElement(_);ze.language=ab,ze.crossOrigin=W,ze.src=ct,webModule.__errFn&&(ze.onerror=function(){webModule.__errFn(L,new Error(bb+ct))}),oe.appendChild(ze)}cn(function(){at(gn)})}webModule.__startLoadingFragment=function(gn){return C(gn)},webModule.__installRunAsyncCode=function(gn){var cn=u(),at=cn.body,ct=cn.createElement(_);ct.language=ab,ct.text=gn,at.appendChild(ct),at.removeChild(ct)};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(gn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(gn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(gn){var cn=c[gn];return cn==null?null:cn},r=d,webModule.__errFn=e}function B(){function gn(De){var fe=De.lastIndexOf(rb);fe==-1&&(fe=De.length);var me=De.indexOf(sb);me==-1&&(me=De.length);var ke=De.lastIndexOf(tb,Math.min(me,fe));return ke>=O?De.substring(O,ke+P):W}function cn(De){if(!De.match(/^\w+:\/\//)){var fe=o.createElement(ub);fe.src=De+vb,De=gn(fe.src)}return De}function at(){var De=__gwt_getMetaProperty(wb);return De!=null?De:W}function ct(){for(var De=o.getElementsByTagName(_),fe=O;fe<De.length;++fe)if(De[fe].src.indexOf(xb)!=-1)return gn(De[fe].src);return W}function Bt(){var De=o.getElementsByTagName(yb);return De.length>O?De[De.length-P].href:W}function oe(){var De=o.location;return De.href==De.protocol+zb+De.host+De.pathname+De.search+De.hash}var ze=at();return ze==W&&(ze=ct()),ze==W&&(ze=Bt()),ze==W&&oe()&&(ze=gn(o.location.href)),ze=cn(ze),ze}function C(gn){return gn.match(/^\//)||gn.match(/^[a-zA-Z]+:\/\//)?gn:webModule.__moduleBase+gn}function D(){var gn=[],cn=O,at=[],ct=[];function Bt(De){var fe=ct[De](),me=at[De];if(fe in me)return fe;var ke=[];for(var Ce in me)ke[me[Ce]]=Ce;throw r&&r(De,ke,fe),null}if(__gwt_isKnownPropertyValue=function(De,fe){return fe in at[De]},webModule.__getPropMap=function(){var De={};for(var fe in at)at.hasOwnProperty(fe)&&(De[fe]=Bt(fe));return De},webModule.__computePropValue=Bt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var oe;try{oe=Cb;var ze=oe.indexOf(Db);ze!=-1&&(cn=parseInt(oe.substring(ze+P),$),oe=oe.substring(O,ze))}catch(De){}return webModule.__softPermutationId=cn,C(oe+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},46699:function(gn,cn,at){"use strict";at.d(cn,{Ax:function(){return ze},Ds:function(){return De},KI:function(){return me},SI:function(){return oe},f1:function(){return Bt}});var ct=at(346);function Bt(ke){let Ce=!0;if(ke.length>0){for(let Se=0;Se<ke.length;Se++)if(ke[Se].compile_success==0||!ke[Se].compile_success){Ce=!1;break}}else Ce=!1;return Ce}function oe(ke,Ce=""){let Se=[];for(let Me=0;Me<ke.length;Me++){let ve=ke[Me],we=Ce?`${Ce}/${ve.name}`:`${ve.name}`;Se.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:we})}return Se}function ze(ke,Ce,Se){for(let Me=0;Me<ke.length;Me++){let ve=ke[Me];if(ve.key===Ce){ve.children=Se;break}ve.children&&ze(ve.children,Ce,Se)}return ke}function De(ke,Ce,Se){let Me;return function(){let ve=this,we=arguments,de=function(){Me=null,Se||ke.apply(ve,we)},z=Se&&!Me;clearTimeout(Me),Me=setTimeout(de,Ce),z&&ke.apply(ve,we)}}const fe=!0,me=ct.Z.API_SERVER},9507:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Me}});var ct=at(59301),Bt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},oe=at(92310),ze=at.n(oe),De=at(29787),fe=at(2859),me=at(38986),ke=at(51257),Ce=(ve,we,de)=>new Promise((z,ee)=>{var ae=ue=>{try{le(de.next(ue))}catch(ge){ee(ge)}},ie=ue=>{try{le(de.throw(ue))}catch(ge){ee(ge)}},le=ue=>ue.done?z(ue.value):Promise.resolve(ue.value).then(ae,ie);le((de=de.apply(ve,we)).next())}),Me=({data:ve,className:we,fullWidth:de,style:z={},onClose:ee,onOk:ae,showFullTools:ie,noAssociationId:le})=>{const ue=(0,ct.useRef)(null),ge=(0,ct.useRef)(null),Pe=(0,ct.useRef)(null),je=(0,ct.useRef)(null),[Be,Fe]=(0,ct.useState)(!1),[Ne,Ae]=(0,ct.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ct.useEffect)(()=>(Pe.current||(Pe.current=document.createElement("style"),document.head.appendChild(Pe.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),Pe.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&Ie()):(document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)),()=>{document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)}),[ve==null?void 0:ve.visible]);const Ie=()=>Ce(void 0,null,function*(){Fe(!0),Ae("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ke=yield(0,ke.ZJ)(ve==null?void 0:ve.src);ue.current.src="",ue.current.src=Ke,ue.current.onload=function(){Ue()},Fe(!1),Ae("")}),We=Ke=>Ce(void 0,null,function*(){Fe(!0),Ae("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ot=yield(0,me.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:Ke.dataUrl}});ot!=null&&ot.id&&!le?(yield(0,me.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:ot==null?void 0:ot.id,settings:JSON.stringify(Ke.state)}})).status===0&&ae():ot!=null&&ot.id&&ae(ot),Fe(!1),Ae("")}),Ye=()=>{const Ke=document.querySelector('a[href="https://markerjs.com/"]');Ke&&Ke.parentNode&&(Ke.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(st=>{const dt=document.querySelector(st.name);dt&&dt.setAttribute("title",st.title)})},Ue=()=>{ge.current=new fe.hP(ue.current),ge.current.targetRoot=je.current,ge.current.addEventListener("render",We),ge.current.addEventListener("beforeclose",ee),ie&&(ge.current.availableMarkerTypes=ge.current.ALL_MARKER_TYPES,ge.current.uiStyleSettings.redoButtonVisible=!0,ge.current.uiStyleSettings.notesButtonVisible=!0,ge.current.uiStyleSettings.zoomButtonVisible=!0,ge.current.uiStyleSettings.zoomOutButtonVisible=!0,ge.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ge.current.uiStyleSettings,ge.current.show(),ve!=null&&ve.snapshotData&&ge.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ye()},300)};return ct.createElement(ct.Fragment,null,(ve==null?void 0:ve.visible)&&ct.createElement(De.Z,{spinning:Be,tip:Ne,style:{position:"absolute",width:"100vw"}},ct.createElement("div",{ref:je,className:ze()(Bt.imageDimensions,we,de?Bt.fullWidth:""),style:z},ct.createElement("img",{className:Bt.img,ref:ue}))))}},76562:function(gn,cn,at){"use strict";var ct=at(59301),Bt=at(77019),oe=at(5269),ze=at(20554),De=at(99571),fe=at(76902),me=at(99587),ke=at(48136),Ce=at(59301);const Se=(0,ct.forwardRef)(({callback:Me,showSaveButton:ve,value:we=""},de)=>{const z=(0,ct.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 "}]}]}],ae=[{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=ge=>{z.current.setValue(z.current.getValue()+" "+ge.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(Bt.Z,{className:me.Z.lists,gutter:[10,10]},ee.map((ge,Pe)=>Ce.createElement(oe.Z,{flex:"110px",className:me.Z.item},Ce.createElement("div",null,Ce.createElement(fe.Z,{value:`$$${ge.value}$$`}),ge.name),Ce.createElement("div",{className:me.Z.children},ge.children.map((je,Be)=>Ce.createElement("div",{key:Be},Ce.createElement("h1",null,je.name),Ce.createElement(Bt.Z,{gutter:[10,10]},je.data.map((Fe,Ne)=>Ce.createElement(oe.Z,{key:Ne,onClick:()=>ie(Fe),className:me.Z.diamond},Ce.createElement(fe.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(Bt.Z,{className:me.Z.lists,gutter:[10,10]},ae.map((ge,Pe)=>Ce.createElement(oe.Z,{flex:"110px",className:me.Z.item},Ce.createElement("div",null,Ce.createElement(fe.Z,{value:"`$$"+ge.value+"$$`"}),ge.name),Ce.createElement("div",{className:me.Z.children},ge.children.map((je,Be)=>Ce.createElement("div",{key:Be},je.name&&Ce.createElement("h1",null,je.name),Ce.createElement(Bt.Z,{gutter:[10,10]},je.data.map((Fe,Ne)=>Ce.createElement(oe.Z,{key:Ne,onClick:()=>ie(Fe),className:me.Z.diamond},Ce.createElement(fe.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))}],ue=()=>{var ge=document.createElement("div");ge.innerHTML=z.current.getValue();var Pe=ge.innerText;return Me&&Me(Pe),Pe};return(0,ct.useImperativeHandle)(de,()=>({getData:ue})),Ce.createElement("div",{className:me.Z.mathWrap},Ce.createElement(ze.default,{defaultActiveKey:"1",items:le}),Ce.createElement("math-field",{locale:"zh_cn",className:me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},we||""),ve&&Ce.createElement("div",{className:me.Z.button},Ce.createElement(De.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});cn.Z=Se},28426:function(gn,cn,at){"use strict";var ct=at(59301),Bt=at(93314),oe=at(99571),ze=Object.defineProperty,De=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Se=(de,z,ee)=>z in de?ze(de,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):de[z]=ee,Me=(de,z)=>{for(var ee in z||(z={}))ke.call(z,ee)&&Se(de,ee,z[ee]);if(me)for(var ee of me(z))Ce.call(z,ee)&&Se(de,ee,z[ee]);return de},ve=(de,z)=>De(de,fe(z));const we=({img:de,buttonProps:z={},styles:ee={},customText:ae,ButtonText:ie,ButtonClick:le,Buttonclass:ue,ButtonTwo:ge,imgStyles:Pe,loading:je=!1,className:Be=""})=>ct.createElement("section",{className:`tc animated fadeIn ${Be}`,style:Me({color:"#999",margin:"100px auto",visibility:je?"hidden":"visible"},ee)},ct.createElement("img",{src:de||Bt,style:ve(Me({},Pe),{pointerEvents:"none",userSelect:"none"})}),ct.createElement("p",{className:"mt20 font14"},ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&ct.createElement(oe.ZP,Me({className:ue,onClick:le},z),ie),ge&&ge);cn.Z=we},45677:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ue}});var ct=at(59301),Bt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=at(99571),ze=at(70557),De=at(75975),fe=at(25399),me=at(51257),ke=at(81722),Ce=at(28426),Se=at(346),Me=at(44203),ve=at(59301),we=Object.defineProperty,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(ge,Pe,je)=>Pe in ge?we(ge,Pe,{enumerable:!0,configurable:!0,writable:!0,value:je}):ge[Pe]=je,ie=(ge,Pe)=>{for(var je in Pe||(Pe={}))z.call(Pe,je)&&ae(ge,je,Pe[je]);if(de)for(var je of de(Pe))ee.call(Pe,je)&&ae(ge,je,Pe[je]);return ge},le=(ge,Pe,je)=>new Promise((Be,Fe)=>{var Ne=We=>{try{Ie(je.next(We))}catch(Ye){Fe(Ye)}},Ae=We=>{try{Ie(je.throw(We))}catch(Ye){Fe(Ye)}},Ie=We=>We.done?Be(We.value):Promise.resolve(We.value).then(Ne,Ae);Ie((je=je.apply(ge,Pe)).next())}),ue=({editOffice:ge="view",data:Pe,issaver:je,onSaver:Be,theme:Fe,type:Ne,filename:Ae,monacoEditor:Ie,className:We,style:Ye,close:Ue,onClose:Ke,hasMask:ot,disabledDownload:st,onImgDimensions:dt,showNodata:Ct,recordInfo:$e})=>{const[rt,St]=(0,ct.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Pt,wt]=(0,ct.useState)(""),[pt,ft]=(0,ct.useState)(),ht=window.ENV==="build"?"/react/build":"",Et=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,yt=10*(1024*1024),At=(0,ct.useRef)();Pe!=null&&Pe.startsWith("/api")&&Ne!=="txt"&&(Pe=Se.Z.API_SERVER+Pe);const xt=Ze=>Ze.substring(Ze.lastIndexOf("/")+1).split(".").pop();Ae&&Ie&&(Ie.filename=Ae),(0,ct.useEffect)(()=>{var Ze,nt;const Re=(nt=(Ze=document.cookie)==null?void 0:Ze.replace(/\s/g,""))==null?void 0:nt.split(";");Re==null||Re.map(_e=>{let He=_e.split("=");He[0]==="_educoder_session"&&wt(He[1])})},[]),(0,ct.useEffect)(()=>{Ne==="office"&&(Pe.indexOf("bigfilescdn.")>-1||Pe.indexOf("bigfiles1")>-1?ft({url:Pe,fileType:xt(Pe),model:Pe.indexOf("model=edit")?"edit":"view"}):Ve())},[Ne,Pe]);function tt(Ze){return le(this,null,function*(){Ze.data.type==="pdfdata"&&(Be(Ze.data.data),window.removeEventListener("message",tt,!1)),console.log("mess---:",Ze.data)})}const Ve=()=>le(void 0,null,function*(){console.log("data:",Pe);let Ze=Pe;Pe.startsWith("http")||(Ze=location.origin+Ze);let nt=new URL(Ze).pathname.split("/").pop();const Re=yield(0,ke.gJ)({attachment_id:nt});Re.url=Et+Re.url,ft(Re)}),xe=()=>{if(Pe.startsWith("http")||Pe.startsWith("blob:")){Le();return}(0,me.Sv)(Ae||"educoder",Pe,Ae)},Le=()=>{$e&&(0,Me.fc)({id:$e==null?void 0:$e.id,watch_type:1,course_id:$e==null?void 0:$e.course_id}),(0,me.Nd)(Ae||"educoder",decodeURIComponent(Pe))};return ve.createElement("div",{style:ie({},Ye||{}),className:`${ot&&Bt.bgBlack} ${Ne?Bt.wrp:"hide"}`},Ue&&ve.createElement("div",{className:Bt.close,ref:At},!!dt&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>At.current},ve.createElement("span",{onClick:()=>{Ke(),dt()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!st&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>At.current},ve.createElement("span",{onClick:Le},ve.createElement("i",{className:"icon-quxiaozhiding"}))),je&&ve.createElement(fe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>At.current},ve.createElement("span",{className:"",onClick:()=>{const Ze=document.getElementById("pdfiframe");window.addEventListener("message",tt,!1),setTimeout(()=>{Ze.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(fe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>At.current},ve.createElement("span",{className:"",onClick:()=>{Ke()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${Bt[We]} ${We} ${Bt.monaco} ${Ne==="txt"?"show":"hide"}`},Ne==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(De.ZP,ie({},Ie)))),Ne==="audio"&&ve.createElement("audio",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Pe}`,autoPlay:!0}),Ne==="video"&&ve.createElement(ve.Fragment,null,(Pe==null?void 0:Pe.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${Pe}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Pe}`,autoPlay:!0})),Ne==="office"&&pt&&ve.createElement("iframe",{src:`${ht}/office.html?key=${pt.key}&url=${btoa(pt.url)}&callbackUrl=${Et+(pt.callbackUrl||"")}&fileType=${pt.fileType}&title=${pt.title||""}&model=${ge}&officeServer=${Se.Z.ONLYOFFICE}&disabledDownload=${!!st}`}),Ne==="html"&&ve.createElement("iframe",{src:Pe+"&disposition=inline"}),Ne==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${ht}/js/pdfview/index.html?filename=${Ae||"educoder.pdf"}&url=${encodeURIComponent(Pe)}&disabledDownload=${!!st}&model=${ge}`}),Ne==="image"&&ve.createElement("img",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Pe}`}),(Ne==="other"||Ne==="download")&&ve.createElement(ve.Fragment,null,Ct?ve.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(oe.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:xe,disabled:st},"\u4E0B\u8F7D")}):ve.createElement(oe.ZP,{type:"primary",size:"middle",onClick:xe,disabled:st},ve.createElement(ze.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(gn,cn,at){"use strict";at.d(cn,{z:function(){return Fe},Z:function(){return Ne}});var ct=at(59301),Bt=at(8944),oe=at(81428),ze=at(64018),De=at(15360),fe=at(346),me=at(51257),ke=at(15342),Ce=at(1012),Se=at(45677),Me=at(59301),we=({html:Ae})=>{const Ie=(0,ct.useRef)(null),We=(0,ct.useRef)(null),Ye=`.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,ct.useEffect)(()=>{const Ue=Ie.current.attachShadow({mode:"open"});We.current=document.createElement("div"),We.current.className="markdown-body",We.current.innerHTML=Ae,Ue.appendChild(We.current);const Ke=document.createElement("style");return Ke.textContent=Ye,Ue.appendChild(Ke),()=>{Ue.innerHTML=""}},[]),(0,ct.useEffect)(()=>{We.current&&(We.current.innerHTML=Ae)},[Ae]),Me.createElement("div",{ref:Ie})};function de(Ae){const Ie=["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"],We=new RegExp(`\\b(${Ie.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ae.replace(We,"").trim()}var z=Object.defineProperty,ee=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(Ae,Ie,We)=>Ie in Ae?z(Ae,Ie,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ae[Ie]=We,ue=(Ae,Ie)=>{for(var We in Ie||(Ie={}))ae.call(Ie,We)&&le(Ae,We,Ie[We]);if(ee)for(var We of ee(Ie))ie.call(Ie,We)&&le(Ae,We,Ie[We]);return Ae};const ge="@\u2581\u2581@",Pe="@\u2581@",je=/<pre[^>]*>/g;function Be(Ae){let Ie=document.createElement("div");return Ie.innerHTML=Ae,Ie.childNodes.length===0?"":Ie.childNodes[0].nodeValue}const Fe=(Ae,Ie)=>{Ae=Ae||"";const We=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\"(?: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,Ke=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ie?Ae.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(We,(ot,st,dt,Ct,$e,rt,St)=>{const Pt=st||Ct||rt,wt=dt||$e||St||"?";return fe.Z.API_SERVER+"/api/attachments/"+Pt+wt+"&t="+(0,me.Jn)(Pt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ae=Ae.replace(Ke,(ot,st,dt,Ct,$e,rt,St)=>{const Pt=st||Ct||rt,wt=dt||$e||St||"?";return fe.Z.API_SERVER+"/attachments/download/"+Pt+wt+"&t="+(0,me.Jn)(Pt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(We,(ot,st,dt,Ct,$e,rt,St)=>{const Pt=st||Ct||rt,wt=dt||$e||St||"?";return fe.Z.API_SERVER+"/api/attachments/"+Pt+wt+"&t="+(0,me.Jn)(Pt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(Ye,(ot,st,dt,Ct,$e)=>{const rt=st||Ct,St=dt||$e||"";return'"'+fe.Z.API_SERVER+"/api/attachments/"+rt+St+rt+St+"&t="+(0,me.Jn)(rt,Date.now())}).replace(Ue,(ot,st,dt,Ct,$e)=>{const rt=st||Ct,St=dt||$e||"";return"("+fe.Z.API_SERVER+"/files/uploads/"+rt+St+rt+St+"&t="+(0,me.Jn)(rt,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Ae)};var Ne=({value:Ae="",className:Ie,showTextOnly:We,showLines:Ye,style:Ue={},stylesPrev:Ke={},highlightKeywords:ot,showProgramFill:st,isProgramFill:dt,disabledFill:Ct=!1,programFillValue:$e,onFillChange:rt=wt=>{},onFillBlur:St=()=>{},onFillFocus:Pt=()=>{}})=>{let wt=de(String(Ae||""));const[pt,ft]=(0,ct.useState)(""),[ht,Et]=(0,ct.useState)("office"),[mt,yt]=(0,ct.useState)([]),At=(0,ct.useRef)("a"+(0,Ce.Z)()),xt={},tt=Mt=>/<style[\s\S]*?>/i.test(Mt||""),Ve=(Mt,Nt,Dt)=>{const Ht=document.createElement(Mt===Pe?"input":"textarea");Ht.style.width="100%",Ht.style.height=Mt===Pe?"40px":"151px",Ht.rows=5,Ht.spellcheck=!1,Ht.name="edu-program-fill",Ht.placeholder="\u8BF7\u8F93\u5165",Ht.dataset.id=Nt;const Xt=Object.keys(xt).length;return xt[Xt]=Ht,`<span class="edu-program-fill-wrap ${Mt===Pe?"":"show"}" style="width:${Mt===Pe?"400px":"100%"}" title=${Dt||""}><span>${Ht.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function xe(Mt){return Mt=Mt.replace(/!\[.*?\]\(.*?\)/g,""),Mt=Mt.replace(/\[.*?\]\(.*?\)/g,""),Mt=Mt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Mt=Mt.replace(/<embed.*?>/g,""),Mt=Mt.replace(/<img.*?>/g,""),Mt=Mt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Mt=Mt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Mt=Mt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Mt=Mt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Mt}const Le=Mt=>!We&&tt(wt)?Mt:Mt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Nt,Dt){let Ht=Dt.replace(/(\n|\r)/g,"").split("}"),Xt=[];return Ht.map($t=>{$t!=""&&Xt.push(`.${At.current} ${$t}`)}),`<style>${Xt.join("}")}</style>`}),Ze=(0,ct.useMemo)(()=>{try{const Ht=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Xt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,$t=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ut=/\(\/attachments\/download\//g;wt=wt.replace(Ut,"("+fe.Z.API_SERVER+"/attachments/download/").replace(Ht,"("+fe.Z.API_SERVER+"/api/attachments/").replace(Xt,'"'+fe.Z.API_SERVER+"/api/attachments/").replace($t,'"'+fe.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(Ht){}if(st){let Ht=-1;return wt=wt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Xt,$t,Ut){var sn;return++Ht,Ve(Xt,Ht,(sn=$e==null?void 0:$e[Ht])==null?void 0:sn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Le(wt||"")}</pre>`}let Mt=Le(wt);Mt=(0,oe.ZP)(Mt);const Nt=(0,oe.ez)();wt.match(/\[TOC\]/)&&(Mt=Mt.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,(Ht,Xt)=>{const{type:$t,expression:Ut}=Nt[Xt];return(0,ke.renderToString)(Be(Ut)||"",{displayMode:$t==="block",throwOnError:!1,output:"html"})}),Mt=Mt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Dt=document.createElement("div");if(Dt.innerHTML=Mt,We)return Dt.innerText;if(ot){const Ht=ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return He(Dt,Ht),Dt.innerHTML}return setTimeout(()=>gt(),500),Dt.innerHTML},[wt,ot]);(0,ct.useEffect)(()=>{Qe.current&&Qe.current.querySelectorAll(["input","textarea"]).forEach(Nt=>{Nt.oninput=nt,Nt.onblur=Re,Nt.onfocus=_e})},[mt]),(0,ct.useEffect)(()=>{var Mt,Nt,Dt,Ht,Xt;if($e!=null&&$e.length)try{const $t=Qe.current.querySelectorAll(".edu-program-fill-score"),Ut=Qe.current.querySelectorAll('[name="edu-program-fill"]');for(const[sn,nn]of Ut.entries())nn.value=((Mt=$e==null?void 0:$e[sn])==null?void 0:Mt.value)||"",((Nt=$e==null?void 0:$e[sn])==null?void 0:Nt.type)==="warning"?nn.className="program-fill-warning":((Dt=$e==null?void 0:$e[sn])==null?void 0:Dt.type)==="success"?nn.className="program-fill-success":nn.className="";for(const[sn,nn]of $t.entries())nn.innerHTML=(Ht=$e==null?void 0:$e[sn])!=null&&Ht.score?`${(Xt=$e==null?void 0:$e[sn])==null?void 0:Xt.score}\u5206`:"";yt($e)}catch($t){console.log($t,"error")}},[$e]);const nt=Mt=>{mt[Mt.target.dataset.id]=mt[Mt.target.dataset.id]||{},mt[Mt.target.dataset.id].value=Mt.target.value,yt([...mt]),rt(mt,Mt.target.dataset.id)},Re=Mt=>{mt[Mt.target.dataset.id]=mt[Mt.target.dataset.id]||{},mt[Mt.target.dataset.id].value=Mt.target.value,yt([...mt]),St(mt,Mt.target.dataset.id)},_e=Mt=>{mt[Mt.target.dataset.id]=mt[Mt.target.dataset.id]||{},mt[Mt.target.dataset.id].value=Mt.target.value,yt([...mt]),Pt(mt,Mt.target.dataset.id)};function He(Mt,Nt){return Mt.childNodes.forEach(Dt=>{var Ht;if(Dt.childNodes.length>0)He(Dt,Nt);else if(Dt.nodeName!=="IMG")if(Dt.innerHTML)Dt.innerHTML=(Ht=Dt.innerHTML)==null?void 0:Ht.replace(new RegExp(Nt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Xt=document.createElement("span");Xt.innerHTML=Dt.textContent.replace(new RegExp(Nt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Dt.replaceWith(Xt)}})}const Qe=(0,ct.useRef)();oe.jb.WebkitLineClamp=Ye,Ye&&(Ue=ue(ue({},Ue),oe.jb));function ut(Mt){let Nt=Mt.target;if(Nt.tagName.toUpperCase()==="A"){let Dt=Nt.getAttribute("href");if(Dt.indexOf("office")>-1)Mt.preventDefault(),ft(Dt),Et("office");else if(Dt.indexOf("application/pdf")>-1)Mt.preventDefault(),ft(Dt),Et("pdf");else if(Dt.indexOf("text/html")>-1)Mt.preventDefault(),ft(Dt),Et("html");else if(Dt.startsWith("#")){Mt.preventDefault();let Ht=document.getElementById(Dt.replace("#",""));Ht&&Ht.scrollIntoView(!0)}}}const gt=()=>{var Mt;const Nt=(Mt=Qe.current)==null?void 0:Mt.querySelectorAll("video");Nt==null||Nt.forEach(Dt=>{if(Dt.oncontextmenu=()=>!1,Dt.src.indexOf(".m3u8")>-1&&!Dt.canPlayType("application/vnd.apple.mpegurl")){if(De.ZP.isSupported()){var Ht=new De.ZP;Ht.loadSource(Dt.src),Ht.attachMedia(Dt)}}})};return(0,ct.useEffect)(()=>{if(Qe.current&&Ze&&Ze.match(je)&&window.PR.prettyPrint(),Qe.current)return Qe.current.addEventListener("click",ut),()=>{var Mt;(Mt=Qe.current)==null||Mt.removeEventListener("click",ut),(0,oe.AL)(),(0,oe.Iy)()}},[Ze,Qe.current,ut]),(0,ct.useEffect)(()=>{var Mt;const Nt=Dt=>{Dt.preventDefault(),Dt.clipboardData.setData("text",window.getSelection().toString())};return(Mt=Qe.current)==null||Mt.addEventListener("copy",Nt),()=>{var Dt;(Dt=Qe.current)==null||Dt.removeEventListener("copy",Nt)}},[Qe.current]),ct.createElement(ct.Fragment,null,We&&ct.createElement("div",{ref:Qe},Ze),!We&&!tt(Ze)&&ct.createElement("div",{ref:Qe,style:ue({},Ue),className:`${Ie||""} ${Ct?"disabled-fill":""} markdown-body ${At.current}`,dangerouslySetInnerHTML:{__html:Ze}}),!We&&tt(Ze)&&ct.createElement(we,{html:Ze}),ct.createElement(Se.Z,{close:!0,data:pt,type:pt!=null&&pt.length?ht:"",style:ue({},Ke),onClose:()=>ft("")}))}},8343:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ze}});var ct=at(59301),Bt=at(49535),oe=at(59301),ze=({defaultX:De="40%",leftChild:fe,rightChild:me,className:ke,hideResize:Ce=!1})=>{const[Se,Me]=(0,ct.useState)(De),ve=(0,ct.useRef)();function we(){ve.current=!0}(0,ct.useEffect)(()=>{function ee(ie){ve.current&&(Bt.Z.publish("resize-move-bar",ie),Me(ie.pageX))}function ae(){ve.current=!1}return window.addEventListener("mousemove",ee),window.addEventListener("mouseup",ae),()=>{window.removeEventListener("mousemove",ee),window.removeEventListener("mouseup",ae)}},[]);const de=typeof Se=="number"&&Se!==.01?`${Se}px`:De,z=`calc(100% - ${Ce?"0px":"4px"} - ${de})`;return oe.createElement("div",{className:`split-panel-container ${ke}`},oe.createElement("section",{style:{width:de,display:Se===.01?"none":""}},fe),oe.createElement("section",{className:"resize-x-bar",onMouseDown:we},oe.createElement("a",{className:"btn-resize"},oe.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},oe.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),oe.createElement("section",{style:{width:z}},me))}},16253:function(gn,cn,at){"use strict";at.d(cn,{cT:function(){return Ne},pe:function(){return je}});var ct=at(59301),Bt=at(14566),oe=at(6767),ze=at(38986),De=at(28209),fe=at.n(De),me=at(1012),ke=at(25690),Ce=at(47257),Se=at.n(Ce),Me=Object.defineProperty,ve=Object.defineProperties,we=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Ie,We,Ye)=>We in Ie?Me(Ie,We,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Ie[We]=Ye,ie=(Ie,We)=>{for(var Ye in We||(We={}))z.call(We,Ye)&&ae(Ie,Ye,We[Ye]);if(de)for(var Ye of de(We))ee.call(We,Ye)&&ae(Ie,Ye,We[Ye]);return Ie},le=(Ie,We)=>ve(Ie,we(We)),ue=(Ie,We)=>{var Ye={};for(var Ue in Ie)z.call(Ie,Ue)&&We.indexOf(Ue)<0&&(Ye[Ue]=Ie[Ue]);if(Ie!=null&&de)for(var Ue of de(Ie))We.indexOf(Ue)<0&&ee.call(Ie,Ue)&&(Ye[Ue]=Ie[Ue]);return Ye},ge=(Ie,We,Ye)=>new Promise((Ue,Ke)=>{var ot=Ct=>{try{dt(Ye.next(Ct))}catch($e){Ke($e)}},st=Ct=>{try{dt(Ye.throw(Ct))}catch($e){Ke($e)}},dt=Ct=>Ct.done?Ue(Ct.value):Promise.resolve(Ct.value).then(ot,st);dt((Ye=Ye.apply(Ie,We)).next())});const{Dragger:Pe}=Bt.default,je=Ie=>{const We="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var Ue=fe().enc.Utf8.parse(We);let Ke=fe().enc.Utf8.parse(Ye);var ot=fe().AES.decrypt(Ie,Ue,{iv:Ke,mode:fe().mode.CBC});return ot.toString(fe().enc.Utf8)};let Be;const Fe=Ie=>ge(void 0,[Ie],function*({identifier:We,oldFilename:Ye,newFilename:Ue}){var Ke,ot,st,dt,Ct,$e;const rt=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});rt.data=JSON.parse(je(rt.data));const St=new OSS({endpoint:(Ke=rt==null?void 0:rt.data)==null?void 0:Ke.end_point,region:(ot=rt==null?void 0:rt.data)==null?void 0:ot.region,accessKeyId:(st=rt==null?void 0:rt.data)==null?void 0:st.access_key_id,accessKeySecret:(dt=rt==null?void 0:rt.data)==null?void 0:dt.access_key_secret,bucket:(Ct=rt==null?void 0:rt.data)==null?void 0:Ct.bucket,stsToken:($e=rt==null?void 0:rt.data)==null?void 0:$e.security_token});return new Promise((Pt,wt)=>{console.log(11111,`${We}/${Ye}`,`${We}/${Ue}`,rt.data),St.copy(`/${We}/${Ye}`,`/${We}/${Ue}`).then(pt=>{console.log("\u62F7\u8D1D\u6210\u529F",pt)}).catch(pt=>{console.log(pt)})})}),Ne=(Ie,We,Ye)=>ge(void 0,null,function*(){var Ue,Ke,ot,st,dt,Ct;We.file_name=Ie.name;const $e=yield(0,ze.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",je($e.data)),$e.data=JSON.parse(je($e.data));const rt=Ie.name.split(".");rt.pop();const St=We.realFileName?rt.join(""):(0,me.Z)(),Pt=new(Se())({endpoint:(Ue=$e==null?void 0:$e.data)==null?void 0:Ue.end_point,region:(Ke=$e==null?void 0:$e.data)==null?void 0:Ke.region,accessKeyId:(ot=$e==null?void 0:$e.data)==null?void 0:ot.access_key_id,accessKeySecret:(st=$e==null?void 0:$e.data)==null?void 0:st.access_key_secret,bucket:(dt=$e==null?void 0:$e.data)==null?void 0:dt.bucket,stsToken:(Ct=$e==null?void 0:$e.data)==null?void 0:Ct.security_token});return new Promise((wt,pt)=>{var ft;Pt.multipartUpload(`${St}`,new Blob([Ie],{type:Ie.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(ft=$e==null?void 0:$e.data)==null?void 0:ft.callback_url,host:$e==null?void 0:$e.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ze.rz)(We)}})).then(function(ht){var Et;Ie.response=(Et=ht.data)==null?void 0:Et.data,wt(ht==null?void 0:ht.data)}).catch(function(ht){pt(ht),console.log("err:",ht)})})}),Ae=Ie=>{var We=Ie,{user:Ye,cancelUpload:Ue}=We,Ke=ue(We,["user","cancelUpload"]);const[ot,st]=(0,ct.useState)([]);let[dt,Ct]=(0,ct.useState)();const $e={onRemove:St=>{st([...ot.filter(Pt=>Pt.name!==St.name)]),Ke.onChange(ot.filter(Pt=>Pt.name!==St.name))},disabled:Ke.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(St=>St.file),customRequest:()=>{},beforeUpload:St=>ge(void 0,null,function*(){let Pt=Ke.maxSize||1073741824;if(ot.filter(wt=>wt.name===St.name).length){oe.ZP.info(`${St.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(St==null?void 0:St.size)>Pt?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Pt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:St.name,file:St}),st([...ot]),Ke.onChange(ot),!1)})},rt=(St,Pt)=>ge(void 0,null,function*(){var wt,pt,ft,ht,Et,mt;Pt.file_name=St.name;const yt=St.name,At=yield(0,ze.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(At.data=JSON.parse(je(At.data)),(At==null?void 0:At.status)!==0){ot[ot.findIndex(Ve=>Ve.name===yt)].status="error",ot[ot.findIndex(Ve=>Ve.name===yt)].file.status="error",Ke.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}dt=new(Se())({endpoint:(wt=At==null?void 0:At.data)==null?void 0:wt.end_point,region:(pt=At==null?void 0:At.data)==null?void 0:pt.region,accessKeyId:(ft=At==null?void 0:At.data)==null?void 0:ft.access_key_id,accessKeySecret:(ht=At==null?void 0:At.data)==null?void 0:ht.access_key_secret,bucket:(Et=At==null?void 0:At.data)==null?void 0:Et.bucket,stsToken:(mt=At==null?void 0:At.data)==null?void 0:mt.security_token}),console.log(St,"file"),Ct(dt);const xt=St.name.split(".");xt.pop();const tt=yt.indexOf(".")>-1?Pt.realFileName?xt.join("."):(0,me.Z)():yt;return new Promise((Ve,xe)=>{var Le;try{dt.multipartUpload(`${Ke.identifier}/${tt}${yt.indexOf(".")>-1?"."+yt.split(".").pop():""}`,new Blob([St.file],{type:St.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Ze,nt,Re)=>{try{console.log("\u8FDB\u5EA6",Ze,nt,Re);const _e=ot.findIndex(He=>He.name===yt);ot[_e].file.percent=Ze*100,ot[_e].tempCheckpoint=nt,st([...ot])}catch(_e){}},checkpoint:ot[ot.findIndex(Ze=>Ze.name===yt)].tempCheckpoint,callback:{customValue:{id:yt+""},url:(Le=At==null?void 0:At.data)==null?void 0:Le.callback_url,host:At==null?void 0:At.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ze.rz)(Pt)}}).then(function(Ze){var nt,Re,_e;const He=ot.findIndex(ut=>ut.name===yt);let Qe="done";if(((nt=Ze.data)==null?void 0:nt.status)===0){St.response=(Re=Ze.data)==null?void 0:Re.data;const ut=ot.findIndex(gt=>gt.name===yt);ot[ut].status="done",ot[ut].file.status="done"}else oe.ZP.warning((_e=Ze.data)==null?void 0:_e.message),Qe="error";ot[He].status=Qe,ot[He].file.status=Qe,Ke.onChange(ot),Ve(Ze==null?void 0:Ze.data)}).catch(function(Ze){ot[ot.findIndex(nt=>nt.name===yt)].status="error",ot[ot.findIndex(nt=>nt.name===yt)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),st([...ot]),Ke.onChange(ot),xe(Ze),console.log("err:",Ze)})}catch(Ze){}})});return(0,ct.useEffect)(()=>{ot.every(St=>St==="done"||St==="error")&&Ke.onComplete(ot)},[ot]),(0,ct.useEffect)(()=>{Ue&&(dt==null||dt.cancel())},[Ue]),(0,ct.useEffect)(()=>{Ke.uploading&&ot.map(St=>ge(void 0,null,function*(){var Pt;if((!St.status||St.status==="error")&&!Ue){St.status="uploading",St.file.status="uploading";const wt=yield rt(St,{login:(Pt=Ye==null?void 0:Ye.userInfo)==null?void 0:Pt.login,container_type:Ke.container_type,container_id:Ke.container_id,description:Ke.description,realFileName:Ke.realFileName})}}))},[Ke.uploading]),ct.createElement(Pe,le(ie({},$e),{height:Ke.height,className:Ke.className}),ct.createElement("p",{className:"ant-upload-hint"},Ke.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};cn.ZP=(0,ke.connect)(({loading:Ie,globalSetting:We,user:Ye})=>({globalSetting:We,loading:Ie.models.competitions,user:Ye}))(Ae)},69720:function(gn,cn,at){"use strict";at.d(cn,{h:function(){return ge}});var ct=at(59301),Bt=at(82326),oe=at(28284),ze=at(99571),De=at(89780),fe=at.n(De),me=at(8336),ke=at(12469),Ce=Object.defineProperty,Se=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,z=(Pe,je,Be)=>je in Pe?Ce(Pe,je,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Pe[je]=Be,ee=(Pe,je)=>{for(var Be in je||(je={}))we.call(je,Be)&&z(Pe,Be,je[Be]);if(ve)for(var Be of ve(je))de.call(je,Be)&&z(Pe,Be,je[Be]);return Pe},ae=(Pe,je)=>Se(Pe,Me(je));const ie=Bt.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"]};cn.Z=({callback:Pe,onCancel:je})=>{const[Be,Fe]=(0,ct.useState)("python");function Ne(Ie){Fe(ue[Ie][1])}function Ae(Ie){Pe(Ie)}return ct.createElement(oe.default,ae(ee({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ae,style:{width:500}}),ct.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ct.createElement(Bt.default,{getPopupContainer:Ie=>Ie.parentNode,onChange:Ne},Object.keys(ue).map(Ie=>ct.createElement(ie,{key:Ie,value:Ie},ue[Ie][0])))),ct.createElement(oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ct.createElement(ge,{mode:Be})),ct.createElement("div",{className:"flex-container flex-end"},ct.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ct.createElement(ze.ZP,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function ge({value:Pe,onChange:je,mode:Be,options:Fe={}}){const Ne=(0,ct.useRef)(),[Ae,Ie]=(0,ct.useState)();return(0,ct.useEffect)(()=>{if(Ae){let We=function(Ye){const Ue=Ye.getValue();je&&je(Ue)};return Ae.on("change",We),()=>{Ae.off("change",We)}}},[Ae,je]),(0,ct.useEffect)(()=>{Ae&&Ae.setOption("mode",Be)},[Ae,Be]),(0,ct.useEffect)(()=>{Ae&&(Pe!==Ae.getValue()||Pe==="")&&setTimeout(()=>{Ae.setValue(Pe||"")},300)},[Ae,Pe]),(0,ct.useEffect)(()=>{if(Ne.current&&!Ae){const We=fe().fromTextArea(Ne.current,ee({mode:Be,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Fe));Ie(We)}},[Ne.current,Ae]),ct.createElement("div",{className:"my-codemirror-container"},ct.createElement("textarea",{ref:Ne}))}},39793:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return lo}});var ct=at(59301),Bt=at(89780),oe=at.n(Bt),ze=at(76374),De=at(8336),fe=at(6313),me=at(25717),ke=at(99498),Ce=at(25419),Se=at(67549),Me=at(76902),ve=({value:on="",className:an,showTextOnly:tn,showLines:vn,style:gr={}})=>{const pr=(0,ct.useMemo)(()=>"",[on]);return ct.createElement(ct.Fragment,null,ct.createElement("div",{dangerouslySetInnerHTML:{__html:pr}}))},we=Object.defineProperty,de=Object.defineProperties,z=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(on,an,tn)=>an in on?we(on,an,{enumerable:!0,configurable:!0,writable:!0,value:tn}):on[an]=tn,ue=(on,an)=>{for(var tn in an||(an={}))ae.call(an,tn)&&le(on,tn,an[tn]);if(ee)for(var tn of ee(an))ie.call(an,tn)&&le(on,tn,an[tn]);return on},ge=(on,an)=>de(on,z(an));let Pe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function je({onActionCallback:on,title:an,icon:tn,actionName:vn,className:gr="",children:pr}){function ii(){on(vn)}return ct.createElement("a",{title:an,className:gr,onClick:ii},ct.createElement("i",{className:`${tn}`}),pr)}var Be=({watch:on,showNullButton:an,showNullProgramButton:tn,onActionCallback:vn,fullScreen:gr,insertTemp:pr,hidetoolBar:ii,extraUse:Mn})=>{const sr=[...Pe,{title:`${on?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${on?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ct.createElement("ul",{className:"markdown-toolbar-container"},!ii&&sr.map((Wr,Li)=>ct.createElement("li",{key:Li},Wr.actionName?ct.createElement(je,ge(ue({},Wr),{onActionCallback:vn})):ct.createElement("span",{className:"v-line"}))),an?ct.createElement("li",null,ct.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:vn},ct.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,tn?ct.createElement(ct.Fragment,null,ct.createElement("li",null,ct.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:vn},ct.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ct.createElement("li",null,ct.createElement(je,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:vn},ct.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,pr&&ct.createElement("li",null,ct.createElement(je,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${pr}`,onActionCallback:vn},ct.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Mn&&ct.createElement("li",null,Mn),ct.createElement("li",{className:"btn-full-screen"},ct.createElement(je,{icon:`${gr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:gr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:vn})))},Fe=at(91558),Ne=at(28284),Ae=at(37568),Ie=at(99571),We=Object.defineProperty,Ye=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,dt=(on,an,tn)=>an in on?We(on,an,{enumerable:!0,configurable:!0,writable:!0,value:tn}):on[an]=tn,Ct=(on,an)=>{for(var tn in an||(an={}))ot.call(an,tn)&&dt(on,tn,an[tn]);if(Ke)for(var tn of Ke(an))st.call(an,tn)&&dt(on,tn,an[tn]);return on},$e=(on,an)=>Ye(on,Ue(an));const rt={labelCol:{span:4},wrapperCol:{span:20}};var St=({callback:on,onCancel:an})=>{function tn(vn){on(vn)}return ct.createElement(Ne.default,$e(Ct({},rt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:tn,style:{width:500}}),ct.createElement(Ne.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ct.createElement(Ae.default,null)),ct.createElement(Ne.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ct.createElement(Ae.default,null)),ct.createElement("div",{className:"flex-container flex-end"},ct.createElement(Ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ct.createElement(Ie.ZP,{type:"ghost",onClick:an},"\u53D6\u6D88")))},Pt=at(69720),wt=at(17077),pt=at(62957),ft=at(77019),ht=at(9507),Et=at(59301),mt=({callback:on,onCancel:an})=>{const tn=document.createElement("canvas"),vn=tn.getContext("2d");tn.width=1e3,tn.height=800,vn.fillStyle="#ffffff",vn.fillRect(0,0,tn.width,tn.height);const gr=tn.toDataURL("image/png");return Et.createElement(pt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Et.createElement(ft.Z,{style:{height:"100vh"}},Et.createElement(ht.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:gr,visible:!0,title:String(Date.now())},onOk:pr=>{on({src:pr.url})},onClose:an})))},yt=at(12378);function At(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(At,go.CommandHandler),At.prototype.canAlignSelection=function(){var on=this.diagram;return!(on===null||on.isReadOnly||on.isModelReadOnly||on.selection.count<2)},At.prototype.alignLeft=function(){var on=this.diagram;on.startTransaction("aligning left");var an=1/0;on.selection.each(function(tn){tn instanceof go.Link||(an=Math.min(tn.position.x,an))}),on.selection.each(function(tn){tn instanceof go.Link||tn.move(new go.Point(an,tn.position.y))}),on.commitTransaction("aligning left")},At.prototype.alignRight=function(){var on=this.diagram;on.startTransaction("aligning right");var an=-1/0;on.selection.each(function(tn){if(!(tn instanceof go.Link)){var vn=tn.actualBounds.x+tn.actualBounds.width;an=Math.max(vn,an)}}),on.selection.each(function(tn){tn instanceof go.Link||tn.move(new go.Point(an-tn.actualBounds.width,tn.position.y))}),on.commitTransaction("aligning right")},At.prototype.alignTop=function(){var on=this.diagram;on.startTransaction("alignTop");var an=1/0;on.selection.each(function(tn){tn instanceof go.Link||(an=Math.min(tn.position.y,an))}),on.selection.each(function(tn){tn instanceof go.Link||tn.move(new go.Point(tn.position.x,an))}),on.commitTransaction("alignTop")},At.prototype.alignBottom=function(){var on=this.diagram;on.startTransaction("aligning bottom");var an=-1/0;on.selection.each(function(tn){if(!(tn instanceof go.Link)){var vn=tn.actualBounds.y+tn.actualBounds.height;an=Math.max(vn,an)}}),on.selection.each(function(tn){tn instanceof go.Link||tn.move(new go.Point(tn.actualBounds.x,an-tn.actualBounds.height))}),on.commitTransaction("aligning bottom")},At.prototype.alignCenterX=function(){var on=this.diagram,an=on.selection.first();if(an){on.startTransaction("aligning Center X");var tn=an.actualBounds.x+an.actualBounds.width/2;on.selection.each(function(vn){vn instanceof go.Link||vn.move(new go.Point(tn-vn.actualBounds.width/2,vn.actualBounds.y))}),on.commitTransaction("aligning Center X")}},At.prototype.alignCenterY=function(){var on=this.diagram,an=on.selection.first();if(an){on.startTransaction("aligning Center Y");var tn=an.actualBounds.y+an.actualBounds.height/2;on.selection.each(function(vn){vn instanceof go.Link||vn.move(new go.Point(vn.actualBounds.x,tn-vn.actualBounds.height/2))}),on.commitTransaction("aligning Center Y")}},At.prototype.alignColumn=function(on){var an=this.diagram;an.startTransaction("align Column"),on===void 0&&(on=0),on=parseFloat(on);var tn=new Array;an.selection.each(function(Mn){Mn instanceof go.Link||tn.push(Mn)});for(var vn=0;vn<tn.length-1;vn++){var gr=tn[vn],pr=gr.actualBounds.y+gr.actualBounds.height+on,ii=tn[vn+1];ii.move(new go.Point(gr.actualBounds.x,pr))}an.commitTransaction("align Column")},At.prototype.alignRow=function(on){on===void 0&&(on=0),on=parseFloat(on);var an=this.diagram;an.startTransaction("align Row");var tn=new Array;an.selection.each(function(Mn){Mn instanceof go.Link||tn.push(Mn)});for(var vn=0;vn<tn.length-1;vn++){var gr=tn[vn],pr=gr.actualBounds.x+gr.actualBounds.width+on,ii=tn[vn+1];ii.move(new go.Point(pr,gr.actualBounds.y))}an.commitTransaction("align Row")},At.prototype.canRotate=function(on){var an=this.diagram;return!(an===null||an.isReadOnly||an.isModelReadOnly||an.selection.count<1)},At.prototype.rotate=function(on){on===void 0&&(on=90);var an=this.diagram;an.startTransaction("rotate "+on.toString());var an=this.diagram;an.selection.each(function(tn){tn instanceof go.Link||tn instanceof go.Group||(tn.angle+=on)}),an.commitTransaction("rotate "+on.toString())},At.prototype.pullToFront=function(){var on=this.diagram;on.startTransaction("pullToFront");var an=new go.Map;on.selection.each(function(tn){an.set(tn.layer,0)}),an.iteratorKeys.each(function(tn){var vn=0;tn.parts.each(function(gr){if(!gr.isSelected){var pr=gr.zOrder;isNaN(pr)?gr.zOrder=0:vn=Math.max(vn,pr)}}),an.set(tn,vn)}),on.selection.each(function(tn){At._assignZOrder(tn,an.get(tn.layer)+1)}),on.commitTransaction("pullToFront")},At.prototype.pushToBack=function(){var on=this.diagram;on.startTransaction("pushToBack");var an=new go.Map;on.selection.each(function(tn){an.set(tn.layer,0)}),an.iteratorKeys.each(function(tn){var vn=0;tn.parts.each(function(gr){if(!gr.isSelected){var pr=gr.zOrder;isNaN(pr)?gr.zOrder=0:vn=Math.min(vn,pr)}}),an.set(tn,vn)}),on.selection.each(function(tn){At._assignZOrder(tn,an.get(tn.layer)-1-At._findGroupDepth(tn))}),on.commitTransaction("pushToBack")},At._assignZOrder=function(on,an,tn){tn===void 0&&(tn=on),on.layer===tn.layer&&(on.zOrder=an),on instanceof go.Group&&on.memberParts.each(function(vn){At._assignZOrder(vn,an+1,tn)})},At._findGroupDepth=function(on){if(on instanceof go.Group){var an=0;return on.memberParts.each(function(tn){an=Math.max(an,At._findGroupDepth(tn))}),an+1}else return 0},At.prototype.doKeyDown=function(){var on=this.diagram;if(on!==null){var an=on.lastInput;if(an.key==="Up"||an.key==="Down"||an.key==="Left"||an.key==="Right"){var tn=this.arrowKeyBehavior;if(tn==="none")return;if(tn==="select"){this._arrowKeySelect();return}else if(tn==="move"){this._arrowKeyMove();return}else if(tn==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},At.prototype._getAllParts=function(){var on=new Array;return this.diagram.nodes.each(function(an){on.push(an)}),this.diagram.parts.each(function(an){on.push(an)}),on},At.prototype._arrowKeyMove=function(){var on=this.diagram,an=on.lastInput,tn=0,vn=0;if(an.control||an.meta)tn=1,vn=1;else if(on.grid!==null){var gr=on.grid.gridCellSize;vn=gr.width,tn=gr.height}on.startTransaction("arrowKeyMove"),on.selection.each(function(pr){an.key==="Up"?pr.move(new go.Point(pr.actualBounds.x,pr.actualBounds.y-tn)):an.key==="Down"?pr.move(new go.Point(pr.actualBounds.x,pr.actualBounds.y+tn)):an.key==="Left"?pr.move(new go.Point(pr.actualBounds.x-vn,pr.actualBounds.y)):an.key==="Right"&&pr.move(new go.Point(pr.actualBounds.x+vn,pr.actualBounds.y))}),on.commitTransaction("arrowKeyMove")},At.prototype._arrowKeySelect=function(){var on=this.diagram,an=on.lastInput,tn=null;an.key==="Up"?tn=this._findNearestPartTowards(270):an.key==="Down"?tn=this._findNearestPartTowards(90):an.key==="Left"?tn=this._findNearestPartTowards(180):an.key==="Right"&&(tn=this._findNearestPartTowards(0)),tn!==null&&(an.shift?tn.isSelected=!0:an.control||an.meta?tn.isSelected=!tn.isSelected:on.select(tn))},At.prototype._findNearestPartTowards=function(on){var an=this.diagram.selection.first();if(an===null)return null;for(var tn=an.actualBounds.center,vn=this._getAllParts(),gr=1/0,pr=an,ii=0;ii<vn.length;ii++){var Mn=vn[ii];if(Mn!==an&&Mn.canSelect()){var sr=Mn.actualBounds.center,Wr=tn.directionPoint(sr),Li=this._angleCloseness(Wr,on);if(Li<=45){var tr=tn.distanceSquaredPoint(sr);tr*=1+Math.sin(Li*Math.PI/180),tr<gr&&(gr=tr,pr=Mn)}}}return pr},At.prototype._angleCloseness=function(on,an){return Math.min(Math.abs(an-on),Math.min(Math.abs(an+360-on),Math.abs(an-360-on)))},At.prototype._arrowKeyTree=function(){var on=this.diagram,an=on.selection.first();if(an instanceof go.Node){var tn=on.lastInput;if(tn.key==="Right"){if(!an.isTreeLeaf)if(!an.isTreeExpanded)on.commandHandler.canExpandTree(an)&&on.commandHandler.expandTree(an);else{var vn=this._sortTreeChildrenByY(an).first();vn!==null&&on.select(vn)}}else if(tn.key==="Left")if(!an.isTreeLeaf&&an.isTreeExpanded)on.commandHandler.canCollapseTree(an)&&on.commandHandler.collapseTree(an);else{var gr=an.findTreeParentNode();gr!==null&&on.select(gr)}else if(tn.key==="Up"){var gr=an.findTreeParentNode();if(gr!==null){var pr=this._sortTreeChildrenByY(gr),ii=pr.indexOf(an);if(ii>0){for(var Mn=pr.elt(ii-1);Mn!==null&&Mn.isTreeExpanded&&!Mn.isTreeLeaf;){var sr=this._sortTreeChildrenByY(Mn);Mn=sr.last()}Mn!==null&&on.select(Mn)}else on.select(gr)}}else if(tn.key==="Down")if(an.isTreeExpanded&&!an.isTreeLeaf){var vn=this._sortTreeChildrenByY(an).first();vn!==null&&on.select(vn)}else for(;an!==null;){var gr=an.findTreeParentNode();if(gr===null)break;var pr=this._sortTreeChildrenByY(gr),ii=pr.indexOf(an);if(ii<pr.length-1){on.select(pr.elt(ii+1));break}else an=gr}var Wr=on.selection.first();Wr!==null&&on.scrollToRect(Wr.actualBounds)}},At.prototype._sortTreeChildrenByY=function(on){var an=new go.List().addAll(on.findTreeChildrenNodes());return an.sort(function(tn,vn){var gr=tn.location,pr=vn.location;return gr.y<pr.y?-1:gr.y>pr.y?1:gr.x<pr.x?-1:gr.x>pr.x?1:0}),an},At.prototype.copyToClipboard=function(on){go.CommandHandler.prototype.copyToClipboard.call(this,on),this._lastPasteOffset.set(this.pasteOffset)},At.prototype.pasteFromClipboard=function(){var on=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(on,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),on},Object.defineProperty(At.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(on){if(on!=="move"&&on!=="select"&&on!=="scroll"&&on!=="tree"&&on!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+on);this._arrowKeyBehavior=on}}),Object.defineProperty(At.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(on){if(!(on instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+on);this._pasteOffset.set(on)}});var xt=At,tt=at(63720),Ve=at(5269),xe=at(38986),Le={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Ze=at(48790),nt=at(59301),Re=(on,an,tn)=>new Promise((vn,gr)=>{var pr=sr=>{try{Mn(tn.next(sr))}catch(Wr){gr(Wr)}},ii=sr=>{try{Mn(tn.throw(sr))}catch(Wr){gr(Wr)}},Mn=sr=>sr.done?vn(sr.value):Promise.resolve(sr.value).then(pr,ii);Mn((tn=tn.apply(on,an)).next())});function _e({onCancel:on,callback:an}){let tn=(0,ct.useRef)(),vn=(0,ct.useRef)(),gr=(0,ct.useRef)(),pr=(0,ct.useRef)(!1);const ii=(0,ct.useRef)(!1),[Mn,sr]=(0,ct.useState)(0);function Wr(){const tr=yt.bx.make,Ot={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"};tn.current=new yt.S0(vn.current,{padding:20,grid:tr(yt.s_,"Grid",tr(yt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),tr(yt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Qt=>{var or=Qt.diagram.commandHandler.addTopLevelParts(Qt.diagram.selection,!0);or||Qt.diagram.currentTool.doCancel()},commandHandler:tr(xt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Qt=>{var or=Qt.subject;or.location=or.location.copy().snapToGridPoint(Qt.diagram.grid.gridOrigin,Qt.diagram.grid.gridCellSize),setTimeout(()=>{Qt.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Qt=>{var or=Qt.subject;setTimeout(()=>{Qt.diagram.commandHandler.editTextBlock()})},LinkRelinked:Qt=>{var or=Qt.parameter.part;or.invalidateConnectedLinks();var yr=Qt.subject;Qt.diagram.toolManager.linkingTool.isForwards?yr.toNode.invalidateConnectedLinks():yr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),tn.current.nodeTemplate=tr(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),tr(yt.bn,{name:"SHAPE",fill:Ot.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")),tr(yt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),tr(yt.al,{margin:1,textAlign:"center",overflow:yt.al.OverflowEllipsis,editable:!0},new yt.KX("text").makeTwoWay(),new yt.KX("stroke","color"))),tn.current.nodeTemplate.toolTip=tr("ToolTip",tr(yt.s_,"Vertical",{maxSize:new yt.$u(200,NaN)},tr(yt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new yt.KX("text")),tr(yt.al,{font:"10pt sans-serif",textAlign:"center"},new yt.KX("text","details"))));function Kt(Qt,or){var yr=(Hn,Yr)=>{Hn.handled=!0,Hn.diagram.model.commit(Rr=>{var Zr=Yr.part.adornedPart,Qr=new yt.E9().setRectSpot(Zr.actualBounds,Qt);Qr.subtract(Zr.location),Qr.scale(2,2),Qr.x+=Math.sign(Qr.x)*130,Qr.y+=Math.sign(Qr.y)*130,Qr.add(Zr.location),Qr.snapToGridPoint(Hn.diagram.grid.gridOrigin,Hn.diagram.grid.gridCellSize);var ui=Rr.copyNodeData(Zr.data);Rr.setGroupKeyForNodeData(ui,Rr.getGroupKeyForNodeData(Zr.data)),Rr.addNodeData(ui);var Pi={from:Zr.key,to:Rr.getKeyForNodeData(ui)};Rr.addLinkData(Pi);var pn=Hn.diagram.findNodeForData(ui);pn.location=Qr,Hn.diagram.select(pn),setTimeout(()=>{Hn.diagram.commandHandler.editTextBlock()},20)})};return tr(yt.bn,{figure:or,alignment:Qt,alignmentFocus:Qt.opposite(),width:Qt.equals(yt.z6.Top)||Qt.equals(yt.z6.Bottom)?25:18,height:Qt.equals(yt.z6.Top)||Qt.equals(yt.z6.Bottom)?18:25,fill:"orange",stroke:Ot.white,strokeWidth:4,mouseEnter:(Hn,Yr)=>Yr.fill="dodgerblue",mouseLeave:(Hn,Yr)=>Yr.fill="orange",isActionable:!0,click:yr,contextClick:yr})}function Dn(Qt){return tr(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:(or,yr)=>yr.fill="dodgerblue",mouseLeave:(or,yr)=>yr.fill="orange",click:(or,yr)=>{or.diagram.commandHandler.showContextMenu(yr.part.adornedPart)}},Qt||{})}tn.current.nodeTemplate.selectionAdornmentTemplate=tr(yt.uz,"Spot",tr(yt.Vm,{padding:10}),Kt(yt.z6.Top,"TriangleUp"),Kt(yt.z6.Left,"TriangleLeft"),Kt(yt.z6.Right,"TriangleRight"),Kt(yt.z6.Bottom,"TriangleDown"),Dn({alignment:new yt.z6(.75,0)}));function Ln(Qt,or){return(yr,Hn)=>{yr.handled=!0,yr.diagram.model.commit(Yr=>{Yr.set(Hn.part.adornedPart.data,Qt,or)})}}function en(Qt,or){return or||(or="color"),tr(yt.bn,{width:16,height:16,stroke:"lightgray",fill:Qt,margin:1,background:"transparent",mouseEnter:(yr,Hn)=>Hn.stroke="dodgerblue",mouseLeave:(yr,Hn)=>Hn.stroke="lightgray",click:Ln(or,Qt),contextClick:Ln(or,Qt)})}function Un(){return[tr("ContextMenuButton",tr(yt.s_,"Horizontal",en(Ot.white,"fill"),en(Ot.beige,"fill"),en(Ot.extralightblue,"fill"),en(Ot.extralightred,"fill"))),tr("ContextMenuButton",tr(yt.s_,"Horizontal",en(Ot.lightgray,"fill"),en(Ot.lightgreen,"fill"),en(Ot.lightblue,"fill"),en(Ot.lightred,"fill")))]}function Bn(){return[tr("ContextMenuButton",tr(yt.s_,"Horizontal",en(Ot.black),en(Ot.green),en(Ot.blue),en(Ot.red))),tr("ContextMenuButton",tr(yt.s_,"Horizontal",en(Ot.white),en(Ot.magenta),en(Ot.purple),en(Ot.orange)))]}function An(Qt,or){return or||(or="thickness"),tr(yt.bn,"LineH",{width:16,height:16,strokeWidth:Qt,margin:1,background:"transparent",mouseEnter:(yr,Hn)=>Hn.background="dodgerblue",mouseLeave:(yr,Hn)=>Hn.background="transparent",click:Ln(or,Qt),contextClick:Ln(or,Qt)})}function nr(Qt,or){return or||(or="dash"),tr(yt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Qt,margin:1,background:"transparent",mouseEnter:(yr,Hn)=>Hn.background="dodgerblue",mouseLeave:(yr,Hn)=>Hn.background="transparent",click:Ln(or,Qt),contextClick:Ln(or,Qt)})}function _n(){return[tr("ContextMenuButton",tr(yt.s_,"Horizontal",An(1),An(2),An(3),An(4))),tr("ContextMenuButton",tr(yt.s_,"Horizontal",nr(null),nr([2,4]),nr([4,4])))]}function Xn(Qt,or){return or||(or="figure"),tr(yt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Qt,margin:1,background:"transparent",mouseEnter:(yr,Hn)=>Hn.fill="dodgerblue",mouseLeave:(yr,Hn)=>Hn.fill="lightgray",click:Ln(or,Qt),contextClick:Ln(or,Qt)})}tn.current.nodeTemplate.contextMenu=tr("ContextMenu",tr("ContextMenuButton",tr(yt.s_,"Horizontal",Xn("Rectangle"),Xn("RoundedRectangle"),Xn("Ellipse"),Xn("Diamond"))),tr("ContextMenuButton",tr(yt.s_,"Horizontal",Xn("Parallelogram2"),Xn("ManualOperation"),Xn("Procedure"),Xn("Cylinder1"))),tr("ContextMenuButton",tr(yt.s_,"Horizontal",Xn("Terminator"),Xn("CreateRequest"),Xn("Document"),Xn("TriangleDown"))),Un(),Bn(),_n()),tn.current.groupTemplate=tr(yt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:yt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Qt,or)=>{var yr=or.addMembers(or.diagram.selection,!0);yr||or.diagram.currentTool.doCancel()},avoidable:!1},new yt.KX("location","loc",yt.E9.parse).makeTwoWay(yt.E9.stringify),tr(yt.s_,"Auto",{name:"BODY"},tr(yt.bn,{parameter1:10,fill:Ot.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")),tr(yt.Vm,{background:"transparent",margin:20})),tr(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"))),tn.current.groupTemplate.selectionAdornmentTemplate=tr(yt.uz,"Spot",tr(yt.s_,"Auto",tr(yt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),tr(yt.Vm,{margin:1.5})),Dn({alignment:yt.z6.TopRight,alignmentFocus:yt.z6.BottomRight})),tn.current.groupTemplate.contextMenu=tr("ContextMenu",Un(),Bn(),_n()),tn.current.linkTemplate=tr(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",Qt=>Qt>=1?10:0),new yt.KX("toShortLength","dir",Qt=>Qt>=1?10:0),new yt.KX("points").makeTwoWay(),tr(yt.bn,{strokeWidth:2},new yt.KX("stroke","color"),new yt.KX("strokeWidth","thickness"),new yt.KX("strokeDashArray","dash")),tr(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",Qt=>Qt===1)),tr(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",Qt=>Qt>=1),new yt.KX("width","thickness",Qt=>7+3*Qt),new yt.KX("height","thickness",Qt=>7+3*Qt),new yt.KX("segmentOffset","thickness",Qt=>new yt.E9(-15,4+1.5*Qt))),tr(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",Qt=>Qt===2),new yt.KX("width","thickness",Qt=>7+3*Qt),new yt.KX("height","thickness",Qt=>7+3*Qt),new yt.KX("segmentOffset","thickness",Qt=>new yt.E9(-15,4+1.5*Qt))),tr(yt.al,{alignmentFocus:new yt.z6(0,1,-4,0),editable:!0},new yt.KX("text").makeTwoWay(),new yt.KX("stroke","color"))),tn.current.linkTemplate.selectionAdornmentTemplate=tr(yt.uz,tr(yt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:ur(2)},new yt.KX("pathPattern","thickness",ur)),Dn({alignmentFocus:new yt.z6(0,0,-6,-4)}));function ur(Qt){return tr(yt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Qt+4).toString()+" H3"})}function zr(Qt){var or="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Qt===0?or="M0 0 M16 16 M0 8 L16 8":Qt===2&&(or="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),tr(yt.bn,{geometryString:or,margin:2,background:"transparent",mouseEnter:(yr,Hn)=>Hn.background="dodgerblue",mouseLeave:(yr,Hn)=>Hn.background="transparent",click:Ln("dir",Qt),contextClick:Ln("dir",Qt)})}function dr(Qt){var or=(yr,Hn)=>{yr.handled=!0,yr.diagram.model.commit(Yr=>{var Rr=Hn.part.adornedPart;Yr.set(Rr.data,Qt?"toSpot":"fromSpot",yt.z6.stringify(yt.z6.AllSides)),(Qt?Rr.toNode:Rr.fromNode).invalidateConnectedLinks()})};return tr(yt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(yr,Hn)=>Hn.background="dodgerblue",mouseLeave:(yr,Hn)=>Hn.background="transparent",click:or,contextClick:or})}function dn(Qt,or){var yr=0,Hn=yt.z6.RightSide;Qt.equals(yt.z6.Top)?(yr=270,Hn=yt.z6.TopSide):Qt.equals(yt.z6.Left)?(yr=180,Hn=yt.z6.LeftSide):Qt.equals(yt.z6.Bottom)&&(yr=90,Hn=yt.z6.BottomSide),or||(yr-=180);var Yr=(Rr,Zr)=>{Rr.handled=!0,Rr.diagram.model.commit(Qr=>{var ui=Zr.part.adornedPart;Qr.set(ui.data,or?"toSpot":"fromSpot",yt.z6.stringify(Hn)),(or?ui.toNode:ui.fromNode).invalidateConnectedLinks()})};return tr(yt.bn,{alignment:Qt,alignmentFocus:Qt.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:yr,background:"transparent",mouseEnter:(Rr,Zr)=>Zr.background="dodgerblue",mouseLeave:(Rr,Zr)=>Zr.background="transparent",click:Yr,contextClick:Yr})}tn.current.linkTemplate.contextMenu=tr("ContextMenu",Bn(),_n(),tr("ContextMenuButton",tr(yt.s_,"Horizontal",zr(0),zr(1),zr(2))),tr("ContextMenuButton",tr(yt.s_,"Horizontal",tr(yt.s_,"Spot",dr(!1),dn(yt.z6.Top,!1),dn(yt.z6.Left,!1),dn(yt.z6.Right,!1),dn(yt.z6.Bottom,!1)),tr(yt.s_,"Spot",{margin:new yt.Zt(0,0,0,2)},dr(!0),dn(yt.z6.Top,!0),dn(yt.z6.Left,!0),dn(yt.z6.Right,!0),dn(yt.z6.Bottom,!0)))));const $n=`{ "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 Ir=["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 qr(Qt){return console.log("shapeName:",Qt),Ir.indexOf(Qt)>=0}var ki=new yt.YI(gr.current,{maxSelectionCount:1,linkTemplate:tr(yt.rU,{locationSpot:yt.z6.Center,selectionAdornmentTemplate:tr(yt.uz,"Link",{locationSpot:yt.z6.Center},tr(yt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),tr(yt.bn,{toArrow:"Standard",stroke:null}))},{routing:yt.rU.AvoidsNodes,curve:yt.rU.JumpOver,corner:5,toShortLength:4},new yt.KX("points"),tr(yt.bn,{isPanelMain:!0,strokeWidth:2}),tr(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(Qt=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Qt.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return tn.current.addDiagramListener("TextEdited",function(Qt){var or;const yr=Qt.subject.part;var Hn=(or=document.activeElement)==null?void 0:or.value;typeof Hn=="string"&&Hn.trim()===""&&tn.current.model.commit(function(Yr){Yr.set(yr.data,"text","\u672A\u547D\u540D"),tn.current.commandHandler.stopCommand()},"increment")}),ki.nodeTemplate=tr(yt.NB,"Auto",{locationSpot:yt.z6.Center},new yt.KX("location","location",yt.E9.parse).makeTwoWay(yt.E9.stringify),tr(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")),tr(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(()=>{tn.current.grid=tr(yt.s_,"Grid",tr(yt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),tr(yt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),tn.current.grid.visible=!0,tn.current.grid.gridCellStroke="darkgray",tn.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=tn.current,tn.current}const Li=()=>Re(this,null,function*(){var tr,Ot=tn.current.makeImage();const Kt=yield(0,xe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Ot.src,file_data:JSON.stringify({login:(tr=(0,Ze.eY)())==null?void 0:tr.login,data:JSON.parse(tn.current.model.toJson())})}});an({src:Kt.url})});return(0,ct.useEffect)(()=>(setTimeout(()=>{Wr()},500),sr(Mn+1),()=>{tn.current=null}),[]),nt.createElement("div",{ref:ii,className:"body-overflow-initial"},nt.createElement(pt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Mn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:nt.createElement(ft.Z,null,nt.createElement(Ve.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),nt.createElement(Ve.Z,{onClick:()=>{var tr,Ot,Kt=tn.current.selection.first();if(pr.current=!pr.current,document.activeElement&&Kt){let Dn=(Ot=(tr=document.activeElement)==null?void 0:tr.value)==null?void 0:Ot.trim();typeof Dn=="string"&&tn.current.model.commit(function(Ln){Ln.set(Kt.data,"text",Dn||"\u672A\u547D\u540D"),tn.current.commandHandler.stopCommand()},"increment")}sr(Mn+1)}},nt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:on},nt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:pr.current?"none":"block"},className:Le.flowChartWrp},nt.createElement("div",{style:{display:"flex",height:"100%"}},nt.createElement("div",{style:{width:"300px",height:"100%"}},nt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),nt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Le.myPaletteDiv,ref:gr})),nt.createElement("div",{style:{flex:1,position:"relative"}},nt.createElement("div",{ref:vn,style:{height:"80vh"}}))),nt.createElement("div",{className:"tr"},nt.createElement(Ie.ZP,{size:"large",onClick:Li,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var He=_e,Qe=at(47889),ut=at(71051);const gt=Qe.ZP.Group,Mt={margin:"0 8px"};var Nt=({callback:on,onCancel:an})=>{function tn(vn){on(vn)}return ct.createElement(Ne.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:tn},ct.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ct.createElement("span",{style:Mt},"\u5355\u5143\u683C\u6570\uFF1A"),ct.createElement("span",{style:Mt},"\u884C\u6570"),ct.createElement(Ne.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ct.createElement(ut.Z,null)),ct.createElement("span",{style:Mt},"\u5217\u6570"),ct.createElement(Ne.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ct.createElement(ut.Z,null))),ct.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ct.createElement("span",{style:Mt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ct.createElement(Ne.default.Item,{name:"align"},ct.createElement(gt,null,ct.createElement(Qe.ZP,{value:"default"},ct.createElement("i",{className:"fa fa-align-justify"})),ct.createElement(Qe.ZP,{value:"left"},ct.createElement("i",{className:"fa fa-align-left"})),ct.createElement(Qe.ZP,{value:"center"},ct.createElement("i",{className:"fa fa-align-center"})),ct.createElement(Qe.ZP,{value:"right"},ct.createElement("i",{className:"fa fa-align-right"}))))),ct.createElement("div",{className:"flex-container flex-end"},ct.createElement(Ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ct.createElement(Ie.ZP,{type:"ghost",onClick:an},"\u53D6\u6D88")))},Dt=at(71411),Ht=at(43001),Xt=at.n(Ht),Ut=(0,ct.forwardRef)(({use3d:on,width:an,height:tn,callback:vn,showSaveButton:gr},pr)=>{const ii=(0,ct.useRef)(),Mn=(0,ct.useRef)(),[sr,Wr]=(0,ct.useState)(!1),Li=(0,ct.useRef)({id:ii,appName:"graphing",width:an||1e3,height:tn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ct.useEffect)(()=>{Mn.current=new(Xt())(Li.current,!0),window.onload=function(){Mn.current.inject("applet_container")}},[]);const tr=()=>{var Ot=window.ggbApplet.getPNGBase64(1,!0,72);return vn&&vn(Ot),Ot};return(0,ct.useEffect)(()=>{Li.current.appName=sr?"3D":"graphing",Mn.current.inject("applet_container")},[sr]),(0,ct.useEffect)(()=>{Wr(on)},[on]),(0,ct.useImperativeHandle)(pr,()=>({getImgData:tr})),ct.createElement(ct.Fragment,null,ct.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ii}),ct.createElement(ft.Z,{align:"middle"},ct.createElement(Ve.Z,{flex:1},ct.createElement(Dt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:sr,onChange:Ot=>Wr(Ot)})),ct.createElement(Ve.Z,null,ct.createElement(Ie.ZP,{size:"large",onClick:tr,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),sn=at(76562),nn=at(6767);const Wt="link",bn="upload-image",mn="add-flowchart",jn="draw-image",Jn="add-flowchart",Cr="code-block",cr="add-table",kr="------------",Kr={default:kr,left:`:${kr}`,center:`:${kr}:`,right:`${kr}:`};var Ur=at(37808);function oi(){}let vi=0;const Bi=1e4,Di="\u2581",Ii="@\u2581\u2581@",Xi="@\u2581@",et=`
**\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`,fr=["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 mr(on){return/^\d+$/.test(on)?`${on}px`:on}const ar=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Sr={[ar+"-B"]:"bold",[ar+"-I"]:"italic"},Ar={[Wt]:"\u6DFB\u52A0\u94FE\u63A5",[Cr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[bn]:"\u6DFB\u52A0\u56FE\u7247",[jn]:"\u6DFB\u52A0\u753B\u56FE",[mn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[cr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var lo=({defaultValue:on="",onChange:an,width:tn="100%",height:vn=400,miniToolbar:gr=!1,isFocus:pr=!1,watch:ii,insertTemp:Mn,mode:sr="markdown",id:Wr="markdown-editor-id",showResizeBar:Li=!1,noStorage:tr=!1,showNullButton:Ot=!1,showNullProgramButton:Kt=!1,hidetoolBar:Dn=!1,fullScreen:Ln=!1,onBlur:en,onCMBeforeChange:Un,onFullScreen:Bn,className:An="",disablePaste:nr=!1,disabled:_n=!1,disabledFill:Xn=!1,placeholder:ur="",values:zr="",extraUse:dr})=>{const[dn,$n]=(0,ct.useState)(null),[Ir,qr]=(0,ct.useState)(on),[ki,Qt]=(0,ct.useState)(ii),[or,yr]=(0,ct.useState)(Ln),[Hn,Yr]=(0,ct.useState)(""),[Rr,Zr]=(0,ct.useState)(0),[Qr,ui]=(0,ct.useState)(vn),[Pi,pn]=(0,ct.useState)(!1),[Oi,yn]=(0,ct.useState)(0),[xr,hi]=(0,ct.useState)(0),ei=(0,ct.useRef)(),Wi=(0,ct.useRef)(),ci=(0,ct.useRef)(),Vr=(0,ct.useRef)();(0,ct.useEffect)(()=>{const Nn=window.scrollY||window.pageYOffset;qr(zr),dn==null||dn.setValue(zr),window.scrollTo(0,Nn)},[zr]),(0,ct.useEffect)(()=>{Bn==null||Bn(or)},[or]),(0,ct.useEffect)(()=>{if(ei.current){let Nn=function(Wn,ln){var br;if(nr){ln.preventDefault();return}const Er=ln.clipboardData;if(Er){const ai=Er.types.toString(),Tr=Er.items;if(ai==="Files"||Er.types.indexOf("Files")>-1){if(ln.preventDefault(),sr=="stex")return;try{let Si=Tr[1];((br=Tr[0])==null?void 0:br.kind)==="file"&&(Si=Tr[0]);const pi=Si.getAsFile(),bi=pi.name.split(".").pop();(0,wt.I)(pi,yi=>{var Ri,Ki,Jt;yi.id?((Ri=pi==null?void 0:pi.type)==null?void 0:Ri.indexOf("image"))>-1?Zn.replaceSelection(`<img width="100%" src="/api/attachments/${yi.id}?type=${yi.content_type})" alt="" />`):((Ki=pi==null?void 0:pi.type)==null?void 0:Ki.indexOf("video"))>-1?Zn.replaceSelection(`<video width="100%" controls src="/api/attachments/${yi.id}"></video>`):((Jt=pi==null?void 0:pi.type)==null?void 0:Jt.indexOf("pdf"))>-1?Zn.replaceSelection(`<a href="/api/attachments/${yi.id}?type=${pi.type}&disposition=inline" target="_blank">${pi.name}</a>`):fr.includes(bi)?Zn.replaceSelection(`<a href="/api/attachments/${yi.id}?type=office&disposition=inline" target="_blank">${pi.name}</a>`):Zn.replaceSelection(`[${pi.name}](/api/attachments/${yi.id}?type=${yi.content_type})`):(yi==null?void 0:yi.status)===401&&(document.location.href="/user/login")})}catch(Si){nn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Zn=oe().fromTextArea(ei.current,{mode:sr,lineNumbers:!gr,lineWrapping:!0,value:on,autoCloseTags:!0,autoCloseBrackets:!0});return Zn.on("keyup",function(Wn,ln){ln.keyCode===8&&(Wn.getValue()==""?Zn.setOption("placeholder",ur):Zn.setOption("placeholder",null))}),Zn.on("keydown",function(Wn,ln){if(ln.keyCode===8){var br=qt(Wn);br&&ln.preventDefault()}}),pr&&Zn.focus(),Zn.on("paste",Nn),_n&&Zn.on("beforeChange",function(Wn,ln){(ln.origin==="paste"||ln.origin==="+input")&&ln.cancel()}),$n(Zn),()=>{Zn.off("paste",Nn)}}},[]);const Hi=(0,ct.useCallback)(()=>{if(Wi.current)try{}catch(Nn){console.log(Nn,"---- to set md editor body height")}},[Qr,Wi,or]);(0,ct.useEffect)(()=>{function Nn(){let Zn=new ze.Z(Wn=>{for(let ln of Wn)(ln.target.offsetHeight>0||ln.target.offsetWidth>0)&&(Hi(),dn.setSize("100%","100%"),dn.refresh())});return Zn.observe(ei.current.parentElement),Zn}if(dn){const Zn=Nn();return()=>{var Wn,ln;(Wn=ei.current)!=null&&Wn.parentElement&&Zn.unobserve((ln=ei.current)==null?void 0:ln.parentElement)}}},[dn,Hi]),(0,ct.useEffect)(()=>{if(dn){let Nn=[];for(const[Zn,Wn]of Object.entries(Sr)){let ln={[Zn]:()=>{wn(Wn)}};Nn.push(ln),dn.addKeyMap(ln)}return()=>{for(let Zn of Nn)dn.removeKeyMap(Zn)}}},[dn]),(0,ct.useEffect)(()=>{Ln!==or&&yr(Ln)},[Ln]),(0,Ur.Z)(()=>{if(!tr&&Rr>0){let Nn=new Date().getTime(),Zn=window.sessionStorage.getItem(Wr);Nn>=Rr+Bi&&(!Zn||Zn!==Ir)&&(window.sessionStorage.setItem(Wr,Ir),pn(!0))}},Bi),(0,ct.useEffect)(()=>{Qt(ii)},[dn,ii]),(0,ct.useEffect)(()=>{dn&&pr&&dn.focus()},[dn,pr]),(0,ct.useEffect)(()=>{if(ki&&dn){let Nn=function(Wn){let ln=Wn.target;if(Vr.current){let br=ln.scrollTop/ln.scrollHeight;Vr.current.scrollTop=Vr.current.scrollHeight*br}};const Zn=dn.getScrollerElement();return Zn.addEventListener("scroll",Nn),()=>{Zn.removeEventListener("scroll",Nn)}}},[dn,ki]),(0,ct.useEffect)(()=>{if(dn&&Un){let Nn=function(Zn,Wn){Un(Zn,Wn)};return dn.on("beforeChange",Nn),()=>{dn.off("beforeChange",Nn)}}},[dn,Un]),(0,ct.useEffect)(()=>{if(dn&&en){let Nn=function(){en(dn.getValue())};return dn.on("blur",Nn),()=>{dn.off("blur",Nn)}}},[dn,en]);function qt(Nn,Zn){var Wn=Nn.getDoc(),ln=Wn.getCursor(),br=Wn.getLine(ln.line),Er=br.charAt(ln.ch-1),ai=br.lastIndexOf("@\u2581@",ln.ch),Tr=br.lastIndexOf("@\u2581\u2581@",ln.ch),Si=ai>Tr?ai:Tr,pi=ai>Tr?3:4;if(Ii.indexOf(Er)===-1)return null;if(console.log("change1:",Zn,Nn,br,ln,Si,ai,Tr,Er),Si>=0&&ln.ch-Si<5){var bi=Si+pi;return Wn.replaceRange("",{line:ln.line,ch:Si},{line:ln.line,ch:bi}),{line:ln.line,ch:bi}}return null}(0,ct.useEffect)(()=>{if(dn){let Nn=function(Zn,Wn){const ln=Zn.getValue();qr(ln),Zr(new Date().getTime()),Zn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),an&&(Kt?an(ln,un(ln)):an(ln))};return dn.on("change",Nn),()=>{dn.off("change",Nn)}}},[dn,an]),(0,ct.useEffect)(()=>{if(dn)if(on==null)dn.setValue(""),qr("");else{const Nn=window.scrollY||window.pageYOffset;on!==dn.getValue()&&(dn.setValue(on),qr(on),dn.setCursor(_n?1:dn.lineCount(),0),window.scrollTo(0,Nn))}},[dn,on]);const wn=(0,ct.useCallback)(Nn=>{const Zn=dn.getCursor(),Wn=dn.getSelection();let ln=Wn.split(`
`);switch(Nn){case"bold":return dn.replaceSelection("**"+Wn+"**"),Wn===""&&dn.setCursor(Zn.line,Zn.ch+2),dn.focus();case"italic":return dn.replaceSelection("*"+Wn+"*"),Wn===""&&dn.setCursor(Zn.line,Zn.ch+1),dn.focus();case"code":return dn.replaceSelection("`"+Wn+"`"),Wn===""&&dn.setCursor(Zn.line,Zn.ch+1),dn.focus();case"inline-latex":return Yr("inline-latex"),dn.focus();case"latex":return dn.replaceSelection("```latex\n"+Wn+"\n```"),dn.setCursor(Zn.line+1,Wn.length+1),dn.focus();case"line-break":return dn.replaceSelection(`<br/>
`),dn.focus();case"list-ul":return Wn===""?dn.replaceSelection("- "+Wn):dn.replaceSelection(ln.map(br=>br===""?"":`- ${br}`).join(`
`)),dn.focus();case"list-ol":return Wn===""?dn.replaceSelection("1. "+Wn):dn.replaceSelection(ln.map((br,Er)=>br===""?"":`${Er+1}. ${br}`).join(`
`)),dn.focus();case"add-null-ch":return Wn===""&&dn.setCursor(Zn.line,Zn.ch),dn.replaceSelection(Di),dn.focus();case"add-signal":return Wn===""&&dn.setCursor(Zn.line,Zn.ch),dn.replaceSelection(Xi),dn.focus();case"add-multiple":return Wn===""&&dn.setCursor(Zn.line,Zn.ch),dn.replaceSelection(Ii),dn.focus();case"inster-template-1":return Wn===""&&dn.setCursor(Zn.line,Zn.ch),dn.replaceSelection(et),dn.focus();case"eraser":return dn.setValue(""),dn.focus();case"trigger-watch":return Qt(!ki),dn.focus();case"trigger-full-screen":return yr(!or),dn.focus();case Wt:Yr(Wt);return;case Cr:Yr(Cr);return;case bn:Yr(bn);return;case jn:Yr(jn);return;case"maths-latex":Yr("maths-latex");return;case mn:Yr(mn);return;case cr:Yr(cr);return;default:throw new Error}},[dn,ki,or]),Yt=(0,ct.useCallback)((Nn,Zn)=>{var Wn,ln,br,Er,ai,Tr;switch(Yr(""),Hn){case Wt:const{title:Ri,link:Ki}=Nn;return dn.replaceSelection(`[${Ri}](${Ki})`),dn.focus();case Cr:const{language:Jt,content:xi}=Nn;return dn.replaceSelection(["```"+Jt,xi,"```"].join(`
`)),dn.focus();case"maths-latex":for(var Si=atob(Nn),pi=new Uint8Array(Si.length),bi=0;bi<Si.length;bi++)pi[bi]=Si.charCodeAt(bi);var yi=new Blob([pi],{type:"image/png"});(0,wt.I)(yi,_o=>{_o.id?dn.replaceSelection(`![,](/api/attachments/${_o.id}?type=${_o.content_type})`):(_o==null?void 0:_o.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":dn.replaceSelection("`$$"+Nn+"$$`");break;case bn:case jn:case Jn:const{src:ti,alt:Hr}=Nn,Dr=Zn,wi=(br=(ln=(Wn=Dr==null?void 0:Dr.name)==null?void 0:Wn.split("."))==null?void 0:ln.pop)==null?void 0:br.call(ln);return((Er=Dr==null?void 0:Dr.type)==null?void 0:Er.indexOf("image"))>-1||!(Dr!=null&&Dr.type)?Dr!=null&&Dr.align||Dr!=null&&Dr.width?dn.replaceSelection(`<p style="text-align:${Dr.align||"initial"}"><img width="${Dr.width?Dr.width+"%":"initial"}" src="${ti}" alt="${Hr||""}" /></p>`):dn.replaceSelection(`<img width="100%" src="${ti}" alt="${Hr||""}" />`):((ai=Dr==null?void 0:Dr.type)==null?void 0:ai.indexOf("video"))>-1?dn.replaceSelection(`<video width="100%" controls src="${ti}"></video>`):((Tr=Dr==null?void 0:Dr.type)==null?void 0:Tr.indexOf("pdf"))>-1?dn.replaceSelection(`<a href="${ti}?type=${Dr.type}&disposition=inline" target="_blank">${Dr.name}</a>`):fr.includes(wi)?dn.replaceSelection(`<a href="${ti}?type=office&disposition=inline" target="_blank">${Dr.name}</a>`):dn.replaceSelection(`[${Dr.name}](${ti})`),dn.focus();case cr:const{row:_i,col:Fi,align:ni}=Nn;let $i=`
`;for(let _o=0;_o<_i;_o++){let fa=[],Ps=[];for(let wa=0;wa<Fi;wa++)_o===1&&Ps.push(Kr[ni]),fa.push(" ");_o===1&&($i+=`| ${Ps.join(" | ")} |
`),$i+=`| ${fa.join(Fi===1?"":" | ")} |
`}return dn.replaceSelection($i+`
`),dn.focus();default:throw new Error}},[dn,Hn]),lt=(0,ct.useMemo)(()=>{switch(Hn){case Wt:return ct.createElement(St,{callback:Yt,onCancel:On});case Cr:return ct.createElement(Pt.Z,{callback:Yt,onCancel:On});case bn:return ct.createElement(wt.Z,{callback:Yt,onCancel:On});case mn:return ct.createElement(He,{callback:Yt,onCancel:On});case cr:return ct.createElement(Nt,{callback:Yt,onCancel:On});case"maths-latex":return ct.createElement(Ut,{showSaveButton:!0,callback:Yt});case"inline-latex":return ct.createElement(sn.Z,{showSaveButton:!0,callback:Yt});default:return null}},[Hn]);function On(){Yr("")}(0,ct.useEffect)(()=>{if(ci.current){let Nn=function(ai){br=!0,Er=ai.pageY},Zn=function(){br=!1},Wn=function(ai){if(br){let Tr=ai.pageY-Er;Tr<0&&(Tr=0),Tr>300&&(Tr=300);let Si=vn+Tr+"px";ui(Si)}},ln=ci.current,br=!1,Er=0;return ln.addEventListener("mousedown",Nn),document.addEventListener("mousemove",Wn),document.addEventListener("mouseup",Zn),()=>{ln.removeEventListener("mousedown",Nn),document.removeEventListener("mousemove",Wn),document.removeEventListener("mouseup",Zn)}}},[dn,ci]),(0,ct.useEffect)(()=>{ui(vn)},[vn]);const Sn=mr(tn),Kn=mr(Qr),Qn={width:Sn,height:Kn},Vn=(0,ct.useMemo)(()=>{if(Rr){let Nn=new Date(Rr),Zn=Nn.getHours(),Wn=Nn.getMinutes(),ln=Nn.getSeconds();return Zn=Zn<10?"0"+Zn:Zn,Wn=Wn<10?"0"+Wn:Wn,ln=ln<10?"0"+ln:ln,`${Zn}:${Wn}:${ln}`}return 0},[Rr]),un=Nn=>{const Zn=[];if(Kt){let Wn=-1;Nn=Nn.replace(/(@▁▁@|@▁@)/g,function(ln,br,Er){Zn.push({multiLine:ln!==Xi})})}return Zn};function Fn(){window.sessionStorage.removeItem(Wr),pn(!1),Zr(0)}function zn(){pn(!1),Zr(0),dn.setValue(window.sessionStorage.getItem(Wr))}(0,ct.useEffect)(()=>{Ar[Hn]&&Hn!==jn&&Hn!==mn&&setTimeout(()=>{const Nn=document.getElementsByClassName("markdown-popup-form")[0],Zn=window.innerWidth/2-Nn.offsetWidth/2,Wn=window.innerHeight/2-Nn.offsetHeight/2;yn(Zn),hi(Wn)},0)},[Hn]);const Tn=Nn=>{Nn.preventDefault();const Zn=Nn.clientX-Oi,Wn=Nn.clientY-xr;document.body.onmousemove=ln=>{let br=ln.clientX-Zn,Er=ln.clientY-Wn;const ai=document.getElementsByClassName("markdown-popup-form")[0],Tr=window.innerWidth-ai.offsetWidth,Si=window.innerHeight-ai.offsetHeight;br=Math.max(0,Math.min(br,Tr)),Er=Math.max(0,Math.min(Er,Si)),In(ln.clientX,ln.clientY,Zn,Wn)&&(yn(br),hi(Er))},document.body.onmouseup=function(){document.body.onmousemove=null}},In=(Nn,Zn,Wn,ln)=>{const br=document.body.clientHeight,Er=document.body.clientWidth;return Nn<20&&Wn>Nn||Nn>Er-20&&Wn<Nn||Zn<20&&ln>Zn||Zn>br-20&&ln<Zn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ct.createElement(ct.Fragment,null,ct.createElement("div",{className:"markdown-editor-wrapper",ref:Wi},ct.createElement("div",{className:`markdown-editor-container ${An} ${ki?"on-preview":""} ${gr?"mini":""} ${or?"full-screen":""}`,style:Qn},ct.createElement(Be,{insertTemp:Mn,watch:ki,fullScreen:or,showNullButton:Ot,showNullProgramButton:Kt,onActionCallback:wn,hidetoolBar:Dn,extraUse:dr}),ct.createElement("div",{className:"markdown-editor-body"},ct.createElement("div",{className:"codemirror-container"},ct.createElement("textarea",{ref:ei,placeholder:ur})),ki?ct.createElement("div",{ref:Vr,className:"preview-container"},sr==="stex"&&ct.createElement(ve,{value:Ir}),sr!=="stex"&&ct.createElement(Me.Z,{disabledFill:Xn,showProgramFill:Kt,value:Ir})):null))),Li?ct.createElement("a",{ref:ci,className:"editor-resize"}):null,Hn===jn&&ct.createElement(mt,{callback:Yt,onCancel:On}),Hn===mn&&ct.createElement(He,{callback:Yt,onCancel:On}),ct.createElement(Fe.Z,null,Ar[Hn]&&Hn!==jn&&Hn!==mn?ct.createElement(pt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Oi,top:xr},title:ct.createElement("div",{style:{cursor:"move"},onMouseDown:Tn},Ar[Hn]),open:!0,onCancel:On,footer:null,destroyOnClose:!0,width:Hn===mn?"1200px":null,height:Hn===mn?"80vh":null,className:"markdown-popup-form"},lt):null))}},17077:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return je},I:function(){return Fe}});var ct=at(28284),Bt=at(6767),oe=at(37568),ze=at(77736),De=at(71051),fe=at(47889),me=at(99571),ke=at(46699),Ce=at(59301),Se=at(59301),Me=Object.defineProperty,ve=Object.defineProperties,we=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Ne,Ae,Ie)=>Ae in Ne?Me(Ne,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Ne[Ae]=Ie,ie=(Ne,Ae)=>{for(var Ie in Ae||(Ae={}))z.call(Ae,Ie)&&ae(Ne,Ie,Ae[Ie]);if(de)for(var Ie of de(Ae))ee.call(Ae,Ie)&&ae(Ne,Ie,Ae[Ie]);return Ne},le=(Ne,Ae)=>ve(Ne,we(Ae));const{useForm:ue}=ct.default,ge={width:280,marginRight:10},Pe={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Ne,onCancel:Ae})=>{const[Ie]=ue();let We=(0,Ce.useRef)();function Ye(ot){We.current.width=Ie.getFieldValue("width"),We.current.align=Ie.getFieldValue("align"),Ne(ot,We.current)}function Ue(ot,st){if(ot.status===-1){Bt.ZP.error(ot.message);return}Ie.setFieldsValue({src:`/api/attachments/${ot.id}`,type:st.type})}function Ke(ot){let st=ot.target.files[0];We.current=st,Fe(st,Ue)}return Se.createElement(ct.default,le(ie({form:Ie},Pe),{className:"upload-image-panel",onFinish:Ye,style:{width:470,overflow:"hidden"}}),Se.createElement(ct.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Se.createElement("div",{className:"flex-container"},Se.createElement(ct.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Se.createElement(oe.default,{style:ge})),Se.createElement(Be,{onFileChange:Ke}))),Se.createElement(ct.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Se.createElement(oe.default,{style:{width:264}})),Se.createElement(ct.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Se.createElement(ze.Z,null,Se.createElement(ct.default.Item,{name:"width",style:{margin:0}},Se.createElement(De.Z,{style:{width:264}})),Se.createElement("span",{className:"ml8"},"%"))),Se.createElement(ct.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Se.createElement(fe.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"}]})),Se.createElement("aside",null,Se.createElement(ct.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Se.createElement(me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Se.createElement(me.ZP,{type:"default",onClick:Ae},"\u53D6\u6D88"))))};function Be({onFileChange:Ne}){return Se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Se.createElement("input",{type:"file",onChange:Ne}))}function Fe(Ne,Ae){if(!Ne)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ie=new FormData;Ie.append("editormd-image-file",Ne),Ie.append("file_param_name","editormd-image-file"),Ie.append("byxhr","true");var We=new window.XMLHttpRequest;We.withCredentials=!0,We.addEventListener("load",function(Ye){Ae(JSON.parse(Ye.target.responseText),Ne)},!1),We.addEventListener("error",function(Ye){console.error(Ye)},!1),We.open("POST",`${ke.KI}/api/attachments.json`),We.send(Ie)}},91558:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return oe}});var ct=at(59301),Bt=at(4676);class oe extends ct.Component{constructor(De){super(De);const fe=window.document;this.node=fe.createElement("div"),fe.body.appendChild(this.node)}render(){const{children:De}=this.props;return(0,Bt.createPortal)(De,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(gn,cn,at){"use strict";at.d(cn,{SV:function(){return He},ZP:function(){return _e}});var ct=at(59301),Bt=at(76374);const oe={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"]},ze={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},De={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},fe={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(`
`)}]},me={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 ke=at(53184),Ce=at.n(ke),Se=Object.defineProperty,Me=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(Qe,ut,gt)=>ut in Qe?Se(Qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Qe[ut]=gt,ae=(Qe,ut)=>{for(var gt in ut||(ut={}))de.call(ut,gt)&&ee(Qe,gt,ut[gt]);if(we)for(var gt of we(ut))z.call(ut,gt)&&ee(Qe,gt,ut[gt]);return Qe},ie=(Qe,ut)=>Me(Qe,ve(ut)),le=(Qe,ut,gt)=>new Promise((Mt,Nt)=>{var Dt=$t=>{try{Xt(gt.next($t))}catch(Ut){Nt(Ut)}},Ht=$t=>{try{Xt(gt.throw($t))}catch(Ut){Nt(Ut)}},Xt=$t=>$t.done?Mt($t.value):Promise.resolve($t.value).then(Dt,Ht);Xt((gt=gt.apply(Qe,ut)).next())});const ue={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"]}},ge=(Qe,ut)=>ut.map(gt=>({label:gt,kind:Qe.languages.CompletionItemKind.Keyword,insertText:gt})),Pe=Qe=>Object.keys(ue.tables).map(ut=>({label:ut,kind:Qe.languages.CompletionItemKind.Variable,insertText:ut})),je=(Qe,ut)=>{const gt=ue.tables[Qe];return gt?gt.map(Mt=>({label:Mt,kind:ut.languages.CompletionItemKind.Field,insertText:Mt})):[]};function Be(Qe,ut,gt,Mt,Nt){let Dt=ut.getWordUntilPosition(gt),Ht={startLineNumber:gt.lineNumber,endLineNumber:gt.lineNumber,startColumn:Dt.startColumn,endColumn:Dt.endColumn},Xt=Mt.map($t=>({label:$t,kind:Qe.languages.CompletionItemKind.Keyword,insertText:$t,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ht}));return Nt.map($t=>{Xt.push(ie(ae({},$t),{range:Ht}))}),Xt}var Fe=Qe=>{ue.languages.map(Nt=>(Qe.languages.registerDocumentFormattingEditProvider(Nt,{provideDocumentFormattingEdits(Dt,Ht,Xt){return le(this,null,function*(){const $t=Ce()(Dt.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:Dt.getFullModelRange(),text:$t}]})}}),Nt));const ut=De.quickKey.map(Nt=>({label:Nt.label,kind:Qe.languages.CompletionItemKind.Method,insertText:Nt.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),gt=fe.quickKey.map(Nt=>({label:Nt.label,kind:Qe.languages.CompletionItemKind.Method,insertText:Nt.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Mt=ze.quickKey.map(Nt=>({label:Nt.label,kind:Qe.languages.CompletionItemKind.Method,insertText:Nt.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Qe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Nt,Dt){var Ht=Nt.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Ht.startColumn,endColumn:Ht.endColumn},$t=Nt.getLineContent(Dt.lineNumber).substring(Ht.startColumn-2,Ht.endColumn);return{suggestions:[...De.keywords.map(Ut=>({label:Ut,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut,insertText:Ut,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt})),...De.quickKey.map(Ut=>({label:Ut.label,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut.content,insertText:$t.startsWith("#")?Ut.content.replace(/#/,""):Ut.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}}),Qe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Nt,Dt){var Ht=Nt.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Ht.startColumn,endColumn:Ht.endColumn};return{suggestions:[...oe.keywords.map($t=>({label:$t,kind:Qe.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}}),Qe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Nt,Dt){var Ht=Nt.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Ht.startColumn,endColumn:Ht.endColumn},$t=Nt.getLineContent(Dt.lineNumber).substring(Ht.startColumn-2,Ht.endColumn);return{suggestions:[...ze.keywords.map(Ut=>({label:Ut,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut,insertText:Ut,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt})),...ze.quickKey.map(Ut=>({label:Ut.label,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut.content,insertText:$t.startsWith("#")?Ut.content.replace(/#/,""):Ut.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}}),Qe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Nt,Dt){var Ht=Nt.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Ht.startColumn,endColumn:Ht.endColumn},$t=Nt.getLineContent(Dt.lineNumber).substring(Ht.startColumn-2,Ht.endColumn);return{suggestions:[...me.keywords.map(Ut=>({label:Ut,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut,insertText:Ut,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt})),...me.quickKey.map(Ut=>({label:Ut.label,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut.content,insertText:$t.startsWith("#")?Ut.content.replace(/#/,""):Ut.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}}),Qe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Nt,Dt){var Ht=Nt.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Ht.startColumn,endColumn:Ht.endColumn},$t=Nt.getLineContent(Dt.lineNumber).substring(Ht.startColumn-2,Ht.endColumn);return{suggestions:[...fe.keywords.map(Ut=>({label:Ut,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut,insertText:Ut,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt})),...fe.quickKey.map(Ut=>({label:Ut.label,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut.content,insertText:$t.startsWith("#")?Ut.content.replace(/#/,""):Ut.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}})};const Ne="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ae=Object.defineProperty,Ie=(Qe,ut,gt)=>ut in Qe?Ae(Qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Qe[ut]=gt,We=(Qe,ut,gt)=>Ie(Qe,typeof ut!="symbol"?ut+"":ut,gt);const Ye=class mx{constructor(ut,gt,Mt){this.placeholder=ut,this.editor=gt,this.monaco=Mt,gt.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)}};We(Ye,"ID","editor.widget.placeholderHint");var Ke=Ye,ot=at(96236),st=at(6767),dt=at(25399),Ct=at(89392),$e=at(49535),rt=at(56102),St=Object.defineProperty,Pt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,Et=(Qe,ut,gt)=>ut in Qe?St(Qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:gt}):Qe[ut]=gt,mt=(Qe,ut)=>{for(var gt in ut||(ut={}))ft.call(ut,gt)&&Et(Qe,gt,ut[gt]);if(pt)for(var gt of pt(ut))ht.call(ut,gt)&&Et(Qe,gt,ut[gt]);return Qe},yt=(Qe,ut)=>Pt(Qe,wt(ut)),At=(Qe,ut)=>{var gt={};for(var Mt in Qe)ft.call(Qe,Mt)&&ut.indexOf(Mt)<0&&(gt[Mt]=Qe[Mt]);if(Qe!=null&&pt)for(var Mt of pt(Qe))ut.indexOf(Mt)<0&&ht.call(Qe,Mt)&&(gt[Mt]=Qe[Mt]);return gt},xt=(Qe,ut,gt)=>new Promise((Mt,Nt)=>{var Dt=$t=>{try{Xt(gt.next($t))}catch(Ut){Nt(Ut)}},Ht=$t=>{try{Xt(gt.throw($t))}catch(Ut){Nt(Ut)}},Xt=$t=>$t.done?Mt($t.value):Promise.resolve($t.value).then(Dt,Ht);Xt((gt=gt.apply(Qe,ut)).next())});function tt(Qe){return/^\d+$/.test(Qe)?`${Qe}px`:Qe}function Ve(){}let xe=!1;const Le={"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 Ze(Qe=[]){let ut=Qe;if(Array.isArray(Qe)){for(let gt=0;gt<Qe.length;gt++){let Mt=Le[Qe[gt]];if(Mt)return Mt}return ut[0]}return Le[ut]||ut}let nt=null;const Re=()=>xt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Qe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Qe)}});var _e=Qe=>{var ut=Qe,{width:gt="100%",height:Mt="100%",value:Nt,language:Dt="javascript",style:Ht={},options:Xt={},overrideServices:$t={},theme:Ut="vs-dark",onEditBlur:sn,isCopy:nn=!1,onSave:Wt,autoHeight:bn=!1,forbidCopy:mn=!1,onChange:jn=Ve,editorDidMount:Jn=Ve,onFocus:Cr=Ve,onBreakPoint:cr=Ve,breakPointValue:kr=[],filename:Kr="educoder.txt",errorLine:Ur,errorContent:oi="",highlightLine:vi,openBreakPoint:Bi=!1,placeholder:Di="",showMiniMap:Ii=!0}=ut,Xi=At(ut,["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 et=(0,ct.useRef)(),fr=(0,ct.useRef)({}),mr=(0,ct.useRef)(),Ai=(0,ct.useRef)(),ar=(0,ct.useRef)([]),Sr=(0,ct.useRef)(!1),Ar=(0,ct.useRef)(),lo=(0,ct.useRef)(),on=(0,ct.useRef)(!1),[an,tn]=(0,ct.useState)(!1);function vn(){let Bn;return et.current&&(Bn=new Bt.Z(An=>{for(let nr of An)(nr.target.offsetHeight>0||nr.target.offsetWidth>0)&&fr.current.instance.layout()}),Bn.observe(et.current)),Bn}function gr(){st.ZP.warning({content:decodeURIComponent(Ne),key:"monaco-editor-tip"})}const pr=()=>{let Bn=fr.current.instance;if(Nt!=null&&Bn&&an){const An=Bn.getModel();An&&Nt!==An.getValue()&&(xe=!0,An.setValue(Nt),Bn.layout(),xe=!1)}};(0,ct.useEffect)(()=>{const Bn=$e.Z.subscribe("formatDocument",An=>{var nr;let _n=fr.current.instance;(nr=_n==null?void 0:_n.getAction)==null||nr.call(_n,"editor.action.formatDocument").run()});return window.updateMonacoValue=An=>{jn(An)},Bn},[]),(0,ct.useEffect)(()=>{var Bn;let An=fr.current.instance;Ai.current&&clearTimeout(Ai.current),Ai.current=setTimeout(()=>{pr()},500),Nt&&(Nt!=null&&Nt.length)&&((Bn=An==null?void 0:An.updateOptions)==null||Bn.call(An,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Nt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Nt,an,fr.current]),(0,ct.useEffect)(()=>{if(Ur&&fr.current&&fr.current.instance){let An=fr.current.instance;An.changeViewZones(function(nr){var _n=document.createElement("div");_n.style.padding="10px 20px",_n.style.width="calc(100% - 20px)",_n.className="my-error-line-wrp",_n.innerHTML=oi,nr.addZone({afterLineNumber:Ur||11,heightInLines:3,domNode:_n})});var Bn={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}};An.addOverlayWidget(Bn),An.revealPositionInCenter({lineNumber:20,column:1})}},[Ur,fr.current,an]);const ii=(Bn="",An)=>{if(!Bn||Bn.trim()==="")return!0;const _n=fr.current.instance.getModel().getLineTokens(An);let Xn=!1;for(let ur=0;ur<2;ur++)_n.getStandardTokenType(ur)===1&&(Xn=!0);return Xn};(0,ct.useEffect)(()=>{var Bn;const An=(Bn=fr.current)==null?void 0:Bn.instance;if(An&&an&&mn){const nr=An.onDidBlurEditorWidget(()=>{on.current=!1}),_n=An.onDidFocusEditorText(()=>{on.current=!0});return()=>{nr.dispose(),_n.dispose()}}},[fr.current,an,mn]),(0,ct.useEffect)(()=>{var Bn;if((Bn=fr.current)!=null&&Bn.instance&&an&&Bi){let An=fr.current.instance,nr=An.getModel();if(!nr)return;(()=>{var or;let yr=[],Hn=[];const Yr=nr.getAllDecorations();for(let Zr of Yr)Zr.options.className==="highlighted-line"&&(yr.push((or=Zr==null?void 0:Zr.range)==null?void 0:or.startLineNumber),Hn.push(Zr==null?void 0:Zr.id));if(vi===yr[0])return;nr.deltaDecorations(Hn,[]);const Rr=nr.getLineCount();vi&&vi<=Rr&&(An.deltaDecorations([],[{range:new nt.Range(vi,1,vi,nr.getLineMaxColumn(vi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),An.revealLineInCenter(vi))})();const Xn=(or=!1)=>{var yr;let Hn=[],Yr=[];const Rr=nr.getAllDecorations();for(let Zr of Rr)Zr.options.linesDecorationsClassName==="breakpoints-select"&&(Hn.push((yr=Zr==null?void 0:Zr.range)==null?void 0:yr.startLineNumber),Yr.push(Zr==null?void 0:Zr.id));if(or)return{lines:Hn,ids:Yr};cr(Hn)},ur=or=>xt(void 0,null,function*(){let yr={range:new nt.Range(or,1,or,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield nr.deltaDecorations([],[yr]),Xn()}),zr=or=>xt(void 0,null,function*(){let yr=[];const Hn=An.getLineDecorations(or);for(let Yr of Hn)Yr.options.linesDecorationsClassName==="breakpoints-select"&&yr.push(Yr.id);yield nr.deltaDecorations(yr,[]),Xn()}),dr=or=>{let yr=An.getLineDecorations(or);for(let Hn of yr)if(Hn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ct.isEqual)(kr,Xn(!0).lines)){nr.deltaDecorations(Xn(!0).ids,[]);const or=kr.map(yr=>({range:new nt.Range(yr,1,yr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));nr.deltaDecorations([],or)}const dn=An.onDidChangeModelContent(or=>{let yr=An.getPosition();if(yr){let Hn=yr.lineNumber;clearTimeout(lo.current),lo.current=setTimeout(()=>{ii(nr.getLineContent(Hn),Hn)?zr(Hn):dr(Hn)?(zr(Hn),ur(Hn)):Xn()},100)}}),$n=An.onMouseDown(or=>{var yr,Hn,Yr;if(or.target.detail&&((Yr=(Hn=(yr=or.target)==null?void 0:yr.element)==null?void 0:Hn.className)!=null&&Yr.includes("line-numbers"))){let Rr=or.target.position.lineNumber;if(ii(nr.getLineContent(Rr),Rr))return;dr(Rr)?zr(Rr):ur(Rr)}}),Ir=or=>{let yr={range:new nt.Range(or,1,or,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ar.current=An.deltaDecorations(ar.current,[yr])},qr=()=>{ar.current=An.deltaDecorations(ar.current,[])},ki=An.onMouseMove(or=>{var yr,Hn,Yr;if(qr(),or.target.detail&&((Yr=(Hn=(yr=or.target)==null?void 0:yr.element)==null?void 0:Hn.className)!=null&&Yr.includes("line-numbers"))){let Rr=or.target.position.lineNumber;if(ii(nr.getLineContent(Rr),Rr))return;Ir(Rr)}}),Qt=An.onMouseLeave(()=>{qr()});return()=>{dn.dispose(),$n.dispose(),ki.dispose(),Qt.dispose()}}},[fr.current,an,kr,vi,Bi,Dt]),(0,ct.useEffect)(()=>{var Bn;(Bn=fr.current)!=null&&Bn.instance&&Bi&&fr.current.instance.setPosition({lineNumber:0,column:0})},[vi]);function Mn(){let Bn=fr.current.instance;if(Bn){const An=Bn.getSelection(),nr=fr.current.pastePos||{},_n=new nt.Range(nr.startLineNumber||An.endLineNumber,nr.startColumn||An.endColumn,nr.endLineNumber||An.endLineNumber,nr.endColumn||An.endColumn);setTimeout(()=>{Bn.executeEdits("",[{range:_n,text:""}])},300)}}function sr(Bn){(window.navigator.platform.match("Mac")?Bn.metaKey:Bn.ctrlKey)&&Bn.keyCode==83&&(Bn.preventDefault(),Wt())}const Wr=()=>{if(bn&&fr.current.instance){const Bn=fr.current.instance.getContentHeight();en(Bn<Mt?Mt:Bn)}else en(Mt)};function Li(Bn){var An=document.createEvent("MouseEvents");An.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Bn.dispatchEvent(An)}const tr=Bn=>{if(!on.current)return;const{keyCode:An,ctrlKey:nr,metaKey:_n,target:Xn,type:ur}=Bn;return(ur==="paste"||(An===67||An===86)&&(_n||nr))&&Xn.nodeName==="TEXTAREA"&&(gr(),Bn.preventDefault()),!1};function Ot(Bn,An){var nr=window.URL||window.webkitURL||window,_n=new Blob([An]),Xn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Xn.href=nr.createObjectURL(_n),Xn.download=Bn,Li(Xn)}(0,ct.useEffect)(()=>{Wr()},[Wr]),(0,ct.useEffect)(()=>{et.current&&!an&&Promise.all([at.e(8909),at.e(6656)]).then(at.bind(at,71448)).then(Bn=>{try{nt=Bn,fr.current.instance=nt.editor.create(et.current,{value:Nt,language:Ze(Dt),theme:Ut,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ii||!1}},$t);const An=fr.current.instance;let Xn=[...ot.BH._menuItems].find(dn=>dn[0]._debugName=="EditorContext")[1],ur=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],zr=(dn,$n)=>{var Ir,qr;let ki=dn._first;do $n.includes((qr=(Ir=ki.element)==null?void 0:Ir.command)==null?void 0:qr.id)&&dn._remove(ki);while(ki=ki.next)};if(Jn(An,nt),setTimeout(()=>{Wr(),fr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ot(Kr||"educoder.txt",An.getValue())}})},500),fr.current.subscription=An.onDidChangeModelContent(dn=>{Sr.current?clearTimeout(Ar.current):(Wr(),jn(An.getValue(),dn)),Ar.current=setTimeout(()=>{Sr.current=!1},500)}),window.Monaco||Fe(nt,Ze(Dt)),mn&&(zr(Xn,ur),et.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",tr),window.removeEventListener("paste",tr),window.addEventListener("keydown",tr),window.addEventListener("paste",tr)),window.Monaco=nt,sn&&An.onDidBlurEditorWidget(()=>{sn(An.getValue())}),Cr&&An.onDidFocusEditorText(()=>{mn&&Re(),Cr(An.getValue())}),mn){Re();try{An.onDidPaste(dn=>{const $n=An.getSelection(),Ir=fr.current.pastePos||{},qr=new nt.Range(Ir.startLineNumber||$n.endLineNumber,Ir.startColumn||$n.endColumn,Ir.endLineNumber||$n.endLineNumber,Ir.endColumn||$n.endColumn);An.executeEdits("",[{range:dn.range,text:""}])})}catch(dn){}}let dr=vn();return Di&&typeof Di=="string"&&new Ke(Di,An,nt),tn(!0),()=>{const dn=fr.current.instance;dn.dispose();const $n=dn.getModel();$n&&$n.dispose(),fr.current.subscription&&fr.current.subscription.dispose(),dr.unobserve(et.current)}}catch(An){}})},[]),(0,ct.useEffect)(()=>{if(fr.current.instance&&an)return document.addEventListener("keydown",sr,!1),()=>{document.removeEventListener("keydown",sr)}},[Wt,an]),(0,ct.useEffect)(()=>{let Bn=fr.current.instance;if(Bn&&an){let An=Ze(Dt);nt.editor.setModelLanguage(Bn.getModel(),An)}},[Dt,an]),(0,ct.useEffect)(()=>{fr.current.instance&&an&&nt.editor.setTheme(Ut)},[Ut,an]),(0,ct.useEffect)(()=>{let Bn=fr.current.instance;mr.current=Xt,Bn&&an&&(Bn.updateOptions(mt({},Xt)),setTimeout(()=>{Bn.getModel().updateOptions(mt({},Xt))},200))},[JSON.stringify(Xt),an]),(0,ct.useEffect)(()=>{let Bn=fr.current.instance;Bn&&an&&Bn.layout()},[gt,Mt,an]);const[Kt,Dn]=(0,ct.useState)(tt(gt)),[Ln,en]=(0,ct.useState)(tt(Mt)),Un=yt(mt({},Ht),{width:Kt,height:Ln,position:"relative"});return ct.createElement("div",{className:"my-monaco-editor",ref:et,style:Un},nn&&ct.createElement(rt.CopyToClipboard,{text:Nt,onCopy:()=>st.ZP.success("\u590D\u5236\u6210\u529F")},ct.createElement(dt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ct.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ct.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function He({width:Qe="100%",height:ut="100%",original:gt,modified:Mt,language:Nt,options:Dt={}}){const Ht=(0,ct.useRef)(),[Xt,$t]=(0,ct.useState)(null);function Ut(bn){let mn;return Ht.current&&(mn=new Bt.Z(jn=>{for(let Jn of jn)(Jn.target.offsetHeight>0||Jn.target.offsetWidth>0)&&bn.layout()}),mn.observe(Ht.current)),mn}(0,ct.useEffect)(()=>(Ht.current&&Promise.all([at.e(8909),at.e(9404)]).then(at.bind(at,2550)).then(bn=>{nt=bn;const mn=nt.editor.createDiffEditor(Ht.current,yt(mt({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},Dt),{wordWrap:!0}));$t(mn);let jn=Ut(mn);return()=>{mn.dispose();const Jn=mn.getModel();Jn&&Jn.dispose(),jn.unobserve(Ht.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ct.useEffect)(()=>{Xt&&Xt.setModel({original:nt.editor.createModel(gt,Nt),modified:nt.editor.createModel(Mt,Nt)})},[gt,Mt,Nt,Xt]);const sn=tt(Qe),nn=tt(ut),Wt={width:sn,height:nn};return ct.createElement("div",{className:"my-diff-editor",ref:Ht,style:Wt})}},58397:function(gn,cn,at){"use strict";var ct=at(39744),Bt=at(82326),oe=at(71411),ze=at(59301);const De=Bt.default.Option;cn.Z=({isTheoretical:fe,onFontSizeChange:me,cmFontSize:ke,cmCodeMode:Ce,autoFormat:Se,onCodeModeChange:Me,onTabToSpace:ve,onAutoFormat:we,formatDocument:de,className:z="",tabToSpace:ee,children:ae,code_editor:ie,challenge:le})=>{const ue={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return ze.createElement("div",{className:`tpi-code-setting ${z}`},ze.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),ze.createElement("section",null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),ze.createElement(Bt.default,{bordered:!1,size:"small",value:Ce,onChange:Me},ze.createElement(De,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ze.createElement(De,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!fe&&ze.createElement(ze.Fragment,null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),ze.createElement(Bt.default,{bordered:!1,size:"small",value:ke,onChange:me},ze.createElement(De,{value:12},"12px"),ze.createElement(De,{value:14},"14px"),ze.createElement(De,{value:16},"16px"),ze.createElement(De,{value:18},"18px"),ze.createElement(De,{value:20},"20px"),ze.createElement(De,{value:22},"22px"))),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"Tab\u8F6C\u6362"),ze.createElement(oe.Z,{checked:ee,onChange:ve})),ze.createElement("div",{className:"file-item",onClick:de},ze.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!fe&&ze.createElement(ze.Fragment,null,ze.createElement("h3",null,"\u5FEB\u6377\u952E"),ze.createElement("section",null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),ze.createElement("span",null,"Ctrl + S")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),ze.createElement("span",null,"F1 / Alt + F1")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),ze.createElement("span",null,"Ctrl + ]/[")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),ze.createElement("span",null,"Ctrl + Shift + \\")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),ze.createElement("span",null,"Home")),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),ze.createElement("span",null,"End"))),ae),!fe&&ze.createElement(ze.Fragment,null,ze.createElement("h3",null,"\u5FEB\u6377\u952E"),ze.createElement("section",null,ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),ze.createElement("span",null,ue[le==null?void 0:le.difficulty])),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),ze.createElement("span",null,ie==null?void 0:ie.name)),ze.createElement("div",{className:"file-item"},ze.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),ze.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},37808:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Bt}});var ct=at(59301);function Bt(oe,ze){const De=(0,ct.useRef)();(0,ct.useEffect)(()=>{De.current=oe}),(0,ct.useEffect)(()=>{function fe(){De.current()}if(ze!==null){let me=setInterval(fe,ze);return()=>clearInterval(me)}},[ze])}},81171:function(gn,cn,at){"use strict";at.r(cn),at.d(cn,{Types:function(){return Xi},default:function(){return mr}});var ct=at(59301),Bt={header:"header___N_IdR",field:"field___XG_dh","oj-form-container":"oj-form-container___syYzK","oj-left-panel":"oj-left-panel___L082x","oj-form-info":"oj-form-info___q0IU5",footer:"footer___pGCM2",result:"result___LM9Ms",passText:"passText___nUoL4",noPassText:"noPassText___ECHHG",pass:"pass___tDubp",noPass:"noPass___ilYvg","test-case-name":"test-case-name___MI_KD","btn-remove-case":"btn-remove-case___OiaTQ","icon-tag":"icon-tag___D86WO",btn_back:"btn_back___FyaSY",testJi:"testJi___NDviK",upBtn:"upBtn___FiZX4","oj-problems":"oj-problems___xb70g",row:"row___v036E",a:"a___yRaYH",b:"b___gWQyu",inputTwo:"inputTwo___IZ9og",inputOne:"inputOne____NmcT",cusModal:"cusModal___fJ5gm","oj-custom-large-spin":"oj-custom-large-spin___Aar0g",MdEditor:"MdEditor___hgoes"},oe=at(37568),ze=at(62957),De=at(8848),fe=at(28284),me=at(6767),ke=at(77019),Ce=at(5269),Se=at(29787),Me=at(99571),ve=at(54172),we=at(82326),de=at(71051),z=at(47889),ee=at(62673),ae=at(77736),ie=at(93725),le=at(59301);const{Option:ue}=we.default;var ge=(ar=>(ar[ar.language=0]="language",ar[ar.difficulty=1]="difficulty",ar[ar.category=2]="category",ar[ar.openOrNot=3]="openOrNot",ar))(ge||{});const Pe={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",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 je(ar){return Pe[ar].map(Sr=>le.createElement(ue,{key:Sr.title,value:Sr.key}," ",Sr.title," "))}function Be(ar,Sr){ar.map(Ar=>{const{id:lo,name:on,sub_disciplines:an}=Ar;let tn={value:lo,label:on};Sr.push(tn),an&&an.length>0&&(tn.children=[],Be(an,tn.children))})}function Fe(ar,Sr){var Ar;let lo=[];for(let on=0;on<ar.length;on++){const an=ar[on];if(((Ar=an.sub_disciplines)==null?void 0:Ar.length)>0){lo[0]=an.id;for(let tn=0;tn<an.sub_disciplines.length;tn++){const vn=an.sub_disciplines[tn];if(vn.id===Sr)return lo[1]=vn.id,[lo,vn.tag_disciplines||vn.sub_disciplines||[]]}}}return[lo,[]]}var Ne=at(25690),Ae=at(24334),Ie=at(76618),We=at(65363),Ye=at(39793),Ue=at(38986);function Ke(ar){return(0,Ue.v_)("practices.json",ar)}function ot(){return(0,Ue.U2)("problems/new.json")}function st(ar){return(0,Ue.U2)(`practices/${ar}/edit.json`)}function dt(ar,Sr){return(0,Ue.gz)(`practices/${ar}`,Sr)}function Ct(ar,Sr){return post(`exercises/${ar}/exercise_questions.json`,Sr)}function $e(ar,Sr){return put(`exercise_questions/${ar}.json`,Sr)}var rt=at(8343),St=at(30641),Pt=at(75975),wt=at(58397),pt=at(91558),ft=at(23992),ht={"code-panel-container":"code-panel-container___BZjjl","action-oj-bar":"action-oj-bar___xbXpK",active:"active___EMVKI"},Et=Object.defineProperty,mt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Ve=(ar,Sr,Ar)=>Sr in ar?Et(ar,Sr,{enumerable:!0,configurable:!0,writable:!0,value:Ar}):ar[Sr]=Ar,xe=(ar,Sr)=>{for(var Ar in Sr||(Sr={}))xt.call(Sr,Ar)&&Ve(ar,Ar,Sr[Ar]);if(At)for(var Ar of At(Sr))tt.call(Sr,Ar)&&Ve(ar,Ar,Sr[Ar]);return ar},Le=(ar,Sr)=>mt(ar,yt(Sr));const Ze={theme:(0,ft.G)("cmCodeMode","vs-dark"),fontSize:(0,ft.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,ft.G)("cmTabToSpace",!0)};var nt=(ar=>(ar[ar.set_font_size=0]="set_font_size",ar[ar.set_theme=1]="set_theme",ar[ar.on_tab_to_space=2]="on_tab_to_space",ar[ar.set_show_editor_setting=3]="set_show_editor_setting",ar))(nt||{});function Re(ar,Sr){switch(Sr.type){case 3:return Le(xe({},ar),{showEditorSetting:Sr.payload});case 1:return Le(xe({},ar),{theme:Sr.payload});case 0:return Le(xe({},ar),{fontSize:Sr.payload});case 2:return Le(xe({},ar),{tabToSpace:Sr.payload});default:throw new Error}}var _e=({value:ar,onChange:Sr,language:Ar,onLanguage:lo,languageItems:on,ActionBarRender:an=tn=>ct.createElement(He,{languageItems:on,onLanguage:lo,language:Ar,onShowCodeSetting:tn})})=>{const[tn,vn]=(0,ct.useReducer)(Re,Ze),{theme:gr,fontSize:pr,showEditorSetting:ii,tabToSpace:Mn}=tn;console.log(ar,Ar,"value");const sr={onFontSizeChange:Ot=>{vn({type:0,payload:Ot}),(0,ft.t)("cmFontSize",Ot)},tabToSpace:Mn,cmFontSize:pr,className:"oj",cmCodeMode:gr,onTabToSpace:Ot=>{vn({type:2,payload:Ot}),(0,ft.t)("cmTabToSpace",Ot)},onCodeModeChange:Ot=>{vn({type:1,payload:Ot}),(0,ft.t)("cmCodeMode",Ot)}};function Wr(){vn({type:3,payload:!1})}function Li(){vn({type:3,payload:!0})}const tr={value:ar,language:Ar,onChange:Sr,theme:gr,height:"calc(100% - 56px)",options:{fontSize:pr,insertSpaces:Mn}};return ct.createElement(ct.Fragment,null,ct.createElement("div",{className:ht["code-panel-container"]},an(Li),ct.createElement(Pt.ZP,xe({key:Ar},tr))),ct.createElement(pt.Z,null,ct.createElement(St.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ii,onClose:Wr},ct.createElement(wt.Z,xe({},sr)))))};function He({languageItems:ar,language:Sr,onShowCodeSetting:Ar,onLanguage:lo}){return ct.createElement("div",{className:ht["action-oj-bar"]},ar==null?void 0:ar.map(on=>ct.createElement("div",{className:Sr===(on==null?void 0:on.language)?ht.active:"",onClick:()=>lo(on==null?void 0:on.language),key:on==null?void 0:on.language},on==null?void 0:on.language)),ct.createElement("a",{onClick:Ar},ct.createElement("i",{className:"iconfont icon-shezhi"})))}var Qe=at(20554),ut={flex_box_center:"flex_box_center___4yAaY",flex_space_between:"flex_space_between___YaUgM",flex_box_vertical_center:"flex_box_vertical_center___zR3dp",flex_box_center_end:"flex_box_center_end___rwgS5",flex_box_column:"flex_box_column___LhFeP",wrap:"wrap___xTL91",in:"in___eSY86",btns:"btns___UdEGI",customModal:"customModal___CL0OL"},gt=(ar,Sr,Ar)=>new Promise((lo,on)=>{var an=gr=>{try{vn(Ar.next(gr))}catch(pr){on(pr)}},tn=gr=>{try{vn(Ar.throw(gr))}catch(pr){on(pr)}},vn=gr=>gr.done?lo(gr.value):Promise.resolve(gr.value).then(an,tn);vn((Ar=Ar.apply(ar,Sr)).next())}),Nt=({visible:ar,onOK:Sr,onCancel:Ar})=>{const[lo,on]=(0,ct.useState)(!1),[an,tn]=(0,ct.useState)(!1),[vn,gr]=(0,ct.useState)("1"),[pr,ii]=(0,ct.useState)(""),[Mn,sr]=(0,ct.useState)([]),Wr=()=>gt(void 0,null,function*(){if(!pr){me.ZP.warning(`\u9898\u76EE${Dn}\u4E0D\u80FD\u4E3A\u7A7A`);return}tn(!0);const Ln=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:ar,name:pr}});if((Ln==null?void 0:Ln.status)===0){Sr();return}tn(!1)}),Li=(Ln="")=>gt(void 0,null,function*(){on(!0);let en=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:ar,search:Ln}});sr(en.tag_disciplines||[]),on(!1)}),tr=Ln=>{let en=Ln.name;ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:ct.createElement("div",null,ct.createElement(oe.default,{defaultValue:en,placeholder:`\u8BF7\u8F93\u5165${Dn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20,onChange:Un=>{en=Un.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>gt(void 0,null,function*(){if(!en)return me.ZP.warning(`\u9898\u76EE${Dn}\u4E0D\u80FD\u4E3A\u7A7A`),Promise.reject();const Un=yield(0,Ue.ZP)(`/api/tag_disciplines/${Ln.id}/rename.json`,{method:"post",body:{id:Ln.id,name:en}});(Un==null?void 0:Un.status)===0&&Li()})})},Ot=Ln=>{ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:ar==="practice"?ct.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",ct.createElement("span",{className:"c-light-primary"},Ln.name),"\u201D\u5220\u9664\u5417\uFF1F",ct.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):ct.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",ct.createElement("span",{className:"c-light-primary"},Ln.name),"\u201D\u5220\u9664\u5417\uFF1F",ct.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>gt(void 0,null,function*(){const en=yield(0,Ue.ZP)(`/api/tag_disciplines/${Ln.id}.json`,{method:"delete",body:{id:Ln.id}});(en==null?void 0:en.status)===0&&Li()})})},Kt=Ln=>{Li(Ln)},Dn=ar==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return ct.createElement(ze.default,{afterClose:()=>{tn(!1),on(!1),ii(""),gr("1"),sr([])},centered:!0,keyboard:!1,width:600,title:`${Dn}\u7BA1\u7406`,open:!!ar,className:ut.customModal,footer:null,onCancel:Ar},ct.createElement("section",{className:ut.wrap},ct.createElement(Qe.default,{activeKey:vn,onChange:Ln=>{ii(""),gr(Ln),Li()}},ct.createElement(Qe.default.TabPane,{tab:`\u65B0\u589E${Dn}`,key:"1"},ct.createElement(oe.default,{value:pr,onChange:Ln=>ii(Ln.target.value),className:ut.in,placeholder:`\u8F93\u5165${Dn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20}),ct.createElement("div",{className:ut.btns},ct.createElement(Me.ZP,{onClick:Ar,className:"mr20"},"\u53D6\u6D88 "),ct.createElement(Me.ZP,{loading:an,onClick:Wr,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),ct.createElement(Qe.default.TabPane,{tab:`\u5DF2\u6709${Dn}`,key:"2"},ct.createElement(oe.default.Search,{allowClear:!0,onSearch:Kt,value:pr,onChange:Ln=>ii(Ln.target.value),className:ut.in,placeholder:`\u8F93\u5165${Dn}\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2`}),ct.createElement(ve.default,{dataSource:Mn,bordered:!1,loading:lo,scroll:Mn.length>7?{y:300}:{},style:{padding:"0 0px 20px 0px"},columns:[{title:`${Dn}\u540D\u79F0`,dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:(Ln,en)=>ct.createElement("span",null,ct.createElement("span",{onClick:()=>tr(en),className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),ct.createElement("span",{onClick:()=>Ot(en),className:"current c-grey-666"},"\u5220\u9664"))}],pagination:!1})))))},Dt=at(346),Ht=at(3532),Xt=at(61186),$t=at.n(Xt),Ut=at(51257),sn=at(76902),nn=at(48790),Wt=at(59301),bn=Object.defineProperty,mn=Object.defineProperties,jn=Object.getOwnPropertyDescriptors,Jn=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,cr=Object.prototype.propertyIsEnumerable,kr=(ar,Sr,Ar)=>Sr in ar?bn(ar,Sr,{enumerable:!0,configurable:!0,writable:!0,value:Ar}):ar[Sr]=Ar,Kr=(ar,Sr)=>{for(var Ar in Sr||(Sr={}))Cr.call(Sr,Ar)&&kr(ar,Ar,Sr[Ar]);if(Jn)for(var Ar of Jn(Sr))cr.call(Sr,Ar)&&kr(ar,Ar,Sr[Ar]);return ar},Ur=(ar,Sr)=>mn(ar,jn(Sr)),oi=(ar,Sr,Ar)=>new Promise((lo,on)=>{var an=gr=>{try{vn(Ar.next(gr))}catch(pr){on(pr)}},tn=gr=>{try{vn(Ar.throw(gr))}catch(pr){on(pr)}},vn=gr=>gr.done?lo(gr.value):Promise.resolve(gr.value).then(an,tn);vn((Ar=Ar.apply(ar,Sr)).next())});const{TextArea:vi}=oe.default,{confirm:Bi}=ze.default,{Panel:Di}=De.default,Ii={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};var Xi=(ar=>(ar[ar.SET_INITAL_DATA=0]="SET_INITAL_DATA",ar[ar.SET_LOADING=1]="SET_LOADING",ar[ar.SET_STATUS=2]="SET_STATUS",ar))(Xi||{});const et="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function fr(ar,Sr){switch(Sr.type){case 0:return Kr(Kr({},ar),Sr.payload);case 1:return Ur(Kr({},ar),{loading:Sr.payload});case 2:return Ur(Kr({},ar),{status:Sr.payload});default:throw new Error}}var mr=()=>{var ar,Sr,Ar;const lo=(0,Ne.useLocation)(),{id:on}=(0,Ne.useParams)(),[an]=fe.default.useForm(),[tn,vn]=(0,ct.useState)(),[gr,pr]=(0,ct.useState)(!1),[ii,Mn]=(0,ct.useState)([]),[sr,Wr]=(0,ct.useState)([]),[Li,tr]=(0,ct.useState)([]),[Ot,Kt]=(0,ct.useState)([]),[Dn,Ln]=(0,ct.useState)([]),[en,Un]=(0,ct.useState)("C"),[Bn,An]=(0,ct.useReducer)(fr,Ii),{loading:nr,data:_n,user:Xn,status:ur}=Bn,zr=_n==null?void 0:_n.hack_sets,dr=(ar=_n==null?void 0:_n.hack)==null?void 0:ar.test_set_average,[dn,$n]=(0,ct.useState)(!1),Ir=(0,ct.useRef)([]),[qr,ki]=(0,ct.useState)(!1),[Qt,or]=(0,ct.useState)(!1),yr=(0,ct.useRef)(!0),[Hn,Yr]=(0,ct.useState)({});(0,ct.useEffect)(()=>((0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,ct.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)});const Rr=()=>oi(void 0,null,function*(){const Sn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}}),Kn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});Wr(Sn.tag_disciplines||[]),tr(Kn.tag_disciplines||[])});var Zr=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}];const Qr=(0,ct.useCallback)(()=>oi(void 0,null,function*(){if(An({type:1,payload:!0}),on){const Sn=yield st(on),{user:Kn,language:Qn,practice_sets:Vn,practice_codes:un,description:Fn,difficulty:zn,name:Tn,open_or_not:In,time_limit:Nn,test_set_average:Zn,test_set_score:Wn,status:ln,tag_discipline_ids:br,source_discipline_ids:Er,item_banks_group_id:ai,is_file:Tr=!1,hide_actual_output:Si,review_privilege:pi,review_description:bi,submit_rule:yi}=Sn;Yr({review_privilege:pi,status:ln,review_description:bi,name:Tn}),$n(Si);const Ki=Tr?[{input:"",output:"",score:100,position:1}]:Vn;Tr?(Mn(Vn),an.setFieldsValue({hack_sets:Ki})):Mn([]),An({type:0,payload:{loading:!0,user:Kn,status:ln,data:{hack:{difficulty:zn,name:Tn,description:Fn,open_or_not:In,time_limit:Nn,test_set_average:Zn,test_set_score:Wn,tag_discipline_ids:br,source_discipline_ids:Er,is_file:Tr,submit_rule:yi},hack_sets:Ki}}}),vn({hack:{difficulty:zn,name:Tn,description:Fn,open_or_not:In,time_limit:Nn,test_set_average:Zn,test_set_score:Wn,tag_discipline_ids:br,source_discipline_ids:Er,is_file:Tr}});const xi=un==null?void 0:un.map(ti=>Ur(Kr({},ti),{code:Ae.Base64.decode(ti==null?void 0:ti.code)}));Ln(xi),Ir.current=xi}else{const{user:Sn}=yield ot();An({type:0,payload:{loading:!0,status:0,user:Sn,data:{hack:{difficulty:"",time_limit:3,description:et,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1,submit_rule:1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),vn({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),Ln(Zr),Ir.current=Zr}An({type:1,payload:!1})}),[on]);(0,ct.useEffect)(()=>{try{Qr(),Rr()}catch(Sn){console.log(Sn,"----")}},[]);function ui(Sn,Kn){return oi(this,null,function*(){var Qn;const{hack_sets:Vn,hack:un}=Kr({},Sn);un.hide_actual_output=dn;let Fn=[],zn=[],Tn=0;const In=un!=null&&un.is_file?ii.map((Wn,ln)=>Ur(Kr({},Wn),{position:ln+1})):Vn.map(Wn=>Ur(Kr({},Wn),{is_file:!1}));for(let Wn of In)Tn+=Wn.score,Wn.id&&Wn.id>=0?Fn.push(Wn):zn.push(Wn);if(!(In!=null&&In.length)){me.ZP.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A");return}if(Tn!==100&&!un.test_set_score){me.ZP.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(In!=null&&In.some(Wn=>!Wn.output)){me.ZP.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A");return}yr.current?ki(!0):or(!0);let Nn;const Zn=Dn==null?void 0:Dn.map(Wn=>Ur(Kr({},Wn),{code:Ae.Base64.encode(Wn==null?void 0:Wn.code)}));if(on?Nn=yield dt(on,{practice:un,practice_codes:Zn,practice_sets:zn,update_practice_sets:Fn}):Nn=yield Ke({practice:un,practice_codes:Zn,practice_sets:In,publish:!yr.current}),ki(!1),or(!1),(Nn==null?void 0:Nn.status)===0){if((Qn=Nn==null?void 0:Nn.similar_practice)!=null&&Qn.length){pr(!0),Kt(Nn==null?void 0:Nn.similar_practice);return}if(on){if(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),!yr.current){const Wn=yield(0,Ue.ZP)(`/api/practices/${on}/start`,{method:"get"});(Wn==null?void 0:Wn.status)===0&&Ne.history.push(`/problems/${Wn==null?void 0:Wn.identifier}/oj/${on}`)}}else me.ZP.success("\u65B0\u5EFA\u6210\u529F"),Ne.history.replace(`/problems/${Nn==null?void 0:Nn.identifier}/ojedit`)}})}function Pi(){Ne.history.replace("/problems")}const pn=Sn=>{const Kn=Math.floor(100/Sn.length),Qn=Kn+100%Sn.length;Sn=Sn.map((Vn,un)=>un===Sn.length-1?Ur(Kr({},Vn),{score:Qn}):Ur(Kr({},Vn),{score:Kn})),Mn(Sn)};function Oi(Sn){Sn.target.value||pn(ii),An({type:0,payload:{data:Ur(Kr({},_n),{hack:Ur(Kr({},_n.hack),{test_set_score:Sn.target.value})})}})}function yn(Sn){An({type:0,payload:{data:Ur(Kr({},_n),{hack:Ur(Kr({},_n.hack),{is_file:Sn.target.value})})}})}function xr(Sn){$n(Sn.target.checked)}function hi(Sn){const Kn=Sn.target.value;Kn&&pn(ii),An({type:0,payload:{data:Ur(Kr({},_n),{hack:Ur(Kr({},_n.hack),{test_set_average:Kn})})}})}function ei(){let Sn=an.getFieldValue("hack_sets");const Kn=Sn.length+1,Qn=Math.floor(100/Kn),Vn=100%Kn;Sn.map((un,Fn)=>(dr&&(un.score=Qn),un.position=Fn+1,un)),Sn.push({input:"",output:"",position:Kn,score:dr?Qn+Vn:0}),an.setFieldsValue({hack_sets:Sn}),An({type:0,payload:{data:Ur(Kr({},_n),{hack_sets:Sn})}})}(0,ct.useEffect)(()=>{if(dr){const Sn=zr==null?void 0:zr.length,Kn=Math.floor(100/Sn),Qn=100%Sn;zr==null||zr.map((Vn,un)=>(Vn.score=Kn,Vn.position=un+1,un===Sn-1&&(Vn.score=Kn+Qn),Vn)),An({type:0,payload:{data:Ur(Kr({},_n),{hack_sets:zr})}}),an.setFieldsValue({hack_sets:zr})}},[dr]);function Wi(Sn){let Kn=an.getFieldValue("hack_sets");const Qn=(Kn==null?void 0:Kn.length)-1,Vn=Math.ceil(100/Qn),un=100%Qn;Kn.splice(Sn,1),Kn==null||Kn.map((Fn,zn)=>(dr&&(Fn.score=Vn,zn===Qn-1&&(Fn.score=Vn+un)),Fn.position=zn+1,Fn)),An({type:0,payload:{data:Ur(Kr({},_n),{hack_sets:Kn})}}),an.setFieldsValue({hack_sets:Kn})}function ci(Sn){Un(Sn)}const Vr=Sn=>{var Kn;const Qn=(Kn=Ir.current)==null?void 0:Kn.findIndex(Vn=>Vn.language===en);Ir.current[Qn].code=Sn,Ln(Ir.current)},Hi=Sn=>{vn(Kr({},an.getFieldsValue()))},qt=Sn=>oi(void 0,null,function*(){const Kn=yield(0,Ue.ZP)(`/api/practices/${Sn}/start`,{method:"get"});(Kn==null?void 0:Kn.status)===0&&(0,Ut.xg)(`/problems/${Kn==null?void 0:Kn.identifier}/oj/${Sn}`)}),wn=()=>oi(void 0,null,function*(){const Sn=yield st(on),{name:Kn,status:Qn,review_privilege:Vn,review_description:un}=Sn;Yr({review_privilege:Vn,status:Qn,review_description:un,name:Kn})}),Yt=()=>{let Sn="";ze.default.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Wt.createElement("div",{className:"mt20"},Wt.createElement(Ye.Z,{className:Bt.MdEditor,defaultValue:Sn,onChange:Kn=>{Sn=Kn}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>oi(void 0,null,function*(){if(!Sn)return me.ZP.warning("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Kn=yield(0,Ue.ZP)(`/api/practices/${on}/review.json`,{method:"post",body:{op:"fail",description:Sn}});(Kn==null?void 0:Kn.status)===0&&(me.ZP.success("\u63D0\u4EA4\u6210\u529F"),wn())})})},lt=()=>oi(void 0,null,function*(){ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:`\u786E\u8BA4\u5C06\u9898\u76EE\u300A${Hn==null?void 0:Hn.name}\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F`,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>oi(void 0,null,function*(){const Sn=yield(0,Ue.ZP)(`/api/practices/${on}/review.json`,{method:"post",body:{op:"pass"}});(Sn==null?void 0:Sn.status)===0&&(me.ZP.success("\u63D0\u4EA4\u6210\u529F"),wn())})})}),On=()=>{const Sn=ze.default.confirm({icon:null,width:700,className:`${Bt.cusModal} custom-modal-divider`,centered:!0,title:Wt.createElement(ke.Z,null,Wt.createElement(Ce.Z,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Wt.createElement(Ce.Z,null,Wt.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:()=>Sn.destroy()}))),content:Wt.createElement("div",null,Wt.createElement(sn.Z,{className:"mt20",value:(Hn==null?void 0:Hn.review_description)||""}))})};return Wt.createElement(Se.Z,{spinning:nr,size:"large",className:Bt["oj-custom-large-spin"]},_n?Wt.createElement(ct.Fragment,null,Wt.createElement("header",{className:Bt.header},Wt.createElement("div",null,Wt.createElement("img",{src:`${Dt.Z.IMG_SERVER}/images/${Xn==null?void 0:Xn.image_url}`,alt:"user",width:30}),Wt.createElement("span",null,Xn==null?void 0:Xn.name)),Wt.createElement("h2",null," ",(Sr=_n==null?void 0:_n.hack)==null?void 0:Sr.name," "),on?Wt.createElement("a",{className:Bt.btn_back,onClick:Pi}," ",Wt.createElement(Ie.Z,null),"\u9000\u51FA"):null),Wt.createElement(fe.default,{form:an,initialValues:_n,layout:"vertical",className:Bt["oj-form-container"],onValuesChange:Hi,onFinish:ui},Wt.createElement(rt.Z,{hideResize:!0,className:Bt["oj-problems"],leftChild:Wt.createElement(Ai,{formValue:tn,onRemoveTestCase:Wi,onAddTestCase:ei,hack:_n.hack,onChangeScore:Oi,onChangehide:xr,onChangeAverage:hi,onChangeFile:yn,uploadData:ii,setUploadData:Mn,handleUploadRatio:pn,ischecked:dn,pointData:sr,sourceData:Li,getPointData:Rr}),rightChild:Wt.createElement(_e,{value:(Ar=Dn==null?void 0:Dn.find(Sn=>Sn.language===en))==null?void 0:Ar.code,onChange:Vr,onLanguage:ci,languageItems:Dn,language:en})}),Wt.createElement("div",{className:Bt.footer},!!on&&Wt.createElement("div",{className:Bt.result},Wt.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Hn!=null&&Hn.review_privilege?Wt.createElement(Wt.Fragment,null,Wt.createElement("div",{onClick:lt,className:Bt.pass},"\u901A\u8FC7"),Wt.createElement("div",{onClick:Yt,className:Bt.noPass},"\u4E0D\u901A\u8FC7")):Wt.createElement(Wt.Fragment,null,(Hn==null?void 0:Hn.status)===0&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Hn==null?void 0:Hn.status)===1&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Hn==null?void 0:Hn.status)===2&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Hn==null?void 0:Hn.status)===3&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Hn==null?void 0:Hn.status)===4&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Hn==null?void 0:Hn.status)===5&&Wt.createElement("div",{className:Bt.noPassText},Wt.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Wt.createElement("span",{onClick:On},"\u67E5\u770B\u539F\u56E0")))),Wt.createElement(Me.ZP,{type:"primary",ghost:!0,onClick:Pi},"\u9000\u51FA\u7F16\u8F91"),Wt.createElement(Me.ZP,{disabled:Qt,loading:qr,type:"primary",onClick:()=>{yr.current=!0,an.submit()}},"\u4FDD\u5B58 "),on?Wt.createElement(Me.ZP,{disabled:qr,loading:Qt,style:{background:"#2FC25B",border:0},type:"primary",onClick:()=>{yr.current=!1,an.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Wt.createElement(Me.ZP,{disabled:qr,loading:Qt,type:"primary",onClick:()=>{yr.current=!1,an.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Wt.createElement(ze.default,{centered:!0,destroyOnClose:!0,footer:null,open:gr,onCancel:()=>pr(!1),title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Wt.createElement("div",null,Wt.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),Wt.createElement(ve.default,{dataSource:Ot,bordered:!1,scroll:Ot.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:(Sn,Kn)=>Wt.createElement("span",{onClick:()=>qt(Kn==null?void 0:Kn.identifier),style:{textDecorationLine:"underline"},className:"current c-light-primary"},Sn)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:Sn=>{var Kn;return(Kn=$t()(Sn))==null?void 0:Kn.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Ai({ischecked:ar,formValue:Sr,hack:Ar,onChangeAverage:lo,onChangeScore:on,onChangehide:an,onChangeFile:tn,onAddTestCase:vn,onRemoveTestCase:gr,uploadData:pr,setUploadData:ii,handleUploadRatio:Mn,pointData:sr,sourceData:Wr,getPointData:Li}){var tr,Ot;const{test_set_average:Kt,test_set_score:Dn}=Ar,[Ln,en]=(0,ct.useState)(!1),[Un,Bn]=(0,ct.useState)(!1),An=(dr,dn)=>{const $n=[...pr];$n.splice(dn,1),Kt?Mn($n):ii($n)},nr=(dr,dn)=>{console.log(dr,dn);const $n=pr.map((Ir,qr)=>qr===dn?Ur(Kr({},Ir),{score:dr.target.value?Number(dr.target.value):0}):Ir);ii($n)},_n=dr=>{const dn=pr.concat(dr);Ar.test_set_average?Mn(dn):ii(dn)};function Xn(dr){dr.stopPropagation()}function ur(){if((0,nn.Ny)()){Bn("practice");return}let dr="";ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Wt.createElement("div",null,Wt.createElement(oe.default,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:dn=>{dr=dn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>oi(this,null,function*(){const dn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:dr}});(dn==null?void 0:dn.status)===0&&Li()})})}function zr(){if((0,nn.Ny)()){Bn("practice_source");return}let dr="";ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Wt.createElement("div",null,Wt.createElement(oe.default,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:dn=>{dr=dn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>oi(this,null,function*(){const dn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:dr}});(dn==null?void 0:dn.status)===0&&Li()})})}return Wt.createElement("div",{className:Bt["oj-left-panel"]},Wt.createElement("div",{className:Bt["oj-form-info"]},Wt.createElement(fe.default.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:Bt.inputOne},Wt.createElement(oe.default,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Wt.createElement("span",null,((Ot=(tr=Sr==null?void 0:Sr.hack)==null?void 0:tr.name)==null?void 0:Ot.length)||0,"/",Wt.createElement("span",{className:"c-grey-999"},"60"))})),Wt.createElement(fe.default.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Wt.createElement(Ye.Z,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Wt.createElement("div",{className:Bt.row},Wt.createElement("div",{className:Bt.a},Wt.createElement(fe.default.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Wt.createElement(we.default,null,je(ge.difficulty)))),Wt.createElement("div",{className:Bt.b},Wt.createElement(fe.default.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Wt.createElement(we.default,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:dr=>dr.parentNode},Wr.map(dr=>Wt.createElement(we.default.Option,{key:dr.id,value:dr.id},dr.name)))),Wt.createElement(Me.ZP,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:()=>zr()},(0,nn.Ny)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Wt.createElement("div",{className:Bt.row},Wt.createElement("div",{className:Bt.b,style:{width:"100%",marginLeft:0}},Wt.createElement(fe.default.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Wt.createElement(we.default,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:dr=>dr.parentNode},sr.map(dr=>Wt.createElement(we.default.Option,{key:dr.id,value:dr.id},dr.name)))),Wt.createElement(Me.ZP,{type:"primary",ghost:!0,onClick:()=>ur()},(0,nn.Ny)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Wt.createElement("div",{className:Bt.field},Wt.createElement(fe.default.Item,{label:"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:1,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F1\u79D2"}],className:Bt.inputTwo,extra:Wt.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Wt.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Wt.createElement(de.Z,{style:{width:185},min:1}))),Wt.createElement("div",{className:"tst-case-info"},Wt.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Ar.is_file&&Wt.createElement(Me.ZP,{style:{height:40},type:"primary",ghost:!0,onClick:vn},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Wt.createElement(fe.default.Item,{name:["hack","test_set_score"]},Wt.createElement(z.ZP.Group,{onChange:on},Wt.createElement(z.ZP,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Wt.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),Wt.createElement(z.ZP,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Wt.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),Wt.createElement(ee.default,{style:{marginBottom:"5px"},checked:ar,onChange:an},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),Wt.createElement(fe.default.Item,{className:Bt.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Wt.createElement(z.ZP.Group,{onChange:tn},Wt.createElement(ae.Z,{direction:"horizontal"},Wt.createElement(z.ZP,{value:!1},"\u6587\u672C"),Wt.createElement(z.ZP,{value:!0},"\u6587\u4EF6")))),Wt.createElement(fe.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",name:["hack","submit_rule"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},Wt.createElement(z.ZP.Group,null,Wt.createElement(z.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),Wt.createElement(z.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),Wt.createElement(z.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),!Ar.test_set_score&&Wt.createElement(fe.default.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Wt.createElement(z.ZP.Group,{onChange:lo},Wt.createElement(z.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Wt.createElement(z.ZP,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Ar.is_file&&Wt.createElement("div",{className:Bt.upBtn},Wt.createElement(Me.ZP,{ghost:!0,type:"primary",className:"mb20",onClick:()=>en(!0)},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Wt.createElement(Ht.Y2,{disabled:Ar==null?void 0:Ar.test_set_average,inputChange:nr,showScore:!Ar.test_set_score,data:pr,onRemove:An})),!Ar.is_file&&Wt.createElement(fe.default.List,{name:"hack_sets"},(dr,{})=>Wt.createElement(De.default,{accordion:!0},dr.map((dn,$n)=>Wt.createElement(Di,{key:`${dn.key}--${$n}`,header:Wt.createElement("a",{className:Bt["test-case-name"]},Wt.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",$n+1),Dn?null:Wt.createElement(Wt.Fragment,null,Wt.createElement(fe.default.Item,{name:[dn.name,"score"],fieldKey:[dn.fieldKey,"score"],rules:[{required:!0,message:`\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6${$n+1}\u8BC4\u5206`}]},Wt.createElement(de.Z,{onClick:Xn,min:0,max:100,disabled:Kt})),Wt.createElement("span",null,"%"))),extra:$n>0?Wt.createElement("div",{onClick:Xn},Wt.createElement(ie.Z,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+($n+1),onConfirm:()=>{gr($n)}},Wt.createElement(We.Z,{className:Bt["btn-remove-case"]}))):null},Wt.createElement(fe.default.Item,{label:"\u8F93\u5165",name:[dn.name,"input"],fieldKey:[dn.fieldKey,"input"]},Wt.createElement(vi,null)),Wt.createElement(fe.default.Item,{label:"\u8F93\u51FA",name:[dn.name,"output"],fieldKey:[dn.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Wt.createElement(vi,null)))))))),Wt.createElement(Ht.ZP,{rootIdentifier:null,visible:Ln,onClose:()=>en(!1),onOK:_n}),Wt.createElement(Nt,{visible:Un,onCancel:()=>{Bn(!1),Li()},onOK:()=>{Bn(!1),Li()}}))}},3532:function(gn,cn,at){"use strict";at.d(cn,{Y2:function(){return st},ZP:function(){return dt}});var ct=at(59301),Bt=at(14566),oe=at(6767),ze=at(62957),De=at(77019),fe=at(47889),me=at(99571),ke=at(62673),Ce=at(25399),Se=at(37568),Me={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==",we=at(47257),de=at.n(we),z=at(16253),ee=at(38986),ae=at(1012),ie=at(51257),le=at(45677),ue=at(59301),ge=Object.defineProperty,Pe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ae=(Ct,$e,rt)=>$e in Ct?ge(Ct,$e,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Ct[$e]=rt,Ie=(Ct,$e)=>{for(var rt in $e||($e={}))Fe.call($e,rt)&&Ae(Ct,rt,$e[rt]);if(Be)for(var rt of Be($e))Ne.call($e,rt)&&Ae(Ct,rt,$e[rt]);return Ct},We=(Ct,$e)=>Pe(Ct,je($e)),Ye=(Ct,$e,rt)=>new Promise((St,Pt)=>{var wt=ht=>{try{ft(rt.next(ht))}catch(Et){Pt(Et)}},pt=ht=>{try{ft(rt.throw(ht))}catch(Et){Pt(Et)}},ft=ht=>ht.done?St(ht.value):Promise.resolve(ht.value).then(wt,pt);ft((rt=rt.apply(Ct,$e)).next())});const{Dragger:Ue}=Bt.default,Ke=Ct=>{const $e=Et=>Et&&Et.substring(0,Et.lastIndexOf("."));for(var rt=[...Ct],St=0,Pt=[],wt=0;wt<rt.length;wt++){for(var pt="",ft=0;ft<Pt.length;ft++)if($e(Pt[ft][0].name)==$e(rt[wt].name)){St=1,pt=ft;break}if(St==1)Pt[pt].push(rt[wt]),St=0;else if(St==0){let Et=new Array;Et.push(rt[wt]),Pt.push(Et)}}return Pt.map(Et=>{if(Et.forEach(mt=>{let yt=mt.name.split(/\.(?=[^\.]+$)/);mt.name=`${yt[0]}.${yt[1].toLowerCase()}`}),Et[0].name.includes(".in"))return Et.length===2?Et:[Et[0],{}];if(Et[0].name.includes(".out"))return Et.length===2?Et.reverse():[{},Et[0]]})},ot=({onClose:Ct,onOK:$e,visible:rt,wrapClassName:St,rootIdentifier:Pt,multiple:wt=!1,defaultMultipleValue:pt=!0})=>{const[ft,ht]=(0,ct.useState)([]),[Et,mt]=(0,ct.useState)({}),[yt,At]=(0,ct.useState)(!1),[xt,tt]=(0,ct.useState)(!0),Ve=(0,ct.useRef)([]),xe=(0,ct.useRef)(0),Le=()=>{Ct()};(0,ct.useEffect)(()=>{Ze()},[]),(0,ct.useEffect)(()=>{rt&&(Ve.current=[],xe.current=0,ht([]),tt(pt))},[rt]);const Ze=()=>Ye(void 0,null,function*(){try{const Mt=yield(0,ee.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Nt=JSON.parse((0,z.pe)(Mt.data));mt(Nt)}catch(Mt){}}),nt=Mt=>Mt&&Mt.substring(0,Mt.lastIndexOf(".")),Re=Mt=>{var Nt,Dt;const Ht=nt((Nt=Mt[0])==null?void 0:Nt.name)||nt((Dt=Mt[1])==null?void 0:Dt.name),Xt=ft.filter($t=>nt($t.name)!==Ht);Ve.current=[...Xt],ht([...Xt])},_e=Mt=>{if(!xt){const Ut=new FormData;Ut.append("file",Mt.file),(0,ee.ZP)("/api/attachments/get_file_content.json",{method:"post",body:Ut},!0).then(nn=>{if(nn.status===0){xe.current=xe.current+1;const Wt=Ve.current.map(bn=>{var mn;if(bn.name===Mt.name){const jn=Ie({},bn);return(mn=Mt==null?void 0:Mt.name)!=null&&mn.includes(".in")?jn.input=nn==null?void 0:nn.content:jn.output=nn==null?void 0:nn.content,jn}return bn});if(Ve.current=[...Wt],ht([...Wt]),xe.current>0&&xe.current===ft.length){At(!1);let bn=Ke(Wt);bn=bn.filter(mn=>{var jn,Jn;return!!((jn=mn[0])!=null&&jn.name&&((Jn=mn[1])!=null&&Jn.name))}),bn=bn.map(mn=>We(Ie(Ie({},mn[0]),mn[1]),{is_file:!1})),$e(bn),Ct()}}else At(!1),Ct()});return}const Nt=new(de())({endpoint:Et.end_point,region:Et.region,accessKeyId:Et.access_key_id,accessKeySecret:Et.access_key_secret,bucket:Et.bucket,stsToken:Et.security_token}),Dt=Mt.name,Ht={container_type:"TestSet",file_name:Dt},Xt=(0,ae.Z)();let $t=`testsets/${Pt}/${Xt}${Dt.indexOf(".")>-1?"."+Dt.split(".").pop():""}`;Pt===null&&($t=`testsets/${Xt}${Dt.indexOf(".")>-1?"."+Dt.split(".").pop():""}`),Nt.multipartUpload($t,new Blob([Mt.file],{type:Mt.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Dt+""},url:Et==null?void 0:Et.callback_url,host:Et==null?void 0:Et.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ee.rz)(Ht)}}).then(function(Ut){if(Ut.data.status===0){xe.current=xe.current+1;const sn=Ve.current.map(nn=>{var Wt,bn,mn,jn,Jn,Cr,cr,kr,Kr,Ur,oi,vi,Bi,Di,Ii,Xi,et;if(nn.name===((bn=(Wt=Ut.data)==null?void 0:Wt.data)==null?void 0:bn.file_name)){const fr=Ie({},nn);return(Jn=(jn=(mn=Ut.data)==null?void 0:mn.data)==null?void 0:jn.file_name)!=null&&Jn.includes(".in")?(fr.in_object_key=(cr=(Cr=Ut.data)==null?void 0:Cr.data)==null?void 0:cr.object,fr.in_object_size=(Kr=(kr=Ut.data)==null?void 0:kr.data)==null?void 0:Kr.size,fr.input=(oi=(Ur=Ut.data)==null?void 0:Ur.data)==null?void 0:oi.file_name,fr.in_file=Mt):(fr.out_object_key=(Bi=(vi=Ut.data)==null?void 0:vi.data)==null?void 0:Bi.object,fr.out_object_size=(Ii=(Di=Ut.data)==null?void 0:Di.data)==null?void 0:Ii.size,fr.output=(et=(Xi=Ut.data)==null?void 0:Xi.data)==null?void 0:et.file_name,fr.out_file=Mt),fr}return nn});if(Ve.current=[...sn],ht([...sn]),xe.current>0&&xe.current===ft.length){At(!1);let nn=Ke(sn);nn=nn.filter(Wt=>{var bn,mn;return!!((bn=Wt[0])!=null&&bn.name&&((mn=Wt[1])!=null&&mn.name))}),nn=nn.map(Wt=>We(Ie(Ie({},Wt[0]),Wt[1]),{is_file:!0})),$e(nn),Ct()}}})},He=Mt=>new Promise((Nt,Dt)=>{let Ht=0,Xt=[];for(let $t=0;$t<Mt.length;$t++)Mt[$t].file.slice(0,1).arrayBuffer().then(()=>{Ht++,Ht===Mt.length&&(Xt.length?(oe.ZP.warning(`${Xt.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Dt()):Nt(Mt))}).catch(Ut=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Ut),Ht++,Xt.push(Mt[$t].name),Ht===Mt.length&&(Xt.length?(oe.ZP.warning(`${Xt.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Dt()):Nt(Mt))})}),Qe=()=>Ye(void 0,null,function*(){if(ft.length===0){oe.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield He(ft),At(!0),Ke(ft).some(Nt=>{var Dt,Ht;return!((Dt=Nt[0])!=null&&Dt.name&&((Ht=Nt[1])!=null&&Ht.name))})){ze.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*(){ft.map(Nt=>Ye(void 0,null,function*(){_e(Nt)}))}),onCancel:()=>{At(!1)}});return}ft.map(Nt=>Ye(void 0,null,function*(){_e(Nt)}))}),ut={name:"file",fileList:ft,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:Mt=>{if(ft!=null&&ft.some(Dt=>Dt.name===Mt.name))return oe.ZP.info(`${Mt.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(Mt.size/1024/1024>100)return oe.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Mt.name))return oe.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const Nt={name:Mt.name,uid:Mt.uid,file:Mt,percent:0};return ft.push(Nt),Ve.current=[...ft],ht([...ft]),!1}},gt=Ke(ft);return console.log(ft,gt,"fileList"),ue.createElement(ze.default,{open:rt,wrapClassName:St,onOk:Qe,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:yt},onCancel:Le,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:Me.wrap},ft.length?ue.createElement("div",null,ue.createElement(De.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:wt?"visible":"hidden"}},ue.createElement("span",{className:Me.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(fe.ZP.Group,{className:`ml20 ${Me.testCaseRadio}`,optionType:"button",value:xt,onChange:Mt=>tt(Mt.target.value)},ue.createElement(fe.ZP,{value:!1},"\u6587\u672C"),ue.createElement(fe.ZP,{value:!0},"\u6587\u4EF6"))),ue.createElement(Bt.default,Ie({},ut),ue.createElement(me.ZP,{type:"primary",className:Me.btnS},ue.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ue.createElement(st,{data:gt,onRemove:Re})):ue.createElement("div",{className:`${Me.noData} mb30`},ue.createElement(Bt.default.Dragger,We(Ie({},ut),{className:Me.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:Me.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ue.createElement("div",{className:Me.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))))},st=({data:Ct=[],onRemove:$e,width:rt="auto",showScore:St=!1,disabled:Pt=!1,inputChange:wt,onEvaluatingChange:pt,onSelectAll:ft,checkAll1:ht,checkAll2:Et,checkAll3:mt,checkAll4:yt,checkAll5:At,showEvaluatingSetting:xt=!1,className:tt="",isProgramHomework:Ve=!1})=>{const xe={value:"",filename:"",dataUrl:""},[Le,Ze]=(0,ct.useState)(Ie({},xe)),nt=He=>{let Qe=document.createElement("a");document.body.appendChild(Qe);let ut=URL.createObjectURL(He.file);Qe.href=ut,Qe.download=He.name,Qe.click(),URL.revokeObjectURL(ut),document.body.removeChild(Qe)},Re=(He,Qe)=>{(0,ie.LR)(He,Qe)},_e=(He,Qe)=>{ze.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:()=>{$e(He,Qe)},onCancel:()=>{}})};return Ct.length?ue.createElement("div",{className:tt,style:{width:rt}},ue.createElement("div",{className:`${Ve?Me.headProgram:Me.head}`},xt&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:ht,onChange:He=>{ft(He.target.checked,"hidden")}}),ue.createElement(Ce.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:Ve?"25%":"15%"}},"\u7528\u4F8B"),ue.createElement("div",{style:{width:St?Ve?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:St?Ve?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),St&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),xt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:yt,onChange:He=>{ft(He.target.checked,"input_visible")}}),ue.createElement(Ce.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"}))),xt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:Et,onChange:He=>{ft(He.target.checked,"is_invisible")}}),ue.createElement(Ce.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"}))),xt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:At,onChange:He=>{ft(He.target.checked,"actual_output_visible")}}),ue.createElement(Ce.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"}))),xt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:mt,onChange:He=>{ft(He.target.checked,"last_match_rule")}}),ue.createElement(Ce.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:Me.operation,style:Ve?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ue.createElement("div",{className:Me.listWrapper,style:{boxShadow:Ve?"0px 2px 4px 0px #EAEEF4":"unset"}},Ct.map((He,Qe)=>{var ut,gt,Mt,Nt;return ue.createElement("div",{key:Qe,className:Me.list,style:Ve?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},xt&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(ke.default,{checked:!!He.hidden,onChange:Dt=>{pt(Dt.target.checked,Qe,"hidden")}})),ue.createElement("div",{style:{width:Ve?"25%":"15%",paddingLeft:Ve?"5px":"0px",paddingRight:Ve?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",Qe+1),ue.createElement("div",{className:Me.info,style:{width:St?Ve?"20%":"15%":"25%"}},ue.createElement("span",{title:He.input||((ut=He[0])==null?void 0:ut.name),onClick:()=>Ye(void 0,null,function*(){let Dt;He.input?He.input_file_url?Dt=He.input_file_url:Dt=He.in_file:Dt=He[0];let Ht;typeof Dt=="string"?(Ht=yield fetch(Dt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Ze({value:yield Ht.text(),filename:"",dataUrl:Dt})):(Ht=yield(0,ie.db)(Dt.file),Ze({value:Ht.text,filename:Dt.name,dataUrl:Ht.link}))})},He.input||((gt=He[0])==null?void 0:gt.name))),ue.createElement("div",{className:Me.info,style:{width:St?Ve?"20%":"15%":"25%"}},ue.createElement("span",{title:He.output||((Mt=He[1])==null?void 0:Mt.name),onClick:()=>Ye(void 0,null,function*(){let Dt;He.input?He.output_file_url?Dt=He.output_file_url:Dt=He.out_file:Dt=He[1];let Ht;typeof Dt=="string"?(Ht=yield fetch(Dt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Ze({value:yield Ht.text(),filename:"",dataUrl:Dt})):(Ht=yield(0,ie.db)(Dt.file),Ze({value:Ht.text,filename:Dt.name,dataUrl:Ht.link}))})},He.output||((Nt=He[1])==null?void 0:Nt.name))),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Se.default,{size:"large",addonAfter:Ve?"%":null,disabled:Pt,style:{width:"80%"},onChange:Dt=>wt(Dt,Qe),value:He.score}),!Ve&&ue.createElement("span",null,"\xA0%")),xt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.input_visible||!1,onChange:Dt=>{pt(Dt.target.checked,Qe,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.is_invisible||!1,onChange:Dt=>{pt(Dt.target.checked,Qe,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.actual_output_visible||!1,onChange:Dt=>{pt(Dt.target.checked,Qe,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),xt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.last_match_rule||!1,onChange:Dt=>{pt(Dt.target.checked,Qe,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ue.createElement("div",{onClick:()=>_e(He,Qe),style:Ve?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ue.createElement("span",{className:Me.del},"\u5220\u9664")))})),ue.createElement(le.Z,{close:!0,data:Le.dataUrl,filename:Le.filename,type:Le.dataUrl.length?"txt":"",onClose:()=>Ze(Ie({},xe)),monacoEditor:{value:Le.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var dt=ot},81428:function(gn,cn,at){"use strict";at.d(cn,{AL:function(){return ge},Iy:function(){return Me},Qv:function(){return de},ez:function(){return ue},jb:function(){return ve}});var ct=at(32834),Bt=at.n(ct),oe=at(11690),ze=at.n(oe);let De=1;function fe(Ne,Ae){const Ie=Ne.match(/^(\s+)(?:```)/);if(Ie===null)return Ae;const We=Ie[1];return Ae.split(`
`).map(Ye=>{const Ue=Ye.match(/^\s+/);if(Ue===null)return Ye;const[Ke]=Ue;return Ke.length>=We.length?Ye.slice(We.length):Ye}).join(`
`)}let me=[],ke=["<ul>"];const Ce=new(Bt()).Renderer,Se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Me(){me.length=0,ke=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function we(Ne,Ae,Ie,We){if(Ae>=Ne.length||Ne[Ae].level<=Ie)return Ae;var Ye=Ne[Ae];We.push("<li><a href='#"+De+Ye.anchor+"'>"+Ye.text+"</a>"),Ae++;var Ue=[];return Ae=we(Ne,Ae,Ye.level,Ue),Ue.length>0&&(We.push("<ul>"),Ue.forEach(function(Ke){We.push(Ke)}),We.push("</ul>")),We.push("</li>"),Ae=we(Ne,Ae,Ie,We),Ae}function de(){return we(me,0,0,ke),ke.push("</ul>"),ke.join("")}const z={heading(Ne){const Ae=Se.exec(Ne);if(De+=1,Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},fences(Ne){const Ae=this.rules.block.fences.exec(Ne);if(Ae){const Ie=Ae[0];let We=fe(Ie,Ae[3]||"");const Ye=Ae[2]?Ae[2].trim():Ae[2];if(["latex","katex","math"].indexOf(Ye)>=0){const Ue=ie(),Ke=We;We=Ue,le[Ue]={type:"block",expression:Ke}}return{type:"code",raw:Ie,lang:Ye,text:We}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ae=0;const ie=()=>`__special_katext_id_${ae++}__`;let le={};function ue(){return le}function ge(){ae=0,le={}}function Pe(Ne){return Ne=Ne.replace(ee,(Ae,Ie)=>{const We=ie();return le[We]={type:"inline",expression:Ie},We}),Ne}const je=Ce.listitem;Ce.listitem=function(Ne){return je(Pe(Ne))};const Be=Ce.paragraph;Ce.paragraph=function(Ne){return Be(Pe(Ne))};const Fe=Ce.tablecell;Ce.tablecell=function(Ne,Ae){return Fe(Pe(Ne),Ae)},Ce.code=function(Ne,Ae,Ie){const We=(Ae||"").match(/\S*/)[0];return We?["latex","katex","math"].indexOf(We)>=0?`<p class='editormd-tex'>${Ne}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ae}">${Ie?Ne:(0,oe.escape)(Ne,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Ie?Ne:(0,oe.escape)(Ne,!0))+"</code></pre>"},Ce.heading=function(Ne,Ae,Ie){let We=this.options.headerPrefix+Ie.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return me.push({anchor:We,level:Ae,text:Ne}),"<h"+Ae+' id="'+De+We+'">'+Ne+"</h"+Ae+">"},Bt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Bt().use({tokenizer:z,renderer:Ce}),cn.ZP=Bt()},23992:function(gn,cn,at){"use strict";at.d(cn,{G:function(){return De},t:function(){return ze}});var ct=at(7062),Bt=at.n(ct);const oe=null;function ze(fe,me){let ke=Bt().get("__ec");ke||(ke={}),ke[fe]=me,Bt().set("__ec",ke)}function De(fe,me){let ke=Bt().get("__ec");return ke?ke[fe]===void 0?me:ke[fe]:me}},47257:function(gn){(function(cn){(function(at){if(1)gn.exports=at();else var ct})(function(){var at,ct,Bt;return function(){function oe(ze,De,fe){function me(Se,Me){if(!De[Se]){if(!ze[Se]){var ve=void 0;if(!Me&&ve)return require(Se,!0);if(ke)return ke(Se,!0);var we=new Error("Cannot find module '"+Se+"'");throw we.code="MODULE_NOT_FOUND",we}var de=De[Se]={exports:{}};ze[Se][0].call(de.exports,function(z){var ee=ze[Se][1][z];return me(ee||z)},de,de.exports,oe,ze,De,fe)}return De[Se].exports}for(var ke=void 0,Ce=0;Ce<fe.length;Ce++)me(fe[Ce]);return me}return oe}()({1:[function(oe,ze,De){"use strict";var fe=oe("./browser/client");fe.Buffer=oe("buffer").Buffer,fe.urllib=oe("../shims/xhr"),fe.version=oe("./browser/version").version,ze.exports=fe},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.slice.js");var Ce=oe("assert"),Se=oe("../common/utils/checkBucketName"),Me=Se.checkBucketName,ve=De;function we(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function de(z){return z?we(z)?z:[z]:[]}ve.useBucket=function(ee){return Me(ee),this.options.bucket=ee,this},ve.setBucket=function(ee){return Me(ee),this.options.bucket=ee,this},ve.getBucket=function(){return this.options.bucket},ve.deleteBucket=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"",le),je.next=3,this.request(ue);case 3:if(ge=je.sent,!(ge.status===200||ge.status===204)){je.next=6;break}return je.abrupt("return",{res:ge.res});case 6:return je.next=8,this.requestError(ge);case 8:throw je.sent;case 9:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketACL=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ge=this._bucketRequestParams("PUT",ie,"acl",ue),ge.headers={"x-oss-acl":le},ge.successStatuses=[200],Be.next=5,this.request(ge);case 5:return Pe=Be.sent,Be.abrupt("return",{bucket:Pe.headers.location&&Pe.headers.location.substring(1)||null,res:Pe.res});case 7:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketACL=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("GET",ie,"acl",le),ue.successStatuses=[200],ue.xmlResponse=!0,je.next=5,this.request(ue);case 5:return ge=je.sent,je.abrupt("return",{acl:ge.data.AccessControlList.Grant,owner:{id:ge.data.Owner.ID,displayName:ge.data.Owner.DisplayName},res:ge.res});case 7:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ge=this._bucketRequestParams("PUT",ie,"logging",ue),Pe=`<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>`.concat(ie,`</TargetBucket>
`),le&&(Pe+="<TargetPrefix>".concat(le,`</TargetPrefix>
`)),Pe+=`</LoggingEnabled>
</BucketLoggingStatus>`,ge.content=Pe,ge.mime="xml",ge.successStatuses=[200],Fe.next=9,this.request(ge);case 9:return je=Fe.sent,Fe.abrupt("return",{res:je.res});case 11:case"end":return Fe.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ue=this._bucketRequestParams("GET",ie,"logging",le),ue.successStatuses=[200],ue.xmlResponse=!0,Be.next=5,this.request(ue);case 5:return ge=Be.sent,Pe=ge.data.LoggingEnabled,Be.abrupt("return",{enable:!!Pe,prefix:Pe&&Pe.TargetPrefix||null,res:ge.res});case 8:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"logging",le),ue.successStatuses=[204,200],je.next=4,this.request(ue);case 4:return ge=je.sent,je.abrupt("return",{res:ge.res});case 6:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe,je,Be,Fe,Ne,Ae,Ie,We,Ye;return me.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:for(le=le||[],Ce(le.length,"rules is required"),le.forEach(function(ot){Ce(ot.allowedOrigin,"allowedOrigin is required"),Ce(ot.allowedMethod,"allowedMethod is required")}),ge=this._bucketRequestParams("PUT",ie,"cors",ue),Pe=`<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>`,je=function(st){Pe+="<AllowedOrigin>".concat(st,"</AllowedOrigin>")},Be=function(st){Pe+="<AllowedMethod>".concat(st,"</AllowedMethod>")},Fe=function(st){Pe+="<AllowedHeader>".concat(st,"</AllowedHeader>")},Ne=function(st){Pe+="<ExposeHeader>".concat(st,"</ExposeHeader>")},Ae=0,Ie=le.length;Ae<Ie;Ae++)We=le[Ae],Pe+="<CORSRule>",de(We.allowedOrigin).forEach(je),de(We.allowedMethod).forEach(Be),de(We.allowedHeader).forEach(Fe),de(We.exposeHeader).forEach(Ne),We.maxAgeSeconds&&(Pe+="<MaxAgeSeconds>".concat(We.maxAgeSeconds,"</MaxAgeSeconds>")),Pe+="</CORSRule>";return Pe+="</CORSConfiguration>",ge.content=Pe,ge.mime="xml",ge.successStatuses=[200],Ke.next=16,this.request(ge);case 16:return Ye=Ke.sent,Ke.abrupt("return",{res:Ye.res});case 18:case"end":return Ke.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe,je;return me.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 ge=Fe.sent,Pe=[],ge.data&&ge.data.CORSRule&&(je=ge.data.CORSRule,we(je)||(je=[je]),je.forEach(function(Ne){var Ae={};Object.keys(Ne).forEach(function(Ie){Ae[Ie.slice(0,1).toLowerCase()+Ie.slice(1,Ie.length)]=Ne[Ie]}),Pe.push(Ae)})),Fe.abrupt("return",{rules:Pe,res:ge.res});case 9:case"end":return Fe.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"cors",le),ue.successStatuses=[204],je.next=4,this.request(ue);case 4:return ge=je.sent,je.abrupt("return",{res:ge.res});case 6:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue,ge){var Pe,je,Be,Fe;return me.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(Pe=this._bucketRequestParams("PUT",ie,"referer",ge),je=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,je+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
`),ue&&ue.length>0){for(je+=` <RefererList>
`,Be=0;Be<ue.length;Be++)je+=" <Referer>".concat(ue[Be],`</Referer>
`);je+=` </RefererList>
`}else je+=` <RefererList />
`;return je+="</RefererConfiguration>",Pe.content=je,Pe.mime="xml",Pe.successStatuses=[200],Ae.next=10,this.request(Pe);case 10:return Fe=Ae.sent,Ae.abrupt("return",{res:Fe.res});case 12:case"end":return Ae.stop()}},ae,this)}));function ee(ae,ie,le,ue){return z.apply(this,arguments)}return ee}(),ve.getBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ue=this._bucketRequestParams("GET",ie,"referer",le),ue.successStatuses=[200],ue.xmlResponse=!0,Be.next=5,this.request(ue);case 5:return ge=Be.sent,Pe=ge.data.RefererList.Referer||null,Pe&&(we(Pe)||(Pe=[Pe])),Be.abrupt("return",{allowEmpty:ge.data.AllowEmptyReferer==="true",referers:Pe,res:ge.res});case 9:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return ge.next=2,this.putBucketReferer(ie,!0,null,le);case 2:return ge.abrupt("return",ge.sent);case 3:case"end":return ge.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve._bucketRequestParams=function(ee,ae,ie,le){return{method:ee,bucket:ae,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(oe,ze,De){(function(fe,me){(function(){"use strict";var ke=oe("@babel/runtime/helpers/interopRequireDefault"),Ce=ke(oe("@babel/runtime/regenerator")),Se=ke(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.to-string.js");var Me=oe("debug")("ali-oss"),ve=oe("xml2js"),we=oe("agentkeepalive"),de=oe("merge-descriptors"),z=oe("platform"),ee=oe("utility"),ae=oe("urllib"),ie=oe("./version"),le=oe("bowser"),ue=oe("../common/signUtils"),ge=oe("../common/client/initOptions"),Pe=oe("../common/utils/createRequest"),je=Pe.createRequest,Be=oe("../common/utils/encoder"),Fe=Be.encoder,Ne=oe("../common/client/getReqUrl"),Ae=Ne.getReqUrl,Ie=oe("../common/utils/setSTSToken"),We=Ie.setSTSToken,Ye=oe("../common/utils/retry"),Ue=Ye.retry,Ke=oe("../common/utils/isFunction"),ot=Ke.isFunction,st=new we;function dt(){var wt=z.name,pt=z.version;wt&&wt.toLowerCase&&wt.toLowerCase()==="ie"&&pt.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Ct(){return location&&location.protocol==="https:"}function $e(wt,pt){if(dt(),!(this instanceof $e))return new $e(wt,pt);wt&&wt.inited?this.options=wt:this.options=$e.initOptions(wt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ae,this.agent=this.options.agent||st),this.ctx=pt,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}ze.exports=$e,$e.initOptions=function(pt){pt.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var ft=Object.assign({secure:Ct(),useFetch:!1},pt);return ge(ft)};var rt=$e.prototype;rt.debug=Me,de(rt,oe("./object")),de(rt,oe("./bucket")),de(rt,oe("../common/bucket/getBucketWebsite")),de(rt,oe("../common/bucket/putBucketWebsite")),de(rt,oe("../common/bucket/deleteBucketWebsite")),de(rt,oe("../common/bucket/getBucketLifecycle")),de(rt,oe("../common/bucket/putBucketLifecycle")),de(rt,oe("../common/bucket/deleteBucketLifecycle")),de(rt,oe("../common/bucket/putBucketVersioning")),de(rt,oe("../common/bucket/getBucketVersioning")),de(rt,oe("../common/bucket/getBucketInventory")),de(rt,oe("../common/bucket/deleteBucketInventory")),de(rt,oe("../common/bucket/listBucketInventory")),de(rt,oe("../common/bucket/putBucketInventory")),de(rt,oe("../common/bucket/abortBucketWorm")),de(rt,oe("../common/bucket/completeBucketWorm")),de(rt,oe("../common/bucket/extendBucketWorm")),de(rt,oe("../common/bucket/getBucketWorm")),de(rt,oe("../common/bucket/initiateBucketWorm")),de(rt,oe("./managed-upload")),de(rt,oe("../common/multipart-copy")),de(rt,oe("../common/multipart")),de(rt,oe("../common/parallel")),rt.signature=function(pt){return this.debug("authorization stringToSign: %s",pt,"info"),ue.computeSignature(this.options.accessKeySecret,pt,this.options.headerEncoding)},rt._getReqUrl=Ae,rt.authorization=function(pt,ft,ht,Et){var mt=ue.buildCanonicalString(pt.toUpperCase(),ft,{headers:Et,parameters:ht});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,mt,this.options.headerEncoding)},rt.request=function(){var wt=(0,Se.default)(Ce.default.mark(function pt(ft){var ht=this;return Ce.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:if(!this.options.retryMax){mt.next=6;break}return mt.next=3,Ue(St.bind(this),this.options.retryMax,{errorHandler:function(At){var xt=function(Ve){if(ft.stream)return!1;var xe=[-1,-2].includes(Ve.status),Le=ht.options.requestErrorRetryHandle||function(){return!0};return xe&&Le(Ve)};return!!xt(At)}})(ft);case 3:return mt.abrupt("return",mt.sent);case 6:return mt.abrupt("return",St.call(this,ft));case 7:case"end":return mt.stop()}},pt,this)}));return function(pt){return wt.apply(this,arguments)}}();function St(wt){return Pt.apply(this,arguments)}function Pt(){return Pt=(0,Se.default)(Ce.default.mark(function wt(pt){var ft,ht,Et,mt,yt,At;return Ce.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(!(this.options.stsToken&&ot(this.options.refreshSTSToken))){tt.next=3;break}return tt.next=3,We.call(this);case 3:return ft=je.call(this,pt),this.options.useFetch||(ft.params.mode="disable-fetch"),mt=!!pt.stream,tt.prev=6,tt.next=9,this.urllib.request(ft.url,ft.params);case 9:ht=tt.sent,this.debug("response %s %s, got %s, headers: %j",pt.method,ft.url,ht.status,ht.headers,"info"),tt.next=16;break;case 13:tt.prev=13,tt.t0=tt.catch(6),Et=tt.t0;case 16:if(!(ht&&pt.successStatuses&&pt.successStatuses.indexOf(ht.status)===-1)){tt.next=28;break}return tt.next=19,this.requestError(ht);case 19:if(yt=tt.sent,!(yt.code==="RequestTimeTooSkewed"&&!mt)){tt.next=25;break}return this.options.amendTimeSkewed=+new Date(yt.serverTime)-new Date,tt.next=24,this.request(pt);case 24:return tt.abrupt("return",tt.sent);case 25:yt.params=pt,tt.next=32;break;case 28:if(!Et){tt.next=32;break}return tt.next=31,this.requestError(Et);case 31:yt=tt.sent;case 32:if(!yt){tt.next=34;break}throw yt;case 34:if(!pt.xmlResponse){tt.next=39;break}return tt.next=37,this.parseXML(ht.data);case 37:At=tt.sent,ht.data=At;case 39:return tt.abrupt("return",ht);case 40:case"end":return tt.stop()}},wt,this,[[6,13]])})),Pt.apply(this,arguments)}rt._getResource=function(pt){var ft="/";return pt.bucket&&(ft+="".concat(pt.bucket,"/")),pt.object&&(ft+=Fe(pt.object,this.options.headerEncoding)),ft},rt._escape=function(pt){return ee.encodeURIComponent(pt).replace(/%2F/g,"/")},rt._getUserAgent=function(){var pt=me&&me.browser?"js":"nodejs",ft="aliyun-sdk-".concat(pt,"/").concat(ie.version),ht=z.description;return!ht&&me&&(ht="Node.js ".concat(me.version.slice(1)," on ").concat(me.platform," ").concat(me.arch)),this._checkUserAgent("".concat(ft," ").concat(ht))},rt._checkUserAgent=function(pt){var ft=pt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return ft},rt.checkBrowserAndVersion=function(pt,ft){return le.name===pt&&le.version.split(".")[0]===ft},rt.parseXML=function(pt){return new Promise(function(ft,ht){fe.isBuffer(pt)&&(pt=pt.toString()),ve.parseString(pt,{explicitRoot:!1,explicitArray:!1},function(Et,mt){Et?ht(Et):ft(mt)})})},rt.requestError=function(){var wt=(0,Se.default)(Ce.default.mark(function ft(ht){var Et,mt,yt,At;return Ce.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Et=null,!(!ht.data||!ht.data.length)){tt.next=5;break}ht.status===-1||ht.status===-2?(Et=new Error(ht.message),Et.name=ht.name,Et.status=ht.status,Et.code=ht.name):(ht.status===404?(Et=new Error("Object not exists"),Et.name="NoSuchKeyError",Et.status=404,Et.code="NoSuchKey"):ht.status===412?(Et=new Error("Pre condition failed"),Et.name="PreconditionFailedError",Et.status=412,Et.code="PreconditionFailed"):(Et=new Error("Unknow error, status: ".concat(ht.status)),Et.name="UnknownError",Et.status=ht.status),Et.requestId=ht.headers["x-oss-request-id"],Et.host=""),tt.next=32;break;case 5:return mt=String(ht.data),this.debug("request response error data: %s",mt,"error"),tt.prev=7,tt.next=10,this.parseXML(mt);case 10:if(tt.t0=tt.sent,tt.t0){tt.next=13;break}tt.t0={};case 13:yt=tt.t0,tt.next=23;break;case 16:return tt.prev=16,tt.t1=tt.catch(7),this.debug(mt,"error"),tt.t1.message+=`
raw xml: `.concat(mt),tt.t1.status=ht.status,tt.t1.requestId=ht.headers["x-oss-request-id"],tt.abrupt("return",tt.t1);case 23:At=yt.Message||"unknow request error, status: ".concat(ht.status),yt.Condition&&(At+=" (condition: ".concat(yt.Condition,")")),Et=new Error(At),Et.name=yt.Code?"".concat(yt.Code,"Error"):"UnknownError",Et.status=ht.status,Et.code=yt.Code,Et.requestId=yt.RequestId,Et.hostId=yt.HostId,Et.serverTime=yt.ServerTime;case 32:return this.debug("generate error %j",Et,"error"),tt.abrupt("return",Et);case 34:case"end":return tt.stop()}},ft,this,[[7,16]])}));function pt(ft){return wt.apply(this,arguments)}return pt}()}).call(this)}).call(this,{isBuffer:oe("../../node_modules/is-buffer/index.js")},oe("_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(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("util"),Me=oe("path"),ve=oe("mime"),we=oe("copy-to"),de=oe("../common/utils/isBlob"),z=de.isBlob,ee=oe("../common/utils/isFile"),ae=ee.isFile,ie=oe("../common/utils/isBuffer"),le=ie.isBuffer,ue=De;ue.multipartUpload=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Ie,We){var Ye,Ue,Ke,ot,st,dt,Ct,$e,rt,St=arguments;return ke.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(Ye=St.length>2&&St[2]!==void 0?St[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){wt.next=8;break}return We&&ae(We)&&(Ye.checkpoint.file=We),wt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return wt.abrupt("return",wt.sent);case 8:return Ue=102400,Ye.mime||(ae(We)?Ye.mime=ve.getType(Me.extname(We.name)):z(We)?Ye.mime=We.type:le(We)?Ye.mime="":Ye.mime=ve.getType(Me.extname(We))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),wt.next=14,this._getFileSize(We);case 14:if(Ke=wt.sent,!(Ke<Ue)){wt.next=26;break}return Ye.contentLength=Ke,wt.next=19,this.put(Ie,We,Ye);case 19:if(ot=wt.sent,!(Ye&&Ye.progress)){wt.next=23;break}return wt.next=23,Ye.progress(1);case 23:return st={res:ot.res,bucket:this.options.bucket,name:Ie,etag:ot.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(st.data=ot.data),wt.abrupt("return",st);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<Ue)){wt.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ue));case 30:return wt.next=32,this.initMultipartUpload(Ie,Ye);case 32:if(dt=wt.sent,Ct=dt.uploadId,$e=this._getPartSize(Ke,Ye.partSize),rt={file:We,name:Ie,fileSize:Ke,partSize:$e,uploadId:Ct,doneParts:[]},!(Ye&&Ye.progress)){wt.next=39;break}return wt.next=39,Ye.progress(0,rt,dt.res);case 39:return wt.next=41,this._resumeMultipart(rt,Ye);case 41:return wt.abrupt("return",wt.sent);case 42:case"end":return wt.stop()}},Ae,this)}));function Ne(Ae,Ie){return Fe.apply(this,arguments)}return Ne}(),ue._resumeMultipart=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Ie,We){var Ye,Ue,Ke,ot,st,dt,Ct,$e,rt,St,Pt,wt,pt,ft,ht,Et,mt,yt,At;return ke.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Ye=this,!this.isCancel()){tt.next=3;break}throw this._makeCancelEvent();case 3:return Ue=Ie.file,Ke=Ie.fileSize,ot=Ie.partSize,st=Ie.uploadId,dt=Ie.doneParts,Ct=Ie.name,$e=[],dt.length>0&&we(dt).to($e),rt=this._divideParts(Ke,ot),St=rt.length,Pt=!1,wt=function(xe,Le){return new Promise(function(){var Ze=(0,Ce.default)(ke.default.mark(function nt(Re,_e){var He,Qe,ut,gt,Mt;return ke.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(Dt.prev=0,xe.isCancel()){Dt.next=29;break}return He=rt[Le-1],Dt.next=5,xe._createBuffer(Ue,He.start,He.end);case 5:return Qe=Dt.sent,ut={content:Qe,size:He.end-He.start},Dt.prev=7,Dt.next=10,xe._uploadPart(Ct,st,Le,ut,We);case 10:gt=Dt.sent,Dt.next=18;break;case 13:if(Dt.prev=13,Dt.t0=Dt.catch(7),Dt.t0.status!==404){Dt.next=17;break}throw xe._makeAbortEvent();case 17:throw Dt.t0;case 18:if(!(!xe.isCancel()&&!Pt)){Dt.next=26;break}if(Ie.doneParts.push({number:Le,etag:gt.res.headers.etag}),!We.progress){Dt.next=23;break}return Dt.next=23,We.progress(dt.length/(St+1),Ie,gt.res);case 23:Re({number:Le,etag:gt.res.headers.etag}),Dt.next=27;break;case 26:Re();case 27:Dt.next=30;break;case 29:Re();case 30:Dt.next=41;break;case 32:Dt.prev=32,Dt.t1=Dt.catch(0),Mt=new Error,Mt.name=Dt.t1.name,Mt.message=Dt.t1.message,Mt.stack=Dt.t1.stack,Mt.partNum=Le,we(Dt.t1).to(Mt),_e(Mt);case 41:case"end":return Dt.stop()}},nt,null,[[0,32],[7,13]])}));return function(nt,Re){return Ze.apply(this,arguments)}}())},pt=Array.from(new Array(St),function(Ve,xe){return xe+1}),ft=$e.map(function(Ve){return Ve.number}),ht=pt.filter(function(Ve){return ft.indexOf(Ve)<0}),Et=5,mt=We.parallel||Et,tt.next=17,this._parallel(ht,mt,function(Ve){return new Promise(function(xe,Le){wt(Ye,Ve).then(function(Ze){Ze&&$e.push(Ze),xe()}).catch(function(Ze){Le(Ze)})})});case 17:if(yt=tt.sent,Pt=!0,At=yt.find(function(Ve){return Ve.name==="abort"}),!At){tt.next=22;break}throw At;case 22:if(!this.isCancel()){tt.next=25;break}throw wt=null,this._makeCancelEvent();case 25:if(!(yt&&yt.length>0)){tt.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 tt.next=30,this.completeMultipartUpload(Ct,st,$e,We);case 30:return tt.abrupt("return",tt.sent);case 31:case"end":return tt.stop()}},Ae,this)}));function Ne(Ae,Ie){return Fe.apply(this,arguments)}return Ne}(),ue._getFileSize=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Ie){return ke.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(Ie)){Ye.next=4;break}return Ye.abrupt("return",Ie.length);case 4:if(!(z(Ie)||ae(Ie))){Ye.next=6;break}return Ye.abrupt("return",Ie.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Ye.stop()}},Ae)}));function Ne(Ae){return Fe.apply(this,arguments)}return Ne}();var ge=oe("stream"),Pe=ge.Readable;function je(Fe,Ne){if(!(this instanceof je))return new je(Fe,Ne);Pe.call(this,Ne),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}Se.inherits(je,Pe),je.prototype.readFileAndPush=function(Ne){if(this.fileBuffer)for(var Ae=!0;Ae&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Ie=this.start,We=Ie+Ne;We=We>this.fileBuffer.length?this.fileBuffer.length:We,this.start=We,Ae=this.push(this.fileBuffer.slice(Ie,We))}},je.prototype._read=function(Ne){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 Ae=16*1024;Ne=Ne||Ae;var Ie=this;this.reader.onload=function(Ye){Ie.fileBuffer=fe.from(new Uint8Array(Ye.target.result)),Ie.file=null,Ie.readFileAndPush(Ne)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Ne)};function Be(Fe){return Fe.arrayBuffer?Fe.arrayBuffer():new Promise(function(Ne,Ae){var Ie=new FileReader;Ie.onload=function(We){Ne(We.target.result)},Ie.onerror=function(We){Ae(We)},Ie.readAsArrayBuffer(Fe)})}ue._createBuffer=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Ie,We,Ye){var Ue,Ke;return ke.default.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:if(!(z(Ie)||ae(Ie))){st.next=8;break}return Ue=Ie.slice(We,Ye),st.next=4,Be(Ue);case 4:return Ke=st.sent,st.abrupt("return",fe.from(Ke));case 8:if(!le(Ie)){st.next=12;break}return st.abrupt("return",Ie.subarray(We,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return st.stop()}},Ae)}));function Ne(Ae,Ie,We){return Fe.apply(this,arguments)}return Ne}(),ue._getPartSize=function(Ne,Ae){var Ie=1e4,We=1*1024*1024;Ae||(Ae=We);var Ye=Math.ceil(Ne/Ie);return Ae<Ye&&(Ae=Ye,console.warn("partSize has been set to ".concat(Ae,", because the partSize you provided causes partNumber to be greater than 10,000"))),Ae},ue._divideParts=function(Ne,Ae){for(var Ie=Math.ceil(Ne/Ae),We=[],Ye=0;Ye<Ie;Ye++){var Ue=Ae*Ye,Ke=Math.min(Ue+Ae,Ne);We.push({start:Ue,end:Ke})}return We}}).call(this)}).call(this,oe("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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.promise.js");var me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("fs"),Se=oe("copy-to"),Me=oe("path"),ve=oe("mime"),we=oe("../common/callback"),de=oe("merge-descriptors"),z=oe("../common/utils/isBlob"),ee=z.isBlob,ae=oe("../common/utils/isFile"),ie=ae.isFile,le=oe("../common/utils/isBuffer"),ue=le.isBuffer,ge=oe("../common/utils/obj2xml"),Pe=ge.obj2xml,je=De;je.append=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Ie,We){var Ye;return me.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return We=We||{},We.position===void 0&&(We.position="0"),We.subres={append:"",position:We.position},We.method="POST",Ke.next=6,this.put(Ae,Ie,We);case 6:return Ye=Ke.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Ke.abrupt("return",Ye);case 9:case"end":return Ke.stop()}},Ne,this)}));function Fe(Ne,Ae,Ie){return Be.apply(this,arguments)}return Fe}(),je.put=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Ie,We){var Ye,Ue,Ke,ot,st;return me.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(We=We||{},We.disabledMD5=We.disabledMD5===void 0?!0:!!We.disabledMD5,We.headers=We.headers||{},Ae=this._objectName(Ae),!ue(Ie)){Ct.next=8;break}Ye=Ie,Ct.next=19;break;case 8:if(!(ee(Ie)||ie(Ie))){Ct.next=18;break}return We.mime||(ie(Ie)?We.mime=ve.getType(Me.extname(Ie.name)):We.mime=Ie.type),Ct.next=12,this._createBuffer(Ie,0,Ie.size);case 12:return Ye=Ct.sent,Ct.next=15,this._getFileSize(Ie);case 15:We.contentLength=Ct.sent,Ct.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(We.meta,We.headers),Ue=We.method||"PUT",Ke=this._objectRequestParams(Ue,Ae,We),we.encodeCallback(Ke,We),Ke.mime=We.mime,Ke.disabledMD5=We.disabledMD5,Ke.content=Ye,Ke.successStatuses=[200],Ct.next=29,this.request(Ke);case 29:return ot=Ct.sent,st={name:Ae,url:this._objectUrl(Ae),res:ot.res},Ke.headers&&Ke.headers["x-oss-callback"]&&(st.data=JSON.parse(ot.data.toString())),Ct.abrupt("return",st);case 33:case"end":return Ct.stop()}},Ne,this)}));function Fe(Ne,Ae,Ie){return Be.apply(this,arguments)}return Fe}(),je.putStream=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Ie,We){var Ye,Ue,Ke,ot;return me.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return We=We||{},We.headers=We.headers||{},Ae=this._objectName(Ae),We.contentLength?We.headers["Content-Length"]=We.contentLength:We.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(We.meta,We.headers),Ye=We.method||"PUT",Ue=this._objectRequestParams(Ye,Ae,We),we.encodeCallback(Ue,We),Ue.mime=We.mime,Ue.stream=Ie,Ue.successStatuses=[200],dt.next=13,this.request(Ue);case 13:return Ke=dt.sent,ot={name:Ae,url:this._objectUrl(Ae),res:Ke.res},Ue.headers&&Ue.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ke.data.toString())),dt.abrupt("return",ot);case 17:case"end":return dt.stop()}},Ne,this)}));function Fe(Ne,Ae,Ie){return Be.apply(this,arguments)}return Fe}(),de(je,oe("../common/object/copyObject")),de(je,oe("../common/object/getObjectTagging")),de(je,oe("../common/object/putObjectTagging")),de(je,oe("../common/object/deleteObjectTagging")),de(je,oe("../common/image")),de(je,oe("../common/object/getBucketVersions")),de(je,oe("../common/object/getACL")),de(je,oe("../common/object/putACL")),de(je,oe("../common/object/head")),de(je,oe("../common/object/delete")),de(je,oe("../common/object/get")),de(je,oe("../common/object/putSymlink")),de(je,oe("../common/object/getSymlink")),de(je,oe("../common/object/deleteMulti")),de(je,oe("../common/object/getObjectMeta")),de(je,oe("../common/object/getObjectUrl")),de(je,oe("../common/object/generateObjectUrl")),de(je,oe("../common/object/signatureUrl")),de(je,oe("../common/object/asyncSignatureUrl")),je.putMeta=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Ie,We){var Ye;return me.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this.copy(Ae,Ae,{meta:Ie||{},timeout:We&&We.timeout,ctx:We&&We.ctx});case 2:return Ye=Ke.sent,Ke.abrupt("return",Ye);case 4:case"end":return Ke.stop()}},Ne,this)}));function Fe(Ne,Ae,Ie){return Be.apply(this,arguments)}return Fe}(),je.list=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Ie){var We,Ye,Ue,Ke,ot;return me.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return We=this._objectRequestParams("GET","",Ie),We.query=Ae,We.xmlResponse=!0,We.successStatuses=[200],dt.next=6,this.request(We);case 6:return Ye=dt.sent,Ue=Ye.data.Contents||[],Ke=this,Ue&&(Array.isArray(Ue)||(Ue=[Ue]),Ue=Ue.map(function(Ct){return{name:Ct.Key,url:Ke._objectUrl(Ct.Key),lastModified:Ct.LastModified,etag:Ct.ETag,type:Ct.Type,size:Number(Ct.Size),storageClass:Ct.StorageClass,owner:{id:Ct.Owner.ID,displayName:Ct.Owner.DisplayName}}})),ot=Ye.data.CommonPrefixes||null,ot&&(Array.isArray(ot)||(ot=[ot]),ot=ot.map(function(Ct){return Ct.Prefix})),dt.abrupt("return",{res:Ye.res,objects:Ue,prefixes:ot,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return dt.stop()}},Ne,this)}));function Fe(Ne,Ae){return Be.apply(this,arguments)}return Fe}(),je.listV2=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae){var Ie,We,Ye,Ue,Ke,ot,st,dt=arguments;return me.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return Ie=dt.length>1&&dt[1]!==void 0?dt[1]:{},We=Ae["continuation-token"]||Ae.continuationToken,We&&(Ie.subres=Object.assign({"continuation-token":We},Ie.subres)),Ye=this._objectRequestParams("GET","",Ie),Ye.query=Object.assign({"list-type":2},Ae),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],$e.next=11,this.request(Ye);case 11:return Ue=$e.sent,Ke=Ue.data.Contents||[],ot=this,Ke&&(Array.isArray(Ke)||(Ke=[Ke]),Ke=Ke.map(function(rt){var St=null;return rt.Owner&&(St={id:rt.Owner.ID,displayName:rt.Owner.DisplayName}),{name:rt.Key,url:ot._objectUrl(rt.Key),lastModified:rt.LastModified,etag:rt.ETag,type:rt.Type,size:Number(rt.Size),storageClass:rt.StorageClass,owner:St}})),st=Ue.data.CommonPrefixes||null,st&&(Array.isArray(st)||(st=[st]),st=st.map(function(rt){return rt.Prefix})),$e.abrupt("return",{res:Ue.res,objects:Ke,prefixes:st,isTruncated:Ue.data.IsTruncated==="true",keyCount:+Ue.data.KeyCount,continuationToken:Ue.data.ContinuationToken||null,nextContinuationToken:Ue.data.NextContinuationToken||null});case 18:case"end":return $e.stop()}},Ne,this)}));function Fe(Ne){return Be.apply(this,arguments)}return Fe}(),je.restore=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae){var Ie,We,Ye,Ue,Ke=arguments;return me.default.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return Ie=Ke.length>1&&Ke[1]!==void 0?Ke[1]:{type:"Archive"},Ie=Ie||{},Ie.subres=Object.assign({restore:""},Ie.subres),Ie.versionId&&(Ie.subres.versionId=Ie.versionId),We=this._objectRequestParams("POST",Ae,Ie),Ie.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Ie.Days?Ie.Days:2,JobParameters:{Tier:Ie.JobParameters?Ie.JobParameters:"Standard"}}},We.content=Pe(Ye,{headers:!0}),We.mime="xml"),We.successStatuses=[202],st.next=9,this.request(We);case 9:return Ue=st.sent,st.abrupt("return",{res:Ue.res});case 11:case"end":return st.stop()}},Ne,this)}));function Fe(Ne){return Be.apply(this,arguments)}return Fe}(),je._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},je._objectRequestParams=function(Fe,Ne,Ae){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Ae=Ae||{},Ne=this._objectName(Ne);var Ie={object:Ne,bucket:this.options.bucket,method:Fe,subres:Ae&&Ae.subres,timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx};return Ae.headers&&(Ie.headers={},Se(Ae.headers).to(Ie.headers)),Ie},je._objectName=function(Fe){return Fe.replace(/^\/+/,"")},je._convertMetaToHeaders=function(Fe,Ne){Fe&&Object.keys(Fe).forEach(function(Ae){Ne["x-oss-meta-".concat(Ae)]=Fe[Ae]})},je._deleteFileSafe=function(Fe){var Ne=this;return new Promise(function(Ae){Ce.exists(Fe,function(Ie){Ie?Ce.unlink(Fe,function(We){We&&Ne.debug("unlink %j error: %s",Fe,We,"error"),Ae()}):Ae()})})}},{"../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(oe,ze,De){"use strict";De.version="6.18.1"},{}],7:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.abortBucketWorm=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return Ce.checkBucketName(we),z=this._bucketRequestParams("DELETE",we,"worm",de),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)})),Me.apply(this,arguments)}De.abortBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.completeBucketWorm=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we,de){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(we),ee=this._bucketRequestParams("POST",we,{wormId:de},z),le.next=4,this.request(ee);case 4:return ae=le.sent,le.abrupt("return",{res:ae.res,status:ae.status});case 6:case"end":return le.stop()}},ve,this)})),Me.apply(this,arguments)}De.completeBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.deleteBucketInventory=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee,ae,ie,le=arguments;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return z=le.length>2&&le[2]!==void 0?le[2]:{},ee=Object.assign({inventory:"",inventoryId:de},z.subres),Ce.checkBucketName(we),ae=this._bucketRequestParams("DELETE",we,ee,z),ae.successStatuses=[204],ge.next=7,this.request(ae);case 7:return ie=ge.sent,ge.abrupt("return",{status:ie.status,res:ie.res});case 9:case"end":return ge.stop()}},ve,this)})),Me.apply(this,arguments)}De.deleteBucketInventory=Se},{"../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=De;Me.deleteBucketLifecycle=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Se(z),ae=this._bucketRequestParams("DELETE",z,"lifecycle",ee),ae.successStatuses=[204],ue.next=5,this.request(ae);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=De;Me.deleteBucketWebsite=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Se(z),ae=this._bucketRequestParams("DELETE",z,"website",ee),ae.successStatuses=[204],ue.next=5,this.request(ae);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.extendBucketWorm=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Me(we,de,z,ee){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z,ee,ae){var ie,le,ue;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Ce.checkBucketName(de),ie=this._bucketRequestParams("POST",de,{wormExtend:"",wormId:z},ae),le={ExtendWormConfiguration:{RetentionPeriodInDays:ee}},ie.mime="xml",ie.content=Se.obj2xml(le,{headers:!0}),ie.successStatuses=[200],Pe.next=8,this.request(ie);case 8:return ue=Pe.sent,Pe.abrupt("return",{res:ue.res,status:ue.status});case 10:case"end":return Pe.stop()}},we,this)})),ve.apply(this,arguments)}De.extendBucketWorm=Me},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.getBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Me(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae,ie,le,ue=arguments;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ee=ue.length>2&&ue[2]!==void 0?ue[2]:{},ae=Object.assign({inventory:"",inventoryId:z},ee.subres),Ce.checkBucketName(de),ie=this._bucketRequestParams("GET",de,ae,ee),ie.successStatuses=[200],ie.xmlResponse=!0,Pe.next=8,this.request(ie);case 8:return le=Pe.sent,Pe.abrupt("return",{status:le.status,res:le.res,inventory:Se.formatInventoryConfig(le.data)});case 10:case"end":return Pe.stop()}},we,this)})),ve.apply(this,arguments)}De.getBucketInventory=Me},{"../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/isArray"),ve=Me.isArray,we=oe("../utils/formatObjKey"),de=we.formatObjKey,z=De;z.getBucketLifecycle=function(){var ee=(0,ke.default)(me.default.mark(function ie(le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Se(le),ge=this._bucketRequestParams("GET",le,"lifecycle",ue),ge.successStatuses=[200],ge.xmlResponse=!0,Fe.next=6,this.request(ge);case 6:return Pe=Fe.sent,je=Pe.data.Rule||null,je&&(ve(je)||(je=[je]),je=je.map(function(Ne){return Ne.ID&&(Ne.id=Ne.ID,delete Ne.ID),Ne.Tag&&!ve(Ne.Tag)&&(Ne.Tag=[Ne.Tag]),de(Ne,"firstLowerCase")})),Fe.abrupt("return",{rules:je,res:Pe.res});case 10:case"end":return Fe.stop()}},ie,this)}));function ae(ie,le){return ee.apply(this,arguments)}return ae}()},{"../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=De;Me.getBucketVersioning=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return Se(z),ae=this._bucketRequestParams("GET",z,"versioning",ee),ae.xmlResponse=!0,ae.successStatuses=[200],ge.next=6,this.request(ae);case 6:return ie=ge.sent,le=ie.data.Status,ge.abrupt("return",{status:ie.status,versionStatus:le,res:ie.res});case 9:case"end":return ge.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/isObject"),ve=Me.isObject,we=De;we.getBucketWebsite=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Se(ae),le=this._bucketRequestParams("GET",ae,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,je.next=6,this.request(le);case 6:return ue=je.sent,ge=[],ue.data.RoutingRules&&ue.data.RoutingRules.RoutingRule&&(ve(ue.data.RoutingRules.RoutingRule)?ge=[ue.data.RoutingRules.RoutingRule]:ge=ue.data.RoutingRules.RoutingRule),je.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:ge,error:ue.data.ErrorDocument&&ue.data.ErrorDocument.Key||null,res:ue.res});case 10:case"end":return je.stop()}},ee,this)}));function z(ee,ae){return de.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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.getBucketWorm=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/dataFix");function Me(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(de),ee=this._bucketRequestParams("GET",de,"worm",z),ee.successStatuses=[200],ee.xmlResponse=!0,le.next=6,this.request(ee);case 6:return ae=le.sent,Se.dataFix(ae.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),le.abrupt("return",Object.assign(Object.assign({},ae.data),{res:ae.res,status:ae.status}));case 9:case"end":return le.stop()}},we,this)})),ve.apply(this,arguments)}De.getBucketWorm=Me},{"../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.initiateBucketWorm=void 0;var Ce=oe("../utils/obj2xml"),Se=oe("../utils/checkBucketName");function Me(we,de,z){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z,ee){var ae,ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return Se.checkBucketName(de),ae=this._bucketRequestParams("POST",de,"worm",ee),ie={InitiateWormConfiguration:{RetentionPeriodInDays:z}},ae.mime="xml",ae.content=Ce.obj2xml(ie,{headers:!0}),ae.successStatuses=[200],ge.next=8,this.request(ae);case 8:return le=ge.sent,ge.abrupt("return",{res:le.res,wormId:le.res.headers["x-oss-worm-id"],status:le.status});case 10:case"end":return ge.stop()}},we,this)})),ve.apply(this,arguments)}De.initiateBucketWorm=Me},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.listBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Me(we){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de){var z,ee,ae,ie,le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z=je.length>1&&je[1]!==void 0?je[1]:{},ee=z.continuationToken,ae=Object.assign({inventory:""},ee&&{"continuation-token":ee},z.subres),Ce.checkBucketName(de),ie=this._bucketRequestParams("GET",de,ae,z),ie.successStatuses=[200],ie.xmlResponse=!0,Fe.next=9,this.request(ie);case 9:return le=Fe.sent,ue=le.data,ge=le.res,Pe=le.status,Fe.abrupt("return",{isTruncated:ue.IsTruncated==="true",nextContinuationToken:ue.NextContinuationToken,inventoryList:Se.formatInventoryConfig(ue.InventoryConfiguration,!0),status:Pe,res:ge});case 12:case"end":return Fe.stop()}},we,this)})),ve.apply(this,arguments)}De.listBucketInventory=Me},{"../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.putBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Me(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return ee=Ae.length>2&&Ae[2]!==void 0?Ae[2]:{},ae=Object.assign({inventory:"",inventoryId:z.id},ee.subres),Ce.checkBucketName(de),ie=z.OSSBucketDestination,le=z.optionalFields,ue=z.includedObjectVersions,ge="acs:oss:::",Pe="acs:ram::".concat(ie.accountId,":role/"),je={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:ie.format,AccountId:ie.accountId,RoleArn:"".concat(Pe).concat(ie.rolename),Bucket:"".concat(ge).concat(ie.bucket),Prefix:ie.prefix||"",Encryption:ie.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ue,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},Be=Se.obj2xml(je,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",de,ae,ee),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=Be,We.next=14,this.request(Fe);case 14:return Ne=We.sent,We.abrupt("return",{status:Ne.status,res:Ne.res});case 16:case"end":return We.stop()}},we,this)})),ve.apply(this,arguments)}De.putBucketInventory=Me},{"../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.array.includes.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/isArray"),ve=Me.isArray,we=oe("../utils/deepCopy"),de=we.deepCopy,z=oe("../utils/isObject"),ee=z.isObject,ae=oe("../utils/obj2xml"),ie=ae.obj2xml,le=oe("../utils/checkObjectTag"),ue=le.checkObjectTag,ge=oe("../utils/getStrBytesCount"),Pe=ge.getStrBytesCount,je=De;je.putBucketLifecycle=function(){var Ie=(0,ke.default)(me.default.mark(function Ye(Ue,Ke,ot){var st,dt,Ct,$e,rt;return me.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(Se(Ue),ve(Ke)){Pt.next=3;break}throw new Error("rules must be Array");case 3:return st=this._bucketRequestParams("PUT",Ue,"lifecycle",ot),dt=[],Ct={LifecycleConfiguration:{Rule:dt}},Ke.forEach(function(wt){Be(wt),Ae(wt),wt.id&&(wt.ID=wt.id,delete wt.id),dt.push(wt)}),$e=ie(Ct,{headers:!0,firstUpperCase:!0}),st.content=$e,st.mime="xml",st.successStatuses=[200],Pt.next=13,this.request(st);case 13:return rt=Pt.sent,Pt.abrupt("return",{res:rt.res});case 15:case"end":return Pt.stop()}},Ye,this)}));function We(Ye,Ue,Ke){return Ie.apply(this,arguments)}return We}();function Be(Ie){Ie.days&&(Ie.expiration={days:Ie.days}),Ie.date&&(Ie.expiration={createdBeforeDate:Ie.date})}function Fe(Ie,We){var Ye=Ie.days,Ue=Ie.createdBeforeDate;if(!Ye&&!Ue)throw new Error("".concat(We," must includes days or createdBeforeDate"));if(Ye&&!/^[1-9][0-9]*$/.test(Ye))throw new Error("days must be a positive integer");if(Ue&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(Ue))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function Ne(Ie){if(!ve(Ie)&&!ee(Ie))throw new Error("tag must be Object or Array");Ie=ee(Ie)?[Ie]:Ie;var We={},Ye=de(Ie);Ye.forEach(function(Ue){We[Ue.key]=Ue.value}),ue(We)}function Ae(Ie){if(Ie.id&&Pe(Ie.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Ie.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Ie.status))throw new Error("Status must be Enabled or Disabled");if(Ie.transition){if(!["IA","Archive"].includes(Ie.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(Ie.transition,"Transition")}if(Ie.expiration){if(!Ie.expiration.expiredObjectDeleteMarker)Fe(Ie.expiration,"Expiration");else if(Ie.expiration.days||Ie.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Ie.abortMultipartUpload&&Fe(Ie.abortMultipartUpload,"AbortMultipartUpload"),!Ie.expiration&&!Ie.abortMultipartUpload&&!Ie.transition&&!Ie.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Ie.tag){if(Ie.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Ne(Ie.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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.includes.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/obj2xml"),ve=Me.obj2xml,we=De;we.putBucketVersioning=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=je.length>2&&je[2]!==void 0?je[2]:{},Se(ae),["Enabled","Suspended"].includes(ie)){Fe.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ue=this._bucketRequestParams("PUT",ae,"versioning",le),ge={VersioningConfiguration:{Status:ie}},ue.mime="xml",ue.content=ve(ge,{headers:!0}),Fe.next=10,this.request(ue);case 10:return Pe=Fe.sent,Fe.abrupt("return",{res:Pe.res,status:Pe.status});case 12:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae){return de.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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/obj2xml"),ve=Me.obj2xml,we=oe("../utils/isArray"),de=we.isArray,z=De;z.putBucketWebsite=function(){var ee=(0,ke.default)(me.default.mark(function ie(le){var ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(ue=Ae.length>1&&Ae[1]!==void 0?Ae[1]:{},ge=Ae.length>2?Ae[2]:void 0,Se(le),Pe=this._bucketRequestParams("PUT",le,"website",ge),je={Suffix:ue.index||"index.html"},Be={IndexDocument:je},Fe={WebsiteConfiguration:Be},ue.supportSubDir&&(je.SupportSubDir=ue.supportSubDir),ue.type&&(je.Type=ue.type),ue.error&&(Be.ErrorDocument={Key:ue.error}),ue.routingRules===void 0){We.next=14;break}if(de(ue.routingRules)){We.next=13;break}throw new Error("RoutingRules must be Array");case 13:Be.RoutingRules={RoutingRule:ue.routingRules};case 14:return Fe=ve(Fe),Pe.content=Fe,Pe.mime="xml",Pe.successStatuses=[200],We.next=20,this.request(Pe);case 20:return Ne=We.sent,We.abrupt("return",{res:Ne.res});case 22:case"end":return We.stop()}},ie,this)}));function ae(ie){return ee.apply(this,arguments)}return ae}()},{"../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(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),De.encodeCallback=function(ke,Ce){if(ke.headers=ke.headers||{},!Object.prototype.hasOwnProperty.call(ke.headers,"x-oss-callback")&&Ce.callback){var Se={callbackUrl:encodeURI(Ce.callback.url),callbackBody:Ce.callback.body};Ce.callback.host&&(Se.callbackHost=Ce.callback.host),Ce.callback.contentType&&(Se.callbackBodyType=Ce.callback.contentType);var Me=fe.from(JSON.stringify(Se)).toString("base64");if(ke.headers["x-oss-callback"]=Me,Ce.callback.customValue){var ve={};Object.keys(Ce.callback.customValue).forEach(function(we){ve["x:".concat(we)]=Ce.callback.customValue[we].toString()}),ke.headers["x-oss-callback-var"]=fe.from(JSON.stringify(ve)).toString("base64")}}}}).call(this)}).call(this,oe("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(oe,ze,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var fe=function(de){return de&&de.__esModule?de:{default:de}};Object.defineProperty(De,"__esModule",{value:!0}),De.getReqUrl=void 0;var me=fe(oe("copy-to")),ke=fe(oe("url")),Ce=fe(oe("merge-descriptors")),Se=fe(oe("is-type-of")),Me=oe("../utils/isIP"),ve=oe("../utils/checkConfigValid");function we(de){var z={},ee=this.options.cname;ve.checkConfigValid(this.options.endpoint,"endpoint"),me.default(this.options.endpoint,!1).to(z),de.bucket&&!ee&&!Me.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(de.bucket,".").concat(z.host));var ae="/";de.bucket&&this.options.sldEnable&&(ae+="".concat(de.bucket,"/")),de.object&&(ae+=this._escape(de.object).replace(/\+/g,"%2B")),z.pathname=ae;var ie={};if(de.query&&Ce.default(ie,de.query),de.subres){var le={};Se.default.string(de.subres)?le[de.subres]="":Se.default.array(de.subres)?de.subres.forEach(function(ue){le[ue]=""}):le=de.subres,Ce.default(ie,le)}return z.query=ie,ke.default.format(z)}De.getReqUrl=we},{"../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(oe,ze,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.string.trim.js");var fe=oe("humanize-ms"),me=oe("url"),ke=oe("../utils/checkBucketName"),Ce=ke.checkBucketName,Se=oe("../utils/setRegion"),Me=Se.setRegion,ve=oe("../utils/checkConfigValid"),we=ve.checkConfigValid;function de(z,ee){we(z,"endpoint");var ae=me.parse(z);if(ae.protocol||(ae=me.parse("http".concat(ee?"s":"","://").concat(z))),ae.protocol!=="http:"&&ae.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return ae}ze.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&&Ce(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=fe(ee.timeout)),ee.endpoint)ee.endpoint=de(ee.endpoint,ee.secure);else if(ee.region)ee.endpoint=Me(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(oe,ze,De){"use strict";var fe=oe("merge-descriptors"),me=De;fe(me,oe("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("querystring"),ve=oe("js-base64"),we=ve.Base64.encode,de=De;de.processObjectSave=function(){var ee=(0,ke.default)(me.default.mark(function ie(le,ue,ge,Pe){var je,Be,Fe,Ne;return me.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return z(le,"sourceObject"),z(ue,"targetObject"),z(ge,"process"),ue=this._objectName(ue),Pe&&Se(Pe),je=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),Be=Pe?",b_".concat(we(Pe)):"",ue=we(ue),Fe={"x-oss-process":"".concat(ge,"|sys/saveas,o_").concat(ue).concat(Be)},je.content=Me.stringify(Fe),Ie.next=12,this.request(je);case 12:return Ne=Ie.sent,Ie.abrupt("return",{res:Ne.res,status:Ne.res.status});case 14:case"end":return Ie.stop()}},ie,this)}));function ae(ie,le,ue,ge){return ee.apply(this,arguments)}return ae}();function z(ee,ae){if(!ee)throw new Error("".concat(ae," is required"));if(typeof ee!="string")throw new Error("".concat(ae," 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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.regexp.to-string.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("debug")("ali-oss:multipart-copy"),Se=oe("copy-to"),Me=De;Me.uploadPartCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae,ie,le){var ue,ge,Pe,je,Be,Fe=arguments;return me.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ue=Fe.length>5&&Fe[5]!==void 0?Fe[5]:{},ue.headers=ue.headers||{},ge=ue.versionId||ue.subres&&ue.subres.versionId||null,ge?Pe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(ge):Pe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),ue.headers["x-oss-copy-source"]=Pe,ie&&(ue.headers["x-oss-copy-source-range"]="bytes=".concat(ie)),ue.subres={partNumber:ae,uploadId:ee},je=this._objectRequestParams("PUT",z,ue),je.mime=ue.mime,je.successStatuses=[200],Ae.next=12,this.request(je);case 12:return Be=Ae.sent,Ae.abrupt("return",{name:z,etag:Be.res.headers.etag,res:Be.res});case 14:case"end":return Ae.stop()}},de,this)}));function we(de,z,ee,ae,ie){return ve.apply(this,arguments)}return we}(),Me.multipartUploadCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Ie,We=arguments;return me.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return ae=We.length>2&&We[2]!==void 0?We[2]:{},this.resetCancelFlag(),ie=ae.versionId,le=ie===void 0?null:ie,ue={versionId:le},Ue.next=6,this._getObjectMeta(ee.sourceBucketName,ee.sourceKey,ue);case 6:if(ge=Ue.sent,Pe=ge.res.headers["content-length"],ee.startOffset=ee.startOffset||0,ee.endOffset=ee.endOffset||Pe,!(ae.checkpoint&&ae.checkpoint.uploadId)){Ue.next=14;break}return Ue.next=13,this._resumeMultipartCopy(ae.checkpoint,ee,ae);case 13:return Ue.abrupt("return",Ue.sent);case 14:if(je=102400,Be=ee.endOffset-ee.startOffset,!(Be<je)){Ue.next=18;break}throw new Error("copySize must not be smaller than ".concat(je));case 18:if(!(ae.partSize&&ae.partSize<je)){Ue.next=20;break}throw new Error("partSize must not be smaller than ".concat(je));case 20:return Ue.next=22,this.initMultipartUpload(z,ae);case 22:if(Fe=Ue.sent,Ne=Fe.uploadId,Ae=this._getPartSize(Be,ae.partSize),Ie={name:z,copySize:Be,partSize:Ae,uploadId:Ne,doneParts:[]},!(ae&&ae.progress)){Ue.next=29;break}return Ue.next=29,ae.progress(0,Ie,Fe.res);case 29:return Ue.next=31,this._resumeMultipartCopy(Ie,ee,ae);case 31:return Ue.abrupt("return",Ue.sent);case 32:case"end":return Ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}(),Me._resumeMultipartCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae){var ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Ie,We,Ye,Ue,Ke,ot,st,dt,Ct,$e,rt;return me.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(!this.isCancel()){Pt.next=2;break}throw this._makeCancelEvent();case 2:if(ie=ae.versionId,le=ie===void 0?null:ie,ue={versionId:le},ge=z.copySize,Pe=z.partSize,je=z.uploadId,Be=z.doneParts,Fe=z.name,Ne=this._divideMultipartCopyParts(ge,Pe,ee.startOffset),Ae=Ne.length,Ie={headers:{}},ae.copyheaders&&Se(ae.copyheaders).to(Ie.headers),le&&Se(ue).to(Ie),We=function(pt,ft,ht){return new Promise(function(){var Et=(0,ke.default)(me.default.mark(function mt(yt,At){var xt,tt,Ve;return me.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(Le.prev=0,pt.isCancel()){Le.next=22;break}return xt=Ne[ft-1],tt="".concat(xt.start,"-").concat(xt.end-1),Le.prev=4,Le.next=7,pt.uploadPartCopy(Fe,je,ft,tt,ht,Ie);case 7:Ve=Le.sent,Le.next=15;break;case 10:if(Le.prev=10,Le.t0=Le.catch(4),Le.t0.status!==404){Le.next=14;break}throw pt._makeAbortEvent();case 14:throw Le.t0;case 15:if(pt.isCancel()){Le.next=22;break}if(Ce("content-range ".concat(Ve.res.headers["content-range"])),Be.push({number:ft,etag:Ve.res.headers.etag}),z.doneParts=Be,!(ae&&ae.progress)){Le.next=22;break}return Le.next=22,ae.progress(Be.length/Ae,z,Ve.res);case 22:yt(),Le.next=29;break;case 25:Le.prev=25,Le.t1=Le.catch(0),Le.t1.partNum=ft,At(Le.t1);case 29:case"end":return Le.stop()}},mt,null,[[0,25],[4,10]])}));return function(mt,yt){return Et.apply(this,arguments)}}())},Ye=Array.from(new Array(Ae),function(wt,pt){return pt+1}),Ue=Be.map(function(wt){return wt.number}),Ke=Ye.filter(function(wt){return Ue.indexOf(wt)<0}),ot=5,st=ae.parallel||ot,!(this.checkBrowserAndVersion("Internet Explorer","10")||st===1)){Pt.next=28;break}dt=0;case 18:if(!(dt<Ke.length)){Pt.next=26;break}if(!this.isCancel()){Pt.next=21;break}throw this._makeCancelEvent();case 21:return Pt.next=23,We(this,Ke[dt],ee);case 23:dt++,Pt.next=18;break;case 26:Pt.next=40;break;case 28:return Pt.next=30,this._parallelNode(Ke,st,We,ee);case 30:if(Ct=Pt.sent,$e=Ct.find(function(wt){return wt.name==="abort"}),!$e){Pt.next=34;break}throw $e;case 34:if(!this.isCancel()){Pt.next=36;break}throw this._makeCancelEvent();case 36:if(!(Ct&&Ct.length>0)){Pt.next=40;break}throw rt=Ct[0],rt.message="Failed to copy some parts with error: ".concat(rt.toString()," part_num: ").concat(rt.partNum),rt;case 40:return Pt.next=42,this.completeMultipartUpload(Fe,je,Be,ae);case 42:return Pt.abrupt("return",Pt.sent);case 43:case"end":return Pt.stop()}},de,this)}));function we(de,z,ee){return ve.apply(this,arguments)}return we}(),Me._divideMultipartCopyParts=function(we,de,z){for(var ee=Math.ceil(we/de),ae=[],ie=0;ie<ee;ie++){var le=de*ie+z,ue=Math.min(le+de,we+z);ae.push({start:le,end:ue})}return ae},Me._getObjectMeta=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae){var ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return ie=this.getBucket(),this.setBucket(z),ge.next=4,this.head(ee,ae);case 4:return le=ge.sent,this.setBucket(ie),ge.abrupt("return",le);case 7:case"end":return ge.stop()}},de,this)}));function we(de,z,ee){return ve.apply(this,arguments)}return we}()},{"@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(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("copy-to"),Me=oe("./callback"),ve=oe("./utils/deepCopy"),we=ve.deepCopyWith,de=oe("./utils/isBuffer"),z=de.isBuffer,ee=oe("./utils/omit"),ae=ee.omit,ie=De;ie.listUploads=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je){var Be,Fe,Ne,Ae;return ke.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return je=je||{},Be={},Se(je).to(Be),Be.subres="uploads",Fe=this._objectRequestParams("GET","",Be),Fe.query=Pe,Fe.xmlResponse=!0,Fe.successStatuses=[200],We.next=10,this.request(Fe);case 10:return Ne=We.sent,Ae=Ne.data.Upload||[],Array.isArray(Ae)||(Ae=[Ae]),Ae=Ae.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),We.abrupt("return",{res:Ne.res,uploads:Ae,bucket:Ne.data.Bucket,nextKeyMarker:Ne.data.NextKeyMarker,nextUploadIdMarker:Ne.data.NextUploadIdMarker,isTruncated:Ne.data.IsTruncated==="true"});case 15:case"end":return We.stop()}},ge,this)}));function ue(ge,Pe){return le.apply(this,arguments)}return ue}(),ie.listParts=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe){var Ne,Ae,Ie;return ke.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Fe=Fe||{},Ne={},Se(Fe).to(Ne),Ne.subres={uploadId:je},Ae=this._objectRequestParams("GET",Pe,Ne),Ae.query=Be,Ae.xmlResponse=!0,Ae.successStatuses=[200],Ye.next=10,this.request(Ae);case 10:return Ie=Ye.sent,Ye.abrupt("return",{res:Ie.res,uploadId:Ie.data.UploadId,bucket:Ie.data.Bucket,name:Ie.data.Key,partNumberMarker:Ie.data.PartNumberMarker,nextPartNumberMarker:Ie.data.NextPartNumberMarker,maxParts:Ie.data.MaxParts,isTruncated:Ie.data.IsTruncated,parts:Ie.data.Part||[]});case 12:case"end":return Ye.stop()}},ge,this)}));function ue(ge,Pe,je,Be){return le.apply(this,arguments)}return ue}(),ie.abortMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be){var Fe,Ne,Ae;return ke.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return this._stop(),Be=Be||{},Fe={},Se(Be).to(Fe),Fe.subres={uploadId:je},Ne=this._objectRequestParams("DELETE",Pe,Fe),Ne.successStatuses=[204],We.next=9,this.request(Ne);case 9:return Ae=We.sent,We.abrupt("return",{res:Ae.res});case 11:case"end":return We.stop()}},ge,this)}));function ue(ge,Pe,je){return le.apply(this,arguments)}return ue}(),ie.initMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je){var Be,Fe,Ne;return ke.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return je=je||{},Be={},Se(je).to(Be),Be.headers=Be.headers||{},this._convertMetaToHeaders(je.meta,Be.headers),Be.subres="uploads",Fe=this._objectRequestParams("POST",Pe,Be),Fe.mime=je.mime,Fe.xmlResponse=!0,Fe.successStatuses=[200],Ie.next=12,this.request(Fe);case 12:return Ne=Ie.sent,Ie.abrupt("return",{res:Ne.res,bucket:Ne.data.Bucket,name:Ne.data.Key,uploadId:Ne.data.UploadId});case 14:case"end":return Ie.stop()}},ge,this)}));function ue(ge,Pe){return le.apply(this,arguments)}return ue}(),ie.uploadPart=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe,Ne,Ae,Ie){var We,Ye;return ke.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(We={size:Ae-Ne},Ye=fe&&fe.browser,!Ye){Ke.next=8;break}return Ke.next=5,this._createBuffer(Fe,Ne,Ae);case 5:We.content=Ke.sent,Ke.next=11;break;case 8:return Ke.next=10,this._createStream(Fe,Ne,Ae);case 10:We.stream=Ke.sent;case 11:return Ke.next=13,this._uploadPart(Pe,je,Be,We,Ie);case 13:return Ke.abrupt("return",Ke.sent);case 14:case"end":return Ke.stop()}},ge,this)}));function ue(ge,Pe,je,Be,Fe,Ne,Ae){return le.apply(this,arguments)}return ue}(),ie.completeMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe){var Ne,Ae,Ie,We,Ye,Ue,Ke,ot;return ke.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:for(Ne=Be.concat().sort(function(Ct,$e){return Ct.number-$e.number}).filter(function(Ct,$e,rt){return!$e||Ct.number!==rt[$e-1].number}),Ae=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,Ie=0;Ie<Ne.length;Ie++)We=Ne[Ie],Ae+=`<Part>
`,Ae+="<PartNumber>".concat(We.number,`</PartNumber>
`),Ae+="<ETag>".concat(We.etag,`</ETag>
`),Ae+=`</Part>
`;return Ae+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=we(Fe,function(Ct){if(z(Ct))return null}),Ye.subres={uploadId:je},Ye.headers=ae(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ue=this._objectRequestParams("POST",Pe,Ye),Me.encodeCallback(Ue,Ye),Ue.mime="xml",Ue.content=Ae,Ue.headers&&Ue.headers["x-oss-callback"]||(Ue.xmlResponse=!0),Ue.successStatuses=[200],dt.next=17,this.request(Ue);case 17:if(Ke=dt.sent,!Fe.progress){dt.next=21;break}return dt.next=21,Fe.progress(1,null,Ke.res);case 21:return ot={res:Ke.res,bucket:Ue.bucket,name:Pe,etag:Ke.res.headers.etag},Ue.headers&&Ue.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ke.data.toString())),dt.abrupt("return",ot);case 24:case"end":return dt.stop()}},ge,this)}));function ue(ge,Pe,je,Be){return le.apply(this,arguments)}return ue}(),ie._uploadPart=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe,Ne){var Ae,Ie,We,Ye;return ke.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ne=Ne||{},Ae={},Se(Ne).to(Ae),Ae.headers=Ae.headers||{},Ae.headers["Content-Length"]=Fe.size,Ae.headers=ae(Ae.headers,["x-oss-server-side-encryption"]),Ae.subres={partNumber:Be,uploadId:je},Ie=this._objectRequestParams("PUT",Pe,Ae),Ie.mime=Ae.mime,We=fe&&fe.browser,We?Ie.content=Fe.content:Ie.stream=Fe.stream,Ie.successStatuses=[200],Ie.disabledMD5=Ne.disabledMD5,Ke.next=15,this.request(Ie);case 15:if(Ye=Ke.sent,Ye.res.headers.etag){Ke.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,Ie.stream=null),Ke.abrupt("return",{name:Pe,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Ke.stop()}},ge,this)}));function ue(ge,Pe,je,Be,Fe){return le.apply(this,arguments)}return ue}()}).call(this)}).call(this,oe("_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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("url"),Se=oe("utility"),Me=oe("copy-to"),ve=oe("../../common/signUtils"),we=oe("../utils/isIP"),de=we.isIP,z=oe("../utils/setSTSToken"),ee=z.setSTSToken,ae=oe("../utils/isFunction"),ie=ae.isFunction,le=De;le.asyncSignatureUrl=function(){var ue=(0,ke.default)(me.default.mark(function Pe(je,Be){var Fe,Ne,Ae,Ie,We;return me.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(!de(this.options.endpoint.hostname)){Ue.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(Be=Be||{},je=this._objectName(je),Be.method=Be.method||"GET",Fe=Se.timestamp()+(Be.expires||1800),Ne={bucket:this.options.bucket,object:je},Ae=this._getResource(Ne),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){Ue.next=11;break}return Ue.next=11,ee.call(this);case 11:return this.options.stsToken&&(Be["security-token"]=this.options.stsToken),Ie=ve._signatureForURL(this.options.accessKeySecret,Be,Ae,Fe),We=Ce.parse(this._getReqUrl(Ne)),We.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Ie.Signature},Me(Ie.subResource).to(We.query),Ue.abrupt("return",We.format());case 17:case"end":return Ue.stop()}},Pe,this)}));function ge(Pe,je){return ue.apply(this,arguments)}return ge}()},{"../../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var ke=fe(oe("@babel/runtime/helpers/typeof")),Ce=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("../utils/checkBucketName"),Me=Se.checkBucketName,ve=De,we=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];ve.copy=function(){var de=(0,Ce.default)(me.default.mark(function ee(ae,ie,le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return(0,ke.default)(le)==="object"&&(ue=le),ue=ue||{},ue.headers=ue.headers||{},Object.keys(ue.headers).forEach(function(Ne){ue.headers["x-oss-copy-source-".concat(Ne.toLowerCase())]=ue.headers[Ne]}),(ue.meta||Object.keys(ue.headers).find(function(Ne){return we.includes(Ne.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,ge=this._objectRequestParams("PUT",ae,ue),ge.xmlResponse=!0,ge.successStatuses=[200,304],Fe.next=14,this.request(ge);case 14:return Pe=Fe.sent,je=Pe.data,je&&(je={etag:je.ETag,lastModified:je.LastModified}),Fe.abrupt("return",{data:je,res:Pe.res});case 18:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae,ie,le){return de.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")),Me(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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.delete=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({},de.subres),de.versionId&&(de.subres.versionId=de.versionId),z=this._objectRequestParams("DELETE",we,de),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 Me(ve){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("utility"),Se=oe("../utils/obj2xml"),Me=Se.obj2xml,ve=De;ve.deleteMulti=function(){var we=(0,ke.default)(me.default.mark(function z(ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Ie,We,Ye=arguments;return me.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(ae=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},ie=[],!(!ee||!ee.length)){Ke.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=Ce.escape(this._objectName(ee[le])):(ge=ee[le],Pe=ge.key,je=ge.versionId,ue.Key=Ce.escape(this._objectName(Pe)),ue.VersionId=je),ie.push(ue);return Be={Delete:{Quiet:!!ae.quiet,Object:ie}},Fe=Me(Be,{headers:!0}),ae.subres=Object.assign({delete:""},ae.subres),ae.versionId&&(ae.subres.versionId=ae.versionId),Ne=this._objectRequestParams("POST","",ae),Ne.mime="xml",Ne.content=Fe,Ne.xmlResponse=!0,Ne.successStatuses=[200],Ke.next=16,this.request(Ne);case 16:return Ae=Ke.sent,Ie=Ae.data,We=Ie&&Ie.Deleted||null,We&&(Array.isArray(We)||(We=[We])),Ke.abrupt("return",{res:Ae.res,deleted:We||[]});case 21:case"end":return Ke.stop()}},z,this)}));function de(z){return we.apply(this,arguments)}return de}()},{"../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.deleteObjectTagging=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({tagging:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("DELETE",we,de),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 Me(ve){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.concat.js");var fe=oe("url"),me=oe("../utils/isIP"),ke=me.isIP,Ce=De;Ce.generateObjectUrl=function(Me,ve){if(ke(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 we=fe.parse(ve),de=this.options.bucket;we.hostname="".concat(de,".").concat(we.hostname),we.host="".concat(de,".").concat(we.host),ve=we.format()}return ve+this._escape(this._objectName(Me))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("fs"),Me=oe("is-type-of"),ve=De;ve.get=function(){var we=(0,Ce.default)(ke.default.mark(function z(ee,ae){var ie,le,ue,ge,Pe,je,Be,Fe,Ne=arguments;return ke.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return ie=Ne.length>2&&Ne[2]!==void 0?Ne[2]:{},le=null,ue=!1,Me.writableStream(ae)?le=ae:Me.string(ae)?(le=Se.createWriteStream(ae),ue=!0):ie=ae,ie=ie||{},ge=fe&&fe.browser,Pe=ie.responseCacheControl===null?"":"no-cache",je=ge&&Pe?{"response-cache-control":Pe}:{},ie.subres=Object.assign(je,ie.subres),ie.versionId&&(ie.subres.versionId=ie.versionId),ie.process&&(ie.subres["x-oss-process"]=ie.process),Ie.prev=11,Fe=this._objectRequestParams("GET",ee,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],Ie.next=17,this.request(Fe);case 17:Be=Ie.sent,ue&&le.destroy(),Ie.next=28;break;case 21:if(Ie.prev=21,Ie.t0=Ie.catch(11),!ue){Ie.next=27;break}return le.destroy(),Ie.next=27,this._deleteFileSafe(ae);case 27:throw Ie.t0;case 28:return Ie.abrupt("return",{res:Be.res,content:Be.data});case 29:case"end":return Ie.stop()}},z,this,[[11,21]])}));function de(z,ee){return we.apply(this,arguments)}return de}()}).call(this)}).call(this,oe("_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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getACL=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({acl:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("GET",we,de),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 Me(ve){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De,Se=oe("../utils/isObject"),Me=Se.isObject,ve=oe("../utils/isArray"),we=ve.isArray;Ce.getBucketVersions=de,Ce.listObjectVersions=de;function de(){return z.apply(this,arguments)}function z(){return z=(0,ke.default)(me.default.mark(function ie(){var le,ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(le=Ae.length>0&&Ae[0]!==void 0?Ae[0]:{},ue=Ae.length>1&&Ae[1]!==void 0?Ae[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){We.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),ge=this._objectRequestParams("GET","",ue),ge.xmlResponse=!0,ge.successStatuses=[200],ge.query=ae(le),We.next=12,this.request(ge);case 12:return Pe=We.sent,je=Pe.data.Version||[],Be=Pe.data.DeleteMarker||[],Fe=this,je&&(Array.isArray(je)||(je=[je]),je=je.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}}})),Be&&(we(Be)||(Be=[Be]),Be=Be.map(function(Ye){return{name:Ye.Key,lastModified:Ye.LastModified,versionId:Ye.VersionId,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Ne=Pe.data.CommonPrefixes||null,Ne&&(we(Ne)||(Ne=[Ne]),Ne=Ne.map(function(Ye){return Ye.Prefix})),We.abrupt("return",{res:Pe.res,objects:je,deleteMarker:Be,prefixes:Ne,nextMarker:Pe.data.NextKeyMarker||null,NextVersionIdMarker:Pe.data.NextVersionIdMarker||null,nextKeyMarker:Pe.data.NextKeyMarker||null,nextVersionIdMarker:Pe.data.NextVersionIdMarker||null,isTruncated:Pe.data.IsTruncated==="true"});case 21:case"end":return We.stop()}},ie,this)})),z.apply(this,arguments)}function ee(ie){return ie.replace(/([A-Z])/g,"-$1").toLowerCase()}function ae(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le={};return Me(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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getObjectMeta=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return de=de||{},we=this._objectName(we),de.subres=Object.assign({objectMeta:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),z=this._objectRequestParams("HEAD",we,de),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 Me(ve,we){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De,Se=oe("../utils/isObject"),Me=Se.isObject;Ce.getObjectTagging=function(){var ve=(0,ke.default)(me.default.mark(function de(z){var ee,ae,ie,le,ue,ge,Pe=arguments;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ee=Pe.length>1&&Pe[1]!==void 0?Pe[1]:{},ee.subres=Object.assign({tagging:""},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),z=this._objectName(z),ae=this._objectRequestParams("GET",z,ee),ae.successStatuses=[200],Be.next=8,this.request(ae);case 8:return ie=Be.sent,Be.next=11,this.parseXML(ie.data);case 11:return le=Be.sent,ue=le.TagSet.Tag,ue=ue&&Me(ue)?[ue]:ue||[],ge={},ue.forEach(function(Fe){ge[Fe.Key]=Fe.Value}),Be.abrupt("return",{status:ie.status,res:ie.res,tag:ge});case 17:case"end":return Be.stop()}},de,this)}));function we(de){return ve.apply(this,arguments)}return we}()},{"../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(oe,ze,De){"use strict";var fe=oe("../utils/isIP"),me=fe.isIP,ke=De;ke.getObjectUrl=function(Se,Me){if(me(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Me?Me[Me.length-1]!=="/"&&(Me+="/"):Me=this.options.endpoint.format(),Me+this._escape(this._objectName(Se))}},{"../utils/isIP":69}],43:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getSymlink=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae,ie=arguments;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return de=ie.length>1&&ie[1]!==void 0?ie[1]:{},de.subres=Object.assign({symlink:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("GET",we,de),z.successStatuses=[200],ue.next=8,this.request(z);case 8:return ee=ue.sent,ae=ee.res.headers["x-oss-symlink-target"],ue.abrupt("return",{targetName:decodeURIComponent(ae),res:ee.res});case 11:case"end":return ue.stop()}},ve,this)}));function Me(ve){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkEnv"),Se=Ce.checkEnv,Me=De;Me.head=function(){var ve=(0,ke.default)(me.default.mark(function de(z){var ee,ae,ie,le,ue=arguments;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ee=ue.length>1&&ue[1]!==void 0?ue[1]:{},Se("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),ae=this._objectRequestParams("HEAD",z,ee),ae.successStatuses=[200,304],Pe.next=8,this.request(ae);case 8:return ie=Pe.sent,le={meta:null,res:ie.res,status:ie.status},ie.status===200&&Object.keys(ie.headers).forEach(function(je){je.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[je.substring(11)]=ie.headers[je])}),Pe.abrupt("return",le);case 12:case"end":return Pe.stop()}},de,this)}));function we(de){return ve.apply(this,arguments)}return we}()},{"../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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.putACL=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.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"]=de,we=this._objectName(we),ee=this._objectRequestParams("PUT",we,z),ee.successStatuses=[200],le.next=10,this.request(ee);case 10:return ae=le.sent,le.abrupt("return",{res:ae.res});case 12:case"end":return le.stop()}},ve,this)}));function Me(ve,we,de){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.object.keys.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/obj2xml"),Se=Ce.obj2xml,Me=oe("../utils/checkObjectTag"),ve=Me.checkObjectTag,we=De;we.putObjectTagging=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=je.length>2&&je[2]!==void 0?je[2]:{},ve(ie),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),ae=this._objectName(ae),ue=this._objectRequestParams("PUT",ae,le),ue.successStatuses=[200],ie=Object.keys(ie).map(function(Ne){return{Key:Ne,Value:ie[Ne]}}),ge={Tagging:{TagSet:{Tag:ie}}},ue.mime="xml",ue.content=Se(ge),Fe.next=13,this.request(ue);case 13:return Pe=Fe.sent,Fe.abrupt("return",{res:Pe.res,status:Pe.status});case 15:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae){return de.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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.putSymlink=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.headers=z.headers||{},de=this._escape(this._objectName(de)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=de,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),we=this._objectName(we),ee=this._objectRequestParams("PUT",we,z),ee.successStatuses=[200],le.next=13,this.request(ee);case 13:return ae=le.sent,le.abrupt("return",{res:ae.res});case 15:case"end":return le.stop()}},ve,this)}));function Me(ve,we,de){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(oe,ze,De){"use strict";var fe=oe("url"),me=oe("utility"),ke=oe("copy-to"),Ce=oe("../../common/signUtils"),Se=oe("../utils/isIP"),Me=Se.isIP,ve=De;ve.signatureUrl=function(de,z){if(Me(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},de=this._objectName(de),z.method=z.method||"GET";var ee=me.timestamp()+(z.expires||1800),ae={bucket:this.options.bucket,object:de},ie=this._getResource(ae);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var le=Ce._signatureForURL(this.options.accessKeySecret,z,ie,ee),ue=fe.parse(this._getReqUrl(ae));return ue.query={OSSAccessKeyId:this.options.accessKeyId,Expires:ee,Signature:le.Signature},ke(le.subResource).to(ue.query),ue.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.function.name.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("./utils/isArray"),Se=Ce.isArray,Me=De;Me._parallelNode=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae,ie){var le,ue,ge,Pe,je,Be,Fe,Ne;return me.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:le=this,ue=[],ge=[],Pe=z.length/ee,je=z.length%ee,Be=je===0?Pe:(z.length-je)/ee+1,Fe=1,Ne=0;case 8:if(!(Ne<z.length)){Ie.next=26;break}if(!le.isCancel()){Ie.next=11;break}return Ie.abrupt("break",26);case 11:if(ie?ge.push(ae(le,z[Ne],ie)):ge.push(ae(le,z[Ne])),!(ge.length===ee||Fe===Be&&Ne===z.length-1)){Ie.next=23;break}return Ie.prev=13,Fe+=1,Ie.next=17,Promise.all(ge);case 17:Ie.next=22;break;case 19:Ie.prev=19,Ie.t0=Ie.catch(13),ue.push(Ie.t0);case 22:ge=[];case 23:Ne++,Ie.next=8;break;case 26:return Ie.abrupt("return",ue);case 27:case"end":return Ie.stop()}},de,this,[[13,19]])}));function we(de,z,ee,ae){return ve.apply(this,arguments)}return we}(),Me._parallel=function(we,de,z){var ee=this;return new Promise(function(ae){var ie=[];if(de<=0||!we){ae(ie);return}function le(Ie){return function(){if(Ie===null)throw new Error("Callback was already called.");var We=Ie;Ie=null;for(var Ye=arguments.length,Ue=new Array(Ye),Ke=0;Ke<Ye;Ke++)Ue[Ke]=arguments[Ke];We.apply(this,Ue)}}function ue(Ie){var We=-1,Ye=Ie.length;return function(){return++We<Ye&&!ee.isCancel()?{value:Ie[We],key:We}:null}}var ge=ue(we),Pe=!1,je=0,Be=!1;function Fe(Ie){je-=1,Ie?(Pe=!0,ie.push(Ie),ae(ie)):Pe&&je<=0?(Pe=!0,ae(ie)):Be||(ee.isCancel()?ae(ie):Ae())}function Ne(Ie,We){z(Ie).then(function(Ye){We(null,Ye)}).catch(function(Ye){We(Ye)})}function Ae(){for(Be=!0;je<de&&!Pe&&!ee.isCancel();){var Ie=ge();if(Ie===null||ie.length>0){Pe=!0,je<=0&&ae(ie);return}je+=1,Ne(Ie.value,le(Fe))}Be=!1}Ae()})},Me.cancel=function(we){this.options.cancelFlag=!0,Se(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(de){if(de.destroyed===!1){var z={name:"cancel",message:"cancel"};de.destroy(z)}}),this.multipartUploadStreams=[],we&&this.abortMultipartUpload(we.name,we.uploadId,we.options)},Me.isCancel=function(){return this.options.cancelFlag},Me.resetCancelFlag=function(){this.options.cancelFlag=!1},Me._stop=function(){this.options.cancelFlag=!0},Me._makeCancelEvent=function(){var we={status:0,name:"cancel"};return we},Me._makeAbortEvent=function(){var we={status:0,name:"abort",message:"upload task has been abort"};return we}},{"./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(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var me=oe("./../../shims/crypto/crypto.js"),ke=oe("is-type-of"),Ce=oe("./utils/lowercaseKeyHeader"),Se=Ce.lowercaseKeyHeader;De.buildCanonicalizedResource=function(ve,we){var de="".concat(ve),z="?";if(ke.string(we)&&we.trim()!=="")de+=z+we;else if(ke.array(we))we.sort(),de+=z+we.join("&");else if(we){var ee=function(le,ue){return le[0]>ue[0]?1:le[0]<ue[0]?-1:0},ae=function(le){de+=z+le,(we[le]||we[le]===0)&&(de+="=".concat(we[le])),z="&"};Object.keys(we).sort(ee).forEach(ae)}return de},De.buildCanonicalString=function(ve,we,de,z){de=de||{};var ee=Se(de.headers),ae="x-oss-",ie=[],le={},ue=[ve.toUpperCase(),ee["content-md5"]||"",ee["content-type"],z||ee["x-oss-date"]];return Object.keys(ee).forEach(function(ge){var Pe=ge.toLowerCase();Pe.indexOf(ae)===0&&(le[Pe]=String(ee[ge]).trim())}),Object.keys(le).sort().forEach(function(ge){ie.push("".concat(ge,":").concat(le[ge]))}),ue=ue.concat(ie),ue.push(this.buildCanonicalizedResource(we,de.parameters)),ue.join(`
`)},De.computeSignature=function(ve,we){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=me.createHmac("sha1",ve);return z.update(fe.from(we,de)).digest("base64")},De.authorization=function(ve,we,de,z){return"OSS ".concat(ve,":").concat(this.computeSignature(we,de,z))},De._signatureForURL=function(ve){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,ee=arguments.length>4?arguments[4]:void 0,ae={},ie=we.subResource,le=ie===void 0?{}:ie;if(we.process){var ue="x-oss-process";le[ue]=we.process}if(we.trafficLimit){var ge="x-oss-traffic-limit";le[ge]=we.trafficLimit}if(we.response&&Object.keys(we.response).forEach(function(Fe){var Ne="response-".concat(Fe.toLowerCase());le[Ne]=we.response[Fe]}),Object.keys(we).forEach(function(Fe){var Ne=Fe.toLowerCase(),Ae=we[Fe];Ne.indexOf("x-oss-")===0?ae[Ne]=Ae:(Ne.indexOf("content-md5")===0||Ne.indexOf("content-type")===0)&&(ae[Fe]=Ae)}),Object.prototype.hasOwnProperty.call(we,"security-token")&&(le["security-token"]=we["security-token"]),Object.prototype.hasOwnProperty.call(we,"callback")){var Pe={callbackUrl:encodeURI(we.callback.url),callbackBody:we.callback.body};if(we.callback.host&&(Pe.callbackHost=we.callback.host),we.callback.contentType&&(Pe.callbackBodyType=we.callback.contentType),le.callback=fe.from(JSON.stringify(Pe)).toString("base64"),we.callback.customValue){var je={};Object.keys(we.callback.customValue).forEach(function(Fe){je["x:".concat(Fe)]=we.callback.customValue[Fe]}),le["callback-var"]=fe.from(JSON.stringify(je)).toString("base64")}}var Be=this.buildCanonicalString(we.method,de,{headers:ae,parameters:le},z.toString());return{Signature:this.computeSignature(ve,Be,ee),subResource:le}}}).call(this)}).call(this,oe("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(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkBucketName=void 0,De.checkBucketName=function(fe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ke=me?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!ke.test(fe))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkConfigValid=void 0;var fe={endpoint:me,region:/^[a-zA-Z0-9\-_]+$/};function me(ke){return typeof ke=="string"?/^[a-zA-Z0-9._:/-]+$/.test(ke):ke.host?/^[a-zA-Z0-9._:/-]+$/.test(ke.host):!1}De.checkConfigValid=function(ke,Ce){if(fe[Ce]){var Se=!0;if(fe[Ce]instanceof Function?Se=fe[Ce](ke):Se=fe[Ce].test(ke),!Se)throw new Error("The ".concat(Ce," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(oe,ze,De){(function(fe){(function(){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.checkEnv=void 0;function me(ke){fe.browser&&console.warn(ke)}De.checkEnv=me}).call(this)}).call(this,oe("_process"))},{_process:467}],54:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkObjectTag=void 0;var fe=oe("./checkValid"),me=fe.checkValid,ke=oe("./isObject"),Ce=ke.isObject,Se=[{validator:function(de){if(typeof de!="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 (/)"}],Me={key:[].concat(Se,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(Se,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function ve(we){if(!Ce(we))throw new Error("tag must be Object");var de=Object.entries(we);if(de.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];de.forEach(function(ee){ee.forEach(function(ae,ie){me(ae,Me[z[ie]])})})}De.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(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkValid=void 0;function fe(me,ke){ke.forEach(function(Ce){if(Ce.validator)Ce.validator(me);else if(Ce.pattern&&!Ce.pattern.test(me))throw new Error(Ce.msg)})}De.checkValid=fe},{"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(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.createRequest=void 0;var me=oe("./../../../shims/crypto/crypto.js"),ke=oe("debug")("ali-oss"),Ce=oe("mime"),Se=oe("dateformat"),Me=oe("copy-to"),ve=oe("path"),we=oe("./encoder"),de=we.encoder,z=oe("./isIP"),ee=z.isIP,ae=oe("./setRegion"),ie=ae.setRegion,le=oe("../client/getReqUrl"),ue=le.getReqUrl,ge=oe("./isDingTalk"),Pe=ge.isDingTalk;function je(Ne,Ae){return Ne[Ae]||Ne[Ae.toLowerCase()]}function Be(Ne,Ae){delete Ne[Ae],delete Ne[Ae.toLowerCase()]}function Fe(Ne){var Ae=new Date;this.options.amendTimeSkewed&&(Ae=+new Date+this.options.amendTimeSkewed);var Ie={"x-oss-date":Se(Ae,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Ie["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Ie["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Ie,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Ie["x-oss-security-token"]=this.options.stsToken),Me(Ne.headers).to(Ie),je(Ie,"Content-Type")||(Ne.mime&&Ne.mime.indexOf("/")>0?Ie["Content-Type"]=Ne.mime:Pe()?Ie["Content-Type"]="application/octet-stream":Ie["Content-Type"]=Ce.getType(Ne.mime||ve.extname(Ne.object||""))),je(Ie,"Content-Type")||Be(Ie,"Content-Type"),Ne.content&&(Ne.disabledMD5||(!Ne.headers||!Ne.headers["Content-MD5"]?Ie["Content-MD5"]=me.createHash("md5").update(fe.from(Ne.content,"utf8")).digest("base64"):Ie["Content-MD5"]=Ne.headers["Content-MD5"]),Ie["Content-Length"]||(Ie["Content-Length"]=Ne.content.length));var We=Object.prototype.hasOwnProperty;for(var Ye in Ie)Ie[Ye]&&We.call(Ie,Ye)&&(Ie[Ye]=de(String(Ie[Ye]),this.options.headerEncoding));var Ue=this._getResource(Ne);if(Ie.authorization=this.authorization(Ne.method,Ue,Ne.subres,Ie,this.options.headerEncoding),ee(this.options.endpoint.hostname)){var Ke=this.options,ot=Ke.region,st=Ke.internal,dt=Ke.secure,Ct=ie(ot,st,dt);Ie.host="".concat(Ne.bucket,".").concat(Ct.host)}var $e=ue.bind(this)(Ne);ke("request %s %s, with headers %j, !!stream: %s",Ne.method,$e,Ie,!!Ne.stream);var rt=Ne.timeout||this.options.timeout,St={method:Ne.method,content:Ne.content,stream:Ne.stream,headers:Ie,timeout:rt,writeStream:Ne.writeStream,customResponse:Ne.customResponse,ctx:Ne.ctx||this.ctx};return this.agent&&(St.agent=this.agent),this.httpsAgent&&(St.httpsAgent=this.httpsAgent),St.enableProxy=!!this.options.enableProxy,St.proxy=this.options.proxy?this.options.proxy:null,{url:$e,params:St}}De.createRequest=Fe}).call(this)}).call(this,oe("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(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.dataFix=void 0;var fe=oe("./isObject"),me=["true","TRUE","1",1],ke=["false","FALSE","0",0];function Ce(ve,we,de){if(fe.isObject(ve)){var z=we.remove,ee=z===void 0?[]:z,ae=we.rename,ie=ae===void 0?{}:ae,le=we.camel,ue=le===void 0?[]:le,ge=we.bool,Pe=ge===void 0?[]:ge,je=we.lowerFirst,Be=je===void 0?!1:je;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 Ne=Fe.replace(/^(.)/,function(Ae){return Ae.toLowerCase()}).replace(/-(\w)/g,function(Ae,Ie){return Ie.toUpperCase()});ve[Ne]||(ve[Ne]=ve[Fe])}}),Pe.forEach(function(Fe){ve[Fe]=Se(ve[Fe])}),typeof de=="function"&&de(ve),Me(ve,Be),Ce}}De.dataFix=Ce;function Se(ve){return ve?me.includes(ve)?!0:ke.includes(ve)?!1:ve:!1}function Me(ve,we){we&&Object.keys(ve).forEach(function(de){var z=de.replace(/^\w/,function(ee){return ee.toLowerCase()});typeof ve[z]=="undefined"&&(ve[z]=ve[de],delete ve[de])})}},{"./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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var me=fe(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(De,"__esModule",{value:!0}),De.deepCopyWith=De.deepCopy=void 0;var ke=oe("./isBuffer");De.deepCopy=function(Ce){if(Ce===null||(0,me.default)(Ce)!=="object")return Ce;if(ke.isBuffer(Ce))return Ce.slice();var Se=Array.isArray(Ce)?[]:{};return Object.keys(Ce).forEach(function(Me){Se[Me]=De.deepCopy(Ce[Me])}),Se},De.deepCopyWith=function(Ce,Se){function Me(ve,we,de){var z=Se(ve,we,de);if(z!==void 0)return z;if(ve===null||(0,me.default)(ve)!=="object")return ve;if(ke.isBuffer(ve))return ve.slice();var ee=Array.isArray(ve)?[]:{};return Object.keys(ve).forEach(function(ae){ee[ae]=Me(ve[ae],ae,ve)}),ee}return Se?Me(Ce,"",null):De.deepCopy(Ce)}},{"./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(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.encoder=void 0;function me(ke){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return Ce==="utf-8"?ke:fe.from(ke).toString("latin1")}De.encoder=me}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.formatInventoryConfig=void 0;var fe=oe("../utils/dataFix"),me=oe("../utils/isObject"),ke=oe("../utils/isArray"),Ce=oe("../utils/formatObjKey");function Se(ve){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return we&&me.isObject(ve)&&(ve=[ve]),ke.isArray(ve)?ve=ve.map(Me):ve=Me(ve),ve}De.formatInventoryConfig=Se;function Me(ve){return fe.dataFix(ve,{bool:["IsEnabled"]},function(we){var de,z;we.prefix=we.Filter.Prefix,delete we.Filter,we.OSSBucketDestination=we.Destination.OSSBucketDestination,we.OSSBucketDestination.rolename=we.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete we.OSSBucketDestination.RoleArn,we.OSSBucketDestination.bucket=we.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete we.OSSBucketDestination.Bucket,delete we.Destination,we.frequency=we.Schedule.Frequency,delete we.Schedule.Frequency,!((de=we==null?void 0:we.OptionalFields)===null||de===void 0)&&de.Field&&!ke.isArray((z=we.OptionalFields)===null||z===void 0?void 0:z.Field)&&(we.OptionalFields.Field=[we.OptionalFields.Field])}),ve=Ce.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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var me=fe(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(De,"__esModule",{value:!0}),De.formatObjKey=void 0;function ke(Se,Me,ve){if(Se===null||(0,me.default)(Se)!=="object")return Se;var we;if(Array.isArray(Se)){we=[];for(var de=0;de<Se.length;de++)we.push(ke(Se[de],Me,ve))}else we={},Object.keys(Se).forEach(function(z){we[Ce(z,Me,ve)]=ke(Se[z],Me,ve)});return we}De.formatObjKey=ke;function Ce(Se,Me,ve){return ve&&ve.exclude&&ve.exclude.includes(Se)||(Me==="firstUpperCase"?Se=Se.replace(/^./,function(we){return we.toUpperCase()}):Me==="firstLowerCase"&&(Se=Se.replace(/^./,function(we){return we.toLowerCase()}))),Se}},{"@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(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.getStrBytesCount=void 0;function fe(me){for(var ke=0,Ce=0;Ce<me.length;Ce++){var Se=me.charAt(Ce);/^[\u00-\uff]$/.test(Se)?ke+=1:ke+=2}return ke}De.getStrBytesCount=fe},{"core-js/modules/es.regexp.exec.js":300}],63:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isArray=void 0,De.isArray=function(fe){return Object.prototype.toString.call(fe)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(oe,ze,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isBlob=void 0;function fe(me){return typeof Blob!="undefined"&&me instanceof Blob}De.isBlob=fe},{}],65:[function(oe,ze,De){(function(fe){(function(){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isBuffer=void 0;function me(ke){return fe.isBuffer(ke)}De.isBuffer=me}).call(this)}).call(this,{isBuffer:oe("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isDingTalk=void 0;function me(){return!!(fe.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}De.isDingTalk=me}).call(this)}).call(this,oe("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(oe,ze,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isFile=void 0,De.isFile=function(fe){return typeof File!="undefined"&&fe instanceof File}},{}],68:[function(oe,ze,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isFunction=void 0,De.isFunction=function(fe){return typeof fe=="function"}},{}],69:[function(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isIP=void 0,De.isIP=function(fe){var me=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,ke=/^\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 me.test(fe)||ke.test(fe)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isObject=void 0,De.isObject=function(fe){return Object.prototype.toString.call(fe)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.lowercaseKeyHeader=void 0;var fe=oe("./isObject");function me(ke){var Ce={};return fe.isObject(ke)&&Object.keys(ke).forEach(function(Se){Ce[Se.toLowerCase()]=ke[Se]}),Ce}De.lowercaseKeyHeader=me},{"./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(oe,ze,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.obj2xml=void 0;var fe=oe("./formatObjKey");function me(Ce){return Object.prototype.toString.call(Ce).replace(/(.*? |])/g,"").toLowerCase()}function ke(Ce,Se){var Me="";return Se&&Se.headers&&(Me=`<?xml version="1.0" encoding="UTF-8"?>
`),Se&&Se.firstUpperCase&&(Ce=fe.formatObjKey(Ce,"firstUpperCase")),me(Ce)==="object"?Object.keys(Ce).forEach(function(ve){me(Ce[ve])!=="undefined"&&me(Ce[ve])!=="null"&&(me(Ce[ve])==="string"||me(Ce[ve])==="number"?Me+="<".concat(ve,">").concat(Ce[ve],"</").concat(ve,">"):me(Ce[ve])==="object"?Me+="<".concat(ve,">").concat(ke(Ce[ve]),"</").concat(ve,">"):me(Ce[ve])==="array"?Me+=Ce[ve].map(function(we){return"<".concat(ve,">").concat(ke(we),"</").concat(ve,">")}).join(""):Me+="<".concat(ve,">").concat(Ce[ve].toString(),"</").concat(ve,">"))}):Me+=Ce.toString(),Me}De.obj2xml=ke},{"./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(oe,ze,De){"use strict";oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.symbol.iterator.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/es.object.assign.js");function fe(Se,Me){var ve=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(!ve){if(Array.isArray(Se)||(ve=me(Se))||Me&&Se&&typeof Se.length=="number"){ve&&(Se=ve);var we=0,de=function(){};return{s:de,n:function(){return we>=Se.length?{done:!0}:{done:!1,value:Se[we++]}},e:function(le){throw le},f:de}}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,ae;return{s:function(){ve=ve.call(Se)},n:function(){var le=ve.next();return z=le.done,le},e:function(le){ee=!0,ae=le},f:function(){try{!z&&ve.return!=null&&ve.return()}finally{if(ee)throw ae}}}}function me(Se,Me){if(Se){if(typeof Se=="string")return ke(Se,Me);var ve=Object.prototype.toString.call(Se).slice(8,-1);if(ve==="Object"&&Se.constructor&&(ve=Se.constructor.name),ve==="Map"||ve==="Set")return Array.from(Se);if(ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve))return ke(Se,Me)}}function ke(Se,Me){(Me==null||Me>Se.length)&&(Me=Se.length);for(var ve=0,we=new Array(Me);ve<Me;ve++)we[ve]=Se[ve];return we}Object.defineProperty(De,"__esModule",{value:!0}),De.omit=void 0;function Ce(Se,Me){var ve=Object.assign({},Se),we=fe(Me),de;try{for(we.s();!(de=we.n()).done;){var z=de.value;delete ve[z]}}catch(ee){we.e(ee)}finally{we.f()}return ve}De.omit=Ce},{"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(oe,ze,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.retry=void 0;function fe(me,ke){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Se=0,Me=Ce.retryDelay,ve=Me===void 0?500:Me,we=Ce.errorHandler,de=we===void 0?function(){return!0}:we,z=function ee(){for(var ae=arguments.length,ie=new Array(ae),le=0;le<ae;le++)ie[le]=arguments[le];return new Promise(function(ue,ge){me.apply(void 0,ie).then(function(Pe){Se=0,ue(Pe)}).catch(function(Pe){Se<ke&&de(Pe)?(Se++,setTimeout(function(){ue(ee.apply(void 0,ie))},ve)):(Se=0,ge(Pe))})})};return z}De.retry=fe},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(oe,ze,De){"use strict";var fe=function(Se){return Se&&Se.__esModule?Se:{default:Se}};Object.defineProperty(De,"__esModule",{value:!0}),De.setRegion=void 0;var me=fe(oe("url")),ke=oe("./checkConfigValid");function Ce(Se){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;ke.checkConfigValid(Se,"region");var we=ve?"https://":"http://",de=Me?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return Se.substr(0,z.length)===z&&(de=".aliyuncs.com"),me.default.parse(we+Se+de)}De.setRegion=Ce},{"./checkConfigValid":52,url:472}],76:[function(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.checkCredentials=De.setSTSToken=void 0;var Ce=oe("./formatObjKey");function Se(){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function we(){var de,z;return me.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(this.options||(this.options={}),de=new Date,!this.stsTokenFreshTime){ae.next=14;break}if(!(+de-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){ae.next=12;break}return this.stsTokenFreshTime=de,ae.next=7,this.options.refreshSTSToken();case 7:z=ae.sent,z=Ce.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),ve(z),Object.assign(this.options,z);case 12:ae.next=15;break;case 14:this.stsTokenFreshTime=de;case 15:return ae.abrupt("return",null);case 16:case"end":return ae.stop()}},we,this)})),Me.apply(this,arguments)}De.setSTSToken=Se;function ve(we){var de=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(we);de.forEach(function(ee){if(!z.find(function(ae){return ae===ee}))throw Error("refreshSTSToken must return contains ".concat(ee))})}De.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(oe,ze,De){function fe(ke,Ce,Se,Me,ve,we,de){try{var z=ke[we](de),ee=z.value}catch(ae){Se(ae);return}z.done?Ce(ee):Promise.resolve(ee).then(Me,ve)}function me(ke){return function(){var Ce=this,Se=arguments;return new Promise(function(Me,ve){var we=ke.apply(Ce,Se);function de(ee){fe(we,Me,ve,de,z,"next",ee)}function z(ee){fe(we,Me,ve,de,z,"throw",ee)}de(void 0)})}}ze.exports=me,ze.exports.__esModule=!0,ze.exports.default=ze.exports},{}],78:[function(oe,ze,De){function fe(me){return me&&me.__esModule?me:{default:me}}ze.exports=fe,ze.exports.__esModule=!0,ze.exports.default=ze.exports},{}],79:[function(oe,ze,De){function fe(me){"@babel/helpers - typeof";return ze.exports=fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ke){return typeof ke}:function(ke){return ke&&typeof Symbol=="function"&&ke.constructor===Symbol&&ke!==Symbol.prototype?"symbol":typeof ke},ze.exports.__esModule=!0,ze.exports.default=ze.exports,fe(me)}ze.exports=fe,ze.exports.__esModule=!0,ze.exports.default=ze.exports},{}],80:[function(oe,ze,De){ze.exports=oe("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(oe,ze,De){ze.exports=fe,ze.exports.HttpsAgent=fe;function fe(){}},{}],82:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("object-assign");function ke(ot,st){if(ot===st)return 0;for(var dt=ot.length,Ct=st.length,$e=0,rt=Math.min(dt,Ct);$e<rt;++$e)if(ot[$e]!==st[$e]){dt=ot[$e],Ct=st[$e];break}return dt<Ct?-1:Ct<dt?1:0}function Ce(ot){return fe.Buffer&&typeof fe.Buffer.isBuffer=="function"?fe.Buffer.isBuffer(ot):!!(ot!=null&&ot._isBuffer)}var Se=oe("util/"),Me=Object.prototype.hasOwnProperty,ve=Array.prototype.slice,we=function(){return function(){}.name==="foo"}();function de(ot){return Object.prototype.toString.call(ot)}function z(ot){return Ce(ot)||typeof fe.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ot):ot?!!(ot instanceof DataView||ot.buffer&&ot.buffer instanceof ArrayBuffer):!1}var ee=ze.exports=je,ae=/\s*function\s+([^\(\s]*)\s*/;function ie(ot){if(Se.isFunction(ot)){if(we)return ot.name;var st=ot.toString(),dt=st.match(ae);return dt&&dt[1]}}ee.AssertionError=function(st){this.name="AssertionError",this.actual=st.actual,this.expected=st.expected,this.operator=st.operator,st.message?(this.message=st.message,this.generatedMessage=!1):(this.message=ge(this),this.generatedMessage=!0);var dt=st.stackStartFunction||Pe;if(Error.captureStackTrace)Error.captureStackTrace(this,dt);else{var Ct=new Error;if(Ct.stack){var $e=Ct.stack,rt=ie(dt),St=$e.indexOf(`
`+rt);if(St>=0){var Pt=$e.indexOf(`
`,St+1);$e=$e.substring(Pt+1)}this.stack=$e}}},Se.inherits(ee.AssertionError,Error);function le(ot,st){return typeof ot=="string"?ot.length<st?ot:ot.slice(0,st):ot}function ue(ot){if(we||!Se.isFunction(ot))return Se.inspect(ot);var st=ie(ot),dt=st?": "+st:"";return"[Function"+dt+"]"}function ge(ot){return le(ue(ot.actual),128)+" "+ot.operator+" "+le(ue(ot.expected),128)}function Pe(ot,st,dt,Ct,$e){throw new ee.AssertionError({message:dt,actual:ot,expected:st,operator:Ct,stackStartFunction:$e})}ee.fail=Pe;function je(ot,st){ot||Pe(ot,!0,st,"==",ee.ok)}ee.ok=je,ee.equal=function(st,dt,Ct){st!=dt&&Pe(st,dt,Ct,"==",ee.equal)},ee.notEqual=function(st,dt,Ct){st==dt&&Pe(st,dt,Ct,"!=",ee.notEqual)},ee.deepEqual=function(st,dt,Ct){Be(st,dt,!1)||Pe(st,dt,Ct,"deepEqual",ee.deepEqual)},ee.deepStrictEqual=function(st,dt,Ct){Be(st,dt,!0)||Pe(st,dt,Ct,"deepStrictEqual",ee.deepStrictEqual)};function Be(ot,st,dt,Ct){if(ot===st)return!0;if(Ce(ot)&&Ce(st))return ke(ot,st)===0;if(Se.isDate(ot)&&Se.isDate(st))return ot.getTime()===st.getTime();if(Se.isRegExp(ot)&&Se.isRegExp(st))return ot.source===st.source&&ot.global===st.global&&ot.multiline===st.multiline&&ot.lastIndex===st.lastIndex&&ot.ignoreCase===st.ignoreCase;if((ot===null||typeof ot!="object")&&(st===null||typeof st!="object"))return dt?ot===st:ot==st;if(z(ot)&&z(st)&&de(ot)===de(st)&&!(ot instanceof Float32Array||ot instanceof Float64Array))return ke(new Uint8Array(ot.buffer),new Uint8Array(st.buffer))===0;if(Ce(ot)!==Ce(st))return!1;Ct=Ct||{actual:[],expected:[]};var $e=Ct.actual.indexOf(ot);return $e!==-1&&$e===Ct.expected.indexOf(st)?!0:(Ct.actual.push(ot),Ct.expected.push(st),Ne(ot,st,dt,Ct))}function Fe(ot){return Object.prototype.toString.call(ot)=="[object Arguments]"}function Ne(ot,st,dt,Ct){if(ot==null||st===null||st===void 0)return!1;if(Se.isPrimitive(ot)||Se.isPrimitive(st))return ot===st;if(dt&&Object.getPrototypeOf(ot)!==Object.getPrototypeOf(st))return!1;var $e=Fe(ot),rt=Fe(st);if($e&&!rt||!$e&&rt)return!1;if($e)return ot=ve.call(ot),st=ve.call(st),Be(ot,st,dt);var St=Ke(ot),Pt=Ke(st),wt,pt;if(St.length!==Pt.length)return!1;for(St.sort(),Pt.sort(),pt=St.length-1;pt>=0;pt--)if(St[pt]!==Pt[pt])return!1;for(pt=St.length-1;pt>=0;pt--)if(wt=St[pt],!Be(ot[wt],st[wt],dt,Ct))return!1;return!0}ee.notDeepEqual=function(st,dt,Ct){Be(st,dt,!1)&&Pe(st,dt,Ct,"notDeepEqual",ee.notDeepEqual)},ee.notDeepStrictEqual=Ae;function Ae(ot,st,dt){Be(ot,st,!0)&&Pe(ot,st,dt,"notDeepStrictEqual",Ae)}ee.strictEqual=function(st,dt,Ct){st!==dt&&Pe(st,dt,Ct,"===",ee.strictEqual)},ee.notStrictEqual=function(st,dt,Ct){st===dt&&Pe(st,dt,Ct,"!==",ee.notStrictEqual)};function Ie(ot,st){if(!ot||!st)return!1;if(Object.prototype.toString.call(st)=="[object RegExp]")return st.test(ot);try{if(ot instanceof st)return!0}catch(dt){}return Error.isPrototypeOf(st)?!1:st.call({},ot)===!0}function We(ot){var st;try{ot()}catch(dt){st=dt}return st}function Ye(ot,st,dt,Ct){var $e;if(typeof st!="function")throw new TypeError('"block" argument must be a function');typeof dt=="string"&&(Ct=dt,dt=null),$e=We(st),Ct=(dt&&dt.name?" ("+dt.name+").":".")+(Ct?" "+Ct:"."),ot&&!$e&&Pe($e,dt,"Missing expected exception"+Ct);var rt=typeof Ct=="string",St=!ot&&Se.isError($e),Pt=!ot&&$e&&!dt;if((St&&rt&&Ie($e,dt)||Pt)&&Pe($e,dt,"Got unwanted exception"+Ct),ot&&$e&&dt&&!Ie($e,dt)||!ot&&$e)throw $e}ee.throws=function(ot,st,dt){Ye(!0,ot,st,dt)},ee.doesNotThrow=function(ot,st,dt){Ye(!1,ot,st,dt)},ee.ifError=function(ot){if(ot)throw ot};function Ue(ot,st){ot||Pe(ot,!0,st,"==",Ue)}ee.strict=me(Ue,ee,{equal:ee.strictEqual,deepEqual:ee.deepStrictEqual,notEqual:ee.notStrictEqual,notDeepEqual:ee.notDeepStrictEqual}),ee.strict.strict=ee.strict;var Ke=Object.keys||function(ot){var st=[];for(var dt in ot)Me.call(ot,dt)&&st.push(dt);return st}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(oe,ze,De){typeof Object.create=="function"?ze.exports=function(me,ke){me.super_=ke,me.prototype=Object.create(ke.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}})}:ze.exports=function(me,ke){me.super_=ke;var Ce=function(){};Ce.prototype=ke.prototype,me.prototype=new Ce,me.prototype.constructor=me}},{}],84:[function(oe,ze,De){ze.exports=function(me){return me&&typeof me=="object"&&typeof me.copy=="function"&&typeof me.fill=="function"&&typeof me.readUInt8=="function"}},{}],85:[function(oe,ze,De){(function(fe,me){(function(){var ke=/%[sdj%]/g;De.format=function(Pt){if(!Ne(Pt)){for(var wt=[],pt=0;pt<arguments.length;pt++)wt.push(Me(arguments[pt]));return wt.join(" ")}for(var pt=1,ft=arguments,ht=ft.length,Et=String(Pt).replace(ke,function(yt){if(yt==="%%")return"%";if(pt>=ht)return yt;switch(yt){case"%s":return String(ft[pt++]);case"%d":return Number(ft[pt++]);case"%j":try{return JSON.stringify(ft[pt++])}catch(At){return"[Circular]"}default:return yt}}),mt=ft[pt];pt<ht;mt=ft[++pt])je(mt)||!Ye(mt)?Et+=" "+mt:Et+=" "+Me(mt);return Et},De.deprecate=function(Pt,wt){if(Ie(me.process))return function(){return De.deprecate(Pt,wt).apply(this,arguments)};if(fe.noDeprecation===!0)return Pt;var pt=!1;function ft(){if(!pt){if(fe.throwDeprecation)throw new Error(wt);fe.traceDeprecation?console.trace(wt):console.error(wt),pt=!0}return Pt.apply(this,arguments)}return ft};var Ce={},Se;De.debuglog=function(Pt){if(Ie(Se)&&(Se=fe.env.NODE_DEBUG||""),Pt=Pt.toUpperCase(),!Ce[Pt])if(new RegExp("\\b"+Pt+"\\b","i").test(Se)){var wt=fe.pid;Ce[Pt]=function(){var pt=De.format.apply(De,arguments);console.error("%s %d: %s",Pt,wt,pt)}}else Ce[Pt]=function(){};return Ce[Pt]};function Me(Pt,wt){var pt={seen:[],stylize:we};return arguments.length>=3&&(pt.depth=arguments[2]),arguments.length>=4&&(pt.colors=arguments[3]),Pe(wt)?pt.showHidden=wt:wt&&De._extend(pt,wt),Ie(pt.showHidden)&&(pt.showHidden=!1),Ie(pt.depth)&&(pt.depth=2),Ie(pt.colors)&&(pt.colors=!1),Ie(pt.customInspect)&&(pt.customInspect=!0),pt.colors&&(pt.stylize=ve),z(pt,Pt,pt.depth)}De.inspect=Me,Me.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]},Me.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ve(Pt,wt){var pt=Me.styles[wt];return pt?"\x1B["+Me.colors[pt][0]+"m"+Pt+"\x1B["+Me.colors[pt][1]+"m":Pt}function we(Pt,wt){return Pt}function de(Pt){var wt={};return Pt.forEach(function(pt,ft){wt[pt]=!0}),wt}function z(Pt,wt,pt){if(Pt.customInspect&&wt&&ot(wt.inspect)&&wt.inspect!==De.inspect&&!(wt.constructor&&wt.constructor.prototype===wt)){var ft=wt.inspect(pt,Pt);return Ne(ft)||(ft=z(Pt,ft,pt)),ft}var ht=ee(Pt,wt);if(ht)return ht;var Et=Object.keys(wt),mt=de(Et);if(Pt.showHidden&&(Et=Object.getOwnPropertyNames(wt)),Ke(wt)&&(Et.indexOf("message")>=0||Et.indexOf("description")>=0))return ae(wt);if(Et.length===0){if(ot(wt)){var yt=wt.name?": "+wt.name:"";return Pt.stylize("[Function"+yt+"]","special")}if(We(wt))return Pt.stylize(RegExp.prototype.toString.call(wt),"regexp");if(Ue(wt))return Pt.stylize(Date.prototype.toString.call(wt),"date");if(Ke(wt))return ae(wt)}var At="",xt=!1,tt=["{","}"];if(ge(wt)&&(xt=!0,tt=["[","]"]),ot(wt)){var Ve=wt.name?": "+wt.name:"";At=" [Function"+Ve+"]"}if(We(wt)&&(At=" "+RegExp.prototype.toString.call(wt)),Ue(wt)&&(At=" "+Date.prototype.toUTCString.call(wt)),Ke(wt)&&(At=" "+ae(wt)),Et.length===0&&(!xt||wt.length==0))return tt[0]+At+tt[1];if(pt<0)return We(wt)?Pt.stylize(RegExp.prototype.toString.call(wt),"regexp"):Pt.stylize("[Object]","special");Pt.seen.push(wt);var xe;return xt?xe=ie(Pt,wt,pt,mt,Et):xe=Et.map(function(Le){return le(Pt,wt,pt,mt,Le,xt)}),Pt.seen.pop(),ue(xe,At,tt)}function ee(Pt,wt){if(Ie(wt))return Pt.stylize("undefined","undefined");if(Ne(wt)){var pt="'"+JSON.stringify(wt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Pt.stylize(pt,"string")}if(Fe(wt))return Pt.stylize(""+wt,"number");if(Pe(wt))return Pt.stylize(""+wt,"boolean");if(je(wt))return Pt.stylize("null","null")}function ae(Pt){return"["+Error.prototype.toString.call(Pt)+"]"}function ie(Pt,wt,pt,ft,ht){for(var Et=[],mt=0,yt=wt.length;mt<yt;++mt)St(wt,String(mt))?Et.push(le(Pt,wt,pt,ft,String(mt),!0)):Et.push("");return ht.forEach(function(At){At.match(/^\d+$/)||Et.push(le(Pt,wt,pt,ft,At,!0))}),Et}function le(Pt,wt,pt,ft,ht,Et){var mt,yt,At;if(At=Object.getOwnPropertyDescriptor(wt,ht)||{value:wt[ht]},At.get?At.set?yt=Pt.stylize("[Getter/Setter]","special"):yt=Pt.stylize("[Getter]","special"):At.set&&(yt=Pt.stylize("[Setter]","special")),St(ft,ht)||(mt="["+ht+"]"),yt||(Pt.seen.indexOf(At.value)<0?(je(pt)?yt=z(Pt,At.value,null):yt=z(Pt,At.value,pt-1),yt.indexOf(`
`)>-1&&(Et?yt=yt.split(`
`).map(function(xt){return" "+xt}).join(`
`).substr(2):yt=`
`+yt.split(`
`).map(function(xt){return" "+xt}).join(`
`))):yt=Pt.stylize("[Circular]","special")),Ie(mt)){if(Et&&ht.match(/^\d+$/))return yt;mt=JSON.stringify(""+ht),mt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(mt=mt.substr(1,mt.length-2),mt=Pt.stylize(mt,"name")):(mt=mt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),mt=Pt.stylize(mt,"string"))}return mt+": "+yt}function ue(Pt,wt,pt){var ft=0,ht=Pt.reduce(function(Et,mt){return ft++,mt.indexOf(`
`)>=0&&ft++,Et+mt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ht>60?pt[0]+(wt===""?"":wt+`
`)+" "+Pt.join(`,
`)+" "+pt[1]:pt[0]+wt+" "+Pt.join(", ")+" "+pt[1]}function ge(Pt){return Array.isArray(Pt)}De.isArray=ge;function Pe(Pt){return typeof Pt=="boolean"}De.isBoolean=Pe;function je(Pt){return Pt===null}De.isNull=je;function Be(Pt){return Pt==null}De.isNullOrUndefined=Be;function Fe(Pt){return typeof Pt=="number"}De.isNumber=Fe;function Ne(Pt){return typeof Pt=="string"}De.isString=Ne;function Ae(Pt){return typeof Pt=="symbol"}De.isSymbol=Ae;function Ie(Pt){return Pt===void 0}De.isUndefined=Ie;function We(Pt){return Ye(Pt)&&dt(Pt)==="[object RegExp]"}De.isRegExp=We;function Ye(Pt){return typeof Pt=="object"&&Pt!==null}De.isObject=Ye;function Ue(Pt){return Ye(Pt)&&dt(Pt)==="[object Date]"}De.isDate=Ue;function Ke(Pt){return Ye(Pt)&&(dt(Pt)==="[object Error]"||Pt instanceof Error)}De.isError=Ke;function ot(Pt){return typeof Pt=="function"}De.isFunction=ot;function st(Pt){return Pt===null||typeof Pt=="boolean"||typeof Pt=="number"||typeof Pt=="string"||typeof Pt=="symbol"||typeof Pt=="undefined"}De.isPrimitive=st,De.isBuffer=oe("./support/isBuffer");function dt(Pt){return Object.prototype.toString.call(Pt)}function Ct(Pt){return Pt<10?"0"+Pt.toString(10):Pt.toString(10)}var $e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rt(){var Pt=new Date,wt=[Ct(Pt.getHours()),Ct(Pt.getMinutes()),Ct(Pt.getSeconds())].join(":");return[Pt.getDate(),$e[Pt.getMonth()],wt].join(" ")}De.log=function(){console.log("%s - %s",rt(),De.format.apply(De,arguments))},De.inherits=oe("inherits"),De._extend=function(Pt,wt){if(!wt||!Ye(wt))return Pt;for(var pt=Object.keys(wt),ft=pt.length;ft--;)Pt[pt[ft]]=wt[pt[ft]];return Pt};function St(Pt,wt){return Object.prototype.hasOwnProperty.call(Pt,wt)}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],ke=typeof globalThis=="undefined"?fe:globalThis;ze.exports=function(){for(var Se=[],Me=0;Me<me.length;Me++)typeof ke[me[Me]]=="function"&&(Se[Se.length]=me[Me]);return Se}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(oe,ze,De){"use strict";De.byteLength=we,De.toByteArray=z,De.fromByteArray=ie;for(var fe=[],me=[],ke=typeof Uint8Array!="undefined"?Uint8Array:Array,Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se=0,Me=Ce.length;Se<Me;++Se)fe[Se]=Ce[Se],me[Ce.charCodeAt(Se)]=Se;me[45]=62,me[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 ge=le.indexOf("=");ge===-1&&(ge=ue);var Pe=ge===ue?0:4-ge%4;return[ge,Pe]}function we(le){var ue=ve(le),ge=ue[0],Pe=ue[1];return(ge+Pe)*3/4-Pe}function de(le,ue,ge){return(ue+ge)*3/4-ge}function z(le){var ue,ge=ve(le),Pe=ge[0],je=ge[1],Be=new ke(de(le,Pe,je)),Fe=0,Ne=je>0?Pe-4:Pe,Ae;for(Ae=0;Ae<Ne;Ae+=4)ue=me[le.charCodeAt(Ae)]<<18|me[le.charCodeAt(Ae+1)]<<12|me[le.charCodeAt(Ae+2)]<<6|me[le.charCodeAt(Ae+3)],Be[Fe++]=ue>>16&255,Be[Fe++]=ue>>8&255,Be[Fe++]=ue&255;return je===2&&(ue=me[le.charCodeAt(Ae)]<<2|me[le.charCodeAt(Ae+1)]>>4,Be[Fe++]=ue&255),je===1&&(ue=me[le.charCodeAt(Ae)]<<10|me[le.charCodeAt(Ae+1)]<<4|me[le.charCodeAt(Ae+2)]>>2,Be[Fe++]=ue>>8&255,Be[Fe++]=ue&255),Be}function ee(le){return fe[le>>18&63]+fe[le>>12&63]+fe[le>>6&63]+fe[le&63]}function ae(le,ue,ge){for(var Pe,je=[],Be=ue;Be<ge;Be+=3)Pe=(le[Be]<<16&16711680)+(le[Be+1]<<8&65280)+(le[Be+2]&255),je.push(ee(Pe));return je.join("")}function ie(le){for(var ue,ge=le.length,Pe=ge%3,je=[],Be=16383,Fe=0,Ne=ge-Pe;Fe<Ne;Fe+=Be)je.push(ae(le,Fe,Fe+Be>Ne?Ne:Fe+Be));return Pe===1?(ue=le[ge-1],je.push(fe[ue>>2]+fe[ue<<4&63]+"==")):Pe===2&&(ue=(le[ge-2]<<8)+le[ge-1],je.push(fe[ue>>10]+fe[ue>>4&63]+fe[ue<<2&63]+"=")),je.join("")}},{}],88:[function(oe,ze,De){(function(fe,me,ke){typeof ze!="undefined"&&ze.exports?ze.exports=ke():typeof at=="function"&&at.amd?at(me,ke):fe[me]=ke()})(this,"bowser",function(){var fe=!0;function me(de){function z(wt){var pt=de.match(wt);return pt&&pt.length>1&&pt[1]||""}function ee(wt){var pt=de.match(wt);return pt&&pt.length>1&&pt[2]||""}var ae=z(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(de),le=!ie&&/android/i.test(de),ue=/nexus\s*[0-6]\s*/i.test(de),ge=!ue&&/nexus\s*[0-9]+/i.test(de),Pe=/CrOS/.test(de),je=/silk/i.test(de),Be=/sailfish/i.test(de),Fe=/tizen/i.test(de),Ne=/(web|hpw)(o|0)s/i.test(de),Ae=/windows phone/i.test(de),Ie=/SamsungBrowser/i.test(de),We=!Ae&&/windows/i.test(de),Ye=!ae&&!je&&/macintosh/i.test(de),Ue=!le&&!Be&&!Fe&&!Ne&&/linux/i.test(de),Ke=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=z(/version\/(\d+(\.\d+)?)/i),st=/tablet/i.test(de)&&!/tablet pc/i.test(de),dt=!st&&/[^-]mobi/i.test(de),Ct=/xbox/i.test(de),$e;/opera/i.test(de)?$e={name:"Opera",opera:fe,version:ot||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(de)?$e={name:"Opera",opera:fe,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(de)?$e={name:"Samsung Internet for Android",samsungBrowser:fe,version:ot||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(de)?$e={name:"NAVER Whale browser",whale:fe,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(de)?$e={name:"MZ Browser",mzbrowser:fe,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(de)?$e={name:"Opera Coast",coast:fe,version:ot||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(de)?$e={name:"Focus",focus:fe,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(de)?$e={name:"Yandex Browser",yandexbrowser:fe,version:ot||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(de)?$e={name:"UC Browser",ucbrowser:fe,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(de)?$e={name:"Maxthon",maxthon:fe,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(de)?$e={name:"Epiphany",epiphany:fe,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(de)?$e={name:"Puffin",puffin:fe,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(de)?$e={name:"Sleipnir",sleipnir:fe,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(de)?$e={name:"K-Meleon",kMeleon:fe,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ae?($e={name:"Windows Phone",osname:"Windows Phone",windowsphone:fe},Ke?($e.msedge=fe,$e.version=Ke):($e.msie=fe,$e.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(de)?$e={name:"Internet Explorer",msie:fe,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Pe?$e={name:"Chrome",osname:"Chrome OS",chromeos:fe,chromeBook:fe,chrome:fe,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(de)?$e={name:"Microsoft Edge",msedge:fe,version:Ke}:/vivaldi/i.test(de)?$e={name:"Vivaldi",vivaldi:fe,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:Be?$e={name:"Sailfish",osname:"Sailfish OS",sailfish:fe,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(de)?$e={name:"SeaMonkey",seamonkey:fe,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(de)?($e={name:"Firefox",firefox:fe,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(de)&&($e.firefoxos=fe,$e.osname="Firefox OS")):je?$e={name:"Amazon Silk",silk:fe,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(de)?$e={name:"PhantomJS",phantom:fe,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(de)?$e={name:"SlimerJS",slimer:fe,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(de)||/rim\stablet/i.test(de)?$e={name:"BlackBerry",osname:"BlackBerry OS",blackberry:fe,version:ot||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ne?($e={name:"WebOS",osname:"WebOS",webos:fe,version:ot||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(de)&&($e.touchpad=fe)):/bada/i.test(de)?$e={name:"Bada",osname:"Bada",bada:fe,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Fe?$e={name:"Tizen",osname:"Tizen",tizen:fe,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(de)?$e={name:"QupZilla",qupzilla:fe,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(de)?$e={name:"Chromium",chromium:fe,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(de)?$e={name:"Chrome",chrome:fe,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?$e={name:"Android",version:ot}:/safari|applewebkit/i.test(de)?($e={name:"Safari",safari:fe},ot&&($e.version=ot)):ae?($e={name:ae=="iphone"?"iPhone":ae=="ipad"?"iPad":"iPod"},ot&&($e.version=ot)):/googlebot/i.test(de)?$e={name:"Googlebot",googlebot:fe,version:z(/googlebot\/(\d+(\.\d+))/i)||ot}:$e={name:z(/^(.*)\/(.*) /),version:ee(/^(.*)\/(.*) /)},!$e.msedge&&/(apple)?webkit/i.test(de)?(/(apple)?webkit\/537\.36/i.test(de)?($e.name=$e.name||"Blink",$e.blink=fe):($e.name=$e.name||"Webkit",$e.webkit=fe),!$e.version&&ot&&($e.version=ot)):!$e.opera&&/gecko\//i.test(de)&&($e.name=$e.name||"Gecko",$e.gecko=fe,$e.version=$e.version||z(/gecko\/(\d+(\.\d+)?)/i)),!$e.windowsphone&&(le||$e.silk)?($e.android=fe,$e.osname="Android"):!$e.windowsphone&&ae?($e[ae]=fe,$e.ios=fe,$e.osname="iOS"):Ye?($e.mac=fe,$e.osname="macOS"):Ct?($e.xbox=fe,$e.osname="Xbox"):We?($e.windows=fe,$e.osname="Windows"):Ue&&($e.linux=fe,$e.osname="Linux");function rt(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 St="";$e.windows?St=rt(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):$e.windowsphone?St=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):$e.mac?(St=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),St=St.replace(/[_\s]/g,".")):ae?(St=z(/os (\d+([_\s]\d+)*) like mac os x/i),St=St.replace(/[_\s]/g,".")):le?St=z(/android[ \/-](\d+(\.\d+)*)/i):$e.webos?St=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):$e.blackberry?St=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):$e.bada?St=z(/bada\/(\d+(\.\d+)*)/i):$e.tizen&&(St=z(/tizen[\/\s](\d+(\.\d+)*)/i)),St&&($e.osversion=St);var Pt=!$e.windows&&St.split(".")[0];return st||ge||ae=="ipad"||le&&(Pt==3||Pt>=4&&!dt)||$e.silk?$e.tablet=fe:(dt||ae=="iphone"||ae=="ipod"||le||ue||$e.blackberry||$e.webos||$e.bada)&&($e.mobile=fe),$e.msedge||$e.msie&&$e.version>=10||$e.yandexbrowser&&$e.version>=15||$e.vivaldi&&$e.version>=1||$e.chrome&&$e.version>=20||$e.samsungBrowser&&$e.version>=4||$e.whale&&Me([$e.version,"1.0"])===1||$e.mzbrowser&&Me([$e.version,"6.0"])===1||$e.focus&&Me([$e.version,"1.0"])===1||$e.firefox&&$e.version>=20||$e.safari&&$e.version>=6||$e.opera&&$e.version>=10||$e.ios&&$e.osversion&&$e.osversion.split(".")[0]>=6||$e.blackberry&&$e.version>=10.1||$e.chromium&&$e.version>=20?$e.a=fe:$e.msie&&$e.version<10||$e.chrome&&$e.version<20||$e.firefox&&$e.version<20||$e.safari&&$e.version<6||$e.opera&&$e.version<10||$e.ios&&$e.osversion&&$e.osversion.split(".")[0]<6||$e.chromium&&$e.version<20?$e.c=fe:$e.x=fe,$e}var ke=me(typeof navigator!="undefined"&&navigator.userAgent||"");ke.test=function(de){for(var z=0;z<de.length;++z){var ee=de[z];if(typeof ee=="string"&&ee in ke)return!0}return!1};function Ce(de){return de.split(".").length}function Se(de,z){var ee=[],ae;if(Array.prototype.map)return Array.prototype.map.call(de,z);for(ae=0;ae<de.length;ae++)ee.push(z(de[ae]));return ee}function Me(de){for(var z=Math.max(Ce(de[0]),Ce(de[1])),ee=Se(de,function(ae){var ie=z-Ce(ae);return ae=ae+new Array(ie+1).join(".0"),Se(ae.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(de,z,ee){var ae=ke;typeof z=="string"&&(ee=z,z=void 0),z===void 0&&(z=!1),ee&&(ae=me(ee));var ie=""+ae.version;for(var le in de)if(de.hasOwnProperty(le)&&ae[le]){if(typeof de[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(de));return Me([ie,de[le]])<0}return z}function we(de,z,ee){return!ve(de,z,ee)}return ke.isUnsupportedBrowser=ve,ke.compareVersions=Me,ke.check=we,ke._detect=me,ke.detect=me,ke})},{}],89:[function(oe,ze,De){},{}],90:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("base64-js"),ke=oe("ieee754");De.Buffer=ve,De.SlowBuffer=Pe,De.INSPECT_MAX_BYTES=50;var Ce=2147483647;De.kMaxLength=Ce,ve.TYPED_ARRAY_SUPPORT=Se(),!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 Se(){try{var _e=new Uint8Array(1);return _e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},_e.foo()===42}catch(He){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 Me(_e){if(_e>Ce)throw new RangeError('The value "'+_e+'" is invalid for option "size"');var He=new Uint8Array(_e);return He.__proto__=ve.prototype,He}function ve(_e,He,Qe){if(typeof _e=="number"){if(typeof He=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ee(_e)}return we(_e,He,Qe)}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 we(_e,He,Qe){if(typeof _e=="string")return ae(_e,He);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(nt(_e,ArrayBuffer)||_e&&nt(_e.buffer,ArrayBuffer))return le(_e,He,Qe);if(typeof _e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ut=_e.valueOf&&_e.valueOf();if(ut!=null&&ut!==_e)return ve.from(ut,He,Qe);var gt=ue(_e);if(gt)return gt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof _e[Symbol.toPrimitive]=="function")return ve.from(_e[Symbol.toPrimitive]("string"),He,Qe);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,He,Qe){return we(_e,He,Qe)},ve.prototype.__proto__=Uint8Array.prototype,ve.__proto__=Uint8Array;function de(_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,He,Qe){return de(_e),_e<=0?Me(_e):He!==void 0?typeof Qe=="string"?Me(_e).fill(He,Qe):Me(_e).fill(He):Me(_e)}ve.alloc=function(_e,He,Qe){return z(_e,He,Qe)};function ee(_e){return de(_e),Me(_e<0?0:ge(_e)|0)}ve.allocUnsafe=function(_e){return ee(_e)},ve.allocUnsafeSlow=function(_e){return ee(_e)};function ae(_e,He){if((typeof He!="string"||He==="")&&(He="utf8"),!ve.isEncoding(He))throw new TypeError("Unknown encoding: "+He);var Qe=je(_e,He)|0,ut=Me(Qe),gt=ut.write(_e,He);return gt!==Qe&&(ut=ut.slice(0,gt)),ut}function ie(_e){for(var He=_e.length<0?0:ge(_e.length)|0,Qe=Me(He),ut=0;ut<He;ut+=1)Qe[ut]=_e[ut]&255;return Qe}function le(_e,He,Qe){if(He<0||_e.byteLength<He)throw new RangeError('"offset" is outside of buffer bounds');if(_e.byteLength<He+(Qe||0))throw new RangeError('"length" is outside of buffer bounds');var ut;return He===void 0&&Qe===void 0?ut=new Uint8Array(_e):Qe===void 0?ut=new Uint8Array(_e,He):ut=new Uint8Array(_e,He,Qe),ut.__proto__=ve.prototype,ut}function ue(_e){if(ve.isBuffer(_e)){var He=ge(_e.length)|0,Qe=Me(He);return Qe.length===0||_e.copy(Qe,0,0,He),Qe}if(_e.length!==void 0)return typeof _e.length!="number"||Re(_e.length)?Me(0):ie(_e);if(_e.type==="Buffer"&&Array.isArray(_e.data))return ie(_e.data)}function ge(_e){if(_e>=Ce)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce.toString(16)+" bytes");return _e|0}function Pe(_e){return+_e!=_e&&(_e=0),ve.alloc(+_e)}ve.isBuffer=function(He){return He!=null&&He._isBuffer===!0&&He!==ve.prototype},ve.compare=function(He,Qe){if(nt(He,Uint8Array)&&(He=ve.from(He,He.offset,He.byteLength)),nt(Qe,Uint8Array)&&(Qe=ve.from(Qe,Qe.offset,Qe.byteLength)),!ve.isBuffer(He)||!ve.isBuffer(Qe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(He===Qe)return 0;for(var ut=He.length,gt=Qe.length,Mt=0,Nt=Math.min(ut,gt);Mt<Nt;++Mt)if(He[Mt]!==Qe[Mt]){ut=He[Mt],gt=Qe[Mt];break}return ut<gt?-1:gt<ut?1:0},ve.isEncoding=function(He){switch(String(He).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(He,Qe){if(!Array.isArray(He))throw new TypeError('"list" argument must be an Array of Buffers');if(He.length===0)return ve.alloc(0);var ut;if(Qe===void 0)for(Qe=0,ut=0;ut<He.length;++ut)Qe+=He[ut].length;var gt=ve.allocUnsafe(Qe),Mt=0;for(ut=0;ut<He.length;++ut){var Nt=He[ut];if(nt(Nt,Uint8Array)&&(Nt=ve.from(Nt)),!ve.isBuffer(Nt))throw new TypeError('"list" argument must be an Array of Buffers');Nt.copy(gt,Mt),Mt+=Nt.length}return gt};function je(_e,He){if(ve.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||nt(_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 Qe=_e.length,ut=arguments.length>2&&arguments[2]===!0;if(!ut&&Qe===0)return 0;for(var gt=!1;;)switch(He){case"ascii":case"latin1":case"binary":return Qe;case"utf8":case"utf-8":return tt(_e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qe*2;case"hex":return Qe>>>1;case"base64":return Le(_e).length;default:if(gt)return ut?-1:tt(_e).length;He=(""+He).toLowerCase(),gt=!0}}ve.byteLength=je;function Be(_e,He,Qe){var ut=!1;if((He===void 0||He<0)&&(He=0),He>this.length||((Qe===void 0||Qe>this.length)&&(Qe=this.length),Qe<=0)||(Qe>>>=0,He>>>=0,Qe<=He))return"";for(_e||(_e="utf8");;)switch(_e){case"hex":return Pt(this,He,Qe);case"utf8":case"utf-8":return dt(this,He,Qe);case"ascii":return rt(this,He,Qe);case"latin1":case"binary":return St(this,He,Qe);case"base64":return st(this,He,Qe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wt(this,He,Qe);default:if(ut)throw new TypeError("Unknown encoding: "+_e);_e=(_e+"").toLowerCase(),ut=!0}}ve.prototype._isBuffer=!0;function Fe(_e,He,Qe){var ut=_e[He];_e[He]=_e[Qe],_e[Qe]=ut}ve.prototype.swap16=function(){var He=this.length;if(He%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Qe=0;Qe<He;Qe+=2)Fe(this,Qe,Qe+1);return this},ve.prototype.swap32=function(){var He=this.length;if(He%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Qe=0;Qe<He;Qe+=4)Fe(this,Qe,Qe+3),Fe(this,Qe+1,Qe+2);return this},ve.prototype.swap64=function(){var He=this.length;if(He%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Qe=0;Qe<He;Qe+=8)Fe(this,Qe,Qe+7),Fe(this,Qe+1,Qe+6),Fe(this,Qe+2,Qe+5),Fe(this,Qe+3,Qe+4);return this},ve.prototype.toString=function(){var He=this.length;return He===0?"":arguments.length===0?dt(this,0,He):Be.apply(this,arguments)},ve.prototype.toLocaleString=ve.prototype.toString,ve.prototype.equals=function(He){if(!ve.isBuffer(He))throw new TypeError("Argument must be a Buffer");return this===He?!0:ve.compare(this,He)===0},ve.prototype.inspect=function(){var He="",Qe=De.INSPECT_MAX_BYTES;return He=this.toString("hex",0,Qe).replace(/(.{2})/g,"$1 ").trim(),this.length>Qe&&(He+=" ... "),"<Buffer "+He+">"},ve.prototype.compare=function(He,Qe,ut,gt,Mt){if(nt(He,Uint8Array)&&(He=ve.from(He,He.offset,He.byteLength)),!ve.isBuffer(He))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof He);if(Qe===void 0&&(Qe=0),ut===void 0&&(ut=He?He.length:0),gt===void 0&&(gt=0),Mt===void 0&&(Mt=this.length),Qe<0||ut>He.length||gt<0||Mt>this.length)throw new RangeError("out of range index");if(gt>=Mt&&Qe>=ut)return 0;if(gt>=Mt)return-1;if(Qe>=ut)return 1;if(Qe>>>=0,ut>>>=0,gt>>>=0,Mt>>>=0,this===He)return 0;for(var Nt=Mt-gt,Dt=ut-Qe,Ht=Math.min(Nt,Dt),Xt=this.slice(gt,Mt),$t=He.slice(Qe,ut),Ut=0;Ut<Ht;++Ut)if(Xt[Ut]!==$t[Ut]){Nt=Xt[Ut],Dt=$t[Ut];break}return Nt<Dt?-1:Dt<Nt?1:0};function Ne(_e,He,Qe,ut,gt){if(_e.length===0)return-1;if(typeof Qe=="string"?(ut=Qe,Qe=0):Qe>2147483647?Qe=2147483647:Qe<-2147483648&&(Qe=-2147483648),Qe=+Qe,Re(Qe)&&(Qe=gt?0:_e.length-1),Qe<0&&(Qe=_e.length+Qe),Qe>=_e.length){if(gt)return-1;Qe=_e.length-1}else if(Qe<0)if(gt)Qe=0;else return-1;if(typeof He=="string"&&(He=ve.from(He,ut)),ve.isBuffer(He))return He.length===0?-1:Ae(_e,He,Qe,ut,gt);if(typeof He=="number")return He=He&255,typeof Uint8Array.prototype.indexOf=="function"?gt?Uint8Array.prototype.indexOf.call(_e,He,Qe):Uint8Array.prototype.lastIndexOf.call(_e,He,Qe):Ae(_e,[He],Qe,ut,gt);throw new TypeError("val must be string, number or Buffer")}function Ae(_e,He,Qe,ut,gt){var Mt=1,Nt=_e.length,Dt=He.length;if(ut!==void 0&&(ut=String(ut).toLowerCase(),ut==="ucs2"||ut==="ucs-2"||ut==="utf16le"||ut==="utf-16le")){if(_e.length<2||He.length<2)return-1;Mt=2,Nt/=2,Dt/=2,Qe/=2}function Ht(nn,Wt){return Mt===1?nn[Wt]:nn.readUInt16BE(Wt*Mt)}var Xt;if(gt){var $t=-1;for(Xt=Qe;Xt<Nt;Xt++)if(Ht(_e,Xt)===Ht(He,$t===-1?0:Xt-$t)){if($t===-1&&($t=Xt),Xt-$t+1===Dt)return $t*Mt}else $t!==-1&&(Xt-=Xt-$t),$t=-1}else for(Qe+Dt>Nt&&(Qe=Nt-Dt),Xt=Qe;Xt>=0;Xt--){for(var Ut=!0,sn=0;sn<Dt;sn++)if(Ht(_e,Xt+sn)!==Ht(He,sn)){Ut=!1;break}if(Ut)return Xt}return-1}ve.prototype.includes=function(He,Qe,ut){return this.indexOf(He,Qe,ut)!==-1},ve.prototype.indexOf=function(He,Qe,ut){return Ne(this,He,Qe,ut,!0)},ve.prototype.lastIndexOf=function(He,Qe,ut){return Ne(this,He,Qe,ut,!1)};function Ie(_e,He,Qe,ut){Qe=Number(Qe)||0;var gt=_e.length-Qe;ut?(ut=Number(ut),ut>gt&&(ut=gt)):ut=gt;var Mt=He.length;ut>Mt/2&&(ut=Mt/2);for(var Nt=0;Nt<ut;++Nt){var Dt=parseInt(He.substr(Nt*2,2),16);if(Re(Dt))return Nt;_e[Qe+Nt]=Dt}return Nt}function We(_e,He,Qe,ut){return Ze(tt(He,_e.length-Qe),_e,Qe,ut)}function Ye(_e,He,Qe,ut){return Ze(Ve(He),_e,Qe,ut)}function Ue(_e,He,Qe,ut){return Ye(_e,He,Qe,ut)}function Ke(_e,He,Qe,ut){return Ze(Le(He),_e,Qe,ut)}function ot(_e,He,Qe,ut){return Ze(xe(He,_e.length-Qe),_e,Qe,ut)}ve.prototype.write=function(He,Qe,ut,gt){if(Qe===void 0)gt="utf8",ut=this.length,Qe=0;else if(ut===void 0&&typeof Qe=="string")gt=Qe,ut=this.length,Qe=0;else if(isFinite(Qe))Qe=Qe>>>0,isFinite(ut)?(ut=ut>>>0,gt===void 0&&(gt="utf8")):(gt=ut,ut=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Mt=this.length-Qe;if((ut===void 0||ut>Mt)&&(ut=Mt),He.length>0&&(ut<0||Qe<0)||Qe>this.length)throw new RangeError("Attempt to write outside buffer bounds");gt||(gt="utf8");for(var Nt=!1;;)switch(gt){case"hex":return Ie(this,He,Qe,ut);case"utf8":case"utf-8":return We(this,He,Qe,ut);case"ascii":return Ye(this,He,Qe,ut);case"latin1":case"binary":return Ue(this,He,Qe,ut);case"base64":return Ke(this,He,Qe,ut);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,He,Qe,ut);default:if(Nt)throw new TypeError("Unknown encoding: "+gt);gt=(""+gt).toLowerCase(),Nt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function st(_e,He,Qe){return He===0&&Qe===_e.length?me.fromByteArray(_e):me.fromByteArray(_e.slice(He,Qe))}function dt(_e,He,Qe){Qe=Math.min(_e.length,Qe);for(var ut=[],gt=He;gt<Qe;){var Mt=_e[gt],Nt=null,Dt=Mt>239?4:Mt>223?3:Mt>191?2:1;if(gt+Dt<=Qe){var Ht,Xt,$t,Ut;switch(Dt){case 1:Mt<128&&(Nt=Mt);break;case 2:Ht=_e[gt+1],(Ht&192)===128&&(Ut=(Mt&31)<<6|Ht&63,Ut>127&&(Nt=Ut));break;case 3:Ht=_e[gt+1],Xt=_e[gt+2],(Ht&192)===128&&(Xt&192)===128&&(Ut=(Mt&15)<<12|(Ht&63)<<6|Xt&63,Ut>2047&&(Ut<55296||Ut>57343)&&(Nt=Ut));break;case 4:Ht=_e[gt+1],Xt=_e[gt+2],$t=_e[gt+3],(Ht&192)===128&&(Xt&192)===128&&($t&192)===128&&(Ut=(Mt&15)<<18|(Ht&63)<<12|(Xt&63)<<6|$t&63,Ut>65535&&Ut<1114112&&(Nt=Ut))}}Nt===null?(Nt=65533,Dt=1):Nt>65535&&(Nt-=65536,ut.push(Nt>>>10&1023|55296),Nt=56320|Nt&1023),ut.push(Nt),gt+=Dt}return $e(ut)}var Ct=4096;function $e(_e){var He=_e.length;if(He<=Ct)return String.fromCharCode.apply(String,_e);for(var Qe="",ut=0;ut<He;)Qe+=String.fromCharCode.apply(String,_e.slice(ut,ut+=Ct));return Qe}function rt(_e,He,Qe){var ut="";Qe=Math.min(_e.length,Qe);for(var gt=He;gt<Qe;++gt)ut+=String.fromCharCode(_e[gt]&127);return ut}function St(_e,He,Qe){var ut="";Qe=Math.min(_e.length,Qe);for(var gt=He;gt<Qe;++gt)ut+=String.fromCharCode(_e[gt]);return ut}function Pt(_e,He,Qe){var ut=_e.length;(!He||He<0)&&(He=0),(!Qe||Qe<0||Qe>ut)&&(Qe=ut);for(var gt="",Mt=He;Mt<Qe;++Mt)gt+=xt(_e[Mt]);return gt}function wt(_e,He,Qe){for(var ut=_e.slice(He,Qe),gt="",Mt=0;Mt<ut.length;Mt+=2)gt+=String.fromCharCode(ut[Mt]+ut[Mt+1]*256);return gt}ve.prototype.slice=function(He,Qe){var ut=this.length;He=~~He,Qe=Qe===void 0?ut:~~Qe,He<0?(He+=ut,He<0&&(He=0)):He>ut&&(He=ut),Qe<0?(Qe+=ut,Qe<0&&(Qe=0)):Qe>ut&&(Qe=ut),Qe<He&&(Qe=He);var gt=this.subarray(He,Qe);return gt.__proto__=ve.prototype,gt};function pt(_e,He,Qe){if(_e%1!==0||_e<0)throw new RangeError("offset is not uint");if(_e+He>Qe)throw new RangeError("Trying to access beyond buffer length")}ve.prototype.readUIntLE=function(He,Qe,ut){He=He>>>0,Qe=Qe>>>0,ut||pt(He,Qe,this.length);for(var gt=this[He],Mt=1,Nt=0;++Nt<Qe&&(Mt*=256);)gt+=this[He+Nt]*Mt;return gt},ve.prototype.readUIntBE=function(He,Qe,ut){He=He>>>0,Qe=Qe>>>0,ut||pt(He,Qe,this.length);for(var gt=this[He+--Qe],Mt=1;Qe>0&&(Mt*=256);)gt+=this[He+--Qe]*Mt;return gt},ve.prototype.readUInt8=function(He,Qe){return He=He>>>0,Qe||pt(He,1,this.length),this[He]},ve.prototype.readUInt16LE=function(He,Qe){return He=He>>>0,Qe||pt(He,2,this.length),this[He]|this[He+1]<<8},ve.prototype.readUInt16BE=function(He,Qe){return He=He>>>0,Qe||pt(He,2,this.length),this[He]<<8|this[He+1]},ve.prototype.readUInt32LE=function(He,Qe){return He=He>>>0,Qe||pt(He,4,this.length),(this[He]|this[He+1]<<8|this[He+2]<<16)+this[He+3]*16777216},ve.prototype.readUInt32BE=function(He,Qe){return He=He>>>0,Qe||pt(He,4,this.length),this[He]*16777216+(this[He+1]<<16|this[He+2]<<8|this[He+3])},ve.prototype.readIntLE=function(He,Qe,ut){He=He>>>0,Qe=Qe>>>0,ut||pt(He,Qe,this.length);for(var gt=this[He],Mt=1,Nt=0;++Nt<Qe&&(Mt*=256);)gt+=this[He+Nt]*Mt;return Mt*=128,gt>=Mt&&(gt-=Math.pow(2,8*Qe)),gt},ve.prototype.readIntBE=function(He,Qe,ut){He=He>>>0,Qe=Qe>>>0,ut||pt(He,Qe,this.length);for(var gt=Qe,Mt=1,Nt=this[He+--gt];gt>0&&(Mt*=256);)Nt+=this[He+--gt]*Mt;return Mt*=128,Nt>=Mt&&(Nt-=Math.pow(2,8*Qe)),Nt},ve.prototype.readInt8=function(He,Qe){return He=He>>>0,Qe||pt(He,1,this.length),this[He]&128?(255-this[He]+1)*-1:this[He]},ve.prototype.readInt16LE=function(He,Qe){He=He>>>0,Qe||pt(He,2,this.length);var ut=this[He]|this[He+1]<<8;return ut&32768?ut|4294901760:ut},ve.prototype.readInt16BE=function(He,Qe){He=He>>>0,Qe||pt(He,2,this.length);var ut=this[He+1]|this[He]<<8;return ut&32768?ut|4294901760:ut},ve.prototype.readInt32LE=function(He,Qe){return He=He>>>0,Qe||pt(He,4,this.length),this[He]|this[He+1]<<8|this[He+2]<<16|this[He+3]<<24},ve.prototype.readInt32BE=function(He,Qe){return He=He>>>0,Qe||pt(He,4,this.length),this[He]<<24|this[He+1]<<16|this[He+2]<<8|this[He+3]},ve.prototype.readFloatLE=function(He,Qe){return He=He>>>0,Qe||pt(He,4,this.length),ke.read(this,He,!0,23,4)},ve.prototype.readFloatBE=function(He,Qe){return He=He>>>0,Qe||pt(He,4,this.length),ke.read(this,He,!1,23,4)},ve.prototype.readDoubleLE=function(He,Qe){return He=He>>>0,Qe||pt(He,8,this.length),ke.read(this,He,!0,52,8)},ve.prototype.readDoubleBE=function(He,Qe){return He=He>>>0,Qe||pt(He,8,this.length),ke.read(this,He,!1,52,8)};function ft(_e,He,Qe,ut,gt,Mt){if(!ve.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(He>gt||He<Mt)throw new RangeError('"value" argument is out of bounds');if(Qe+ut>_e.length)throw new RangeError("Index out of range")}ve.prototype.writeUIntLE=function(He,Qe,ut,gt){if(He=+He,Qe=Qe>>>0,ut=ut>>>0,!gt){var Mt=Math.pow(2,8*ut)-1;ft(this,He,Qe,ut,Mt,0)}var Nt=1,Dt=0;for(this[Qe]=He&255;++Dt<ut&&(Nt*=256);)this[Qe+Dt]=He/Nt&255;return Qe+ut},ve.prototype.writeUIntBE=function(He,Qe,ut,gt){if(He=+He,Qe=Qe>>>0,ut=ut>>>0,!gt){var Mt=Math.pow(2,8*ut)-1;ft(this,He,Qe,ut,Mt,0)}var Nt=ut-1,Dt=1;for(this[Qe+Nt]=He&255;--Nt>=0&&(Dt*=256);)this[Qe+Nt]=He/Dt&255;return Qe+ut},ve.prototype.writeUInt8=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,1,255,0),this[Qe]=He&255,Qe+1},ve.prototype.writeUInt16LE=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,2,65535,0),this[Qe]=He&255,this[Qe+1]=He>>>8,Qe+2},ve.prototype.writeUInt16BE=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,2,65535,0),this[Qe]=He>>>8,this[Qe+1]=He&255,Qe+2},ve.prototype.writeUInt32LE=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,4,4294967295,0),this[Qe+3]=He>>>24,this[Qe+2]=He>>>16,this[Qe+1]=He>>>8,this[Qe]=He&255,Qe+4},ve.prototype.writeUInt32BE=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,4,4294967295,0),this[Qe]=He>>>24,this[Qe+1]=He>>>16,this[Qe+2]=He>>>8,this[Qe+3]=He&255,Qe+4},ve.prototype.writeIntLE=function(He,Qe,ut,gt){if(He=+He,Qe=Qe>>>0,!gt){var Mt=Math.pow(2,8*ut-1);ft(this,He,Qe,ut,Mt-1,-Mt)}var Nt=0,Dt=1,Ht=0;for(this[Qe]=He&255;++Nt<ut&&(Dt*=256);)He<0&&Ht===0&&this[Qe+Nt-1]!==0&&(Ht=1),this[Qe+Nt]=(He/Dt>>0)-Ht&255;return Qe+ut},ve.prototype.writeIntBE=function(He,Qe,ut,gt){if(He=+He,Qe=Qe>>>0,!gt){var Mt=Math.pow(2,8*ut-1);ft(this,He,Qe,ut,Mt-1,-Mt)}var Nt=ut-1,Dt=1,Ht=0;for(this[Qe+Nt]=He&255;--Nt>=0&&(Dt*=256);)He<0&&Ht===0&&this[Qe+Nt+1]!==0&&(Ht=1),this[Qe+Nt]=(He/Dt>>0)-Ht&255;return Qe+ut},ve.prototype.writeInt8=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,1,127,-128),He<0&&(He=255+He+1),this[Qe]=He&255,Qe+1},ve.prototype.writeInt16LE=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,2,32767,-32768),this[Qe]=He&255,this[Qe+1]=He>>>8,Qe+2},ve.prototype.writeInt16BE=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,2,32767,-32768),this[Qe]=He>>>8,this[Qe+1]=He&255,Qe+2},ve.prototype.writeInt32LE=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,4,2147483647,-2147483648),this[Qe]=He&255,this[Qe+1]=He>>>8,this[Qe+2]=He>>>16,this[Qe+3]=He>>>24,Qe+4},ve.prototype.writeInt32BE=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ft(this,He,Qe,4,2147483647,-2147483648),He<0&&(He=4294967295+He+1),this[Qe]=He>>>24,this[Qe+1]=He>>>16,this[Qe+2]=He>>>8,this[Qe+3]=He&255,Qe+4};function ht(_e,He,Qe,ut,gt,Mt){if(Qe+ut>_e.length)throw new RangeError("Index out of range");if(Qe<0)throw new RangeError("Index out of range")}function Et(_e,He,Qe,ut,gt){return He=+He,Qe=Qe>>>0,gt||ht(_e,He,Qe,4,34028234663852886e22,-34028234663852886e22),ke.write(_e,He,Qe,ut,23,4),Qe+4}ve.prototype.writeFloatLE=function(He,Qe,ut){return Et(this,He,Qe,!0,ut)},ve.prototype.writeFloatBE=function(He,Qe,ut){return Et(this,He,Qe,!1,ut)};function mt(_e,He,Qe,ut,gt){return He=+He,Qe=Qe>>>0,gt||ht(_e,He,Qe,8,17976931348623157e292,-17976931348623157e292),ke.write(_e,He,Qe,ut,52,8),Qe+8}ve.prototype.writeDoubleLE=function(He,Qe,ut){return mt(this,He,Qe,!0,ut)},ve.prototype.writeDoubleBE=function(He,Qe,ut){return mt(this,He,Qe,!1,ut)},ve.prototype.copy=function(He,Qe,ut,gt){if(!ve.isBuffer(He))throw new TypeError("argument should be a Buffer");if(ut||(ut=0),!gt&&gt!==0&&(gt=this.length),Qe>=He.length&&(Qe=He.length),Qe||(Qe=0),gt>0&&gt<ut&&(gt=ut),gt===ut||He.length===0||this.length===0)return 0;if(Qe<0)throw new RangeError("targetStart out of bounds");if(ut<0||ut>=this.length)throw new RangeError("Index out of range");if(gt<0)throw new RangeError("sourceEnd out of bounds");gt>this.length&&(gt=this.length),He.length-Qe<gt-ut&&(gt=He.length-Qe+ut);var Mt=gt-ut;if(this===He&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(Qe,ut,gt);else if(this===He&&ut<Qe&&Qe<gt)for(var Nt=Mt-1;Nt>=0;--Nt)He[Nt+Qe]=this[Nt+ut];else Uint8Array.prototype.set.call(He,this.subarray(ut,gt),Qe);return Mt},ve.prototype.fill=function(He,Qe,ut,gt){if(typeof He=="string"){if(typeof Qe=="string"?(gt=Qe,Qe=0,ut=this.length):typeof ut=="string"&&(gt=ut,ut=this.length),gt!==void 0&&typeof gt!="string")throw new TypeError("encoding must be a string");if(typeof gt=="string"&&!ve.isEncoding(gt))throw new TypeError("Unknown encoding: "+gt);if(He.length===1){var Mt=He.charCodeAt(0);(gt==="utf8"&&Mt<128||gt==="latin1")&&(He=Mt)}}else typeof He=="number"&&(He=He&255);if(Qe<0||this.length<Qe||this.length<ut)throw new RangeError("Out of range index");if(ut<=Qe)return this;Qe=Qe>>>0,ut=ut===void 0?this.length:ut>>>0,He||(He=0);var Nt;if(typeof He=="number")for(Nt=Qe;Nt<ut;++Nt)this[Nt]=He;else{var Dt=ve.isBuffer(He)?He:ve.from(He,gt),Ht=Dt.length;if(Ht===0)throw new TypeError('The value "'+He+'" is invalid for argument "value"');for(Nt=0;Nt<ut-Qe;++Nt)this[Nt+Qe]=Dt[Nt%Ht]}return this};var yt=/[^+/0-9A-Za-z-_]/g;function At(_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 xt(_e){return _e<16?"0"+_e.toString(16):_e.toString(16)}function tt(_e,He){He=He||1/0;for(var Qe,ut=_e.length,gt=null,Mt=[],Nt=0;Nt<ut;++Nt){if(Qe=_e.charCodeAt(Nt),Qe>55295&&Qe<57344){if(!gt){if(Qe>56319){(He-=3)>-1&&Mt.push(239,191,189);continue}else if(Nt+1===ut){(He-=3)>-1&&Mt.push(239,191,189);continue}gt=Qe;continue}if(Qe<56320){(He-=3)>-1&&Mt.push(239,191,189),gt=Qe;continue}Qe=(gt-55296<<10|Qe-56320)+65536}else gt&&(He-=3)>-1&&Mt.push(239,191,189);if(gt=null,Qe<128){if((He-=1)<0)break;Mt.push(Qe)}else if(Qe<2048){if((He-=2)<0)break;Mt.push(Qe>>6|192,Qe&63|128)}else if(Qe<65536){if((He-=3)<0)break;Mt.push(Qe>>12|224,Qe>>6&63|128,Qe&63|128)}else if(Qe<1114112){if((He-=4)<0)break;Mt.push(Qe>>18|240,Qe>>12&63|128,Qe>>6&63|128,Qe&63|128)}else throw new Error("Invalid code point")}return Mt}function Ve(_e){for(var He=[],Qe=0;Qe<_e.length;++Qe)He.push(_e.charCodeAt(Qe)&255);return He}function xe(_e,He){for(var Qe,ut,gt,Mt=[],Nt=0;Nt<_e.length&&!((He-=2)<0);++Nt)Qe=_e.charCodeAt(Nt),ut=Qe>>8,gt=Qe%256,Mt.push(gt),Mt.push(ut);return Mt}function Le(_e){return me.toByteArray(At(_e))}function Ze(_e,He,Qe,ut){for(var gt=0;gt<ut&&!(gt+Qe>=He.length||gt>=_e.length);++gt)He[gt+Qe]=_e[gt];return gt}function nt(_e,He){return _e instanceof He||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===He.name}function Re(_e){return _e!==_e}}).call(this)}).call(this,oe("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(oe,ze,De){ze.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(oe,ze,De){"use strict";var fe=oe("get-intrinsic"),me=oe("./"),ke=me(fe("String.prototype.indexOf"));ze.exports=function(Se,Me){var ve=fe(Se,!!Me);return typeof ve=="function"&&ke(Se,".prototype.")>-1?me(ve):ve}},{"./":93,"get-intrinsic":348}],93:[function(oe,ze,De){"use strict";var fe=oe("function-bind"),me=oe("get-intrinsic"),ke=me("%Function.prototype.apply%"),Ce=me("%Function.prototype.call%"),Se=me("%Reflect.apply%",!0)||fe.call(Ce,ke),Me=me("%Object.getOwnPropertyDescriptor%",!0),ve=me("%Object.defineProperty%",!0),we=me("%Math.max%");if(ve)try{ve({},"a",{value:1})}catch(z){ve=null}ze.exports=function(ee){var ae=Se(fe,Ce,arguments);if(Me&&ve){var ie=Me(ae,"length");ie.configurable&&ve(ae,"length",{value:1+we(0,ee.length-(arguments.length-1))})}return ae};var de=function(){return Se(fe,ke,arguments)};ve?ve(ze.exports,"apply",{value:de}):ze.exports.apply=de},{"function-bind":347,"get-intrinsic":348}],94:[function(oe,ze,De){"use strict";var fe=Array.prototype.slice;ze.exports=me;function me(Ce,Se){if(!(this instanceof me))return new me(Ce,Se);this.src=Ce,this._withAccess=Se}me.prototype.withAccess=function(Ce){return this._withAccess=Ce!==!1,this},me.prototype.pick=function(Ce){return Array.isArray(Ce)||(Ce=fe.call(arguments)),Ce.length&&(this.keys=Ce),this},me.prototype.to=function(Ce){if(Ce=Ce||{},!this.src)return Ce;var Se=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Me=0;Me<Se.length;Me++)ve=Se[Me],Ce[ve]===void 0&&(Ce[ve]=this.src[ve]);return Ce}for(var Me=0;Me<Se.length;Me++){var ve=Se[Me];if(ke(Ce,ve)){var we=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);we&&Ce.__defineGetter__(ve,we),de&&Ce.__defineSetter__(ve,de),!we&&!de&&(Ce[ve]=this.src[ve])}}return Ce},me.prototype.toCover=function(Ce){for(var Se=this.keys||Object.keys(this.src),Me=0;Me<Se.length;Me++){var ve=Se[Me];delete Ce[ve];var we=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);we&&Ce.__defineGetter__(ve,we),de&&Ce.__defineSetter__(ve,de),!we&&!de&&(Ce[ve]=this.src[ve])}},me.prototype.override=me.prototype.toCover,me.prototype.and=function(Ce){var Se={};return this.to(Se),this.src=Ce,this.to(Se),this.src=Se,this};function ke(Ce,Se){return Ce[Se]===void 0&&Ce.__lookupGetter__(Se)===void 0&&Ce.__lookupSetter__(Se)===void 0}},{}],95:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/try-to-string"),Ce=fe.TypeError;ze.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-constructor"),ke=oe("../internals/try-to-string"),Ce=fe.TypeError;ze.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=fe.String,Ce=fe.TypeError;ze.exports=function(Se){if(typeof Se=="object"||me(Se))return Se;throw Ce("Can't set "+ke(Se)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=oe("../internals/object-create"),ke=oe("../internals/object-define-property"),Ce=fe("unscopables"),Se=Array.prototype;Se[Ce]==null&&ke.f(Se,Ce,{configurable:!0,value:me(null)}),ze.exports=function(Me){Se[Ce][Me]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(oe,ze,De){"use strict";var fe=oe("../internals/string-multibyte").charAt;ze.exports=function(me,ke,Ce){return ke+(Ce?fe(me,ke).length:1)}},{"../internals/string-multibyte":239}],100:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/object-is-prototype-of"),ke=fe.TypeError;ze.exports=function(Ce,Se){if(me(Se,Ce))return Ce;throw ke("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-object"),ke=fe.String,Ce=fe.TypeError;ze.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(oe,ze,De){ze.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-native"),me=oe("../internals/descriptors"),ke=oe("../internals/global"),Ce=oe("../internals/is-callable"),Se=oe("../internals/is-object"),Me=oe("../internals/has-own-property"),ve=oe("../internals/classof"),we=oe("../internals/try-to-string"),de=oe("../internals/create-non-enumerable-property"),z=oe("../internals/redefine"),ee=oe("../internals/object-define-property").f,ae=oe("../internals/object-is-prototype-of"),ie=oe("../internals/object-get-prototype-of"),le=oe("../internals/object-set-prototype-of"),ue=oe("../internals/well-known-symbol"),ge=oe("../internals/uid"),Pe=ke.Int8Array,je=Pe&&Pe.prototype,Be=ke.Uint8ClampedArray,Fe=Be&&Be.prototype,Ne=Pe&&ie(Pe),Ae=je&&ie(je),Ie=Object.prototype,We=ke.TypeError,Ye=ue("toStringTag"),Ue=ge("TYPED_ARRAY_TAG"),Ke=ge("TYPED_ARRAY_CONSTRUCTOR"),ot=fe&&!!le&&ve(ke.opera)!=="Opera",st=!1,dt,Ct,$e,rt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},St={BigInt64Array:8,BigUint64Array:8},Pt=function(yt){if(!Se(yt))return!1;var At=ve(yt);return At==="DataView"||Me(rt,At)||Me(St,At)},wt=function(mt){if(!Se(mt))return!1;var yt=ve(mt);return Me(rt,yt)||Me(St,yt)},pt=function(mt){if(wt(mt))return mt;throw We("Target is not a typed array")},ft=function(mt){if(Ce(mt)&&(!le||ae(Ne,mt)))return mt;throw We(we(mt)+" is not a typed array constructor")},ht=function(mt,yt,At,xt){if(me){if(At)for(var tt in rt){var Ve=ke[tt];if(Ve&&Me(Ve.prototype,mt))try{delete Ve.prototype[mt]}catch(xe){try{Ve.prototype[mt]=yt}catch(Le){}}}(!Ae[mt]||At)&&z(Ae,mt,At?yt:ot&&je[mt]||yt,xt)}},Et=function(mt,yt,At){var xt,tt;if(me){if(le){if(At){for(xt in rt)if(tt=ke[xt],tt&&Me(tt,mt))try{delete tt[mt]}catch(Ve){}}if(!Ne[mt]||At)try{return z(Ne,mt,At?yt:ot&&Ne[mt]||yt)}catch(Ve){}else return}for(xt in rt)tt=ke[xt],tt&&(!tt[mt]||At)&&z(tt,mt,yt)}};for(dt in rt)Ct=ke[dt],$e=Ct&&Ct.prototype,$e?de($e,Ke,Ct):ot=!1;for(dt in St)Ct=ke[dt],$e=Ct&&Ct.prototype,$e&&de($e,Ke,Ct);if((!ot||!Ce(Ne)||Ne===Function.prototype)&&(Ne=function(){throw We("Incorrect invocation")},ot))for(dt in rt)ke[dt]&&le(ke[dt],Ne);if((!ot||!Ae||Ae===Ie)&&(Ae=Ne.prototype,ot))for(dt in rt)ke[dt]&&le(ke[dt].prototype,Ae);if(ot&&ie(Fe)!==Ae&&le(Fe,Ae),me&&!Me(Ae,Ye)){st=!0,ee(Ae,Ye,{get:function(){return Se(this)?this[Ue]:void 0}});for(dt in rt)ke[dt]&&de(ke[dt],Ue,dt)}ze.exports={NATIVE_ARRAY_BUFFER_VIEWS:ot,TYPED_ARRAY_CONSTRUCTOR:Ke,TYPED_ARRAY_TAG:st&&Ue,aTypedArray:pt,aTypedArrayConstructor:ft,exportTypedArrayMethod:ht,exportTypedArrayStaticMethod:Et,isView:Pt,isTypedArray:wt,TypedArray:Ne,TypedArrayPrototype:Ae}},{"../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(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/descriptors"),Ce=oe("../internals/array-buffer-native"),Se=oe("../internals/function-name"),Me=oe("../internals/create-non-enumerable-property"),ve=oe("../internals/redefine-all"),we=oe("../internals/fails"),de=oe("../internals/an-instance"),z=oe("../internals/to-integer-or-infinity"),ee=oe("../internals/to-length"),ae=oe("../internals/to-index"),ie=oe("../internals/ieee754"),le=oe("../internals/object-get-prototype-of"),ue=oe("../internals/object-set-prototype-of"),ge=oe("../internals/object-get-own-property-names").f,Pe=oe("../internals/object-define-property").f,je=oe("../internals/array-fill"),Be=oe("../internals/array-slice-simple"),Fe=oe("../internals/set-to-string-tag"),Ne=oe("../internals/internal-state"),Ae=Se.PROPER,Ie=Se.CONFIGURABLE,We=Ne.get,Ye=Ne.set,Ue="ArrayBuffer",Ke="DataView",ot="prototype",st="Wrong length",dt="Wrong index",Ct=fe[Ue],$e=Ct,rt=$e&&$e[ot],St=fe[Ke],Pt=St&&St[ot],wt=Object.prototype,pt=fe.Array,ft=fe.RangeError,ht=me(je),Et=me([].reverse),mt=ie.pack,yt=ie.unpack,At=function(Nt){return[Nt&255]},xt=function(Nt){return[Nt&255,Nt>>8&255]},tt=function(Nt){return[Nt&255,Nt>>8&255,Nt>>16&255,Nt>>24&255]},Ve=function(Nt){return Nt[3]<<24|Nt[2]<<16|Nt[1]<<8|Nt[0]},xe=function(Nt){return mt(Nt,23,4)},Le=function(Nt){return mt(Nt,52,8)},Ze=function(Nt,Dt){Pe(Nt[ot],Dt,{get:function(){return We(this)[Dt]}})},nt=function(Nt,Dt,Ht,Xt){var $t=ae(Ht),Ut=We(Nt);if($t+Dt>Ut.byteLength)throw ft(dt);var sn=We(Ut.buffer).bytes,nn=$t+Ut.byteOffset,Wt=Be(sn,nn,nn+Dt);return Xt?Wt:Et(Wt)},Re=function(Nt,Dt,Ht,Xt,$t,Ut){var sn=ae(Ht),nn=We(Nt);if(sn+Dt>nn.byteLength)throw ft(dt);for(var Wt=We(nn.buffer).bytes,bn=sn+nn.byteOffset,mn=Xt(+$t),jn=0;jn<Dt;jn++)Wt[bn+jn]=mn[Ut?jn:Dt-jn-1]};if(!Ce)$e=function(Dt){de(this,rt);var Ht=ae(Dt);Ye(this,{bytes:ht(pt(Ht),0),byteLength:Ht}),ke||(this.byteLength=Ht)},rt=$e[ot],St=function(Dt,Ht,Xt){de(this,Pt),de(Dt,rt);var $t=We(Dt).byteLength,Ut=z(Ht);if(Ut<0||Ut>$t)throw ft("Wrong offset");if(Xt=Xt===void 0?$t-Ut:ee(Xt),Ut+Xt>$t)throw ft(st);Ye(this,{buffer:Dt,byteLength:Xt,byteOffset:Ut}),ke||(this.buffer=Dt,this.byteLength=Xt,this.byteOffset=Ut)},Pt=St[ot],ke&&(Ze($e,"byteLength"),Ze(St,"buffer"),Ze(St,"byteLength"),Ze(St,"byteOffset")),ve(Pt,{getInt8:function(Dt){return nt(this,1,Dt)[0]<<24>>24},getUint8:function(Dt){return nt(this,1,Dt)[0]},getInt16:function(Dt){var Ht=nt(this,2,Dt,arguments.length>1?arguments[1]:void 0);return(Ht[1]<<8|Ht[0])<<16>>16},getUint16:function(Dt){var Ht=nt(this,2,Dt,arguments.length>1?arguments[1]:void 0);return Ht[1]<<8|Ht[0]},getInt32:function(Dt){return Ve(nt(this,4,Dt,arguments.length>1?arguments[1]:void 0))},getUint32:function(Dt){return Ve(nt(this,4,Dt,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Dt){return yt(nt(this,4,Dt,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Dt){return yt(nt(this,8,Dt,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Dt,Ht){Re(this,1,Dt,At,Ht)},setUint8:function(Dt,Ht){Re(this,1,Dt,At,Ht)},setInt16:function(Dt,Ht){Re(this,2,Dt,xt,Ht,arguments.length>2?arguments[2]:void 0)},setUint16:function(Dt,Ht){Re(this,2,Dt,xt,Ht,arguments.length>2?arguments[2]:void 0)},setInt32:function(Dt,Ht){Re(this,4,Dt,tt,Ht,arguments.length>2?arguments[2]:void 0)},setUint32:function(Dt,Ht){Re(this,4,Dt,tt,Ht,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Dt,Ht){Re(this,4,Dt,xe,Ht,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Dt,Ht){Re(this,8,Dt,Le,Ht,arguments.length>2?arguments[2]:void 0)}});else{var _e=Ae&&Ct.name!==Ue;if(!we(function(){Ct(1)})||!we(function(){new Ct(-1)})||we(function(){return new Ct,new Ct(1.5),new Ct(NaN),_e&&!Ie})){$e=function(Dt){return de(this,rt),new Ct(ae(Dt))},$e[ot]=rt;for(var He=ge(Ct),Qe=0,ut;He.length>Qe;)(ut=He[Qe++])in $e||Me($e,ut,Ct[ut]);rt.constructor=$e}else _e&&Ie&&Me(Ct,"name",Ue);ue&&le(Pt)!==wt&&ue(Pt,wt);var gt=new St(new $e(2)),Mt=me(Pt.setInt8);gt.setInt8(0,2147483648),gt.setInt8(1,2147483649),(gt.getInt8(0)||!gt.getInt8(1))&&ve(Pt,{setInt8:function(Dt,Ht){Mt(this,Dt,Ht<<24>>24)},setUint8:function(Dt,Ht){Mt(this,Dt,Ht<<24>>24)}},{unsafe:!0})}Fe($e,Ue),Fe(St,Ke),ze.exports={ArrayBuffer:$e,DataView:St}},{"../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(oe,ze,De){"use strict";var fe=oe("../internals/to-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=Math.min;ze.exports=[].copyWithin||function(Me,ve){var we=fe(this),de=ke(we),z=me(Me,de),ee=me(ve,de),ae=arguments.length>2?arguments[2]:void 0,ie=Ce((ae===void 0?de:me(ae,de))-ee,de-z),le=1;for(ee<z&&z<ee+ie&&(le=-1,ee+=ie-1,z+=ie-1);ie-- >0;)ee in we?we[z]=we[ee]:delete we[z],z+=le,ee+=le;return we}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(oe,ze,De){"use strict";var fe=oe("../internals/to-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like");ze.exports=function(Se){for(var Me=fe(this),ve=ke(Me),we=arguments.length,de=me(we>1?arguments[1]:void 0,ve),z=we>2?arguments[2]:void 0,ee=z===void 0?ve:me(z,ve);ee>de;)Me[de++]=Se;return Me}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-iteration").forEach,me=oe("../internals/array-method-is-strict"),ke=me("forEach");ze.exports=ke?[].forEach:function(Se){return fe(this,Se,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(oe,ze,De){var fe=oe("../internals/length-of-array-like");ze.exports=function(me,ke){for(var Ce=0,Se=fe(ke),Me=new me(Se);Se>Ce;)Me[Ce]=ke[Ce++];return Me}},{"../internals/length-of-array-like":188}],109:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/function-call"),Ce=oe("../internals/to-object"),Se=oe("../internals/call-with-safe-iteration-closing"),Me=oe("../internals/is-array-iterator-method"),ve=oe("../internals/is-constructor"),we=oe("../internals/length-of-array-like"),de=oe("../internals/create-property"),z=oe("../internals/get-iterator"),ee=oe("../internals/get-iterator-method"),ae=fe.Array;ze.exports=function(le){var ue=Ce(le),ge=ve(this),Pe=arguments.length,je=Pe>1?arguments[1]:void 0,Be=je!==void 0;Be&&(je=me(je,Pe>2?arguments[2]:void 0));var Fe=ee(ue),Ne=0,Ae,Ie,We,Ye,Ue,Ke;if(Fe&&!(this==ae&&Me(Fe)))for(Ye=z(ue,Fe),Ue=Ye.next,Ie=ge?new this:[];!(We=ke(Ue,Ye)).done;Ne++)Ke=Be?Se(Ye,je,[We.value,Ne],!0):We.value,de(Ie,Ne,Ke);else for(Ae=we(ue),Ie=ge?new this(Ae):ae(Ae);Ae>Ne;Ne++)Ke=Be?je(ue[Ne],Ne):ue[Ne],de(Ie,Ne,Ke);return Ie.length=Ne,Ie}},{"../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(oe,ze,De){var fe=oe("../internals/to-indexed-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=function(Se){return function(Me,ve,we){var de=fe(Me),z=ke(de),ee=me(we,z),ae;if(Se&&ve!=ve){for(;z>ee;)if(ae=de[ee++],ae!=ae)return!0}else for(;z>ee;ee++)if((Se||ee in de)&&de[ee]===ve)return Se||ee||0;return!Se&&-1}};ze.exports={includes:Ce(!0),indexOf:Ce(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(oe,ze,De){var fe=oe("../internals/function-bind-context"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/indexed-object"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Me=oe("../internals/array-species-create"),ve=me([].push),we=function(de){var z=de==1,ee=de==2,ae=de==3,ie=de==4,le=de==6,ue=de==7,ge=de==5||le;return function(Pe,je,Be,Fe){for(var Ne=Ce(Pe),Ae=ke(Ne),Ie=fe(je,Be),We=Se(Ae),Ye=0,Ue=Fe||Me,Ke=z?Ue(Pe,We):ee||ue?Ue(Pe,0):void 0,ot,st;We>Ye;Ye++)if((ge||Ye in Ae)&&(ot=Ae[Ye],st=Ie(ot,Ye,Ne),de))if(z)Ke[Ye]=st;else if(st)switch(de){case 3:return!0;case 5:return ot;case 6:return Ye;case 2:ve(Ke,ot)}else switch(de){case 4:return!1;case 7:ve(Ke,ot)}return le?-1:ae||ie?ie:Ke}};ze.exports={forEach:we(0),map:we(1),filter:we(2),some:we(3),every:we(4),find:we(5),findIndex:we(6),filterReject:we(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(oe,ze,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/to-indexed-object"),ke=oe("../internals/to-integer-or-infinity"),Ce=oe("../internals/length-of-array-like"),Se=oe("../internals/array-method-is-strict"),Me=Math.min,ve=[].lastIndexOf,we=!!ve&&1/[1].lastIndexOf(1,-0)<0,de=Se("lastIndexOf"),z=we||!de;ze.exports=z?function(ae){if(we)return fe(ve,this,arguments)||0;var ie=me(this),le=Ce(ie),ue=le-1;for(arguments.length>1&&(ue=Me(ue,ke(arguments[1]))),ue<0&&(ue=le+ue);ue>=0;ue--)if(ue in ie&&ie[ue]===ae)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(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/well-known-symbol"),ke=oe("../internals/engine-v8-version"),Ce=me("species");ze.exports=function(Se){return ke>=51||!fe(function(){var Me=[],ve=Me.constructor={};return ve[Ce]=function(){return{foo:1}},Me[Se](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(oe,ze,De){"use strict";var fe=oe("../internals/fails");ze.exports=function(me,ke){var Ce=[][me];return!!Ce&&fe(function(){Ce.call(null,ke||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/a-callable"),ke=oe("../internals/to-object"),Ce=oe("../internals/indexed-object"),Se=oe("../internals/length-of-array-like"),Me=fe.TypeError,ve=function(we){return function(de,z,ee,ae){me(z);var ie=ke(de),le=Ce(ie),ue=Se(ie),ge=we?ue-1:0,Pe=we?-1:1;if(ee<2)for(;;){if(ge in le){ae=le[ge],ge+=Pe;break}if(ge+=Pe,we?ge<0:ue<=ge)throw Me("Reduce of empty array with no initial value")}for(;we?ge>=0:ue>ge;ge+=Pe)ge in le&&(ae=z(ae,le[ge],ge,ie));return ae}};ze.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(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=oe("../internals/create-property"),Se=fe.Array,Me=Math.max;ze.exports=function(ve,we,de){for(var z=ke(ve),ee=me(we,z),ae=me(de===void 0?z:de,z),ie=Se(Me(ae-ee,0)),le=0;ee<ae;ee++,le++)Ce(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(oe,ze,De){var fe=oe("../internals/function-uncurry-this");ze.exports=fe([].slice)},{"../internals/function-uncurry-this":157}],118:[function(oe,ze,De){var fe=oe("../internals/array-slice-simple"),me=Math.floor,ke=function(Me,ve){var we=Me.length,de=me(we/2);return we<8?Ce(Me,ve):Se(Me,ke(fe(Me,0,de),ve),ke(fe(Me,de),ve),ve)},Ce=function(Me,ve){for(var we=Me.length,de=1,z,ee;de<we;){for(ee=de,z=Me[de];ee&&ve(Me[ee-1],z)>0;)Me[ee]=Me[--ee];ee!==de++&&(Me[ee]=z)}return Me},Se=function(Me,ve,we,de){for(var z=ve.length,ee=we.length,ae=0,ie=0;ae<z||ie<ee;)Me[ae+ie]=ae<z&&ie<ee?de(ve[ae],we[ie])<=0?ve[ae++]:we[ie++]:ae<z?ve[ae++]:we[ie++];return Me};ze.exports=ke},{"../internals/array-slice-simple":116}],119:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-array"),ke=oe("../internals/is-constructor"),Ce=oe("../internals/is-object"),Se=oe("../internals/well-known-symbol"),Me=Se("species"),ve=fe.Array;ze.exports=function(we){var de;return me(we)&&(de=we.constructor,ke(de)&&(de===ve||me(de.prototype))?de=void 0:Ce(de)&&(de=de[Me],de===null&&(de=void 0))),de===void 0?ve:de}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(oe,ze,De){var fe=oe("../internals/array-species-constructor");ze.exports=function(me,ke){return new(fe(me))(ke===0?0:ke)}},{"../internals/array-species-constructor":119}],121:[function(oe,ze,De){var fe=oe("../internals/an-object"),me=oe("../internals/iterator-close");ze.exports=function(ke,Ce,Se,Me){try{return Me?Ce(fe(Se)[0],Se[1]):Ce(Se)}catch(ve){me(ke,"throw",ve)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=fe("iterator"),ke=!1;try{var Ce=0,Se={next:function(){return{done:!!Ce++}},return:function(){ke=!0}};Se[me]=function(){return this},Array.from(Se,function(){throw 2})}catch(Me){}ze.exports=function(Me,ve){if(!ve&&!ke)return!1;var we=!1;try{var de={};de[me]=function(){return{next:function(){return{done:we=!0}}}},Me(de)}catch(z){}return we}},{"../internals/well-known-symbol":268}],123:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=fe({}.toString),ke=fe("".slice);ze.exports=function(Ce){return ke(me(Ce),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-string-tag-support"),ke=oe("../internals/is-callable"),Ce=oe("../internals/classof-raw"),Se=oe("../internals/well-known-symbol"),Me=Se("toStringTag"),ve=fe.Object,we=Ce(function(){return arguments}())=="Arguments",de=function(z,ee){try{return z[ee]}catch(ae){}};ze.exports=me?Ce:function(z){var ee,ae,ie;return z===void 0?"Undefined":z===null?"Null":typeof(ae=de(ee=ve(z),Me))=="string"?ae:we?Ce(ee):(ie=Ce(ee))=="Object"&&ke(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(oe,ze,De){var fe=oe("../internals/has-own-property"),me=oe("../internals/own-keys"),ke=oe("../internals/object-get-own-property-descriptor"),Ce=oe("../internals/object-define-property");ze.exports=function(Se,Me,ve){for(var we=me(Me),de=Ce.f,z=ke.f,ee=0;ee<we.length;ee++){var ae=we[ee];!fe(Se,ae)&&!(ve&&fe(ve,ae))&&de(Se,ae,z(Me,ae))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=fe("match");ze.exports=function(ke){var Ce=/./;try{"/./"[ke](Ce)}catch(Se){try{return Ce[me]=!1,"/./"[ke](Ce)}catch(Me){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(oe,ze,De){var fe=oe("../internals/fails");ze.exports=!fe(function(){function me(){}return me.prototype.constructor=null,Object.getPrototypeOf(new me)!==me.prototype})},{"../internals/fails":150}],128:[function(oe,ze,De){"use strict";var fe=oe("../internals/iterators-core").IteratorPrototype,me=oe("../internals/object-create"),ke=oe("../internals/create-property-descriptor"),Ce=oe("../internals/set-to-string-tag"),Se=oe("../internals/iterators"),Me=function(){return this};ze.exports=function(ve,we,de,z){var ee=we+" Iterator";return ve.prototype=me(fe,{next:ke(+!z,de)}),Ce(ve,ee,!1,!0),Se[ee]=Me,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(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/object-define-property"),ke=oe("../internals/create-property-descriptor");ze.exports=fe?function(Ce,Se,Me){return me.f(Ce,Se,ke(1,Me))}:function(Ce,Se,Me){return Ce[Se]=Me,Ce}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(oe,ze,De){ze.exports=function(fe,me){return{enumerable:!(fe&1),configurable:!(fe&2),writable:!(fe&4),value:me}}},{}],131:[function(oe,ze,De){"use strict";var fe=oe("../internals/to-property-key"),me=oe("../internals/object-define-property"),ke=oe("../internals/create-property-descriptor");ze.exports=function(Ce,Se,Me){var ve=fe(Se);ve in Ce?me.f(Ce,ve,ke(0,Me)):Ce[ve]=Me}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/is-pure"),Ce=oe("../internals/function-name"),Se=oe("../internals/is-callable"),Me=oe("../internals/create-iterator-constructor"),ve=oe("../internals/object-get-prototype-of"),we=oe("../internals/object-set-prototype-of"),de=oe("../internals/set-to-string-tag"),z=oe("../internals/create-non-enumerable-property"),ee=oe("../internals/redefine"),ae=oe("../internals/well-known-symbol"),ie=oe("../internals/iterators"),le=oe("../internals/iterators-core"),ue=Ce.PROPER,ge=Ce.CONFIGURABLE,Pe=le.IteratorPrototype,je=le.BUGGY_SAFARI_ITERATORS,Be=ae("iterator"),Fe="keys",Ne="values",Ae="entries",Ie=function(){return this};ze.exports=function(We,Ye,Ue,Ke,ot,st,dt){Me(Ue,Ye,Ke);var Ct=function(mt){if(mt===ot&&wt)return wt;if(!je&&mt in St)return St[mt];switch(mt){case Fe:return function(){return new Ue(this,mt)};case Ne:return function(){return new Ue(this,mt)};case Ae:return function(){return new Ue(this,mt)}}return function(){return new Ue(this)}},$e=Ye+" Iterator",rt=!1,St=We.prototype,Pt=St[Be]||St["@@iterator"]||ot&&St[ot],wt=!je&&Pt||Ct(ot),pt=Ye=="Array"&&St.entries||Pt,ft,ht,Et;if(pt&&(ft=ve(pt.call(new We)),ft!==Object.prototype&&ft.next&&(!ke&&ve(ft)!==Pe&&(we?we(ft,Pe):Se(ft[Be])||ee(ft,Be,Ie)),de(ft,$e,!0,!0),ke&&(ie[$e]=Ie))),ue&&ot==Ne&&Pt&&Pt.name!==Ne&&(!ke&&ge?z(St,"name",Ne):(rt=!0,wt=function(){return me(Pt,this)})),ot)if(ht={values:Ct(Ne),keys:st?wt:Ct(Fe),entries:Ct(Ae)},dt)for(Et in ht)(je||rt||!(Et in St))&&ee(St,Et,ht[Et]);else fe({target:Ye,proto:!0,forced:je||rt},ht);return(!ke||dt)&&St[Be]!==wt&&ee(St,Be,wt,{name:ot}),ie[Ye]=wt,ht}},{"../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(oe,ze,De){var fe=oe("../internals/path"),me=oe("../internals/has-own-property"),ke=oe("../internals/well-known-symbol-wrapped"),Ce=oe("../internals/object-define-property").f;ze.exports=function(Se){var Me=fe.Symbol||(fe.Symbol={});me(Me,Se)||Ce(Me,Se,{value:ke.f(Se)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(oe,ze,De){var fe=oe("../internals/fails");ze.exports=!fe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-object"),ke=fe.document,Ce=me(ke)&&me(ke.createElement);ze.exports=function(Se){return Ce?ke.createElement(Se):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(oe,ze,De){ze.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(oe,ze,De){var fe=oe("../internals/document-create-element"),me=fe("span").classList,ke=me&&me.constructor&&me.constructor.prototype;ze.exports=ke===Object.prototype?void 0:ke},{"../internals/document-create-element":135}],138:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent"),me=fe.match(/firefox\/(\d+)/i);ze.exports=!!me&&+me[1]},{"../internals/engine-user-agent":145}],139:[function(oe,ze,De){ze.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent");ze.exports=/MSIE|Trident/.test(fe)},{"../internals/engine-user-agent":145}],141:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent"),me=oe("../internals/global");ze.exports=/ipad|iphone|ipod/i.test(fe)&&me.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent");ze.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(fe)},{"../internals/engine-user-agent":145}],143:[function(oe,ze,De){var fe=oe("../internals/classof-raw"),me=oe("../internals/global");ze.exports=fe(me.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent");ze.exports=/web0s(?!.*chrome)/i.test(fe)},{"../internals/engine-user-agent":145}],145:[function(oe,ze,De){var fe=oe("../internals/get-built-in");ze.exports=fe("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/engine-user-agent"),ke=fe.process,Ce=fe.Deno,Se=ke&&ke.versions||Ce&&Ce.version,Me=Se&&Se.v8,ve,we;Me&&(ve=Me.split("."),we=ve[0]>0&&ve[0]<4?1:+(ve[0]+ve[1])),!we&&me&&(ve=me.match(/Edge\/(\d+)/),(!ve||ve[1]>=74)&&(ve=me.match(/Chrome\/(\d+)/),ve&&(we=+ve[1]))),ze.exports=we},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(oe,ze,De){var fe=oe("../internals/engine-user-agent"),me=fe.match(/AppleWebKit\/(\d+)\./);ze.exports=!!me&&+me[1]},{"../internals/engine-user-agent":145}],148:[function(oe,ze,De){ze.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/object-get-own-property-descriptor").f,ke=oe("../internals/create-non-enumerable-property"),Ce=oe("../internals/redefine"),Se=oe("../internals/set-global"),Me=oe("../internals/copy-constructor-properties"),ve=oe("../internals/is-forced");ze.exports=function(we,de){var z=we.target,ee=we.global,ae=we.stat,ie,le,ue,ge,Pe,je;if(ee?le=fe:ae?le=fe[z]||Se(z,{}):le=(fe[z]||{}).prototype,le)for(ue in de){if(Pe=de[ue],we.noTargetGet?(je=me(le,ue),ge=je&&je.value):ge=le[ue],ie=ve(ee?ue:z+(ae?".":"#")+ue,we.forced),!ie&&ge!==void 0){if(typeof Pe==typeof ge)continue;Me(Pe,ge)}(we.sham||ge&&ge.sham)&&ke(Pe,"sham",!0),Ce(le,ue,Pe,we)}}},{"../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(oe,ze,De){ze.exports=function(fe){try{return!!fe()}catch(me){return!0}}},{}],151:[function(oe,ze,De){"use strict";oe("../modules/es.regexp.exec");var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/redefine"),ke=oe("../internals/regexp-exec"),Ce=oe("../internals/fails"),Se=oe("../internals/well-known-symbol"),Me=oe("../internals/create-non-enumerable-property"),ve=Se("species"),we=RegExp.prototype;ze.exports=function(de,z,ee,ae){var ie=Se(de),le=!Ce(function(){var je={};return je[ie]=function(){return 7},""[de](je)!=7}),ue=le&&!Ce(function(){var je=!1,Be=/a/;return de==="split"&&(Be={},Be.constructor={},Be.constructor[ve]=function(){return Be},Be.flags="",Be[ie]=/./[ie]),Be.exec=function(){return je=!0,null},Be[ie](""),!je});if(!le||!ue||ee){var ge=fe(/./[ie]),Pe=z(ie,""[de],function(je,Be,Fe,Ne,Ae){var Ie=fe(je),We=Be.exec;return We===ke||We===we.exec?le&&!Ae?{done:!0,value:ge(Be,Fe,Ne)}:{done:!0,value:Ie(Fe,Be,Ne)}:{done:!1}});me(String.prototype,de,Pe[0]),me(we,ie,Pe[1])}ae&&Me(we[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(oe,ze,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype,ke=me.apply,Ce=me.call;ze.exports=typeof Reflect=="object"&&Reflect.apply||(fe?Ce.bind(ke):function(){return Ce.apply(ke,arguments)})},{"../internals/function-bind-native":154}],153:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/a-callable"),ke=oe("../internals/function-bind-native"),Ce=fe(fe.bind);ze.exports=function(Se,Me){return me(Se),Me===void 0?Se:ke?Ce(Se,Me):function(){return Se.apply(Me,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(oe,ze,De){var fe=oe("../internals/fails");ze.exports=!fe(function(){var me=function(){}.bind();return typeof me!="function"||me.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(oe,ze,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype.call;ze.exports=fe?me.bind(me):function(){return me.apply(me,arguments)}},{"../internals/function-bind-native":154}],156:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/has-own-property"),ke=Function.prototype,Ce=fe&&Object.getOwnPropertyDescriptor,Se=me(ke,"name"),Me=Se&&function(){}.name==="something",ve=Se&&(!fe||fe&&Ce(ke,"name").configurable);ze.exports={EXISTS:Se,PROPER:Me,CONFIGURABLE:ve}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(oe,ze,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype,ke=me.bind,Ce=me.call,Se=fe&&ke.bind(Ce,Ce);ze.exports=fe?function(Me){return Me&&Se(Me)}:function(Me){return Me&&function(){return Ce.apply(Me,arguments)}}},{"../internals/function-bind-native":154}],158:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=function(Ce){return me(Ce)?Ce:void 0};ze.exports=function(Ce,Se){return arguments.length<2?ke(fe[Ce]):fe[Ce]&&fe[Ce][Se]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(oe,ze,De){var fe=oe("../internals/classof"),me=oe("../internals/get-method"),ke=oe("../internals/iterators"),Ce=oe("../internals/well-known-symbol"),Se=Ce("iterator");ze.exports=function(Me){if(Me!=null)return me(Me,Se)||me(Me,"@@iterator")||ke[fe(Me)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Me=oe("../internals/get-iterator-method"),ve=fe.TypeError;ze.exports=function(we,de){var z=arguments.length<2?Me(we):de;if(ke(z))return Ce(me(z,we));throw ve(Se(we)+" 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(oe,ze,De){var fe=oe("../internals/a-callable");ze.exports=function(me,ke){var Ce=me[ke];return Ce==null?void 0:fe(Ce)}},{"../internals/a-callable":95}],162:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-object"),ke=Math.floor,Ce=fe("".charAt),Se=fe("".replace),Me=fe("".slice),ve=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,we=/\$([$&'`]|\d{1,2})/g;ze.exports=function(de,z,ee,ae,ie,le){var ue=ee+de.length,ge=ae.length,Pe=we;return ie!==void 0&&(ie=me(ie),Pe=ve),Se(le,Pe,function(je,Be){var Fe;switch(Ce(Be,0)){case"$":return"$";case"&":return de;case"`":return Me(z,0,ee);case"'":return Me(z,ue);case"<":Fe=ie[Me(Be,1,-1)];break;default:var Ne=+Be;if(Ne===0)return je;if(Ne>ge){var Ae=ke(Ne/10);return Ae===0?je:Ae<=ge?ae[Ae-1]===void 0?Ce(Be,1):ae[Ae-1]+Ce(Be,1):je}Fe=ae[Ne-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(oe,ze,De){(function(fe){(function(){var me=function(ke){return ke&&ke.Math==Math&&ke};ze.exports=me(typeof globalThis=="object"&&globalThis)||me(typeof window=="object"&&window)||me(typeof self=="object"&&self)||me(typeof fe=="object"&&fe)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-object"),ke=fe({}.hasOwnProperty);ze.exports=Object.hasOwn||function(Se,Me){return ke(me(Se),Me)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(oe,ze,De){ze.exports={}},{}],166:[function(oe,ze,De){var fe=oe("../internals/global");ze.exports=function(me,ke){var Ce=fe.console;Ce&&Ce.error&&(arguments.length==1?Ce.error(me):Ce.error(me,ke))}},{"../internals/global":163}],167:[function(oe,ze,De){var fe=oe("../internals/get-built-in");ze.exports=fe("document","documentElement")},{"../internals/get-built-in":158}],168:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/fails"),ke=oe("../internals/document-create-element");ze.exports=!fe&&!me(function(){return Object.defineProperty(ke("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(oe,ze,De){var fe=oe("../internals/global"),me=fe.Array,ke=Math.abs,Ce=Math.pow,Se=Math.floor,Me=Math.log,ve=Math.LN2,we=function(z,ee,ae){var ie=me(ae),le=ae*8-ee-1,ue=(1<<le)-1,ge=ue>>1,Pe=ee===23?Ce(2,-24)-Ce(2,-77):0,je=z<0||z===0&&1/z<0?1:0,Be=0,Fe,Ne,Ae;for(z=ke(z),z!=z||z===1/0?(Ne=z!=z?1:0,Fe=ue):(Fe=Se(Me(z)/ve),Ae=Ce(2,-Fe),z*Ae<1&&(Fe--,Ae*=2),Fe+ge>=1?z+=Pe/Ae:z+=Pe*Ce(2,1-ge),z*Ae>=2&&(Fe++,Ae/=2),Fe+ge>=ue?(Ne=0,Fe=ue):Fe+ge>=1?(Ne=(z*Ae-1)*Ce(2,ee),Fe=Fe+ge):(Ne=z*Ce(2,ge-1)*Ce(2,ee),Fe=0));ee>=8;)ie[Be++]=Ne&255,Ne/=256,ee-=8;for(Fe=Fe<<ee|Ne,le+=ee;le>0;)ie[Be++]=Fe&255,Fe/=256,le-=8;return ie[--Be]|=je*128,ie},de=function(z,ee){var ae=z.length,ie=ae*8-ee-1,le=(1<<ie)-1,ue=le>>1,ge=ie-7,Pe=ae-1,je=z[Pe--],Be=je&127,Fe;for(je>>=7;ge>0;)Be=Be*256+z[Pe--],ge-=8;for(Fe=Be&(1<<-ge)-1,Be>>=-ge,ge+=ee;ge>0;)Fe=Fe*256+z[Pe--],ge-=8;if(Be===0)Be=1-ue;else{if(Be===le)return Fe?NaN:je?-1/0:1/0;Fe=Fe+Ce(2,ee),Be=Be-ue}return(je?-1:1)*Fe*Ce(2,Be-ee)};ze.exports={pack:we,unpack:de}},{"../internals/global":163}],170:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/classof-raw"),Se=fe.Object,Me=me("".split);ze.exports=ke(function(){return!Se("z").propertyIsEnumerable(0)})?function(ve){return Ce(ve)=="String"?Me(ve,""):Se(ve)}:Se},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(oe,ze,De){var fe=oe("../internals/is-callable"),me=oe("../internals/is-object"),ke=oe("../internals/object-set-prototype-of");ze.exports=function(Ce,Se,Me){var ve,we;return ke&&fe(ve=Se.constructor)&&ve!==Me&&me(we=ve.prototype)&&we!==Me.prototype&&ke(Ce,we),Ce}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/is-callable"),ke=oe("../internals/shared-store"),Ce=fe(Function.toString);me(ke.inspectSource)||(ke.inspectSource=function(Se){return Ce(Se)}),ze.exports=ke.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(oe,ze,De){var fe=oe("../internals/native-weak-map"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-object"),Se=oe("../internals/create-non-enumerable-property"),Me=oe("../internals/has-own-property"),ve=oe("../internals/shared-store"),we=oe("../internals/shared-key"),de=oe("../internals/hidden-keys"),z="Object already initialized",ee=me.TypeError,ae=me.WeakMap,ie,le,ue,ge=function(Ie){return ue(Ie)?le(Ie):ie(Ie,{})},Pe=function(Ie){return function(We){var Ye;if(!Ce(We)||(Ye=le(We)).type!==Ie)throw ee("Incompatible receiver, "+Ie+" required");return Ye}};if(fe||ve.state){var je=ve.state||(ve.state=new ae),Be=ke(je.get),Fe=ke(je.has),Ne=ke(je.set);ie=function(Ie,We){if(Fe(je,Ie))throw new ee(z);return We.facade=Ie,Ne(je,Ie,We),We},le=function(Ie){return Be(je,Ie)||{}},ue=function(Ie){return Fe(je,Ie)}}else{var Ae=we("state");de[Ae]=!0,ie=function(Ie,We){if(Me(Ie,Ae))throw new ee(z);return We.facade=Ie,Se(Ie,Ae,We),We},le=function(Ie){return Me(Ie,Ae)?Ie[Ae]:{}},ue=function(Ie){return Me(Ie,Ae)}}ze.exports={set:ie,get:le,has:ue,enforce:ge,getterFor:Pe}},{"../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(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=oe("../internals/iterators"),ke=fe("iterator"),Ce=Array.prototype;ze.exports=function(Se){return Se!==void 0&&(me.Array===Se||Ce[ke]===Se)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(oe,ze,De){var fe=oe("../internals/classof-raw");ze.exports=Array.isArray||function(ke){return fe(ke)=="Array"}},{"../internals/classof-raw":123}],176:[function(oe,ze,De){ze.exports=function(fe){return typeof fe=="function"}},{}],177:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/fails"),ke=oe("../internals/is-callable"),Ce=oe("../internals/classof"),Se=oe("../internals/get-built-in"),Me=oe("../internals/inspect-source"),ve=function(){},we=[],de=Se("Reflect","construct"),z=/^\s*(?:class|function)\b/,ee=fe(z.exec),ae=!z.exec(ve),ie=function(ge){if(!ke(ge))return!1;try{return de(ve,we,ge),!0}catch(Pe){return!1}},le=function(ge){if(!ke(ge))return!1;switch(Ce(ge)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ae||!!ee(z,Me(ge))}catch(Pe){return!0}};le.sham=!0,ze.exports=!de||me(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(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/is-callable"),ke=/#|\.prototype\./,Ce=function(de,z){var ee=Me[Se(de)];return ee==we?!0:ee==ve?!1:me(z)?fe(z):!!z},Se=Ce.normalize=function(de){return String(de).replace(ke,".").toLowerCase()},Me=Ce.data={},ve=Ce.NATIVE="N",we=Ce.POLYFILL="P";ze.exports=Ce},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(oe,ze,De){var fe=oe("../internals/is-object"),me=Math.floor;ze.exports=Number.isInteger||function(Ce){return!fe(Ce)&&isFinite(Ce)&&me(Ce)===Ce}},{"../internals/is-object":180}],180:[function(oe,ze,De){var fe=oe("../internals/is-callable");ze.exports=function(me){return typeof me=="object"?me!==null:fe(me)}},{"../internals/is-callable":176}],181:[function(oe,ze,De){ze.exports=!1},{}],182:[function(oe,ze,De){var fe=oe("../internals/is-object"),me=oe("../internals/classof-raw"),ke=oe("../internals/well-known-symbol"),Ce=ke("match");ze.exports=function(Se){var Me;return fe(Se)&&((Me=Se[Ce])!==void 0?!!Me:me(Se)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/get-built-in"),ke=oe("../internals/is-callable"),Ce=oe("../internals/object-is-prototype-of"),Se=oe("../internals/use-symbol-as-uid"),Me=fe.Object;ze.exports=Se?function(ve){return typeof ve=="symbol"}:function(ve){var we=me("Symbol");return ke(we)&&Ce(we.prototype,Me(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(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/function-call"),Ce=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Me=oe("../internals/is-array-iterator-method"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/object-is-prototype-of"),de=oe("../internals/get-iterator"),z=oe("../internals/get-iterator-method"),ee=oe("../internals/iterator-close"),ae=fe.TypeError,ie=function(ue,ge){this.stopped=ue,this.result=ge},le=ie.prototype;ze.exports=function(ue,ge,Pe){var je=Pe&&Pe.that,Be=!!(Pe&&Pe.AS_ENTRIES),Fe=!!(Pe&&Pe.IS_ITERATOR),Ne=!!(Pe&&Pe.INTERRUPTED),Ae=me(ge,je),Ie,We,Ye,Ue,Ke,ot,st,dt=function($e){return Ie&&ee(Ie,"normal",$e),new ie(!0,$e)},Ct=function($e){return Be?(Ce($e),Ne?Ae($e[0],$e[1],dt):Ae($e[0],$e[1])):Ne?Ae($e,dt):Ae($e)};if(Fe)Ie=ue;else{if(We=z(ue),!We)throw ae(Se(ue)+" is not iterable");if(Me(We)){for(Ye=0,Ue=ve(ue);Ue>Ye;Ye++)if(Ke=Ct(ue[Ye]),Ke&&we(le,Ke))return Ke;return new ie(!1)}Ie=de(ue,We)}for(ot=Ie.next;!(st=ke(ot,Ie)).done;){try{Ke=Ct(st.value)}catch($e){ee(Ie,"throw",$e)}if(typeof Ke=="object"&&Ke&&we(le,Ke))return Ke}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(oe,ze,De){var fe=oe("../internals/function-call"),me=oe("../internals/an-object"),ke=oe("../internals/get-method");ze.exports=function(Ce,Se,Me){var ve,we;me(Ce);try{if(ve=ke(Ce,"return"),!ve){if(Se==="throw")throw Me;return Me}ve=fe(ve,Ce)}catch(de){we=!0,ve=de}if(Se==="throw")throw Me;if(we)throw ve;return me(ve),Me}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(oe,ze,De){"use strict";var fe=oe("../internals/fails"),me=oe("../internals/is-callable"),ke=oe("../internals/object-create"),Ce=oe("../internals/object-get-prototype-of"),Se=oe("../internals/redefine"),Me=oe("../internals/well-known-symbol"),ve=oe("../internals/is-pure"),we=Me("iterator"),de=!1,z,ee,ae;[].keys&&(ae=[].keys(),"next"in ae?(ee=Ce(Ce(ae)),ee!==Object.prototype&&(z=ee)):de=!0);var ie=z==null||fe(function(){var le={};return z[we].call(le)!==le});ie?z={}:ve&&(z=ke(z)),me(z[we])||Se(z,we,function(){return this}),ze.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:de}},{"../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(oe,ze,De){arguments[4][165][0].apply(De,arguments)},{dup:165}],188:[function(oe,ze,De){var fe=oe("../internals/to-length");ze.exports=function(me){return fe(me.length)}},{"../internals/to-length":249}],189:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/object-get-own-property-descriptor").f,Ce=oe("../internals/task").set,Se=oe("../internals/engine-is-ios"),Me=oe("../internals/engine-is-ios-pebble"),ve=oe("../internals/engine-is-webos-webkit"),we=oe("../internals/engine-is-node"),de=fe.MutationObserver||fe.WebKitMutationObserver,z=fe.document,ee=fe.process,ae=fe.Promise,ie=ke(fe,"queueMicrotask"),le=ie&&ie.value,ue,ge,Pe,je,Be,Fe,Ne,Ae;le||(ue=function(){var Ie,We;for(we&&(Ie=ee.domain)&&Ie.exit();ge;){We=ge.fn,ge=ge.next;try{We()}catch(Ye){throw ge?je():Pe=void 0,Ye}}Pe=void 0,Ie&&Ie.enter()},!Se&&!we&&!ve&&de&&z?(Be=!0,Fe=z.createTextNode(""),new de(ue).observe(Fe,{characterData:!0}),je=function(){Fe.data=Be=!Be}):!Me&&ae&&ae.resolve?(Ne=ae.resolve(void 0),Ne.constructor=ae,Ae=me(Ne.then,Ne),je=function(){Ae(ue)}):we?je=function(){ee.nextTick(ue)}:(Ce=me(Ce,fe),je=function(){Ce(ue)})),ze.exports=le||function(Ie){var We={fn:Ie,next:void 0};Pe&&(Pe.next=We),ge||(ge=We,je()),Pe=We}},{"../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(oe,ze,De){var fe=oe("../internals/native-symbol");ze.exports=fe&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(oe,ze,De){var fe=oe("../internals/engine-v8-version"),me=oe("../internals/fails");ze.exports=!!Object.getOwnPropertySymbols&&!me(function(){var ke=Symbol();return!String(ke)||!(Object(ke)instanceof Symbol)||!Symbol.sham&&fe&&fe<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/inspect-source"),Ce=fe.WeakMap;ze.exports=me(Ce)&&/native code/.test(ke(Ce))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(oe,ze,De){"use strict";var fe=oe("../internals/a-callable"),me=function(ke){var Ce,Se;this.promise=new ke(function(Me,ve){if(Ce!==void 0||Se!==void 0)throw TypeError("Bad Promise constructor");Ce=Me,Se=ve}),this.resolve=fe(Ce),this.reject=fe(Se)};ze.exports.f=function(ke){return new me(ke)}},{"../internals/a-callable":95}],194:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-regexp"),ke=fe.TypeError;ze.exports=function(Ce){if(me(Ce))throw ke("The method doesn't accept regular expressions");return Ce}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(oe,ze,De){"use strict";var fe=oe("../internals/descriptors"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/function-call"),Ce=oe("../internals/fails"),Se=oe("../internals/object-keys"),Me=oe("../internals/object-get-own-property-symbols"),ve=oe("../internals/object-property-is-enumerable"),we=oe("../internals/to-object"),de=oe("../internals/indexed-object"),z=Object.assign,ee=Object.defineProperty,ae=me([].concat);ze.exports=!z||Ce(function(){if(fe&&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(),ge="abcdefghijklmnopqrst";return ie[ue]=7,ge.split("").forEach(function(Pe){le[Pe]=Pe}),z({},ie)[ue]!=7||Se(z({},le)).join("")!=ge})?function(le,ue){for(var ge=we(le),Pe=arguments.length,je=1,Be=Me.f,Fe=ve.f;Pe>je;)for(var Ne=de(arguments[je++]),Ae=Be?ae(Se(Ne),Be(Ne)):Se(Ne),Ie=Ae.length,We=0,Ye;Ie>We;)Ye=Ae[We++],(!fe||ke(Fe,Ne,Ye))&&(ge[Ye]=Ne[Ye]);return ge}: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(oe,ze,De){var fe=oe("../internals/an-object"),me=oe("../internals/object-define-properties"),ke=oe("../internals/enum-bug-keys"),Ce=oe("../internals/hidden-keys"),Se=oe("../internals/html"),Me=oe("../internals/document-create-element"),ve=oe("../internals/shared-key"),we=">",de="<",z="prototype",ee="script",ae=ve("IE_PROTO"),ie=function(){},le=function(Be){return de+ee+we+Be+de+"/"+ee+we},ue=function(Be){Be.write(le("")),Be.close();var Fe=Be.parentWindow.Object;return Be=null,Fe},ge=function(){var Be=Me("iframe"),Fe="java"+ee+":",Ne;return Be.style.display="none",Se.appendChild(Be),Be.src=String(Fe),Ne=Be.contentWindow.document,Ne.open(),Ne.write(le("document.F=Object")),Ne.close(),Ne.F},Pe,je=function(){try{Pe=new ActiveXObject("htmlfile")}catch(Fe){}je=typeof document!="undefined"?document.domain&&Pe?ue(Pe):ge():ue(Pe);for(var Be=ke.length;Be--;)delete je[z][ke[Be]];return je()};Ce[ae]=!0,ze.exports=Object.create||function(Fe,Ne){var Ae;return Fe!==null?(ie[z]=fe(Fe),Ae=new ie,ie[z]=null,Ae[ae]=Fe):Ae=je(),Ne===void 0?Ae:me.f(Ae,Ne)}},{"../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(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/v8-prototype-define-bug"),ke=oe("../internals/object-define-property"),Ce=oe("../internals/an-object"),Se=oe("../internals/to-indexed-object"),Me=oe("../internals/object-keys");De.f=fe&&!me?Object.defineProperties:function(we,de){Ce(we);for(var z=Se(de),ee=Me(de),ae=ee.length,ie=0,le;ae>ie;)ke.f(we,le=ee[ie++],z[le]);return we}},{"../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(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/descriptors"),ke=oe("../internals/ie8-dom-define"),Ce=oe("../internals/v8-prototype-define-bug"),Se=oe("../internals/an-object"),Me=oe("../internals/to-property-key"),ve=fe.TypeError,we=Object.defineProperty,de=Object.getOwnPropertyDescriptor,z="enumerable",ee="configurable",ae="writable";De.f=me?Ce?function(le,ue,ge){if(Se(le),ue=Me(ue),Se(ge),typeof le=="function"&&ue==="prototype"&&"value"in ge&&ae in ge&&!ge[ae]){var Pe=de(le,ue);Pe&&Pe[ae]&&(le[ue]=ge.value,ge={configurable:ee in ge?ge[ee]:Pe[ee],enumerable:z in ge?ge[z]:Pe[z],writable:!1})}return we(le,ue,ge)}:we:function(le,ue,ge){if(Se(le),ue=Me(ue),Se(ge),ke)try{return we(le,ue,ge)}catch(Pe){}if("get"in ge||"set"in ge)throw ve("Accessors not supported");return"value"in ge&&(le[ue]=ge.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(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-call"),ke=oe("../internals/object-property-is-enumerable"),Ce=oe("../internals/create-property-descriptor"),Se=oe("../internals/to-indexed-object"),Me=oe("../internals/to-property-key"),ve=oe("../internals/has-own-property"),we=oe("../internals/ie8-dom-define"),de=Object.getOwnPropertyDescriptor;De.f=fe?de:function(ee,ae){if(ee=Se(ee),ae=Me(ae),we)try{return de(ee,ae)}catch(ie){}if(ve(ee,ae))return Ce(!me(ke.f,ee,ae),ee[ae])}},{"../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(oe,ze,De){var fe=oe("../internals/classof-raw"),me=oe("../internals/to-indexed-object"),ke=oe("../internals/object-get-own-property-names").f,Ce=oe("../internals/array-slice-simple"),Se=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Me=function(ve){try{return ke(ve)}catch(we){return Ce(Se)}};ze.exports.f=function(we){return Se&&fe(we)=="Window"?Me(we):ke(me(we))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(oe,ze,De){var fe=oe("../internals/object-keys-internal"),me=oe("../internals/enum-bug-keys"),ke=me.concat("length","prototype");De.f=Object.getOwnPropertyNames||function(Se){return fe(Se,ke)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(oe,ze,De){De.f=Object.getOwnPropertySymbols},{}],203:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/has-own-property"),ke=oe("../internals/is-callable"),Ce=oe("../internals/to-object"),Se=oe("../internals/shared-key"),Me=oe("../internals/correct-prototype-getter"),ve=Se("IE_PROTO"),we=fe.Object,de=we.prototype;ze.exports=Me?we.getPrototypeOf:function(z){var ee=Ce(z);if(me(ee,ve))return ee[ve];var ae=ee.constructor;return ke(ae)&&ee instanceof ae?ae.prototype:ee instanceof we?de: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(oe,ze,De){var fe=oe("../internals/function-uncurry-this");ze.exports=fe({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/has-own-property"),ke=oe("../internals/to-indexed-object"),Ce=oe("../internals/array-includes").indexOf,Se=oe("../internals/hidden-keys"),Me=fe([].push);ze.exports=function(ve,we){var de=ke(ve),z=0,ee=[],ae;for(ae in de)!me(Se,ae)&&me(de,ae)&&Me(ee,ae);for(;we.length>z;)me(de,ae=we[z++])&&(~Ce(ee,ae)||Me(ee,ae));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(oe,ze,De){var fe=oe("../internals/object-keys-internal"),me=oe("../internals/enum-bug-keys");ze.exports=Object.keys||function(Ce){return fe(Ce,me)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(oe,ze,De){"use strict";var fe={}.propertyIsEnumerable,me=Object.getOwnPropertyDescriptor,ke=me&&!fe.call({1:2},1);De.f=ke?function(Se){var Me=me(this,Se);return!!Me&&Me.enumerable}:fe},{}],208:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/an-object"),ke=oe("../internals/a-possible-prototype");ze.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var Ce=!1,Se={},Me;try{Me=fe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Me(Se,[]),Ce=Se instanceof Array}catch(ve){}return function(we,de){return me(we),ke(de),Ce?Me(we,de):we.__proto__=de,we}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/object-keys"),Ce=oe("../internals/to-indexed-object"),Se=oe("../internals/object-property-is-enumerable").f,Me=me(Se),ve=me([].push),we=function(de){return function(z){for(var ee=Ce(z),ae=ke(ee),ie=ae.length,le=0,ue=[],ge;ie>le;)ge=ae[le++],(!fe||Me(ee,ge))&&ve(ue,de?[ge,ee[ge]]:ee[ge]);return ue}};ze.exports={entries:we(!0),values:we(!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(oe,ze,De){"use strict";var fe=oe("../internals/to-string-tag-support"),me=oe("../internals/classof");ze.exports=fe?{}.toString:function(){return"[object "+me(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/is-callable"),Ce=oe("../internals/is-object"),Se=fe.TypeError;ze.exports=function(Me,ve){var we,de;if(ve==="string"&&ke(we=Me.toString)&&!Ce(de=me(we,Me))||ke(we=Me.valueOf)&&!Ce(de=me(we,Me))||ve!=="string"&&ke(we=Me.toString)&&!Ce(de=me(we,Me)))return de;throw Se("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(oe,ze,De){var fe=oe("../internals/get-built-in"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/object-get-own-property-names"),Ce=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/an-object"),Me=me([].concat);ze.exports=fe("Reflect","ownKeys")||function(we){var de=ke.f(Se(we)),z=Ce.f;return z?Me(de,z(we)):de}},{"../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(oe,ze,De){var fe=oe("../internals/global");ze.exports=fe},{"../internals/global":163}],214:[function(oe,ze,De){ze.exports=function(fe){try{return{error:!1,value:fe()}}catch(me){return{error:!0,value:me}}}},{}],215:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/promise-native-constructor"),ke=oe("../internals/is-callable"),Ce=oe("../internals/is-forced"),Se=oe("../internals/inspect-source"),Me=oe("../internals/well-known-symbol"),ve=oe("../internals/engine-is-browser"),we=oe("../internals/is-pure"),de=oe("../internals/engine-v8-version"),z=me&&me.prototype,ee=Me("species"),ae=!1,ie=ke(fe.PromiseRejectionEvent),le=Ce("Promise",function(){var ue=Se(me),ge=ue!==String(me);if(!ge&&de===66||we&&!(z.catch&&z.finally))return!0;if(de>=51&&/native code/.test(ue))return!1;var Pe=new me(function(Fe){Fe(1)}),je=function(Fe){Fe(function(){},function(){})},Be=Pe.constructor={};return Be[ee]=je,ae=Pe.then(function(){})instanceof je,ae?!ge&&ve&&!ie:!0});ze.exports={CONSTRUCTOR:le,REJECTION_EVENT:ie,SUBCLASSING:ae}},{"../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(oe,ze,De){var fe=oe("../internals/global");ze.exports=fe.Promise},{"../internals/global":163}],217:[function(oe,ze,De){var fe=oe("../internals/an-object"),me=oe("../internals/is-object"),ke=oe("../internals/new-promise-capability");ze.exports=function(Ce,Se){if(fe(Ce),me(Se)&&Se.constructor===Ce)return Se;var Me=ke.f(Ce),ve=Me.resolve;return ve(Se),Me.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(oe,ze,De){var fe=oe("../internals/promise-native-constructor"),me=oe("../internals/check-correctness-of-iteration"),ke=oe("../internals/promise-constructor-detection").CONSTRUCTOR;ze.exports=ke||!me(function(Ce){fe.all(Ce).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(oe,ze,De){var fe=oe("../internals/object-define-property").f;ze.exports=function(me,ke,Ce){Ce in me||fe(me,Ce,{configurable:!0,get:function(){return ke[Ce]},set:function(Se){ke[Ce]=Se}})}},{"../internals/object-define-property":198}],220:[function(oe,ze,De){var fe=function(){this.head=null,this.tail=null};fe.prototype={add:function(me){var ke={item:me,next:null};this.head?this.tail.next=ke:this.head=ke,this.tail=ke},get:function(){var me=this.head;if(me)return this.head=me.next,this.tail===me&&(this.tail=null),me.item}},ze.exports=fe},{}],221:[function(oe,ze,De){var fe=oe("../internals/redefine");ze.exports=function(me,ke,Ce){for(var Se in ke)fe(me,Se,ke[Se],Ce);return me}},{"../internals/redefine":222}],222:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/create-non-enumerable-property"),Se=oe("../internals/set-global"),Me=oe("../internals/inspect-source"),ve=oe("../internals/internal-state"),we=oe("../internals/function-name").CONFIGURABLE,de=ve.get,z=ve.enforce,ee=String(String).split("String");(ze.exports=function(ae,ie,le,ue){var ge=ue?!!ue.unsafe:!1,Pe=ue?!!ue.enumerable:!1,je=ue?!!ue.noTargetGet:!1,Be=ue&&ue.name!==void 0?ue.name:ie,Fe;if(me(le)&&(String(Be).slice(0,7)==="Symbol("&&(Be="["+String(Be).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ke(le,"name")||we&&le.name!==Be)&&Ce(le,"name",Be),Fe=z(le),Fe.source||(Fe.source=ee.join(typeof Be=="string"?Be:""))),ae===fe){Pe?ae[ie]=le:Se(ie,le);return}else ge?!je&&ae[ie]&&(Pe=!0):delete ae[ie];Pe?ae[ie]=le:Ce(ae,ie,le)})(Function.prototype,"toString",function(){return me(this)&&de(this).source||Me(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(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/an-object"),Ce=oe("../internals/is-callable"),Se=oe("../internals/classof-raw"),Me=oe("../internals/regexp-exec"),ve=fe.TypeError;ze.exports=function(we,de){var z=we.exec;if(Ce(z)){var ee=me(z,we,de);return ee!==null&&ke(ee),ee}if(Se(we)==="RegExp")return me(Me,we,de);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(oe,ze,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/to-string"),Ce=oe("../internals/regexp-flags"),Se=oe("../internals/regexp-sticky-helpers"),Me=oe("../internals/shared"),ve=oe("../internals/object-create"),we=oe("../internals/internal-state").get,de=oe("../internals/regexp-unsupported-dot-all"),z=oe("../internals/regexp-unsupported-ncg"),ee=Me("native-string-replace",String.prototype.replace),ae=RegExp.prototype.exec,ie=ae,le=me("".charAt),ue=me("".indexOf),ge=me("".replace),Pe=me("".slice),je=function(){var Ae=/a/,Ie=/b*/g;return fe(ae,Ae,"a"),fe(ae,Ie,"a"),Ae.lastIndex!==0||Ie.lastIndex!==0}(),Be=Se.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Ne=je||Fe||Be||de||z;Ne&&(ie=function(Ie){var We=this,Ye=we(We),Ue=ke(Ie),Ke=Ye.raw,ot,st,dt,Ct,$e,rt,St;if(Ke)return Ke.lastIndex=We.lastIndex,ot=fe(ie,Ke,Ue),We.lastIndex=Ke.lastIndex,ot;var Pt=Ye.groups,wt=Be&&We.sticky,pt=fe(Ce,We),ft=We.source,ht=0,Et=Ue;if(wt&&(pt=ge(pt,"y",""),ue(pt,"g")===-1&&(pt+="g"),Et=Pe(Ue,We.lastIndex),We.lastIndex>0&&(!We.multiline||We.multiline&&le(Ue,We.lastIndex-1)!==`
`)&&(ft="(?: "+ft+")",Et=" "+Et,ht++),st=new RegExp("^(?:"+ft+")",pt)),Fe&&(st=new RegExp("^"+ft+"$(?!\\s)",pt)),je&&(dt=We.lastIndex),Ct=fe(ae,wt?st:We,Et),wt?Ct?(Ct.input=Pe(Ct.input,ht),Ct[0]=Pe(Ct[0],ht),Ct.index=We.lastIndex,We.lastIndex+=Ct[0].length):We.lastIndex=0:je&&Ct&&(We.lastIndex=We.global?Ct.index+Ct[0].length:dt),Fe&&Ct&&Ct.length>1&&fe(ee,Ct[0],st,function(){for($e=1;$e<arguments.length-2;$e++)arguments[$e]===void 0&&(Ct[$e]=void 0)}),Ct&&Pt)for(Ct.groups=rt=ve(null),$e=0;$e<Pt.length;$e++)St=Pt[$e],rt[St[0]]=Ct[St[1]];return Ct}),ze.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(oe,ze,De){"use strict";var fe=oe("../internals/an-object");ze.exports=function(){var me=fe(this),ke="";return me.hasIndices&&(ke+="d"),me.global&&(ke+="g"),me.ignoreCase&&(ke+="i"),me.multiline&&(ke+="m"),me.dotAll&&(ke+="s"),me.unicode&&(ke+="u"),me.sticky&&(ke+="y"),ke}},{"../internals/an-object":101}],226:[function(oe,ze,De){var fe=oe("../internals/function-call"),me=oe("../internals/has-own-property"),ke=oe("../internals/object-is-prototype-of"),Ce=oe("../internals/regexp-flags"),Se=RegExp.prototype;ze.exports=function(Me){var ve=Me.flags;return ve===void 0&&!("flags"in Se)&&!me(Me,"flags")&&ke(Se,Me)?fe(Ce,Me):ve}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp,Ce=fe(function(){var ve=ke("a","y");return ve.lastIndex=2,ve.exec("abcd")!=null}),Se=Ce||fe(function(){return!ke("a","y").sticky}),Me=Ce||fe(function(){var ve=ke("^r","gy");return ve.lastIndex=2,ve.exec("str")!=null});ze.exports={BROKEN_CARET:Me,MISSED_STICKY:Se,UNSUPPORTED_Y:Ce}},{"../internals/fails":150,"../internals/global":163}],228:[function(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp;ze.exports=fe(function(){var Ce=ke(".","s");return!(Ce.dotAll&&Ce.exec(`
`)&&Ce.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(oe,ze,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp;ze.exports=fe(function(){var Ce=ke("(?<a>b)","g");return Ce.exec("b").groups.a!=="b"||"b".replace(Ce,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(oe,ze,De){var fe=oe("../internals/global"),me=fe.TypeError;ze.exports=function(ke){if(ke==null)throw me("Can't call method on "+ke);return ke}},{"../internals/global":163}],231:[function(oe,ze,De){ze.exports=Object.is||function(me,ke){return me===ke?me!==0||1/me===1/ke:me!=me&&ke!=ke}},{}],232:[function(oe,ze,De){var fe=oe("../internals/global"),me=Object.defineProperty;ze.exports=function(ke,Ce){try{me(fe,ke,{value:Ce,configurable:!0,writable:!0})}catch(Se){fe[ke]=Ce}return Ce}},{"../internals/global":163}],233:[function(oe,ze,De){"use strict";var fe=oe("../internals/get-built-in"),me=oe("../internals/object-define-property"),ke=oe("../internals/well-known-symbol"),Ce=oe("../internals/descriptors"),Se=ke("species");ze.exports=function(Me){var ve=fe(Me),we=me.f;Ce&&ve&&!ve[Se]&&we(ve,Se,{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(oe,ze,De){var fe=oe("../internals/object-define-property").f,me=oe("../internals/has-own-property"),ke=oe("../internals/well-known-symbol"),Ce=ke("toStringTag");ze.exports=function(Se,Me,ve){Se&&!ve&&(Se=Se.prototype),Se&&!me(Se,Ce)&&fe(Se,Ce,{configurable:!0,value:Me})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(oe,ze,De){var fe=oe("../internals/shared"),me=oe("../internals/uid"),ke=fe("keys");ze.exports=function(Ce){return ke[Ce]||(ke[Ce]=me(Ce))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/set-global"),ke="__core-js_shared__",Ce=fe[ke]||me(ke,{});ze.exports=Ce},{"../internals/global":163,"../internals/set-global":232}],237:[function(oe,ze,De){var fe=oe("../internals/is-pure"),me=oe("../internals/shared-store");(ze.exports=function(ke,Ce){return me[ke]||(me[ke]=Ce!==void 0?Ce:{})})("versions",[]).push({version:"3.22.1",mode:fe?"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(oe,ze,De){var fe=oe("../internals/an-object"),me=oe("../internals/a-constructor"),ke=oe("../internals/well-known-symbol"),Ce=ke("species");ze.exports=function(Se,Me){var ve=fe(Se).constructor,we;return ve===void 0||(we=fe(ve)[Ce])==null?Me:me(we)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-integer-or-infinity"),ke=oe("../internals/to-string"),Ce=oe("../internals/require-object-coercible"),Se=fe("".charAt),Me=fe("".charCodeAt),ve=fe("".slice),we=function(de){return function(z,ee){var ae=ke(Ce(z)),ie=me(ee),le=ae.length,ue,ge;return ie<0||ie>=le?de?"":void 0:(ue=Me(ae,ie),ue<55296||ue>56319||ie+1===le||(ge=Me(ae,ie+1))<56320||ge>57343?de?Se(ae,ie):ue:de?ve(ae,ie,ie+2):(ue-55296<<10)+(ge-56320)+65536)}};ze.exports={codeAt:we(!1),charAt:we(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(oe,ze,De){var fe=oe("../internals/function-name").PROPER,me=oe("../internals/fails"),ke=oe("../internals/whitespaces"),Ce="\u200B\x85\u180E";ze.exports=function(Se){return me(function(){return!!ke[Se]()||Ce[Se]()!==Ce||fe&&ke[Se].name!==Se})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/require-object-coercible"),ke=oe("../internals/to-string"),Ce=oe("../internals/whitespaces"),Se=fe("".replace),Me="["+Ce+"]",ve=RegExp("^"+Me+Me+"*"),we=RegExp(Me+Me+"*$"),de=function(z){return function(ee){var ae=ke(me(ee));return z&1&&(ae=Se(ae,ve,"")),z&2&&(ae=Se(ae,we,"")),ae}};ze.exports={start:de(1),end:de(2),trim:de(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(oe,ze,De){var fe=oe("../internals/function-call"),me=oe("../internals/get-built-in"),ke=oe("../internals/well-known-symbol"),Ce=oe("../internals/redefine");ze.exports=function(){var Se=me("Symbol"),Me=Se&&Se.prototype,ve=Me&&Me.valueOf,we=ke("toPrimitive");Me&&!Me[we]&&Ce(Me,we,function(de){return fe(ve,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-apply"),ke=oe("../internals/function-bind-context"),Ce=oe("../internals/is-callable"),Se=oe("../internals/has-own-property"),Me=oe("../internals/fails"),ve=oe("../internals/html"),we=oe("../internals/array-slice"),de=oe("../internals/document-create-element"),z=oe("../internals/validate-arguments-length"),ee=oe("../internals/engine-is-ios"),ae=oe("../internals/engine-is-node"),ie=fe.setImmediate,le=fe.clearImmediate,ue=fe.process,ge=fe.Dispatch,Pe=fe.Function,je=fe.MessageChannel,Be=fe.String,Fe=0,Ne={},Ae="onreadystatechange",Ie,We,Ye,Ue;try{Ie=fe.location}catch(Ct){}var Ke=function(Ct){if(Se(Ne,Ct)){var $e=Ne[Ct];delete Ne[Ct],$e()}},ot=function(Ct){return function(){Ke(Ct)}},st=function(Ct){Ke(Ct.data)},dt=function(Ct){fe.postMessage(Be(Ct),Ie.protocol+"//"+Ie.host)};(!ie||!le)&&(ie=function($e){z(arguments.length,1);var rt=Ce($e)?$e:Pe($e),St=we(arguments,1);return Ne[++Fe]=function(){me(rt,void 0,St)},We(Fe),Fe},le=function($e){delete Ne[$e]},ae?We=function(Ct){ue.nextTick(ot(Ct))}:ge&&ge.now?We=function(Ct){ge.now(ot(Ct))}:je&&!ee?(Ye=new je,Ue=Ye.port2,Ye.port1.onmessage=st,We=ke(Ue.postMessage,Ue)):fe.addEventListener&&Ce(fe.postMessage)&&!fe.importScripts&&Ie&&Ie.protocol!=="file:"&&!Me(dt)?(We=dt,fe.addEventListener("message",st,!1)):Ae in de("script")?We=function(Ct){ve.appendChild(de("script"))[Ae]=function(){ve.removeChild(this),Ke(Ct)}}:We=function(Ct){setTimeout(ot(Ct),0)}),ze.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(oe,ze,De){var fe=oe("../internals/function-uncurry-this");ze.exports=fe(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(oe,ze,De){var fe=oe("../internals/to-integer-or-infinity"),me=Math.max,ke=Math.min;ze.exports=function(Ce,Se){var Me=fe(Ce);return Me<0?me(Me+Se,0):ke(Me,Se)}},{"../internals/to-integer-or-infinity":248}],246:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-integer-or-infinity"),ke=oe("../internals/to-length"),Ce=fe.RangeError;ze.exports=function(Se){if(Se===void 0)return 0;var Me=me(Se),ve=ke(Me);if(Me!==ve)throw Ce("Wrong length or index");return ve}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(oe,ze,De){var fe=oe("../internals/indexed-object"),me=oe("../internals/require-object-coercible");ze.exports=function(ke){return fe(me(ke))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(oe,ze,De){var fe=Math.ceil,me=Math.floor;ze.exports=function(ke){var Ce=+ke;return Ce!==Ce||Ce===0?0:(Ce>0?me:fe)(Ce)}},{}],249:[function(oe,ze,De){var fe=oe("../internals/to-integer-or-infinity"),me=Math.min;ze.exports=function(ke){return ke>0?me(fe(ke),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/require-object-coercible"),ke=fe.Object;ze.exports=function(Ce){return ke(me(Ce))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-positive-integer"),ke=fe.RangeError;ze.exports=function(Ce,Se){var Me=me(Ce);if(Me%Se)throw ke("Wrong offset");return Me}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/to-integer-or-infinity"),ke=fe.RangeError;ze.exports=function(Ce){var Se=me(Ce);if(Se<0)throw ke("The argument can't be less than 0");return Se}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/is-object"),Ce=oe("../internals/is-symbol"),Se=oe("../internals/get-method"),Me=oe("../internals/ordinary-to-primitive"),ve=oe("../internals/well-known-symbol"),we=fe.TypeError,de=ve("toPrimitive");ze.exports=function(z,ee){if(!ke(z)||Ce(z))return z;var ae=Se(z,de),ie;if(ae){if(ee===void 0&&(ee="default"),ie=me(ae,z,ee),!ke(ie)||Ce(ie))return ie;throw we("Can't convert object to primitive value")}return ee===void 0&&(ee="number"),Me(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(oe,ze,De){var fe=oe("../internals/to-primitive"),me=oe("../internals/is-symbol");ze.exports=function(ke){var Ce=fe(ke,"string");return me(Ce)?Ce:Ce+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol"),me=fe("toStringTag"),ke={};ke[me]="z",ze.exports=String(ke)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/classof"),ke=fe.String;ze.exports=function(Ce){if(me(Ce)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return ke(Ce)}},{"../internals/classof":124,"../internals/global":163}],257:[function(oe,ze,De){var fe=oe("../internals/global"),me=fe.String;ze.exports=function(ke){try{return me(ke)}catch(Ce){return"Object"}}},{"../internals/global":163}],258:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/function-call"),Ce=oe("../internals/descriptors"),Se=oe("../internals/typed-array-constructors-require-wrappers"),Me=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-buffer"),we=oe("../internals/an-instance"),de=oe("../internals/create-property-descriptor"),z=oe("../internals/create-non-enumerable-property"),ee=oe("../internals/is-integral-number"),ae=oe("../internals/to-length"),ie=oe("../internals/to-index"),le=oe("../internals/to-offset"),ue=oe("../internals/to-property-key"),ge=oe("../internals/has-own-property"),Pe=oe("../internals/classof"),je=oe("../internals/is-object"),Be=oe("../internals/is-symbol"),Fe=oe("../internals/object-create"),Ne=oe("../internals/object-is-prototype-of"),Ae=oe("../internals/object-set-prototype-of"),Ie=oe("../internals/object-get-own-property-names").f,We=oe("../internals/typed-array-from"),Ye=oe("../internals/array-iteration").forEach,Ue=oe("../internals/set-species"),Ke=oe("../internals/object-define-property"),ot=oe("../internals/object-get-own-property-descriptor"),st=oe("../internals/internal-state"),dt=oe("../internals/inherit-if-required"),Ct=st.get,$e=st.set,rt=Ke.f,St=ot.f,Pt=Math.round,wt=me.RangeError,pt=ve.ArrayBuffer,ft=pt.prototype,ht=ve.DataView,Et=Me.NATIVE_ARRAY_BUFFER_VIEWS,mt=Me.TYPED_ARRAY_CONSTRUCTOR,yt=Me.TYPED_ARRAY_TAG,At=Me.TypedArray,xt=Me.TypedArrayPrototype,tt=Me.aTypedArrayConstructor,Ve=Me.isTypedArray,xe="BYTES_PER_ELEMENT",Le="Wrong length",Ze=function(ut,gt){tt(ut);for(var Mt=0,Nt=gt.length,Dt=new ut(Nt);Nt>Mt;)Dt[Mt]=gt[Mt++];return Dt},nt=function(ut,gt){rt(ut,gt,{get:function(){return Ct(this)[gt]}})},Re=function(ut){var gt;return Ne(ft,ut)||(gt=Pe(ut))=="ArrayBuffer"||gt=="SharedArrayBuffer"},_e=function(ut,gt){return Ve(ut)&&!Be(gt)&&gt in ut&&ee(+gt)&&gt>=0},He=function(gt,Mt){return Mt=ue(Mt),_e(gt,Mt)?de(2,gt[Mt]):St(gt,Mt)},Qe=function(gt,Mt,Nt){return Mt=ue(Mt),_e(gt,Mt)&&je(Nt)&&ge(Nt,"value")&&!ge(Nt,"get")&&!ge(Nt,"set")&&!Nt.configurable&&(!ge(Nt,"writable")||Nt.writable)&&(!ge(Nt,"enumerable")||Nt.enumerable)?(gt[Mt]=Nt.value,gt):rt(gt,Mt,Nt)};Ce?(Et||(ot.f=He,Ke.f=Qe,nt(xt,"buffer"),nt(xt,"byteOffset"),nt(xt,"byteLength"),nt(xt,"length")),fe({target:"Object",stat:!0,forced:!Et},{getOwnPropertyDescriptor:He,defineProperty:Qe}),ze.exports=function(ut,gt,Mt){var Nt=ut.match(/\d+$/)[0]/8,Dt=ut+(Mt?"Clamped":"")+"Array",Ht="get"+ut,Xt="set"+ut,$t=me[Dt],Ut=$t,sn=Ut&&Ut.prototype,nn={},Wt=function(jn,Jn){var Cr=Ct(jn);return Cr.view[Ht](Jn*Nt+Cr.byteOffset,!0)},bn=function(jn,Jn,Cr){var cr=Ct(jn);Mt&&(Cr=(Cr=Pt(Cr))<0?0:Cr>255?255:Cr&255),cr.view[Xt](Jn*Nt+cr.byteOffset,Cr,!0)},mn=function(jn,Jn){rt(jn,Jn,{get:function(){return Wt(this,Jn)},set:function(Cr){return bn(this,Jn,Cr)},enumerable:!0})};Et?Se&&(Ut=gt(function(jn,Jn,Cr,cr){return we(jn,sn),dt(function(){return je(Jn)?Re(Jn)?cr!==void 0?new $t(Jn,le(Cr,Nt),cr):Cr!==void 0?new $t(Jn,le(Cr,Nt)):new $t(Jn):Ve(Jn)?Ze(Ut,Jn):ke(We,Ut,Jn):new $t(ie(Jn))}(),jn,Ut)}),Ae&&Ae(Ut,At),Ye(Ie($t),function(jn){jn in Ut||z(Ut,jn,$t[jn])}),Ut.prototype=sn):(Ut=gt(function(jn,Jn,Cr,cr){we(jn,sn);var kr=0,Kr=0,Ur,oi,vi;if(!je(Jn))vi=ie(Jn),oi=vi*Nt,Ur=new pt(oi);else if(Re(Jn)){Ur=Jn,Kr=le(Cr,Nt);var Bi=Jn.byteLength;if(cr===void 0){if(Bi%Nt||(oi=Bi-Kr,oi<0))throw wt(Le)}else if(oi=ae(cr)*Nt,oi+Kr>Bi)throw wt(Le);vi=oi/Nt}else return Ve(Jn)?Ze(Ut,Jn):ke(We,Ut,Jn);for($e(jn,{buffer:Ur,byteOffset:Kr,byteLength:oi,length:vi,view:new ht(Ur)});kr<vi;)mn(jn,kr++)}),Ae&&Ae(Ut,At),sn=Ut.prototype=Fe(xt)),sn.constructor!==Ut&&z(sn,"constructor",Ut),z(sn,mt,Ut),yt&&z(sn,yt,Dt),nn[Dt]=Ut,fe({global:!0,forced:Ut!=$t,sham:!Et},nn),xe in Ut||z(Ut,xe,Nt),xe in sn||z(sn,xe,Nt),Ue(Dt)}):ze.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(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/fails"),ke=oe("../internals/check-correctness-of-iteration"),Ce=oe("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,Se=fe.ArrayBuffer,Me=fe.Int8Array;ze.exports=!Ce||!me(function(){Me(1)})||!me(function(){new Me(-1)})||!ke(function(ve){new Me,new Me(null),new Me(1.5),new Me(ve)},!0)||me(function(){return new Me(new Se(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(oe,ze,De){var fe=oe("../internals/array-from-constructor-and-list"),me=oe("../internals/typed-array-species-constructor");ze.exports=function(ke,Ce){return fe(me(ke),Ce)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(oe,ze,De){var fe=oe("../internals/function-bind-context"),me=oe("../internals/function-call"),ke=oe("../internals/a-constructor"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Me=oe("../internals/get-iterator"),ve=oe("../internals/get-iterator-method"),we=oe("../internals/is-array-iterator-method"),de=oe("../internals/array-buffer-view-core").aTypedArrayConstructor;ze.exports=function(ee){var ae=ke(this),ie=Ce(ee),le=arguments.length,ue=le>1?arguments[1]:void 0,ge=ue!==void 0,Pe=ve(ie),je,Be,Fe,Ne,Ae,Ie;if(Pe&&!we(Pe))for(Ae=Me(ie,Pe),Ie=Ae.next,ie=[];!(Ne=me(Ie,Ae)).done;)ie.push(Ne.value);for(ge&&le>2&&(ue=fe(ue,arguments[2])),Be=Se(ie),Fe=new(de(ae))(Be),je=0;Be>je;je++)Fe[je]=ge?ue(ie[je],je):ie[je];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(oe,ze,De){var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/species-constructor"),ke=fe.TYPED_ARRAY_CONSTRUCTOR,Ce=fe.aTypedArrayConstructor;ze.exports=function(Se){return Ce(me(Se,Se[ke]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(oe,ze,De){var fe=oe("../internals/function-uncurry-this"),me=0,ke=Math.random(),Ce=fe(1 .toString);ze.exports=function(Se){return"Symbol("+(Se===void 0?"":Se)+")_"+Ce(++me+ke,36)}},{"../internals/function-uncurry-this":157}],264:[function(oe,ze,De){var fe=oe("../internals/native-symbol");ze.exports=fe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/fails");ze.exports=fe&&me(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(oe,ze,De){var fe=oe("../internals/global"),me=fe.TypeError;ze.exports=function(ke,Ce){if(ke<Ce)throw me("Not enough arguments");return ke}},{"../internals/global":163}],267:[function(oe,ze,De){var fe=oe("../internals/well-known-symbol");De.f=fe},{"../internals/well-known-symbol":268}],268:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/shared"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/uid"),Se=oe("../internals/native-symbol"),Me=oe("../internals/use-symbol-as-uid"),ve=me("wks"),we=fe.Symbol,de=we&&we.for,z=Me?we:we&&we.withoutSetter||Ce;ze.exports=function(ee){if(!ke(ve,ee)||!(Se||typeof ve[ee]=="string")){var ae="Symbol."+ee;Se&&ke(we,ee)?ve[ee]=we[ee]:Me&&de?ve[ee]=de(ae):ve[ee]=z(ae)}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(oe,ze,De){ze.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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/array-buffer"),Ce=oe("../internals/set-species"),Se="ArrayBuffer",Me=ke[Se],ve=me[Se];fe({global:!0,forced:ve!==Me},{ArrayBuffer:Me}),Ce(Se)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/array-buffer"),Se=oe("../internals/an-object"),Me=oe("../internals/to-absolute-index"),ve=oe("../internals/to-length"),we=oe("../internals/species-constructor"),de=Ce.ArrayBuffer,z=Ce.DataView,ee=z.prototype,ae=me(de.prototype.slice),ie=me(ee.getUint8),le=me(ee.setUint8),ue=ke(function(){return!new de(2).slice(1,void 0).byteLength});fe({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ue},{slice:function(Pe,je){if(ae&&je===void 0)return ae(Se(this),Pe);for(var Be=Se(this).byteLength,Fe=Me(Pe,Be),Ne=Me(je===void 0?Be:je,Be),Ae=new(we(this,de))(ve(Ne-Fe)),Ie=new z(this),We=new z(Ae),Ye=0;Fe<Ne;)le(We,Ye++,ie(Ie,Fe++));return Ae}})},{"../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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/fails"),Ce=oe("../internals/is-array"),Se=oe("../internals/is-object"),Me=oe("../internals/to-object"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/create-property"),de=oe("../internals/array-species-create"),z=oe("../internals/array-method-has-species-support"),ee=oe("../internals/well-known-symbol"),ae=oe("../internals/engine-v8-version"),ie=ee("isConcatSpreadable"),le=9007199254740991,ue="Maximum allowed index exceeded",ge=me.TypeError,Pe=ae>=51||!ke(function(){var Ne=[];return Ne[ie]=!1,Ne.concat()[0]!==Ne}),je=z("concat"),Be=function(Ne){if(!Se(Ne))return!1;var Ae=Ne[ie];return Ae!==void 0?!!Ae:Ce(Ne)},Fe=!Pe||!je;fe({target:"Array",proto:!0,forced:Fe},{concat:function(Ae){var Ie=Me(this),We=de(Ie,0),Ye=0,Ue,Ke,ot,st,dt;for(Ue=-1,ot=arguments.length;Ue<ot;Ue++)if(dt=Ue===-1?Ie:arguments[Ue],Be(dt)){if(st=ve(dt),Ye+st>le)throw ge(ue);for(Ke=0;Ke<st;Ke++,Ye++)Ke in dt&&we(We,Ye,dt[Ke])}else{if(Ye>=le)throw ge(ue);we(We,Ye++,dt)}return We.length=Ye,We}})},{"../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(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/array-fill"),ke=oe("../internals/add-to-unscopables");fe({target:"Array",proto:!0},{fill:me}),ke("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").filter,ke=oe("../internals/array-method-has-species-support"),Ce=ke("filter");fe({target:"Array",proto:!0,forced:!Ce},{filter:function(Me){return me(this,Me,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").find,ke=oe("../internals/add-to-unscopables"),Ce="find",Se=!0;Ce in[]&&Array(1)[Ce](function(){Se=!1}),fe({target:"Array",proto:!0,forced:Se},{find:function(ve){return me(this,ve,arguments.length>1?arguments[1]:void 0)}}),ke(Ce)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/array-from"),ke=oe("../internals/check-correctness-of-iteration"),Ce=!ke(function(Se){Array.from(Se)});fe({target:"Array",stat:!0,forced:Ce},{from:me})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-includes").includes,ke=oe("../internals/add-to-unscopables");fe({target:"Array",proto:!0},{includes:function(Se){return me(this,Se,arguments.length>1?arguments[1]:void 0)}}),ke("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(oe,ze,De){"use strict";var fe=oe("../internals/to-indexed-object"),me=oe("../internals/add-to-unscopables"),ke=oe("../internals/iterators"),Ce=oe("../internals/internal-state"),Se=oe("../internals/object-define-property").f,Me=oe("../internals/define-iterator"),ve=oe("../internals/is-pure"),we=oe("../internals/descriptors"),de="Array Iterator",z=Ce.set,ee=Ce.getterFor(de);ze.exports=Me(Array,"Array",function(ie,le){z(this,{type:de,target:fe(ie),index:0,kind:le})},function(){var ie=ee(this),le=ie.target,ue=ie.kind,ge=ie.index++;return!le||ge>=le.length?(ie.target=void 0,{value:void 0,done:!0}):ue=="keys"?{value:ge,done:!1}:ue=="values"?{value:le[ge],done:!1}:{value:[ge,le[ge]],done:!1}},"values");var ae=ke.Arguments=ke.Array;if(me("keys"),me("values"),me("entries"),!ve&&we&&ae.name!=="values")try{Se(ae,"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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/indexed-object"),Ce=oe("../internals/to-indexed-object"),Se=oe("../internals/array-method-is-strict"),Me=me([].join),ve=ke!=Object,we=Se("join",",");fe({target:"Array",proto:!0,forced:ve||!we},{join:function(z){return Me(Ce(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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").map,ke=oe("../internals/array-method-has-species-support"),Ce=ke("map");fe({target:"Array",proto:!0,forced:!Ce},{map:function(Me){return me(this,Me,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/is-array"),Ce=oe("../internals/is-constructor"),Se=oe("../internals/is-object"),Me=oe("../internals/to-absolute-index"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/to-indexed-object"),de=oe("../internals/create-property"),z=oe("../internals/well-known-symbol"),ee=oe("../internals/array-method-has-species-support"),ae=oe("../internals/array-slice"),ie=ee("slice"),le=z("species"),ue=me.Array,ge=Math.max;fe({target:"Array",proto:!0,forced:!ie},{slice:function(je,Be){var Fe=we(this),Ne=ve(Fe),Ae=Me(je,Ne),Ie=Me(Be===void 0?Ne:Be,Ne),We,Ye,Ue;if(ke(Fe)&&(We=Fe.constructor,Ce(We)&&(We===ue||ke(We.prototype))?We=void 0:Se(We)&&(We=We[le],We===null&&(We=void 0)),We===ue||We===void 0))return ae(Fe,Ae,Ie);for(Ye=new(We===void 0?ue:We)(ge(Ie-Ae,0)),Ue=0;Ae<Ie;Ae++,Ue++)Ae in Fe&&de(Ye,Ue,Fe[Ae]);return Ye.length=Ue,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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/a-callable"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Me=oe("../internals/to-string"),ve=oe("../internals/fails"),we=oe("../internals/array-sort"),de=oe("../internals/array-method-is-strict"),z=oe("../internals/engine-ff-version"),ee=oe("../internals/engine-is-ie-or-edge"),ae=oe("../internals/engine-v8-version"),ie=oe("../internals/engine-webkit-version"),le=[],ue=me(le.sort),ge=me(le.push),Pe=ve(function(){le.sort(void 0)}),je=ve(function(){le.sort(null)}),Be=de("sort"),Fe=!ve(function(){if(ae)return ae<70;if(!(z&&z>3)){if(ee)return!0;if(ie)return ie<603;var Ie="",We,Ye,Ue,Ke;for(We=65;We<76;We++){switch(Ye=String.fromCharCode(We),We){case 66:case 69:case 70:case 72:Ue=3;break;case 68:case 71:Ue=4;break;default:Ue=2}for(Ke=0;Ke<47;Ke++)le.push({k:Ye+Ke,v:Ue})}for(le.sort(function(ot,st){return st.v-ot.v}),Ke=0;Ke<le.length;Ke++)Ye=le[Ke].k.charAt(0),Ie.charAt(Ie.length-1)!==Ye&&(Ie+=Ye);return Ie!=="DGBEFHACIJK"}}),Ne=Pe||!je||!Be||!Fe,Ae=function(Ie){return function(We,Ye){return Ye===void 0?-1:We===void 0?1:Ie!==void 0?+Ie(We,Ye)||0:Me(We)>Me(Ye)?1:-1}};fe({target:"Array",proto:!0,forced:Ne},{sort:function(We){We!==void 0&&ke(We);var Ye=Ce(this);if(Fe)return We===void 0?ue(Ye):ue(Ye,We);var Ue=[],Ke=Se(Ye),ot,st;for(st=0;st<Ke;st++)st in Ye&&ge(Ue,Ye[st]);for(we(Ue,Ae(We)),ot=Ue.length,st=0;st<ot;)Ye[st]=Ue[st++];for(;st<Ke;)delete Ye[st++];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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/to-absolute-index"),Ce=oe("../internals/to-integer-or-infinity"),Se=oe("../internals/length-of-array-like"),Me=oe("../internals/to-object"),ve=oe("../internals/array-species-create"),we=oe("../internals/create-property"),de=oe("../internals/array-method-has-species-support"),z=de("splice"),ee=me.TypeError,ae=Math.max,ie=Math.min,le=9007199254740991,ue="Maximum allowed length exceeded";fe({target:"Array",proto:!0,forced:!z},{splice:function(Pe,je){var Be=Me(this),Fe=Se(Be),Ne=ke(Pe,Fe),Ae=arguments.length,Ie,We,Ye,Ue,Ke,ot;if(Ae===0?Ie=We=0:Ae===1?(Ie=0,We=Fe-Ne):(Ie=Ae-2,We=ie(ae(Ce(je),0),Fe-Ne)),Fe+Ie-We>le)throw ee(ue);for(Ye=ve(Be,We),Ue=0;Ue<We;Ue++)Ke=Ne+Ue,Ke in Be&&we(Ye,Ue,Be[Ke]);if(Ye.length=We,Ie<We){for(Ue=Ne;Ue<Fe-We;Ue++)Ke=Ue+We,ot=Ue+Ie,Ke in Be?Be[ot]=Be[Ke]:delete Be[ot];for(Ue=Fe;Ue>Fe-We+Ie;Ue--)delete Be[Ue-1]}else if(Ie>We)for(Ue=Fe-We;Ue>Ne;Ue--)Ke=Ue+We-1,ot=Ue+Ie-1,Ke in Be?Be[ot]=Be[Ke]:delete Be[ot];for(Ue=0;Ue<Ie;Ue++)Be[Ue+Ne]=arguments[Ue+2];return Be.length=Fe-We+Ie,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(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-name").EXISTS,ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/object-define-property").f,Se=Function.prototype,Me=ke(Se.toString),ve=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,we=ke(ve.exec),de="name";fe&&!me&&Ce(Se,de,{configurable:!0,get:function(){try{return we(ve,Me(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/function-apply"),Ce=oe("../internals/function-call"),Se=oe("../internals/function-uncurry-this"),Me=oe("../internals/fails"),ve=oe("../internals/is-array"),we=oe("../internals/is-callable"),de=oe("../internals/is-object"),z=oe("../internals/is-symbol"),ee=oe("../internals/array-slice"),ae=oe("../internals/native-symbol"),ie=me("JSON","stringify"),le=Se(/./.exec),ue=Se("".charAt),ge=Se("".charCodeAt),Pe=Se("".replace),je=Se(1 .toString),Be=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,Ne=/^[\uDC00-\uDFFF]$/,Ae=!ae||Me(function(){var Ue=me("Symbol")();return ie([Ue])!="[null]"||ie({a:Ue})!="{}"||ie(Object(Ue))!="{}"}),Ie=Me(function(){return ie("\uDF06\uD834")!=='"\\udf06\\ud834"'||ie("\uDEAD")!=='"\\udead"'}),We=function(Ue,Ke){var ot=ee(arguments),st=Ke;if(!(!de(Ke)&&Ue===void 0||z(Ue)))return ve(Ke)||(Ke=function(dt,Ct){if(we(st)&&(Ct=Ce(st,this,dt,Ct)),!z(Ct))return Ct}),ot[1]=Ke,ke(ie,null,ot)},Ye=function(Ue,Ke,ot){var st=ue(ot,Ke-1),dt=ue(ot,Ke+1);return le(Fe,Ue)&&!le(Ne,dt)||le(Ne,Ue)&&!le(Fe,st)?"\\u"+je(ge(Ue,0),16):Ue};ie&&fe({target:"JSON",stat:!0,forced:Ae||Ie},{stringify:function(Ke,ot,st){var dt=ee(arguments),Ct=ke(Ae?We:ie,null,dt);return Ie&&typeof Ct=="string"?Pe(Ct,Be,Ye):Ct}})},{"../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(oe,ze,De){"use strict";var fe=oe("../internals/descriptors"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-forced"),Se=oe("../internals/redefine"),Me=oe("../internals/has-own-property"),ve=oe("../internals/inherit-if-required"),we=oe("../internals/object-is-prototype-of"),de=oe("../internals/is-symbol"),z=oe("../internals/to-primitive"),ee=oe("../internals/fails"),ae=oe("../internals/object-get-own-property-names").f,ie=oe("../internals/object-get-own-property-descriptor").f,le=oe("../internals/object-define-property").f,ue=oe("../internals/this-number-value"),ge=oe("../internals/string-trim").trim,Pe="Number",je=me[Pe],Be=je.prototype,Fe=me.TypeError,Ne=ke("".slice),Ae=ke("".charCodeAt),Ie=function(st){var dt=z(st,"number");return typeof dt=="bigint"?dt:We(dt)},We=function(st){var dt=z(st,"number"),Ct,$e,rt,St,Pt,wt,pt,ft;if(de(dt))throw Fe("Cannot convert a Symbol value to a number");if(typeof dt=="string"&&dt.length>2){if(dt=ge(dt),Ct=Ae(dt,0),Ct===43||Ct===45){if($e=Ae(dt,2),$e===88||$e===120)return NaN}else if(Ct===48){switch(Ae(dt,1)){case 66:case 98:rt=2,St=49;break;case 79:case 111:rt=8,St=55;break;default:return+dt}for(Pt=Ne(dt,2),wt=Pt.length,pt=0;pt<wt;pt++)if(ft=Ae(Pt,pt),ft<48||ft>St)return NaN;return parseInt(Pt,rt)}}return+dt};if(Ce(Pe,!je(" 0o1")||!je("0b1")||je("+0x1"))){for(var Ye=function(dt){var Ct=arguments.length<1?0:je(Ie(dt)),$e=this;return we(Be,$e)&&ee(function(){ue($e)})?ve(Object(Ct),$e,Ye):Ct},Ue=fe?ae(je):"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(","),Ke=0,ot;Ue.length>Ke;Ke++)Me(je,ot=Ue[Ke])&&!Me(Ye,ot)&&le(Ye,ot,ie(je,ot));Ye.prototype=Be,Be.constructor=Ye,Se(me,Pe,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(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/object-assign");fe({target:"Object",stat:!0,forced:Object.assign!==me},{assign:me})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/object-to-array").entries;fe({target:"Object",stat:!0},{entries:function(Ce){return me(Ce)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/native-symbol"),ke=oe("../internals/fails"),Ce=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/to-object"),Me=!me||ke(function(){Ce.f(1)});fe({target:"Object",stat:!0,forced:Me},{getOwnPropertySymbols:function(we){var de=Ce.f;return de?de(Se(we)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/to-object"),ke=oe("../internals/object-keys"),Ce=oe("../internals/fails"),Se=Ce(function(){ke(1)});fe({target:"Object",stat:!0,forced:Se},{keys:function(ve){return ke(me(ve))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(oe,ze,De){var fe=oe("../internals/to-string-tag-support"),me=oe("../internals/redefine"),ke=oe("../internals/object-to-string");fe||me(Object.prototype,"toString",ke,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Me=oe("../internals/iterate"),ve=oe("../internals/promise-statics-incorrect-iteration");fe({target:"Promise",stat:!0,forced:ve},{all:function(de){var z=this,ee=Ce.f(z),ae=ee.resolve,ie=ee.reject,le=Se(function(){var ue=ke(z.resolve),ge=[],Pe=0,je=1;Me(de,function(Be){var Fe=Pe++,Ne=!1;je++,me(ue,z,Be).then(function(Ae){Ne||(Ne=!0,ge[Fe]=Ae,--je||ae(ge))},ie)}),--je||ae(ge)});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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/is-pure"),ke=oe("../internals/promise-constructor-detection").CONSTRUCTOR,Ce=oe("../internals/promise-native-constructor"),Se=oe("../internals/get-built-in"),Me=oe("../internals/is-callable"),ve=oe("../internals/redefine"),we=Ce&&Ce.prototype;if(fe({target:"Promise",proto:!0,forced:ke,real:!0},{catch:function(z){return this.then(void 0,z)}}),!me&&Me(Ce)){var de=Se("Promise").prototype.catch;we.catch!==de&&ve(we,"catch",de,{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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/is-pure"),ke=oe("../internals/engine-is-node"),Ce=oe("../internals/global"),Se=oe("../internals/function-call"),Me=oe("../internals/redefine"),ve=oe("../internals/redefine-all"),we=oe("../internals/object-set-prototype-of"),de=oe("../internals/set-to-string-tag"),z=oe("../internals/set-species"),ee=oe("../internals/a-callable"),ae=oe("../internals/is-callable"),ie=oe("../internals/is-object"),le=oe("../internals/an-instance"),ue=oe("../internals/species-constructor"),ge=oe("../internals/task").set,Pe=oe("../internals/microtask"),je=oe("../internals/host-report-errors"),Be=oe("../internals/perform"),Fe=oe("../internals/queue"),Ne=oe("../internals/internal-state"),Ae=oe("../internals/promise-native-constructor"),Ie=oe("../internals/promise-constructor-detection"),We=oe("../internals/new-promise-capability"),Ye="Promise",Ue=Ie.CONSTRUCTOR,Ke=Ie.REJECTION_EVENT,ot=Ie.SUBCLASSING,st=Ne.getterFor(Ye),dt=Ne.set,Ct=Ae&&Ae.prototype,$e=Ae,rt=Ct,St=Ce.TypeError,Pt=Ce.document,wt=Ce.process,pt=We.f,ft=pt,ht=!!(Pt&&Pt.createEvent&&Ce.dispatchEvent),Et="unhandledrejection",mt="rejectionhandled",yt=0,At=1,xt=2,tt=1,Ve=2,xe,Le,Ze,nt,Re=function(Xt){var $t;return ie(Xt)&&ae($t=Xt.then)?$t:!1},_e=function(Xt,$t){var Ut=$t.value,sn=$t.state==At,nn=sn?Xt.ok:Xt.fail,Wt=Xt.resolve,bn=Xt.reject,mn=Xt.domain,jn,Jn,Cr;try{nn?(sn||($t.rejection===Ve&&Mt($t),$t.rejection=tt),nn===!0?jn=Ut:(mn&&mn.enter(),jn=nn(Ut),mn&&(mn.exit(),Cr=!0)),jn===Xt.promise?bn(St("Promise-chain cycle")):(Jn=Re(jn))?Se(Jn,jn,Wt,bn):Wt(jn)):bn(Ut)}catch(cr){mn&&!Cr&&mn.exit(),bn(cr)}},He=function(Xt,$t){Xt.notified||(Xt.notified=!0,Pe(function(){for(var Ut=Xt.reactions,sn;sn=Ut.get();)_e(sn,Xt);Xt.notified=!1,$t&&!Xt.rejection&&ut(Xt)}))},Qe=function(Xt,$t,Ut){var sn,nn;ht?(sn=Pt.createEvent("Event"),sn.promise=$t,sn.reason=Ut,sn.initEvent(Xt,!1,!0),Ce.dispatchEvent(sn)):sn={promise:$t,reason:Ut},!Ke&&(nn=Ce["on"+Xt])?nn(sn):Xt===Et&&je("Unhandled promise rejection",Ut)},ut=function(Xt){Se(ge,Ce,function(){var $t=Xt.facade,Ut=Xt.value,sn=gt(Xt),nn;if(sn&&(nn=Be(function(){ke?wt.emit("unhandledRejection",Ut,$t):Qe(Et,$t,Ut)}),Xt.rejection=ke||gt(Xt)?Ve:tt,nn.error))throw nn.value})},gt=function(Xt){return Xt.rejection!==tt&&!Xt.parent},Mt=function(Xt){Se(ge,Ce,function(){var $t=Xt.facade;ke?wt.emit("rejectionHandled",$t):Qe(mt,$t,Xt.value)})},Nt=function(Xt,$t,Ut){return function(sn){Xt($t,sn,Ut)}},Dt=function(Xt,$t,Ut){Xt.done||(Xt.done=!0,Ut&&(Xt=Ut),Xt.value=$t,Xt.state=xt,He(Xt,!0))},Ht=function(Xt,$t,Ut){if(!Xt.done){Xt.done=!0,Ut&&(Xt=Ut);try{if(Xt.facade===$t)throw St("Promise can't be resolved itself");var sn=Re($t);sn?Pe(function(){var nn={done:!1};try{Se(sn,$t,Nt(Ht,nn,Xt),Nt(Dt,nn,Xt))}catch(Wt){Dt(nn,Wt,Xt)}}):(Xt.value=$t,Xt.state=At,He(Xt,!1))}catch(nn){Dt({done:!1},nn,Xt)}}};if(Ue&&($e=function($t){le(this,rt),ee($t),Se(xe,this);var Ut=st(this);try{$t(Nt(Ht,Ut),Nt(Dt,Ut))}catch(sn){Dt(Ut,sn)}},rt=$e.prototype,xe=function($t){dt(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:yt,value:void 0})},xe.prototype=ve(rt,{then:function($t,Ut){var sn=st(this),nn=pt(ue(this,$e));return sn.parent=!0,nn.ok=ae($t)?$t:!0,nn.fail=ae(Ut)&&Ut,nn.domain=ke?wt.domain:void 0,sn.state==yt?sn.reactions.add(nn):Pe(function(){_e(nn,sn)}),nn.promise}}),Le=function(){var Xt=new xe,$t=st(Xt);this.promise=Xt,this.resolve=Nt(Ht,$t),this.reject=Nt(Dt,$t)},We.f=pt=function(Xt){return Xt===$e||Xt===Ze?new Le(Xt):ft(Xt)},!me&&ae(Ae)&&Ct!==Object.prototype)){nt=Ct.then,ot||Me(Ct,"then",function($t,Ut){var sn=this;return new $e(function(nn,Wt){Se(nt,sn,nn,Wt)}).then($t,Ut)},{unsafe:!0});try{delete Ct.constructor}catch(Xt){}we&&we(Ct,rt)}fe({global:!0,wrap:!0,forced:Ue},{Promise:$e}),de($e,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(oe,ze,De){oe("../modules/es.promise.constructor"),oe("../modules/es.promise.all"),oe("../modules/es.promise.catch"),oe("../modules/es.promise.race"),oe("../modules/es.promise.reject"),oe("../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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Me=oe("../internals/iterate"),ve=oe("../internals/promise-statics-incorrect-iteration");fe({target:"Promise",stat:!0,forced:ve},{race:function(de){var z=this,ee=Ce.f(z),ae=ee.reject,ie=Se(function(){var le=ke(z.resolve);Me(de,function(ue){me(le,z,ue).then(ee.resolve,ae)})});return ie.error&&ae(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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/new-promise-capability"),Ce=oe("../internals/promise-constructor-detection").CONSTRUCTOR;fe({target:"Promise",stat:!0,forced:Ce},{reject:function(Me){var ve=ke.f(this);return me(ve.reject,void 0,Me),ve.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/is-pure"),Ce=oe("../internals/promise-native-constructor"),Se=oe("../internals/promise-constructor-detection").CONSTRUCTOR,Me=oe("../internals/promise-resolve"),ve=me("Promise"),we=ke&&!Se;fe({target:"Promise",stat:!0,forced:ke||Se},{resolve:function(z){return Me(we&&this===ve?Ce: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(oe,ze,De){var fe=oe("../internals/descriptors"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-forced"),Se=oe("../internals/inherit-if-required"),Me=oe("../internals/create-non-enumerable-property"),ve=oe("../internals/object-get-own-property-names").f,we=oe("../internals/object-is-prototype-of"),de=oe("../internals/is-regexp"),z=oe("../internals/to-string"),ee=oe("../internals/regexp-get-flags"),ae=oe("../internals/regexp-sticky-helpers"),ie=oe("../internals/proxy-accessor"),le=oe("../internals/redefine"),ue=oe("../internals/fails"),ge=oe("../internals/has-own-property"),Pe=oe("../internals/internal-state").enforce,je=oe("../internals/set-species"),Be=oe("../internals/well-known-symbol"),Fe=oe("../internals/regexp-unsupported-dot-all"),Ne=oe("../internals/regexp-unsupported-ncg"),Ae=Be("match"),Ie=me.RegExp,We=Ie.prototype,Ye=me.SyntaxError,Ue=ke(We.exec),Ke=ke("".charAt),ot=ke("".replace),st=ke("".indexOf),dt=ke("".slice),Ct=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,$e=/a/g,rt=/a/g,St=new Ie($e)!==$e,Pt=ae.MISSED_STICKY,wt=ae.UNSUPPORTED_Y,pt=fe&&(!St||Pt||Fe||Ne||ue(function(){return rt[Ae]=!1,Ie($e)!=$e||Ie(rt)==rt||Ie($e,"i")!="/a/i"})),ft=function(At){for(var xt=At.length,tt=0,Ve="",xe=!1,Le;tt<=xt;tt++){if(Le=Ke(At,tt),Le==="\\"){Ve+=Le+Ke(At,++tt);continue}!xe&&Le==="."?Ve+="[\\s\\S]":(Le==="["?xe=!0:Le==="]"&&(xe=!1),Ve+=Le)}return Ve},ht=function(At){for(var xt=At.length,tt=0,Ve="",xe=[],Le={},Ze=!1,nt=!1,Re=0,_e="",He;tt<=xt;tt++){if(He=Ke(At,tt),He==="\\")He=He+Ke(At,++tt);else if(He==="]")Ze=!1;else if(!Ze)switch(!0){case He==="[":Ze=!0;break;case He==="(":Ue(Ct,dt(At,tt+1))&&(tt+=2,nt=!0),Ve+=He,Re++;continue;case(He===">"&&nt):if(_e===""||ge(Le,_e))throw new Ye("Invalid capture group name");Le[_e]=!0,xe[xe.length]=[_e,Re],nt=!1,_e="";continue}nt?_e+=He:Ve+=He}return[Ve,xe]};if(Ce("RegExp",pt)){for(var Et=function(xt,tt){var Ve=we(We,this),xe=de(xt),Le=tt===void 0,Ze=[],nt=xt,Re,_e,He,Qe,ut,gt;if(!Ve&&xe&&Le&&xt.constructor===Et)return xt;if((xe||we(We,xt))&&(xt=xt.source,Le&&(tt=ee(nt))),xt=xt===void 0?"":z(xt),tt=tt===void 0?"":z(tt),nt=xt,Fe&&"dotAll"in $e&&(_e=!!tt&&st(tt,"s")>-1,_e&&(tt=ot(tt,/s/g,""))),Re=tt,Pt&&"sticky"in $e&&(He=!!tt&&st(tt,"y")>-1,He&&wt&&(tt=ot(tt,/y/g,""))),Ne&&(Qe=ht(xt),xt=Qe[0],Ze=Qe[1]),ut=Se(Ie(xt,tt),Ve?this:We,Et),(_e||He||Ze.length)&&(gt=Pe(ut),_e&&(gt.dotAll=!0,gt.raw=Et(ft(xt),Re)),He&&(gt.sticky=!0),Ze.length&&(gt.groups=Ze)),xt!==nt)try{Me(ut,"source",nt===""?"(?:)":nt)}catch(Mt){}return ut},mt=ve(Ie),yt=0;mt.length>yt;)ie(Et,Ie,mt[yt++]);We.constructor=Et,Et.prototype=We,le(me,"RegExp",Et)}je("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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/regexp-exec");fe({target:"RegExp",proto:!0,forced:/./.exec!==me},{exec:me})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-name").PROPER,me=oe("../internals/redefine"),ke=oe("../internals/an-object"),Ce=oe("../internals/to-string"),Se=oe("../internals/fails"),Me=oe("../internals/regexp-get-flags"),ve="toString",we=RegExp.prototype,de=we[ve],z=Se(function(){return de.call({source:"a",flags:"b"})!="/a/b"}),ee=fe&&de.name!=ve;(z||ee)&&me(RegExp.prototype,ve,function(){var ie=ke(this),le=Ce(ie.source),ue=Ce(Me(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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/not-a-regexp"),Ce=oe("../internals/require-object-coercible"),Se=oe("../internals/to-string"),Me=oe("../internals/correct-is-regexp-logic"),ve=me("".indexOf);fe({target:"String",proto:!0,forced:!Me("includes")},{includes:function(de){return!!~ve(Se(Ce(this)),Se(ke(de)),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(oe,ze,De){"use strict";var fe=oe("../internals/string-multibyte").charAt,me=oe("../internals/to-string"),ke=oe("../internals/internal-state"),Ce=oe("../internals/define-iterator"),Se="String Iterator",Me=ke.set,ve=ke.getterFor(Se);Ce(String,"String",function(we){Me(this,{type:Se,string:me(we),index:0})},function(){var de=ve(this),z=de.string,ee=de.index,ae;return ee>=z.length?{value:void 0,done:!0}:(ae=fe(z,ee),de.index+=ae.length,{value:ae,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(oe,ze,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/fix-regexp-well-known-symbol-logic"),ke=oe("../internals/an-object"),Ce=oe("../internals/to-length"),Se=oe("../internals/to-string"),Me=oe("../internals/require-object-coercible"),ve=oe("../internals/get-method"),we=oe("../internals/advance-string-index"),de=oe("../internals/regexp-exec-abstract");me("match",function(z,ee,ae){return[function(le){var ue=Me(this),ge=le==null?void 0:ve(le,z);return ge?fe(ge,le,ue):new RegExp(le)[z](Se(ue))},function(ie){var le=ke(this),ue=Se(ie),ge=ae(ee,le,ue);if(ge.done)return ge.value;if(!le.global)return de(le,ue);var Pe=le.unicode;le.lastIndex=0;for(var je=[],Be=0,Fe;(Fe=de(le,ue))!==null;){var Ne=Se(Fe[0]);je[Be]=Ne,Ne===""&&(le.lastIndex=we(ue,Ce(le.lastIndex),Pe)),Be++}return Be===0?null:je}]})},{"../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(oe,ze,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/function-call"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/fails"),Me=oe("../internals/an-object"),ve=oe("../internals/is-callable"),we=oe("../internals/to-integer-or-infinity"),de=oe("../internals/to-length"),z=oe("../internals/to-string"),ee=oe("../internals/require-object-coercible"),ae=oe("../internals/advance-string-index"),ie=oe("../internals/get-method"),le=oe("../internals/get-substitution"),ue=oe("../internals/regexp-exec-abstract"),ge=oe("../internals/well-known-symbol"),Pe=ge("replace"),je=Math.max,Be=Math.min,Fe=ke([].concat),Ne=ke([].push),Ae=ke("".indexOf),Ie=ke("".slice),We=function(ot){return ot===void 0?ot:String(ot)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),Ue=function(){return/./[Pe]?/./[Pe]("a","$0")==="":!1}(),Ke=!Se(function(){var ot=/./;return ot.exec=function(){var st=[];return st.groups={a:"7"},st},"".replace(ot,"$<a>")!=="7"});Ce("replace",function(ot,st,dt){var Ct=Ue?"$":"$0";return[function(rt,St){var Pt=ee(this),wt=rt==null?void 0:ie(rt,Pe);return wt?me(wt,rt,Pt,St):me(st,z(Pt),rt,St)},function($e,rt){var St=Me(this),Pt=z($e);if(typeof rt=="string"&&Ae(rt,Ct)===-1&&Ae(rt,"$<")===-1){var wt=dt(st,St,Pt,rt);if(wt.done)return wt.value}var pt=ve(rt);pt||(rt=z(rt));var ft=St.global;if(ft){var ht=St.unicode;St.lastIndex=0}for(var Et=[];;){var mt=ue(St,Pt);if(mt===null||(Ne(Et,mt),!ft))break;var yt=z(mt[0]);yt===""&&(St.lastIndex=ae(Pt,de(St.lastIndex),ht))}for(var At="",xt=0,tt=0;tt<Et.length;tt++){mt=Et[tt];for(var Ve=z(mt[0]),xe=je(Be(we(mt.index),Pt.length),0),Le=[],Ze=1;Ze<mt.length;Ze++)Ne(Le,We(mt[Ze]));var nt=mt.groups;if(pt){var Re=Fe([Ve],Le,xe,Pt);nt!==void 0&&Ne(Re,nt);var _e=z(fe(rt,void 0,Re))}else _e=le(Ve,Pt,xe,Le,nt,rt);xe>=xt&&(At+=Ie(Pt,xt,xe)+_e,xt=xe+Ve.length)}return At+Ie(Pt,xt)}]},!Ke||!Ye||Ue)},{"../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(oe,ze,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/fix-regexp-well-known-symbol-logic"),ke=oe("../internals/an-object"),Ce=oe("../internals/require-object-coercible"),Se=oe("../internals/same-value"),Me=oe("../internals/to-string"),ve=oe("../internals/get-method"),we=oe("../internals/regexp-exec-abstract");me("search",function(de,z,ee){return[function(ie){var le=Ce(this),ue=ie==null?void 0:ve(ie,de);return ue?fe(ue,ie,le):new RegExp(ie)[de](Me(le))},function(ae){var ie=ke(this),le=Me(ae),ue=ee(z,ie,le);if(ue.done)return ue.value;var ge=ie.lastIndex;Se(ge,0)||(ie.lastIndex=0);var Pe=we(ie,le);return Se(ie.lastIndex,ge)||(ie.lastIndex=ge),Pe===null?-1:Pe.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(oe,ze,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/function-call"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/is-regexp"),Me=oe("../internals/an-object"),ve=oe("../internals/require-object-coercible"),we=oe("../internals/species-constructor"),de=oe("../internals/advance-string-index"),z=oe("../internals/to-length"),ee=oe("../internals/to-string"),ae=oe("../internals/get-method"),ie=oe("../internals/array-slice-simple"),le=oe("../internals/regexp-exec-abstract"),ue=oe("../internals/regexp-exec"),ge=oe("../internals/regexp-sticky-helpers"),Pe=oe("../internals/fails"),je=ge.UNSUPPORTED_Y,Be=4294967295,Fe=Math.min,Ne=[].push,Ae=ke(/./.exec),Ie=ke(Ne),We=ke("".slice),Ye=!Pe(function(){var Ue=/(?:)/,Ke=Ue.exec;Ue.exec=function(){return Ke.apply(this,arguments)};var ot="ab".split(Ue);return ot.length!==2||ot[0]!=="a"||ot[1]!=="b"});Ce("split",function(Ue,Ke,ot){var st;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?st=function(dt,Ct){var $e=ee(ve(this)),rt=Ct===void 0?Be:Ct>>>0;if(rt===0)return[];if(dt===void 0)return[$e];if(!Se(dt))return me(Ke,$e,dt,rt);for(var St=[],Pt=(dt.ignoreCase?"i":"")+(dt.multiline?"m":"")+(dt.unicode?"u":"")+(dt.sticky?"y":""),wt=0,pt=new RegExp(dt.source,Pt+"g"),ft,ht,Et;(ft=me(ue,pt,$e))&&(ht=pt.lastIndex,!(ht>wt&&(Ie(St,We($e,wt,ft.index)),ft.length>1&&ft.index<$e.length&&fe(Ne,St,ie(ft,1)),Et=ft[0].length,wt=ht,St.length>=rt)));)pt.lastIndex===ft.index&&pt.lastIndex++;return wt===$e.length?(Et||!Ae(pt,""))&&Ie(St,""):Ie(St,We($e,wt)),St.length>rt?ie(St,0,rt):St}:"0".split(void 0,0).length?st=function(dt,Ct){return dt===void 0&&Ct===0?[]:me(Ke,this,dt,Ct)}:st=Ke,[function(Ct,$e){var rt=ve(this),St=Ct==null?void 0:ae(Ct,Ue);return St?me(St,Ct,rt,$e):me(st,ee(rt),Ct,$e)},function(dt,Ct){var $e=Me(this),rt=ee(dt),St=ot(st,$e,rt,Ct,st!==Ke);if(St.done)return St.value;var Pt=we($e,RegExp),wt=$e.unicode,pt=($e.ignoreCase?"i":"")+($e.multiline?"m":"")+($e.unicode?"u":"")+(je?"g":"y"),ft=new Pt(je?"^(?:"+$e.source+")":$e,pt),ht=Ct===void 0?Be:Ct>>>0;if(ht===0)return[];if(rt.length===0)return le(ft,rt)===null?[rt]:[];for(var Et=0,mt=0,yt=[];mt<rt.length;){ft.lastIndex=je?0:mt;var At=le(ft,je?We(rt,mt):rt),xt;if(At===null||(xt=Fe(z(ft.lastIndex+(je?mt:0)),rt.length))===Et)mt=de(rt,mt,wt);else{if(Ie(yt,We(rt,Et,mt)),yt.length===ht)return yt;for(var tt=1;tt<=At.length-1;tt++)if(Ie(yt,At[tt]),yt.length===ht)return yt;mt=Et=xt}}return Ie(yt,We(rt,Et)),yt}]},!Ye,je)},{"../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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/string-trim").trim,ke=oe("../internals/string-trim-forced");fe({target:"String",proto:!0,forced:ke("trim")},{trim:function(){return me(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/function-call"),Ce=oe("../internals/function-uncurry-this"),Se=oe("../internals/is-pure"),Me=oe("../internals/descriptors"),ve=oe("../internals/native-symbol"),we=oe("../internals/fails"),de=oe("../internals/has-own-property"),z=oe("../internals/object-is-prototype-of"),ee=oe("../internals/an-object"),ae=oe("../internals/to-indexed-object"),ie=oe("../internals/to-property-key"),le=oe("../internals/to-string"),ue=oe("../internals/create-property-descriptor"),ge=oe("../internals/object-create"),Pe=oe("../internals/object-keys"),je=oe("../internals/object-get-own-property-names"),Be=oe("../internals/object-get-own-property-names-external"),Fe=oe("../internals/object-get-own-property-symbols"),Ne=oe("../internals/object-get-own-property-descriptor"),Ae=oe("../internals/object-define-property"),Ie=oe("../internals/object-define-properties"),We=oe("../internals/object-property-is-enumerable"),Ye=oe("../internals/redefine"),Ue=oe("../internals/shared"),Ke=oe("../internals/shared-key"),ot=oe("../internals/hidden-keys"),st=oe("../internals/uid"),dt=oe("../internals/well-known-symbol"),Ct=oe("../internals/well-known-symbol-wrapped"),$e=oe("../internals/define-well-known-symbol"),rt=oe("../internals/symbol-define-to-primitive"),St=oe("../internals/set-to-string-tag"),Pt=oe("../internals/internal-state"),wt=oe("../internals/array-iteration").forEach,pt=Ke("hidden"),ft="Symbol",ht="prototype",Et=Pt.set,mt=Pt.getterFor(ft),yt=Object[ht],At=me.Symbol,xt=At&&At[ht],tt=me.TypeError,Ve=me.QObject,xe=Ne.f,Le=Ae.f,Ze=Be.f,nt=We.f,Re=Ce([].push),_e=Ue("symbols"),He=Ue("op-symbols"),Qe=Ue("wks"),ut=!Ve||!Ve[ht]||!Ve[ht].findChild,gt=Me&&we(function(){return ge(Le({},"a",{get:function(){return Le(this,"a",{value:7}).a}})).a!=7})?function(nn,Wt,bn){var mn=xe(yt,Wt);mn&&delete yt[Wt],Le(nn,Wt,bn),mn&&nn!==yt&&Le(yt,Wt,mn)}:Le,Mt=function(nn,Wt){var bn=_e[nn]=ge(xt);return Et(bn,{type:ft,tag:nn,description:Wt}),Me||(bn.description=Wt),bn},Nt=function(Wt,bn,mn){Wt===yt&&Nt(He,bn,mn),ee(Wt);var jn=ie(bn);return ee(mn),de(_e,jn)?(mn.enumerable?(de(Wt,pt)&&Wt[pt][jn]&&(Wt[pt][jn]=!1),mn=ge(mn,{enumerable:ue(0,!1)})):(de(Wt,pt)||Le(Wt,pt,ue(1,{})),Wt[pt][jn]=!0),gt(Wt,jn,mn)):Le(Wt,jn,mn)},Dt=function(Wt,bn){ee(Wt);var mn=ae(bn),jn=Pe(mn).concat(sn(mn));return wt(jn,function(Jn){(!Me||ke(Xt,mn,Jn))&&Nt(Wt,Jn,mn[Jn])}),Wt},Ht=function(Wt,bn){return bn===void 0?ge(Wt):Dt(ge(Wt),bn)},Xt=function(Wt){var bn=ie(Wt),mn=ke(nt,this,bn);return this===yt&&de(_e,bn)&&!de(He,bn)?!1:mn||!de(this,bn)||!de(_e,bn)||de(this,pt)&&this[pt][bn]?mn:!0},$t=function(Wt,bn){var mn=ae(Wt),jn=ie(bn);if(!(mn===yt&&de(_e,jn)&&!de(He,jn))){var Jn=xe(mn,jn);return Jn&&de(_e,jn)&&!(de(mn,pt)&&mn[pt][jn])&&(Jn.enumerable=!0),Jn}},Ut=function(Wt){var bn=Ze(ae(Wt)),mn=[];return wt(bn,function(jn){!de(_e,jn)&&!de(ot,jn)&&Re(mn,jn)}),mn},sn=function(nn){var Wt=nn===yt,bn=Ze(Wt?He:ae(nn)),mn=[];return wt(bn,function(jn){de(_e,jn)&&(!Wt||de(yt,jn))&&Re(mn,_e[jn])}),mn};ve||(At=function(){if(z(xt,this))throw tt("Symbol is not a constructor");var Wt=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),bn=st(Wt),mn=function(jn){this===yt&&ke(mn,He,jn),de(this,pt)&&de(this[pt],bn)&&(this[pt][bn]=!1),gt(this,bn,ue(1,jn))};return Me&&ut&&gt(yt,bn,{configurable:!0,set:mn}),Mt(bn,Wt)},xt=At[ht],Ye(xt,"toString",function(){return mt(this).tag}),Ye(At,"withoutSetter",function(nn){return Mt(st(nn),nn)}),We.f=Xt,Ae.f=Nt,Ie.f=Dt,Ne.f=$t,je.f=Be.f=Ut,Fe.f=sn,Ct.f=function(nn){return Mt(dt(nn),nn)},Me&&(Le(xt,"description",{configurable:!0,get:function(){return mt(this).description}}),Se||Ye(yt,"propertyIsEnumerable",Xt,{unsafe:!0}))),fe({global:!0,wrap:!0,forced:!ve,sham:!ve},{Symbol:At}),wt(Pe(Qe),function(nn){$e(nn)}),fe({target:ft,stat:!0,forced:!ve},{useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),fe({target:"Object",stat:!0,forced:!ve,sham:!Me},{create:Ht,defineProperty:Nt,defineProperties:Dt,getOwnPropertyDescriptor:$t}),fe({target:"Object",stat:!0,forced:!ve},{getOwnPropertyNames:Ut}),rt(),St(At,ft),ot[pt]=!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(oe,ze,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/descriptors"),ke=oe("../internals/global"),Ce=oe("../internals/function-uncurry-this"),Se=oe("../internals/has-own-property"),Me=oe("../internals/is-callable"),ve=oe("../internals/object-is-prototype-of"),we=oe("../internals/to-string"),de=oe("../internals/object-define-property").f,z=oe("../internals/copy-constructor-properties"),ee=ke.Symbol,ae=ee&&ee.prototype;if(me&&Me(ee)&&(!("description"in ae)||ee().description!==void 0)){var ie={},le=function(){var Ae=arguments.length<1||arguments[0]===void 0?void 0:we(arguments[0]),Ie=ve(ae,this)?new ee(Ae):Ae===void 0?ee():ee(Ae);return Ae===""&&(ie[Ie]=!0),Ie};z(le,ee),le.prototype=ae,ae.constructor=le;var ue=String(ee("test"))=="Symbol(test)",ge=Ce(ae.toString),Pe=Ce(ae.valueOf),je=/^Symbol\((.*)\)[^)]+$/,Be=Ce("".replace),Fe=Ce("".slice);de(ae,"description",{configurable:!0,get:function(){var Ae=Pe(this),Ie=ge(Ae);if(Se(ie,Ae))return"";var We=ue?Fe(Ie,7,-1):Be(Ie,je,"$1");return We===""?void 0:We}}),fe({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(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/to-string"),Se=oe("../internals/shared"),Me=oe("../internals/native-symbol-registry"),ve=Se("string-to-symbol-registry"),we=Se("symbol-to-string-registry");fe({target:"Symbol",stat:!0,forced:!Me},{for:function(de){var z=Ce(de);if(ke(ve,z))return ve[z];var ee=me("Symbol")(z);return ve[z]=ee,we[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(oe,ze,De){var fe=oe("../internals/define-well-known-symbol");fe("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(oe,ze,De){oe("../modules/es.symbol.constructor"),oe("../modules/es.symbol.for"),oe("../modules/es.symbol.key-for"),oe("../modules/es.json.stringify"),oe("../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(oe,ze,De){var fe=oe("../internals/export"),me=oe("../internals/has-own-property"),ke=oe("../internals/is-symbol"),Ce=oe("../internals/try-to-string"),Se=oe("../internals/shared"),Me=oe("../internals/native-symbol-registry"),ve=Se("symbol-to-string-registry");fe({target:"Symbol",stat:!0,forced:!Me},{keyFor:function(de){if(!ke(de))throw TypeError(Ce(de)+" is not a symbol");if(me(ve,de))return ve[de]}})},{"../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(oe,ze,De){"use strict";var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/array-buffer-view-core"),ke=oe("../internals/array-copy-within"),Ce=fe(ke),Se=me.aTypedArray,Me=me.exportTypedArrayMethod;Me("copyWithin",function(we,de){return Ce(Se(this),we,de,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(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").every,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("every",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-call"),ke=oe("../internals/array-fill"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("fill",function(ve){var we=arguments.length;return me(ke,Ce(this),ve,we>1?arguments[1]:void 0,we>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").filter,ke=oe("../internals/typed-array-from-species-and-list"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("filter",function(ve){var we=me(Ce(this),ve,arguments.length>1?arguments[1]:void 0);return ke(this,we)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").findIndex,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("findIndex",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").find,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("find",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").forEach,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("forEach",function(Me){me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-includes").includes,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("includes",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-includes").indexOf,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("indexOf",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/fails"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/array-buffer-view-core"),Se=oe("../modules/es.array.iterator"),Me=oe("../internals/well-known-symbol"),ve=Me("iterator"),we=fe.Uint8Array,de=ke(Se.values),z=ke(Se.keys),ee=ke(Se.entries),ae=Ce.aTypedArray,ie=Ce.exportTypedArrayMethod,le=we&&we.prototype,ue=!me(function(){le[ve].call([1])}),ge=!!le&&le.values&&le[ve]===le.values&&le.values.name==="values",Pe=function(){return de(ae(this))};ie("entries",function(){return ee(ae(this))},ue),ie("keys",function(){return z(ae(this))},ue),ie("values",Pe,ue||!ge,{name:"values"}),ie(ve,Pe,ue||!ge,{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(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-uncurry-this"),ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod,Se=me([].join);Ce("join",function(ve){return Se(ke(this),ve)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-apply"),ke=oe("../internals/array-last-index-of"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("lastIndexOf",function(ve){var we=arguments.length;return me(ke,Ce(this),we>1?[ve,arguments[1]]:[ve])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").map,ke=oe("../internals/typed-array-species-constructor"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("map",function(ve){return me(Ce(this),ve,arguments.length>1?arguments[1]:void 0,function(we,de){return new(ke(we))(de)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-reduce").right,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("reduceRight",function(Me){var ve=arguments.length;return me(ke(this),Me,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-reduce").left,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("reduce",function(Me){var ve=arguments.length;return me(ke(this),Me,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=fe.aTypedArray,ke=fe.exportTypedArrayMethod,Ce=Math.floor;ke("reverse",function(){for(var Me=this,ve=me(Me).length,we=Ce(ve/2),de=0,z;de<we;)z=Me[de],Me[de++]=Me[--ve],Me[ve]=z;return Me})},{"../internals/array-buffer-view-core":103}],331:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/array-buffer-view-core"),Ce=oe("../internals/length-of-array-like"),Se=oe("../internals/to-offset"),Me=oe("../internals/to-object"),ve=oe("../internals/fails"),we=fe.RangeError,de=fe.Int8Array,z=de&&de.prototype,ee=z&&z.set,ae=ke.aTypedArray,ie=ke.exportTypedArrayMethod,le=!ve(function(){var ge=new Uint8ClampedArray(2);return me(ee,ge,{length:1,0:3},1),ge[1]!==3}),ue=le&&ke.NATIVE_ARRAY_BUFFER_VIEWS&&ve(function(){var ge=new de(2);return ge.set(1),ge.set("2",1),ge[0]!==0||ge[1]!==2});ie("set",function(Pe){ae(this);var je=Se(arguments.length>1?arguments[1]:void 0,1),Be=Me(Pe);if(le)return me(ee,this,Be,je);var Fe=this.length,Ne=Ce(Be),Ae=0;if(Ne+je>Fe)throw we("Wrong length");for(;Ae<Ne;)this[je+Ae]=Be[Ae++]},!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(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/typed-array-species-constructor"),ke=oe("../internals/fails"),Ce=oe("../internals/array-slice"),Se=fe.aTypedArray,Me=fe.exportTypedArrayMethod,ve=ke(function(){new Int8Array(1).slice()});Me("slice",function(de,z){for(var ee=Ce(Se(this),de,z),ae=me(this),ie=0,le=ee.length,ue=new ae(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(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").some,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("some",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/a-callable"),Se=oe("../internals/array-sort"),Me=oe("../internals/array-buffer-view-core"),ve=oe("../internals/engine-ff-version"),we=oe("../internals/engine-is-ie-or-edge"),de=oe("../internals/engine-v8-version"),z=oe("../internals/engine-webkit-version"),ee=Me.aTypedArray,ae=Me.exportTypedArrayMethod,ie=fe.Uint16Array,le=ie&&me(ie.prototype.sort),ue=!!le&&!(ke(function(){le(new ie(2),null)})&&ke(function(){le(new ie(2),{})})),ge=!!le&&!ke(function(){if(de)return de<74;if(ve)return ve<67;if(we)return!0;if(z)return z<602;var je=new ie(516),Be=Array(516),Fe,Ne;for(Fe=0;Fe<516;Fe++)Ne=Fe%4,je[Fe]=515-Fe,Be[Fe]=Fe-2*Ne+3;for(le(je,function(Ae,Ie){return(Ae/4|0)-(Ie/4|0)}),Fe=0;Fe<516;Fe++)if(je[Fe]!==Be[Fe])return!0}),Pe=function(je){return function(Be,Fe){return je!==void 0?+je(Be,Fe)||0:Fe!==Fe?-1:Be!==Be?1:Be===0&&Fe===0?1/Be>0&&1/Fe<0?1:-1:Be>Fe}};ae("sort",function(Be){return Be!==void 0&&Ce(Be),ge?le(this,Be):Se(ee(this),Pe(Be))},!ge||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(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/to-length"),ke=oe("../internals/to-absolute-index"),Ce=oe("../internals/typed-array-species-constructor"),Se=fe.aTypedArray,Me=fe.exportTypedArrayMethod;Me("subarray",function(we,de){var z=Se(this),ee=z.length,ae=ke(we,ee),ie=Ce(z);return new ie(z.buffer,z.byteOffset+ae*z.BYTES_PER_ELEMENT,me((de===void 0?ee:ke(de,ee))-ae))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(oe,ze,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-apply"),ke=oe("../internals/array-buffer-view-core"),Ce=oe("../internals/fails"),Se=oe("../internals/array-slice"),Me=fe.Int8Array,ve=ke.aTypedArray,we=ke.exportTypedArrayMethod,de=[].toLocaleString,z=!!Me&&Ce(function(){de.call(new Me(1))}),ee=Ce(function(){return[1,2].toLocaleString()!=new Me([1,2]).toLocaleString()})||!Ce(function(){Me.prototype.toLocaleString.call([1,2])});we("toLocaleString",function(){return me(de,z?Se(ve(this)):ve(this),Se(arguments))},ee)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(oe,ze,De){"use strict";var fe=oe("../internals/array-buffer-view-core").exportTypedArrayMethod,me=oe("../internals/fails"),ke=oe("../internals/global"),Ce=oe("../internals/function-uncurry-this"),Se=ke.Uint8Array,Me=Se&&Se.prototype||{},ve=[].toString,we=Ce([].join);me(function(){ve.call({})})&&(ve=function(){return we(this)});var de=Me.toString!=ve;fe("toString",ve,de)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(oe,ze,De){var fe=oe("../internals/typed-array-constructor");fe("Uint8",function(me){return function(Ce,Se,Me){return me(this,Ce,Se,Me)}})},{"../internals/typed-array-constructor":258}],339:[function(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/dom-iterables"),ke=oe("../internals/dom-token-list-prototype"),Ce=oe("../internals/array-for-each"),Se=oe("../internals/create-non-enumerable-property"),Me=function(we){if(we&&we.forEach!==Ce)try{Se(we,"forEach",Ce)}catch(de){we.forEach=Ce}};for(var ve in me)me[ve]&&Me(fe[ve]&&fe[ve].prototype);Me(ke)},{"../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(oe,ze,De){var fe=oe("../internals/global"),me=oe("../internals/dom-iterables"),ke=oe("../internals/dom-token-list-prototype"),Ce=oe("../modules/es.array.iterator"),Se=oe("../internals/create-non-enumerable-property"),Me=oe("../internals/well-known-symbol"),ve=Me("iterator"),we=Me("toStringTag"),de=Ce.values,z=function(ae,ie){if(ae){if(ae[ve]!==de)try{Se(ae,ve,de)}catch(ue){ae[ve]=de}if(ae[we]||Se(ae,we,ie),me[ie]){for(var le in Ce)if(ae[le]!==Ce[le])try{Se(ae,le,Ce[le])}catch(ue){ae[le]=Ce[le]}}}};for(var ee in me)z(fe[ee]&&fe[ee].prototype,ee);z(ke,"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(oe,ze,De){function fe(ge){return Array.isArray?Array.isArray(ge):ue(ge)==="[object Array]"}De.isArray=fe;function me(ge){return typeof ge=="boolean"}De.isBoolean=me;function ke(ge){return ge===null}De.isNull=ke;function Ce(ge){return ge==null}De.isNullOrUndefined=Ce;function Se(ge){return typeof ge=="number"}De.isNumber=Se;function Me(ge){return typeof ge=="string"}De.isString=Me;function ve(ge){return typeof ge=="symbol"}De.isSymbol=ve;function we(ge){return ge===void 0}De.isUndefined=we;function de(ge){return ue(ge)==="[object RegExp]"}De.isRegExp=de;function z(ge){return typeof ge=="object"&&ge!==null}De.isObject=z;function ee(ge){return ue(ge)==="[object Date]"}De.isDate=ee;function ae(ge){return ue(ge)==="[object Error]"||ge instanceof Error}De.isError=ae;function ie(ge){return typeof ge=="function"}De.isFunction=ie;function le(ge){return ge===null||typeof ge=="boolean"||typeof ge=="number"||typeof ge=="string"||typeof ge=="symbol"||typeof ge=="undefined"}De.isPrimitive=le,De.isBuffer=oe("buffer").Buffer.isBuffer;function ue(ge){return Object.prototype.toString.call(ge)}},{buffer:90}],342:[function(oe,ze,De){(function(fe){"use strict";var me=function(){var ve=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,we=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,de=/[^-+\dA-Z]/g;return function(z,ee,ae,ie){if(arguments.length===1&&Me(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(me.masks[ee]||ee||me.masks.default);var le=ee.slice(0,4);(le==="UTC:"||le==="GMT:")&&(ee=ee.slice(4),ae=!0,le==="GMT:"&&(ie=!0));var ue=ae?"getUTC":"get",ge=z[ue+"Date"](),Pe=z[ue+"Day"](),je=z[ue+"Month"](),Be=z[ue+"FullYear"](),Fe=z[ue+"Hours"](),Ne=z[ue+"Minutes"](),Ae=z[ue+"Seconds"](),Ie=z[ue+"Milliseconds"](),We=ae?0:z.getTimezoneOffset(),Ye=Ce(z),Ue=Se(z),Ke={d:ge,dd:ke(ge),ddd:me.i18n.dayNames[Pe],dddd:me.i18n.dayNames[Pe+7],m:je+1,mm:ke(je+1),mmm:me.i18n.monthNames[je],mmmm:me.i18n.monthNames[je+12],yy:String(Be).slice(2),yyyy:Be,h:Fe%12||12,hh:ke(Fe%12||12),H:Fe,HH:ke(Fe),M:Ne,MM:ke(Ne),s:Ae,ss:ke(Ae),l:ke(Ie,3),L:ke(Math.round(Ie/10)),t:Fe<12?"a":"p",tt:Fe<12?"am":"pm",T:Fe<12?"A":"P",TT:Fe<12?"AM":"PM",Z:ie?"GMT":ae?"UTC":(String(z).match(we)||[""]).pop().replace(de,""),o:(We>0?"-":"+")+ke(Math.floor(Math.abs(We)/60)*100+Math.abs(We)%60,4),S:["th","st","nd","rd"][ge%10>3?0:(ge%100-ge%10!=10)*ge%10],W:Ye,N:Ue};return ee.replace(ve,function(ot){return ot in Ke?Ke[ot]:ot.slice(1,ot.length-1)})}}();me.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"},me.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 ke(ve,we){for(ve=String(ve),we=we||2;ve.length<we;)ve="0"+ve;return ve}function Ce(ve){var we=new Date(ve.getFullYear(),ve.getMonth(),ve.getDate());we.setDate(we.getDate()-(we.getDay()+6)%7+3);var de=new Date(we.getFullYear(),0,4);de.setDate(de.getDate()-(de.getDay()+6)%7+3);var z=we.getTimezoneOffset()-de.getTimezoneOffset();we.setHours(we.getHours()-z);var ee=(we-de)/(864e5*7);return 1+Math.floor(ee)}function Se(ve){var we=ve.getDay();return we===0&&(we=7),we}function Me(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 me}):typeof De=="object"?ze.exports=me:fe.dateFormat=me})(this)},{}],343:[function(oe,ze,De){"use strict";var fe=/["'&<>]/;ze.exports=me;function me(ke){var Ce=""+ke,Se=fe.exec(Ce);if(!Se)return Ce;var Me,ve="",we=0,de=0;for(we=Se.index;we<Ce.length;we++){switch(Ce.charCodeAt(we)){case 34:Me="&quot;";break;case 38:Me="&amp;";break;case 39:Me="&#39;";break;case 60:Me="&lt;";break;case 62:Me="&gt;";break;default:continue}de!==we&&(ve+=Ce.substring(de,we)),de=we+1,ve+=Me}return de!==we?ve+Ce.substring(de,we):ve}},{}],344:[function(oe,ze,De){"use strict";var fe=typeof Reflect=="object"?Reflect:null,me=fe&&typeof fe.apply=="function"?fe.apply:function(Ae,Ie,We){return Function.prototype.apply.call(Ae,Ie,We)},ke;fe&&typeof fe.ownKeys=="function"?ke=fe.ownKeys:Object.getOwnPropertySymbols?ke=function(Ae){return Object.getOwnPropertyNames(Ae).concat(Object.getOwnPropertySymbols(Ae))}:ke=function(Ae){return Object.getOwnPropertyNames(Ae)};function Ce(Ne){console&&console.warn&&console.warn(Ne)}var Se=Number.isNaN||function(Ae){return Ae!==Ae};function Me(){Me.init.call(this)}ze.exports=Me,ze.exports.once=je,Me.EventEmitter=Me,Me.prototype._events=void 0,Me.prototype._eventsCount=0,Me.prototype._maxListeners=void 0;var ve=10;function we(Ne){if(typeof Ne!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Ne)}Object.defineProperty(Me,"defaultMaxListeners",{enumerable:!0,get:function(){return ve},set:function(Ne){if(typeof Ne!="number"||Ne<0||Se(Ne))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Ne+".");ve=Ne}}),Me.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},Me.prototype.setMaxListeners=function(Ae){if(typeof Ae!="number"||Ae<0||Se(Ae))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Ae+".");return this._maxListeners=Ae,this};function de(Ne){return Ne._maxListeners===void 0?Me.defaultMaxListeners:Ne._maxListeners}Me.prototype.getMaxListeners=function(){return de(this)},Me.prototype.emit=function(Ae){for(var Ie=[],We=1;We<arguments.length;We++)Ie.push(arguments[We]);var Ye=Ae==="error",Ue=this._events;if(Ue!==void 0)Ye=Ye&&Ue.error===void 0;else if(!Ye)return!1;if(Ye){var Ke;if(Ie.length>0&&(Ke=Ie[0]),Ke instanceof Error)throw Ke;var ot=new Error("Unhandled error."+(Ke?" ("+Ke.message+")":""));throw ot.context=Ke,ot}var st=Ue[Ae];if(st===void 0)return!1;if(typeof st=="function")me(st,this,Ie);else for(var dt=st.length,Ct=ue(st,dt),We=0;We<dt;++We)me(Ct[We],this,Ie);return!0};function z(Ne,Ae,Ie,We){var Ye,Ue,Ke;if(we(Ie),Ue=Ne._events,Ue===void 0?(Ue=Ne._events=Object.create(null),Ne._eventsCount=0):(Ue.newListener!==void 0&&(Ne.emit("newListener",Ae,Ie.listener?Ie.listener:Ie),Ue=Ne._events),Ke=Ue[Ae]),Ke===void 0)Ke=Ue[Ae]=Ie,++Ne._eventsCount;else if(typeof Ke=="function"?Ke=Ue[Ae]=We?[Ie,Ke]:[Ke,Ie]:We?Ke.unshift(Ie):Ke.push(Ie),Ye=de(Ne),Ye>0&&Ke.length>Ye&&!Ke.warned){Ke.warned=!0;var ot=new Error("Possible EventEmitter memory leak detected. "+Ke.length+" "+String(Ae)+" listeners added. Use emitter.setMaxListeners() to increase limit");ot.name="MaxListenersExceededWarning",ot.emitter=Ne,ot.type=Ae,ot.count=Ke.length,Ce(ot)}return Ne}Me.prototype.addListener=function(Ae,Ie){return z(this,Ae,Ie,!1)},Me.prototype.on=Me.prototype.addListener,Me.prototype.prependListener=function(Ae,Ie){return z(this,Ae,Ie,!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 ae(Ne,Ae,Ie){var We={fired:!1,wrapFn:void 0,target:Ne,type:Ae,listener:Ie},Ye=ee.bind(We);return Ye.listener=Ie,We.wrapFn=Ye,Ye}Me.prototype.once=function(Ae,Ie){return we(Ie),this.on(Ae,ae(this,Ae,Ie)),this},Me.prototype.prependOnceListener=function(Ae,Ie){return we(Ie),this.prependListener(Ae,ae(this,Ae,Ie)),this},Me.prototype.removeListener=function(Ae,Ie){var We,Ye,Ue,Ke,ot;if(we(Ie),Ye=this._events,Ye===void 0)return this;if(We=Ye[Ae],We===void 0)return this;if(We===Ie||We.listener===Ie)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Ae],Ye.removeListener&&this.emit("removeListener",Ae,We.listener||Ie));else if(typeof We!="function"){for(Ue=-1,Ke=We.length-1;Ke>=0;Ke--)if(We[Ke]===Ie||We[Ke].listener===Ie){ot=We[Ke].listener,Ue=Ke;break}if(Ue<0)return this;Ue===0?We.shift():ge(We,Ue),We.length===1&&(Ye[Ae]=We[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Ae,ot||Ie)}return this},Me.prototype.off=Me.prototype.removeListener,Me.prototype.removeAllListeners=function(Ae){var Ie,We,Ye;if(We=this._events,We===void 0)return this;if(We.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):We[Ae]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete We[Ae]),this;if(arguments.length===0){var Ue=Object.keys(We),Ke;for(Ye=0;Ye<Ue.length;++Ye)Ke=Ue[Ye],Ke!=="removeListener"&&this.removeAllListeners(Ke);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Ie=We[Ae],typeof Ie=="function")this.removeListener(Ae,Ie);else if(Ie!==void 0)for(Ye=Ie.length-1;Ye>=0;Ye--)this.removeListener(Ae,Ie[Ye]);return this};function ie(Ne,Ae,Ie){var We=Ne._events;if(We===void 0)return[];var Ye=We[Ae];return Ye===void 0?[]:typeof Ye=="function"?Ie?[Ye.listener||Ye]:[Ye]:Ie?Pe(Ye):ue(Ye,Ye.length)}Me.prototype.listeners=function(Ae){return ie(this,Ae,!0)},Me.prototype.rawListeners=function(Ae){return ie(this,Ae,!1)},Me.listenerCount=function(Ne,Ae){return typeof Ne.listenerCount=="function"?Ne.listenerCount(Ae):le.call(Ne,Ae)},Me.prototype.listenerCount=le;function le(Ne){var Ae=this._events;if(Ae!==void 0){var Ie=Ae[Ne];if(typeof Ie=="function")return 1;if(Ie!==void 0)return Ie.length}return 0}Me.prototype.eventNames=function(){return this._eventsCount>0?ke(this._events):[]};function ue(Ne,Ae){for(var Ie=new Array(Ae),We=0;We<Ae;++We)Ie[We]=Ne[We];return Ie}function ge(Ne,Ae){for(;Ae+1<Ne.length;Ae++)Ne[Ae]=Ne[Ae+1];Ne.pop()}function Pe(Ne){for(var Ae=new Array(Ne.length),Ie=0;Ie<Ae.length;++Ie)Ae[Ie]=Ne[Ie].listener||Ne[Ie];return Ae}function je(Ne,Ae){return new Promise(function(Ie,We){function Ye(Ke){Ne.removeListener(Ae,Ue),We(Ke)}function Ue(){typeof Ne.removeListener=="function"&&Ne.removeListener("error",Ye),Ie([].slice.call(arguments))}Fe(Ne,Ae,Ue,{once:!0}),Ae!=="error"&&Be(Ne,Ye,{once:!0})})}function Be(Ne,Ae,Ie){typeof Ne.on=="function"&&Fe(Ne,"error",Ae,Ie)}function Fe(Ne,Ae,Ie,We){if(typeof Ne.on=="function")We.once?Ne.once(Ae,Ie):Ne.on(Ae,Ie);else if(typeof Ne.addEventListener=="function")Ne.addEventListener(Ae,function Ye(Ue){We.once&&Ne.removeEventListener(Ae,Ye),Ie(Ue)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Ne)}},{}],345:[function(oe,ze,De){"use strict";var fe=oe("is-callable"),me=Object.prototype.toString,ke=Object.prototype.hasOwnProperty,Ce=function(de,z,ee){for(var ae=0,ie=de.length;ae<ie;ae++)ke.call(de,ae)&&(ee==null?z(de[ae],ae,de):z.call(ee,de[ae],ae,de))},Se=function(de,z,ee){for(var ae=0,ie=de.length;ae<ie;ae++)ee==null?z(de.charAt(ae),ae,de):z.call(ee,de.charAt(ae),ae,de)},Me=function(de,z,ee){for(var ae in de)ke.call(de,ae)&&(ee==null?z(de[ae],ae,de):z.call(ee,de[ae],ae,de))},ve=function(de,z,ee){if(!fe(z))throw new TypeError("iterator must be a function");var ae;arguments.length>=3&&(ae=ee),me.call(de)==="[object Array]"?Ce(de,z,ae):typeof de=="string"?Se(de,z,ae):Me(de,z,ae)};ze.exports=ve},{"is-callable":367}],346:[function(oe,ze,De){"use strict";var fe="Function.prototype.bind called on incompatible ",me=Array.prototype.slice,ke=Object.prototype.toString,Ce="[object Function]";ze.exports=function(Me){var ve=this;if(typeof ve!="function"||ke.call(ve)!==Ce)throw new TypeError(fe+ve);for(var we=me.call(arguments,1),de,z=function(){if(this instanceof de){var ue=ve.apply(this,we.concat(me.call(arguments)));return Object(ue)===ue?ue:this}else return ve.apply(Me,we.concat(me.call(arguments)))},ee=Math.max(0,ve.length-we.length),ae=[],ie=0;ie<ee;ie++)ae.push("$"+ie);if(de=Function("binder","return function ("+ae.join(",")+"){ return binder.apply(this,arguments); }")(z),ve.prototype){var le=function(){};le.prototype=ve.prototype,de.prototype=new le,le.prototype=null}return de}},{}],347:[function(oe,ze,De){"use strict";var fe=oe("./implementation");ze.exports=Function.prototype.bind||fe},{"./implementation":346}],348:[function(oe,ze,De){"use strict";var fe,me=SyntaxError,ke=Function,Ce=TypeError,Se=function(st){try{return ke('"use strict"; return ('+st+").constructor;")()}catch(dt){}},Me=Object.getOwnPropertyDescriptor;if(Me)try{Me({},"")}catch(st){Me=null}var ve=function(){throw new Ce},we=Me?function(){try{return arguments.callee,ve}catch(st){try{return Me(arguments,"callee").get}catch(dt){return ve}}}():ve,de=oe("has-symbols")(),z=oe("has-proto")(),ee=Object.getPrototypeOf||(z?function(st){return st.__proto__}:null),ae={},ie=typeof Uint8Array=="undefined"||!ee?fe:ee(Uint8Array),le={"%AggregateError%":typeof AggregateError=="undefined"?fe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?fe:ArrayBuffer,"%ArrayIteratorPrototype%":de&&ee?ee([][Symbol.iterator]()):fe,"%AsyncFromSyncIteratorPrototype%":fe,"%AsyncFunction%":ae,"%AsyncGenerator%":ae,"%AsyncGeneratorFunction%":ae,"%AsyncIteratorPrototype%":ae,"%Atomics%":typeof Atomics=="undefined"?fe:Atomics,"%BigInt%":typeof BigInt=="undefined"?fe:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?fe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?fe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?fe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?fe:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?fe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?fe:FinalizationRegistry,"%Function%":ke,"%GeneratorFunction%":ae,"%Int8Array%":typeof Int8Array=="undefined"?fe:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?fe:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?fe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":de&&ee?ee(ee([][Symbol.iterator]())):fe,"%JSON%":typeof JSON=="object"?JSON:fe,"%Map%":typeof Map=="undefined"?fe:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!de||!ee?fe:ee(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?fe:Promise,"%Proxy%":typeof Proxy=="undefined"?fe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?fe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?fe:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!de||!ee?fe:ee(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?fe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":de&&ee?ee(""[Symbol.iterator]()):fe,"%Symbol%":de?Symbol:fe,"%SyntaxError%":me,"%ThrowTypeError%":we,"%TypedArray%":ie,"%TypeError%":Ce,"%Uint8Array%":typeof Uint8Array=="undefined"?fe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?fe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?fe:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?fe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?fe:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?fe:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?fe:WeakSet};if(ee)try{null.error}catch(st){var ue=ee(ee(st));le["%Error.prototype%"]=ue}var ge=function st(dt){var Ct;if(dt==="%AsyncFunction%")Ct=Se("async function () {}");else if(dt==="%GeneratorFunction%")Ct=Se("function* () {}");else if(dt==="%AsyncGeneratorFunction%")Ct=Se("async function* () {}");else if(dt==="%AsyncGenerator%"){var $e=st("%AsyncGeneratorFunction%");$e&&(Ct=$e.prototype)}else if(dt==="%AsyncIteratorPrototype%"){var rt=st("%AsyncGenerator%");rt&&ee&&(Ct=ee(rt.prototype))}return le[dt]=Ct,Ct},Pe={"%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"]},je=oe("function-bind"),Be=oe("has"),Fe=je.call(Function.call,Array.prototype.concat),Ne=je.call(Function.apply,Array.prototype.splice),Ae=je.call(Function.call,String.prototype.replace),Ie=je.call(Function.call,String.prototype.slice),We=je.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ue=/\\(\\)?/g,Ke=function(dt){var Ct=Ie(dt,0,1),$e=Ie(dt,-1);if(Ct==="%"&&$e!=="%")throw new me("invalid intrinsic syntax, expected closing `%`");if($e==="%"&&Ct!=="%")throw new me("invalid intrinsic syntax, expected opening `%`");var rt=[];return Ae(dt,Ye,function(St,Pt,wt,pt){rt[rt.length]=wt?Ae(pt,Ue,"$1"):Pt||St}),rt},ot=function(dt,Ct){var $e=dt,rt;if(Be(Pe,$e)&&(rt=Pe[$e],$e="%"+rt[0]+"%"),Be(le,$e)){var St=le[$e];if(St===ae&&(St=ge($e)),typeof St=="undefined"&&!Ct)throw new Ce("intrinsic "+dt+" exists, but is not available. Please file an issue!");return{alias:rt,name:$e,value:St}}throw new me("intrinsic "+dt+" does not exist!")};ze.exports=function(dt,Ct){if(typeof dt!="string"||dt.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ct!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(We(/^%?[^%]*%?$/,dt)===null)throw new me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $e=Ke(dt),rt=$e.length>0?$e[0]:"",St=ot("%"+rt+"%",Ct),Pt=St.name,wt=St.value,pt=!1,ft=St.alias;ft&&(rt=ft[0],Ne($e,Fe([0,1],ft)));for(var ht=1,Et=!0;ht<$e.length;ht+=1){var mt=$e[ht],yt=Ie(mt,0,1),At=Ie(mt,-1);if((yt==='"'||yt==="'"||yt==="`"||At==='"'||At==="'"||At==="`")&&yt!==At)throw new me("property names with quotes must have matching quotes");if((mt==="constructor"||!Et)&&(pt=!0),rt+="."+mt,Pt="%"+rt+"%",Be(le,Pt))wt=le[Pt];else if(wt!=null){if(!(mt in wt)){if(!Ct)throw new Ce("base intrinsic for "+dt+" exists, but the property is not available.");return}if(Me&&ht+1>=$e.length){var xt=Me(wt,mt);Et=!!xt,Et&&"get"in xt&&!("originalValue"in xt.get)?wt=xt.get:wt=wt[mt]}else Et=Be(wt,mt),wt=wt[mt];Et&&!pt&&(le[Pt]=wt)}}return wt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(oe,ze,De){"use strict";var fe=oe("get-intrinsic"),me=fe("%Object.getOwnPropertyDescriptor%",!0);if(me)try{me([],"length")}catch(ke){me=null}ze.exports=me},{"get-intrinsic":348}],350:[function(oe,ze,De){"use strict";var fe={foo:{}},me=Object;ze.exports=function(){return{__proto__:fe}.foo===fe.foo&&!({__proto__:null}instanceof me)}},{}],351:[function(oe,ze,De){"use strict";var fe=typeof Symbol!="undefined"&&Symbol,me=oe("./shams");ze.exports=function(){return typeof fe!="function"||typeof Symbol!="function"||typeof fe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:me()}},{"./shams":352}],352:[function(oe,ze,De){"use strict";ze.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var me={},ke=Symbol("test"),Ce=Object(ke);if(typeof ke=="string"||Object.prototype.toString.call(ke)!=="[object Symbol]"||Object.prototype.toString.call(Ce)!=="[object Symbol]")return!1;var Se=42;me[ke]=Se;for(ke in me)return!1;if(typeof Object.keys=="function"&&Object.keys(me).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(me).length!==0)return!1;var Me=Object.getOwnPropertySymbols(me);if(Me.length!==1||Me[0]!==ke||!Object.prototype.propertyIsEnumerable.call(me,ke))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var ve=Object.getOwnPropertyDescriptor(me,ke);if(ve.value!==Se||ve.enumerable!==!0)return!1}return!0}},{}],353:[function(oe,ze,De){"use strict";var fe=oe("has-symbols/shams");ze.exports=function(){return fe()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(oe,ze,De){"use strict";var fe=oe("function-bind");ze.exports=fe.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(oe,ze,De){var fe=oe("http"),me=oe("url"),ke=ze.exports;for(var Ce in fe)fe.hasOwnProperty(Ce)&&(ke[Ce]=fe[Ce]);ke.request=function(Me,ve){return Me=Se(Me),fe.request.call(this,Me,ve)},ke.get=function(Me,ve){return Me=Se(Me),fe.get.call(this,Me,ve)};function Se(Me){if(typeof Me=="string"&&(Me=me.parse(Me)),Me.protocol||(Me.protocol="https:"),Me.protocol!=="https:")throw new Error('Protocol "'+Me.protocol+'" not supported. Expected "https:"');return Me}},{http:468,url:472}],356:[function(oe,ze,De){"use strict";var fe=oe("util"),me=oe("ms");ze.exports=function(ke){if(typeof ke=="number")return ke;var Ce=me(ke);if(Ce===void 0){var Se=new Error(fe.format("humanize-ms(%j) result undefined",ke));console.warn(Se.stack)}return Ce}},{ms:376,util:419}],357:[function(oe,ze,De){De.read=function(fe,me,ke,Ce,Se){var Me,ve,we=Se*8-Ce-1,de=(1<<we)-1,z=de>>1,ee=-7,ae=ke?Se-1:0,ie=ke?-1:1,le=fe[me+ae];for(ae+=ie,Me=le&(1<<-ee)-1,le>>=-ee,ee+=we;ee>0;Me=Me*256+fe[me+ae],ae+=ie,ee-=8);for(ve=Me&(1<<-ee)-1,Me>>=-ee,ee+=Ce;ee>0;ve=ve*256+fe[me+ae],ae+=ie,ee-=8);if(Me===0)Me=1-z;else{if(Me===de)return ve?NaN:(le?-1:1)*(1/0);ve=ve+Math.pow(2,Ce),Me=Me-z}return(le?-1:1)*ve*Math.pow(2,Me-Ce)},De.write=function(fe,me,ke,Ce,Se,Me){var ve,we,de,z=Me*8-Se-1,ee=(1<<z)-1,ae=ee>>1,ie=Se===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=Ce?0:Me-1,ue=Ce?1:-1,ge=me<0||me===0&&1/me<0?1:0;for(me=Math.abs(me),isNaN(me)||me===1/0?(we=isNaN(me)?1:0,ve=ee):(ve=Math.floor(Math.log(me)/Math.LN2),me*(de=Math.pow(2,-ve))<1&&(ve--,de*=2),ve+ae>=1?me+=ie/de:me+=ie*Math.pow(2,1-ae),me*de>=2&&(ve++,de/=2),ve+ae>=ee?(we=0,ve=ee):ve+ae>=1?(we=(me*de-1)*Math.pow(2,Se),ve=ve+ae):(we=me*Math.pow(2,ae-1)*Math.pow(2,Se),ve=0));Se>=8;fe[ke+le]=we&255,le+=ue,we/=256,Se-=8);for(ve=ve<<Se|we,z+=Se;z>0;fe[ke+le]=ve&255,le+=ue,ve/=256,z-=8);fe[ke+le-ue]|=ge*128}},{}],358:[function(oe,ze,De){"use strict";var fe=[oe("./nextTick"),oe("./queueMicrotask"),oe("./mutation.js"),oe("./messageChannel"),oe("./stateChange"),oe("./timeout")],me,ke,Ce=-1,Se=[],Me=!1;function ve(){!me||!ke||(me=!1,ke.length?Se=ke.concat(Se):Ce=-1,Se.length&&we())}function we(){if(!me){Me=!1,me=!0;for(var le=Se.length,ue=setTimeout(ve);le;){for(ke=Se,Se=[];ke&&++Ce<le;)ke[Ce].run();Ce=-1,le=Se.length}ke=null,Ce=-1,me=!1,clearTimeout(ue)}}for(var de,z=-1,ee=fe.length;++z<ee;)if(fe[z]&&fe[z].test&&fe[z].test()){de=fe[z].install(we);break}function ae(le,ue){this.fun=le,this.array=ue}ae.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)}},ze.exports=ie;function ie(le){var ue=new Array(arguments.length-1);if(arguments.length>1)for(var ge=1;ge<arguments.length;ge++)ue[ge-1]=arguments[ge];Se.push(new ae(le,ue)),!Me&&!me&&(Me=!0,de())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(oe,ze,De){(function(fe){(function(){"use strict";De.test=function(){return fe.setImmediate?!1:typeof fe.MessageChannel!="undefined"},De.install=function(me){var ke=new fe.MessageChannel;return ke.port1.onmessage=me,function(){ke.port2.postMessage(0)}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=fe.MutationObserver||fe.WebKitMutationObserver;De.test=function(){return me},De.install=function(ke){var Ce=0,Se=new me(ke),Me=fe.document.createTextNode("");return Se.observe(Me,{characterData:!0}),function(){Me.data=Ce=++Ce%2}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(oe,ze,De){(function(fe){(function(){"use strict";De.test=function(){return typeof fe.queueMicrotask=="function"},De.install=function(me){return function(){fe.queueMicrotask(me)}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(oe,ze,De){(function(fe){(function(){"use strict";De.test=function(){return"document"in fe&&"onreadystatechange"in fe.document.createElement("script")},De.install=function(me){return function(){var ke=fe.document.createElement("script");return ke.onreadystatechange=function(){me(),ke.onreadystatechange=null,ke.parentNode.removeChild(ke),ke=null},fe.document.documentElement.appendChild(ke),me}}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(oe,ze,De){"use strict";De.test=function(){return!0},De.install=function(fe){return function(){setTimeout(fe,0)}}},{}],364:[function(oe,ze,De){typeof Object.create=="function"?ze.exports=function(me,ke){ke&&(me.super_=ke,me.prototype=Object.create(ke.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}}))}:ze.exports=function(me,ke){if(ke){me.super_=ke;var Ce=function(){};Ce.prototype=ke.prototype,me.prototype=new Ce,me.prototype.constructor=me}}},{}],365:[function(oe,ze,De){"use strict";var fe=oe("has-tostringtag/shams")(),me=oe("call-bind/callBound"),ke=me("Object.prototype.toString"),Ce=function(we){return fe&&we&&typeof we=="object"&&Symbol.toStringTag in we?!1:ke(we)==="[object Arguments]"},Se=function(we){return Ce(we)?!0:we!==null&&typeof we=="object"&&typeof we.length=="number"&&we.length>=0&&ke(we)!=="[object Array]"&&ke(we.callee)==="[object Function]"},Me=function(){return Ce(arguments)}();Ce.isLegacyArguments=Se,ze.exports=Me?Ce:Se},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(oe,ze,De){ze.exports=function(ke){return ke!=null&&(fe(ke)||me(ke)||!!ke._isBuffer)};function fe(ke){return!!ke.constructor&&typeof ke.constructor.isBuffer=="function"&&ke.constructor.isBuffer(ke)}function me(ke){return typeof ke.readFloatLE=="function"&&typeof ke.slice=="function"&&fe(ke.slice(0,0))}},{}],367:[function(oe,ze,De){"use strict";var fe=Function.prototype.toString,me=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ke,Ce;if(typeof me=="function"&&typeof Object.defineProperty=="function")try{ke=Object.defineProperty({},"length",{get:function(){throw Ce}}),Ce={},me(function(){throw 42},null,ke)}catch(Be){Be!==Ce&&(me=null)}else me=null;var Se=/^\s*class\b/,Me=function(Fe){try{var Ne=fe.call(Fe);return Se.test(Ne)}catch(Ae){return!1}},ve=function(Fe){try{return Me(Fe)?!1:(fe.call(Fe),!0)}catch(Ne){return!1}},we=Object.prototype.toString,de="[object Object]",z="[object Function]",ee="[object GeneratorFunction]",ae="[object HTMLAllCollection]",ie="[object HTML document.all class]",le="[object HTMLCollection]",ue=typeof Symbol=="function"&&!!Symbol.toStringTag,ge=!(0 in[,]),Pe=function(){return!1};if(typeof document=="object"){var je=document.all;we.call(je)===we.call(document.all)&&(Pe=function(Fe){if((ge||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var Ne=we.call(Fe);return(Ne===ae||Ne===ie||Ne===le||Ne===de)&&Fe("")==null}catch(Ae){}return!1})}ze.exports=me?function(Fe){if(Pe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;try{me(Fe,null,ke)}catch(Ne){if(Ne!==Ce)return!1}return!Me(Fe)&&ve(Fe)}:function(Fe){if(Pe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;if(ue)return ve(Fe);if(Me(Fe))return!1;var Ne=we.call(Fe);return Ne!==z&&Ne!==ee&&!/^\[object HTML/.test(Ne)?!1:ve(Fe)}},{}],368:[function(oe,ze,De){"use strict";var fe=Object.prototype.toString,me=Function.prototype.toString,ke=/^\s*(?:function)?\*/,Ce=oe("has-tostringtag/shams")(),Se=Object.getPrototypeOf,Me=function(){if(!Ce)return!1;try{return Function("return function*() {}")()}catch(we){}},ve;ze.exports=function(de){if(typeof de!="function")return!1;if(ke.test(me.call(de)))return!0;if(!Ce){var z=fe.call(de);return z==="[object GeneratorFunction]"}if(!Se)return!1;if(typeof ve=="undefined"){var ee=Me();ve=ee?Se(ee):!1}return Se(de)===ve}},{"has-tostringtag/shams":353}],369:[function(oe,ze,De){"use strict";var fe=oe("which-typed-array");ze.exports=function(ke){return!!fe(ke)}},{"which-typed-array":420}],370:[function(oe,ze,De){var fe={}.toString;ze.exports=Array.isArray||function(me){return fe.call(me)=="[object Array]"}},{}],371:[function(oe,ze,De){(function(fe){(function(){(function(me,ke){typeof De=="object"&&typeof ze!="undefined"?ze.exports=ke(me):typeof at=="function"&&at.amd?at(ke):ke(me)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof fe!="undefined"?fe:this,function(me){"use strict";me=me||{};var ke=me.Base64,Ce="2.6.4",Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Me=function(dt){for(var Ct={},$e=0,rt=dt.length;$e<rt;$e++)Ct[dt.charAt($e)]=$e;return Ct}(Se),ve=String.fromCharCode,we=function(dt){if(dt.length<2){var Ct=dt.charCodeAt(0);return Ct<128?dt:Ct<2048?ve(192|Ct>>>6)+ve(128|Ct&63):ve(224|Ct>>>12&15)+ve(128|Ct>>>6&63)+ve(128|Ct&63)}else{var Ct=65536+(dt.charCodeAt(0)-55296)*1024+(dt.charCodeAt(1)-56320);return ve(240|Ct>>>18&7)+ve(128|Ct>>>12&63)+ve(128|Ct>>>6&63)+ve(128|Ct&63)}},de=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(dt){return dt.replace(de,we)},ee=function(dt){var Ct=[0,2,1][dt.length%3],$e=dt.charCodeAt(0)<<16|(dt.length>1?dt.charCodeAt(1):0)<<8|(dt.length>2?dt.charCodeAt(2):0),rt=[Se.charAt($e>>>18),Se.charAt($e>>>12&63),Ct>=2?"=":Se.charAt($e>>>6&63),Ct>=1?"=":Se.charAt($e&63)];return rt.join("")},ae=me.btoa&&typeof me.btoa=="function"?function(dt){return me.btoa(dt)}:function(dt){if(dt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return dt.replace(/[\s\S]{1,3}/g,ee)},ie=function(dt){return ae(z(String(dt)))},le=function(dt){return dt.replace(/[+\/]/g,function(Ct){return Ct=="+"?"-":"_"}).replace(/=/g,"")},ue=function(dt,Ct){return Ct?le(ie(dt)):ie(dt)},ge=function(dt){return ue(dt,!0)},Pe;me.Uint8Array&&(Pe=function(dt,Ct){for(var $e="",rt=0,St=dt.length;rt<St;rt+=3){var Pt=dt[rt],wt=dt[rt+1],pt=dt[rt+2],ft=Pt<<16|wt<<8|pt;$e+=Se.charAt(ft>>>18)+Se.charAt(ft>>>12&63)+(typeof wt!="undefined"?Se.charAt(ft>>>6&63):"=")+(typeof pt!="undefined"?Se.charAt(ft&63):"=")}return Ct?le($e):$e});var je=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Be=function(dt){switch(dt.length){case 4:var Ct=(7&dt.charCodeAt(0))<<18|(63&dt.charCodeAt(1))<<12|(63&dt.charCodeAt(2))<<6|63&dt.charCodeAt(3),$e=Ct-65536;return ve(($e>>>10)+55296)+ve(($e&1023)+56320);case 3:return ve((15&dt.charCodeAt(0))<<12|(63&dt.charCodeAt(1))<<6|63&dt.charCodeAt(2));default:return ve((31&dt.charCodeAt(0))<<6|63&dt.charCodeAt(1))}},Fe=function(dt){return dt.replace(je,Be)},Ne=function(dt){var Ct=dt.length,$e=Ct%4,rt=(Ct>0?Me[dt.charAt(0)]<<18:0)|(Ct>1?Me[dt.charAt(1)]<<12:0)|(Ct>2?Me[dt.charAt(2)]<<6:0)|(Ct>3?Me[dt.charAt(3)]:0),St=[ve(rt>>>16),ve(rt>>>8&255),ve(rt&255)];return St.length-=[0,0,2,1][$e],St.join("")},Ae=me.atob&&typeof me.atob=="function"?function(dt){return me.atob(dt)}:function(dt){return dt.replace(/\S{1,4}/g,Ne)},Ie=function(dt){return Ae(String(dt).replace(/[^A-Za-z0-9\+\/]/g,""))},We=function(dt){return Fe(Ae(dt))},Ye=function(dt){return String(dt).replace(/[-_]/g,function(Ct){return Ct=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ue=function(dt){return We(Ye(dt))},Ke;me.Uint8Array&&(Ke=function(dt){return Uint8Array.from(Ie(Ye(dt)),function(Ct){return Ct.charCodeAt(0)})});var ot=function(){var dt=me.Base64;return me.Base64=ke,dt};if(me.Base64={VERSION:Ce,atob:Ie,btoa:ae,fromBase64:Ue,toBase64:ue,utob:z,encode:ue,encodeURI:ge,btou:Fe,decode:Ue,noConflict:ot,fromUint8Array:Pe,toUint8Array:Ke},typeof Object.defineProperty=="function"){var st=function(dt){return{value:dt,enumerable:!1,writable:!0,configurable:!0}};me.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",st(function(){return Ue(this)})),Object.defineProperty(String.prototype,"toBase64",st(function(dt){return ue(this,dt)})),Object.defineProperty(String.prototype,"toBase64URI",st(function(){return ue(this,!0)}))}}return me.Meteor&&(Base64=me.Base64),typeof ze!="undefined"&&ze.exports?ze.exports.Base64=me.Base64:typeof at=="function"&&at.amd&&at([],function(){return me.Base64}),{Base64:me.Base64}})}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(oe,ze,De){"use strict";ze.exports=me;var fe=Object.prototype.hasOwnProperty;function me(ke,Ce,Se){if(!ke)throw new TypeError("argument dest is required");if(!Ce)throw new TypeError("argument src is required");return Se===void 0&&(Se=!0),Object.getOwnPropertyNames(Ce).forEach(function(ve){if(!(!Se&&fe.call(ke,ve))){var we=Object.getOwnPropertyDescriptor(Ce,ve);Object.defineProperty(ke,ve,we)}}),ke}},{}],373:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.regexp.constructor.js"),oe("core-js/modules/es.regexp.to-string.js");function fe(){this._types=Object.create(null),this._extensions=Object.create(null);for(var me=0;me<arguments.length;me++)this.define(arguments[me]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}fe.prototype.define=function(me,ke){for(var Ce in me){var Se=me[Ce].map(function(de){return de.toLowerCase()});Ce=Ce.toLowerCase();for(var Me=0;Me<Se.length;Me++){var ve=Se[Me];if(ve[0]!=="*"){if(!ke&&ve in this._types)throw new Error('Attempt to change mapping for "'+ve+'" extension from "'+this._types[ve]+'" to "'+Ce+'". Pass `force=true` to allow this, otherwise remove "'+ve+'" from the list of extensions for "'+Ce+'".');this._types[ve]=Ce}}if(ke||!this._extensions[Ce]){var we=Se[0];this._extensions[Ce]=we[0]!=="*"?we:we.substr(1)}}},fe.prototype.getType=function(me){me=String(me);var ke=me.replace(/^.*[/\\]/,"").toLowerCase(),Ce=ke.replace(/^.*\./,"").toLowerCase(),Se=ke.length<me.length,Me=Ce.length<ke.length-1;return(Me||!Se)&&this._types[Ce]||null},fe.prototype.getExtension=function(me){return me=/^\s*([^;\s]*)/.test(me)&&RegExp.$1,me&&this._extensions[me.toLowerCase()]||null},ze.exports=fe},{"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(oe,ze,De){"use strict";var fe=oe("./Mime");ze.exports=new fe(oe("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(oe,ze,De){"use strict";ze.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(oe,ze,De){var fe=1e3,me=fe*60,ke=me*60,Ce=ke*24,Se=Ce*7,Me=Ce*365.25;ze.exports=function(ee,ae){ae=ae||{};var ie=typeof ee;if(ie==="string"&&ee.length>0)return ve(ee);if(ie==="number"&&isFinite(ee))return ae.long?de(ee):we(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 ae=/^(-?(?:\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(ae){var ie=parseFloat(ae[1]),le=(ae[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return ie*Me;case"weeks":case"week":case"w":return ie*Se;case"days":case"day":case"d":return ie*Ce;case"hours":case"hour":case"hrs":case"hr":case"h":return ie*ke;case"minutes":case"minute":case"mins":case"min":case"m":return ie*me;case"seconds":case"second":case"secs":case"sec":case"s":return ie*fe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ie;default:return}}}}function we(ee){var ae=Math.abs(ee);return ae>=Ce?Math.round(ee/Ce)+"d":ae>=ke?Math.round(ee/ke)+"h":ae>=me?Math.round(ee/me)+"m":ae>=fe?Math.round(ee/fe)+"s":ee+"ms"}function de(ee){var ae=Math.abs(ee);return ae>=Ce?z(ee,ae,Ce,"day"):ae>=ke?z(ee,ae,ke,"hour"):ae>=me?z(ee,ae,me,"minute"):ae>=fe?z(ee,ae,fe,"second"):ee+" ms"}function z(ee,ae,ie,le){var ue=ae>=ie*1.5;return Math.round(ee/ie)+" "+le+(ue?"s":"")}},{}],377:[function(oe,ze,De){"use strict";var fe=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable;function Ce(Me){if(Me==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Me)}function Se(){try{if(!Object.assign)return!1;var Me=new String("abc");if(Me[5]="de",Object.getOwnPropertyNames(Me)[0]==="5")return!1;for(var ve={},we=0;we<10;we++)ve["_"+String.fromCharCode(we)]=we;var de=Object.getOwnPropertyNames(ve).map(function(ee){return ve[ee]});if(de.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}}ze.exports=Se()?Object.assign:function(Me,ve){for(var we,de=Ce(Me),z,ee=1;ee<arguments.length;ee++){we=Object(arguments[ee]);for(var ae in we)me.call(we,ae)&&(de[ae]=we[ae]);if(fe){z=fe(we);for(var ie=0;ie<z.length;ie++)ke.call(we,z[ie])&&(de[z[ie]]=we[z[ie]])}}return de}},{}],378:[function(oe,ze,De){(function(fe){(function(){"use strict";function me(Me){if(typeof Me!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Me))}function ke(Me,ve){for(var we="",de=0,z=-1,ee=0,ae,ie=0;ie<=Me.length;++ie){if(ie<Me.length)ae=Me.charCodeAt(ie);else{if(ae===47)break;ae=47}if(ae===47){if(!(z===ie-1||ee===1))if(z!==ie-1&&ee===2){if(we.length<2||de!==2||we.charCodeAt(we.length-1)!==46||we.charCodeAt(we.length-2)!==46){if(we.length>2){var le=we.lastIndexOf("/");if(le!==we.length-1){le===-1?(we="",de=0):(we=we.slice(0,le),de=we.length-1-we.lastIndexOf("/")),z=ie,ee=0;continue}}else if(we.length===2||we.length===1){we="",de=0,z=ie,ee=0;continue}}ve&&(we.length>0?we+="/..":we="..",de=2)}else we.length>0?we+="/"+Me.slice(z+1,ie):we=Me.slice(z+1,ie),de=ie-z-1;z=ie,ee=0}else ae===46&&ee!==-1?++ee:ee=-1}return we}function Ce(Me,ve){var we=ve.dir||ve.root,de=ve.base||(ve.name||"")+(ve.ext||"");return we?we===ve.root?we+de:we+Me+de:de}var Se={resolve:function(){for(var ve="",we=!1,de,z=arguments.length-1;z>=-1&&!we;z--){var ee;z>=0?ee=arguments[z]:(de===void 0&&(de=fe.cwd()),ee=de),me(ee),ee.length!==0&&(ve=ee+"/"+ve,we=ee.charCodeAt(0)===47)}return ve=ke(ve,!we),we?ve.length>0?"/"+ve:"/":ve.length>0?ve:"."},normalize:function(ve){if(me(ve),ve.length===0)return".";var we=ve.charCodeAt(0)===47,de=ve.charCodeAt(ve.length-1)===47;return ve=ke(ve,!we),ve.length===0&&!we&&(ve="."),ve.length>0&&de&&(ve+="/"),we?"/"+ve:ve},isAbsolute:function(ve){return me(ve),ve.length>0&&ve.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var ve,we=0;we<arguments.length;++we){var de=arguments[we];me(de),de.length>0&&(ve===void 0?ve=de:ve+="/"+de)}return ve===void 0?".":Se.normalize(ve)},relative:function(ve,we){if(me(ve),me(we),ve===we||(ve=Se.resolve(ve),we=Se.resolve(we),ve===we))return"";for(var de=1;de<ve.length&&ve.charCodeAt(de)===47;++de);for(var z=ve.length,ee=z-de,ae=1;ae<we.length&&we.charCodeAt(ae)===47;++ae);for(var ie=we.length,le=ie-ae,ue=ee<le?ee:le,ge=-1,Pe=0;Pe<=ue;++Pe){if(Pe===ue){if(le>ue){if(we.charCodeAt(ae+Pe)===47)return we.slice(ae+Pe+1);if(Pe===0)return we.slice(ae+Pe)}else ee>ue&&(ve.charCodeAt(de+Pe)===47?ge=Pe:Pe===0&&(ge=0));break}var je=ve.charCodeAt(de+Pe),Be=we.charCodeAt(ae+Pe);if(je!==Be)break;je===47&&(ge=Pe)}var Fe="";for(Pe=de+ge+1;Pe<=z;++Pe)(Pe===z||ve.charCodeAt(Pe)===47)&&(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+we.slice(ae+ge):(ae+=ge,we.charCodeAt(ae)===47&&++ae,we.slice(ae))},_makeLong:function(ve){return ve},dirname:function(ve){if(me(ve),ve.length===0)return".";for(var we=ve.charCodeAt(0),de=we===47,z=-1,ee=!0,ae=ve.length-1;ae>=1;--ae)if(we=ve.charCodeAt(ae),we===47){if(!ee){z=ae;break}}else ee=!1;return z===-1?de?"/":".":de&&z===1?"//":ve.slice(0,z)},basename:function(ve,we){if(we!==void 0&&typeof we!="string")throw new TypeError('"ext" argument must be a string');me(ve);var de=0,z=-1,ee=!0,ae;if(we!==void 0&&we.length>0&&we.length<=ve.length){if(we.length===ve.length&&we===ve)return"";var ie=we.length-1,le=-1;for(ae=ve.length-1;ae>=0;--ae){var ue=ve.charCodeAt(ae);if(ue===47){if(!ee){de=ae+1;break}}else le===-1&&(ee=!1,le=ae+1),ie>=0&&(ue===we.charCodeAt(ie)?--ie===-1&&(z=ae):(ie=-1,z=le))}return de===z?z=le:z===-1&&(z=ve.length),ve.slice(de,z)}else{for(ae=ve.length-1;ae>=0;--ae)if(ve.charCodeAt(ae)===47){if(!ee){de=ae+1;break}}else z===-1&&(ee=!1,z=ae+1);return z===-1?"":ve.slice(de,z)}},extname:function(ve){me(ve);for(var we=-1,de=0,z=-1,ee=!0,ae=0,ie=ve.length-1;ie>=0;--ie){var le=ve.charCodeAt(ie);if(le===47){if(!ee){de=ie+1;break}continue}z===-1&&(ee=!1,z=ie+1),le===46?we===-1?we=ie:ae!==1&&(ae=1):we!==-1&&(ae=-1)}return we===-1||z===-1||ae===0||ae===1&&we===z-1&&we===de+1?"":ve.slice(we,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 Ce("/",ve)},parse:function(ve){me(ve);var we={root:"",dir:"",base:"",ext:"",name:""};if(ve.length===0)return we;var de=ve.charCodeAt(0),z=de===47,ee;z?(we.root="/",ee=1):ee=0;for(var ae=-1,ie=0,le=-1,ue=!0,ge=ve.length-1,Pe=0;ge>=ee;--ge){if(de=ve.charCodeAt(ge),de===47){if(!ue){ie=ge+1;break}continue}le===-1&&(ue=!1,le=ge+1),de===46?ae===-1?ae=ge:Pe!==1&&(Pe=1):ae!==-1&&(Pe=-1)}return ae===-1||le===-1||Pe===0||Pe===1&&ae===le-1&&ae===ie+1?le!==-1&&(ie===0&&z?we.base=we.name=ve.slice(1,le):we.base=we.name=ve.slice(ie,le)):(ie===0&&z?(we.name=ve.slice(1,ae),we.base=ve.slice(1,le)):(we.name=ve.slice(ie,ae),we.base=ve.slice(ie,le)),we.ext=ve.slice(ae,le)),ie>0?we.dir=ve.slice(0,ie-1):z&&(we.dir="/"),we},sep:"/",delimiter:":",win32:null,posix:null};Se.posix=Se,ze.exports=Se}).call(this)}).call(this,oe("_process"))},{_process:467}],379:[function(oe,ze,De){(function(fe){(function(){(function(){"use strict";var me={function:!0,object:!0},ke=me[typeof window]&&window||this,Ce=ke,Se=me[typeof De]&&De,Me=me[typeof ze]&&ze&&!ze.nodeType&&ze,ve=Se&&Me&&typeof fe=="object"&&fe;ve&&(ve.global===ve||ve.window===ve||ve.self===ve)&&(ke=ve);var we=Math.pow(2,53)-1,de=/\bOpera/,z=this,ee=Object.prototype,ae=ee.hasOwnProperty,ie=ee.toString;function le(Ue){return Ue=String(Ue),Ue.charAt(0).toUpperCase()+Ue.slice(1)}function ue(Ue,Ke,ot){var st={"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 Ke&&ot&&/^Win/i.test(Ue)&&!/^Windows Phone /i.test(Ue)&&(st=st[/[\d.]+$/.exec(Ue)])&&(Ue="Windows "+st),Ue=String(Ue),Ke&&ot&&(Ue=Ue.replace(RegExp(Ke,"i"),ot)),Ue=Pe(Ue.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]),Ue}function ge(Ue,Ke){var ot=-1,st=Ue?Ue.length:0;if(typeof st=="number"&&st>-1&&st<=we)for(;++ot<st;)Ke(Ue[ot],ot,Ue);else je(Ue,Ke)}function Pe(Ue){return Ue=Ie(Ue),/^(?:webOS|i(?:OS|P))/.test(Ue)?Ue:le(Ue)}function je(Ue,Ke){for(var ot in Ue)ae.call(Ue,ot)&&Ke(Ue[ot],ot,Ue)}function Be(Ue){return Ue==null?le(Ue):ie.call(Ue).slice(8,-1)}function Fe(Ue,Ke){var ot=Ue!=null?typeof Ue[Ke]:"number";return!/^(?:boolean|number|string|undefined)$/.test(ot)&&(ot=="object"?!!Ue[Ke]:!0)}function Ne(Ue){return String(Ue).replace(/([ -])(?!$)/g,"$1?")}function Ae(Ue,Ke){var ot=null;return ge(Ue,function(st,dt){ot=Ke(ot,st,dt,Ue)}),ot}function Ie(Ue){return String(Ue).replace(/^ +| +$/g,"")}function We(Ue){var Ke=ke,ot=Ue&&typeof Ue=="object"&&Be(Ue)!="String";ot&&(Ke=Ue,Ue=null);var st=Ke.navigator||{},dt=st.userAgent||"";Ue||(Ue=dt);var Ct=ot||z==Ce,$e=ot?!!st.likeChrome:/\bChrome\b/.test(Ue)&&!/internal|\n/i.test(ie.toString()),rt="Object",St=ot?rt:"ScriptBridgingProxyObject",Pt=ot?rt:"Environment",wt=ot&&Ke.java?"JavaPackage":Be(Ke.java),pt=ot?rt:"RuntimeObject",ft=/\bJava/.test(wt)&&Ke.java,ht=ft&&Be(Ke.environment)==Pt,Et=ft?"a":"\u03B1",mt=ft?"b":"\u03B2",yt=Ke.document||{},At=Ke.operamini||Ke.opera,xt=de.test(xt=ot&&At?At["[[Class]]"]:Be(At))?xt:At=null,tt,Ve=Ue,xe=[],Le=null,Ze=Ue==dt,nt=Ze&&At&&typeof At.version=="function"&&At.version(),Re,_e=Mt([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),He=Dt(["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"]),Qe=Xt([{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"]),ut=Nt({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}}),gt=Ht(["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 Mt(nn){return Ae(nn,function(Wt,bn){return Wt||RegExp("\\b"+(bn.pattern||Ne(bn))+"\\b","i").exec(Ue)&&(bn.label||bn)})}function Nt(nn){return Ae(nn,function(Wt,bn,mn){return Wt||(bn[Qe]||bn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Qe)]||RegExp("\\b"+Ne(mn)+"(?:\\b|\\w*\\d)","i").exec(Ue))&&mn})}function Dt(nn){return Ae(nn,function(Wt,bn){return Wt||RegExp("\\b"+(bn.pattern||Ne(bn))+"\\b","i").exec(Ue)&&(bn.label||bn)})}function Ht(nn){return Ae(nn,function(Wt,bn){var mn=bn.pattern||Ne(bn);return!Wt&&(Wt=RegExp("\\b"+mn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ue))&&(Wt=ue(Wt,mn,bn.label||bn)),Wt})}function Xt(nn){return Ae(nn,function(Wt,bn){var mn=bn.pattern||Ne(bn);return!Wt&&(Wt=RegExp("\\b"+mn+" *\\d+[.\\w_]*","i").exec(Ue)||RegExp("\\b"+mn+" *\\w+-[\\w]*","i").exec(Ue)||RegExp("\\b"+mn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ue))&&((Wt=String(bn.label&&!RegExp(mn,"i").test(bn.label)?bn.label:Wt).split("/"))[1]&&!/[\d.]+/.test(Wt[0])&&(Wt[0]+=" "+Wt[1]),bn=bn.label||bn,Wt=Pe(Wt[0].replace(RegExp(mn,"i"),bn).replace(RegExp("; *(?:"+bn+"[_-])?","i")," ").replace(RegExp("("+bn+")[-_.]?(\\w)","i"),"$1 $2"))),Wt})}function $t(nn){return Ae(nn,function(Wt,bn){return Wt||(RegExp(bn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ue)||0)[1]||null})}function Ut(){return this.description||""}if(_e&&(_e=[_e]),/\bAndroid\b/.test(gt)&&!Qe&&(tt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ue))&&(Qe=Ie(tt[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ut&&!Qe?Qe=Xt([ut]):ut&&Qe&&(Qe=Qe.replace(RegExp("^("+Ne(ut)+")[-_.\\s]","i"),ut+" ").replace(RegExp("^("+Ne(ut)+")[-_.]?(\\w)","i"),ut+" $2")),(tt=/\bGoogle TV\b/.exec(Qe))&&(Qe=tt[0]),/\bSimulator\b/i.test(Ue)&&(Qe=(Qe?Qe+" ":"")+"Simulator"),He=="Opera Mini"&&/\bOPiOS\b/.test(Ue)&&xe.push("running in Turbo/Uncompressed mode"),He=="IE"&&/\blike iPhone OS\b/.test(Ue)?(tt=We(Ue.replace(/like iPhone OS/,"")),ut=tt.manufacturer,Qe=tt.product):/^iP/.test(Qe)?(He||(He="Safari"),gt="iOS"+((tt=/ OS ([\d_]+)/i.exec(Ue))?" "+tt[1].replace(/_/g,"."):"")):He=="Konqueror"&&/^Linux\b/i.test(gt)?gt="Kubuntu":ut&&ut!="Google"&&(/Chrome/.test(He)&&!/\bMobile Safari\b/i.test(Ue)||/\bVita\b/.test(Qe))||/\bAndroid\b/.test(gt)&&/^Chrome/.test(He)&&/\bVersion\//i.test(Ue)?(He="Android Browser",gt=/\bAndroid\b/.test(gt)?gt:"Android"):He=="Silk"?(/\bMobi/i.test(Ue)||(gt="Android",xe.unshift("desktop mode")),/Accelerated *= *true/i.test(Ue)&&xe.unshift("accelerated")):He=="UC Browser"&&/\bUCWEB\b/.test(Ue)?xe.push("speed mode"):He=="PaleMoon"&&(tt=/\bFirefox\/([\d.]+)\b/.exec(Ue))?xe.push("identifying as Firefox "+tt[1]):He=="Firefox"&&(tt=/\b(Mobile|Tablet|TV)\b/i.exec(Ue))?(gt||(gt="Firefox OS"),Qe||(Qe=tt[1])):!He||(tt=!/\bMinefield\b/i.test(Ue)&&/\b(?:Firefox|Safari)\b/.exec(He))?(He&&!Qe&&/[\/,]|^[^(]+?\)/.test(Ue.slice(Ue.indexOf(tt+"/")+8))&&(He=null),(tt=Qe||ut||gt)&&(Qe||ut||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(gt))&&(He=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(gt)?gt:tt)+" Browser")):He=="Electron"&&(tt=(/\bChrome\/([\d.]+)\b/.exec(Ue)||0)[1])&&xe.push("Chromium "+tt),nt||(nt=$t(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Ne(He),"(?:Firefox|Minefield|NetFront)"])),(tt=_e=="iCab"&&parseFloat(nt)>3&&"WebKit"||/\bOpera\b/.test(He)&&(/\bOPR\b/.test(Ue)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ue)&&!/^(?:Trident|EdgeHTML)$/.test(_e)&&"WebKit"||!_e&&/\bMSIE\b/i.test(Ue)&&(gt=="Mac OS"?"Tasman":"Trident")||_e=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(He)&&"NetFront")&&(_e=[tt]),He=="IE"&&(tt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ue)||0)[1])?(He+=" Mobile",gt="Windows Phone "+(/\+$/.test(tt)?tt:tt+".x"),xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ue)?(He="IE Mobile",gt="Windows Phone 8.x",xe.unshift("desktop mode"),nt||(nt=(/\brv:([\d.]+)/.exec(Ue)||0)[1])):He!="IE"&&_e=="Trident"&&(tt=/\brv:([\d.]+)/.exec(Ue))&&(He&&xe.push("identifying as "+He+(nt?" "+nt:"")),He="IE",nt=tt[1]),Ze){if(Fe(Ke,"global"))if(ft&&(tt=ft.lang.System,Ve=tt.getProperty("os.arch"),gt=gt||tt.getProperty("os.name")+" "+tt.getProperty("os.version")),ht){try{nt=Ke.require("ringo/engine").version.join("."),He="RingoJS"}catch(nn){(tt=Ke.system)&&tt.global.system==Ke.system&&(He="Narwhal",gt||(gt=tt[0].os||null))}He||(He="Rhino")}else typeof Ke.process=="object"&&!Ke.process.browser&&(tt=Ke.process)&&(typeof tt.versions=="object"&&(typeof tt.versions.electron=="string"?(xe.push("Node "+tt.versions.node),He="Electron",nt=tt.versions.electron):typeof tt.versions.nw=="string"&&(xe.push("Chromium "+nt,"Node "+tt.versions.node),He="NW.js",nt=tt.versions.nw)),He||(He="Node.js",Ve=tt.arch,gt=tt.platform,nt=/[\d.]+/.exec(tt.version),nt=nt?nt[0]:null));else Be(tt=Ke.runtime)==St?(He="Adobe AIR",gt=tt.flash.system.Capabilities.os):Be(tt=Ke.phantom)==pt?(He="PhantomJS",nt=(tt=tt.version||null)&&tt.major+"."+tt.minor+"."+tt.patch):typeof yt.documentMode=="number"&&(tt=/\bTrident\/(\d+)/i.exec(Ue))?(nt=[nt,yt.documentMode],(tt=+tt[1]+4)!=nt[1]&&(xe.push("IE "+nt[1]+" mode"),_e&&(_e[1]=""),nt[1]=tt),nt=He=="IE"?String(nt[1].toFixed(1)):nt[0]):typeof yt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(He)&&(xe.push("masking as "+He+" "+nt),He="IE",nt="11.0",_e=["Trident"],gt="Windows");gt=gt&&Pe(gt)}if(nt&&(tt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(nt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ue+";"+(Ze&&st.appMinorVersion))||/\bMinefield\b/i.test(Ue)&&"a")&&(Le=/b/i.test(tt)?"beta":"alpha",nt=nt.replace(RegExp(tt+"\\+?$"),"")+(Le=="beta"?mt:Et)+(/\d+\+?/.exec(tt)||"")),He=="Fennec"||He=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(gt))He="Firefox Mobile";else if(He=="Maxthon"&&nt)nt=nt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Qe))Qe=="Xbox 360"&&(gt=null),Qe=="Xbox 360"&&/\bIEMobile\b/.test(Ue)&&xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(He)||He&&!Qe&&!/Browser|Mobi/.test(He))&&(gt=="Windows CE"||/Mobi/i.test(Ue)))He+=" Mobile";else if(He=="IE"&&Ze)try{Ke.external===null&&xe.unshift("platform preview")}catch(nn){xe.unshift("embedded")}else(/\bBlackBerry\b/.test(Qe)||/\bBB10\b/.test(Ue))&&(tt=(RegExp(Qe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ue)||0)[1]||nt)?(tt=[tt,/BB10/.test(Ue)],gt=(tt[1]?(Qe=null,ut="BlackBerry"):"Device Software")+" "+tt[0],nt=null):this!=je&&Qe!="Wii"&&(Ze&&At||/Opera/.test(He)&&/\b(?:MSIE|Firefox)\b/i.test(Ue)||He=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(gt)||He=="IE"&&(gt&&!/^Win/.test(gt)&&nt>5.5||/\bWindows XP\b/.test(gt)&&nt>8||nt==8&&!/\bTrident\b/.test(Ue)))&&!de.test(tt=We.call(je,Ue.replace(de,"")+";"))&&tt.name&&(tt="ing as "+tt.name+((tt=tt.version)?" "+tt:""),de.test(He)?(/\bIE\b/.test(tt)&&gt=="Mac OS"&&(gt=null),tt="identify"+tt):(tt="mask"+tt,xt?He=Pe(xt.replace(/([a-z])([A-Z])/g,"$1 $2")):He="Opera",/\bIE\b/.test(tt)&&(gt=null),Ze||(nt=null)),_e=["Presto"],xe.push(tt));(tt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ue)||0)[1])&&(tt=[parseFloat(tt.replace(/\.(\d)$/,".0$1")),tt],He=="Safari"&&tt[1].slice(-1)=="+"?(He="WebKit Nightly",Le="alpha",nt=tt[1].slice(0,-1)):(nt==tt[1]||nt==(tt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ue)||0)[1]))&&(nt=null),tt[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ue)||0)[1],tt[0]==537.36&&tt[2]==537.36&&parseFloat(tt[1])>=28&&_e=="WebKit"&&(_e=["Blink"]),!Ze||!$e&&!tt[1]?(_e&&(_e[1]="like Safari"),tt=(tt=tt[0],tt<400?1:tt<500?2:tt<526?3:tt<533?4:tt<534?"4+":tt<535?5:tt<537?6:tt<538?7:tt<601?8:tt<602?9:tt<604?10:tt<606?11:tt<608?12:"12")):(_e&&(_e[1]="like Chrome"),tt=tt[1]||(tt=tt[0],tt<530?1:tt<532?2:tt<532.05?3:tt<533?4:tt<534.03?5:tt<534.07?6:tt<534.1?7:tt<534.13?8:tt<534.16?9:tt<534.24?10:tt<534.3?11:tt<535.01?12:tt<535.02?"13+":tt<535.07?15:tt<535.11?16:tt<535.19?17:tt<536.05?18:tt<536.1?19:tt<537.01?20:tt<537.11?"21+":tt<537.13?23:tt<537.18?24:tt<537.24?25:tt<537.36?26:_e!="Blink"?"27":"28")),_e&&(_e[1]+=" "+(tt+=typeof tt=="number"?".x":/[.+]/.test(tt)?"":"+")),He=="Safari"&&(!nt||parseInt(nt)>45)?nt=tt:He=="Chrome"&&/\bHeadlessChrome/i.test(Ue)&&xe.unshift("headless")),He=="Opera"&&(tt=/\bzbov|zvav$/.exec(gt))?(He+=" ",xe.unshift("desktop mode"),tt=="zvav"?(He+="Mini",nt=null):He+="Mobile",gt=gt.replace(RegExp(" *"+tt+"$"),"")):He=="Safari"&&/\bChrome\b/.exec(_e&&_e[1])?(xe.unshift("desktop mode"),He="Chrome Mobile",nt=null,/\bOS X\b/.test(gt)?(ut="Apple",gt="iOS 4.3+"):gt=null):/\bSRWare Iron\b/.test(He)&&!nt&&(nt=$t("Chrome")),nt&&nt.indexOf(tt=/[\d.]+$/.exec(gt))==0&&Ue.indexOf("/"+tt+"-")>-1&&(gt=Ie(gt.replace(tt,""))),gt&&gt.indexOf(He)!=-1&&!RegExp(He+" OS").test(gt)&&(gt=gt.replace(RegExp(" *"+Ne(He)+" *"),"")),_e&&!/\b(?:Avant|Nook)\b/.test(He)&&(/Browser|Lunascape|Maxthon/.test(He)||He!="Safari"&&/^iOS/.test(gt)&&/\bSafari\b/.test(_e[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(He)&&_e[1])&&(tt=_e[_e.length-1])&&xe.push(tt),xe.length&&(xe=["("+xe.join("; ")+")"]),ut&&Qe&&Qe.indexOf(ut)<0&&xe.push("on "+ut),Qe&&xe.push((/^on /.test(xe[xe.length-1])?"":"on ")+Qe),gt&&(tt=/ ([\d.+]+)$/.exec(gt),Re=tt&&gt.charAt(gt.length-tt[0].length-1)=="/",gt={architecture:32,family:tt&&!Re?gt.replace(tt[0],""):gt,version:tt?tt[1]:null,toString:function(){var nn=this.version;return this.family+(nn&&!Re?" "+nn:"")+(this.architecture==64?" 64-bit":"")}}),(tt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Ve))&&!/\bi686\b/i.test(Ve)?(gt&&(gt.architecture=64,gt.family=gt.family.replace(RegExp(" *"+tt),"")),He&&(/\bWOW64\b/i.test(Ue)||Ze&&/\w(?:86|32)$/.test(st.cpuClass||st.platform)&&!/\bWin64; x64\b/i.test(Ue))&&xe.unshift("32-bit")):gt&&/^OS X/.test(gt.family)&&He=="Chrome"&&parseFloat(nt)>=39&&(gt.architecture=64),Ue||(Ue=null);var sn={};return sn.description=Ue,sn.layout=_e&&_e[0],sn.manufacturer=ut,sn.name=He,sn.prerelease=Le,sn.product=Qe,sn.ua=Ue,sn.version=He&&nt,sn.os=gt||{architecture:null,family:null,version:null,toString:function(){return"null"}},sn.parse=We,sn.toString=Ut,sn.version&&xe.unshift(nt),sn.name&&xe.unshift(He),gt&&He&&!(gt==String(gt).split(" ")[0]&&(gt==He.split(" ")[0]||Qe))&&xe.push(Qe?"("+gt+")":"on "+gt),xe.length&&(sn.description=xe.join(" ")),sn}var Ye=We();typeof at=="function"&&typeof at.amd=="object"&&at.amd?(ke.platform=Ye,at(function(){return Ye})):Se&&Me?je(Ye,function(Ue,Ke){Se[Ke]=Ue}):ke.platform=Ye}).call(this)}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(oe,ze,De){(function(fe){(function(){"use strict";typeof fe=="undefined"||!fe.version||fe.version.indexOf("v0.")===0||fe.version.indexOf("v1.")===0&&fe.version.indexOf("v1.8.")!==0?ze.exports={nextTick:me}:ze.exports=fe;function me(ke,Ce,Se,Me){if(typeof ke!="function")throw new TypeError('"callback" argument must be a function');var ve=arguments.length,we,de;switch(ve){case 0:case 1:return fe.nextTick(ke);case 2:return fe.nextTick(function(){ke.call(null,Ce)});case 3:return fe.nextTick(function(){ke.call(null,Ce,Se)});case 4:return fe.nextTick(function(){ke.call(null,Ce,Se,Me)});default:for(we=new Array(ve-1),de=0;de<we.length;)we[de++]=arguments[de];return fe.nextTick(function(){ke.apply(null,we)})}}}).call(this)}).call(this,oe("_process"))},{_process:467}],381:[function(oe,ze,De){var fe=ze.exports={},me,ke;function Ce(){throw new Error("setTimeout has not been defined")}function Se(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?me=setTimeout:me=Ce}catch(ge){me=Ce}try{typeof clearTimeout=="function"?ke=clearTimeout:ke=Se}catch(ge){ke=Se}})();function Me(ge){if(me===setTimeout)return setTimeout(ge,0);if((me===Ce||!me)&&setTimeout)return me=setTimeout,setTimeout(ge,0);try{return me(ge,0)}catch(Pe){try{return me.call(null,ge,0)}catch(je){return me.call(this,ge,0)}}}function ve(ge){if(ke===clearTimeout)return clearTimeout(ge);if((ke===Se||!ke)&&clearTimeout)return ke=clearTimeout,clearTimeout(ge);try{return ke(ge)}catch(Pe){try{return ke.call(null,ge)}catch(je){return ke.call(this,ge)}}}var we=[],de=!1,z,ee=-1;function ae(){!de||!z||(de=!1,z.length?we=z.concat(we):ee=-1,we.length&&ie())}function ie(){if(!de){var ge=Me(ae);de=!0;for(var Pe=we.length;Pe;){for(z=we,we=[];++ee<Pe;)z&&z[ee].run();ee=-1,Pe=we.length}z=null,de=!1,ve(ge)}}fe.nextTick=function(ge){var Pe=new Array(arguments.length-1);if(arguments.length>1)for(var je=1;je<arguments.length;je++)Pe[je-1]=arguments[je];we.push(new le(ge,Pe)),we.length===1&&!de&&Me(ie)};function le(ge,Pe){this.fun=ge,this.array=Pe}le.prototype.run=function(){this.fun.apply(null,this.array)},fe.title="browser",fe.browser=!0,fe.env={},fe.argv=[],fe.version="",fe.versions={};function ue(){}fe.on=ue,fe.addListener=ue,fe.once=ue,fe.off=ue,fe.removeListener=ue,fe.removeAllListeners=ue,fe.emit=ue,fe.prependListener=ue,fe.prependOnceListener=ue,fe.listeners=function(ge){return[]},fe.binding=function(ge){throw new Error("process.binding is not supported")},fe.cwd=function(){return"/"},fe.chdir=function(ge){throw new Error("process.chdir is not supported")},fe.umask=function(){return 0}},{}],382:[function(oe,ze,De){(function(fe){(function(){(function(me){var ke=typeof De=="object"&&De&&!De.nodeType&&De,Ce=typeof ze=="object"&&ze&&!ze.nodeType&&ze,Se=typeof fe=="object"&&fe;(Se.global===Se||Se.window===Se||Se.self===Se)&&(me=Se);var Me,ve=2147483647,we=36,de=1,z=26,ee=38,ae=700,ie=72,le=128,ue="-",ge=/^xn--/,Pe=/[^\x20-\x7E]/,je=/[\x2E\u3002\uFF0E\uFF61]/g,Be={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=we-de,Ne=Math.floor,Ae=String.fromCharCode,Ie;function We(wt){throw new RangeError(Be[wt])}function Ye(wt,pt){for(var ft=wt.length,ht=[];ft--;)ht[ft]=pt(wt[ft]);return ht}function Ue(wt,pt){var ft=wt.split("@"),ht="";ft.length>1&&(ht=ft[0]+"@",wt=ft[1]),wt=wt.replace(je,".");var Et=wt.split("."),mt=Ye(Et,pt).join(".");return ht+mt}function Ke(wt){for(var pt=[],ft=0,ht=wt.length,Et,mt;ft<ht;)Et=wt.charCodeAt(ft++),Et>=55296&&Et<=56319&&ft<ht?(mt=wt.charCodeAt(ft++),(mt&64512)==56320?pt.push(((Et&1023)<<10)+(mt&1023)+65536):(pt.push(Et),ft--)):pt.push(Et);return pt}function ot(wt){return Ye(wt,function(pt){var ft="";return pt>65535&&(pt-=65536,ft+=Ae(pt>>>10&1023|55296),pt=56320|pt&1023),ft+=Ae(pt),ft}).join("")}function st(wt){return wt-48<10?wt-22:wt-65<26?wt-65:wt-97<26?wt-97:we}function dt(wt,pt){return wt+22+75*(wt<26)-((pt!=0)<<5)}function Ct(wt,pt,ft){var ht=0;for(wt=ft?Ne(wt/ae):wt>>1,wt+=Ne(wt/pt);wt>Fe*z>>1;ht+=we)wt=Ne(wt/Fe);return Ne(ht+(Fe+1)*wt/(wt+ee))}function $e(wt){var pt=[],ft=wt.length,ht,Et=0,mt=le,yt=ie,At,xt,tt,Ve,xe,Le,Ze,nt,Re;for(At=wt.lastIndexOf(ue),At<0&&(At=0),xt=0;xt<At;++xt)wt.charCodeAt(xt)>=128&&We("not-basic"),pt.push(wt.charCodeAt(xt));for(tt=At>0?At+1:0;tt<ft;){for(Ve=Et,xe=1,Le=we;tt>=ft&&We("invalid-input"),Ze=st(wt.charCodeAt(tt++)),(Ze>=we||Ze>Ne((ve-Et)/xe))&&We("overflow"),Et+=Ze*xe,nt=Le<=yt?de:Le>=yt+z?z:Le-yt,!(Ze<nt);Le+=we)Re=we-nt,xe>Ne(ve/Re)&&We("overflow"),xe*=Re;ht=pt.length+1,yt=Ct(Et-Ve,ht,Ve==0),Ne(Et/ht)>ve-mt&&We("overflow"),mt+=Ne(Et/ht),Et%=ht,pt.splice(Et++,0,mt)}return ot(pt)}function rt(wt){var pt,ft,ht,Et,mt,yt,At,xt,tt,Ve,xe,Le=[],Ze,nt,Re,_e;for(wt=Ke(wt),Ze=wt.length,pt=le,ft=0,mt=ie,yt=0;yt<Ze;++yt)xe=wt[yt],xe<128&&Le.push(Ae(xe));for(ht=Et=Le.length,Et&&Le.push(ue);ht<Ze;){for(At=ve,yt=0;yt<Ze;++yt)xe=wt[yt],xe>=pt&&xe<At&&(At=xe);for(nt=ht+1,At-pt>Ne((ve-ft)/nt)&&We("overflow"),ft+=(At-pt)*nt,pt=At,yt=0;yt<Ze;++yt)if(xe=wt[yt],xe<pt&&++ft>ve&&We("overflow"),xe==pt){for(xt=ft,tt=we;Ve=tt<=mt?de:tt>=mt+z?z:tt-mt,!(xt<Ve);tt+=we)_e=xt-Ve,Re=we-Ve,Le.push(Ae(dt(Ve+_e%Re,0))),xt=Ne(_e/Re);Le.push(Ae(dt(xt,0))),mt=Ct(ft,nt,ht==Et),ft=0,++ht}++ft,++pt}return Le.join("")}function St(wt){return Ue(wt,function(pt){return ge.test(pt)?$e(pt.slice(4).toLowerCase()):pt})}function Pt(wt){return Ue(wt,function(pt){return Pe.test(pt)?"xn--"+rt(pt):pt})}if(Me={version:"1.4.1",ucs2:{decode:Ke,encode:ot},decode:$e,encode:rt,toASCII:Pt,toUnicode:St},typeof at=="function"&&typeof at.amd=="object"&&at.amd)at("punycode",function(){return Me});else if(ke&&Ce)if(ze.exports==ke)Ce.exports=Me;else for(Ie in Me)Me.hasOwnProperty(Ie)&&(ke[Ie]=Me[Ie]);else me.punycode=Me})(this)}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(oe,ze,De){"use strict";function fe(ke,Ce){return Object.prototype.hasOwnProperty.call(ke,Ce)}ze.exports=function(ke,Ce,Se,Me){Ce=Ce||"&",Se=Se||"=";var ve={};if(typeof ke!="string"||ke.length===0)return ve;var we=/\+/g;ke=ke.split(Ce);var de=1e3;Me&&typeof Me.maxKeys=="number"&&(de=Me.maxKeys);var z=ke.length;de>0&&z>de&&(z=de);for(var ee=0;ee<z;++ee){var ae=ke[ee].replace(we,"%20"),ie=ae.indexOf(Se),le,ue,ge,Pe;ie>=0?(le=ae.substr(0,ie),ue=ae.substr(ie+1)):(le=ae,ue=""),ge=decodeURIComponent(le),Pe=decodeURIComponent(ue),fe(ve,ge)?me(ve[ge])?ve[ge].push(Pe):ve[ge]=[ve[ge],Pe]:ve[ge]=Pe}return ve};var me=Array.isArray||function(ke){return Object.prototype.toString.call(ke)==="[object Array]"}},{}],384:[function(oe,ze,De){"use strict";var fe=function(Se){switch(typeof Se){case"string":return Se;case"boolean":return Se?"true":"false";case"number":return isFinite(Se)?Se:"";default:return""}};ze.exports=function(Se,Me,ve,we){return Me=Me||"&",ve=ve||"=",Se===null&&(Se=void 0),typeof Se=="object"?ke(Ce(Se),function(de){var z=encodeURIComponent(fe(de))+ve;return me(Se[de])?ke(Se[de],function(ee){return z+encodeURIComponent(fe(ee))}).join(Me):z+encodeURIComponent(fe(Se[de]))}).join(Me):we?encodeURIComponent(fe(we))+ve+encodeURIComponent(fe(Se)):""};var me=Array.isArray||function(Se){return Object.prototype.toString.call(Se)==="[object Array]"};function ke(Se,Me){if(Se.map)return Se.map(Me);for(var ve=[],we=0;we<Se.length;we++)ve.push(Me(Se[we],we));return ve}var Ce=Object.keys||function(Se){var Me=[];for(var ve in Se)Object.prototype.hasOwnProperty.call(Se,ve)&&Me.push(ve);return Me}},{}],385:[function(oe,ze,De){"use strict";De.decode=De.parse=oe("./decode"),De.encode=De.stringify=oe("./encode")},{"./decode":383,"./encode":384}],386:[function(oe,ze,De){"use strict";var fe=oe("process-nextick-args"),me=Object.keys||function(ae){var ie=[];for(var le in ae)ie.push(le);return ie};ze.exports=de;var ke=Object.create(oe("core-util-is"));ke.inherits=oe("inherits");var Ce=oe("./_stream_readable"),Se=oe("./_stream_writable");ke.inherits(de,Ce);for(var Me=me(Se.prototype),ve=0;ve<Me.length;ve++){var we=Me[ve];de.prototype[we]||(de.prototype[we]=Se.prototype[we])}function de(ae){if(!(this instanceof de))return new de(ae);Ce.call(this,ae),Se.call(this,ae),ae&&ae.readable===!1&&(this.readable=!1),ae&&ae.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ae&&ae.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||fe.nextTick(ee,this)}function ee(ae){ae.end()}Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(ae){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=ae,this._writableState.destroyed=ae)}}),de.prototype._destroy=function(ae,ie){this.push(null),this.end(),fe.nextTick(ie,ae)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(oe,ze,De){"use strict";ze.exports=ke;var fe=oe("./_stream_transform"),me=Object.create(oe("core-util-is"));me.inherits=oe("inherits"),me.inherits(ke,fe);function ke(Ce){if(!(this instanceof ke))return new ke(Ce);fe.call(this,Ce)}ke.prototype._transform=function(Ce,Se,Me){Me(null,Ce)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(oe,ze,De){(function(fe,me){(function(){"use strict";var ke=oe("process-nextick-args");ze.exports=Ae;var Ce=oe("isarray"),Se;Ae.ReadableState=Ne;var Me=oe("events").EventEmitter,ve=function(xe,Le){return xe.listeners(Le).length},we=oe("./internal/streams/stream"),de=oe("safe-buffer").Buffer,z=me.Uint8Array||function(){};function ee(xe){return de.from(xe)}function ae(xe){return de.isBuffer(xe)||xe instanceof z}var ie=Object.create(oe("core-util-is"));ie.inherits=oe("inherits");var le=oe("util"),ue=void 0;le&&le.debuglog?ue=le.debuglog("stream"):ue=function(){};var ge=oe("./internal/streams/BufferList"),Pe=oe("./internal/streams/destroy"),je;ie.inherits(Ae,we);var Be=["error","close","destroy","pause","resume"];function Fe(xe,Le,Ze){if(typeof xe.prependListener=="function")return xe.prependListener(Le,Ze);!xe._events||!xe._events[Le]?xe.on(Le,Ze):Ce(xe._events[Le])?xe._events[Le].unshift(Ze):xe._events[Le]=[Ze,xe._events[Le]]}function Ne(xe,Le){Se=Se||oe("./_stream_duplex"),xe=xe||{};var Ze=Le instanceof Se;this.objectMode=!!xe.objectMode,Ze&&(this.objectMode=this.objectMode||!!xe.readableObjectMode);var nt=xe.highWaterMark,Re=xe.readableHighWaterMark,_e=this.objectMode?16:16*1024;nt||nt===0?this.highWaterMark=nt:Ze&&(Re||Re===0)?this.highWaterMark=Re:this.highWaterMark=_e,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new ge,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=xe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,xe.encoding&&(je||(je=oe("string_decoder/").StringDecoder),this.decoder=new je(xe.encoding),this.encoding=xe.encoding)}function Ae(xe){if(Se=Se||oe("./_stream_duplex"),!(this instanceof Ae))return new Ae(xe);this._readableState=new Ne(xe,this),this.readable=!0,xe&&(typeof xe.read=="function"&&(this._read=xe.read),typeof xe.destroy=="function"&&(this._destroy=xe.destroy)),we.call(this)}Object.defineProperty(Ae.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(xe){this._readableState&&(this._readableState.destroyed=xe)}}),Ae.prototype.destroy=Pe.destroy,Ae.prototype._undestroy=Pe.undestroy,Ae.prototype._destroy=function(xe,Le){this.push(null),Le(xe)},Ae.prototype.push=function(xe,Le){var Ze=this._readableState,nt;return Ze.objectMode?nt=!0:typeof xe=="string"&&(Le=Le||Ze.defaultEncoding,Le!==Ze.encoding&&(xe=de.from(xe,Le),Le=""),nt=!0),Ie(this,xe,Le,!1,nt)},Ae.prototype.unshift=function(xe){return Ie(this,xe,null,!0,!1)};function Ie(xe,Le,Ze,nt,Re){var _e=xe._readableState;if(Le===null)_e.reading=!1,dt(xe,_e);else{var He;Re||(He=Ye(_e,Le)),He?xe.emit("error",He):_e.objectMode||Le&&Le.length>0?(typeof Le!="string"&&!_e.objectMode&&Object.getPrototypeOf(Le)!==de.prototype&&(Le=ee(Le)),nt?_e.endEmitted?xe.emit("error",new Error("stream.unshift() after end event")):We(xe,_e,Le,!0):_e.ended?xe.emit("error",new Error("stream.push() after EOF")):(_e.reading=!1,_e.decoder&&!Ze?(Le=_e.decoder.write(Le),_e.objectMode||Le.length!==0?We(xe,_e,Le,!1):rt(xe,_e)):We(xe,_e,Le,!1))):nt||(_e.reading=!1)}return Ue(_e)}function We(xe,Le,Ze,nt){Le.flowing&&Le.length===0&&!Le.sync?(xe.emit("data",Ze),xe.read(0)):(Le.length+=Le.objectMode?1:Ze.length,nt?Le.buffer.unshift(Ze):Le.buffer.push(Ze),Le.needReadable&&Ct(xe)),rt(xe,Le)}function Ye(xe,Le){var Ze;return!ae(Le)&&typeof Le!="string"&&Le!==void 0&&!xe.objectMode&&(Ze=new TypeError("Invalid non-string/buffer chunk")),Ze}function Ue(xe){return!xe.ended&&(xe.needReadable||xe.length<xe.highWaterMark||xe.length===0)}Ae.prototype.isPaused=function(){return this._readableState.flowing===!1},Ae.prototype.setEncoding=function(xe){return je||(je=oe("string_decoder/").StringDecoder),this._readableState.decoder=new je(xe),this._readableState.encoding=xe,this};var Ke=8388608;function ot(xe){return xe>=Ke?xe=Ke:(xe--,xe|=xe>>>1,xe|=xe>>>2,xe|=xe>>>4,xe|=xe>>>8,xe|=xe>>>16,xe++),xe}function st(xe,Le){return xe<=0||Le.length===0&&Le.ended?0:Le.objectMode?1:xe!==xe?Le.flowing&&Le.length?Le.buffer.head.data.length:Le.length:(xe>Le.highWaterMark&&(Le.highWaterMark=ot(xe)),xe<=Le.length?xe:Le.ended?Le.length:(Le.needReadable=!0,0))}Ae.prototype.read=function(xe){ue("read",xe),xe=parseInt(xe,10);var Le=this._readableState,Ze=xe;if(xe!==0&&(Le.emittedReadable=!1),xe===0&&Le.needReadable&&(Le.length>=Le.highWaterMark||Le.ended))return ue("read: emitReadable",Le.length,Le.ended),Le.length===0&&Le.ended?xt(this):Ct(this),null;if(xe=st(xe,Le),xe===0&&Le.ended)return Le.length===0&&xt(this),null;var nt=Le.needReadable;ue("need readable",nt),(Le.length===0||Le.length-xe<Le.highWaterMark)&&(nt=!0,ue("length less than watermark",nt)),Le.ended||Le.reading?(nt=!1,ue("reading or ended",nt)):nt&&(ue("do read"),Le.reading=!0,Le.sync=!0,Le.length===0&&(Le.needReadable=!0),this._read(Le.highWaterMark),Le.sync=!1,Le.reading||(xe=st(Ze,Le)));var Re;return xe>0?Re=Et(xe,Le):Re=null,Re===null?(Le.needReadable=!0,xe=0):Le.length-=xe,Le.length===0&&(Le.ended||(Le.needReadable=!0),Ze!==xe&&Le.ended&&xt(this)),Re!==null&&this.emit("data",Re),Re};function dt(xe,Le){if(!Le.ended){if(Le.decoder){var Ze=Le.decoder.end();Ze&&Ze.length&&(Le.buffer.push(Ze),Le.length+=Le.objectMode?1:Ze.length)}Le.ended=!0,Ct(xe)}}function Ct(xe){var Le=xe._readableState;Le.needReadable=!1,Le.emittedReadable||(ue("emitReadable",Le.flowing),Le.emittedReadable=!0,Le.sync?ke.nextTick($e,xe):$e(xe))}function $e(xe){ue("emit readable"),xe.emit("readable"),ht(xe)}function rt(xe,Le){Le.readingMore||(Le.readingMore=!0,ke.nextTick(St,xe,Le))}function St(xe,Le){for(var Ze=Le.length;!Le.reading&&!Le.flowing&&!Le.ended&&Le.length<Le.highWaterMark&&(ue("maybeReadMore read 0"),xe.read(0),Ze!==Le.length);)Ze=Le.length;Le.readingMore=!1}Ae.prototype._read=function(xe){this.emit("error",new Error("_read() is not implemented"))},Ae.prototype.pipe=function(xe,Le){var Ze=this,nt=this._readableState;switch(nt.pipesCount){case 0:nt.pipes=xe;break;case 1:nt.pipes=[nt.pipes,xe];break;default:nt.pipes.push(xe);break}nt.pipesCount+=1,ue("pipe count=%d opts=%j",nt.pipesCount,Le);var Re=(!Le||Le.end!==!1)&&xe!==fe.stdout&&xe!==fe.stderr,_e=Re?Qe:Ut;nt.endEmitted?ke.nextTick(_e):Ze.once("end",_e),xe.on("unpipe",He);function He(sn,nn){ue("onunpipe"),sn===Ze&&nn&&nn.hasUnpiped===!1&&(nn.hasUnpiped=!0,Mt())}function Qe(){ue("onend"),xe.end()}var ut=Pt(Ze);xe.on("drain",ut);var gt=!1;function Mt(){ue("cleanup"),xe.removeListener("close",Xt),xe.removeListener("finish",$t),xe.removeListener("drain",ut),xe.removeListener("error",Ht),xe.removeListener("unpipe",He),Ze.removeListener("end",Qe),Ze.removeListener("end",Ut),Ze.removeListener("data",Dt),gt=!0,nt.awaitDrain&&(!xe._writableState||xe._writableState.needDrain)&&ut()}var Nt=!1;Ze.on("data",Dt);function Dt(sn){ue("ondata"),Nt=!1;var nn=xe.write(sn);nn===!1&&!Nt&&((nt.pipesCount===1&&nt.pipes===xe||nt.pipesCount>1&&Ve(nt.pipes,xe)!==-1)&&!gt&&(ue("false write response, pause",Ze._readableState.awaitDrain),Ze._readableState.awaitDrain++,Nt=!0),Ze.pause())}function Ht(sn){ue("onerror",sn),Ut(),xe.removeListener("error",Ht),ve(xe,"error")===0&&xe.emit("error",sn)}Fe(xe,"error",Ht);function Xt(){xe.removeListener("finish",$t),Ut()}xe.once("close",Xt);function $t(){ue("onfinish"),xe.removeListener("close",Xt),Ut()}xe.once("finish",$t);function Ut(){ue("unpipe"),Ze.unpipe(xe)}return xe.emit("pipe",Ze),nt.flowing||(ue("pipe resume"),Ze.resume()),xe};function Pt(xe){return function(){var Le=xe._readableState;ue("pipeOnDrain",Le.awaitDrain),Le.awaitDrain&&Le.awaitDrain--,Le.awaitDrain===0&&ve(xe,"data")&&(Le.flowing=!0,ht(xe))}}Ae.prototype.unpipe=function(xe){var Le=this._readableState,Ze={hasUnpiped:!1};if(Le.pipesCount===0)return this;if(Le.pipesCount===1)return xe&&xe!==Le.pipes?this:(xe||(xe=Le.pipes),Le.pipes=null,Le.pipesCount=0,Le.flowing=!1,xe&&xe.emit("unpipe",this,Ze),this);if(!xe){var nt=Le.pipes,Re=Le.pipesCount;Le.pipes=null,Le.pipesCount=0,Le.flowing=!1;for(var _e=0;_e<Re;_e++)nt[_e].emit("unpipe",this,Ze);return this}var He=Ve(Le.pipes,xe);return He===-1?this:(Le.pipes.splice(He,1),Le.pipesCount-=1,Le.pipesCount===1&&(Le.pipes=Le.pipes[0]),xe.emit("unpipe",this,Ze),this)},Ae.prototype.on=function(xe,Le){var Ze=we.prototype.on.call(this,xe,Le);if(xe==="data")this._readableState.flowing!==!1&&this.resume();else if(xe==="readable"){var nt=this._readableState;!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.emittedReadable=!1,nt.reading?nt.length&&Ct(this):ke.nextTick(wt,this))}return Ze},Ae.prototype.addListener=Ae.prototype.on;function wt(xe){ue("readable nexttick read 0"),xe.read(0)}Ae.prototype.resume=function(){var xe=this._readableState;return xe.flowing||(ue("resume"),xe.flowing=!0,pt(this,xe)),this};function pt(xe,Le){Le.resumeScheduled||(Le.resumeScheduled=!0,ke.nextTick(ft,xe,Le))}function ft(xe,Le){Le.reading||(ue("resume read 0"),xe.read(0)),Le.resumeScheduled=!1,Le.awaitDrain=0,xe.emit("resume"),ht(xe),Le.flowing&&!Le.reading&&xe.read(0)}Ae.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 ht(xe){var Le=xe._readableState;for(ue("flow",Le.flowing);Le.flowing&&xe.read()!==null;);}Ae.prototype.wrap=function(xe){var Le=this,Ze=this._readableState,nt=!1;xe.on("end",function(){if(ue("wrapped end"),Ze.decoder&&!Ze.ended){var He=Ze.decoder.end();He&&He.length&&Le.push(He)}Le.push(null)}),xe.on("data",function(He){if(ue("wrapped data"),Ze.decoder&&(He=Ze.decoder.write(He)),!(Ze.objectMode&&He==null)&&!(!Ze.objectMode&&(!He||!He.length))){var Qe=Le.push(He);Qe||(nt=!0,xe.pause())}});for(var Re in xe)this[Re]===void 0&&typeof xe[Re]=="function"&&(this[Re]=function(He){return function(){return xe[He].apply(xe,arguments)}}(Re));for(var _e=0;_e<Be.length;_e++)xe.on(Be[_e],this.emit.bind(this,Be[_e]));return this._read=function(He){ue("wrapped _read",He),nt&&(nt=!1,xe.resume())},this},Object.defineProperty(Ae.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Ae._fromList=Et;function Et(xe,Le){if(Le.length===0)return null;var Ze;return Le.objectMode?Ze=Le.buffer.shift():!xe||xe>=Le.length?(Le.decoder?Ze=Le.buffer.join(""):Le.buffer.length===1?Ze=Le.buffer.head.data:Ze=Le.buffer.concat(Le.length),Le.buffer.clear()):Ze=mt(xe,Le.buffer,Le.decoder),Ze}function mt(xe,Le,Ze){var nt;return xe<Le.head.data.length?(nt=Le.head.data.slice(0,xe),Le.head.data=Le.head.data.slice(xe)):xe===Le.head.data.length?nt=Le.shift():nt=Ze?yt(xe,Le):At(xe,Le),nt}function yt(xe,Le){var Ze=Le.head,nt=1,Re=Ze.data;for(xe-=Re.length;Ze=Ze.next;){var _e=Ze.data,He=xe>_e.length?_e.length:xe;if(He===_e.length?Re+=_e:Re+=_e.slice(0,xe),xe-=He,xe===0){He===_e.length?(++nt,Ze.next?Le.head=Ze.next:Le.head=Le.tail=null):(Le.head=Ze,Ze.data=_e.slice(He));break}++nt}return Le.length-=nt,Re}function At(xe,Le){var Ze=de.allocUnsafe(xe),nt=Le.head,Re=1;for(nt.data.copy(Ze),xe-=nt.data.length;nt=nt.next;){var _e=nt.data,He=xe>_e.length?_e.length:xe;if(_e.copy(Ze,Ze.length-xe,0,He),xe-=He,xe===0){He===_e.length?(++Re,nt.next?Le.head=nt.next:Le.head=Le.tail=null):(Le.head=nt,nt.data=_e.slice(He));break}++Re}return Le.length-=Re,Ze}function xt(xe){var Le=xe._readableState;if(Le.length>0)throw new Error('"endReadable()" called on non-empty stream');Le.endEmitted||(Le.ended=!0,ke.nextTick(tt,Le,xe))}function tt(xe,Le){!xe.endEmitted&&xe.length===0&&(xe.endEmitted=!0,Le.readable=!1,Le.emit("end"))}function Ve(xe,Le){for(var Ze=0,nt=xe.length;Ze<nt;Ze++)if(xe[Ze]===Le)return Ze;return-1}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn: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(oe,ze,De){"use strict";ze.exports=Ce;var fe=oe("./_stream_duplex"),me=Object.create(oe("core-util-is"));me.inherits=oe("inherits"),me.inherits(Ce,fe);function ke(ve,we){var de=this._transformState;de.transforming=!1;var z=de.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));de.writechunk=null,de.writecb=null,we!=null&&this.push(we),z(ve);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function Ce(ve){if(!(this instanceof Ce))return new Ce(ve);fe.call(this,ve),this._transformState={afterTransform:ke.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",Se)}function Se(){var ve=this;typeof this._flush=="function"?this._flush(function(we,de){Me(ve,we,de)}):Me(this,null,null)}Ce.prototype.push=function(ve,we){return this._transformState.needTransform=!1,fe.prototype.push.call(this,ve,we)},Ce.prototype._transform=function(ve,we,de){throw new Error("_transform() is not implemented")},Ce.prototype._write=function(ve,we,de){var z=this._transformState;if(z.writecb=de,z.writechunk=ve,z.writeencoding=we,!z.transforming){var ee=this._readableState;(z.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},Ce.prototype._read=function(ve){var we=this._transformState;we.writechunk!==null&&we.writecb&&!we.transforming?(we.transforming=!0,this._transform(we.writechunk,we.writeencoding,we.afterTransform)):we.needTransform=!0},Ce.prototype._destroy=function(ve,we){var de=this;fe.prototype._destroy.call(this,ve,function(z){we(z),de.emit("close")})};function Me(ve,we,de){if(we)return ve.emit("error",we);if(de!=null&&ve.push(de),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(oe,ze,De){(function(fe,me,ke){(function(){"use strict";var Ce=oe("process-nextick-args");ze.exports=Fe;function Se(ft,ht,Et){this.chunk=ft,this.encoding=ht,this.callback=Et,this.next=null}function Me(ft){var ht=this;this.next=null,this.entry=null,this.finish=function(){pt(ht,ft)}}var ve=!fe.browser&&["v0.10","v0.9."].indexOf(fe.version.slice(0,5))>-1?ke:Ce.nextTick,we;Fe.WritableState=je;var de=Object.create(oe("core-util-is"));de.inherits=oe("inherits");var z={deprecate:oe("util-deprecate")},ee=oe("./internal/streams/stream"),ae=oe("safe-buffer").Buffer,ie=me.Uint8Array||function(){};function le(ft){return ae.from(ft)}function ue(ft){return ae.isBuffer(ft)||ft instanceof ie}var ge=oe("./internal/streams/destroy");de.inherits(Fe,ee);function Pe(){}function je(ft,ht){we=we||oe("./_stream_duplex"),ft=ft||{};var Et=ht instanceof we;this.objectMode=!!ft.objectMode,Et&&(this.objectMode=this.objectMode||!!ft.writableObjectMode);var mt=ft.highWaterMark,yt=ft.writableHighWaterMark,At=this.objectMode?16:16*1024;mt||mt===0?this.highWaterMark=mt:Et&&(yt||yt===0)?this.highWaterMark=yt:this.highWaterMark=At,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 xt=ft.decodeStrings===!1;this.decodeStrings=!xt,this.defaultEncoding=ft.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(tt){ot(ht,tt)},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 Me(this)}je.prototype.getBuffer=function(){for(var ht=this.bufferedRequest,Et=[];ht;)Et.push(ht),ht=ht.next;return Et},function(){try{Object.defineProperty(je.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ft){}}();var Be;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Be=Function.prototype[Symbol.hasInstance],Object.defineProperty(Fe,Symbol.hasInstance,{value:function(ft){return Be.call(this,ft)?!0:this!==Fe?!1:ft&&ft._writableState instanceof je}})):Be=function(ft){return ft instanceof this};function Fe(ft){if(we=we||oe("./_stream_duplex"),!Be.call(Fe,this)&&!(this instanceof we))return new Fe(ft);this._writableState=new je(ft,this),this.writable=!0,ft&&(typeof ft.write=="function"&&(this._write=ft.write),typeof ft.writev=="function"&&(this._writev=ft.writev),typeof ft.destroy=="function"&&(this._destroy=ft.destroy),typeof ft.final=="function"&&(this._final=ft.final)),ee.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Ne(ft,ht){var Et=new Error("write after end");ft.emit("error",Et),Ce.nextTick(ht,Et)}function Ae(ft,ht,Et,mt){var yt=!0,At=!1;return Et===null?At=new TypeError("May not write null values to stream"):typeof Et!="string"&&Et!==void 0&&!ht.objectMode&&(At=new TypeError("Invalid non-string/buffer chunk")),At&&(ft.emit("error",At),Ce.nextTick(mt,At),yt=!1),yt}Fe.prototype.write=function(ft,ht,Et){var mt=this._writableState,yt=!1,At=!mt.objectMode&&ue(ft);return At&&!ae.isBuffer(ft)&&(ft=le(ft)),typeof ht=="function"&&(Et=ht,ht=null),At?ht="buffer":ht||(ht=mt.defaultEncoding),typeof Et!="function"&&(Et=Pe),mt.ended?Ne(this,Et):(At||Ae(this,mt,ft,Et))&&(mt.pendingcb++,yt=We(this,mt,At,ft,ht,Et)),yt},Fe.prototype.cork=function(){var ft=this._writableState;ft.corked++},Fe.prototype.uncork=function(){var ft=this._writableState;ft.corked&&(ft.corked--,!ft.writing&&!ft.corked&&!ft.finished&&!ft.bufferProcessing&&ft.bufferedRequest&&Ct(this,ft))},Fe.prototype.setDefaultEncoding=function(ht){if(typeof ht=="string"&&(ht=ht.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ht+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ht);return this._writableState.defaultEncoding=ht,this};function Ie(ft,ht,Et){return!ft.objectMode&&ft.decodeStrings!==!1&&typeof ht=="string"&&(ht=ae.from(ht,Et)),ht}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function We(ft,ht,Et,mt,yt,At){if(!Et){var xt=Ie(ht,mt,yt);mt!==xt&&(Et=!0,yt="buffer",mt=xt)}var tt=ht.objectMode?1:mt.length;ht.length+=tt;var Ve=ht.length<ht.highWaterMark;if(Ve||(ht.needDrain=!0),ht.writing||ht.corked){var xe=ht.lastBufferedRequest;ht.lastBufferedRequest={chunk:mt,encoding:yt,isBuf:Et,callback:At,next:null},xe?xe.next=ht.lastBufferedRequest:ht.bufferedRequest=ht.lastBufferedRequest,ht.bufferedRequestCount+=1}else Ye(ft,ht,!1,tt,mt,yt,At);return Ve}function Ye(ft,ht,Et,mt,yt,At,xt){ht.writelen=mt,ht.writecb=xt,ht.writing=!0,ht.sync=!0,Et?ft._writev(yt,ht.onwrite):ft._write(yt,At,ht.onwrite),ht.sync=!1}function Ue(ft,ht,Et,mt,yt){--ht.pendingcb,Et?(Ce.nextTick(yt,mt),Ce.nextTick(Pt,ft,ht),ft._writableState.errorEmitted=!0,ft.emit("error",mt)):(yt(mt),ft._writableState.errorEmitted=!0,ft.emit("error",mt),Pt(ft,ht))}function Ke(ft){ft.writing=!1,ft.writecb=null,ft.length-=ft.writelen,ft.writelen=0}function ot(ft,ht){var Et=ft._writableState,mt=Et.sync,yt=Et.writecb;if(Ke(Et),ht)Ue(ft,Et,mt,ht,yt);else{var At=$e(Et);!At&&!Et.corked&&!Et.bufferProcessing&&Et.bufferedRequest&&Ct(ft,Et),mt?ve(st,ft,Et,At,yt):st(ft,Et,At,yt)}}function st(ft,ht,Et,mt){Et||dt(ft,ht),ht.pendingcb--,mt(),Pt(ft,ht)}function dt(ft,ht){ht.length===0&&ht.needDrain&&(ht.needDrain=!1,ft.emit("drain"))}function Ct(ft,ht){ht.bufferProcessing=!0;var Et=ht.bufferedRequest;if(ft._writev&&Et&&Et.next){var mt=ht.bufferedRequestCount,yt=new Array(mt),At=ht.corkedRequestsFree;At.entry=Et;for(var xt=0,tt=!0;Et;)yt[xt]=Et,Et.isBuf||(tt=!1),Et=Et.next,xt+=1;yt.allBuffers=tt,Ye(ft,ht,!0,ht.length,yt,"",At.finish),ht.pendingcb++,ht.lastBufferedRequest=null,At.next?(ht.corkedRequestsFree=At.next,At.next=null):ht.corkedRequestsFree=new Me(ht),ht.bufferedRequestCount=0}else{for(;Et;){var Ve=Et.chunk,xe=Et.encoding,Le=Et.callback,Ze=ht.objectMode?1:Ve.length;if(Ye(ft,ht,!1,Ze,Ve,xe,Le),Et=Et.next,ht.bufferedRequestCount--,ht.writing)break}Et===null&&(ht.lastBufferedRequest=null)}ht.bufferedRequest=Et,ht.bufferProcessing=!1}Fe.prototype._write=function(ft,ht,Et){Et(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(ft,ht,Et){var mt=this._writableState;typeof ft=="function"?(Et=ft,ft=null,ht=null):typeof ht=="function"&&(Et=ht,ht=null),ft!=null&&this.write(ft,ht),mt.corked&&(mt.corked=1,this.uncork()),!mt.ending&&!mt.finished&&wt(this,mt,Et)};function $e(ft){return ft.ending&&ft.length===0&&ft.bufferedRequest===null&&!ft.finished&&!ft.writing}function rt(ft,ht){ft._final(function(Et){ht.pendingcb--,Et&&ft.emit("error",Et),ht.prefinished=!0,ft.emit("prefinish"),Pt(ft,ht)})}function St(ft,ht){!ht.prefinished&&!ht.finalCalled&&(typeof ft._final=="function"?(ht.pendingcb++,ht.finalCalled=!0,Ce.nextTick(rt,ft,ht)):(ht.prefinished=!0,ft.emit("prefinish")))}function Pt(ft,ht){var Et=$e(ht);return Et&&(St(ft,ht),ht.pendingcb===0&&(ht.finished=!0,ft.emit("finish"))),Et}function wt(ft,ht,Et){ht.ending=!0,Pt(ft,ht),Et&&(ht.finished?Ce.nextTick(Et):ft.once("finish",Et)),ht.ended=!0,ft.writable=!1}function pt(ft,ht,Et){var mt=ft.entry;for(ft.entry=null;mt;){var yt=mt.callback;ht.pendingcb--,yt(Et),mt=mt.next}ht.corkedRequestsFree?ht.corkedRequestsFree.next=ft:ht.corkedRequestsFree=ft}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ft){this._writableState&&(this._writableState.destroyed=ft)}}),Fe.prototype.destroy=ge.destroy,Fe.prototype._undestroy=ge.undestroy,Fe.prototype._destroy=function(ft,ht){this.end(),ht(ft)}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("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(oe,ze,De){"use strict";function fe(Se,Me){if(!(Se instanceof Me))throw new TypeError("Cannot call a class as a function")}var me=oe("safe-buffer").Buffer,ke=oe("util");function Ce(Se,Me,ve){Se.copy(Me,ve)}ze.exports=function(){function Se(){fe(this,Se),this.head=null,this.tail=null,this.length=0}return Se.prototype.push=function(ve){var we={data:ve,next:null};this.length>0?this.tail.next=we:this.head=we,this.tail=we,++this.length},Se.prototype.unshift=function(ve){var we={data:ve,next:this.head};this.length===0&&(this.tail=we),this.head=we,++this.length},Se.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}},Se.prototype.clear=function(){this.head=this.tail=null,this.length=0},Se.prototype.join=function(ve){if(this.length===0)return"";for(var we=this.head,de=""+we.data;we=we.next;)de+=ve+we.data;return de},Se.prototype.concat=function(ve){if(this.length===0)return me.alloc(0);if(this.length===1)return this.head.data;for(var we=me.allocUnsafe(ve>>>0),de=this.head,z=0;de;)Ce(de.data,we,z),z+=de.data.length,de=de.next;return we},Se}(),ke&&ke.inspect&&ke.inspect.custom&&(ze.exports.prototype[ke.inspect.custom]=function(){var Se=ke.inspect({length:this.length});return this.constructor.name+" "+Se})},{"safe-buffer":396,util:89}],392:[function(oe,ze,De){"use strict";var fe=oe("process-nextick-args");function me(Se,Me){var ve=this,we=this._readableState&&this._readableState.destroyed,de=this._writableState&&this._writableState.destroyed;return we||de?(Me?Me(Se):Se&&(!this._writableState||!this._writableState.errorEmitted)&&fe.nextTick(Ce,this,Se),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Se||null,function(z){!Me&&z?(fe.nextTick(Ce,ve,z),ve._writableState&&(ve._writableState.errorEmitted=!0)):Me&&Me(z)}),this)}function ke(){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 Ce(Se,Me){Se.emit("error",Me)}ze.exports={destroy:me,undestroy:ke}},{"process-nextick-args":380}],393:[function(oe,ze,De){ze.exports=oe("events").EventEmitter},{events:344}],394:[function(oe,ze,De){De=ze.exports=oe("./lib/_stream_readable.js"),De.Stream=De,De.Readable=De,De.Writable=oe("./lib/_stream_writable.js"),De.Duplex=oe("./lib/_stream_duplex.js"),De.Transform=oe("./lib/_stream_transform.js"),De.PassThrough=oe("./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(oe,ze,De){var fe=function(me){"use strict";var ke=Object.prototype,Ce=ke.hasOwnProperty,Se,Me=typeof Symbol=="function"?Symbol:{},ve=Me.iterator||"@@iterator",we=Me.asyncIterator||"@@asyncIterator",de=Me.toStringTag||"@@toStringTag";function z(St,Pt,wt){return Object.defineProperty(St,Pt,{value:wt,enumerable:!0,configurable:!0,writable:!0}),St[Pt]}try{z({},"")}catch(St){z=function(Pt,wt,pt){return Pt[wt]=pt}}function ee(St,Pt,wt,pt){var ft=Pt&&Pt.prototype instanceof je?Pt:je,ht=Object.create(ft.prototype),Et=new Ct(pt||[]);return ht._invoke=Ke(St,wt,Et),ht}me.wrap=ee;function ae(St,Pt,wt){try{return{type:"normal",arg:St.call(Pt,wt)}}catch(pt){return{type:"throw",arg:pt}}}var ie="suspendedStart",le="suspendedYield",ue="executing",ge="completed",Pe={};function je(){}function Be(){}function Fe(){}var Ne={};z(Ne,ve,function(){return this});var Ae=Object.getPrototypeOf,Ie=Ae&&Ae(Ae($e([])));Ie&&Ie!==ke&&Ce.call(Ie,ve)&&(Ne=Ie);var We=Fe.prototype=je.prototype=Object.create(Ne);Be.prototype=Fe,z(We,"constructor",Fe),z(Fe,"constructor",Be),Be.displayName=z(Fe,de,"GeneratorFunction");function Ye(St){["next","throw","return"].forEach(function(Pt){z(St,Pt,function(wt){return this._invoke(Pt,wt)})})}me.isGeneratorFunction=function(St){var Pt=typeof St=="function"&&St.constructor;return Pt?Pt===Be||(Pt.displayName||Pt.name)==="GeneratorFunction":!1},me.mark=function(St){return Object.setPrototypeOf?Object.setPrototypeOf(St,Fe):(St.__proto__=Fe,z(St,de,"GeneratorFunction")),St.prototype=Object.create(We),St},me.awrap=function(St){return{__await:St}};function Ue(St,Pt){function wt(ht,Et,mt,yt){var At=ae(St[ht],St,Et);if(At.type==="throw")yt(At.arg);else{var xt=At.arg,tt=xt.value;return tt&&typeof tt=="object"&&Ce.call(tt,"__await")?Pt.resolve(tt.__await).then(function(Ve){wt("next",Ve,mt,yt)},function(Ve){wt("throw",Ve,mt,yt)}):Pt.resolve(tt).then(function(Ve){xt.value=Ve,mt(xt)},function(Ve){return wt("throw",Ve,mt,yt)})}}var pt;function ft(ht,Et){function mt(){return new Pt(function(yt,At){wt(ht,Et,yt,At)})}return pt=pt?pt.then(mt,mt):mt()}this._invoke=ft}Ye(Ue.prototype),z(Ue.prototype,we,function(){return this}),me.AsyncIterator=Ue,me.async=function(St,Pt,wt,pt,ft){ft===void 0&&(ft=Promise);var ht=new Ue(ee(St,Pt,wt,pt),ft);return me.isGeneratorFunction(Pt)?ht:ht.next().then(function(Et){return Et.done?Et.value:ht.next()})};function Ke(St,Pt,wt){var pt=ie;return function(ht,Et){if(pt===ue)throw new Error("Generator is already running");if(pt===ge){if(ht==="throw")throw Et;return rt()}for(wt.method=ht,wt.arg=Et;;){var mt=wt.delegate;if(mt){var yt=ot(mt,wt);if(yt){if(yt===Pe)continue;return yt}}if(wt.method==="next")wt.sent=wt._sent=wt.arg;else if(wt.method==="throw"){if(pt===ie)throw pt=ge,wt.arg;wt.dispatchException(wt.arg)}else wt.method==="return"&&wt.abrupt("return",wt.arg);pt=ue;var At=ae(St,Pt,wt);if(At.type==="normal"){if(pt=wt.done?ge:le,At.arg===Pe)continue;return{value:At.arg,done:wt.done}}else At.type==="throw"&&(pt=ge,wt.method="throw",wt.arg=At.arg)}}}function ot(St,Pt){var wt=St.iterator[Pt.method];if(wt===Se){if(Pt.delegate=null,Pt.method==="throw"){if(St.iterator.return&&(Pt.method="return",Pt.arg=Se,ot(St,Pt),Pt.method==="throw"))return Pe;Pt.method="throw",Pt.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pe}var pt=ae(wt,St.iterator,Pt.arg);if(pt.type==="throw")return Pt.method="throw",Pt.arg=pt.arg,Pt.delegate=null,Pe;var ft=pt.arg;if(!ft)return Pt.method="throw",Pt.arg=new TypeError("iterator result is not an object"),Pt.delegate=null,Pe;if(ft.done)Pt[St.resultName]=ft.value,Pt.next=St.nextLoc,Pt.method!=="return"&&(Pt.method="next",Pt.arg=Se);else return ft;return Pt.delegate=null,Pe}Ye(We),z(We,de,"Generator"),z(We,ve,function(){return this}),z(We,"toString",function(){return"[object Generator]"});function st(St){var Pt={tryLoc:St[0]};1 in St&&(Pt.catchLoc=St[1]),2 in St&&(Pt.finallyLoc=St[2],Pt.afterLoc=St[3]),this.tryEntries.push(Pt)}function dt(St){var Pt=St.completion||{};Pt.type="normal",delete Pt.arg,St.completion=Pt}function Ct(St){this.tryEntries=[{tryLoc:"root"}],St.forEach(st,this),this.reset(!0)}me.keys=function(St){var Pt=[];for(var wt in St)Pt.push(wt);return Pt.reverse(),function pt(){for(;Pt.length;){var ft=Pt.pop();if(ft in St)return pt.value=ft,pt.done=!1,pt}return pt.done=!0,pt}};function $e(St){if(St){var Pt=St[ve];if(Pt)return Pt.call(St);if(typeof St.next=="function")return St;if(!isNaN(St.length)){var wt=-1,pt=function ft(){for(;++wt<St.length;)if(Ce.call(St,wt))return ft.value=St[wt],ft.done=!1,ft;return ft.value=Se,ft.done=!0,ft};return pt.next=pt}}return{next:rt}}me.values=$e;function rt(){return{value:Se,done:!0}}return Ct.prototype={constructor:Ct,reset:function(St){if(this.prev=0,this.next=0,this.sent=this._sent=Se,this.done=!1,this.delegate=null,this.method="next",this.arg=Se,this.tryEntries.forEach(dt),!St)for(var Pt in this)Pt.charAt(0)==="t"&&Ce.call(this,Pt)&&!isNaN(+Pt.slice(1))&&(this[Pt]=Se)},stop:function(){this.done=!0;var St=this.tryEntries[0],Pt=St.completion;if(Pt.type==="throw")throw Pt.arg;return this.rval},dispatchException:function(St){if(this.done)throw St;var Pt=this;function wt(yt,At){return ht.type="throw",ht.arg=St,Pt.next=yt,At&&(Pt.method="next",Pt.arg=Se),!!At}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var ft=this.tryEntries[pt],ht=ft.completion;if(ft.tryLoc==="root")return wt("end");if(ft.tryLoc<=this.prev){var Et=Ce.call(ft,"catchLoc"),mt=Ce.call(ft,"finallyLoc");if(Et&&mt){if(this.prev<ft.catchLoc)return wt(ft.catchLoc,!0);if(this.prev<ft.finallyLoc)return wt(ft.finallyLoc)}else if(Et){if(this.prev<ft.catchLoc)return wt(ft.catchLoc,!0)}else if(mt){if(this.prev<ft.finallyLoc)return wt(ft.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(St,Pt){for(var wt=this.tryEntries.length-1;wt>=0;--wt){var pt=this.tryEntries[wt];if(pt.tryLoc<=this.prev&&Ce.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var ft=pt;break}}ft&&(St==="break"||St==="continue")&&ft.tryLoc<=Pt&&Pt<=ft.finallyLoc&&(ft=null);var ht=ft?ft.completion:{};return ht.type=St,ht.arg=Pt,ft?(this.method="next",this.next=ft.finallyLoc,Pe):this.complete(ht)},complete:function(St,Pt){if(St.type==="throw")throw St.arg;return St.type==="break"||St.type==="continue"?this.next=St.arg:St.type==="return"?(this.rval=this.arg=St.arg,this.method="return",this.next="end"):St.type==="normal"&&Pt&&(this.next=Pt),Pe},finish:function(St){for(var Pt=this.tryEntries.length-1;Pt>=0;--Pt){var wt=this.tryEntries[Pt];if(wt.finallyLoc===St)return this.complete(wt.completion,wt.afterLoc),dt(wt),Pe}},catch:function(St){for(var Pt=this.tryEntries.length-1;Pt>=0;--Pt){var wt=this.tryEntries[Pt];if(wt.tryLoc===St){var pt=wt.completion;if(pt.type==="throw"){var ft=pt.arg;dt(wt)}return ft}}throw new Error("illegal catch attempt")},delegateYield:function(St,Pt,wt){return this.delegate={iterator:$e(St),resultName:Pt,nextLoc:wt},this.method==="next"&&(this.arg=Se),Pe}},me}(typeof ze=="object"?ze.exports:{});try{regeneratorRuntime=fe}catch(me){typeof globalThis=="object"?globalThis.regeneratorRuntime=fe:Function("r","regeneratorRuntime = r")(fe)}},{}],396:[function(oe,ze,De){var fe=oe("buffer"),me=fe.Buffer;function ke(Se,Me){for(var ve in Se)Me[ve]=Se[ve]}me.from&&me.alloc&&me.allocUnsafe&&me.allocUnsafeSlow?ze.exports=fe:(ke(fe,De),De.Buffer=Ce);function Ce(Se,Me,ve){return me(Se,Me,ve)}ke(me,Ce),Ce.from=function(Se,Me,ve){if(typeof Se=="number")throw new TypeError("Argument must not be a number");return me(Se,Me,ve)},Ce.alloc=function(Se,Me,ve){if(typeof Se!="number")throw new TypeError("Argument must be a number");var we=me(Se);return Me!==void 0?typeof ve=="string"?we.fill(Me,ve):we.fill(Me):we.fill(0),we},Ce.allocUnsafe=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return me(Se)},Ce.allocUnsafeSlow=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return fe.SlowBuffer(Se)}},{buffer:90}],397:[function(oe,ze,De){(function(fe){(function(){(function(me){me.parser=function(xt,tt){return new Ce(xt,tt)},me.SAXParser=Ce,me.SAXStream=ee,me.createStream=z,me.MAX_BUFFER_LENGTH=64*1024;var ke=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];me.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function Ce(xt,tt){if(!(this instanceof Ce))return new Ce(xt,tt);var Ve=this;Me(Ve),Ve.q=Ve.c="",Ve.bufferCheckPosition=me.MAX_BUFFER_LENGTH,Ve.opt=tt||{},Ve.opt.lowercase=Ve.opt.lowercase||Ve.opt.lowercasetags,Ve.looseCase=Ve.opt.lowercase?"toLowerCase":"toUpperCase",Ve.tags=[],Ve.closed=Ve.closedRoot=Ve.sawRoot=!1,Ve.tag=Ve.error=null,Ve.strict=!!xt,Ve.noscript=!!(xt||Ve.opt.noscript),Ve.state=Ue.BEGIN,Ve.strictEntities=Ve.opt.strictEntities,Ve.ENTITIES=Ve.strictEntities?Object.create(me.XML_ENTITIES):Object.create(me.ENTITIES),Ve.attribList=[],Ve.opt.xmlns&&(Ve.ns=Object.create(ge)),Ve.trackPosition=Ve.opt.position!==!1,Ve.trackPosition&&(Ve.position=Ve.line=Ve.column=0),ot(Ve,"onready")}Object.create||(Object.create=function(xt){function tt(){}tt.prototype=xt;var Ve=new tt;return Ve}),Object.keys||(Object.keys=function(xt){var tt=[];for(var Ve in xt)xt.hasOwnProperty(Ve)&&tt.push(Ve);return tt});function Se(xt){for(var tt=Math.max(me.MAX_BUFFER_LENGTH,10),Ve=0,xe=0,Le=ke.length;xe<Le;xe++){var Ze=xt[ke[xe]].length;if(Ze>tt)switch(ke[xe]){case"textNode":dt(xt);break;case"cdata":st(xt,"oncdata",xt.cdata),xt.cdata="";break;case"script":st(xt,"onscript",xt.script),xt.script="";break;default:$e(xt,"Max buffer length exceeded: "+ke[xe])}Ve=Math.max(Ve,Ze)}var nt=me.MAX_BUFFER_LENGTH-Ve;xt.bufferCheckPosition=nt+xt.position}function Me(xt){for(var tt=0,Ve=ke.length;tt<Ve;tt++)xt[ke[tt]]=""}function ve(xt){dt(xt),xt.cdata!==""&&(st(xt,"oncdata",xt.cdata),xt.cdata=""),xt.script!==""&&(st(xt,"onscript",xt.script),xt.script="")}Ce.prototype={end:function(){rt(this)},write:At,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){ve(this)}};var we;try{we=oe("stream").Stream}catch(xt){we=function(){}}var de=me.EVENTS.filter(function(xt){return xt!=="error"&&xt!=="end"});function z(xt,tt){return new ee(xt,tt)}function ee(xt,tt){if(!(this instanceof ee))return new ee(xt,tt);we.apply(this),this._parser=new Ce(xt,tt),this.writable=!0,this.readable=!0;var Ve=this;this._parser.onend=function(){Ve.emit("end")},this._parser.onerror=function(xe){Ve.emit("error",xe),Ve._parser.error=null},this._decoder=null,de.forEach(function(xe){Object.defineProperty(Ve,"on"+xe,{get:function(){return Ve._parser["on"+xe]},set:function(Le){if(!Le)return Ve.removeAllListeners(xe),Ve._parser["on"+xe]=Le,Le;Ve.on(xe,Le)},enumerable:!0,configurable:!1})})}ee.prototype=Object.create(we.prototype,{constructor:{value:ee}}),ee.prototype.write=function(xt){if(typeof fe=="function"&&typeof fe.isBuffer=="function"&&fe.isBuffer(xt)){if(!this._decoder){var tt=oe("string_decoder").StringDecoder;this._decoder=new tt("utf8")}xt=this._decoder.write(xt)}return this._parser.write(xt.toString()),this.emit("data",xt),!0},ee.prototype.end=function(xt){return xt&&xt.length&&this.write(xt),this._parser.end(),!0},ee.prototype.on=function(xt,tt){var Ve=this;return!Ve._parser["on"+xt]&&de.indexOf(xt)!==-1&&(Ve._parser["on"+xt]=function(){var xe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);xe.splice(0,0,xt),Ve.emit.apply(Ve,xe)}),we.prototype.on.call(Ve,xt,tt)};var ae="[CDATA[",ie="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",ge={xml:le,xmlns:ue},Pe=/[:_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]/,je=/[:_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-]/,Be=/[#:_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 Ne(xt){return xt===" "||xt===`
`||xt==="\r"||xt===" "}function Ae(xt){return xt==='"'||xt==="'"}function Ie(xt){return xt===">"||Ne(xt)}function We(xt,tt){return xt.test(tt)}function Ye(xt,tt){return!We(xt,tt)}var Ue=0;me.STATE={BEGIN:Ue++,BEGIN_WHITESPACE:Ue++,TEXT:Ue++,TEXT_ENTITY:Ue++,OPEN_WAKA:Ue++,SGML_DECL:Ue++,SGML_DECL_QUOTED:Ue++,DOCTYPE:Ue++,DOCTYPE_QUOTED:Ue++,DOCTYPE_DTD:Ue++,DOCTYPE_DTD_QUOTED:Ue++,COMMENT_STARTING:Ue++,COMMENT:Ue++,COMMENT_ENDING:Ue++,COMMENT_ENDED:Ue++,CDATA:Ue++,CDATA_ENDING:Ue++,CDATA_ENDING_2:Ue++,PROC_INST:Ue++,PROC_INST_BODY:Ue++,PROC_INST_ENDING:Ue++,OPEN_TAG:Ue++,OPEN_TAG_SLASH:Ue++,ATTRIB:Ue++,ATTRIB_NAME:Ue++,ATTRIB_NAME_SAW_WHITE:Ue++,ATTRIB_VALUE:Ue++,ATTRIB_VALUE_QUOTED:Ue++,ATTRIB_VALUE_CLOSED:Ue++,ATTRIB_VALUE_UNQUOTED:Ue++,ATTRIB_VALUE_ENTITY_Q:Ue++,ATTRIB_VALUE_ENTITY_U:Ue++,CLOSE_TAG:Ue++,CLOSE_TAG_SAW_WHITE:Ue++,SCRIPT:Ue++,SCRIPT_ENDING:Ue++},me.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},me.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(me.ENTITIES).forEach(function(xt){var tt=me.ENTITIES[xt],Ve=typeof tt=="number"?String.fromCharCode(tt):tt;me.ENTITIES[xt]=Ve});for(var Ke in me.STATE)me.STATE[me.STATE[Ke]]=Ke;Ue=me.STATE;function ot(xt,tt,Ve){xt[tt]&&xt[tt](Ve)}function st(xt,tt,Ve){xt.textNode&&dt(xt),ot(xt,tt,Ve)}function dt(xt){xt.textNode=Ct(xt.opt,xt.textNode),xt.textNode&&ot(xt,"ontext",xt.textNode),xt.textNode=""}function Ct(xt,tt){return xt.trim&&(tt=tt.trim()),xt.normalize&&(tt=tt.replace(/\s+/g," ")),tt}function $e(xt,tt){return dt(xt),xt.trackPosition&&(tt+=`
Line: `+xt.line+`
Column: `+xt.column+`
Char: `+xt.c),tt=new Error(tt),xt.error=tt,ot(xt,"onerror",tt),xt}function rt(xt){return xt.sawRoot&&!xt.closedRoot&&St(xt,"Unclosed root tag"),xt.state!==Ue.BEGIN&&xt.state!==Ue.BEGIN_WHITESPACE&&xt.state!==Ue.TEXT&&$e(xt,"Unexpected end"),dt(xt),xt.c="",xt.closed=!0,ot(xt,"onend"),Ce.call(xt,xt.strict,xt.opt),xt}function St(xt,tt){if(typeof xt!="object"||!(xt instanceof Ce))throw new Error("bad call to strictFail");xt.strict&&$e(xt,tt)}function Pt(xt){xt.strict||(xt.tagName=xt.tagName[xt.looseCase]());var tt=xt.tags[xt.tags.length-1]||xt,Ve=xt.tag={name:xt.tagName,attributes:{}};xt.opt.xmlns&&(Ve.ns=tt.ns),xt.attribList.length=0,st(xt,"onopentagstart",Ve)}function wt(xt,tt){var Ve=xt.indexOf(":"),xe=Ve<0?["",xt]:xt.split(":"),Le=xe[0],Ze=xe[1];return tt&&xt==="xmlns"&&(Le="xmlns",Ze=""),{prefix:Le,local:Ze}}function pt(xt){if(xt.strict||(xt.attribName=xt.attribName[xt.looseCase]()),xt.attribList.indexOf(xt.attribName)!==-1||xt.tag.attributes.hasOwnProperty(xt.attribName)){xt.attribName=xt.attribValue="";return}if(xt.opt.xmlns){var tt=wt(xt.attribName,!0),Ve=tt.prefix,xe=tt.local;if(Ve==="xmlns")if(xe==="xml"&&xt.attribValue!==le)St(xt,"xml: prefix must be bound to "+le+`
Actual: `+xt.attribValue);else if(xe==="xmlns"&&xt.attribValue!==ue)St(xt,"xmlns: prefix must be bound to "+ue+`
Actual: `+xt.attribValue);else{var Le=xt.tag,Ze=xt.tags[xt.tags.length-1]||xt;Le.ns===Ze.ns&&(Le.ns=Object.create(Ze.ns)),Le.ns[xe]=xt.attribValue}xt.attribList.push([xt.attribName,xt.attribValue])}else xt.tag.attributes[xt.attribName]=xt.attribValue,st(xt,"onattribute",{name:xt.attribName,value:xt.attribValue});xt.attribName=xt.attribValue=""}function ft(xt,tt){if(xt.opt.xmlns){var Ve=xt.tag,xe=wt(xt.tagName);Ve.prefix=xe.prefix,Ve.local=xe.local,Ve.uri=Ve.ns[xe.prefix]||"",Ve.prefix&&!Ve.uri&&(St(xt,"Unbound namespace prefix: "+JSON.stringify(xt.tagName)),Ve.uri=xe.prefix);var Le=xt.tags[xt.tags.length-1]||xt;Ve.ns&&Le.ns!==Ve.ns&&Object.keys(Ve.ns).forEach(function(Dt){st(xt,"onopennamespace",{prefix:Dt,uri:Ve.ns[Dt]})});for(var Ze=0,nt=xt.attribList.length;Ze<nt;Ze++){var Re=xt.attribList[Ze],_e=Re[0],He=Re[1],Qe=wt(_e,!0),ut=Qe.prefix,gt=Qe.local,Mt=ut===""?"":Ve.ns[ut]||"",Nt={name:_e,value:He,prefix:ut,local:gt,uri:Mt};ut&&ut!=="xmlns"&&!Mt&&(St(xt,"Unbound namespace prefix: "+JSON.stringify(ut)),Nt.uri=ut),xt.tag.attributes[_e]=Nt,st(xt,"onattribute",Nt)}xt.attribList.length=0}xt.tag.isSelfClosing=!!tt,xt.sawRoot=!0,xt.tags.push(xt.tag),st(xt,"onopentag",xt.tag),tt||(!xt.noscript&&xt.tagName.toLowerCase()==="script"?xt.state=Ue.SCRIPT:xt.state=Ue.TEXT,xt.tag=null,xt.tagName=""),xt.attribName=xt.attribValue="",xt.attribList.length=0}function ht(xt){if(!xt.tagName){St(xt,"Weird empty close tag."),xt.textNode+="</>",xt.state=Ue.TEXT;return}if(xt.script){if(xt.tagName!=="script"){xt.script+="</"+xt.tagName+">",xt.tagName="",xt.state=Ue.SCRIPT;return}st(xt,"onscript",xt.script),xt.script=""}var tt=xt.tags.length,Ve=xt.tagName;xt.strict||(Ve=Ve[xt.looseCase]());for(var xe=Ve;tt--;){var Le=xt.tags[tt];if(Le.name!==xe)St(xt,"Unexpected close tag");else break}if(tt<0){St(xt,"Unmatched closing tag: "+xt.tagName),xt.textNode+="</"+xt.tagName+">",xt.state=Ue.TEXT;return}xt.tagName=Ve;for(var Ze=xt.tags.length;Ze-- >tt;){var nt=xt.tag=xt.tags.pop();xt.tagName=xt.tag.name,st(xt,"onclosetag",xt.tagName);var Re={};for(var _e in nt.ns)Re[_e]=nt.ns[_e];var He=xt.tags[xt.tags.length-1]||xt;xt.opt.xmlns&&nt.ns!==He.ns&&Object.keys(nt.ns).forEach(function(Qe){var ut=nt.ns[Qe];st(xt,"onclosenamespace",{prefix:Qe,uri:ut})})}tt===0&&(xt.closedRoot=!0),xt.tagName=xt.attribValue=xt.attribName="",xt.attribList.length=0,xt.state=Ue.TEXT}function Et(xt){var tt=xt.entity,Ve=tt.toLowerCase(),xe,Le="";return xt.ENTITIES[tt]?xt.ENTITIES[tt]:xt.ENTITIES[Ve]?xt.ENTITIES[Ve]:(tt=Ve,tt.charAt(0)==="#"&&(tt.charAt(1)==="x"?(tt=tt.slice(2),xe=parseInt(tt,16),Le=xe.toString(16)):(tt=tt.slice(1),xe=parseInt(tt,10),Le=xe.toString(10))),tt=tt.replace(/^0+/,""),isNaN(xe)||Le.toLowerCase()!==tt?(St(xt,"Invalid character entity"),"&"+xt.entity+";"):String.fromCodePoint(xe))}function mt(xt,tt){tt==="<"?(xt.state=Ue.OPEN_WAKA,xt.startTagPosition=xt.position):Ne(tt)||(St(xt,"Non-whitespace before first tag."),xt.textNode=tt,xt.state=Ue.TEXT)}function yt(xt,tt){var Ve="";return tt<xt.length&&(Ve=xt.charAt(tt)),Ve}function At(xt){var tt=this;if(this.error)throw this.error;if(tt.closed)return $e(tt,"Cannot write after close. Assign an onready handler.");if(xt===null)return rt(tt);typeof xt=="object"&&(xt=xt.toString());for(var Ve=0,xe="";xe=yt(xt,Ve++),tt.c=xe,!!xe;)switch(tt.trackPosition&&(tt.position++,xe===`
`?(tt.line++,tt.column=0):tt.column++),tt.state){case Ue.BEGIN:if(tt.state=Ue.BEGIN_WHITESPACE,xe==="\uFEFF")continue;mt(tt,xe);continue;case Ue.BEGIN_WHITESPACE:mt(tt,xe);continue;case Ue.TEXT:if(tt.sawRoot&&!tt.closedRoot){for(var Le=Ve-1;xe&&xe!=="<"&&xe!=="&";)xe=yt(xt,Ve++),xe&&tt.trackPosition&&(tt.position++,xe===`
`?(tt.line++,tt.column=0):tt.column++);tt.textNode+=xt.substring(Le,Ve-1)}xe==="<"&&!(tt.sawRoot&&tt.closedRoot&&!tt.strict)?(tt.state=Ue.OPEN_WAKA,tt.startTagPosition=tt.position):(!Ne(xe)&&(!tt.sawRoot||tt.closedRoot)&&St(tt,"Text data outside of root node."),xe==="&"?tt.state=Ue.TEXT_ENTITY:tt.textNode+=xe);continue;case Ue.SCRIPT:xe==="<"?tt.state=Ue.SCRIPT_ENDING:tt.script+=xe;continue;case Ue.SCRIPT_ENDING:xe==="/"?tt.state=Ue.CLOSE_TAG:(tt.script+="<"+xe,tt.state=Ue.SCRIPT);continue;case Ue.OPEN_WAKA:if(xe==="!")tt.state=Ue.SGML_DECL,tt.sgmlDecl="";else if(!Ne(xe))if(We(Pe,xe))tt.state=Ue.OPEN_TAG,tt.tagName=xe;else if(xe==="/")tt.state=Ue.CLOSE_TAG,tt.tagName="";else if(xe==="?")tt.state=Ue.PROC_INST,tt.procInstName=tt.procInstBody="";else{if(St(tt,"Unencoded <"),tt.startTagPosition+1<tt.position){var Ze=tt.position-tt.startTagPosition;xe=new Array(Ze).join(" ")+xe}tt.textNode+="<"+xe,tt.state=Ue.TEXT}continue;case Ue.SGML_DECL:(tt.sgmlDecl+xe).toUpperCase()===ae?(st(tt,"onopencdata"),tt.state=Ue.CDATA,tt.sgmlDecl="",tt.cdata=""):tt.sgmlDecl+xe==="--"?(tt.state=Ue.COMMENT,tt.comment="",tt.sgmlDecl=""):(tt.sgmlDecl+xe).toUpperCase()===ie?(tt.state=Ue.DOCTYPE,(tt.doctype||tt.sawRoot)&&St(tt,"Inappropriately located doctype declaration"),tt.doctype="",tt.sgmlDecl=""):xe===">"?(st(tt,"onsgmldeclaration",tt.sgmlDecl),tt.sgmlDecl="",tt.state=Ue.TEXT):(Ae(xe)&&(tt.state=Ue.SGML_DECL_QUOTED),tt.sgmlDecl+=xe);continue;case Ue.SGML_DECL_QUOTED:xe===tt.q&&(tt.state=Ue.SGML_DECL,tt.q=""),tt.sgmlDecl+=xe;continue;case Ue.DOCTYPE:xe===">"?(tt.state=Ue.TEXT,st(tt,"ondoctype",tt.doctype),tt.doctype=!0):(tt.doctype+=xe,xe==="["?tt.state=Ue.DOCTYPE_DTD:Ae(xe)&&(tt.state=Ue.DOCTYPE_QUOTED,tt.q=xe));continue;case Ue.DOCTYPE_QUOTED:tt.doctype+=xe,xe===tt.q&&(tt.q="",tt.state=Ue.DOCTYPE);continue;case Ue.DOCTYPE_DTD:tt.doctype+=xe,xe==="]"?tt.state=Ue.DOCTYPE:Ae(xe)&&(tt.state=Ue.DOCTYPE_DTD_QUOTED,tt.q=xe);continue;case Ue.DOCTYPE_DTD_QUOTED:tt.doctype+=xe,xe===tt.q&&(tt.state=Ue.DOCTYPE_DTD,tt.q="");continue;case Ue.COMMENT:xe==="-"?tt.state=Ue.COMMENT_ENDING:tt.comment+=xe;continue;case Ue.COMMENT_ENDING:xe==="-"?(tt.state=Ue.COMMENT_ENDED,tt.comment=Ct(tt.opt,tt.comment),tt.comment&&st(tt,"oncomment",tt.comment),tt.comment=""):(tt.comment+="-"+xe,tt.state=Ue.COMMENT);continue;case Ue.COMMENT_ENDED:xe!==">"?(St(tt,"Malformed comment"),tt.comment+="--"+xe,tt.state=Ue.COMMENT):tt.state=Ue.TEXT;continue;case Ue.CDATA:xe==="]"?tt.state=Ue.CDATA_ENDING:tt.cdata+=xe;continue;case Ue.CDATA_ENDING:xe==="]"?tt.state=Ue.CDATA_ENDING_2:(tt.cdata+="]"+xe,tt.state=Ue.CDATA);continue;case Ue.CDATA_ENDING_2:xe===">"?(tt.cdata&&st(tt,"oncdata",tt.cdata),st(tt,"onclosecdata"),tt.cdata="",tt.state=Ue.TEXT):xe==="]"?tt.cdata+="]":(tt.cdata+="]]"+xe,tt.state=Ue.CDATA);continue;case Ue.PROC_INST:xe==="?"?tt.state=Ue.PROC_INST_ENDING:Ne(xe)?tt.state=Ue.PROC_INST_BODY:tt.procInstName+=xe;continue;case Ue.PROC_INST_BODY:if(!tt.procInstBody&&Ne(xe))continue;xe==="?"?tt.state=Ue.PROC_INST_ENDING:tt.procInstBody+=xe;continue;case Ue.PROC_INST_ENDING:xe===">"?(st(tt,"onprocessinginstruction",{name:tt.procInstName,body:tt.procInstBody}),tt.procInstName=tt.procInstBody="",tt.state=Ue.TEXT):(tt.procInstBody+="?"+xe,tt.state=Ue.PROC_INST_BODY);continue;case Ue.OPEN_TAG:We(je,xe)?tt.tagName+=xe:(Pt(tt),xe===">"?ft(tt):xe==="/"?tt.state=Ue.OPEN_TAG_SLASH:(Ne(xe)||St(tt,"Invalid character in tag name"),tt.state=Ue.ATTRIB));continue;case Ue.OPEN_TAG_SLASH:xe===">"?(ft(tt,!0),ht(tt)):(St(tt,"Forward-slash in opening tag not followed by >"),tt.state=Ue.ATTRIB);continue;case Ue.ATTRIB:if(Ne(xe))continue;xe===">"?ft(tt):xe==="/"?tt.state=Ue.OPEN_TAG_SLASH:We(Pe,xe)?(tt.attribName=xe,tt.attribValue="",tt.state=Ue.ATTRIB_NAME):St(tt,"Invalid attribute name");continue;case Ue.ATTRIB_NAME:xe==="="?tt.state=Ue.ATTRIB_VALUE:xe===">"?(St(tt,"Attribute without value"),tt.attribValue=tt.attribName,pt(tt),ft(tt)):Ne(xe)?tt.state=Ue.ATTRIB_NAME_SAW_WHITE:We(je,xe)?tt.attribName+=xe:St(tt,"Invalid attribute name");continue;case Ue.ATTRIB_NAME_SAW_WHITE:if(xe==="=")tt.state=Ue.ATTRIB_VALUE;else{if(Ne(xe))continue;St(tt,"Attribute without value"),tt.tag.attributes[tt.attribName]="",tt.attribValue="",st(tt,"onattribute",{name:tt.attribName,value:""}),tt.attribName="",xe===">"?ft(tt):We(Pe,xe)?(tt.attribName=xe,tt.state=Ue.ATTRIB_NAME):(St(tt,"Invalid attribute name"),tt.state=Ue.ATTRIB)}continue;case Ue.ATTRIB_VALUE:if(Ne(xe))continue;Ae(xe)?(tt.q=xe,tt.state=Ue.ATTRIB_VALUE_QUOTED):(St(tt,"Unquoted attribute value"),tt.state=Ue.ATTRIB_VALUE_UNQUOTED,tt.attribValue=xe);continue;case Ue.ATTRIB_VALUE_QUOTED:if(xe!==tt.q){xe==="&"?tt.state=Ue.ATTRIB_VALUE_ENTITY_Q:tt.attribValue+=xe;continue}pt(tt),tt.q="",tt.state=Ue.ATTRIB_VALUE_CLOSED;continue;case Ue.ATTRIB_VALUE_CLOSED:Ne(xe)?tt.state=Ue.ATTRIB:xe===">"?ft(tt):xe==="/"?tt.state=Ue.OPEN_TAG_SLASH:We(Pe,xe)?(St(tt,"No whitespace between attributes"),tt.attribName=xe,tt.attribValue="",tt.state=Ue.ATTRIB_NAME):St(tt,"Invalid attribute name");continue;case Ue.ATTRIB_VALUE_UNQUOTED:if(!Ie(xe)){xe==="&"?tt.state=Ue.ATTRIB_VALUE_ENTITY_U:tt.attribValue+=xe;continue}pt(tt),xe===">"?ft(tt):tt.state=Ue.ATTRIB;continue;case Ue.CLOSE_TAG:if(tt.tagName)xe===">"?ht(tt):We(je,xe)?tt.tagName+=xe:tt.script?(tt.script+="</"+tt.tagName,tt.tagName="",tt.state=Ue.SCRIPT):(Ne(xe)||St(tt,"Invalid tagname in closing tag"),tt.state=Ue.CLOSE_TAG_SAW_WHITE);else{if(Ne(xe))continue;Ye(Pe,xe)?tt.script?(tt.script+="</"+xe,tt.state=Ue.SCRIPT):St(tt,"Invalid tagname in closing tag."):tt.tagName=xe}continue;case Ue.CLOSE_TAG_SAW_WHITE:if(Ne(xe))continue;xe===">"?ht(tt):St(tt,"Invalid characters in closing tag");continue;case Ue.TEXT_ENTITY:case Ue.ATTRIB_VALUE_ENTITY_Q:case Ue.ATTRIB_VALUE_ENTITY_U:var nt,Re;switch(tt.state){case Ue.TEXT_ENTITY:nt=Ue.TEXT,Re="textNode";break;case Ue.ATTRIB_VALUE_ENTITY_Q:nt=Ue.ATTRIB_VALUE_QUOTED,Re="attribValue";break;case Ue.ATTRIB_VALUE_ENTITY_U:nt=Ue.ATTRIB_VALUE_UNQUOTED,Re="attribValue";break}xe===";"?(tt[Re]+=Et(tt),tt.entity="",tt.state=nt):We(tt.entity.length?Fe:Be,xe)?tt.entity+=xe:(St(tt,"Invalid character in entity name"),tt[Re]+="&"+tt.entity+xe,tt.entity="",tt.state=nt);continue;default:throw new Error(tt,"Unknown state: "+tt.state)}return tt.position>=tt.bufferCheckPosition&&Se(tt),tt}String.fromCodePoint||function(){var xt=String.fromCharCode,tt=Math.floor,Ve=function(){var xe=16384,Le=[],Ze,nt,Re=-1,_e=arguments.length;if(!_e)return"";for(var He="";++Re<_e;){var Qe=Number(arguments[Re]);if(!isFinite(Qe)||Qe<0||Qe>1114111||tt(Qe)!==Qe)throw RangeError("Invalid code point: "+Qe);Qe<=65535?Le.push(Qe):(Qe-=65536,Ze=(Qe>>10)+55296,nt=Qe%1024+56320,Le.push(Ze,nt)),(Re+1===_e||Le.length>xe)&&(He+=xt.apply(null,Le),Le.length=0)}return He};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Ve,configurable:!0,writable:!0}):String.fromCodePoint=Ve}()})(typeof De=="undefined"?this.sax={}:De)}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(oe,ze,De){ze.exports=ke;var fe=oe("events").EventEmitter,me=oe("inherits");me(ke,fe),ke.Readable=oe("readable-stream/lib/_stream_readable.js"),ke.Writable=oe("readable-stream/lib/_stream_writable.js"),ke.Duplex=oe("readable-stream/lib/_stream_duplex.js"),ke.Transform=oe("readable-stream/lib/_stream_transform.js"),ke.PassThrough=oe("readable-stream/lib/_stream_passthrough.js"),ke.finished=oe("readable-stream/lib/internal/streams/end-of-stream.js"),ke.pipeline=oe("readable-stream/lib/internal/streams/pipeline.js"),ke.Stream=ke;function ke(){fe.call(this)}ke.prototype.pipe=function(Ce,Se){var Me=this;function ve(le){Ce.writable&&Ce.write(le)===!1&&Me.pause&&Me.pause()}Me.on("data",ve);function we(){Me.readable&&Me.resume&&Me.resume()}Ce.on("drain",we),!Ce._isStdio&&(!Se||Se.end!==!1)&&(Me.on("end",z),Me.on("close",ee));var de=!1;function z(){de||(de=!0,Ce.end())}function ee(){de||(de=!0,typeof Ce.destroy=="function"&&Ce.destroy())}function ae(le){if(ie(),fe.listenerCount(this,"error")===0)throw le}Me.on("error",ae),Ce.on("error",ae);function ie(){Me.removeListener("data",ve),Ce.removeListener("drain",we),Me.removeListener("end",z),Me.removeListener("close",ee),Me.removeListener("error",ae),Ce.removeListener("error",ae),Me.removeListener("end",ie),Me.removeListener("close",ie),Ce.removeListener("close",ie)}return Me.on("end",ie),Me.on("close",ie),Ce.on("close",ie),Ce.emit("pipe",Me),Ce}},{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(oe,ze,De){"use strict";function fe(we,de){we.prototype=Object.create(de.prototype),we.prototype.constructor=we,we.__proto__=de}var me={};function ke(we,de,z){z||(z=Error);function ee(ie,le,ue){return typeof de=="string"?de:de(ie,le,ue)}var ae=function(ie){fe(le,ie);function le(ue,ge,Pe){return ie.call(this,ee(ue,ge,Pe))||this}return le}(z);ae.prototype.name=z.name,ae.prototype.code=we,me[we]=ae}function Ce(we,de){if(Array.isArray(we)){var z=we.length;return we=we.map(function(ee){return String(ee)}),z>2?"one of ".concat(de," ").concat(we.slice(0,z-1).join(", "),", or ")+we[z-1]:z===2?"one of ".concat(de," ").concat(we[0]," or ").concat(we[1]):"of ".concat(de," ").concat(we[0])}else return"of ".concat(de," ").concat(String(we))}function Se(we,de,z){return we.substr(!z||z<0?0:+z,de.length)===de}function Me(we,de,z){return(z===void 0||z>we.length)&&(z=we.length),we.substring(z-de.length,z)===de}function ve(we,de,z){return typeof z!="number"&&(z=0),z+de.length>we.length?!1:we.indexOf(de,z)!==-1}ke("ERR_INVALID_OPT_VALUE",function(we,de){return'The value "'+de+'" is invalid for option "'+we+'"'},TypeError),ke("ERR_INVALID_ARG_TYPE",function(we,de,z){var ee;typeof de=="string"&&Se(de,"not ")?(ee="must not be",de=de.replace(/^not /,"")):ee="must be";var ae;if(Me(we," argument"))ae="The ".concat(we," ").concat(ee," ").concat(Ce(de,"type"));else{var ie=ve(we,".")?"property":"argument";ae='The "'.concat(we,'" ').concat(ie," ").concat(ee," ").concat(Ce(de,"type"))}return ae+=". Received type ".concat(typeof z),ae},TypeError),ke("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ke("ERR_METHOD_NOT_IMPLEMENTED",function(we){return"The "+we+" method is not implemented"}),ke("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ke("ERR_STREAM_DESTROYED",function(we){return"Cannot call "+we+" after a stream was destroyed"}),ke("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ke("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ke("ERR_STREAM_WRITE_AFTER_END","write after end"),ke("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ke("ERR_UNKNOWN_ENCODING",function(we){return"Unknown encoding: "+we},TypeError),ke("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ze.exports.codes=me},{}],400:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=Object.keys||function(ee){var ae=[];for(var ie in ee)ae.push(ie);return ae};ze.exports=we;var ke=oe("./_stream_readable"),Ce=oe("./_stream_writable");oe("inherits")(we,ke);for(var Se=me(Ce.prototype),Me=0;Me<Se.length;Me++){var ve=Se[Me];we.prototype[ve]||(we.prototype[ve]=Ce.prototype[ve])}function we(ee){if(!(this instanceof we))return new we(ee);ke.call(this,ee),Ce.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",de)))}Object.defineProperty(we.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(we.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(we.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function de(){this._writableState.ended||fe.nextTick(z,this)}function z(ee){ee.end()}Object.defineProperty(we.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(ae){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=ae,this._writableState.destroyed=ae)}})}).call(this)}).call(this,oe("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(oe,ze,De){"use strict";ze.exports=me;var fe=oe("./_stream_transform");oe("inherits")(me,fe);function me(ke){if(!(this instanceof me))return new me(ke);fe.call(this,ke)}me.prototype._transform=function(ke,Ce,Se){Se(null,ke)}},{"./_stream_transform":403,inherits:364}],402:[function(oe,ze,De){(function(fe,me){(function(){"use strict";ze.exports=st;var ke;st.ReadableState=ot;var Ce=oe("events").EventEmitter,Se=function(_e,He){return _e.listeners(He).length},Me=oe("./internal/streams/stream"),ve=oe("buffer").Buffer,we=(typeof me!="undefined"?me:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function de(Re){return ve.from(Re)}function z(Re){return ve.isBuffer(Re)||Re instanceof we}var ee=oe("util"),ae;ee&&ee.debuglog?ae=ee.debuglog("stream"):ae=function(){};var ie=oe("./internal/streams/buffer_list"),le=oe("./internal/streams/destroy"),ue=oe("./internal/streams/state"),ge=ue.getHighWaterMark,Pe=oe("../errors").codes,je=Pe.ERR_INVALID_ARG_TYPE,Be=Pe.ERR_STREAM_PUSH_AFTER_EOF,Fe=Pe.ERR_METHOD_NOT_IMPLEMENTED,Ne=Pe.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ae,Ie,We;oe("inherits")(st,Me);var Ye=le.errorOrDestroy,Ue=["error","close","destroy","pause","resume"];function Ke(Re,_e,He){if(typeof Re.prependListener=="function")return Re.prependListener(_e,He);!Re._events||!Re._events[_e]?Re.on(_e,He):Array.isArray(Re._events[_e])?Re._events[_e].unshift(He):Re._events[_e]=[He,Re._events[_e]]}function ot(Re,_e,He){ke=ke||oe("./_stream_duplex"),Re=Re||{},typeof He!="boolean"&&(He=_e instanceof ke),this.objectMode=!!Re.objectMode,He&&(this.objectMode=this.objectMode||!!Re.readableObjectMode),this.highWaterMark=ge(this,Re,"readableHighWaterMark",He),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=Re.emitClose!==!1,this.autoDestroy=!!Re.autoDestroy,this.destroyed=!1,this.defaultEncoding=Re.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Re.encoding&&(Ae||(Ae=oe("string_decoder/").StringDecoder),this.decoder=new Ae(Re.encoding),this.encoding=Re.encoding)}function st(Re){if(ke=ke||oe("./_stream_duplex"),!(this instanceof st))return new st(Re);var _e=this instanceof ke;this._readableState=new ot(Re,this,_e),this.readable=!0,Re&&(typeof Re.read=="function"&&(this._read=Re.read),typeof Re.destroy=="function"&&(this._destroy=Re.destroy)),Me.call(this)}Object.defineProperty(st.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(_e){this._readableState&&(this._readableState.destroyed=_e)}}),st.prototype.destroy=le.destroy,st.prototype._undestroy=le.undestroy,st.prototype._destroy=function(Re,_e){_e(Re)},st.prototype.push=function(Re,_e){var He=this._readableState,Qe;return He.objectMode?Qe=!0:typeof Re=="string"&&(_e=_e||He.defaultEncoding,_e!==He.encoding&&(Re=ve.from(Re,_e),_e=""),Qe=!0),dt(this,Re,_e,!1,Qe)},st.prototype.unshift=function(Re){return dt(this,Re,null,!0,!1)};function dt(Re,_e,He,Qe,ut){ae("readableAddChunk",_e);var gt=Re._readableState;if(_e===null)gt.reading=!1,wt(Re,gt);else{var Mt;if(ut||(Mt=$e(gt,_e)),Mt)Ye(Re,Mt);else if(gt.objectMode||_e&&_e.length>0)if(typeof _e!="string"&&!gt.objectMode&&Object.getPrototypeOf(_e)!==ve.prototype&&(_e=de(_e)),Qe)gt.endEmitted?Ye(Re,new Ne):Ct(Re,gt,_e,!0);else if(gt.ended)Ye(Re,new Be);else{if(gt.destroyed)return!1;gt.reading=!1,gt.decoder&&!He?(_e=gt.decoder.write(_e),gt.objectMode||_e.length!==0?Ct(Re,gt,_e,!1):ht(Re,gt)):Ct(Re,gt,_e,!1)}else Qe||(gt.reading=!1,ht(Re,gt))}return!gt.ended&&(gt.length<gt.highWaterMark||gt.length===0)}function Ct(Re,_e,He,Qe){_e.flowing&&_e.length===0&&!_e.sync?(_e.awaitDrain=0,Re.emit("data",He)):(_e.length+=_e.objectMode?1:He.length,Qe?_e.buffer.unshift(He):_e.buffer.push(He),_e.needReadable&&pt(Re)),ht(Re,_e)}function $e(Re,_e){var He;return!z(_e)&&typeof _e!="string"&&_e!==void 0&&!Re.objectMode&&(He=new je("chunk",["string","Buffer","Uint8Array"],_e)),He}st.prototype.isPaused=function(){return this._readableState.flowing===!1},st.prototype.setEncoding=function(Re){Ae||(Ae=oe("string_decoder/").StringDecoder);var _e=new Ae(Re);this._readableState.decoder=_e,this._readableState.encoding=this._readableState.decoder.encoding;for(var He=this._readableState.buffer.head,Qe="";He!==null;)Qe+=_e.write(He.data),He=He.next;return this._readableState.buffer.clear(),Qe!==""&&this._readableState.buffer.push(Qe),this._readableState.length=Qe.length,this};var rt=1073741824;function St(Re){return Re>=rt?Re=rt:(Re--,Re|=Re>>>1,Re|=Re>>>2,Re|=Re>>>4,Re|=Re>>>8,Re|=Re>>>16,Re++),Re}function Pt(Re,_e){return Re<=0||_e.length===0&&_e.ended?0:_e.objectMode?1:Re!==Re?_e.flowing&&_e.length?_e.buffer.head.data.length:_e.length:(Re>_e.highWaterMark&&(_e.highWaterMark=St(Re)),Re<=_e.length?Re:_e.ended?_e.length:(_e.needReadable=!0,0))}st.prototype.read=function(Re){ae("read",Re),Re=parseInt(Re,10);var _e=this._readableState,He=Re;if(Re!==0&&(_e.emittedReadable=!1),Re===0&&_e.needReadable&&((_e.highWaterMark!==0?_e.length>=_e.highWaterMark:_e.length>0)||_e.ended))return ae("read: emitReadable",_e.length,_e.ended),_e.length===0&&_e.ended?Le(this):pt(this),null;if(Re=Pt(Re,_e),Re===0&&_e.ended)return _e.length===0&&Le(this),null;var Qe=_e.needReadable;ae("need readable",Qe),(_e.length===0||_e.length-Re<_e.highWaterMark)&&(Qe=!0,ae("length less than watermark",Qe)),_e.ended||_e.reading?(Qe=!1,ae("reading or ended",Qe)):Qe&&(ae("do read"),_e.reading=!0,_e.sync=!0,_e.length===0&&(_e.needReadable=!0),this._read(_e.highWaterMark),_e.sync=!1,_e.reading||(Re=Pt(He,_e)));var ut;return Re>0?ut=xe(Re,_e):ut=null,ut===null?(_e.needReadable=_e.length<=_e.highWaterMark,Re=0):(_e.length-=Re,_e.awaitDrain=0),_e.length===0&&(_e.ended||(_e.needReadable=!0),He!==Re&&_e.ended&&Le(this)),ut!==null&&this.emit("data",ut),ut};function wt(Re,_e){if(ae("onEofChunk"),!_e.ended){if(_e.decoder){var He=_e.decoder.end();He&&He.length&&(_e.buffer.push(He),_e.length+=_e.objectMode?1:He.length)}_e.ended=!0,_e.sync?pt(Re):(_e.needReadable=!1,_e.emittedReadable||(_e.emittedReadable=!0,ft(Re)))}}function pt(Re){var _e=Re._readableState;ae("emitReadable",_e.needReadable,_e.emittedReadable),_e.needReadable=!1,_e.emittedReadable||(ae("emitReadable",_e.flowing),_e.emittedReadable=!0,fe.nextTick(ft,Re))}function ft(Re){var _e=Re._readableState;ae("emitReadable_",_e.destroyed,_e.length,_e.ended),!_e.destroyed&&(_e.length||_e.ended)&&(Re.emit("readable"),_e.emittedReadable=!1),_e.needReadable=!_e.flowing&&!_e.ended&&_e.length<=_e.highWaterMark,Ve(Re)}function ht(Re,_e){_e.readingMore||(_e.readingMore=!0,fe.nextTick(Et,Re,_e))}function Et(Re,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){var He=_e.length;if(ae("maybeReadMore read 0"),Re.read(0),He===_e.length)break}_e.readingMore=!1}st.prototype._read=function(Re){Ye(this,new Fe("_read()"))},st.prototype.pipe=function(Re,_e){var He=this,Qe=this._readableState;switch(Qe.pipesCount){case 0:Qe.pipes=Re;break;case 1:Qe.pipes=[Qe.pipes,Re];break;default:Qe.pipes.push(Re);break}Qe.pipesCount+=1,ae("pipe count=%d opts=%j",Qe.pipesCount,_e);var ut=(!_e||_e.end!==!1)&&Re!==fe.stdout&&Re!==fe.stderr,gt=ut?Nt:Wt;Qe.endEmitted?fe.nextTick(gt):He.once("end",gt),Re.on("unpipe",Mt);function Mt(bn,mn){ae("onunpipe"),bn===He&&mn&&mn.hasUnpiped===!1&&(mn.hasUnpiped=!0,Xt())}function Nt(){ae("onend"),Re.end()}var Dt=mt(He);Re.on("drain",Dt);var Ht=!1;function Xt(){ae("cleanup"),Re.removeListener("close",sn),Re.removeListener("finish",nn),Re.removeListener("drain",Dt),Re.removeListener("error",Ut),Re.removeListener("unpipe",Mt),He.removeListener("end",Nt),He.removeListener("end",Wt),He.removeListener("data",$t),Ht=!0,Qe.awaitDrain&&(!Re._writableState||Re._writableState.needDrain)&&Dt()}He.on("data",$t);function $t(bn){ae("ondata");var mn=Re.write(bn);ae("dest.write",mn),mn===!1&&((Qe.pipesCount===1&&Qe.pipes===Re||Qe.pipesCount>1&&nt(Qe.pipes,Re)!==-1)&&!Ht&&(ae("false write response, pause",Qe.awaitDrain),Qe.awaitDrain++),He.pause())}function Ut(bn){ae("onerror",bn),Wt(),Re.removeListener("error",Ut),Se(Re,"error")===0&&Ye(Re,bn)}Ke(Re,"error",Ut);function sn(){Re.removeListener("finish",nn),Wt()}Re.once("close",sn);function nn(){ae("onfinish"),Re.removeListener("close",sn),Wt()}Re.once("finish",nn);function Wt(){ae("unpipe"),He.unpipe(Re)}return Re.emit("pipe",He),Qe.flowing||(ae("pipe resume"),He.resume()),Re};function mt(Re){return function(){var He=Re._readableState;ae("pipeOnDrain",He.awaitDrain),He.awaitDrain&&He.awaitDrain--,He.awaitDrain===0&&Se(Re,"data")&&(He.flowing=!0,Ve(Re))}}st.prototype.unpipe=function(Re){var _e=this._readableState,He={hasUnpiped:!1};if(_e.pipesCount===0)return this;if(_e.pipesCount===1)return Re&&Re!==_e.pipes?this:(Re||(Re=_e.pipes),_e.pipes=null,_e.pipesCount=0,_e.flowing=!1,Re&&Re.emit("unpipe",this,He),this);if(!Re){var Qe=_e.pipes,ut=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var gt=0;gt<ut;gt++)Qe[gt].emit("unpipe",this,{hasUnpiped:!1});return this}var Mt=nt(_e.pipes,Re);return Mt===-1?this:(_e.pipes.splice(Mt,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),Re.emit("unpipe",this,He),this)},st.prototype.on=function(Re,_e){var He=Me.prototype.on.call(this,Re,_e),Qe=this._readableState;return Re==="data"?(Qe.readableListening=this.listenerCount("readable")>0,Qe.flowing!==!1&&this.resume()):Re==="readable"&&!Qe.endEmitted&&!Qe.readableListening&&(Qe.readableListening=Qe.needReadable=!0,Qe.flowing=!1,Qe.emittedReadable=!1,ae("on readable",Qe.length,Qe.reading),Qe.length?pt(this):Qe.reading||fe.nextTick(At,this)),He},st.prototype.addListener=st.prototype.on,st.prototype.removeListener=function(Re,_e){var He=Me.prototype.removeListener.call(this,Re,_e);return Re==="readable"&&fe.nextTick(yt,this),He},st.prototype.removeAllListeners=function(Re){var _e=Me.prototype.removeAllListeners.apply(this,arguments);return(Re==="readable"||Re===void 0)&&fe.nextTick(yt,this),_e};function yt(Re){var _e=Re._readableState;_e.readableListening=Re.listenerCount("readable")>0,_e.resumeScheduled&&!_e.paused?_e.flowing=!0:Re.listenerCount("data")>0&&Re.resume()}function At(Re){ae("readable nexttick read 0"),Re.read(0)}st.prototype.resume=function(){var Re=this._readableState;return Re.flowing||(ae("resume"),Re.flowing=!Re.readableListening,xt(this,Re)),Re.paused=!1,this};function xt(Re,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,fe.nextTick(tt,Re,_e))}function tt(Re,_e){ae("resume",_e.reading),_e.reading||Re.read(0),_e.resumeScheduled=!1,Re.emit("resume"),Ve(Re),_e.flowing&&!_e.reading&&Re.read(0)}st.prototype.pause=function(){return ae("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ae("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ve(Re){var _e=Re._readableState;for(ae("flow",_e.flowing);_e.flowing&&Re.read()!==null;);}st.prototype.wrap=function(Re){var _e=this,He=this._readableState,Qe=!1;Re.on("end",function(){if(ae("wrapped end"),He.decoder&&!He.ended){var Mt=He.decoder.end();Mt&&Mt.length&&_e.push(Mt)}_e.push(null)}),Re.on("data",function(Mt){if(ae("wrapped data"),He.decoder&&(Mt=He.decoder.write(Mt)),!(He.objectMode&&Mt==null)&&!(!He.objectMode&&(!Mt||!Mt.length))){var Nt=_e.push(Mt);Nt||(Qe=!0,Re.pause())}});for(var ut in Re)this[ut]===void 0&&typeof Re[ut]=="function"&&(this[ut]=function(Nt){return function(){return Re[Nt].apply(Re,arguments)}}(ut));for(var gt=0;gt<Ue.length;gt++)Re.on(Ue[gt],this.emit.bind(this,Ue[gt]));return this._read=function(Mt){ae("wrapped _read",Mt),Qe&&(Qe=!1,Re.resume())},this},typeof Symbol=="function"&&(st.prototype[Symbol.asyncIterator]=function(){return Ie===void 0&&(Ie=oe("./internal/streams/async_iterator")),Ie(this)}),Object.defineProperty(st.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(st.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(st.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(_e){this._readableState&&(this._readableState.flowing=_e)}}),st._fromList=xe,Object.defineProperty(st.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function xe(Re,_e){if(_e.length===0)return null;var He;return _e.objectMode?He=_e.buffer.shift():!Re||Re>=_e.length?(_e.decoder?He=_e.buffer.join(""):_e.buffer.length===1?He=_e.buffer.first():He=_e.buffer.concat(_e.length),_e.buffer.clear()):He=_e.buffer.consume(Re,_e.decoder),He}function Le(Re){var _e=Re._readableState;ae("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,fe.nextTick(Ze,_e,Re))}function Ze(Re,_e){if(ae("endReadableNT",Re.endEmitted,Re.length),!Re.endEmitted&&Re.length===0&&(Re.endEmitted=!0,_e.readable=!1,_e.emit("end"),Re.autoDestroy)){var He=_e._writableState;(!He||He.autoDestroy&&He.finished)&&_e.destroy()}}typeof Symbol=="function"&&(st.from=function(Re,_e){return We===void 0&&(We=oe("./internal/streams/from")),We(st,Re,_e)});function nt(Re,_e){for(var He=0,Qe=Re.length;He<Qe;He++)if(Re[He]===_e)return He;return-1}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn: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(oe,ze,De){"use strict";ze.exports=we;var fe=oe("../errors").codes,me=fe.ERR_METHOD_NOT_IMPLEMENTED,ke=fe.ERR_MULTIPLE_CALLBACK,Ce=fe.ERR_TRANSFORM_ALREADY_TRANSFORMING,Se=fe.ERR_TRANSFORM_WITH_LENGTH_0,Me=oe("./_stream_duplex");oe("inherits")(we,Me);function ve(ee,ae){var ie=this._transformState;ie.transforming=!1;var le=ie.writecb;if(le===null)return this.emit("error",new ke);ie.writechunk=null,ie.writecb=null,ae!=null&&this.push(ae),le(ee);var ue=this._readableState;ue.reading=!1,(ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}function we(ee){if(!(this instanceof we))return new we(ee);Me.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",de)}function de(){var ee=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(ae,ie){z(ee,ae,ie)}):z(this,null,null)}we.prototype.push=function(ee,ae){return this._transformState.needTransform=!1,Me.prototype.push.call(this,ee,ae)},we.prototype._transform=function(ee,ae,ie){ie(new me("_transform()"))},we.prototype._write=function(ee,ae,ie){var le=this._transformState;if(le.writecb=ie,le.writechunk=ee,le.writeencoding=ae,!le.transforming){var ue=this._readableState;(le.needTransform||ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}},we.prototype._read=function(ee){var ae=this._transformState;ae.writechunk!==null&&!ae.transforming?(ae.transforming=!0,this._transform(ae.writechunk,ae.writeencoding,ae.afterTransform)):ae.needTransform=!0},we.prototype._destroy=function(ee,ae){Me.prototype._destroy.call(this,ee,function(ie){ae(ie)})};function z(ee,ae,ie){if(ae)return ee.emit("error",ae);if(ie!=null&&ee.push(ie),ee._writableState.length)throw new Se;if(ee._transformState.transforming)throw new Ce;return ee.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(oe,ze,De){(function(fe,me){(function(){"use strict";ze.exports=ot;function ke(Ve,xe,Le){this.chunk=Ve,this.encoding=xe,this.callback=Le,this.next=null}function Ce(Ve){var xe=this;this.next=null,this.entry=null,this.finish=function(){tt(xe,Ve)}}var Se;ot.WritableState=Ue;var Me={deprecate:oe("util-deprecate")},ve=oe("./internal/streams/stream"),we=oe("buffer").Buffer,de=(typeof me!="undefined"?me:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(Ve){return we.from(Ve)}function ee(Ve){return we.isBuffer(Ve)||Ve instanceof de}var ae=oe("./internal/streams/destroy"),ie=oe("./internal/streams/state"),le=ie.getHighWaterMark,ue=oe("../errors").codes,ge=ue.ERR_INVALID_ARG_TYPE,Pe=ue.ERR_METHOD_NOT_IMPLEMENTED,je=ue.ERR_MULTIPLE_CALLBACK,Be=ue.ERR_STREAM_CANNOT_PIPE,Fe=ue.ERR_STREAM_DESTROYED,Ne=ue.ERR_STREAM_NULL_VALUES,Ae=ue.ERR_STREAM_WRITE_AFTER_END,Ie=ue.ERR_UNKNOWN_ENCODING,We=ae.errorOrDestroy;oe("inherits")(ot,ve);function Ye(){}function Ue(Ve,xe,Le){Se=Se||oe("./_stream_duplex"),Ve=Ve||{},typeof Le!="boolean"&&(Le=xe instanceof Se),this.objectMode=!!Ve.objectMode,Le&&(this.objectMode=this.objectMode||!!Ve.writableObjectMode),this.highWaterMark=le(this,Ve,"writableHighWaterMark",Le),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ze=Ve.decodeStrings===!1;this.decodeStrings=!Ze,this.defaultEncoding=Ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(nt){wt(xe,nt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Ve.emitClose!==!1,this.autoDestroy=!!Ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ce(this)}Ue.prototype.getBuffer=function(){for(var xe=this.bufferedRequest,Le=[];xe;)Le.push(xe),xe=xe.next;return Le},function(){try{Object.defineProperty(Ue.prototype,"buffer",{get:Me.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Ve){}}();var Ke;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ke=Function.prototype[Symbol.hasInstance],Object.defineProperty(ot,Symbol.hasInstance,{value:function(xe){return Ke.call(this,xe)?!0:this!==ot?!1:xe&&xe._writableState instanceof Ue}})):Ke=function(xe){return xe instanceof this};function ot(Ve){Se=Se||oe("./_stream_duplex");var xe=this instanceof Se;if(!xe&&!Ke.call(ot,this))return new ot(Ve);this._writableState=new Ue(Ve,this,xe),this.writable=!0,Ve&&(typeof Ve.write=="function"&&(this._write=Ve.write),typeof Ve.writev=="function"&&(this._writev=Ve.writev),typeof Ve.destroy=="function"&&(this._destroy=Ve.destroy),typeof Ve.final=="function"&&(this._final=Ve.final)),ve.call(this)}ot.prototype.pipe=function(){We(this,new Be)};function st(Ve,xe){var Le=new Ae;We(Ve,Le),fe.nextTick(xe,Le)}function dt(Ve,xe,Le,Ze){var nt;return Le===null?nt=new Ne:typeof Le!="string"&&!xe.objectMode&&(nt=new ge("chunk",["string","Buffer"],Le)),nt?(We(Ve,nt),fe.nextTick(Ze,nt),!1):!0}ot.prototype.write=function(Ve,xe,Le){var Ze=this._writableState,nt=!1,Re=!Ze.objectMode&&ee(Ve);return Re&&!we.isBuffer(Ve)&&(Ve=z(Ve)),typeof xe=="function"&&(Le=xe,xe=null),Re?xe="buffer":xe||(xe=Ze.defaultEncoding),typeof Le!="function"&&(Le=Ye),Ze.ending?st(this,Le):(Re||dt(this,Ze,Ve,Le))&&(Ze.pendingcb++,nt=$e(this,Ze,Re,Ve,xe,Le)),nt},ot.prototype.cork=function(){this._writableState.corked++},ot.prototype.uncork=function(){var Ve=this._writableState;Ve.corked&&(Ve.corked--,!Ve.writing&&!Ve.corked&&!Ve.bufferProcessing&&Ve.bufferedRequest&&ht(this,Ve))},ot.prototype.setDefaultEncoding=function(xe){if(typeof xe=="string"&&(xe=xe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((xe+"").toLowerCase())>-1))throw new Ie(xe);return this._writableState.defaultEncoding=xe,this},Object.defineProperty(ot.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Ct(Ve,xe,Le){return!Ve.objectMode&&Ve.decodeStrings!==!1&&typeof xe=="string"&&(xe=we.from(xe,Le)),xe}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $e(Ve,xe,Le,Ze,nt,Re){if(!Le){var _e=Ct(xe,Ze,nt);Ze!==_e&&(Le=!0,nt="buffer",Ze=_e)}var He=xe.objectMode?1:Ze.length;xe.length+=He;var Qe=xe.length<xe.highWaterMark;if(Qe||(xe.needDrain=!0),xe.writing||xe.corked){var ut=xe.lastBufferedRequest;xe.lastBufferedRequest={chunk:Ze,encoding:nt,isBuf:Le,callback:Re,next:null},ut?ut.next=xe.lastBufferedRequest:xe.bufferedRequest=xe.lastBufferedRequest,xe.bufferedRequestCount+=1}else rt(Ve,xe,!1,He,Ze,nt,Re);return Qe}function rt(Ve,xe,Le,Ze,nt,Re,_e){xe.writelen=Ze,xe.writecb=_e,xe.writing=!0,xe.sync=!0,xe.destroyed?xe.onwrite(new Fe("write")):Le?Ve._writev(nt,xe.onwrite):Ve._write(nt,Re,xe.onwrite),xe.sync=!1}function St(Ve,xe,Le,Ze,nt){--xe.pendingcb,Le?(fe.nextTick(nt,Ze),fe.nextTick(At,Ve,xe),Ve._writableState.errorEmitted=!0,We(Ve,Ze)):(nt(Ze),Ve._writableState.errorEmitted=!0,We(Ve,Ze),At(Ve,xe))}function Pt(Ve){Ve.writing=!1,Ve.writecb=null,Ve.length-=Ve.writelen,Ve.writelen=0}function wt(Ve,xe){var Le=Ve._writableState,Ze=Le.sync,nt=Le.writecb;if(typeof nt!="function")throw new je;if(Pt(Le),xe)St(Ve,Le,Ze,xe,nt);else{var Re=Et(Le)||Ve.destroyed;!Re&&!Le.corked&&!Le.bufferProcessing&&Le.bufferedRequest&&ht(Ve,Le),Ze?fe.nextTick(pt,Ve,Le,Re,nt):pt(Ve,Le,Re,nt)}}function pt(Ve,xe,Le,Ze){Le||ft(Ve,xe),xe.pendingcb--,Ze(),At(Ve,xe)}function ft(Ve,xe){xe.length===0&&xe.needDrain&&(xe.needDrain=!1,Ve.emit("drain"))}function ht(Ve,xe){xe.bufferProcessing=!0;var Le=xe.bufferedRequest;if(Ve._writev&&Le&&Le.next){var Ze=xe.bufferedRequestCount,nt=new Array(Ze),Re=xe.corkedRequestsFree;Re.entry=Le;for(var _e=0,He=!0;Le;)nt[_e]=Le,Le.isBuf||(He=!1),Le=Le.next,_e+=1;nt.allBuffers=He,rt(Ve,xe,!0,xe.length,nt,"",Re.finish),xe.pendingcb++,xe.lastBufferedRequest=null,Re.next?(xe.corkedRequestsFree=Re.next,Re.next=null):xe.corkedRequestsFree=new Ce(xe),xe.bufferedRequestCount=0}else{for(;Le;){var Qe=Le.chunk,ut=Le.encoding,gt=Le.callback,Mt=xe.objectMode?1:Qe.length;if(rt(Ve,xe,!1,Mt,Qe,ut,gt),Le=Le.next,xe.bufferedRequestCount--,xe.writing)break}Le===null&&(xe.lastBufferedRequest=null)}xe.bufferedRequest=Le,xe.bufferProcessing=!1}ot.prototype._write=function(Ve,xe,Le){Le(new Pe("_write()"))},ot.prototype._writev=null,ot.prototype.end=function(Ve,xe,Le){var Ze=this._writableState;return typeof Ve=="function"?(Le=Ve,Ve=null,xe=null):typeof xe=="function"&&(Le=xe,xe=null),Ve!=null&&this.write(Ve,xe),Ze.corked&&(Ze.corked=1,this.uncork()),Ze.ending||xt(this,Ze,Le),this},Object.defineProperty(ot.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Et(Ve){return Ve.ending&&Ve.length===0&&Ve.bufferedRequest===null&&!Ve.finished&&!Ve.writing}function mt(Ve,xe){Ve._final(function(Le){xe.pendingcb--,Le&&We(Ve,Le),xe.prefinished=!0,Ve.emit("prefinish"),At(Ve,xe)})}function yt(Ve,xe){!xe.prefinished&&!xe.finalCalled&&(typeof Ve._final=="function"&&!xe.destroyed?(xe.pendingcb++,xe.finalCalled=!0,fe.nextTick(mt,Ve,xe)):(xe.prefinished=!0,Ve.emit("prefinish")))}function At(Ve,xe){var Le=Et(xe);if(Le&&(yt(Ve,xe),xe.pendingcb===0&&(xe.finished=!0,Ve.emit("finish"),xe.autoDestroy))){var Ze=Ve._readableState;(!Ze||Ze.autoDestroy&&Ze.endEmitted)&&Ve.destroy()}return Le}function xt(Ve,xe,Le){xe.ending=!0,At(Ve,xe),Le&&(xe.finished?fe.nextTick(Le):Ve.once("finish",Le)),xe.ended=!0,Ve.writable=!1}function tt(Ve,xe,Le){var Ze=Ve.entry;for(Ve.entry=null;Ze;){var nt=Ze.callback;xe.pendingcb--,nt(Le),Ze=Ze.next}xe.corkedRequestsFree.next=Ve}Object.defineProperty(ot.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(xe){this._writableState&&(this._writableState.destroyed=xe)}}),ot.prototype.destroy=ae.destroy,ot.prototype._undestroy=ae.undestroy,ot.prototype._destroy=function(Ve,xe){xe(Ve)}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn: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(oe,ze,De){(function(fe){(function(){"use strict";var me;function ke(Ne,Ae,Ie){return Ae=Ce(Ae),Ae in Ne?Object.defineProperty(Ne,Ae,{value:Ie,enumerable:!0,configurable:!0,writable:!0}):Ne[Ae]=Ie,Ne}function Ce(Ne){var Ae=Se(Ne,"string");return typeof Ae=="symbol"?Ae:String(Ae)}function Se(Ne,Ae){if(typeof Ne!="object"||Ne===null)return Ne;var Ie=Ne[Symbol.toPrimitive];if(Ie!==void 0){var We=Ie.call(Ne,Ae||"default");if(typeof We!="object")return We;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ae==="string"?String:Number)(Ne)}var Me=oe("./end-of-stream"),ve=Symbol("lastResolve"),we=Symbol("lastReject"),de=Symbol("error"),z=Symbol("ended"),ee=Symbol("lastPromise"),ae=Symbol("handlePromise"),ie=Symbol("stream");function le(Ne,Ae){return{value:Ne,done:Ae}}function ue(Ne){var Ae=Ne[ve];if(Ae!==null){var Ie=Ne[ie].read();Ie!==null&&(Ne[ee]=null,Ne[ve]=null,Ne[we]=null,Ae(le(Ie,!1)))}}function ge(Ne){fe.nextTick(ue,Ne)}function Pe(Ne,Ae){return function(Ie,We){Ne.then(function(){if(Ae[z]){Ie(le(void 0,!0));return}Ae[ae](Ie,We)},We)}}var je=Object.getPrototypeOf(function(){}),Be=Object.setPrototypeOf((me={get stream(){return this[ie]},next:function(){var Ae=this,Ie=this[de];if(Ie!==null)return Promise.reject(Ie);if(this[z])return Promise.resolve(le(void 0,!0));if(this[ie].destroyed)return new Promise(function(Ke,ot){fe.nextTick(function(){Ae[de]?ot(Ae[de]):Ke(le(void 0,!0))})});var We=this[ee],Ye;if(We)Ye=new Promise(Pe(We,this));else{var Ue=this[ie].read();if(Ue!==null)return Promise.resolve(le(Ue,!1));Ye=new Promise(this[ae])}return this[ee]=Ye,Ye}},ke(me,Symbol.asyncIterator,function(){return this}),ke(me,"return",function(){var Ae=this;return new Promise(function(Ie,We){Ae[ie].destroy(null,function(Ye){if(Ye){We(Ye);return}Ie(le(void 0,!0))})})}),me),je),Fe=function(Ae){var Ie,We=Object.create(Be,(Ie={},ke(Ie,ie,{value:Ae,writable:!0}),ke(Ie,ve,{value:null,writable:!0}),ke(Ie,we,{value:null,writable:!0}),ke(Ie,de,{value:null,writable:!0}),ke(Ie,z,{value:Ae._readableState.endEmitted,writable:!0}),ke(Ie,ae,{value:function(Ue,Ke){var ot=We[ie].read();ot?(We[ee]=null,We[ve]=null,We[we]=null,Ue(le(ot,!1))):(We[ve]=Ue,We[we]=Ke)},writable:!0}),Ie));return We[ee]=null,Me(Ae,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ue=We[we];Ue!==null&&(We[ee]=null,We[ve]=null,We[we]=null,Ue(Ye)),We[de]=Ye;return}var Ke=We[ve];Ke!==null&&(We[ee]=null,We[ve]=null,We[we]=null,Ke(le(void 0,!0))),We[z]=!0}),Ae.on("readable",ge.bind(null,We)),We};ze.exports=Fe}).call(this)}).call(this,oe("_process"))},{"./end-of-stream":408,_process:467}],406:[function(oe,ze,De){"use strict";function fe(ue,ge){var Pe=Object.keys(ue);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(ue);ge&&(je=je.filter(function(Be){return Object.getOwnPropertyDescriptor(ue,Be).enumerable})),Pe.push.apply(Pe,je)}return Pe}function me(ue){for(var ge=1;ge<arguments.length;ge++){var Pe=arguments[ge]!=null?arguments[ge]:{};ge%2?fe(Object(Pe),!0).forEach(function(je){ke(ue,je,Pe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(Pe)):fe(Object(Pe)).forEach(function(je){Object.defineProperty(ue,je,Object.getOwnPropertyDescriptor(Pe,je))})}return ue}function ke(ue,ge,Pe){return ge=ve(ge),ge in ue?Object.defineProperty(ue,ge,{value:Pe,enumerable:!0,configurable:!0,writable:!0}):ue[ge]=Pe,ue}function Ce(ue,ge){if(!(ue instanceof ge))throw new TypeError("Cannot call a class as a function")}function Se(ue,ge){for(var Pe=0;Pe<ge.length;Pe++){var je=ge[Pe];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(ue,ve(je.key),je)}}function Me(ue,ge,Pe){return ge&&Se(ue.prototype,ge),Pe&&Se(ue,Pe),Object.defineProperty(ue,"prototype",{writable:!1}),ue}function ve(ue){var ge=we(ue,"string");return typeof ge=="symbol"?ge:String(ge)}function we(ue,ge){if(typeof ue!="object"||ue===null)return ue;var Pe=ue[Symbol.toPrimitive];if(Pe!==void 0){var je=Pe.call(ue,ge||"default");if(typeof je!="object")return je;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ge==="string"?String:Number)(ue)}var de=oe("buffer"),z=de.Buffer,ee=oe("util"),ae=ee.inspect,ie=ae&&ae.custom||"inspect";function le(ue,ge,Pe){z.prototype.copy.call(ue,ge,Pe)}ze.exports=function(){function ue(){Ce(this,ue),this.head=null,this.tail=null,this.length=0}return Me(ue,[{key:"push",value:function(Pe){var je={data:Pe,next:null};this.length>0?this.tail.next=je:this.head=je,this.tail=je,++this.length}},{key:"unshift",value:function(Pe){var je={data:Pe,next:this.head};this.length===0&&(this.tail=je),this.head=je,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Pe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Pe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Pe){if(this.length===0)return"";for(var je=this.head,Be=""+je.data;je=je.next;)Be+=Pe+je.data;return Be}},{key:"concat",value:function(Pe){if(this.length===0)return z.alloc(0);for(var je=z.allocUnsafe(Pe>>>0),Be=this.head,Fe=0;Be;)le(Be.data,je,Fe),Fe+=Be.data.length,Be=Be.next;return je}},{key:"consume",value:function(Pe,je){var Be;return Pe<this.head.data.length?(Be=this.head.data.slice(0,Pe),this.head.data=this.head.data.slice(Pe)):Pe===this.head.data.length?Be=this.shift():Be=je?this._getString(Pe):this._getBuffer(Pe),Be}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Pe){var je=this.head,Be=1,Fe=je.data;for(Pe-=Fe.length;je=je.next;){var Ne=je.data,Ae=Pe>Ne.length?Ne.length:Pe;if(Ae===Ne.length?Fe+=Ne:Fe+=Ne.slice(0,Pe),Pe-=Ae,Pe===0){Ae===Ne.length?(++Be,je.next?this.head=je.next:this.head=this.tail=null):(this.head=je,je.data=Ne.slice(Ae));break}++Be}return this.length-=Be,Fe}},{key:"_getBuffer",value:function(Pe){var je=z.allocUnsafe(Pe),Be=this.head,Fe=1;for(Be.data.copy(je),Pe-=Be.data.length;Be=Be.next;){var Ne=Be.data,Ae=Pe>Ne.length?Ne.length:Pe;if(Ne.copy(je,je.length-Pe,0,Ae),Pe-=Ae,Pe===0){Ae===Ne.length?(++Fe,Be.next?this.head=Be.next:this.head=this.tail=null):(this.head=Be,Be.data=Ne.slice(Ae));break}++Fe}return this.length-=Fe,je}},{key:ie,value:function(Pe,je){return ae(this,me(me({},je),{},{depth:0,customInspect:!1}))}}]),ue}()},{buffer:90,util:89}],407:[function(oe,ze,De){(function(fe){(function(){"use strict";function me(we,de){var z=this,ee=this._readableState&&this._readableState.destroyed,ae=this._writableState&&this._writableState.destroyed;return ee||ae?(de?de(we):we&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,fe.nextTick(Me,this,we)):fe.nextTick(Me,this,we)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(we||null,function(ie){!de&&ie?z._writableState?z._writableState.errorEmitted?fe.nextTick(Ce,z):(z._writableState.errorEmitted=!0,fe.nextTick(ke,z,ie)):fe.nextTick(ke,z,ie):de?(fe.nextTick(Ce,z),de(ie)):fe.nextTick(Ce,z)}),this)}function ke(we,de){Me(we,de),Ce(we)}function Ce(we){we._writableState&&!we._writableState.emitClose||we._readableState&&!we._readableState.emitClose||we.emit("close")}function Se(){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 Me(we,de){we.emit("error",de)}function ve(we,de){var z=we._readableState,ee=we._writableState;z&&z.autoDestroy||ee&&ee.autoDestroy?we.destroy(de):we.emit("error",de)}ze.exports={destroy:me,undestroy:Se,errorOrDestroy:ve}}).call(this)}).call(this,oe("_process"))},{_process:467}],408:[function(oe,ze,De){"use strict";var fe=oe("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function me(Me){var ve=!1;return function(){if(!ve){ve=!0;for(var we=arguments.length,de=new Array(we),z=0;z<we;z++)de[z]=arguments[z];Me.apply(this,de)}}}function ke(){}function Ce(Me){return Me.setHeader&&typeof Me.abort=="function"}function Se(Me,ve,we){if(typeof ve=="function")return Se(Me,null,ve);ve||(ve={}),we=me(we||ke);var de=ve.readable||ve.readable!==!1&&Me.readable,z=ve.writable||ve.writable!==!1&&Me.writable,ee=function(){Me.writable||ie()},ae=Me._writableState&&Me._writableState.finished,ie=function(){z=!1,ae=!0,de||we.call(Me)},le=Me._readableState&&Me._readableState.endEmitted,ue=function(){de=!1,le=!0,z||we.call(Me)},ge=function(Fe){we.call(Me,Fe)},Pe=function(){var Fe;if(de&&!le)return(!Me._readableState||!Me._readableState.ended)&&(Fe=new fe),we.call(Me,Fe);if(z&&!ae)return(!Me._writableState||!Me._writableState.ended)&&(Fe=new fe),we.call(Me,Fe)},je=function(){Me.req.on("finish",ie)};return Ce(Me)?(Me.on("complete",ie),Me.on("abort",Pe),Me.req?je():Me.on("request",je)):z&&!Me._writableState&&(Me.on("end",ee),Me.on("close",ee)),Me.on("end",ue),Me.on("finish",ie),ve.error!==!1&&Me.on("error",ge),Me.on("close",Pe),function(){Me.removeListener("complete",ie),Me.removeListener("abort",Pe),Me.removeListener("request",je),Me.req&&Me.req.removeListener("finish",ie),Me.removeListener("end",ee),Me.removeListener("close",ee),Me.removeListener("finish",ie),Me.removeListener("end",ue),Me.removeListener("error",ge),Me.removeListener("close",Pe)}}ze.exports=Se},{"../../../errors":399}],409:[function(oe,ze,De){ze.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(oe,ze,De){"use strict";var fe;function me(ie){var le=!1;return function(){le||(le=!0,ie.apply(void 0,arguments))}}var ke=oe("../../../errors").codes,Ce=ke.ERR_MISSING_ARGS,Se=ke.ERR_STREAM_DESTROYED;function Me(ie){if(ie)throw ie}function ve(ie){return ie.setHeader&&typeof ie.abort=="function"}function we(ie,le,ue,ge){ge=me(ge);var Pe=!1;ie.on("close",function(){Pe=!0}),fe===void 0&&(fe=oe("./end-of-stream")),fe(ie,{readable:le,writable:ue},function(Be){if(Be)return ge(Be);Pe=!0,ge()});var je=!1;return function(Be){if(!Pe&&!je){if(je=!0,ve(ie))return ie.abort();if(typeof ie.destroy=="function")return ie.destroy();ge(Be||new Se("pipe"))}}}function de(ie){ie()}function z(ie,le){return ie.pipe(le)}function ee(ie){return!ie.length||typeof ie[ie.length-1]!="function"?Me:ie.pop()}function ae(){for(var ie=arguments.length,le=new Array(ie),ue=0;ue<ie;ue++)le[ue]=arguments[ue];var ge=ee(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new Ce("streams");var Pe,je=le.map(function(Be,Fe){var Ne=Fe<le.length-1,Ae=Fe>0;return we(Be,Ne,Ae,function(Ie){Pe||(Pe=Ie),Ie&&je.forEach(de),!Ne&&(je.forEach(de),ge(Pe))})});return le.reduce(z)}ze.exports=ae},{"../../../errors":399,"./end-of-stream":408}],411:[function(oe,ze,De){"use strict";var fe=oe("../../../errors").codes.ERR_INVALID_OPT_VALUE;function me(Ce,Se,Me){return Ce.highWaterMark!=null?Ce.highWaterMark:Se?Ce[Me]:null}function ke(Ce,Se,Me,ve){var we=me(Se,ve,Me);if(we!=null){if(!(isFinite(we)&&Math.floor(we)===we)||we<0){var de=ve?Me:"highWaterMark";throw new fe(de,we)}return Math.floor(we)}return Ce.objectMode?16:16*1024}ze.exports={getHighWaterMark:ke}},{"../../../errors":399}],412:[function(oe,ze,De){arguments[4][393][0].apply(De,arguments)},{dup:393,events:344}],413:[function(oe,ze,De){"use strict";var fe=oe("safe-buffer").Buffer,me=fe.isEncoding||function(je){switch(je=""+je,je&&je.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 ke(je){if(!je)return"utf8";for(var Be;;)switch(je){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 je;default:if(Be)return;je=(""+je).toLowerCase(),Be=!0}}function Ce(je){var Be=ke(je);if(typeof Be!="string"&&(fe.isEncoding===me||!me(je)))throw new Error("Unknown encoding: "+je);return Be||je}De.StringDecoder=Se;function Se(je){this.encoding=Ce(je);var Be;switch(this.encoding){case"utf16le":this.text=ae,this.end=ie,Be=4;break;case"utf8":this.fillLast=de,Be=4;break;case"base64":this.text=le,this.end=ue,Be=3;break;default:this.write=ge,this.end=Pe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fe.allocUnsafe(Be)}Se.prototype.write=function(je){if(je.length===0)return"";var Be,Fe;if(this.lastNeed){if(Be=this.fillLast(je),Be===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<je.length?Be?Be+this.text(je,Fe):this.text(je,Fe):Be||""},Se.prototype.end=ee,Se.prototype.text=z,Se.prototype.fillLast=function(je){if(this.lastNeed<=je.length)return je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,je.length),this.lastNeed-=je.length};function Me(je){return je<=127?0:je>>5===6?2:je>>4===14?3:je>>3===30?4:je>>6===2?-1:-2}function ve(je,Be,Fe){var Ne=Be.length-1;if(Ne<Fe)return 0;var Ae=Me(Be[Ne]);return Ae>=0?(Ae>0&&(je.lastNeed=Ae-1),Ae):--Ne<Fe||Ae===-2?0:(Ae=Me(Be[Ne]),Ae>=0?(Ae>0&&(je.lastNeed=Ae-2),Ae):--Ne<Fe||Ae===-2?0:(Ae=Me(Be[Ne]),Ae>=0?(Ae>0&&(Ae===2?Ae=0:je.lastNeed=Ae-3),Ae):0))}function we(je,Be,Fe){if((Be[0]&192)!==128)return je.lastNeed=0,"\uFFFD";if(je.lastNeed>1&&Be.length>1){if((Be[1]&192)!==128)return je.lastNeed=1,"\uFFFD";if(je.lastNeed>2&&Be.length>2&&(Be[2]&192)!==128)return je.lastNeed=2,"\uFFFD"}}function de(je){var Be=this.lastTotal-this.lastNeed,Fe=we(this,je,Be);if(Fe!==void 0)return Fe;if(this.lastNeed<=je.length)return je.copy(this.lastChar,Be,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,Be,0,je.length),this.lastNeed-=je.length}function z(je,Be){var Fe=ve(this,je,Be);if(!this.lastNeed)return je.toString("utf8",Be);this.lastTotal=Fe;var Ne=je.length-(Fe-this.lastNeed);return je.copy(this.lastChar,0,Ne),je.toString("utf8",Be,Ne)}function ee(je){var Be=je&&je.length?this.write(je):"";return this.lastNeed?Be+"\uFFFD":Be}function ae(je,Be){if((je.length-Be)%2===0){var Fe=je.toString("utf16le",Be);if(Fe){var Ne=Fe.charCodeAt(Fe.length-1);if(Ne>=55296&&Ne<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=je[je.length-1],je.toString("utf16le",Be,je.length-1)}function ie(je){var Be=je&&je.length?this.write(je):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return Be+this.lastChar.toString("utf16le",0,Fe)}return Be}function le(je,Be){var Fe=(je.length-Be)%3;return Fe===0?je.toString("base64",Be):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=je[je.length-1]:(this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1]),je.toString("base64",Be,je.length-Fe))}function ue(je){var Be=je&&je.length?this.write(je):"";return this.lastNeed?Be+this.lastChar.toString("base64",0,3-this.lastNeed):Be}function ge(je){return je.toString(this.encoding)}function Pe(je){return je&&je.length?this.write(je):""}},{"safe-buffer":396}],414:[function(oe,ze,De){(function(fe,me){(function(){var ke=oe("process/browser.js").nextTick,Ce=Function.prototype.apply,Se=Array.prototype.slice,Me={},ve=0;De.setTimeout=function(){return new we(Ce.call(setTimeout,window,arguments),clearTimeout)},De.setInterval=function(){return new we(Ce.call(setInterval,window,arguments),clearInterval)},De.clearTimeout=De.clearInterval=function(de){de.close()};function we(de,z){this._id=de,this._clearFn=z}we.prototype.unref=we.prototype.ref=function(){},we.prototype.close=function(){this._clearFn.call(window,this._id)},De.enroll=function(de,z){clearTimeout(de._idleTimeoutId),de._idleTimeout=z},De.unenroll=function(de){clearTimeout(de._idleTimeoutId),de._idleTimeout=-1},De._unrefActive=De.active=function(de){clearTimeout(de._idleTimeoutId);var z=de._idleTimeout;z>=0&&(de._idleTimeoutId=setTimeout(function(){de._onTimeout&&de._onTimeout()},z))},De.setImmediate=typeof fe=="function"?fe:function(de){var z=ve++,ee=arguments.length<2?!1:Se.call(arguments,1);return Me[z]=!0,ke(function(){Me[z]&&(ee?de.apply(null,ee):de.call(null),De.clearImmediate(z))}),z},De.clearImmediate=typeof me=="function"?me:function(de){delete Me[de]}}).call(this)}).call(this,oe("timers").setImmediate,oe("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(oe,ze,De){var fe=oe("buffer").Buffer;ze.exports=function(me){if(me instanceof Uint8Array){if(me.byteOffset===0&&me.byteLength===me.buffer.byteLength)return me.buffer;if(typeof me.buffer.slice=="function")return me.buffer.slice(me.byteOffset,me.byteOffset+me.byteLength)}if(fe.isBuffer(me)){for(var ke=new Uint8Array(me.length),Ce=me.length,Se=0;Se<Ce;Se++)ke[Se]=me[Se];return ke.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(oe,ze,De){(function(fe){(function(){ze.exports=me;function me(Ce,Se){if(ke("noDeprecation"))return Ce;var Me=!1;function ve(){if(!Me){if(ke("throwDeprecation"))throw new Error(Se);ke("traceDeprecation")?console.trace(Se):console.warn(Se),Me=!0}return Ce.apply(this,arguments)}return ve}function ke(Ce){try{if(!fe.localStorage)return!1}catch(Me){return!1}var Se=fe.localStorage[Ce];return Se==null?!1:String(Se).toLowerCase()==="true"}}).call(this)}).call(this,typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(oe,ze,De){arguments[4][84][0].apply(De,arguments)},{dup:84}],418:[function(oe,ze,De){"use strict";var fe=oe("is-arguments"),me=oe("is-generator-function"),ke=oe("which-typed-array"),Ce=oe("is-typed-array");function Se(ut){return ut.call.bind(ut)}var Me=typeof BigInt!="undefined",ve=typeof Symbol!="undefined",we=Se(Object.prototype.toString),de=Se(Number.prototype.valueOf),z=Se(String.prototype.valueOf),ee=Se(Boolean.prototype.valueOf);if(Me)var ae=Se(BigInt.prototype.valueOf);if(ve)var ie=Se(Symbol.prototype.valueOf);function le(ut,gt){if(typeof ut!="object")return!1;try{return gt(ut),!0}catch(Mt){return!1}}De.isArgumentsObject=fe,De.isGeneratorFunction=me,De.isTypedArray=Ce;function ue(ut){return typeof Promise!="undefined"&&ut instanceof Promise||ut!==null&&typeof ut=="object"&&typeof ut.then=="function"&&typeof ut.catch=="function"}De.isPromise=ue;function ge(ut){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ut):Ce(ut)||ht(ut)}De.isArrayBufferView=ge;function Pe(ut){return ke(ut)==="Uint8Array"}De.isUint8Array=Pe;function je(ut){return ke(ut)==="Uint8ClampedArray"}De.isUint8ClampedArray=je;function Be(ut){return ke(ut)==="Uint16Array"}De.isUint16Array=Be;function Fe(ut){return ke(ut)==="Uint32Array"}De.isUint32Array=Fe;function Ne(ut){return ke(ut)==="Int8Array"}De.isInt8Array=Ne;function Ae(ut){return ke(ut)==="Int16Array"}De.isInt16Array=Ae;function Ie(ut){return ke(ut)==="Int32Array"}De.isInt32Array=Ie;function We(ut){return ke(ut)==="Float32Array"}De.isFloat32Array=We;function Ye(ut){return ke(ut)==="Float64Array"}De.isFloat64Array=Ye;function Ue(ut){return ke(ut)==="BigInt64Array"}De.isBigInt64Array=Ue;function Ke(ut){return ke(ut)==="BigUint64Array"}De.isBigUint64Array=Ke;function ot(ut){return we(ut)==="[object Map]"}ot.working=typeof Map!="undefined"&&ot(new Map);function st(ut){return typeof Map=="undefined"?!1:ot.working?ot(ut):ut instanceof Map}De.isMap=st;function dt(ut){return we(ut)==="[object Set]"}dt.working=typeof Set!="undefined"&&dt(new Set);function Ct(ut){return typeof Set=="undefined"?!1:dt.working?dt(ut):ut instanceof Set}De.isSet=Ct;function $e(ut){return we(ut)==="[object WeakMap]"}$e.working=typeof WeakMap!="undefined"&&$e(new WeakMap);function rt(ut){return typeof WeakMap=="undefined"?!1:$e.working?$e(ut):ut instanceof WeakMap}De.isWeakMap=rt;function St(ut){return we(ut)==="[object WeakSet]"}St.working=typeof WeakSet!="undefined"&&St(new WeakSet);function Pt(ut){return St(ut)}De.isWeakSet=Pt;function wt(ut){return we(ut)==="[object ArrayBuffer]"}wt.working=typeof ArrayBuffer!="undefined"&&wt(new ArrayBuffer);function pt(ut){return typeof ArrayBuffer=="undefined"?!1:wt.working?wt(ut):ut instanceof ArrayBuffer}De.isArrayBuffer=pt;function ft(ut){return we(ut)==="[object DataView]"}ft.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&ft(new DataView(new ArrayBuffer(1),0,1));function ht(ut){return typeof DataView=="undefined"?!1:ft.working?ft(ut):ut instanceof DataView}De.isDataView=ht;var Et=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function mt(ut){return we(ut)==="[object SharedArrayBuffer]"}function yt(ut){return typeof Et=="undefined"?!1:(typeof mt.working=="undefined"&&(mt.working=mt(new Et)),mt.working?mt(ut):ut instanceof Et)}De.isSharedArrayBuffer=yt;function At(ut){return we(ut)==="[object AsyncFunction]"}De.isAsyncFunction=At;function xt(ut){return we(ut)==="[object Map Iterator]"}De.isMapIterator=xt;function tt(ut){return we(ut)==="[object Set Iterator]"}De.isSetIterator=tt;function Ve(ut){return we(ut)==="[object Generator]"}De.isGeneratorObject=Ve;function xe(ut){return we(ut)==="[object WebAssembly.Module]"}De.isWebAssemblyCompiledModule=xe;function Le(ut){return le(ut,de)}De.isNumberObject=Le;function Ze(ut){return le(ut,z)}De.isStringObject=Ze;function nt(ut){return le(ut,ee)}De.isBooleanObject=nt;function Re(ut){return Me&&le(ut,ae)}De.isBigIntObject=Re;function _e(ut){return ve&&le(ut,ie)}De.isSymbolObject=_e;function He(ut){return Le(ut)||Ze(ut)||nt(ut)||Re(ut)||_e(ut)}De.isBoxedPrimitive=He;function Qe(ut){return typeof Uint8Array!="undefined"&&(pt(ut)||yt(ut))}De.isAnyArrayBuffer=Qe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ut){Object.defineProperty(De,ut,{enumerable:!1,value:function(){throw new Error(ut+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(oe,ze,De){(function(fe){(function(){var me=Object.getOwnPropertyDescriptors||function(Et){for(var mt=Object.keys(Et),yt={},At=0;At<mt.length;At++)yt[mt[At]]=Object.getOwnPropertyDescriptor(Et,mt[At]);return yt},ke=/%[sdj%]/g;De.format=function(ht){if(!Ae(ht)){for(var Et=[],mt=0;mt<arguments.length;mt++)Et.push(ve(arguments[mt]));return Et.join(" ")}for(var mt=1,yt=arguments,At=yt.length,xt=String(ht).replace(ke,function(Ve){if(Ve==="%%")return"%";if(mt>=At)return Ve;switch(Ve){case"%s":return String(yt[mt++]);case"%d":return Number(yt[mt++]);case"%j":try{return JSON.stringify(yt[mt++])}catch(xe){return"[Circular]"}default:return Ve}}),tt=yt[mt];mt<At;tt=yt[++mt])Be(tt)||!Ue(tt)?xt+=" "+tt:xt+=" "+ve(tt);return xt},De.deprecate=function(ht,Et){if(typeof fe!="undefined"&&fe.noDeprecation===!0)return ht;if(typeof fe=="undefined")return function(){return De.deprecate(ht,Et).apply(this,arguments)};var mt=!1;function yt(){if(!mt){if(fe.throwDeprecation)throw new Error(Et);fe.traceDeprecation?console.trace(Et):console.error(Et),mt=!0}return ht.apply(this,arguments)}return yt};var Ce={},Se=/^$/;if(fe.env.NODE_DEBUG){var Me=fe.env.NODE_DEBUG;Me=Me.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Se=new RegExp("^"+Me+"$","i")}De.debuglog=function(ht){if(ht=ht.toUpperCase(),!Ce[ht])if(Se.test(ht)){var Et=fe.pid;Ce[ht]=function(){var mt=De.format.apply(De,arguments);console.error("%s %d: %s",ht,Et,mt)}}else Ce[ht]=function(){};return Ce[ht]};function ve(ht,Et){var mt={seen:[],stylize:de};return arguments.length>=3&&(mt.depth=arguments[2]),arguments.length>=4&&(mt.colors=arguments[3]),je(Et)?mt.showHidden=Et:Et&&De._extend(mt,Et),We(mt.showHidden)&&(mt.showHidden=!1),We(mt.depth)&&(mt.depth=2),We(mt.colors)&&(mt.colors=!1),We(mt.customInspect)&&(mt.customInspect=!0),mt.colors&&(mt.stylize=we),ee(mt,ht,mt.depth)}De.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 we(ht,Et){var mt=ve.styles[Et];return mt?"\x1B["+ve.colors[mt][0]+"m"+ht+"\x1B["+ve.colors[mt][1]+"m":ht}function de(ht,Et){return ht}function z(ht){var Et={};return ht.forEach(function(mt,yt){Et[mt]=!0}),Et}function ee(ht,Et,mt){if(ht.customInspect&&Et&&st(Et.inspect)&&Et.inspect!==De.inspect&&!(Et.constructor&&Et.constructor.prototype===Et)){var yt=Et.inspect(mt,ht);return Ae(yt)||(yt=ee(ht,yt,mt)),yt}var At=ae(ht,Et);if(At)return At;var xt=Object.keys(Et),tt=z(xt);if(ht.showHidden&&(xt=Object.getOwnPropertyNames(Et)),ot(Et)&&(xt.indexOf("message")>=0||xt.indexOf("description")>=0))return ie(Et);if(xt.length===0){if(st(Et)){var Ve=Et.name?": "+Et.name:"";return ht.stylize("[Function"+Ve+"]","special")}if(Ye(Et))return ht.stylize(RegExp.prototype.toString.call(Et),"regexp");if(Ke(Et))return ht.stylize(Date.prototype.toString.call(Et),"date");if(ot(Et))return ie(Et)}var xe="",Le=!1,Ze=["{","}"];if(Pe(Et)&&(Le=!0,Ze=["[","]"]),st(Et)){var nt=Et.name?": "+Et.name:"";xe=" [Function"+nt+"]"}if(Ye(Et)&&(xe=" "+RegExp.prototype.toString.call(Et)),Ke(Et)&&(xe=" "+Date.prototype.toUTCString.call(Et)),ot(Et)&&(xe=" "+ie(Et)),xt.length===0&&(!Le||Et.length==0))return Ze[0]+xe+Ze[1];if(mt<0)return Ye(Et)?ht.stylize(RegExp.prototype.toString.call(Et),"regexp"):ht.stylize("[Object]","special");ht.seen.push(Et);var Re;return Le?Re=le(ht,Et,mt,tt,xt):Re=xt.map(function(_e){return ue(ht,Et,mt,tt,_e,Le)}),ht.seen.pop(),ge(Re,xe,Ze)}function ae(ht,Et){if(We(Et))return ht.stylize("undefined","undefined");if(Ae(Et)){var mt="'"+JSON.stringify(Et).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ht.stylize(mt,"string")}if(Ne(Et))return ht.stylize(""+Et,"number");if(je(Et))return ht.stylize(""+Et,"boolean");if(Be(Et))return ht.stylize("null","null")}function ie(ht){return"["+Error.prototype.toString.call(ht)+"]"}function le(ht,Et,mt,yt,At){for(var xt=[],tt=0,Ve=Et.length;tt<Ve;++tt)Pt(Et,String(tt))?xt.push(ue(ht,Et,mt,yt,String(tt),!0)):xt.push("");return At.forEach(function(xe){xe.match(/^\d+$/)||xt.push(ue(ht,Et,mt,yt,xe,!0))}),xt}function ue(ht,Et,mt,yt,At,xt){var tt,Ve,xe;if(xe=Object.getOwnPropertyDescriptor(Et,At)||{value:Et[At]},xe.get?xe.set?Ve=ht.stylize("[Getter/Setter]","special"):Ve=ht.stylize("[Getter]","special"):xe.set&&(Ve=ht.stylize("[Setter]","special")),Pt(yt,At)||(tt="["+At+"]"),Ve||(ht.seen.indexOf(xe.value)<0?(Be(mt)?Ve=ee(ht,xe.value,null):Ve=ee(ht,xe.value,mt-1),Ve.indexOf(`
`)>-1&&(xt?Ve=Ve.split(`
`).map(function(Le){return" "+Le}).join(`
`).slice(2):Ve=`
`+Ve.split(`
`).map(function(Le){return" "+Le}).join(`
`))):Ve=ht.stylize("[Circular]","special")),We(tt)){if(xt&&At.match(/^\d+$/))return Ve;tt=JSON.stringify(""+At),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=ht.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=ht.stylize(tt,"string"))}return tt+": "+Ve}function ge(ht,Et,mt){var yt=0,At=ht.reduce(function(xt,tt){return yt++,tt.indexOf(`
`)>=0&&yt++,xt+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return At>60?mt[0]+(Et===""?"":Et+`
`)+" "+ht.join(`,
`)+" "+mt[1]:mt[0]+Et+" "+ht.join(", ")+" "+mt[1]}De.types=oe("./support/types");function Pe(ht){return Array.isArray(ht)}De.isArray=Pe;function je(ht){return typeof ht=="boolean"}De.isBoolean=je;function Be(ht){return ht===null}De.isNull=Be;function Fe(ht){return ht==null}De.isNullOrUndefined=Fe;function Ne(ht){return typeof ht=="number"}De.isNumber=Ne;function Ae(ht){return typeof ht=="string"}De.isString=Ae;function Ie(ht){return typeof ht=="symbol"}De.isSymbol=Ie;function We(ht){return ht===void 0}De.isUndefined=We;function Ye(ht){return Ue(ht)&&Ct(ht)==="[object RegExp]"}De.isRegExp=Ye,De.types.isRegExp=Ye;function Ue(ht){return typeof ht=="object"&&ht!==null}De.isObject=Ue;function Ke(ht){return Ue(ht)&&Ct(ht)==="[object Date]"}De.isDate=Ke,De.types.isDate=Ke;function ot(ht){return Ue(ht)&&(Ct(ht)==="[object Error]"||ht instanceof Error)}De.isError=ot,De.types.isNativeError=ot;function st(ht){return typeof ht=="function"}De.isFunction=st;function dt(ht){return ht===null||typeof ht=="boolean"||typeof ht=="number"||typeof ht=="string"||typeof ht=="symbol"||typeof ht=="undefined"}De.isPrimitive=dt,De.isBuffer=oe("./support/isBuffer");function Ct(ht){return Object.prototype.toString.call(ht)}function $e(ht){return ht<10?"0"+ht.toString(10):ht.toString(10)}var rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function St(){var ht=new Date,Et=[$e(ht.getHours()),$e(ht.getMinutes()),$e(ht.getSeconds())].join(":");return[ht.getDate(),rt[ht.getMonth()],Et].join(" ")}De.log=function(){console.log("%s - %s",St(),De.format.apply(De,arguments))},De.inherits=oe("inherits"),De._extend=function(ht,Et){if(!Et||!Ue(Et))return ht;for(var mt=Object.keys(Et),yt=mt.length;yt--;)ht[mt[yt]]=Et[mt[yt]];return ht};function Pt(ht,Et){return Object.prototype.hasOwnProperty.call(ht,Et)}var wt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;De.promisify=function(Et){if(typeof Et!="function")throw new TypeError('The "original" argument must be of type Function');if(wt&&Et[wt]){var mt=Et[wt];if(typeof mt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(mt,wt,{value:mt,enumerable:!1,writable:!1,configurable:!0}),mt}function mt(){for(var yt,At,xt=new Promise(function(xe,Le){yt=xe,At=Le}),tt=[],Ve=0;Ve<arguments.length;Ve++)tt.push(arguments[Ve]);tt.push(function(xe,Le){xe?At(xe):yt(Le)});try{Et.apply(this,tt)}catch(xe){At(xe)}return xt}return Object.setPrototypeOf(mt,Object.getPrototypeOf(Et)),wt&&Object.defineProperty(mt,wt,{value:mt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(mt,me(Et))},De.promisify.custom=wt;function pt(ht,Et){if(!ht){var mt=new Error("Promise was rejected with a falsy value");mt.reason=ht,ht=mt}return Et(ht)}function ft(ht){if(typeof ht!="function")throw new TypeError('The "original" argument must be of type Function');function Et(){for(var mt=[],yt=0;yt<arguments.length;yt++)mt.push(arguments[yt]);var At=mt.pop();if(typeof At!="function")throw new TypeError("The last argument must be of type Function");var xt=this,tt=function(){return At.apply(xt,arguments)};ht.apply(this,mt).then(function(Ve){fe.nextTick(tt.bind(null,null,Ve))},function(Ve){fe.nextTick(pt.bind(null,Ve,tt))})}return Object.setPrototypeOf(Et,Object.getPrototypeOf(ht)),Object.defineProperties(Et,me(ht)),Et}De.callbackify=ft}).call(this)}).call(this,oe("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("for-each"),ke=oe("available-typed-arrays"),Ce=oe("call-bind"),Se=oe("call-bind/callBound"),Me=oe("gopd"),ve=Se("Object.prototype.toString"),we=oe("has-tostringtag/shams")(),de=typeof globalThis=="undefined"?fe:globalThis,z=ke(),ee=Se("String.prototype.slice"),ae=Object.getPrototypeOf,ie=Se("Array.prototype.indexOf",!0)||function(je,Be){for(var Fe=0;Fe<je.length;Fe+=1)if(je[Fe]===Be)return Fe;return-1},le={__proto__:null};we&&Me&&ae?me(z,function(Pe){var je=new de[Pe];if(Symbol.toStringTag in je){var Be=ae(je),Fe=Me(Be,Symbol.toStringTag);if(!Fe){var Ne=ae(Be);Fe=Me(Ne,Symbol.toStringTag)}le["$"+Pe]=Ce(Fe.get)}}):me(z,function(Pe){var je=new de[Pe];le["$"+Pe]=Ce(je.slice)});var ue=function(je){var Be=!1;return me(le,function(Fe,Ne){if(!Be)try{"$"+Fe(je)===Ne&&(Be=ee(Ne,1))}catch(Ae){}}),Be},ge=function(je){var Be=!1;return me(le,function(Fe,Ne){if(!Be)try{Fe(je),Be=ee(Ne,1)}catch(Ae){}}),Be};ze.exports=function(je){if(!je||typeof je!="object")return!1;if(!we){var Be=ee(ve(je),8,-1);return ie(z,Be)>-1?Be:Be!=="Object"?!1:ge(je)}return Me?ue(je):null}}).call(this)}).call(this,typeof cn!="undefined"?cn: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(oe,ze,De){(function(){"use strict";De.stripBOM=function(fe){return fe[0]==="\uFEFF"?fe.substring(1):fe}}).call(this)},{}],422:[function(oe,ze,De){(function(){"use strict";var fe,me,ke,Ce,Se,Me={}.hasOwnProperty;fe=oe("xmlbuilder"),me=oe("./defaults").defaults,Ce=function(ve){return typeof ve=="string"&&(ve.indexOf("&")>=0||ve.indexOf(">")>=0||ve.indexOf("<")>=0)},Se=function(ve){return"<![CDATA["+ke(ve)+"]]>"},ke=function(ve){return ve.replace("]]>","]]]]><![CDATA[>")},De.Builder=function(){function ve(we){var de,z,ee;this.options={},z=me["0.2"];for(de in z)Me.call(z,de)&&(ee=z[de],this.options[de]=ee);for(de in we)Me.call(we,de)&&(ee=we[de],this.options[de]=ee)}return ve.prototype.buildObject=function(we){var de,z,ee,ae,ie;return de=this.options.attrkey,z=this.options.charkey,Object.keys(we).length===1&&this.options.rootName===me["0.2"].rootName?(ie=Object.keys(we)[0],we=we[ie]):ie=this.options.rootName,ee=function(le){return function(ue,ge){var Pe,je,Be,Fe,Ne,Ae;if(typeof ge!="object")le.options.cdata&&Ce(ge)?ue.raw(Se(ge)):ue.txt(ge);else if(Array.isArray(ge)){for(Fe in ge)if(Me.call(ge,Fe)){je=ge[Fe];for(Ne in je)Be=je[Ne],ue=ee(ue.ele(Ne),Be).up()}}else for(Ne in ge)if(Me.call(ge,Ne))if(je=ge[Ne],Ne===de){if(typeof je=="object")for(Pe in je)Ae=je[Pe],ue=ue.att(Pe,Ae)}else if(Ne===z)le.options.cdata&&Ce(je)?ue=ue.raw(Se(je)):ue=ue.txt(je);else if(Array.isArray(je))for(Fe in je)Me.call(je,Fe)&&(Be=je[Fe],typeof Be=="string"?le.options.cdata&&Ce(Be)?ue=ue.ele(Ne).raw(Se(Be)).up():ue=ue.ele(Ne,Be).up():ue=ee(ue.ele(Ne),Be).up());else typeof je=="object"?ue=ee(ue.ele(Ne),je).up():typeof je=="string"&&le.options.cdata&&Ce(je)?ue=ue.ele(Ne).raw(Se(je)).up():(je==null&&(je=""),ue=ue.ele(Ne,je.toString()).up());return ue}}(this),ae=fe.create(ie,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ee(ae,we).end(this.options.renderOpts)},ve}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(oe,ze,De){(function(){De.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(oe,ze,De){(function(){"use strict";var fe,me,ke,Ce,Se,Me,ve,we,de,z=function(ie,le){return function(){return ie.apply(le,arguments)}},ee=function(ie,le){for(var ue in le)ae.call(le,ue)&&(ie[ue]=le[ue]);function ge(){this.constructor=ie}return ge.prototype=le.prototype,ie.prototype=new ge,ie.__super__=le.prototype,ie},ae={}.hasOwnProperty;we=oe("sax"),Ce=oe("events"),fe=oe("./bom"),ve=oe("./processors"),de=oe("timers").setImmediate,me=oe("./defaults").defaults,Se=function(ie){return typeof ie=="object"&&ie!=null&&Object.keys(ie).length===0},Me=function(ie,le,ue){var ge,Pe,je;for(ge=0,Pe=ie.length;ge<Pe;ge++)je=ie[ge],le=je(le,ue);return le},ke=function(ie,le,ue){var ge;return ge=Object.create(null),ge.value=ue,ge.writable=!0,ge.enumerable=!0,ge.configurable=!0,Object.defineProperty(ie,le,ge)},De.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 ge,Pe,je;if(!(this instanceof De.Parser))return new De.Parser(ue);this.options={},Pe=me["0.2"];for(ge in Pe)ae.call(Pe,ge)&&(je=Pe[ge],this.options[ge]=je);for(ge in ue)ae.call(ue,ge)&&(je=ue[ge],this.options[ge]=je);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,ge;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),de(this.processAsync))}catch(Pe){if(ge=Pe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(ge)}},le.prototype.assignOrPush=function(ue,ge,Pe){return ge in ue?(ue[ge]instanceof Array||ke(ue,ge,[ue[ge]]),ue[ge].push(Pe)):this.options.explicitArray?ke(ue,ge,[Pe]):ke(ue,ge,Pe)},le.prototype.reset=function(){var ue,ge,Pe,je;return this.removeAllListeners(),this.saxParser=we.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Be){return function(Fe){if(Be.saxParser.resume(),!Be.saxParser.errThrown)return Be.saxParser.errThrown=!0,Be.emit("error",Fe)}}(this),this.saxParser.onend=function(Be){return function(){if(!Be.saxParser.ended)return Be.saxParser.ended=!0,Be.emit("end",Be.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,je=[],ue=this.options.attrkey,ge=this.options.charkey,this.saxParser.onopentag=function(Be){return function(Fe){var Ne,Ae,Ie,We,Ye;if(Ie={},Ie[ge]="",!Be.options.ignoreAttrs){Ye=Fe.attributes;for(Ne in Ye)ae.call(Ye,Ne)&&(!(ue in Ie)&&!Be.options.mergeAttrs&&(Ie[ue]={}),Ae=Be.options.attrValueProcessors?Me(Be.options.attrValueProcessors,Fe.attributes[Ne],Ne):Fe.attributes[Ne],We=Be.options.attrNameProcessors?Me(Be.options.attrNameProcessors,Ne):Ne,Be.options.mergeAttrs?Be.assignOrPush(Ie,We,Ae):ke(Ie[ue],We,Ae))}return Ie["#name"]=Be.options.tagNameProcessors?Me(Be.options.tagNameProcessors,Fe.name):Fe.name,Be.options.xmlns&&(Ie[Be.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),je.push(Ie)}}(this),this.saxParser.onclosetag=function(Be){return function(){var Fe,Ne,Ae,Ie,We,Ye,Ue,Ke,ot,st;if(Ye=je.pop(),We=Ye["#name"],(!Be.options.explicitChildren||!Be.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(Fe=Ye.cdata,delete Ye.cdata),ot=je[je.length-1],Ye[ge].match(/^\s*$/)&&!Fe?(Ne=Ye[ge],delete Ye[ge]):(Be.options.trim&&(Ye[ge]=Ye[ge].trim()),Be.options.normalize&&(Ye[ge]=Ye[ge].replace(/\s{2,}/g," ").trim()),Ye[ge]=Be.options.valueProcessors?Me(Be.options.valueProcessors,Ye[ge],We):Ye[ge],Object.keys(Ye).length===1&&ge in Ye&&!Be.EXPLICIT_CHARKEY&&(Ye=Ye[ge])),Se(Ye)&&(typeof Be.options.emptyTag=="function"?Ye=Be.options.emptyTag():Ye=Be.options.emptyTag!==""?Be.options.emptyTag:Ne),Be.options.validator!=null&&(st="/"+function(){var dt,Ct,$e;for($e=[],dt=0,Ct=je.length;dt<Ct;dt++)Ie=je[dt],$e.push(Ie["#name"]);return $e}().concat(We).join("/"),function(){var dt;try{return Ye=Be.options.validator(st,ot&&ot[We],Ye)}catch(Ct){return dt=Ct,Be.emit("error",dt)}}()),Be.options.explicitChildren&&!Be.options.mergeAttrs&&typeof Ye=="object"){if(!Be.options.preserveChildrenOrder)Ie={},Be.options.attrkey in Ye&&(Ie[Be.options.attrkey]=Ye[Be.options.attrkey],delete Ye[Be.options.attrkey]),!Be.options.charsAsChildren&&Be.options.charkey in Ye&&(Ie[Be.options.charkey]=Ye[Be.options.charkey],delete Ye[Be.options.charkey]),Object.getOwnPropertyNames(Ye).length>0&&(Ie[Be.options.childkey]=Ye),Ye=Ie;else if(ot){ot[Be.options.childkey]=ot[Be.options.childkey]||[],Ue={};for(Ae in Ye)ae.call(Ye,Ae)&&ke(Ue,Ae,Ye[Ae]);ot[Be.options.childkey].push(Ue),delete Ye["#name"],Object.keys(Ye).length===1&&ge in Ye&&!Be.EXPLICIT_CHARKEY&&(Ye=Ye[ge])}}return je.length>0?Be.assignOrPush(ot,We,Ye):(Be.options.explicitRoot&&(Ke=Ye,Ye={},ke(Ye,We,Ke)),Be.resultObject=Ye,Be.saxParser.ended=!0,Be.emit("end",Be.resultObject))}}(this),Pe=function(Be){return function(Fe){var Ne,Ae;if(Ae=je[je.length-1],Ae)return Ae[ge]+=Fe,Be.options.explicitChildren&&Be.options.preserveChildrenOrder&&Be.options.charsAsChildren&&(Be.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Ae[Be.options.childkey]=Ae[Be.options.childkey]||[],Ne={"#name":"__text__"},Ne[ge]=Fe,Be.options.normalize&&(Ne[ge]=Ne[ge].replace(/\s{2,}/g," ").trim()),Ae[Be.options.childkey].push(Ne)),Ae}}(this),this.saxParser.ontext=Pe,this.saxParser.oncdata=function(Be){return function(Fe){var Ne;if(Ne=Pe(Fe),Ne)return Ne.cdata=!0}}(this)},le.prototype.parseString=function(ue,ge){var Pe;ge!=null&&typeof ge=="function"&&(this.on("end",function(je){return this.reset(),ge(null,je)}),this.on("error",function(je){return this.reset(),ge(je)}));try{return ue=ue.toString(),ue.trim()===""?(this.emit("end",null),!0):(ue=fe.stripBOM(ue),this.options.async?(this.remaining=ue,de(this.processAsync),this.saxParser):this.saxParser.write(ue).close())}catch(je){if(Pe=je,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Pe}else return this.emit("error",Pe),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(ue){return new Promise(function(ge){return function(Pe,je){return ge.parseString(ue,function(Be,Fe){return Be?je(Be):Pe(Fe)})}}(this))},le}(Ce),De.parseString=function(ie,le,ue){var ge,Pe,je;return ue!=null?(typeof ue=="function"&&(ge=ue),typeof le=="object"&&(Pe=le)):(typeof le=="function"&&(ge=le),Pe={}),je=new De.Parser(Pe),je.parseString(ie,ge)},De.parseStringPromise=function(ie,le){var ue,ge;return typeof le=="object"&&(ue=le),ge=new De.Parser(ue),ge.parseStringPromise(ie)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(oe,ze,De){(function(){"use strict";var fe;fe=new RegExp(/(?!xmlns)^.*:/),De.normalize=function(me){return me.toLowerCase()},De.firstCharLowerCase=function(me){return me.charAt(0).toLowerCase()+me.slice(1)},De.stripPrefix=function(me){return me.replace(fe,"")},De.parseNumbers=function(me){return isNaN(me)||(me=me%1===0?parseInt(me,10):parseFloat(me)),me},De.parseBooleans=function(me){return/^(?:true|false)$/i.test(me)&&(me=me.toLowerCase()==="true"),me}}).call(this)},{}],426:[function(oe,ze,De){(function(){"use strict";var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Me.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Me={}.hasOwnProperty;me=oe("./defaults"),fe=oe("./builder"),ke=oe("./parser"),Ce=oe("./processors"),De.defaults=me.defaults,De.processors=Ce,De.ValidationError=function(ve){Se(we,ve);function we(de){this.message=de}return we}(Error),De.Builder=fe.Builder,De.Parser=ke.Parser,De.parseString=ke.parseString,De.parseStringPromise=ke.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(oe,ze,De){(function(){ze.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(oe,ze,De){(function(){ze.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(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we=[].slice,de={}.hasOwnProperty;fe=function(){var z,ee,ae,ie,le,ue;if(ue=arguments[0],le=2<=arguments.length?we.call(arguments,1):[],Se(Object.assign))Object.assign.apply(null,arguments);else for(z=0,ae=le.length;z<ae;z++)if(ie=le[z],ie!=null)for(ee in ie)de.call(ie,ee)&&(ue[ee]=ie[ee]);return ue},Se=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Me=function(z){var ee;return!!z&&((ee=typeof z)=="function"||ee==="object")},ke=function(z){return Se(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},Ce=function(z){var ee;if(ke(z))return!z.length;for(ee in z)if(de.call(z,ee))return!1;return!0},ve=function(z){var ee,ae;return Me(z)&&(ae=Object.getPrototypeOf(z))&&(ee=ae.constructor)&&typeof ee=="function"&&ee instanceof ee&&Function.prototype.toString.call(ee)===Function.prototype.toString.call(Object)},me=function(z){return Se(z.valueOf)?z.valueOf():z},ze.exports.assign=fe,ze.exports.isFunction=Se,ze.exports.isObject=Me,ze.exports.isArray=ke,ze.exports.isEmpty=Ce,ze.exports.isPlainObject=ve,ze.exports.getValue=me}).call(this)},{}],430:[function(oe,ze,De){(function(){ze.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(oe,ze,De){(function(){var fe,me,ke;fe=oe("./NodeType"),ke=oe("./XMLNode"),ze.exports=me=function(){function Ce(Se,Me,ve){if(this.parent=Se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Me==null)throw new Error("Missing attribute name. "+this.debugInfo(Me));this.name=this.stringify.name(Me),this.value=this.stringify.attValue(ve),this.type=fe.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(Ce.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ce.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(Ce.prototype,"textContent",{get:function(){return this.value},set:function(Se){return this.value=Se||""}}),Object.defineProperty(Ce.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(Ce.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(Ce.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(Ce.prototype,"specified",{get:function(){return!0}}),Ce.prototype.clone=function(){return Object.create(this)},Ce.prototype.toString=function(Se){return this.options.writer.attribute(this,this.options.writer.filterOptions(Se))},Ce.prototype.debugInfo=function(Se){return Se=Se||this.name,Se==null?"parent: <"+this.parent.name+">":"attribute: {"+Se+"}, parent: <"+this.parent.name+">"},Ce.prototype.isEqualNode=function(Se){return!(Se.namespaceURI!==this.namespaceURI||Se.prefix!==this.prefix||Se.localName!==this.localName||Se.value!==this.value)},Ce}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),ke=oe("./XMLCharacterData"),ze.exports=me=function(Me){Ce(ve,Me);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=fe.CData,this.value=this.stringify.cdata(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.cdata(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(oe,ze,De){(function(){var fe,me,ke=function(Se,Me){for(var ve in Me)Ce.call(Me,ve)&&(Se[ve]=Me[ve]);function we(){this.constructor=Se}return we.prototype=Me.prototype,Se.prototype=new we,Se.__super__=Me.prototype,Se},Ce={}.hasOwnProperty;me=oe("./XMLNode"),ze.exports=fe=function(Se){ke(Me,Se);function Me(ve){Me.__super__.constructor.call(this,ve),this.value=""}return Object.defineProperty(Me.prototype,"data",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Object.defineProperty(Me.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Me.prototype,"textContent",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Me.prototype.clone=function(){return Object.create(this)},Me.prototype.substringData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.appendData=function(ve){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.insertData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.deleteData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.replaceData=function(ve,we,de){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.isEqualNode=function(ve){return!(!Me.__super__.isEqualNode.apply(this,arguments).isEqualNode(ve)||ve.data!==this.data)},Me}(me)}).call(this)},{"./XMLNode":450}],434:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),ze.exports=ke=function(Me){Ce(ve,Me);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=fe.Comment,this.value=this.stringify.comment(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.comment(this,this.options.writer.filterOptions(we))},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(oe,ze,De){(function(){var fe,me,ke;me=oe("./XMLDOMErrorHandler"),ke=oe("./XMLDOMStringList"),ze.exports=fe=function(){function Ce(){var Se;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new me,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=Se=Object.create(this.defaultParams)}return Object.defineProperty(Ce.prototype,"parameterNames",{get:function(){return new ke(Object.keys(this.defaultParams))}}),Ce.prototype.getParameter=function(Se){return this.params.hasOwnProperty(Se)?this.params[Se]:null},Ce.prototype.canSetParameter=function(Se,Me){return!0},Ce.prototype.setParameter=function(Se,Me){return Me!=null?this.params[Se]=Me:delete this.params[Se]},Ce}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(){}return me.prototype.handleError=function(ke){throw new Error(ke)},me}()}).call(this)},{}],437:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(){}return me.prototype.hasFeature=function(ke,Ce){return!0},me.prototype.createDocumentType=function(ke,Ce,Se){throw new Error("This DOM method is not implemented.")},me.prototype.createDocument=function(ke,Ce,Se){throw new Error("This DOM method is not implemented.")},me.prototype.createHTMLDocument=function(ke){throw new Error("This DOM method is not implemented.")},me.prototype.getFeature=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me}()}).call(this)},{}],438:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(ke){this.arr=ke||[]}return Object.defineProperty(me.prototype,"length",{get:function(){return this.arr.length}}),me.prototype.item=function(ke){return this.arr[ke]||null},me.prototype.contains=function(ke){return this.arr.indexOf(ke)!==-1},me}()}).call(this)},{}],439:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(Me){Ce(ve,Me);function ve(we,de,z,ee,ae,ie){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(de));if(!ee)throw new Error("Missing DTD attribute type. "+this.debugInfo(de));if(!ae)throw new Error("Missing DTD attribute default. "+this.debugInfo(de));if(ae.indexOf("#")!==0&&(ae="#"+ae),!ae.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(de));if(ie&&!ae.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(de));this.elementName=this.stringify.name(de),this.type=fe.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(ee),ie&&(this.defaultValue=this.stringify.dtdAttDefault(ie)),this.defaultValueType=ae}return ve.prototype.toString=function(we){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(Me){Ce(ve,Me);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(de),this.type=fe.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return ve.prototype.toString=function(we){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Me.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Me={}.hasOwnProperty;Ce=oe("./Utility").isObject,ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(ve){Se(we,ve);function we(de,z,ee,ae){if(we.__super__.constructor.call(this,de),ee==null)throw new Error("Missing DTD entity name. "+this.debugInfo(ee));if(ae==null)throw new Error("Missing DTD entity value. "+this.debugInfo(ee));if(this.pe=!!z,this.name=this.stringify.name(ee),this.type=fe.EntityDeclaration,!Ce(ae))this.value=this.stringify.dtdEntityValue(ae),this.internal=!0;else{if(!ae.pubID&&!ae.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(ee));if(ae.pubID&&!ae.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(ee));if(this.internal=!1,ae.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ae.pubID)),ae.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ae.sysID)),ae.nData!=null&&(this.nData=this.stringify.dtdNData(ae.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(ee))}}return Object.defineProperty(we.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(we.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(we.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(we.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(we.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(we.prototype,"xmlVersion",{get:function(){return null}}),we.prototype.toString=function(de){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(de))},we}(ke)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(Me){Ce(ve,Me);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD notation name. "+this.debugInfo(de));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(de));this.name=this.stringify.name(de),this.type=fe.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(we){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Me.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Me={}.hasOwnProperty;Ce=oe("./Utility").isObject,ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(ve){Se(we,ve);function we(de,z,ee,ae){var ie;we.__super__.constructor.call(this,de),Ce(z)&&(ie=z,z=ie.version,ee=ie.encoding,ae=ie.standalone),z||(z="1.0"),this.type=fe.Declaration,this.version=this.stringify.xmlVersion(z),ee!=null&&(this.encoding=this.stringify.xmlEncoding(ee)),ae!=null&&(this.standalone=this.stringify.xmlStandalone(ae))}return we.prototype.toString=function(de){return this.options.writer.declaration(this,this.options.writer.filterOptions(de))},we}(ke)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z=function(ae,ie){for(var le in ie)ee.call(ie,le)&&(ae[le]=ie[le]);function ue(){this.constructor=ae}return ue.prototype=ie.prototype,ae.prototype=new ue,ae.__super__=ie.prototype,ae},ee={}.hasOwnProperty;de=oe("./Utility").isObject,we=oe("./XMLNode"),fe=oe("./NodeType"),me=oe("./XMLDTDAttList"),Ce=oe("./XMLDTDEntity"),ke=oe("./XMLDTDElement"),Se=oe("./XMLDTDNotation"),ve=oe("./XMLNamedNodeMap"),ze.exports=Me=function(ae){z(ie,ae);function ie(le,ue,ge){var Pe,je,Be,Fe,Ne,Ae;if(ie.__super__.constructor.call(this,le),this.type=fe.DocType,le.children){for(Fe=le.children,je=0,Be=Fe.length;je<Be;je++)if(Pe=Fe[je],Pe.type===fe.Element){this.name=Pe.name;break}}this.documentObject=le,de(ue)&&(Ne=ue,ue=Ne.pubID,ge=Ne.sysID),ge==null&&(Ae=[ue,ge],ge=Ae[0],ue=Ae[1]),ue!=null&&(this.pubID=this.stringify.dtdPubID(ue)),ge!=null&&(this.sysID=this.stringify.dtdSysID(ge))}return Object.defineProperty(ie.prototype,"entities",{get:function(){var le,ue,ge,Pe,je;for(Pe={},je=this.children,ue=0,ge=je.length;ue<ge;ue++)le=je[ue],le.type===fe.EntityDeclaration&&!le.pe&&(Pe[le.name]=le);return new ve(Pe)}}),Object.defineProperty(ie.prototype,"notations",{get:function(){var le,ue,ge,Pe,je;for(Pe={},je=this.children,ue=0,ge=je.length;ue<ge;ue++)le=je[ue],le.type===fe.NotationDeclaration&&(Pe[le.name]=le);return new ve(Pe)}}),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 ge;return ge=new ke(this,le,ue),this.children.push(ge),this},ie.prototype.attList=function(le,ue,ge,Pe,je){var Be;return Be=new me(this,le,ue,ge,Pe,je),this.children.push(Be),this},ie.prototype.entity=function(le,ue){var ge;return ge=new Ce(this,!1,le,ue),this.children.push(ge),this},ie.prototype.pEntity=function(le,ue){var ge;return ge=new Ce(this,!0,le,ue),this.children.push(ge),this},ie.prototype.notation=function(le,ue){var ge;return ge=new Se(this,le,ue),this.children.push(ge),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,ge,Pe,je){return this.attList(le,ue,ge,Pe,je)},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}(we)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de=function(ee,ae){for(var ie in ae)z.call(ae,ie)&&(ee[ie]=ae[ie]);function le(){this.constructor=ee}return le.prototype=ae.prototype,ee.prototype=new le,ee.__super__=ae.prototype,ee},z={}.hasOwnProperty;we=oe("./Utility").isPlainObject,ke=oe("./XMLDOMImplementation"),me=oe("./XMLDOMConfiguration"),Se=oe("./XMLNode"),fe=oe("./NodeType"),ve=oe("./XMLStringifier"),Me=oe("./XMLStringWriter"),ze.exports=Ce=function(ee){de(ae,ee);function ae(ie){ae.__super__.constructor.call(this,null),this.name="#document",this.type=fe.Document,this.documentURI=null,this.domConfig=new me,ie||(ie={}),ie.writer||(ie.writer=new Me),this.options=ie,this.stringify=new ve(ie)}return Object.defineProperty(ae.prototype,"implementation",{value:new ke}),Object.defineProperty(ae.prototype,"doctype",{get:function(){var ie,le,ue,ge;for(ge=this.children,le=0,ue=ge.length;le<ue;le++)if(ie=ge[le],ie.type===fe.DocType)return ie;return null}}),Object.defineProperty(ae.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(ae.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(ae.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(ae.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].encoding:null}}),Object.defineProperty(ae.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(ae.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(ae.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(ae.prototype,"origin",{get:function(){return null}}),Object.defineProperty(ae.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(ae.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(ae.prototype,"contentType",{get:function(){return null}}),ae.prototype.end=function(ie){var le;return le={},ie?we(ie)&&(le=ie,ie=this.options.writer):ie=this.options.writer,ie.document(this,ie.filterOptions(le))},ae.prototype.toString=function(ie){return this.options.writer.document(this,this.options.writer.filterOptions(ie))},ae.prototype.createElement=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createTextNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createComment=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createCDATASection=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createProcessingInstruction=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createAttribute=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createEntityReference=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByTagName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.importNode=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createElementNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createAttributeNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByTagNameNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementById=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.adoptNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.renameNode=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByClassName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createEvent=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createNodeIterator=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createTreeWalker=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Ie,We,Ye={}.hasOwnProperty;We=oe("./Utility"),Ae=We.isObject,Ne=We.isFunction,Ie=We.isPlainObject,Fe=We.getValue,fe=oe("./NodeType"),ae=oe("./XMLDocument"),le=oe("./XMLElement"),Ce=oe("./XMLCData"),Se=oe("./XMLComment"),ge=oe("./XMLRaw"),Be=oe("./XMLText"),ue=oe("./XMLProcessingInstruction"),z=oe("./XMLDeclaration"),ee=oe("./XMLDocType"),Me=oe("./XMLDTDAttList"),we=oe("./XMLDTDEntity"),ve=oe("./XMLDTDElement"),de=oe("./XMLDTDNotation"),ke=oe("./XMLAttribute"),je=oe("./XMLStringifier"),Pe=oe("./XMLStringWriter"),me=oe("./WriterState"),ze.exports=ie=function(){function Ue(Ke,ot,st){var dt;this.name="?xml",this.type=fe.Document,Ke||(Ke={}),dt={},Ke.writer?Ie(Ke.writer)&&(dt=Ke.writer,Ke.writer=new Pe):Ke.writer=new Pe,this.options=Ke,this.writer=Ke.writer,this.writerOptions=this.writer.filterOptions(dt),this.stringify=new je(Ke),this.onDataCallback=ot||function(){},this.onEndCallback=st||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ue.prototype.createChildNode=function(Ke){var ot,st,dt,Ct,$e,rt,St,Pt;switch(Ke.type){case fe.CData:this.cdata(Ke.value);break;case fe.Comment:this.comment(Ke.value);break;case fe.Element:dt={},St=Ke.attribs;for(st in St)Ye.call(St,st)&&(ot=St[st],dt[st]=ot.value);this.node(Ke.name,dt);break;case fe.Dummy:this.dummy();break;case fe.Raw:this.raw(Ke.value);break;case fe.Text:this.text(Ke.value);break;case fe.ProcessingInstruction:this.instruction(Ke.target,Ke.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ke.constructor.name)}for(Pt=Ke.children,$e=0,rt=Pt.length;$e<rt;$e++)Ct=Pt[$e],this.createChildNode(Ct),Ct.type===fe.Element&&this.up();return this},Ue.prototype.dummy=function(){return this},Ue.prototype.node=function(Ke,ot,st){var dt;if(Ke==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(Ke));return this.openCurrent(),Ke=Fe(Ke),ot==null&&(ot={}),ot=Fe(ot),Ae(ot)||(dt=[ot,st],st=dt[0],ot=dt[1]),this.currentNode=new le(this,Ke,ot),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,st!=null&&this.text(st),this},Ue.prototype.element=function(Ke,ot,st){var dt,Ct,$e,rt,St,Pt;if(this.currentNode&&this.currentNode.type===fe.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ke)||Ae(Ke)||Ne(Ke))for(rt=this.options.noValidation,this.options.noValidation=!0,Pt=new ae(this.options).element("TEMP_ROOT"),Pt.element(Ke),this.options.noValidation=rt,St=Pt.children,Ct=0,$e=St.length;Ct<$e;Ct++)dt=St[Ct],this.createChildNode(dt),dt.type===fe.Element&&this.up();else this.node(Ke,ot,st);return this},Ue.prototype.attribute=function(Ke,ot){var st,dt;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ke));if(Ke!=null&&(Ke=Fe(Ke)),Ae(Ke))for(st in Ke)Ye.call(Ke,st)&&(dt=Ke[st],this.attribute(st,dt));else Ne(ot)&&(ot=ot.apply()),this.options.keepNullAttributes&&ot==null?this.currentNode.attribs[Ke]=new ke(this,Ke,""):ot!=null&&(this.currentNode.attribs[Ke]=new ke(this,Ke,ot));return this},Ue.prototype.text=function(Ke){var ot;return this.openCurrent(),ot=new Be(this,Ke),this.onData(this.writer.text(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.cdata=function(Ke){var ot;return this.openCurrent(),ot=new Ce(this,Ke),this.onData(this.writer.cdata(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.comment=function(Ke){var ot;return this.openCurrent(),ot=new Se(this,Ke),this.onData(this.writer.comment(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.raw=function(Ke){var ot;return this.openCurrent(),ot=new ge(this,Ke),this.onData(this.writer.raw(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.instruction=function(Ke,ot){var st,dt,Ct,$e,rt;if(this.openCurrent(),Ke!=null&&(Ke=Fe(Ke)),ot!=null&&(ot=Fe(ot)),Array.isArray(Ke))for(st=0,$e=Ke.length;st<$e;st++)dt=Ke[st],this.instruction(dt);else if(Ae(Ke))for(dt in Ke)Ye.call(Ke,dt)&&(Ct=Ke[dt],this.instruction(dt,Ct));else Ne(ot)&&(ot=ot.apply()),rt=new ue(this,Ke,ot),this.onData(this.writer.processingInstruction(rt,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ue.prototype.declaration=function(Ke,ot,st){var dt;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return dt=new z(this,Ke,ot,st),this.onData(this.writer.declaration(dt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.doctype=function(Ke,ot,st){if(this.openCurrent(),Ke==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,ot,st),this.currentNode.rootNodeName=Ke,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ue.prototype.dtdElement=function(Ke,ot){var st;return this.openCurrent(),st=new ve(this,Ke,ot),this.onData(this.writer.dtdElement(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.attList=function(Ke,ot,st,dt,Ct){var $e;return this.openCurrent(),$e=new Me(this,Ke,ot,st,dt,Ct),this.onData(this.writer.dtdAttList($e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.entity=function(Ke,ot){var st;return this.openCurrent(),st=new we(this,!1,Ke,ot),this.onData(this.writer.dtdEntity(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.pEntity=function(Ke,ot){var st;return this.openCurrent(),st=new we(this,!0,Ke,ot),this.onData(this.writer.dtdEntity(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.notation=function(Ke,ot){var st;return this.openCurrent(),st=new de(this,Ke,ot),this.onData(this.writer.dtdNotation(st,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.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},Ue.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ue.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ue.prototype.openNode=function(Ke){var ot,st,dt,Ct;if(!Ke.isOpen){if(!this.root&&this.currentLevel===0&&Ke.type===fe.Element&&(this.root=Ke),st="",Ke.type===fe.Element){this.writerOptions.state=me.OpenTag,st=this.writer.indent(Ke,this.writerOptions,this.currentLevel)+"<"+Ke.name,Ct=Ke.attribs;for(dt in Ct)Ye.call(Ct,dt)&&(ot=Ct[dt],st+=this.writer.attribute(ot,this.writerOptions,this.currentLevel));st+=(Ke.children?">":"/>")+this.writer.endline(Ke,this.writerOptions,this.currentLevel),this.writerOptions.state=me.InsideTag}else this.writerOptions.state=me.OpenTag,st=this.writer.indent(Ke,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ke.rootNodeName,Ke.pubID&&Ke.sysID?st+=' PUBLIC "'+Ke.pubID+'" "'+Ke.sysID+'"':Ke.sysID&&(st+=' SYSTEM "'+Ke.sysID+'"'),Ke.children?(st+=" [",this.writerOptions.state=me.InsideTag):(this.writerOptions.state=me.CloseTag,st+=">"),st+=this.writer.endline(Ke,this.writerOptions,this.currentLevel);return this.onData(st,this.currentLevel),Ke.isOpen=!0}},Ue.prototype.closeNode=function(Ke){var ot;if(!Ke.isClosed)return ot="",this.writerOptions.state=me.CloseTag,Ke.type===fe.Element?ot=this.writer.indent(Ke,this.writerOptions,this.currentLevel)+"</"+Ke.name+">"+this.writer.endline(Ke,this.writerOptions,this.currentLevel):ot=this.writer.indent(Ke,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ke,this.writerOptions,this.currentLevel),this.writerOptions.state=me.None,this.onData(ot,this.currentLevel),Ke.isClosed=!0},Ue.prototype.onData=function(Ke,ot){return this.documentStarted=!0,this.onDataCallback(Ke,ot+1)},Ue.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ue.prototype.debugInfo=function(Ke){return Ke==null?"":"node: <"+Ke+">"},Ue.prototype.ele=function(){return this.element.apply(this,arguments)},Ue.prototype.nod=function(Ke,ot,st){return this.node(Ke,ot,st)},Ue.prototype.txt=function(Ke){return this.text(Ke)},Ue.prototype.dat=function(Ke){return this.cdata(Ke)},Ue.prototype.com=function(Ke){return this.comment(Ke)},Ue.prototype.ins=function(Ke,ot){return this.instruction(Ke,ot)},Ue.prototype.dec=function(Ke,ot,st){return this.declaration(Ke,ot,st)},Ue.prototype.dtd=function(Ke,ot,st){return this.doctype(Ke,ot,st)},Ue.prototype.e=function(Ke,ot,st){return this.element(Ke,ot,st)},Ue.prototype.n=function(Ke,ot,st){return this.node(Ke,ot,st)},Ue.prototype.t=function(Ke){return this.text(Ke)},Ue.prototype.d=function(Ke){return this.cdata(Ke)},Ue.prototype.c=function(Ke){return this.comment(Ke)},Ue.prototype.r=function(Ke){return this.raw(Ke)},Ue.prototype.i=function(Ke,ot){return this.instruction(Ke,ot)},Ue.prototype.att=function(){return this.currentNode&&this.currentNode.type===fe.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ue.prototype.a=function(){return this.currentNode&&this.currentNode.type===fe.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ue.prototype.ent=function(Ke,ot){return this.entity(Ke,ot)},Ue.prototype.pent=function(Ke,ot){return this.pEntity(Ke,ot)},Ue.prototype.not=function(Ke,ot){return this.notation(Ke,ot)},Ue}()}).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(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(Me){Ce(ve,Me);function ve(we){ve.__super__.constructor.call(this,we),this.type=fe.Dummy}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return""},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z=function(ae,ie){for(var le in ie)ee.call(ie,le)&&(ae[le]=ie[le]);function ue(){this.constructor=ae}return ue.prototype=ie.prototype,ae.prototype=new ue,ae.__super__=ie.prototype,ae},ee={}.hasOwnProperty;de=oe("./Utility"),we=de.isObject,ve=de.isFunction,Me=de.getValue,Se=oe("./XMLNode"),fe=oe("./NodeType"),me=oe("./XMLAttribute"),Ce=oe("./XMLNamedNodeMap"),ze.exports=ke=function(ae){z(ie,ae);function ie(le,ue,ge){var Pe,je,Be,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=fe.Element,this.attribs={},this.schemaTypeInfo=null,ge!=null&&this.attribute(ge),le.type===fe.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(Fe=le.children,je=0,Be=Fe.length;je<Be;je++)if(Pe=Fe[je],Pe.type===fe.DocType){Pe.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 Ce(this.attribs)),this.attributeMap}}),ie.prototype.clone=function(){var le,ue,ge,Pe;ge=Object.create(this),ge.isRoot&&(ge.documentObject=null),ge.attribs={},Pe=this.attribs;for(ue in Pe)ee.call(Pe,ue)&&(le=Pe[ue],ge.attribs[ue]=le.clone());return ge.children=[],this.children.forEach(function(je){var Be;return Be=je.clone(),Be.parent=ge,ge.children.push(Be)}),ge},ie.prototype.attribute=function(le,ue){var ge,Pe;if(le!=null&&(le=Me(le)),we(le))for(ge in le)ee.call(le,ge)&&(Pe=le[ge],this.attribute(ge,Pe));else ve(ue)&&(ue=ue.apply()),this.options.keepNullAttributes&&ue==null?this.attribs[le]=new me(this,le,""):ue!=null&&(this.attribs[le]=new me(this,le,ue));return this},ie.prototype.removeAttribute=function(le){var ue,ge,Pe;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=Me(le),Array.isArray(le))for(ge=0,Pe=le.length;ge<Pe;ge++)ue=le[ge],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,ge){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,ge){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,ge,Pe;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=ge=0,Pe=this.attribs.length-1;0<=Pe?ge<=Pe:ge>=Pe;ue=0<=Pe?++ge:--ge)if(!this.attribs[ue].isEqualNode(le.attribs[ue]))return!1;return!0},ie}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(ke){this.nodes=ke}return Object.defineProperty(me.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),me.prototype.clone=function(){return this.nodes=null},me.prototype.getNamedItem=function(ke){return this.nodes[ke]},me.prototype.setNamedItem=function(ke){var Ce;return Ce=this.nodes[ke.nodeName],this.nodes[ke.nodeName]=ke,Ce||null},me.prototype.removeNamedItem=function(ke){var Ce;return Ce=this.nodes[ke],delete this.nodes[ke],Ce||null},me.prototype.item=function(ke){return this.nodes[Object.keys(this.nodes)[ke]]||null},me.prototype.getNamedItemNS=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me.prototype.setNamedItemNS=function(ke){throw new Error("This DOM method is not implemented.")},me.prototype.removeNamedItemNS=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me}()}).call(this)},{}],450:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe={}.hasOwnProperty;Be=oe("./Utility"),je=Be.isObject,Pe=Be.isFunction,ge=Be.isEmpty,ue=Be.getValue,we=null,ke=null,Ce=null,Se=null,Me=null,ie=null,le=null,ae=null,ve=null,me=null,ee=null,de=null,fe=null,ze.exports=z=function(){function Ne(Ae){this.parent=Ae,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,we||(we=oe("./XMLElement"),ke=oe("./XMLCData"),Ce=oe("./XMLComment"),Se=oe("./XMLDeclaration"),Me=oe("./XMLDocType"),ie=oe("./XMLRaw"),le=oe("./XMLText"),ae=oe("./XMLProcessingInstruction"),ve=oe("./XMLDummy"),me=oe("./NodeType"),ee=oe("./XMLNodeList"),de=oe("./XMLNamedNodeMap"),fe=oe("./DocumentPosition"))}return Object.defineProperty(Ne.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Ne.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ne.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Ne.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Ne.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new ee(this.children)),this.childNodeList}}),Object.defineProperty(Ne.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Ne.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Ne.prototype,"previousSibling",{get:function(){var Ae;return Ae=this.parent.children.indexOf(this),this.parent.children[Ae-1]||null}}),Object.defineProperty(Ne.prototype,"nextSibling",{get:function(){var Ae;return Ae=this.parent.children.indexOf(this),this.parent.children[Ae+1]||null}}),Object.defineProperty(Ne.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Ne.prototype,"textContent",{get:function(){var Ae,Ie,We,Ye,Ue;if(this.nodeType===me.Element||this.nodeType===me.DocumentFragment){for(Ue="",Ye=this.children,Ie=0,We=Ye.length;Ie<We;Ie++)Ae=Ye[Ie],Ae.textContent&&(Ue+=Ae.textContent);return Ue}else return null},set:function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Ne.prototype.setParent=function(Ae){var Ie,We,Ye,Ue,Ke;for(this.parent=Ae,Ae&&(this.options=Ae.options,this.stringify=Ae.stringify),Ue=this.children,Ke=[],We=0,Ye=Ue.length;We<Ye;We++)Ie=Ue[We],Ke.push(Ie.setParent(this));return Ke},Ne.prototype.element=function(Ae,Ie,We){var Ye,Ue,Ke,ot,st,dt,Ct,$e,rt,St,Pt;if(dt=null,Ie===null&&We==null&&(rt=[{},null],Ie=rt[0],We=rt[1]),Ie==null&&(Ie={}),Ie=ue(Ie),je(Ie)||(St=[Ie,We],We=St[0],Ie=St[1]),Ae!=null&&(Ae=ue(Ae)),Array.isArray(Ae))for(Ke=0,Ct=Ae.length;Ke<Ct;Ke++)Ue=Ae[Ke],dt=this.element(Ue);else if(Pe(Ae))dt=this.element(Ae.apply());else if(je(Ae)){for(st in Ae)if(Fe.call(Ae,st))if(Pt=Ae[st],Pe(Pt)&&(Pt=Pt.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&st.indexOf(this.stringify.convertAttKey)===0)dt=this.attribute(st.substr(this.stringify.convertAttKey.length),Pt);else if(!this.options.separateArrayItems&&Array.isArray(Pt)&&ge(Pt))dt=this.dummy();else if(je(Pt)&&ge(Pt))dt=this.element(st);else if(!this.options.keepNullNodes&&Pt==null)dt=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Pt))for(ot=0,$e=Pt.length;ot<$e;ot++)Ue=Pt[ot],Ye={},Ye[st]=Ue,dt=this.element(Ye);else je(Pt)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&st.indexOf(this.stringify.convertTextKey)===0?dt=this.element(Pt):(dt=this.element(st),dt.element(Pt)):dt=this.element(st,Pt)}else!this.options.keepNullNodes&&We===null?dt=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Ae.indexOf(this.stringify.convertTextKey)===0?dt=this.text(We):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Ae.indexOf(this.stringify.convertCDataKey)===0?dt=this.cdata(We):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Ae.indexOf(this.stringify.convertCommentKey)===0?dt=this.comment(We):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Ae.indexOf(this.stringify.convertRawKey)===0?dt=this.raw(We):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Ae.indexOf(this.stringify.convertPIKey)===0?dt=this.instruction(Ae.substr(this.stringify.convertPIKey.length),We):dt=this.node(Ae,Ie,We);if(dt==null)throw new Error("Could not create any elements with: "+Ae+". "+this.debugInfo());return dt},Ne.prototype.insertBefore=function(Ae,Ie,We){var Ye,Ue,Ke,ot,st;if(Ae!=null&&Ae.type)return Ke=Ae,ot=Ie,Ke.setParent(this),ot?(Ue=children.indexOf(ot),st=children.splice(Ue),children.push(Ke),Array.prototype.push.apply(children,st)):children.push(Ke),Ke;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Ae));return Ue=this.parent.children.indexOf(this),st=this.parent.children.splice(Ue),Ye=this.parent.element(Ae,Ie,We),Array.prototype.push.apply(this.parent.children,st),Ye},Ne.prototype.insertAfter=function(Ae,Ie,We){var Ye,Ue,Ke;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Ae));return Ue=this.parent.children.indexOf(this),Ke=this.parent.children.splice(Ue+1),Ye=this.parent.element(Ae,Ie,We),Array.prototype.push.apply(this.parent.children,Ke),Ye},Ne.prototype.remove=function(){var Ae,Ie;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Ae=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Ae,Ae-Ae+1].concat(Ie=[])),this.parent},Ne.prototype.node=function(Ae,Ie,We){var Ye,Ue;return Ae!=null&&(Ae=ue(Ae)),Ie||(Ie={}),Ie=ue(Ie),je(Ie)||(Ue=[Ie,We],We=Ue[0],Ie=Ue[1]),Ye=new we(this,Ae,Ie),We!=null&&Ye.text(We),this.children.push(Ye),Ye},Ne.prototype.text=function(Ae){var Ie;return je(Ae)&&this.element(Ae),Ie=new le(this,Ae),this.children.push(Ie),this},Ne.prototype.cdata=function(Ae){var Ie;return Ie=new ke(this,Ae),this.children.push(Ie),this},Ne.prototype.comment=function(Ae){var Ie;return Ie=new Ce(this,Ae),this.children.push(Ie),this},Ne.prototype.commentBefore=function(Ae){var Ie,We,Ye;return We=this.parent.children.indexOf(this),Ye=this.parent.children.splice(We),Ie=this.parent.comment(Ae),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.commentAfter=function(Ae){var Ie,We,Ye;return We=this.parent.children.indexOf(this),Ye=this.parent.children.splice(We+1),Ie=this.parent.comment(Ae),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.raw=function(Ae){var Ie;return Ie=new ie(this,Ae),this.children.push(Ie),this},Ne.prototype.dummy=function(){var Ae;return Ae=new ve(this),Ae},Ne.prototype.instruction=function(Ae,Ie){var We,Ye,Ue,Ke,ot;if(Ae!=null&&(Ae=ue(Ae)),Ie!=null&&(Ie=ue(Ie)),Array.isArray(Ae))for(Ke=0,ot=Ae.length;Ke<ot;Ke++)We=Ae[Ke],this.instruction(We);else if(je(Ae))for(We in Ae)Fe.call(Ae,We)&&(Ye=Ae[We],this.instruction(We,Ye));else Pe(Ie)&&(Ie=Ie.apply()),Ue=new ae(this,Ae,Ie),this.children.push(Ue);return this},Ne.prototype.instructionBefore=function(Ae,Ie){var We,Ye,Ue;return Ye=this.parent.children.indexOf(this),Ue=this.parent.children.splice(Ye),We=this.parent.instruction(Ae,Ie),Array.prototype.push.apply(this.parent.children,Ue),this},Ne.prototype.instructionAfter=function(Ae,Ie){var We,Ye,Ue;return Ye=this.parent.children.indexOf(this),Ue=this.parent.children.splice(Ye+1),We=this.parent.instruction(Ae,Ie),Array.prototype.push.apply(this.parent.children,Ue),this},Ne.prototype.declaration=function(Ae,Ie,We){var Ye,Ue;return Ye=this.document(),Ue=new Se(Ye,Ae,Ie,We),Ye.children.length===0?Ye.children.unshift(Ue):Ye.children[0].type===me.Declaration?Ye.children[0]=Ue:Ye.children.unshift(Ue),Ye.root()||Ye},Ne.prototype.dtd=function(Ae,Ie){var We,Ye,Ue,Ke,ot,st,dt,Ct,$e,rt;for(Ye=this.document(),Ue=new Me(Ye,Ae,Ie),$e=Ye.children,Ke=ot=0,dt=$e.length;ot<dt;Ke=++ot)if(We=$e[Ke],We.type===me.DocType)return Ye.children[Ke]=Ue,Ue;for(rt=Ye.children,Ke=st=0,Ct=rt.length;st<Ct;Ke=++st)if(We=rt[Ke],We.isRoot)return Ye.children.splice(Ke,0,Ue),Ue;return Ye.children.push(Ue),Ue},Ne.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},Ne.prototype.root=function(){var Ae;for(Ae=this;Ae;){if(Ae.type===me.Document)return Ae.rootObject;if(Ae.isRoot)return Ae;Ae=Ae.parent}},Ne.prototype.document=function(){var Ae;for(Ae=this;Ae;){if(Ae.type===me.Document)return Ae;Ae=Ae.parent}},Ne.prototype.end=function(Ae){return this.document().end(Ae)},Ne.prototype.prev=function(){var Ae;if(Ae=this.parent.children.indexOf(this),Ae<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Ae-1]},Ne.prototype.next=function(){var Ae;if(Ae=this.parent.children.indexOf(this),Ae===-1||Ae===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Ae+1]},Ne.prototype.importDocument=function(Ae){var Ie;return Ie=Ae.root().clone(),Ie.parent=this,Ie.isRoot=!1,this.children.push(Ie),this},Ne.prototype.debugInfo=function(Ae){var Ie,We;return Ae=Ae||this.name,Ae==null&&!((Ie=this.parent)!=null&&Ie.name)?"":Ae==null?"parent: <"+this.parent.name+">":(We=this.parent)!=null&&We.name?"node: <"+Ae+">, parent: <"+this.parent.name+">":"node: <"+Ae+">"},Ne.prototype.ele=function(Ae,Ie,We){return this.element(Ae,Ie,We)},Ne.prototype.nod=function(Ae,Ie,We){return this.node(Ae,Ie,We)},Ne.prototype.txt=function(Ae){return this.text(Ae)},Ne.prototype.dat=function(Ae){return this.cdata(Ae)},Ne.prototype.com=function(Ae){return this.comment(Ae)},Ne.prototype.ins=function(Ae,Ie){return this.instruction(Ae,Ie)},Ne.prototype.doc=function(){return this.document()},Ne.prototype.dec=function(Ae,Ie,We){return this.declaration(Ae,Ie,We)},Ne.prototype.e=function(Ae,Ie,We){return this.element(Ae,Ie,We)},Ne.prototype.n=function(Ae,Ie,We){return this.node(Ae,Ie,We)},Ne.prototype.t=function(Ae){return this.text(Ae)},Ne.prototype.d=function(Ae){return this.cdata(Ae)},Ne.prototype.c=function(Ae){return this.comment(Ae)},Ne.prototype.r=function(Ae){return this.raw(Ae)},Ne.prototype.i=function(Ae,Ie){return this.instruction(Ae,Ie)},Ne.prototype.u=function(){return this.up()},Ne.prototype.importXMLBuilder=function(Ae){return this.importDocument(Ae)},Ne.prototype.replaceChild=function(Ae,Ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.removeChild=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.appendChild=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.hasChildNodes=function(){return this.children.length!==0},Ne.prototype.cloneNode=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isSupported=function(Ae,Ie){return!0},Ne.prototype.hasAttributes=function(){return this.attribs.length!==0},Ne.prototype.compareDocumentPosition=function(Ae){var Ie,We;return Ie=this,Ie===Ae?0:this.document()!==Ae.document()?(We=fe.Disconnected|fe.ImplementationSpecific,Math.random()<.5?We|=fe.Preceding:We|=fe.Following,We):Ie.isAncestor(Ae)?fe.Contains|fe.Preceding:Ie.isDescendant(Ae)?fe.Contains|fe.Following:Ie.isPreceding(Ae)?fe.Preceding:fe.Following},Ne.prototype.isSameNode=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.lookupPrefix=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isDefaultNamespace=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.lookupNamespaceURI=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isEqualNode=function(Ae){var Ie,We,Ye;if(Ae.nodeType!==this.nodeType||Ae.children.length!==this.children.length)return!1;for(Ie=We=0,Ye=this.children.length-1;0<=Ye?We<=Ye:We>=Ye;Ie=0<=Ye?++We:--We)if(!this.children[Ie].isEqualNode(Ae.children[Ie]))return!1;return!0},Ne.prototype.getFeature=function(Ae,Ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.setUserData=function(Ae,Ie,We){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.getUserData=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.contains=function(Ae){return Ae?Ae===this||this.isDescendant(Ae):!1},Ne.prototype.isDescendant=function(Ae){var Ie,We,Ye,Ue,Ke;for(Ke=this.children,Ye=0,Ue=Ke.length;Ye<Ue;Ye++)if(Ie=Ke[Ye],Ae===Ie||(We=Ie.isDescendant(Ae),We))return!0;return!1},Ne.prototype.isAncestor=function(Ae){return Ae.isDescendant(this)},Ne.prototype.isPreceding=function(Ae){var Ie,We;return Ie=this.treePosition(Ae),We=this.treePosition(this),Ie===-1||We===-1?!1:Ie<We},Ne.prototype.isFollowing=function(Ae){var Ie,We;return Ie=this.treePosition(Ae),We=this.treePosition(this),Ie===-1||We===-1?!1:Ie>We},Ne.prototype.treePosition=function(Ae){var Ie,We;return We=0,Ie=!1,this.foreachTreeNode(this.document(),function(Ye){if(We++,!Ie&&Ye===Ae)return Ie=!0}),Ie?We:-1},Ne.prototype.foreachTreeNode=function(Ae,Ie){var We,Ye,Ue,Ke,ot;for(Ae||(Ae=this.document()),Ke=Ae.children,Ye=0,Ue=Ke.length;Ye<Ue;Ye++){if(We=Ke[Ye],ot=Ie(We))return ot;if(ot=this.foreachTreeNode(We,Ie),ot)return ot}},Ne}()}).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(oe,ze,De){(function(){var fe;ze.exports=fe=function(){function me(ke){this.nodes=ke}return Object.defineProperty(me.prototype,"length",{get:function(){return this.nodes.length||0}}),me.prototype.clone=function(){return this.nodes=null},me.prototype.item=function(ke){return this.nodes[ke]||null},me}()}).call(this)},{}],452:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),ze.exports=ke=function(Me){Ce(ve,Me);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=fe.ProcessingInstruction,this.target=this.stringify.insTarget(de),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(we))},ve.prototype.isEqualNode=function(we){return!(!ve.__super__.isEqualNode.apply(this,arguments).isEqualNode(we)||we.target!==this.target)},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLNode"),ze.exports=ke=function(Me){Ce(ve,Me);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=fe.Raw,this.value=this.stringify.raw(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.raw(this,this.options.writer.filterOptions(we))},ve}(me)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Me.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Me={}.hasOwnProperty;fe=oe("./NodeType"),Ce=oe("./XMLWriterBase"),me=oe("./WriterState"),ze.exports=ke=function(ve){Se(we,ve);function we(de,z){this.stream=de,we.__super__.constructor.call(this,z)}return we.prototype.endline=function(de,z,ee){return de.isLastRootNode&&z.state===me.CloseTag?"":we.__super__.endline.call(this,de,z,ee)},we.prototype.document=function(de,z){var ee,ae,ie,le,ue,ge,Pe,je,Be;for(Pe=de.children,ae=ie=0,ue=Pe.length;ie<ue;ae=++ie)ee=Pe[ae],ee.isLastRootNode=ae===de.children.length-1;for(z=this.filterOptions(z),je=de.children,Be=[],le=0,ge=je.length;le<ge;le++)ee=je[le],Be.push(this.writeChildNode(ee,z,0));return Be},we.prototype.attribute=function(de,z,ee){return this.stream.write(we.__super__.attribute.call(this,de,z,ee))},we.prototype.cdata=function(de,z,ee){return this.stream.write(we.__super__.cdata.call(this,de,z,ee))},we.prototype.comment=function(de,z,ee){return this.stream.write(we.__super__.comment.call(this,de,z,ee))},we.prototype.declaration=function(de,z,ee){return this.stream.write(we.__super__.declaration.call(this,de,z,ee))},we.prototype.docType=function(de,z,ee){var ae,ie,le,ue;if(ee||(ee=0),this.openNode(de,z,ee),z.state=me.OpenTag,this.stream.write(this.indent(de,z,ee)),this.stream.write("<!DOCTYPE "+de.root().name),de.pubID&&de.sysID?this.stream.write(' PUBLIC "'+de.pubID+'" "'+de.sysID+'"'):de.sysID&&this.stream.write(' SYSTEM "'+de.sysID+'"'),de.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(de,z,ee)),z.state=me.InsideTag,ue=de.children,ie=0,le=ue.length;ie<le;ie++)ae=ue[ie],this.writeChildNode(ae,z,ee+1);z.state=me.CloseTag,this.stream.write("]")}return z.state=me.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(de,z,ee)),z.state=me.None,this.closeNode(de,z,ee)},we.prototype.element=function(de,z,ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne;ee||(ee=0),this.openNode(de,z,ee),z.state=me.OpenTag,this.stream.write(this.indent(de,z,ee)+"<"+de.name),Fe=de.attribs;for(je in Fe)Me.call(Fe,je)&&(ae=Fe[je],this.attribute(ae,z,ee));if(le=de.children.length,ue=le===0?null:de.children[0],le===0||de.children.every(function(Ae){return(Ae.type===fe.Text||Ae.type===fe.Raw)&&Ae.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=me.CloseTag,this.stream.write("</"+de.name+">")):(z.state=me.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&le===1&&(ue.type===fe.Text||ue.type===fe.Raw)&&ue.value!=null)this.stream.write(">"),z.state=me.InsideTag,z.suppressPrettyCount++,Be=!0,this.writeChildNode(ue,z,ee+1),z.suppressPrettyCount--,Be=!1,z.state=me.CloseTag,this.stream.write("</"+de.name+">");else{for(this.stream.write(">"+this.endline(de,z,ee)),z.state=me.InsideTag,Ne=de.children,ge=0,Pe=Ne.length;ge<Pe;ge++)ie=Ne[ge],this.writeChildNode(ie,z,ee+1);z.state=me.CloseTag,this.stream.write(this.indent(de,z,ee)+"</"+de.name+">")}return this.stream.write(this.endline(de,z,ee)),z.state=me.None,this.closeNode(de,z,ee)},we.prototype.processingInstruction=function(de,z,ee){return this.stream.write(we.__super__.processingInstruction.call(this,de,z,ee))},we.prototype.raw=function(de,z,ee){return this.stream.write(we.__super__.raw.call(this,de,z,ee))},we.prototype.text=function(de,z,ee){return this.stream.write(we.__super__.text.call(this,de,z,ee))},we.prototype.dtdAttList=function(de,z,ee){return this.stream.write(we.__super__.dtdAttList.call(this,de,z,ee))},we.prototype.dtdElement=function(de,z,ee){return this.stream.write(we.__super__.dtdElement.call(this,de,z,ee))},we.prototype.dtdEntity=function(de,z,ee){return this.stream.write(we.__super__.dtdEntity.call(this,de,z,ee))},we.prototype.dtdNotation=function(de,z,ee){return this.stream.write(we.__super__.dtdNotation.call(this,de,z,ee))},we}(Ce)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(oe,ze,De){(function(){var fe,me,ke=function(Se,Me){for(var ve in Me)Ce.call(Me,ve)&&(Se[ve]=Me[ve]);function we(){this.constructor=Se}return we.prototype=Me.prototype,Se.prototype=new we,Se.__super__=Me.prototype,Se},Ce={}.hasOwnProperty;me=oe("./XMLWriterBase"),ze.exports=fe=function(Se){ke(Me,Se);function Me(ve){Me.__super__.constructor.call(this,ve)}return Me.prototype.document=function(ve,we){var de,z,ee,ae,ie;for(we=this.filterOptions(we),ae="",ie=ve.children,z=0,ee=ie.length;z<ee;z++)de=ie[z],ae+=this.writeChildNode(de,we,0);return we.pretty&&ae.slice(-we.newline.length)===we.newline&&(ae=ae.slice(0,-we.newline.length)),ae},Me}(me)}).call(this)},{"./XMLWriterBase":458}],456:[function(oe,ze,De){(function(){var fe,me=function(Ce,Se){return function(){return Ce.apply(Se,arguments)}},ke={}.hasOwnProperty;ze.exports=fe=function(){function Ce(Se){this.assertLegalName=me(this.assertLegalName,this),this.assertLegalChar=me(this.assertLegalChar,this);var Me,ve,we;Se||(Se={}),this.options=Se,this.options.version||(this.options.version="1.0"),ve=Se.stringify||{};for(Me in ve)ke.call(ve,Me)&&(we=ve[Me],this[Me]=we)}return Ce.prototype.name=function(Se){return this.options.noValidation?Se:this.assertLegalName(""+Se||"")},Ce.prototype.text=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.textEscape(""+Se||""))},Ce.prototype.cdata=function(Se){return this.options.noValidation?Se:(Se=""+Se||"",Se=Se.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(Se))},Ce.prototype.comment=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+Se);return this.assertLegalChar(Se)},Ce.prototype.raw=function(Se){return this.options.noValidation?Se:""+Se||""},Ce.prototype.attValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.attEscape(Se=""+Se||""))},Ce.prototype.insTarget=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.insValue=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/\?>/))throw new Error("Invalid processing instruction value: "+Se);return this.assertLegalChar(Se)},Ce.prototype.xmlVersion=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+Se);return Se},Ce.prototype.xmlEncoding=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+Se);return this.assertLegalChar(Se)},Ce.prototype.xmlStandalone=function(Se){return this.options.noValidation?Se:Se?"yes":"no"},Ce.prototype.dtdPubID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdSysID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdElementValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdAttType=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdAttDefault=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdEntityValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdNData=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.convertAttKey="@",Ce.prototype.convertPIKey="?",Ce.prototype.convertTextKey="#text",Ce.prototype.convertCDataKey="#cdata",Ce.prototype.convertCommentKey="#comment",Ce.prototype.convertRawKey="#raw",Ce.prototype.assertLegalChar=function(Se){var Me,ve;if(this.options.noValidation)return Se;if(Me="",this.options.version==="1.0"){if(Me=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=Se.match(Me))throw new Error("Invalid character in string: "+Se+" at index "+ve.index)}else if(this.options.version==="1.1"&&(Me=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=Se.match(Me)))throw new Error("Invalid character in string: "+Se+" at index "+ve.index);return Se},Ce.prototype.assertLegalName=function(Se){var Me;if(this.options.noValidation)return Se;if(this.assertLegalChar(Se),Me=/^([: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])*$/,!Se.match(Me))throw new Error("Invalid character in name");return Se},Ce.prototype.textEscape=function(Se){var Me;return this.options.noValidation?Se:(Me=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Me,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},Ce.prototype.attEscape=function(Se){var Me;return this.options.noValidation?Se:(Me=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Me,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},Ce}()}).call(this)},{}],457:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),ze.exports=ke=function(Me){Ce(ve,Me);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=fe.Text,this.value=this.stringify.text(de)}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 we,de,z;for(z="",de=this.previousSibling;de;)z=de.data+z,de=de.previousSibling;for(z+=this.data,we=this.nextSibling;we;)z=z+we.data,we=we.nextSibling;return z}}),ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.text(this,this.options.writer.filterOptions(we))},ve.prototype.splitText=function(we){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve.prototype.replaceWholeText=function(we){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je={}.hasOwnProperty;Pe=oe("./Utility").assign,fe=oe("./NodeType"),de=oe("./XMLDeclaration"),z=oe("./XMLDocType"),ke=oe("./XMLCData"),Ce=oe("./XMLComment"),ae=oe("./XMLElement"),le=oe("./XMLRaw"),ue=oe("./XMLText"),ie=oe("./XMLProcessingInstruction"),ee=oe("./XMLDummy"),Se=oe("./XMLDTDAttList"),Me=oe("./XMLDTDElement"),ve=oe("./XMLDTDEntity"),we=oe("./XMLDTDNotation"),me=oe("./WriterState"),ze.exports=ge=function(){function Be(Fe){var Ne,Ae,Ie;Fe||(Fe={}),this.options=Fe,Ae=Fe.writer||{};for(Ne in Ae)je.call(Ae,Ne)&&(Ie=Ae[Ne],this["_"+Ne]=this[Ne],this[Ne]=Ie)}return Be.prototype.filterOptions=function(Fe){var Ne,Ae,Ie,We,Ye,Ue,Ke,ot;return Fe||(Fe={}),Fe=Pe({},this.options,Fe),Ne={writer:this},Ne.pretty=Fe.pretty||!1,Ne.allowEmpty=Fe.allowEmpty||!1,Ne.indent=(Ae=Fe.indent)!=null?Ae:" ",Ne.newline=(Ie=Fe.newline)!=null?Ie:`
`,Ne.offset=(We=Fe.offset)!=null?We:0,Ne.dontPrettyTextNodes=(Ye=(Ue=Fe.dontPrettyTextNodes)!=null?Ue:Fe.dontprettytextnodes)!=null?Ye:0,Ne.spaceBeforeSlash=(Ke=(ot=Fe.spaceBeforeSlash)!=null?ot:Fe.spacebeforeslash)!=null?Ke:"",Ne.spaceBeforeSlash===!0&&(Ne.spaceBeforeSlash=" "),Ne.suppressPrettyCount=0,Ne.user={},Ne.state=me.None,Ne},Be.prototype.indent=function(Fe,Ne,Ae){var Ie;return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.pretty&&(Ie=(Ae||0)+Ne.offset+1,Ie>0)?new Array(Ie).join(Ne.indent):""},Be.prototype.endline=function(Fe,Ne,Ae){return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.newline},Be.prototype.attribute=function(Fe,Ne,Ae){var Ie;return this.openAttribute(Fe,Ne,Ae),Ie=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Ne,Ae),Ie},Be.prototype.cdata=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae)+"<![CDATA[",Ne.state=me.InsideTag,Ie+=Fe.value,Ne.state=me.CloseTag,Ie+="]]>"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.comment=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae)+"<!-- ",Ne.state=me.InsideTag,Ie+=Fe.value,Ne.state=me.CloseTag,Ie+=" -->"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.declaration=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae)+"<?xml",Ne.state=me.InsideTag,Ie+=' version="'+Fe.version+'"',Fe.encoding!=null&&(Ie+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(Ie+=' standalone="'+Fe.standalone+'"'),Ne.state=me.CloseTag,Ie+=Ne.spaceBeforeSlash+"?>",Ie+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.docType=function(Fe,Ne,Ae){var Ie,We,Ye,Ue,Ke;if(Ae||(Ae=0),this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ue=this.indent(Fe,Ne,Ae),Ue+="<!DOCTYPE "+Fe.root().name,Fe.pubID&&Fe.sysID?Ue+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Ue+=' SYSTEM "'+Fe.sysID+'"'),Fe.children.length>0){for(Ue+=" [",Ue+=this.endline(Fe,Ne,Ae),Ne.state=me.InsideTag,Ke=Fe.children,We=0,Ye=Ke.length;We<Ye;We++)Ie=Ke[We],Ue+=this.writeChildNode(Ie,Ne,Ae+1);Ne.state=me.CloseTag,Ue+="]"}return Ne.state=me.CloseTag,Ue+=Ne.spaceBeforeSlash+">",Ue+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ue},Be.prototype.element=function(Fe,Ne,Ae){var Ie,We,Ye,Ue,Ke,ot,st,dt,Ct,$e,rt,St,Pt,wt;Ae||(Ae=0),$e=!1,rt="",this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,rt+=this.indent(Fe,Ne,Ae)+"<"+Fe.name,St=Fe.attribs;for(Ct in St)je.call(St,Ct)&&(Ie=St[Ct],rt+=this.attribute(Ie,Ne,Ae));if(Ye=Fe.children.length,Ue=Ye===0?null:Fe.children[0],Ye===0||Fe.children.every(function(pt){return(pt.type===fe.Text||pt.type===fe.Raw)&&pt.value===""}))Ne.allowEmpty?(rt+=">",Ne.state=me.CloseTag,rt+="</"+Fe.name+">"+this.endline(Fe,Ne,Ae)):(Ne.state=me.CloseTag,rt+=Ne.spaceBeforeSlash+"/>"+this.endline(Fe,Ne,Ae));else if(Ne.pretty&&Ye===1&&(Ue.type===fe.Text||Ue.type===fe.Raw)&&Ue.value!=null)rt+=">",Ne.state=me.InsideTag,Ne.suppressPrettyCount++,$e=!0,rt+=this.writeChildNode(Ue,Ne,Ae+1),Ne.suppressPrettyCount--,$e=!1,Ne.state=me.CloseTag,rt+="</"+Fe.name+">"+this.endline(Fe,Ne,Ae);else{if(Ne.dontPrettyTextNodes){for(Pt=Fe.children,Ke=0,st=Pt.length;Ke<st;Ke++)if(We=Pt[Ke],(We.type===fe.Text||We.type===fe.Raw)&&We.value!=null){Ne.suppressPrettyCount++,$e=!0;break}}for(rt+=">"+this.endline(Fe,Ne,Ae),Ne.state=me.InsideTag,wt=Fe.children,ot=0,dt=wt.length;ot<dt;ot++)We=wt[ot],rt+=this.writeChildNode(We,Ne,Ae+1);Ne.state=me.CloseTag,rt+=this.indent(Fe,Ne,Ae)+"</"+Fe.name+">",$e&&Ne.suppressPrettyCount--,rt+=this.endline(Fe,Ne,Ae),Ne.state=me.None}return this.closeNode(Fe,Ne,Ae),rt},Be.prototype.writeChildNode=function(Fe,Ne,Ae){switch(Fe.type){case fe.CData:return this.cdata(Fe,Ne,Ae);case fe.Comment:return this.comment(Fe,Ne,Ae);case fe.Element:return this.element(Fe,Ne,Ae);case fe.Raw:return this.raw(Fe,Ne,Ae);case fe.Text:return this.text(Fe,Ne,Ae);case fe.ProcessingInstruction:return this.processingInstruction(Fe,Ne,Ae);case fe.Dummy:return"";case fe.Declaration:return this.declaration(Fe,Ne,Ae);case fe.DocType:return this.docType(Fe,Ne,Ae);case fe.AttributeDeclaration:return this.dtdAttList(Fe,Ne,Ae);case fe.ElementDeclaration:return this.dtdElement(Fe,Ne,Ae);case fe.EntityDeclaration:return this.dtdEntity(Fe,Ne,Ae);case fe.NotationDeclaration:return this.dtdNotation(Fe,Ne,Ae);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},Be.prototype.processingInstruction=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae)+"<?",Ne.state=me.InsideTag,Ie+=Fe.target,Fe.value&&(Ie+=" "+Fe.value),Ne.state=me.CloseTag,Ie+=Ne.spaceBeforeSlash+"?>",Ie+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.raw=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae),Ne.state=me.InsideTag,Ie+=Fe.value,Ne.state=me.CloseTag,Ie+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.text=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae),Ne.state=me.InsideTag,Ie+=Fe.value,Ne.state=me.CloseTag,Ie+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.dtdAttList=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae)+"<!ATTLIST",Ne.state=me.InsideTag,Ie+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(Ie+=" "+Fe.defaultValueType),Fe.defaultValue&&(Ie+=' "'+Fe.defaultValue+'"'),Ne.state=me.CloseTag,Ie+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.dtdElement=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae)+"<!ELEMENT",Ne.state=me.InsideTag,Ie+=" "+Fe.name+" "+Fe.value,Ne.state=me.CloseTag,Ie+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.dtdEntity=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae)+"<!ENTITY",Ne.state=me.InsideTag,Fe.pe&&(Ie+=" %"),Ie+=" "+Fe.name,Fe.value?Ie+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?Ie+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Ie+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(Ie+=" NDATA "+Fe.nData)),Ne.state=me.CloseTag,Ie+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.dtdNotation=function(Fe,Ne,Ae){var Ie;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ie=this.indent(Fe,Ne,Ae)+"<!NOTATION",Ne.state=me.InsideTag,Ie+=" "+Fe.name,Fe.pubID&&Fe.sysID?Ie+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?Ie+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(Ie+=' SYSTEM "'+Fe.sysID+'"'),Ne.state=me.CloseTag,Ie+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ie},Be.prototype.openNode=function(Fe,Ne,Ae){},Be.prototype.closeNode=function(Fe,Ne,Ae){},Be.prototype.openAttribute=function(Fe,Ne,Ae){},Be.prototype.closeAttribute=function(Fe,Ne,Ae){},Be}()}).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(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z;z=oe("./Utility"),we=z.assign,de=z.isFunction,ke=oe("./XMLDOMImplementation"),Ce=oe("./XMLDocument"),Se=oe("./XMLDocumentCB"),ve=oe("./XMLStringWriter"),Me=oe("./XMLStreamWriter"),fe=oe("./NodeType"),me=oe("./WriterState"),ze.exports.create=function(ee,ae,ie,le){var ue,ge;if(ee==null)throw new Error("Root element needs a name.");return le=we({},ae,ie,le),ue=new Ce(le),ge=ue.element(ee),le.headless||(ue.declaration(le),(le.pubID!=null||le.sysID!=null)&&ue.dtd(le)),ge},ze.exports.begin=function(ee,ae,ie){var le;return de(ee)&&(le=[ee,ae],ae=le[0],ie=le[1],ee={}),ae?new Se(ee,ae,ie):new Ce(ee)},ze.exports.stringWriter=function(ee){return new ve(ee)},ze.exports.streamWriter=function(ee,ae){return new Me(ee,ae)},ze.exports.implementation=new ke,ze.exports.nodeType=fe,ze.exports.writerState=me}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(oe,ze,De){ze.exports=me;var fe=Object.prototype.hasOwnProperty;function me(){for(var ke={},Ce=0;Ce<arguments.length;Ce++){var Se=arguments[Ce];for(var Me in Se)fe.call(Se,Me)&&(ke[Me]=Se[Me])}return ke}},{}],461:[function(oe,ze,De){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.slice.js");var fe=oe("buffer").Buffer,me=oe("./sha"),ke=oe("./md5"),Ce={sha1:me,md5:ke},Se=64,Me=fe.alloc(Se);Me.fill(0);function ve(z,ee,ae){fe.isBuffer(ee)||(ee=fe.from(ee)),fe.isBuffer(ae)||(ae=fe.from(ae)),ee.length>Se?ee=z(ee):ee.length<Se&&(ee=fe.concat([ee,Me],Se));for(var ie=fe.alloc(Se),le=fe.alloc(Se),ue=0;ue<Se;ue++)ie[ue]=ee[ue]^54,le[ue]=ee[ue]^92;var ge=z(fe.concat([ie,ae]));return z(fe.concat([le,ge]))}function we(z,ee){z=z||"sha1";var ae=Ce[z],ie=[],le=0;return ae||de("algorithm:",z,"is not yet supported"),{update:function(ge){return fe.isBuffer(ge)||(ge=fe.from(ge)),ie.push(ge),le+=ge.length,this},digest:function(ge){var Pe=fe.concat(ie),je=ee?ve(ae,ee,Pe):ae(Pe);return ie=null,ge?je.toString(ge):je}}}function de(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}De.createHash=function(z){return we(z)},De.createHmac=function(z,ee){return we(z,ee)},De.createCredentials=function(){de("sorry,createCredentials is not implemented yet")},De.createCipher=function(){de("sorry,createCipher is not implemented yet")},De.createCipheriv=function(){de("sorry,createCipheriv is not implemented yet")},De.createDecipher=function(){de("sorry,createDecipher is not implemented yet")},De.createDecipheriv=function(){de("sorry,createDecipheriv is not implemented yet")},De.createSign=function(){de("sorry,createSign is not implemented yet")},De.createVerify=function(){de("sorry,createVerify is not implemented yet")},De.createDiffieHellman=function(){de("sorry,createDiffieHellman is not implemented yet")},De.pbkdf2=function(){de("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(oe,ze,De){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js");var fe=oe("buffer").Buffer,me=4,ke=fe.alloc(me);ke.fill(0);var Ce=8;function Se(we,de){if(we.length%me!==0){var z=we.length+(me-we.length%me);we=fe.concat([we,ke],z)}for(var ee=[],ae=de?we.readInt32BE:we.readInt32LE,ie=0;ie<we.length;ie+=me)ee.push(ae.call(we,ie));return ee}function Me(we,de,z){for(var ee=fe.alloc(de),ae=z?ee.writeInt32BE:ee.writeInt32LE,ie=0;ie<we.length;ie++)ae.call(ee,we[ie],ie*4,!0);return ee}function ve(we,de,z,ee){fe.isBuffer(we)||(we=fe.from(we));var ae=de(Se(we,ee),we.length*Ce);return Me(ae,z,ee)}ze.exports={hash:ve}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(oe,ze,De){"use strict";var fe=oe("./helpers");function me(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function ke(ee,ae){ee[ae>>5]|=128<<ae%32,ee[(ae+64>>>9<<4)+14]=ae;for(var ie=1732584193,le=-271733879,ue=-1732584194,ge=271733878,Pe=0;Pe<ee.length;Pe+=16){var je=ie,Be=le,Fe=ue,Ne=ge;ie=Se(ie,le,ue,ge,ee[Pe+0],7,-680876936),ge=Se(ge,ie,le,ue,ee[Pe+1],12,-389564586),ue=Se(ue,ge,ie,le,ee[Pe+2],17,606105819),le=Se(le,ue,ge,ie,ee[Pe+3],22,-1044525330),ie=Se(ie,le,ue,ge,ee[Pe+4],7,-176418897),ge=Se(ge,ie,le,ue,ee[Pe+5],12,1200080426),ue=Se(ue,ge,ie,le,ee[Pe+6],17,-1473231341),le=Se(le,ue,ge,ie,ee[Pe+7],22,-45705983),ie=Se(ie,le,ue,ge,ee[Pe+8],7,1770035416),ge=Se(ge,ie,le,ue,ee[Pe+9],12,-1958414417),ue=Se(ue,ge,ie,le,ee[Pe+10],17,-42063),le=Se(le,ue,ge,ie,ee[Pe+11],22,-1990404162),ie=Se(ie,le,ue,ge,ee[Pe+12],7,1804603682),ge=Se(ge,ie,le,ue,ee[Pe+13],12,-40341101),ue=Se(ue,ge,ie,le,ee[Pe+14],17,-1502002290),le=Se(le,ue,ge,ie,ee[Pe+15],22,1236535329),ie=Me(ie,le,ue,ge,ee[Pe+1],5,-165796510),ge=Me(ge,ie,le,ue,ee[Pe+6],9,-1069501632),ue=Me(ue,ge,ie,le,ee[Pe+11],14,643717713),le=Me(le,ue,ge,ie,ee[Pe+0],20,-373897302),ie=Me(ie,le,ue,ge,ee[Pe+5],5,-701558691),ge=Me(ge,ie,le,ue,ee[Pe+10],9,38016083),ue=Me(ue,ge,ie,le,ee[Pe+15],14,-660478335),le=Me(le,ue,ge,ie,ee[Pe+4],20,-405537848),ie=Me(ie,le,ue,ge,ee[Pe+9],5,568446438),ge=Me(ge,ie,le,ue,ee[Pe+14],9,-1019803690),ue=Me(ue,ge,ie,le,ee[Pe+3],14,-187363961),le=Me(le,ue,ge,ie,ee[Pe+8],20,1163531501),ie=Me(ie,le,ue,ge,ee[Pe+13],5,-1444681467),ge=Me(ge,ie,le,ue,ee[Pe+2],9,-51403784),ue=Me(ue,ge,ie,le,ee[Pe+7],14,1735328473),le=Me(le,ue,ge,ie,ee[Pe+12],20,-1926607734),ie=ve(ie,le,ue,ge,ee[Pe+5],4,-378558),ge=ve(ge,ie,le,ue,ee[Pe+8],11,-2022574463),ue=ve(ue,ge,ie,le,ee[Pe+11],16,1839030562),le=ve(le,ue,ge,ie,ee[Pe+14],23,-35309556),ie=ve(ie,le,ue,ge,ee[Pe+1],4,-1530992060),ge=ve(ge,ie,le,ue,ee[Pe+4],11,1272893353),ue=ve(ue,ge,ie,le,ee[Pe+7],16,-155497632),le=ve(le,ue,ge,ie,ee[Pe+10],23,-1094730640),ie=ve(ie,le,ue,ge,ee[Pe+13],4,681279174),ge=ve(ge,ie,le,ue,ee[Pe+0],11,-358537222),ue=ve(ue,ge,ie,le,ee[Pe+3],16,-722521979),le=ve(le,ue,ge,ie,ee[Pe+6],23,76029189),ie=ve(ie,le,ue,ge,ee[Pe+9],4,-640364487),ge=ve(ge,ie,le,ue,ee[Pe+12],11,-421815835),ue=ve(ue,ge,ie,le,ee[Pe+15],16,530742520),le=ve(le,ue,ge,ie,ee[Pe+2],23,-995338651),ie=we(ie,le,ue,ge,ee[Pe+0],6,-198630844),ge=we(ge,ie,le,ue,ee[Pe+7],10,1126891415),ue=we(ue,ge,ie,le,ee[Pe+14],15,-1416354905),le=we(le,ue,ge,ie,ee[Pe+5],21,-57434055),ie=we(ie,le,ue,ge,ee[Pe+12],6,1700485571),ge=we(ge,ie,le,ue,ee[Pe+3],10,-1894986606),ue=we(ue,ge,ie,le,ee[Pe+10],15,-1051523),le=we(le,ue,ge,ie,ee[Pe+1],21,-2054922799),ie=we(ie,le,ue,ge,ee[Pe+8],6,1873313359),ge=we(ge,ie,le,ue,ee[Pe+15],10,-30611744),ue=we(ue,ge,ie,le,ee[Pe+6],15,-1560198380),le=we(le,ue,ge,ie,ee[Pe+13],21,1309151649),ie=we(ie,le,ue,ge,ee[Pe+4],6,-145523070),ge=we(ge,ie,le,ue,ee[Pe+11],10,-1120210379),ue=we(ue,ge,ie,le,ee[Pe+2],15,718787259),le=we(le,ue,ge,ie,ee[Pe+9],21,-343485551),ie=de(ie,je),le=de(le,Be),ue=de(ue,Fe),ge=de(ge,Ne)}return Array(ie,le,ue,ge)}function Ce(ee,ae,ie,le,ue,ge){return de(z(de(de(ae,ee),de(le,ge)),ue),ie)}function Se(ee,ae,ie,le,ue,ge,Pe){return Ce(ae&ie|~ae&le,ee,ae,ue,ge,Pe)}function Me(ee,ae,ie,le,ue,ge,Pe){return Ce(ae&le|ie&~le,ee,ae,ue,ge,Pe)}function ve(ee,ae,ie,le,ue,ge,Pe){return Ce(ae^ie^le,ee,ae,ue,ge,Pe)}function we(ee,ae,ie,le,ue,ge,Pe){return Ce(ie^(ae|~le),ee,ae,ue,ge,Pe)}function de(ee,ae){var ie=(ee&65535)+(ae&65535),le=(ee>>16)+(ae>>16)+(ie>>16);return le<<16|ie&65535}function z(ee,ae){return ee<<ae|ee>>>32-ae}ze.exports=function(ae){return fe.hash(ae,ke,16)}},{"./helpers":462}],464:[function(oe,ze,De){"use strict";var fe=oe("./helpers");function me(ve,we){ve[we>>5]|=128<<24-we%32,ve[(we+64>>9<<4)+15]=we;for(var de=Array(80),z=1732584193,ee=-271733879,ae=-1732584194,ie=271733878,le=-1009589776,ue=0;ue<ve.length;ue+=16){for(var ge=z,Pe=ee,je=ae,Be=ie,Fe=le,Ne=0;Ne<80;Ne++){Ne<16?de[Ne]=ve[ue+Ne]:de[Ne]=Me(de[Ne-3]^de[Ne-8]^de[Ne-14]^de[Ne-16],1);var Ae=Se(Se(Me(z,5),ke(Ne,ee,ae,ie)),Se(Se(le,de[Ne]),Ce(Ne)));le=ie,ie=ae,ae=Me(ee,30),ee=z,z=Ae}z=Se(z,ge),ee=Se(ee,Pe),ae=Se(ae,je),ie=Se(ie,Be),le=Se(le,Fe)}return Array(z,ee,ae,ie,le)}function ke(ve,we,de,z){return ve<20?we&de|~we&z:ve<40?we^de^z:ve<60?we&de|we&z|de&z:we^de^z}function Ce(ve){return ve<20?1518500249:ve<40?1859775393:ve<60?-1894007588:-899497514}function Se(ve,we){var de=(ve&65535)+(we&65535),z=(ve>>16)+(we>>16)+(de>>16);return z<<16|de&65535}function Me(ve,we){return ve<<we|ve>>>32-we}ze.exports=function(we){return fe.hash(we,me,20,!0)}},{"./helpers":462}],465:[function(oe,ze,De){"use strict";ze.exports=function(){return function(){}}},{}],466:[function(oe,ze,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/helpers/typeof")),Ce=oe("stream"),Se=Ce.Stream,Me=oe("../lib/common/utils/isArray"),ve=Me.isArray;ze.exports.string=function(z){return typeof z=="string"},ze.exports.array=ve,ze.exports.buffer=fe.isBuffer;function we(de){return de instanceof Se}ze.exports.writableStream=function(z){return we(z)&&typeof z._write=="function"&&(0,ke.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:oe("../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(oe,ze,De){"use strict";var fe=oe("immediate"),me=ze.exports={};me.nextTick=fe,me.title="browser",me.browser=!0,me.env={},me.argv=[],me.version="",me.versions={};function ke(){}me.on=ke,me.addListener=ke,me.once=ke,me.off=ke,me.removeListener=ke,me.removeAllListeners=ke,me.emit=ke,me.prependListener=ke,me.prependOnceListener=ke,me.listeners=function(Ce){return[]},me.binding=function(Ce){throw new Error("process.binding is not supported")},me.cwd=function(){return"/"},me.chdir=function(Ce){throw new Error("process.chdir is not supported")},me.umask=function(){return 0}},{immediate:358}],468:[function(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js");var me=oe("./lib/request"),ke=oe("./lib/response"),Ce=oe("xtend"),Se=oe("builtin-status-codes"),Me=oe("url"),ve=De;ve.request=function(we,de){typeof we=="string"?we=Me.parse(we):we=Ce(we);var z=fe.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=we.protocol||z,ae=we.hostname||we.host,ie=we.port,le=we.path||"/";ae&&ae.indexOf(":")!==-1&&(ae="["+ae+"]"),we.url=(ae?ee+"//"+ae:"")+(ie?":"+ie:"")+le,we.method=(we.method||"GET").toUpperCase(),we.headers=we.headers||{};var ue=new me(we);return de&&ue.on("response",de),ue},ve.get=function(de,z){var ee=ve.request(de,z);return ee.end(),ee},ve.ClientRequest=me,ve.IncomingMessage=ke.IncomingMessage,ve.Agent=function(){},ve.Agent.defaultMaxSockets=4,ve.globalAgent=new ve.Agent,ve.STATUS_CODES=Se,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 cn!="undefined"?cn: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(oe,ze,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array-buffer.constructor.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.array.slice.js"),De.fetch=ve(fe.fetch)&&ve(fe.ReadableStream),De.writableStream=ve(fe.WritableStream),De.abortController=ve(fe.AbortController),De.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),De.blobConstructor=!0}catch(we){}var me;function ke(){if(me!==void 0)return me;if(fe.XMLHttpRequest){me=new fe.XMLHttpRequest;try{me.open("GET",fe.XDomainRequest?"/":"https://example.com")}catch(we){me=null}}else me=null;return me}function Ce(we){var de=ke();if(!de)return!1;try{return de.responseType=we,de.responseType===we}catch(z){}return!1}var Se=typeof fe.ArrayBuffer!="undefined",Me=Se&&ve(fe.ArrayBuffer.prototype.slice);De.arraybuffer=De.fetch||Se&&Ce("arraybuffer"),De.msstream=!De.fetch&&Me&&Ce("ms-stream"),De.mozchunkedarraybuffer=!De.fetch&&Se&&Ce("moz-chunked-arraybuffer"),De.overrideMimeType=De.fetch||(ke()?ve(ke().overrideMimeType):!1),De.vbArray=ve(fe.VBArray);function ve(we){return typeof we=="function"}me=null}).call(this)}).call(this,typeof cn!="undefined"?cn: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(oe,ze,De){(function(fe,me,ke){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js");var Ce=oe("./capability"),Se=oe("inherits"),Me=oe("./response"),ve=oe("readable-stream"),we=oe("to-arraybuffer"),de=Me.IncomingMessage,z=Me.readyStates;function ee(ue,ge){return Ce.fetch&&ge?"fetch":Ce.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Ce.msstream?"ms-stream":Ce.arraybuffer&&ue?"arraybuffer":Ce.vbArray&&ue?"text:vbarray":"text"}var ae=ze.exports=function(ue){var ge=this;ve.Writable.call(ge),ge._opts=ue,ge._body=[],ge._headers={},ue.auth&&ge.setHeader("Authorization","Basic "+new ke(ue.auth).toString("base64")),Object.keys(ue.headers).forEach(function(Be){ge.setHeader(Be,ue.headers[Be])});var Pe,je=!0;if(ue.mode==="disable-fetch"||"requestTimeout"in ue&&!Ce.abortController)je=!1,Pe=!0;else if(ue.mode==="prefer-streaming")Pe=!1;else if(ue.mode==="allow-wrong-content-type")Pe=!Ce.overrideMimeType;else if(!ue.mode||ue.mode==="default"||ue.mode==="prefer-fast")Pe=!0;else throw new Error("Invalid value for opts.mode");ge._mode=ee(Pe,je),ge._fetchTimer=null,ge.on("finish",function(){ge._onFinish()})};Se(ae,ve.Writable),ae.prototype.setHeader=function(ue,ge){var Pe=this,je=ue.toLowerCase();le.indexOf(je)===-1&&(Pe._headers[je]={name:ue,value:ge})},ae.prototype.getHeader=function(ue){var ge=this._headers[ue.toLowerCase()];return ge?ge.value:null},ae.prototype.removeHeader=function(ue){var ge=this;delete ge._headers[ue.toLowerCase()]},ae.prototype._onFinish=function(){var ue=this;if(!ue._destroyed){var ge=ue._opts,Pe=ue._headers,je=null;ge.method!=="GET"&&ge.method!=="HEAD"&&(Ce.arraybuffer?je=we(ke.concat(ue._body)):Ce.blobConstructor?je=new me.Blob(ue._body.map(function(We){return we(We)}),{type:(Pe["content-type"]||{}).value||""}):je=ke.concat(ue._body).toString());var Be=[];if(Object.keys(Pe).forEach(function(We){var Ye=Pe[We].name,Ue=Pe[We].value;Array.isArray(Ue)?Ue.forEach(function(Ke){Be.push([Ye,Ke])}):Be.push([Ye,Ue])}),ue._mode==="fetch"){var Fe=null,Ne=null;if(Ce.abortController){var Ae=new AbortController;Fe=Ae.signal,ue._fetchAbortController=Ae,"requestTimeout"in ge&&ge.requestTimeout!==0&&(ue._fetchTimer=me.setTimeout(function(){ue.emit("requestTimeout"),ue._fetchAbortController&&ue._fetchAbortController.abort()},ge.requestTimeout))}me.fetch(ue._opts.url,{method:ue._opts.method,headers:Be,body:je||void 0,mode:"cors",credentials:ge.withCredentials?"include":"same-origin",signal:Fe}).then(function(We){ue._fetchResponse=We,ue._connect()},function(We){me.clearTimeout(ue._fetchTimer),ue._destroyed||ue.emit("error",We)})}else{var Ie=ue._xhr=new me.XMLHttpRequest;try{Ie.open(ue._opts.method,ue._opts.url,!0)}catch(We){fe.nextTick(function(){ue.emit("error",We)});return}"responseType"in Ie&&(Ie.responseType=ue._mode.split(":")[0]),"withCredentials"in Ie&&(Ie.withCredentials=!!ge.withCredentials),ue._mode==="text"&&"overrideMimeType"in Ie&&Ie.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in ge&&(Ie.timeout=ge.requestTimeout,Ie.ontimeout=function(){ue.emit("requestTimeout")}),Be.forEach(function(We){Ie.setRequestHeader(We[0],We[1])}),ue._response=null,Ie.onreadystatechange=function(){switch(Ie.readyState){case z.LOADING:case z.DONE:ue._onXHRProgress();break}},ue._mode==="moz-chunked-arraybuffer"&&(Ie.onprogress=function(){ue._onXHRProgress()}),Ie.onerror=function(){ue._destroyed||ue.emit("error",new Error("XHR error"))};try{Ie.send(je)}catch(We){fe.nextTick(function(){ue.emit("error",We)});return}}}};function ie(ue){try{var ge=ue.status;return ge!==null&&ge!==0}catch(Pe){return!1}}ae.prototype._onXHRProgress=function(){var ue=this;!ie(ue._xhr)||ue._destroyed||(ue._response||ue._connect(),ue._response._onXHRProgress())},ae.prototype._connect=function(){var ue=this;ue._destroyed||(ue._response=new de(ue._xhr,ue._fetchResponse,ue._mode,ue._fetchTimer),ue._response.on("error",function(ge){ue.emit("error",ge)}),ue.emit("response",ue._response))},ae.prototype._write=function(ue,ge,Pe){var je=this;je._body.push(ue),Pe()},ae.prototype.abort=ae.prototype.destroy=function(){var ue=this;ue._destroyed=!0,me.clearTimeout(ue._fetchTimer),ue._response&&(ue._response._destroyed=!0),ue._xhr?ue._xhr.abort():ue._fetchAbortController&&ue._fetchAbortController.abort()},ae.prototype.end=function(ue,ge,Pe){var je=this;typeof ue=="function"&&(Pe=ue,ue=void 0),ve.Writable.prototype.end.call(je,ue,ge,Pe)},ae.prototype.flushHeaders=function(){},ae.prototype.setTimeout=function(){},ae.prototype.setNoDelay=function(){},ae.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,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("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(oe,ze,De){(function(fe,me,ke){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js"),oe("core-js/modules/es.array.slice.js");var Ce=oe("./capability"),Se=oe("inherits"),Me=oe("readable-stream"),ve=De.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},we=De.IncomingMessage=function(de,z,ee,ae){var ie=this;if(Me.Readable.call(ie),ie._mode=ee,ie.headers={},ie.rawHeaders=[],ie.trailers={},ie.rawTrailers=[],ie.on("end",function(){fe.nextTick(function(){ie.emit("close")})}),ee==="fetch"){var le=function Fe(){ge.read().then(function(Ne){if(!ie._destroyed){if(Ne.done){me.clearTimeout(ae),ie.push(null);return}ie.push(new ke(Ne.value)),Fe()}}).catch(function(Ne){me.clearTimeout(ae),ie._destroyed||ie.emit("error",Ne)})};if(ie._fetchResponse=z,ie.url=z.url,ie.statusCode=z.status,ie.statusMessage=z.statusText,z.headers.forEach(function(Fe,Ne){ie.headers[Ne.toLowerCase()]=Fe,ie.rawHeaders.push(Ne,Fe)}),Ce.writableStream){var ue=new WritableStream({write:function(Ne){return new Promise(function(Ae,Ie){ie._destroyed?Ie():ie.push(new ke(Ne))?Ae():ie._resumeFetch=Ae})},close:function(){me.clearTimeout(ae),ie._destroyed||ie.push(null)},abort:function(Ne){ie._destroyed||ie.emit("error",Ne)}});try{z.body.pipeTo(ue).catch(function(Fe){me.clearTimeout(ae),ie._destroyed||ie.emit("error",Fe)});return}catch(Fe){}}var ge=z.body.getReader();le()}else{ie._xhr=de,ie._pos=0,ie.url=de.responseURL,ie.statusCode=de.status,ie.statusMessage=de.statusText;var Pe=de.getAllResponseHeaders().split(/\r?\n/);if(Pe.forEach(function(Fe){var Ne=Fe.match(/^([^:]+):\s*(.*)/);if(Ne){var Ae=Ne[1].toLowerCase();Ae==="set-cookie"?(ie.headers[Ae]===void 0&&(ie.headers[Ae]=[]),ie.headers[Ae].push(Ne[2])):ie.headers[Ae]!==void 0?ie.headers[Ae]+=", "+Ne[2]:ie.headers[Ae]=Ne[2],ie.rawHeaders.push(Ne[1],Ne[2])}}),ie._charset="x-user-defined",!Ce.overrideMimeType){var je=ie.rawHeaders["mime-type"];if(je){var Be=je.match(/;\s*charset=([^;])(;|$)/);Be&&(ie._charset=Be[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};Se(we,Me.Readable),we.prototype._read=function(){var de=this,z=de._resumeFetch;z&&(de._resumeFetch=null,z())},we.prototype._onXHRProgress=function(){var de=this,z=de._xhr,ee=null;switch(de._mode){case"text:vbarray":if(z.readyState!==ve.DONE)break;try{ee=new me.VBArray(z.responseBody).toArray()}catch(ge){}if(ee!==null){de.push(new ke(ee));break}case"text":try{ee=z.responseText}catch(ge){de._mode="text:vbarray";break}if(ee.length>de._pos){var ae=ee.substr(de._pos);if(de._charset==="x-user-defined"){for(var ie=new ke(ae.length),le=0;le<ae.length;le++)ie[le]=ae.charCodeAt(le)&255;de.push(ie)}else de.push(ae,de._charset);de._pos=ee.length}break;case"arraybuffer":if(z.readyState!==ve.DONE||!z.response)break;ee=z.response,de.push(new ke(new Uint8Array(ee)));break;case"moz-chunked-arraybuffer":if(ee=z.response,z.readyState!==ve.LOADING||!ee)break;de.push(new ke(new Uint8Array(ee)));break;case"ms-stream":if(ee=z.response,z.readyState!==ve.LOADING)break;var ue=new me.MSStreamReader;ue.onprogress=function(){ue.result.byteLength>de._pos&&(de.push(new ke(new Uint8Array(ue.result.slice(de._pos)))),de._pos=ue.result.byteLength)},ue.onload=function(){de.push(null)},ue.readAsArrayBuffer(ee);break}de._xhr.readyState===ve.DONE&&de._mode!=="ms-stream"&&de.push(null)}}).call(this)}).call(this,oe("_process"),typeof cn!="undefined"?cn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.splice.js");var ke=oe("punycode"),Ce=oe("./util");De.parse=Ne,De.resolve=Ie,De.resolveObject=We,De.format=Ae,De.Url=Se;function Se(){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 Me=/^([a-z0-9.+-]+:)/i,ve=/:[0-9]*$/,we=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,de=["<",">",'"',"`"," ","\r",`
`," "],z=["{","}","|","\\","^","`"].concat(de),ee=["'"].concat(z),ae=["%","/","?",";","#"].concat(ee),ie=["/","?","#"],le=255,ue=/^[+a-z0-9A-Z_-]{0,63}$/,ge=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Pe={javascript:!0,"javascript:":!0},je={javascript:!0,"javascript:":!0},Be={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Fe=oe("querystring");function Ne(Ye,Ue,Ke){if(Ye&&Ce.isObject(Ye)&&Ye instanceof Se)return Ye;var ot=new Se;return ot.parse(Ye,Ue,Ke),ot}Se.prototype.parse=function(Ye,Ue,Ke){if(!Ce.isString(Ye))throw new TypeError("Parameter 'url' must be a string, not "+(0,me.default)(Ye));var ot=Ye.indexOf("?"),st=ot!==-1&&ot<Ye.indexOf("#")?"?":"#",dt=Ye.split(st),Ct=/\\/g;dt[0]=dt[0].replace(Ct,"/"),Ye=dt.join(st);var $e=Ye;if($e=$e.trim(),!Ke&&Ye.split("#").length===1){var rt=we.exec($e);if(rt)return this.path=$e,this.href=$e,this.pathname=rt[1],rt[2]?(this.search=rt[2],Ue?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ue&&(this.search="",this.query={}),this}var St=Me.exec($e);if(St){St=St[0];var Pt=St.toLowerCase();this.protocol=Pt,$e=$e.substr(St.length)}if(Ke||St||$e.match(/^\/\/[^@\/]+@[^@\/]+/)){var wt=$e.substr(0,2)==="//";wt&&!(St&&je[St])&&($e=$e.substr(2),this.slashes=!0)}if(!je[St]&&(wt||St&&!Be[St])){for(var pt=-1,ft=0;ft<ie.length;ft++){var ht=$e.indexOf(ie[ft]);ht!==-1&&(pt===-1||ht<pt)&&(pt=ht)}var Et,mt;pt===-1?mt=$e.lastIndexOf("@"):mt=$e.lastIndexOf("@",pt),mt!==-1&&(Et=$e.slice(0,mt),$e=$e.slice(mt+1),this.auth=decodeURIComponent(Et)),pt=-1;for(var ft=0;ft<ae.length;ft++){var ht=$e.indexOf(ae[ft]);ht!==-1&&(pt===-1||ht<pt)&&(pt=ht)}pt===-1&&(pt=$e.length),this.host=$e.slice(0,pt),$e=$e.slice(pt),this.parseHost(),this.hostname=this.hostname||"";var yt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!yt)for(var At=this.hostname.split("."),ft=0,xt=At.length;ft<xt;ft++){var tt=At[ft];if(tt&&!tt.match(ue)){for(var Ve="",xe=0,Le=tt.length;xe<Le;xe++)tt.charCodeAt(xe)>127?Ve+="x":Ve+=tt[xe];if(!Ve.match(ue)){var Ze=At.slice(0,ft),nt=At.slice(ft+1),Re=tt.match(ge);Re&&(Ze.push(Re[1]),nt.unshift(Re[2])),nt.length&&($e="/"+nt.join(".")+$e),this.hostname=Ze.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),yt||(this.hostname=ke.toASCII(this.hostname));var _e=this.port?":"+this.port:"",He=this.hostname||"";this.host=He+_e,this.href+=this.host,yt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),$e[0]!=="/"&&($e="/"+$e))}if(!Pe[Pt])for(var ft=0,xt=ee.length;ft<xt;ft++){var Qe=ee[ft];if($e.indexOf(Qe)!==-1){var ut=encodeURIComponent(Qe);ut===Qe&&(ut=escape(Qe)),$e=$e.split(Qe).join(ut)}}var gt=$e.indexOf("#");gt!==-1&&(this.hash=$e.substr(gt),$e=$e.slice(0,gt));var Mt=$e.indexOf("?");if(Mt!==-1?(this.search=$e.substr(Mt),this.query=$e.substr(Mt+1),Ue&&(this.query=Fe.parse(this.query)),$e=$e.slice(0,Mt)):Ue&&(this.search="",this.query={}),$e&&(this.pathname=$e),Be[Pt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",Nt=this.search||"";this.path=_e+Nt}return this.href=this.format(),this};function Ae(Ye){return Ce.isString(Ye)&&(Ye=Ne(Ye)),Ye instanceof Se?Ye.format():Se.prototype.format.call(Ye)}Se.prototype.format=function(){var Ye=this.auth||"";Ye&&(Ye=encodeURIComponent(Ye),Ye=Ye.replace(/%3A/i,":"),Ye+="@");var Ue=this.protocol||"",Ke=this.pathname||"",ot=this.hash||"",st=!1,dt="";this.host?st=Ye+this.host:this.hostname&&(st=Ye+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(st+=":"+this.port)),this.query&&Ce.isObject(this.query)&&Object.keys(this.query).length&&(dt=Fe.stringify(this.query));var Ct=this.search||dt&&"?"+dt||"";return Ue&&Ue.substr(-1)!==":"&&(Ue+=":"),this.slashes||(!Ue||Be[Ue])&&st!==!1?(st="//"+(st||""),Ke&&Ke.charAt(0)!=="/"&&(Ke="/"+Ke)):st||(st=""),ot&&ot.charAt(0)!=="#"&&(ot="#"+ot),Ct&&Ct.charAt(0)!=="?"&&(Ct="?"+Ct),Ke=Ke.replace(/[?#]/g,function($e){return encodeURIComponent($e)}),Ct=Ct.replace("#","%23"),Ue+st+Ke+Ct+ot};function Ie(Ye,Ue){return Ne(Ye,!1,!0).resolve(Ue)}Se.prototype.resolve=function(Ye){return this.resolveObject(Ne(Ye,!1,!0)).format()};function We(Ye,Ue){return Ye?Ne(Ye,!1,!0).resolveObject(Ue):Ue}Se.prototype.resolveObject=function(Ye){if(Ce.isString(Ye)){var Ue=new Se;Ue.parse(Ye,!1,!0),Ye=Ue}for(var Ke=new Se,ot=Object.keys(this),st=0;st<ot.length;st++){var dt=ot[st];Ke[dt]=this[dt]}if(Ke.hash=Ye.hash,Ye.href==="")return Ke.href=Ke.format(),Ke;if(Ye.slashes&&!Ye.protocol){for(var Ct=Object.keys(Ye),$e=0;$e<Ct.length;$e++){var rt=Ct[$e];rt!=="protocol"&&(Ke[rt]=Ye[rt])}return Be[Ke.protocol]&&Ke.hostname&&!Ke.pathname&&(Ke.path=Ke.pathname="/"),Ke.href=Ke.format(),Ke}if(Ye.protocol&&Ye.protocol!==Ke.protocol){if(!Be[Ye.protocol]){for(var St=Object.keys(Ye),Pt=0;Pt<St.length;Pt++){var wt=St[Pt];Ke[wt]=Ye[wt]}return Ke.href=Ke.format(),Ke}if(Ke.protocol=Ye.protocol,!Ye.host&&!je[Ye.protocol]){for(var xt=(Ye.pathname||"").split("/");xt.length&&!(Ye.host=xt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),xt[0]!==""&&xt.unshift(""),xt.length<2&&xt.unshift(""),Ke.pathname=xt.join("/")}else Ke.pathname=Ye.pathname;if(Ke.search=Ye.search,Ke.query=Ye.query,Ke.host=Ye.host||"",Ke.auth=Ye.auth,Ke.hostname=Ye.hostname||Ye.host,Ke.port=Ye.port,Ke.pathname||Ke.search){var pt=Ke.pathname||"",ft=Ke.search||"";Ke.path=pt+ft}return Ke.slashes=Ke.slashes||Ye.slashes,Ke.href=Ke.format(),Ke}var ht=Ke.pathname&&Ke.pathname.charAt(0)==="/",Et=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",mt=Et||ht||Ke.host&&Ye.pathname,yt=mt,At=Ke.pathname&&Ke.pathname.split("/")||[],xt=Ye.pathname&&Ye.pathname.split("/")||[],tt=Ke.protocol&&!Be[Ke.protocol];if(tt&&(Ke.hostname="",Ke.port=null,Ke.host&&(At[0]===""?At[0]=Ke.host:At.unshift(Ke.host)),Ke.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(xt[0]===""?xt[0]=Ye.host:xt.unshift(Ye.host)),Ye.host=null),mt=mt&&(xt[0]===""||At[0]==="")),Et)Ke.host=Ye.host||Ye.host===""?Ye.host:Ke.host,Ke.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Ke.hostname,Ke.search=Ye.search,Ke.query=Ye.query,At=xt;else if(xt.length)At||(At=[]),At.pop(),At=At.concat(xt),Ke.search=Ye.search,Ke.query=Ye.query;else if(!Ce.isNullOrUndefined(Ye.search)){if(tt){Ke.hostname=Ke.host=At.shift();var Ve=Ke.host&&Ke.host.indexOf("@")>0?Ke.host.split("@"):!1;Ve&&(Ke.auth=Ve.shift(),Ke.host=Ke.hostname=Ve.shift())}return Ke.search=Ye.search,Ke.query=Ye.query,(!Ce.isNull(Ke.pathname)||!Ce.isNull(Ke.search))&&(Ke.path=(Ke.pathname?Ke.pathname:"")+(Ke.search?Ke.search:"")),Ke.href=Ke.format(),Ke}if(!At.length)return Ke.pathname=null,Ke.search?Ke.path="/"+Ke.search:Ke.path=null,Ke.href=Ke.format(),Ke;for(var xe=At.slice(-1)[0],Le=(Ke.host||Ye.host||At.length>1)&&(xe==="."||xe==="..")||xe==="",Ze=0,nt=At.length;nt>=0;nt--)xe=At[nt],xe==="."?At.splice(nt,1):xe===".."?(At.splice(nt,1),Ze++):Ze&&(At.splice(nt,1),Ze--);if(!mt&&!yt)for(;Ze--;Ze)At.unshift("..");mt&&At[0]!==""&&(!At[0]||At[0].charAt(0)!=="/")&&At.unshift(""),Le&&At.join("/").substr(-1)!=="/"&&At.push("");var Re=At[0]===""||At[0]&&At[0].charAt(0)==="/";if(tt){Ke.hostname=Ke.host=Re?"":At.length?At.shift():"";var Ve=Ke.host&&Ke.host.indexOf("@")>0?Ke.host.split("@"):!1;Ve&&(Ke.auth=Ve.shift(),Ke.host=Ke.hostname=Ve.shift())}return mt=mt||Ke.host&&At.length,mt&&!Re&&At.unshift(""),At.length?Ke.pathname=At.join("/"):(Ke.pathname=null,Ke.path=null),(!Ce.isNull(Ke.pathname)||!Ce.isNull(Ke.search))&&(Ke.path=(Ke.pathname?Ke.pathname:"")+(Ke.search?Ke.search:"")),Ke.auth=Ye.auth||Ke.auth,Ke.slashes=Ke.slashes||Ye.slashes,Ke.href=Ke.format(),Ke},Se.prototype.parseHost=function(){var Ye=this.host,Ue=ve.exec(Ye);Ue&&(Ue=Ue[0],Ue!==":"&&(this.port=Ue.substr(1)),Ye=Ye.substr(0,Ye.length-Ue.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(oe,ze,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/helpers/typeof"));ze.exports={isString:function(Ce){return typeof Ce=="string"},isObject:function(Ce){return(0,me.default)(Ce)==="object"&&Ce!==null},isNull:function(Ce){return Ce===null},isNullOrUndefined:function(Ce){return Ce==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(oe,ze,De){"use strict";oe("core-js/modules/es.number.constructor.js"),De.encodeURIComponent=function(fe){try{return encodeURIComponent(fe)}catch(me){return fe}},De.escape=oe("escape-html"),De.timestamp=function(me){if(me){var ke=me;return typeof ke=="string"&&(ke=Number(ke)),String(me).length===10&&(ke*=1e3),new Date(ke)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(oe,ze,De){(function(fe,me){(function(){"use strict";var ke=oe("@babel/runtime/helpers/interopRequireDefault"),Ce=ke(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.concat.js");var Se=oe("util"),Me=oe("url"),ve=oe("http"),we=oe("https"),de=oe("debug")("urllib"),z=oe("humanize-ms"),ee=0,ae=Math.pow(2,31)-10,ie=/^https?:\/\//i;function le(je,Be){return je===void 0?Be:je}function ue(je){return je?je.split(";")[0].trim().toLowerCase():""}function ge(je,Be){return function(Fe,Ne,Ae){if(Fe)return Be(Fe);je({data:Ne,status:Ae.statusCode,headers:Ae.headers,res:Ae})}}De.TIMEOUTS=[z("300s"),z("300s")];var Pe=["json","text"];De.request=function(Be,Fe,Ne){return arguments.length===2&&typeof Fe=="function"&&(Ne=Fe,Fe=null),typeof Ne=="function"?De.requestWithCallback(Be,Fe,Ne):new Promise(function(Ae,Ie){De.requestWithCallback(Be,Fe,ge(Ae,Ie))})},De.requestWithCallback=function(Be,Fe,Ne){if(!Be||typeof Be!="string"&&(0,Ce.default)(Be)!=="object"){var Ae=Se.format("expect request url to be a string or a http request options, but got %j",Be);throw new Error(Ae)}arguments.length===2&&typeof Fe=="function"&&(Ne=Fe,Fe=null),Fe=Fe||{},ee>=ae&&(ee=0);var Ie=++ee;Fe.requestUrls=Fe.requestUrls||[];var We={requestId:Ie,url:Be,args:Fe,ctx:Fe.ctx};Fe.emitter&&Fe.emitter.emit("request",We),Fe.timeout=Fe.timeout||De.TIMEOUTS,Fe.maxRedirects=Fe.maxRedirects||10,Fe.streaming=Fe.streaming||Fe.customResponse;var Ye=Date.now(),Ue;typeof Be=="string"?(ie.test(Be)||(Be="https://"+Be),Ue=Me.parse(Be)):Ue=Be;var Ke=(Fe.type||Fe.method||Ue.method||"GET").toUpperCase(),ot=Ue.port||80,st=ve,dt=le(Fe.agent,De.agent),Ct=Fe.fixJSONCtlChars;Ue.protocol==="https:"&&(st=we,dt=le(Fe.httpsAgent,De.httpsAgent),Ue.port||(ot=443));var $e={host:Ue.hostname||Ue.host||"localhost",path:Ue.path||"/",method:Ke,port:ot,agent:dt,headers:Fe.headers||{},lookup:Fe.lookup};Array.isArray(Fe.timeout)?$e.requestTimeout=Fe.timeout[Fe.timeout.length-1]:typeof Fe.timeout!="undefined"&&($e.requestTimeout=Fe.timeout);var rt=Fe.auth||Ue.auth;rt&&($e.auth=rt);var St=Fe.content||Fe.data,Pt=Ke==="GET"||Ke==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&St&&!(typeof St=="string"||me.isBuffer(St)))if(Pt)St=Fe.nestedQuerystring?qs.stringify(St):querystring.stringify(St);else{var wt=$e.headers["Content-Type"]||$e.headers["content-type"];wt||(Fe.contentType==="json"?wt="application/json":wt="application/x-www-form-urlencoded",$e.headers["Content-Type"]=wt),ue(wt)==="application/json"?St=JSON.stringify(St):St=Fe.nestedQuerystring?qs.stringify(St):querystring.stringify(St)}Pt&&St&&($e.path+=(Ue.query?"&":"?")+St,St=null);var pt=0;if(St){var ft=St.length;me.isBuffer(St)||(ft=me.byteLength(St)),pt=$e.headers["Content-Length"]=ft}Fe.dataType==="json"&&($e.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest($e);var ht=null,Et=null,mt=null,yt=!1,At=!1,xt=0,tt=-1,Ve=!1,xe="",Le="",Ze=null;Fe.timing&&(Ze={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function nt(){ht&&(clearTimeout(ht),ht=null)}function Re(){Et&&(clearTimeout(Et),Et=null)}function _e(Ut,sn,nn){if(Re(),!Ne){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Ie,fe.pid,$e.method,Be),Ut&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),Ie,fe.pid,Ut.name,Ut.message,Ut.stack);return}var Wt=Ne;Ne=null;var bn={};nn&&(tt=nn.statusCode,bn=nn.headers);var mn=Date.now()-Ye;Ze&&(Ze.contentDownload=mn),de("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",mn,xt,tt,$e.method,$e.host,$e.path,At,Ze);var jn={status:tt,statusCode:tt,headers:bn,size:xt,aborted:Ve,rt:mn,keepAliveSocket:At,data:sn,requestUrls:Fe.requestUrls,timing:Ze,remoteAddress:xe,remotePort:Le};if(Ut){var Jn="";dt&&typeof dt.getCurrentStatus=="function"&&(Jn=", agent status: "+JSON.stringify(dt.getCurrentStatus())),Ut.message+=", "+$e.method+" "+Be+" "+tt+" (connected: "+yt+", keepalive socket: "+At+Jn+`)
headers: `+JSON.stringify(bn),Ut.data=sn,Ut.path=$e.path,Ut.status=tt,Ut.headers=bn,Ut.res=jn}Wt(Ut,sn,Fe.streaming?nn:jn),Fe.emitter&&(We.url=Be,We.socket=Xt&&Xt.connection,We.options=$e,We.size=pt,Fe.emitter.emit("response",{requestId:Ie,error:Ut,ctx:Fe.ctx,req:We,res:jn}))}function He(Ut){var sn=null;if(Fe.followRedirect&&statuses.redirect[Ut.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var nn=Ut.headers.location;if(!nn)sn=new Error("Got statusCode "+Ut.statusCode+" but cannot resolve next location from headers"),sn.name="FollowRedirectError";else if(Fe._followRedirectCount>Fe.maxRedirects)sn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Be),sn.name="MaxRedirectError";else{var Wt=Fe.formatRedirectUrl?Fe.formatRedirectUrl(Be,nn):Me.resolve(Be,nn);de("Request#%d %s: `redirected` from %s to %s",Ie,$e.path,Be,Wt),Re(),Fe.headers&&Fe.headers.Host&&ie.test(nn)&&(Fe.headers.Host=null);var bn=Ne;return Ne=null,De.requestWithCallback(Wt,Fe,bn),{redirect:!0,error:null}}}return{redirect:!1,error:sn}}Fe.gzip&&!$e.headers["Accept-Encoding"]&&!$e.headers["accept-encoding"]&&($e.headers["Accept-Encoding"]="gzip");function Qe(Ut,sn,nn){var Wt=Ut.headers["content-encoding"];return nn(null,sn,Wt)}var ut=Fe.writeStream;de("Request#%d %s %s with headers %j, options.path: %s",Ie,Ke,Be,$e.headers,$e.path),Fe.requestUrls.push(Be);function gt(Ut){if(Ze&&(Ze.waiting=Date.now()-Ye),de("Request#%d %s `req response` event emit: status %d, headers: %j",Ie,Be,Ut.statusCode,Ut.headers),Fe.streaming){var sn=He(Ut);if(sn.redirect){Ut.resume();return}return sn.error?(Ut.resume(),_e(sn.error,null,Ut)):_e(null,null,Ut)}if(Ut.on("close",function(){de("Request#%d %s: `res close` event emit, total size %d",Ie,Be,xt)}),Ut.on("error",function(){de("Request#%d %s: `res error` event emit, total size %d",Ie,Be,xt)}),Ut.on("aborted",function(){Ve=!0,de("Request#%d %s: `res aborted` event emit, total size %d",Ie,Be,xt)}),ut){var nn=He(Ut);if(nn.redirect){Ut.resume();return}return nn.error?(Ut.resume(),ut.end(),_e(nn.error,null,Ut)):(Fe.consumeWriteStream===!1?Ut.on("end",_e.bind(null,null,null,Ut)):ut.on("close",function(){de("Request#%d %s: writeStream close event emitted",Ie,Be),_e(mt||null,null,Ut)}),Ut.pipe(ut))}var Wt=[];Ut.on("data",function(bn){de("Request#%d %s: `res data` event emit, size %d",Ie,Be,bn.length),xt+=bn.length,Wt.push(bn)}),Ut.on("end",function(){var bn=me.concat(Wt,xt);if(de("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Ie,Be,xt,Ut._dumped),mt)return _e(mt,bn,Ut);var mn=He(Ut);if(mn.error)return _e(mn.error,bn,Ut);mn.redirect||Qe(Ut,bn,function(jn,Jn,Cr){if(jn)return _e(jn,bn,Ut);if(!Cr&&Pe.indexOf(Fe.dataType)>=0){try{Jn=decodeBodyByCharset(Jn,Ut)}catch(kr){return de("decodeBodyByCharset error: %s",kr),_e(null,Jn,Ut)}if(Fe.dataType==="json")if(xt===0)Jn=null;else{var cr=parseJSON(Jn,Ct);cr.error?jn=cr.error:Jn=cr.data}}Ve&&de("Request#%d %s: Remote socket was terminated before `response.end()` was called",Ie,Be),_e(jn,Jn,Ut)})})}var Mt,Nt;Array.isArray(Fe.timeout)?(Mt=z(Fe.timeout[0]),Nt=z(Fe.timeout[1])):Mt=Nt=z(Fe.timeout),de("ConnectTimeout: %d, ResponseTimeout: %d",Mt,Nt);function Dt(){de("Connect timer ticking, timeout: %d",Mt),ht=setTimeout(function(){ht=null,tt===-1&&(tt=-2);var Ut="Connect timeout for "+Mt+"ms",sn="ConnectionTimeoutError";Xt.socket||(sn="SocketAssignTimeoutError",Ut+=", working sockets is full"),mt=new Error(Ut),mt.name=sn,mt.requestId=Ie,de("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Ie,Be,mt.name,Ut,yt),$t()},Mt)}function Ht(){de("Response timer ticking, timeout: %d",Nt),Et=setTimeout(function(){Et=null;var Ut="Response timeout for "+Nt+"ms",sn="ResponseTimeoutError";mt=new Error(Ut),mt.name=sn,mt.requestId=Ie,de("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Ie,Be,mt.name,Ut,yt),$t()},Nt)}var Xt;$e.mode=Fe.mode?Fe.mode:"";try{Xt=st.request($e,gt)}catch(Ut){return _e(Ut)}typeof window=="undefined"?Dt():Xt.on("requestTimeout",function(){tt===-1&&(tt=-2);var Ut="Connect timeout for "+Mt+"ms",sn="ConnectionTimeoutError";mt=new Error(Ut),mt.name=sn,mt.requestId=Ie,$t()});function $t(){de("Request#%d %s abort, connected: %s",Ie,Be,yt),Xt.socket||(mt.noSocket=!0,_e(mt)),Xt.abort()}return Ze&&Xt.on("finish",function(){Ze.requestSent=Date.now()-Ye}),Xt.once("socket",function(Ut){Ze&&(Ze.queuing=Date.now()-Ye);var sn=Ut.readyState;if(sn==="opening"){Ut.once("lookup",function(nn,Wt,bn){de("Request#%d %s lookup: %s, %s, %s",Ie,Be,nn,Wt,bn),Ze&&(Ze.dnslookup=Date.now()-Ye),Wt&&(xe=Wt)}),Ut.once("connect",function(){Ze&&(Ze.connected=Date.now()-Ye),nt(),Ht(),de("Request#%d %s new socket connected",Ie,Be),yt=!0,xe||(xe=Ut.remoteAddress),Le=Ut.remotePort});return}de("Request#%d %s reuse socket connected, readyState: %s",Ie,Be,sn),yt=!0,At=!0,xe||(xe=Ut.remoteAddress),Le=Ut.remotePort,nt(),Ht()}),Xt.on("error",function(Ut){(Ut.name==="Error"||Ut.name==="TypeError")&&(Ut.name=yt?"ResponseError":"RequestError"),Ut.message+=' (req "error")',de("Request#%d %s `req error` event emit, %s: %s",Ie,Be,Ut.name,Ut.message),_e(mt||Ut)}),ut&&ut.once("error",function(Ut){Ut.message+=' (writeStream "error")',mt=Ut,de("Request#%d %s `writeStream error` event emit, %s: %s",Ie,Be,Ut.name,Ut.message),$t()}),Fe.stream?(Fe.stream.pipe(Xt),Fe.stream.once("error",function(Ut){Ut.message+=' (stream "error")',mt=Ut,de("Request#%d %s `readStream error` event emit, %s: %s",Ie,Be,Ut.name,Ut.message),$t()})):Xt.end(St),Xt.requestId=Ie,Xt}}).call(this)}).call(this,oe("_process"),oe("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)},99498:function(gn,cn,at){(function(ct){ct(at(89780))})(function(ct){ct.defineOption("placeholder","",function(ke,Ce,Se){var Me=Se&&Se!=ct.Init;if(Ce&&!Me)ke.on("blur",De),ke.on("change",fe),ke.on("swapDoc",fe),ct.on(ke.getInputField(),"compositionupdate",ke.state.placeholderCompose=function(){ze(ke)}),fe(ke);else if(!Ce&&Me){ke.off("blur",De),ke.off("change",fe),ke.off("swapDoc",fe),ct.off(ke.getInputField(),"compositionupdate",ke.state.placeholderCompose),Bt(ke);var ve=ke.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}Ce&&!ke.hasFocus()&&De(ke)});function Bt(ke){ke.state.placeholder&&(ke.state.placeholder.parentNode.removeChild(ke.state.placeholder),ke.state.placeholder=null)}function oe(ke){Bt(ke);var Ce=ke.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=ke.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var Se=ke.getOption("placeholder");typeof Se=="string"&&(Se=document.createTextNode(Se)),Ce.appendChild(Se),ke.display.lineSpace.insertBefore(Ce,ke.display.lineSpace.firstChild)}function ze(ke){setTimeout(function(){var Ce=!1,Se=ke.getInputField();Se.nodeName=="TEXTAREA"?Ce=!Se.value:ke.lineCount()==1&&(Ce=!/[^\u200b]/.test(Se.querySelector(".CodeMirror-line").textContent)),Ce?oe(ke):Bt(ke)},20)}function De(ke){me(ke)&&oe(ke)}function fe(ke){var Ce=ke.getWrapperElement(),Se=me(ke);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(Se?" CodeMirror-empty":""),Se?oe(ke):Bt(ke)}function me(ke){return ke.lineCount()===1&&ke.getLine(0)===""}})},25717:function(gn,cn,at){(function(ct){ct(at(89780))})(function(ct){var Bt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=ct.Pos;ct.defineOption("autoCloseBrackets",!1,function(z,ee,ae){ae&&ae!=ct.Init&&(z.removeKeyMap(De),z.state.closeBrackets=null),ee&&(fe(ze(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(De))});function ze(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:Bt[ee]}var De={Backspace:Ce,Enter:Se};function fe(z){for(var ee=0;ee<z.length;ee++){var ae=z.charAt(ee),ie="'"+ae+"'";De[ie]||(De[ie]=me(ae))}}fe(Bt.pairs+"`");function me(z){return function(ee){return ve(ee,z)}}function ke(z){var ee=z.state.closeBrackets;if(!ee||ee.override)return ee;var ae=z.getModeAt(z.getCursor());return ae.closeBrackets||ee}function Ce(z){var ee=ke(z);if(!ee||z.getOption("disableInput"))return ct.Pass;for(var ae=ze(ee,"pairs"),ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return ct.Pass;var ue=we(z,ie[le].head);if(!ue||ae.indexOf(ue)%2!=0)return ct.Pass}for(var le=ie.length-1;le>=0;le--){var ge=ie[le].head;z.replaceRange("",oe(ge.line,ge.ch-1),oe(ge.line,ge.ch+1),"+delete")}}function Se(z){var ee=ke(z),ae=ee&&ze(ee,"explode");if(!ae||z.getOption("disableInput"))return ct.Pass;for(var ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return ct.Pass;var ue=we(z,ie[le].head);if(!ue||ae.indexOf(ue)%2!=0)return ct.Pass}z.operation(function(){var ge=z.lineSeparator()||`
`;z.replaceSelection(ge+ge,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var Pe=0;Pe<ie.length;Pe++){var je=ie[Pe].head.line;z.indentLine(je,null,!0),z.indentLine(je+1,null,!0)}})}function Me(z){var ee=ct.cmpPos(z.anchor,z.head)>0;return{anchor:new oe(z.anchor.line,z.anchor.ch+(ee?-1:1)),head:new oe(z.head.line,z.head.ch+(ee?1:-1))}}function ve(z,ee){var ae=ke(z);if(!ae||z.getOption("disableInput"))return ct.Pass;var ie=ze(ae,"pairs"),le=ie.indexOf(ee);if(le==-1)return ct.Pass;for(var ue=ze(ae,"closeBefore"),ge=ze(ae,"triples"),Pe=ie.charAt(le+1)==ee,je=z.listSelections(),Be=le%2==0,Fe,Ne=0;Ne<je.length;Ne++){var Ae=je[Ne],Ie=Ae.head,We,Ye=z.getRange(Ie,oe(Ie.line,Ie.ch+1));if(Be&&!Ae.empty())We="surround";else if((Pe||!Be)&&Ye==ee)Pe&&de(z,Ie)?We="both":ge.indexOf(ee)>=0&&z.getRange(Ie,oe(Ie.line,Ie.ch+3))==ee+ee+ee?We="skipThree":We="skip";else if(Pe&&Ie.ch>1&&ge.indexOf(ee)>=0&&z.getRange(oe(Ie.line,Ie.ch-2),Ie)==ee+ee){if(Ie.ch>2&&/\bstring/.test(z.getTokenTypeAt(oe(Ie.line,Ie.ch-2))))return ct.Pass;We="addFour"}else if(Pe){var Ue=Ie.ch==0?" ":z.getRange(oe(Ie.line,Ie.ch-1),Ie);if(!ct.isWordChar(Ye)&&Ue!=ee&&!ct.isWordChar(Ue))We="both";else return ct.Pass}else if(Be&&(Ye.length===0||/\s/.test(Ye)||ue.indexOf(Ye)>-1))We="both";else return ct.Pass;if(!Fe)Fe=We;else if(Fe!=We)return ct.Pass}var Ke=le%2?ie.charAt(le-1):ee,ot=le%2?ee:ie.charAt(le+1);z.operation(function(){if(Fe=="skip")z.execCommand("goCharRight");else if(Fe=="skipThree")for(var st=0;st<3;st++)z.execCommand("goCharRight");else if(Fe=="surround"){for(var dt=z.getSelections(),st=0;st<dt.length;st++)dt[st]=Ke+dt[st]+ot;z.replaceSelections(dt,"around"),dt=z.listSelections().slice();for(var st=0;st<dt.length;st++)dt[st]=Me(dt[st]);z.setSelections(dt)}else Fe=="both"?(z.replaceSelection(Ke+ot,null),z.triggerElectric(Ke+ot),z.execCommand("goCharLeft")):Fe=="addFour"&&(z.replaceSelection(Ke+Ke+Ke+Ke,"before"),z.execCommand("goCharRight"))})}function we(z,ee){var ae=z.getRange(oe(ee.line,ee.ch-1),oe(ee.line,ee.ch+1));return ae.length==2?ae:null}function de(z,ee){var ae=z.getTokenAt(oe(ee.line,ee.ch+1));return/\bstring/.test(ae.type)&&ae.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},6313:function(gn,cn,at){(function(ct){ct(at(89780),at(32855))})(function(ct){ct.defineOption("autoCloseTags",!1,function(Ce,Se,Me){if(Me!=ct.Init&&Me&&Ce.removeKeyMap("autoCloseTags"),!!Se){var ve={name:"autoCloseTags"};(typeof Se!="object"||Se.whenClosing!==!1)&&(ve["'/'"]=function(we){return fe(we)}),(typeof Se!="object"||Se.whenOpening!==!1)&&(ve["'>'"]=function(we){return ze(we)}),Ce.addKeyMap(ve)}});var Bt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["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 ze(Ce){if(Ce.getOption("disableInput"))return ct.Pass;for(var Se=Ce.listSelections(),Me=[],ve=Ce.getOption("autoCloseTags"),we=0;we<Se.length;we++){if(!Se[we].empty())return ct.Pass;var de=Se[we].head,z=Ce.getTokenAt(de),ee=ct.innerMode(Ce.getMode(),z.state),ae=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ae),le=ie&&ie.name;if(!le)return ct.Pass;var ue=ee.mode.configuration=="html",ge=typeof ve=="object"&&ve.dontCloseTags||ue&&Bt,Pe=typeof ve=="object"&&ve.indentTags||ue&&oe;z.end>de.ch&&(le=le.slice(0,le.length-z.end+de.ch));var je=le.toLowerCase();if(!le||z.type=="string"&&(z.end!=de.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==de.ch-z.start-1||ge&&me(ge,je)>-1||ke(Ce,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(ae)||[],le,de,!0))return ct.Pass;var Be=typeof ve=="object"&&ve.emptyTags;if(Be&&me(Be,le)>-1){Me[we]={text:"/>",newPos:ct.Pos(de.line,de.ch+2)};continue}var Fe=Pe&&me(Pe,je)>-1;Me[we]={indent:Fe,text:">"+(Fe?`
`:"")+"</"+le+">",newPos:Fe?ct.Pos(de.line+1,0):ct.Pos(de.line,de.ch+1)}}for(var Ne=typeof ve=="object"&&ve.dontIndentOnAutoClose,we=Se.length-1;we>=0;we--){var Ae=Me[we];Ce.replaceRange(Ae.text,Se[we].head,Se[we].anchor,"+insert");var Ie=Ce.listSelections().slice(0);Ie[we]={head:Ae.newPos,anchor:Ae.newPos},Ce.setSelections(Ie),!Ne&&Ae.indent&&(Ce.indentLine(Ae.newPos.line,null,!0),Ce.indentLine(Ae.newPos.line+1,null,!0))}}function De(Ce,Se){for(var Me=Ce.listSelections(),ve=[],we=Se?"/":"</",de=Ce.getOption("autoCloseTags"),z=typeof de=="object"&&de.dontIndentOnSlash,ee=0;ee<Me.length;ee++){if(!Me[ee].empty())return ct.Pass;var ae=Me[ee].head,ie=Ce.getTokenAt(ae),le=ct.innerMode(Ce.getMode(),ie.state),ue=le.state;if(Se&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=ae.ch-1))return ct.Pass;var ge,Pe=le.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(Pe&&le.mode.name=="javascript")ge=we+"script";else if(Pe&&le.mode.name=="css")ge=we+"style";else{var je=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ue);if(!je||je.length&&ke(Ce,je,je[je.length-1],ae))return ct.Pass;ge=we+je[je.length-1]}Ce.getLine(ae.line).charAt(ie.end)!=">"&&(ge+=">"),ve[ee]=ge}if(Ce.replaceSelections(ve),Me=Ce.listSelections(),!z)for(var ee=0;ee<Me.length;ee++)(ee==Me.length-1||Me[ee].head.line<Me[ee+1].head.line)&&Ce.indentLine(Me[ee].head.line)}function fe(Ce){return Ce.getOption("disableInput")?ct.Pass:De(Ce,!0)}ct.commands.closeTag=function(Ce){return De(Ce)};function me(Ce,Se){if(Ce.indexOf)return Ce.indexOf(Se);for(var Me=0,ve=Ce.length;Me<ve;++Me)if(Ce[Me]==Se)return Me;return-1}function ke(Ce,Se,Me,ve,we){if(!ct.scanForClosingTag)return!1;var de=Math.min(Ce.lastLine()+1,ve.line+500),z=ct.scanForClosingTag(Ce,ve,null,de);if(!z||z.tag!=Me)return!1;for(var ee=we?1:0,ae=Se.length-1;ae>=0&&Se[ae]==Me;ae--)++ee;ve=z.to;for(var ae=1;ae<ee;ae++){var ie=ct.scanForClosingTag(Ce,ve,null,de);if(!ie||ie.tag!=Me)return!1;ve=ie.to}return!0}})},32855:function(gn,cn,at){(function(ct){ct(at(89780))})(function(ct){"use strict";var Bt=ct.Pos;function oe(ae,ie){return ae.line-ie.line||ae.ch-ie.ch}var ze="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",De=ze+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",fe=new RegExp("<(/?)(["+ze+"]["+De+"]*)","g");function me(ae,ie,le,ue){this.line=ie,this.ch=le,this.cm=ae,this.text=ae.getLine(ie),this.min=ue?Math.max(ue.from,ae.firstLine()):ae.firstLine(),this.max=ue?Math.min(ue.to-1,ae.lastLine()):ae.lastLine()}function ke(ae,ie){var le=ae.cm.getTokenTypeAt(Bt(ae.line,ie));return le&&/\btag\b/.test(le)}function Ce(ae){if(!(ae.line>=ae.max))return ae.ch=0,ae.text=ae.cm.getLine(++ae.line),!0}function Se(ae){if(!(ae.line<=ae.min))return ae.text=ae.cm.getLine(--ae.line),ae.ch=ae.text.length,!0}function Me(ae){for(;;){var ie=ae.text.indexOf(">",ae.ch);if(ie==-1){if(Ce(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie+1;continue}var le=ae.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(ae.text.slice(le+1,ie));return ae.ch=ie+1,ue?"selfClose":"regular"}}function ve(ae){for(;;){var ie=ae.ch?ae.text.lastIndexOf("<",ae.ch-1):-1;if(ie==-1){if(Se(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie;continue}fe.lastIndex=ie,ae.ch=ie;var le=fe.exec(ae.text);if(le&&le.index==ie)return le}}function we(ae){for(;;){fe.lastIndex=ae.ch;var ie=fe.exec(ae.text);if(!ie){if(Ce(ae))continue;return}if(!ke(ae,ie.index+1)){ae.ch=ie.index+1;continue}return ae.ch=ie.index+ie[0].length,ie}}function de(ae){for(;;){var ie=ae.ch?ae.text.lastIndexOf(">",ae.ch-1):-1;if(ie==-1){if(Se(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie;continue}var le=ae.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(ae.text.slice(le+1,ie));return ae.ch=ie+1,ue?"selfClose":"regular"}}function z(ae,ie){for(var le=[];;){var ue=we(ae),ge,Pe=ae.line,je=ae.ch-(ue?ue[0].length:0);if(!ue||!(ge=Me(ae)))return;if(ge!="selfClose")if(ue[1]){for(var Be=le.length-1;Be>=0;--Be)if(le[Be]==ue[2]){le.length=Be;break}if(Be<0&&(!ie||ie==ue[2]))return{tag:ue[2],from:Bt(Pe,je),to:Bt(ae.line,ae.ch)}}else le.push(ue[2])}}function ee(ae,ie){for(var le=[];;){var ue=de(ae);if(!ue)return;if(ue=="selfClose"){ve(ae);continue}var ge=ae.line,Pe=ae.ch,je=ve(ae);if(!je)return;if(je[1])le.push(je[2]);else{for(var Be=le.length-1;Be>=0;--Be)if(le[Be]==je[2]){le.length=Be;break}if(Be<0&&(!ie||ie==je[2]))return{tag:je[2],from:Bt(ae.line,ae.ch),to:Bt(ge,Pe)}}}}ct.registerHelper("fold","xml",function(ae,ie){for(var le=new me(ae,ie.line,0);;){var ue=we(le);if(!ue||le.line!=ie.line)return;var ge=Me(le);if(!ge)return;if(!ue[1]&&ge!="selfClose"){var Pe=Bt(le.line,le.ch),je=z(le,ue[2]);return je&&oe(je.from,Pe)>0?{from:Pe,to:je.from}:null}}}),ct.findMatchingTag=function(ae,ie,le){var ue=new me(ae,ie.line,ie.ch,le);if(!(ue.text.indexOf(">")==-1&&ue.text.indexOf("<")==-1)){var ge=Me(ue),Pe=ge&&Bt(ue.line,ue.ch),je=ge&&ve(ue);if(!(!ge||!je||oe(ue,ie)>0)){var Be={from:Bt(ue.line,ue.ch),to:Pe,tag:je[2]};return ge=="selfClose"?{open:Be,close:null,at:"open"}:je[1]?{open:ee(ue,je[2]),close:Be,at:"close"}:(ue=new me(ae,Pe.line,Pe.ch,le),{open:Be,close:z(ue,je[2]),at:"open"})}}},ct.findEnclosingTag=function(ae,ie,le,ue){for(var ge=new me(ae,ie.line,ie.ch,le);;){var Pe=ee(ge,ue);if(!Pe)break;var je=new me(ae,ie.line,ie.ch,le),Be=z(je,Pe.tag);if(Be)return{open:Pe,close:Be}}},ct.scanForClosingTag=function(ae,ie,le,ue){var ge=new me(ae,ie.line,ie.ch,ue?{from:0,to:ue}:null);return z(ge,le)}})},89780:function(gn){(function(cn,at){gn.exports=at()})(this,function(){"use strict";var cn=navigator.userAgent,at=navigator.platform,ct=/gecko\/\d/i.test(cn),Bt=/MSIE \d/.test(cn),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(cn),ze=/Edge\/(\d+)/.exec(cn),De=Bt||oe||ze,fe=De&&(Bt?document.documentMode||6:+(ze||oe)[1]),me=!ze&&/WebKit\//.test(cn),ke=me&&/Qt\/\d+\.\d+/.test(cn),Ce=!ze&&/Chrome\//.test(cn),Se=/Opera\//.test(cn),Me=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(cn),we=/PhantomJS/.test(cn),de=!ze&&/AppleWebKit/.test(cn)&&/Mobile\/\w+/.test(cn),z=/Android/.test(cn),ee=de||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(cn),ae=de||/Mac/.test(at),ie=/\bCrOS\b/.test(cn),le=/win/i.test(at),ue=Se&&cn.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(Se=!1,me=!0);var ge=ae&&(ke||Se&&(ue==null||ue<12.11)),Pe=ct||De&&fe>=9;function je(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var Be=function(re,ce){var Ee=re.className,be=je(ce).exec(Ee);if(be){var Oe=Ee.slice(be.index+be[0].length);re.className=Ee.slice(0,be.index)+(Oe?be[1]+Oe:"")}};function Fe(re){for(var ce=re.childNodes.length;ce>0;--ce)re.removeChild(re.firstChild);return re}function Ne(re,ce){return Fe(re).appendChild(ce)}function Ae(re,ce,Ee,be){var Oe=document.createElement(re);if(Ee&&(Oe.className=Ee),be&&(Oe.style.cssText=be),typeof ce=="string")Oe.appendChild(document.createTextNode(ce));else if(ce)for(var qe=0;qe<ce.length;++qe)Oe.appendChild(ce[qe]);return Oe}function Ie(re,ce,Ee,be){var Oe=Ae(re,ce,Ee,be);return Oe.setAttribute("role","presentation"),Oe}var We;document.createRange?We=function(re,ce,Ee,be){var Oe=document.createRange();return Oe.setEnd(be||re,Ee),Oe.setStart(re,ce),Oe}:We=function(re,ce,Ee){var be=document.body.createTextRange();try{be.moveToElementText(re.parentNode)}catch(Oe){return be}return be.collapse(!0),be.moveEnd("character",Ee),be.moveStart("character",ce),be};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 Ue(){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 Ke(re,ce){var Ee=re.className;je(ce).test(Ee)||(re.className+=(Ee?" ":"")+ce)}function ot(re,ce){for(var Ee=re.split(" "),be=0;be<Ee.length;be++)Ee[be]&&!je(Ee[be]).test(ce)&&(ce+=" "+Ee[be]);return ce}var st=function(re){re.select()};de?st=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:De&&(st=function(re){try{re.select()}catch(ce){}});function dt(re){var ce=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,ce)}}function Ct(re,ce,Ee){ce||(ce={});for(var be in re)re.hasOwnProperty(be)&&(Ee!==!1||!ce.hasOwnProperty(be))&&(ce[be]=re[be]);return ce}function $e(re,ce,Ee,be,Oe){ce==null&&(ce=re.search(/[^\s\u00a0]/),ce==-1&&(ce=re.length));for(var qe=be||0,vt=Oe||0;;){var Lt=re.indexOf(" ",qe);if(Lt<0||Lt>=ce)return vt+(ce-qe);vt+=Lt-qe,vt+=Ee-vt%Ee,qe=Lt+1}}var rt=function(){this.id=null,this.f=null,this.time=0,this.handler=dt(this.onTimeout,this)};rt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},rt.prototype.set=function(re,ce){this.f=ce;var Ee=+new Date+re;(!this.id||Ee<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Ee)};function St(re,ce){for(var Ee=0;Ee<re.length;++Ee)if(re[Ee]==ce)return Ee;return-1}var Pt=50,wt={toString:function(){return"CodeMirror.Pass"}},pt={scroll:!1},ft={origin:"*mouse"},ht={origin:"+move"};function Et(re,ce,Ee){for(var be=0,Oe=0;;){var qe=re.indexOf(" ",be);qe==-1&&(qe=re.length);var vt=qe-be;if(qe==re.length||Oe+vt>=ce)return be+Math.min(vt,ce-Oe);if(Oe+=qe-be,Oe+=Ee-Oe%Ee,be=qe+1,Oe>=ce)return be}}var mt=[""];function yt(re){for(;mt.length<=re;)mt.push(At(mt)+" ");return mt[re]}function At(re){return re[re.length-1]}function xt(re,ce){for(var Ee=[],be=0;be<re.length;be++)Ee[be]=ce(re[be],be);return Ee}function tt(re,ce,Ee){for(var be=0,Oe=Ee(ce);be<re.length&&Ee(re[be])<=Oe;)be++;re.splice(be,0,ce)}function Ve(){}function xe(re,ce){var Ee;return Object.create?Ee=Object.create(re):(Ve.prototype=re,Ee=new Ve),ce&&Ct(ce,Ee),Ee}var Le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ze(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Le.test(re))}function nt(re,ce){return ce?ce.source.indexOf("\\w")>-1&&Ze(re)?!0:ce.test(re):Ze(re)}function Re(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 He(re){return re.charCodeAt(0)>=768&&_e.test(re)}function Qe(re,ce,Ee){for(;(Ee<0?ce>0:ce<re.length)&&He(re.charAt(ce));)ce+=Ee;return ce}function ut(re,ce,Ee){for(var be=ce>Ee?-1:1;;){if(ce==Ee)return ce;var Oe=(ce+Ee)/2,qe=be<0?Math.ceil(Oe):Math.floor(Oe);if(qe==ce)return re(qe)?ce:Ee;re(qe)?Ee=qe:ce=qe+be}}function gt(re,ce,Ee,be){if(!re)return be(ce,Ee,"ltr",0);for(var Oe=!1,qe=0;qe<re.length;++qe){var vt=re[qe];(vt.from<Ee&&vt.to>ce||ce==Ee&&vt.to==ce)&&(be(Math.max(vt.from,ce),Math.min(vt.to,Ee),vt.level==1?"rtl":"ltr",qe),Oe=!0)}Oe||be(ce,Ee,"ltr")}var Mt=null;function Nt(re,ce,Ee){var be;Mt=null;for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe];if(qe.from<ce&&qe.to>ce)return Oe;qe.to==ce&&(qe.from!=qe.to&&Ee=="before"?be=Oe:Mt=Oe),qe.from==ce&&(qe.from!=qe.to&&Ee!="before"?be=Oe:Mt=Oe)}return be!=null?be:Mt}var Dt=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Ee(Rt){return Rt<=247?re.charAt(Rt):1424<=Rt&&Rt<=1524?"R":1536<=Rt&&Rt<=1785?ce.charAt(Rt-1536):1774<=Rt&&Rt<=2220?"r":8192<=Rt&&Rt<=8203?"w":Rt==8204?"b":"L"}var be=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Oe=/[stwN]/,qe=/[LRr]/,vt=/[Lb1n]/,Lt=/[1n]/;function kt(Rt,rn,zt){this.level=Rt,this.from=rn,this.to=zt}return function(Rt,rn){var zt=rn=="ltr"?"L":"R";if(Rt.length==0||rn=="ltr"&&!be.test(Rt))return!1;for(var xn=Rt.length,fn=[],rr=0;rr<xn;++rr)fn.push(Ee(Rt.charCodeAt(rr)));for(var lr=0,vr=zt;lr<xn;++lr){var Nr=fn[lr];Nr=="m"?fn[lr]=vr:vr=Nr}for(var Jr=0,Gr=zt;Jr<xn;++Jr){var si=fn[Jr];si=="1"&&Gr=="r"?fn[Jr]="n":qe.test(si)&&(Gr=si,si=="r"&&(fn[Jr]="R"))}for(var ji=1,_r=fn[0];ji<xn-1;++ji){var eo=fn[ji];eo=="+"&&_r=="1"&&fn[ji+1]=="1"?fn[ji]="1":eo==","&&_r==fn[ji+1]&&(_r=="1"||_r=="n")&&(fn[ji]=_r),_r=eo}for(var Yo=0;Yo<xn;++Yo){var Ia=fn[Yo];if(Ia==",")fn[Yo]="N";else if(Ia=="%"){var ia=void 0;for(ia=Yo+1;ia<xn&&fn[ia]=="%";++ia);for(var Rs=Yo&&fn[Yo-1]=="!"||ia<xn&&fn[ia]=="1"?"1":"N",ms=Yo;ms<ia;++ms)fn[ms]=Rs;Yo=ia-1}}for(var Ma=0,Xs=zt;Ma<xn;++Ma){var as=fn[Ma];Xs=="L"&&as=="1"?fn[Ma]="L":qe.test(as)&&(Xs=as)}for(var La=0;La<xn;++La)if(Oe.test(fn[La])){var mo=void 0;for(mo=La+1;mo<xn&&Oe.test(fn[mo]);++mo);for(var ua=(La?fn[La-1]:zt)=="L",Xa=(mo<xn?fn[mo]:zt)=="L",ss=ua==Xa?ua?"L":"R":zt,Bl=La;Bl<mo;++Bl)fn[Bl]=ss;La=mo-1}for(var oa=[],bl,pa=0;pa<xn;)if(vt.test(fn[pa])){var Af=pa;for(++pa;pa<xn&&vt.test(fn[pa]);++pa);oa.push(new kt(0,Af,pa))}else{var cl=pa,Ys=oa.length,_s=rn=="rtl"?1:0;for(++pa;pa<xn&&fn[pa]!="L";++pa);for(var Bo=cl;Bo<pa;)if(Lt.test(fn[Bo])){cl<Bo&&(oa.splice(Ys,0,new kt(1,cl,Bo)),Ys+=_s);var Ya=Bo;for(++Bo;Bo<pa&&Lt.test(fn[Bo]);++Bo);oa.splice(Ys,0,new kt(2,Ya,Bo)),Ys+=_s,cl=Bo}else++Bo;cl<pa&&oa.splice(Ys,0,new kt(1,cl,pa))}return rn=="ltr"&&(oa[0].level==1&&(bl=Rt.match(/^\s+/))&&(oa[0].from=bl[0].length,oa.unshift(new kt(0,0,bl[0].length))),At(oa).level==1&&(bl=Rt.match(/\s+$/))&&(At(oa).to-=bl[0].length,oa.push(new kt(0,xn-bl[0].length,xn)))),rn=="rtl"?oa.reverse():oa}}();function Ht(re,ce){var Ee=re.order;return Ee==null&&(Ee=re.order=Dt(re.text,ce)),Ee}var Xt=[],$t=function(re,ce,Ee){if(re.addEventListener)re.addEventListener(ce,Ee,!1);else if(re.attachEvent)re.attachEvent("on"+ce,Ee);else{var be=re._handlers||(re._handlers={});be[ce]=(be[ce]||Xt).concat(Ee)}};function Ut(re,ce){return re._handlers&&re._handlers[ce]||Xt}function sn(re,ce,Ee){if(re.removeEventListener)re.removeEventListener(ce,Ee,!1);else if(re.detachEvent)re.detachEvent("on"+ce,Ee);else{var be=re._handlers,Oe=be&&be[ce];if(Oe){var qe=St(Oe,Ee);qe>-1&&(be[ce]=Oe.slice(0,qe).concat(Oe.slice(qe+1)))}}}function nn(re,ce){var Ee=Ut(re,ce);if(Ee.length)for(var be=Array.prototype.slice.call(arguments,2),Oe=0;Oe<Ee.length;++Oe)Ee[Oe].apply(null,be)}function Wt(re,ce,Ee){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),nn(re,Ee||ce.type,re,ce),cr(ce)||ce.codemirrorIgnore}function bn(re){var ce=re._handlers&&re._handlers.cursorActivity;if(ce)for(var Ee=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),be=0;be<ce.length;++be)St(Ee,ce[be])==-1&&Ee.push(ce[be])}function mn(re,ce){return Ut(re,ce).length>0}function jn(re){re.prototype.on=function(ce,Ee){$t(this,ce,Ee)},re.prototype.off=function(ce,Ee){sn(this,ce,Ee)}}function Jn(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Cr(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function cr(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function kr(re){Jn(re),Cr(re)}function Kr(re){return re.target||re.srcElement}function Ur(re){var ce=re.which;return ce==null&&(re.button&1?ce=1:re.button&2?ce=3:re.button&4&&(ce=2)),ae&&re.ctrlKey&&ce==1&&(ce=3),ce}var oi=function(){if(De&&fe<9)return!1;var re=Ae("div");return"draggable"in re||"dragDrop"in re}(),vi;function Bi(re){if(vi==null){var ce=Ae("span","\u200B");Ne(re,Ae("span",[ce,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(vi=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(De&&fe<8))}var Ee=vi?Ae("span","\u200B"):Ae("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Ee.setAttribute("cm-text",""),Ee}var Di;function Ii(re){if(Di!=null)return Di;var ce=Ne(re,document.createTextNode("A\u062EA")),Ee=We(ce,0,1).getBoundingClientRect(),be=We(ce,1,2).getBoundingClientRect();return Fe(re),!Ee||Ee.left==Ee.right?!1:Di=be.right-Ee.right<3}var Xi=`
b`.split(/\n/).length!=3?function(re){for(var ce=0,Ee=[],be=re.length;ce<=be;){var Oe=re.indexOf(`
`,ce);Oe==-1&&(Oe=re.length);var qe=re.slice(ce,re.charAt(Oe-1)=="\r"?Oe-1:Oe),vt=qe.indexOf("\r");vt!=-1?(Ee.push(qe.slice(0,vt)),ce+=vt+1):(Ee.push(qe),ce=Oe+1)}return Ee}:function(re){return re.split(/\r\n?|\n/)},et=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(Ee){}return!ce||ce.parentElement()!=re?!1:ce.compareEndPoints("StartToEnd",ce)!=0},fr=function(){var re=Ae("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),mr=null;function Ai(re){if(mr!=null)return mr;var ce=Ne(re,Ae("span","x")),Ee=ce.getBoundingClientRect(),be=We(ce,0,1).getBoundingClientRect();return mr=Math.abs(Ee.left-be.left)>1}var ar={},Sr={};function Ar(re,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),ar[re]=ce}function lo(re,ce){Sr[re]=ce}function on(re){if(typeof re=="string"&&Sr.hasOwnProperty(re))re=Sr[re];else if(re&&typeof re.name=="string"&&Sr.hasOwnProperty(re.name)){var ce=Sr[re.name];typeof ce=="string"&&(ce={name:ce}),re=xe(ce,re),re.name=ce.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return on("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return on("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function an(re,ce){ce=on(ce);var Ee=ar[ce.name];if(!Ee)return an(re,"text/plain");var be=Ee(re,ce);if(tn.hasOwnProperty(ce.name)){var Oe=tn[ce.name];for(var qe in Oe)Oe.hasOwnProperty(qe)&&(be.hasOwnProperty(qe)&&(be["_"+qe]=be[qe]),be[qe]=Oe[qe])}if(be.name=ce.name,ce.helperType&&(be.helperType=ce.helperType),ce.modeProps)for(var vt in ce.modeProps)be[vt]=ce.modeProps[vt];return be}var tn={};function vn(re,ce){var Ee=tn.hasOwnProperty(re)?tn[re]:tn[re]={};Ct(ce,Ee)}function gr(re,ce){if(ce===!0)return ce;if(re.copyState)return re.copyState(ce);var Ee={};for(var be in ce){var Oe=ce[be];Oe instanceof Array&&(Oe=Oe.concat([])),Ee[be]=Oe}return Ee}function pr(re,ce){for(var Ee;re.innerMode&&(Ee=re.innerMode(ce),!(!Ee||Ee.mode==re));)ce=Ee.state,re=Ee.mode;return Ee||{mode:re,state:ce}}function ii(re,ce,Ee){return re.startState?re.startState(ce,Ee):!0}var Mn=function(re,ce,Ee){this.pos=this.start=0,this.string=re,this.tabSize=ce||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Ee};Mn.prototype.eol=function(){return this.pos>=this.string.length},Mn.prototype.sol=function(){return this.pos==this.lineStart},Mn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Mn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Mn.prototype.eat=function(re){var ce=this.string.charAt(this.pos),Ee;if(typeof re=="string"?Ee=ce==re:Ee=ce&&(re.test?re.test(ce):re(ce)),Ee)return++this.pos,ce},Mn.prototype.eatWhile=function(re){for(var ce=this.pos;this.eat(re););return this.pos>ce},Mn.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},Mn.prototype.skipToEnd=function(){this.pos=this.string.length},Mn.prototype.skipTo=function(re){var ce=this.string.indexOf(re,this.pos);if(ce>-1)return this.pos=ce,!0},Mn.prototype.backUp=function(re){this.pos-=re},Mn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=$e(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?$e(this.string,this.lineStart,this.tabSize):0)},Mn.prototype.indentation=function(){return $e(this.string,null,this.tabSize)-(this.lineStart?$e(this.string,this.lineStart,this.tabSize):0)},Mn.prototype.match=function(re,ce,Ee){if(typeof re=="string"){var be=function(vt){return Ee?vt.toLowerCase():vt},Oe=this.string.substr(this.pos,re.length);if(be(Oe)==be(re))return ce!==!1&&(this.pos+=re.length),!0}else{var qe=this.string.slice(this.pos).match(re);return qe&&qe.index>0?null:(qe&&ce!==!1&&(this.pos+=qe[0].length),qe)}},Mn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Mn.prototype.hideFirstChars=function(re,ce){this.lineStart+=re;try{return ce()}finally{this.lineStart-=re}},Mn.prototype.lookAhead=function(re){var ce=this.lineOracle;return ce&&ce.lookAhead(re)},Mn.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function sr(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 Ee=re;!Ee.lines;)for(var be=0;;++be){var Oe=Ee.children[be],qe=Oe.chunkSize();if(ce<qe){Ee=Oe;break}ce-=qe}return Ee.lines[ce]}function Wr(re,ce,Ee){var be=[],Oe=ce.line;return re.iter(ce.line,Ee.line+1,function(qe){var vt=qe.text;Oe==Ee.line&&(vt=vt.slice(0,Ee.ch)),Oe==ce.line&&(vt=vt.slice(ce.ch)),be.push(vt),++Oe}),be}function Li(re,ce,Ee){var be=[];return re.iter(ce,Ee,function(Oe){be.push(Oe.text)}),be}function tr(re,ce){var Ee=ce-re.height;if(Ee)for(var be=re;be;be=be.parent)be.height+=Ee}function Ot(re){if(re.parent==null)return null;for(var ce=re.parent,Ee=St(ce.lines,re),be=ce.parent;be;ce=be,be=be.parent)for(var Oe=0;be.children[Oe]!=ce;++Oe)Ee+=be.children[Oe].chunkSize();return Ee+ce.first}function Kt(re,ce){var Ee=re.first;e:do{for(var be=0;be<re.children.length;++be){var Oe=re.children[be],qe=Oe.height;if(ce<qe){re=Oe;continue e}ce-=qe,Ee+=Oe.chunkSize()}return Ee}while(!re.lines);for(var vt=0;vt<re.lines.length;++vt){var Lt=re.lines[vt],kt=Lt.height;if(ce<kt)break;ce-=kt}return Ee+vt}function Dn(re,ce){return ce>=re.first&&ce<re.first+re.size}function Ln(re,ce){return String(re.lineNumberFormatter(ce+re.firstLineNumber))}function en(re,ce,Ee){if(Ee===void 0&&(Ee=null),!(this instanceof en))return new en(re,ce,Ee);this.line=re,this.ch=ce,this.sticky=Ee}function Un(re,ce){return re.line-ce.line||re.ch-ce.ch}function Bn(re,ce){return re.sticky==ce.sticky&&Un(re,ce)==0}function An(re){return en(re.line,re.ch)}function nr(re,ce){return Un(re,ce)<0?ce:re}function _n(re,ce){return Un(re,ce)<0?re:ce}function Xn(re,ce){return Math.max(re.first,Math.min(ce,re.first+re.size-1))}function ur(re,ce){if(ce.line<re.first)return en(re.first,0);var Ee=re.first+re.size-1;return ce.line>Ee?en(Ee,sr(re,Ee).text.length):zr(ce,sr(re,ce.line).text.length)}function zr(re,ce){var Ee=re.ch;return Ee==null||Ee>ce?en(re.line,ce):Ee<0?en(re.line,0):re}function dr(re,ce){for(var Ee=[],be=0;be<ce.length;be++)Ee[be]=ur(re,ce[be]);return Ee}var dn=function(re,ce){this.state=re,this.lookAhead=ce},$n=function(re,ce,Ee,be){this.state=ce,this.doc=re,this.line=Ee,this.maxLookAhead=be||0,this.baseTokens=null,this.baseTokenPos=1};$n.prototype.lookAhead=function(re){var ce=this.doc.getLine(this.line+re);return ce!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),ce},$n.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}},$n.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},$n.fromSaved=function(re,ce,Ee){return ce instanceof dn?new $n(re,gr(re.mode,ce.state),Ee,ce.lookAhead):new $n(re,gr(re.mode,ce),Ee)},$n.prototype.save=function(re){var ce=re!==!1?gr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new dn(ce,this.maxLookAhead):ce};function Ir(re,ce,Ee,be){var Oe=[re.state.modeGen],qe={};Zr(re,ce.text,re.doc.mode,Ee,function(Rt,rn){return Oe.push(Rt,rn)},qe,be);for(var vt=Ee.state,Lt=function(Rt){Ee.baseTokens=Oe;var rn=re.state.overlays[Rt],zt=1,xn=0;Ee.state=!0,Zr(re,ce.text,rn.mode,Ee,function(fn,rr){for(var lr=zt;xn<fn;){var vr=Oe[zt];vr>fn&&Oe.splice(zt,1,fn,Oe[zt+1],vr),zt+=2,xn=Math.min(fn,vr)}if(rr)if(rn.opaque)Oe.splice(lr,zt-lr,fn,"overlay "+rr),zt=lr+2;else for(;lr<zt;lr+=2){var Nr=Oe[lr+1];Oe[lr+1]=(Nr?Nr+" ":"")+"overlay "+rr}},qe),Ee.state=vt,Ee.baseTokens=null,Ee.baseTokenPos=1},kt=0;kt<re.state.overlays.length;++kt)Lt(kt);return{styles:Oe,classes:qe.bgClass||qe.textClass?qe:null}}function qr(re,ce,Ee){if(!ce.styles||ce.styles[0]!=re.state.modeGen){var be=ki(re,Ot(ce)),Oe=ce.text.length>re.options.maxHighlightLength&&gr(re.doc.mode,be.state),qe=Ir(re,ce,be);Oe&&(be.state=Oe),ce.stateAfter=be.save(!Oe),ce.styles=qe.styles,qe.classes?ce.styleClasses=qe.classes:ce.styleClasses&&(ce.styleClasses=null),Ee===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return ce.styles}function ki(re,ce,Ee){var be=re.doc,Oe=re.display;if(!be.mode.startState)return new $n(be,!0,ce);var qe=Qr(re,ce,Ee),vt=qe>be.first&&sr(be,qe-1).stateAfter,Lt=vt?$n.fromSaved(be,vt,qe):new $n(be,ii(be.mode),qe);return be.iter(qe,ce,function(kt){Qt(re,kt.text,Lt);var Rt=Lt.line;kt.stateAfter=Rt==ce-1||Rt%5==0||Rt>=Oe.viewFrom&&Rt<Oe.viewTo?Lt.save():null,Lt.nextLine()}),Ee&&(be.modeFrontier=Lt.line),Lt}function Qt(re,ce,Ee,be){var Oe=re.doc.mode,qe=new Mn(ce,re.options.tabSize,Ee);for(qe.start=qe.pos=be||0,ce==""&&or(Oe,Ee.state);!qe.eol();)yr(Oe,qe,Ee.state),qe.start=qe.pos}function or(re,ce){if(re.blankLine)return re.blankLine(ce);if(re.innerMode){var Ee=pr(re,ce);if(Ee.mode.blankLine)return Ee.mode.blankLine(Ee.state)}}function yr(re,ce,Ee,be){for(var Oe=0;Oe<10;Oe++){be&&(be[0]=pr(re,Ee).mode);var qe=re.token(ce,Ee);if(ce.pos>ce.start)return qe}throw new Error("Mode "+re.name+" failed to advance stream.")}var Hn=function(re,ce,Ee){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=ce||null,this.state=Ee};function Yr(re,ce,Ee,be){var Oe=re.doc,qe=Oe.mode,vt;ce=ur(Oe,ce);var Lt=sr(Oe,ce.line),kt=ki(re,ce.line,Ee),Rt=new Mn(Lt.text,re.options.tabSize,kt),rn;for(be&&(rn=[]);(be||Rt.pos<ce.ch)&&!Rt.eol();)Rt.start=Rt.pos,vt=yr(qe,Rt,kt.state),be&&rn.push(new Hn(Rt,vt,gr(Oe.mode,kt.state)));return be?rn:new Hn(Rt,vt,kt.state)}function Rr(re,ce){if(re)for(;;){var Ee=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Ee)break;re=re.slice(0,Ee.index)+re.slice(Ee.index+Ee[0].length);var be=Ee[1]?"bgClass":"textClass";ce[be]==null?ce[be]=Ee[2]:new RegExp("(?:^|\\s)"+Ee[2]+"(?:$|\\s)").test(ce[be])||(ce[be]+=" "+Ee[2])}return re}function Zr(re,ce,Ee,be,Oe,qe,vt){var Lt=Ee.flattenSpans;Lt==null&&(Lt=re.options.flattenSpans);var kt=0,Rt=null,rn=new Mn(ce,re.options.tabSize,be),zt,xn=re.options.addModeClass&&[null];for(ce==""&&Rr(or(Ee,be.state),qe);!rn.eol();){if(rn.pos>re.options.maxHighlightLength?(Lt=!1,vt&&Qt(re,ce,be,rn.pos),rn.pos=ce.length,zt=null):zt=Rr(yr(Ee,rn,be.state,xn),qe),xn){var fn=xn[0].name;fn&&(zt="m-"+(zt?fn+" "+zt:fn))}if(!Lt||Rt!=zt){for(;kt<rn.start;)kt=Math.min(rn.start,kt+5e3),Oe(kt,Rt);Rt=zt}rn.start=rn.pos}for(;kt<rn.pos;){var rr=Math.min(rn.pos,kt+5e3);Oe(rr,Rt),kt=rr}}function Qr(re,ce,Ee){for(var be,Oe,qe=re.doc,vt=Ee?-1:ce-(re.doc.mode.innerMode?1e3:100),Lt=ce;Lt>vt;--Lt){if(Lt<=qe.first)return qe.first;var kt=sr(qe,Lt-1),Rt=kt.stateAfter;if(Rt&&(!Ee||Lt+(Rt instanceof dn?Rt.lookAhead:0)<=qe.modeFrontier))return Lt;var rn=$e(kt.text,null,re.options.tabSize);(Oe==null||be>rn)&&(Oe=Lt-1,be=rn)}return Oe}function ui(re,ce){if(re.modeFrontier=Math.min(re.modeFrontier,ce),!(re.highlightFrontier<ce-10)){for(var Ee=re.first,be=ce-1;be>Ee;be--){var Oe=sr(re,be).stateAfter;if(Oe&&(!(Oe instanceof dn)||be+Oe.lookAhead<ce)){Ee=be+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Ee)}}var Pi=!1,pn=!1;function Oi(){Pi=!0}function yn(){pn=!0}function xr(re,ce,Ee){this.marker=re,this.from=ce,this.to=Ee}function hi(re,ce){if(re)for(var Ee=0;Ee<re.length;++Ee){var be=re[Ee];if(be.marker==ce)return be}}function ei(re,ce){for(var Ee,be=0;be<re.length;++be)re[be]!=ce&&(Ee||(Ee=[])).push(re[be]);return Ee}function Wi(re,ce){re.markedSpans=re.markedSpans?re.markedSpans.concat([ce]):[ce],ce.marker.attachLine(re)}function ci(re,ce,Ee){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],vt=qe.marker,Lt=qe.from==null||(vt.inclusiveLeft?qe.from<=ce:qe.from<ce);if(Lt||qe.from==ce&&vt.type=="bookmark"&&(!Ee||!qe.marker.insertLeft)){var kt=qe.to==null||(vt.inclusiveRight?qe.to>=ce:qe.to>ce);(be||(be=[])).push(new xr(vt,qe.from,kt?null:qe.to))}}return be}function Vr(re,ce,Ee){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],vt=qe.marker,Lt=qe.to==null||(vt.inclusiveRight?qe.to>=ce:qe.to>ce);if(Lt||qe.from==ce&&vt.type=="bookmark"&&(!Ee||qe.marker.insertLeft)){var kt=qe.from==null||(vt.inclusiveLeft?qe.from<=ce:qe.from<ce);(be||(be=[])).push(new xr(vt,kt?null:qe.from-ce,qe.to==null?null:qe.to-ce))}}return be}function Hi(re,ce){if(ce.full)return null;var Ee=Dn(re,ce.from.line)&&sr(re,ce.from.line).markedSpans,be=Dn(re,ce.to.line)&&sr(re,ce.to.line).markedSpans;if(!Ee&&!be)return null;var Oe=ce.from.ch,qe=ce.to.ch,vt=Un(ce.from,ce.to)==0,Lt=ci(Ee,Oe,vt),kt=Vr(be,qe,vt),Rt=ce.text.length==1,rn=At(ce.text).length+(Rt?Oe:0);if(Lt)for(var zt=0;zt<Lt.length;++zt){var xn=Lt[zt];if(xn.to==null){var fn=hi(kt,xn.marker);fn?Rt&&(xn.to=fn.to==null?null:fn.to+rn):xn.to=Oe}}if(kt)for(var rr=0;rr<kt.length;++rr){var lr=kt[rr];if(lr.to!=null&&(lr.to+=rn),lr.from==null){var vr=hi(Lt,lr.marker);vr||(lr.from=rn,Rt&&(Lt||(Lt=[])).push(lr))}else lr.from+=rn,Rt&&(Lt||(Lt=[])).push(lr)}Lt&&(Lt=qt(Lt)),kt&&kt!=Lt&&(kt=qt(kt));var Nr=[Lt];if(!Rt){var Jr=ce.text.length-2,Gr;if(Jr>0&&Lt)for(var si=0;si<Lt.length;++si)Lt[si].to==null&&(Gr||(Gr=[])).push(new xr(Lt[si].marker,null,null));for(var ji=0;ji<Jr;++ji)Nr.push(Gr);Nr.push(kt)}return Nr}function qt(re){for(var ce=0;ce<re.length;++ce){var Ee=re[ce];Ee.from!=null&&Ee.from==Ee.to&&Ee.marker.clearWhenEmpty!==!1&&re.splice(ce--,1)}return re.length?re:null}function wn(re,ce,Ee){var be=null;if(re.iter(ce.line,Ee.line+1,function(fn){if(fn.markedSpans)for(var rr=0;rr<fn.markedSpans.length;++rr){var lr=fn.markedSpans[rr].marker;lr.readOnly&&(!be||St(be,lr)==-1)&&(be||(be=[])).push(lr)}}),!be)return null;for(var Oe=[{from:ce,to:Ee}],qe=0;qe<be.length;++qe)for(var vt=be[qe],Lt=vt.find(0),kt=0;kt<Oe.length;++kt){var Rt=Oe[kt];if(!(Un(Rt.to,Lt.from)<0||Un(Rt.from,Lt.to)>0)){var rn=[kt,1],zt=Un(Rt.from,Lt.from),xn=Un(Rt.to,Lt.to);(zt<0||!vt.inclusiveLeft&&!zt)&&rn.push({from:Rt.from,to:Lt.from}),(xn>0||!vt.inclusiveRight&&!xn)&&rn.push({from:Lt.to,to:Rt.to}),Oe.splice.apply(Oe,rn),kt+=rn.length-3}}return Oe}function Yt(re){var ce=re.markedSpans;if(ce){for(var Ee=0;Ee<ce.length;++Ee)ce[Ee].marker.detachLine(re);re.markedSpans=null}}function lt(re,ce){if(ce){for(var Ee=0;Ee<ce.length;++Ee)ce[Ee].marker.attachLine(re);re.markedSpans=ce}}function On(re){return re.inclusiveLeft?-1:0}function Sn(re){return re.inclusiveRight?1:0}function Kn(re,ce){var Ee=re.lines.length-ce.lines.length;if(Ee!=0)return Ee;var be=re.find(),Oe=ce.find(),qe=Un(be.from,Oe.from)||On(re)-On(ce);if(qe)return-qe;var vt=Un(be.to,Oe.to)||Sn(re)-Sn(ce);return vt||ce.id-re.id}function Qn(re,ce){var Ee=pn&&re.markedSpans,be;if(Ee)for(var Oe=void 0,qe=0;qe<Ee.length;++qe)Oe=Ee[qe],Oe.marker.collapsed&&(ce?Oe.from:Oe.to)==null&&(!be||Kn(be,Oe.marker)<0)&&(be=Oe.marker);return be}function Vn(re){return Qn(re,!0)}function un(re){return Qn(re,!1)}function Fn(re,ce){var Ee=pn&&re.markedSpans,be;if(Ee)for(var Oe=0;Oe<Ee.length;++Oe){var qe=Ee[Oe];qe.marker.collapsed&&(qe.from==null||qe.from<ce)&&(qe.to==null||qe.to>ce)&&(!be||Kn(be,qe.marker)<0)&&(be=qe.marker)}return be}function zn(re,ce,Ee,be,Oe){var qe=sr(re,ce),vt=pn&&qe.markedSpans;if(vt)for(var Lt=0;Lt<vt.length;++Lt){var kt=vt[Lt];if(kt.marker.collapsed){var Rt=kt.marker.find(0),rn=Un(Rt.from,Ee)||On(kt.marker)-On(Oe),zt=Un(Rt.to,be)||Sn(kt.marker)-Sn(Oe);if(!(rn>=0&&zt<=0||rn<=0&&zt>=0)&&(rn<=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Un(Rt.to,Ee)>=0:Un(Rt.to,Ee)>0)||rn>=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Un(Rt.from,be)<=0:Un(Rt.from,be)<0)))return!0}}}function Tn(re){for(var ce;ce=Vn(re);)re=ce.find(-1,!0).line;return re}function In(re){for(var ce;ce=un(re);)re=ce.find(1,!0).line;return re}function Nn(re){for(var ce,Ee;ce=un(re);)re=ce.find(1,!0).line,(Ee||(Ee=[])).push(re);return Ee}function Zn(re,ce){var Ee=sr(re,ce),be=Tn(Ee);return Ee==be?ce:Ot(be)}function Wn(re,ce){if(ce>re.lastLine())return ce;var Ee=sr(re,ce),be;if(!ln(re,Ee))return ce;for(;be=un(Ee);)Ee=be.find(1,!0).line;return Ot(Ee)+1}function ln(re,ce){var Ee=pn&&ce.markedSpans;if(Ee){for(var be=void 0,Oe=0;Oe<Ee.length;++Oe)if(be=Ee[Oe],!!be.marker.collapsed){if(be.from==null)return!0;if(!be.marker.widgetNode&&be.from==0&&be.marker.inclusiveLeft&&br(re,ce,be))return!0}}}function br(re,ce,Ee){if(Ee.to==null){var be=Ee.marker.find(1,!0);return br(re,be.line,hi(be.line.markedSpans,Ee.marker))}if(Ee.marker.inclusiveRight&&Ee.to==ce.text.length)return!0;for(var Oe=void 0,qe=0;qe<ce.markedSpans.length;++qe)if(Oe=ce.markedSpans[qe],Oe.marker.collapsed&&!Oe.marker.widgetNode&&Oe.from==Ee.to&&(Oe.to==null||Oe.to!=Ee.from)&&(Oe.marker.inclusiveLeft||Ee.marker.inclusiveRight)&&br(re,ce,Oe))return!0}function Er(re){re=Tn(re);for(var ce=0,Ee=re.parent,be=0;be<Ee.lines.length;++be){var Oe=Ee.lines[be];if(Oe==re)break;ce+=Oe.height}for(var qe=Ee.parent;qe;Ee=qe,qe=Ee.parent)for(var vt=0;vt<qe.children.length;++vt){var Lt=qe.children[vt];if(Lt==Ee)break;ce+=Lt.height}return ce}function ai(re){if(re.height==0)return 0;for(var ce=re.text.length,Ee,be=re;Ee=Vn(be);){var Oe=Ee.find(0,!0);be=Oe.from.line,ce+=Oe.from.ch-Oe.to.ch}for(be=re;Ee=un(be);){var qe=Ee.find(0,!0);ce-=be.text.length-qe.from.ch,be=qe.to.line,ce+=be.text.length-qe.to.ch}return ce}function Tr(re){var ce=re.display,Ee=re.doc;ce.maxLine=sr(Ee,Ee.first),ce.maxLineLength=ai(ce.maxLine),ce.maxLineChanged=!0,Ee.iter(function(be){var Oe=ai(be);Oe>ce.maxLineLength&&(ce.maxLineLength=Oe,ce.maxLine=be)})}var Si=function(re,ce,Ee){this.text=re,lt(this,ce),this.height=Ee?Ee(this):1};Si.prototype.lineNo=function(){return Ot(this)},jn(Si);function pi(re,ce,Ee,be){re.text=ce,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),Yt(re),lt(re,Ee);var Oe=be?be(re):1;Oe!=re.height&&tr(re,Oe)}function bi(re){re.parent=null,Yt(re)}var yi={},Ri={};function Ki(re,ce){if(!re||/^\s*$/.test(re))return null;var Ee=ce.addModeClass?Ri:yi;return Ee[re]||(Ee[re]=re.replace(/\S+/g,"cm-$&"))}function Jt(re,ce){var Ee=Ie("span",null,null,me?"padding-right: .1px":null),be={pre:Ie("pre",[Ee],"CodeMirror-line"),content:Ee,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};ce.measure={};for(var Oe=0;Oe<=(ce.rest?ce.rest.length:0);Oe++){var qe=Oe?ce.rest[Oe-1]:ce.line,vt=void 0;be.pos=0,be.addToken=ti,Ii(re.display.measure)&&(vt=Ht(qe,re.doc.direction))&&(be.addToken=Dr(be.addToken,vt)),be.map=[];var Lt=ce!=re.display.externalMeasured&&Ot(qe);_i(qe,be,qr(re,qe,Lt)),qe.styleClasses&&(qe.styleClasses.bgClass&&(be.bgClass=ot(qe.styleClasses.bgClass,be.bgClass||"")),qe.styleClasses.textClass&&(be.textClass=ot(qe.styleClasses.textClass,be.textClass||""))),be.map.length==0&&be.map.push(0,0,be.content.appendChild(Bi(re.display.measure))),Oe==0?(ce.measure.map=be.map,ce.measure.cache={}):((ce.measure.maps||(ce.measure.maps=[])).push(be.map),(ce.measure.caches||(ce.measure.caches=[])).push({}))}if(me){var kt=be.content.lastChild;(/\bcm-tab\b/.test(kt.className)||kt.querySelector&&kt.querySelector(".cm-tab"))&&(be.content.className="cm-tab-wrap-hack")}return nn(re,"renderLine",re,ce.line,be.pre),be.pre.className&&(be.textClass=ot(be.pre.className,be.textClass||"")),be}function xi(re){var ce=Ae("span","\u2022","cm-invalidchar");return ce.title="\\u"+re.charCodeAt(0).toString(16),ce.setAttribute("aria-label",ce.title),ce}function ti(re,ce,Ee,be,Oe,qe,vt){if(ce){var Lt=re.splitSpaces?Hr(ce,re.trailingSpace):ce,kt=re.cm.state.specialChars,Rt=!1,rn;if(!kt.test(ce))re.col+=ce.length,rn=document.createTextNode(Lt),re.map.push(re.pos,re.pos+ce.length,rn),De&&fe<9&&(Rt=!0),re.pos+=ce.length;else{rn=document.createDocumentFragment();for(var zt=0;;){kt.lastIndex=zt;var xn=kt.exec(ce),fn=xn?xn.index-zt:ce.length-zt;if(fn){var rr=document.createTextNode(Lt.slice(zt,zt+fn));De&&fe<9?rn.appendChild(Ae("span",[rr])):rn.appendChild(rr),re.map.push(re.pos,re.pos+fn,rr),re.col+=fn,re.pos+=fn}if(!xn)break;zt+=fn+1;var lr=void 0;if(xn[0]==" "){var vr=re.cm.options.tabSize,Nr=vr-re.col%vr;lr=rn.appendChild(Ae("span",yt(Nr),"cm-tab")),lr.setAttribute("role","presentation"),lr.setAttribute("cm-text"," "),re.col+=Nr}else xn[0]=="\r"||xn[0]==`
`?(lr=rn.appendChild(Ae("span",xn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),lr.setAttribute("cm-text",xn[0]),re.col+=1):(lr=re.cm.options.specialCharPlaceholder(xn[0]),lr.setAttribute("cm-text",xn[0]),De&&fe<9?rn.appendChild(Ae("span",[lr])):rn.appendChild(lr),re.col+=1);re.map.push(re.pos,re.pos+1,lr),re.pos++}}if(re.trailingSpace=Lt.charCodeAt(ce.length-1)==32,Ee||be||Oe||Rt||qe||vt){var Jr=Ee||"";be&&(Jr+=be),Oe&&(Jr+=Oe);var Gr=Ae("span",[rn],Jr,qe);if(vt)for(var si in vt)vt.hasOwnProperty(si)&&si!="style"&&si!="class"&&Gr.setAttribute(si,vt[si]);return re.content.appendChild(Gr)}re.content.appendChild(rn)}}function Hr(re,ce){if(re.length>1&&!/ /.test(re))return re;for(var Ee=ce,be="",Oe=0;Oe<re.length;Oe++){var qe=re.charAt(Oe);qe==" "&&Ee&&(Oe==re.length-1||re.charCodeAt(Oe+1)==32)&&(qe="\xA0"),be+=qe,Ee=qe==" "}return be}function Dr(re,ce){return function(Ee,be,Oe,qe,vt,Lt,kt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var Rt=Ee.pos,rn=Rt+be.length;;){for(var zt=void 0,xn=0;xn<ce.length&&(zt=ce[xn],!(zt.to>Rt&&zt.from<=Rt));xn++);if(zt.to>=rn)return re(Ee,be,Oe,qe,vt,Lt,kt);re(Ee,be.slice(0,zt.to-Rt),Oe,qe,null,Lt,kt),qe=null,be=be.slice(zt.to-Rt),Rt=zt.to}}}function wi(re,ce,Ee,be){var Oe=!be&&Ee.widgetNode;Oe&&re.map.push(re.pos,re.pos+ce,Oe),!be&&re.cm.display.input.needsContentAttribute&&(Oe||(Oe=re.content.appendChild(document.createElement("span"))),Oe.setAttribute("cm-marker",Ee.id)),Oe&&(re.cm.display.input.setUneditable(Oe),re.content.appendChild(Oe)),re.pos+=ce,re.trailingSpace=!1}function _i(re,ce,Ee){var be=re.markedSpans,Oe=re.text,qe=0;if(!be){for(var vt=1;vt<Ee.length;vt+=2)ce.addToken(ce,Oe.slice(qe,qe=Ee[vt]),Ki(Ee[vt+1],ce.cm.options));return}for(var Lt=Oe.length,kt=0,Rt=1,rn="",zt,xn,fn=0,rr,lr,vr,Nr,Jr;;){if(fn==kt){rr=lr=vr=xn="",Jr=null,Nr=null,fn=1/0;for(var Gr=[],si=void 0,ji=0;ji<be.length;++ji){var _r=be[ji],eo=_r.marker;if(eo.type=="bookmark"&&_r.from==kt&&eo.widgetNode)Gr.push(eo);else if(_r.from<=kt&&(_r.to==null||_r.to>kt||eo.collapsed&&_r.to==kt&&_r.from==kt)){if(_r.to!=null&&_r.to!=kt&&fn>_r.to&&(fn=_r.to,lr=""),eo.className&&(rr+=" "+eo.className),eo.css&&(xn=(xn?xn+";":"")+eo.css),eo.startStyle&&_r.from==kt&&(vr+=" "+eo.startStyle),eo.endStyle&&_r.to==fn&&(si||(si=[])).push(eo.endStyle,_r.to),eo.title&&((Jr||(Jr={})).title=eo.title),eo.attributes)for(var Yo in eo.attributes)(Jr||(Jr={}))[Yo]=eo.attributes[Yo];eo.collapsed&&(!Nr||Kn(Nr.marker,eo)<0)&&(Nr=_r)}else _r.from>kt&&fn>_r.from&&(fn=_r.from)}if(si)for(var Ia=0;Ia<si.length;Ia+=2)si[Ia+1]==fn&&(lr+=" "+si[Ia]);if(!Nr||Nr.from==kt)for(var ia=0;ia<Gr.length;++ia)wi(ce,0,Gr[ia]);if(Nr&&(Nr.from||0)==kt){if(wi(ce,(Nr.to==null?Lt+1:Nr.to)-kt,Nr.marker,Nr.from==null),Nr.to==null)return;Nr.to==kt&&(Nr=!1)}}if(kt>=Lt)break;for(var Rs=Math.min(Lt,fn);;){if(rn){var ms=kt+rn.length;if(!Nr){var Ma=ms>Rs?rn.slice(0,Rs-kt):rn;ce.addToken(ce,Ma,zt?zt+rr:rr,vr,kt+Ma.length==fn?lr:"",xn,Jr)}if(ms>=Rs){rn=rn.slice(Rs-kt),kt=Rs;break}kt=ms,vr=""}rn=Oe.slice(qe,qe=Ee[Rt++]),zt=Ki(Ee[Rt++],ce.cm.options)}}}function Fi(re,ce,Ee){this.line=ce,this.rest=Nn(ce),this.size=this.rest?Ot(At(this.rest))-Ee+1:1,this.node=this.text=null,this.hidden=ln(re,ce)}function ni(re,ce,Ee){for(var be=[],Oe,qe=ce;qe<Ee;qe=Oe){var vt=new Fi(re.doc,sr(re.doc,qe),qe);Oe=qe+vt.size,be.push(vt)}return be}var $i=null;function _o(re){$i?$i.ops.push(re):re.ownsGroup=$i={ops:[re],delayedCallbacks:[]}}function fa(re){var ce=re.delayedCallbacks,Ee=0;do{for(;Ee<ce.length;Ee++)ce[Ee].call(null);for(var be=0;be<re.ops.length;be++){var Oe=re.ops[be];if(Oe.cursorActivityHandlers)for(;Oe.cursorActivityCalled<Oe.cursorActivityHandlers.length;)Oe.cursorActivityHandlers[Oe.cursorActivityCalled++].call(null,Oe.cm)}}while(Ee<ce.length)}function Ps(re,ce){var Ee=re.ownsGroup;if(Ee)try{fa(Ee)}finally{$i=null,ce(Ee)}}var wa=null;function Br(re,ce){var Ee=Ut(re,ce);if(Ee.length){var be=Array.prototype.slice.call(arguments,2),Oe;$i?Oe=$i.delayedCallbacks:wa?Oe=wa:(Oe=wa=[],setTimeout(Po,0));for(var qe=function(Lt){Oe.push(function(){return Ee[Lt].apply(null,be)})},vt=0;vt<Ee.length;++vt)qe(vt)}}function Po(){var re=wa;wa=null;for(var ce=0;ce<re.length;++ce)re[ce]()}function bo(re,ce,Ee,be){for(var Oe=0;Oe<ce.changes.length;Oe++){var qe=ce.changes[Oe];qe=="text"?er(re,ce):qe=="gutter"?$r(re,ce,Ee,be):qe=="class"?jr(re,ce):qe=="widget"&&mi(re,ce,be)}ce.changes=null}function ta(re){return re.node==re.text&&(re.node=Ae("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),De&&fe<8&&(re.node.style.zIndex=2)),re.node}function Ao(re,ce){var Ee=ce.bgClass?ce.bgClass+" "+(ce.line.bgClass||""):ce.line.bgClass;if(Ee&&(Ee+=" CodeMirror-linebackground"),ce.background)Ee?ce.background.className=Ee:(ce.background.parentNode.removeChild(ce.background),ce.background=null);else if(Ee){var be=ta(ce);ce.background=be.insertBefore(Ae("div",null,Ee),be.firstChild),re.display.input.setUneditable(ce.background)}}function Ko(re,ce){var Ee=re.display.externalMeasured;return Ee&&Ee.line==ce.line?(re.display.externalMeasured=null,ce.measure=Ee.measure,Ee.built):Jt(re,ce)}function er(re,ce){var Ee=ce.text.className,be=Ko(re,ce);ce.text==ce.node&&(ce.node=be.pre),ce.text.parentNode.replaceChild(be.pre,ce.text),ce.text=be.pre,be.bgClass!=ce.bgClass||be.textClass!=ce.textClass?(ce.bgClass=be.bgClass,ce.textClass=be.textClass,jr(re,ce)):Ee&&(ce.text.className=Ee)}function jr(re,ce){Ao(re,ce),ce.line.wrapClass?ta(ce).className=ce.line.wrapClass:ce.node!=ce.text&&(ce.node.className="");var Ee=ce.textClass?ce.textClass+" "+(ce.line.textClass||""):ce.line.textClass;ce.text.className=Ee||""}function $r(re,ce,Ee,be){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 Oe=ta(ce);ce.gutterBackground=Ae("div",null,"CodeMirror-gutter-background "+ce.line.gutterClass,"left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px; width: "+be.gutterTotalWidth+"px"),re.display.input.setUneditable(ce.gutterBackground),Oe.insertBefore(ce.gutterBackground,ce.text)}var qe=ce.line.gutterMarkers;if(re.options.lineNumbers||qe){var vt=ta(ce),Lt=ce.gutter=Ae("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Lt),vt.insertBefore(Lt,ce.text),ce.line.gutterClass&&(Lt.className+=" "+ce.line.gutterClass),re.options.lineNumbers&&(!qe||!qe["CodeMirror-linenumbers"])&&(ce.lineNumber=Lt.appendChild(Ae("div",Ln(re.options,Ee),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+be.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),qe)for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=re.display.gutterSpecs[kt].className,rn=qe.hasOwnProperty(Rt)&&qe[Rt];rn&&Lt.appendChild(Ae("div",[rn],"CodeMirror-gutter-elt","left: "+be.gutterLeft[Rt]+"px; width: "+be.gutterWidth[Rt]+"px"))}}}function mi(re,ce,Ee){ce.alignable&&(ce.alignable=null);for(var be=je("CodeMirror-linewidget"),Oe=ce.node.firstChild,qe=void 0;Oe;Oe=qe)qe=Oe.nextSibling,be.test(Oe.className)&&ce.node.removeChild(Oe);to(re,ce,Ee)}function Ci(re,ce,Ee,be){var Oe=Ko(re,ce);return ce.text=ce.node=Oe.pre,Oe.bgClass&&(ce.bgClass=Oe.bgClass),Oe.textClass&&(ce.textClass=Oe.textClass),jr(re,ce),$r(re,ce,Ee,be),to(re,ce,be),ce.node}function to(re,ce,Ee){if(Or(re,ce.line,ce,Ee,!0),ce.rest)for(var be=0;be<ce.rest.length;be++)Or(re,ce.rest[be],ce,Ee,!1)}function Or(re,ce,Ee,be,Oe){if(ce.widgets)for(var qe=ta(Ee),vt=0,Lt=ce.widgets;vt<Lt.length;++vt){var kt=Lt[vt],Rt=Ae("div",[kt.node],"CodeMirror-linewidget"+(kt.className?" "+kt.className:""));kt.handleMouseEvents||Rt.setAttribute("cm-ignore-events","true"),Aa(kt,Rt,Ee,be),re.display.input.setUneditable(Rt),Oe&&kt.above?qe.insertBefore(Rt,Ee.gutter||Ee.text):qe.appendChild(Rt),Br(kt,"redraw")}}function Aa(re,ce,Ee,be){if(re.noHScroll){(Ee.alignable||(Ee.alignable=[])).push(ce);var Oe=be.wrapperWidth;ce.style.left=be.fixedPos+"px",re.coverGutter||(Oe-=be.gutterTotalWidth,ce.style.paddingLeft=be.gutterTotalWidth+"px"),ce.style.width=Oe+"px"}re.coverGutter&&(ce.style.zIndex=5,ce.style.position="relative",re.noHScroll||(ce.style.marginLeft=-be.gutterTotalWidth+"px"))}function zo(re){if(re.height!=null)return re.height;var ce=re.doc.cm;if(!ce)return 0;if(!Ye(document.body,re.node)){var Ee="position: relative;";re.coverGutter&&(Ee+="margin-left: -"+ce.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Ee+="width: "+ce.display.wrapper.clientWidth+"px;"),Ne(ce.display.measure,Ae("div",[re.node],null,Ee))}return re.height=re.node.parentNode.offsetHeight}function jo(re,ce){for(var Ee=Kr(ce);Ee!=re.wrapper;Ee=Ee.parentNode)if(!Ee||Ee.nodeType==1&&Ee.getAttribute("cm-ignore-events")=="true"||Ee.parentNode==re.sizer&&Ee!=re.mover)return!0}function Ni(re){return re.lineSpace.offsetTop}function Vo(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function ja(re){if(re.cachedPaddingH)return re.cachedPaddingH;var ce=Ne(re.measure,Ae("pre","x","CodeMirror-line-like")),Ee=window.getComputedStyle?window.getComputedStyle(ce):ce.currentStyle,be={left:parseInt(Ee.paddingLeft),right:parseInt(Ee.paddingRight)};return!isNaN(be.left)&&!isNaN(be.right)&&(re.cachedPaddingH=be),be}function vo(re){return Pt-re.display.nativeBarWidth}function fs(re){return re.display.scroller.clientWidth-vo(re)-re.display.barWidth}function ds(re){return re.display.scroller.clientHeight-vo(re)-re.display.barHeight}function bs(re,ce,Ee){var be=re.options.lineWrapping,Oe=be&&fs(re);if(!ce.measure.heights||be&&ce.measure.width!=Oe){var qe=ce.measure.heights=[];if(be){ce.measure.width=Oe;for(var vt=ce.text.firstChild.getClientRects(),Lt=0;Lt<vt.length-1;Lt++){var kt=vt[Lt],Rt=vt[Lt+1];Math.abs(kt.bottom-Rt.bottom)>2&&qe.push((kt.bottom+Rt.top)/2-Ee.top)}}qe.push(Ee.bottom-Ee.top)}}function na(re,ce,Ee){if(re.line==ce)return{map:re.measure.map,cache:re.measure.cache};for(var be=0;be<re.rest.length;be++)if(re.rest[be]==ce)return{map:re.measure.maps[be],cache:re.measure.caches[be]};for(var Oe=0;Oe<re.rest.length;Oe++)if(Ot(re.rest[Oe])>Ee)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function eh(re,ce){ce=Tn(ce);var Ee=Ot(ce),be=re.display.externalMeasured=new Fi(re.doc,ce,Ee);be.lineN=Ee;var Oe=be.built=Jt(re,be);return be.text=Oe.pre,Ne(re.display.lineMeasure,Oe.pre),be}function ju(re,ce,Ee,be){return Os(re,Sl(re,ce),Ee,be)}function il(re,ce){if(ce>=re.display.viewFrom&&ce<re.display.viewTo)return re.display.view[Ds(re,ce)];var Ee=re.display.externalMeasured;if(Ee&&ce>=Ee.lineN&&ce<Ee.lineN+Ee.size)return Ee}function Sl(re,ce){var Ee=Ot(ce),be=il(re,Ee);be&&!be.text?be=null:be&&be.changes&&(bo(re,be,Ee,ol(re)),re.curOp.forceUpdate=!0),be||(be=eh(re,ce));var Oe=na(be,ce,Ee);return{line:ce,view:be,rect:null,map:Oe.map,cache:Oe.cache,before:Oe.before,hasHeights:!1}}function Os(re,ce,Ee,be,Oe){ce.before&&(Ee=-1);var qe=Ee+(be||""),vt;return ce.cache.hasOwnProperty(qe)?vt=ce.cache[qe]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(bs(re,ce.view,ce.rect),ce.hasHeights=!0),vt=Zo(re,ce,Ee,be),vt.bogus||(ce.cache[qe]=vt)),{left:vt.left,right:vt.right,top:Oe?vt.rtop:vt.top,bottom:Oe?vt.rbottom:vt.bottom}}var Vl={left:0,right:0,top:0,bottom:0};function th(re,ce,Ee){for(var be,Oe,qe,vt,Lt,kt,Rt=0;Rt<re.length;Rt+=3)if(Lt=re[Rt],kt=re[Rt+1],ce<Lt?(Oe=0,qe=1,vt="left"):ce<kt?(Oe=ce-Lt,qe=Oe+1):(Rt==re.length-3||ce==kt&&re[Rt+3]>ce)&&(qe=kt-Lt,Oe=qe-1,ce>=kt&&(vt="right")),Oe!=null){if(be=re[Rt+2],Lt==kt&&Ee==(be.insertLeft?"left":"right")&&(vt=Ee),Ee=="left"&&Oe==0)for(;Rt&&re[Rt-2]==re[Rt-3]&&re[Rt-1].insertLeft;)be=re[(Rt-=3)+2],vt="left";if(Ee=="right"&&Oe==kt-Lt)for(;Rt<re.length-3&&re[Rt+3]==re[Rt+4]&&!re[Rt+5].insertLeft;)be=re[(Rt+=3)+2],vt="right";break}return{node:be,start:Oe,end:qe,collapse:vt,coverStart:Lt,coverEnd:kt}}function nh(re,ce){var Ee=Vl;if(ce=="left")for(var be=0;be<re.length&&(Ee=re[be]).left==Ee.right;be++);else for(var Oe=re.length-1;Oe>=0&&(Ee=re[Oe]).left==Ee.right;Oe--);return Ee}function Zo(re,ce,Ee,be){var Oe=th(ce.map,Ee,be),qe=Oe.node,vt=Oe.start,Lt=Oe.end,kt=Oe.collapse,Rt;if(qe.nodeType==3){for(var rn=0;rn<4;rn++){for(;vt&&He(ce.line.text.charAt(Oe.coverStart+vt));)--vt;for(;Oe.coverStart+Lt<Oe.coverEnd&&He(ce.line.text.charAt(Oe.coverStart+Lt));)++Lt;if(De&&fe<9&&vt==0&&Lt==Oe.coverEnd-Oe.coverStart?Rt=qe.parentNode.getBoundingClientRect():Rt=nh(We(qe,vt,Lt).getClientRects(),be),Rt.left||Rt.right||vt==0)break;Lt=vt,vt=vt-1,kt="right"}De&&fe<11&&(Rt=Ou(re.display.measure,Rt))}else{vt>0&&(kt=be="right");var zt;re.options.lineWrapping&&(zt=qe.getClientRects()).length>1?Rt=zt[be=="right"?zt.length-1:0]:Rt=qe.getBoundingClientRect()}if(De&&fe<9&&!vt&&(!Rt||!Rt.left&&!Rt.right)){var xn=qe.parentNode.getClientRects()[0];xn?Rt={left:xn.left,right:xn.left+Fs(re.display),top:xn.top,bottom:xn.bottom}:Rt=Vl}for(var fn=Rt.top-ce.rect.top,rr=Rt.bottom-ce.rect.top,lr=(fn+rr)/2,vr=ce.view.measure.heights,Nr=0;Nr<vr.length-1&&!(lr<vr[Nr]);Nr++);var Jr=Nr?vr[Nr-1]:0,Gr=vr[Nr],si={left:(kt=="right"?Rt.right:Rt.left)-ce.rect.left,right:(kt=="left"?Rt.left:Rt.right)-ce.rect.left,top:Jr,bottom:Gr};return!Rt.left&&!Rt.right&&(si.bogus=!0),re.options.singleCursorHeightPerLine||(si.rtop=fn,si.rbottom=rr),si}function Ou(re,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ai(re))return ce;var Ee=screen.logicalXDPI/screen.deviceXDPI,be=screen.logicalYDPI/screen.deviceYDPI;return{left:ce.left*Ee,right:ce.right*Ee,top:ce.top*be,bottom:ce.bottom*be}}function rh(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 Zl(re){re.display.externalMeasure=null,Fe(re.display.lineMeasure);for(var ce=0;ce<re.display.view.length;ce++)rh(re.display.view[ce])}function uu(re){Zl(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function Ca(){return Ce&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Oa(){return Ce&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function aa(re){var ce=0;if(re.widgets)for(var Ee=0;Ee<re.widgets.length;++Ee)re.widgets[Ee].above&&(ce+=zo(re.widgets[Ee]));return ce}function ga(re,ce,Ee,be,Oe){if(!Oe){var qe=aa(ce);Ee.top+=qe,Ee.bottom+=qe}if(be=="line")return Ee;be||(be="local");var vt=Er(ce);if(be=="local"?vt+=Ni(re.display):vt-=re.display.viewOffset,be=="page"||be=="window"){var Lt=re.display.lineSpace.getBoundingClientRect();vt+=Lt.top+(be=="window"?0:Oa());var kt=Lt.left+(be=="window"?0:Ca());Ee.left+=kt,Ee.right+=kt}return Ee.top+=vt,Ee.bottom+=vt,Ee}function Xl(re,ce,Ee){if(Ee=="div")return ce;var be=ce.left,Oe=ce.top;if(Ee=="page")be-=Ca(),Oe-=Oa();else if(Ee=="local"||!Ee){var qe=re.display.sizer.getBoundingClientRect();be+=qe.left,Oe+=qe.top}var vt=re.display.lineSpace.getBoundingClientRect();return{left:be-vt.left,top:Oe-vt.top}}function Ga(re,ce,Ee,be,Oe){return be||(be=sr(re.doc,ce.line)),ga(re,be,ju(re,be,ce.ch,Oe),Ee)}function co(re,ce,Ee,be,Oe,qe){be=be||sr(re.doc,ce.line),Oe||(Oe=Sl(re,be));function vt(rr,lr){var vr=Os(re,Oe,rr,lr?"right":"left",qe);return lr?vr.left=vr.right:vr.right=vr.left,ga(re,be,vr,Ee)}var Lt=Ht(be,re.doc.direction),kt=ce.ch,Rt=ce.sticky;if(kt>=be.text.length?(kt=be.text.length,Rt="before"):kt<=0&&(kt=0,Rt="after"),!Lt)return vt(Rt=="before"?kt-1:kt,Rt=="before");function rn(rr,lr,vr){var Nr=Lt[lr],Jr=Nr.level==1;return vt(vr?rr-1:rr,Jr!=vr)}var zt=Nt(Lt,kt,Rt),xn=Mt,fn=rn(kt,zt,Rt=="before");return xn!=null&&(fn.other=rn(kt,xn,Rt!="before")),fn}function io(re,ce){var Ee=0;ce=ur(re.doc,ce),re.options.lineWrapping||(Ee=Fs(re.display)*ce.ch);var be=sr(re.doc,ce.line),Oe=Er(be)+Ni(re.display);return{left:Ee,right:Ee,top:Oe,bottom:Oe+be.height}}function Ji(re,ce,Ee,be,Oe){var qe=en(re,ce,Ee);return qe.xRel=Oe,be&&(qe.outside=be),qe}function sa(re,ce,Ee){var be=re.doc;if(Ee+=re.display.viewOffset,Ee<0)return Ji(be.first,0,null,-1,-1);var Oe=Kt(be,Ee),qe=be.first+be.size-1;if(Oe>qe)return Ji(be.first+be.size-1,sr(be,qe).text.length,null,1,1);ce<0&&(ce=0);for(var vt=sr(be,Oe);;){var Lt=Cn(re,vt,Oe,ce,Ee),kt=Fn(vt,Lt.ch+(Lt.xRel>0||Lt.outside>0?1:0));if(!kt)return Lt;var Rt=kt.find(1);if(Rt.line==Oe)return Rt;vt=sr(be,Oe=Rt.line)}}function wr(re,ce,Ee,be){be-=aa(ce);var Oe=ce.text.length,qe=ut(function(vt){return Os(re,Ee,vt-1).bottom<=be},Oe,0);return Oe=ut(function(vt){return Os(re,Ee,vt).top>be},qe,Oe),{begin:qe,end:Oe}}function da(re,ce,Ee,be){Ee||(Ee=Sl(re,ce));var Oe=ga(re,ce,Os(re,Ee,be),"line").top;return wr(re,ce,Ee,Oe)}function Gt(re,ce,Ee,be){return re.bottom<=Ee?!1:re.top>Ee?!0:(be?re.left:re.right)>ce}function Cn(re,ce,Ee,be,Oe){Oe-=Er(ce);var qe=Sl(re,ce),vt=aa(ce),Lt=0,kt=ce.text.length,Rt=!0,rn=Ht(ce,re.doc.direction);if(rn){var zt=(re.options.lineWrapping?jl:Hs)(re,ce,Ee,qe,rn,be,Oe);Rt=zt.level!=1,Lt=Rt?zt.from:zt.to-1,kt=Rt?zt.to:zt.from-1}var xn=null,fn=null,rr=ut(function(ji){var _r=Os(re,qe,ji);return _r.top+=vt,_r.bottom+=vt,Gt(_r,be,Oe,!1)?(_r.top<=Oe&&_r.left<=be&&(xn=ji,fn=_r),!0):!1},Lt,kt),lr,vr,Nr=!1;if(fn){var Jr=be-fn.left<fn.right-be,Gr=Jr==Rt;rr=xn+(Gr?0:1),vr=Gr?"after":"before",lr=Jr?fn.left:fn.right}else{!Rt&&(rr==kt||rr==Lt)&&rr++,vr=rr==0?"after":rr==ce.text.length?"before":Os(re,qe,rr-(Rt?1:0)).bottom+vt<=Oe==Rt?"after":"before";var si=co(re,en(Ee,rr,vr),"line",ce,qe);lr=si.left,Nr=Oe<si.top?-1:Oe>=si.bottom?1:0}return rr=Qe(ce.text,rr,1),Ji(Ee,rr,vr,Nr,be-lr)}function Hs(re,ce,Ee,be,Oe,qe,vt){var Lt=ut(function(zt){var xn=Oe[zt],fn=xn.level!=1;return Gt(co(re,en(Ee,fn?xn.to:xn.from,fn?"before":"after"),"line",ce,be),qe,vt,!0)},0,Oe.length-1),kt=Oe[Lt];if(Lt>0){var Rt=kt.level!=1,rn=co(re,en(Ee,Rt?kt.from:kt.to,Rt?"after":"before"),"line",ce,be);Gt(rn,qe,vt,!0)&&rn.top>vt&&(kt=Oe[Lt-1])}return kt}function jl(re,ce,Ee,be,Oe,qe,vt){var Lt=wr(re,ce,be,vt),kt=Lt.begin,Rt=Lt.end;/\s/.test(ce.text.charAt(Rt-1))&&Rt--;for(var rn=null,zt=null,xn=0;xn<Oe.length;xn++){var fn=Oe[xn];if(!(fn.from>=Rt||fn.to<=kt)){var rr=fn.level!=1,lr=Os(re,be,rr?Math.min(Rt,fn.to)-1:Math.max(kt,fn.from)).right,vr=lr<qe?qe-lr+1e9:lr-qe;(!rn||zt>vr)&&(rn=fn,zt=vr)}}return rn||(rn=Oe[Oe.length-1]),rn.from<kt&&(rn={from:kt,to:rn.to,level:rn.level}),rn.to>Rt&&(rn={from:rn.from,to:Rt,level:rn.level}),rn}var Qo;function Pa(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(Qo==null){Qo=Ae("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)Qo.appendChild(document.createTextNode("x")),Qo.appendChild(Ae("br"));Qo.appendChild(document.createTextNode("x"))}Ne(re.measure,Qo);var Ee=Qo.offsetHeight/50;return Ee>3&&(re.cachedTextHeight=Ee),Fe(re.measure),Ee||1}function Fs(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var ce=Ae("span","xxxxxxxxxx"),Ee=Ae("pre",[ce],"CodeMirror-line-like");Ne(re.measure,Ee);var be=ce.getBoundingClientRect(),Oe=(be.right-be.left)/10;return Oe>2&&(re.cachedCharWidth=Oe),Oe||10}function ol(re){for(var ce=re.display,Ee={},be={},Oe=ce.gutters.clientLeft,qe=ce.gutters.firstChild,vt=0;qe;qe=qe.nextSibling,++vt){var Lt=re.display.gutterSpecs[vt].className;Ee[Lt]=qe.offsetLeft+qe.clientLeft+Oe,be[Lt]=qe.clientWidth}return{fixedPos:Fu(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:Ee,gutterWidth:be,wrapperWidth:ce.wrapper.clientWidth}}function Fu(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Oo(re){var ce=Pa(re.display),Ee=re.options.lineWrapping,be=Ee&&Math.max(5,re.display.scroller.clientWidth/Fs(re.display)-3);return function(Oe){if(ln(re.doc,Oe))return 0;var qe=0;if(Oe.widgets)for(var vt=0;vt<Oe.widgets.length;vt++)Oe.widgets[vt].height&&(qe+=Oe.widgets[vt].height);return Ee?qe+(Math.ceil(Oe.text.length/be)||1)*ce:qe+ce}}function fi(re){var ce=re.doc,Ee=Oo(re);ce.iter(function(be){var Oe=Ee(be);Oe!=be.height&&tr(be,Oe)})}function Ua(re,ce,Ee,be){var Oe=re.display;if(!Ee&&Kr(ce).getAttribute("cm-not-content")=="true")return null;var qe,vt,Lt=Oe.lineSpace.getBoundingClientRect();try{qe=ce.clientX-Lt.left,vt=ce.clientY-Lt.top}catch(zt){return null}var kt=sa(re,qe,vt),Rt;if(be&&kt.xRel>0&&(Rt=sr(re.doc,kt.line).text).length==kt.ch){var rn=$e(Rt,Rt.length,re.options.tabSize)-Rt.length;kt=en(kt.line,Math.max(0,Math.round((qe-ja(re.display).left)/Fs(re.display))-rn))}return kt}function Ds(re,ce){if(ce>=re.display.viewTo||(ce-=re.display.viewFrom,ce<0))return null;for(var Ee=re.display.view,be=0;be<Ee.length;be++)if(ce-=Ee[be].size,ce<0)return be}function Fo(re,ce,Ee,be){ce==null&&(ce=re.doc.first),Ee==null&&(Ee=re.doc.first+re.doc.size),be||(be=0);var Oe=re.display;if(be&&Ee<Oe.viewTo&&(Oe.updateLineNumbers==null||Oe.updateLineNumbers>ce)&&(Oe.updateLineNumbers=ce),re.curOp.viewChanged=!0,ce>=Oe.viewTo)pn&&Zn(re.doc,ce)<Oe.viewTo&&Go(re);else if(Ee<=Oe.viewFrom)pn&&Wn(re.doc,Ee+be)>Oe.viewFrom?Go(re):(Oe.viewFrom+=be,Oe.viewTo+=be);else if(ce<=Oe.viewFrom&&Ee>=Oe.viewTo)Go(re);else if(ce<=Oe.viewFrom){var qe=ps(re,Ee,Ee+be,1);qe?(Oe.view=Oe.view.slice(qe.index),Oe.viewFrom=qe.lineN,Oe.viewTo+=be):Go(re)}else if(Ee>=Oe.viewTo){var vt=ps(re,ce,ce,-1);vt?(Oe.view=Oe.view.slice(0,vt.index),Oe.viewTo=vt.lineN):Go(re)}else{var Lt=ps(re,ce,ce,-1),kt=ps(re,Ee,Ee+be,1);Lt&&kt?(Oe.view=Oe.view.slice(0,Lt.index).concat(ni(re,Lt.lineN,kt.lineN)).concat(Oe.view.slice(kt.index)),Oe.viewTo+=be):Go(re)}var Rt=Oe.externalMeasured;Rt&&(Ee<Rt.lineN?Rt.lineN+=be:ce<Rt.lineN+Rt.size&&(Oe.externalMeasured=null))}function zi(re,ce,Ee){re.curOp.viewChanged=!0;var be=re.display,Oe=re.display.externalMeasured;if(Oe&&ce>=Oe.lineN&&ce<Oe.lineN+Oe.size&&(be.externalMeasured=null),!(ce<be.viewFrom||ce>=be.viewTo)){var qe=be.view[Ds(re,ce)];if(qe.node!=null){var vt=qe.changes||(qe.changes=[]);St(vt,Ee)==-1&&vt.push(Ee)}}}function Go(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function ps(re,ce,Ee,be){var Oe=Ds(re,ce),qe,vt=re.display.view;if(!pn||Ee==re.doc.first+re.doc.size)return{index:Oe,lineN:Ee};for(var Lt=re.display.viewFrom,kt=0;kt<Oe;kt++)Lt+=vt[kt].size;if(Lt!=ce){if(be>0){if(Oe==vt.length-1)return null;qe=Lt+vt[Oe].size-ce,Oe++}else qe=Lt-ce;ce+=qe,Ee+=qe}for(;Zn(re.doc,Ee)!=Ee;){if(Oe==(be<0?0:vt.length-1))return null;Ee+=be*vt[Oe-(be<0?1:0)].size,Oe+=be}return{index:Oe,lineN:Ee}}function xo(re,ce,Ee){var be=re.display,Oe=be.view;Oe.length==0||ce>=be.viewTo||Ee<=be.viewFrom?(be.view=ni(re,ce,Ee),be.viewFrom=ce):(be.viewFrom>ce?be.view=ni(re,ce,be.viewFrom).concat(be.view):be.viewFrom<ce&&(be.view=be.view.slice(Ds(re,ce))),be.viewFrom=ce,be.viewTo<Ee?be.view=be.view.concat(ni(re,be.viewTo,Ee)):be.viewTo>Ee&&(be.view=be.view.slice(0,Ds(re,Ee)))),be.viewTo=Ee}function Cs(re){for(var ce=re.display.view,Ee=0,be=0;be<ce.length;be++){var Oe=ce[be];!Oe.hidden&&(!Oe.node||Oe.changes)&&++Ee}return Ee}function ma(re){re.display.input.showSelection(re.display.input.prepareSelection())}function hu(re,ce){ce===void 0&&(ce=!0);for(var Ee=re.doc,be={},Oe=be.cursors=document.createDocumentFragment(),qe=be.selection=document.createDocumentFragment(),vt=0;vt<Ee.sel.ranges.length;vt++)if(!(!ce&&vt==Ee.sel.primIndex)){var Lt=Ee.sel.ranges[vt];if(!(Lt.from().line>=re.display.viewTo||Lt.to().line<re.display.viewFrom)){var kt=Lt.empty();(kt||re.options.showCursorWhenSelecting)&&oo(re,Lt.head,Oe),kt||no(re,Lt,qe)}}return be}function oo(re,ce,Ee){var be=co(re,ce,"div",null,null,!re.options.singleCursorHeightPerLine),Oe=Ee.appendChild(Ae("div","\xA0","CodeMirror-cursor"));if(Oe.style.left=be.left+"px",Oe.style.top=be.top+"px",Oe.style.height=Math.max(0,be.bottom-be.top)*re.options.cursorHeight+"px",be.other){var qe=Ee.appendChild(Ae("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));qe.style.display="",qe.style.left=be.other.left+"px",qe.style.top=be.other.top+"px",qe.style.height=(be.other.bottom-be.other.top)*.85+"px"}}function Ea(re,ce){return re.top-ce.top||re.left-ce.left}function no(re,ce,Ee){var be=re.display,Oe=re.doc,qe=document.createDocumentFragment(),vt=ja(re.display),Lt=vt.left,kt=Math.max(be.sizerWidth,fs(re)-be.sizer.offsetLeft)-vt.right,Rt=Oe.direction=="ltr";function rn(Gr,si,ji,_r){si<0&&(si=0),si=Math.round(si),_r=Math.round(_r),qe.appendChild(Ae("div",null,"CodeMirror-selected","position: absolute; left: "+Gr+`px;
top: `+si+"px; width: "+(ji==null?kt-Gr:ji)+`px;
height: `+(_r-si)+"px"))}function zt(Gr,si,ji){var _r=sr(Oe,Gr),eo=_r.text.length,Yo,Ia;function ia(Ma,Xs){return Ga(re,en(Gr,Ma),"div",_r,Xs)}function Rs(Ma,Xs,as){var La=da(re,_r,null,Ma),mo=Xs=="ltr"==(as=="after")?"left":"right",ua=as=="after"?La.begin:La.end-(/\s/.test(_r.text.charAt(La.end-1))?2:1);return ia(ua,mo)[mo]}var ms=Ht(_r,Oe.direction);return gt(ms,si||0,ji==null?eo:ji,function(Ma,Xs,as,La){var mo=as=="ltr",ua=ia(Ma,mo?"left":"right"),Xa=ia(Xs-1,mo?"right":"left"),ss=si==null&&Ma==0,Bl=ji==null&&Xs==eo,oa=La==0,bl=!ms||La==ms.length-1;if(Xa.top-ua.top<=3){var pa=(Rt?ss:Bl)&&oa,Af=(Rt?Bl:ss)&&bl,cl=pa?Lt:(mo?ua:Xa).left,Ys=Af?kt:(mo?Xa:ua).right;rn(cl,ua.top,Ys-cl,ua.bottom)}else{var _s,Bo,Ya,yu;mo?(_s=Rt&&ss&&oa?Lt:ua.left,Bo=Rt?kt:Rs(Ma,as,"before"),Ya=Rt?Lt:Rs(Xs,as,"after"),yu=Rt&&Bl&&bl?kt:Xa.right):(_s=Rt?Rs(Ma,as,"before"):Lt,Bo=!Rt&&ss&&oa?kt:ua.right,Ya=!Rt&&Bl&&bl?Lt:Xa.left,yu=Rt?Rs(Xs,as,"after"):kt),rn(_s,ua.top,Bo-_s,ua.bottom),ua.bottom<Xa.top&&rn(Lt,ua.bottom,null,Xa.top),rn(Ya,Xa.top,yu-Ya,Xa.bottom)}(!Yo||Ea(ua,Yo)<0)&&(Yo=ua),Ea(Xa,Yo)<0&&(Yo=Xa),(!Ia||Ea(ua,Ia)<0)&&(Ia=ua),Ea(Xa,Ia)<0&&(Ia=Xa)}),{start:Yo,end:Ia}}var xn=ce.from(),fn=ce.to();if(xn.line==fn.line)zt(xn.line,xn.ch,fn.ch);else{var rr=sr(Oe,xn.line),lr=sr(Oe,fn.line),vr=Tn(rr)==Tn(lr),Nr=zt(xn.line,xn.ch,vr?rr.text.length+1:null).end,Jr=zt(fn.line,vr?0:null,fn.ch).start;vr&&(Nr.top<Jr.top-2?(rn(Nr.right,Nr.top,null,Nr.bottom),rn(Lt,Jr.top,Jr.left,Jr.bottom)):rn(Nr.right,Nr.top,Jr.left-Nr.right,Nr.bottom)),Nr.bottom<Jr.top&&rn(Lt,Nr.bottom,null,Jr.top)}Ee.appendChild(qe)}function wo(re){if(re.state.focused){var ce=re.display;clearInterval(ce.blinker);var Ee=!0;ce.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?ce.blinker=setInterval(function(){re.hasFocus()||Du(re),ce.cursorDiv.style.visibility=(Ee=!Ee)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(ce.cursorDiv.style.visibility="hidden")}}function Eo(re){re.state.focused||(re.display.input.focus(),ho(re))}function Uo(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Du(re))},100)}function ho(re,ce){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(nn(re,"focus",re,ce),re.state.focused=!0,Ke(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),me&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),wo(re))}function Du(re,ce){re.state.delayingBlurEvent||(re.state.focused&&(nn(re,"blur",re,ce),re.state.focused=!1,Be(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function li(re){for(var ce=re.display,Ee=ce.lineDiv.offsetTop,be=0;be<ce.view.length;be++){var Oe=ce.view[be],qe=re.options.lineWrapping,vt=void 0,Lt=0;if(!Oe.hidden){if(De&&fe<8){var kt=Oe.node.offsetTop+Oe.node.offsetHeight;vt=kt-Ee,Ee=kt}else{var Rt=Oe.node.getBoundingClientRect();vt=Rt.bottom-Rt.top,!qe&&Oe.text.firstChild&&(Lt=Oe.text.firstChild.getBoundingClientRect().right-Rt.left-1)}var rn=Oe.line.height-vt;if((rn>.005||rn<-.005)&&(tr(Oe.line,vt),uf(Oe.line),Oe.rest))for(var zt=0;zt<Oe.rest.length;zt++)uf(Oe.rest[zt]);if(Lt>re.display.sizerWidth){var xn=Math.ceil(Lt/Fs(re.display));xn>re.display.maxLineLength&&(re.display.maxLineLength=xn,re.display.maxLine=Oe.line,re.display.maxLineChanged=!0)}}}}function uf(re){if(re.widgets)for(var ce=0;ce<re.widgets.length;++ce){var Ee=re.widgets[ce],be=Ee.node.parentNode;be&&(Ee.height=be.offsetHeight)}}function Qi(re,ce,Ee){var be=Ee&&Ee.top!=null?Math.max(0,Ee.top):re.scroller.scrollTop;be=Math.floor(be-Ni(re));var Oe=Ee&&Ee.bottom!=null?Ee.bottom:be+re.wrapper.clientHeight,qe=Kt(ce,be),vt=Kt(ce,Oe);if(Ee&&Ee.ensure){var Lt=Ee.ensure.from.line,kt=Ee.ensure.to.line;Lt<qe?(qe=Lt,vt=Kt(ce,Er(sr(ce,Lt))+re.wrapper.clientHeight)):Math.min(kt,ce.lastLine())>=vt&&(qe=Kt(ce,Er(sr(ce,kt))-re.wrapper.clientHeight),vt=kt)}return{from:qe,to:Math.max(vt,qe+1)}}function Cc(re,ce){if(!Wt(re,"scrollCursorIntoView")){var Ee=re.display,be=Ee.sizer.getBoundingClientRect(),Oe=null;if(ce.top+be.top<0?Oe=!0:ce.bottom+be.top>(window.innerHeight||document.documentElement.clientHeight)&&(Oe=!1),Oe!=null&&!we){var qe=Ae("div","\u200B",null,`position: absolute;
top: `+(ce.top-Ee.viewOffset-Ni(re.display))+`px;
height: `+(ce.bottom-ce.top+vo(re)+Ee.barHeight)+`px;
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");re.display.lineSpace.appendChild(qe),qe.scrollIntoView(Oe),re.display.lineSpace.removeChild(qe)}}}function cu(re,ce,Ee,be){be==null&&(be=0);var Oe;!re.options.lineWrapping&&ce==Ee&&(ce=ce.ch?en(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,Ee=ce.sticky=="before"?en(ce.line,ce.ch+1,"before"):ce);for(var qe=0;qe<5;qe++){var vt=!1,Lt=co(re,ce),kt=!Ee||Ee==ce?Lt:co(re,Ee);Oe={left:Math.min(Lt.left,kt.left),top:Math.min(Lt.top,kt.top)-be,right:Math.max(Lt.left,kt.left),bottom:Math.max(Lt.bottom,kt.bottom)+be};var Rt=Ec(re,Oe),rn=re.doc.scrollTop,zt=re.doc.scrollLeft;if(Rt.scrollTop!=null&&(Yl(re,Rt.scrollTop),Math.abs(re.doc.scrollTop-rn)>1&&(vt=!0)),Rt.scrollLeft!=null&&($l(re,Rt.scrollLeft),Math.abs(re.doc.scrollLeft-zt)>1&&(vt=!0)),!vt)break}return Oe}function ih(re,ce){var Ee=Ec(re,ce);Ee.scrollTop!=null&&Yl(re,Ee.scrollTop),Ee.scrollLeft!=null&&$l(re,Ee.scrollLeft)}function Ec(re,ce){var Ee=re.display,be=Pa(re.display);ce.top<0&&(ce.top=0);var Oe=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Ee.scroller.scrollTop,qe=ds(re),vt={};ce.bottom-ce.top>qe&&(ce.bottom=ce.top+qe);var Lt=re.doc.height+Vo(Ee),kt=ce.top<be,Rt=ce.bottom>Lt-be;if(ce.top<Oe)vt.scrollTop=kt?0:ce.top;else if(ce.bottom>Oe+qe){var rn=Math.min(ce.top,(Rt?Lt:ce.bottom)-qe);rn!=Oe&&(vt.scrollTop=rn)}var zt=re.options.fixedGutter?0:Ee.gutters.offsetWidth,xn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Ee.scroller.scrollLeft-zt,fn=fs(re)-Ee.gutters.offsetWidth,rr=ce.right-ce.left>fn;return rr&&(ce.right=ce.left+fn),ce.left<10?vt.scrollLeft=0:ce.left<xn?vt.scrollLeft=Math.max(0,ce.left+zt-(rr?0:10)):ce.right>fn+xn-3&&(vt.scrollLeft=ce.right+(rr?0:10)-fn),vt}function _h(re,ce){ce!=null&&(al(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+ce)}function Ol(re){al(re);var ce=re.getCursor();re.curOp.scrollToPos={from:ce,to:ce,margin:re.options.cursorScrollMargin}}function Bu(re,ce,Ee){(ce!=null||Ee!=null)&&al(re),ce!=null&&(re.curOp.scrollLeft=ce),Ee!=null&&(re.curOp.scrollTop=Ee)}function uo(re,ce){al(re),re.curOp.scrollToPos=ce}function al(re){var ce=re.curOp.scrollToPos;if(ce){re.curOp.scrollToPos=null;var Ee=io(re,ce.from),be=io(re,ce.to);zh(re,Ee,be,ce.margin)}}function zh(re,ce,Ee,be){var Oe=Ec(re,{left:Math.min(ce.left,Ee.left),top:Math.min(ce.top,Ee.top)-be,right:Math.max(ce.right,Ee.right),bottom:Math.max(ce.bottom,Ee.bottom)+be});Bu(re,Oe.scrollLeft,Oe.scrollTop)}function Yl(re,ce){Math.abs(re.doc.scrollTop-ce)<2||(ct||ah(re,{top:ce}),kc(re,ce,!0),ct&&ah(re),Tc(re,100))}function kc(re,ce,Ee){ce=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,ce)),!(re.display.scroller.scrollTop==ce&&!Ee)&&(re.doc.scrollTop=ce,re.display.scrollbars.setScrollTop(ce),re.display.scroller.scrollTop!=ce&&(re.display.scroller.scrollTop=ce))}function $l(re,ce,Ee,be){ce=Math.max(0,Math.min(ce,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Ee?ce==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-ce)<2)&&!be)&&(re.doc.scrollLeft=ce,td(re),re.display.scroller.scrollLeft!=ce&&(re.display.scroller.scrollLeft=ce),re.display.scrollbars.setScrollLeft(ce))}function Gi(re){var ce=re.display,Ee=ce.gutters.offsetWidth,be=Math.round(re.doc.height+Vo(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?Ee:0,docHeight:be,scrollHeight:be+vo(re)+ce.barHeight,nativeBarWidth:ce.nativeBarWidth,gutterWidth:Ee}}var ao=function(re,ce,Ee){this.cm=Ee;var be=this.vert=Ae("div",[Ae("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Oe=this.horiz=Ae("div",[Ae("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");be.tabIndex=Oe.tabIndex=-1,re(be),re(Oe),$t(be,"scroll",function(){be.clientHeight&&ce(be.scrollTop,"vertical")}),$t(Oe,"scroll",function(){Oe.clientWidth&&ce(Oe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,De&&fe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ao.prototype.update=function(re){var ce=re.scrollWidth>re.clientWidth+1,Ee=re.scrollHeight>re.clientHeight+1,be=re.nativeBarWidth;if(Ee){this.vert.style.display="block",this.vert.style.bottom=ce?be+"px":"0";var Oe=re.viewHeight-(ce?be:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+Oe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ce){this.horiz.style.display="block",this.horiz.style.right=Ee?be+"px":"0",this.horiz.style.left=re.barLeft+"px";var qe=re.viewWidth-re.barLeft-(Ee?be:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+qe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(be==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Ee?be:0,bottom:ce?be:0}},ao.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ao.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ao.prototype.zeroWidthHack=function(){var re=ae&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new rt,this.disableVert=new rt},ao.prototype.enableZeroWidthBar=function(re,ce,Ee){re.style.pointerEvents="auto";function be(){var Oe=re.getBoundingClientRect(),qe=Ee=="vert"?document.elementFromPoint(Oe.right-1,(Oe.top+Oe.bottom)/2):document.elementFromPoint((Oe.right+Oe.left)/2,Oe.bottom-1);qe!=re?re.style.pointerEvents="none":ce.set(1e3,be)}ce.set(1e3,be)},ao.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Xo=function(){};Xo.prototype.update=function(){return{bottom:0,right:0}},Xo.prototype.setScrollLeft=function(){},Xo.prototype.setScrollTop=function(){},Xo.prototype.clear=function(){};function Fa(re,ce){ce||(ce=Gi(re));var Ee=re.display.barWidth,be=re.display.barHeight;ka(re,ce);for(var Oe=0;Oe<4&&Ee!=re.display.barWidth||be!=re.display.barHeight;Oe++)Ee!=re.display.barWidth&&re.options.lineWrapping&&li(re),ka(re,Gi(re)),Ee=re.display.barWidth,be=re.display.barHeight}function ka(re,ce){var Ee=re.display,be=Ee.scrollbars.update(ce);Ee.sizer.style.paddingRight=(Ee.barWidth=be.right)+"px",Ee.sizer.style.paddingBottom=(Ee.barHeight=be.bottom)+"px",Ee.heightForcer.style.borderBottom=be.bottom+"px solid transparent",be.right&&be.bottom?(Ee.scrollbarFiller.style.display="block",Ee.scrollbarFiller.style.height=be.bottom+"px",Ee.scrollbarFiller.style.width=be.right+"px"):Ee.scrollbarFiller.style.display="",be.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Ee.gutterFiller.style.display="block",Ee.gutterFiller.style.height=be.bottom+"px",Ee.gutterFiller.style.width=ce.gutterWidth+"px"):Ee.gutterFiller.style.display=""}var fu={native:ao,null:Xo};function Jl(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&Be(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new fu[re.options.scrollbarStyle](function(ce){re.display.wrapper.insertBefore(ce,re.display.scrollbarFiller),$t(ce,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),ce.setAttribute("cm-not-content","true")},function(ce,Ee){Ee=="horizontal"?$l(re,ce):Yl(re,ce)},re),re.display.scrollbars.addClass&&Ke(re.display.wrapper,re.display.scrollbars.addClass)}var du=0;function sl(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:++du},_o(re.curOp)}function Fl(re){var ce=re.curOp;ce&&Ps(ce,function(Ee){for(var be=0;be<Ee.ops.length;be++)Ee.ops[be].cm.curOp=null;J0(Ee)})}function J0(re){for(var ce=re.ops,Ee=0;Ee<ce.length;Ee++)Q0(ce[Ee]);for(var be=0;be<ce.length;be++)q0(ce[be]);for(var Oe=0;Oe<ce.length;Oe++)Rg(ce[Oe]);for(var qe=0;qe<ce.length;qe++)la(ce[qe]);for(var vt=0;vt<ce.length;vt++)oh(ce[vt])}function Q0(re){var ce=re.cm,Ee=ce.display;_g(ce),re.updateMaxLine&&Tr(ce),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<Ee.viewFrom||re.scrollToPos.to.line>=Ee.viewTo)||Ee.maxLineChanged&&ce.options.lineWrapping,re.update=re.mustUpdate&&new Gh(ce,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function q0(re){re.updatedDisplay=re.mustUpdate&&ed(re.cm,re.update)}function Rg(re){var ce=re.cm,Ee=ce.display;re.updatedDisplay&&li(ce),re.barMeasure=Gi(ce),Ee.maxLineChanged&&!ce.options.lineWrapping&&(re.adjustWidthTo=ju(ce,Ee.maxLine,Ee.maxLine.text.length).left+3,ce.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Ee.scroller.clientWidth,Ee.sizer.offsetLeft+re.adjustWidthTo+vo(ce)+ce.display.barWidth),re.maxScrollLeft=Math.max(0,Ee.sizer.offsetLeft+re.adjustWidthTo-fs(ce))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Ee.input.prepareSelection())}function la(re){var ce=re.cm;re.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<ce.doc.scrollLeft&&$l(ce,Math.min(ce.display.scroller.scrollLeft,re.maxScrollLeft),!0),ce.display.maxLineChanged=!1);var Ee=re.focus&&re.focus==Ue();re.preparedSelection&&ce.display.input.showSelection(re.preparedSelection,Ee),(re.updatedDisplay||re.startHeight!=ce.doc.height)&&Fa(ce,re.barMeasure),re.updatedDisplay&&lh(ce,re.barMeasure),re.selectionChanged&&wo(ce),ce.state.focused&&re.updateInput&&ce.display.input.reset(re.typing),Ee&&Eo(re.cm)}function oh(re){var ce=re.cm,Ee=ce.display,be=ce.doc;if(re.updatedDisplay&&ko(ce,re.update),Ee.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Ee.wheelStartX=Ee.wheelStartY=null),re.scrollTop!=null&&kc(ce,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&$l(ce,re.scrollLeft,!0,!0),re.scrollToPos){var Oe=cu(ce,ur(be,re.scrollToPos.from),ur(be,re.scrollToPos.to),re.scrollToPos.margin);Cc(ce,Oe)}var qe=re.maybeHiddenMarkers,vt=re.maybeUnhiddenMarkers;if(qe)for(var Lt=0;Lt<qe.length;++Lt)qe[Lt].lines.length||nn(qe[Lt],"hide");if(vt)for(var kt=0;kt<vt.length;++kt)vt[kt].lines.length&&nn(vt[kt],"unhide");Ee.wrapper.offsetHeight&&(be.scrollTop=ce.display.scroller.scrollTop),re.changeObjs&&nn(ce,"changes",ce,re.changeObjs),re.update&&re.update.finish()}function yo(re,ce){if(re.curOp)return ce();sl(re);try{return ce()}finally{Fl(re)}}function Da(re,ce){return function(){if(re.curOp)return ce.apply(re,arguments);sl(re);try{return ce.apply(re,arguments)}finally{Fl(re)}}}function Wa(re){return function(){if(this.curOp)return re.apply(this,arguments);sl(this);try{return re.apply(this,arguments)}finally{Fl(this)}}}function Ha(re){return function(){var ce=this.cm;if(!ce||ce.curOp)return re.apply(this,arguments);sl(ce);try{return re.apply(this,arguments)}finally{Fl(ce)}}}function Tc(re,ce){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(ce,dt(Ka,re))}function Ka(re){var ce=re.doc;if(!(ce.highlightFrontier>=re.display.viewTo)){var Ee=+new Date+re.options.workTime,be=ki(re,ce.highlightFrontier),Oe=[];ce.iter(be.line,Math.min(ce.first+ce.size,re.display.viewTo+500),function(qe){if(be.line>=re.display.viewFrom){var vt=qe.styles,Lt=qe.text.length>re.options.maxHighlightLength?gr(ce.mode,be.state):null,kt=Ir(re,qe,be,!0);Lt&&(be.state=Lt),qe.styles=kt.styles;var Rt=qe.styleClasses,rn=kt.classes;rn?qe.styleClasses=rn:Rt&&(qe.styleClasses=null);for(var zt=!vt||vt.length!=qe.styles.length||Rt!=rn&&(!Rt||!rn||Rt.bgClass!=rn.bgClass||Rt.textClass!=rn.textClass),xn=0;!zt&&xn<vt.length;++xn)zt=vt[xn]!=qe.styles[xn];zt&&Oe.push(be.line),qe.stateAfter=be.save(),be.nextLine()}else qe.text.length<=re.options.maxHighlightLength&&Qt(re,qe.text,be),qe.stateAfter=be.line%5==0?be.save():null,be.nextLine();if(+new Date>Ee)return Tc(re,re.options.workDelay),!0}),ce.highlightFrontier=be.line,ce.modeFrontier=Math.max(ce.modeFrontier,be.line),Oe.length&&yo(re,function(){for(var qe=0;qe<Oe.length;qe++)zi(re,Oe[qe],"text")})}}var Gh=function(re,ce,Ee){var be=re.display;this.viewport=ce,this.visible=Qi(be,re.doc,ce),this.editorIsHidden=!be.wrapper.offsetWidth,this.wrapperHeight=be.wrapper.clientHeight,this.wrapperWidth=be.wrapper.clientWidth,this.oldDisplayWidth=fs(re),this.force=Ee,this.dims=ol(re),this.events=[]};Gh.prototype.signal=function(re,ce){mn(re,ce)&&this.events.push(arguments)},Gh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)nn.apply(null,this.events[re])};function _g(re){var ce=re.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=vo(re)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=vo(re)+"px",ce.scrollbarsClipped=!0)}function zg(re){if(re.hasFocus())return null;var ce=Ue();if(!ce||!Ye(re.display.lineDiv,ce))return null;var Ee={activeElt:ce};if(window.getSelection){var be=window.getSelection();be.anchorNode&&be.extend&&Ye(re.display.lineDiv,be.anchorNode)&&(Ee.anchorNode=be.anchorNode,Ee.anchorOffset=be.anchorOffset,Ee.focusNode=be.focusNode,Ee.focusOffset=be.focusOffset)}return Ee}function Bs(re){if(!(!re||!re.activeElt||re.activeElt==Ue())&&(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(),Ee=document.createRange();Ee.setEnd(re.anchorNode,re.anchorOffset),Ee.collapse(!1),ce.removeAllRanges(),ce.addRange(Ee),ce.extend(re.focusNode,re.focusOffset)}}function ed(re,ce){var Ee=re.display,be=re.doc;if(ce.editorIsHidden)return Go(re),!1;if(!ce.force&&ce.visible.from>=Ee.viewFrom&&ce.visible.to<=Ee.viewTo&&(Ee.updateLineNumbers==null||Ee.updateLineNumbers>=Ee.viewTo)&&Ee.renderedView==Ee.view&&Cs(re)==0)return!1;ba(re)&&(Go(re),ce.dims=ol(re));var Oe=be.first+be.size,qe=Math.max(ce.visible.from-re.options.viewportMargin,be.first),vt=Math.min(Oe,ce.visible.to+re.options.viewportMargin);Ee.viewFrom<qe&&qe-Ee.viewFrom<20&&(qe=Math.max(be.first,Ee.viewFrom)),Ee.viewTo>vt&&Ee.viewTo-vt<20&&(vt=Math.min(Oe,Ee.viewTo)),pn&&(qe=Zn(re.doc,qe),vt=Wn(re.doc,vt));var Lt=qe!=Ee.viewFrom||vt!=Ee.viewTo||Ee.lastWrapHeight!=ce.wrapperHeight||Ee.lastWrapWidth!=ce.wrapperWidth;xo(re,qe,vt),Ee.viewOffset=Er(sr(re.doc,Ee.viewFrom)),re.display.mover.style.top=Ee.viewOffset+"px";var kt=Cs(re);if(!Lt&&kt==0&&!ce.force&&Ee.renderedView==Ee.view&&(Ee.updateLineNumbers==null||Ee.updateLineNumbers>=Ee.viewTo))return!1;var Rt=zg(re);return kt>4&&(Ee.lineDiv.style.display="none"),lp(re,Ee.updateLineNumbers,ce.dims),kt>4&&(Ee.lineDiv.style.display=""),Ee.renderedView=Ee.view,Bs(Rt),Fe(Ee.cursorDiv),Fe(Ee.selectionDiv),Ee.gutters.style.height=Ee.sizer.style.minHeight=0,Lt&&(Ee.lastWrapHeight=ce.wrapperHeight,Ee.lastWrapWidth=ce.wrapperWidth,Tc(re,400)),Ee.updateLineNumbers=null,!0}function ko(re,ce){for(var Ee=ce.viewport,be=!0;;be=!1){if(!be||!re.options.lineWrapping||ce.oldDisplayWidth==fs(re)){if(Ee&&Ee.top!=null&&(Ee={top:Math.min(re.doc.height+Vo(re.display)-ds(re),Ee.top)}),ce.visible=Qi(re.display,re.doc,Ee),ce.visible.from>=re.display.viewFrom&&ce.visible.to<=re.display.viewTo)break}else be&&(ce.visible=Qi(re.display,re.doc,Ee));if(!ed(re,ce))break;li(re);var Oe=Gi(re);ma(re),Fa(re,Oe),lh(re,Oe),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 ah(re,ce){var Ee=new Gh(re,ce);if(ed(re,Ee)){li(re),ko(re,Ee);var be=Gi(re);ma(re),Fa(re,be),lh(re,be),Ee.finish()}}function lp(re,ce,Ee){var be=re.display,Oe=re.options.lineNumbers,qe=be.lineDiv,vt=qe.firstChild;function Lt(rr){var lr=rr.nextSibling;return me&&ae&&re.display.currentWheelTarget==rr?rr.style.display="none":rr.parentNode.removeChild(rr),lr}for(var kt=be.view,Rt=be.viewFrom,rn=0;rn<kt.length;rn++){var zt=kt[rn];if(!zt.hidden)if(!zt.node||zt.node.parentNode!=qe){var xn=Ci(re,zt,Rt,Ee);qe.insertBefore(xn,vt)}else{for(;vt!=zt.node;)vt=Lt(vt);var fn=Oe&&ce!=null&&ce<=Rt&&zt.lineNumber;zt.changes&&(St(zt.changes,"gutter")>-1&&(fn=!1),bo(re,zt,Rt,Ee)),fn&&(Fe(zt.lineNumber),zt.lineNumber.appendChild(document.createTextNode(Ln(re.options,Rt)))),vt=zt.node.nextSibling}Rt+=zt.size}for(;vt;)vt=Lt(vt)}function sh(re){var ce=re.gutters.offsetWidth;re.sizer.style.marginLeft=ce+"px"}function lh(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+vo(re)+"px"}function td(re){var ce=re.display,Ee=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!re.options.fixedGutter))){for(var be=Fu(ce)-ce.scroller.scrollLeft+re.doc.scrollLeft,Oe=ce.gutters.offsetWidth,qe=be+"px",vt=0;vt<Ee.length;vt++)if(!Ee[vt].hidden){re.options.fixedGutter&&(Ee[vt].gutter&&(Ee[vt].gutter.style.left=qe),Ee[vt].gutterBackground&&(Ee[vt].gutterBackground.style.left=qe));var Lt=Ee[vt].alignable;if(Lt)for(var kt=0;kt<Lt.length;kt++)Lt[kt].style.left=qe}re.options.fixedGutter&&(ce.gutters.style.left=be+Oe+"px")}}function ba(re){if(!re.options.lineNumbers)return!1;var ce=re.doc,Ee=Ln(re.options,ce.first+ce.size-1),be=re.display;if(Ee.length!=be.lineNumChars){var Oe=be.measure.appendChild(Ae("div",[Ae("div",Ee)],"CodeMirror-linenumber CodeMirror-gutter-elt")),qe=Oe.firstChild.offsetWidth,vt=Oe.offsetWidth-qe;return be.lineGutter.style.width="",be.lineNumInnerWidth=Math.max(qe,be.lineGutter.offsetWidth-vt)+1,be.lineNumWidth=be.lineNumInnerWidth+vt,be.lineNumChars=be.lineNumInnerWidth?Ee.length:-1,be.lineGutter.style.width=be.lineNumWidth+"px",sh(re.display),!0}return!1}function Va(re,ce){for(var Ee=[],be=!1,Oe=0;Oe<re.length;Oe++){var qe=re[Oe],vt=null;if(typeof qe!="string"&&(vt=qe.style,qe=qe.className),qe=="CodeMirror-linenumbers")if(ce)be=!0;else continue;Ee.push({className:qe,style:vt})}return ce&&!be&&Ee.push({className:"CodeMirror-linenumbers",style:null}),Ee}function Uh(re){var ce=re.gutters,Ee=re.gutterSpecs;Fe(ce),re.lineGutter=null;for(var be=0;be<Ee.length;++be){var Oe=Ee[be],qe=Oe.className,vt=Oe.style,Lt=ce.appendChild(Ae("div",null,"CodeMirror-gutter "+qe));vt&&(Lt.style.cssText=vt),qe=="CodeMirror-linenumbers"&&(re.lineGutter=Lt,Lt.style.width=(re.lineNumWidth||1)+"px")}ce.style.display=Ee.length?"":"none",sh(re)}function ll(re){Uh(re.display),Fo(re),td(re)}function uh(re,ce,Ee,be){var Oe=this;this.input=Ee,Oe.scrollbarFiller=Ae("div",null,"CodeMirror-scrollbar-filler"),Oe.scrollbarFiller.setAttribute("cm-not-content","true"),Oe.gutterFiller=Ae("div",null,"CodeMirror-gutter-filler"),Oe.gutterFiller.setAttribute("cm-not-content","true"),Oe.lineDiv=Ie("div",null,"CodeMirror-code"),Oe.selectionDiv=Ae("div",null,null,"position: relative; z-index: 1"),Oe.cursorDiv=Ae("div",null,"CodeMirror-cursors"),Oe.measure=Ae("div",null,"CodeMirror-measure"),Oe.lineMeasure=Ae("div",null,"CodeMirror-measure"),Oe.lineSpace=Ie("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var qe=Ie("div",[Oe.lineSpace],"CodeMirror-lines");Oe.mover=Ae("div",[qe],null,"position: relative"),Oe.sizer=Ae("div",[Oe.mover],"CodeMirror-sizer"),Oe.sizerWidth=null,Oe.heightForcer=Ae("div",null,null,"position: absolute; height: "+Pt+"px; width: 1px;"),Oe.gutters=Ae("div",null,"CodeMirror-gutters"),Oe.lineGutter=null,Oe.scroller=Ae("div",[Oe.sizer,Oe.heightForcer,Oe.gutters],"CodeMirror-scroll"),Oe.scroller.setAttribute("tabIndex","-1"),Oe.wrapper=Ae("div",[Oe.scrollbarFiller,Oe.gutterFiller,Oe.scroller],"CodeMirror"),De&&fe<8&&(Oe.gutters.style.zIndex=-1,Oe.scroller.style.paddingRight=0),!me&&!(ct&&ee)&&(Oe.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(Oe.wrapper):re(Oe.wrapper)),Oe.viewFrom=Oe.viewTo=ce.first,Oe.reportedViewFrom=Oe.reportedViewTo=ce.first,Oe.view=[],Oe.renderedView=null,Oe.externalMeasured=null,Oe.viewOffset=0,Oe.lastWrapHeight=Oe.lastWrapWidth=0,Oe.updateLineNumbers=null,Oe.nativeBarWidth=Oe.barHeight=Oe.barWidth=0,Oe.scrollbarsClipped=!1,Oe.lineNumWidth=Oe.lineNumInnerWidth=Oe.lineNumChars=null,Oe.alignWidgets=!1,Oe.cachedCharWidth=Oe.cachedTextHeight=Oe.cachedPaddingH=null,Oe.maxLine=null,Oe.maxLineLength=0,Oe.maxLineChanged=!1,Oe.wheelDX=Oe.wheelDY=Oe.wheelStartX=Oe.wheelStartY=null,Oe.shift=!1,Oe.selForContextMenu=null,Oe.activeTouch=null,Oe.gutterSpecs=Va(be.gutters,be.lineNumbers),Uh(Oe),Ee.init(Oe)}var Ks=0,va=null;De?va=-.53:ct?va=15:Ce?va=-.7:Me&&(va=-1/3);function Ql(re){var ce=re.wheelDeltaX,Ee=re.wheelDeltaY;return ce==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(ce=re.detail),Ee==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Ee=re.detail:Ee==null&&(Ee=re.wheelDelta),{x:ce,y:Ee}}function ul(re){var ce=Ql(re);return ce.x*=va,ce.y*=va,ce}function Za(re,ce){var Ee=Ql(ce),be=Ee.x,Oe=Ee.y,qe=re.display,vt=qe.scroller,Lt=vt.scrollWidth>vt.clientWidth,kt=vt.scrollHeight>vt.clientHeight;if(be&&Lt||Oe&&kt){if(Oe&&ae&&me){e:for(var Rt=ce.target,rn=qe.view;Rt!=vt;Rt=Rt.parentNode)for(var zt=0;zt<rn.length;zt++)if(rn[zt].node==Rt){re.display.currentWheelTarget=Rt;break e}}if(be&&!ct&&!Se&&va!=null){Oe&&kt&&Yl(re,Math.max(0,vt.scrollTop+Oe*va)),$l(re,Math.max(0,vt.scrollLeft+be*va)),(!Oe||Oe&&kt)&&Jn(ce),qe.wheelStartX=null;return}if(Oe&&va!=null){var xn=Oe*va,fn=re.doc.scrollTop,rr=fn+qe.wrapper.clientHeight;xn<0?fn=Math.max(0,fn+xn-50):rr=Math.min(re.doc.height,rr+xn+50),ah(re,{top:fn,bottom:rr})}Ks<20&&(qe.wheelStartX==null?(qe.wheelStartX=vt.scrollLeft,qe.wheelStartY=vt.scrollTop,qe.wheelDX=be,qe.wheelDY=Oe,setTimeout(function(){if(qe.wheelStartX!=null){var lr=vt.scrollLeft-qe.wheelStartX,vr=vt.scrollTop-qe.wheelStartY,Nr=vr&&qe.wheelDY&&vr/qe.wheelDY||lr&&qe.wheelDX&&lr/qe.wheelDX;qe.wheelStartX=qe.wheelStartY=null,Nr&&(va=(va*Ks+Nr)/(Ks+1),++Ks)}},200)):(qe.wheelDX+=be,qe.wheelDY+=Oe))}}var xl=function(re,ce){this.ranges=re,this.primIndex=ce};xl.prototype.primary=function(){return this.ranges[this.primIndex]},xl.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 Ee=this.ranges[ce],be=re.ranges[ce];if(!Bn(Ee.anchor,be.anchor)||!Bn(Ee.head,be.head))return!1}return!0},xl.prototype.deepCopy=function(){for(var re=[],ce=0;ce<this.ranges.length;ce++)re[ce]=new To(An(this.ranges[ce].anchor),An(this.ranges[ce].head));return new xl(re,this.primIndex)},xl.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},xl.prototype.contains=function(re,ce){ce||(ce=re);for(var Ee=0;Ee<this.ranges.length;Ee++){var be=this.ranges[Ee];if(Un(ce,be.from())>=0&&Un(re,be.to())<=0)return Ee}return-1};var To=function(re,ce){this.anchor=re,this.head=ce};To.prototype.from=function(){return _n(this.anchor,this.head)},To.prototype.to=function(){return nr(this.anchor,this.head)},To.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Dl(re,ce,Ee){var be=re&&re.options.selectionsMayTouch,Oe=ce[Ee];ce.sort(function(xn,fn){return Un(xn.from(),fn.from())}),Ee=St(ce,Oe);for(var qe=1;qe<ce.length;qe++){var vt=ce[qe],Lt=ce[qe-1],kt=Un(Lt.to(),vt.from());if(be&&!vt.empty()?kt>0:kt>=0){var Rt=_n(Lt.from(),vt.from()),rn=nr(Lt.to(),vt.to()),zt=Lt.empty()?vt.from()==vt.head:Lt.from()==Lt.head;qe<=Ee&&--Ee,ce.splice(--qe,2,new To(zt?rn:Rt,zt?Rt:rn))}}return new xl(ce,Ee)}function Iu(re,ce){return new xl([new To(re,ce||re)],0)}function hh(re){return re.text?en(re.from.line+re.text.length-1,At(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function Wh(re,ce){if(Un(re,ce.from)<0)return re;if(Un(re,ce.to)<=0)return hh(ce);var Ee=re.line+ce.text.length-(ce.to.line-ce.from.line)-1,be=re.ch;return re.line==ce.to.line&&(be+=hh(ce).ch-ce.to.ch),en(Ee,be)}function hf(re,ce){for(var Ee=[],be=0;be<re.sel.ranges.length;be++){var Oe=re.sel.ranges[be];Ee.push(new To(Wh(Oe.anchor,ce),Wh(Oe.head,ce)))}return Dl(re.cm,Ee,re.sel.primIndex)}function Mc(re,ce,Ee){return re.line==ce.line?en(Ee.line,re.ch-ce.ch+Ee.ch):en(Ee.line+(re.line-ce.line),re.ch)}function cf(re,ce,Ee){for(var be=[],Oe=en(re.first,0),qe=Oe,vt=0;vt<ce.length;vt++){var Lt=ce[vt],kt=Mc(Lt.from,Oe,qe),Rt=Mc(hh(Lt),Oe,qe);if(Oe=Lt.to,qe=Rt,Ee=="around"){var rn=re.sel.ranges[vt],zt=Un(rn.head,rn.anchor)<0;be[vt]=new To(zt?Rt:kt,zt?kt:Rt)}else be[vt]=new To(kt,kt)}return new xl(be,re.sel.primIndex)}function qi(re){re.doc.mode=an(re.options,re.doc.modeOption),ff(re)}function ff(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,Tc(re,100),re.state.modeGen++,re.curOp&&Fo(re)}function up(re,ce){return ce.from.ch==0&&ce.to.ch==0&&At(ce.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function nd(re,ce,Ee,be){function Oe(Jr){return Ee?Ee[Jr]:null}function qe(Jr,Gr,si){pi(Jr,Gr,si,be),Br(Jr,"change",Jr,ce)}function vt(Jr,Gr){for(var si=[],ji=Jr;ji<Gr;++ji)si.push(new Si(Rt[ji],Oe(ji),be));return si}var Lt=ce.from,kt=ce.to,Rt=ce.text,rn=sr(re,Lt.line),zt=sr(re,kt.line),xn=At(Rt),fn=Oe(Rt.length-1),rr=kt.line-Lt.line;if(ce.full)re.insert(0,vt(0,Rt.length)),re.remove(Rt.length,re.size-Rt.length);else if(up(re,ce)){var lr=vt(0,Rt.length-1);qe(zt,zt.text,fn),rr&&re.remove(Lt.line,rr),lr.length&&re.insert(Lt.line,lr)}else if(rn==zt)if(Rt.length==1)qe(rn,rn.text.slice(0,Lt.ch)+xn+rn.text.slice(kt.ch),fn);else{var vr=vt(1,Rt.length-1);vr.push(new Si(xn+rn.text.slice(kt.ch),fn,be)),qe(rn,rn.text.slice(0,Lt.ch)+Rt[0],Oe(0)),re.insert(Lt.line+1,vr)}else if(Rt.length==1)qe(rn,rn.text.slice(0,Lt.ch)+Rt[0]+zt.text.slice(kt.ch),Oe(0)),re.remove(Lt.line+1,rr);else{qe(rn,rn.text.slice(0,Lt.ch)+Rt[0],Oe(0)),qe(zt,xn+zt.text.slice(kt.ch),fn);var Nr=vt(1,Rt.length-1);rr>1&&re.remove(Lt.line+1,rr-1),re.insert(Lt.line+1,Nr)}Br(re,"change",re,ce)}function ql(re,ce,Ee){function be(Oe,qe,vt){if(Oe.linked)for(var Lt=0;Lt<Oe.linked.length;++Lt){var kt=Oe.linked[Lt];if(kt.doc!=qe){var Rt=vt&&kt.sharedHist;Ee&&!Rt||(ce(kt.doc,Rt),be(kt.doc,Oe,Rt))}}}be(re,null,!0)}function rd(re,ce){if(ce.cm)throw new Error("This document is already in use.");re.doc=ce,ce.cm=re,fi(re),qi(re),df(re),re.options.lineWrapping||Tr(re),re.options.mode=ce.modeOption,Fo(re)}function df(re){(re.doc.direction=="rtl"?Ke:Be)(re.display.lineDiv,"CodeMirror-rtl")}function ev(re){yo(re,function(){df(re),Fo(re)})}function Lc(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 id(re,ce){var Ee={from:An(ce.from),to:hh(ce),text:Wr(re,ce.from,ce.to)};return ch(re,Ee,ce.from.line,ce.to.line+1),ql(re,function(be){return ch(be,Ee,ce.from.line,ce.to.line+1)},!0),Ee}function Nc(re){for(;re.length;){var ce=At(re);if(ce.ranges)re.pop();else break}}function pf(re,ce){if(ce)return Nc(re.done),At(re.done);if(re.done.length&&!At(re.done).ranges)return At(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),At(re.done)}function gf(re,ce,Ee,be){var Oe=re.history;Oe.undone.length=0;var qe=+new Date,vt,Lt;if((Oe.lastOp==be||Oe.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&Oe.lastModTime>qe-(re.cm?re.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(vt=pf(Oe,Oe.lastOp==be)))Lt=At(vt.changes),Un(ce.from,ce.to)==0&&Un(ce.from,Lt.to)==0?Lt.to=hh(ce):vt.changes.push(id(re,ce));else{var kt=At(Oe.done);for((!kt||!kt.ranges)&&Ac(re.sel,Oe.done),vt={changes:[id(re,ce)],generation:Oe.generation},Oe.done.push(vt);Oe.done.length>Oe.undoDepth;)Oe.done.shift(),Oe.done[0].ranges||Oe.done.shift()}Oe.done.push(Ee),Oe.generation=++Oe.maxGeneration,Oe.lastModTime=Oe.lastSelTime=qe,Oe.lastOp=Oe.lastSelOp=be,Oe.lastOrigin=Oe.lastSelOrigin=ce.origin,Lt||nn(re,"historyAdded")}function hp(re,ce,Ee,be){var Oe=ce.charAt(0);return Oe=="*"||Oe=="+"&&Ee.ranges.length==be.ranges.length&&Ee.somethingSelected()==be.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function mf(re,ce,Ee,be){var Oe=re.history,qe=be&&be.origin;Ee==Oe.lastSelOp||qe&&Oe.lastSelOrigin==qe&&(Oe.lastModTime==Oe.lastSelTime&&Oe.lastOrigin==qe||hp(re,qe,At(Oe.done),ce))?Oe.done[Oe.done.length-1]=ce:Ac(ce,Oe.done),Oe.lastSelTime=+new Date,Oe.lastSelOrigin=qe,Oe.lastSelOp=Ee,be&&be.clearRedo!==!1&&Nc(Oe.undone)}function Ac(re,ce){var Ee=At(ce);Ee&&Ee.ranges&&Ee.equals(re)||ce.push(re)}function ch(re,ce,Ee,be){var Oe=ce["spans_"+re.id],qe=0;re.iter(Math.max(re.first,Ee),Math.min(re.first+re.size,be),function(vt){vt.markedSpans&&((Oe||(Oe=ce["spans_"+re.id]={}))[qe]=vt.markedSpans),++qe})}function Es(re){if(!re)return null;for(var ce,Ee=0;Ee<re.length;++Ee)re[Ee].marker.explicitlyCleared?ce||(ce=re.slice(0,Ee)):ce&&ce.push(re[Ee]);return ce?ce.length?ce:null:re}function pu(re,ce){var Ee=ce["spans_"+re.id];if(!Ee)return null;for(var be=[],Oe=0;Oe<ce.text.length;++Oe)be.push(Es(Ee[Oe]));return be}function od(re,ce){var Ee=pu(re,ce),be=Hi(re,ce);if(!Ee)return be;if(!be)return Ee;for(var Oe=0;Oe<Ee.length;++Oe){var qe=Ee[Oe],vt=be[Oe];if(qe&&vt)e:for(var Lt=0;Lt<vt.length;++Lt){for(var kt=vt[Lt],Rt=0;Rt<qe.length;++Rt)if(qe[Rt].marker==kt.marker)continue e;qe.push(kt)}else vt&&(Ee[Oe]=vt)}return Ee}function Ru(re,ce,Ee){for(var be=[],Oe=0;Oe<re.length;++Oe){var qe=re[Oe];if(qe.ranges){be.push(Ee?xl.prototype.deepCopy.call(qe):qe);continue}var vt=qe.changes,Lt=[];be.push({changes:Lt});for(var kt=0;kt<vt.length;++kt){var Rt=vt[kt],rn=void 0;if(Lt.push({from:Rt.from,to:Rt.to,text:Rt.text}),ce)for(var zt in Rt)(rn=zt.match(/^spans_(\d+)$/))&&St(ce,Number(rn[1]))>-1&&(At(Lt)[zt]=Rt[zt],delete Rt[zt])}}return be}function ad(re,ce,Ee,be){if(be){var Oe=re.anchor;if(Ee){var qe=Un(ce,Oe)<0;qe!=Un(Ee,Oe)<0?(Oe=ce,ce=Ee):qe!=Un(ce,Ee)<0&&(ce=Ee)}return new To(Oe,ce)}else return new To(Ee||ce,ce)}function sd(re,ce,Ee,be,Oe){Oe==null&&(Oe=re.cm&&(re.cm.display.shift||re.extend)),gs(re,new xl([ad(re.sel.primary(),ce,Ee,Oe)],0),be)}function Gg(re,ce,Ee){for(var be=[],Oe=re.cm&&(re.cm.display.shift||re.extend),qe=0;qe<re.sel.ranges.length;qe++)be[qe]=ad(re.sel.ranges[qe],ce[qe],null,Oe);var vt=Dl(re.cm,be,re.sel.primIndex);gs(re,vt,Ee)}function fh(re,ce,Ee,be){var Oe=re.sel.ranges.slice(0);Oe[ce]=Ee,gs(re,Dl(re.cm,Oe,re.sel.primIndex),be)}function Hh(re,ce,Ee,be){gs(re,Iu(ce,Ee),be)}function Ug(re,ce,Ee){var be={ranges:ce.ranges,update:function(Oe){this.ranges=[];for(var qe=0;qe<Oe.length;qe++)this.ranges[qe]=new To(ur(re,Oe[qe].anchor),ur(re,Oe[qe].head))},origin:Ee&&Ee.origin};return nn(re,"beforeSelectionChange",re,be),re.cm&&nn(re.cm,"beforeSelectionChange",re.cm,be),be.ranges!=ce.ranges?Dl(re.cm,be.ranges,be.ranges.length-1):ce}function ld(re,ce,Ee){var be=re.history.done,Oe=At(be);Oe&&Oe.ranges?(be[be.length-1]=ce,Kh(re,ce,Ee)):gs(re,ce,Ee)}function gs(re,ce,Ee){Kh(re,ce,Ee),mf(re,re.sel,re.cm?re.cm.curOp.id:NaN,Ee)}function Kh(re,ce,Ee){(mn(re,"beforeSelectionChange")||re.cm&&mn(re.cm,"beforeSelectionChange"))&&(ce=Ug(re,ce,Ee));var be=Ee&&Ee.bias||(Un(ce.primary().head,re.sel.primary().head)<0?-1:1);cp(re,yf(re,ce,be,!0)),!(Ee&&Ee.scroll===!1)&&re.cm&&Ol(re.cm)}function cp(re,ce){ce.equals(re.sel)||(re.sel=ce,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,bn(re.cm)),Br(re,"cursorActivity",re))}function vf(re){cp(re,yf(re,re.sel,null,!1))}function yf(re,ce,Ee,be){for(var Oe,qe=0;qe<ce.ranges.length;qe++){var vt=ce.ranges[qe],Lt=ce.ranges.length==re.sel.ranges.length&&re.sel.ranges[qe],kt=Sf(re,vt.anchor,Lt&&Lt.anchor,Ee,be),Rt=Sf(re,vt.head,Lt&&Lt.head,Ee,be);(Oe||kt!=vt.anchor||Rt!=vt.head)&&(Oe||(Oe=ce.ranges.slice(0,qe)),Oe[qe]=new To(kt,Rt))}return Oe?Dl(re.cm,Oe,ce.primIndex):ce}function _u(re,ce,Ee,be,Oe){var qe=sr(re,ce.line);if(qe.markedSpans)for(var vt=0;vt<qe.markedSpans.length;++vt){var Lt=qe.markedSpans[vt],kt=Lt.marker,Rt="selectLeft"in kt?!kt.selectLeft:kt.inclusiveLeft,rn="selectRight"in kt?!kt.selectRight:kt.inclusiveRight;if((Lt.from==null||(Rt?Lt.from<=ce.ch:Lt.from<ce.ch))&&(Lt.to==null||(rn?Lt.to>=ce.ch:Lt.to>ce.ch))){if(Oe&&(nn(kt,"beforeCursorEnter"),kt.explicitlyCleared))if(qe.markedSpans){--vt;continue}else break;if(!kt.atomic)continue;if(Ee){var zt=kt.find(be<0?1:-1),xn=void 0;if((be<0?rn:Rt)&&(zt=fp(re,zt,-be,zt&&zt.line==ce.line?qe:null)),zt&&zt.line==ce.line&&(xn=Un(zt,Ee))&&(be<0?xn<0:xn>0))return _u(re,zt,ce,be,Oe)}var fn=kt.find(be<0?-1:1);return(be<0?Rt:rn)&&(fn=fp(re,fn,be,fn.line==ce.line?qe:null)),fn?_u(re,fn,ce,be,Oe):null}}return ce}function Sf(re,ce,Ee,be,Oe){var qe=be||1,vt=_u(re,ce,Ee,qe,Oe)||!Oe&&_u(re,ce,Ee,qe,!0)||_u(re,ce,Ee,-qe,Oe)||!Oe&&_u(re,ce,Ee,-qe,!0);return vt||(re.cantEdit=!0,en(re.first,0))}function fp(re,ce,Ee,be){return Ee<0&&ce.ch==0?ce.line>re.first?ur(re,en(ce.line-1)):null:Ee>0&&ce.ch==(be||sr(re,ce.line)).text.length?ce.line<re.first+re.size-1?en(ce.line+1,0):null:new en(ce.line,ce.ch+Ee)}function ya(re){re.setSelection(en(re.firstLine(),0),en(re.lastLine()),pt)}function xf(re,ce,Ee){var be={canceled:!1,from:ce.from,to:ce.to,text:ce.text,origin:ce.origin,cancel:function(){return be.canceled=!0}};return Ee&&(be.update=function(Oe,qe,vt,Lt){Oe&&(be.from=ur(re,Oe)),qe&&(be.to=ur(re,qe)),vt&&(be.text=vt),Lt!==void 0&&(be.origin=Lt)}),nn(re,"beforeChange",re,be),re.cm&&nn(re.cm,"beforeChange",re.cm,be),be.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:be.from,to:be.to,text:be.text,origin:be.origin}}function dh(re,ce,Ee){if(re.cm){if(!re.cm.curOp)return Da(re.cm,dh)(re,ce,Ee);if(re.cm.state.suppressEdits)return}if(!((mn(re,"beforeChange")||re.cm&&mn(re.cm,"beforeChange"))&&(ce=xf(re,ce,!0),!ce))){var be=Pi&&!Ee&&wn(re,ce.from,ce.to);if(be)for(var Oe=be.length-1;Oe>=0;--Oe)Vh(re,{from:be[Oe].from,to:be[Oe].to,text:Oe?[""]:ce.text,origin:ce.origin});else Vh(re,ce)}}function Vh(re,ce){if(!(ce.text.length==1&&ce.text[0]==""&&Un(ce.from,ce.to)==0)){var Ee=hf(re,ce);gf(re,ce,Ee,re.cm?re.cm.curOp.id:NaN),jc(re,ce,Ee,Hi(re,ce));var be=[];ql(re,function(Oe,qe){!qe&&St(be,Oe.history)==-1&&(pp(Oe.history,ce),be.push(Oe.history)),jc(Oe,ce,null,Hi(Oe,ce))})}}function wf(re,ce,Ee){var be=re.cm&&re.cm.state.suppressEdits;if(!(be&&!Ee)){for(var Oe=re.history,qe,vt=re.sel,Lt=ce=="undo"?Oe.done:Oe.undone,kt=ce=="undo"?Oe.undone:Oe.done,Rt=0;Rt<Lt.length&&(qe=Lt[Rt],!(Ee?qe.ranges&&!qe.equals(re.sel):!qe.ranges));Rt++);if(Rt!=Lt.length){for(Oe.lastOrigin=Oe.lastSelOrigin=null;;)if(qe=Lt.pop(),qe.ranges){if(Ac(qe,kt),Ee&&!qe.equals(re.sel)){gs(re,qe,{clearRedo:!1});return}vt=qe}else if(be){Lt.push(qe);return}else break;var rn=[];Ac(vt,kt),kt.push({changes:rn,generation:Oe.generation}),Oe.generation=qe.generation||++Oe.maxGeneration;for(var zt=mn(re,"beforeChange")||re.cm&&mn(re.cm,"beforeChange"),xn=function(lr){var vr=qe.changes[lr];if(vr.origin=ce,zt&&!xf(re,vr,!1))return Lt.length=0,{};rn.push(id(re,vr));var Nr=lr?hf(re,vr):At(Lt);jc(re,vr,Nr,od(re,vr)),!lr&&re.cm&&re.cm.scrollIntoView({from:vr.from,to:hh(vr)});var Jr=[];ql(re,function(Gr,si){!si&&St(Jr,Gr.history)==-1&&(pp(Gr.history,vr),Jr.push(Gr.history)),jc(Gr,vr,null,od(Gr,vr))})},fn=qe.changes.length-1;fn>=0;--fn){var rr=xn(fn);if(rr)return rr.v}}}}function dp(re,ce){if(ce!=0&&(re.first+=ce,re.sel=new xl(xt(re.sel.ranges,function(Oe){return new To(en(Oe.anchor.line+ce,Oe.anchor.ch),en(Oe.head.line+ce,Oe.head.ch))}),re.sel.primIndex),re.cm)){Fo(re.cm,re.first,re.first-ce,ce);for(var Ee=re.cm.display,be=Ee.viewFrom;be<Ee.viewTo;be++)zi(re.cm,be,"gutter")}}function jc(re,ce,Ee,be){if(re.cm&&!re.cm.curOp)return Da(re.cm,jc)(re,ce,Ee,be);if(ce.to.line<re.first){dp(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 Oe=ce.text.length-1-(re.first-ce.from.line);dp(re,Oe),ce={from:en(re.first,0),to:en(ce.to.line+Oe,ce.to.ch),text:[At(ce.text)],origin:ce.origin}}var qe=re.lastLine();ce.to.line>qe&&(ce={from:ce.from,to:en(qe,sr(re,qe).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=Wr(re,ce.from,ce.to),Ee||(Ee=hf(re,ce)),re.cm?Wg(re.cm,ce,be):nd(re,ce,be),Kh(re,Ee,pt),re.cantEdit&&Sf(re,en(re.firstLine(),0))&&(re.cantEdit=!1)}}function Wg(re,ce,Ee){var be=re.doc,Oe=re.display,qe=ce.from,vt=ce.to,Lt=!1,kt=qe.line;re.options.lineWrapping||(kt=Ot(Tn(sr(be,qe.line))),be.iter(kt,vt.line+1,function(fn){if(fn==Oe.maxLine)return Lt=!0,!0})),be.sel.contains(ce.from,ce.to)>-1&&bn(re),nd(be,ce,Ee,Oo(re)),re.options.lineWrapping||(be.iter(kt,qe.line+ce.text.length,function(fn){var rr=ai(fn);rr>Oe.maxLineLength&&(Oe.maxLine=fn,Oe.maxLineLength=rr,Oe.maxLineChanged=!0,Lt=!1)}),Lt&&(re.curOp.updateMaxLine=!0)),ui(be,qe.line),Tc(re,400);var Rt=ce.text.length-(vt.line-qe.line)-1;ce.full?Fo(re):qe.line==vt.line&&ce.text.length==1&&!up(re.doc,ce)?zi(re,qe.line,"text"):Fo(re,qe.line,vt.line+1,Rt);var rn=mn(re,"changes"),zt=mn(re,"change");if(zt||rn){var xn={from:qe,to:vt,text:ce.text,removed:ce.removed,origin:ce.origin};zt&&Br(re,"change",re,xn),rn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(xn)}re.display.selForContextMenu=null}function Zh(re,ce,Ee,be,Oe){var qe;be||(be=Ee),Un(be,Ee)<0&&(qe=[be,Ee],Ee=qe[0],be=qe[1]),typeof ce=="string"&&(ce=re.splitLines(ce)),dh(re,{from:Ee,to:be,text:ce,origin:Oe})}function wl(re,ce,Ee,be){Ee<re.line?re.line+=be:ce<re.line&&(re.line=ce,re.ch=0)}function Hg(re,ce,Ee,be){for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],vt=!0;if(qe.ranges){qe.copied||(qe=re[Oe]=qe.deepCopy(),qe.copied=!0);for(var Lt=0;Lt<qe.ranges.length;Lt++)wl(qe.ranges[Lt].anchor,ce,Ee,be),wl(qe.ranges[Lt].head,ce,Ee,be);continue}for(var kt=0;kt<qe.changes.length;++kt){var Rt=qe.changes[kt];if(Ee<Rt.from.line)Rt.from=en(Rt.from.line+be,Rt.from.ch),Rt.to=en(Rt.to.line+be,Rt.to.ch);else if(ce<=Rt.to.line){vt=!1;break}}vt||(re.splice(0,Oe+1),Oe=0)}}function pp(re,ce){var Ee=ce.from.line,be=ce.to.line,Oe=ce.text.length-(be-Ee)-1;Hg(re.done,Ee,be,Oe),Hg(re.undone,Ee,be,Oe)}function Xh(re,ce,Ee,be){var Oe=ce,qe=ce;return typeof ce=="number"?qe=sr(re,Xn(re,ce)):Oe=Ot(ce),Oe==null?null:(be(qe,Oe)&&re.cm&&zi(re.cm,Oe,Ee),qe)}function Oc(re){this.lines=re,this.parent=null;for(var ce=0,Ee=0;Ee<re.length;++Ee)re[Ee].parent=this,ce+=re[Ee].height;this.height=ce}Oc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,ce){for(var Ee=re,be=re+ce;Ee<be;++Ee){var Oe=this.lines[Ee];this.height-=Oe.height,bi(Oe),Br(Oe,"delete")}this.lines.splice(re,ce)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,ce,Ee){this.height+=Ee,this.lines=this.lines.slice(0,re).concat(ce).concat(this.lines.slice(re));for(var be=0;be<ce.length;++be)ce[be].parent=this},iterN:function(re,ce,Ee){for(var be=re+ce;re<be;++re)if(Ee(this.lines[re]))return!0}};function ra(re){this.children=re;for(var ce=0,Ee=0,be=0;be<re.length;++be){var Oe=re[be];ce+=Oe.chunkSize(),Ee+=Oe.height,Oe.parent=this}this.size=ce,this.height=Ee,this.parent=null}ra.prototype={chunkSize:function(){return this.size},removeInner:function(re,ce){this.size-=ce;for(var Ee=0;Ee<this.children.length;++Ee){var be=this.children[Ee],Oe=be.chunkSize();if(re<Oe){var qe=Math.min(ce,Oe-re),vt=be.height;if(be.removeInner(re,qe),this.height-=vt-be.height,Oe==qe&&(this.children.splice(Ee--,1),be.parent=null),(ce-=qe)==0)break;re=0}else re-=Oe}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof Oc))){var Lt=[];this.collapse(Lt),this.children=[new Oc(Lt)],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,Ee){this.size+=ce.length,this.height+=Ee;for(var be=0;be<this.children.length;++be){var Oe=this.children[be],qe=Oe.chunkSize();if(re<=qe){if(Oe.insertInner(re,ce,Ee),Oe.lines&&Oe.lines.length>50){for(var vt=Oe.lines.length%25+25,Lt=vt;Lt<Oe.lines.length;){var kt=new Oc(Oe.lines.slice(Lt,Lt+=25));Oe.height-=kt.height,this.children.splice(++be,0,kt),kt.parent=this}Oe.lines=Oe.lines.slice(0,vt),this.maybeSpill()}break}re-=qe}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var ce=re.children.splice(re.children.length-5,5),Ee=new ra(ce);if(re.parent){re.size-=Ee.size,re.height-=Ee.height;var Oe=St(re.parent.children,re);re.parent.children.splice(Oe+1,0,Ee)}else{var be=new ra(re.children);be.parent=re,re.children=[be,Ee],re=be}Ee.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,ce,Ee){for(var be=0;be<this.children.length;++be){var Oe=this.children[be],qe=Oe.chunkSize();if(re<qe){var vt=Math.min(ce,qe-re);if(Oe.iterN(re,vt,Ee))return!0;if((ce-=vt)==0)break;re=0}else re-=qe}}};var zu=function(re,ce,Ee){if(Ee)for(var be in Ee)Ee.hasOwnProperty(be)&&(this[be]=Ee[be]);this.doc=re,this.node=ce};zu.prototype.clear=function(){var re=this.doc.cm,ce=this.line.widgets,Ee=this.line,be=Ot(Ee);if(!(be==null||!ce)){for(var Oe=0;Oe<ce.length;++Oe)ce[Oe]==this&&ce.splice(Oe--,1);ce.length||(Ee.widgets=null);var qe=zo(this);tr(Ee,Math.max(0,Ee.height-qe)),re&&(yo(re,function(){Kg(re,Ee,-qe),zi(re,be,"widget")}),Br(re,"lineWidgetCleared",re,this,be))}},zu.prototype.changed=function(){var re=this,ce=this.height,Ee=this.doc.cm,be=this.line;this.height=null;var Oe=zo(this)-ce;Oe&&(ln(this.doc,be)||tr(be,be.height+Oe),Ee&&yo(Ee,function(){Ee.curOp.forceUpdate=!0,Kg(Ee,be,Oe),Br(Ee,"lineWidgetChanged",Ee,re,Ot(be))}))},jn(zu);function Kg(re,ce,Ee){Er(ce)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&_h(re,Ee)}function ud(re,ce,Ee,be){var Oe=new zu(re,Ee,be),qe=re.cm;return qe&&Oe.noHScroll&&(qe.display.alignWidgets=!0),Xh(re,ce,"widget",function(vt){var Lt=vt.widgets||(vt.widgets=[]);if(Oe.insertAt==null?Lt.push(Oe):Lt.splice(Math.min(Lt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=vt,qe&&!ln(re,vt)){var kt=Er(vt)<re.scrollTop;tr(vt,vt.height+zo(Oe)),kt&&_h(qe,Oe.height),qe.curOp.forceUpdate=!0}return!0}),qe&&Br(qe,"lineWidgetAdded",qe,Oe,typeof ce=="number"?ce:Ot(ce)),Oe}var Vg=0,Zt=function(re,ce){this.lines=[],this.type=ce,this.doc=re,this.id=++Vg};Zt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,ce=re&&!re.curOp;if(ce&&sl(re),mn(this,"clear")){var Ee=this.find();Ee&&Br(this,"clear",Ee.from,Ee.to)}for(var be=null,Oe=null,qe=0;qe<this.lines.length;++qe){var vt=this.lines[qe],Lt=hi(vt.markedSpans,this);re&&!this.collapsed?zi(re,Ot(vt),"text"):re&&(Lt.to!=null&&(Oe=Ot(vt)),Lt.from!=null&&(be=Ot(vt))),vt.markedSpans=ei(vt.markedSpans,Lt),Lt.from==null&&this.collapsed&&!ln(this.doc,vt)&&re&&tr(vt,Pa(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var kt=0;kt<this.lines.length;++kt){var Rt=Tn(this.lines[kt]),rn=ai(Rt);rn>re.display.maxLineLength&&(re.display.maxLine=Rt,re.display.maxLineLength=rn,re.display.maxLineChanged=!0)}be!=null&&re&&this.collapsed&&Fo(re,be,Oe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&vf(re.doc)),re&&Br(re,"markerCleared",re,this,be,Oe),ce&&Fl(re),this.parent&&this.parent.clear()}},Zt.prototype.find=function(re,ce){re==null&&this.type=="bookmark"&&(re=1);for(var Ee,be,Oe=0;Oe<this.lines.length;++Oe){var qe=this.lines[Oe],vt=hi(qe.markedSpans,this);if(vt.from!=null&&(Ee=en(ce?qe:Ot(qe),vt.from),re==-1))return Ee;if(vt.to!=null&&(be=en(ce?qe:Ot(qe),vt.to),re==1))return be}return Ee&&{from:Ee,to:be}},Zt.prototype.changed=function(){var re=this,ce=this.find(-1,!0),Ee=this,be=this.doc.cm;!ce||!be||yo(be,function(){var Oe=ce.line,qe=Ot(ce.line),vt=il(be,qe);if(vt&&(rh(vt),be.curOp.selectionChanged=be.curOp.forceUpdate=!0),be.curOp.updateMaxLine=!0,!ln(Ee.doc,Oe)&&Ee.height!=null){var Lt=Ee.height;Ee.height=null;var kt=zo(Ee)-Lt;kt&&tr(Oe,Oe.height+kt)}Br(be,"markerChanged",be,re)})},Zt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||St(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Zt.prototype.detachLine=function(re){if(this.lines.splice(St(this.lines,re),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},jn(Zt);function Yh(re,ce,Ee,be,Oe){if(be&&be.shared)return Zg(re,ce,Ee,be,Oe);if(re.cm&&!re.cm.curOp)return Da(re.cm,Yh)(re,ce,Ee,be,Oe);var qe=new Zt(re,Oe),vt=Un(ce,Ee);if(be&&Ct(be,qe,!1),vt>0||vt==0&&qe.clearWhenEmpty!==!1)return qe;if(qe.replacedWith&&(qe.collapsed=!0,qe.widgetNode=Ie("span",[qe.replacedWith],"CodeMirror-widget"),be.handleMouseEvents||qe.widgetNode.setAttribute("cm-ignore-events","true"),be.insertLeft&&(qe.widgetNode.insertLeft=!0)),qe.collapsed){if(zn(re,ce.line,ce,Ee,qe)||ce.line!=Ee.line&&zn(re,Ee.line,ce,Ee,qe))throw new Error("Inserting collapsed marker partially overlapping an existing one");yn()}qe.addToHistory&&gf(re,{from:ce,to:Ee,origin:"markText"},re.sel,NaN);var Lt=ce.line,kt=re.cm,Rt;if(re.iter(Lt,Ee.line+1,function(zt){kt&&qe.collapsed&&!kt.options.lineWrapping&&Tn(zt)==kt.display.maxLine&&(Rt=!0),qe.collapsed&&Lt!=ce.line&&tr(zt,0),Wi(zt,new xr(qe,Lt==ce.line?ce.ch:null,Lt==Ee.line?Ee.ch:null)),++Lt}),qe.collapsed&&re.iter(ce.line,Ee.line+1,function(zt){ln(re,zt)&&tr(zt,0)}),qe.clearOnEnter&&$t(qe,"beforeCursorEnter",function(){return qe.clear()}),qe.readOnly&&(Oi(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),qe.collapsed&&(qe.id=++Vg,qe.atomic=!0),kt){if(Rt&&(kt.curOp.updateMaxLine=!0),qe.collapsed)Fo(kt,ce.line,Ee.line+1);else if(qe.className||qe.startStyle||qe.endStyle||qe.css||qe.attributes||qe.title)for(var rn=ce.line;rn<=Ee.line;rn++)zi(kt,rn,"text");qe.atomic&&vf(kt.doc),Br(kt,"markerAdded",kt,qe)}return qe}var gu=function(re,ce){this.markers=re,this.primary=ce;for(var Ee=0;Ee<re.length;++Ee)re[Ee].parent=this};gu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Br(this,"clear")}},gu.prototype.find=function(re,ce){return this.primary.find(re,ce)},jn(gu);function Zg(re,ce,Ee,be,Oe){be=Ct(be),be.shared=!1;var qe=[Yh(re,ce,Ee,be,Oe)],vt=qe[0],Lt=be.widgetNode;return ql(re,function(kt){Lt&&(be.widgetNode=Lt.cloneNode(!0)),qe.push(Yh(kt,ur(kt,ce),ur(kt,Ee),be,Oe));for(var Rt=0;Rt<kt.linked.length;++Rt)if(kt.linked[Rt].isParent)return;vt=At(qe)}),new gu(qe,vt)}function gp(re){return re.findMarks(en(re.first,0),re.clipPos(en(re.lastLine())),function(ce){return ce.parent})}function Xg(re,ce){for(var Ee=0;Ee<ce.length;Ee++){var be=ce[Ee],Oe=be.find(),qe=re.clipPos(Oe.from),vt=re.clipPos(Oe.to);if(Un(qe,vt)){var Lt=Yh(re,qe,vt,be.primary,be.primary.type);be.markers.push(Lt),Lt.parent=be}}}function mp(re){for(var ce=function(be){var Oe=re[be],qe=[Oe.primary.doc];ql(Oe.primary.doc,function(kt){return qe.push(kt)});for(var vt=0;vt<Oe.markers.length;vt++){var Lt=Oe.markers[vt];St(qe,Lt.doc)==-1&&(Lt.parent=null,Oe.markers.splice(vt--,1))}},Ee=0;Ee<re.length;Ee++)ce(Ee)}var tv=0,os=function(re,ce,Ee,be,Oe){if(!(this instanceof os))return new os(re,ce,Ee,be,Oe);Ee==null&&(Ee=0),ra.call(this,[new Oc([new Si("",null)])]),this.first=Ee,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Ee;var qe=en(Ee,0);this.sel=Iu(qe),this.history=new Lc(null),this.id=++tv,this.modeOption=ce,this.lineSep=be,this.direction=Oe=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),nd(this,{from:qe,to:qe,text:re}),gs(this,Iu(qe),pt)};os.prototype=xe(ra.prototype,{constructor:os,iter:function(re,ce,Ee){Ee?this.iterN(re-this.first,ce-re,Ee):this.iterN(this.first,this.first+this.size,re)},insert:function(re,ce){for(var Ee=0,be=0;be<ce.length;++be)Ee+=ce[be].height;this.insertInner(re-this.first,ce,Ee)},remove:function(re,ce){this.removeInner(re-this.first,ce)},getValue:function(re){var ce=Li(this,this.first,this.first+this.size);return re===!1?ce:ce.join(re||this.lineSeparator())},setValue:Ha(function(re){var ce=en(this.first,0),Ee=this.first+this.size-1;dh(this,{from:ce,to:en(Ee,sr(this,Ee).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&Bu(this.cm,0,0),gs(this,Iu(ce),pt)}),replaceRange:function(re,ce,Ee,be){ce=ur(this,ce),Ee=Ee?ur(this,Ee):ce,Zh(this,re,ce,Ee,be)},getRange:function(re,ce,Ee){var be=Wr(this,ur(this,re),ur(this,ce));return Ee===!1?be:be.join(Ee||this.lineSeparator())},getLine:function(re){var ce=this.getLineHandle(re);return ce&&ce.text},getLineHandle:function(re){if(Dn(this,re))return sr(this,re)},getLineNumber:function(re){return Ot(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=sr(this,re)),Tn(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return ur(this,re)},getCursor:function(re){var ce=this.sel.primary(),Ee;return re==null||re=="head"?Ee=ce.head:re=="anchor"?Ee=ce.anchor:re=="end"||re=="to"||re===!1?Ee=ce.to():Ee=ce.from(),Ee},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ha(function(re,ce,Ee){Hh(this,ur(this,typeof re=="number"?en(re,ce||0):re),null,Ee)}),setSelection:Ha(function(re,ce,Ee){Hh(this,ur(this,re),ur(this,ce||re),Ee)}),extendSelection:Ha(function(re,ce,Ee){sd(this,ur(this,re),ce&&ur(this,ce),Ee)}),extendSelections:Ha(function(re,ce){Gg(this,dr(this,re),ce)}),extendSelectionsBy:Ha(function(re,ce){var Ee=xt(this.sel.ranges,re);Gg(this,dr(this,Ee),ce)}),setSelections:Ha(function(re,ce,Ee){if(re.length){for(var be=[],Oe=0;Oe<re.length;Oe++)be[Oe]=new To(ur(this,re[Oe].anchor),ur(this,re[Oe].head));ce==null&&(ce=Math.min(re.length-1,this.sel.primIndex)),gs(this,Dl(this.cm,be,ce),Ee)}}),addSelection:Ha(function(re,ce,Ee){var be=this.sel.ranges.slice(0);be.push(new To(ur(this,re),ur(this,ce||re))),gs(this,Dl(this.cm,be,be.length-1),Ee)}),getSelection:function(re){for(var ce=this.sel.ranges,Ee,be=0;be<ce.length;be++){var Oe=Wr(this,ce[be].from(),ce[be].to());Ee=Ee?Ee.concat(Oe):Oe}return re===!1?Ee:Ee.join(re||this.lineSeparator())},getSelections:function(re){for(var ce=[],Ee=this.sel.ranges,be=0;be<Ee.length;be++){var Oe=Wr(this,Ee[be].from(),Ee[be].to());re!==!1&&(Oe=Oe.join(re||this.lineSeparator())),ce[be]=Oe}return ce},replaceSelection:function(re,ce,Ee){for(var be=[],Oe=0;Oe<this.sel.ranges.length;Oe++)be[Oe]=re;this.replaceSelections(be,ce,Ee||"+input")},replaceSelections:Ha(function(re,ce,Ee){for(var be=[],Oe=this.sel,qe=0;qe<Oe.ranges.length;qe++){var vt=Oe.ranges[qe];be[qe]={from:vt.from(),to:vt.to(),text:this.splitLines(re[qe]),origin:Ee}}for(var Lt=ce&&ce!="end"&&cf(this,be,ce),kt=be.length-1;kt>=0;kt--)dh(this,be[kt]);Lt?ld(this,Lt):this.cm&&Ol(this.cm)}),undo:Ha(function(){wf(this,"undo")}),redo:Ha(function(){wf(this,"redo")}),undoSelection:Ha(function(){wf(this,"undo",!0)}),redoSelection:Ha(function(){wf(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,ce=0,Ee=0,be=0;be<re.done.length;be++)re.done[be].ranges||++ce;for(var Oe=0;Oe<re.undone.length;Oe++)re.undone[Oe].ranges||++Ee;return{undo:ce,redo:Ee}},clearHistory:function(){var re=this;this.history=new Lc(this.history.maxGeneration),ql(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:Ru(this.history.done),undone:Ru(this.history.undone)}},setHistory:function(re){var ce=this.history=new Lc(this.history.maxGeneration);ce.done=Ru(re.done.slice(0),null,!0),ce.undone=Ru(re.undone.slice(0),null,!0)},setGutterMarker:Ha(function(re,ce,Ee){return Xh(this,re,"gutter",function(be){var Oe=be.gutterMarkers||(be.gutterMarkers={});return Oe[ce]=Ee,!Ee&&Re(Oe)&&(be.gutterMarkers=null),!0})}),clearGutter:Ha(function(re){var ce=this;this.iter(function(Ee){Ee.gutterMarkers&&Ee.gutterMarkers[re]&&Xh(ce,Ee,"gutter",function(){return Ee.gutterMarkers[re]=null,Re(Ee.gutterMarkers)&&(Ee.gutterMarkers=null),!0})})}),lineInfo:function(re){var ce;if(typeof re=="number"){if(!Dn(this,re)||(ce=re,re=sr(this,re),!re))return null}else if(ce=Ot(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:Ha(function(re,ce,Ee){return Xh(this,re,ce=="gutter"?"gutter":"class",function(be){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass";if(!be[Oe])be[Oe]=Ee;else{if(je(Ee).test(be[Oe]))return!1;be[Oe]+=" "+Ee}return!0})}),removeLineClass:Ha(function(re,ce,Ee){return Xh(this,re,ce=="gutter"?"gutter":"class",function(be){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass",qe=be[Oe];if(qe)if(Ee==null)be[Oe]=null;else{var vt=qe.match(je(Ee));if(!vt)return!1;var Lt=vt.index+vt[0].length;be[Oe]=qe.slice(0,vt.index)+(!vt.index||Lt==qe.length?"":" ")+qe.slice(Lt)||null}else return!1;return!0})}),addLineWidget:Ha(function(re,ce,Ee){return ud(this,re,ce,Ee)}),removeLineWidget:function(re){re.clear()},markText:function(re,ce,Ee){return Yh(this,ur(this,re),ur(this,ce),Ee,Ee&&Ee.type||"range")},setBookmark:function(re,ce){var Ee={replacedWith:ce&&(ce.nodeType==null?ce.widget:ce),insertLeft:ce&&ce.insertLeft,clearWhenEmpty:!1,shared:ce&&ce.shared,handleMouseEvents:ce&&ce.handleMouseEvents};return re=ur(this,re),Yh(this,re,re,Ee,"bookmark")},findMarksAt:function(re){re=ur(this,re);var ce=[],Ee=sr(this,re.line).markedSpans;if(Ee)for(var be=0;be<Ee.length;++be){var Oe=Ee[be];(Oe.from==null||Oe.from<=re.ch)&&(Oe.to==null||Oe.to>=re.ch)&&ce.push(Oe.marker.parent||Oe.marker)}return ce},findMarks:function(re,ce,Ee){re=ur(this,re),ce=ur(this,ce);var be=[],Oe=re.line;return this.iter(re.line,ce.line+1,function(qe){var vt=qe.markedSpans;if(vt)for(var Lt=0;Lt<vt.length;Lt++){var kt=vt[Lt];!(kt.to!=null&&Oe==re.line&&re.ch>=kt.to||kt.from==null&&Oe!=re.line||kt.from!=null&&Oe==ce.line&&kt.from>=ce.ch)&&(!Ee||Ee(kt.marker))&&be.push(kt.marker.parent||kt.marker)}++Oe}),be},getAllMarks:function(){var re=[];return this.iter(function(ce){var Ee=ce.markedSpans;if(Ee)for(var be=0;be<Ee.length;++be)Ee[be].from!=null&&re.push(Ee[be].marker)}),re},posFromIndex:function(re){var ce,Ee=this.first,be=this.lineSeparator().length;return this.iter(function(Oe){var qe=Oe.text.length+be;if(qe>re)return ce=re,!0;re-=qe,++Ee}),ur(this,en(Ee,ce))},indexFromPos:function(re){re=ur(this,re);var ce=re.ch;if(re.line<this.first||re.ch<0)return 0;var Ee=this.lineSeparator().length;return this.iter(this.first,re.line,function(be){ce+=be.text.length+Ee}),ce},copy:function(re){var ce=new os(Li(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,Ee=this.first+this.size;re.from!=null&&re.from>ce&&(ce=re.from),re.to!=null&&re.to<Ee&&(Ee=re.to);var be=new os(Li(this,ce,Ee),re.mode||this.modeOption,ce,this.lineSep,this.direction);return re.sharedHist&&(be.history=this.history),(this.linked||(this.linked=[])).push({doc:be,sharedHist:re.sharedHist}),be.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],Xg(be,gp(this)),be},unlinkDoc:function(re){if(re instanceof po&&(re=re.doc),this.linked)for(var ce=0;ce<this.linked.length;++ce){var Ee=this.linked[ce];if(Ee.doc==re){this.linked.splice(ce,1),re.unlinkDoc(this),mp(gp(this));break}}if(re.history==this.history){var be=[re.id];ql(re,function(Oe){return be.push(Oe.id)},!0),re.history=new Lc(null),re.history.done=Ru(this.history.done,be),re.history.undone=Ru(this.history.undone,be)}},iterLinkedDocs:function(re){ql(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Xi(re)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Ha(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(ce){return ce.order=null}),this.cm&&ev(this.cm))})}),os.prototype.eachLine=os.prototype.iter;var Pf=0;function vp(re){var ce=this;if(Jg(ce),!(Wt(ce,re)||jo(ce.display,re))){Jn(re),De&&(Pf=+new Date);var Ee=Ua(ce,re,!0),be=re.dataTransfer.files;if(!(!Ee||ce.isReadOnly()))if(be&&be.length&&window.FileReader&&window.File)for(var Oe=be.length,qe=Array(Oe),vt=0,Lt=function(){++vt==Oe&&Da(ce,function(){Ee=ur(ce.doc,Ee);var fn={from:Ee,to:Ee,text:ce.doc.splitLines(qe.filter(function(rr){return rr!=null}).join(ce.doc.lineSeparator())),origin:"paste"};dh(ce.doc,fn),ld(ce.doc,Iu(ur(ce.doc,Ee),ur(ce.doc,hh(fn))))})()},kt=function(fn,rr){if(ce.options.allowDropFileTypes&&St(ce.options.allowDropFileTypes,fn.type)==-1){Lt();return}var lr=new FileReader;lr.onerror=function(){return Lt()},lr.onload=function(){var vr=lr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(vr)){Lt();return}qe[rr]=vr,Lt()},lr.readAsText(fn)},Rt=0;Rt<be.length;Rt++)kt(be[Rt],Rt);else{if(ce.state.draggingText&&ce.doc.sel.contains(Ee)>-1){ce.state.draggingText(re),setTimeout(function(){return ce.display.input.focus()},20);return}try{var rn=re.dataTransfer.getData("Text");if(rn){var zt;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(zt=ce.listSelections()),Kh(ce.doc,Iu(Ee,Ee)),zt)for(var xn=0;xn<zt.length;++xn)Zh(ce.doc,"",zt[xn].anchor,zt[xn].head,"drag");ce.replaceSelection(rn,"around","paste"),ce.display.input.focus()}}catch(fn){}}}}function Yg(re,ce){if(De&&(!re.state.draggingText||+new Date-Pf<100)){kr(ce);return}if(!(Wt(re,ce)||jo(re.display,ce))&&(ce.dataTransfer.setData("Text",re.getSelection()),ce.dataTransfer.effectAllowed="copyMove",ce.dataTransfer.setDragImage&&!Me)){var Ee=Ae("img",null,null,"position: fixed; left: 0; top: 0;");Ee.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Se&&(Ee.width=Ee.height=1,re.display.wrapper.appendChild(Ee),Ee._top=Ee.offsetTop),ce.dataTransfer.setDragImage(Ee,0,0),Se&&Ee.parentNode.removeChild(Ee)}}function $g(re,ce){var Ee=Ua(re,ce);if(Ee){var be=document.createDocumentFragment();oo(re,Ee,be),re.display.dragCursor||(re.display.dragCursor=Ae("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),Ne(re.display.dragCursor,be)}}function Jg(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function Qg(re){if(document.getElementsByClassName){for(var ce=document.getElementsByClassName("CodeMirror"),Ee=[],be=0;be<ce.length;be++){var Oe=ce[be].CodeMirror;Oe&&Ee.push(Oe)}Ee.length&&Ee[0].operation(function(){for(var qe=0;qe<Ee.length;qe++)re(Ee[qe])})}}var yp=!1;function hl(){yp||(Fc(),yp=!0)}function Fc(){var re;$t(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,Qg(Sp)},100))}),$t(window,"blur",function(){return Qg(Du)})}function Sp(re){var ce=re.display;ce.cachedCharWidth=ce.cachedTextHeight=ce.cachedPaddingH=null,ce.scrollbarsClipped=!1,re.setSize()}for(var mu={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"},bf=0;bf<10;bf++)mu[bf+48]=mu[bf+96]=String(bf);for(var hd=65;hd<=90;hd++)mu[hd]=String.fromCharCode(hd);for(var Cf=1;Cf<=12;Cf++)mu[Cf+111]=mu[Cf+63235]="F"+Cf;var Vs={};Vs.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"},Vs.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"},Vs.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"},Vs.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"]},Vs.default=ae?Vs.macDefault:Vs.pcDefault;function xp(re){var ce=re.split(/-(?!$)/);re=ce[ce.length-1];for(var Ee,be,Oe,qe,vt=0;vt<ce.length-1;vt++){var Lt=ce[vt];if(/^(cmd|meta|m)$/i.test(Lt))qe=!0;else if(/^a(lt)?$/i.test(Lt))Ee=!0;else if(/^(c|ctrl|control)$/i.test(Lt))be=!0;else if(/^s(hift)?$/i.test(Lt))Oe=!0;else throw new Error("Unrecognized modifier name: "+Lt)}return Ee&&(re="Alt-"+re),be&&(re="Ctrl-"+re),qe&&(re="Cmd-"+re),Oe&&(re="Shift-"+re),re}function wp(re){var ce={};for(var Ee in re)if(re.hasOwnProperty(Ee)){var be=re[Ee];if(/^(name|fallthrough|(de|at)tach)$/.test(Ee))continue;if(be=="..."){delete re[Ee];continue}for(var Oe=xt(Ee.split(" "),xp),qe=0;qe<Oe.length;qe++){var vt=void 0,Lt=void 0;qe==Oe.length-1?(Lt=Oe.join(" "),vt=be):(Lt=Oe.slice(0,qe+1).join(" "),vt="...");var kt=ce[Lt];if(!kt)ce[Lt]=vt;else if(kt!=vt)throw new Error("Inconsistent bindings for "+Lt)}delete re[Ee]}for(var Rt in ce)re[Rt]=ce[Rt];return re}function Pl(re,ce,Ee,be){ce=$h(ce);var Oe=ce.call?ce.call(re,be):ce[re];if(Oe===!1)return"nothing";if(Oe==="...")return"multi";if(Oe!=null&&Ee(Oe))return"handled";if(ce.fallthrough){if(Object.prototype.toString.call(ce.fallthrough)!="[object Array]")return Pl(re,ce.fallthrough,Ee,be);for(var qe=0;qe<ce.fallthrough.length;qe++){var vt=Pl(re,ce.fallthrough[qe],Ee,be);if(vt)return vt}}}function Dc(re){var ce=typeof re=="string"?re:mu[re.keyCode];return ce=="Ctrl"||ce=="Alt"||ce=="Shift"||ce=="Mod"}function Pp(re,ce,Ee){var be=re;return ce.altKey&&be!="Alt"&&(re="Alt-"+re),(ge?ce.metaKey:ce.ctrlKey)&&be!="Ctrl"&&(re="Ctrl-"+re),(ge?ce.ctrlKey:ce.metaKey)&&be!="Mod"&&(re="Cmd-"+re),!Ee&&ce.shiftKey&&be!="Shift"&&(re="Shift-"+re),re}function qg(re,ce){if(Se&&re.keyCode==34&&re.char)return!1;var Ee=mu[re.keyCode];return Ee==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(Ee=re.code),Pp(Ee,re,ce))}function $h(re){return typeof re=="string"?Vs[re]:re}function Zs(re,ce){for(var Ee=re.doc.sel.ranges,be=[],Oe=0;Oe<Ee.length;Oe++){for(var qe=ce(Ee[Oe]);be.length&&Un(qe.from,At(be).to)<=0;){var vt=be.pop();if(Un(vt.from,qe.from)<0){qe.from=vt.from;break}}be.push(qe)}yo(re,function(){for(var Lt=be.length-1;Lt>=0;Lt--)Zh(re.doc,"",be[Lt].from,be[Lt].to,"+delete");Ol(re)})}function bp(re,ce,Ee){var be=Qe(re.text,ce+Ee,Ee);return be<0||be>re.text.length?null:be}function Sa(re,ce,Ee){var be=bp(re,ce.ch,Ee);return be==null?null:new en(ce.line,be,Ee<0?"after":"before")}function Ef(re,ce,Ee,be,Oe){if(re){ce.doc.direction=="rtl"&&(Oe=-Oe);var qe=Ht(Ee,ce.doc.direction);if(qe){var vt=Oe<0?At(qe):qe[0],Lt=Oe<0==(vt.level==1),kt=Lt?"after":"before",Rt;if(vt.level>0||ce.doc.direction=="rtl"){var rn=Sl(ce,Ee);Rt=Oe<0?Ee.text.length-1:0;var zt=Os(ce,rn,Rt).top;Rt=ut(function(xn){return Os(ce,rn,xn).top==zt},Oe<0==(vt.level==1)?vt.from:vt.to-1,Rt),kt=="before"&&(Rt=bp(Ee,Rt,1))}else Rt=Oe<0?vt.to:vt.from;return new en(be,Rt,kt)}}return new en(be,Oe<0?Ee.text.length:0,Oe<0?"before":"after")}function cd(re,ce,Ee,be){var Oe=Ht(ce,re.doc.direction);if(!Oe)return Sa(ce,Ee,be);Ee.ch>=ce.text.length?(Ee.ch=ce.text.length,Ee.sticky="before"):Ee.ch<=0&&(Ee.ch=0,Ee.sticky="after");var qe=Nt(Oe,Ee.ch,Ee.sticky),vt=Oe[qe];if(re.doc.direction=="ltr"&&vt.level%2==0&&(be>0?vt.to>Ee.ch:vt.from<Ee.ch))return Sa(ce,Ee,be);var Lt=function(Nr,Jr){return bp(ce,Nr instanceof en?Nr.ch:Nr,Jr)},kt,Rt=function(Nr){return re.options.lineWrapping?(kt=kt||Sl(re,ce),da(re,ce,kt,Nr)):{begin:0,end:ce.text.length}},rn=Rt(Ee.sticky=="before"?Lt(Ee,-1):Ee.ch);if(re.doc.direction=="rtl"||vt.level==1){var zt=vt.level==1==be<0,xn=Lt(Ee,zt?1:-1);if(xn!=null&&(zt?xn<=vt.to&&xn<=rn.end:xn>=vt.from&&xn>=rn.begin)){var fn=zt?"before":"after";return new en(Ee.line,xn,fn)}}var rr=function(Nr,Jr,Gr){for(var si=function(Yo,Ia){return Ia?new en(Ee.line,Lt(Yo,1),"before"):new en(Ee.line,Yo,"after")};Nr>=0&&Nr<Oe.length;Nr+=Jr){var ji=Oe[Nr],_r=Jr>0==(ji.level!=1),eo=_r?Gr.begin:Lt(Gr.end,-1);if(ji.from<=eo&&eo<ji.to||(eo=_r?ji.from:Lt(ji.to,-1),Gr.begin<=eo&&eo<Gr.end))return si(eo,_r)}},lr=rr(qe+be,be,rn);if(lr)return lr;var vr=be>0?rn.end:Lt(rn.begin,-1);return vr!=null&&!(be>0&&vr==ce.text.length)&&(lr=rr(be>0?0:Oe.length-1,be,Rt(vr)),lr)?lr:null}var ph={selectAll:ya,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),pt)},killLine:function(re){return Zs(re,function(ce){if(ce.empty()){var Ee=sr(re.doc,ce.head.line).text.length;return ce.head.ch==Ee&&ce.head.line<re.lastLine()?{from:ce.head,to:en(ce.head.line+1,0)}:{from:ce.head,to:en(ce.head.line,Ee)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(re){return Zs(re,function(ce){return{from:en(ce.from().line,0),to:ur(re.doc,en(ce.to().line+1,0))}})},delLineLeft:function(re){return Zs(re,function(ce){return{from:en(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(re){return Zs(re,function(ce){var Ee=re.charCoords(ce.head,"div").top+5,be=re.coordsChar({left:0,top:Ee},"div");return{from:be,to:ce.from()}})},delWrappedLineRight:function(re){return Zs(re,function(ce){var Ee=re.charCoords(ce.head,"div").top+5,be=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ee},"div");return{from:ce.from(),to:be}})},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(en(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(en(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(ce){return Bc(re,ce.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(ce){return Cp(re,ce.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(ce){return Ic(re,ce.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ee},"div")},ht)},goLineLeft:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:0,top:Ee},"div")},ht)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5,be=re.coordsChar({left:0,top:Ee},"div");return be.ch<re.getLine(be.line).search(/\S/)?Cp(re,ce.head):be},ht)},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=[],Ee=re.listSelections(),be=re.options.tabSize,Oe=0;Oe<Ee.length;Oe++){var qe=Ee[Oe].from(),vt=$e(re.getLine(qe.line),qe.ch,be);ce.push(yt(be-vt%be))}re.replaceSelections(ce)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return yo(re,function(){for(var ce=re.listSelections(),Ee=[],be=0;be<ce.length;be++)if(ce[be].empty()){var Oe=ce[be].head,qe=sr(re.doc,Oe.line).text;if(qe){if(Oe.ch==qe.length&&(Oe=new en(Oe.line,Oe.ch-1)),Oe.ch>0)Oe=new en(Oe.line,Oe.ch+1),re.replaceRange(qe.charAt(Oe.ch-1)+qe.charAt(Oe.ch-2),en(Oe.line,Oe.ch-2),Oe,"+transpose");else if(Oe.line>re.doc.first){var vt=sr(re.doc,Oe.line-1).text;vt&&(Oe=new en(Oe.line,1),re.replaceRange(qe.charAt(0)+re.doc.lineSeparator()+vt.charAt(vt.length-1),en(Oe.line-1,vt.length-1),Oe,"+transpose"))}}Ee.push(new To(Oe,Oe))}re.setSelections(Ee)})},newlineAndIndent:function(re){return yo(re,function(){for(var ce=re.listSelections(),Ee=ce.length-1;Ee>=0;Ee--)re.replaceRange(re.doc.lineSeparator(),ce[Ee].anchor,ce[Ee].head,"+input");ce=re.listSelections();for(var be=0;be<ce.length;be++)re.indentLine(ce[be].from().line,null,!0);Ol(re)})},openLine:function(re){return re.replaceSelection(`
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function Bc(re,ce){var Ee=sr(re.doc,ce),be=Tn(Ee);return be!=Ee&&(ce=Ot(be)),Ef(!0,re,be,ce,1)}function Ic(re,ce){var Ee=sr(re.doc,ce),be=In(Ee);return be!=Ee&&(ce=Ot(be)),Ef(!0,re,Ee,ce,-1)}function Cp(re,ce){var Ee=Bc(re,ce.line),be=sr(re.doc,Ee.line),Oe=Ht(be,re.doc.direction);if(!Oe||Oe[0].level==0){var qe=Math.max(Ee.ch,be.text.search(/\S/)),vt=ce.line==Ee.line&&ce.ch<=qe&&ce.ch;return en(Ee.line,vt?0:qe,Ee.sticky)}return Ee}function Rc(re,ce,Ee){if(typeof ce=="string"&&(ce=ph[ce],!ce))return!1;re.display.input.ensurePolled();var be=re.display.shift,Oe=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Ee&&(re.display.shift=!1),Oe=ce(re)!=wt}finally{re.display.shift=be,re.state.suppressEdits=!1}return Oe}function Ep(re,ce,Ee){for(var be=0;be<re.state.keyMaps.length;be++){var Oe=Pl(ce,re.state.keyMaps[be],Ee,re);if(Oe)return Oe}return re.options.extraKeys&&Pl(ce,re.options.extraKeys,Ee,re)||Pl(ce,re.options.keyMap,Ee,re)}var vu=new rt;function Jh(re,ce,Ee,be){var Oe=re.state.keySeq;if(Oe){if(Dc(ce))return"handled";if(/\'$/.test(ce)?re.state.keySeq=null:vu.set(50,function(){re.state.keySeq==Oe&&(re.state.keySeq=null,re.display.input.reset())}),fd(re,Oe+" "+ce,Ee,be))return!0}return fd(re,ce,Ee,be)}function fd(re,ce,Ee,be){var Oe=Ep(re,ce,be);return Oe=="multi"&&(re.state.keySeq=ce),Oe=="handled"&&Br(re,"keyHandled",re,ce,Ee),(Oe=="handled"||Oe=="multi")&&(Jn(Ee),wo(re)),!!Oe}function dd(re,ce){var Ee=qg(ce,!0);return Ee?ce.shiftKey&&!re.state.keySeq?Jh(re,"Shift-"+Ee,ce,function(be){return Rc(re,be,!0)})||Jh(re,Ee,ce,function(be){if(typeof be=="string"?/^go[A-Z]/.test(be):be.motion)return Rc(re,be)}):Jh(re,Ee,ce,function(be){return Rc(re,be)}):!1}function pd(re,ce,Ee){return Jh(re,"'"+Ee+"'",ce,function(be){return Rc(re,be,!0)})}var Qh=null;function kp(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&(ce.curOp.focus=Ue(),!Wt(ce,re))){De&&fe<11&&re.keyCode==27&&(re.returnValue=!1);var Ee=re.keyCode;ce.display.shift=Ee==16||re.shiftKey;var be=dd(ce,re);Se&&(Qh=be?Ee:null,!be&&Ee==88&&!fr&&(ae?re.metaKey:re.ctrlKey)&&ce.replaceSelection("",null,"cut")),ct&&!ae&&!be&&Ee==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Ee==18&&!/\bCodeMirror-crosshair\b/.test(ce.display.lineDiv.className)&&Tp(ce)}}function Tp(re){var ce=re.display.lineDiv;Ke(ce,"CodeMirror-crosshair");function Ee(be){(be.keyCode==18||!be.altKey)&&(Be(ce,"CodeMirror-crosshair"),sn(document,"keyup",Ee),sn(document,"mouseover",Ee))}$t(document,"keyup",Ee),$t(document,"mouseover",Ee)}function Mp(re){re.keyCode==16&&(this.doc.sel.shift=!1),Wt(this,re)}function eu(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&!(jo(ce.display,re)||Wt(ce,re)||re.ctrlKey&&!re.altKey||ae&&re.metaKey)){var Ee=re.keyCode,be=re.charCode;if(Se&&Ee==Qh){Qh=null,Jn(re);return}if(!(Se&&(!re.which||re.which<10)&&dd(ce,re))){var Oe=String.fromCharCode(be==null?Ee:be);Oe!="\b"&&(pd(ce,re,Oe)||ce.display.input.onKeyPress(re))}}}var em=400,Lp=function(re,ce,Ee){this.time=re,this.pos=ce,this.button=Ee};Lp.prototype.compare=function(re,ce,Ee){return this.time+em>re&&Un(ce,this.pos)==0&&Ee==this.button};var _c,qh;function Np(re,ce){var Ee=+new Date;return qh&&qh.compare(Ee,re,ce)?(_c=qh=null,"triple"):_c&&_c.compare(Ee,re,ce)?(qh=new Lp(Ee,re,ce),_c=null,"double"):(_c=new Lp(Ee,re,ce),qh=null,"single")}function tu(re){var ce=this,Ee=ce.display;if(!(Wt(ce,re)||Ee.activeTouch&&Ee.input.supportsTouch())){if(Ee.input.ensurePolled(),Ee.shift=re.shiftKey,jo(Ee,re)){me||(Ee.scroller.draggable=!1,setTimeout(function(){return Ee.scroller.draggable=!0},100));return}if(!vd(ce,re)){var be=Ua(ce,re),Oe=Ur(re),qe=be?Np(be,Oe):"single";window.focus(),Oe==1&&ce.state.selectingText&&ce.state.selectingText(re),!(be&&Ap(ce,Oe,be,qe,re))&&(Oe==1?be?tm(ce,be,qe,re):Kr(re)==Ee.scroller&&Jn(re):Oe==2?(be&&sd(ce.doc,be),setTimeout(function(){return Ee.input.focus()},20)):Oe==3&&(Pe?ce.display.input.onContextMenu(re):Uo(ce)))}}}function Ap(re,ce,Ee,be,Oe){var qe="Click";return be=="double"?qe="Double"+qe:be=="triple"&&(qe="Triple"+qe),qe=(ce==1?"Left":ce==2?"Middle":"Right")+qe,Jh(re,Pp(qe,Oe),Oe,function(vt){if(typeof vt=="string"&&(vt=ph[vt]),!vt)return!1;var Lt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Lt=vt(re,Ee)!=wt}finally{re.state.suppressEdits=!1}return Lt})}function gd(re,ce,Ee){var be=re.getOption("configureMouse"),Oe=be?be(re,ce,Ee):{};if(Oe.unit==null){var qe=ie?Ee.shiftKey&&Ee.metaKey:Ee.altKey;Oe.unit=qe?"rectangle":ce=="single"?"char":ce=="double"?"word":"line"}return(Oe.extend==null||re.doc.extend)&&(Oe.extend=re.doc.extend||Ee.shiftKey),Oe.addNew==null&&(Oe.addNew=ae?Ee.metaKey:Ee.ctrlKey),Oe.moveOnDrag==null&&(Oe.moveOnDrag=!(ae?Ee.altKey:Ee.ctrlKey)),Oe}function tm(re,ce,Ee,be){De?setTimeout(dt(Eo,re),0):re.curOp.focus=Ue();var Oe=gd(re,Ee,be),qe=re.doc.sel,vt;re.options.dragDrop&&oi&&!re.isReadOnly()&&Ee=="single"&&(vt=qe.contains(ce))>-1&&(Un((vt=qe.ranges[vt]).from(),ce)<0||ce.xRel>0)&&(Un(vt.to(),ce)>0||ce.xRel<0)?jp(re,be,ce,Oe):nv(re,be,ce,Oe)}function jp(re,ce,Ee,be){var Oe=re.display,qe=!1,vt=Da(re,function(Rt){me&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,sn(Oe.wrapper.ownerDocument,"mouseup",vt),sn(Oe.wrapper.ownerDocument,"mousemove",Lt),sn(Oe.scroller,"dragstart",kt),sn(Oe.scroller,"drop",vt),qe||(Jn(Rt),be.addNew||sd(re.doc,Ee,null,null,be.extend),me&&!Me||De&&fe==9?setTimeout(function(){Oe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Oe.input.focus()},20):Oe.input.focus())}),Lt=function(Rt){qe=qe||Math.abs(ce.clientX-Rt.clientX)+Math.abs(ce.clientY-Rt.clientY)>=10},kt=function(){return qe=!0};me&&(Oe.scroller.draggable=!0),re.state.draggingText=vt,vt.copy=!be.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),$t(Oe.wrapper.ownerDocument,"mouseup",vt),$t(Oe.wrapper.ownerDocument,"mousemove",Lt),$t(Oe.scroller,"dragstart",kt),$t(Oe.scroller,"drop",vt),Uo(re),setTimeout(function(){return Oe.input.focus()},20)}function Op(re,ce,Ee){if(Ee=="char")return new To(ce,ce);if(Ee=="word")return re.findWordAt(ce);if(Ee=="line")return new To(en(ce.line,0),ur(re.doc,en(ce.line+1,0)));var be=Ee(re,ce);return new To(be.from,be.to)}function nv(re,ce,Ee,be){var Oe=re.display,qe=re.doc;Jn(ce);var vt,Lt,kt=qe.sel,Rt=kt.ranges;if(be.addNew&&!be.extend?(Lt=qe.sel.contains(Ee),Lt>-1?vt=Rt[Lt]:vt=new To(Ee,Ee)):(vt=qe.sel.primary(),Lt=qe.sel.primIndex),be.unit=="rectangle")be.addNew||(vt=new To(Ee,Ee)),Ee=Ua(re,ce,!0,!0),Lt=-1;else{var rn=Op(re,Ee,be.unit);be.extend?vt=ad(vt,rn.anchor,rn.head,be.extend):vt=rn}be.addNew?Lt==-1?(Lt=Rt.length,gs(qe,Dl(re,Rt.concat([vt]),Lt),{scroll:!1,origin:"*mouse"})):Rt.length>1&&Rt[Lt].empty()&&be.unit=="char"&&!be.extend?(gs(qe,Dl(re,Rt.slice(0,Lt).concat(Rt.slice(Lt+1)),0),{scroll:!1,origin:"*mouse"}),kt=qe.sel):fh(qe,Lt,vt,ft):(Lt=0,gs(qe,new xl([vt],0),ft),kt=qe.sel);var zt=Ee;function xn(Gr){if(Un(zt,Gr)!=0)if(zt=Gr,be.unit=="rectangle"){for(var si=[],ji=re.options.tabSize,_r=$e(sr(qe,Ee.line).text,Ee.ch,ji),eo=$e(sr(qe,Gr.line).text,Gr.ch,ji),Yo=Math.min(_r,eo),Ia=Math.max(_r,eo),ia=Math.min(Ee.line,Gr.line),Rs=Math.min(re.lastLine(),Math.max(Ee.line,Gr.line));ia<=Rs;ia++){var ms=sr(qe,ia).text,Ma=Et(ms,Yo,ji);Yo==Ia?si.push(new To(en(ia,Ma),en(ia,Ma))):ms.length>Ma&&si.push(new To(en(ia,Ma),en(ia,Et(ms,Ia,ji))))}si.length||si.push(new To(Ee,Ee)),gs(qe,Dl(re,kt.ranges.slice(0,Lt).concat(si),Lt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Gr)}else{var Xs=vt,as=Op(re,Gr,be.unit),La=Xs.anchor,mo;Un(as.anchor,La)>0?(mo=as.head,La=_n(Xs.from(),as.anchor)):(mo=as.anchor,La=nr(Xs.to(),as.head));var ua=kt.ranges.slice(0);ua[Lt]=nm(re,new To(ur(qe,La),mo)),gs(qe,Dl(re,ua,Lt),ft)}}var fn=Oe.wrapper.getBoundingClientRect(),rr=0;function lr(Gr){var si=++rr,ji=Ua(re,Gr,!0,be.unit=="rectangle");if(ji)if(Un(ji,zt)!=0){re.curOp.focus=Ue(),xn(ji);var _r=Qi(Oe,qe);(ji.line>=_r.to||ji.line<_r.from)&&setTimeout(Da(re,function(){rr==si&&lr(Gr)}),150)}else{var eo=Gr.clientY<fn.top?-20:Gr.clientY>fn.bottom?20:0;eo&&setTimeout(Da(re,function(){rr==si&&(Oe.scroller.scrollTop+=eo,lr(Gr))}),50)}}function vr(Gr){re.state.selectingText=!1,rr=1/0,Gr&&(Jn(Gr),Oe.input.focus()),sn(Oe.wrapper.ownerDocument,"mousemove",Nr),sn(Oe.wrapper.ownerDocument,"mouseup",Jr),qe.history.lastSelOrigin=null}var Nr=Da(re,function(Gr){Gr.buttons===0||!Ur(Gr)?vr(Gr):lr(Gr)}),Jr=Da(re,vr);re.state.selectingText=Jr,$t(Oe.wrapper.ownerDocument,"mousemove",Nr),$t(Oe.wrapper.ownerDocument,"mouseup",Jr)}function nm(re,ce){var Ee=ce.anchor,be=ce.head,Oe=sr(re.doc,Ee.line);if(Un(Ee,be)==0&&Ee.sticky==be.sticky)return ce;var qe=Ht(Oe);if(!qe)return ce;var vt=Nt(qe,Ee.ch,Ee.sticky),Lt=qe[vt];if(Lt.from!=Ee.ch&&Lt.to!=Ee.ch)return ce;var kt=vt+(Lt.from==Ee.ch==(Lt.level!=1)?0:1);if(kt==0||kt==qe.length)return ce;var Rt;if(be.line!=Ee.line)Rt=(be.line-Ee.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var rn=Nt(qe,be.ch,be.sticky),zt=rn-vt||(be.ch-Ee.ch)*(Lt.level==1?-1:1);rn==kt-1||rn==kt?Rt=zt<0:Rt=zt>0}var xn=qe[kt+(Rt?-1:0)],fn=Rt==(xn.level==1),rr=fn?xn.from:xn.to,lr=fn?"after":"before";return Ee.ch==rr&&Ee.sticky==lr?ce:new To(new en(Ee.line,rr,lr),be)}function md(re,ce,Ee,be){var Oe,qe;if(ce.touches)Oe=ce.touches[0].clientX,qe=ce.touches[0].clientY;else try{Oe=ce.clientX,qe=ce.clientY}catch(xn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;be&&Jn(ce);var vt=re.display,Lt=vt.lineDiv.getBoundingClientRect();if(qe>Lt.bottom||!mn(re,Ee))return cr(ce);qe-=Lt.top-vt.viewOffset;for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=vt.gutters.childNodes[kt];if(Rt&&Rt.getBoundingClientRect().right>=Oe){var rn=Kt(re.doc,qe),zt=re.display.gutterSpecs[kt];return nn(re,Ee,re,rn,zt.className,ce),cr(ce)}}}function vd(re,ce){return md(re,ce,"gutterClick",!0)}function yd(re,ce){jo(re.display,ce)||rm(re,ce)||Wt(re,ce,"contextmenu")||Pe||re.display.input.onContextMenu(ce)}function rm(re,ce){return mn(re,"gutterContextMenu")?md(re,ce,"gutterContextMenu",!1):!1}function Sd(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),uu(re)}var gh={toString:function(){return"CodeMirror.Init"}},Fp={},kf={};function im(re){var ce=re.optionHandlers;function Ee(be,Oe,qe,vt){re.defaults[be]=Oe,qe&&(ce[be]=vt?function(Lt,kt,Rt){Rt!=gh&&qe(Lt,kt,Rt)}:qe)}re.defineOption=Ee,re.Init=gh,Ee("value","",function(be,Oe){return be.setValue(Oe)},!0),Ee("mode",null,function(be,Oe){be.doc.modeOption=Oe,qi(be)},!0),Ee("indentUnit",2,qi,!0),Ee("indentWithTabs",!1),Ee("smartIndent",!0),Ee("tabSize",4,function(be){ff(be),uu(be),Fo(be)},!0),Ee("lineSeparator",null,function(be,Oe){if(be.doc.lineSep=Oe,!!Oe){var qe=[],vt=be.doc.first;be.doc.iter(function(kt){for(var Rt=0;;){var rn=kt.text.indexOf(Oe,Rt);if(rn==-1)break;Rt=rn+Oe.length,qe.push(en(vt,rn))}vt++});for(var Lt=qe.length-1;Lt>=0;Lt--)Zh(be.doc,Oe,qe[Lt],en(qe[Lt].line,qe[Lt].ch+Oe.length))}}),Ee("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(be,Oe,qe){be.state.specialChars=new RegExp(Oe.source+(Oe.test(" ")?"":"| "),"g"),qe!=gh&&be.refresh()}),Ee("specialCharPlaceholder",xi,function(be){return be.refresh()},!0),Ee("electricChars",!0),Ee("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Ee("spellcheck",!1,function(be,Oe){return be.getInputField().spellcheck=Oe},!0),Ee("autocorrect",!1,function(be,Oe){return be.getInputField().autocorrect=Oe},!0),Ee("autocapitalize",!1,function(be,Oe){return be.getInputField().autocapitalize=Oe},!0),Ee("rtlMoveVisually",!le),Ee("wholeLineUpdateBefore",!0),Ee("theme","default",function(be){Sd(be),ll(be)},!0),Ee("keyMap","default",function(be,Oe,qe){var vt=$h(Oe),Lt=qe!=gh&&$h(qe);Lt&&Lt.detach&&Lt.detach(be,vt),vt.attach&&vt.attach(be,Lt||null)}),Ee("extraKeys",null),Ee("configureMouse",null),Ee("lineWrapping",!1,om,!0),Ee("gutters",[],function(be,Oe){be.display.gutterSpecs=Va(Oe,be.options.lineNumbers),ll(be)},!0),Ee("fixedGutter",!0,function(be,Oe){be.display.gutters.style.left=Oe?Fu(be.display)+"px":"0",be.refresh()},!0),Ee("coverGutterNextToScrollbar",!1,function(be){return Fa(be)},!0),Ee("scrollbarStyle","native",function(be){Jl(be),Fa(be),be.display.scrollbars.setScrollTop(be.doc.scrollTop),be.display.scrollbars.setScrollLeft(be.doc.scrollLeft)},!0),Ee("lineNumbers",!1,function(be,Oe){be.display.gutterSpecs=Va(be.options.gutters,Oe),ll(be)},!0),Ee("firstLineNumber",1,ll,!0),Ee("lineNumberFormatter",function(be){return be},ll,!0),Ee("showCursorWhenSelecting",!1,ma,!0),Ee("resetSelectionOnContextMenu",!0),Ee("lineWiseCopyCut",!0),Ee("pasteLinesPerSelection",!0),Ee("selectionsMayTouch",!1),Ee("readOnly",!1,function(be,Oe){Oe=="nocursor"&&(Du(be),be.display.input.blur()),be.display.input.readOnlyChanged(Oe)}),Ee("screenReaderLabel",null,function(be,Oe){Oe=Oe===""?null:Oe,be.display.input.screenReaderLabelChanged(Oe)}),Ee("disableInput",!1,function(be,Oe){Oe||be.display.input.reset()},!0),Ee("dragDrop",!0,xd),Ee("allowDropFileTypes",null),Ee("cursorBlinkRate",530),Ee("cursorScrollMargin",0),Ee("cursorHeight",1,ma,!0),Ee("singleCursorHeightPerLine",!0,ma,!0),Ee("workTime",100),Ee("workDelay",100),Ee("flattenSpans",!0,ff,!0),Ee("addModeClass",!1,ff,!0),Ee("pollInterval",100),Ee("undoDepth",200,function(be,Oe){return be.doc.history.undoDepth=Oe}),Ee("historyEventDelay",1250),Ee("viewportMargin",10,function(be){return be.refresh()},!0),Ee("maxHighlightLength",1e4,ff,!0),Ee("moveInputWithCursor",!0,function(be,Oe){Oe||be.display.input.resetPosition()}),Ee("tabindex",null,function(be,Oe){return be.display.input.getField().tabIndex=Oe||""}),Ee("autofocus",null),Ee("direction","ltr",function(be,Oe){return be.doc.setDirection(Oe)},!0),Ee("phrases",null)}function xd(re,ce,Ee){var be=Ee&&Ee!=gh;if(!ce!=!be){var Oe=re.display.dragFunctions,qe=ce?$t:sn;qe(re.display.scroller,"dragstart",Oe.start),qe(re.display.scroller,"dragenter",Oe.enter),qe(re.display.scroller,"dragover",Oe.over),qe(re.display.scroller,"dragleave",Oe.leave),qe(re.display.scroller,"drop",Oe.drop)}}function om(re){re.options.lineWrapping?(Ke(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(Be(re.display.wrapper,"CodeMirror-wrap"),Tr(re)),fi(re),Fo(re),uu(re),setTimeout(function(){return Fa(re)},100)}function po(re,ce){var Ee=this;if(!(this instanceof po))return new po(re,ce);this.options=ce=ce?Ct(ce):{},Ct(Fp,ce,!1);var be=ce.value;typeof be=="string"?be=new os(be,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(be.modeOption=ce.mode),this.doc=be;var Oe=new po.inputStyles[ce.inputStyle](this),qe=this.display=new uh(re,be,Oe,ce);qe.wrapper.CodeMirror=this,Sd(this),ce.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Jl(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 rt,keySeq:null,specialChars:null},ce.autofocus&&!ee&&qe.input.focus(),De&&fe<11&&setTimeout(function(){return Ee.display.input.reset(!0)},20),zc(this),hl(),sl(this),this.curOp.forceUpdate=!0,rd(this,be),ce.autofocus&&!ee||this.hasFocus()?setTimeout(function(){Ee.hasFocus()&&!Ee.state.focused&&ho(Ee)},20):Du(this);for(var vt in kf)kf.hasOwnProperty(vt)&&kf[vt](this,ce[vt],gh);ba(this),ce.finishInit&&ce.finishInit(this);for(var Lt=0;Lt<ec.length;++Lt)ec[Lt](this);Fl(this),me&&ce.lineWrapping&&getComputedStyle(qe.lineDiv).textRendering=="optimizelegibility"&&(qe.lineDiv.style.textRendering="auto")}po.defaults=Fp,po.optionHandlers=kf;function zc(re){var ce=re.display;$t(ce.scroller,"mousedown",Da(re,tu)),De&&fe<11?$t(ce.scroller,"dblclick",Da(re,function(kt){if(!Wt(re,kt)){var Rt=Ua(re,kt);if(!(!Rt||vd(re,kt)||jo(re.display,kt))){Jn(kt);var rn=re.findWordAt(Rt);sd(re.doc,rn.anchor,rn.head)}}})):$t(ce.scroller,"dblclick",function(kt){return Wt(re,kt)||Jn(kt)}),$t(ce.scroller,"contextmenu",function(kt){return yd(re,kt)}),$t(ce.input.getField(),"contextmenu",function(kt){ce.scroller.contains(kt.target)||yd(re,kt)});var Ee,be={end:0};function Oe(){ce.activeTouch&&(Ee=setTimeout(function(){return ce.activeTouch=null},1e3),be=ce.activeTouch,be.end=+new Date)}function qe(kt){if(kt.touches.length!=1)return!1;var Rt=kt.touches[0];return Rt.radiusX<=1&&Rt.radiusY<=1}function vt(kt,Rt){if(Rt.left==null)return!0;var rn=Rt.left-kt.left,zt=Rt.top-kt.top;return rn*rn+zt*zt>20*20}$t(ce.scroller,"touchstart",function(kt){if(!Wt(re,kt)&&!qe(kt)&&!vd(re,kt)){ce.input.ensurePolled(),clearTimeout(Ee);var Rt=+new Date;ce.activeTouch={start:Rt,moved:!1,prev:Rt-be.end<=300?be:null},kt.touches.length==1&&(ce.activeTouch.left=kt.touches[0].pageX,ce.activeTouch.top=kt.touches[0].pageY)}}),$t(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),$t(ce.scroller,"touchend",function(kt){var Rt=ce.activeTouch;if(Rt&&!jo(ce,kt)&&Rt.left!=null&&!Rt.moved&&new Date-Rt.start<300){var rn=re.coordsChar(ce.activeTouch,"page"),zt;!Rt.prev||vt(Rt,Rt.prev)?zt=new To(rn,rn):!Rt.prev.prev||vt(Rt,Rt.prev.prev)?zt=re.findWordAt(rn):zt=new To(en(rn.line,0),ur(re.doc,en(rn.line+1,0))),re.setSelection(zt.anchor,zt.head),re.focus(),Jn(kt)}Oe()}),$t(ce.scroller,"touchcancel",Oe),$t(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(Yl(re,ce.scroller.scrollTop),$l(re,ce.scroller.scrollLeft,!0),nn(re,"scroll",re))}),$t(ce.scroller,"mousewheel",function(kt){return Za(re,kt)}),$t(ce.scroller,"DOMMouseScroll",function(kt){return Za(re,kt)}),$t(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(kt){Wt(re,kt)||kr(kt)},over:function(kt){Wt(re,kt)||($g(re,kt),kr(kt))},start:function(kt){return Yg(re,kt)},drop:Da(re,vp),leave:function(kt){Wt(re,kt)||Jg(re)}};var Lt=ce.input.getField();$t(Lt,"keyup",function(kt){return Mp.call(re,kt)}),$t(Lt,"keydown",Da(re,kp)),$t(Lt,"keypress",Da(re,eu)),$t(Lt,"focus",function(kt){return ho(re,kt)}),$t(Lt,"blur",function(kt){return Du(re,kt)})}var ec=[];po.defineInitHook=function(re){return ec.push(re)};function Ba(re,ce,Ee,be){var Oe=re.doc,qe;Ee==null&&(Ee="add"),Ee=="smart"&&(Oe.mode.indent?qe=ki(re,ce).state:Ee="prev");var vt=re.options.tabSize,Lt=sr(Oe,ce),kt=$e(Lt.text,null,vt);Lt.stateAfter&&(Lt.stateAfter=null);var Rt=Lt.text.match(/^\s*/)[0],rn;if(!be&&!/\S/.test(Lt.text))rn=0,Ee="not";else if(Ee=="smart"&&(rn=Oe.mode.indent(qe,Lt.text.slice(Rt.length),Lt.text),rn==wt||rn>150)){if(!be)return;Ee="prev"}Ee=="prev"?ce>Oe.first?rn=$e(sr(Oe,ce-1).text,null,vt):rn=0:Ee=="add"?rn=kt+re.options.indentUnit:Ee=="subtract"?rn=kt-re.options.indentUnit:typeof Ee=="number"&&(rn=kt+Ee),rn=Math.max(0,rn);var zt="",xn=0;if(re.options.indentWithTabs)for(var fn=Math.floor(rn/vt);fn;--fn)xn+=vt,zt+=" ";if(xn<rn&&(zt+=yt(rn-xn)),zt!=Rt)return Zh(Oe,zt,en(ce,0),en(ce,Rt.length),"+input"),Lt.stateAfter=null,!0;for(var rr=0;rr<Oe.sel.ranges.length;rr++){var lr=Oe.sel.ranges[rr];if(lr.head.line==ce&&lr.head.ch<Rt.length){var vr=en(ce,Rt.length);fh(Oe,rr,new To(vr,vr));break}}}var Is=null;function tc(re){Is=re}function Tf(re,ce,Ee,be,Oe){var qe=re.doc;re.display.shift=!1,be||(be=qe.sel);var vt=+new Date-200,Lt=Oe=="paste"||re.state.pasteIncoming>vt,kt=Xi(ce),Rt=null;if(Lt&&be.ranges.length>1)if(Is&&Is.text.join(`
`)==ce){if(be.ranges.length%Is.text.length==0){Rt=[];for(var rn=0;rn<Is.text.length;rn++)Rt.push(qe.splitLines(Is.text[rn]))}}else kt.length==be.ranges.length&&re.options.pasteLinesPerSelection&&(Rt=xt(kt,function(Nr){return[Nr]}));for(var zt=re.curOp.updateInput,xn=be.ranges.length-1;xn>=0;xn--){var fn=be.ranges[xn],rr=fn.from(),lr=fn.to();fn.empty()&&(Ee&&Ee>0?rr=en(rr.line,rr.ch-Ee):re.state.overwrite&&!Lt?lr=en(lr.line,Math.min(sr(qe,lr.line).text.length,lr.ch+At(kt).length)):Lt&&Is&&Is.lineWise&&Is.text.join(`
`)==kt.join(`
`)&&(rr=lr=en(rr.line,0)));var vr={from:rr,to:lr,text:Rt?Rt[xn%Rt.length]:kt,origin:Oe||(Lt?"paste":re.state.cutIncoming>vt?"cut":"+input")};dh(re.doc,vr),Br(re,"inputRead",re,vr)}ce&&!Lt&&Bp(re,ce),Ol(re),re.curOp.updateInput<2&&(re.curOp.updateInput=zt),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function Dp(re,ce){var Ee=re.clipboardData&&re.clipboardData.getData("Text");if(Ee)return re.preventDefault(),!ce.isReadOnly()&&!ce.options.disableInput&&yo(ce,function(){return Tf(ce,Ee,0,null,"paste")}),!0}function Bp(re,ce){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Ee=re.doc.sel,be=Ee.ranges.length-1;be>=0;be--){var Oe=Ee.ranges[be];if(!(Oe.head.ch>100||be&&Ee.ranges[be-1].head.line==Oe.head.line)){var qe=re.getModeAt(Oe.head),vt=!1;if(qe.electricChars){for(var Lt=0;Lt<qe.electricChars.length;Lt++)if(ce.indexOf(qe.electricChars.charAt(Lt))>-1){vt=Ba(re,Oe.head.line,"smart");break}}else qe.electricInput&&qe.electricInput.test(sr(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(vt=Ba(re,Oe.head.line,"smart"));vt&&Br(re,"electricInput",re,Oe.head.line)}}}function Ip(re){for(var ce=[],Ee=[],be=0;be<re.doc.sel.ranges.length;be++){var Oe=re.doc.sel.ranges[be].head.line,qe={anchor:en(Oe,0),head:en(Oe+1,0)};Ee.push(qe),ce.push(re.getRange(qe.anchor,qe.head))}return{text:ce,ranges:Ee}}function Rp(re,ce,Ee,be){re.setAttribute("autocorrect",Ee?"":"off"),re.setAttribute("autocapitalize",be?"":"off"),re.setAttribute("spellcheck",!!ce)}function _p(){var re=Ae("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ce=Ae("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return me?re.style.width="1000px":re.setAttribute("wrap","off"),de&&(re.style.border="1px solid black"),Rp(re),ce}function mh(re){var ce=re.optionHandlers,Ee=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(be,Oe){var qe=this.options,vt=qe[be];qe[be]==Oe&&be!="mode"||(qe[be]=Oe,ce.hasOwnProperty(be)&&Da(this,ce[be])(this,Oe,vt),nn(this,"optionChange",this,be))},getOption:function(be){return this.options[be]},getDoc:function(){return this.doc},addKeyMap:function(be,Oe){this.state.keyMaps[Oe?"push":"unshift"]($h(be))},removeKeyMap:function(be){for(var Oe=this.state.keyMaps,qe=0;qe<Oe.length;++qe)if(Oe[qe]==be||Oe[qe].name==be)return Oe.splice(qe,1),!0},addOverlay:Wa(function(be,Oe){var qe=be.token?be:re.getMode(this.options,be);if(qe.startState)throw new Error("Overlays may not be stateful.");tt(this.state.overlays,{mode:qe,modeSpec:be,opaque:Oe&&Oe.opaque,priority:Oe&&Oe.priority||0},function(vt){return vt.priority}),this.state.modeGen++,Fo(this)}),removeOverlay:Wa(function(be){for(var Oe=this.state.overlays,qe=0;qe<Oe.length;++qe){var vt=Oe[qe].modeSpec;if(vt==be||typeof be=="string"&&vt.name==be){Oe.splice(qe,1),this.state.modeGen++,Fo(this);return}}}),indentLine:Wa(function(be,Oe,qe){typeof Oe!="string"&&typeof Oe!="number"&&(Oe==null?Oe=this.options.smartIndent?"smart":"prev":Oe=Oe?"add":"subtract"),Dn(this.doc,be)&&Ba(this,be,Oe,qe)}),indentSelection:Wa(function(be){for(var Oe=this.doc.sel.ranges,qe=-1,vt=0;vt<Oe.length;vt++){var Lt=Oe[vt];if(Lt.empty())Lt.head.line>qe&&(Ba(this,Lt.head.line,be,!0),qe=Lt.head.line,vt==this.doc.sel.primIndex&&Ol(this));else{var kt=Lt.from(),Rt=Lt.to(),rn=Math.max(qe,kt.line);qe=Math.min(this.lastLine(),Rt.line-(Rt.ch?0:1))+1;for(var zt=rn;zt<qe;++zt)Ba(this,zt,be);var xn=this.doc.sel.ranges;kt.ch==0&&Oe.length==xn.length&&xn[vt].from().ch>0&&fh(this.doc,vt,new To(kt,xn[vt].to()),pt)}}}),getTokenAt:function(be,Oe){return Yr(this,be,Oe)},getLineTokens:function(be,Oe){return Yr(this,en(be),Oe,!0)},getTokenTypeAt:function(be){be=ur(this.doc,be);var Oe=qr(this,sr(this.doc,be.line)),qe=0,vt=(Oe.length-1)/2,Lt=be.ch,kt;if(Lt==0)kt=Oe[2];else for(;;){var Rt=qe+vt>>1;if((Rt?Oe[Rt*2-1]:0)>=Lt)vt=Rt;else if(Oe[Rt*2+1]<Lt)qe=Rt+1;else{kt=Oe[Rt*2+2];break}}var rn=kt?kt.indexOf("overlay "):-1;return rn<0?kt:rn==0?null:kt.slice(0,rn-1)},getModeAt:function(be){var Oe=this.doc.mode;return Oe.innerMode?re.innerMode(Oe,this.getTokenAt(be).state).mode:Oe},getHelper:function(be,Oe){return this.getHelpers(be,Oe)[0]},getHelpers:function(be,Oe){var qe=[];if(!Ee.hasOwnProperty(Oe))return qe;var vt=Ee[Oe],Lt=this.getModeAt(be);if(typeof Lt[Oe]=="string")vt[Lt[Oe]]&&qe.push(vt[Lt[Oe]]);else if(Lt[Oe])for(var kt=0;kt<Lt[Oe].length;kt++){var Rt=vt[Lt[Oe][kt]];Rt&&qe.push(Rt)}else Lt.helperType&&vt[Lt.helperType]?qe.push(vt[Lt.helperType]):vt[Lt.name]&&qe.push(vt[Lt.name]);for(var rn=0;rn<vt._global.length;rn++){var zt=vt._global[rn];zt.pred(Lt,this)&&St(qe,zt.val)==-1&&qe.push(zt.val)}return qe},getStateAfter:function(be,Oe){var qe=this.doc;return be=Xn(qe,be==null?qe.first+qe.size-1:be),ki(this,be+1,Oe).state},cursorCoords:function(be,Oe){var qe,vt=this.doc.sel.primary();return be==null?qe=vt.head:typeof be=="object"?qe=ur(this.doc,be):qe=be?vt.from():vt.to(),co(this,qe,Oe||"page")},charCoords:function(be,Oe){return Ga(this,ur(this.doc,be),Oe||"page")},coordsChar:function(be,Oe){return be=Xl(this,be,Oe||"page"),sa(this,be.left,be.top)},lineAtHeight:function(be,Oe){return be=Xl(this,{top:be,left:0},Oe||"page").top,Kt(this.doc,be+this.display.viewOffset)},heightAtLine:function(be,Oe,qe){var vt=!1,Lt;if(typeof be=="number"){var kt=this.doc.first+this.doc.size-1;be<this.doc.first?be=this.doc.first:be>kt&&(be=kt,vt=!0),Lt=sr(this.doc,be)}else Lt=be;return ga(this,Lt,{top:0,left:0},Oe||"page",qe||vt).top+(vt?this.doc.height-Er(Lt):0)},defaultTextHeight:function(){return Pa(this.display)},defaultCharWidth:function(){return Fs(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(be,Oe,qe,vt,Lt){var kt=this.display;be=co(this,ur(this.doc,be));var Rt=be.bottom,rn=be.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),kt.sizer.appendChild(Oe),vt=="over")Rt=be.top;else if(vt=="above"||vt=="near"){var zt=Math.max(kt.wrapper.clientHeight,this.doc.height),xn=Math.max(kt.sizer.clientWidth,kt.lineSpace.clientWidth);(vt=="above"||be.bottom+Oe.offsetHeight>zt)&&be.top>Oe.offsetHeight?Rt=be.top-Oe.offsetHeight:be.bottom+Oe.offsetHeight<=zt&&(Rt=be.bottom),rn+Oe.offsetWidth>xn&&(rn=xn-Oe.offsetWidth)}Oe.style.top=Rt+"px",Oe.style.left=Oe.style.right="",Lt=="right"?(rn=kt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Lt=="left"?rn=0:Lt=="middle"&&(rn=(kt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=rn+"px"),qe&&ih(this,{left:rn,top:Rt,right:rn+Oe.offsetWidth,bottom:Rt+Oe.offsetHeight})},triggerOnKeyDown:Wa(kp),triggerOnKeyPress:Wa(eu),triggerOnKeyUp:Mp,triggerOnMouseDown:Wa(tu),execCommand:function(be){if(ph.hasOwnProperty(be))return ph[be].call(null,this)},triggerElectric:Wa(function(be){Bp(this,be)}),findPosH:function(be,Oe,qe,vt){var Lt=1;Oe<0&&(Lt=-1,Oe=-Oe);for(var kt=ur(this.doc,be),Rt=0;Rt<Oe&&(kt=Mf(this.doc,kt,Lt,qe,vt),!kt.hitSide);++Rt);return kt},moveH:Wa(function(be,Oe){var qe=this;this.extendSelectionsBy(function(vt){return qe.display.shift||qe.doc.extend||vt.empty()?Mf(qe.doc,vt.head,be,Oe,qe.options.rtlMoveVisually):be<0?vt.from():vt.to()},ht)}),deleteH:Wa(function(be,Oe){var qe=this.doc.sel,vt=this.doc;qe.somethingSelected()?vt.replaceSelection("",null,"+delete"):Zs(this,function(Lt){var kt=Mf(vt,Lt.head,be,Oe,!1);return be<0?{from:kt,to:Lt.head}:{from:Lt.head,to:kt}})}),findPosV:function(be,Oe,qe,vt){var Lt=1,kt=vt;Oe<0&&(Lt=-1,Oe=-Oe);for(var Rt=ur(this.doc,be),rn=0;rn<Oe;++rn){var zt=co(this,Rt,"div");if(kt==null?kt=zt.left:zt.left=kt,Rt=vh(this,zt,Lt,qe),Rt.hitSide)break}return Rt},moveV:Wa(function(be,Oe){var qe=this,vt=this.doc,Lt=[],kt=!this.display.shift&&!vt.extend&&vt.sel.somethingSelected();if(vt.extendSelectionsBy(function(rn){if(kt)return be<0?rn.from():rn.to();var zt=co(qe,rn.head,"div");rn.goalColumn!=null&&(zt.left=rn.goalColumn),Lt.push(zt.left);var xn=vh(qe,zt,be,Oe);return Oe=="page"&&rn==vt.sel.primary()&&_h(qe,Ga(qe,xn,"div").top-zt.top),xn},ht),Lt.length)for(var Rt=0;Rt<vt.sel.ranges.length;Rt++)vt.sel.ranges[Rt].goalColumn=Lt[Rt]}),findWordAt:function(be){var Oe=this.doc,qe=sr(Oe,be.line).text,vt=be.ch,Lt=be.ch;if(qe){var kt=this.getHelper(be,"wordChars");(be.sticky=="before"||Lt==qe.length)&&vt?--vt:++Lt;for(var Rt=qe.charAt(vt),rn=nt(Rt,kt)?function(zt){return nt(zt,kt)}:/\s/.test(Rt)?function(zt){return/\s/.test(zt)}:function(zt){return!/\s/.test(zt)&&!nt(zt)};vt>0&&rn(qe.charAt(vt-1));)--vt;for(;Lt<qe.length&&rn(qe.charAt(Lt));)++Lt}return new To(en(be.line,vt),en(be.line,Lt))},toggleOverwrite:function(be){be!=null&&be==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ke(this.display.cursorDiv,"CodeMirror-overwrite"):Be(this.display.cursorDiv,"CodeMirror-overwrite"),nn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ue()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Wa(function(be,Oe){Bu(this,be,Oe)}),getScrollInfo:function(){var be=this.display.scroller;return{left:be.scrollLeft,top:be.scrollTop,height:be.scrollHeight-vo(this)-this.display.barHeight,width:be.scrollWidth-vo(this)-this.display.barWidth,clientHeight:ds(this),clientWidth:fs(this)}},scrollIntoView:Wa(function(be,Oe){be==null?(be={from:this.doc.sel.primary().head,to:null},Oe==null&&(Oe=this.options.cursorScrollMargin)):typeof be=="number"?be={from:en(be,0),to:null}:be.from==null&&(be={from:be,to:null}),be.to||(be.to=be.from),be.margin=Oe||0,be.from.line!=null?uo(this,be):zh(this,be.from,be.to,be.margin)}),setSize:Wa(function(be,Oe){var qe=this,vt=function(kt){return typeof kt=="number"||/^\d+$/.test(String(kt))?kt+"px":kt};be!=null&&(this.display.wrapper.style.width=vt(be)),Oe!=null&&(this.display.wrapper.style.height=vt(Oe)),this.options.lineWrapping&&Zl(this);var Lt=this.display.viewFrom;this.doc.iter(Lt,this.display.viewTo,function(kt){if(kt.widgets){for(var Rt=0;Rt<kt.widgets.length;Rt++)if(kt.widgets[Rt].noHScroll){zi(qe,Lt,"widget");break}}++Lt}),this.curOp.forceUpdate=!0,nn(this,"refresh",this)}),operation:function(be){return yo(this,be)},startOperation:function(){return sl(this)},endOperation:function(){return Fl(this)},refresh:Wa(function(){var be=this.display.cachedTextHeight;Fo(this),this.curOp.forceUpdate=!0,uu(this),Bu(this,this.doc.scrollLeft,this.doc.scrollTop),sh(this.display),(be==null||Math.abs(be-Pa(this.display))>.5||this.options.lineWrapping)&&fi(this),nn(this,"refresh",this)}),swapDoc:Wa(function(be){var Oe=this.doc;return Oe.cm=null,this.state.selectingText&&this.state.selectingText(),rd(this,be),uu(this),this.display.input.reset(),Bu(this,be.scrollLeft,be.scrollTop),this.curOp.forceScroll=!0,Br(this,"swapDoc",this,Oe),Oe}),phrase:function(be){var Oe=this.options.phrases;return Oe&&Object.prototype.hasOwnProperty.call(Oe,be)?Oe[be]:be},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}},jn(re),re.registerHelper=function(be,Oe,qe){Ee.hasOwnProperty(be)||(Ee[be]=re[be]={_global:[]}),Ee[be][Oe]=qe},re.registerGlobalHelper=function(be,Oe,qe,vt){re.registerHelper(be,Oe,vt),Ee[be]._global.push({pred:qe,val:vt})}}function Mf(re,ce,Ee,be,Oe){var qe=ce,vt=Ee,Lt=sr(re,ce.line),kt=Oe&&re.direction=="rtl"?-Ee:Ee;function Rt(){var Jr=ce.line+kt;return Jr<re.first||Jr>=re.first+re.size?!1:(ce=new en(Jr,ce.ch,ce.sticky),Lt=sr(re,Jr))}function rn(Jr){var Gr;if(be=="codepoint"){var si=Lt.text.charCodeAt(ce.ch+(be>0?0:-1));isNaN(si)?Gr=null:Gr=new en(ce.line,Math.max(0,Math.min(Lt.text.length,ce.ch+Ee*(si>=55296&&si<56320?2:1))),-Ee)}else Oe?Gr=cd(re.cm,Lt,ce,Ee):Gr=Sa(Lt,ce,Ee);if(Gr==null)if(!Jr&&Rt())ce=Ef(Oe,re.cm,Lt,ce.line,kt);else return!1;else ce=Gr;return!0}if(be=="char"||be=="codepoint")rn();else if(be=="column")rn(!0);else if(be=="word"||be=="group")for(var zt=null,xn=be=="group",fn=re.cm&&re.cm.getHelper(ce,"wordChars"),rr=!0;!(Ee<0&&!rn(!rr));rr=!1){var lr=Lt.text.charAt(ce.ch)||`
`,vr=nt(lr,fn)?"w":xn&&lr==`
`?"n":!xn||/\s/.test(lr)?null:"p";if(xn&&!rr&&!vr&&(vr="s"),zt&&zt!=vr){Ee<0&&(Ee=1,rn(),ce.sticky="after");break}if(vr&&(zt=vr),Ee>0&&!rn(!rr))break}var Nr=Sf(re,ce,qe,vt,!0);return Bn(qe,Nr)&&(Nr.hitSide=!0),Nr}function vh(re,ce,Ee,be){var Oe=re.doc,qe=ce.left,vt;if(be=="page"){var Lt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),kt=Math.max(Lt-.5*Pa(re.display),3);vt=(Ee>0?ce.bottom:ce.top)+Ee*kt}else be=="line"&&(vt=Ee>0?ce.bottom+3:ce.top-3);for(var Rt;Rt=sa(re,qe,vt),!!Rt.outside;){if(Ee<0?vt<=0:vt>=Oe.height){Rt.hitSide=!0;break}vt+=Ee*5}return Rt}var Do=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new rt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Do.prototype.init=function(re){var ce=this,Ee=this,be=Ee.cm,Oe=Ee.div=re.lineDiv;Rp(Oe,be.options.spellcheck,be.options.autocorrect,be.options.autocapitalize);function qe(Lt){for(var kt=Lt.target;kt;kt=kt.parentNode){if(kt==Oe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(kt.className))break}return!1}$t(Oe,"paste",function(Lt){!qe(Lt)||Wt(be,Lt)||Dp(Lt,be)||fe<=11&&setTimeout(Da(be,function(){return ce.updateFromDOM()}),20)}),$t(Oe,"compositionstart",function(Lt){ce.composing={data:Lt.data,done:!1}}),$t(Oe,"compositionupdate",function(Lt){ce.composing||(ce.composing={data:Lt.data,done:!1})}),$t(Oe,"compositionend",function(Lt){ce.composing&&(Lt.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),$t(Oe,"touchstart",function(){return Ee.forceCompositionEnd()}),$t(Oe,"input",function(){ce.composing||ce.readFromDOMSoon()});function vt(Lt){if(!(!qe(Lt)||Wt(be,Lt))){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()}),Lt.type=="cut"&&be.replaceSelection("",null,"cut");else if(be.options.lineWiseCopyCut){var kt=Ip(be);tc({lineWise:!0,text:kt.text}),Lt.type=="cut"&&be.operation(function(){be.setSelections(kt.ranges,0,pt),be.replaceSelection("",null,"cut")})}else return;if(Lt.clipboardData){Lt.clipboardData.clearData();var Rt=Is.text.join(`
`);if(Lt.clipboardData.setData("Text",Rt),Lt.clipboardData.getData("Text")==Rt){Lt.preventDefault();return}}var rn=_p(),zt=rn.firstChild;be.display.lineSpace.insertBefore(rn,be.display.lineSpace.firstChild),zt.value=Is.text.join(`
`);var xn=document.activeElement;st(zt),setTimeout(function(){be.display.lineSpace.removeChild(rn),xn.focus(),xn==Oe&&Ee.showPrimarySelection()},50)}}$t(Oe,"copy",vt),$t(Oe,"cut",vt)},Do.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Do.prototype.prepareSelection=function(){var re=hu(this.cm,!1);return re.focus=document.activeElement==this.div,re},Do.prototype.showSelection=function(re,ce){!re||!this.cm.display.view.length||((re.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Do.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Do.prototype.showPrimarySelection=function(){var re=this.getSelection(),ce=this.cm,Ee=ce.doc.sel.primary(),be=Ee.from(),Oe=Ee.to();if(ce.display.viewTo==ce.display.viewFrom||be.line>=ce.display.viewTo||Oe.line<ce.display.viewFrom){re.removeAllRanges();return}var qe=Lf(ce,re.anchorNode,re.anchorOffset),vt=Lf(ce,re.focusNode,re.focusOffset);if(!(qe&&!qe.bad&&vt&&!vt.bad&&Un(_n(qe,vt),be)==0&&Un(nr(qe,vt),Oe)==0)){var Lt=ce.display.view,kt=be.line>=ce.display.viewFrom&&wd(ce,be)||{node:Lt[0].measure.map[2],offset:0},Rt=Oe.line<ce.display.viewTo&&wd(ce,Oe);if(!Rt){var rn=Lt[Lt.length-1].measure,zt=rn.maps?rn.maps[rn.maps.length-1]:rn.map;Rt={node:zt[zt.length-1],offset:zt[zt.length-2]-zt[zt.length-3]}}if(!kt||!Rt){re.removeAllRanges();return}var xn=re.rangeCount&&re.getRangeAt(0),fn;try{fn=We(kt.node,kt.offset,Rt.offset,Rt.node)}catch(rr){}fn&&(!ct&&ce.state.focused?(re.collapse(kt.node,kt.offset),fn.collapsed||(re.removeAllRanges(),re.addRange(fn))):(re.removeAllRanges(),re.addRange(fn)),xn&&re.anchorNode==null?re.addRange(xn):ct&&this.startGracePeriod()),this.rememberSelection()}},Do.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)},Do.prototype.showMultipleSelections=function(re){Ne(this.cm.display.cursorDiv,re.cursors),Ne(this.cm.display.selectionDiv,re.selection)},Do.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Do.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var ce=re.getRangeAt(0).commonAncestorContainer;return Ye(this.div,ce)},Do.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Do.prototype.blur=function(){this.div.blur()},Do.prototype.getField=function(){return this.div},Do.prototype.supportsTouch=function(){return!0},Do.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():yo(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)},Do.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Do.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),ce=this.cm;if(z&&Ce&&this.cm.display.gutterSpecs.length&&zp(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Ee=Lf(ce,re.anchorNode,re.anchorOffset),be=Lf(ce,re.focusNode,re.focusOffset);Ee&&be&&yo(ce,function(){gs(ce.doc,Iu(Ee,be),pt),(Ee.bad||be.bad)&&(ce.curOp.selectionChanged=!0)})}}},Do.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,ce=re.display,Ee=re.doc.sel.primary(),be=Ee.from(),Oe=Ee.to();if(be.ch==0&&be.line>re.firstLine()&&(be=en(be.line-1,sr(re.doc,be.line-1).length)),Oe.ch==sr(re.doc,Oe.line).text.length&&Oe.line<re.lastLine()&&(Oe=en(Oe.line+1,0)),be.line<ce.viewFrom||Oe.line>ce.viewTo-1)return!1;var qe,vt,Lt;be.line==ce.viewFrom||(qe=Ds(re,be.line))==0?(vt=Ot(ce.view[0].line),Lt=ce.view[0].node):(vt=Ot(ce.view[qe].line),Lt=ce.view[qe-1].node.nextSibling);var kt=Ds(re,Oe.line),Rt,rn;if(kt==ce.view.length-1?(Rt=ce.viewTo-1,rn=ce.lineDiv.lastChild):(Rt=Ot(ce.view[kt+1].line)-1,rn=ce.view[kt+1].node.previousSibling),!Lt)return!1;for(var zt=re.doc.splitLines(Uc(re,Lt,rn,vt,Rt)),xn=Wr(re.doc,en(vt,0),en(Rt,sr(re.doc,Rt).text.length));zt.length>1&&xn.length>1;)if(At(zt)==At(xn))zt.pop(),xn.pop(),Rt--;else if(zt[0]==xn[0])zt.shift(),xn.shift(),vt++;else break;for(var fn=0,rr=0,lr=zt[0],vr=xn[0],Nr=Math.min(lr.length,vr.length);fn<Nr&&lr.charCodeAt(fn)==vr.charCodeAt(fn);)++fn;for(var Jr=At(zt),Gr=At(xn),si=Math.min(Jr.length-(zt.length==1?fn:0),Gr.length-(xn.length==1?fn:0));rr<si&&Jr.charCodeAt(Jr.length-rr-1)==Gr.charCodeAt(Gr.length-rr-1);)++rr;if(zt.length==1&&xn.length==1&&vt==be.line)for(;fn&&fn>be.ch&&Jr.charCodeAt(Jr.length-rr-1)==Gr.charCodeAt(Gr.length-rr-1);)fn--,rr++;zt[zt.length-1]=Jr.slice(0,Jr.length-rr).replace(/^\u200b+/,""),zt[0]=zt[0].slice(fn).replace(/\u200b+$/,"");var ji=en(vt,fn),_r=en(Rt,xn.length?At(xn).length-rr:0);if(zt.length>1||zt[0]||Un(ji,_r))return Zh(re.doc,zt,ji,_r,"+input"),!0},Do.prototype.ensurePolled=function(){this.forceCompositionEnd()},Do.prototype.reset=function(){this.forceCompositionEnd()},Do.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Do.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))},Do.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&yo(this.cm,function(){return Fo(re.cm)})},Do.prototype.setUneditable=function(re){re.contentEditable="false"},Do.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Da(this.cm,Tf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Do.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Do.prototype.onContextMenu=function(){},Do.prototype.resetPosition=function(){},Do.prototype.needsContentAttribute=!0;function wd(re,ce){var Ee=il(re,ce.line);if(!Ee||Ee.hidden)return null;var be=sr(re.doc,ce.line),Oe=na(Ee,be,ce.line),qe=Ht(be,re.doc.direction),vt="left";if(qe){var Lt=Nt(qe,ce.ch);vt=Lt%2?"right":"left"}var kt=th(Oe.map,ce.ch,vt);return kt.offset=kt.collapse=="right"?kt.end:kt.start,kt}function zp(re){for(var ce=re;ce;ce=ce.parentNode)if(/CodeMirror-gutter-wrapper/.test(ce.className))return!0;return!1}function Gc(re,ce){return ce&&(re.bad=!0),re}function Uc(re,ce,Ee,be,Oe){var qe="",vt=!1,Lt=re.doc.lineSeparator(),kt=!1;function Rt(fn){return function(rr){return rr.id==fn}}function rn(){vt&&(qe+=Lt,kt&&(qe+=Lt),vt=kt=!1)}function zt(fn){fn&&(rn(),qe+=fn)}function xn(fn){if(fn.nodeType==1){var rr=fn.getAttribute("cm-text");if(rr){zt(rr);return}var lr=fn.getAttribute("cm-marker"),vr;if(lr){var Nr=re.findMarks(en(be,0),en(Oe+1,0),Rt(+lr));Nr.length&&(vr=Nr[0].find(0))&&zt(Wr(re.doc,vr.from,vr.to).join(Lt));return}if(fn.getAttribute("contenteditable")=="false")return;var Jr=/^(pre|div|p|li|table|br)$/i.test(fn.nodeName);if(!/^br$/i.test(fn.nodeName)&&fn.textContent.length==0)return;Jr&&rn();for(var Gr=0;Gr<fn.childNodes.length;Gr++)xn(fn.childNodes[Gr]);/^(pre|p)$/i.test(fn.nodeName)&&(kt=!0),Jr&&(vt=!0)}else fn.nodeType==3&&zt(fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;xn(ce),ce!=Ee;)ce=ce.nextSibling,kt=!1;return qe}function Lf(re,ce,Ee){var be;if(ce==re.display.lineDiv){if(be=re.display.lineDiv.childNodes[Ee],!be)return Gc(re.clipPos(en(re.display.viewTo-1)),!0);ce=null,Ee=0}else for(be=ce;;be=be.parentNode){if(!be||be==re.display.lineDiv)return null;if(be.parentNode&&be.parentNode==re.display.lineDiv)break}for(var Oe=0;Oe<re.display.view.length;Oe++){var qe=re.display.view[Oe];if(qe.node==be)return am(qe,ce,Ee)}}function am(re,ce,Ee){var be=re.text.firstChild,Oe=!1;if(!ce||!Ye(be,ce))return Gc(en(Ot(re.line),0),!0);if(ce==be&&(Oe=!0,ce=be.childNodes[Ee],Ee=0,!ce)){var qe=re.rest?At(re.rest):re.line;return Gc(en(Ot(qe),qe.text.length),Oe)}var vt=ce.nodeType==3?ce:null,Lt=ce;for(!vt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(vt=ce.firstChild,Ee&&(Ee=vt.nodeValue.length));Lt.parentNode!=be;)Lt=Lt.parentNode;var kt=re.measure,Rt=kt.maps;function rn(vr,Nr,Jr){for(var Gr=-1;Gr<(Rt?Rt.length:0);Gr++)for(var si=Gr<0?kt.map:Rt[Gr],ji=0;ji<si.length;ji+=3){var _r=si[ji+2];if(_r==vr||_r==Nr){var eo=Ot(Gr<0?re.line:re.rest[Gr]),Yo=si[ji]+Jr;return(Jr<0||_r!=vr)&&(Yo=si[ji+(Jr?1:0)]),en(eo,Yo)}}}var zt=rn(vt,Lt,Ee);if(zt)return Gc(zt,Oe);for(var xn=Lt.nextSibling,fn=vt?vt.nodeValue.length-Ee:0;xn;xn=xn.nextSibling){if(zt=rn(xn,xn.firstChild,0),zt)return Gc(en(zt.line,zt.ch-fn),Oe);fn+=xn.textContent.length}for(var rr=Lt.previousSibling,lr=Ee;rr;rr=rr.previousSibling){if(zt=rn(rr,rr.firstChild,-1),zt)return Gc(en(zt.line,zt.ch+lr),Oe);lr+=rr.textContent.length}}var Ta=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new rt,this.hasSelection=!1,this.composing=null};Ta.prototype.init=function(re){var ce=this,Ee=this,be=this.cm;this.createField(re);var Oe=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),de&&(Oe.style.width="0px"),$t(Oe,"input",function(){De&&fe>=9&&ce.hasSelection&&(ce.hasSelection=null),Ee.poll()}),$t(Oe,"paste",function(vt){Wt(be,vt)||Dp(vt,be)||(be.state.pasteIncoming=+new Date,Ee.fastPoll())});function qe(vt){if(!Wt(be,vt)){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()});else if(be.options.lineWiseCopyCut){var Lt=Ip(be);tc({lineWise:!0,text:Lt.text}),vt.type=="cut"?be.setSelections(Lt.ranges,null,pt):(Ee.prevInput="",Oe.value=Lt.text.join(`
`),st(Oe))}else return;vt.type=="cut"&&(be.state.cutIncoming=+new Date)}}$t(Oe,"cut",qe),$t(Oe,"copy",qe),$t(re.scroller,"paste",function(vt){if(!(jo(re,vt)||Wt(be,vt))){if(!Oe.dispatchEvent){be.state.pasteIncoming=+new Date,Ee.focus();return}var Lt=new Event("paste");Lt.clipboardData=vt.clipboardData,Oe.dispatchEvent(Lt)}}),$t(re.lineSpace,"selectstart",function(vt){jo(re,vt)||Jn(vt)}),$t(Oe,"compositionstart",function(){var vt=be.getCursor("from");Ee.composing&&Ee.composing.range.clear(),Ee.composing={start:vt,range:be.markText(vt,be.getCursor("to"),{className:"CodeMirror-composing"})}}),$t(Oe,"compositionend",function(){Ee.composing&&(Ee.poll(),Ee.composing.range.clear(),Ee.composing=null)})},Ta.prototype.createField=function(re){this.wrapper=_p(),this.textarea=this.wrapper.firstChild},Ta.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Ta.prototype.prepareSelection=function(){var re=this.cm,ce=re.display,Ee=re.doc,be=hu(re);if(re.options.moveInputWithCursor){var Oe=co(re,Ee.sel.primary().head,"div"),qe=ce.wrapper.getBoundingClientRect(),vt=ce.lineDiv.getBoundingClientRect();be.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Oe.top+vt.top-qe.top)),be.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Oe.left+vt.left-qe.left))}return be},Ta.prototype.showSelection=function(re){var ce=this.cm,Ee=ce.display;Ne(Ee.cursorDiv,re.cursors),Ne(Ee.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Ta.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var ce=this.cm;if(ce.somethingSelected()){this.prevInput="";var Ee=ce.getSelection();this.textarea.value=Ee,ce.state.focused&&st(this.textarea),De&&fe>=9&&(this.hasSelection=Ee)}else re||(this.prevInput=this.textarea.value="",De&&fe>=9&&(this.hasSelection=null))}},Ta.prototype.getField=function(){return this.textarea},Ta.prototype.supportsTouch=function(){return!1},Ta.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||Ue()!=this.textarea))try{this.textarea.focus()}catch(re){}},Ta.prototype.blur=function(){this.textarea.blur()},Ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ta.prototype.receivedFocus=function(){this.slowPoll()},Ta.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Ta.prototype.fastPoll=function(){var re=!1,ce=this;ce.pollingFast=!0;function Ee(){var be=ce.poll();!be&&!re?(re=!0,ce.polling.set(60,Ee)):(ce.pollingFast=!1,ce.slowPoll())}ce.polling.set(20,Ee)},Ta.prototype.poll=function(){var re=this,ce=this.cm,Ee=this.textarea,be=this.prevInput;if(this.contextMenuPending||!ce.state.focused||et(Ee)&&!be&&!this.composing||ce.isReadOnly()||ce.options.disableInput||ce.state.keySeq)return!1;var Oe=Ee.value;if(Oe==be&&!ce.somethingSelected())return!1;if(De&&fe>=9&&this.hasSelection===Oe||ae&&/[\uf700-\uf7ff]/.test(Oe))return ce.display.input.reset(),!1;if(ce.doc.sel==ce.display.selForContextMenu){var qe=Oe.charCodeAt(0);if(qe==8203&&!be&&(be="\u200B"),qe==8666)return this.reset(),this.cm.execCommand("undo")}for(var vt=0,Lt=Math.min(be.length,Oe.length);vt<Lt&&be.charCodeAt(vt)==Oe.charCodeAt(vt);)++vt;return yo(ce,function(){Tf(ce,Oe.slice(vt),be.length-vt,null,re.composing?"*compose":null),Oe.length>1e3||Oe.indexOf(`
`)>-1?Ee.value=re.prevInput="":re.prevInput=Oe,re.composing&&(re.composing.range.clear(),re.composing.range=ce.markText(re.composing.start,ce.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ta.prototype.onKeyPress=function(){De&&fe>=9&&(this.hasSelection=null),this.fastPoll()},Ta.prototype.onContextMenu=function(re){var ce=this,Ee=ce.cm,be=Ee.display,Oe=ce.textarea;ce.contextMenuPending&&ce.contextMenuPending();var qe=Ua(Ee,re),vt=be.scroller.scrollTop;if(!qe||Se)return;var Lt=Ee.options.resetSelectionOnContextMenu;Lt&&Ee.doc.sel.contains(qe)==-1&&Da(Ee,gs)(Ee.doc,Iu(qe),pt);var kt=Oe.style.cssText,Rt=ce.wrapper.style.cssText,rn=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(re.clientY-rn.top-5)+"px; left: "+(re.clientX-rn.left-5)+`px;
z-index: 1000; background: `+(De?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var zt;me&&(zt=window.scrollY),be.input.focus(),me&&window.scrollTo(null,zt),be.input.reset(),Ee.somethingSelected()||(Oe.value=ce.prevInput=" "),ce.contextMenuPending=fn,be.selForContextMenu=Ee.doc.sel,clearTimeout(be.detectingSelectAll);function xn(){if(Oe.selectionStart!=null){var lr=Ee.somethingSelected(),vr="\u200B"+(lr?Oe.value:"");Oe.value="\u21DA",Oe.value=vr,ce.prevInput=lr?"":"\u200B",Oe.selectionStart=1,Oe.selectionEnd=vr.length,be.selForContextMenu=Ee.doc.sel}}function fn(){if(ce.contextMenuPending==fn&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=Rt,Oe.style.cssText=kt,De&&fe<9&&be.scrollbars.setScrollTop(be.scroller.scrollTop=vt),Oe.selectionStart!=null)){(!De||De&&fe<9)&&xn();var lr=0,vr=function(){be.selForContextMenu==Ee.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&ce.prevInput=="\u200B"?Da(Ee,ya)(Ee):lr++<10?be.detectingSelectAll=setTimeout(vr,500):(be.selForContextMenu=null,be.input.reset())};be.detectingSelectAll=setTimeout(vr,200)}}if(De&&fe>=9&&xn(),Pe){kr(re);var rr=function(){sn(window,"mouseup",rr),setTimeout(fn,20)};$t(window,"mouseup",rr)}else setTimeout(fn,50)},Ta.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Ta.prototype.setUneditable=function(){},Ta.prototype.needsContentAttribute=!1;function sm(re,ce){if(ce=ce?Ct(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 Ee=Ue();ce.autofocus=Ee==re||re.getAttribute("autofocus")!=null&&Ee==document.body}function be(){re.value=Lt.getValue()}var Oe;if(re.form&&($t(re.form,"submit",be),!ce.leaveSubmitMethodAlone)){var qe=re.form;Oe=qe.submit;try{var vt=qe.submit=function(){be(),qe.submit=Oe,qe.submit(),qe.submit=vt}}catch(kt){}}ce.finishInit=function(kt){kt.save=be,kt.getTextArea=function(){return re},kt.toTextArea=function(){kt.toTextArea=isNaN,be(),re.parentNode.removeChild(kt.getWrapperElement()),re.style.display="",re.form&&(sn(re.form,"submit",be),!ce.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Oe))}},re.style.display="none";var Lt=po(function(kt){return re.parentNode.insertBefore(kt,re.nextSibling)},ce);return Lt}function Wc(re){re.off=sn,re.on=$t,re.wheelEventPixels=ul,re.Doc=os,re.splitLines=Xi,re.countColumn=$e,re.findColumn=Et,re.isWordChar=Ze,re.Pass=wt,re.signal=nn,re.Line=Si,re.changeEnd=hh,re.scrollbarModel=fu,re.Pos=en,re.cmpPos=Un,re.modes=ar,re.mimeModes=Sr,re.resolveMode=on,re.getMode=an,re.modeExtensions=tn,re.extendMode=vn,re.copyState=gr,re.startState=ii,re.innerMode=pr,re.commands=ph,re.keyMap=Vs,re.keyName=qg,re.isModifierKey=Dc,re.lookupKey=Pl,re.normalizeKeyMap=wp,re.StringStream=Mn,re.SharedTextMarker=gu,re.TextMarker=Zt,re.LineWidget=zu,re.e_preventDefault=Jn,re.e_stopPropagation=Cr,re.e_stop=kr,re.addClass=Ke,re.contains=Ye,re.rmClass=Be,re.keyNames=mu}im(po),mh(po);var Gu="iter insert remove copy getEditor constructor".split(" ");for(var Nf in os.prototype)os.prototype.hasOwnProperty(Nf)&&St(Gu,Nf)<0&&(po.prototype[Nf]=function(re){return function(){return re.apply(this.doc,arguments)}}(os.prototype[Nf]));return jn(os),po.inputStyles={textarea:Ta,contenteditable:Do},po.defineMode=function(re){!po.defaults.mode&&re!="null"&&(po.defaults.mode=re),Ar.apply(this,arguments)},po.defineMIME=lo,po.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),po.defineMIME("text/plain","null"),po.defineExtension=function(re,ce){po.prototype[re]=ce},po.defineDocExtension=function(re,ce){os.prototype[re]=ce},po.fromTextArea=sm,Wc(po),po.version="5.58.2",po})},25419:function(gn,cn,at){(function(ct){ct(at(89780),at(15525),at(98101))})(function(ct){"use strict";ct.defineMode("markdown",function(Bt,oe){var ze=ct.getMode(Bt,"text/html"),De=ze.name=="null";function fe($e){if(ct.findModeByName){var rt=ct.findModeByName($e);rt&&($e=rt.mime||rt.mimes[0])}var St=ct.getMode(Bt,$e);return St.name=="null"?null:St}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var me={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 ke in me)me.hasOwnProperty(ke)&&oe.tokenTypeOverrides[ke]&&(me[ke]=oe.tokenTypeOverrides[ke]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,Se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Me=/^\[(x| )\](?=\s)/i,ve=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,we=/^ {0,3}(?:\={1,}|-{2,})\s*$/,de=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,ae=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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($e,rt,St){return rt.f=rt.inline=St,St($e,rt)}function ue($e,rt,St){return rt.f=rt.block=St,St($e,rt)}function ge($e){return!$e||!/\S/.test($e.string)}function Pe($e){if($e.linkTitle=!1,$e.linkHref=!1,$e.linkText=!1,$e.em=!1,$e.strong=!1,$e.strikethrough=!1,$e.quote=0,$e.indentedCode=!1,$e.f==Be){var rt=De;if(!rt){var St=ct.innerMode(ze,$e.htmlState);rt=St.mode.name=="xml"&&St.state.tagStart===null&&!St.state.context&&St.state.tokenize.isInText}rt&&($e.f=Ie,$e.block=je,$e.htmlState=null)}return $e.trailingSpace=0,$e.trailingSpaceNewLine=!1,$e.prevLine=$e.thisLine,$e.thisLine={stream:null},null}function je($e,rt){var St=$e.column()===rt.indentation,Pt=ge(rt.prevLine.stream),wt=rt.indentedCode,pt=rt.prevLine.hr,ft=rt.list!==!1,ht=(rt.listStack[rt.listStack.length-1]||0)+3;rt.indentedCode=!1;var Et=rt.indentation;if(rt.indentationDiff===null&&(rt.indentationDiff=rt.indentation,ft)){for(rt.list=null;Et<rt.listStack[rt.listStack.length-1];)rt.listStack.pop(),rt.listStack.length?rt.indentation=rt.listStack[rt.listStack.length-1]:rt.list=!1;rt.list!==!1&&(rt.indentationDiff=Et-rt.listStack[rt.listStack.length-1])}var mt=!Pt&&!pt&&!rt.prevLine.header&&(!ft||!wt)&&!rt.prevLine.fencedCodeEnd,yt=(rt.list===!1||pt||Pt)&&rt.indentation<=ht&&$e.match(Ce),At=null;if(rt.indentationDiff>=4&&(wt||rt.prevLine.fencedCodeEnd||rt.prevLine.header||Pt))return $e.skipToEnd(),rt.indentedCode=!0,me.code;if($e.eatSpace())return null;if(St&&rt.indentation<=ht&&(At=$e.match(ve))&&At[1].length<=6)return rt.quote=0,rt.header=At[1].length,rt.thisLine.header=!0,oe.highlightFormatting&&(rt.formatting="header"),rt.f=rt.inline,Ne(rt);if(rt.indentation<=ht&&$e.eat(">"))return rt.quote=St?1:rt.quote+1,oe.highlightFormatting&&(rt.formatting="quote"),$e.eatSpace(),Ne(rt);if(!yt&&!rt.setext&&St&&rt.indentation<=ht&&(At=$e.match(Se))){var xt=At[1]?"ol":"ul";return rt.indentation=Et+$e.current().length,rt.list=!0,rt.quote=0,rt.listStack.push(rt.indentation),rt.em=!1,rt.strong=!1,rt.code=!1,rt.strikethrough=!1,oe.taskLists&&$e.match(Me,!1)&&(rt.taskList=!0),rt.f=rt.inline,oe.highlightFormatting&&(rt.formatting=["list","list-"+xt]),Ne(rt)}else{if(St&&rt.indentation<=ht&&(At=$e.match(z,!0)))return rt.quote=0,rt.fencedEndRE=new RegExp(At[1]+"+ *$"),rt.localMode=oe.fencedCodeBlockHighlighting&&fe(At[2]||oe.fencedCodeBlockDefaultMode),rt.localMode&&(rt.localState=ct.startState(rt.localMode)),rt.f=rt.block=Fe,oe.highlightFormatting&&(rt.formatting="code-block"),rt.code=-1,Ne(rt);if(rt.setext||(!mt||!ft)&&!rt.quote&&rt.list===!1&&!rt.code&&!yt&&!ee.test($e.string)&&(At=$e.lookAhead(1))&&(At=At.match(we)))return rt.setext?(rt.header=rt.setext,rt.setext=0,$e.skipToEnd(),oe.highlightFormatting&&(rt.formatting="header")):(rt.header=At[0].charAt(0)=="="?1:2,rt.setext=rt.header),rt.thisLine.header=!0,rt.f=rt.inline,Ne(rt);if(yt)return $e.skipToEnd(),rt.hr=!0,rt.thisLine.hr=!0,me.hr;if($e.peek()==="[")return le($e,rt,ot)}return le($e,rt,rt.inline)}function Be($e,rt){var St=ze.token($e,rt.htmlState);if(!De){var Pt=ct.innerMode(ze,rt.htmlState);(Pt.mode.name=="xml"&&Pt.state.tagStart===null&&!Pt.state.context&&Pt.state.tokenize.isInText||rt.md_inside&&$e.current().indexOf(">")>-1)&&(rt.f=Ie,rt.block=je,rt.htmlState=null)}return St}function Fe($e,rt){var St=rt.listStack[rt.listStack.length-1]||0,Pt=rt.indentation<St,wt=St+3;if(rt.fencedEndRE&&rt.indentation<=wt&&(Pt||$e.match(rt.fencedEndRE))){oe.highlightFormatting&&(rt.formatting="code-block");var pt;return Pt||(pt=Ne(rt)),rt.localMode=rt.localState=null,rt.block=je,rt.f=Ie,rt.fencedEndRE=null,rt.code=0,rt.thisLine.fencedCodeEnd=!0,Pt?ue($e,rt,rt.block):pt}else return rt.localMode?rt.localMode.token($e,rt.localState):($e.skipToEnd(),me.code)}function Ne($e){var rt=[];if($e.formatting){rt.push(me.formatting),typeof $e.formatting=="string"&&($e.formatting=[$e.formatting]);for(var St=0;St<$e.formatting.length;St++)rt.push(me.formatting+"-"+$e.formatting[St]),$e.formatting[St]==="header"&&rt.push(me.formatting+"-"+$e.formatting[St]+"-"+$e.header),$e.formatting[St]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=$e.quote?rt.push(me.formatting+"-"+$e.formatting[St]+"-"+$e.quote):rt.push("error"))}if($e.taskOpen)return rt.push("meta"),rt.length?rt.join(" "):null;if($e.taskClosed)return rt.push("property"),rt.length?rt.join(" "):null;if($e.linkHref?rt.push(me.linkHref,"url"):($e.strong&&rt.push(me.strong),$e.em&&rt.push(me.em),$e.strikethrough&&rt.push(me.strikethrough),$e.emoji&&rt.push(me.emoji),$e.linkText&&rt.push(me.linkText),$e.code&&rt.push(me.code),$e.image&&rt.push(me.image),$e.imageAltText&&rt.push(me.imageAltText,"link"),$e.imageMarker&&rt.push(me.imageMarker)),$e.header&&rt.push(me.header,me.header+"-"+$e.header),$e.quote&&(rt.push(me.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=$e.quote?rt.push(me.quote+"-"+$e.quote):rt.push(me.quote+"-"+oe.maxBlockquoteDepth)),$e.list!==!1){var Pt=($e.listStack.length-1)%3;Pt?Pt===1?rt.push(me.list2):rt.push(me.list3):rt.push(me.list1)}return $e.trailingSpaceNewLine?rt.push("trailing-space-new-line"):$e.trailingSpace&&rt.push("trailing-space-"+($e.trailingSpace%2?"a":"b")),rt.length?rt.join(" "):null}function Ae($e,rt){if($e.match(de,!0))return Ne(rt)}function Ie($e,rt){var St=rt.text($e,rt);if(typeof St!="undefined")return St;if(rt.list)return rt.list=null,Ne(rt);if(rt.taskList){var Pt=$e.match(Me,!0)[1]===" ";return Pt?rt.taskOpen=!0:rt.taskClosed=!0,oe.highlightFormatting&&(rt.formatting="task"),rt.taskList=!1,Ne(rt)}if(rt.taskOpen=!1,rt.taskClosed=!1,rt.header&&$e.match(/^#+$/,!0))return oe.highlightFormatting&&(rt.formatting="header"),Ne(rt);var wt=$e.next();if(rt.linkTitle){rt.linkTitle=!1;var pt=wt;wt==="("&&(pt=")"),pt=(pt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ft="^\\s*(?:[^"+pt+"\\\\]+|\\\\\\\\|\\\\.)"+pt;if($e.match(new RegExp(ft),!0))return me.linkHref}if(wt==="`"){var ht=rt.formatting;oe.highlightFormatting&&(rt.formatting="code"),$e.eatWhile("`");var Et=$e.current().length;if(rt.code==0&&(!rt.quote||Et==1))return rt.code=Et,Ne(rt);if(Et==rt.code){var mt=Ne(rt);return rt.code=0,mt}else return rt.formatting=ht,Ne(rt)}else if(rt.code)return Ne(rt);if(wt==="\\"&&($e.next(),oe.highlightFormatting)){var yt=Ne(rt),At=me.formatting+"-escape";return yt?yt+" "+At:At}if(wt==="!"&&$e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return rt.imageMarker=!0,rt.image=!0,oe.highlightFormatting&&(rt.formatting="image"),Ne(rt);if(wt==="["&&rt.imageMarker&&$e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return rt.imageMarker=!1,rt.imageAltText=!0,oe.highlightFormatting&&(rt.formatting="image"),Ne(rt);if(wt==="]"&&rt.imageAltText){oe.highlightFormatting&&(rt.formatting="image");var yt=Ne(rt);return rt.imageAltText=!1,rt.image=!1,rt.inline=rt.f=Ye,yt}if(wt==="["&&!rt.image)return rt.linkText&&$e.match(/^.*?\]/)||(rt.linkText=!0,oe.highlightFormatting&&(rt.formatting="link")),Ne(rt);if(wt==="]"&&rt.linkText){oe.highlightFormatting&&(rt.formatting="link");var yt=Ne(rt);return rt.linkText=!1,rt.inline=rt.f=$e.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Ie,yt}if(wt==="<"&&$e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=We,oe.highlightFormatting&&(rt.formatting="link");var yt=Ne(rt);return yt?yt+=" ":yt="",yt+me.linkInline}if(wt==="<"&&$e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=We,oe.highlightFormatting&&(rt.formatting="link");var yt=Ne(rt);return yt?yt+=" ":yt="",yt+me.linkEmail}if(oe.xml&&wt==="<"&&$e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var xt=$e.string.indexOf(">",$e.pos);if(xt!=-1){var tt=$e.string.substring($e.start,xt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(rt.md_inside=!0)}return $e.backUp(1),rt.htmlState=ct.startState(ze),ue($e,rt,Be)}if(oe.xml&&wt==="<"&&$e.match(/^\/\w*?>/))return rt.md_inside=!1,"tag";if(wt==="*"||wt==="_"){for(var Ve=1,xe=$e.pos==1?" ":$e.string.charAt($e.pos-2);Ve<3&&$e.eat(wt);)Ve++;var Le=$e.peek()||" ",Ze=!/\s/.test(Le)&&(!ae.test(Le)||/\s/.test(xe)||ae.test(xe)),nt=!/\s/.test(xe)&&(!ae.test(xe)||/\s/.test(Le)||ae.test(Le)),Re=null,_e=null;if(Ve%2&&(!rt.em&&Ze&&(wt==="*"||!nt||ae.test(xe))?Re=!0:rt.em==wt&&nt&&(wt==="*"||!Ze||ae.test(Le))&&(Re=!1)),Ve>1&&(!rt.strong&&Ze&&(wt==="*"||!nt||ae.test(xe))?_e=!0:rt.strong==wt&&nt&&(wt==="*"||!Ze||ae.test(Le))&&(_e=!1)),_e!=null||Re!=null){oe.highlightFormatting&&(rt.formatting=Re==null?"strong":_e==null?"em":"strong em"),Re===!0&&(rt.em=wt),_e===!0&&(rt.strong=wt);var mt=Ne(rt);return Re===!1&&(rt.em=!1),_e===!1&&(rt.strong=!1),mt}}else if(wt===" "&&($e.eat("*")||$e.eat("_"))){if($e.peek()===" ")return Ne(rt);$e.backUp(1)}if(oe.strikethrough){if(wt==="~"&&$e.eatWhile(wt)){if(rt.strikethrough){oe.highlightFormatting&&(rt.formatting="strikethrough");var mt=Ne(rt);return rt.strikethrough=!1,mt}else if($e.match(/^[^\s]/,!1))return rt.strikethrough=!0,oe.highlightFormatting&&(rt.formatting="strikethrough"),Ne(rt)}else if(wt===" "&&$e.match(/^~~/,!0)){if($e.peek()===" ")return Ne(rt);$e.backUp(2)}}if(oe.emoji&&wt===":"&&$e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){rt.emoji=!0,oe.highlightFormatting&&(rt.formatting="emoji");var He=Ne(rt);return rt.emoji=!1,He}return wt===" "&&($e.match(/^ +$/,!1)?rt.trailingSpace++:rt.trailingSpace&&(rt.trailingSpaceNewLine=!0)),Ne(rt)}function We($e,rt){var St=$e.next();if(St===">"){rt.f=rt.inline=Ie,oe.highlightFormatting&&(rt.formatting="link");var Pt=Ne(rt);return Pt?Pt+=" ":Pt="",Pt+me.linkInline}return $e.match(/^[^>]+/,!0),me.linkInline}function Ye($e,rt){if($e.eatSpace())return null;var St=$e.next();return St==="("||St==="["?(rt.f=rt.inline=Ke(St==="("?")":"]"),oe.highlightFormatting&&(rt.formatting="link-string"),rt.linkHref=!0,Ne(rt)):"error"}var Ue={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ke($e){return function(rt,St){var Pt=rt.next();if(Pt===$e){St.f=St.inline=Ie,oe.highlightFormatting&&(St.formatting="link-string");var wt=Ne(St);return St.linkHref=!1,wt}return rt.match(Ue[$e]),St.linkHref=!0,Ne(St)}}function ot($e,rt){return $e.match(/^([^\]\\]|\\.)*\]:/,!1)?(rt.f=st,$e.next(),oe.highlightFormatting&&(rt.formatting="link"),rt.linkText=!0,Ne(rt)):le($e,rt,Ie)}function st($e,rt){if($e.match(/^\]:/,!0)){rt.f=rt.inline=dt,oe.highlightFormatting&&(rt.formatting="link");var St=Ne(rt);return rt.linkText=!1,St}return $e.match(/^([^\]\\]|\\.)+/,!0),me.linkText}function dt($e,rt){return $e.eatSpace()?null:($e.match(/^[^\s]+/,!0),$e.peek()===void 0?rt.linkTitle=!0:$e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),rt.f=rt.inline=Ie,me.linkHref+" url")}var Ct={startState:function(){return{f:je,prevLine:{stream:null},thisLine:{stream:null},block:je,htmlState:null,indentation:0,inline:Ie,text:Ae,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function($e){return{f:$e.f,prevLine:$e.prevLine,thisLine:$e.thisLine,block:$e.block,htmlState:$e.htmlState&&ct.copyState(ze,$e.htmlState),indentation:$e.indentation,localMode:$e.localMode,localState:$e.localMode?ct.copyState($e.localMode,$e.localState):null,inline:$e.inline,text:$e.text,formatting:!1,linkText:$e.linkText,linkTitle:$e.linkTitle,linkHref:$e.linkHref,code:$e.code,em:$e.em,strong:$e.strong,strikethrough:$e.strikethrough,emoji:$e.emoji,header:$e.header,setext:$e.setext,hr:$e.hr,taskList:$e.taskList,list:$e.list,listStack:$e.listStack.slice(0),quote:$e.quote,indentedCode:$e.indentedCode,trailingSpace:$e.trailingSpace,trailingSpaceNewLine:$e.trailingSpaceNewLine,md_inside:$e.md_inside,fencedEndRE:$e.fencedEndRE}},token:function($e,rt){if(rt.formatting=!1,$e!=rt.thisLine.stream){if(rt.header=0,rt.hr=!1,$e.match(/^\s*$/,!0))return Pe(rt),null;if(rt.prevLine=rt.thisLine,rt.thisLine={stream:$e},rt.taskList=!1,rt.trailingSpace=0,rt.trailingSpaceNewLine=!1,!rt.localState&&(rt.f=rt.block,rt.f!=Be)){var St=$e.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(rt.indentation=St,rt.indentationDiff=null,St>0)return null}}return rt.f($e,rt)},innerMode:function($e){return $e.block==Be?{state:$e.htmlState,mode:ze}:$e.localState?{state:$e.localState,mode:$e.localMode}:{state:$e,mode:Ct}},indent:function($e,rt,St){return $e.block==Be&&ze.indent?ze.indent($e.htmlState,rt,St):$e.localState&&$e.localMode.indent?$e.localMode.indent($e.localState,rt,St):ct.Pass},blankLine:Pe,getType:Ne,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ct},"xml"),ct.defineMIME("text/markdown","markdown"),ct.defineMIME("text/x-markdown","markdown")})},98101:function(gn,cn,at){(function(ct){ct(at(89780))})(function(ct){"use strict";ct.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 Bt=0;Bt<ct.modeInfo.length;Bt++){var oe=ct.modeInfo[Bt];oe.mimes&&(oe.mime=oe.mimes[0])}ct.findModeByMIME=function(ze){ze=ze.toLowerCase();for(var De=0;De<ct.modeInfo.length;De++){var fe=ct.modeInfo[De];if(fe.mime==ze)return fe;if(fe.mimes){for(var me=0;me<fe.mimes.length;me++)if(fe.mimes[me]==ze)return fe}}if(/\+xml$/.test(ze))return ct.findModeByMIME("application/xml");if(/\+json$/.test(ze))return ct.findModeByMIME("application/json")},ct.findModeByExtension=function(ze){ze=ze.toLowerCase();for(var De=0;De<ct.modeInfo.length;De++){var fe=ct.modeInfo[De];if(fe.ext){for(var me=0;me<fe.ext.length;me++)if(fe.ext[me]==ze)return fe}}},ct.findModeByFileName=function(ze){for(var De=0;De<ct.modeInfo.length;De++){var fe=ct.modeInfo[De];if(fe.file&&fe.file.test(ze))return fe}var me=ze.lastIndexOf("."),ke=me>-1&&ze.substring(me+1,ze.length);if(ke)return ct.findModeByExtension(ke)},ct.findModeByName=function(ze){ze=ze.toLowerCase();for(var De=0;De<ct.modeInfo.length;De++){var fe=ct.modeInfo[De];if(fe.name.toLowerCase()==ze)return fe;if(fe.alias){for(var me=0;me<fe.alias.length;me++)if(fe.alias[me].toLowerCase()==ze)return fe}}}})},67549:function(gn,cn,at){(function(ct){ct(at(89780))})(function(ct){"use strict";ct.defineMode("stex",function(Bt,oe){"use strict";function ze(de,z){de.cmdState.push(z)}function De(de){return de.cmdState.length>0?de.cmdState[de.cmdState.length-1]:null}function fe(de){var z=de.cmdState.pop();z&&z.closeBracket()}function me(de){for(var z=de.cmdState,ee=z.length-1;ee>=0;ee--){var ae=z[ee];if(ae.name!="DEFAULT")return ae}return{styleIdentifier:function(){return null}}}function ke(de,z,ee){return function(){this.name=de,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 Ce={};Ce.importmodule=ke("importmodule","tag",["string","builtin"]),Ce.documentclass=ke("documentclass","tag",["","atom"]),Ce.usepackage=ke("usepackage","tag",["atom"]),Ce.begin=ke("begin","tag",["atom"]),Ce.end=ke("end","tag",["atom"]),Ce.label=ke("label","tag",["atom"]),Ce.ref=ke("ref","tag",["atom"]),Ce.eqref=ke("eqref","tag",["atom"]),Ce.cite=ke("cite","tag",["atom"]),Ce.bibitem=ke("bibitem","tag",["atom"]),Ce.Bibitem=ke("Bibitem","tag",["atom"]),Ce.RBibitem=ke("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Se(de,z){de.f=z}function Me(de,z){var ee;if(de.match(/^\\[a-zA-Z@]+/)){var ae=de.current().slice(1);return ee=Ce.hasOwnProperty(ae)?Ce[ae]:Ce.DEFAULT,ee=new ee,ze(z,ee),Se(z,we),ee.style}if(de.match(/^\\[$&%#{}_]/)||de.match(/^\\[,;!\/\\]/))return"tag";if(de.match("\\["))return Se(z,function(le,ue){return ve(le,ue,"\\]")}),"keyword";if(de.match("\\("))return Se(z,function(le,ue){return ve(le,ue,"\\)")}),"keyword";if(de.match("$$"))return Se(z,function(le,ue){return ve(le,ue,"$$")}),"keyword";if(de.match("$"))return Se(z,function(le,ue){return ve(le,ue,"$")}),"keyword";var ie=de.next();if(ie=="%")return de.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(ee=De(z),ee)ee.closeBracket(ie),Se(z,we);else return"error";return"bracket"}else return ie=="{"||ie=="["?(ee=Ce.DEFAULT,ee=new ee,ze(z,ee),"bracket"):/\d/.test(ie)?(de.eatWhile(/[\w.%]/),"atom"):(de.eatWhile(/[\w\-_]/),ee=me(z),ee.name=="begin"&&(ee.argument=de.current()),ee.styleIdentifier())}function ve(de,z,ee){if(de.eatSpace())return null;if(ee&&de.match(ee))return Se(z,Me),"keyword";if(de.match(/^\\[a-zA-Z@]+/))return"tag";if(de.match(/^[a-zA-Z]+/))return"variable-2";if(de.match(/^\\[$&%#{}_]/)||de.match(/^\\[,;!\/]/)||de.match(/^[\^_&]/))return"tag";if(de.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(de.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ae=de.next();return ae=="{"||ae=="}"||ae=="["||ae=="]"||ae=="("||ae==")"?"bracket":ae=="%"?(de.skipToEnd(),"comment"):"error"}function we(de,z){var ee=de.peek(),ae;return ee=="{"||ee=="["?(ae=De(z),ae.openBracket(ee),de.eat(ee),Se(z,Me),"bracket"):/[ \t\r]/.test(ee)?(de.eat(ee),null):(Se(z,Me),fe(z),Me(de,z))}return{startState:function(){var de=oe.inMathMode?function(z,ee){return ve(z,ee)}:Me;return{cmdState:[],f:de}},copyState:function(de){return{cmdState:de.cmdState.slice(),f:de.f}},token:function(de,z){return z.f(de,z)},blankLine:function(de){de.f=Me,de.cmdState.length=0},lineComment:"%"}}),ct.defineMIME("text/x-stex","stex"),ct.defineMIME("text/x-latex","stex")})},15525:function(gn,cn,at){(function(ct){ct(at(89780))})(function(ct){"use strict";var Bt={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},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ct.defineMode("xml",function(ze,De){var fe=ze.indentUnit,me={},ke=De.htmlMode?Bt:oe;for(var Ce in ke)me[Ce]=ke[Ce];for(var Ce in De)me[Ce]=De[Ce];var Se,Me;function ve(We,Ye){function Ue(st){return Ye.tokenize=st,st(We,Ye)}var Ke=We.next();if(Ke=="<")return We.eat("!")?We.eat("[")?We.match("CDATA[")?Ue(z("atom","]]>")):null:We.match("--")?Ue(z("comment","-->")):We.match("DOCTYPE",!0,!0)?(We.eatWhile(/[\w\._\-]/),Ue(ee(1))):null:We.eat("?")?(We.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(Se=We.eat("/")?"closeTag":"openTag",Ye.tokenize=we,"tag bracket");if(Ke=="&"){var ot;return We.eat("#")?We.eat("x")?ot=We.eatWhile(/[a-fA-F\d]/)&&We.eat(";"):ot=We.eatWhile(/[\d]/)&&We.eat(";"):ot=We.eatWhile(/[\w\.\-:]/)&&We.eat(";"),ot?"atom":"error"}else return We.eatWhile(/[^&<]/),null}ve.isInText=!0;function we(We,Ye){var Ue=We.next();if(Ue==">"||Ue=="/"&&We.eat(">"))return Ye.tokenize=ve,Se=Ue==">"?"endTag":"selfcloseTag","tag bracket";if(Ue=="=")return Se="equals",null;if(Ue=="<"){Ye.tokenize=ve,Ye.state=ue,Ye.tagName=Ye.tagStart=null;var Ke=Ye.tokenize(We,Ye);return Ke?Ke+" tag error":"tag error"}else return/[\'\"]/.test(Ue)?(Ye.tokenize=de(Ue),Ye.stringStartCol=We.column(),Ye.tokenize(We,Ye)):(We.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function de(We){var Ye=function(Ue,Ke){for(;!Ue.eol();)if(Ue.next()==We){Ke.tokenize=we;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(We,Ye){return function(Ue,Ke){for(;!Ue.eol();){if(Ue.match(Ye)){Ke.tokenize=ve;break}Ue.next()}return We}}function ee(We){return function(Ye,Ue){for(var Ke;(Ke=Ye.next())!=null;){if(Ke=="<")return Ue.tokenize=ee(We+1),Ue.tokenize(Ye,Ue);if(Ke==">")if(We==1){Ue.tokenize=ve;break}else return Ue.tokenize=ee(We-1),Ue.tokenize(Ye,Ue)}return"meta"}}function ae(We,Ye,Ue){this.prev=We.context,this.tagName=Ye,this.indent=We.indented,this.startOfLine=Ue,(me.doNotIndent.hasOwnProperty(Ye)||We.context&&We.context.noIndent)&&(this.noIndent=!0)}function ie(We){We.context&&(We.context=We.context.prev)}function le(We,Ye){for(var Ue;;){if(!We.context||(Ue=We.context.tagName,!me.contextGrabbers.hasOwnProperty(Ue)||!me.contextGrabbers[Ue].hasOwnProperty(Ye)))return;ie(We)}}function ue(We,Ye,Ue){return We=="openTag"?(Ue.tagStart=Ye.column(),ge):We=="closeTag"?Pe:ue}function ge(We,Ye,Ue){return We=="word"?(Ue.tagName=Ye.current(),Me="tag",Fe):me.allowMissingTagName&&We=="endTag"?(Me="tag bracket",Fe(We,Ye,Ue)):(Me="error",ge)}function Pe(We,Ye,Ue){if(We=="word"){var Ke=Ye.current();return Ue.context&&Ue.context.tagName!=Ke&&me.implicitlyClosed.hasOwnProperty(Ue.context.tagName)&&ie(Ue),Ue.context&&Ue.context.tagName==Ke||me.matchClosing===!1?(Me="tag",je):(Me="tag error",Be)}else return me.allowMissingTagName&&We=="endTag"?(Me="tag bracket",je(We,Ye,Ue)):(Me="error",Be)}function je(We,Ye,Ue){return We!="endTag"?(Me="error",je):(ie(Ue),ue)}function Be(We,Ye,Ue){return Me="error",je(We,Ye,Ue)}function Fe(We,Ye,Ue){if(We=="word")return Me="attribute",Ne;if(We=="endTag"||We=="selfcloseTag"){var Ke=Ue.tagName,ot=Ue.tagStart;return Ue.tagName=Ue.tagStart=null,We=="selfcloseTag"||me.autoSelfClosers.hasOwnProperty(Ke)?le(Ue,Ke):(le(Ue,Ke),Ue.context=new ae(Ue,Ke,ot==Ue.indented)),ue}return Me="error",Fe}function Ne(We,Ye,Ue){return We=="equals"?Ae:(me.allowMissing||(Me="error"),Fe(We,Ye,Ue))}function Ae(We,Ye,Ue){return We=="string"?Ie:We=="word"&&me.allowUnquoted?(Me="string",Fe):(Me="error",Fe(We,Ye,Ue))}function Ie(We,Ye,Ue){return We=="string"?Ie:Fe(We,Ye,Ue)}return{startState:function(We){var Ye={tokenize:ve,state:ue,indented:We||0,tagName:null,tagStart:null,context:null};return We!=null&&(Ye.baseIndent=We),Ye},token:function(We,Ye){if(!Ye.tagName&&We.sol()&&(Ye.indented=We.indentation()),We.eatSpace())return null;Se=null;var Ue=Ye.tokenize(We,Ye);return(Ue||Se)&&Ue!="comment"&&(Me=null,Ye.state=Ye.state(Se||Ue,We,Ye),Me&&(Ue=Me=="error"?Ue+" error":Me)),Ue},indent:function(We,Ye,Ue){var Ke=We.context;if(We.tokenize.isInAttribute)return We.tagStart==We.indented?We.stringStartCol+1:We.indented+fe;if(Ke&&Ke.noIndent)return ct.Pass;if(We.tokenize!=we&&We.tokenize!=ve)return Ue?Ue.match(/^(\s*)/)[0].length:0;if(We.tagName)return me.multilineTagIndentPastTag!==!1?We.tagStart+We.tagName.length+2:We.tagStart+fe*(me.multilineTagIndentFactor||1);if(me.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var ot=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(ot&&ot[1])for(;Ke;)if(Ke.tagName==ot[2]){Ke=Ke.prev;break}else if(me.implicitlyClosed.hasOwnProperty(Ke.tagName))Ke=Ke.prev;else break;else if(ot)for(;Ke;){var st=me.contextGrabbers[Ke.tagName];if(st&&st.hasOwnProperty(ot[2]))Ke=Ke.prev;else break}for(;Ke&&Ke.prev&&!Ke.startOfLine;)Ke=Ke.prev;return Ke?Ke.indent+fe:We.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:me.htmlMode?"html":"xml",helperType:me.htmlMode?"html":"xml",skipAttribute:function(We){We.state==Ae&&(We.state=Fe)},xmlCurrentTag:function(We){return We.tagName?{name:We.tagName,close:We.type=="closeTag"}:null},xmlCurrentContext:function(We){for(var Ye=[],Ue=We.context;Ue;Ue=Ue.prev)Ue.tagName&&Ye.push(Ue.tagName);return Ye.reverse()}}}),ct.defineMIME("text/xml","xml"),ct.defineMIME("application/xml","xml"),ct.mimeModes.hasOwnProperty("text/html")||ct.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(gn,cn,at){"use strict";at.d(cn,{$u:function(){return Ce},BD:function(){return Ve},E9:function(){return ke},FF:function(){return vi},FJ:function(){return ue},Hn:function(){return le},KX:function(){return Pe},NB:function(){return gt},S0:function(){return At},UL:function(){return Se},Vk:function(){return ie},Vm:function(){return Nt},YI:function(){return xt},ZA:function(){return oe},Zt:function(){return Me},al:function(){return Re},bn:function(){return nt},bx:function(){return xe},g2:function(){return tt},h1:function(){return Ae},hD:function(){return jn},l4:function(){return fe},rU:function(){return Mt},s_:function(){return Le},uz:function(){return ut},z6:function(){return ve}}),gn=at.hmd(gn),function(){var et;function fr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function mr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:fr(a)}}function Ai(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var ar=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Sr;if(typeof Object.setPrototypeOf=="function")Sr=Object.setPrototypeOf;else{var Ar;e:{var lo={a:!0},on={};try{on.__proto__=lo,Ar=on.a;break e}catch(a){}Ar=!1}Sr=Ar?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var an=Sr;function tn(a,y){if(a.prototype=ar(y.prototype),a.prototype.constructor=a,an)an(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 vn=typeof at.g!="undefined"&&at.g!=null?at.g:self,gr=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},pr=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ii(a,y){if(y){var x=vn;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&&pr(x,a,{writable:!0,value:y})}}ii("Object.assign",function(a){return a||gr}),ii("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 Mn=typeof globalThis=="object"&&globalThis||typeof at.g=="object"&&at.g.global===at.g&&at.g||typeof self=="object"&&self.self===self&&self||{};Mn.requestAnimationFrame===void 0&&(Mn.setImmediate===void 0?Mn.requestAnimationFrame=function(a){Mn.setTimeout(a,0)}:Mn.requestAnimationFrame=Mn.setImmediate);function sr(){}function Wr(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Mn.clearTimeout(x),x=Li(function(){x=-1,a.apply(b,E)},y)}}function Li(a,y){return Mn.setTimeout(a,y)}function tr(a){return Mn.document.createElement(a)}function Ot(a){throw Error(a)}function Kt(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Ot(a)}function Dn(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),Ot(x+" is not in the range "+y+": "+a)}function Ln(a){Mn.console&&Mn.console.log(a)}function en(a){return typeof a=="object"&&a!==null}function Un(a){return Array.isArray(a)||Mn.NodeList&&a instanceof Mn.NodeList||Mn.HTMLCollection&&a instanceof Mn.HTMLCollection}function Bn(a){return Array.prototype.slice.call(a)}function An(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Ot("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function nr(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Ot("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function _n(){var a=ki.pop();return a===void 0?[]:a}function Xn(a){a.length=0,ki.push(a)}function ur(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(en(a)&&a.constructor)return ur(a.constructor);return typeof a}function zr(a){var y=a;return en(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function dr(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 dn(a,y,x){Object.defineProperty(Qi.prototype,a,{get:y,set:x})}function $n(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 Ir=Mn.navigator!==void 0&&0<Mn.navigator.userAgent.indexOf("Trident/7"),qr=Mn.navigator!==void 0&&Mn.navigator.platform!==void 0&&Mn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,ki=[];Object.freeze([]),sr.className="Util",sr.Dx="32ab5ff3b26f42dc0ed90f21472913b5",sr.adym="gojs.net",sr.vfo="28e645fdb266",sr.className="Util";function Qt(a,y,x){xr(this),this.j=a,this.xa=y,this.o=x}Qt.prototype.toString=function(){return"EnumValue."+this.xa};function or(a,y){return y==null||y===""?null:a[y]}vn.Object.defineProperties(Qt.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Qt.className="EnumValue";function yr(){this.ew=[]}yr.prototype.toString=function(){return this.ew.join("")},yr.prototype.add=function(a){a!==""&&this.ew.push(a)},yr.className="StringBuilder";function Hn(){}Hn.className="PropertyCollection";var Yr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Mn.console&&Mn.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 Rr(){}Rr.prototype.reset=function(){},Rr.prototype.next=function(){return!1},Rr.prototype.Ad=function(){return!1},Rr.prototype.first=function(){return null},Rr.prototype.any=function(){return!1},Rr.prototype.all=function(){return!0},Rr.prototype.each=function(){return this},Rr.prototype.map=function(){return this},Rr.prototype.filter=function(){return this},Rr.prototype.de=function(){},Rr.prototype.toString=function(){return"EmptyIterator"},vn.Object.defineProperties(Rr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Rr.prototype.first=Rr.prototype.first,Rr.prototype.hasNext=Rr.prototype.Ad,Rr.prototype.next=Rr.prototype.next,Rr.prototype.reset=Rr.prototype.reset;var Zr=null;Rr.className="EmptyIterator",Zr=new Rr;function Qr(a){this.key=-1,this.value=a}Qr.prototype.reset=function(){this.key=-1},Qr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Qr.prototype.Ad=function(){return this.next()},Qr.prototype.first=function(){return this.key=0,this.value},Qr.prototype.any=function(a){return this.key=-1,a(this.value)},Qr.prototype.all=function(a){return this.key=-1,a(this.value)},Qr.prototype.each=function(a){return this.key=-1,a(this.value),this},Qr.prototype.map=function(a){return new Qr(a(this.value))},Qr.prototype.filter=function(a){return a(this.value)?new Qr(this.value):Zr},Qr.prototype.de=function(){this.value=null},Qr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},vn.Object.defineProperties(Qr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Qr.prototype.first=Qr.prototype.first,Qr.prototype.hasNext=Qr.prototype.Ad,Qr.prototype.next=Qr.prototype.next,Qr.prototype.reset=Qr.prototype.reset,Qr.className="SingletonIterator";function ui(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}ui.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},ui.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},ui.prototype.Ad=function(){return this.next()},ui.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},ui.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},ui.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},ui.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},ui.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 pn,a.s=x,a.xb(),a.iterator},ui.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 pn,a.s=x,a.xb(),a.iterator},ui.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},ui.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},vn.Object.defineProperties(ui.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}}}),ui.prototype.first=ui.prototype.first,ui.prototype.hasNext=ui.prototype.Ad,ui.prototype.next=ui.prototype.next,ui.prototype.reset=ui.prototype.reset,ui.className="ListIterator";function Pi(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Pi.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Pi.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)},Pi.prototype.Ad=function(){return this.next()},Pi.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},Pi.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},Pi.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},Pi.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},Pi.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 pn,a.s=x,a.xb(),a.iterator},Pi.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 pn,a.s=x,a.xb(),a.iterator},Pi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Pi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},vn.Object.defineProperties(Pi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Pi.prototype.first=Pi.prototype.first,Pi.prototype.hasNext=Pi.prototype.Ad,Pi.prototype.next=Pi.prototype.next,Pi.prototype.reset=Pi.prototype.reset,Pi.className="ListIteratorBackwards";function pn(a){xr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=pn.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"List()#"+ei(this)},et.add=function(a){return a===null?this:(this._isFrozen&&Kt(this,a),this.s.push(a),this.xb(),this)},et.push=function(a){this.add(a)},et.addAll=function(a){if(a===null)return this;this._isFrozen&&Kt(this);var y=this.s;if(Un(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},et.clear=function(){this._isFrozen&&Kt(this),this.s.length=0,this.xb()},et.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},et.has=function(a){return this.contains(a)},et.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},et.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Dn(a,"0 <= i < length",pn,"elt:i"),y[a]},et.get=function(a){return this.M(a)},et.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Dn(a,"0 <= i < length",pn,"setElt:i"),this._isFrozen&&Kt(this,a),x[a]=y},et.set=function(a,y){this.cd(a,y)},et.first=function(){var a=this.s;return a.length===0?null:a[0]},et.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},et.pop=function(){this._isFrozen&&Kt(this);var a=this.s;return 0<a.length?a.pop():null},pn.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},pn.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},pn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},pn.prototype.map=function(a){for(var y=new pn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},pn.prototype.filter=function(a){for(var y=new pn,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},et=pn.prototype,et.Gb=function(a,y){0>a&&Dn(a,">= 0",pn,"insertAt:i"),this._isFrozen&&Kt(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},et.remove=function(a){if(a===null)return!1;this._isFrozen&&Kt(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)},et.delete=function(a){return this.remove(a)},et.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Dn(a,"0 <= i < length",pn,"removeAt:i"),this._isFrozen&&Kt(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},et.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&&Kt(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},pn.prototype.copy=function(){var a=new pn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},et=pn.prototype,et.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},et.Iv=function(){for(var a=new yn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},et.sort=function(a){return this._isFrozen&&Kt(this),this.s.sort(a),this.xb(),this},et.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Kt(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Dn(y,"0 <= from < length",pn,"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},et.reverse=function(){return this._isFrozen&&Kt(this),this.s.reverse(),this.xb(),this},vn.Object.defineProperties(pn.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 Zr;var a=this.Sa;return a!==null?(a.reset(),a):new ui(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Zr;var a=this.Hg;return a!==null?(a.reset(),a):new Pi(this)}}}),pn.prototype.reverse=pn.prototype.reverse,pn.prototype.sortRange=pn.prototype.zi,pn.prototype.sort=pn.prototype.sort,pn.prototype.toSet=pn.prototype.Iv,pn.prototype.toArray=pn.prototype.Fa,pn.prototype.removeRange=pn.prototype.removeRange,pn.prototype.removeAt=pn.prototype.mb,pn.prototype.delete=pn.prototype.delete,pn.prototype.remove=pn.prototype.remove,pn.prototype.insertAt=pn.prototype.Gb,pn.prototype.pop=pn.prototype.pop,pn.prototype.last=pn.prototype.jc,pn.prototype.first=pn.prototype.first,pn.prototype.set=pn.prototype.set,pn.prototype.setElt=pn.prototype.cd,pn.prototype.get=pn.prototype.get,pn.prototype.elt=pn.prototype.M,pn.prototype.indexOf=pn.prototype.indexOf,pn.prototype.has=pn.prototype.has,pn.prototype.contains=pn.prototype.contains,pn.prototype.clear=pn.prototype.clear,pn.prototype.addAll=pn.prototype.addAll,pn.prototype.push=pn.prototype.push,pn.prototype.add=pn.prototype.add,pn.prototype.thaw=pn.prototype.ka,pn.prototype.freeze=pn.prototype.freeze,pn.className="List";function Oi(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Oi.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Oi.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)},Oi.prototype.Ad=function(){return this.next()},Oi.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},Oi.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},Oi.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},Oi.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},Oi.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Oi.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new pn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Oi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Oi.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},vn.Object.defineProperties(Oi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Oi.prototype.first=Oi.prototype.first,Oi.prototype.hasNext=Oi.prototype.Ad,Oi.prototype.next=Oi.prototype.next,Oi.prototype.reset=Oi.prototype.reset,Oi.className="SetIterator";function yn(a){xr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=yn.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Set()#"+ei(this)},et.add=function(a){if(a===null)return this;this._isFrozen&&Kt(this,a);var y=a;return en(a)&&(y=hi(a)),this.Tb[y]===void 0&&(this.Sb++,a=new qt(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},et.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Kt(this),Un(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},et.contains=function(a){if(a===null)return!1;var y=a;return en(a)&&(y=ei(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},et.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},et.first=function(){var a=this.ea;return a===null?null:a.value},yn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},yn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},yn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},yn.prototype.map=function(a){for(var y=new yn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},yn.prototype.filter=function(a){for(var y=new yn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},et=yn.prototype,et.remove=function(a){if(a===null)return!1;this._isFrozen&&Kt(this,a);var y=a;if(en(a)&&(y=ei(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},et.delete=function(a){return this.remove(a)},et.hp=function(a){if(a===null)return this;if(this._isFrozen&&Kt(this),Un(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},et.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Kt(this);var y=new yn;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},et.clear=function(){this._isFrozen&&Kt(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},yn.prototype.copy=function(){var a=new yn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},yn.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},yn.prototype.Hv=function(){var a=new pn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function xr(a){a.__gohashid=Wi++}function hi(a){var y=a.__gohashid;return y===void 0&&(y=Wi++,a.__gohashid=y),y}function ei(a){return a.__gohashid}vn.Object.defineProperties(yn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Zr;var a=this.Sa;return a!==null?(a.reset(),a):new Oi(this)}}}),yn.prototype.toList=yn.prototype.Hv,yn.prototype.toArray=yn.prototype.Fa,yn.prototype.clear=yn.prototype.clear,yn.prototype.retainAll=yn.prototype.pA,yn.prototype.removeAll=yn.prototype.hp,yn.prototype.delete=yn.prototype.delete,yn.prototype.remove=yn.prototype.remove,yn.prototype.first=yn.prototype.first,yn.prototype.containsAny=yn.prototype.Ty,yn.prototype.containsAll=yn.prototype.Sy,yn.prototype.has=yn.prototype.has,yn.prototype.contains=yn.prototype.contains,yn.prototype.addAll=yn.prototype.addAll,yn.prototype.add=yn.prototype.add,yn.prototype.thaw=yn.prototype.ka,yn.prototype.freeze=yn.prototype.freeze;var Wi=1;yn.className="Set",yn.uniqueHash=xr,yn.hashIdUnique=hi,yn.hashId=ei;function ci(a){this.ma=a,this.qa=a.Ja,this.sa=null}ci.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},ci.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)},ci.prototype.Ad=function(){return this.next()},ci.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},ci.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},ci.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},ci.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},ci.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},ci.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new pn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},ci.prototype.de=function(){this.value=this.key=null,this.qa=-1},ci.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},vn.Object.defineProperties(ci.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ci.prototype.first=ci.prototype.first,ci.prototype.hasNext=ci.prototype.Ad,ci.prototype.next=ci.prototype.next,ci.prototype.reset=ci.prototype.reset,ci.className="MapKeySetIterator";function Vr(a){yn.call(this),xr(this),this._isFrozen=!0,this.ma=a}tn(Vr,yn),et=Vr.prototype,et.freeze=function(){return this},et.ka=function(){return this},et.toString=function(){return"MapKeySet("+this.ma.toString()+")"},et.add=function(){Ot("This Set is read-only: "+this.toString())},et.contains=function(a){return this.ma.contains(a)},et.has=function(a){return this.contains(a)},et.remove=function(){Ot("This Set is read-only: "+this.toString())},et.delete=function(a){return this.remove(a)},et.clear=function(){Ot("This Set is read-only: "+this.toString())},et.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Vr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Vr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Vr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Vr.prototype.map=function(a){for(var y=new yn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Vr.prototype.filter=function(a){for(var y=new yn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Vr.prototype.copy=function(){return new Vr(this.ma)},Vr.prototype.Iv=function(){var a=new yn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Vr.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},Vr.prototype.Hv=function(){var a=new pn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},vn.Object.defineProperties(Vr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Zr:new ci(this.ma)}}}),Vr.prototype.toList=Vr.prototype.Hv,Vr.prototype.toArray=Vr.prototype.Fa,Vr.prototype.toSet=Vr.prototype.Iv,Vr.prototype.first=Vr.prototype.first,Vr.prototype.clear=Vr.prototype.clear,Vr.prototype.delete=Vr.prototype.delete,Vr.prototype.remove=Vr.prototype.remove,Vr.prototype.has=Vr.prototype.has,Vr.prototype.contains=Vr.prototype.contains,Vr.prototype.add=Vr.prototype.add,Vr.prototype.thaw=Vr.prototype.ka,Vr.prototype.freeze=Vr.prototype.freeze,Vr.className="MapKeySet";function Hi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Hi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Hi.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)},Hi.prototype.Ad=function(){return this.next()},Hi.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},Hi.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},Hi.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},Hi.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},Hi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Hi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new pn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Hi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Hi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},vn.Object.defineProperties(Hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Hi.prototype.first=Hi.prototype.first,Hi.prototype.hasNext=Hi.prototype.Ad,Hi.prototype.next=Hi.prototype.next,Hi.prototype.reset=Hi.prototype.reset,Hi.className="MapValueSetIterator";function qt(a,y){this.key=a,this.value=y,this.ll=this.va=null}qt.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},qt.className="KeyValuePair";function wn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}wn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},wn.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)},wn.prototype.Ad=function(){return this.next()},wn.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},wn.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},wn.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},wn.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},wn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},wn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new pn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},wn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},wn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},vn.Object.defineProperties(wn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),wn.prototype.first=wn.prototype.first,wn.prototype.hasNext=wn.prototype.Ad,wn.prototype.next=wn.prototype.next,wn.prototype.reset=wn.prototype.reset,wn.className="MapIterator";function Yt(a){xr(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"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=Yt.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Map()#"+ei(this)},et.add=function(a,y){this._isFrozen&&Kt(this,a);var x=a;en(a)&&(x=hi(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new qt(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},et.set=function(a,y){return this.add(a,y)},et.addAll=function(a){if(a===null)return this;if(Un(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 Yt)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},et.first=function(){return this.ea},Yt.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Yt.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Yt.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Yt.prototype.map=function(a){for(var y=new Yt,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Yt.prototype.filter=function(a){for(var y=new Yt,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},et=Yt.prototype,et.contains=function(a){var y=a;return en(a)&&(y=ei(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.I=function(a){var y=a;return en(a)&&(y=ei(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},et.get=function(a){return this.I(a)},et.remove=function(a){if(a===null)return!1;this._isFrozen&&Kt(this,a);var y=a;if(en(a)&&(y=ei(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},et.delete=function(a){return this.remove(a)},et.clear=function(){this._isFrozen&&Kt(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()},Yt.prototype.copy=function(){var a=new Yt,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Yt.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 qt(E.key,E.value),x++}return y},Yt.prototype.Lf=function(){return new Vr(this)},vn.Object.defineProperties(Yt.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Zr;var a=this.Sa;return a!==null?(a.reset(),a):new wn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Zr:new ci(this)}},iteratorValues:{get:function(){if(0>=this.count)return Zr;var a=this.jf;return a!==null?(a.reset(),a):new Hi(this)}}}),Yt.prototype.toKeySet=Yt.prototype.Lf,Yt.prototype.toArray=Yt.prototype.Fa,Yt.prototype.clear=Yt.prototype.clear,Yt.prototype.delete=Yt.prototype.delete,Yt.prototype.remove=Yt.prototype.remove,Yt.prototype.get=Yt.prototype.get,Yt.prototype.getValue=Yt.prototype.I,Yt.prototype.has=Yt.prototype.has,Yt.prototype.contains=Yt.prototype.contains,Yt.prototype.first=Yt.prototype.first,Yt.prototype.addAll=Yt.prototype.addAll,Yt.prototype.set=Yt.prototype.set,Yt.prototype.add=Yt.prototype.add,Yt.prototype.thaw=Yt.prototype.ka,Yt.prototype.freeze=Yt.prototype.freeze,Yt.className="Map";function lt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Ot("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var On,Sn,Kn,Qn,Vn;lt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},lt.prototype.h=function(a,y){return this.x=a,this.y=y,this},lt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},lt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},lt.prototype.copy=function(){var a=new lt;return a.x=this.x,a.y=this.y,a},et=lt.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function un(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 lt(x,E)}return new lt}function Fn(a){return a.x.toString()+" "+a.y.toString()}et.toString=function(){return"Point("+this.x+","+this.y+")"},et.D=function(a){return a instanceof lt?this.x===a.x&&this.y===a.y:!1},et.hi=function(a,y){return this.x===a&&this.y===y},et.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)},et.add=function(a){return this.x+=a.x,this.y+=a.y,this},et.re=function(a){return this.x-=a.x,this.y-=a.y,this},et.offset=function(a,y){return this.x+=a,this.y+=y,this},lt.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},et=lt.prototype,et.scale=function(a,y){return this.x*=a,this.y*=y,this},et.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},et.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},et.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},et.ab=function(a){return zn(a.x-this.x,a.y-this.y)},et.direction=function(a,y){return zn(a-this.x,y-this.y)};function zn(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}et.Ry=function(a,y){return Gt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},et.fA=function(a,y,x,b){return Gt.qh(a,y,x,b,this.x,this.y,this),this},et.gA=function(a,y){return Gt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},et.uA=function(a,y,x,b){return Gt.No(this.x,this.y,a,y,x,b,this),this},et.vA=function(a,y){return Gt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},et.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},et.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},et.transform=function(a){return a.Ga(this),this};function Tn(a,y){return y.Cd(a),a}function In(a,y,x,b,E,te){var ne=E-x,se=te-b,he=ne*ne+se*se;x-=a,b-=y;var pe=-x*ne-b*se;return 0>=pe||pe>=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 Nn(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Zn(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)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)},lt.alloc=function(){var a=Wn.pop();return a===void 0?new lt:a},lt.allocAt=function(a,y){var x=Wn.pop();return x===void 0?new lt(a,y):(x.x=a,x.y=y,x)},lt.free=function(a){Wn.push(a)},lt.prototype.isReal=lt.prototype.w,lt.prototype.setSpot=lt.prototype.yi,lt.prototype.setRectSpot=lt.prototype.xi,lt.prototype.snapToGridPoint=lt.prototype.vA,lt.prototype.snapToGrid=lt.prototype.uA,lt.prototype.projectOntoLineSegmentPoint=lt.prototype.gA,lt.prototype.projectOntoLineSegment=lt.prototype.fA,lt.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return Gt.Rl(a,y,x,b,E,te,ne,se)},lt.prototype.compareWithLineSegmentPoint=lt.prototype.Ry,lt.compareWithLineSegment=function(a,y,x,b,E,te){return Gt.Fl(a,y,x,b,E,te)},lt.prototype.direction=lt.prototype.direction,lt.prototype.directionPoint=lt.prototype.ab,lt.prototype.normalize=lt.prototype.normalize,lt.prototype.distanceSquared=lt.prototype.zd,lt.prototype.distanceSquaredPoint=lt.prototype.Bf,lt.prototype.scale=lt.prototype.scale,lt.prototype.rotate=lt.prototype.rotate,lt.prototype.offset=lt.prototype.offset,lt.prototype.subtract=lt.prototype.re,lt.prototype.add=lt.prototype.add,lt.prototype.equalsApprox=lt.prototype.Xa,lt.prototype.equalTo=lt.prototype.hi,lt.prototype.equals=lt.prototype.D,lt.prototype.set=lt.prototype.set,lt.prototype.setTo=lt.prototype.sg;var Wn=[];lt.className="Point",lt.parse=un,lt.stringify=Fn,lt.distanceLineSegmentSquared=In,lt.distanceSquared=Nn,lt.direction=Zn,lt.Origin=On=new lt(0,0).ja(),lt.InfiniteTopLeft=Sn=new lt(-1/0,-1/0).ja(),lt.InfiniteBottomRight=Kn=new lt(1/0,1/0).ja(),lt.SixPoint=Qn=new lt(6,6).ja(),lt.NoPoint=Vn=new lt(NaN,NaN).ja(),lt.parse=un,lt.stringify=Fn,lt.distanceLineSegmentSquared=In,lt.distanceSquared=Nn,lt.direction=Zn;function ln(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):Ot("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var br,Er,ai,Tr,Si,pi,bi;ln.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},ln.prototype.h=function(a,y){return this.width=a,this.height=y,this},ln.prototype.sg=function(a,y){return this.width=a,this.height=y,this},ln.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},ln.prototype.copy=function(){var a=new ln;return a.width=this.width,a.height=this.height,a},et=ln.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function yi(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 ln(x,E)}return new ln}function Ri(a){return a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Size("+this.width+","+this.height+")"},et.D=function(a){return a instanceof ln?this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y){return this.width===a&&this.height===y},et.Xa=function(a){return Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)},et.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},et.w=function(){return isFinite(this.width)&&isFinite(this.height)},ln.alloc=function(){var a=Ki.pop();return a===void 0?new ln:a},ln.free=function(a){Ki.push(a)},ln.prototype.isReal=ln.prototype.w,ln.prototype.inflate=ln.prototype.Bc,ln.prototype.equalsApprox=ln.prototype.Xa,ln.prototype.equalTo=ln.prototype.hi,ln.prototype.equals=ln.prototype.D,ln.prototype.set=ln.prototype.set,ln.prototype.setTo=ln.prototype.sg;var Ki=[];ln.className="Size",ln.parse=yi,ln.stringify=Ri,ln.ZeroSize=br=new ln(0,0).ja(),ln.OneSize=Er=new ln(1,1).ja(),ln.SixSize=ai=new ln(6,6).ja(),ln.EightSize=Tr=new ln(8,8).ja(),ln.TenSize=Si=new ln(10,10).ja(),ln.InfiniteSize=pi=new ln(1/0,1/0).ja(),ln.NoSize=bi=new ln(NaN,NaN).ja(),ln.parse=yi,ln.stringify=Ri;function Jt(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 lt?(x=a.x,a=a.y,y instanceof lt?(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 ln?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Ot("Incorrect second argument supplied to Rect constructor "+y)):Ot("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}et=Jt.prototype,et.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function xi(a,y,x){a.width=y,a.height=x}et.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},et.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.dd=function(a){return this.x=a.x,this.y=a.y,this},et.tA=function(a){return this.width=a.width,this.height=a.height,this},Jt.prototype.copy=function(){var a=new Jt;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},et=Jt.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function ti(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 Jt(x,E,te,ne)}return new Jt}function Hr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},et.D=function(a){return a instanceof Jt?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},et.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)&&Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)};function Dr(a,y){return Gt.$(a.x,y.x)&&Gt.$(a.y,y.y)&&Gt.$(a.width,y.width)&&Gt.$(a.height,y.height)}et.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},et.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},et.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},et.offset=function(a,y){return this.x+=a,this.y+=y,this},et.Bc=function(a,y){return wi(this,y,a,y,a)},et.Co=function(a){return wi(this,a.top,a.right,a.bottom,a.left)},et.Fv=function(a){return wi(this,-a.top,-a.right,-a.bottom,-a.left)},et.Hz=function(a,y,x,b){return wi(this,a,y,x,b)};function wi(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}et.Ex=function(a){return _i(this,a.x,a.y,a.width,a.height)},et.Uu=function(a,y,x,b){return _i(this,a,y,x,b)};function _i(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}et.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},et.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 Fi(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))}et.Ye=function(a){return ni(this,a.x,a.y,0,0)},et.ed=function(a){return ni(this,a.x,a.y,a.width,a.height)},et.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),ni(this,a,y,x,b)};function ni(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}et.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 $i(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 _o(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},et.Mz=function(){return this.width===0&&this.height===0},Jt.alloc=function(){var a=wa.pop();return a===void 0?new Jt:a},Jt.allocAt=function(a,y,x,b){var E=wa.pop();return E===void 0?new Jt(a,y,x,b):E.h(a,y,x,b)},Jt.free=function(a){wa.push(a)},vn.Object.defineProperties(Jt.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 lt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new ln(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new lt(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}}}),Jt.prototype.isEmpty=Jt.prototype.Mz,Jt.prototype.isReal=Jt.prototype.w,Jt.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Gt.Fx(a,y,x,b,E,te,ne,se)},Jt.prototype.setSpot=Jt.prototype.yi,Jt.prototype.union=Jt.prototype.Kv,Jt.prototype.unionRect=Jt.prototype.ed,Jt.prototype.unionPoint=Jt.prototype.Ye,Jt.prototype.intersects=Jt.prototype.Vu,Jt.prototype.intersectsRect=Jt.prototype.Yc,Jt.prototype.intersect=Jt.prototype.Uu,Jt.prototype.intersectRect=Jt.prototype.Ex,Jt.prototype.grow=Jt.prototype.Hz,Jt.prototype.subtractMargin=Jt.prototype.Fv,Jt.prototype.addMargin=Jt.prototype.Co,Jt.prototype.inflate=Jt.prototype.Bc,Jt.prototype.offset=Jt.prototype.offset,Jt.prototype.contains=Jt.prototype.contains,Jt.prototype.containsRect=Jt.prototype.Re,Jt.prototype.containsPoint=Jt.prototype.ca,Jt.prototype.equalsApprox=Jt.prototype.Xa,Jt.prototype.equalTo=Jt.prototype.hi,Jt.prototype.equals=Jt.prototype.D,Jt.prototype.setSize=Jt.prototype.tA,Jt.prototype.setPoint=Jt.prototype.dd,Jt.prototype.set=Jt.prototype.set,Jt.prototype.setTo=Jt.prototype.sg;var fa=null,Ps=null,wa=[];Jt.className="Rect",Jt.parse=ti,Jt.stringify=Hr,Jt.contains=$i,Jt.intersects=_o,Jt.ZeroRect=fa=new Jt(0,0,0,0).ja(),Jt.NoRect=Ps=new Jt(NaN,NaN,NaN,NaN).ja(),Jt.parse=ti,Jt.stringify=Hr,Jt.contains=$i,Jt.intersects=_o;function Br(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):Ot("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Br.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Br.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Br.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Br.prototype.copy=function(){var a=new Br;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},et=Br.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function Po(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 Br;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Br(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Br(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Br(x,E):new Br(x,E,te,ne)}return new Br}function bo(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}et.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},et.D=function(a){return a instanceof Br?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},et.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},et.Xa=function(a){return Gt.B(this.top,a.top)&&Gt.B(this.right,a.right)&&Gt.B(this.bottom,a.bottom)&&Gt.B(this.left,a.left)},et.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Br.alloc=function(){var a=Ko.pop();return a===void 0?new Br:a},Br.free=function(a){Ko.push(a)},Br.prototype.isReal=Br.prototype.w,Br.prototype.equalsApprox=Br.prototype.Xa,Br.prototype.equalTo=Br.prototype.hi,Br.prototype.equals=Br.prototype.D,Br.prototype.set=Br.prototype.set,Br.prototype.setTo=Br.prototype.sg;var ta=null,Ao=null,Ko=[];Br.className="Margin",Br.parse=Po,Br.stringify=bo,Br.ZeroMargin=ta=new Br(0,0,0,0).ja(),Br.TwoMargin=Ao=new Br(2,2,2,2).ja(),Br.parse=Po,Br.stringify=bo;function er(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 jr,$r,mi,Ci,to,Or,Aa,zo,jo,Ni,Vo,ja,vo,fs,ds,bs,na,eh,ju,il,Sl,Os,Vl,th,nh,Zo,Ou,rh,Zl,uu,Ca,Oa,aa,ga,Xl,Ga;er.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},er.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},er.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},er.prototype.copy=function(){var a=new er;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},et=er.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function co(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function io(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return jr;if(a==="TopLeft")return $r;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return mi;if(a==="TopRight")return Ci;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return to;if(a==="Center")return Or;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Aa;if(a==="BottomLeft")return zo;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return jo;if(a==="BottomRight")return Ni;if(a==="TopSide")return Vo;if(a==="LeftSide")return ja;if(a==="RightSide")return vo;if(a==="BottomSide")return fs;if(a==="TopBottomSides")return ds;if(a==="LeftRightSides")return bs;if(a==="TopLeftSides")return na;if(a==="TopRightSides")return eh;if(a==="BottomLeftSides")return ju;if(a==="BottomRightSides")return il;if(a==="NotTopSide")return Sl;if(a==="NotLeftSide")return Os;if(a==="NotRightSide")return Vl;if(a==="NotBottomSide")return th;if(a==="AllSides")return nh;if(a==="Default")return Zo;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 er(x,E,te,ne)}return new er}function Ji(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}et.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(jr)?"None":this.D($r)?"TopLeft":this.D(mi)?"Top":this.D(Ci)?"TopRight":this.D(to)?"Left":this.D(Or)?"Center":this.D(Aa)?"Right":this.D(zo)?"BottomLeft":this.D(jo)?"Bottom":this.D(Ni)?"BottomRight":this.D(Vo)?"TopSide":this.D(ja)?"LeftSide":this.D(vo)?"RightSide":this.D(fs)?"BottomSide":this.D(ds)?"TopBottomSides":this.D(bs)?"LeftRightSides":this.D(na)?"TopLeftSides":this.D(eh)?"TopRightSides":this.D(ju)?"BottomLeftSides":this.D(il)?"BottomRightSides":this.D(Sl)?"NotTopSide":this.D(Os)?"NotLeftSide":this.D(Vl)?"NotRightSide":this.D(th)?"NotBottomSide":this.D(nh)?"AllSides":this.D(Zo)?"Default":"None"},et.D=function(a){return a instanceof er?(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},et.gv=function(){return new er(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},et.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Ou))a=ja;else if(a.D(rh))a=vo;else if(a.D(Zl))a=Vo;else if(a.D(uu))a=fs;else return!1;return a=a.offsetY,(this.offsetY&a)===a},et.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},et.Mc=function(){return isNaN(this.x)||isNaN(this.y)},et.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},et.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},et.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},er.alloc=function(){var a=sa.pop();return a===void 0?new er:a},er.free=function(a){sa.push(a)},er.prototype.isDefault=er.prototype.Xb,er.prototype.isNone=er.prototype.ys,er.prototype.isSide=er.prototype.$c,er.prototype.isNoSpot=er.prototype.Mc,er.prototype.isSpot=er.prototype.sb,er.prototype.includesSide=er.prototype.Hf,er.prototype.opposite=er.prototype.gv,er.prototype.equals=er.prototype.D,er.prototype.set=er.prototype.set,er.prototype.setTo=er.prototype.sg;var sa=[];er.className="Spot",er.parse=io,er.stringify=Ji,er.None=jr=co(new er(0,0,0,0),0).ja(),er.Default=Zo=co(new er(0,0,-1,0),-1).ja(),er.TopLeft=$r=new er(0,0,0,0).ja(),er.TopCenter=mi=new er(.5,0,0,0).ja(),er.TopRight=Ci=new er(1,0,0,0).ja(),er.LeftCenter=to=new er(0,.5,0,0).ja(),er.Center=Or=new er(.5,.5,0,0).ja(),er.RightCenter=Aa=new er(1,.5,0,0).ja(),er.BottomLeft=zo=new er(0,1,0,0).ja(),er.BottomCenter=jo=new er(.5,1,0,0).ja(),er.BottomRight=Ni=new er(1,1,0,0).ja(),er.MiddleTop=Ca=mi,er.MiddleLeft=Oa=to,er.MiddleRight=aa=Aa,er.MiddleBottom=ga=jo,er.Top=Zl=mi,er.Left=Ou=to,er.Right=rh=Aa,er.Bottom=uu=jo,er.TopSide=Vo=co(new er(0,0,1,1),1).ja(),er.LeftSide=ja=co(new er(0,0,1,2),1).ja(),er.RightSide=vo=co(new er(0,0,1,4),1).ja(),er.BottomSide=fs=co(new er(0,0,1,8),1).ja(),er.TopBottomSides=ds=co(new er(0,0,1,9),1).ja(),er.LeftRightSides=bs=co(new er(0,0,1,6),1).ja(),er.TopLeftSides=na=co(new er(0,0,1,3),1).ja(),er.TopRightSides=eh=co(new er(0,0,1,5),1).ja(),er.BottomLeftSides=ju=co(new er(0,0,1,10),1).ja(),er.BottomRightSides=il=co(new er(0,0,1,12),1).ja(),er.NotTopSide=Sl=co(new er(0,0,1,14),1).ja(),er.NotLeftSide=Os=co(new er(0,0,1,13),1).ja(),er.NotRightSide=Vl=co(new er(0,0,1,11),1).ja(),er.NotBottomSide=th=co(new er(0,0,1,7),1).ja(),er.AllSides=nh=co(new er(0,0,1,15),1).ja(),Xl=new er(.156,.156).ja(),Ga=new er(.844,.844).ja(),er.parse=io,er.stringify=Ji;function wr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}wr.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},wr.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},wr.prototype.copy=function(){var a=new wr;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},wr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},wr.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},wr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},wr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},wr.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},wr.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},wr.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},wr.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},et=wr.prototype,et.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},et.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},et.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)},et.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))},et.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))},et.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,pe=this.dx,ye=this.dy,Te=y*te+x*se+pe,Ge=y*ne+x*he+ye,Xe=b*te+x*se+pe,Je=b*ne+x*he+ye;return x=y*te+E*se+pe,y=y*ne+E*he+ye,te=b*te+E*se+pe,b=b*ne+E*he+ye,E=Math.min(Te,Xe),Te=Math.max(Te,Xe),Xe=Math.min(Ge,Je),Ge=Math.max(Ge,Je),E=Math.min(E,x),Te=Math.max(Te,x),Xe=Math.min(Xe,y),Ge=Math.max(Ge,y),E=Math.min(E,te),Te=Math.max(Te,te),Xe=Math.min(Xe,b),Ge=Math.max(Ge,b),a.h(E,Xe,Te-E,Ge-Xe),a},wr.alloc=function(){var a=da.pop();return a===void 0?new wr:a},wr.free=function(a){da.push(a)},wr.prototype.transformRect=wr.prototype.pp,wr.prototype.transformPoint=wr.prototype.Ga,wr.prototype.scale=wr.prototype.scale,wr.prototype.translate=wr.prototype.translate,wr.prototype.rotate=wr.prototype.rotate,wr.prototype.invert=wr.prototype.Vj,wr.prototype.multiplyInverted=wr.prototype.bv,wr.prototype.multiply=wr.prototype.multiply,wr.prototype.reset=wr.prototype.reset,wr.prototype.isIdentity=wr.prototype.ws,wr.prototype.equals=wr.prototype.D,wr.prototype.setTransform=wr.prototype.setTransform,wr.prototype.set=wr.prototype.set;var da=[];wr.className="Transform",wr.xF="54a702f3e53909c447824c6706603faf4c";var Gt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Gt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Gt.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 pe=y,ye=b;else pe=b,ye=y;if(a===x)return pe<=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,pe-=E,pe<=ne&&ne<=ye))if(he-se>ye-pe)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,pe,ye,Te){if(Gt.Yb(a,y,ne,se,Te,x,b)&&Gt.Yb(a,y,ne,se,Te,E,te))return Gt.Yb(a,y,ne,se,Te,pe,ye);var Ge=(a+x)/2,Xe=(y+b)/2,Je=(x+E)/2,it=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Ge+Je)/2,x=(Xe+it)/2,Je=(Je+E)/2,it=(it+te)/2;var Tt=(b+Je)/2,bt=(x+it)/2;return Gt.cs(a,y,Ge,Xe,b,x,Tt,bt,he,pe,ye,Te)||Gt.cs(Tt,bt,Je,it,E,te,ne,se,he,pe,ye,Te)},ax:function(a,y,x,b,E,te,ne,se,he){var pe=(x+E)/2,ye=(b+te)/2;return he.h((((a+x)/2+pe)/2+(pe+(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,pe=(b+te)/2;return Zn(((a+x)/2+he)/2,((y+b)/2+pe)/2,(he+(E+ne)/2)/2,(pe+(te+se)/2)/2)},Dl:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,ne,se,he,x,b)&&Gt.Yb(a,y,ne,se,he,E,te))ni(pe,a,y,0,0),ni(pe,ne,se,0,0);else{var ye=(a+x)/2,Te=(y+b)/2,Ge=(x+E)/2,Xe=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+Ge)/2,x=(Te+Xe)/2,Ge=(Ge+E)/2,Xe=(Xe+te)/2;var Je=(b+Ge)/2,it=(x+Xe)/2;Gt.Dl(a,y,ye,Te,b,x,Je,it,he,pe),Gt.Dl(Je,it,Ge,Xe,E,te,ne,se,he,pe)}return pe},Qe:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,ne,se,he,x,b)&&Gt.Yb(a,y,ne,se,he,E,te))pe.length===0&&(pe.push(a),pe.push(y)),pe.push(ne),pe.push(se);else{var ye=(a+x)/2,Te=(y+b)/2,Ge=(x+E)/2,Xe=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+Ge)/2,x=(Te+Xe)/2,Ge=(Ge+E)/2,Xe=(Xe+te)/2;var Je=(b+Ge)/2,it=(x+Xe)/2;Gt.Qe(a,y,ye,Te,b,x,Je,it,he,pe),Gt.Qe(Je,it,Ge,Xe,E,te,ne,se,he,pe)}return pe},jv:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,E,te,pe,x,b))return Gt.Yb(a,y,E,te,pe,se,he);var ye=(a+x)/2,Te=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Ge=(ye+x)/2,Xe=(Te+b)/2;return Gt.jv(a,y,ye,Te,Ge,Xe,ne,se,he,pe)||Gt.jv(Ge,Xe,x,b,E,te,ne,se,he,pe)},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(Gt.Yb(a,y,E,te,ne,x,b))ni(se,a,y,0,0),ni(se,E,te,0,0);else{var he=(a+x)/2,pe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Te=(pe+b)/2;Gt.iv(a,y,he,pe,ye,Te,ne,se),Gt.iv(ye,Te,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(Gt.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,pe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Te=(pe+b)/2;Gt.ep(a,y,he,pe,ye,Te,ne,se),Gt.ep(ye,Te,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,pe,ye,Te,Ge,Xe){if(Gt.Yb(a,y,ne,se,Ge,x,b)&&Gt.Yb(a,y,ne,se,Ge,E,te))return!Gt.Rl(a,y,ne,se,he,pe,ye,Te)||(Ge=(a-ne)*(pe-Te)-(y-se)*(he-ye),Ge===0)?!1:(Xe.h(((a*se-y*ne)*(he-ye)-(a-ne)*(he*Te-pe*ye))/Ge,((a*se-y*ne)*(pe-Te)-(y-se)*(he*Te-pe*ye))/Ge),!0);var Je=(a+x)/2,it=(y+b)/2,Tt=(x+E)/2,bt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Je+Tt)/2,x=(it+bt)/2,Tt=(Tt+E)/2,bt=(bt+te)/2;var jt=(b+Tt)/2,Ft=(x+bt)/2,It=1/0,_t=!1,Vt=0,Rn=0;return Gt.Eo(a,y,Je,it,b,x,jt,Ft,he,pe,ye,Te,Ge,Xe)&&(a=(Xe.x-he)*(Xe.x-he)+(Xe.y-pe)*(Xe.y-pe),a<It&&(It=a,_t=!0,Vt=Xe.x,Rn=Xe.y)),Gt.Eo(jt,Ft,Tt,bt,E,te,ne,se,he,pe,ye,Te,Ge,Xe)&&(Xe.x-he)*(Xe.x-he)+(Xe.y-pe)*(Xe.y-pe)<It&&(_t=!0,Vt=Xe.x,Rn=Xe.y),_t&&(Xe.x=Vt,Xe.y=Rn),_t},Fo:function(a,y,x,b,E,te,ne,se,he,pe,ye,Te,Ge){var Xe=0;if(Gt.Yb(a,y,ne,se,Ge,x,b)&&Gt.Yb(a,y,ne,se,Ge,E,te)){if(Ge=(a-ne)*(pe-Te)-(y-se)*(he-ye),Ge===0)return Xe;var Je=((a*se-y*ne)*(he-ye)-(a-ne)*(he*Te-pe*ye))/Ge,it=((a*se-y*ne)*(pe-Te)-(y-se)*(he*Te-pe*ye))/Ge;if(Je>=ye)return Xe;if((he>ye?he-ye:ye-he)<(pe>Te?pe-Te:Te-pe)){if(y<se?(he=y,a=se):(he=se,a=y),it<he||it>a)return Xe}else if(a<ne?(he=a,a=ne):he=ne,Je<he||Je>a)return Xe;0<Ge?Xe++:0>Ge&&Xe--}else{Je=(a+x)/2,it=(y+b)/2;var Tt=(x+E)/2,bt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Je+Tt)/2,x=(it+bt)/2,Tt=(Tt+E)/2,bt=(bt+te)/2;var jt=(b+Tt)/2,Ft=(x+bt)/2;Xe+=Gt.Fo(a,y,Je,it,b,x,jt,Ft,he,pe,ye,Te,Ge),Xe+=Gt.Fo(jt,Ft,Tt,bt,E,te,ne,se,he,pe,ye,Te,Ge)}return Xe},qh:function(a,y,x,b,E,te,ne){return Gt.$(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)):Gt.$(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 Gt.B(a,x)&&Gt.B(y,b)?(he.h(a,y),!1):Gt.$(E,ne)?Gt.$(a,x)?(Gt.qh(a,y,x,b,E,te,he),!1):Gt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),Gt.$(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),Gt.$(se,ne)?(Gt.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),Gt.$(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)):Gt.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return Gt.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,pe){function ye(Tt,bt){var jt=(Tt-a)*(Tt-a)+(bt-y)*(bt-y);jt<Te&&(Te=jt,he.h(Tt,bt))}var Te=1/0;ye(he.x,he.y);var Ge=0,Xe=0,Je=0,it=0;if(E<ne?(Ge=E,Xe=ne):(Ge=ne,Xe=E),te<se?(Je=E,it=ne):(Je=ne,it=E),Ge=(Xe-Ge)/2+pe,pe=(it-Je)/2+pe,E=(E+ne)/2,te=(te+se)/2,Ge===0||pe===0)return he;if(.5>(x>a?x-a:a-x)){if(Ge=1-(x-E)*(x-E)/(Ge*Ge),0>Ge)return he;Ge=Math.sqrt(Ge),b=-pe*Ge+te,ye(x,pe*Ge+te),ye(x,b)}else{if(x=(b-y)/(x-a),b=1/(Ge*Ge)+x*x/(pe*pe),se=2*x*(y-x*a)/(pe*pe)-2*x*te/(pe*pe)-2*E/(Ge*Ge),Ge=se*se-4*b*(2*x*a*te/(pe*pe)-2*y*te/(pe*pe)+te*te/(pe*pe)+E*E/(Ge*Ge)-1+(y-x*a)*(y-x*a)/(pe*pe)),0>Ge)return he;Ge=Math.sqrt(Ge),pe=(-se+Ge)/(2*b),ye(pe,x*pe-x*a+y),Ge=(-se-Ge)/(2*b),ye(Ge,x*Ge-x*a+y)}return he},Ff:function(a,y,x,b,E,te,ne,se,he){var pe=1e21,ye=a,Te=y;if(Gt.Ve(a,y,a,b,E,te,ne,se,he)){var Ge=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te);Ge<pe&&(pe=Ge,ye=he.x,Te=he.y)}return Gt.Ve(x,y,x,b,E,te,ne,se,he)&&(Ge=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),Ge<pe&&(pe=Ge,ye=he.x,Te=he.y)),Gt.Ve(a,y,x,y,E,te,ne,se,he)&&(y=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),y<pe&&(pe=y,ye=he.x,Te=he.y)),Gt.Ve(a,b,x,b,E,te,ne,se,he)&&(a=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),a<pe&&(pe=a,ye=he.x,Te=he.y)),he.h(ye,Te),1e21>pe},us:function(a,y,x){return Gt.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,pe=y+b;return E===ne?(te<se?(ne=te,te=se):ne=se,a<=E&&E<=he&&ne<=pe&&te>=y):te===se?(E<ne?(se=E,E=ne):se=ne,y<=te&&te<=pe&&se<=he&&E>=a):!!($i(a,y,x,b,E,te)||$i(a,y,x,b,ne,se)||Gt.Rl(a,y,he,y,E,te,ne,se)||Gt.Rl(he,y,he,pe,E,te,ne,se)||Gt.Rl(he,pe,a,pe,E,te,ne,se)||Gt.Rl(a,pe,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>=Gt.Fl(a,y,x,b,E,te)*Gt.Fl(a,y,x,b,ne,se)&&0>=Gt.Fl(E,te,ne,se,a,y)*Gt.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,pe=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return he=pe+se*Math.min(b,he),se=a+x*Math.cos(pe),pe=y+x*Math.sin(pe),a+=x*Math.cos(he),y+=x*Math.sin(he),x=(se+a)/2,he=(pe+y)/2,te.push([se,pe,x,he,x,he,a,y]),te;for(;1e-5<b;)E=pe+se*Math.min(b,he),te.push(Gt.Vy(x,pe,E,a,y)),b-=Math.abs(E-pe),pe=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,pe=ne*ne+he*he,ye=pe+ne*ne+he*se;return pe=4/3*(Math.sqrt(2*pe*ye)-ye)/(ne*se-he*ne),se=ne-pe*he,ne=he+pe*ne,he=-ne,pe=te+y,te=Math.cos(pe),pe=Math.sin(pe),[b+a*Math.cos(y),E+a*Math.sin(y),b+se*te-ne*pe,E+se*pe+ne*te,b+se*te-he*pe,E+se*pe+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,pe=ne===0?x:b;return(ne===0?E:te)&&(pe=-pe),ne=se,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),Gt.az(he,ne===0?a:y,pe,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 pe=0;9999999999>pe&&(y=.5*(se+he),!(y===se||y===he));++pe){var ye=a/(y+E),Te=ne/(y+te);if(ye=ye*ye+Te*Te-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 Hn,um:new Hn,Mf:new Hn,Nf:0,vm:100};Gt.za=Gt.AA;function Cn(a){xr(this),this.l=2,a===void 0&&(a=Cn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Cn.o?this.ee=new pn:(Cn.V===null&&(Cn.V=new pn().freeze()),this.ee=Cn.V),this.aq=this.ee.Ja,this.Ip=new Jt().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=$r,this.gg=Ni,this.Rk=this.Sk=NaN,this.Uf=xn}Cn.prototype.copy=function(){var a=new Cn;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===Cn.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},Cn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Cn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Cn.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},Cn.prototype.ka=function(){if(Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Cn.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},Cn.prototype.Xa=function(a){if(!(a instanceof Cn))return!1;if(this.type!==a.type)return this.type===Cn.j&&a.type===Cn.o?Hs(this,a):a.type===Cn.j&&this.type===Cn.o?Hs(a,this):!1;if(this.type===Cn.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 Gt.B(this.startX,a.startX)&&Gt.B(this.startY,a.startY)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)};function Hs(a,y){return a.type!==Cn.j||y.type!==Cn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Gt.B(a.startX,y.startX)&&Gt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===zi&&Gt.B(a.endX,y.endX)&&Gt.B(a.endY,y.endY))))}Cn.ia=function(a){return a.toString()},Cn.prototype.qb=function(a){a.classType===Cn&&(this.type=a)},Cn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Cn.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 Cn.u:var y=new Jt(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 Cn.F:if(y=new Jt(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 Cn.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()}},Cn.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},Cn.parse=function(a,y){function x(){return it>=It-1?!0:pe[it+1].match(_t)!==null}function b(){return it++,pe[it]}function E(Mr){var Pr=parseFloat(b()),gi=parseFloat(b());Tt===Tt.toLowerCase()&&(Pr=Ft.x+Pr,gi=Ft.y+gi),Mr.h(Pr,gi)}function te(){return E(Ft),Ft}function ne(){return E(jt),jt}function se(){var Mr=bt.toLowerCase();return Mr!=="c"&&Mr!=="s"&&Mr!=="q"&&Mr!=="t"?Ft:new lt(2*Ft.x-jt.x,2*Ft.y-jt.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 pe=a.split(" ");for(a=0;a<pe.length;a++){var ye=pe[a];if(ye.match(/(\.[0-9]*)(\.)/gm)!==null){he=_n();for(var Te="",Ge=!1,Xe=0;Xe<ye.length;Xe++){var Je=ye[Xe];Je!=="."||Ge?Je==="."?(he.push(Te),Te="."):Te+=Je:(Ge=!0,Te+=Je)}for(he.push(Te),pe.splice(a,1),ye=0;ye<he.length;ye++)pe.splice(a+ye,0,he[ye]);a+=he.length-1,Xn(he)}}var it=-1,Tt="",bt="";he=new lt(0,0);var jt=new lt(0,0),Ft=new lt(0,0),It=pe.length;a=A1(null),Ge=Te=ye=!1,Xe=!0,Je=null;for(var _t=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(it>=It-1);)if(bt=Tt,Tt=b(),Tt!=="")switch(Tt.toUpperCase()){case"X":Xe=!0,Te=ye=!1;break;case"M":for(Je=te(),a.mc===null||Xe===!0?(Dd(a,Je.x,Je.y,ye,!Te,Ge),Xe=!1):a.moveTo(Je.x,Je.y),he.assign(Ft);!x();)Je=te(),a.lineTo(Je.x,Je.y);break;case"L":for(;!x();)Je=te(),a.lineTo(Je.x,Je.y);break;case"H":for(;!x();)Ft=new lt((Tt===Tt.toLowerCase()?Ft.x:0)+parseFloat(b()),Ft.y),a.lineTo(Ft.x,Ft.y);break;case"V":for(;!x();)Ft=new lt(Ft.x,(Tt===Tt.toLowerCase()?Ft.y:0)+parseFloat(b())),a.lineTo(Ft.x,Ft.y);break;case"C":for(;!x();){Je=new lt,E(Je);var Vt=ne(),Rn=te();wh(a,Je.x,Je.y,Vt.x,Vt.y,Rn.x,Rn.y)}break;case"S":for(;!x();)Je=se(),Vt=ne(),Rn=te(),wh(a,Je.x,Je.y,Vt.x,Vt.y,Rn.x,Rn.y);break;case"Q":for(;!x();)Je=ne(),Vt=te(),Im(a,Je.x,Je.y,Vt.x,Vt.y);break;case"T":for(;!x();)jt=Je=se(),Vt=te(),Im(a,Je.x,Je.y,Vt.x,Vt.y);break;case"B":for(;!x();){Je=parseFloat(b()),Vt=parseFloat(b()),Rn=parseFloat(b());var qn=parseFloat(b()),Yn=parseFloat(b()),En=Yn,hn=!1;x()||(En=parseFloat(b()),x()||(hn=parseFloat(b())!==0)),Tt===Tt.toLowerCase()&&(Rn+=Ft.x,qn+=Ft.y),a.arcTo(Je,Vt,Rn,qn,Yn,En,hn)}break;case"A":for(;!x();)Je=Math.abs(parseFloat(b())),Vt=Math.abs(parseFloat(b())),Rn=parseFloat(b()),Yn=qn=!1,hn=En=0,En=b(),En.length===1?(qn=!!parseFloat(En),Yn=!!parseFloat(b()),En=parseFloat(b())):En.length===2?(qn=!!parseFloat(En[0]),Yn=!!parseFloat(En[1]),En=parseFloat(b())):(qn=!!parseFloat(En[0]),Yn=!!parseFloat(En[1]),En=parseFloat(En.slice(2))),hn=parseFloat(b()),Tt===Tt.toLowerCase()&&(En=Ft.x+En,hn=Ft.y+hn),Ft.h(En,hn),bx(a,Je,Vt,Rn,qn,Yn,En,hn);break;case"Z":Px(a),Ft.assign(he);break;case"F":for(Je="",Vt=1;pe[it+Vt];)if(pe[it+Vt]==="0")Ge=!0,Vt++;else if(pe[it+Vt].match(/[Uu]/)!==null)Vt++;else if(pe[it+Vt].match(_t)===null)Vt++;else{Je=pe[it+Vt];break}Je.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Je="",Vt=1;pe[it+Vt];)if(pe[it+Vt].match(/[Ff]/)!==null)Vt++;else if(pe[it+Vt].match(_t)===null)Vt++;else{Je=pe[it+Vt];break}Je.match(/[Mm]/)?Te=!0:a.mc.isShadowed=!1}if(he=a.os,Rm=a,y)for(y=he.figures.iterator;y.next();)y.value.isFilled=!0;return he},Cn.Ha=function(a,y){for(var x=a.length,b=lt.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}lt.free(b)},Cn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Cn.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},Cn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Cn.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),jl(this,a,!1),ni(a,0,0,0,0),a.freeze()},Cn.prototype.ix=function(){var a=new Jt;return jl(this,a,!0),a};function jl(a,y,x){switch(a.type){case Cn.j:case Cn.u:case Cn.F:x?y.h(a.od,a.pd,0,0):ni(y,a.od,a.pd,0,0),ni(y,a.Dc,a.Ec,0,0);break;case Cn.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):ni(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,se=ne.length,he=te.startX,pe=te.startY,ye=0;ye<se;ye++){var Te=ne[ye];switch(Te.type){case zi:case Fo:he=Te.endX,pe=Te.endY,ni(y,he,pe,0,0);break;case Go:Gt.Dl(he,pe,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.5,y),he=Te.endX,pe=Te.endY;break;case ps:Gt.iv(he,pe,Te.point1X,Te.point1Y,Te.endX,Te.endY,.5,y),he=Te.endX,pe=Te.endY;break;case xo:case Cs:var Ge=Te.type===xo?Ua(Te,te):Ds(Te,te,he,pe),Xe=Ge.length;if(Xe===0){he=Te.type===xo?Te.centerX:Te.endX,pe=Te.type===xo?Te.centerY:Te.endY,ni(y,he,pe,0,0);break}Te=null;for(var Je=0;Je<Xe;Je++)Te=Ge[Je],Gt.Dl(Te[0],Te[1],Te[2],Te[3],Te[4],Te[5],Te[6],Te[7],.5,y);Te!==null&&(he=Te[6],pe=Te[7]);break;default:Ot("Unknown Segment type: "+Te.type)}}}break;default:Ot("Unknown Geometry type: "+a.type)}}Cn.prototype.normalize=function(){this._isFrozen&&Kt(this);var a=this.ix();return this.offset(-a.x,-a.y),new lt(-a.x,-a.y)},Cn.prototype.offset=function(a,y){return this._isFrozen&&Kt(this),this.transform(1,0,0,1,a,y),this},Cn.prototype.scale=function(a,y){return this._isFrozen&&Kt(this),this.transform(a,0,0,y,0,0),this},Cn.prototype.rotate=function(a,y,x){this._isFrozen&&Kt(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=wr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),wr.free(b),this},et=Cn.prototype,et.transform=function(a,y,x,b,E,te){switch(this.type){case Cn.j:case Cn.u:case Cn.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 Cn.o:for(var he=this.figures.s,pe=he.length,ye=0;ye<pe;ye++){var Te=he[ye];ne=Te.startX,se=Te.startY,Te.startX=ne*a+se*x+E,Te.startY=ne*y+se*b+te,Te=Te.segments.s;for(var Ge=Te.length,Xe=0;Xe<Ge;Xe++){var Je=Te[Xe];switch(Je.type){case zi:case Fo:ne=Je.endX,se=Je.endY,Je.endX=ne*a+se*x+E,Je.endY=ne*y+se*b+te;break;case Go:ne=Je.point1X,se=Je.point1Y,Je.point1X=ne*a+se*x+E,Je.point1Y=ne*y+se*b+te,ne=Je.point2X,se=Je.point2Y,Je.point2X=ne*a+se*x+E,Je.point2Y=ne*y+se*b+te,ne=Je.endX,se=Je.endY,Je.endX=ne*a+se*x+E,Je.endY=ne*y+se*b+te;break;case ps:ne=Je.point1X,se=Je.point1Y,Je.point1X=ne*a+se*x+E,Je.point1Y=ne*y+se*b+te,ne=Je.endX,se=Je.endY,Je.endX=ne*a+se*x+E,Je.endY=ne*y+se*b+te;break;case xo:ne=Je.centerX,se=Je.centerY,Je.centerX=ne*a+se*x+E,Je.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Je.startAngle+=ne),0>a&&(Je.startAngle=180-Je.startAngle,Je.sweepAngle=-Je.sweepAngle),0>b&&(Je.startAngle=-Je.startAngle,Je.sweepAngle=-Je.sweepAngle),Je.radiusX*=Math.sqrt(a*a+x*x),Je.radiusY!==void 0&&(Je.radiusY*=Math.sqrt(y*y+b*b));break;case Cs:if(ne=Je.endX,se=Je.endY,Je.endX=ne*a+se*x+E,Je.endY=ne*y+se*b+te,Je.radiusX===0||Je.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Je.xAxisRotation+=ne),0>a&&(Je.xAxisRotation=180-Je.xAxisRotation,Je.isClockwiseArc=!Je.isClockwiseArc),0>b&&(Je.xAxisRotation=-Je.xAxisRotation,Je.isClockwiseArc=!Je.isClockwiseArc),Je.radiusX*=Math.sqrt(a*a+x*x),Je.radiusY*=Math.sqrt(y*y+b*b);break;default:Ot("Unknown Segment type: "+Je.type)}}}}return this._isInvalidBounds=!0,this},et.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 Cn.j:return Gt.Yb(x,b,E,te,y,a.x,a.y);case Cn.u:var ne=Jt.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),Jt.free(ne),a;case Cn.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 Cn.o:return Qo(this,a,y,!0,!1);default:return!1}};function Qo(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,se=0,he,pe,ye,Te,Ge=a.figures.s,Xe=Ge.length,Je=0;Je<Xe;Je++){var it=Ge[Je],Tt=!it.isEvenOdd;if(it.isFilled){if(b&&it.ca(te,y,x))return!0;var bt=it.segments;he=it.startX,pe=it.startY;for(var jt=he,Ft=pe,It=bt.s,_t=0;_t<=bt.length;_t++){var Vt=void 0;if(_t!==bt.length){Vt=It[_t];var Rn=Vt.type;a=Vt.endX,Te=Vt.endY}else Rn=zi,a=jt,Te=Ft;switch(Rn){case Fo:if(jt=Pa(te,y,ne,y,he,pe,jt,Ft),isNaN(jt))return!0;se+=jt,jt=a,Ft=Te;break;case zi:if(he=Pa(te,y,ne,y,he,pe,a,Te),isNaN(he))return!0;se+=he;break;case Go:ye=Gt.Fo(he,pe,Vt.point1X,Vt.point1Y,Vt.point2X,Vt.point2Y,a,Te,ne,y,te,y,.5),se+=ye;break;case ps:ye=Gt.Fo(he,pe,(he+2*Vt.point1X)/3,(pe+2*Vt.point1Y)/3,(2*Vt.point1X+a)/3,(2*Vt.point1Y+Te)/3,a,Te,ne,y,te,y,.5),se+=ye;break;case xo:case Cs:Rn=Vt.type===xo?Ua(Vt,it):Ds(Vt,it,he,pe);var qn=Rn.length;if(qn===0){if(he=Pa(te,y,ne,y,he,pe,Vt.type===xo?Vt.centerX:Vt.endX,Vt.type===xo?Vt.centerY:Vt.endY),isNaN(he))return!0;se+=he;break}Vt=null;for(var Yn=0;Yn<qn;Yn++){if(Vt=Rn[Yn],Yn===0){if(ye=Pa(te,y,ne,y,he,pe,Vt[0],Vt[1]),isNaN(ye))return!0;se+=ye}ye=Gt.Fo(Vt[0],Vt[1],Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],ne,y,te,y,.5),se+=ye}Vt!==null&&(a=Vt[6],Te=Vt[7]);break;default:Ot("Unknown Segment type: "+Vt.type)}he=a,pe=Te}if(Tt){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 Pa(a,y,x,b,E,te,ne,se){if(Gt.Yb(E,te,ne,se,.05,a,y))return NaN;var he=(a-x)*(te-se);if(he===0)return 0;var pe=((a*b-y*x)*(E-ne)-(a-x)*(E*se-te*ne))/he;if(y=(a*b-y*x)*(te-se)/he,pe>=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(pe<E||pe>ne)return 0}else if(pe<ne||pe>E)return 0;return 0<he?1:-1}function Fs(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}et.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new lt),this.type===Cn.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],pe=he.length;for(a=0;a<pe;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},et.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Cn.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 pe=se[a];if(te+pe>=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+=pe}}return NaN},et.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Cn.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],pe=he.length;for(a=0;a<pe;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},et.xx=function(a){if(this.type===Cn.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=lt.alloc();return Gt.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,lt.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Cn.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 pe=Math.min(ne,he,se,E);if(pe===se)return b/te;if(pe===he)return(y+a)/te;if(pe===E)return(2*y+x-b)/te;if(pe===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=lt.alloc(),E=1/0,se=ne=0,he=y.length;for(var ye=pe=0,Te=0;Te<he;Te++)for(var Ge=y[Te],Xe=x[Te],Je=Ge.length,it=0;it<Je;it+=2){var Tt=Ge[it],bt=Ge[it+1];if(it!==0){Gt.qh(pe,ye,Tt,bt,a.x,a.y,b);var jt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);jt<E&&(E=jt,ne=se,ne+=Math.sqrt((b.x-pe)*(b.x-pe)+(b.y-ye)*(b.y-ye))),se+=Xe[(it-2)/2]}pe=Tt,ye=bt}return lt.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function ol(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Cn.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===Cn.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===Cn.F){var te=new Oo;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new fi(xo);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=Ua(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];Gt.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(Fu(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 pe=E.segments.s,ye=pe.length,Te=0;Te<ye;Te++){var Ge=pe[Te];switch(Ge.type){case Fo:4<=b.length&&(y.push(b),x.push(Fu(b))),b=[],b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY,se=ne,he=te;break;case zi:b.push(Ge.endX),b.push(Ge.endY),ne=Ge.endX,te=Ge.endY;break;case Go:Gt.Qe(ne,te,Ge.point1X,Ge.point1Y,Ge.point2X,Ge.point2Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case ps:Gt.ep(ne,te,Ge.point1X,Ge.point1Y,Ge.endX,Ge.endY,.5,b),ne=Ge.endX,te=Ge.endY;break;case xo:var Xe=Ua(Ge,E),Je=Xe.length;if(Je===0){b.push(Ge.centerX),b.push(Ge.centerY),ne=Ge.centerX,te=Ge.centerY;break}for(var it=0;it<Je;it++){var Tt=Xe[it];Gt.Qe(ne,te,Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7],.5,b),ne=Tt[6],te=Tt[7]}break;case Cs:if(Xe=Ds(Ge,E,ne,te),Je=Xe.length,it=Ge.endX,Tt=Ge.endY,Je===0){b.push(it),b.push(Tt),ne=it,te=Tt;break}for(it=0;it<Je;it++)Tt=Xe[it],Gt.Qe(ne,te,Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7],.5,b),ne=Tt[6],te=Tt[7];break;default:Ot("Segment not of valid type: "+Ge.type)}Ge.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(Fu(b)))}}}function Fu(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(Nn(x,b,ne,se))),x=ne,b=se}return y}et.add=function(a){return this.ee.add(a),this},et.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&Kt(this),this.fg=new er(a,y,E,te).freeze(),this.gg=new er(x,b,ne,se).freeze(),this},vn.Object.defineProperties(Cn.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 ol(this),this.tk}},flattenedLengths:{get:function(){return ol(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Cn.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===Cn.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&&Kt(this,a),this.na=a,a===Cn.o?this.ee=new pn:(Cn.V===null&&(Cn.V=new pn().freeze()),this.ee=Cn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Kt(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Kt(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Kt(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Kt(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Kt(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Kt(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Kt(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Kt(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Cn.prototype.setSpots=Cn.prototype.pm,Cn.prototype.add=Cn.prototype.add,Cn.prototype.getFractionForPoint=Cn.prototype.xx,Cn.prototype.getPointAndAngleAlongPath=Cn.prototype.Qu,Cn.prototype.getAngleAlongPath=Cn.prototype.wx,Cn.prototype.getPointAlongPath=Cn.prototype.Pu,Cn.prototype.containsPoint=Cn.prototype.ca,Cn.prototype.transform=Cn.prototype.transform,Cn.prototype.rotate=Cn.prototype.rotate,Cn.prototype.scale=Cn.prototype.scale,Cn.prototype.offset=Cn.prototype.offset,Cn.prototype.normalize=Cn.prototype.normalize,Cn.prototype.computeBoundsWithoutOrigin=Cn.prototype.ix,Cn.prototype.equalsApprox=Cn.prototype.Xa,Cn.className="Geometry",Cn.j=new Qt(Cn,"Line",0),Cn.u=new Qt(Cn,"Rectangle",1),Cn.F=new Qt(Cn,"Ellipse",2),Cn.o=new Qt(Cn,"Path",3),Cn.V=null,Cn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Cn.className="Geometry",Cn.stringify=Cn.ia,Cn.fillPath=Cn.nb,Cn.parse=Cn.parse,Cn.Line=Cn.j,Cn.Rectangle=Cn.u,Cn.Ellipse=Cn.F,Cn.Path=Cn.o;function Oo(a,y,x,b,E){xr(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 pn,this.sr=this.pl.Ja,this.fw=null}Oo.prototype.copy=function(){var a=new Oo;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},et=Oo.prototype,et.Xa=function(a){if(!(a instanceof Oo&&Gt.B(this.startX,a.startX)&&Gt.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},et.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},et.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},et.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},et.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},et.add=function(a){return this.pl.add(a),this},et.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,se=this.segments.s,he=se.length,pe=0;pe<he;pe++){var ye=se[pe];switch(ye.type){case Fo:te=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case zi:if(Gt.Yb(b,E,ye.endX,ye.endY,x,a,y))return!0;b=ye.endX,E=ye.endY;break;case Go:if(Gt.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 ps:if(Gt.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 xo:case Cs:var Te=ye.type===xo?Ua(ye,this):Ds(ye,this,b,E),Ge=Te.length,Xe=ye.type===xo?ye.centerX:ye.endX,Je=ye.type===xo?ye.centerY:ye.endY;if(Ge===0){if(Gt.Yb(b,E,Xe,Je,x,a,y))return!0;b=Xe,E=Je;break}for(Xe=null,Je=0;Je<Ge;Je++)if(Xe=Te[Je],Je===0&&Gt.Yb(b,E,Xe[0],Xe[1],x,a,y)||Gt.cs(Xe[0],Xe[1],Xe[2],Xe[3],Xe[4],Xe[5],Xe[6],Xe[7],.5,a,y,x))return!0;Xe!==null&&(b=Xe[6],E=Xe[7]);break;default:Ot("Unknown Segment type: "+ye.type)}if(ye.isClosed&&(b!==te||E!==ne)&&Gt.Yb(b,E,te,ne,x,a,y))return!0}return!1},vn.Object.defineProperties(Oo.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&&Kt(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Kt(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Kt(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Kt(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Kt(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Kt(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Oo.prototype.add=Oo.prototype.add,Oo.prototype.equalsApprox=Oo.prototype.Xa,Oo.className="PathFigure";function fi(a,y,x,b,E,te,ne,se){xr(this),a===void 0&&(a=zi),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===Cs?(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===xo&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===xo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}fi.prototype.copy=function(){var a=new fi;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},et=fi.prototype,et.Xa=function(a){if(!(a instanceof fi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Fo:case zi:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY);case Go:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y)&&Gt.B(this.point2X,a.point2X)&&Gt.B(this.point2Y,a.point2Y);case ps:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y);case xo:return Gt.B(this.startAngle,a.startAngle)&&Gt.B(this.sweepAngle,a.sweepAngle)&&Gt.B(this.centerX,a.centerX)&&Gt.B(this.centerY,a.centerY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);case Cs:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Gt.B(this.xAxisRotation,a.xAxisRotation)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);default:return!1}},et.qb=function(a){a.classType===fi&&(this.type=a)},et.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Fo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case zi:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Go: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 ps: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 xo: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 Cs: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":"")},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.close=function(){return this.isClosed=!0,this};function Ua(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=Gt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=wr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Cn.Ha(te,ne),wr.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 Ds(a,y,x,b){function E(it,Tt,bt,jt){return(it*jt<Tt*bt?-1:1)*Math.acos((it*bt+Tt*jt)/(Math.sqrt(it*it+Tt*Tt)*Math.sqrt(bt*bt+jt*jt)))}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,pe=a.Dc,ye=a.Ec,Te=Math.cos(ne),Ge=Math.sin(ne),Xe=Te*(x-pe)/2+Ge*(b-ye)/2;ne=-Ge*(x-pe)/2+Te*(b-ye)/2;var Je=Xe*Xe/(y*y)+ne*ne/(te*te);return 1<Je&&(y*=Math.sqrt(Je),te*=Math.sqrt(Je)),Je=(se===he?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Xe*Xe)/(y*y*ne*ne+te*te*Xe*Xe)),isNaN(Je)&&(Je=0),se=Je*y*ne/te,Je=Je*-te*Xe/y,isNaN(se)&&(se=0),isNaN(Je)&&(Je=0),x=(x+pe)/2+Te*se-Ge*Je,b=(b+ye)/2+Ge*se+Te*Je,ye=E(1,0,(Xe-se)/y,(ne-Je)/te),Te=(Xe-se)/y,pe=(ne-Je)/te,Xe=(-Xe-se)/y,se=(-ne-Je)/te,ne=E(Te,pe,Xe,se),Xe=(Te*Xe+pe*se)/(Math.sqrt(Te*Te+pe*pe)*Math.sqrt(Xe*Xe+se*se)),-1>=Xe?ne=Math.PI:1<=Xe&&(ne=0),!he&&0<ne&&(ne-=2*Math.PI),he&&0>ne&&(ne+=2*Math.PI),he=y>te?1:y/te,Xe=y>te?te/y:1,y=Gt.jx(0,0,y>te?y:te,ye,ye+ne,!0),te=wr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Xe),Cn.Ha(y,te),wr.free(te),a.ae=y,a.ae}vn.Object.defineProperties(fi.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&&Kt(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Kt(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Kt(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Kt(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Kt(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Kt(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Kt(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Kt(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Kt(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Dn(a,">= zero",fi,"radiusX"),this._isFrozen&&Kt(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Dn(a,">= zero",fi,"radiusY"),this._isFrozen&&Kt(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Kt(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&&Kt(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&&Kt(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&&Kt(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&&Kt(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),fi.prototype.equalsApprox=fi.prototype.Xa;var Fo=new Qt(fi,"Move",0),zi=new Qt(fi,"Line",1),Go=new Qt(fi,"Bezier",2),ps=new Qt(fi,"QuadraticBezier",3),xo=new Qt(fi,"Arc",4),Cs=new Qt(fi,"SvgArc",4);fi.className="PathSegment",fi.Move=Fo,fi.Line=zi,fi.Bezier=Go,fi.QuadraticBezier=ps,fi.Arc=xo,fi.SvgArc=Cs;function ma(){this.H=null,this.xu=new lt(0,0).freeze(),this.mt=new lt(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}ma.prototype.copy=function(){var a=new ma;return this.clone(a)},ma.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},ma.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},ma.prototype.So=function(a,y){var x=this.diagram;return x===null||Pp(x,a,y),y},ma.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Pp(x,a,y),y.assign(x.Ps(y))),y},vn.Object.defineProperties(ma.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}}}),ma.prototype.getMultiTouchDocumentPoint=ma.prototype.Bz,ma.prototype.getMultiTouchViewPoint=ma.prototype.So,ma.className="InputEvent";function hu(){this.H=null,this.xa="",this.ar=this.Lr=null}hu.prototype.copy=function(){var a=new hu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},hu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},vn.Object.defineProperties(hu.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}}}),hu.className="DiagramEvent";function oo(){this.Fm=no,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}oo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},oo.prototype.copy=function(){var a=new oo;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=en(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=en(y)&&typeof y.J=="function"?y.J():y,a},oo.prototype.qb=function(a){a.classType===oo&&(this.change=a)},oo.prototype.toString=function(){var a="";return a=this.change===Ea?a+"* ":this.change===no?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===Ea?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=zr(this.object)),this.oldValue!==null&&(a+=" old: "+zr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+zr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},oo.prototype.I=function(a){return a?this.oldValue:this.newValue},oo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},oo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},oo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},oo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},oo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},vn.Object.defineProperties(oo.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===Ea&&(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}}}),oo.prototype.redo=oo.prototype.redo,oo.prototype.canRedo=oo.prototype.canRedo,oo.prototype.undo=oo.prototype.undo,oo.prototype.canUndo=oo.prototype.canUndo,oo.prototype.getParam=oo.prototype.Dz,oo.prototype.getValue=oo.prototype.I,oo.prototype.clear=oo.prototype.clear;var Ea=new Qt(oo,"Transaction",-1),no=new Qt(oo,"Property",0),wo=new Qt(oo,"Insert",1),Eo=new Qt(oo,"Remove",2);oo.className="ChangedEvent",oo.Transaction=Ea,oo.Property=no,oo.Insert=wo,oo.Remove=Eo;function Uo(){this.o=new pn().freeze(),this.xa="",this.j=!1}Uo.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},Uo.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()},Uo.prototype.canUndo=function(){return this.isComplete},Uo.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()}},Uo.prototype.canRedo=function(){return this.isComplete},Uo.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()}},Uo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Yt,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===no&&b.object){var E=y.get(b.object);E||(E=new Yt,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()}},vn.Object.defineProperties(Uo.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}}}),Uo.prototype.optimize=Uo.prototype.ak,Uo.prototype.redo=Uo.prototype.redo,Uo.prototype.canRedo=Uo.prototype.canRedo,Uo.prototype.undo=Uo.prototype.undo,Uo.prototype.canUndo=Uo.prototype.canUndo,Uo.prototype.clear=Uo.prototype.clear,Uo.className="Transaction";function ho(){this.Pt=new yn,this.Jd=!1,this.u=new pn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new pn().freeze(),this.hl=new pn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}ho.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},ho.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},ho.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},et=ho.prototype,et.Xw=function(a){this.Pt.add(a)},et.Rx=function(a){this.Pt.remove(a)},et.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},et.eb=function(a){return a===void 0&&(a=""),Du(this,!0,a)},et.Kf=function(){return Du(this,!1,"")};function Du(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Ln("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}et.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()}},ho.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},ho.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){Ln("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},ho.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},ho.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){Ln("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},ho.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new oo;for(b.change=Ea,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},ho.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Uo);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||Ln("Change not within a transaction: "+x.toString()))}},ho.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},vn.Object.defineProperties(ho.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}}}),ho.prototype.handleChanged=ho.prototype.Tu,ho.prototype.redo=ho.prototype.redo,ho.prototype.undo=ho.prototype.undo,ho.prototype.canUndo=ho.prototype.canUndo,ho.prototype.discardHistoryAfterIndex=ho.prototype.lx,ho.prototype.rollbackTransaction=ho.prototype.Kf,ho.prototype.commitTransaction=ho.prototype.eb,ho.prototype.startTransaction=ho.prototype.Ea,ho.prototype.removeModel=ho.prototype.Rx,ho.prototype.addModel=ho.prototype.Xw,ho.prototype.clear=ho.prototype.clear,ho.className="UndoManager";function li(){xr(this),this.H=gu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new ma,this.Zr=-1}li.prototype.toString=function(){return this.name!==""?this.name+" Tool":ur(this.constructor)},li.prototype.updateAdornments=function(){},li.prototype.canStart=function(){return this.isEnabled},li.prototype.doStart=function(){},li.prototype.doActivate=function(){this.isActive=!0},li.prototype.doDeactivate=function(){this.isActive=!1},li.prototype.doStop=function(){},li.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},li.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},li.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},li.prototype.doMouseMove=function(){},li.prototype.doMouseUp=function(){this.stopTool()},li.prototype.doMouseWheel=function(){},li.prototype.canStartMultiTouch=function(){return!0},li.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,lt.allocAt(NaN,NaN)),b=y.So(1,lt.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}lt.free(x),lt.free(b)},li.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,lt.allocAt(NaN,NaN)),b=y.So(1,lt.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 lt((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}lt.free(x),lt.free(b)},li.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},li.prototype.doKeyUp=function(){},li.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},li.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},li.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(qr?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||(qr?y.meta:y.control)||y.shift||a.clearSelection()}},li.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,uf(a,b,x),b.handled};function uf(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)}}}li.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}},li.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},li.prototype.doCurrentObjectChanged=function(){},li.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===ih&&!y.shift||E===cu&&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===ih&&y.shift||E===cu&&!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)}}},li.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},li.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Li(function(){x.doWaitAfter(b)},a)},li.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Mn.clearTimeout(this.Zr),this.Zr=-1},li.prototype.doWaitAfter=function(){},li.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof di);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},li.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},vn.Object.defineProperties(li.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Zt&&(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}}}),li.prototype.startTransaction=li.prototype.Ea,li.className="Tool";function Qi(){li.call(this),this.name="ToolManager",this.hb=new pn,this.ob=new pn,this.Hb=new pn,this.F=this.V=850,this.o=new ln(2,2).ja(),this.Ha=5e3,this.ia=cu,this.u=_h,this.Mp=this.j=null,this.zj=-1}tn(Qi,li),Qi.prototype.initializeStandardTools=function(){},Qi.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof di&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Qi.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Ol&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Bu){y.bubbles=!0;return}if(this.gestureBehavior===Ol)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===cu?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=cu)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Qi.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Bu){y.bubbles=!0;return}if(this.gestureBehavior===Ol)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}}Cc(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Cc(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Qi.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof di&&(y===a||y.rg(a))||this.hideToolTip()},Qi.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()))},Qi.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)},Qi.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 di)||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()},Qi.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof di){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 Ql&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Mn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Li(function(){E.hideToolTip()},a)}},Qi.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}},Qi.prototype.hideToolTip=function(){this.zj!==-1&&(Mn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof di?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ql&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Qi.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()},Qi.prototype.doMouseWheel=function(){this.standardMouseWheel()},Qi.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Qi.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Qi.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},Qi.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},Qi.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)},vn.Object.defineProperties(Qi.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 di?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}}}),Qi.prototype.replaceStandardTool=Qi.prototype.gb;var cu=new Qt(Qi,"WheelScroll",0),ih=new Qt(Qi,"WheelZoom",1),Ec=new Qt(Qi,"WheelNone",2),_h=new Qt(Qi,"GestureZoom",3),Ol=new Qt(Qi,"GestureCancel",4),Bu=new Qt(Qi,"GestureNone",5);Qi.className="ToolManager",Qi.WheelScroll=cu,Qi.WheelZoom=ih,Qi.WheelNone=Ec,Qi.GestureZoom=_h,Qi.GestureCancel=Ol,Qi.GestureNone=Bu;function uo(){li.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 lt(NaN,NaN),this.Fr=new lt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new yn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var al;tn(uo,li),uo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},uo.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},uo.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(qr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},uo.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),la=null,this.isActive=!0,this.tl.set(a.position),zh(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&&os(a),pd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,la=this,oh=this.diagram,this.doSimulatedDragOut()))};function zh(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 Bs,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}uo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},uo.prototype.Pd=function(a){return a===void 0?new Gu(On):this.isGridSnapEnabled?new Gu(new lt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Gu(a.copy())},uo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Yl(this),Qh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<al.count){for(var y=al,x=y.length,b=0;b<x;b++){var E=y.M(b);ao(E),Gi(E),Yl(E),E.diagram.ug()}y.clear()}ao(this),this.tl.h(NaN,NaN),oh!==null&&(oh.currentCursor=""),la=oh=null,Gi(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Pf(a,!0)},uo.prototype.stopTransaction=function(){var a=this.diagram,y=li.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Yl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,fu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function kc(){var a=la;Gi(a),Fa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}uo.prototype.doCancel=function(){Gi(this),Fa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},uo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},uo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function $l(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")):Fa(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 Yt,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,zh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Gi(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 lt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ao(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 Xo(a,y,x){var b=a.diagram,E=a.startPoint,te=lt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),lt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(os(b),b.hk())}uo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Jh(b,a,y,this.dragOptions,x)};function Fa(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()),Ch(b,-E.x,-E.y)}y.bd()}}function ka(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),sl(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=fu(a,E,b),!a.isActive&&la===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof Lr)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&la===null||(a.doDragOver(y,b),!a.isActive&&la===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)}uo.prototype.findDragOverObject=function(a){var y=this;return mu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof di||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},uo.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function fu(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&&la===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=Jl(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 Jl(a){var y=a.panel;return y!==null?y:a instanceof hr&&!(a instanceof Lr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function du(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(pe){return b.findValidLinkablePort(pe,x)});a=lt.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(Or,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return lt.free(a),ne}function sl(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=du(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=du(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)):ed(E,ne,te,he,se):ed(E,null,null,null,null)}}}}uo.prototype.doDragOver=function(){};function Fl(a,y){var x=a.diagram;a.dragsLink&&sl(a,!0),Yl(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;J0(a,E,te),te=Jl(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||la!==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||la!==null){for(a=Jt.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Gn&&Q0(x,b,a);Jt.free(a)}}}function J0(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Lr||(x=a.mouseDrop,x!==null&&x(y))}function Q0(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()}uo.prototype.doDropOnto=function(){},uo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?($l(this,!1),pd(a,this.copiedParts),Xo(this,this.copiedParts,!1),Qh(a,this.copiedParts)):this.mayMove()?(Gi(this),Xo(this,this.draggedParts,!0)):this.mayDragOut()?($l(this,!1),Xo(this,this.copiedParts,!1)):Gi(this),ka(this,a.lastInput.documentPoint))}},uo.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(Gi(this),$l(this,!0),pd(a,this.copiedParts),Xo(this,this.copiedParts,!1),Qh(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,Gi(this),this.mayMove()&&(Xo(this,this.draggedParts,!0),ka(this,a.lastInput.documentPoint))),this.Ym=!0,Fl(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&q0(this),a.Ya(),Qh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},uo.prototype.simulatedMouseMove=function(a,y,x){if(la===null)return!1;var b=la.diagram;x instanceof Zt||(x=null);var E=oh;return x!==E&&(E!==null&&E!==b&&(E.ug(),la.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),oh=x,x!==null&&x!==b&&(kc(),E=x.toolManager.findTool("Dragging"),E!==null&&(al.contains(E)||al.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)},uo.prototype.simulatedMouseUp=function(a,y,x){if(la===null)return!1;var b=oh,E=la.diagram;if(x===null)return la.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),la.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;oh=x,b=x.toolManager.findTool("Dragging"),b!==null&&(kc(),al.contains(b)||al.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 lt),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=la,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function q0(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())}}uo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(qr?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},uo.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},uo.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},uo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},uo.prototype.Az=function(){return la},uo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=la;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},uo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Zs(a),a.animationManager.Cc(),a=la,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},uo.prototype.doSimulatedDragLeave=function(){var a=la;a!==null&&a.doSimulatedDragOut(),this.doCancel()},uo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=la;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rg(this,y.draggedParts.Lf(),!1,a.firstInput),Xo(this,this.copiedParts,!1),ka(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},uo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=la;if(y!==null){var x=y.diagram;if(y.Ym=!0,Gi(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rg(this,y.draggedParts.Lf(),!0,a.lastInput),Xo(this,this.copiedParts,!1);var b=new yn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Fl(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 Rg(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=Jt.alloc();E=b=1/0;for(var ne=-1/0,se=-1/0,he=y.iterator;he.next();){var pe=he.value;if(pe.isVisible()){var ye=pe.location;pe=ye.x,ye=ye.y,isNaN(pe)||isNaN(ye)||(pe<b&&(b=pe),ye<E&&(E=ye),pe>ne&&(ne=pe),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,Jt.free(te),te=a.Fr,ne=new Yt,se=lt.alloc(),he=y.iterator;he.next();)pe=he.value,pe instanceof kn&&pe.canCopy()&&(ye=x.I(pe),ye!==null&&(ye.points=pe.points,Ch(ye,te.x-b,te.y-E),ye.suspendsRouting=!0,ne.add(ye,a.Pd())));for(y=y.iterator;y.next();)pe=y.value,pe.Zc()&&pe.canCopy()&&(he=x.I(pe),he!==null&&(pe=pe.location,se.h(te.x-(b-pe.x),te.y-(E-pe.y)),he.location=se,he.Va(),ne.add(he,a.Pd(se))));lt.free(se),a.copiedParts=ne,zh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}uo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},uo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new lt},vn.Object.defineProperties(uo.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),uo.prototype.getDraggingSource=uo.prototype.Az;var la=null,oh=null;uo.className="DraggingTool",al=new pn,dn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Qi.prototype.doCancel=function(){la!==null&&la.doCancel(),li.prototype.doCancel.call(this)};function yo(){li.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new kn,y=new Fr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Fr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Gn,y=new Fr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Er,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Gn,y=new Fr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Er,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 Yt,this.Of=this.gj=this.Pf=null}tn(yo,li),yo.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},yo.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=ln.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,ln.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Or,te=lt.alloc(),x.location=y.ga(Or,te),lt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},yo.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Er,y.fromSpot=jr,y.toSpot=jr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},yo.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},yo.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)}},yo.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},yo.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(Te){return E.findValidLinkablePort(Te,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(Or,lt.alloc()),pe=x.x-he.x,ye=x.y-he.y;lt.free(he),he=pe*pe+ye*ye,he<b&&(pe=this.validPortsCache.I(ne),pe!==null?pe&&(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},yo.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},yo.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},yo.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},yo.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},yo.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)},yo.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 yn;return b.add(a),Da(this,x,y,b)};function Da(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Da(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Da(a,y.labeledLink,x,b))))}yo.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!==Tf){if(b===Rp){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!Wa(this,a,y,x,!0)}if(b===_p){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!Wa(this,a,y,x,!0)}if(b===Dp)return a===y?a=!0:(b=new yn,b.add(y),a=Ha(this,b,a,y,x)),!a;if(b===Bp)return!Wa(this,a,y,x,!1);if(b===Ip)return a===y?a=!0:(b=new yn,b.add(y),a=Tc(this,b,a,y,x)),!a}return!0};function Wa(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&&Wa(a,ne,x,b,E)))return!0}return!1}function Ha(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&&Ha(a,y,ne,b,E)))return!0}return!1}function Tc(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&&Tc(a,y,se,b,E))return!0}}return!1}vn.Object.defineProperties(yo.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}}}),yo.className="LinkingBaseTool";function Ka(){yo.call(this),this.name="Linking",this.V={},this.F=null,this.K=Gh,this.Xd=null}tn(Ka,yo),Ka.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},Ka.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===Gh||x===_g){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===Gh||x===zg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Ka.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)},Ka.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()},Ka.prototype.doStop=function(){yo.prototype.doStop.call(this),this.startObject=null},Ka.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)}}},Ka.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)},Ka.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Ka.prototype.doNoLink=function(){},vn.Object.defineProperties(Ka.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 Gh=new Qt(Ka,"Either",0),_g=new Qt(Ka,"ForwardsOnly",0),zg=new Qt(Ka,"BackwardsOnly",0);Ka.className="LinkingTool",Ka.Either=Gh,Ka.ForwardsOnly=_g,Ka.BackwardsOnly=zg;function Bs(){yo.call(this),this.name="Relinking";var a=new Fr;a.figure="Diamond",a.desiredSize=Tr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Fr,a.figure="Diamond",a.desiredSize=Tr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Jt}tn(Bs,yo),Bs.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)}},Bs.prototype.makeAdornment=function(a,y){var x=new di;return x.type=Pn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Bs.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},Bs.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 di&&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=br),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=br),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},Bs.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Rd||x===Eh)&&(x=Qa),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}},Bs.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()},Bs.prototype.doStop=function(){yo.prototype.doStop.call(this),this.handle=null},Bs.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()}}},Bs.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},Bs.prototype.doNoRelink=function(){};function ed(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)}vn.Object.defineProperties(Bs.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 di))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Bs.className="RelinkingTool",dn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),dn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ko(){li.call(this),this.name="LinkReshaping";var a=new Fr;a.figure="Rectangle",a.desiredSize=ai,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Fr,a.figure="Diamond",a.desiredSize=Tr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new lt,this.Yq=new pn}tn(ko,li),ko.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:lp},ko.prototype.om=function(a,y){a.reshapingBehavior=y},ko.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)}},ko.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new di,E.type=Pn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Gs)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 pe=y.i(x+1);Gt.B(he.x,pe.x)&&Gt.B(he.y,pe.y)&&(pe=y.i(x-1)),Gt.B(he.x,pe.x)?(this.om(se,lh),se.cursor="n-resize"):Gt.B(he.y,pe.y)&&(this.om(se,sh),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),pe=y.i(te),Gt.B(he.x,pe.x)&&Gt.B(he.y,pe.y)&&(he=y.i(te+1)),Gt.B(he.x,pe.x)?(this.om(se,lh),se.cursor="n-resize"):Gt.B(he.y,pe.y)&&(this.om(se,sh),se.cursor="w-resize")):ne!==te&&(this.om(se,td),se.cursor="move");E.add(se)}E.adornedObject=a}return E},ko.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ko.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ko.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},ko.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}}},ko.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ko.prototype.stopTransaction=function(){var a=this.diagram,y=li.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ko.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ko.prototype.getResegmentingPoint=function(){return this.handle.ga(Or)},ko.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ko.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&&(ah(this,ne,b,E,te,!0)||ah(this,ne,b,E,te,!1))){var se=y.points.copy();ah(this,ne,b,E,te,!0)?(se.cd(x-2,new lt(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new lt(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new lt((te.x+ne.x)/2,ne.y)),se.cd(x+1,new lt((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&&(ah(this,b,E,te,ne,!0)||ah(this,b,E,te,ne,!1))&&(se=y.points.copy(),ah(this,b,E,te,ne,!0)?(se.cd(x-1,new lt(b.x,(b.y+ne.y)/2)),se.cd(x+2,new lt(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new lt((b.x+ne.x)/2,b.y)),se.cd(x+2,new lt((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=lt.alloc(),Gt.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()),lt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function ah(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}ko.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===lh?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===sh&&(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===lh?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===sh&&(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);Gt.B(te.x,E.x)&&Gt.B(E.y,ne.y)?(Gt.B(te.x,y.i(b-2).x)&&!Gt.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),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Gt.B(te.y,E.y)&&Gt.B(E.x,ne.x)?(Gt.B(te.y,y.i(b-2).y)&&!Gt.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),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(te.x,E.x)&&Gt.B(E.x,ne.x)?(Gt.B(te.x,y.i(b-2).x)&&!Gt.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),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(te.y,E.y)&&Gt.B(E.y,ne.y)&&(Gt.B(te.y,y.i(b-2).y)&&!Gt.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),Gt.B(ne.y,y.i(b+2).y)&&!Gt.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(Or,lt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,lt.alloc()),y.L(0,b.x,b.y),lt.free(te),lt.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(Or,lt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,lt.alloc()),y.L(y.pointsCount-1,a.x,a.y),lt.free(x),lt.free(a));y.zf()},ko.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case td:return a;case lh:return new lt(y.i(x).x,a.y);case sh:return new lt(a.x,y.i(x).y);default:case lp:return y.i(x)}},vn.Object.defineProperties(ko.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 di))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}}}),ko.prototype.setReshapingBehavior=ko.prototype.om,ko.prototype.getReshapingBehavior=ko.prototype.Ru;var lp=new Qt(ko,"None",0),sh=new Qt(ko,"Horizontal",1),lh=new Qt(ko,"Vertical",2),td=new Qt(ko,"All",3);ko.className="LinkReshapingTool",ko.None=lp,ko.Horizontal=sh,ko.Vertical=lh,ko.All=td,dn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ba(){li.call(this),this.name="Resizing",this.o=new ln(1,1).freeze(),this.j=new ln(9999,9999).freeze(),this.yg=new ln(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Fr;a.alignmentFocus=Or,a.figure="Rectangle",a.desiredSize=ai,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new lt,this.Dw=new ln,this.Tn=new lt,this.rt=new ln(0,0),this.qt=new ln(1/0,1/0),this.pt=new ln(1,1)}tn(ba,li),ba.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(),ic(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},ba.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new di,y.type=Pn.Spot,y.locationSpot=Or;var x=new Ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,$r)),y.add(this.makeHandle(a,Ci)),y.add(this.makeHandle(a,Ni)),y.add(this.makeHandle(a,zo)),y.add(this.makeHandle(a,Ca)),y.add(this.makeHandle(a,aa)),y.add(this.makeHandle(a,ga)),y.add(this.makeHandle(a,Oa))}else if(dl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ba.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ba.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=Or),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break e;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Pn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ba.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},ba.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))},ba.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ba.prototype.stopTransaction=function(){var a=this.diagram,y=li.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ba.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ba.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,lt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),lt.free(E)}},ba.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,lt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),lt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ba.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 Lr){var b=new pn;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()}},ba.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=Or);var ne=this.adornedObject.naturalBounds,se=ne.x,he=ne.y,pe=ne.x+ne.width,ye=ne.y+ne.height,Te=1;if(!te){Te=ne.width;var Ge=ne.height;0>=Te&&(Te=1),0>=Ge&&(Ge=1),Te=Ge/Te}return Ge=lt.alloc(),Gt.No(a.x,a.y,se,he,E.width,E.height,Ge),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Ge.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=Math.max(pe-a.x,x.width),a.y=Math.max(Ge.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(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.x=pe-a.width,a.y=ye-a.height)):1<=y.y?(a.x=Math.max(Ge.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=Math.max(pe-a.x,x.width),a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.x=pe-a.width)):(a.x=Math.max(Ge.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=pe-a.x,te||(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te,a.y=he+.5*(ye-he-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),a.y=Math.max(Ge.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(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.y=ye-a.height)):1<=y.y?(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width))):(a.width=Math.max(Math.min(Ge.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te,a.y=he+.5*(ye-he-a.height))):0>=y.y?(a.y=Math.max(Ge.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/Te,b.width),x.width),a.height=Te*a.width,a.x=se+.5*(pe-se-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Ge.y-he,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width,a.x=se+.5*(pe-se-a.width))),lt.free(Ge),a},ba.prototype.computeReshape=function(){var a=fn;return this.adornedObject instanceof Fr&&(a=Ev(this.adornedObject)),!(a===rr||this.diagram.lastInput.shift)},ba.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},ba.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},ba.prototype.computeCellSize=function(){var a=new ln(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},vn.Object.defineProperties(ba.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 di))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 di)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}}}),ba.className="ResizingTool",dn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Va(){li.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new lt,this.ue=null;var a=new Fr;a.figure="Ellipse",a.desiredSize=Tr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new lt(NaN,NaN),this.u=0,this.F=50}tn(Va,li),Va.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)}},Va.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new di,y.type=Pn.Position,y.locationSpot=Or;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(dl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Va.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},Va.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)},Va.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(Or)},Va.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)},Va.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new lt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Va.prototype.stopTransaction=function(){var a=this.diagram,y=li.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Va.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Va.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Va.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()},Va.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()}},Va.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},vn.Object.defineProperties(Va.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 di))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 di)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}}}),Va.className="RotatingTool",dn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){li.call(this),this.name="ClickSelecting"}tn(Uh,li),Uh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Uh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Uh.className="ClickSelectingTool";function ll(){li.call(this),this.name="Action",this.pk=null}tn(ll,li),ll.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},ll.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()},ll.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))}},ll.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()},ll.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())},ll.prototype.doStop=function(){this.pk=null},ll.className="ActionTool";function uh(){li.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new lt(0,0)}tn(uh,li),uh.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)},uh.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},uh.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 hr)x.Zc()&&(dl(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);en(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=lt.allocAt(a.x,a.y);this.isGridSnapEnabled&&dd(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),lt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},vn.Object.defineProperties(uh.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}}}),uh.className="ClickCreatingTool";function Ks(){li.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new hr;a.layerName="Tool",a.selectable=!1;var y=new Fr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}tn(Ks,li),Ks.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))},Ks.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Ks.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Ks.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=ln.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),ln.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ks.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()},Ks.prototype.computeBoxBounds=function(){var a=this.diagram;return new Jt(a.firstInput.documentPoint,a.lastInput.documentPoint)},Ks.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),qr?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 pn,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)}},vn.Object.defineProperties(Ks.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}}}),Ks.className="DragSelectingTool";function va(){li.call(this),this.name="Panning",this.Xt=new lt,this.xy=new lt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Mn.document,"scroll",a.Kw,!1),a.stopTool()}}tn(va,li),va.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())},va.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Mn.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},va.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},va.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},va.prototype.doMouseMove=function(){this.move()},va.prototype.doMouseUp=function(){this.move(),this.stopTool()},va.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)}},vn.Object.defineProperties(va.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),va.className="PanningTool",dn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),dn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),dn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),dn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),dn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Ql(){this.F=this.u=this.j=this.o=null}vn.Object.defineProperties(Ql.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}}}),Ql.className="HTMLInfo";function ul(a,y,x){this.text=a,this.hx=y,this.visible=x}ul.className="ContextMenuButtonInfo";function Za(){li.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new lt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}tn(Za,li);function xl(a){var y=new Ql;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},Wh=y,a.tu=function(){a.stopTool()},y=tr("div");var x=tr("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=tr("style");Mn.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",To,!1),b.addEventListener(y,"selectstart",To,!1),b.addEventListener(x,"contextmenu",To,!1)),y.className="goCXforeground",x.className="goCXbackground",Mn.document.body&&(Mn.document.body.appendChild(y),Mn.document.body.appendChild(x)),cf=y,Mc=x,hf=!0}function To(a){return a.preventDefault(),!1}Za.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)},Za.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Za.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Za.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Zt||(a instanceof zt?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},Za.prototype.doActivate=function(){},Za.prototype.doMouseDown=function(){if(li.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof di){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Dl(this)},Za.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof di){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Dl(this)};function Dl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Ql||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Iu(a,!0),a.isActive||a.stopTool())}Za.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Iu(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=Wh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof zt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof di&&!a.currentContextMenu.visible&&a.stopTool()}}Za.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Za.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof di){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 Ql&&a.show(y,x,this);this.currentContextMenu=a},Za.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}},Za.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof di?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Ql&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function hh(a){var y=new pn;return y.add(new ul("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ul("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ul("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ul("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ul("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ul("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ul("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ul("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ul("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ul("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ul("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ul("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ul("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Za.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=hh(this)),cf.innerHTML="",Mc.addEventListener("pointerdown",this.tu,!1);var y=this,x=tr("ul");x.className="goCXul",cf.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=tr("li"),te.className="goCXli";var ne=tr("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)}}cf.style.display="block",Mc.style.display="block"},Za.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Wh){cf.style.display="none",Mc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Mc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},vn.Object.defineProperties(Za.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof di?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return hf===!1&&Wh===null&&po&&xl(this),Wh},set:function(a){a===null&&(hf=!0),Wh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Wh=null,hf=!1,Mc=null,cf=null;Za.className="ContextMenuTool",dn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function qi(){li.call(this),this.name="TextEditing",this.Zh=new Vi,this.ia=null,this.V=Lc,this.vj=null,this.qa=Nc,this.u=1,this.F=!0,this.o=null,this.j=new Ql,this.kt=null,ff(this,this.j)}tn(qi,li);function ff(a,y){if(po){var x=tr("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(df)):E==="Tab"?(a.acceptText(rd),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;a.qa===pf&&(a.qa=gf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Nc){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 Vi&&te instanceof qi)if(te.state===mf)x.style.border="3px solid red",x.focus();else{var ne=b.ga(Or),se=E.position,he=E.scale,pe=b.Df()*he;pe<te.minimumEditorScale&&(pe=te.minimumEditorScale);var ye=b.naturalBounds.width*pe+6,Te=b.naturalBounds.height*pe+2,Ge=(ne.x-se.x)*he;ne=(ne.y-se.y)*he,se=b.verticalAlignment,he=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*pe,Te=se.y*Te-se.y*he+se.offsetY-(.5*Te-.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*pe+"%",x.style.lineHeight="normal",x.style.width=ye+"px",x.style.left=(Ge-ye/2|0)-1+"px",x.style.top=(ne+Te|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=pe,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)}}}qi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||ch&&ch!==this&&(ch.acceptText(ql),ch&&ch!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Vi&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Lc&&!y.isSelected||this.starting===id&&2>a.lastInput.clickCount)):!1},qi.prototype.doStart=function(){ch=this,this.textBlock!==null&&this.doActivate()},qi.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 Vi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=pf;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new Jt(this.textBlock.ga($r),this.textBlock.ga(Ni));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},qi.prototype.doCancel=function(){this.stopTool()},qi.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},qi.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ql)},qi.prototype.acceptText=function(a){switch(a){case ql:this.qa===Ac?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this));break;case nd:case df:case rd:(df!==a||this.textBlock.isMultiline!==!0)&&(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this))}};function up(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=Ac,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=mf,a.doError(E,te))}}qi.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)},qi.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},qi.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Nc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},qi.prototype.doStop=function(){ch=null},qi.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)))},qi.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},vn.Object.defineProperties(qi.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)}}}),qi.prototype.measureTemporaryTextBlock=qi.prototype.Lx;var nd=new Qt(qi,"LostFocus",0),ql=new Qt(qi,"MouseDown",1),rd=new Qt(qi,"Tab",2),df=new Qt(qi,"Enter",3),ev=new Qt(qi,"SingleClick",0),Lc=new Qt(qi,"SingleClickSelected",1),id=new Qt(qi,"DoubleClick",2),Nc=new Qt(qi,"StateNone",0),pf=new Qt(qi,"StateActive",1),gf=new Qt(qi,"StateEditing",2),hp=new Qt(qi,"StateValidating",3),mf=new Qt(qi,"StateInvalid",4),Ac=new Qt(qi,"StateValidated",5),ch=null;qi.className="TextEditingTool",qi.LostFocus=nd,qi.MouseDown=ql,qi.Tab=rd,qi.Enter=df,qi.SingleClick=ev,qi.SingleClickSelected=Lc,qi.DoubleClick=id,qi.StateNone=Nc,qi.StateActive=pf,qi.StateEditing=gf,qi.StateValidating=hp,qi.StateInvalid=mf,qi.StateValidated=Ac,dn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Es(a){yf||(cp(),yf=!0),this.H=gu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=_u,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new yn,this.ce=new ya,this.ce.Yd=this,this.Ei=new yn,this.pu=new yn,this.Sr=new yn,this.pr=new yn,a&&Object.assign(this,a)}Es.prototype.Xe=function(a){this.H=a},Es.prototype.canStart=function(){return!0};function pu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Sa(a.H),a.zb=!0)}function od(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===_u?(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===fp&&y.vc.clear(),a.Qw=!!(a.Pk===Sf&&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(),xf(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ba&&b!==null&&(delete b.start.scale,delete b.end.scale),Mn.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&os(x),vp(x),a.zb=!1,y.start(),y.bc&&(fh(a),x.Ya(),dp(y,0),Zs(x,!0),Hh(a),x.R("AnimationStarting",a)))}))}}function Ru(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function ad(a,y,x,b){a.isTicking||Ru(a)||y instanceof kn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}et=Es.prototype,et.fv=function(a){return this.ce.fv(a)},et.Xu=function(a){return this.ce.Xu(a)};function sd(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 zt&&he.diagram!==null||he instanceof Zt){se=!0;break e}}se=!1}se?wf(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(fh(E),Zs(E.H),Hh(E)),Mn.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Mn.requestAnimationFrame(function(){x()}))}function Gg(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function fh(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 Hh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}et.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(),xf(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),xf(y,this.H)},et.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))},et.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),gs(this,a))},et.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),dh(this.ce,y,"position",y.position,y.position),gs(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||Ru(a)||(a.H.pi||(y=x.copy()),dh(a.ce,a.H,"position",y,x))}function ld(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function gs(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Kh(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],pe=y[1],ye=y[2];return y=y[3],se===0||se===100?(te=he,ne=pe):(ye===0||ye===100)&&(he=te,pe=ne),180<Math.abs(he-te)&&(he>te?te+=360:he+=360),te=E(x,te,he-te,b)%360,ne=E(x,ne,pe-ne,b),se=E(x,se,ye-se,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+se+"%, "+x+")"}function cp(){function a(x,b,E,te,ne,se){x.position=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new Yt;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 lt(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 lt(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 lt(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,pe=E.actualBounds;E=pe.x+pe.width/2-he.width/2,he=pe.y+pe.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 lt(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 Jt(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=Kh(b,E,ne,se,te)}),y.add("stroke",function(x,b,E,te,ne,se){x.stroke=Kh(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=Kh(b,E,ne,se,te)}),y.add("areaBackground",function(x,b,E,te,ne,se){x.areaBackground=Kh(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)}),vf=y}vn.Object.defineProperties(Es.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&&Dn(a,">= 1",Es,"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}}}),Es.prototype.stopAnimation=Es.prototype.Cc;var vf=null,yf=!1,_u=new Qt(Es,"Default",1),Sf=new Qt(Es,"AnimateLocations",2),fp=new Qt(Es,"None",3);Es.className="AnimationManager",Es.defineAnimationEffect=function(a,y){yf||(cp(),yf=!0),vf.add(a,y)},Es.Default=_u,Es.AnimateLocations=Sf,Es.None=fp;function ya(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=jc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=On,this.vc=new Yt,this.Tt=new Yt,this.yl=new yn,this.Ut=new yn,this.dw=mh,a&&Object.assign(this,a)}ya.prototype.suspend=function(){this.Xk=!0},ya.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,wf(this,!0),fh(this.Yd),Zs(this.H),Hh(this.Yd),this.H.redraw()};function xf(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}et=ya.prototype,et.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 Zt?a=x:x instanceof zt&&(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===_u&&this===y.defaultAnimation&&(this.Lp=Wg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Mf),fh(y),this.yl.each(function(b){b.data=null,a.add(b)}),Hh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,sd(y,this),this)},et.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},et.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Zt?this.H=a:a instanceof zt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof hr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return dh(this,a,y,x,b,E),this};function dh(a,y,x,b,E,te){var ne=a.vc;if(y instanceof Zt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Wu(b),sv(),b=[zs.j,zs.u,zs.o,zs.F],Wu(E),sv(),E=[zs.j,zs.u,zs.o,zs.F]),ne.contains(y)){var se=ne.I(y),he=se.start,pe=se.end;he[x]===void 0&&(he[x]=Vh(b)),pe[x]=Vh(E)}else he={},pe={},he[x]=Vh(b),pe[x]=Vh(E),se=he.position,y instanceof zt&&se instanceof lt&&!se.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&se.assign(pe.position),se=new Zh(he,pe,te),ne.add(y,se);ne=he[x],ne instanceof lt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof hr?se.Ku.location=Vh(y.location):te&&(se.Ku[x]=Vh(b))}function Vh(a){return a instanceof lt||a instanceof ln?a.copy():a}et.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},et.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function wf(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),fh(x),dp(a,E),Zs(a.H,!0),Hh(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 dp(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof zt&&te.diagram===null)){var ne=b.value,se=E?ne.end:ne.start;ne=E?ne.start:ne.end;var he=vf,pe;for(pe in ne)pe==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||he.get(pe)===null||he.get(pe)(te,se[pe],ne[pe],a.Lp,y,x,a)}}}et.stop=function(){return this.bc?(this.Ml(!0),this):this},et.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,fh(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=vf;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,pe=E?se.start:se.end,ye=se.Ku,Te;for(Te in pe)if(te.get(Te)!==null){var Ge=Te;!se.Hu||Ge!=="position:nodeCollapse"&&Ge!=="position:placeholder"||(Ge="position"),te.get(Ge)(ne,he[Te],ye[Te]!==void 0?ye[Te]:se.Hu?he[Te]:pe[Te],this.Lp,this.Gd,this.Gd,this)}se.Hu&&ye.location!==void 0&&ne instanceof hr&&(ne.location=ye.location),se.nv&&ne instanceof hr&&ne.Zb(!1)}if(y.As.clear(),Pf(y,!1),y.Ya(),y.N(),Zs(y,!0),x.defaultAnimation===this){for(Te=x.pr.iterator;Te.next();)E=Te.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Zs(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Hh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),xf(this,null),x.Ml(this),y.$b())}},et.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Lr&&(b=y.placeholder),b!==null?(x=b.ga($r),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new lt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Lr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Gn&&this.Cj(b,y)},et.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Lr&&(x=y.placeholder),x!==null){var b=x.ga($r);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 Lr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Gn&&this.Aj(b,y)}},et.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},vn.Object.defineProperties(ya.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Dn(a,">= 1",ya,"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:Ot("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}}}),ya.prototype.getTemporaryState=ya.prototype.Ez,ya.prototype.stop=ya.prototype.stop,ya.prototype.add=ya.prototype.add,ya.prototype.addTemporaryPart=ya.prototype.Iy;function jc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Wg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}ya.className="Animation",ya.EaseLinear=function(a,y,x,b){return x*a/b+y},ya.EaseInOutQuad=jc,ya.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},ya.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},ya.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},ya.EaseOutExpo=Wg;function Zh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Zh.className="AnimationState";function wl(a,y,x){this.xd=null,this.rf=a,this.so=x||pp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Xh))}wl.prototype.copy=function(){var a=new wl(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 Hg(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))}vn.Object.defineProperties(wl.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 pp=new Qt(wl,"Default",1),Xh=new Qt(wl,"Immediate",2),Oc=new Qt(wl,"Bundled",3);wl.className="AnimationTrigger",wl.Default=pp,wl.Immediate=Xh,wl.Bundled=Oc;function ra(a){xr(this),this.H=null,this.Pa=new pn,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)}et=ra.prototype,et.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,La(x)}a.clear(),this.Zq.length=0},et.Xe=function(a){this.H=a},et.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 Lr?E++:he instanceof Gn?b++:he instanceof kn?te++:he instanceof di?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&&ei(b)&&(se+=" #"+ei(b)),x instanceof Gn?se+=" "+zr(b):x instanceof kn&&(se+=" "+zr(x.fromNode)+" "+zr(x.toNode));return y+" "+this.Pa.count+": "+se},et.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=lt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||ic(se)!==!1)&&se.isVisible()&&(E.assign(a),Tn(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return lt.free(E),se}return lt.free(E),null},et.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof pn||b instanceof yn||(b=new yn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=lt.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||ic(he)!==!1)&&he.isVisible()){te.assign(a),Tn(te,he.oe);var pe=he;he.ji(te,y,x,b)&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||b.add(pe))}}return lt.free(te),b},et.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 pn||E instanceof yn||(E=new yn),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||ic(he)!==!1)&&he.isVisible()){var pe=he;he.Cf(a,y,x,b,E)&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||E.add(pe))}}return E},et.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 pe=se[he];if((ne!==!0||ic(pe)!==!1)&&te(pe)&&pe.isVisible()){var ye=pe;pe.Cf(a,y,x,b,E)&&(y!==null&&(ye=y(ye)),ye===null||x!==null&&!x(ye)||E.add(ye))}}return E},et.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 pn||E instanceof yn)&&(te=E),E=!0),te instanceof pn||te instanceof yn||(te=new yn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var se=lt.alloc(),he=lt.alloc(),pe=this.Pa.s,ye=pe.length;ye--;){var Te=pe[ye];if((ne!==!0||ic(Te)!==!1)&&Te.isVisible()){se.assign(a),Tn(se,Te.oe),he.h(a.x+y,a.y),Tn(he,Te.oe);var Ge=Te;Te.og(se,he,x,b,E,te)&&(x!==null&&(Ge=x(Ge)),Ge===null||b!==null&&!b(Ge)||te.add(Ge))}}return lt.free(se),lt.free(he),te},et.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=_n();for(var E=_n(),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 di&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&Fi(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],Bv(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++)Bv(E[y]);Xn(a),Xn(E)}}};function zu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}et.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=zu(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=Jt.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(Jt.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Kg(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=zu(a,y),se=a.Zq;se.length=0;for(var he=x.scale,pe=Jt.alloc(),ye=0;ye<te;ye++){var Te=E[ye];b.contains(Te)&&a.Oj(y,Te,x,se,he,pe,!1)}Jt.free(pe),y.globalAlpha=ne}}}et.Oj=function(a,y,x,b,E,te,ne){if(ne&&!ic(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 ks?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&&(mo(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(mo(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),mo(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))}},et.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(no,a,this,y,x,b,E)},et.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&La(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)),ud(this,a,y),a},et.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,La(y),a};function ud(a,y,x){if(y=Vg(a,y,x),x instanceof Lr&&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&&ud(a,-1,y)}x.svg!==null&&x.svg.remove()}function Vg(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}vn.Object.defineProperties(ra.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===""&&Ot("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Ot("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)&&Dn(a,"0 <= value <= 1",ra,"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))}}}),ra.prototype.findObjectsNear=ra.prototype.og,ra.prototype.findObjectsIn=ra.prototype.Cf,ra.prototype.findObjectsAt=ra.prototype.ji,ra.prototype.findObjectAt=ra.prototype.ic,ra.className="Layer";function Zt(a,y){if(am||(Ta(),am=!0),xr(this),gu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,po){var x=this,b=function(){x.removeEventListener(Mn.document,"DOMContentLoaded",b,!1),x.setRTL()};Mn.document.body!==null?this.setRTL():x.addEventListener(Mn.document,"DOMContentLoaded",b,!1)}this.ol=null,xd.add("Model",Ti);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===no&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,Zg(this),this.model=cy(),this.Wg=!0,Yg(this),this.layout=new so,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 sm,a!==void 0&&(typeof a=="string"||Mn.Element&&a instanceof Element?mp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Yh,gu;function Zg(a){a.Yd=new Es,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new pn,a.pj=new Yt,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new lt(NaN,NaN).freeze(),a.du=new lt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new lt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new wr,a.zu=new lt(NaN,NaN).freeze(),a.ut=new Jt(NaN,NaN,NaN,NaN).freeze(),a.rj=new Br(0,0,0,0).freeze(),a.sj=mh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ba,a.zk=Zo,a.Fg=Ba,a.pq=Zo,a.yt=$r,a.Bt=$r,a.Fc=!0,a.pn=!1,a.De=new yn,a.Eh=new Yt,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Br(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new ma,a.bq.diagram=a,a.Qg=new ma,a.Qg.diagram=a,a.cj=new ma,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new yn,a.Ht=!0,a.uu=vh,a.pw=!1,a.wu=Tf,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 Yt,a.Xn=new pn,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 Br(5).freeze(),a.Hw=new yn().freeze(),a.Nt=999999999,a.nw=new yn().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 yn,a.ow=new yn,a.Xh=null,a.aw=new ln(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new lt,bounds:new Jt,Py:new ln,bA:new ln,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Jt(NaN,NaN,NaN,NaN).freeze(),a.wo=new ln(NaN,NaN).freeze(),a.Sp=new Jt(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Yt;var y=new Gn,x=new Vi;x.bind(new Mo("text","",zr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Gn,x=new Vi,x.stroke="brown",x.bind(new Mo("text","",zr)),y.add(x),a.Lg.add("Comment",y),y=new Gn,y.selectable=!1,y.avoidable=!1,x=new Fr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new ln(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Yt,y=new Lr,y.selectionObjectName="GROUPPANEL",y.type=Pn.Vertical,x=new Vi,x.font="bold 12pt sans-serif",x.bind(new Mo("text","",zr)),y.add(x),x=new Pn(Pn.Auto),x.name="GROUPPANEL";var b=new Fr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ja,b.padding=new Br(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Yt,y=new kn,x=new Fr,x.isPanelMain=!0,y.add(x),x=new Fr,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 Fr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new di,y.type=Pn.Auto,x=new Fr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ja,x.margin=new Br(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new di,y.type=Pn.Link,x=new Fr,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 Ti,a.toolManager=new Qi,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=Xg(),a.eq=null,a.fq=Vn,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 lt,a.zy=500,a.wp=new lt,a.wq=!1}Zt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),zc=null,ec="",gp(this,!1),this.Xn.clear(),Od(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gp(a,y){a.animationManager.Cc(!0),a.Hw=new yn().freeze(),a.nw=new yn().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(),Od(),a.Og.clear(),ki=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function Xg(){return null}Zt.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),tu(this),this.Wg=!0,Yg(this),this.layout=new so,this.Wg=!1,this.model=cy(),this.model.undoManager=new ho,this.vb=this.rn=!1,this.N()},Zt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Mn.document.body);var y=tr("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},Zt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Mn.document.body);var y=0;if(po){var x=om;y=Yh,x===null&&(x=om=tr("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Yh=tr("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||qr||(y=11)}this.Db=y,this.Gw=!0},Zt.prototype.qb=function(a){a.classType===Zt&&(this.autoScale=a)},Zt.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 mp(a,y){if(po){if(y!=null||Ot("Diagram setup requires an argument DIV."),a.Ka!==null&&Ot("Diagram has already completed setup."),typeof y=="string"?a.Ka=Mn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Ot("No DIV or DIV id supplied: "+y),a.Ka===null&&Ot("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Ot("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Mn.ResizeObserver){var x=Wr(function(){a.$b()},250);a.ol=new Mn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Mn.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=Mn.go;var E=new fl(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Mn.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),Cp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new fl(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,po){E=tr("div");var te=tr("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=Jg,E.addEventListener("pointerdown",Qg),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=Wr(function(){a.Yh=null,a.N()},300),a.Ov=Wr(function(){vp(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=Vs(a,ne,!0);se.bubbles=!0;var he=0,pe=0;se.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(he=0<ne.deltaX?1:-1),ne.deltaY!==0&&(pe=0<ne.deltaY?1:-1),se.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-he:-pe):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(he=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(pe=0<ne.wheelDeltaY?-1:1),se.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-he:-pe):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(se.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),Pl(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Vs(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 pe=he;he=wp(a,ne,!0,!1,!0,pe),Dc(a,ne,he),he.targetDiagram=xp(ne,ne.target),he.targetObject=null,pe||he.clone(a.bq),pe=a.uw,se=se?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(pe.x-ne.screenX)>se||Math.abs(pe.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():Pl(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=wp(a,ne,!1,!1,!1,se[1]!==null);var he=Mn.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 pe=a,ye=ne;he&&he.H&&(ye=ne,pe=he.H),se.targetDiagram=pe,Dc(a,ye,se),se.targetObject=null,a.doMouseMove(),Pl(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=wp(a,ne,!1,!0,!0,!1);var pe=Mn.document.elementFromPoint(ne.clientX,ne.clientY)||null;pe!==null&&pe.shadowRoot!==void 0&&pe.shadowRoot!==null&&(pe=pe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),pe!==null&&pe.H instanceof Zt&&pe.H!==a&&Dc(pe.H,ne,he),pe===null&&(pe=ne.target),Dc(a,ne,he),he.clickCount=a.yq,he.targetDiagram=xp(ne,pe),he.targetObject=null,a.doMouseUp(),Pl(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"+Nf[1]+Nf[2]+"wI"+Uc.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,Lf,y,y),b.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Zt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Zt.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function tv(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(Mn,"resize",a.Ov,!1)}function os(a){30<a.Sq&&(a.Yh=1)}function Pf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Yr&&Yr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Zt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Mn.devicePixelRatio||1},Zt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Zt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Zt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Zt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Zt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Zt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Zt.prototype.doFocus=function(){this.focus()},Zt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Mn.scrollX||Mn.pageXOffset,y=Mn.scrollY||Mn.pageYOffset;this.ta.focus(),Mn.scrollTo(a,y)}},Zt.prototype.Oy=function(){this.H.R("GainedFocus")},Zt.prototype.Ny=function(){this.H.R("LostFocus")};function vp(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===Ba&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new ra;y.name="Background",a.Al(y),y=new ra,y.name="",a.Al(y),y=new ra,y.name="Foreground",a.Al(y),y=new ra,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ra,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ra,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function $g(a){var y=new Pn(Pn.Grid);y.name="GRID";var x=new Fr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Fr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Fr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Fr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Fr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Fr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new hr,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 Jg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Rc(this.H)}function Qg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Rc(this.H)}Zt.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,pe=b.height+te.top+te.bottom,ye=b.right+te.right;te=b.bottom+te.bottom;var Te=E.x;b=E.y;var Ge=E.width,Xe=E.height,Je=E.right,it=E.bottom;E=this.scale;var Tt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Tt=Tt+a.scrollWidth-a.clientWidth;break;case"reverse":Tt=a.scrollWidth-Tt-a.clientWidth}var bt=Tt;Ge<he||Xe<pe?(Tt=lt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==bt&&(Tt.x=bt/E+ne,this.ju=bt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Tt.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Tt,lt.free(Tt),this.Ee=this.qr=!1):(Tt=lt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Te&&(this.position=Tt.h(bt+ne,this.position.y)),ye>Je&&(this.position=Tt.h(-(y.scrollWidth-this.Aa)+bt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Tt.h(this.position.x,a.scrollTop+se)),te>it&&(this.position=Tt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),lt.free(Tt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ye=b.right,Je=E.right,te=b.bottom,it=E.bottom,ne=b.x,Te=E.x,se=b.y,b=E.y,Ge>=he&&ne>=Te&&ye<=Je&&(x.style.width="1px"),Xe>=pe&&se>=b&&te<=it&&(x.style.height="1px"))}},Zt.prototype.computeBounds=function(a){return a===void 0&&(a=new Jt),Sa(this),yp(this,a)};function yp(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 pe=ne[he];pe.isInDocumentBounds&&pe.isVisible()&&(pe=pe.actualBounds,pe.w()&&(x?(x=!1,y.assign(pe)):y.ed(pe)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Zt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Un(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 Jt(NaN,NaN,0,0):x};function hl(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=lt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=Jt.allocAt(0,0,b.width,b.height);var E=lt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,Jt.free(b),lt.free(E),lt.free(x)}x=a.yh,y&&a.Fg!==Ba&&(x=a.Fg);var te=x!==Ba?Fc(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()?Or:he),Sp(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,Gt.B(te.x,x)&&Gt.B(te.y,b)&&Gt.B(te.width,E)&&Gt.B(te.height,ne)||a.onViewportBoundsChanged(new Jt(x,b,E,ne),te,y,!1)}}function Fc(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===Is?(y=Math.min(he,se),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===tc?(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}Zt.prototype.zoomToFit=function(){var a=this.sj;this.sj=mh,this.scale=Fc(this,Is),a!==mh&&(hl(this,!1),Sp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},et=Zt.prototype,et.BA=function(a,y){y===void 0&&(y=Is);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Is||y===tc)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===tc?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 lt(a.x,a.y)}},et.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new lt(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))},et.zz=function(a){if(a instanceof zt){this.eq=a;var y=lt.alloc();this.fq=this.op(a.ga($r,y)),lt.free(y)}else this.eq=null,this.fq=Vn};function Sp(a,y,x,b,E,te){var ne=lt.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var pe=lt.alloc();pe=a.eq.ga($r,pe),se=pe.x-a.fq.x/a.scale,he=pe.y-a.fq.y/a.scale,E=jr,lt.free(pe)}(te||a.scrollMode===mh)&&(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),Ug(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),tu(a),lt.free(ne)}et.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=mu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof hr)return a}else if(a=mu(this,a,function(x){return x.part}),a instanceof hr)return a;return null},et.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Sa(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 mu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),Sa(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}et.lz=function(a,y,x){return y===void 0&&(y=!0),bf(this,a,function(b){return b.part},y?function(b){return b instanceof hr&&b.canSelect()}:null,x)};function bf(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof pn||E instanceof yn||(E=new yn),Sa(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}et.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof pn||b instanceof yn||(b=new yn),Sa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},et.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),hd(this,a,function(E){return E instanceof hr&&(!x||E.canSelect())},y,b)},et.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof pn||E instanceof yn||(E=new yn),Sa(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},et.Nu=function(a,y,x,b,E,te){var ne=new yn;Sa(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 hd(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 pn||E instanceof yn||(E=new yn),Sa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}et.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Cf(this,a,y,function(te){return te instanceof hr&&(!b||te.canSelect())},x,E)},et.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 pn||E instanceof yn)&&(te=E),E=!0),te instanceof pn||te instanceof yn||(te=new yn),Sa(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 Cf(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 pn||E instanceof yn)&&(te=E),E=!0),te instanceof pn||te instanceof yn||(te=new yn),Sa(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}Zt.prototype.acceptEvent=function(a){return Vs(this,a,a instanceof MouseEvent)};function Vs(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Dc(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),qr&&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=xp(y,y.target),b.targetObject=null,b}function xp(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 wp(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,qr&&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 Pl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Zt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Vs(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),Pl(x,a)},Zt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),Pl(x,a)},Zt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Pl(x,a)},Zt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Vs(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Pl(x,a)},Zt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new lt(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?Tn(new lt(y,a),this.Ab):new lt(y,a)};function Dc(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=lt.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),lt.free(y)):x.documentPoint.h(ne,se)}function Pp(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))}}Zt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||Sa(a),a.Va()}Zt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},et=Zt.prototype,et.Pz=function(){return this.kg},et.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Zs(this),this.hf=!1,this.du=new lt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Li(function(){b.ld=!1,pu(y,"Model"),a(b)},1)},et.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Mn.requestAnimationFrame(function(){y.kg&&y.bd()})}},et.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Zs(this))};function $h(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Rc(a)||(y&&Sa(a),x&&hl(a,!1))}function Zs(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];Bo(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||vp(a),$h(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(eu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Sa(a),te=!1,(!a.hf||a.xh)&&(a.hf?jp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),jp(a,!1)),te=!0),a.Jk=!1,Sa(a),a.ou||qg(a),$h(a,!0,!1),ne=!1,te?(x=Jt.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,bp(a)),a.R("LayoutCompleted"),$h(a,!0,!1),Jt.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ba?a.scale=Fc(a,a.Fg):a.yh!==Ba?a.scale=Fc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),hl(a,!0)),te&&ne&&a.eb("Initial Layout"),Sa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function bp(a){if(a.Fg!==Ba)a.scale=Fc(a,a.Fg);else if(a.yh!==Ba)a.scale=Fc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}hl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),eu(a)}function Sa(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 yn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Lr&&b.U&65536&&(b.U=b.U^65536)})}}et.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Lr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Lr&&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 di&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Ef(a,y){for(var x=_n(),b=_n(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof Lr?(_s(te)||Ya(te)||rc(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(Xn(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();Xn(b)}et.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},et.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Ot("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Ic(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,Yy(a,se.m11,se.m12,se.m21,se.m22,se.dx,se.dy),this.pb!==1&&(a.globalAlpha=this.pb),ph(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?Wc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(wr.prototype.Cd=wr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,Ic(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,pe=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(-pe,-ye),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),ph(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?Wc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(wr.prototype.Cd=wr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Yr&&Yr.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 cd(a,y,x,b,E,te,ne,se,he,pe){if(a.Ka!==null){a.ta===null&&Ot("No canvas specified"),ne===void 0&&(ne=null),se===void 0&&(se=null),he===void 0&&(he=!1),pe===void 0&&(pe=!1),Ic(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ye=a.Ca;a.Ca=E;var Te=a.Wa.s,Ge=Te.length;try{var Xe=new Jt(te.x,te.y,b.width/E,b.height/E),Je=Xe.copy();Je.Co(x),eu(a,Je),Sa(a),a.Fd(Te,Ge,a,Xe),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 Tt=wr.alloc();Tt.reset(),Tt.translate(x.left,x.top),Tt.scale(E),te.x===0&&te.y===0||Tt.translate(-te.x,-te.y),y.setTransform(Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),y.yc(),y instanceof ks&&Yy(y,Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),wr.free(Tt),ph(a,y),y.globalAlpha=a.pb;var bt=a.Qj("Grid");if(ne){var jt=new yn,Ft=ne.iterator;for(Ft.reset();Ft.next();){var It=Ft.value;It instanceof hr&&(pe||It.layer!==bt)&&(It.Gj(),jt.add(It))}for(pe=0;pe<Ge;pe++)Kg(Te[pe],y,a,jt,he);jt.each(function(Vt){return Vt.Gj()})}else for(jt=0;jt<Ge;jt++){var _t=Te[jt];_t===bt?pe&&_t.gc(y,a,!0):_t.gc(y,a,he)}a.$i=!1,a.Yf&&Wc(a.Yf,a)&&a.Vp()}finally{a.Ca=ye,a.ib.Vc(!0),a.vd=!0,a.Fd(Te,Ge,a,a.viewportBounds),eu(a),a.ib instanceof ks&&(a.ib.Nj.PA(),a.redraw())}}}et.Gf=function(a){return this.Rg[a]},et.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},et.Tx=function(){this.Rg=new Hn,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(qr||Ir),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function ph(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}et.Ql=function(a){return this.on[a]},et.sA=function(a,y){this.on[a]=y},et.Sx=function(){this.on=new Hn,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return this.nm(a)},et.nm=function(a){return Bc(this,a),this};function Bc(a,y){var x=a instanceof Pn,b=a instanceof Zt,E;for(E in y){E===""&&Ot("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])),en(te)?ne=E.substr(se+1):Ot("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!dr(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&dr(a.toolManager,ne))te=a.toolManager;else if(b&&nm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof ir&&ne==="Changed"){a.Pe(y[ne]);continue}else Ot('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof zt&&te.Vw(ne)}}et.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Yt,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},et.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")},Zt.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==Mf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var 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=Jt.alloc(),Ap(this,this.computeBounds(b)),Jt.free(b)),b=this.ta,b===null||b instanceof nu)))){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 pe=70*ne,ye=Math.max(te,0),Te=Math.max(y,0),Ge=Math.floor(E-ye),Xe=Math.floor(se-Te);a.drawImage(b.Oa,ye,Te,Ge,Xe,0,0,Ge,Xe),Wc(this.Yf,this)&&a.clearRect(0,0,he,pe),b=_n(),a=_n(),Xe=Math.abs(te),Ge=Math.abs(y);var Je=ye===0?0:E-Xe;ye=lt.allocAt(Je,0),Xe=lt.allocAt(Xe+Je,se),a.push(new Jt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.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),Tn(ye,it),Tn(Xe,it),b.push(new Jt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),Je=Te===0?0:se-Ge,ye.h(0,Je),Xe.h(E,Ge+Je),a.push(new Jt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),Tn(ye,it),Tn(Xe,it),b.push(new Jt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),Wc(this.Yf,this)&&(E=0<te?0:-te,se=0<y?0:-y,ye.h(E,se),Xe.h(he+E,pe+se),a.push(new Jt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),Tn(ye,it),Tn(Xe,it),b.push(new Jt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y)))),lt.free(ye),lt.free(Xe),$h(this,!1,!0),this.Ka===null&&Ot("No div specified"),this.ta===null&&Ot("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Ic(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,pe=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,-pe),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),ph(this,E),E.globalAlpha=this.pb,se=0;se<te;se++)if(ne=y[se],he=b,ne.visible&&ne.pb!==0){pe=zu(ne,E),Te=ne.Zq,Te.length=0,ye=this.scale,Ge=Jt.alloc(),Xe=ne.Pa.s,it=Xe.length,Je=he.length;for(var Tt=0;Tt<it;Tt++){var bt=Xe[Tt],jt=$c(bt,bt.actualBounds);e:{for(var Ft=2/ye,It=4/ye,_t=0;_t<Je;_t++){var Vt=he[_t];if(Vt.width!==0&&Vt.height!==0&&jt.Vu(Vt.x-Ft,Vt.y-Ft,Vt.width+It,Vt.height+It)){jt=!0;break e}}jt=!1}jt&&ne.Oj(E,bt,this,Te,ye,Ge,!0)}Jt.free(Ge),E.globalAlpha=pe}E.restore(),E.Vc(!0),this.Yf&&Wc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Xn(b),Xn(a),this.ld=!1}}else this.bd();x&&(os(this),this.bd(),Pf(this,!0))}else x?(os(this),this.bd(),Pf(this,!0)):this.bd()}};function Ic(a){a.pn!==!1&&(a.pn=!1,Cp(a,a.Aa,a.ya))}function Cp(a,y,x){tu(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Rc(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,pe=E.clientHeight||b+se,ye=a.viewportBounds;E=ye.x;var Te=ye.y,Ge=ye.width,Xe=ye.height;if((he!==x+ne||pe!==b+se)&&(a.gf=!1,a.Be=!1,se=ne=0,a.Aa=he,a.ya=pe,te=a.pn=!0,tu(a)),!a.hf||!a.viewportBounds.w())return!0;var Je=a.ku,it=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Tt=a.documentBounds,bt=0,jt=0,Ft=0,It=0,_t=ye.width,Vt=ye.height,Rn=a.rj;a.contentAlignment.sb()?(Tt.width>_t&&(bt=Rn.left,jt=Rn.right),Tt.height>Vt&&(Ft=Rn.top,It=Rn.bottom)):(bt=Rn.left,jt=Rn.right,Ft=Rn.top,It=Rn.bottom);var qn=Tt.width+bt+jt,Yn=Tt.height+Ft+It;Rn=a.scale;var En=qn>he/Rn,hn=Yn>pe/Rn;if(!(te||a.gf||a.Be||En||hn))return!0;bt=Tt.x-bt,he=ye.x,jt=Tt.right+jt,pe=ye.right+ne,Ft=Tt.y-Ft;var Mr=ye.y;Tt=Tt.bottom+It,ye=ye.bottom+se;var Pr="1px";if(It="1px",a.scrollMode===mh&&(En||hn)&&(En&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(En=1,bt+1<he&&(En=Math.max((he-bt)*Rn+a.Aa,En)),jt>pe+1&&(En=Math.max((jt-pe)*Rn+a.Aa,En)),_t+ne+1<qn&&(En=Math.max((qn-_t)*Rn+a.Aa,En)),Pr=En.toString()+"px"),hn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(En=1,Ft+1<Mr&&(En=Math.max((Mr-Ft)*Rn+a.ya,En)),Tt>ye+1&&(En=Math.max((Tt-ye)*Rn+a.ya,En)),Vt+se+1<Yn&&(En=Math.max((Yn-Vt)*Rn+a.ya,En)),It=En.toString()+"px")),En=Pr!=="1px",hn=It!=="1px",En&&hn||!En&&!hn||(hn&&(pe-=a.Db),En&&(ye-=a.Db),qn<_t+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,bt+1<he&&(ne=Math.max((he-bt)*Rn+a.Aa,ne)),jt>pe+1&&(ne=Math.max((jt-pe)*Rn+a.Aa,ne)),_t+1<qn&&(ne=Math.max((qn-_t)*Rn+a.Aa,ne)),Pr=ne.toString()+"px"),En=Pr!=="1px",ne=a.ya,En!==a.Be&&(ne=En?a.ya-a.Db:a.ya+a.Db),Yn<Vt+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,Ft+1<Mr&&(se=Math.max((Mr-Ft)*Rn+ne,se)),Tt>ye+1&&(se=Math.max((Tt-ye)*Rn+ne,se)),Vt+1<Yn&&(se=Math.max((Yn-Vt)*Rn+ne,se)),It=se.toString()+"px"),hn=It!=="1px"),a.qr&&En===a.Be&&hn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(En!==a.Be&&(Pr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=En,it.style.width=Pr,hn!==a.gf&&(It==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=lt.alloc(),hn?(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)),lt.free(se))),te&&tu(a),a.gf=hn,it.style.height=It,a.gu=!0,te&&(a.pn=!0),y=Je.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(_t+1<qn?y=(a.position.x-bt)*Rn:bt+1<he?y=Je.scrollWidth-Je.clientWidth:jt>pe+1&&(y=a.position.x*Rn)),a.tn)switch(a.bu){case"negative":y=-(Je.scrollWidth-y-Je.clientWidth);break;case"reverse":y=Je.scrollWidth-y-Je.clientWidth}return Je.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Vt+1<Yn?Je.scrollTop=(a.position.y-Ft)*Rn:Ft+1<Mr?Je.scrollTop=Je.scrollHeight-Je.clientHeight:Tt>ye+1&&(Je.scrollTop=a.position.y*Rn)),he=a.Aa,pe=a.ya,Je.style.width=he+(a.gf?a.Db:0)+"px",Je.style.height=pe+(a.Be?a.Db:0)+"px",x!==he||b!==pe||a.animationManager.zb?(x=Jt.allocAt(E,Te,Ge,Xe),a.onViewportBoundsChanged(x,a.viewportBounds,Rn,te),Jt.free(x),!1):!0}et=Zt.prototype,et.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Ot("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&&Ot('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(wo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},et.oi=function(a){this.partManager.oi(a);var y=this;Zc(a,function(x){_c(y,x)}),(a instanceof di||a instanceof Lr&&a.placeholder!==null)&&a.v(),a.data!==null&&Zc(a,function(x){ly(y.partManager,x)}),Ya(a)!==!0&&rc(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.$b()},et.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Zc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.$b()},et.remove=function(a){Ep(this,a,!0)};function Ep(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(Eo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}et.Is=function(a,y){if(y===void 0&&(y=!1),Un(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 yn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},et.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Zt.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=fd(this)),this.toolManager!==null){var E=new Yt;if(a!==null)if(Un(a))for(var te=0;te<a.length;te++)vu(this,E,a[te],x,b);else for(a=a.iterator;a.next();)vu(this,E,a.value,x,b);else{for(a=this.parts;a.next();)vu(this,E,a.value,x,b);for(a=this.nodes;a.next();)vu(this,E,a.value,x,b);for(a=this.links;a.next();)vu(this,E,a.value,x,b)}Jh(this,E,y,b,x)}};function vu(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=fd(a)),x instanceof Gn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Lr&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)vu(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)&&vu(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)vu(a,y,x.value,b,E)}else if(x instanceof kn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)vu(a,y,x.value,b,E);else x instanceof di||y.add(x,a.Pd(E,x,x.location))}function Jh(a,y,x,b,E){if(y!==null&&y.count!==0){var te=lt.alloc(),ne=lt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||pd(a,y);for(var se=_n(),he=_n(),pe=y.iterator,ye=lt.alloc();pe.next();){var Te=pe.key,Ge=pe.value;if(Te.Zc()){var Xe=kp(a,Te,y);Xe!==null?se.push(new re(Te,Ge,Xe)):(!E||Te.canMove())&&(Xe=Ge.point,te.assign(Xe),a.computeMove(Te,te.add(ne),b,ye),Te.location=ye,Ge.shifted===void 0&&(Ge.shifted=new lt),Ge.shifted.assign(ye.re(Xe)))}else pe.key instanceof kn&&he.push(pe.sa)}for(lt.free(ye),E=se.length,pe=0;pe<E;pe++)Te=se[pe],te.assign(Te.info.point),Te.Su.shifted===void 0&&(Te.Su.shifted=new lt),Te.node.location=te.add(Te.Su.shifted);for(E=lt.alloc(),pe=lt.alloc(),Te=he.length,Ge=0;Ge<Te;Ge++){var Je=he[Ge];if(Xe=Je.key,Xe instanceof kn)if(Xe.suspendsRouting){Xe.Tg=null,ye=Xe.fromNode;var it=Xe.toNode;if(a.draggedLink!==null&&b.dragsLink)if(it=Je.value.point,Xe.dragComputation===null)y.add(Xe,a.Pd(b,Xe,ne)),Ch(Xe,ne.x-it.x,ne.y-it.y);else{Je=lt.allocAt(0,0),(ye=Xe.i(0))&&ye.w()&&Je.assign(ye);var Tt=ye=lt.alloc().assign(Je).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Tt=lt.alloc(),dd(a,Xe,ye,Tt,b)),ye.assign(Xe.dragComputation(Xe,ye,Tt)).re(Je),y.add(Xe,a.Pd(b,Xe,ye)),Ch(Xe,ye.x-it.x,ye.y-it.y),lt.free(Je),lt.free(ye),Tt!==ye&&lt.free(Tt)}else ye!==null&&(E.assign(ye.location),Tt=y.I(ye),Tt!==null&&E.re(Tt.point)),it!==null&&(pe.assign(it.location),Tt=y.I(it),Tt!==null&&pe.re(Tt.point)),ye!==null&&it!==null?E.Xa(pe)?(ye=Je.value.point,it=te,it.assign(E),it.re(ye),y.add(Xe,a.Pd(b,Xe,E)),Ch(Xe,it.x,it.y)):(Xe.suspendsRouting=!1,Xe.bb()):(Je=Je.value.point,ye=ye!==null?E:it!==null?pe:ne,y.add(Xe,a.Pd(b,Xe,ye)),Ch(Xe,ye.x-Je.x,ye.y-Je.y))}else(Xe.fromNode===null||Xe.toNode===null)&&(ye=Je.value.point,y.add(Xe,a.Pd(b,Xe,ne)),Ch(Xe,ne.x-ye.x,ne.y-ye.y))}lt.free(te),lt.free(ne),lt.free(E),lt.free(pe),Xn(se),Xn(he),x||(Sa(a),Qh(a,y))}}Zt.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new lt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=lt.alloc(),dd(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,pe=he.x;return isNaN(pe)&&(pe=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,pe)),Math.max(ne,Math.min(x.y,he))),E!==y&&lt.free(E),b};function fd(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function dd(a,y,x,b,E){if(E===void 0&&(E=fd(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=lt.allocAt(0,0),te.yi(0,0,a,y,E),Gt.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),lt.free(te)}}function pd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof kn&&(y.suspendsRouting=!0)}function Qh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof kn&&(x.suspendsRouting=!1,Xv(x)&&x.bb())}a.Mr=!1}}function kp(a,y,x){return y=y.containingGroup,y!==null&&(a=kp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}et=Zt.prototype,et.Pd=function(a,y,x){if(x===void 0)return new Gu(On);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Gu(new lt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Gu(x.copy())};function Tp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Ot("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Ot("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Ot("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Ot("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&&Ot("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}et.Al=function(a){Tp(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(wo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},et.Ww=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"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(wo,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},et.Cy=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"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(wo,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},et.kA=function(a){if(a.diagram!==this&&Ot("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(Eo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},et.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},et.Yw=function(a){return this.pf===null&&(this.pf=new pn),this.pf.add(a),this.model.Pe(a),this},et.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},et.Pe=function(a){return this.zg===null&&(this.zg=new pn),this.zg.add(a),this},et.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},et.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},et.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var se=new oo;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)},et.g=function(a,y,x,b,E){this.cb(no,a,this,y,x,b,E)},Zt.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===no){var E=a.object;if(ro(E,a.propertyName,a.I(y)),E instanceof zt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===wo){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof Pn)if(typeof se=="number"&&he instanceof zt){y?ne.pc(se):ne.Gb(se,he);var pe=ne.part;pe!==null&&pe.Wb()}else typeof se=="number"&&he instanceof Io&&(he.isRow?c1(ne,se,y?void 0:he):f1(ne,se,y?void 0:he));else if(ne instanceof ra){var ye=a.oldParam===!0;typeof se=="number"&&he instanceof hr&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(ye?se:-1,he,ye)):ne.oi(se,he,ye))}else ne instanceof Zt?typeof se=="number"&&he instanceof ra&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):Ot("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Eo){var Te=a.object,Ge=a.oldParam,Xe=a.oldValue;if(Te instanceof Pn)typeof Ge=="number"&&Xe instanceof zt?y?Te.Gb(Ge,Xe):Te.pc(Ge):typeof Ge=="number"&&Xe instanceof Io&&(Xe.isRow?c1(Te,Ge,y?Xe:void 0):f1(Te,Ge,y?Xe:void 0));else if(Te instanceof ra){var Je=a.newParam===!0;typeof Ge=="number"&&Xe instanceof hr&&(y?0>Te.Pa.indexOf(Xe)&&Te.oi(Ge,Xe,Je):(Xe.isSelected=!1,Xe.isHighlighted=!1,Xe.Wb(),Te.pc(Je?Ge:-1,Xe,Je)))}else Te instanceof Zt?typeof Ge=="number"&&Xe instanceof ra&&(y?(Xe.Xe(this),this.Wa.Gb(Ge,Xe)):this.Wa.mb(Ge)):Ot("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ea&&Ot("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Zt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Zt.prototype.eb=function(a){return this.undoManager.eb(a)},Zt.prototype.Kf=function(){return this.undoManager.Kf()},Zt.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}},Zt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Zt.prototype.rp=function(){this.partManager.rp()};function Mp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,tu(a),a.N(),a.Ee=!0,b.zb&&(Ru(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,tu(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,se=a.zoomPoint.x,he=a.zoomPoint.y,pe=a.contentAlignment;isNaN(se)&&(pe.$c()?pe.Hf(ja)?se=0:pe.Hf(vo)&&(se=te-1):se=pe.sb()?pe.x*(te-1):te/2),isNaN(he)&&(pe.$c()?pe.Hf(Vo)?he=0:pe.Hf(fs)&&(he=ne-1):he=pe.sb()?pe.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=lt.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,lt.free(te),a.Ca=x,tu(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),hl(a,!1),b.zb&&(Ru(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Zt.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!==Ba||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Qi&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Cc(E,this)),this.vb||this.invalidateViewport(a,y),eu(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 eu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=ln.alloc(),E=1,te=1,ne=x.O.s,se=ne.length,he=0;he<se;he++){var pe=ne[he],ye=Math.abs(pe.interval);2>ye||(mv(pe.figure)?te=te*ye/Gt.vx(te,ye):E=E*ye/Gt.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=Jt.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Jt.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,Jt.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=lt.alloc(),Gt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),ln.free(b),x.part.location=y,lt.free(y)}}Zt.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)}},Zt.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))},Zt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Un(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof hr||Ot("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 hr||Ot("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Zt.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()}},et=Zt.prototype,et.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},et.Jz=function(a){a=new yn().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 hr||Ot("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},et.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=lt.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)),lt.free(te);return}Ot("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):Ot("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),lt.free(te)},et.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)},et.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},et.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)},et.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,pe=y.m22,ye=y.dx,Te=y.dy,Ge=x*ne+b*he+ye;y=x*se+b*pe+Te;var Xe=E*ne+b*he+ye;return a=E*se+b*pe+Te,b=x*ne+te*he+ye,x=x*se+te*pe+Te,ne=E*ne+te*he+ye,E=E*se+te*pe+Te,te=Math.min(Ge,Xe),Ge=Math.max(Ge,Xe),Xe=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),Ge=Math.max(Ge,b),Xe=Math.min(Xe,x),y=Math.max(y,x),te=Math.min(te,ne),Ge=Math.max(Ge,ne),Xe=Math.min(Xe,E),y=Math.max(y,E),new Jt(te,Xe,Ge-te,y-Xe)},et.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Tn(a.copy(),this.Ab)};function em(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Lp(a){return a=xd.get(a),a!==null?new a:new Ti}Zt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ea&&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===Ea){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Sa(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||od(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&&(em(this),this.As.clear(),Gg(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;Li(function(){se.currentTool.standardMouseOver(),se.Rt=!1},10)}}}finally{this.aa=!0}}}};function _c(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)qh(a,y[b])}function qh(a,y){if(y instanceof us){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof yn&&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 Np(a,y){if(y instanceof us){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 yn&&x.Bg.remove(a),Od(b));break}}}}}Zt.prototype.Wd=function(){this.partManager.Wd()},Zt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Zt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Zt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Zt.prototype.Vb=function(a){return this.partManager.Vb(a)},Zt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},et=Zt.prototype,et.Lc=function(a){return this.partManager.Lc(a)},et.ii=function(a){return this.partManager.ii(a)},et.Kc=function(a){return this.partManager.Kc(a)},et.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:Ai(mr(y)))},et.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:Ai(mr(y)))};function tu(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 Ap(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),hl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}et.Va=function(){if(this.Zi){var a=Jt.alloc();Ap(this,this.computeBounds(a)),Jt.free(a)}},et.rz=function(){for(var a=new yn,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},et.qz=function(){return this.ai.iterator},et.Uz=function(a){Sa(this),a&&gd(this,!0),this.ld?jp(this,!1):(this.Jk=!0,Zs(this))};function gd(a,y){for(var x=a.ai.iterator;x.next();)tm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function tm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)tm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function jp(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||pu(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Op(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),Sa(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||od(te),a.aa=x}}}function Op(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Op(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)}}et.yz=function(){for(var a=new pn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new pn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new Yt,b=new Yt;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 nm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function md(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Ot("Unknown DiagramEvent name: "+y)}et.Bj=function(a,y){return a=md(this,a),a!==null&&a.add(y),this},et.am=function(a,y){a=md(this,a),a!==null&&a.remove(y)},et.R=function(a,y,x){var b=md(this,a),E=new hu;if(E.diagram=this,a=nm(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 vd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}et.Yj=function(a,y){return yd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Zt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?yp(this,a):a.assign(this.documentBounds)};function yd(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lg(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=rm(a,x)),x===null){y=Jt.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&&Sd(a,ne,b,y)}Jt.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Jt.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof Gn&&Sd(a,ne,b,y);Jt.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function rm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?rm(a,y.containingGroup):null}function Sd(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(_d(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(kh,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=kh}else if(y instanceof Lr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Gn&&Sd(a,E,x,b)}}function gh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Zt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Fp(this)};function Fp(a){a.vk===-1&&(a.vk=Li(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=Jt.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ap(a,y),Jt.free(y),a.Fc=!0,a.bd(),Fp(a))}},a.vp))}Zt.prototype.ug=function(){this.vk!==-1&&(Mn.clearTimeout(this.vk),this.vk=-1)},Zt.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=Jt.allocAt(0,0,b.width*E,b.height*E);var te=lt.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(On)||(y=new lt(y.x+te.x/E,y.y+te.y/E)),Jt.free(b),lt.free(te),y},et=Zt.prototype,et.Cs=function(){return null},et.av=function(){return null},et.bs=function(a,y){this.pj.add(a,y)},et.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Lr&&(y.$p=null)})};function kf(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-pe>he?y(x,E,se):Mn.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,pe=+new Date;return Mn.requestAnimationFrame(function(){b()}),null}et.Wz=function(a){return po?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},et.Jx=function(a){return a===void 0&&(a={}),kf(this,this.Xz,a)},et.Xz=function(a,y,x){var b=im(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 Uc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Uc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Ot('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 im(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Ot("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 ln(1/0,1/0):new ln(2e3,2e3));var se=y.position||null,he=y.parts||null,pe=y.padding===void 0?1:y.padding,ye=y.background||null,Te=y.omitTemporary;Te===void 0&&(Te=!0);var Ge=y.document||document,Xe=y.elementFinished||null,Je=y.showTemporary;Je===void 0&&(Je=!Te),y=y.showGrid,y===void 0&&(y=Je),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof pe=="number"?pe=new Br(pe):pe instanceof Br||Ot("MakeImage padding must be a Margin or a number."),pe.left=Math.max(pe.left,0),pe.right=Math.max(pe.right,0),pe.top=Math.max(pe.top,0),pe.bottom=Math.max(pe.bottom,0),a.ib.Vc(!0),Te=new fl(null,Ge,void 0,!0);var it=Te.context;if(!(E||te||he||se))return Te.width=a.Aa+Math.ceil(pe.left+pe.right),Te.height=a.ya+Math.ceil(pe.top+pe.bottom),x==="SVG"?b===null?null:(b.resize(Te.width,Te.height,Te.width,Te.height),b.ownerDocument=Ge,b.hs=Xe,cd(a,b.context,pe,new ln(Te.width,Te.height),a.Ca,a.pa,he,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,pe,new ln(Te.width,Te.height),a.Ca,a.pa,he,ye,Je,y),a.Xm=!0,Te.context);var Tt=a.Pp,bt=a.documentBounds.copy();if(bt.Fv(a.yb),Je)for(var jt=a.Wa.s,Ft=jt.length,It=0;It<Ft;It++){var _t=jt[It];if(_t.visible&&_t.isTemporary){_t=_t.Pa.s;for(var Vt=_t.length,Rn=0;Rn<Vt;Rn++){var qn=_t[Rn];qn.isInDocumentBounds&&qn.isVisible()&&(qn=qn.actualBounds,qn.w()&&bt.ed(qn))}}}if(jt=new lt(bt.x,bt.y),he!==null){for(Ft=new Jt(0,0,0,0),It=!0,_t=he.iterator,_t.reset();_t.next();)Vt=_t.value,Vt instanceof hr&&(Rn=Vt.layer,Rn!==null&&!Rn.visible||Rn!==null&&!Je&&Rn.isTemporary||!Vt.isVisible()||(Vt=Vt.actualBounds,Vt.w()&&(It?(It=!1,Ft.assign(Vt)):Ft.ed(Vt))));bt.width=Ft.width,bt.height=Ft.height,jt.x=Ft.x,jt.y=Ft.y}return se!==null&&se.w()&&(jt=se,te||(te=Tt)),Ft=se=0,pe!==null&&(se=pe.left+pe.right,Ft=pe.top+pe.bottom),It=_t=0,E!==null&&(_t=E.width,It=E.height,isFinite(_t)&&(_t=Math.max(0,_t-se)),isFinite(It)&&(It=Math.max(0,It-Ft))),E!==null&&te!==null?(te==="NaN"&&(te=Tt),E.w()?(E=_t,bt=It):isNaN(It)?(E=_t,bt=bt.height*te):(E=bt.width*te,bt=It)):E!==null?E.w()?(te=Math.min(_t/bt.width,It/bt.height),E=_t,bt=It):isNaN(It)?(te=_t/bt.width,E=_t,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>Tt?(te=Tt,E=bt.width,bt=bt.height):(E=ne.width,bt=ne.height)):(E=bt.width*te,bt=bt.height*te):(te=Tt,E=bt.width,bt=bt.height),pe!==null?(E+=se,bt+=Ft):pe=new Br(0),ne!==null&&(Tt=ne.width,ne=ne.height,isNaN(Tt)&&(Tt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Tt)&&(E=Math.min(E,Tt)),isFinite(ne)&&(bt=Math.min(bt,ne))),Te.width=Math.ceil(E),Te.height=Math.ceil(bt),x==="SVG"?b===null?null:(b.resize(Te.width,Te.height,Te.width,Te.height),b.ownerDocument=Ge,b.hs=Xe,cd(a,b.context,pe,new ln(Math.ceil(E),Math.ceil(bt)),te,jt,he,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,pe,new ln(Math.ceil(E),Math.ceil(bt)),te,jt,he,ye,Je,y),a.Xm=!0,Te.context)}vn.Object.defineProperties(Zt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Oe||(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 nu(this,Mn.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 nu(this,Mn.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(Mn,"resize",this.Ov,!1),this.removeEventListener(Mn,"wheel",this.$j,!0),gu===this&&(gu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),mp(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)&&Dn(a,"0 <= value <= 1",Zt,"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),hl(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),hl(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),hl(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),hl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Dn(a,">= 0",Zt,"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&&Dn(a,">= 0",Zt,"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 Dn(a,">= 0",Zt,"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||em(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&&Ot("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=gp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,pu(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=Lp(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(Mn,"pointermove",this.dk,!0),this.addEventListener(Mn,"pointerdown",this.ui,!0),this.addEventListener(Mn,"pointerup",this.fk,!0),this.addEventListener(Mn,"pointerout",this.ek,!0),this.addEventListener(Mn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Mn,"wheel",this.$j,!0),this.addEventListener(Mn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Mn,"pointermove",this.dk,!0),this.removeEventListener(Mn,"pointerdown",this.ui,!0),this.removeEventListener(Mn,"pointerup",this.fk,!0),this.removeEventListener(Mn,"pointerout",this.ek,!0),this.removeEventListener(Mn,"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(Mn,"wheel",this.$j,!0),this.removeEventListener(Mn,"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=lt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Ug(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?tu(this):(this.vb=!0,a=this.scale,Sp(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)}lt.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=$g(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=$g(this)),a.type!==Pn.Grid&&Ot("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),eu(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),tu(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||Ot("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 Br(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===mh&&hl(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,hl(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,Mp(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&&Mp(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!==Ba&&hl(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()||Ot("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()||Ot("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)):Dn(a,"> 0",Zt,"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)):Dn(a,"> 0",Zt,"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),hl(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 Br(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&&Ot("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();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==vh&&a!==Do&&a!==wd&&Ot("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 ln(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 Br(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),vn.Object.defineProperties(Zt,{licenseKey:{get:function(){return zp.jc()},set:function(a){zp.add(a.replace(/\s/g,""))}},version:{get:function(){return Gc}}}),Zt.prototype.makeImageData=Zt.prototype.Jx,Zt.prototype.makeImage=Zt.prototype.Wz,Zt.prototype.cacheGroupExternalLinks=Zt.prototype.Fu,Zt.prototype.addRenderer=Zt.prototype.bs,Zt.prototype.makeSVG=Zt.prototype.av,Zt.prototype.makeSvg=Zt.prototype.Cs,Zt.prototype.stopAutoScroll=Zt.prototype.ug,Zt.prototype.doAutoScroll=Zt.prototype.gs,Zt.prototype.isUnoccupied=Zt.prototype.Yj,Zt.prototype.raiseDiagramEvent=Zt.prototype.R,Zt.prototype.removeDiagramListener=Zt.prototype.am,Zt.prototype.addDiagramListener=Zt.prototype.Bj,Zt.prototype.findTreeRoots=Zt.prototype.yz,Zt.prototype.layoutDiagram=Zt.prototype.Uz,Zt.prototype.findTopLevelGroups=Zt.prototype.qz,Zt.prototype.findTopLevelNodesAndLinks=Zt.prototype.rz,Zt.prototype.ensureBounds=Zt.prototype.Va,Zt.prototype.findLinksByExample=Zt.prototype.ls,Zt.prototype.findNodesByExample=Zt.prototype.ms,Zt.prototype.findLinkForData=Zt.prototype.Kc,Zt.prototype.findNodeForData=Zt.prototype.ii,Zt.prototype.findPartForData=Zt.prototype.Lc,Zt.prototype.findLinkForKey=Zt.prototype.findLinkForKey,Zt.prototype.findNodeForKey=Zt.prototype.Vb,Zt.prototype.findPartForKey=Zt.prototype.findPartForKey,Zt.prototype.rebuildParts=Zt.prototype.Wd,Zt.prototype.transformViewToDoc=Zt.prototype.Ps,Zt.prototype.transformRectDocToView=Zt.prototype.zA,Zt.prototype.transformDocToView=Zt.prototype.op,Zt.prototype.centerRect=Zt.prototype.es,Zt.prototype.scrollToRect=Zt.prototype.tv,Zt.prototype.scroll=Zt.prototype.scroll,Zt.prototype.highlightCollection=Zt.prototype.Jz,Zt.prototype.highlight=Zt.prototype.Iz,Zt.prototype.selectCollection=Zt.prototype.rA,Zt.prototype.select=Zt.prototype.select,Zt.prototype.updateAllRelationshipsFromData=Zt.prototype.rp,Zt.prototype.updateAllTargetBindings=Zt.prototype.updateAllTargetBindings,Zt.prototype.commit=Zt.prototype.commit,Zt.prototype.rollbackTransaction=Zt.prototype.Kf,Zt.prototype.commitTransaction=Zt.prototype.eb,Zt.prototype.startTransaction=Zt.prototype.Ea,Zt.prototype.raiseChanged=Zt.prototype.g,Zt.prototype.raiseChangedEvent=Zt.prototype.cb,Zt.prototype.removeChangedListener=Zt.prototype.ik,Zt.prototype.addChangedListener=Zt.prototype.Pe,Zt.prototype.removeModelChangedListener=Zt.prototype.mA,Zt.prototype.addModelChangedListener=Zt.prototype.Yw,Zt.prototype.findLayer=Zt.prototype.Qj,Zt.prototype.removeLayer=Zt.prototype.kA,Zt.prototype.addLayerAfter=Zt.prototype.Cy,Zt.prototype.addLayerBefore=Zt.prototype.Ww,Zt.prototype.addLayer=Zt.prototype.Al,Zt.prototype.moveParts=Zt.prototype.moveParts,Zt.prototype.copyParts=Zt.prototype.Kj,Zt.prototype.removeParts=Zt.prototype.Is,Zt.prototype.remove=Zt.prototype.remove,Zt.prototype.add=Zt.prototype.add,Zt.prototype.clearDelayedGeometries=Zt.prototype.bx,Zt.prototype.setProperties=Zt.prototype.nm,Zt.prototype.attach=Zt.prototype.Du,Zt.prototype.set=Zt.prototype.set,Zt.prototype.resetInputOptions=Zt.prototype.Sx,Zt.prototype.setInputOption=Zt.prototype.sA,Zt.prototype.getInputOption=Zt.prototype.Ql,Zt.prototype.resetRenderingHints=Zt.prototype.Tx,Zt.prototype.setRenderingHint=Zt.prototype.Xx,Zt.prototype.getRenderingHint=Zt.prototype.Gf,Zt.prototype.maybeUpdate=Zt.prototype.bd,Zt.prototype.requestUpdate=Zt.prototype.$b,Zt.prototype.delayInitialization=Zt.prototype.Xy,Zt.prototype.isUpdateRequested=Zt.prototype.Pz,Zt.prototype.invalidateDocumentBounds=Zt.prototype.Ya,Zt.prototype.findObjectsNear=Zt.prototype.og,Zt.prototype.findPartsNear=Zt.prototype.mz,Zt.prototype.findObjectsIn=Zt.prototype.Cf,Zt.prototype.findPartsIn=Zt.prototype.ux,Zt.prototype.findObjectsAt=Zt.prototype.ji,Zt.prototype.findPartsAt=Zt.prototype.lz,Zt.prototype.findObjectAt=Zt.prototype.ic,Zt.prototype.findPartAt=Zt.prototype.Ol,Zt.prototype.focusObject=Zt.prototype.zz,Zt.prototype.alignDocument=Zt.prototype.Jy,Zt.prototype.zoomToRect=Zt.prototype.BA,Zt.prototype.zoomToFit=Zt.prototype.zoomToFit,Zt.prototype.diagramScroll=Zt.prototype.kx,Zt.prototype.focus=Zt.prototype.focus;var xd=new Yt,om=null,po=Mn.document!==void 0,zc=null,ec="",Ba=new Qt(Zt,"None",0),Is=new Qt(Zt,"Uniform",1),tc=new Qt(Zt,"UniformToFill",2),Tf=new Qt(Zt,"CycleAll",10),Dp=new Qt(Zt,"CycleNotDirected",11),Bp=new Qt(Zt,"CycleNotDirectedFast",12),Ip=new Qt(Zt,"CycleNotUndirected",13),Rp=new Qt(Zt,"CycleDestinationTree",14),_p=new Qt(Zt,"CycleSourceTree",15),mh=new Qt(Zt,"DocumentScroll",1),Mf=new Qt(Zt,"InfiniteScroll",2),vh=new Qt(Zt,"TreeParentCollapsed",21),Do=new Qt(Zt,"AllParentsCollapsed",22),wd=new Qt(Zt,"AnyParentsCollapsed",23),zp=new pn,Gc="2.3.10",Uc="image",Lf=null,am=!1;function Ta(){if(po){var a=Mn.document.createElement("canvas"),y=a.getContext("2d"),x=$n("7ca11abfd022028846");y[x]=$n("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",sr.Dx+"4ae6247590da4bb21c324ba3a84e385776",wr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Gt.za],E=1;5>E;E++)y[$n("7ca11abfd7330390")]($n(b[E-1]),10,15*E);for(y[x]=$n("39f046ebb36e4b"),x=1;5>x;x++)y[$n("7ca11abfd7330390")]($n(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(wr.prototype.Cd=wr.prototype.Eu),Lf=a}}Zt.className="Diagram",Zt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Mn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Zt?y.H:null},Zt.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},Zt.useDOM=function(a){po=a?Mn.document!==void 0:!1},Zt.isUsingDOM=function(){return po},Zt.None=Ba,Zt.Uniform=Is,Zt.UniformToFill=tc,Zt.CycleAll=Tf,Zt.CycleNotDirected=Dp,Zt.CycleNotDirectedFast=Bp,Zt.CycleNotUndirected=Ip,Zt.CycleDestinationTree=Rp,Zt.CycleSourceTree=_p,Zt.DocumentScroll=mh,Zt.InfiniteScroll=Mf,Zt.TreeParentCollapsed=vh,Zt.AllParentsCollapsed=Do,Zt.AnyParentsCollapsed=wd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Wc(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=Mn[$n("76a715b2f73f148a")][$n("72ba13b5")]||"";if(a.Rc=!0,po){var b=Zt[$n("76a115b6ed251eaf4692")];if(b)for(var E=zp.iterator;E.next()&&(b=E.value,b=$n(b).split($n("39e9")),!(6>b.length));){var te=$n(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=$n(sr[$n("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=Mn[$n("74a900bae4370f8b51")][$n("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[$n("73a612b6fb191d")]($n("3aad1ab6e022098b4dc4")),te=$n(b[2]),-1<ne&&(se=se[$n("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[$n("76ad18b4f73e")],se=x[$n("73a612b6fb191d")]($n("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[$n("73a612b6fb191d")](te),0>ne&&te!==$n("7da71ca0ad381e90")&&(ne=y[$n("73a612b6fb191d")]($n("76a715b2ef3e149757"))),0>ne&&(ne=y[$n("73a612b6fb191d")]($n("76a715b2ef3e149757"))),0>ne&&(ne=y[$n("73a612b6fb191d")]($n("2bfa41fdb3784bca12"))),0>ne&&(ne=x[$n("73a612b6fb191d")]($n("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[$n("73a612b6fb191d")]($n("35"))||y[$n("73a612b6fb191d")]($n("35"))===-1),!a.Rc||x[$n("73a612b6fb191d")]($n("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[$n("73a612b6fb191d")](te)),!a.Rc)||(ne=Mn[$n("76a715b2f73f148a")][$n("69ad17a1e03e")],se=ne[$n("73a612b6fb191d")]($n("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[$n("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=Mn.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[$n("79a417a0f0181a8946")]=b,Mn.document[$n("78a712aa")]){Mn.document[$n("78a712aa")][$n("7bb806b6ed32388c4a875b")](ne),he=Mn.getComputedStyle(ne).getPropertyValue($n("78a704b7e62456904c9b12701b6532a8"));var pe=Mn.getComputedStyle(ne).getPropertyValue($n("75b817b0ea2202"));if(Mn.document[$n("78a712aa")][$n("68ad1bbcf533388c4a875b")](ne),he){if(ne=Mn[$n("77a902b0eb1b1e804a8a")],pe==="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($n("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[$n("76ad18b4f73e")],E=x[$n("73a612b6fb191d")]($n("35e7"))+2;E<ye;E++)y+=x[E];x=y[$n("73a612b6fb191d")]($n("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[$n("73a612b6fb191d")]($n("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function Gu(a){this.j=a===void 0?new lt:a,this.o=new lt}vn.Object.defineProperties(Gu.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 Nf="DraggingInfo";Gu.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 ln(NaN,NaN).freeze(),this.gridSnapCellSpot=$r,this.gridSnapOrigin=new lt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ce.className="DraggingOptions";function Ee(a,y){if(typeof a=="string"||Mn.Element&&a instanceof Element)var x=Zt.call(this,a)||this;else x=Zt.call(this)||this,y=a;return be(x),y&&x.nm(y),x}tn(Ee,Zt);function be(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=mi,a.layout=new ha}Ee.prototype.reset=function(){Zt.prototype.reset.call(this),be(this)},Ee.className="Palette";function Oe(a,y){if(typeof a=="string"||Mn.Element&&a instanceof Element)var x=Zt.call(this,a)||this;else x=Zt.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 hr;var E=new Fr;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 Br(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Lt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new lt(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),vt(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&&vt(b)},x.autoScale=Is,x.vb=!1,y&&Object.assign(x,y),x}tn(Oe,Zt),Oe.prototype.computePixelRatio=function(){return 1},Oe.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(Ic(this),this.ql===null){var x=new fl(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),qe(this)}finally{this.ta=a,this.ib=y}}}Zt.prototype.redraw.call(this)},Oe.prototype.gc=function(){if(this.Ka===null&&Ot("No div specified"),this.ta===null&&Ot("No canvas specified"),!(this.ta instanceof nu)&&(Bv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Ic(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?qe(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 qe(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=Jt.alloc().assign(a.viewportBounds).ed(y.viewportBounds),eu(y,E),Jt.free(E),Sa(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 pe=se.diagram.grid.part;if(!x&&se.isTemporary)b&&pe.layer===se&&(se=zu(se,E),pe.gc(E,he),E.globalAlpha=se);else{for(var ye=zu(se,E),Te=he.scale,Ge=Jt.alloc(),Xe=se.Pa.s,Je=Xe.length,it=0;it<Je;it++){var Tt=Xe[it];(b||Tt!==pe)&&se.Oj(E,Tt,he,null,Te,Ge,!1)}Jt.free(Ge),E.globalAlpha=ye}}}}}function vt(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=ln.alloc();E.h(x.width,x.height),b.desiredSize=E,ln.free(E),a=2/a.scale,b instanceof Fr&&(b.strokeWidth=a),y.location=new lt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Oe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return fa;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Oe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Oe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),vt(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))},vn.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&Ot("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),vt(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),vt(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)}}}),Oe.className="Overview";function Lt(){uo.call(this),this.j=null}tn(Lt,uo),Lt.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 lt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new lt(a.x-this.j.x,a.y-this.j.y)),!0)},Lt.prototype.doActivate=function(){this.j=null,uo.prototype.doActivate.call(this)},Lt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Lt.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 lt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new lt(a.x-this.j.x,a.y-this.j.y)}}},Lt.className="OverviewDraggingTool";function kt(){xr(this),this.H=gu,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=fa,this.hb=!0,this.cg=null,this.ob=200}kt.prototype.toString=function(){return"CommandHandler"},kt.prototype.Xe=function(a){this.H=a},kt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=qr?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()},kt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},kt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Qi&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},kt.prototype.canStopCommand=function(){return!0},kt.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=""}},kt.prototype.canSelectAll=function(){return this.diagram.allowSelect},kt.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 yn,x=a.selection.iterator;x.next();)oc(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=""}},kt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},kt.prototype.copySelection=function(){var a=this.diagram,y=new yn;for(a=a.selection.iterator;a.next();)oc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},kt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},kt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},kt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},kt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)zc=null,ec="";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 pn,x.addAll(te),zc=x,ec=y.model.dataFormat}}y.R("ClipboardChanged",x)},kt.prototype.pasteFromClipboard=function(){var a=new yn,y=zc;if(y===null)return a;var x=this.diagram;if(ec!==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},kt.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);Jh(y,te,new lt(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=""}},kt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||zc===null||zc.count===0||ec!==a.model.dataFormat)},kt.prototype.undo=function(){this.diagram.undoManager.undo()},kt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},kt.prototype.redo=function(){this.diagram.undoManager.redo()},kt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},kt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},kt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},kt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},kt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},kt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},kt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},kt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;pu(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=fa):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),od(y)},kt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},kt.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;pu(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Rt(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 Lr)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof hr&&y.tv(he.actualBounds),he instanceof Gn&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof Lr&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof hr&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Li(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 Rt(a,y,x){if(y.isVisible())return x;if(y instanceof di)Rt(a,y.adornedPart,x);else if(y instanceof kn){var b=y.fromNode;b!==null&&Rt(a,b,x),y=y.toNode,y!==null&&Rt(a,y,x)}else y instanceof Gn&&(b=y.labeledLink,b!==null&&Rt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Rt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Rt(a,y,x));return x}kt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof hr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},kt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),pu(y.animationManager,"Collapse Tree");var x=new pn;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")}},kt.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},kt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),pu(y.animationManager,"Expand Tree");var x=new pn;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")}},kt.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},kt.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 pn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new pn,he=E.iterator;he.next();){var pe=he.value;te=!1;for(var ye=E.iterator;ye.next();)if(pe.Td(ye.value)){te=!0;break}te||se.add(pe)}if(0<se.count){var Te=se.first().containingGroup;if(Te!==null)for(;Te!==null;){E=!1;for(var Ge=se.iterator;Ge.next();)if(!Ge.value.Td(Te)){E=!0;break}if(E)Te=Te.containingGroup;else break}if(x instanceof Lr)dl(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Xe=y.copyNodeData(x);en(Xe)&&(y.xf(Xe),b=a.ii(Xe))}if(b!==null){Te!==null&&this.isValidMember(Te,b)&&(b.containingGroup=Te);for(var Je=se.iterator;Je.next();){var it=Je.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=""}}}},kt.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 rn(a){var y=_n();for(a=a.iterator;a.next();){var x=a.value;x instanceof kn||y.push(x)}a=new yn,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 Xn(y),a}kt.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},kt.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 pn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof Lr&&te.canUngroup()&&b.add(te)}var ne=new pn;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var pe=he.containingGroup,ye=pe!==null&&pe.data!==null?x.wa(pe.data):void 0;ne.addAll(he.memberParts);for(var Te=ne.iterator;Te.next();){var Ge=Te.value;if(Ge.isSelected=!0,!(Ge instanceof kn)){var Xe=Ge.data;Xe!==null?x.mp(Xe,ye):Ge.containingGroup=pe}}y.remove(he)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},kt.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 Lr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Lr&&y.canUngroup())return!0;return!1},kt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=rn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},kt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),pu(y.animationManager,"Collapse SubGraph");var x=new pn;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 Lr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},kt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Lr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Lr&&y.isSubGraphExpanded)return!0;return!1},kt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),pu(y.animationManager,"Expand SubGraph");var x=new pn;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 Lr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},kt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Lr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Lr&&!y.isSubGraphExpanded)return!0;return!1},kt.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 Vi&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},kt.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 Vi))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 Vi&&x.editable}),a!==null))return!0;return!1},kt.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 zt?E=a.ga(Or):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new lt(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,Iu(x,!1,a)}},kt.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)},kt.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 Yt,a===null)return b;for(var te=a.iterator;te.next();)vu(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},vn.Object.defineProperties(kt.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||Ot("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}}}),kt.className="CommandHandler",Xg=function(){return new kt};function zt(){xr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new lt(NaN,NaN).freeze(),this.jd=bi,this.Ab=new wr,this.wh=new wr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ta,this.uc=new Jt(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Jt(NaN,NaN,NaN,NaN).freeze(),this.dc=new Jt(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Zo,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,fn,rr,lr,vr,Nr,Jr,Gr,si,ji;zt.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=Bn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},zt.prototype.Vw=function(a){var y=this.Dh;if(Un(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},zt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},zt.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},zt.prototype.copy=function(){return this.clone()},et=zt.prototype,et.qb=function(a){a.classType===kn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Ot("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===zt&&(this.stretch=a)},et.toString=function(){return ur(this.constructor)+"#"+ei(this)},et.th=function(){this.A!==null&&(this.A.nc=!0)};function _r(a){a.A===null?a.A=new jf:a.A.nc&&(a.A=a.A.copy())}et.Xc=function(){if(this.ba===null){var a=new Gp;a.Xi=jr,a.yj=jr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},et.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===no&&pa(this)&&eo(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 Yt),ne=te.undoManager.transactionLevel===0,a.startCondition===Xh?ne=!0:a.startCondition===Oc&&(ne=!1),ne?(te=new ya,Hg(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()):(pu(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Pn&&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 Pn&&Zc(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function eo(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=TS(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))}}et.ks=function(a){return this.bindingId===a?this:null},et.g=function(a,y,x){this.cb(no,a,this,y,x)},et.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 wr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function Yo(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}et.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?In(a.x,a.y,0,0,0,b.height)<=y||In(a.x,a.y,0,b.height,b.width,b.height)<=y||In(a.x,a.y,b.width,b.height,b.width,0)<=y||In(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},et.se=function(){return!0},et.ca=function(a){var y=lt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return lt.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=$i(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),lt.free(y),a}return E=!1,(this instanceof di||this instanceof Fr?$i(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)),lt.free(y),E},et.gh=function(a){var y=this.naturalBounds;return $i(0,0,y.width,y.height,a.x,a.y)},et.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Jt.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=lt.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)))),lt.free(E),Jt.free(y),b},et.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=lt.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)))),lt.free(E),b},et.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=lt.allocAt(0,0),E=lt.allocAt(0,x.height),te=lt.allocAt(x.width,x.height),ne=lt.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=Jt.allocAt(0,0,x.width,x.height);var he=lt.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)))),lt.free(he),Jt.free(x),!se&&(Gt.us(a,b,E)||Gt.us(a,E,te)||Gt.us(a,te,ne)||Gt.us(a,ne,b))&&(se=!0)}return lt.free(b),lt.free(E),lt.free(te),lt.free(ne),se},et.ga=function(a,y){if(y===void 0&&(y=new lt),a instanceof er){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},et.mi=function(a){a===void 0&&(a=new Jt);var y=this.naturalBounds,x=this.oe,b=lt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),ni(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),ni(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),ni(a,b.x,b.y,0,0),lt.free(b),a},et.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},et.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},et.qs=function(a,y){return y===void 0&&(y=new lt),y.assign(a),this.oe.Cd(y),y},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.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,pe=-te.m21*ne,ye=te.m11*ne,Te=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,Gt.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*pe+Te,a=a*he+y*ye+Ge,y=x*se+b*pe+Te,x=x*he+b*ye+Ge,E.h(0,0),b=this.naturalBounds,x=Gt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},zt.prototype.measure=function(a,y,x,b){if(_s(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 Pn;switch(ss(this,!0)){case fn: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 lr:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case vr: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()||Ot("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Bo(this,!1)}},zt.prototype.Wl=function(){},zt.prototype.Dd=function(){return!1},zt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=Jt.alloc();te.assign(this.Ib),this.Ib.ka(),Ya(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&&xh(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 Vi&&(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()||Ot("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),yu(this,!1),Jt.free(te)},et=zt.prototype,et.eh=function(){};function Ia(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=ss(a,!0),x===b&&te===E&&(y=fn),y){case fn:(x>b||te>E)&&(Bo(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case xn:Bo(a,!0),a.measure(b,E,0,0);break;case lr:Bo(a,!0),a.measure(b,te,0,0);break;case vr:Bo(a,!0),a.measure(x,E,0,0)}}}et.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_v(x,!0),this.N(),Dr(a,y)||(x.oh(),this.Pn(x)))},et.Pn=function(a){this.portId!==null&&(_v(a,!0),a instanceof Gn&&H1(a,this))},et.gc=function(a,y){if(!Xs(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 Pn&&xh(this),ne=this.Ib;if(te){var se=this.Ib,he=this.dc,pe=this.areaBackground,ye=this.Ma;pe===null&&ye===null||a.yc(),pe!==null&&(mo(this,a,pe,!0,!0,he,se),pe instanceof Ei&&pe.type===Js?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(pe)):a.fillRect(se.x,se.y,se.width,se.height)),ye!==null&&(mo(this,a,ye,!0,!1,he,se),ye instanceof Ei&&ye.type===Js?(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&&ua(this),pe=this.part,he=!1;var Te=0;pe&&y.Gf("drawShadows")&&(he=pe.isShadowed)&&(ye=pe.shadowOffset,Te=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var Ge;if(!(Ge=y.$i||!ye)){var Xe=this.naturalBounds;Ge=this.wh;var Je=Ge.m11,it=Ge.m21,Tt=Ge.dx,bt=Ge.m12,jt=Ge.m22,Ft=Ge.dy,It,_t=It=0;Ge=It*Je+_t*it+Tt;var Vt=It*bt+_t*jt+Ft;It=Xe.width+Te,_t=0;var Rn=It*Je+_t*it+Tt;It=It*bt+_t*jt+Ft,_t=Math.min(Ge,Rn);var qn=Math.min(Vt,It),Yn=Math.max(Ge+0,Rn)-_t,En=Math.max(Vt+0,It)-qn;Ge=_t,Vt=qn,It=Xe.width+Te,_t=Xe.height+Te,Rn=It*Je+_t*it+Tt,It=It*bt+_t*jt+Ft,_t=Math.min(Ge,Rn),qn=Math.min(Vt,It),Yn=Math.max(Ge+Yn,Rn)-_t,En=Math.max(Vt+En,It)-qn,Ge=_t,Vt=qn,It=0,_t=Xe.height+Te,Rn=It*Je+_t*it+Tt,It=It*bt+_t*jt+Ft,_t=Math.min(Ge,Rn),qn=Math.min(Vt,It),Yn=Math.max(Ge+Yn,Rn)-_t,En=Math.max(Vt+En,It)-qn,Ge=_t,Vt=qn,Te=y.viewportBounds,Xe=Te.x,Je=Te.y,Ge=!(Ge>Te.width+Xe||Xe>Yn+Ge||Vt>Te.height+Je||Je>En+Vt)}if(Ge){if(Ge=(this.l&256)!==0,a.clipInsteadOfFill&&(Ge=!1),this instanceof Vi&&(a.font=this.font),Ge){if(Vt=se.se()?se.naturalBounds:se.actualBounds,Yn=Math.max(ne.x,Vt.x),En=Math.max(ne.y,Vt.y),Te=Math.min(ne.right,Vt.right)-Yn,Xe=Math.min(ne.bottom,Vt.bottom)-En,Je=this.tb,Je!==null&&(Yn=Je.x,En=Je.y,Te=Je.width,Xe=Je.height),Yn>ne.width+ne.x||ne.x>Vt.width+Vt.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Yn,En,Te,Xe),a.clip()}if(ye){if(!pe.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(Vt=pe.shadowOffset,a.Ev(Vt.x*y.scale*this.scale*y.Mb,Vt.y*y.scale*this.scale*y.Mb,pe.shadowBlur),Uu(a),a.shadowColor=pe.shadowColor)}he&&this.shadowVisible===!0?Uu(a):he&&this.shadowVisible===!1&&Su(a),pe=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Rs(this,a,pe,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&ia(this,se)&&this.shadowVisible===null&&Su(a),this.Ma!==null&&(a.yc(),ms(this,a,pe,ne)),he&&(this.Ma!==null||this.areaBackground!==null||ia(this,se))?(bl(this,!0),this.shadowVisible===null&&Su(a)):bl(this,!1),this.hh(a,y),he&&this.l&512&&Uu(a),ye&&he&&Su(a),Ge&&(a.restore(),a.Vc(this instanceof Pn)),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 ia(a,y){return y===null?!1:(xh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Pn.Auto||y.type===Pn.Spot)&&y.Pb()!==a)}et.Dv=function(){};function Rs(a,y,x,b){mo(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Ei&&a.areaBackground.type===Js?(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 ms(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,se=x.width+E,he=x.height+E;mo(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Ei&&a.Ma.type===Js?(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 Ma(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===Pn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function Xs(a,y,x){if(!(y instanceof ks))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&&Ma(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),Uu(y),y.shadowColor=a.shadowColor}a instanceof Vi&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Pn;var se=a instanceof Pn?xh(a):!1;a.l&4096&&ua(a);var he=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&se?(Up(y,1,0,0,1,0,0),a.svg=y.ad):te?(Up(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):Up(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var pe=ne.copy().Vj();y.rb.ha=[pe.m11,pe.m12,pe.m21,pe.m22,pe.dx,pe.dy],Rs(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]),ms(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],ms(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&&Uu(y),se&&a.shadowVisible===!0?Uu(y):se&&a.shadowVisible===!1&&Su(y),E=a.panel,se&&ia(a,E)&&a.shadowVisible===null&&Su(y),y.Il&&(pe=x.computePixelRatio(),pe="drop-shadow("+y.shadowOffsetX/pe+"px "+y.shadowOffsetY/pe+"px "+y.shadowBlur/pe/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",pe),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",pe)),se&&(a.Ma!==null||a.areaBackground!==null||ia(a,E))?(bl(a,!0),a.shadowVisible===null&&Su(y)):bl(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,pe=a.svg,!te&&pe!==null&&se!==pe&&pe.parentNode===a.panel.svg?(a.svg.replaceWith(se),a.svg=se,se!==null&&a.$o(y,b,he,se),as(y,pe),!0):(a.svg=se,ne!==null&&se===null&&(um(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&&Uu(y),a.Dd()&&Su(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&&Ma(a,b,se),ne!==null&&ne(a,se)),!0)}et.$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"+Wi++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Pn&&(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"),as(a,b)};function as(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function La(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=mr(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()}}et.hh=function(){},et.lv=function(){this.Uc=!0},et.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 Pn?xh(this):!1;if(!(this instanceof Pn&&E))if(this instanceof us){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&$y(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Jy(a)):y.setAttributeNS(null,"transform",Jy(a))}else if(!x||this instanceof Pn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Fr){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],Rs(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&&hm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(hm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Pn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),ms(this,a,this.naturalBounds,this.actualBounds),y.Ma?(hm(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&&hm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},et.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 mo(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===Sh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var pe=a.kq();if(se=te.width,he=te.height,E?(se=ne.width,he=ne.height):b||(se+=pe,he+=pe),(te=y instanceof Vc)&&x.xe&&(x.type===Md||x.yk===se&&x.ft===he))var ye=x.xe;else{var Te=0,Ge=0,Xe=0,Je=0,it=0,Tt=0;if(Tt=it=0,E?(it=ne.x,Tt=ne.y):b||(it-=pe/2,Tt-=pe/2),Te=x.start.x*se+x.start.offsetX,Ge=x.start.y*he+x.start.offsetY,Xe=x.end.x*se+x.end.offsetX,Je=x.end.y*he+x.end.offsetY,Te+=it,Xe+=it,Ge+=Tt,Je+=Tt,x.type===Hu)ye=y.createLinearGradient(Te,Ge,Xe,Je);else if(x.type===Js)Tt=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(it=0,Tt=Math.max(se,he)/2):it=x.startRadius,ye=y.createRadialGradient(Te,Ge,it,Xe,Je,Tt);else if(x.type===Md)try{ye=y.createPattern(x.pattern,"repeat")}catch(jt){ye=null}if(x.type!==Md&&(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===Md&&x.yk!==-1)){x.yk=-1;var bt=a.diagram;bt!==null&&x.yk===-1&&Li(function(){bt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}et.rg=function(a){if(a instanceof Pn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},et.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},et.If=function(){for(var a=this instanceof Pn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ua(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){cl(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)}cl(a,!1),Ys(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ys(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,Ys(a,!1)))}et.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=lt.alloc();te.yi(y,x,b,E,Or),a.rotate(this.Kb,te.x,te.y),lt.free(te)}},et.v=function(a){if(!_s(this)){a===void 0&&(a=!1),Bo(this,!0),yu(this,!0);var y=this.panel;y===null||a||y.v()}},et.Uj=function(){_s(this)||(Bo(this,!0),yu(this,!0))};function Xa(a){if(!Ya(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())),yu(a,!0)}}et.Uk=function(){!(this.l&2048)&&(cl(this,!0),Ys(this,!0))},et.Wu=function(){Ys(this,!0)},et.N=function(){var a=this.part;a!==null&&a.N()};function ss(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Pn.Table?Bl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Pn.Auto&&b.Pb()===a?oa(a,xn,y):x===Nr?b!==null?b.type===Pn.Spot&&b.Pb()===a?oa(a,xn,y):(x=b.defaultStretch,x===Nr?oa(a,fn,y):oa(a,x,y)):oa(a,fn,y):oa(a,x,y)}function Bl(a,y,x,b){var E=a.stretch;if(E!==Nr)return oa(a,E,b);var te=E=null;switch(y.stretch){case vr:te=!0;break;case xn:te=!0}switch(x.stretch){case lr:E=!0;break;case xn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===lr||y===xn),te===null&&(te=y===vr||y===xn),E===!0&&te===!0?oa(a,xn,b):E===!0?oa(a,lr,b):te===!0?oa(a,vr,b):oa(a,fn,b)}function oa(a,y,x){if(x)return y;if(y===fn||(x=a.desiredSize,x.w()))return fn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===lr)return fn;if(y===xn)return vr}else{if(y===vr)return fn;if(y===xn)return lr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===vr)return fn;if(y===xn)return lr}else{if(y===lr)return fn;if(y===xn)return vr}return y}function bl(a,y){a.l=y?a.l|512:a.l&-513}function pa(a){return(a.l&1024)!==0}function Af(a,y){a.l=y?a.l|1024:a.l&-1025}function cl(a,y){a.l=y?a.l|2048:a.l&-2049}function Ys(a,y){a.l=y?a.l|4096:a.l&-4097}function _s(a){return(a.l&8192)!==0}function Bo(a,y){a.l=y?a.l|8192:a.l&-8193}function Ya(a){return(a.l&16384)!==0}function yu(a,y){a.l=y?a.l|16384:a.l&-16385}et.Gj=function(){this.svg=null},et.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},et.Av=function(){},et.zv=function(a){return this.pa=a,Xa(this),!0},et.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},et.kq=function(){return 0};function Hc(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 Xy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Pn?a instanceof Gn?a.Bd():a.qm(a,function(x){Hc(x)}):Hc(a))}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Mo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&Ot("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new pn),this.localBindings.add(E),this},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return rv(this,a),this},et.apply=function(a){return a(this),this},et.nm=function(a){return Bc(this,a),this},et.pz=function(){return this.ih()},et.ih=function(){for(var a=this instanceof Pn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},et.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Yt),this.animationTriggers.add(a.propertyName,a),this};function $s(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=Pd.I(a);typeof te=="function"?(x=Bn(arguments),b=te(x),en(b)||Ot('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Mn.go[a]}if(b===null&&(E!=null&&E.constructor||Ot("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 Zt&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(mp(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?Ot("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):rv(b,te);return b}function rv(a,y){if(typeof y=="string")if(a instanceof Vi)a.text=y;else if(a instanceof Fr)a.figure=y;else if(a instanceof us)a.source=y;else if(a instanceof Pn)y=Cl.I(y),y!==null&&(a.type=y);else if(a instanceof Ei){var x=or(Ei,y);x!==null?a.type=x:Ot("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Cn?(y=or(Cn,y),y!==null&&(a.type=y)):a instanceof fi&&(y=or(fi,y),y!==null&&(a.type=y));else if(y instanceof zt)a instanceof Pn||Ot("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Io){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 Io?km(b,y):Ot("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Qt)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Wo)a.type=y;else if(y instanceof Mo)a instanceof zt||a instanceof Io?a.bind(y):Ot("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof wl)a instanceof zt?a.Jv(y):Ot("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Oo)a instanceof Cn&&a.type===Cn.o?a.figures.add(y):Ot("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof fi)a instanceof Oo?a.segments.add(y):Ot("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof so)a instanceof Zt||a instanceof Lr?a.layout=y:Ot("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++)rv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ei){x=new Hn;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Bc(a,x)}else if(a instanceof Io){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Ot("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)&&Ot("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Hn;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Bc(a,E)}else Bc(a,y);else Ot('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function yh(a,y){Pd.add(a,y)}function lm(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}vn.Object.defineProperties(zt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new jf),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 jf),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 jf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(_r(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&&(_r(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Qa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Qa&&(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 nc),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 nc),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:On},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new nc),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Nr},set:function(a){var y=this.stretch;y!==a&&(_r(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&&(_r(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)&&Dn(a,"0 <= value <= 1",zt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N($c(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($c(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(),Xy(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&&Ff(a,"GraphObject.areaBackground"),a instanceof Ei&&a.freeze(),_r(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&&Ff(a,"GraphObject.background"),a instanceof Ei&&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 hr)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 lt(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&&Ot("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,Xy(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 Fr&&this.qc(),this.g("desiredSize",b,a),pa(this)&&(a=this.part,a!==null&&(eo(this,a,"width"),eo(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new ln(a,this.jd.height).freeze(),this.v(),this instanceof Fr&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&eo(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new ln(this.jd.width,a).freeze(),this.v(),this instanceof Fr&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&eo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:br},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(),_r(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:pi},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(),_r(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 Br(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&&ua(this),this.Ab}},oe:{get:function(){return this.l&4096&&ua(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(_r(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:fn},set:function(a){this.reshapingBehavior!==a&&(_r(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()&&Ot("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Xa(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&&Dn(a,">= 0",zt,"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&&Dn(a,">= 1",zt,"columnSpan"),_r(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&&Dn(a,">= 0",zt,"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&&Dn(a,">= 1",zt,"rowSpan"),_r(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&&(_r(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||Ot("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Wv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Z1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:jr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Hc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Dn(a,">= 0",zt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Hc(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),Hc(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&&Dn(a,">= 0",zt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:jr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Hc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Dn(a,">= 0",zt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Hc(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),Hc(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&&Dn(a,">= 0",zt,"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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(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&&(_r(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),zt.prototype.trigger=zt.prototype.Jv,zt.prototype.findBindingPanel=zt.prototype.ih,zt.prototype.findTemplateBinder=zt.prototype.pz,zt.prototype.setProperties=zt.prototype.nm,zt.prototype.apply=zt.prototype.apply,zt.prototype.attach=zt.prototype.Du,zt.prototype.set=zt.prototype.set,zt.prototype.isEnabledObject=zt.prototype.If,zt.prototype.isVisibleObject=zt.prototype.Ed,zt.prototype.isContainedBy=zt.prototype.rg,zt.prototype.getNearestIntersectionPoint=zt.prototype.rs,zt.prototype.getLocalPoint=zt.prototype.qs,zt.prototype.getDocumentScale=zt.prototype.Df,zt.prototype.getDocumentAngle=zt.prototype.li,zt.prototype.getDocumentBounds=zt.prototype.mi,zt.prototype.getDocumentPoint=zt.prototype.ga,zt.prototype.intersectsRect=zt.prototype.Yc,zt.prototype.containedInRect=zt.prototype.fh,zt.prototype.containsRect=zt.prototype.Re,zt.prototype.containsPoint=zt.prototype.ca,zt.prototype.raiseChanged=zt.prototype.g,zt.prototype.raiseChangedEvent=zt.prototype.cb,zt.prototype.addCopyProperty=zt.prototype.Vw;var Pd=null;zt.className="GraphObject",Pd=new Yt,yh("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=$s(Pn,Pn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Pn){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"},$s(Fr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new er(0,0,2.76142374915397,2.761423749153969),spot2:new er(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 Pn&&(x=b.fb("ButtonBorder"),x instanceof Fr)){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 Pn&&(x=b.fb("ButtonBorder"),x instanceof Fr&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Pn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Fr){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 Pn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Fr){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 Pn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Fr){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 Pn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Fr))){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}),yh("TreeExpanderButton",function(){var a=$s("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},$s(Fr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Tr},new Mo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Mo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof di&&(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}),yh("SubGraphExpanderButton",function(){var a=$s("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},$s(Fr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Tr},new Mo("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 di&&(x=x.adornedPart),x instanceof Lr){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}),yh("ToolTip",function(){return $s(di,Pn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},$s(Fr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new er(0,0,4,6),spot2:new er(1,1,-4,-4)}))}),yh("ContextMenu",function(){return $s(di,Pn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},new Mo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),yh("ContextMenuButton",function(){var a=$s("Button");a.stretch=lr;var y=a.fb("ButtonBorder");return y instanceof Fr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new er(0,0,2,3),y.spot2=new er(1,1,-2,-2)),a}),yh("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=$s("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},$s(Fr,{name:"ButtonIcon",strokeWidth:2},new Mo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Fr&&(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}),yh("CheckBoxButton",function(a){var y=lm(a);return a=$s("Button",{desiredSize:new ln(14,14)},$s(Fr,{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:rr,visible:!1},y!==""?new Mo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Pn){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}),yh("CheckBox",function(a){a=lm(a),a=$s("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Br(0,1,0,0)});var y=$s(Pn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Br(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}),zt.None=fn=new Qt(zt,"None",0),zt.Default=Nr=new Qt(zt,"Default",0),zt.Vertical=vr=new Qt(zt,"Vertical",4),zt.Horizontal=lr=new Qt(zt,"Horizontal",5),zt.Fill=xn=new Qt(zt,"Fill",3),zt.Uniform=rr=new Qt(zt,"Uniform",1),zt.UniformToFill=Jr=new Qt(zt,"UniformToFill",2),zt.FlipVertical=Gr=new Qt(zt,"FlipVertical",1),zt.FlipHorizontal=si=new Qt(zt,"FlipHorizontal",2),zt.FlipBoth=ji=new Qt(zt,"FlipBoth",3),zt.make=$s,zt.getBuilders=function(){var a=new Yt,y;for(y in Pd)if(y!==y.toLowerCase()){var x=Pd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},zt.defineBuilder=yh,zt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=Pd.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof zt))return y&&b.set(y),b;Ot('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},zt.takeBuilderArgument=lm;function jf(){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=br,this.o=pi,this.hg=Nr,this.ob=this.Bi=1,this.Pf=fn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}jf.prototype.copy=function(){var a=new jf;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 nc(){this.u=-1/0,this.o=0,this.F=On,this.rr=Qa,this.j=this.V="None"}nc.prototype.copy=function(){var a=new nc;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},nc.className="LinkElementSettings";function Gp(){this.yj=this.Xi=Zo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Gp.prototype.copy=function(){var a=new Gp;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},Gp.className="LinkSettings";function Kc(){this.ha=[1,0,0,1,0,0]}Kc.prototype.copy=function(){var a=new Kc;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},Kc.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},Kc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Kc.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)}},Kc.className="STransform";function Of(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Of.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Of.className="SGradient";function nu(a,y,x){this.ownerDocument=a=y===void 0?Mn.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 ks(this,x)}nu.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},nu.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),en(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},nu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},nu.prototype.focus=function(){this.Oa.focus()},nu.prototype.mx=function(){this.ownerDocument=null},vn.Object.defineProperties(nu.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}}}),nu.className="SVGSurface";function ks(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 Kc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Wi++,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 Yy(a,y,x,b,E,te,ne){a.Nj===void 0?Up(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}et=ks.prototype,et.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,pe=he-1e-6,ye=x*Math.cos(b),Te=x*Math.sin(b),Ge=a+ye,Xe=y+Te,Je=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-Ge)||1e-6<Math.abs(se-Xe))&&this.path.push(["L",Ge,+Xe]),0>b&&(b=b%he+he),b>pe?(this.path.push(["A",x,x,0,1,Je,a-ye,y-Te]),this.path.push(["A",x,x,0,1,Je,Ge,Xe])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Je,a+x*Math.cos(E),y+x*Math.sin(E)])},et.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},et.Se=function(a){this.addPath(this.path,this.rb,a||0)},et.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},et.clearRect=function(){},et.clip=function(){this.Yl.clipPath=!0},et.closePath=function(){this.path.push(["z"])},et.createLinearGradient=function(a,y,x,b){var E=new Of("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},et.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"+Wi++,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(Uc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},et.createRadialGradient=function(a,y,x,b,E,te){var ne=new Of("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function $y(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)}et.drawImage=function(a,y,x,b,E,te,ne,se,he){var pe="";a instanceof HTMLCanvasElement&&(pe=a.toDataURL()),a instanceof HTMLImageElement&&(pe=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,$y(this,y,x,b,E,te||0,ne||0,se,he),te={x:0,y:0,width:ye||b,height:a||E,href:pe},Gt.$(b,se)&&Gt.$(E,he)?pe.toLowerCase().indexOf(".svg")===-1&&pe.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')"),bd(this,Uc,te,this.rb),this.addElement(Uc,te)},et.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},et.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},et.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},bd(this,"fill",a,this.rb),this.addElement("rect",a)},et.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},bd(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},et.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},bd(this,"fill",y,this.rb),this.addElement("text",y,a[0])},et.lineTo=function(a,y){this.path.push(["L",a,y])},et.moveTo=function(a,y){this.path.push(["M",a,y])},et.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},et.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"])},et.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},et.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())},et.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||Up(this,a,y,x,b,E,te)};function Jy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}et.scale=function(a,y){this.rb.scale(a,y)},et.translate=function(a,y){this.rb.translate(a,y)},et.transform=function(){},et.yc=function(){},et.stroke=function(){qy(this,this.Yl)},et.jk=function(){this.clipInsteadOfFill||this.stroke()},et.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},et.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 bd(a,y,x,b){y==="fill"?iv(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 iv(a,y){a.fillStyle instanceof Of?y.fill=ov(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Of?y.setAttributeNS(null,"fill",ov(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 Of)y.stroke=ov(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 ov(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"+Wi++,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(pe,ye){return pe.offset>ye.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}et.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Bn(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,bd(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 Up(a,y,x,b,E,te,ne){var se=new Kc;se.ha=[y,x,b,E,te,ne],y={},bd(a,"g",y,se),se=a.addElement("g",y),a.nh.push(se)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Su(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Uu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}et.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},et.fs=function(){this.Ct=!1},et.Vc=function(){},et.Wx=function(){},ks.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ks.prototype.getImageData=function(){return null},ks.prototype.measureText=function(){return null};function hm(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()))}ks.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ks.className="SVGContext",Zt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new nu(this,Mn.document));var y=new nu(this,Mn.document,!0);a===void 0&&(a=new Hn);var x=this;return kf(this,function(b,E){return b=im(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Zt.prototype.makeSvg=Zt.prototype.Cs,Zt.prototype.av=function(a){return this.Cs(a)},Zt.prototype.makeSVG=Zt.prototype.av;function fl(a,y,x,b){this.ownerDocument=y=y===void 0?Mn.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Vc(y,x,b),y.H=a}fl.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},fl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},fl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},fl.prototype.focus=function(){this.Oa.focus()},fl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},vn.Object.defineProperties(fl.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}}}),fl.className="CanvasSurface";function Vc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Ot("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 wr,this.isTemporary=!!x}et=Vc.prototype,et.Wx=function(a){this.Z.imageSmoothingEnabled=a},et.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},et.beginPath=function(){this.Z.beginPath()},et.Se=function(){},et.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},et.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},et.clip=function(){this.Z.clip()},et.closePath=function(){this.Z.closePath()},et.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},et.createPattern=function(a,y){return this.Z.createPattern(a,y)},et.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},et.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)},et.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},et.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.fillText=function(a,y,x){this.Z.fillText(a,y,x)},et.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},et.lineTo=function(a,y){this.Z.lineTo(a,y)},et.measureText=function(a){return this.Z.measureText(a)},et.moveTo=function(a,y){this.Z.moveTo(a,y)},et.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},et.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},et.restore=function(){this.Z.restore()},et.save=function(){this.yc(),this.Z.save()},Vc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},et=Vc.prototype,et.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},et.scale=function(a,y){this.El.scale(a,y)},et.translate=function(a,y){this.El.translate(a,y)},et.stroke=function(){this.Z.stroke()},et.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}},et.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},et.ng=function(a,y){if(a instanceof Ei&&a.type===Js){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)},et.jk=function(){this.Hm||this.stroke()},et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},et.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},et.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},et.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},et.Hs=function(){},vn.Object.defineProperties(Vc.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([]);Vc.className="CanvasSurfaceContext";function Wp(){this.F=this.o=this.u=this.j=0}Wp.className="ColorNumbers";function Ei(a,y){Td||(cv(),Td=!0),xr(this),this._isFrozen=!1,a===void 0?(this.na=Sh,this.xk="black"):typeof a=="string"?(this.na=Sh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Hu?(this.Qd=mi,this.Lk=jo):this.Lk=a===Js?this.Qd=Or:this.Qd=jr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ei.prototype.copy=function(){var a=new Ei;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},et=Ei.prototype,et.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},et.qb=function(a){a.classType===Ei&&(this.type=a)},et.toString=function(){var a="Brush(";if(this.type===Sh)a+=this.color;else if(a=this.type===Hu?a+"Linear ":this.type===Js?a+"Radial ":this.type===Md?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+")"},et.addColorStop=function(a,y){return this._isFrozen&&Kt(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Dn(a,"0 <= loc <= 1",Ei,"addColorStop:loc"),this.we===null&&(this.we=new Yt),this.we.add(a,y),this.na===Sh&&(this.type=Hu),this.xe=null,this},et.Vz=function(a,y){if(this._isFrozen&&Kt(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ld:y,this.type===Sh)Wu(this.color),this.color=Ed(a,y);else if((this.type===Hu||this.type===Js)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Wu(x.value),this.addColorStop(x.key,Ed(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Ld:x,Wu(a),Ed(y,x)}et.Wy=function(a,y){if(this._isFrozen&&Kt(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ld:y,this.type===Sh)Wu(this.color),this.color=Ed(-a,y);else if((this.type===Hu||this.type===Js)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Wu(x.value),this.addColorStop(x.key,Ed(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Ld:x,Wu(a),Ed(-y,x)}function av(a,y,x){Wu(a),a=Yi.j;var b=Yi.u,E=Yi.o,te=Yi.F;return Wu(y),x===void 0&&(x=.5),"rgba("+Math.round((Yi.j-a)*x+a)+", "+Math.round((Yi.u-b)*x+b)+", "+Math.round((Yi.o-E)*x+E)+", "+Math.round((Yi.F-te)*x+te)+")"}et.Gx=function(){if(this.type===Sh)return Cd(this.color);if((this.type===Hu||this.type===Js)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Js)return Cd(a.first().value);if(a.get(.5)!==null)return Cd(a.get(.5));if(a.count===2)return a=a.Fa(),Cd(av(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,Cd(av(a.get(x),a.get(b),1-te/E))}return!1};function Cd(a){return a?a instanceof Ei?a.Gx():(Wu(a),128>(299*Yi.j+587*Yi.u+114*Yi.o)/1e3):!1}function Ed(a,y){switch(y){case Ld:y=100*lv(Yi.j);var x=100*lv(Yi.u),b=100*lv(Yi.o);return $a.j=.4124564*y+.3575761*x+.1804375*b,$a.u=.2126729*y+.7151522*x+.072175*b,$a.o=.0193339*y+.119192*x+.9503041*b,$a.F=Yi.F,y=hv($a.j/kd[0]),x=hv($a.u/kd[1]),b=hv($a.o/kd[2]),xu.j=116*x-16,xu.u=500*(y-x),xu.o=200*(x-b),xu.F=$a.F,xu.j=Math.min(100,Math.max(0,xu.j+100*a)),a=(xu.j+16)/116,y=a-xu.o/200,$a.j=kd[0]*n1(xu.u/500+a),$a.u=kd[1]*(xu.j>cm*fv?Math.pow(a,3):xu.j/cm),$a.o=kd[2]*n1(y),$a.F=xu.F,a=-.969266*$a.j+1.8760108*$a.u+.041556*$a.o,y=.0556434*$a.j+-.2040259*$a.u+1.0572252*$a.o,Yi.j=255*uv((3.2404542*$a.j+-1.5371385*$a.u+-.4985314*$a.o)/100),Yi.u=255*uv(a/100),Yi.o=255*uv(y/100),Yi.F=$a.F,Yi.j=Math.round(Yi.j),255<Yi.j?Yi.j=255:0>Yi.j&&(Yi.j=0),Yi.u=Math.round(Yi.u),255<Yi.u?Yi.u=255:0>Yi.u&&(Yi.u=0),Yi.o=Math.round(Yi.o),255<Yi.o?Yi.o=255:0>Yi.o&&(Yi.o=0),"rgba("+Yi.j+", "+Yi.u+", "+Yi.o+", "+Yi.F+")";case r1:return sv(),zs.o=Math.min(100,Math.max(0,zs.o+100*a)),"hsla("+zs.j+", "+zs.u+"%, "+zs.o+"%, "+zs.F+")";default:Ot("Unknown color space: "+y)}}function Wu(a){Td||(cv(),Td=!0);var y=dv;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,Yi.j=a[0],Yi.u=a[1],Yi.o=a[2],Yi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Yi.j=0,Yi.u=0,Yi.o=0,Yi.F=1)}}function sv(){var a=Yi.j/255,y=Yi.u/255,x=Yi.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))}zs.j=Math.round(ne),zs.u=Math.round(100*a),zs.o=Math.round(100*E),zs.F=Yi.F}function lv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function uv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function hv(a){return a>fv?Math.pow(a,1/3):(cm*a+16)/116}function n1(a){var y=a*a*a;return y>fv?y:(116*a-16)/cm}function Ff(a,y){typeof a!="string"&&(a instanceof Ei||Ot("Value for "+y+" must be a color string or a Brush, not "+a))}function cv(){dv=po?new fl(null,void 0,{willReadFrequently:!0}).context:null}vn.Object.defineProperties(Ei.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Kt(this,a),this.na=a,this.start.Mc()&&(a===Hu?this.start=mi:a===Js&&(this.start=Or)),this.end.Mc()&&(a===Hu?this.end=jo:a===Js&&(this.end=Or)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Kt(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Kt(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Kt(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Kt(this,a),0>a&&Dn(a,">= zero",Ei,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Kt(this,a),0>a&&Dn(a,">= zero",Ei,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Kt(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Kt(this,a),this.cr=a,this.xe=null}}}),Ei.prototype.isDark=Ei.prototype.Gx,Ei.prototype.darkenBy=Ei.prototype.Wy,Ei.prototype.lightenBy=Ei.prototype.Vz,Ei.prototype.addColorStop=Ei.prototype.addColorStop;var fv=216/24389,cm=24389/27,kd=[95.047,100,108.883],dv=null,Yi=new Wp,zs=new Wp,$a=new Wp,xu=new Wp,Td=!1;Ei.className="Brush";var Sh;Ei.Solid=Sh=new Qt(Ei,"Solid",0);var Hu;Ei.Linear=Hu=new Qt(Ei,"Linear",1);var Js;Ei.Radial=Js=new Qt(Ei,"Radial",2);var Md;Ei.Pattern=Md=new Qt(Ei,"Pattern",4);var Ld;Ei.Lab=Ld=new Qt(Ei,"Lab",5);var r1;Ei.HSL=r1=new Qt(Ei,"HSL",6),Ei.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},Ei.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Td||(cv(),Td=!0);var y=dv;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},Ei.lighten=function(a){return e1(a)},Ei.lightenBy=e1,Ei.darken=function(a){return t1(a)},Ei.darkenBy=t1,Ei.mix=av,Ei.isDark=Cd;function Wo(){this.xa="Base"}Wo.prototype.measure=function(){},Wo.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Wo.prototype.arrange=function(){},Wo.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},Wo.prototype.iA=function(a){a.Uj()},Wo.prototype.gc=function(){},vn.Object.defineProperties(Wo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Pn}}}),Wo.prototype.remeasureObject=Wo.prototype.iA,Wo.prototype.arrangeElement=Wo.prototype.Ly,Wo.prototype.measureElement=Wo.prototype.Yz,Wo.className="PanelLayout";function fm(){this.xa="Base"}tn(fm,Wo),fm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;a=Ku(a);for(var he=0;he<se;he++){var pe=b[he];if(pe.visible||pe===a){var ye=pe.margin,Te=ye.right+ye.left;ye=ye.top+ye.bottom,pe.measure(y,x,te,ne);var Ge=pe.measuredBounds;Te=Math.max(Ge.width+Te,0),ye=Math.max(Ge.height+ye,0),Ge=pe.position.x;var Xe=pe.position.y;isFinite(Ge)||(Ge=0),isFinite(Xe)||(Xe=0),pe instanceof Fr&&pe.isGeometryPositioned&&(pe=pe.strokeWidth/2,Ge-=pe,Xe-=pe),ni(E,Ge,Xe,Te,ye)}}},fm.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,pe=te.position.y;if(he=isNaN(he)?-a:he-a,pe=isNaN(pe)?-x:pe-x,te instanceof Fr&&te.isGeometryPositioned){var ye=te.strokeWidth/2;he-=ye,pe-=ye}te.visible&&te.arrange(he+se.left,pe+se.top,ne.width,ne.height)}};function dm(){this.xa="Base"}tn(dm,Wo),dm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=_n(),te=Ku(a);for(var he=0;he<se;he++){var pe=b[he];if(pe.visible||pe===te){var ye=ss(pe,!1);if(ye!==fn&&ye!==lr)y.push(pe);else{pe.measure(1/0,x,0,ne),ye=pe.margin,pe=pe.measuredBounds;var Te=Math.max(pe.height+ye.top+ye.bottom,0);E.width+=Math.max(pe.width+ye.right+ye.left,0),E.height=Math.max(E.height,Te)}}}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));Xn(y)},dm.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 pe=te,ye=y[he];if(ye.visible){var Te=ye.measuredBounds,Ge=ye.margin,Xe=Ge.top+Ge.bottom,Je=te+E.bottom,it=Te.height,Tt=ss(ye,!1);(isNaN(ye.desiredSize.height)&&Tt===xn||Tt===vr)&&(it=Math.max(x.height-Xe-Je,0)),Xe=it+Xe+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=Or),ne&&(se-=Te.width+Ge.left+Ge.right),ye.arrange(se+Je.offsetX+Ge.left,pe+Je.offsetY+Ge.top+(x.height*Je.y-Xe*Je.y),Te.width,it),ne||(se+=Te.width+Ge.left+Ge.right)}}};function pm(){this.xa="Base"}tn(pm,Wo),pm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=_n();for(var se=Ku(a),he=0;he<ne;he++){var pe=b[he];if(pe.visible||pe===se){var ye=ss(pe,!1);if(ye!==fn&&ye!==vr)x.push(pe);else{var Te=pe.margin;ye=Te.right+Te.left,Te=Te.top+Te.bottom,pe.measure(y,1/0,te,0),pe=pe.measuredBounds,xi(E,Math.max(E.width,Math.max(pe.width+ye,0)),E.height+Math.max(pe.height+Te,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)&&(pe=he.margin,ne=pe.right+pe.left,pe=pe.top+pe.bottom,he.measure(y,1/0,te,0),he=he.measuredBounds,pe=Math.max(he.height+pe,0),E.width=Math.max(E.width,Math.max(he.width+ne,0)),E.height+=pe);Xn(x)}},pm.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 pe=te,ye=y[he];if(ye.visible){var Te=ye.measuredBounds,Ge=ye.margin,Xe=Ge.left+Ge.right,Je=te+E.right,it=Te.width,Tt=ss(ye,!1);(isNaN(ye.desiredSize.width)&&Tt===xn||Tt===lr)&&(it=Math.max(x.width-Xe-Je,0)),Xe=it+Xe+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=Or),ne&&(se-=Te.height+Ge.bottom+Ge.top),ye.arrange(pe+Je.offsetX+Ge.left+(x.width*Je.x-Xe*Je.x),se+Je.offsetY+Ge.top,it,Te.height),ne||(se+=Te.height+Ge.bottom+Ge.top)}}};function gm(){this.xa="Base"}tn(gm,Wo),gm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),pe=he.margin,ye=pe.right+pe.left,Te=pe.top+pe.bottom;he.measure(y,x,te,ne);var Ge=he.measuredBounds;te=Ge.width,ne=Ge.height;var Xe=Math.max(te+ye,0),Je=Math.max(ne+Te,0),it=a.isClipping,Tt=Jt.allocAt(-pe.left,-pe.top,Xe,Je),bt=Jt.allocAt(0,0,te,ne);pv(he,bt,!0),te=bt.width,ne=bt.height;for(var jt=!0,Ft=Ku(a),It=0;It<se;It++){var _t=b[It];Ge=y;var Vt=x;if(_t!==he&&(_t.visible||_t===Ft)){pe=_t.margin;var Rn=pe.left,qn=pe.top;switch(Xe=pe.right+pe.left,Je=pe.top+pe.bottom,pe=ss(_t,!1),pe){case xn:Ge=te,Vt=ne,qn=Rn=Je=Xe=0;break;case lr:Ge=te,Rn=Xe=0;break;case vr:Vt=ne,qn=Je=0}_t.measure(Ge,Vt,0,0),Ge=_t.measuredBounds,Xe=Math.max(Ge.width+Xe,0),Je=Math.max(Ge.height+Je,0),pe=_t.alignment,pe.Xb()&&(pe=a.defaultAlignment),pe.sb()||(pe=Or);var Yn=_t.alignmentFocus;if(Yn.Xb()&&(Yn=Or),Vt=null,_t instanceof Pn&&_t.$e!==""&&(Vt=_t.fb(_t.$e),Vt===_t&&(Vt=null)),Rn=bt.x-Rn,qn=bt.y-qn,Vt!==null){for(_t.arrange(0,0,Ge.width,Ge.height),Ge=Vt.actualBounds,Ge=lt.allocAt(Ge.x+(Yn.x*Ge.width-Yn.offsetX),Ge.y+(Yn.y*Ge.height-Yn.offsetY)),Vt=Vt.panel;Vt!==_t;)Vt.transform.Ga(Ge),Vt=Vt.panel;Rn+=pe.x*te+pe.offsetX-Ge.x,qn+=pe.y*ne+pe.offsetY-Ge.y,lt.free(Ge)}else Rn+=pe.x*te+pe.offsetX-(Yn.x*Ge.width+Yn.offsetX),qn+=pe.y*ne+pe.offsetY-(Yn.y*Ge.height+Yn.offsetY);jt?(jt=!1,E.h(Rn,qn,Xe,Je)):ni(E,Rn,qn,Xe,Je)}}switch(jt?E.assign(Tt):it?E.Uu(bt.x,bt.y,bt.width,bt.height):ni(E,Tt.x,Tt.y,Tt.width,Tt.height),Jt.free(Tt),Jt.free(bt),pe=he.stretch,pe===Nr&&(pe=ss(he,!1)),pe){case fn:return;case xn:if(!isFinite(y)&&!isFinite(x))return;break;case lr:if(!isFinite(y))return;break;case vr:if(!isFinite(x))return}for(Ge=he.measuredBounds,te=Ge.width,ne=Ge.height,Xe=Math.max(te+ye,0),Je=Math.max(ne+Te,0),pe=he.margin,bt=Jt.allocAt(-pe.left,-pe.top,Xe,Je),pv(he,bt,!0),te=bt.width,ne=bt.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==Ft||(pe=x.margin,Xe=pe.right+pe.left,Je=pe.top+pe.bottom,Ge=x.measuredBounds,Xe=Math.max(Ge.width+Xe,0),Je=Math.max(Ge.height+Je,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=Or),x=x.alignmentFocus,x.Xb()&&(x=Or),jt?(jt=!1,E.h(ye.x*te+ye.offsetX-(x.x*Ge.width+x.offsetX)-pe.left,ye.y*ne+ye.offsetY-(x.y*Ge.height+x.offsetY)-pe.top,Xe,Je)):ni(E,ye.x*te+ye.offsetX-(x.x*Ge.width+x.offsetX)-pe.left,ye.y*ne+ye.offsetY-(x.y*Ge.height+x.offsetY)-pe.top,Xe,Je));jt?E.assign(Tt):it?E.Uu(bt.x,bt.y,bt.width,bt.height):ni(E,Tt.x,Tt.y,Tt.width,Tt.height),Jt.free(bt)},gm.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 pe=te-x.x,ye=he-x.y;for(E.arrange(pe,ye,ne,se),ne=Jt.allocAt(0,0,ne,se),pv(E,ne,!1),se=0;se<b;se++){var Te=y[se];if(Te!==E){pe=Te.measuredBounds;var Ge=pe.width,Xe=pe.height;ye=Te.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=Or);var Je=Te.alignmentFocus;if(Je.Xb()&&(Je=Or),pe=null,Te instanceof Pn&&Te.$e!==""&&(pe=Te.fb(Te.$e),pe===Te&&(pe=null)),pe!==null){var it=pe.actualBounds;for(Je=lt.allocAt(it.x+(Je.x*it.width-Je.offsetX),it.y+(Je.y*it.height-Je.offsetY)),pe=pe.panel;pe!==Te;)pe.transform.Ga(Je),pe=pe.panel;pe=ye.x*ne.width+ye.offsetX-Je.x,ye=ye.y*ne.height+ye.offsetY-Je.y,lt.free(Je)}else pe=ye.x*ne.width+ye.offsetX-(Je.x*Ge+Je.offsetX),ye=ye.y*ne.height+ye.offsetY-(Je.y*Xe+Je.offsetY);pe+=ne.x-x.x,ye+=ne.y-x.y,Te.visible&&Te.arrange(te+pe,he+ye,Ge,Xe)}}Jt.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Pn&&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 mm(){this.xa="Base"}tn(mm,Wo),mm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),pe=he.margin,ye=y,Te=x,Ge=pe.right+pe.left,Xe=pe.top+pe.bottom;he.measure(y,x,te,ne),pe=he.measuredBounds;var Je=0,it=null;he instanceof Fr&&(it=he,Je=it.strokeWidth*it.scale);var Tt=Math.max(pe.width+Ge,0);pe=Math.max(pe.height+Xe,0);var bt=yv(he),jt=bt.x*Tt+bt.offsetX;bt=bt.y*pe+bt.offsetY;var Ft=Sv(he),It=Ft.x*Tt+Ft.offsetX;for(Ft=Ft.y*pe+Ft.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(jt-It)-Je,0)),isFinite(x)&&(Te=Math.max(Math.abs(bt-Ft)-Je,0)),Je=ln.alloc(),Je.h(0,0),a=Ku(a),Ft=0;Ft<se;Ft++)bt=b[Ft],bt===he||!bt.visible&&bt!==a||(pe=bt.margin,Tt=pe.right+pe.left,jt=pe.top+pe.bottom,bt.measure(ye,Te,0,0),pe=bt.measuredBounds,Tt=Math.max(pe.width+Tt,0),pe=Math.max(pe.height+jt,0),Je.h(Math.max(Tt,Je.width),Math.max(pe,Je.height)));if(se===1)E.width=Tt,E.height=pe,ln.free(Je);else{switch(bt=yv(he),Ft=Sv(he),se=b=0,Ft.x!==bt.x&&Ft.y!==bt.y&&(b=Je.width/Math.abs(Ft.x-bt.x),se=Je.height/Math.abs(Ft.y-bt.y)),ln.free(Je),Je=0,it!==null&&(Je=it.strokeWidth*it.scale,Ev(it)===rr&&(b=se=Math.max(b,se))),b+=Math.abs(bt.offsetX)+Math.abs(Ft.offsetX)+Je,se+=Math.abs(bt.offsetY)+Math.abs(Ft.offsetY)+Je,it=he.stretch,it===Nr&&(it=ss(he,!1)),it){case fn:ne=te=0;break;case xn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case lr:isFinite(y)&&(b=y),ne=0;break;case vr:te=0,isFinite(x)&&(se=x)}he.Uj(),he.measure(b,se,te,ne),E.width=he.measuredBounds.width+Ge,E.height=he.measuredBounds.height+Xe}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=Jt.alloc();te.h(0,0,1,1);var ne=b.margin,se=ne.left;ne=ne.top;var he=a.padding,pe=he.left;he=he.top,b.arrange(pe+se,he+ne,E.width,E.height);var ye=yv(b),Te=Sv(b),Ge=ye.y*E.height+ye.offsetY,Xe=Te.x*E.width+Te.offsetX;for(Te=Te.y*E.height+Te.offsetY,te.x=ye.x*E.width+ye.offsetX,te.y=Ge,ni(te,Xe,Te,0,0),te.x+=se+pe,te.y+=ne+he,E=0;E<x;E++)se=y[E],se!==b&&(pe=se.measuredBounds,ne=se.margin,he=Math.max(pe.width+ne.right+ne.left,0),ye=Math.max(pe.height+ne.top+ne.bottom,0),Ge=se.alignment,Ge.Xb()&&(Ge=a.defaultAlignment),Ge.sb()||(Ge=Or),he=te.width*Ge.x+Ge.offsetX-he*Ge.x+ne.left+te.x,ne=te.height*Ge.y+Ge.offsetY-ye*Ge.y+ne.top+te.y,se.visible&&($i(te.x,te.y,te.width,te.height,he,ne,pe.width,pe.height)?se.arrange(he,ne,pe.width,pe.height):se.arrange(he,ne,pe.width,pe.height,new Jt(te.x,te.y,te.width,te.height))));Jt.free(te)};function vm(){this.xa="Base",this.name="Table"}tn(vm,Wo),vm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=_n(),se=_n(),he=0;he<te;he++){var pe=b[he],ye=pe instanceof Pn?pe:null;if(ye!==null&&xh(ye)&&pe.visible){se.push(ye);for(var Te=ye.O.s,Ge=Te.length,Xe=0;Xe<Ge;Xe++){var Je=Te[Xe];ye.type===Pn.TableRow?Je.row=pe.row:ye.type===Pn.TableColumn&&(Je.column=pe.column),ne.push(Je)}}else ne.push(pe)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var it=[],Tt=0;Tt<te;Tt++){var bt=ne[Tt];bt.visible&&(Bo(bt,!0),yu(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))}Xn(ne);var jt=_n(),Ft=_n(),It=_n(),_t={count:0},Vt={count:0},Rn=y,qn=x,Yn=a.rowDefs,En=a.colDefs,hn=null;te=Yn.length;for(var Mr=0;Mr<te;Mr++)hn=Yn[Mr],hn!==void 0&&(hn.actual=0);te=En.length;for(var Pr=0;Pr<te;Pr++)hn=En[Pr],hn!==void 0&&(hn.actual=0);for(var gi=it.length,Ui=0,$o=0;$o<gi;$o++)it[$o]&&(Ui=Math.max(Ui,it[$o].length));var ea=Math.min(a.topIndex,gi-1),Ra=Math.min(a.leftIndex,Ui-1),Jo=0;gi=it.length;for(var Nh=Ku(a),Lo=0;Lo<gi;Lo++)if(it[Lo]){Ui=it[Lo].length;var Gl=a.Fb(Lo);Gl.actual=0;for(var _a=Gl.oc=0;_a<Ui;_a++)if(it[Lo][_a]){var Ah=a.Eb(_a);jt[_a]===void 0&&(Ah.actual=0,Ah.oc=0,jt[_a]=!0);for(var Ws=it[Lo][_a],ml=Ws.length,Ls=0;Ls<ml;Ls++){var ys=Ws[Ls];if(ys.visible||ys===Nh){var mc=1<ys.rowSpan||1<ys.columnSpan;mc&&(Lo<ea||_a<Ra||Ft.push(ys));var Ul=ys.margin,Qd=Ul.right+Ul.left,Ns=Ul.top+Ul.bottom,za=Bl(ys,Gl,Ah,!1),Ng=ys.desiredSize,Vf=!isNaN(Ng.height),ou=!isNaN(Ng.width)&&Vf;if(mc||za===fn||ou||Lo<ea||_a<Ra||(_t[_a]!==void 0||za!==xn&&za!==lr||(_t[_a]=-1,_t.count++),Vt[Lo]!==void 0||za!==xn&&za!==vr||(Vt[Lo]=-1,Vt.count++),It.push(ys)),ys.measure(1/0,1/0,0,0),!(Lo<ea||_a<Ra)){var Ss=ys.measuredBounds,tf=Math.max(Ss.width+Qd,0),As=Math.max(Ss.height+Ns,0);if(ys.rowSpan===1&&(za===fn||za===lr)){hn=a.Fb(Lo);var vc=hn.Wc();Jo=Math.max(As-hn.actual,0),Jo+vc>qn&&(Jo=Math.max(qn-vc,0));var z0=hn.oa===0;hn.oc=hn.oc+Jo,hn.actual=hn.oa+Jo,qn=Math.max(qn-(Jo+(z0?vc:0)),0)}if(ys.columnSpan===1&&(za===fn||za===vr)){hn=a.Eb(_a);var Ag=hn.Wc();Jo=Math.max(tf-hn.actual,0),Jo+Ag>Rn&&(Jo=Math.max(Rn-Ag,0));var Gy=hn.oa===0;hn.oc=hn.oc+Jo,hn.actual=hn.oa+Jo,Rn=Math.max(Rn-(Jo+(Gy?Ag:0)),0)}mc&&ys.Uj()}}}}}Xn(jt);var Lu=0,Xu=0;te=a.columnCount;for(var Zf=0;Zf<te;Zf++){var yc=En[Zf];yc!==void 0&&(Lu+=isNaN(yc.Hc)?yc.oc:yc.Hc,yc.oc!==0&&(Lu+=yc.Wc()))}te=a.rowCount;for(var qd=0;qd<te;qd++){var Sc=Yn[qd];Sc!==void 0&&(Xu+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(Xu+=Sc.Wc()))}Rn=Math.max(y-Lu,0);var Nu=qn=Math.max(x-Xu,0),jh=Rn;te=It.length;for(var xs=0;xs<te;xs++){var au=It[xs],G0=a.Fb(au.row),Yu=a.Eb(au.column),ep=au.measuredBounds,Wl=au.margin,nf=Wl.right+Wl.left,su=Wl.top+Wl.bottom;_t[au.column]=Yu.oc===0&&_t[au.column]!==void 0?Math.max(ep.width+nf,_t[au.column]):null,Vt[au.row]=G0.oc===0&&Vt[au.row]!==void 0?Math.max(ep.height+su,Vt[au.row]):null}var Xf=0,tp=0,Nl;for(Nl in Vt)Nl!=="count"&&(Xf+=Vt[Nl]);for(Nl in _t)Nl!=="count"&&(tp+=_t[Nl]);for(var ca=ln.alloc(),jg=0;jg<te;jg++){var rs=It[jg];if(rs.visible||rs===Nh){var No=a.Fb(rs.row),is=a.Eb(rs.column),$u=0;isFinite(is.width)?$u=is.width:(isFinite(Rn)&&_t[rs.column]!==null?tp===0?$u=is.actual+Rn:$u=_t[rs.column]/tp*jh:_t[rs.column]!==null?$u=Rn:$u=is.actual||Rn,$u=Math.max(0,$u-is.Wc()));var Oh=0;switch(isFinite(No.height)?Oh=No.height:(isFinite(qn)&&Vt[rs.row]!==null?Xf===0?Oh=No.actual+qn:Oh=Vt[rs.row]/Xf*Nu:Vt[rs.row]!==null?Oh=qn:Oh=No.actual||qn,Oh=Math.max(0,Oh-No.Wc())),ca.h(Math.max(is.minimum,Math.min($u,is.maximum)),Math.max(No.minimum,Math.min(Oh,No.maximum))),za=Bl(rs,No,is,!1),za){case lr:ca.height=Math.max(ca.height,No.actual+qn);break;case vr:ca.width=Math.max(ca.width,is.actual+Rn)}var rf=rs.margin,Uy=rf.right+rf.left,U0=rf.top+rf.bottom;rs.Uj(),rs.measure(ca.width,ca.height,is.minimum,No.minimum);var np=rs.measuredBounds,of=Math.max(np.width+Uy,0),Yf=Math.max(np.height+U0,0);isFinite(Rn)&&(of=Math.min(of,ca.width)),isFinite(qn)&&(Yf=Math.min(Yf,ca.height));var ws=0;ws=No.actual,No.actual=Math.max(No.actual,Yf),No.oc=Math.max(No.oc,Yf),Jo=No.actual-ws,qn=Math.max(qn-Jo,0),Vt[rs.row]===null&&(Nu=Math.max(Nu-Jo,0)),ws=is.actual,is.actual=Math.max(is.actual,of),is.oc=Math.max(is.oc,of),Jo=is.actual-ws,Rn=Math.max(Rn-Jo,0),_t[rs.column]===null&&(jh=Math.max(jh-Jo,0))}}Xn(It);var Ju=ln.alloc(),Hl=_n(),rl=_n();if(te=Ft.length,te!==0){for(var xc=0;xc<gi;xc++)if(it[xc]){Ui=it[xc].length;var rp=a.Fb(xc);Hl[xc]=rp.actual;for(var wc=0;wc<Ui;wc++)if(it[xc][wc]){var W0=a.Eb(wc);rl[wc]=W0.actual}}}for(var ip=0;ip<te;ip++){var So=Ft[ip];if(So.visible||So===Nh){var Al=a.Fb(So.row),vl=a.Eb(So.column);switch(ca.h(Math.max(vl.minimum,Math.min(y,vl.maximum)),Math.max(Al.minimum,Math.min(x,Al.maximum))),za=Bl(So,Al,vl,!1),za){case xn:rl[vl.index]!==0&&(ca.width=Math.min(ca.width,rl[vl.index])),Hl[Al.index]!==0&&(ca.height=Math.min(ca.height,Hl[Al.index]));break;case lr:rl[vl.index]!==0&&(ca.width=Math.min(ca.width,rl[vl.index]));break;case vr:Hl[Al.index]!==0&&(ca.height=Math.min(ca.height,Hl[Al.index]))}isFinite(vl.width)&&(ca.width=vl.width),isFinite(Al.height)&&(ca.height=Al.height),Ju.h(0,0);for(var H0=vl.minimum,js=Al.minimum,Fh=1;Fh<So.rowSpan&&!(So.row+Fh>=a.rowCount);Fh++)hn=a.Fb(So.row+Fh),Jo=0,Jo=za===xn||za===vr?Math.max(hn.minimum,Hl[So.row+Fh]===0?hn.maximum:Math.min(Hl[So.row+Fh],hn.maximum)):Math.max(hn.minimum,isNaN(hn.Hc)?hn.maximum:Math.min(hn.Hc,hn.maximum)),Ju.height+=Jo,js+=hn.minimum;for(var yl=1;yl<So.columnSpan&&!(So.column+yl>=a.columnCount);yl++)hn=a.Eb(So.column+yl),Jo=0,Jo=za===xn||za===lr?Math.max(hn.minimum,rl[So.column+yl]===0?hn.maximum:Math.min(rl[So.column+yl],hn.maximum)):Math.max(hn.minimum,isNaN(hn.Hc)?hn.maximum:Math.min(hn.Hc,hn.maximum)),Ju.width+=Jo,H0+=hn.minimum;ca.width+=Ju.width,ca.height+=Ju.height;var op=So.margin,Pc=op.right+op.left,Og=op.top+op.bottom;So.measure(ca.width,ca.height,H0,js);for(var ap=So.measuredBounds,lu=Math.max(ap.width+Pc,0),af=Math.max(ap.height+Og,0),bc=0,sp=0;sp<So.rowSpan&&!(So.row+sp>=a.rowCount);sp++)hn=a.Fb(So.row+sp),bc+=hn.total||0;if(bc<af){var Dh=af-bc,Au=af-bc;if(So.spanAllocation!==null)for(var Bh=So.spanAllocation,Qu=0;Qu<So.rowSpan&&!(0>=Dh)&&!(So.row+Qu>=a.rowCount);Qu++){hn=a.Fb(So.row+Qu);var Ih=hn.oa||0,sf=Bh(So,hn,Au);hn.actual=Math.min(hn.maximum,Ih+sf),hn.oa!==Ih&&(Dh-=hn.oa-Ih)}for(;0<Dh;){var Kl=hn.oa||0;if(isNaN(hn.height)&&hn.maximum>Kl&&(hn.actual=Math.min(hn.maximum,Kl+Dh),hn.oa!==Kl&&(Dh-=hn.oa-Kl)),hn.index===0)break;hn=a.Fb(hn.index-1)}}for(var $f=0,Rh=0;Rh<So.columnSpan&&!(So.column+Rh>=a.columnCount);Rh++)hn=a.Eb(So.column+Rh),$f+=hn.total||0;if($f<lu){var Jf=lu-$f,Wy=lu-$f;if(So.spanAllocation!==null)for(var qu=So.spanAllocation,lf=0;lf<So.columnSpan&&!(0>=Jf)&&!(So.column+lf>=a.columnCount);lf++){hn=a.Eb(So.column+lf);var Fg=hn.oa||0,Hy=qu(So,hn,Wy);hn.actual=Math.min(hn.maximum,Fg+Hy),hn.oa!==Fg&&(Jf-=hn.oa-Fg)}for(;0<Jf;){var K0=hn.oa||0;if(isNaN(hn.width)&&hn.maximum>K0&&(hn.actual=Math.min(hn.maximum,K0+Jf),hn.oa!==K0&&(Jf-=hn.oa-K0)),hn.index===0)break;hn=a.Eb(hn.index-1)}}}}Xn(Ft),ln.free(Ju),ln.free(ca),Hl!==void 0&&Xn(Hl),rl!==void 0&&Xn(rl);var Qf=0,qf=0,V0=a.desiredSize,gx=a.maxSize;za=ss(a,!0);var Dg=Xu=Lu=0,Bg=0;te=a.columnCount;for(var Z0=0;Z0<te;Z0++)En[Z0]!==void 0&&(hn=a.Eb(Z0),isFinite(hn.width)?(Dg+=hn.width,Dg+=hn.Wc()):Tm(hn)===Zp?(Dg+=hn.oa,Dg+=hn.Wc()):hn.oa!==0&&(Lu+=hn.oa,Lu+=hn.Wc()));isFinite(V0.width)?Qf=Math.min(V0.width,gx.width):Qf=za!==fn&&isFinite(y)?y:Lu,Qf=Math.max(Qf,a.minSize.width),Qf=Math.max(Qf-Dg,0);for(var Qx=Lu===0?1:Math.max(Qf/Lu,1),X0=0;X0<te;X0++)En[X0]!==void 0&&(hn=a.Eb(X0),isFinite(hn.width)||Tm(hn)===Zp||(hn.actual=hn.oa*Qx),hn.position=E.width,hn.oa!==0&&(E.width+=hn.oa,E.width+=hn.Wc()));te=a.rowCount;for(var Y0=0;Y0<te;Y0++)Yn[Y0]!==void 0&&(hn=a.Fb(Y0),isFinite(hn.height)?(Bg+=hn.height,Bg+=hn.Wc()):Tm(hn)===Zp?(Bg+=hn.oa,Bg+=hn.Wc()):hn.oa!==0&&(Xu+=hn.oa,Xu+=hn.Wc()));isFinite(V0.height)?qf=Math.min(V0.height,gx.height):qf=za!==fn&&isFinite(x)?x:Xu,qf=Math.max(qf,a.minSize.height),qf=Math.max(qf-Bg,0);for(var qx=Xu===0?1:Math.max(qf/Xu,1),$0=0;$0<te;$0++)Yn[$0]!==void 0&&(hn=a.Fb($0),isFinite(hn.height)||Tm(hn)===Zp||(hn.actual=hn.oa*qx),hn.position=E.height,hn.oa!==0&&(E.height+=hn.oa,E.height+=hn.Wc()));te=se.length;for(var Ky=0;Ky<te;Ky++){var Ig=se[Ky],Vy=0,Zy=0;Ig.type===Pn.TableRow?(Vy=E.width,hn=a.Fb(Ig.row),Zy=hn.actual):(hn=a.Eb(Ig.column),Vy=hn.actual,Zy=E.height),Ig.measuredBounds.h(0,0,Vy,Zy),Bo(Ig,!1)}Xn(se),a.inRowsCols=it},vm.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,pe=ne.length,ye=0,Te=0;Te<pe;Te++)ne[Te]&&(ye=Math.max(ye,ne[Te].length));he=a.rowDefs,se=a.colDefs;var Ge=Te=0,Xe=Math.min(a.topIndex,pe-1);if(0<he.length){for(;Xe!==pe&&(he[Xe]===void 0||he[Xe].oa===0);)Xe++;Xe=Math.max(Math.min(Xe,pe-1),0),Te=-he[Xe].position}var Je=Math.min(a.leftIndex,ye-1);if(0<se.length){for(;Je!==ye&&(se[Je]===void 0||se[Je].oa===0);)Je++;Je=Math.max(Math.min(Je,ye-1),0),Ge=-se[Je].position}for(var it=0,Tt=0;it!==pe&&he[it]===void 0;)it++;for(;Tt!==pe&&se[Tt]===void 0;)Tt++;ye=a.part,a.Fb(it),a.Eb(Tt);for(var bt=0;bt<y.length;bt++){var jt=y[bt];if(jt instanceof Pn&&jt.visible&&xh(jt)){if(jt.type===Pn.TableRow){se=a.Fb(jt.row);var Ft=a.Eb(Tt)}else se=a.Fb(it),Ft=a.Eb(jt.column);he=se.position+Te+E,se.oa!==0&&(he+=se.Io(Math.max(it,Xe))),se=Ft.position+Ge+te,Ft.oa!==0&&(se+=Ft.Io(Math.max(Tt,Je))),Ft=jt.measuredBounds,jt.Uk(),jt.actualBounds.ka();var It=jt.actualBounds,_t=Jt.allocAt(It.x,It.y,It.width,It.height);It.x=jt.type===Pn.TableRow?te:se,It.y=jt.type===Pn.TableColumn?E:he,It.width=Ft.width,It.height=Ft.height,jt.actualBounds.freeze(),yu(jt,!1),Dr(_t,It)||ye===null||(ye.oh(),jt.Pn(ye)),Jt.free(_t)}}for(bt=ln.alloc(),jt=0;jt<pe;jt++)if(ne[jt]){for(ye=ne[jt].length,Ft=a.Fb(jt),he=Ft.position+Te+E,Ft.oa!==0&&(he+=Ft.Io(Math.max(it,Xe))),It=0;It<ye;It++)if(ne[jt][It]){_t=a.Eb(It),se=_t.position+Ge+te,_t.oa!==0&&(se+=_t.Io(Math.max(Tt,Je)));for(var Vt=ne[jt][It],Rn=Vt.length,qn=0;qn<Rn;qn++){var Yn=Vt[qn],En=Yn.measuredBounds;bt.h(0,0);for(var hn=1;hn<Yn.rowSpan&&!(jt+hn>=a.rowCount);hn++){var Mr=a.Fb(jt+hn);Mr.oa!==0&&(bt.height+=Mr.total)}for(hn=1;hn<Yn.columnSpan&&!(It+hn>=a.columnCount);hn++)Mr=a.Eb(It+hn),Mr.oa!==0&&(bt.width+=Mr.total);var Pr=_t.oa+bt.width,gi=Ft.oa+bt.height;hn=se,Mr=he;var Ui=Pr,$o=gi,ea=se,Ra=he,Jo=Pr,Nh=gi;se+Pr>x.width&&(Jo=Math.max(x.width-se,0)),he+gi>x.height&&(Nh=Math.max(x.height-he,0));var Lo=Yn.alignment;if(Lo.Xb()){Lo=a.defaultAlignment,Lo.sb()||(Lo=Or);var Gl=Lo.x,_a=Lo.y,Ah=Lo.offsetX;Lo=Lo.offsetY;var Ws=_t.alignment,ml=Ft.alignment;Ws.sb()&&(Gl=Ws.x,Ah=Ws.offsetX),ml.sb()&&(_a=ml.y,Lo=ml.offsetY)}else Gl=Lo.x,_a=Lo.y,Ah=Lo.offsetX,Lo=Lo.offsetY;(isNaN(Gl)||isNaN(_a))&&(_a=Gl=.5,Lo=Ah=0),Ws=En.width,ml=En.height;var Ls=Yn.margin,ys=Ls.left+Ls.right,mc=Ls.top+Ls.bottom,Ul=Bl(Yn,Ft,_t,!1);!isNaN(Yn.desiredSize.width)||Ul!==xn&&Ul!==lr||(Ws=Math.max(Pr-ys,0)),!isNaN(Yn.desiredSize.height)||Ul!==xn&&Ul!==vr||(ml=Math.max(gi-mc,0)),Pr=Yn.maxSize,gi=Yn.minSize,Ws=Math.min(Pr.width,Ws),ml=Math.min(Pr.height,ml),Ws=Math.max(gi.width,Ws),ml=Math.max(gi.height,ml),Pr=ml+mc,hn+=Ui*Gl-(Ws+ys)*Gl+Ah+Ls.left,Mr+=$o*_a-Pr*_a+Lo+Ls.top,Yn.visible&&($i(ea,Ra,Jo,Nh,hn,Mr,En.width,En.height)?Yn.arrange(hn,Mr,Ws,ml):Yn.arrange(hn,Mr,Ws,ml,new Jt(ea,Ra,Jo,Nh)))}}}for(ln.free(bt),a=0;a<b;a++)x=y[a],te=x instanceof Pn?x:null,te!==null&&xh(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}tn(ym,Wo),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}tn(Sm,Wo),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}tn(xm,Wo),xm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Ot("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,pe=he.right+he.left;if(he=he.top+he.bottom,isFinite(y)||isFinite(x)){var ye=b.scale,Te=se.width;se=se.height;var Ge=Math.max(y-pe,0),Xe=Math.max(x-he,0),Je=1;a.viewboxStretch===rr?Te!==0&&se!==0&&(Je=Math.min(Ge/Te,Xe/se)):Te!==0&&se!==0&&(Je=Math.max(Ge/Te,Xe/se)),Je===0&&(Je=1e-4),b.Ca*=Je,ye!==b.scale&&(Bo(b,!0),b.measure(1/0,1/0,te,ne))}se=b.measuredBounds,E.width=isFinite(y)?y:Math.max(se.width+pe,0),E.height=isFinite(x)?x:Math.max(se.height+he,0)},xm.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=Or),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 Hp(){this.xa="Base"}tn(Hp,Wo),Hp.prototype.measure=function(){},Hp.prototype.arrange=function(){},Hp.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,pe=Math.ceil(se/E),ye=Math.ceil(he/b),Te=a.gridOrigin,Ge=Te.x;Te=Te.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Xe=[],Je=a.O.s,it=Je.length,Tt=0;Tt<it;Tt++){var bt=Je[Tt],jt=[];if(Xe.push(jt),bt.visible){var Ft=bt.interval;if(!(0>Ft)){bt=mv(bt.figure);for(var It=0;It<it;It++)if(It!==Tt){var _t=Je[It];_t.visible&&mv(_t.figure)===bt&&(_t=_t.interval,_t>Ft&&jt.push(_t))}}}}for(Je=a.O.s,it=Je.length,Tt=0;Tt<it;Tt++){var Vt=Je[Tt];if(Vt.visible&&(jt=Vt.interval||1,bt=Math.abs(jt),!(2>E*bt*x))){if(Ft=Vt.segmentIndex,(!isFinite(Ft)||isNaN(Ft))&&(Ft=0),0>Ft&&(Ft=bt-Math.min(-Ft,bt)),Ft=Math.round(Ft%bt),bt=Vt.opacity,It=1,bt!==1){if(bt===0)continue;It=y.globalAlpha,y.globalAlpha=It*bt}_t=Xe[Tt];var Rn=!1,qn=Vt.strokeDashArray;if(qn!==null&&(Rn=!0,y.js(qn,Vt.strokeDashOffset)),Vt.figure==="LineV"&&Vt.stroke!==null&&0<Vt.strokeWidth){for(y.lineWidth=Vt.strokeWidth,mo(a,y,Vt.stroke,!1,!1,te,ne),y.beginPath(),qn=Vt=Math.floor((Ge-E)/E);qn<=Vt+pe;qn++){var Yn=qn*E+Ge;0<=Yn&&Yn<=se&&wm(qn,jt,Ft,_t)&&(y.moveTo(Yn,0),y.lineTo(Yn,he))}y.stroke(),y.Se()}else if(Vt.figure==="LineH"&&Vt.stroke!==null&&0<Vt.strokeWidth){for(y.lineWidth=Vt.strokeWidth,mo(a,y,Vt.stroke,!1,!1,te,ne),y.beginPath(),qn=Vt=Math.floor((Te-b)/b);qn<=Vt+ye;qn++)Yn=qn*b+Te,0<=Yn&&Yn<=he&&wm(qn,jt,Ft,_t)&&(y.moveTo(0,Yn),y.lineTo(se,Yn));y.stroke(),y.Se()}else if(Vt.figure==="BarV"&&Vt.fill!==null)for(mo(a,y,Vt.fill,!0,!1,te,ne),Vt=Vt.width,isNaN(Vt)&&(Vt=E),Yn=qn=Math.floor((Ge-E)/E);Yn<=qn+pe;Yn++){var En=Yn*E+Ge;0<=En+Vt&&En<=se&&wm(Yn,jt,Ft,_t)&&y.fillRect(En,0,Vt,he)}else if(Vt.figure==="BarH"&&Vt.fill!==null)for(mo(a,y,Vt.fill,!0,!1,te,ne),Vt=Vt.height,isNaN(Vt)&&(Vt=b),Yn=qn=Math.floor((Te-b)/b);Yn<=qn+ye;Yn++)En=Yn*b+Te,0<=En+Vt&&En<=he&&wm(Yn,jt,Ft,_t)&&y.fillRect(0,En,se,Vt);Rn&&y.fs(),bt!==1&&(y.globalAlpha=It)}}y.restore(),y.Vc(!1)};function wm(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 Pm(){this.xa="Base"}tn(Pm,Wo),Pm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof di||a instanceof kn){var ne=null,se=null;if(a instanceof kn&&(ne=a),a instanceof di&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof kn){var he=ne;if(te===0)xi(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var pe=a instanceof di?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=he.points,Te=ne.pointsCount;se!==null?se.Ul(!1):ne!==null&&ne.Ul(!1),se=y.width;var Ge=y.height,Xe=a.j;if(Xe.length=0,pe!==null){i1(a,se,Ge,pe);var Je=pe.measuredBounds;x.ed(Je),Xe.push(Je)}Je=wr.alloc();for(var it=lt.alloc(),Tt=lt.alloc(),bt=0;bt<te;bt++){var jt=b[bt];if(jt!==pe)if(jt.isPanelMain&&jt instanceof Fr){i1(a,se,Ge,jt);var Ft=jt.measuredBounds;x.ed(Ft),Xe.push(Ft)}else if(2>Te)jt.measure(1/0,1/0,0,0),Ft=jt.measuredBounds,x.ed(Ft),Xe.push(Ft);else{var It=jt.segmentIndex,_t=jt.segmentFraction,Vt=jt.alignmentFocus;Vt.Mc()&&(Vt=Or);var Rn=jt.segmentOrientation,qn=jt.segmentOffset;if(isNaN(It)){var Yn=he.ua;Ft=_n(),Yn.Qu(_t,Ft);var En=lt.allocAt(Ft[0],Ft[1]);if(En.add(he.i(0)),Yn.type===Cn.j?En.offset(-Yn.startX,-Yn.startY):(Yn=Yn.figures.first(),Yn!==null&&En.offset(-Yn.startX,-Yn.startY)),Yn=Ft[2],Rn!==Qa){var hn=he.computeAngle(jt,Rn,Yn);jt.Kb=hn}hn=En.x-y.x;var Mr=En.y-y.y;lt.free(En),Xn(Ft)}else if(It<-Te||It>=Te)Ft=lt.alloc(),he.vg(),he.computeMidPoint(Ft),Yn=he.midAngle,Rn!==Qa&&(hn=he.computeAngle(jt,Rn,Yn),jt.Kb=hn),hn=Ft.x-y.x,Mr=Ft.y-y.y,lt.free(Ft);else{if(hn=0,0<=It?(Mr=ye.M(It),Ft=It<Te-1?ye.M(It+1):Mr):(hn=Te+It,Mr=ye.M(hn),Ft=0<hn?ye.M(hn-1):Mr),Mr.Xa(Ft)){0<=It?(Yn=0<It?ye.M(It-1):Mr,hn=It<Te-2?ye.M(It+2):Ft):(Yn=hn<Te-1?ye.M(hn+1):Mr,hn=1<hn?ye.M(hn-2):Ft),En=Yn.Bf(Mr);var Pr=Ft.Bf(hn);Yn=En>Pr+10?0<=It?Yn.ab(Mr):Mr.ab(Yn):Pr>En+10?0<=It?Ft.ab(hn):hn.ab(Ft):0<=It?Yn.ab(hn):hn.ab(Yn)}else Yn=0<=It?Mr.ab(Ft):Ft.ab(Mr);Rn!==Qa&&(hn=he.computeAngle(jt,Rn,Yn),jt.Kb=hn),hn=Mr.x+(Ft.x-Mr.x)*_t-y.x,Mr=Mr.y+(Ft.y-Mr.y)*_t-y.y}jt.measure(1/0,1/0,0,0),Ft=jt.measuredBounds,En=jt.naturalBounds;var gi=0;jt instanceof Fr&&(gi=jt.strokeWidth),Pr=En.width+gi;var Ui=En.height+gi;Je.reset(),Je.translate(-Ft.x,-Ft.y),Je.scale(jt.scale,jt.scale),Je.rotate(Rn===Qa?jt.angle:Yn,Pr/2,Ui/2),Rn!==rg&&Rn!==og||Je.rotate(90,Pr/2,Ui/2),Rn!==ig&&Rn!==ag||Je.rotate(-90,Pr/2,Ui/2),Rn===Qm&&(45<Yn&&135>Yn||225<Yn&&315>Yn)&&Je.rotate(-Yn,Pr/2,Ui/2),En=new Jt(0,0,Pr,Ui),it.xi(En,Vt),Je.Ga(it),Vt=-it.x+gi/2*jt.scale,jt=-it.y+gi/2*jt.scale,Tt.assign(qn),gi=isNaN(qn.x);var $o=isNaN(qn.y);if(gi||$o){Pr=Pr/2+3,Ui=Ui/2+3;var ea=45<=Yn&&135>=Yn,Ra=225<=Yn&&315>=Yn;Rn===Qa&&(ea||Ra)?(Tt.x=$o?Pr:qn.y,Tt.y=gi?Ui:qn.x,ea?0<=It||isNaN(It)&&.5>_t||!gi||(Tt.y=-Ui):Ra&&((0<=It||isNaN(It)&&.5>_t)&&gi&&(Tt.y=-Ui),$o&&(Tt.x=-Pr))):(gi&&(Tt.x=0<=It||isNaN(It)&&.5>_t?Pr:-Pr),$o&&(Tt.y=-Ui),Tt.rotate(Yn))}else Tt.rotate(Yn);hn+=Tt.x,Mr+=Tt.y,En.set(Ft),En.h(hn+Vt,Mr+jt,Ft.width,Ft.height),Xe.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),xi(E,x.width||0,x.height||0),wr.free(Je),lt.free(it),lt.free(Tt)}}}},Pm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof di||a instanceof kn){var b=a,E=null;a instanceof di&&(E=a,b=E.adornedPart);var te=a instanceof di?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 pe=y[he];if(pe!==te&&se<ne.length){var ye=ne[se];se++,pe.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 Te=a;ne=te.value,se=ne.segmentIndex,he=ne.segmentFraction;var Ge=ne.alignmentFocus;if(pe=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(se)){var Xe=Te.ua,Je=_n();Xe.Qu(he,Je);var it=lt.allocAt(Je[0],Je[1]);it.add(Te.i(0)),Xe.type===Cn.j||(Xe=Xe.figures.first()),it.offset(-Xe.startX,-Xe.startY),Xe=Je[2],pe!==Qa&&(Te=Te.computeAngle(ne,pe,Xe),ne.angle=Te),Te=it.x;var Tt=it.y;lt.free(it),Xn(Je)}else if(se<-x||se>=x)Je=lt.alloc(),Xe=Te,Tt=Je,Xe.vg(),Xe.computeMidPoint(Tt),Xe=Te.midAngle,pe!==Qa&&(Te=Te.computeAngle(ne,pe,Xe),ne.angle=Te),Te=Je.x,Tt=Je.y,lt.free(Je);else{if(it=0,0<=se?(Je=y.s[se],Tt=se<x-1?y.s[se+1]:Je):(it=x+se,Je=y.s[it],Tt=0<it?y.s[it-1]:Je),Je.Xa(Tt)){0<=se?(Xe=0<se?y.s[se-1]:Je,it=se<x-2?y.s[se+2]:Tt):(Xe=it<x-1?y.s[it+1]:Je,it=1<it?y.s[it-2]:Tt);var bt=Xe.Bf(Je),jt=Tt.Bf(it);Xe=bt>jt+10?0<=se?Xe.ab(Je):Je.ab(Xe):jt>bt+10?0<=se?Tt.ab(it):it.ab(Tt):0<=se?Xe.ab(it):it.ab(Xe)}else Xe=0<=se?Je.ab(Tt):Tt.ab(Je);pe!==Qa&&(Te=Te.computeAngle(ne,pe,Xe),ne.angle=Te),Te=Je.x+(Tt.x-Je.x)*he,Tt=Je.y+(Tt.y-Je.y)*he}if(Ge.ys())ne.location=new lt(Te,Tt);else{Ge.Mc()&&(Ge=Or),Je=wr.alloc(),Je.reset(),Je.scale(ne.scale,ne.scale),Je.rotate(ne.angle,0,0);var Ft=ne.naturalBounds;it=Jt.allocAt(0,0,Ft.width,Ft.height),bt=lt.alloc(),bt.xi(it,Ge),Je.Ga(bt),Ge=-bt.x,jt=-bt.y;var It=Ft.width,_t=Ft.height;Ft=lt.alloc(),Ft.assign(ye);var Vt=isNaN(ye.x),Rn=isNaN(ye.y);if(Vt||Rn){It=It/2+3,_t=_t/2+3;var qn=45<=Xe&&135>=Xe,Yn=225<=Xe&&315>=Xe;pe===Qa&&(qn||Yn)?(Ft.x=Rn?It:ye.y,Ft.y=Vt?_t:ye.x,qn?0<=se||isNaN(se)&&.5>he||!Vt||(Ft.y=-_t):Yn&&((0<=se||isNaN(se)&&.5>he)&&Vt&&(Ft.y=-_t),Rn&&(Ft.x=-It))):(Vt&&(Ft.x=0<=se||isNaN(se)&&.5>he?It:-It),Rn&&(Ft.y=-_t),Ft.rotate(Xe))}else Ft.rotate(Xe);Te+=Ft.x,Tt+=Ft.y,Je.pp(it),Ge+=it.x,jt+=it.y,se=lt.allocAt(Te+Ge,Tt+jt),ne.move(se),lt.free(se),lt.free(Ft),lt.free(bt),Jt.free(it),wr.free(Je)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),lt.free(b)}};function i1(a,y,x,b){if(_s(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof di&&a.type===Pn.Link&&a.adornedObject instanceof Fr&&(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 di&&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),Bo(b,!1)}}function Kp(){this.xa="Base"}tn(Kp,Wo),Kp.prototype.measure=function(a,y,x,b,E,te,ne){var se=a.Pb();a.graduatedBounds=[];var he=se.margin,pe=he.right+he.left,ye=he.top+he.bottom;se.measure(y,x,te,ne);var Te=se.measuredBounds,Ge=new Jt(-he.left,-he.top,Math.max(Te.width+pe,0),Math.max(Te.height+ye,0));a.graduatedBounds.push(Ge),E.assign(Ge);for(var Xe=se.geometry,Je=se.strokeWidth,it=Xe.flattenedSegments,Tt=Xe.flattenedLengths,bt=Xe.flattenedTotalLength,jt=it.length,Ft=0,It=0,_t=_n(),Vt=0;Vt<jt;Vt++){var Rn=it[Vt],qn=[];It=Ft=0;for(var Yn=Rn.length,En=0;En<Yn;En+=2){var hn=Rn[En],Mr=Rn[En+1];if(En!==0){var Pr=180*Math.atan2(Mr-It,hn-Ft)/Math.PI;0>Pr&&(Pr+=360),qn.push(Pr)}Ft=hn,It=Mr}_t.push(qn)}if(a.graduatedIntervals===null){for(var gi=[],Ui=a.O.s,$o=Ui.length,ea=0;ea<$o;ea++){var Ra=Ui[ea],Jo=[];if(gi.push(Jo),Ra.visible){var Nh=Ra.interval;if(!(0>Nh)){for(var Lo=0;Lo<$o;Lo++)if(Lo!==ea){var Gl=Ui[Lo];if(Gl.visible&&Ra.constructor===Gl.constructor){var _a=Gl.interval;_a>Nh&&Jo.push(_a)}}}}}a.graduatedIntervals=gi}var Ah=a.graduatedIntervals,Ws=a.O.s,ml=Ws.length,Ls=0,ys=0,mc=bt;a.graduatedMarks=[];for(var Ul,Qd=0;Qd<ml;Qd++){var Ns=Ws[Qd];if(Ul=[],Ns.visible&&Ns!==se){var za=Math.abs(Ns.interval),Ng=a.graduatedTickUnit;if(!(2>Ng*za*bt/a.graduatedRange&&Ns.graduatedSkip===null)){var Vf=Tt[0][0],ou=0,Ss=0;ys=bt*Ns.graduatedStart-1e-4,mc=bt*Ns.graduatedEnd+1e-4;var tf=Ng*za,As=a.graduatedTickBase;if(As<a.graduatedMin){var vc=(a.graduatedMin-As)/tf;vc=vc%1===0?vc:Math.floor(vc+1),As+=vc*tf}else As>a.graduatedMin+tf&&(As-=Math.floor((As-a.graduatedMin)/tf)*tf);for(var z0=Ah[Qd],Ag=As,Gy=1e-6*a.graduatedMax,Lu=1;As<=a.graduatedMax+Gy;Lu++){e:{for(var Xu=z0.length,Zf=0;Zf<Xu;Zf++){var yc=(As-a.graduatedTickBase)%(z0[Zf]*a.graduatedTickUnit),qd=1e-6*a.graduatedTickUnit;if(yc<qd&&yc>-qd){var Sc=!1;break e}}Sc=!0}if(Sc&&(As>a.graduatedMax&&(As=a.graduatedMax),Ns.graduatedSkip===null||Ns instanceof Vi&&!Ns.graduatedSkip(As,Ns)||Ns instanceof Fr&&!Ns.graduatedSkip(As,Ns))&&(Ls=(As-a.graduatedMin)*bt/a.graduatedRange,Ls>bt&&(Ls=bt),ys<=Ls&&Ls<=mc)){for(var Nu=_t[ou][Ss],jh=Tt[ou][Ss];ou<Tt.length;){for(;Ls>Vf&&Ss<Tt[ou].length-1;)Ss++,Nu=_t[ou][Ss],jh=Tt[ou][Ss],Vf+=jh;if(Ls<=Vf)break;ou++,Ss=0,Nu=_t[ou][Ss],jh=Tt[ou][Ss],Vf+=jh}var xs=it[ou],au=xs[2*Ss],G0=xs[2*Ss+1],Yu=(Ls-(Vf-jh))/jh,ep=new lt(au+(xs[2*Ss+2]-au)*Yu+Je/2-Xe.bounds.x,G0+(xs[2*Ss+3]-G0)*Yu+Je/2-Xe.bounds.y);ep.scale(se.scale,se.scale);e:{var Wl=Nu,nf=_t[ou];if(!(.5005>Yu&&.4995<Yu)){var su=Wl;if(.5>Yu?0<Ss?su=nf[Ss-1]:Gt.$(xs[0],xs[xs.length-2])&&Gt.$(xs[1],xs[xs.length-1])&&(su=nf[nf.length-1]):.5<Yu&&(Ss+1<nf.length?su=nf[Ss+1]:Gt.$(xs[0],xs[xs.length-2])&&Gt.$(xs[1],xs[xs.length-1])&&(su=nf[0])),Wl!==su){var Xf=Math.abs(Wl-su);if(180<Xf&&(Wl<su?Wl+=360:su+=360,Xf=Math.abs(Wl-su)),5e-4>Yu||.9995<Yu){Nu=(Wl+su)/2%360;break e}if(10>Xf){var tp=1-Math.abs(.5-Yu);Nu=(Wl*tp+su*(1-tp))%360;break e}}}Nu=Wl}if(Ns instanceof Vi){var Nl="";Ns.graduatedFunction!==null?(Nl=Ns.graduatedFunction(As,Ns),Nl=Nl!=null?Nl.toString():""):Nl=(+As.toFixed(2)).toString(),Nl!==""&&Ul.push({$l:ep,angle:Nu,text:Nl})}else Ul.push({$l:ep,angle:Nu})}As=Ag+Lu*tf}}}a.graduatedMarks.push(Ul)}Xn(_t);var ca=a.graduatedMarks;if(ca!==null)for(var jg=b.length,rs=0;rs<jg;rs++){var No=b[rs],is=ca[rs];if(No.visible&&No!==se&&is.length!==0){if(No instanceof Fr){var $u=a,Oh=E,rf=No.alignmentFocus;rf.Mc()&&(rf=mi);var Uy=No.angle;No.Kb=0,No.measure(1/0,1/0,0,0),No.Kb=Uy;var U0=No.measuredBounds,np=U0.width,of=U0.height,Yf=Jt.allocAt(0,0,np,of),ws=lt.alloc();ws.xi(Yf,rf),Jt.free(Yf);for(var Ju=-ws.x,Hl=-ws.y,rl=new Jt,xc=is.length,rp=0;rp<xc;rp++)for(var wc=is[rp],W0=wc.$l.x,ip=wc.$l.y,So=wc.angle,Al=0;4>Al;Al++){switch(Al){case 0:ws.h(Ju,Hl);break;case 1:ws.h(Ju+np,Hl);break;case 2:ws.h(Ju,Hl+of);break;case 3:ws.h(Ju+np,Hl+of)}ws.rotate(So+No.angle),ws.offset(W0,ip),rp===0&&Al===0?rl.h(ws.x,ws.y,0,0):rl.Ye(ws),ws.offset(-W0,-ip),ws.rotate(-So-No.angle)}lt.free(ws),$u.graduatedBounds!==null&&$u.graduatedBounds.push(rl),ni(Oh,rl.x,rl.y,rl.width,rl.height)}else if(No instanceof Vi){var vl=a,H0=E;vl.temporaryTextBlock===null&&(vl.temporaryTextBlock=new Vi);var js=vl.temporaryTextBlock;S1(js,No);var Fh=No.alignmentFocus;Fh.Mc()&&(Fh=mi);for(var yl=No.segmentOrientation,op=No.segmentOffset,Pc=new Jt,Og=0,ap=0,lu=0,af=0,bc=0,sp=is.length,Dh=0;Dh<sp;Dh++){var Au=is[Dh];Og=Au.$l.x,ap=Au.$l.y,lu=Au.angle,bc=af=No.angle,yl!==Qa&&(bc=yl===ng||yl===Jm?lu+No.angle:lu,af=kn.computeAngle(yl,bc)),js.Kb=af,js.text=Au.text||"",js.measure(1/0,1/0,0,0);var Bh=js.measuredBounds,Qu=js.naturalBounds,Ih=Qu.width,sf=Qu.height,Kl=wr.alloc();Kl.reset(),Kl.translate(-Bh.x,-Bh.y),Kl.scale(js.scale,js.scale),Kl.rotate(bc,Ih/2,sf/2),yl!==rg&&yl!==og||Kl.rotate(90,Ih/2,sf/2),yl!==ig&&yl!==ag||Kl.rotate(-90,Ih/2,sf/2),yl===Qm&&(45<lu&&135>lu||225<lu&&315>lu)&&Kl.rotate(-lu,Ih/2,sf/2);var $f=Jt.allocAt(0,0,Ih,sf),Rh=lt.alloc();Rh.xi($f,Fh),Kl.Ga(Rh);var Jf=-Rh.x,Wy=-Rh.y,qu=lt.alloc();qu.assign(op),isNaN(qu.x)&&(qu.x=Ih/2+3),isNaN(qu.y)&&(qu.y=-(sf/2+3)),qu.rotate(lu),Og+=qu.x+Jf,ap+=qu.y+Wy;var lf=new Jt(Og,ap,Bh.width,Bh.height),Fg=new Jt(Bh.x,Bh.y,Bh.width,Bh.height),Hy=new Jt(Qu.x,Qu.y,Qu.width,Qu.height);Au.Sz=af,Au.lineCount=js.lineCount,Au.lines=[js.Cb,js.Ih,js.df,js.Le,js.Qc,js.Qb,js.ze],Au.actualBounds=lf,Au.measuredBounds=Fg,Au.naturalBounds=Hy,Dh===0?Pc.assign(lf):Pc.ed(lf),lt.free(qu),lt.free(Rh),Jt.free($f),wr.free(Kl)}vl.graduatedBounds!==null&&vl.graduatedBounds.push(Pc),ni(H0,Pc.x,Pc.y,Pc.width,Pc.height)}Bo(No,!1)}}},Kp.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,pe=0;pe<he;pe++){var ye=y[pe];se=E[pe],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}}},Kp.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 ks,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,pe=a.graduatedMarks,ye=he.length,Te=0;Te<ye;Te++){var Ge=he[Te],Xe=pe[Te],Je=Xe.length;if(Ge.visible&&Ge!==te&&Xe.length!==0){if(Ge instanceof Fr){if(!(2>a.graduatedTickUnit*Ge.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ge.graduatedSkip===null)){var it=Ge.measuredBounds,Tt=Ge.strokeWidth*Ge.scale,bt=Ge.alignmentFocus;bt.Mc()&&(bt=mi);for(var jt=0;jt<Je;jt++){var Ft=Xe[jt].$l,It=Xe[jt].angle,_t=bt,Vt=Ge.Ab;Vt.reset(),Vt.translate(Ft.x+se.x,Ft.y+se.y),Vt.rotate(It+Ge.angle,0,0),Vt.translate(-it.width*_t.x+_t.offsetX+Tt/2,-it.height*_t.y+_t.offsetY+Tt/2),Vt.scale(Ge.scale,Ge.scale),cl(Ge,!1),Ge.wh.set(Ge.Ab),Ge.Kk=Ge.scale,Ys(Ge,!1),Ge.gc(y,x),E&&(a.svg.appendChild(Ge.svg),Ge.svg=null),Ge.Ab.reset()}}}else if(Ge instanceof Vi)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Vi),it=a.temporaryTextBlock,S1(it,Ge),Tt=0;Tt<Je;Tt++)bt=Xe[Tt],bt.actualBounds&&bt.measuredBounds&&bt.naturalBounds&&(it.ec=bt.text||"",it.Kb=bt.Sz||0,it.Gc=bt.lineCount||0,jt=bt.lines,jt!==void 0&&(it.Cb=jt[0],it.Ih=jt[1],it.df=jt[2],it.Le=jt[3],it.Qc=jt[4],it.Qb=jt[5],it.ze=jt[6]),bt.naturalBounds&&(it.dc=bt.naturalBounds),bt.actualBounds&&(jt=bt.actualBounds,it.arrange(jt.x,jt.y,jt.width,jt.height)),jt=bt.actualBounds,it.arrange(jt.x,jt.y,jt.width,jt.height),Ft=bt.measuredBounds,bt=bt.naturalBounds,It=it.Ab,It.reset(),It.translate(jt.x+se.x,jt.y+se.y),It.translate(-Ft.x,-Ft.y),it.no(It,bt.x,bt.y,bt.width,bt.height),cl(it,!1),it.wh.set(it.Ab),it.Kk=it.scale,Ys(it,!1),it.Ng=Ge.part,it.Me=Ge.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 Pn(a,y){if(zt.call(this),this.na=null,a===void 0)this.na=Pn.Position;else if(typeof a=="string"){var x=Cl.I(a);x!==null&&(this.na=x)}else a instanceof Wo?this.na=a:a&&(this.na=Pn.Position,y=a);this.na===null&&Ot("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Pn.Grid?1048576:0),this.O=new pn,this.yb=ta,this.Tm=Zo,this.Uf=Nr,this.$g=null,this.$e="",this.jg=new Jt(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=rr,this.jn=Si,this.kn=On,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}tn(Pn,zt),Pn.prototype.cloneProtected=function(a){zt.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Pn.prototype.Af=function(a){zt.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},Pn.prototype.copy=function(){var a=zt.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(wo,"elements",a,null,E,null,ne)}}return a}return null},et=Pn.prototype,et.toString=function(){return"Panel("+this.type.name+")#"+ei(this)},et.Pn=function(a){zt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},et.hh=function(a,y){if(this.na===Pn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Pn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Pn.Table)if(a.yc(),a instanceof ks){var x=a.yd;a.yd=um(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Pn.Spot)&&a.save();for(var 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 gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&bm(a,y,!0,x,!0),b!==null&&bm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&bm(a,y,!0,x,!1),b!==null&&bm(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 pe=b[he];if(pe!==void 0&&pe.actual!==0)if(se)se=!1;else{if(x){if(pe.position>ne.height)continue}else if(pe.position>ne.width)continue;var ye=pe.separatorStrokeWidth;isNaN(ye)&&(ye=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Te=pe.separatorStroke;if(Te===null&&(Te=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Te!==null){mo(a,y,Te,!1,!1,ne,te),Te=!1;var Ge=pe.separatorDashArray;Ge===null&&(Ge=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Ge!==null&&(Te=!0,y.js(Ge,0)),y.beginPath(),Ge=pe.position+ye,x?Ge>ne.height&&(ye-=Ge-ne.height):Ge>ne.width&&(ye-=Ge-ne.width),pe=pe.position+ye/2,y.lineWidth=ye,ye=a.yb,x?(pe+=ye.top,Ge=ne.width-ye.right,y.moveTo(ye.left,pe),y.lineTo(Ge,pe)):(pe+=ye.left,Ge=ne.height-ye.bottom,y.moveTo(pe,ye.top),y.lineTo(pe,Ge)),y.stroke(),y.Se(),Te&&y.fs()}}}}function bm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,se=a.naturalBounds,he=a1(a,!0),pe=a1(a,!1),ye=0;ye<te;ye++){var Te=b[ye];if(Te!==void 0&&Te.background!==null&&Te.coversSeparators!==E&&Te.actual!==0){var Ge=x?ne.height:ne.width;if(!(Te.position>Ge)){var Xe=Te.Wc(),Je=Te.separatorStrokeWidth;isNaN(Je)&&(Je=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var it=Te.separatorStroke;it===null&&(it=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(it===null||Te.index===(x?he:pe))&&(Je=0),Xe-=Je,Je=Te.position+Je,Xe+=Te.actual,Je+Xe>Ge&&(Xe=Ge-Je),0>=Xe||(Ge=a.yb,mo(a,y,Te.background,!0,!1,se,ne),x?y.fillRect(Ge.left,Je+Ge.top,ne.width-(Ge.left+Ge.right),Xe):y.fillRect(Je+Ge.left,Ge.top,Xe,ne.height-(Ge.top+Ge.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 mv(a){return a==="LineV"||a==="BarV"}et.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},et.kk=function(a,y,x){if(!zt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Pn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Pn.Grid||this.na===Pn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},et.nk=function(){return!0},et.$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 zt.prototype.$o.call(this,a,y,x,b)},et.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,pe=-ne.m12*se,ye=-ne.m21*se,Te=ne.m11*se,Ge=se*(ne.m21*ne.dy-ne.m22*ne.dx),Xe=se*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Gt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*he+y*ye+Ge,se=a*pe+y*Te+Xe,a=x*he+b*ye+Ge,he=x*pe+b*Te+Xe,E.h(0,0),x=this.naturalBounds,te=Gt.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,ye=pe=0,Te=1,Xe=Ge=0),se=a*he+y*ye+Ge,a=a*pe+y*Te+Xe,he=x*he+b*ye+Ge,x=x*pe+b*Te+Xe,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),pe=!1,Te=this.O.s,Xe=Te.length,ye=lt.alloc(),Ge=null,y=1/0;var Je=null,it=this.isClipping&&this.na===Pn.Spot;it&&(Je=lt.alloc(),Ge=this.Pb(),(pe=Ge.Sj(se,a,he,x,Je))&&(y=(se-Je.x)*(se-Je.x)+(a-Je.y)*(a-Je.y)));for(var Tt=0;Tt<Xe;Tt++){var bt=Te[Tt];bt.visible&&bt!==Ge&&bt.Sj(se,a,he,x,ye)&&(pe=!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(Je),lt.free(Je)),lt.free(ye),te&&E.transform(ne),pe},et.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();zt.prototype.Gj.call(this)},et.v=function(a){if(!_s(this)){zt.prototype.v.call(this,a),a=null,(this.na===Pn.Auto||this.na===Pn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var te=ss(E,!1);(E instanceof Ja||E instanceof Pn||E instanceof Vi||te!==fn)&&E.v(!0)}}}},et.Uj=function(){if(!_s(this)){Bo(this,!0),yu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},et.Uk=function(){if(!(this.l&2048)){cl(this,!0),Ys(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},et.Wu=function(){Ys(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},et.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 pe=this.O.s;pe.length!==0&&this.na.measure(this,a,y,pe,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),xi(E,a,he),xi(this.naturalBounds,a,he),this.Ge(0,0,a,he)},et.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 Ku(a){return a.part!==null?a.part.locationObject:null}et.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=ss(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=fn),a){case fn:(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 lr:this.v(!0),this.measure(x+se,te+ne,0,0);break;case vr:this.v(!0),this.measure(y+se,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},et.gh=function(a){var y=this.naturalBounds,x=Ku(this);if($i(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=lt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(Tn(E.set(a),te.transform),te.ca(E)))return lt.free(E),!0}return lt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},et.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},et.qm=function(a,y){if(y(this,a),a instanceof Pn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Zc(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 Pn&&s1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Pn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}et.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Pn){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}et.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Pn){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 Pn?x=Math.max(x,h1(E)):E instanceof Fr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}et.se=function(){return!(this.type===Pn.TableRow||this.type===Pn.TableColumn)};function xh(a){return a.type===Pn.TableRow||a.type===Pn.TableColumn}et.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Ya(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:Tn(lt.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,pe=5;if(se!==null&&(he=se.Ql("extraTouchArea"),pe=he/2),$i(-(pe*E),-(pe*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=lt.alloc(),pe=(he=this.isClipping&&this.na===Pn.Spot)?this.Pb():null,he&&(pe.se()?Tn(se.set(a),pe.transform):se.set(a),!pe.ca(se)))return lt.free(se),te||lt.free(ne),null;for(var Te=Ku(this);ye--;){var Ge=E[ye];if((Ge.visible||Ge===Te)&&(Ge.se()?Tn(se.set(a),Ge.transform):se.set(a),!he||Ge!==pe)){var Xe=null;if(Ge instanceof Pn?Xe=Ge.ic(se,y,x):Ge.pickable===!0&&Ge.ca(se)&&(Xe=Ge),Xe!==null&&(y!==null&&(Xe=y(Xe)),Xe!==null&&(x===null||x(Xe))))return lt.free(se),te||lt.free(ne),Xe}}lt.free(se)}return this.background===null&&this.areaBackground===null?(te||lt.free(ne),null):(a=$i(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||lt.free(ne),a)}return te||lt.free(ne),null},et.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:Tn(lt.allocAt(a.x,a.y),this.transform);if(E=$i(0,0,E.width,E.height,ne.x,ne.y),xh(this)||E){if(!this.isAtomic){for(var se=this.O.s,he=se.length,pe=lt.alloc(),ye=Ku(this);he--;){var Te=se[he];if(Te.visible||Te===ye){Te.se()?Tn(pe.set(a),Te.transform):pe.set(a);var Ge=Te;Te=Te instanceof Pn?Te:null,(Te!==null?Te.ji(pe,y,x,b):Ge.ca(pe))&&Ge.pickable!==!1&&(y!==null&&(Ge=y(Ge)),Ge===null||x!==null&&!x(Ge)||b.add(Ge))}}lt.free(pe)}return te||lt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||lt.free(ne),!1},et.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=wr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&wr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var se=Ku(this),he=this.O.s,pe=he.length;pe--;){var ye=he[pe];if(ye.visible||ye===se){var Te=ye.actualBounds,Ge=this.naturalBounds;Te.x>Ge.width||Te.y>Ge.height||0>Te.x+Te.width||0>Te.y+Te.height||(Te=ye,ye=ye instanceof Pn?ye:null,Ge=wr.alloc(),Ge.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,Ge):Yo(Te,a,b,Ge))&&(y!==null&&(Te=y(Te)),Te===null||x!==null&&!x(Te)||E.add(Te)),wr.free(Ge))}}return te===void 0&&wr.free(ne),b}return te===void 0&&wr.free(ne),!1};function vv(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 Pn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}et.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:Tn(lt.allocAt(a.x,a.y),this.transform),pe=se?y:Tn(lt.allocAt(y.x,y.y),this.transform),ye=he.Bf(pe),Te=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||In(he.x,he.y,0,0,0,ne.height)<=ye||In(he.x,he.y,0,ne.height,ne.width,ne.height)<=ye||In(he.x,he.y,ne.width,ne.height,ne.width,0)<=ye||In(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||(lt.free(he),lt.free(pe)),Te){if(!this.isAtomic){he=lt.alloc(),pe=lt.alloc(),ye=Ku(this);for(var Ge=this.O.s,Xe=Ge.length;Xe--;){var Je=Ge[Xe];if(Je.visible||Je===ye){var it=Je.actualBounds,Tt=this.naturalBounds;(!se||!(it.x>Tt.width||it.y>Tt.height||0>it.x+it.width||0>it.y+it.height))&&(Je.se()?(it=Je.transform,Tn(he.set(a),it),Tn(pe.set(y),it)):(he.set(a),pe.set(y)),it=Je,Je=Je instanceof Pn?Je:null,(Je!==null?Je.og(he,pe,x,b,E,te):it.tx(he,pe,E))&&(x!==null&&(it=x(it)),it===null||b!==null&&!b(it)||te.add(it)))}}lt.free(he),lt.free(pe)}return E?Te:ne}return!1};function yv(a){var y=null;return a instanceof Fr&&(y=a.spot1,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=$r),y}function Sv(a){var y=null;return a instanceof Fr&&(y=a.spot2,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ni),y}et.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},et.M=function(a){return this.O.M(a)},et.Gb=function(a,y){y instanceof hr&&Ot("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Ot("Cannot make a Panel contain itself: "+this.toString()),Ot("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Ot("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Pn.Grid||y instanceof Fr||Ot("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Pn.Graduated||y instanceof Fr||y instanceof Vi||Ot("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 Yt),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 Ot("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),_s(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Pn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Em(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(Eo,"elements",this,y,null,b,null),x.cb(wo,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}et.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)},et.mb=function(a){0<=a&&this.pc(a,!0)},et.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),Bo(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 Pn?b.qm(b,function(ne,se){Wv(te,se,y)}):Wv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(Eo,"elements",this,b,null,a,null))},et.Fb=function(a){0>a&&Dn(a,">= 0",Pn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(wo,"rowdefs",this,null,x,null,a)}return y[a]},et.oA=function(a){if(0>a&&Dn(a,">= 0",Pn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"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 Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Eb=function(a){0>a&&Dn(a,">= 0",Pn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(wo,"coldefs",this,null,x,null,a)}return y[a]},et.jA=function(a){if(0>a&&Dn(a,">= 0",Pn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"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 Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&km(y,a),this},et.Hy=function(a,y){return(a=this.Fb(a))&&km(a,new Io(y)),this},et.By=function(a,y){return(a=this.Eb(a))&&km(a,new Io(y)),this},et.nz=function(a){if(0>a||this.type!==Pn.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},et.fz=function(a){if(0>a||this.type!==Pn.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},et.Fz=function(a,y){if(y===void 0&&(y=new lt(NaN,NaN)),this.type!==Pn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},et.Gz=function(a){if(this.type!==Pn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function dl(a){var y=a.allBindings;if(y===null)a.data!==null&&Ot("Template cannot have .data be non-null: "+a),a.allBindings=y=new pn;else if(y._isFrozen)return;var x=new pn;xv(a,!1),a.qm(a,function(pe,ye){ye.th();var Te=ye.localBindings;if(Te!==null)for(Af(ye,!1),Te=Te.iterator;Te.next();){var Ge=Te.value;Ge.mode===pg&&Af(ye,!0);var Xe=Ge.sourceName;Xe!==null&&(Xe==="/"&&xv(pe,!0),Xe=TS(Ge,pe,ye),Xe!==null&&(x.add(Xe),Xe.srcBindings===null&&(Xe.srcBindings=new pn),Xe.srcBindings.add(Ge))),y.add(Ge)}if(ye instanceof Pn&&ye.type===Pn.Table){if(0<ye.rowCount){for(pe=ye.rowDefs,Te=pe.length,Ge=0;Ge<Te;Ge++)if(Xe=pe[Ge],Xe!==void 0&&Xe.be!==null)for(var Je=Xe.be.iterator;Je.next();){var it=Je.value;it.xd=Xe,it.to=2,it.wl=Xe.index,y.add(it)}}if(0<ye.columnCount){for(ye=ye.colDefs,pe=ye.length,Te=0;Te<pe;Te++)if(Ge=ye[Te],Ge!==void 0&&Ge.be!==null)for(Xe=Ge.be.iterator;Xe.next();)Je=Xe.value,Je.xd=Ge,Je.to=1,Je.wl=Ge.index,y.add(Je)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Af(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new pn),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 Pn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):Ln('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Io?(ne=ei(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof zt?(ne=ei(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Ot("Unknown type of binding target: "+te)}y.freeze(),a instanceof hr&&a.Zc()&&a.Va()}et.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Pn&&(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&&dl(y),y},et.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 Pn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},et.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 Pn&&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 Pn)||te.data!==y[ne])return!0;E++,ne++}return!1}function Vp(a){if(a.type===Pn.Spot||a.type===Pn.Auto)return Math.min(a.O.length,1);if(a.type===Pn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Fr&&b.isPanelMain))break}return x}return a.type===Pn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Pn&&xh(a))?1:0}et.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Vp(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++)Cm(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 Pn){if(ne.data!==te){var se=Pv(a,ne.data),he=Pv(a,te),pe=he!==se;pe||(se=bv(a,se),pe=bv(a,he)!==se),pe?(a.pc(b,!1),Cm(a,te,E,!1)):ne.data=te}}else Cm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),_s(a)||a.v(),a.graduatedIntervals=null,a.If()||Em(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 Cm(a,y,x,b){if(!(y==null||0>x)){var E=Pv(a,y);if(E=bv(a,E),E!==null){if(dl(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Yt),a.ge.add(y,E)),te=x+Vp(a),a.Gb(te,E),b&&(E.ub=y,wv(a,te,x),E.ub=null),E.data=y}}}function wv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Pn){var E=y,te=x;b.type===Pn.TableRow?b.row=E:b.type===Pn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function Pv(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=Co(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Ot("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function bv(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,Ln('No item template Panel found for category "'+y+'" on '+a),Ln(" Using default item template."),a=new Pn,y=new Vi,y.bind(new Mo("text","",zr)),a.add(y),m1=a),b=m1)),b}function Em(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Pn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Pn&&!te.isEnabled||Em(a,te,x)}}}function ru(a,y){y.name=a,Cl.add(a,y)}vn.Object.defineProperties(Pn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Pn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Dn(a,">= 0",Pn,"padding"),a=new Br(a)):(0>a.left&&Dn(a.left,">= 0",Pn,"padding:value.left"),0>a.right&&Dn(a.right,">= 0",Pn,"padding:value.right"),0>a.top&&Dn(a.top,">= 0",Pn,"padding:value.top"),0>a.bottom&&Dn(a.bottom,">= 0",Pn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:ta},set:function(a){typeof a=="number"&&(a=new Br(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Qs),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 Ei)&&(a instanceof Ei&&a.freeze(),this.T===null&&(this.T=new Qs),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 Qs),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)||Ot("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 Qs),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 Ei)&&(a instanceof Ei&&a.freeze(),this.T===null&&(this.T=new Qs),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 Qs),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)||Ot("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 Qs),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 Qs),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||Ot("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&eu(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()||Ot("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&eu(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 Vu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),pa(this)&&(a=this.part,a!==null&&eo(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new Vu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),pa(this)&&(a=this.part,a!==null&&eo(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new Vu),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 Vu),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 Vu,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 Vu,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 Vu,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 Vu,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 Qs),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Qs),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Mm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Qs),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Mm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Qs),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)&&Ot("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Qs),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)&&Ot("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Qs),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 hr&&!(this instanceof di);dl(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 hr&&(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 jf),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 Yt}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof hr||a.isPanelMain)&&Ot("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(););_r(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&&(_r(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 Lr&&(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&&Em(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))}}}),vn.Object.defineProperties(Pn,{Position:{get:function(){return Cl.I("Position")}},Horizontal:{get:function(){return Cl.I("Horizontal")}},Vertical:{get:function(){return Cl.I("Vertical")}},Spot:{get:function(){return Cl.I("Spot")}},Auto:{get:function(){return Cl.I("Auto")}},Table:{get:function(){return Cl.I("Table")}},Viewbox:{get:function(){return Cl.I("Viewbox")}},TableRow:{get:function(){return Cl.I("TableRow")}},TableColumn:{get:function(){return Cl.I("TableColumn")}},Link:{get:function(){return Cl.I("Link")}},Grid:{get:function(){return Cl.I("Grid")}},Graduated:{get:function(){return Cl.I("Graduated")}}}),Pn.prototype.rebuildItemElements=Pn.prototype.mv,Pn.prototype.findItemPanelForData=Pn.prototype.sx,Pn.prototype.updateTargetBindings=Pn.prototype.La,Pn.prototype.copyTemplate=Pn.prototype.Uy,Pn.prototype.graduatedValueForPoint=Pn.prototype.Gz,Pn.prototype.graduatedPointForValue=Pn.prototype.Fz,Pn.prototype.findColumnForLocalX=Pn.prototype.fz,Pn.prototype.findRowForLocalY=Pn.prototype.nz,Pn.prototype.addColumnDefinition=Pn.prototype.By,Pn.prototype.addRowDefinition=Pn.prototype.Hy,Pn.prototype.addRowColumnDefinition=Pn.prototype.Gy,Pn.prototype.removeColumnDefinition=Pn.prototype.jA,Pn.prototype.getColumnDefinition=Pn.prototype.Eb,Pn.prototype.removeRowDefinition=Pn.prototype.oA,Pn.prototype.getRowDefinition=Pn.prototype.Fb,Pn.prototype.removeAt=Pn.prototype.mb,Pn.prototype.remove=Pn.prototype.remove,Pn.prototype.insertAt=Pn.prototype.Gb,Pn.prototype.elt=Pn.prototype.M,Pn.prototype.add=Pn.prototype.add,Pn.prototype.findObject=Pn.prototype.fb,Pn.prototype.findInVisualTree=Pn.prototype.Nl,Pn.prototype.walkVisualTreeFrom=Pn.prototype.qm,Pn.prototype.findMainElement=Pn.prototype.Pb;var g1=!1,m1=null,Cl=new Yt;Pn.className="Panel",Pn.definePanelLayout=ru,ru("Position",new fm),ru("Vertical",new pm),ru("Auto",new mm),ru("Link",new Pm);function Vu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Vu.prototype.copy=function(){var a=new Vu;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},Vu.className="GradPanelSettings";function Qs(){this.Pc=[],this.Oc=[],this.j=this.ob=Mm,this.hb=this.Hb=0,this.Qp=ta,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Qs.prototype.copy=function(a){for(var y=new Qs,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},Qs.className="TablePanelSettings";function Io(a){xr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Zo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=Nr,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))}Io.prototype.copy=function(){var a=new Io;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=Bn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function km(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=Bn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}et=Io.prototype,et.qb=function(a){a.classType===Io&&(this.sizing=a)},et.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+ei(this)},et.wi=function(a){this.Me=a},et.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)},et.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Pn.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)},et.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(no,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 Tm(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Mo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Ot("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new pn),this.be.add(E),this},vn.Object.defineProperties(Io.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&&Dn(a,">= 0",Io,"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&&Dn(a,">= 0",Io,"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))&&Dn(a,">= 0",Io,"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&&Dn(a,">= 0",Io,"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 Br(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&&Ff(a,"RowColumnDefinition.separatorStroke"),a instanceof Ei&&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)||Ot("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&&Ff(a,"RowColumnDefinition.background"),a instanceof Ei&&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}}}),Io.prototype.computeEffectiveSpacing=Io.prototype.Wc,Io.prototype.computeEffectiveSpacingTop=Io.prototype.Io;var Cv=new Qt(Io,"Default",0),Zp=new Qt(Io,"None",1),Mm=new Qt(Io,"ProportionalExtra",2);Io.className="RowColumnDefinition",Io.Default=Cv,Io.None=Zp,Io.ProportionalExtra=Mm;function Fr(a,y){zt.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)}tn(Fr,zt),Fr.prototype.cloneProtected=function(a){zt.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=Bn(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 Xc(a){a.Na===null?a.Na=new Tv:a.Na.nc&&(a.Na=a.Na.copy())}et=Fr.prototype,et.th=function(){zt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},et.qb=function(a){a===fn||a===rr||a===Jr||a===Nr?this.geometryStretch=a:zt.prototype.qb.call(this,a)},et.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+ei(this)};function Nd(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],pe,ye,Te,Ge,Xe,Je,it=0,Tt=_n(),bt=2;bt<E;bt+=2)pe=x[bt],ye=x[bt+1],Te=pe-se,se=ye-he,Te===0&&(Te=.001),Ge=se/Te,Xe=Math.atan2(se,Te),Je=Math.sqrt(Te*Te+se*se),Tt.push([Te,Xe,Ge,Je]),it+=Je,se=pe,he=ye;se=x[0],he=x[1],Te=b.measuredBounds.width,b instanceof Fr&&(Te-=b.strokeWidth),1>Te&&(Te=1),E=x=Te,pe=ne/2,ye=pe!==0,bt=0,Je=Tt[bt],Te=Je[0],Xe=Je[1],Ge=Je[2],Je=Je[3];for(var jt=0;.1<=it;){if(jt===0&&(ye?(E=x,E-=pe,it-=pe,ye=!1):E=x,E===0&&(E=1)),E>it){Xn(Tt);return}E>Je?(jt=E-Je,E=Je):jt=0;var Ft=Math.sqrt(E*E/(1+Ge*Ge));if(0>Te&&(Ft=-Ft),se+=Ft,he+=Ge*Ft,a.translate(se,he),a.rotate(Xe),a.translate(-(ne/2),-(te/2)),jt===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Xe),a.translate(-se,-he),it-=E,Je-=E,jt!==0){if(bt++,bt===Tt.length){Xn(Tt);return}Je=Tt[bt],Te=Je[0],Xe=Je[1],Ge=Je[2],Je=Je[3],E=jt}}Xn(Tt)}}et.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&&mo(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===Pn.Link&&se instanceof di&&se.category==="Selection"&&se.adornedObject instanceof Fr&&se.adornedPart.Pb()===se.adornedObject?se.adornedObject.strokeWidth:0),he===0&&(x=null),x!==null&&he!==0&&(mo(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===Cn.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===Cn.u){var pe=E.startX;he=E.startY;var ye=E.endX,Te=E.endY;E=Math.min(pe,ye);var Ge=Math.min(he,Te);pe=Math.abs(ye-pe),he=Math.abs(Te-he),a.beginPath(),a.rect(E,Ge,pe,he),b!==null&&a.ng(b),x!==null&&(se&&te&&Su(a),a.jk(),se&&te&&Uu(a)),a.Se()}else if(E.type===Cn.F)pe=E.startX,he=E.startY,ye=E.endX,Te=E.endY,E=Math.abs(ye-pe)/2,Ge=Math.abs(Te-he)/2,pe=Math.min(pe,ye)+E,he=Math.min(he,Te)+Ge,a.beginPath(),a.moveTo(pe,he-Ge),a.bezierCurveTo(pe+Gt.wg*E,he-Ge,pe+E,he-Gt.wg*Ge,pe+E,he),a.bezierCurveTo(pe+E,he+Gt.wg*Ge,pe+Gt.wg*E,he+Ge,pe,he+Ge),a.bezierCurveTo(pe-Gt.wg*E,he+Ge,pe-E,he+Gt.wg*Ge,pe-E,he),a.bezierCurveTo(pe-E,he-Gt.wg*Ge,pe-Gt.wg*E,he-Ge,pe,he-Ge),a.closePath(),b!==null&&a.ng(b),x!==null&&(se&&te&&Su(a),a.jk(),se&&te&&Uu(a)),a.Se();else if(E.type===Cn.o)for(E=E.figures,he=E.length,Ge=0;Ge<he;Ge++){pe=E.s[Ge],a.beginPath(),a.moveTo(pe.startX,pe.startY),ye=pe.segments.s,Te=ye.length;for(var Xe=null,Je=0;Je<Te;Je++){var it=ye[Je];switch(it.type){case Fo:a.moveTo(it.endX,it.endY);break;case zi:a.lineTo(it.endX,it.endY);break;case Go:a.bezierCurveTo(it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY);break;case ps:a.quadraticCurveTo(it.point1X,it.point1Y,it.endX,it.endY);break;case xo:if(it.radiusX===it.radiusY){var Tt=Math.PI/180;a.arc(it.point1X,it.point1Y,it.radiusX,it.startAngle*Tt,(it.startAngle+it.sweepAngle)*Tt,0>it.sweepAngle,Xe!==null?Xe.endX:pe.startX,Xe!==null?Xe.endY:pe.startY)}else if(Xe=Ua(it,pe),Tt=Xe.length,Tt===0)a.lineTo(it.centerX,it.centerY);else for(var bt=0;bt<Tt;bt++){var jt=Xe[bt];bt===0&&a.lineTo(jt[0],jt[1]),a.bezierCurveTo(jt[2],jt[3],jt[4],jt[5],jt[6],jt[7])}break;case Cs:if(bt=Tt=0,Xe!==null&&Xe.type===xo){if(Xe=Ua(Xe,pe),jt=Xe.length,jt===0){a.lineTo(it.endX,it.endY);break}Xe=Xe[jt-1]||null,Xe!==null&&(Tt=Xe[6],bt=Xe[7])}else Tt=Xe!==null?Xe.endX:pe.startX,bt=Xe!==null?Xe.endY:pe.startY;if(Xe=Ds(it,pe,Tt,bt),Tt=Xe.length,Tt===0){a.lineTo(it.endX,it.endY);break}for(bt=0;bt<Tt;bt++)jt=Xe[bt],a.bezierCurveTo(jt[2],jt[3],jt[4],jt[5],jt[6],jt[7]);break;default:Ot("Segment not of valid type: "+it.type)}it.isClosed&&a.closePath(),Xe=it}ye=pe.isFilled,te?pe.isShadowed?(ye===!0&&b!=="transparent"&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&(ye&&se&&Su(a),a.jk(),ye&&se&&Uu(a))):(Su(a),ye&&b!=="transparent"&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&a.jk(),Uu(a)):(ye&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&a.jk()),a.Se(Ge)}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=_n(),te.type===Cn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),Nd(a,y,b,x);else if(te.type===Cn.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,Ge=E,pe=se.segments.s,ye=pe.length,Te=0;Te<ye;Te++){switch(Je=pe[Te],Je.type){case Fo:Nd(a,y,b,x),b.length=0,b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY,he=ne,Ge=E;break;case zi:b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY;break;case Go:Gt.Qe(ne,E,Je.point1X,Je.point1Y,Je.point2X,Je.point2Y,Je.endX,Je.endY,.5,b),ne=Je.endX,E=Je.endY;break;case ps:Gt.ep(ne,E,Je.point1X,Je.point1Y,Je.endX,Je.endY,.5,b),ne=Je.endX,E=Je.endY;break;case xo:if(it=Ua(Je,se),Xe=it.length,Xe===0){b.push(Je.centerX),b.push(Je.centerY),ne=Je.centerX,E=Je.centerY;break}for(Tt=0;Tt<Xe;Tt++)bt=it[Tt],Gt.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 Cs:if(it=Ds(Je,se,ne,E),Xe=it.length,Xe===0){b.push(Je.endX),b.push(Je.endY),ne=Je.endX,E=Je.endY;break}for(Tt=0;Tt<Xe;Tt++)bt=it[Tt],Gt.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:Ot("Segment not of valid type: "+Je.type)}Je.isClosed&&(b.push(he),b.push(Ge),Nd(a,y,b,x))}Nd(a,y,b,x)}else if(te.type===Cn.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),Nd(a,y,b,x);else if(te.type===Cn.F){if(E=new Oo,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new fi(xo),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=Ua(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++)Ge=te[he],Gt.Qe(ne,E,Ge[2],Ge[3],Ge[4],Ge[5],Ge[6],Ge[7],.5,b),ne=Ge[6],E=Ge[7];Nd(a,y,b,x)}Xn(b),a.restore(),a.Vc(!1)}}}},et.kk=function(a,y,x){return!zt.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)},et.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:zt.prototype.nk.call(this,a)},et.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)}},et.ga=function(a,y){if(y===void 0&&(y=new lt),a instanceof er){a.Mc()&&Ot("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},et.mi=function(a){a===void 0&&(a=new Jt);var y=this.naturalBounds,x=this.oe;y=Jt.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=lt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),ni(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),ni(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),ni(a,b.x,b.y,0,0),Jt.free(y),lt.free(b),a},et.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!==Cn.j||y||(E+=2);var te=Jt.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return Jt.free(te),!1;if(b=E+1e-4,x.type===Cn.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:(Jt.free(te),Gt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Cn.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 Jt.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),Jt.free(te),a}if(x.type===Cn.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 Jt.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),Jt.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Cn.o)return Jt.free(te),this.fill===null?Fs(x,a.x,a.y,E):Qo(x,a,E,1<this.strokeWidth,y);Ot("Unknown Geometry type: "+x.type)},et.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=kv[se];if(he===void 0){var pe=Gt.Ze[se];typeof pe=="string"&&(pe=Gt.Ze[pe]),typeof pe=="function"?(he=pe(null,100,100),kv[se]=he):Ot("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,pe=ne.width;var ye=ne.height;switch(ss(this,!0)){case fn:b=x=0;break;case xn:pe=Math.max(a-te,0),ye=Math.max(y-te,0);break;case lr:pe=Math.max(a-te,0),b=0;break;case vr:x=0,ye=Math.max(y-te,0)}isFinite(E.width)&&(pe=E.width),isFinite(E.height)&&(ye=E.height);var Te=this.maxSize,Ge=this.minSize;switch(x=Math.max(x-te,Ge.width),b=Math.max(b-te,Ge.height),pe=Math.min(Te.width,pe),ye=Math.min(Te.height,ye),pe=isFinite(pe)?Math.max(x,pe):Math.max(se,x),ye=isFinite(ye)?Math.max(b,ye):Math.max(he,b),x=Ev(this),x){case fn:break;case xn:se=pe,he=ye;break;case rr:x=Math.min(pe/se,ye/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:Ot(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&&Gt.$(this.ua.Sk,a-te)&&Gt.$(this.ua.Rk,y-te)||(this.ua=Fr.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),pe+te,ye+te),E.w()?(pe=E.width,ye=E.height,pe=Math.min(Te.width,pe),ye=Math.min(Te.height,ye),pe=Math.max(Ge.width,pe),ye=Math.max(Ge.height,ye),this.dc.h(0,0,pe,ye)):this.dc.assign(ne)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===Nr?xn:y:y===Nr?kv[a.figure].defaultStretch:y}et.eh=function(a,y,x,b){Ia(this,a,y,x,b)},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.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,pe=-te.m21*ne,ye=te.m11*ne,Te=ne*(te.m21*te.dy-te.m22*te.dx),Ge=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*pe+Te,ne=a*he+y*ye+Ge,se=x*se+b*pe+Te,he=x*he+b*ye+Ge,Te=this.ig/2,pe=this.ua,pe===null&&(this.measure(1/0,1/0),pe=this.ua);var Xe=pe.bounds;if(ye=!1,pe.type===Cn.j)if(1.5>=this.strokeWidth)ye=Gt.Ve(pe.startX,pe.startY,pe.endX,pe.endY,te,ne,se,he,E);else{if(pe.startX===pe.endX?(b=Te,ye=0):(y=(pe.endY-pe.startY)/(pe.endX-pe.startX),ye=Te/Math.sqrt(1+y*y),b=ye*y),y=_n(),a=new lt,Gt.Ve(pe.startX+b,pe.startY+ye,pe.endX+b,pe.endY+ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.startX-b,pe.startY-ye,pe.endX-b,pe.endY-ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.startX+b,pe.startY+ye,pe.startX-b,pe.startY-ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.endX+b,pe.endY+ye,pe.endX-b,pe.endY-ye,te,ne,se,he,a)&&y.push(a),se=y.length,se===0)return Xn(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);Xn(y)}else if(pe.type===Cn.u)ye=Gt.Ff(Xe.x-Te,Xe.y-Te,Xe.x+Xe.width+Te,Xe.y+Xe.height+Te,te,ne,se,he,E);else if(pe.type===Cn.F){y=Jt.allocAt(Xe.x,Xe.y,Xe.width,Xe.height).Bc(Te,Te);e:if(y.width===0)ye=Gt.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)ye=Gt.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,se,he,E);else{if(a=y.width/2,pe=y.height/2,b=y.x+a,ye=y.y+pe,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+pe*pe-he*he){E.x=NaN,E.y=NaN,ye=!1;break e}Te=Math.sqrt(a*a*x*x+pe*pe-he*he),se=(-(a*a*x*he)+a*pe*Te)/(pe*pe+a*a*x*x)+b,a=(-(a*a*x*he)-a*pe*Te)/(pe*pe+a*a*x*x)+b,pe=x*(se-b)+he+ye,he=x*(a-b)+he+ye,Math.abs((te-se)*(te-se))+Math.abs((ne-pe)*(ne-pe))<Math.abs((te-a)*(te-a))+Math.abs((ne-he)*(ne-he))?(E.x=se,E.y=pe):(E.x=a,E.y=he)}else{if(se=pe*pe,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}Jt.free(y)}else if(pe.type===Cn.o){Ge=lt.alloc();var Je=se-te,it=he-ne,Tt=Je*Je+it*it,bt=te,jt=ne;if(0<Tt&&Xe.contains(bt,jt)&&(Ge.x=bt,Ge.y=jt,this.ca(Ge)))for(Je!==0&&.5>Math.abs(Je)?(it*=.5/Je,Je=.5):it!==0&&.5>Math.abs(it)&&(Je*=.5/it,it=.5),bt-=Je,jt-=it;Xe.contains(bt,jt);)bt-=Je,jt-=it;for(E.x=se,E.y=he,it=0;it<pe.figures.count;it++){var Ft=pe.figures.s[it],It=Ft.isFilled?bt:te,_t=Ft.isFilled?jt:ne,Vt=Ft.segments;Xe=Ft.startX,Je=Ft.startY;for(var Rn=Xe,qn=Je,Yn=0;Yn<Vt.count;Yn++){var En=Vt.s[Yn],hn=En.type,Mr=En.endX,Pr=En.endY,gi=!1;switch(hn){case Fo:Rn=Mr,qn=Pr;break;case zi:gi=Nm(Xe,Je,Mr,Pr,It,_t,se,he,Ge);break;case Go:gi=Gt.Eo(Xe,Je,En.point1X,En.point1Y,En.point2X,En.point2Y,Mr,Pr,It,_t,se,he,.6,Ge);break;case ps:gi=Gt.Eo(Xe,Je,Xe+2/3*(En.point1X-Xe),Je+2/3*(En.point1Y-Je),Mr+2/3*(En.point1X-Mr),Pr+2/3*(En.point1Y-Pr),Mr,Pr,It,_t,se,he,.6,Ge);break;case xo:case Cs:hn=En.type===xo?Ua(En,Ft):Ds(En,Ft,Xe,Je);var Ui=hn.length;if(Ui===0){gi=Nm(Xe,Je,En.type===xo?En.centerX:En.endX,En.type===xo?En.centerY:En.endY,It,_t,se,he,Ge);break}for(Pr=null,Mr=0;Mr<Ui;Mr++){if(Pr=hn[Mr],Mr===0&&Nm(Xe,Je,Pr[0],Pr[1],It,_t,se,he,Ge)){var $o=Lm(It,_t,Ge,Tt,E);$o<Tt&&(Tt=$o,ye=!0)}Gt.Eo(Pr[0],Pr[1],Pr[2],Pr[3],Pr[4],Pr[5],Pr[6],Pr[7],It,_t,se,he,.6,Ge)&&($o=Lm(It,_t,Ge,Tt,E),$o<Tt&&(Tt=$o,ye=!0))}Mr=Pr[6],Pr=Pr[7];break;default:Ot("Unknown Segment type: "+hn)}Xe=Mr,Je=Pr,gi&&(gi=Lm(It,_t,Ge,Tt,E),gi<Tt&&(Tt=gi,ye=!0)),En.isClosed&&(Mr=Rn,Pr=qn,Nm(Xe,Je,Mr,Pr,It,_t,se,he,Ge)&&(En=Lm(It,_t,Ge,Tt,E),En<Tt&&(Tt=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*Te,E.y-=ne*Te,lt.free(Ge)}else Ot("Unknown Geometry type: "+pe.type);return ye?(this.transform.Ga(E),!0):!1};function Lm(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 Nm(a,y,x,b,E,te,ne,se,he){if(Gt.$(a,x)&&Gt.$(y,b)||Gt.$(E,ne)&&Gt.$(te,se))return!1;var pe=!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||Gt.$(he.y,a))&&(he.y<y||Gt.$(he.y,y))&&(pe=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||Gt.$(he.x,y))&&(he.x<a||Gt.$(he.x,a))&&(pe=!0)),pe)}et.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=lt.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)))),lt.free(te),E},et.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=wr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=lt.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 lt.free(ne),!0;var se=lt.alloc(),he=lt.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,Yc(this,ne,se,he)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),Yc(this,ne,se,he)?y=!0:(se.x=b,se.y=a,se.transform(x),Yc(this,ne,se,he)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),Yc(this,ne,se,he)&&(y=!0)))),lt.free(ne),wr.free(x),lt.free(se),lt.free(he),y};function Yc(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)}et.tx=function(a,y,x){function b(Tt,bt){for(var jt=Tt.length,Ft=0;Ft<jt;Ft+=2)if(bt.zd(Tt[Ft],Tt[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,pe=ne.x+ne.width;if(ne=ne.y+ne.height,Nn(a.x,a.y,se,he)<=E&&Nn(a.x,a.y,pe,he)<=E&&Nn(a.x,a.y,se,ne)<=E&&Nn(a.x,a.y,pe,ne)<=E)return!0}if(se=y.startX,he=y.startY,pe=y.endX,ne=y.endY,y.type===Cn.j){if(x=(se-pe)*(a.x-pe)+(he-ne)*(a.y-ne),In(a.x,a.y,se,he,pe,ne)<=(0<=(pe-se)*(a.x-se)+(ne-he)*(a.y-he)&&0<=x?E:te))return!0}else{if(y.type===Cn.u)return y=!1,x&&(y=In(a.x,a.y,se,he,se,ne)<=E||In(a.x,a.y,se,he,pe,he)<=E||In(a.x,a.y,pe,he,pe,ne)<=E||In(a.x,a.y,se,ne,pe,ne)<=E),y;if(y.type===Cn.F){y=a.x-(se+pe)/2,te=a.y-(he+ne)/2;var ye=Math.abs(pe-se)/2,Te=Math.abs(ne-he)/2;if(ye===0||Te===0)return In(a.x,a.y,se,he,pe,ne)<=E;if(x){if(a=Gt.$y(ye,Te,y,te),a*a<=E)return!0}else return!(Nn(y,te,-ye,0)>=E||Nn(y,te,0,-Te)>=E||Nn(y,te,0,Te)>=E||Nn(y,te,ye,0)>=E)}else if(y.type===Cn.o){if(pe=y.bounds,te=pe.x,se=pe.y,he=pe.x+pe.width,pe=pe.y+pe.height,a.x>he&&a.x<te&&a.y>pe&&a.y<se&&In(a.x,a.y,te,se,te,pe)>E&&In(a.x,a.y,te,se,he,se)>E&&In(a.x,a.y,he,pe,te,pe)>E&&In(a.x,a.y,he,pe,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?Fs(y,a.x,a.y,te):Qo(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,pe=0;pe<he;pe++)switch(Te=se[pe],Te.type){case Fo:case zi:if(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E)return!1;break;case Go:var Ge=_n();if(Gt.Qe(ne,ye,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.8,Ge),ne=b(Ge,a),Xn(Ge),ne||(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E))return!1;break;case ps:if(Ge=_n(),Gt.ep(ne,ye,Te.point1X,Te.point1Y,Te.endX,Te.endY,.8,Ge),ne=b(Ge,a),Xn(Ge),ne||(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E))return!1;break;case xo:case Cs:Ge=Te.type===xo?Ua(Te,te):Ds(Te,te,ne,ye);var Xe=Ge.length;if(Xe===0){if(ne=Te.type===xo?Te.centerX:Te.endX,ye=Te.type===xo?Te.centerY:Te.endY,a.zd(ne,ye)>E)return!1;break}Te=null;for(var Je=_n(),it=0;it<Xe;it++)if(Te=Ge[it],Je.length=0,Gt.Qe(Te[0],Te[1],Te[2],Te[3],Te[4],Te[5],Te[6],Te[7],.8,Je),b(Je,a))return Xn(Je),!1;Xn(Je),Te!==null&&(ne=Te[6],ye=Te[7]);break;default:Ot("Unknown Segment type: "+Te.type)}}return!0}}}return!1},et.qc=function(){this.ua=null},et.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=ng,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=aa):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new er(1-aa.x,aa.y)))}Fr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=wu[a.toArrow];else a.fromArrow!=="None"?b=wu[a.fromArrow]:(b=Gt.Ze[a.figure],typeof b=="string"&&(b=Gt.Ze[b]),b===void 0&&Ot("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Gt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=wu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=wu[x],y===void 0){var b=null,E;for(E in Gt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Cn.parse(Gt.um[b],!1),wu[b]=a,x!==b&&(wu[x]=b),b}}return typeof y=="string"?y:y instanceof Cn?a:null}vn.Object.defineProperties(Fr.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),pa(this)&&(a=this.part,a!==null&&eo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Cn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=lt.allocAt(-y.x,-y.y),lt.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&&Ff(a,"Shape.fill"),a instanceof Ei&&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&&Ff(a,"Shape.stroke"),a instanceof Ei&&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 Dn(a,"value >= 0",Fr,"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"?Dn(a,'"butt", "round", or "square"',Fr,"strokeCap"):(Xc(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"?Dn(a,'"miter", "bevel", or "round"',Fr,"strokeJoin"):(Xc(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){Xc(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)||Ot("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&&(Xc(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=Gt.Ze[a];typeof x=="function"?x=a:(x=Gt.Ze[a.toLowerCase()])||Ot("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?Ot("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),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?Ot("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),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:Zo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Xc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Zo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Xc(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&&(Xc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Nr},set:function(a){var y=this.geometryStretch;y!==a&&(Xc(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 Pu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&eu(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 Pu),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 Pu),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 Pu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Fr.prototype.intersectsRect=Fr.prototype.Yc,Fr.prototype.containedInRect=Fr.prototype.fh,Fr.prototype.getNearestIntersectionPoint=Fr.prototype.rs,Fr.prototype.getDocumentBounds=Fr.prototype.mi,Fr.prototype.getDocumentPoint=Fr.prototype.ga;var wu=new Hn,kv=new Hn;Fr.className="Shape",Fr.getFigureGenerators=function(){var a=new Yt,y;for(y in Gt.Ze)y!==y.toLowerCase()&&a.add(y,Gt.Ze[y]);return a.freeze(),a},Fr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a},Fr.getArrowheadGeometries=function(){var a=new Yt;for(b in Gt.um)if(wu[b]===void 0){var y=Cn.parse(Gt.um[b],!1);wu[b]=y,y=b.toLowerCase(),y!==b&&(wu[y]=b)}for(var x in wu)if(x!==x.toLowerCase()){var b=wu[x];b instanceof Cn&&a.add(x,b)}return a.freeze(),a},Fr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Cn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Ot("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=wu;b[a]=x,b[y]=a};function Tv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Nr,this.gg=this.fg=Zo}Tv.prototype.copy=function(){var a=new Tv;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 Vi(a,y){return zt.call(this),Dm||(ls=po?new fl(null).context:null,Dm=!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}tn(Vi,zt),Vi.prototype.cloneProtected=function(a){zt.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 iu(a){a.da===null?a.da=new Fv:a.da.nc&&(a.da=a.da.copy())}et=Vi.prototype,et.th=function(){zt.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}et.qb=function(a){a.classType===Vi?this.wrap=a:zt.prototype.qb.call(this,a)},et.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},et.v=function(){zt.prototype.v.call(this)},et.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=Yp(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 pe=this.isStrikethrough;mo(this,a,this.xc,!0,!1,x,b),(he||pe)&&mo(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ye=this.oe,Te=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var Ge=y.scale;switch(8>(Te*Te+ye*ye)*Ge*Ge&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ks&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Te=this.spacingBelow,this.flip){case si:a.translate(E,0),a.scale(-1,1);break;case Gr: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,Ge=(y+ne+Te)*ye,te>Ge&&(b=this.verticalAlignment,b=b.y*te-b.y*Ge+b.offsetY),ye===1&&this.ze!==null)Te=this.Cb,Te>E&&(Te=E),this.Oj(this.ze,a,0,b+y,E,ne,Te,x,se,he,pe);else if(this.Qc!==null&&this.Qb!==null)for(Ge=0;Ge<ye;Ge++){var Xe=this.Qc[Ge];Xe>E&&(Xe=E),b+=y,this.Oj(this.Qb[Ge],a,0,b,E,ne,Xe,x,se,he,pe),b+=ne+Te}switch(this.flip){case si:a.scale(-1,1),a.translate(-E,0);break;case Gr:a.scale(1,-1),a.translate(0,-te);break;case ji:a.scale(-1,-1),a.translate(-E,-te)}}},et.Oj=function(a,y,x,b,E,te,ne,se,he,pe,ye){var Te=0;if(se)he==="left"?Te=0:he==="right"?Te=E-ne:he==="center"&&(Te=(E-ne)/2),y.fillRect(x+Te,b+.25*te,ne,1);else{if(he==="left"?Te=0:he==="right"?Te=E:he==="center"&&(Te=E/2),E=Am!==null?Am(this,te):.75*te,y.fillText(a,x+Te,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Te-=ne:he==="center"&&(Te-=ne/2),pe){se=jm!==null?jm(this,te):.8*te,he=x+Te,pe=b+se,E=x+Te+ne,se=b+se;var Ge=a;y.beginPath(),y.lineWidth=Ge,y.moveTo(he,pe),y.lineTo(E,se),y.stroke(),y.Se(),y instanceof ks&&y.ad.classList.add("gojs-td")}ye&&(ye=b+te-te/2.2|0,a%2!==0&&(ye+=.5),b=x+Te,te=ye,x=x+Te+ne,ne=ye,Te=a,y.beginPath(),y.lineWidth=Te,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof ks&&y.ad.classList.add("gojs-td"))}},et.kk=function(a,y,x){if(!zt.prototype.kk.call(this,a,y,x))return!1;if(mo(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x<y.length;x++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},et.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:zt.prototype.nk.call(this,a)},et.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)}},et.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;ls!==null&&k1!==te&&(k1=ls.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 pe=te.indexOf(`
`,se);pe===-1&&(pe=te.length,he=!0),se=te.substr(se,pe-se),this.formatting===$p&&(se=se.trim()),ne=Math.max(ne,El(se)),se=pe+1}te=ne}else ne=te.indexOf(`
`,0),0<=ne&&(te=te.substr(0,ne)),te=El(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===Om&&(y=this.Ae,y=this.overflow===Om?x1(y):0,pe=this.spacingAbove+this.spacingBelow,pe=Math.max(0,Yp(this)+pe),he=Math.min(this.maxLines-1,Math.max(Math.floor(he/pe+.01)-1,0)),!(he+1>=this.Qb.length))){for(this.l|=16777216,pe=this.Qb[he],y=Math.max(1,a-y);El(pe)>y&&1<pe.length;)pe=pe.substr(0,pe.length-1);pe+=Jp,y=El(pe),this.Qb[he]=pe,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===P1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),xi(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},et.eh=function(a,y,x,b){Ia(this,a,y,x,b)};function Xp(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Mv(a,y,x,b){var E=a.formatting===$p;E&&(y=y.trim());var te=0,ne=a.Ae,se=a.spacingAbove+a.spacingBelow;se=Math.max(0,Yp(a)+se);var he=a.overflow===Om?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,se);else if(ne=y,a.wrap===Lv){a.Le=1;var pe=El(y);if(he===0||pe<=x)a.Cb=Math.max(a.Cb,pe),Xp(a,y,a.Cb),b!==null&&b.h(pe,se);else{for(te=Ad(a,ne),ne=ne.substr(te.length),y=Ad(a,ne),pe=El(te+y);0<y.length&&pe<=x;)te+=y,ne=ne.substr(y.length),y=Ad(a,ne),pe=te+y,E&&(pe=pe.trim()),pe=El(pe);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);El(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=Jp;var ye=El(te);a.Cb=ye,Xp(a,te,ye),b!==null&&b.h(ye,se)}}else{for(he=0,ne.length===0&&(he=1,Xp(a,ne,0));0<ne.length;){for(y=Ad(a,ne),ne=ne.substr(y.length);El(y)>x;){var Te=1;for(pe=El(y.substr(0,Te)),ye=0;pe<=x;)Te++,ye=pe,pe=El(y.substr(0,Te));if(Te===1){var Ge=pe;te=Math.max(te,pe)}else Ge=ye,te=Math.max(te,ye);if(Te--,1>Te&&(Te=1),Xp(a,y.substr(0,Te),Ge),he++,y=y.substr(Te),a.Gc+he>a.maxLines)break}for(ye=Ad(a,ne),pe=El(y+ye);0<ye.length&&pe<=x;)y+=ye,ne=ne.substr(ye.length),ye=Ad(a,ne),pe=y+ye,E&&(pe=pe.trim()),pe=El(pe);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ye.length===0?(Te=pe,te=Math.max(te,pe)):(Te=ye=El(y),te=Math.max(te,ye)),Xp(a,y,Te),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 Ad(a,y){if(a.wrap===b1)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 El(a){return ls===null?8*a.length:ls.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if(ls===null){var x=16;return a.df=x}return jv[y]!==void 0&&5e3>E1?x=jv[y]:(x=1.3*ls.measureText("M").width,jv[y]=x,E1++),a.df=x}function x1(a){if(ls===null)return 6;if(Fm[a]!==void 0&&5e3>Ov)var y=Fm[a];else y=ls.measureText(Jp).width,Fm[a]=y,Ov++;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,Yp(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!==Lv){a.Le=0;var he=ln.alloc();Mv(a,te,y,he),E+=he.height,ln.free(he),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(se=!0)}te=ne+1}return a.Lq=E}vn.Object.defineProperties(Vi.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"||(iu(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:fn},set:function(a){var y=this.flip;y!==a&&(iu(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Zl},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),iu(this),this.da.Yr=a,Xa(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=ln.alloc();Mv(this,this.ec,999999,a);var y=a.width;ln.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),xi(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:Nv},set:function(a){var y=this.wrap;y!==a&&(iu(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(iu(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&&Ff(a,"TextBlock.stroke"),a instanceof Ei&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(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&&(iu(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&&(iu(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 Pu),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 Pu),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 Pu),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 Pu),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 Pu),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&&(iu(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&&(iu(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&&(iu(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&&(iu(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:$p},set:function(a){var y=this.formatting;y!==a&&(iu(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&&Dn(a,"> 0",Vi,"maxLines"),iu(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 Am=null,jm=null,Lv=new Qt(Vi,"None",0),P1=new Qt(Vi,"WrapFit",1),Nv=new Qt(Vi,"WrapDesiredSize",2),b1=new Qt(Vi,"WrapBreakAll",3),Av=new Qt(Vi,"OverflowClip",0),Om=new Qt(Vi,"OverflowEllipsis",1),$p=new Qt(Vi,"FormatTrim",0),C1=new Qt(Vi,"FormatNone",0),xx=/[ \u200b\u00ad]/,jv=new Hn,E1=0,Fm=new Hn,Ov=0,Jp="...",k1="",ls=null,Dm=!1;Vi.className="TextBlock";function Fv(){this.nc=!1,this.Hd=null,this.Xf=fn,this.gq=$p,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Zl,this.$r=Nv}Fv.prototype.copy=function(){var a=new Fv;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},Vi.getEllipsis=function(){return Jp},Vi.setEllipsis=function(a){Jp=a,Fm=new Hn,Ov=0},Vi.getBaseline=function(){return Am},Vi.setBaseline=function(a){Am=a},Vi.getUnderline=function(){return jm},Vi.setUnderline=function(a){jm=a},Vi.isValidFont=function(a){if(Dm||(ls=po?new fl(null).context:null,Dm=!0),ls===null)return!0;var y=ls.font;if(a===y||a==="10px sans-serif")return!0;ls.font="10px sans-serif",ls.font=a;var x=ls.font;if(x!=="10px sans-serif")return ls.font=y,!0;ls.font="19px serif";var b=ls.font;return ls.font=a,x=ls.font,ls.font=y,x!==b},Vi.FormatNone=C1,Vi.FormatTrim=$p,Vi.None=Lv,Vi.OverflowClip=Av,Vi.OverflowEllipsis=Om,Vi.WrapBreakAll=b1,Vi.WrapDesiredSize=Nv,Vi.WrapFit=P1;function Pu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Pu.prototype.copy=function(){var a=new Pu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Pu.className="GradElementSettings";function us(a,y){zt.call(this),this.Eg=null,this.qo="",this.Xg=Ps,this.Nk=xn,this.Zg=this.Hd=null,this.Mk=Or,this.Xf=fn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var jd;tn(us,zt),us.prototype.cloneProtected=function(a){zt.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},us.prototype.qb=function(a){a===fn||a===rr||a===Jr?this.imageStretch=a:zt.prototype.qb.call(this,a)},us.prototype.toString=function(){return"Picture("+this.source+")#"+ei(this)};function Od(a){a===void 0&&(a=""),a!==""?jd[a]&&(delete jd[a],Bm--):(jd=new Hn,Bm=0)}function T1(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()||(Bo(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=_n();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);Xn(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}us.prototype.hA=function(){if(this.source!==""){Od(this.source);var a=this.source;this.source="",this.source=a}},us.prototype.redraw=function(){this.N(),this.Uc=!0},us.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 Vc)){var E=a instanceof ks;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 pe=he,ye=se;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,he=this.Xg.width,se=this.Xg.height);var Te=he,Ge=se,Xe=this.Nk,Je=this.Mk;switch(Xe){case fn:if(this.sourceRect.w())break;Te>=b.width&&(te=te+Je.offsetX+(Te*Je.x-b.width*Je.x)),Ge>=b.height&&(ne=ne+Je.offsetY+(Ge*Je.y-b.height*Je.y)),he=Math.min(b.width,Te),se=Math.min(b.height,Ge);break;case xn:Te=b.width,Ge=b.height;break;case rr:case Jr:Xe===rr?(Xe=Math.min(b.height/Ge,b.width/Te),Te*=Xe,Ge*=Xe):Xe===Jr&&(Xe=Math.max(b.height/Ge,b.width/Te),Te*=Xe,Ge*=Xe,Te>=b.width&&(te=(te+Je.offsetX+(Te*Je.x-b.width*Je.x)/Te)*he),Ge>=b.height&&(ne=(ne+Je.offsetY+(Ge*Je.y-b.height*Je.y)/Ge)*se),he*=1/(Te/b.width),se*=1/(Ge/b.height),Te=b.width,Ge=b.height)}Xe=this.Df()*y.scale;var it=Te*Xe*Ge*Xe,Tt=he*se/it,bt=x.__goCache;Xe=null;var jt=wx;if(!E){if(x.sq&&bt!==void 0&&4<it&&Tt>jt*jt)for(bt.gi===null&&(L1(bt,4,pe,ye,x),L1(bt,16,pe,ye,x)),E=bt.gi,pe=E.length,ye=0;ye<pe&&E[ye].ratio*E[ye].ratio<Tt;ye++)Xe=E[ye];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new fl(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=Te<b.width?Je.offsetX+(b.width*Je.x-Te*Je.x):0,Je=Ge<b.height?Je.offsetY+(b.height*Je.y-Ge*Je.y):0,this.flip){case si:a.translate(Math.min(b.width,Te),0),a.scale(-1,1);break;case Gr:a.translate(0,Math.min(b.height,Ge)),a.scale(1,-1);break;case ji:a.translate(Math.min(b.width,Te),Math.min(b.height,Ge)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&bt!==void 0&&Xe!==null&&Xe.ratio!==1){a.save(),y=Xe.ratio;try{a.drawImage(Xe.source,te/y,ne/y,Math.min(Xe.source.width,he/y),Math.min(Xe.source.height,se/y),E,Je,Math.min(b.width,Te),Math.min(b.height,Ge)),a instanceof ks&&(this.bt=[te/y,ne/y,Math.min(Xe.source.width,he/y),Math.min(Xe.source.height,se/y),E,Je,Math.min(b.width,Te),Math.min(b.height,Ge)])}catch(Ft){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,Je,Math.min(b.width,Te),Math.min(b.height,Ge)),a instanceof ks&&(this.bt=[te,ne,he,se,E,Je,Math.min(b.width,Te),Math.min(b.height,Ge)])}catch(Ft){this.en=!1}switch(this.flip){case si:a.scale(-1,1),a.translate(-Math.min(b.width,Te),0);break;case Gr:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ge));break;case ji:a.scale(-1,-1),a.translate(-Math.min(b.width,Te),-Math.min(b.height,Ge))}}}}},us.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=ss(this,!0),ne=this.Eg,se=this.qn,he=0,pe=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,pe=se?+ne.height:ne.naturalHeight),isFinite(E.width)||te===xn||te===lr?(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===vr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=pe)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:pe),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)),xi(this.dc,a,y),this.Ge(0,0,a,y)},us.prototype.eh=function(a,y,x,b){Ia(this,a,y,x,b)},vn.Object.defineProperties(us.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||Ot("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Np(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new yn),b!==null&&x&&qh(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()||(Bo(this,!1),this.v())):x&&T1(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=jd;if(po){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Od(),x=jd),b=tr("img"),b.hn=!0,T1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Bm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new M1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),us.prototype.redraw=us.prototype.redraw,us.prototype.reloadSource=us.prototype.hA;var Bm=0,wx=4;us.className="Picture",jd=new Hn,us.clearCache=Od;function M1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new fl(null),ne=te.context,se=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new N1(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))}M1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function Fd(){this.os=new Cn,this.mc=null}Fd.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Cn,this.mc=null};function Dd(a,y,x,b,E,te){a.mc=new Oo,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 Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Fd.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new fi(Fo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Fd.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new fi(zi);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function wh(a,y,x,b,E,te,ne){var se;se===void 0&&(se=!1);var he=new fi(Go);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 Im(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new fi(ps);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}Fd.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var se=new fi(xo);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 bx(a,y,x,b,E,te,ne,se){var he;he===void 0&&(he=!1),y=new fi(Cs,ne,se,y,x,b,E,te),he&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Rm;return y!==null?(Rm=null,y.reset(a),y):(y=new Fd,y.reset(a),y)}var Rm=null;Fd.className="StreamGeometryContext";function Na(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a}Na("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Cn(Cn.u),b.endX=y,b.endY=x,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Square",function(a,y,x){a="s"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Cn(Cn.u),b.endX=y,b.endY=x,b.defaultStretch=rr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("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=Gt.Mf[b];if(E!==void 0)return E;var te=a*Gt.wg;return E=new Cn().add(new Oo(a,0,!0).add(new fi(zi,y-a,0)).add(new fi(Go,y,a,y-te,0,y,te)).add(new fi(zi,y,x-a)).add(new fi(Go,y-a,x,y,x-te,y-te,x)).add(new fi(zi,a,x)).add(new fi(Go,0,x-a,te,x,0,x-te)).add(new fi(zi,0,a)).add(new fi(Go,a,0,0,te,te,0).close())),1<te&&(E.spot1=new er(0,0,te,te),E.spot2=new er(1,1,-te,-te)),Gt.Nf<Gt.vm&&(Gt.Mf[b]=E,Gt.Nf++),E}),Na("Border","RoundedRectangle"),Na("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Cn(Cn.F),b.endX=y,b.endY=x,b.spot1=Xl,b.spot2=Ga,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Circle",function(a,y,x){a="c"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Cn(Cn.F),b.endX=y,b.endY=x,b.spot1=Xl,b.spot2=Ga,b.defaultStretch=rr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("TriangleRight",function(a,y,x){return new Cn().add(new Oo(0,0).add(new fi(zi,y,.5*x)).add(new fi(zi,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new Cn().add(new Oo(0,0).add(new fi(zi,y,0)).add(new fi(zi,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new Cn().add(new Oo(y,x).add(new fi(zi,0,.5*x)).add(new fi(zi,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new Cn().add(new Oo(y,x).add(new fi(zi,0,x)).add(new fi(zi,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new Cn().add(new Oo(.5*y,0).add(new fi(zi,0,.5*x)).add(new fi(zi,.5*y,x)).add(new fi(zi,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("LineH",function(a,y,x){return a=new Cn(Cn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Na("LineV",function(a,y,x){return a=new Cn(Cn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Na("None","Rectangle"),Na("BarH","Rectangle"),Na("BarV","Rectangle"),Na("MinusLine","LineH"),Na("PlusLine",function(a,y,x){return new Cn().add(new Oo(0,x/2,!1).add(new fi(zi,y,x/2)).add(new fi(Fo,y/2,0)).add(new fi(zi,y/2,x)))}),Na("XLine",function(a,y,x){return new Cn().add(new Oo(0,x,!1).add(new fi(zi,y,0)).add(new fi(Fo,0,0)).add(new fi(zi,y,x)))}),Na("LineRight",function(a,y,x){return new Cn().add(new Oo(.25*y,0,!1).add(new fi(zi,.75*y,.5*x)).add(new fi(zi,.25*y,x)))}),Na("LineDown",function(a,y,x){return new Cn().add(new Oo(0,.25*x,!1).add(new fi(zi,.5*y,.75*x)).add(new fi(zi,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new Cn().add(new Oo(.75*y,0,!1).add(new fi(zi,.25*y,.5*x)).add(new fi(zi,.75*y,x)))}),Na("LineUp",function(a,y,x){return new Cn().add(new Oo(0,.75*x,!1).add(new fi(zi,.5*y,.25*x)).add(new fi(zi,y,.75*x)))}),Gt.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=bi,this.ir=null,this.jr="",this.lr=Zo,this.Gq="",this.Hq=$r,this.Pq=Sn,this.Kq=Kn,this.Up=null,this.Cq=127,this.zr=Qn,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function hr(a,y){a===void 0||a instanceof Wo||typeof a=="string"?Pn.call(this,a):(Pn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new lt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Jt,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}tn(hr,Pn),hr.prototype.cloneProtected=function(a){Pn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},et=hr.prototype,et.Af=function(a){Pn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},et.toString=function(){var a=ur(this.constructor)+"#"+ei(this);return this.data!==null&&(a+="("+zr(this.data)+")"),a};function hs(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}et.th=function(){Pn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},et.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===wo&&y==="elements"?E instanceof Pn?Zc(E,function(he){ly(se.partManager,he),_c(se,he)}):qh(se,E):a===Eo&&y==="elements"&&(E instanceof Pn?Zc(E,function(he){uy(se.partManager,he,se)}):Np(se,E)),se.cb(a,y,x,b,E,te,ne))},et.La=function(a){if(Pn.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 Pn&&Zc(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},hr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},hr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},hr.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 Yt),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)))}}},hr.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)}},hr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=_n();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Xn(y)}},hr.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 Lr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof di))break e;dl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Pn.Link),x.adornedObject=y)}if(x!==null){x.type===Pn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},hr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Bv(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 _m(a){if(rc(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function j1(a){if(a.G|=2097152,rc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=Jt.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Jt.free(b),Rv(a,!1)}}hr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new wr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},hr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Or;this.locationSpot.sb()&&(te=this.locationSpot);var ne=lt.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),lt.free(ne)}},hr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},hr.prototype.moveTo=function(a,y,x){a=lt.allocAt(a,y),this.move(a,x),lt.free(a)},hr.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())},hr.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())},hr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Yt),y.I(a)!==null)return y.I(a);var x=Pn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Ph(a,y,x,b){b===void 0&&(b=new lt),x=x.Mc()?Or: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}hr.prototype.mi=function(a){return a===void 0&&(a=new Jt),a.assign(this.actualBounds)},hr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=lt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Fr?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 $c(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}hr.prototype.arrange=function(){if(Ya(this)===!1)j1(this);else{yu(this,!1);var a=this.Ib,y=Jt.alloc();y.assign(a);var x=ic(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()||Gt.B(y.width,a.width)&&Gt.B(y.height,a.height)||0<=this.vw&&this.C(16),Jt.free(y),Rv(this,!1)}},et=hr.prototype,et.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=Jt.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),Jt.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||Dr(a,y)||(this instanceof Gn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},et.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 lt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),rc(this)===!1&&Ya(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof di||(y=y.animationManager,y.zb&&ad(y,a,new lt(b,E),x))}et.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;rc(this)||Ya(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)}_m(this)},et.Av=function(){this.G&=-2097153,_m(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?B1(a,y,x,E,b):I1(a,y,x,E,b):te?B1(a,y,x,E,b):ne&&I1(a,y,x,E,b),a.G|=2097152,lt.free(b),a.Uk()}function B1(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 di||ad(x,a,new lt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new lt(te,ne),y.copy()))}function I1(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){_v(a,!1),a instanceof Gn&&gh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?ic(a)?(Fi(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}et.si=function(){return!0},et.Zc=function(){return!0},et.ph=function(){return!1},et.Dd=function(){return!0};function Iv(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,Ln('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Ln(" Old class: "+ur(a.constructor)+", new class: "+ur(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,pe=!1;a instanceof Gn&&(se=a.isTreeLeaf,he=a.isTreeExpanded,pe=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=pe?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)}hr.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},hr.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},hr.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},hr.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},hr.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},hr.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},hr.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},hr.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},hr.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 rc(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function _v(a,y){a.G=y?a.G|65536:a.G&-65537}function ic(a){return(a.G&131072)!==0}et=hr.prototype,et.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function zm(a,y){a.G=y?a.G|1048576:a.G&-1048577}et.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},et.N=function(){var a=this.diagram;a!==null&&!Ya(this)&&!rc(this)&&this.isVisible()&&this.Ib.w()&&a.N($c(this,this.Ib))},et.v=function(){Pn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Gn&&this.labeledLink!==null&&Xa(this.labeledLink),a.$b(!0))},et.Vo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},et.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},et.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},et.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof Gn&&(y=y.labeledLink,y!==null)?zv(a,y):0}et.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}et.Td=function(a){return a instanceof Lr?Gv(this,this,a):!1};function Gv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Gv(a,b,x)?y instanceof Gn&&(y=y.labeledLink,y!==null)?Gv(a,y,x):!1:!0}et.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Lr&&zm(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 Lr&&zm(y,!1),y instanceof Gn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},hr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Gn&&this.isLinkLabel)},hr.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 z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function oc(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof di)){if(a.add(y),y instanceof Gn){if(x&&y instanceof Lr)for(var ne=y.memberParts;ne.next();)oc(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,pe=se.toNode;he=he===null||a.contains(he),pe=pe===null||a.contains(pe),(E?he&&pe:he||pe)&&oc(a,se,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)oc(a,y.value,x,b-1,E,te)}else if(y instanceof kn)for(y=y.labelNodes;y.next();)oc(a,y.value,x,b,E,te)}}vn.Object.defineProperties(hr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Zr: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(Eo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(wo,"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&&(hs(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&&ud(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 di?this.type!==Pn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:Sn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),hs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Kn},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),hs(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&&(hs(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:$r},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),hs(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,Ya(this)===!1&&(_m(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 di)){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 di?this instanceof di&&(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&&(dl(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(te!==null&&te.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(dl(x),x=x.copy(),x===null||x instanceof kn||(b=this.location.copy(),Iv(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){Iv(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&&(hs(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&&(hs(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&&(hs(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&&(hs(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&&(hs(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&&(hs(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:bi},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),hs(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&&(hs(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&&(hs(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:Zo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),hs(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&&Ot("Cannot make a Group a member of itself: "+this.toString()),Ot("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof Lr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Kv(a,this):this instanceof Lr&&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 Lr){for(x=new yn,oc(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Gn)for(b=b.linksConnected;b.next();)Bd(b.value)}if(this instanceof Gn){for(x=this.linksConnected;x.next();)Bd(x.value);x=this.labeledLink,x!==null&&Bd(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&ud(y,-1,a))}}else Ot("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&&(hs(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&&(hs(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&&(hs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Qn},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),hs(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&&(hs(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&&(hs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),hr.prototype.invalidateLayout=hr.prototype.C,hr.prototype.findCommonContainingGroup=hr.prototype.px,hr.prototype.isMemberOf=hr.prototype.Td,hr.prototype.findTopLevelPart=hr.prototype.sz,hr.prototype.findSubGraphLevel=hr.prototype.oz,hr.prototype.ensureBounds=hr.prototype.Va,hr.prototype.getDocumentBounds=hr.prototype.mi,hr.prototype.findObject=hr.prototype.fb,hr.prototype.moveTo=hr.prototype.moveTo,hr.prototype.invalidateAdornments=hr.prototype.Wb,hr.prototype.clearAdornments=hr.prototype.Ej,hr.prototype.removeAdornment=hr.prototype.Jf,hr.prototype.addAdornment=hr.prototype.bh,hr.prototype.findAdornment=hr.prototype.Pj,hr.prototype.updateTargetBindings=hr.prototype.La;var G1=!1;hr.className="Part",hr.LayoutNone=0,hr.LayoutAdded=1,hr.LayoutRemoved=2,hr.LayoutShown=4,hr.LayoutHidden=8,hr.LayoutNodeSized=16,hr.LayoutGroupLayout=32,hr.LayoutNodeReplaced=64,hr.LayoutStandard=127,hr.LayoutAll=16777215;function di(a,y){a===void 0||a instanceof Wo||typeof a=="string"?hr.call(this,a):(hr.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)}tn(di,hr),di.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},di.prototype.updateRelationshipsFromData=function(){},di.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof kn&&y instanceof Fr){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 Fr&&(E.ua=a)}}},di.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ya(a))},di.prototype.Zc=function(){return!1},di.prototype.gk=function(a,y,x,b,E,te,ne){if(a===wo&&y==="elements"){if(E instanceof Ja)this.$a===null&&(this.$a=E);else if(E instanceof Pn){var se=E.Nl(function(he){return he instanceof Ja});se instanceof Ja&&this.$a===null&&(this.$a=se)}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Pn&&this.$a.rg(b)&&(this.$a=null));hr.prototype.gk.call(this,a,y,x,b,E,te,ne)},di.prototype.updateAdornments=function(){},di.prototype.Lj=function(){},vn.Object.defineProperties(di.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}}}),di.className="Adornment";function Uv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ao,this.er=Wm,this.Kr=this.ij=this.Nq=this.Mq=null}Uv.prototype.copy=function(){var a=new Uv;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 Wo||typeof a=="string"?hr.call(this,a):(hr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new pn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}tn(Gn,hr),Gn.prototype.cloneProtected=function(a){hr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},et=Gn.prototype,et.Af=function(a){hr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function bh(a){a.Ba===null?a.Ba=new Uv:a.Ba.nc&&(a.Ba=a.Ba.copy())}et.th=function(){hr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new yn),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}et.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},et.gk=function(a,y,x,b,E,te,ne){a===wo&&y==="elements"?this.wc=null:a===Eo&&y==="elements"&&(this.wc=null),hr.prototype.gk.call(this,a,y,x,b,E,te,ne)},et.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ts(x.fromPort),Ts(x.toPort),x.bb())}};function H1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ts(x.fromPort),Ts(x.toPort),x.bb())}}function Ts(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ts(y.port)}}et.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(!hr.prototype.isVisible.call(this))return!1;var a=!0,y=vh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===vh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Do){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===wd&&(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){hr.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 yn,y=new yn;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 ui(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},et=Gn.prototype,et.Mo=function(a){a===void 0&&(a=null);var y=new ui(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},et.Sd=function(a){a===void 0&&(a=null);var y=new ui(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},et.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 yn,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 yn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Zr},et.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 yn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Zr},et.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 yn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Qr(x):Zr},et.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ui(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},et.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ui(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 Gm(a,y,x){Ts(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 Um(a,y,x){Ts(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)):Qp(y)))}function Qp(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)},et=Gn.prototype,et.Vo=function(a){hr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&eS(a,this))},et.Wo=function(a){hr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},et.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,hr.prototype.Lj.call(this)},et.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 Yt:a.wc.clear(),a.qm(a,function(y,x){Z1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Z1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Wv(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=_n()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Xn(x)}}}et.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},et.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}},et.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)zm(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;)zm(y,!1),y=y.pg();return x},et.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},et.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},et.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 yn;return a(this,y),y},et.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}et.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new ui(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},et.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 pn,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 pn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Qr(x):Zr},et.wz=function(a){a===void 0&&(a=1/0);var y=new yn;return oc(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 yn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Y1(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),Y1(he,y,x,b-1,E,te,ne)))}else $1(a,y,x,E,te,ne)}function $1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,se=x?a.Mo():a.Sd(),he={};se.next();){var pe=se.value;if(pe.isTreeLink&&(pe=pe.To(a),pe!==null&&pe!==a)){var ye=y.contains(pe);if(ye||y.add(pe),ne){var Te=x?pe.Oo():pe.Po();he.uv=a,Te.all(function(Ge){return function(Xe){return Xe===Ge.uv||!Xe.isTreeExpanded}}(he))&&b.Aj(pe,E),pe.oh(),pe.Zb(!1)}pe.isTreeExpanded&&(pe.wasTreeExpanded=pe.isTreeExpanded,ye||$1(pe,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 yn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function J1(a,y,x,b,E,te,ne){for(var se=te===a?!1:a.isTreeExpanded,he=x?a.Mo():a.Sd(),pe={};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 Te=x?ye.Oo():ye.Po();pe.vv=a,Te.all(function(Ge){return function(Xe){return Xe===Ge.vv||!Xe.isTreeExpanded}}(pe))&&E.Cj(ye,te)}(2<b||ye.wasTreeExpanded)&&(ye.wasTreeExpanded=!1,J1(ye,y,x,b-1,E,te,ne))}pe={vv:pe.vv}}a.isTreeExpanded=!0}vn.Object.defineProperties(Gn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Wm},set:function(a){var y=this.portSpreading;y!==a&&(bh(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&&gh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Ao},set:function(a){typeof a=="number"&&(a=new Br(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),bh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&gh(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&&(bh(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&&(bh(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&&(bh(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),Xa(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&&(bh(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 Qt(Gn,"SpreadingNone",10),Wm=new Qt(Gn,"SpreadingEvenly",11),Hv=new Qt(Gn,"SpreadingPacked",12);Gn.className="Node",Gn.SpreadingNone=Ex,Gn.SpreadingEvenly=Wm,Gn.SpreadingPacked=Hv;function Lr(a,y){a===void 0||a instanceof Wo||typeof a=="string"?Gn.call(this,a):(Gn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new yn,this.$a=null,this.Sc=new so,this.Sc.group=this,this.gl=new yn,this.tb=this.$p=null,y&&Object.assign(this,y)}tn(Lr,Gn),Lr.prototype.cloneProtected=function(a){Gn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ja});y instanceof Ja?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())},et=Lr.prototype,et.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)}},et.gk=function(a,y,x,b,E,te,ne){if(a===wo&&y==="elements"){if(E instanceof Ja)this.$a===null?this.$a=E:this.$a!==E&&Ot("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Pn){var se=E.Nl(function(he){return he instanceof Ja});se instanceof Ja&&(this.$a===null?this.$a=se:this.$a!==se&&Ot("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Pn&&this.$a.rg(b)&&(this.$a=null));Gn.prototype.gk.call(this,a,y,x,b,E,te,ne)},et.Xl=function(a,y){Gn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Pn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Pn&&(a=a.Pb()),this.tb===null&&(this.tb=new Jt),a.mi(this.tb),a instanceof Fr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},et.eh=function(a,y,x,b){this.nf=this.$a,Gn.prototype.eh.call(this,a,y,x,b)},et.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof kn||y.Va()}),Gn.prototype.Va.call(this)},et.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()&&Ya(y))return!1}else if(y instanceof kn&&y.isVisible()&&Ya(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Kv(a,y){if(a.Gn.add(y)){y instanceof Lr&&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 Vv(a,y){if(a.Gn.remove(y)){y instanceof Lr&&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())}et.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)},Lr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=rn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Lr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=rn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Lr.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))},et=Lr.prototype,et.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()?(Ts(x.fromPort),Ts(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Ts(x.fromPort),Ts(x.toPort),x.bb()))}}},et.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 yn,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},et.iz=function(){var a=this.Rj();a.add(this);for(var y=new yn,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},et.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new yn;return a(this,y),y},et.Rj=function(){var a=new yn;return oc(a,this,!0,0,!0),a.remove(this),a},et.Zb=function(a){Gn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Lr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!1),te instanceof Lr&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(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}Lr.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 Lr&&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}Lr.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=lt.alloc(),Gn.prototype.move.call(this,a,y),a=new yn,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(),Xv(E)&&E.bb());lt.free(te)}},vn.Object.defineProperties(Lr.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&&Ot("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&&(bh(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&&(bh(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&&(bh(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&&(bh(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)}}}),Lr.prototype.expandSubGraph=Lr.prototype.expandSubGraph,Lr.prototype.collapseSubGraph=Lr.prototype.collapseSubGraph,Lr.prototype.findSubGraphParts=Lr.prototype.Rj,Lr.prototype.findContainingGroupChain=Lr.prototype.hz,Lr.prototype.findExternalNodesConnected=Lr.prototype.iz,Lr.prototype.findExternalLinksConnected=Lr.prototype.Lu,Lr.prototype.ensureBounds=Lr.prototype.Va,Lr.className="Group";function Ja(a){zt.call(this),this.yb=ta,this.ko=new Jt(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}tn(Ja,zt),Ja.prototype.cloneProtected=function(a){zt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ja.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return $i(0,0,y.width,y.height,a.x,a.y)},Ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Lr||a instanceof di)||Ot("Placeholder is not inside a Group or Adornment."),a instanceof Lr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(xi(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=lt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),lt.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 Fr&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,pe=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==Pn.Link&&(se=te.ga(a.category==="Selection"?$r:a.locationSpot,lt.alloc()),a.location=se,lt.free(se)),isNaN(pe)||isNaN(ne)?(a=te.ga($r,lt.alloc()),pe=Jt.allocAt(a.x,a.y,0,0),pe.Ye(te.ga(Ni,a)),pe.Ye(te.ga(Ci,a)),pe.Ye(te.ga(zo,a)),xi(y,pe.width+b||0,pe.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),lt.free(a),Jt.free(pe)):(xi(y,pe+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ja.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ja.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Lr&&!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=Jt.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof Lr&&!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)),Jt.free(x),b&&y instanceof Lr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Lr))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||_s(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},vn.Object.defineProperties(Ja.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Br(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ja.className="Placeholder";function kn(a){hr.call(this,Pn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Qa,this.Om=0,this.Qm=Qa,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new pn().freeze(),this.Tg=this.Mg=null,this.ml=new Jt,this.ua=new Cn,this.u=this.o=this.Sf=this.Wf=null,this.su=new lt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}tn(kn,hr),kn.prototype.cloneProtected=function(a){hr.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())},et=kn.prototype,et.Af=function(a){hr.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&&Ts(y),a=a.toPort,a!==null&&Ts(a)},et.qb=function(a){a.classType===kn?(a.value&2)===2?this.routing=a:a===Gs||a===Eh||a===Rd?this.curve=a:a===tg||a===Ym||a===$m?this.adjusting=a:a!==Jv&&a!==Qa&&Ot("Unknown Link enum value for a Link property: "+a):hr.prototype.qb.call(this,a)},et.Xc=function(){this.ba===null&&(this.ba=new Gp)},et.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ya(a)||rc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ya(a)||rc(a)))},et.zv=function(){return!1},et.Av=function(){},et.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 Qa:a=0;break;case ng:a=y;break;case rg:a=y+90;break;case ig:a=y-90;break;case Qv:a=y+180;break;case Jm:a=Gt.bp(y),90<a&&270>a&&(a-=180);break;case og:a=Gt.bp(y+90),90<a&&270>a&&(a-=180);break;case ag:a=Gt.bp(y-90),90<a&&270>a&&(a-=180);break;case Qm:if(a=Gt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Gt.bp(a)};function Bd(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&&Vv(x,a),a.Ah=y,y!==null&&Kv(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}et=kn.prototype,et.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&hr.prototype.oh.call(this)},et.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},et.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new yn),a.wd.add(y),a.v()}et.Vo=function(a){if(hr.prototype.Vo.call(this,a),Jc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Gm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Gm(x,this,b)}qp(this)}},et.Wo=function(a){if(hr.prototype.Wo.call(this,a),Jc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Um(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Um(x,this,b)}eg(this)}},et.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?hr.prototype.move.call(this,a,!1):(a=lt.allocAt(x.x+b,x.y+E),hr.prototype.move.call(this,a,!1),lt.free(a)),Ch(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(Vn),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()===Gs))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()===Gs){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Gt.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),Gt.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()===Gs))return this.ua.wx(.5);if(this.computeCurve()===Gs&&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),Gt.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)},et=kn.prototype,et.i=function(a){return this.Nb.s[a]},et.dd=function(a,y){this.Nb.cd(a,y)},et.L=function(a,y,x){this.Nb.cd(a,new lt(y,x))},et.Kz=function(a,y){this.Nb.Gb(a,y)},et.m=function(a,y,x){this.Nb.Gb(a,new lt(y,x))},et.ne=function(a){this.Nb.add(a)},et.yf=function(a,y){this.Nb.add(new lt(a,y))},et.pv=function(a){this.Nb.mb(a)},et.Fj=function(){this.Nb.clear()};function Ch(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 pn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new lt(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),Xa(a)),b?Hm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ld(ne.animationManager,a,E),a.g("points",te,E)}}et.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},et.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,pe=he.length,ye=0;ye<pe;ye++){var Te=he[ye];ne=Math.min(Te.x,ne),se=Math.min(Te.y,se),Te.freeze()}if(y.freeze(),pe===te){for(te=0;te<pe;te++)if(ye=E[te],Te=he[te],ye.x-x!==Te.x-ne||ye.y-b!==Te.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ld(x.animationManager,this,y),Hm(this),this.g("points",a,y)}},et.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Hm(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),Xm(a,!1))}et.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())}},et.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?(If||(If=new Gn,If.desiredSize=br,If.Va()),this.defaultFromPoint&&(If.location=this.defaultFromPoint,If.Va(),y=a=If)):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?(Rf||(Rf=new Gn,Rf.desiredSize=br,Rf.Va()),this.defaultToPoint&&(Rf.location=this.defaultToPoint,Rf.Va(),E=b=Rf)):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=Id(ne),he=Id(x),pe=y===E&&y!==null,ye=this.isOrthogonal,Te=this.curve===Gs;this.Wf=pe&&!ye?Te=!0:!1;var Ge=this.computeAdjusting()===Qa||pe;if(!ye&&!pe&&se&&he){if(se=!1,!Ge&&3<=te&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),se=this.adjustPoints(0,Ge,te-1,he))&&(Ge=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,Ge,te-1,he)),!se)if(this.Fj(),Te){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),Ge=this.getLinkPoint(b,E,x,!1,!1,a,y),se=Ge.x-te.x,he=Ge.y-te.y,pe=this.computeCurviness(),Te=ye=0;var Xe=te.x+se/3,Je=te.y+he/3,it=Xe,Tt=Je;Gt.B(he,0)?Tt=0<se?Tt-pe:Tt+pe:(ye=-se/he,Te=Math.sqrt(pe*pe/(ye*ye+1)),0>pe&&(Te=-Te),it=(0>he?-1:1)*Te+Xe,Tt=ye*(it-Xe)+Je),Xe=te.x+2*se/3,Je=te.y+2*he/3;var bt=Xe,jt=Je;Gt.B(he,0)?jt=0<se?jt-pe:jt+pe:(bt=(0>he?-1:1)*Te+Xe,jt=ye*(bt-Xe)+Je),this.Fj(),this.ne(te),this.yf(it,Tt),this.yf(bt,jt),this.ne(Ge),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,Ge=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,Ge),E=this.getLinkPoint(te,Ge,x,!1,!1,a,y),this.hasCurviness()?(Ge=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+Ge/2,y=b.y+x/2,te=a,se=y,Gt.B(x,0)?se=0<Ge?se-ne:se+ne:(Ge=-Ge/x,te=Math.sqrt(ne*ne/(Ge*Ge+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,se=Ge*(te-a)+y),this.ne(b),this.yf(te,se),this.ne(E)):(this.ne(b),this.ne(E),se=Jt.alloc(),y.mi(se),he=se.ca(E),Ge.mi(se),pe=se.ca(b),(he||pe)&&(ne=y.ga(Vm(ne),new lt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=Ge.ga(Vm(x),new lt),this.dd(1,this.getLinkPointFromPoint(te,Ge,x,b,!1,x))),Jt.free(se))}else{Te=this.isAvoiding,Ge&&(ye&&Te||pe)&&this.Fj();var Ft=pe?this.computeCurviness():0;Te=this.getLinkPoint(a,y,ne,!0,ye,b,E),Xe=it=Je=0,(ye||!se||pe)&&(Tt=this.computeEndSegmentLength(a,y,ne,!0),Xe=this.getLinkDirection(a,y,Te,ne,!0,ye,b,E),pe&&(se||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Xe-=ye?90:30,0>Ft&&(Xe-=180)),0>Xe?Xe+=360:360<=Xe&&(Xe-=360),pe&&(Tt+=Math.abs(Ft)*(ye?1:2)),Xe===0?Je=Tt:Xe===90?it=Tt:Xe===180?Je=-Tt:Xe===270?it=-Tt:(Je=Tt*Math.cos(Xe*Math.PI/180),it=Tt*Math.sin(Xe*Math.PI/180)),ne.Mc()&&pe&&(Tt=y.ga(Or,lt.alloc()),bt=lt.allocAt(Tt.x+1e3*Je,Tt.y+1e3*it),this.getLinkPointFromPoint(a,y,Tt,bt,!0,Te),lt.free(Tt),lt.free(bt))),Tt=this.getLinkPoint(b,E,x,!1,ye,a,y);var It=jt=bt=0;if(ye||!he||pe){var _t=this.computeEndSegmentLength(b,E,x,!1);It=this.getLinkDirection(b,E,Tt,x,!1,ye,a,y),pe&&(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),pe&&(_t+=Math.abs(Ft)*(ye?1:2)),It===0?bt=_t:It===90?jt=_t:It===180?bt=-_t:It===270?jt=-_t:(bt=_t*Math.cos(It*Math.PI/180),jt=_t*Math.sin(It*Math.PI/180)),x.Mc()&&pe&&(x=E.ga(Or,lt.alloc()),ne=lt.allocAt(x.x+1e3*bt,x.y+1e3*jt),this.getLinkPointFromPoint(b,E,x,ne,!1,Tt),lt.free(x),lt.free(ne))}x=Te,(ye||!se||pe)&&(x=new lt(Te.x+Je,Te.y+it)),ne=Tt,(ye||!he||pe)&&(ne=new lt(Tt.x+bt,Tt.y+jt)),!Ge&&!ye&&se&&3<te&&this.adjustPoints(0,Te,te-2,ne)?this.dd(te-1,Tt):!Ge&&!ye&&he&&3<te&&this.adjustPoints(1,x,te-1,Tt)?this.dd(0,Te):!Ge&&(ye?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Te),this.dd(te-1,Tt)):(this.Fj(),this.ne(Te),(ye||!se||pe)&&this.ne(x),ye&&this.addOrthoPoints(x,Xe,ne,It,a,b),(ye||!he||pe)&&this.ne(ne),this.ne(Tt))}return!0};function Zv(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 lt),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,pe=a.m11*E,ye=E*(a.m21*a.dy-a.m22*a.dx),Te=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+ye,b=b.x*se+b.y*pe+Te,ne=x.x*ne+x.y*he+ye,x=x.x*se+x.y*pe+Te}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Km(a,y){var x=y.Zn;return x===null&&(x=new _f,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 lt),x.sb()&&!Id(x))return y.ga(x,se),se;if(x.$c()){var he=Km(this,y);if(he!==null){if(se.assign(he.Zo),E&&this.routing===nS){var pe=Km(this,ne);if(pe!==null&&he.Gl<pe.Gl){he=lt.alloc(),pe=lt.alloc();var ye=new Jt(y.ga($r,he),y.ga(Ni,pe)),Te=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Te,!b,E,a,y,pe),(x.Hf(ja)||x.Hf(vo))&&a.y>=ye.y&&a.y<=ye.y+ye.height?se.y=a.y:(x.Hf(Vo)||x.Hf(fs))&&a.x>=ye.x&&a.x<=ye.x+ye.width&&(se.x=a.x),lt.free(he),lt.free(pe)}}return se}}return x=y.ga(Vm(x),lt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Zv(x,ne.copy()))):(he=this.computeSpot(!b,ne),te=lt.alloc(),ne=ne.ga(Vm(he),te),E&&(ne=Zv(x,ne)),lt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),lt.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=Km(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(Or,lt.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?Zv(he,se.copy()):x):(x=lt.alloc(),se=se.ga(Or,x),lt.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,lt.free(he),he=x}return b.Mc()&&ne.Td(a)&&(he+=180,360<=he&&(he-=360)),Id(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=Km(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=Or:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Zo?jr:y)):(a=y||this.toPort,a===null?a=Or:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Zo?jr:y)),a};function Id(a){return a===jr||a.x===.5&&a.y===.5}function Vm(a){return a.x===.5&&a.y===.5?a:Or}kn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Qa&&4<this.pointsCount?this.computeMidPoint(new lt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(Or))},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=wr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&wr.free(ne),!0;if(this.Yc(a,ne)){var se=!1;if(!this.isAtomic)for(var he=this.O.s,pe=he.length;pe--;){var ye=he[pe];if(ye.visible||ye===this.locationObject){var Te=ye.actualBounds,Ge=this.naturalBounds;if(!(Te.x>Ge.width||Te.y>Ge.height||0>Te.x+Te.width||0>Te.y+Te.height)){if(Te=wr.alloc(),Te.set(ne),ye instanceof Pn)se=ye.Cf(a,y,x,b,E,Te);else if(this.path===ye){if(ye instanceof Fr)if(se=a,Ge=b,ye.pickable===!1)se=!1;else if(Te.multiply(ye.transform),Ge)e:{var Xe=se,Je=Te;if(ye.fh(Xe,Je))se=!0;else{if(Je===void 0&&(Je=ye.transform,Xe.Re(ye.actualBounds))){se=!0;break e}se=Xe.left,Ge=Xe.right;var it=Xe.top;Xe=Xe.bottom;var Tt=lt.alloc(),bt=lt.alloc(),jt=lt.alloc(),Ft=wr.alloc();Ft.set(Je),Ft.bv(ye.transform),Ft.Vj(),bt.x=Ge,bt.y=it,bt.transform(Ft),Tt.x=se,Tt.y=it,Tt.transform(Ft),Je=!1,Yc(ye,Tt,bt,jt)?Je=!0:(Tt.x=Ge,Tt.y=Xe,Tt.transform(Ft),Yc(ye,Tt,bt,jt)?Je=!0:(bt.x=se,bt.y=Xe,bt.transform(Ft),Yc(ye,Tt,bt,jt)?Je=!0:(Tt.x=se,Tt.y=it,Tt.transform(Ft),Yc(ye,Tt,bt,jt)&&(Je=!0)))),wr.free(Ft),lt.free(Tt),lt.free(bt),lt.free(jt),se=Je}}else se=ye.fh(se,Te)}else se=Yo(ye,a,b,Te);se&&(Ge=ye,y!==null&&(Ge=y(ye)),Ge&&(x===null||x(Ge))&&E.add(Ge)),wr.free(Te)}}}return te===void 0&&wr.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&wr.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?Gs:this.curve},kn.prototype.computeCorner=function(){if(this.curve===Gs)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===ng||b===Jm||b===Qv?a=Math.max(a,E):b===ig||b===ag||b===rg||b===og?a=Math.max(a,ne):(y=y.ga(Or).ab(x.ga(Or))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Gs&&(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()===Qa&&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=_n(),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),Xn(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===Ym)return!1;E===$m&&(E=tg)}switch(E){case Ym: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,pe=Math.sqrt(se*se+he*he);if(!Gt.$(pe,0)){if(Gt.$(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 Te=y.y;se=b.x-ne;var Ge=b.y-Te;for(he=Math.sqrt(se*se+Ge*Ge),Gt.$(se,0)?Ge=0>Ge?-Math.PI/2:Math.PI/2:(Ge=Math.atan(Ge/Math.abs(se)),0>se&&(Ge=Math.PI-Ge)),pe=he/pe,ye=Ge-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),Gt.$(y,0)||(Gt.$(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*=pe,this.L(a,ne+y*Math.cos(se),Te+y*Math.sin(se)));this.dd(x,b)}}return!0;case $m:if(te=this.i(a),Te=this.i(x),!te.Xa(y)||!Te.Xa(b)){E=te.x,te=te.y,ne=Te.x,Te=Te.y,pe=(ne-E)*(ne-E)+(Te-te)*(Te-te),se=y.x,ye=y.y,he=b.x,Ge=b.y;var Xe=1;if(he-se!==0){var Je=(Ge-ye)/(he-se);Xe=Math.sqrt(1+1/(Je*Je))}else Je=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var it=y.x,Tt=y.y,bt=.5;pe!==0&&(bt=((E-it)*(E-ne)+(te-Tt)*(te-Te))/pe);var jt=E+bt*(ne-E),Ft=te+bt*(Te-te);y=Math.sqrt((it-jt)*(it-jt)+(Tt-Ft)*(Tt-Ft)),Tt<Je*(it-jt)+Ft&&(y=-y),0<Je&&(y=-y),it=se+bt*(he-se),bt=ye+bt*(Ge-ye),Je!==0?(y=it+y/Xe,this.L(a,y,bt-(y-it)/Je)):this.L(a,it,bt+y)}this.dd(x,b)}return!0;case tg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),se=te.x,ye=te.y,Te=se,pe=ye,Gt.B(E.y,te.y)?Gt.B(te.x,ne.x)?ye=y.y:Gt.B(te.y,ne.y)&&(se=y.x):Gt.B(E.x,te.x)&&(Gt.B(te.y,ne.y)?se=y.x:Gt.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,Ge=ye,Gt.B(E.y,te.y)?Gt.B(te.x,ne.x)?ye=b.y:Gt.B(te.y,ne.y)&&(se=b.x):Gt.B(E.x,te.x)&&(Gt.B(te.y,ne.y)?se=b.x:Gt.B(te.x,ne.x)&&(ye=b.y)),this.L(x-1,se,ye),Xv(this))){this.L(a+1,Te,pe),this.L(x-1,he,Ge),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(sg,sg),he.Bc(sg,sg),se.Ye(a),he.Ye(x);var pe=lt.alloc(),ye=lt.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?(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===180?(pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=pe.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pe.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=pe.x,ye.y=x.y):b===0&&a.x<he.left&&a.y>he.top&&a.y<he.bottom&&(pe.x=a.x,pe.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=pe.y)):(pe.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))?pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?pe.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===180||b===270)&&(pe.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=pe.y),pe.y>se.top&&pe.y<se.bottom&&(x.x>=se.left&&x.x<=a.x||a.x<=he.right&&a.x>=x.x?(b===90||b===270)&&(pe.h(Math.max((a.x+x.x)/2,a.x),a.y),ye.h(pe.x,x.y)):(pe.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=pe.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?(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===0?(pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=pe.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pe.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=pe.x,ye.y=x.y):b===180&&a.x>he.right&&a.y>he.top&&a.y<he.bottom&&(pe.x=a.x,pe.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=pe.y)):(pe.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))?pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?pe.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===0||b===270)&&(pe.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=pe.y),pe.y>se.top&&pe.y<se.bottom&&(x.x<=se.right&&x.x>=a.x||a.x>=he.left&&a.x<=x.x?(b===90||b===270)&&(pe.h(Math.min((a.x+x.x)/2,a.x),a.y),ye.h(pe.x,x.y)):(pe.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=pe.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?(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===270?(pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=pe.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(pe.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=pe.y):b===90&&a.y<he.top&&a.x>he.left&&a.x<he.right&&(pe.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),pe.y=a.y,ye.x=pe.x)):(pe.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))?pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?pe.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(pe.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=pe.x,ye.y=x.y),pe.x>se.left&&pe.x<se.right&&(x.y>=se.top&&x.y<=a.y||a.y<=he.bottom&&a.y>=x.y?(b===0||b===180)&&(pe.h(a.x,Math.max((a.y+x.y)/2,a.y)),ye.h(x.x,pe.y)):(pe.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=pe.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?(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===90?(pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=pe.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(pe.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=pe.y):b===270&&a.y>he.bottom&&a.x>he.left&&a.x<he.right&&(pe.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),pe.y=a.y,ye.x=pe.x)):(pe.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))?pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?pe.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(pe.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=pe.x,ye.y=x.y),pe.x>se.left&&pe.x<se.right&&(x.y<=se.bottom&&x.y>=a.y||a.y>=he.top&&a.y<=x.y?(b===0||b===180)&&(pe.h(a.x,Math.min((a.y+x.y)/2,a.y)),ye.h(x.x,pe.y)):(pe.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=pe.x,ye.y=x.y)));var Te=x;if(this.isAvoiding){var Ge=this.diagram;if(Ge===null||E===te||this.layer.isTemporary||!vd(Ge)||se.ca(Te)&&!te.Td(E)||he.ca(a)&&!E.Td(te))y=!1;else{var Xe=yd(Ge,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Xe.Yj(Math.min(a.x,pe.x),Math.min(a.y,pe.y),Math.abs(a.x-pe.x),Math.abs(a.y-pe.y))&&Xe.Yj(Math.min(pe.x,ye.x),Math.min(pe.y,ye.y),Math.abs(pe.x-ye.x),Math.abs(pe.y-ye.y))&&Xe.Yj(Math.min(ye.x,Te.x),Math.min(ye.y,Te.y),Math.abs(ye.x-Te.x),Math.abs(ye.y-Te.y)))y=!1;else{E=a,te=Te;var Je=x=null;if(Ge.isVirtualized){Ge=Xe.bounds.copy(),Ge.Bc(-Xe.Ho,-Xe.Go);var it=lt.alloc();_d(Xe,a.x,a.y)||(Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,a.x,a.y,pe.x,pe.y,it)?(x=a=it.copy(),y=it.ab(pe)):Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,pe.x,pe.y,ye.x,ye.y,it)?(x=a=it.copy(),y=it.ab(ye)):Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,ye.x,ye.y,Te.x,Te.y,it)&&(x=a=it.copy(),y=it.ab(Te))),_d(Xe,Te.x,Te.y)||(Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,Te.x,Te.y,ye.x,ye.y,it)?(Je=Te=it.copy(),b=ye.ab(it)):Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,ye.x,ye.y,pe.x,pe.y,it)?(Je=Te=it.copy(),b=pe.ab(it)):Gt.Ff(Ge.x,Ge.y,Ge.x+Ge.width,Ge.y+Ge.height,pe.x,pe.y,a.x,a.y,it)&&(Je=Te=it.copy(),b=a.ab(it))),lt.free(it)}se=se.copy().ed(he),se.Bc(Xe.Ho*Xe.Os,Xe.Go*Xe.Os),aS(Xe,a,y,Te,b,se,!0),he=bu(Xe,Te.x,Te.y),!Xe.abort&&he>=zd&&(oS(Xe),se.Bc(Xe.Ho*Xe.Hx,Xe.Go*Xe.Ix),aS(Xe,a,y,Te,b,se,!1),he=bu(Xe,Te.x,Te.y)),!Xe.abort&&he<zd&&bu(Xe,Te.x,Te.y)!==kh?(Yv(this,Xe,Te.x,Te.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Te.y):(se.x=Te.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?Gt.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)):Gt.B(se.y,ne.y)?(Math.abs(a.y-se.y)<=Xe.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)&&(Gt.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)):Gt.B(se.x,ne.x)?(Math.abs(a.x-se.x)<=Xe.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)),Je!==null&&(b===0||b===180?this.yf(te.x,Je.y):this.yf(Je.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(pe.copy()),this.ne(ye.copy())),lt.free(pe),lt.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 Xv(a){if(a.diagram===null||!a.isAvoiding||!vd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=yd(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 Yv(a,y,x,b,E,te,ne){var se=y.Ho,he=y.Go,pe=bu(y,x,b),ye=x,Te=b;for(E===0?ye+=se:E===90?Te+=he:E===180?ye-=se:Te-=he,E!==ne&&pe>Qc&&bu(y,ye,Te)!==pe-1&&(bu(y,x-se,b)===pe-1?(E=180,ye=x-se,Te=b):bu(y,x+se,b)===pe-1?(E=0,ye=x+se,Te=b):bu(y,x,b-he)===pe-1?(E=270,ye=x,Te=b-he):bu(y,x,b+he)===pe-1&&(E=90,ye=x,Te=b+he));pe>Qc&&bu(y,ye,Te)===pe-1;)x=ye,b=Te,E===0?ye+=se:E===90?Te+=he:E===180?ye-=se:Te-=he,--pe;te?pe>Qc&&(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),pe>Qc&&(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),bu(y,ne,ye)===pe-1?Yv(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),bu(y,ne,ye)===pe-1&&Yv(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=In(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=In(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 Fr&&(E.ua=this.ua)}}},kn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Jc(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===Gs&&3<=y&&!Gt.$(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||Jc(this)){if(a.type=Cn.o,se=A1(a),this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,te)),Dd(se,E.x,E.y,!1),ne===Gs&&3<=y&&!Gt.$(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=Df(this,E,!1,te)),wh(se,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=lt.allocAt(b,he),x=lt.alloc(),x.assign(this.i(1)),te=lt.allocAt(b,he),E=lt.allocAt(b,he),ne=this.i(0);for(var pe,ye=this.smoothness/3,Te=1;Te<this.pointsCount-1;Te++){pe=this.i(Te);var Ge=ne,Xe=pe,Je=this.i($v(this,pe,Te,!1));if((!Gt.$(Ge.x,Xe.x)||!Gt.$(Xe.x,Je.x))&&(!Gt.$(Ge.y,Xe.y)||!Gt.$(Xe.y,Je.y))){var it=ye;isNaN(it)&&(it=this.smoothness/3);var Tt=Ge.x;Ge=Ge.y;var bt=Xe.x;Xe=Xe.y;var jt=Je.x;Je=Je.y;var Ft=it*Zm(Tt,Ge,bt,Xe);it*=Zm(bt,Xe,jt,Je),Gt.$(Ge,Xe)&&Gt.$(bt,jt)&&(bt>Tt?Je>Xe?(te.x=bt-Ft,te.y=Xe-Ft,E.x=bt+it,E.y=Xe+it):(te.x=bt-Ft,te.y=Xe+Ft,E.x=bt+it,E.y=Xe-it):Je>Xe?(te.x=bt+Ft,te.y=Xe-Ft,E.x=bt-it,E.y=Xe+it):(te.x=bt+Ft,te.y=Xe+Ft,E.x=bt-it,E.y=Xe-it)),Gt.$(Tt,bt)&&Gt.$(Xe,Je)&&(Xe>Ge?(jt>bt?(te.x=bt-Ft,te.y=Xe-Ft,E.x=bt+it):(te.x=bt+Ft,te.y=Xe-Ft,E.x=bt-it),E.y=Xe+it):(jt>bt?(te.x=bt-Ft,te.y=Xe+Ft,E.x=bt+it):(te.x=bt+Ft,te.y=Xe+Ft,E.x=bt-it),E.y=Xe-it)),(Gt.$(Tt,bt)&&Gt.$(bt,jt)||Gt.$(Ge,Xe)&&Gt.$(Xe,Je))&&(Tt=.5*(Tt+jt),Ge=.5*(Ge+Je),te.x=Tt,te.y=Ge,E.x=Tt,E.y=Ge),(Te===1||Te===2&&Gt.$(ne.x,this.i(0).x)&&Gt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+pe.x),x.y=.5*(ne.y+pe.y)),wh(se,x.x-b,x.y-he,te.x-b,te.y-he,pe.x-b,pe.y-he),y.set(te),x.set(E),ne=pe}}pe=ne.x,ne=ne.y,ye=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,On)),pe=.5*(pe+ye.x),ne=.5*(ne+ye.y),wh(se,E.x-b,E.y-he,pe-b,ne-he,ye.x-b,ye.y-he),lt.free(y),lt.free(x),lt.free(te),lt.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=Df(this,ne.copy(),!1,On)),wh(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=lt.alloc(),te.assign(this.i(0)),E=lt.alloc(),E.assign(te),ne=this.computeCorner(),Te=1,pe=0;Te<y;){if(Te=$v(this,te,Te,1<Te),ye=this.i(Te),Te>=y-1){if(!te.D(ye))this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,On)),Bf(this,se,-b,-he,te,ye,x);else if(pe===0)for(Te=1;Te<y;)E.assign(te),ye=this.i(Te++),Bf(this,se,-b,-he,te,ye,x),te.assign(ye);break}if(pe=$v(this,ye,Te+1,Te<y-3),Te=-b,Tt=-he,Ge=ye,bt=this.i(pe),it=x,Gt.B(te.y,Ge.y)&&Gt.B(Ge.x,bt.x))if(Je=Math.min(ne,Math.abs(Ge.x-E.x)/2),Je=Ft=Math.min(Je,Math.abs(bt.y-Ge.y)/2),Gt.B(Je,0))Bf(this,se,Te,Tt,te,Ge,it),te.assign(Ge);else{var It=Ge.x,_t=Ge.y;Xe=It,jt=_t,Ge.x>te.x?It=Ge.x-Je:It=Ge.x+Je,bt.y>Ge.y?jt=Ge.y+Ft:jt=Ge.y-Ft,bt=lt.allocAt(It,_t),Bf(this,se,Te,Tt,te,bt,it),lt.free(bt),Im(se,Ge.x+Te,Ge.y+Tt,Xe+Te,jt+Tt),te.h(Xe,jt)}else Gt.B(te.x,Ge.x)&&Gt.B(Ge.y,bt.y)?(Je=Math.min(ne,Math.abs(Ge.y-E.y)/2),Je=Ft=Math.min(Je,Math.abs(bt.x-Ge.x)/2),Gt.B(Ft,0)?(Bf(this,se,Te,Tt,te,Ge,it),te.assign(Ge)):(It=Ge.x,_t=Ge.y,Xe=It,jt=_t,Ge.y>te.y?_t=Ge.y-Je:_t=Ge.y+Je,bt.x>Ge.x?Xe=Ge.x+Ft:Xe=Ge.x-Ft,bt=lt.allocAt(It,_t),Bf(this,se,Te,Tt,te,bt,it),lt.free(bt),Im(se,Ge.x+Te,Ge.y+Tt,Xe+Te,jt+Tt),te.h(Xe,jt))):(Bf(this,se,Te,Tt,te,Ge,it),te.assign(Ge));E.assign(ye),Te=pe}lt.free(te)}Rm=se}else se=this.i(1).copy(),se.x-=b,se.y-=he,this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,te)),this.computeShortLength(!1)!==0&&(se=Df(this,se,!1,te)),a.type=Cn.j,a.startX=E.x,a.startY=E.y,a.endX=se.x,a.endY=se.y;return this.lk=!0,a};function Zm(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),Gt.$(a,0)?y:Gt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Df(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=Zm(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=Zm(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 $v(a,y,x,b){for(var E=a.pointsCount,te=y;Gt.$(y.x,te.x)&&Gt.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!Gt.$(y.x,te.x)&&!Gt.$(y.y,te.y))return x-1;for(var ne=te;Gt.$(y.x,te.x)&&Gt.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||Gt.$(y.y,te.y)&&Gt.$(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 Bf(a,y,x,b,E,te,ne){if(!ne&&Jc(a)){ne=a.computeJumpLength();var se=ne/2,he=[],pe=0;if(a.isVisible()&&(pe=kx(a,E,te,he)),0<pe){if(Gt.B(E.y,te.y))if(E.x<te.x)for(var ye=0;ye<pe;){var Te=Math.max(E.x,Math.min(he[ye++]-se,te.x-ne));y.lineTo(Te+x,te.y+b);for(var Ge=Te+x,Xe=Math.min(Te+ne,te.x);ye<pe&&(Te=he[ye],Te<Xe+ne);)ye++,Xe=Math.min(Te+se,te.x);Te=te.y-ne+b,Xe+=x;var Je=te.y+b;a.curve===Eh?Dd(y,Xe,Je,!1):wh(y,Ge,Te,Xe,Te,Xe,Je)}else for(--pe;0<=pe;){for(ye=Math.min(E.x,Math.max(he[pe--]+se,te.x+ne)),y.lineTo(ye+x,te.y+b),Ge=ye+x,Te=Math.max(ye-ne,te.x);0<=pe&&(ye=he[pe],ye>Te-ne);)pe--,Te=Math.max(ye-se,te.x);ye=te.y-ne+b,Te+=x,Xe=te.y+b,a.curve===Eh?Dd(y,Te,Xe,!1):wh(y,Ge,ye,Te,ye,Te,Xe)}else if(Gt.B(E.x,te.x))if(E.y<te.y)for(ye=0;ye<pe;){for(Te=Math.max(E.y,Math.min(he[ye++]-se,te.y-ne)),y.lineTo(te.x+x,Te+b),Ge=Te+b,Te=Math.min(Te+ne,te.y);ye<pe&&(Xe=he[ye],Xe<Te+ne);)ye++,Te=Math.min(Xe+se,te.y);Xe=te.x-ne+x,Je=te.x+x,Te+=b,a.curve===Eh?Dd(y,Je,Te,!1):wh(y,Xe,Ge,Xe,Te,Je,Te)}else for(--pe;0<=pe;){for(ye=Math.min(E.y,Math.max(he[pe--]+se,te.y+ne)),y.lineTo(te.x+x,ye+b),Ge=ye+b,ye=Math.max(ye-ne,te.y);0<=pe&&(Te=he[pe],Te>ye-ne);)pe--,ye=Math.max(Te-se,te.y);Te=te.x-ne+x,Xe=te.x+x,ye+=b,a.curve===Eh?Dd(y,Xe,ye,!1):wh(y,Te,Ge,Te,ye,Xe,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,Te){return ye-Te}),b.length;if(he.isVisible()&&Jc(he)){var pe=he.routeBounds;pe.w()&&a.routeBounds.Yc(pe)&&!a.usesSamePort(he)&&(pe=he.path,pe!==null&&pe.Ed()&&Tx(y,x,b,he))}}}}}return 0<b.length&&b.sort(function(ye,Te){return ye-Te}),b.length}function Tx(a,y,x,b){for(var E=Gt.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=lt.alloc(),he=1;he<te;he++){var pe=b.i(he);if(he<te-1){var ye=b.i(he+1);if(ne.y===pe.y&&pe.y===ye.y){if(pe.x>ne.x&&ye.x>=pe.x||pe.x<ne.x&&ye.x<=pe.x)continue}else if(ne.x===pe.x&&pe.x===ye.x&&(pe.y>ne.y&&ye.y>=pe.y||pe.y<ne.y&&ye.y<=pe.y))continue}e:{ye=a.x;var Te=a.y,Ge=y.x,Xe=y.y,Je=ne.x;ne=ne.y;var it=pe.x,Tt=pe.y;if(Gt.B(ye,Ge)){if(!Gt.B(Te,Xe)&&Gt.B(ne,Tt)&&Math.min(Te,Xe)<ne&&Math.max(Te,Xe)>ne&&Math.min(Je,it)<ye&&Math.max(Je,it)>ye&&!Gt.B(Je,it)){se.x=ye,se.y=ne,ye=!0;break e}}else if(Gt.B(Te,Xe)&&Gt.B(Je,it)&&Math.min(ye,Ge)<Je&&Math.max(ye,Ge)>Je&&Math.min(ne,Tt)<Te&&Math.max(ne,Tt)>Te&&!Gt.B(ne,Tt)){se.x=Je,se.y=Te,ye=!0;break e}se.x=0,se.y=0,ye=!1}ye&&(E?x.push(se.x):x.push(se.y)),ne=pe}lt.free(se)}function Jc(a){return a=a.curve,a===Rd||a===Eh}function Xm(a,y){(y||Jc(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&&Jc(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(!hr.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(hr.prototype.Zb.call(this,a),a&&Xm(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?tg:this.qk};function qp(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 pe=ne[he];(pe.ef===y&&pe.ff===b&&pe.uf===x&&pe.vf===E||pe.ef===x&&pe.ff===E&&pe.uf===y&&pe.vf===b)&&(te===null?te=pe:(a===null&&(a=[],a.push(te)),a.push(pe)))}if(a!==null){for(te=W1(y,x,b,E),te===null&&(te=new qm(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 eg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(nr(y.links,a),y.Sl()))}kn.prototype.ph=function(){return!0},vn.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&&Um(y,this,x),eg(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&&Gm(a,this,E),qp(this),this.C(1)),this.g("fromNode",y,a),Bd(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ts(x),eg(this),this.ff=a;var b=this.fromPort;b!==null&&Ts(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))),qp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Um(y,this,x),eg(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&&Gm(a,this,E),qp(this),this.C(1)),this.g("toNode",y,a),Bd(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ts(x),eg(this),this.vf=a;var b=this.toPort;b!==null&&Ts(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))),qp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Zo},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&&Ts(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&&Dn(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:Zo},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&&Ts(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&&Dn(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?Zr: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&&Qp(this.fromNode),this.toNode!==null&&Qp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Fr?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()===Gs&&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),Gt.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);Gt.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 lt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Hm(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);Gt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Gt.$(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 pn,b=0;b<a.length/2;b++)E=new lt(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(!en(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new pn,b=0;b<a.length;b++)E=a[b],x.add(new lt(E.x,E.y).freeze())}}else if(a instanceof pn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Ot("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Hm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ld(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||!Id(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Id(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(),Xm(this,y===Eh||y===Rd||a===Eh||a===Rd),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(),Xm(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 If=null,Rf=null,Jv=new Qt(kn,"Normal",1),Mx=new Qt(kn,"Orthogonal",2),Lx=new Qt(kn,"AvoidsNodes",6),nS=new Qt(kn,"AvoidsNodesStraight",7),Qa=new Qt(kn,"None",0),Gs=new Qt(kn,"Bezier",9),Eh=new Qt(kn,"JumpGap",10),Rd=new Qt(kn,"JumpOver",11),tg=new Qt(kn,"End",17),Ym=new Qt(kn,"Scale",18),$m=new Qt(kn,"Stretch",19),ng=new Qt(kn,"OrientAlong",21),rg=new Qt(kn,"OrientPlus90",22),ig=new Qt(kn,"OrientMinus90",23),Qv=new Qt(kn,"OrientOpposite",24),Jm=new Qt(kn,"OrientUpright",25),og=new Qt(kn,"OrientPlus90Upright",26),ag=new Qt(kn,"OrientMinus90Upright",27),Qm=new Qt(kn,"OrientUpright45",28),rS=16,iS=14,sg=8;kn.className="Link",kn.Normal=Jv,kn.Orthogonal=Mx,kn.AvoidsNodes=Lx,kn.AvoidsNodesStraight=nS,kn.None=Qa,kn.Bezier=Gs,kn.JumpGap=Eh,kn.JumpOver=Rd,kn.End=tg,kn.Scale=Ym,kn.Stretch=$m,kn.OrientAlong=ng,kn.OrientPlus90=rg,kn.OrientMinus90=ig,kn.OrientOpposite=Qv,kn.OrientUpright=Jm,kn.OrientPlus90Upright=og,kn.OrientMinus90Upright=ag,kn.OrientUpright45=Qm,kn.EndSegmentStep=8,kn.CurvinessStart=rS,kn.SpacingMin=iS,kn.OrthoShortCut=sg;function qm(a,y,x,b){xr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}qm.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},qm.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))}},qm.className="LinkBundle";function lg(a){xr(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}lg.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=qv,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 _d(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function bu(a,y,x){return _d(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}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]>=Qc&&(x[b]=qv)}lg.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]===kh)return!1}return!0};function Cu(a,y,x,b,E,te,ne,se,he){if(!(y<te||y>ne||x<se||x>he)){var pe=y|0,ye=x|0,Te=a.ac[pe][ye];if(Te>=Qc&&Te<zd)for(E?ye+=b:pe+=b,Te+=1;te<=pe&&pe<=ne&&se<=ye&&ye<=he&&!(Te>=a.ac[pe][ye]);)a.ac[pe][ye]=Te,Te+=1,E?ye+=b:pe+=b;if(pe=E?ye:pe,E)if(0<b)for(x+=b;x<pe;x+=b)Cu(a,y,x,1,!E,te,ne,se,he),Cu(a,y,x,-1,!E,te,ne,se,he);else for(x+=b;x>pe;x+=b)Cu(a,y,x,1,!E,te,ne,se,he),Cu(a,y,x,-1,!E,te,ne,se,he);else if(0<b)for(y+=b;y<pe;y+=b)Cu(a,y,x,1,!E,te,ne,se,he),Cu(a,y,x,-1,!E,te,ne,se,he);else for(y+=b;y>pe;y+=b)Cu(a,y,x,1,!E,te,ne,se,he),Cu(a,y,x,-1,!E,te,ne,se,he)}}function e0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var pe=kh,ye=Qc;for(a.ac[y][x]=ye;pe===kh&&y>te&&y<ne&&x>se&&x<he;)ye+=1,a.ac[y][x]=ye,E?x+=b:y+=b,pe=a.ac[y][x]}function t0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var pe=kh,ye=zd;for(a.ac[y][x]=ye;pe===kh&&y>te&&y<ne&&x>se&&x<he;)a.ac[y][x]=ye,E?x+=b:y+=b,pe=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(_d(a,se,he)){se-=a.Nd,se/=a.rc,he-=a.Od,he/=a.sc;var pe=b.x,ye=b.y;if(_d(a,pe,ye))if(pe-=a.Nd,pe/=a.rc,ye-=a.Od,ye/=a.sc,1>=Math.abs(se-pe)&&1>=Math.abs(he-ye))a.abort=!0;else{var Te=te.x;b=te.y,y=te.x+te.width;var Ge=te.y+te.height;Te-=a.Nd,Te/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,Ge-=a.Od,Ge/=a.sc,te=Math.max(0,Math.min(a.di,Te|0)),y=Math.min(a.di,Math.max(0,y|0)),Te=Math.max(0,Math.min(a.ei,b|0)),Ge=Math.min(a.ei,Math.max(0,Ge|0)),b=a.ac,se|=0,he|=0,pe|=0,ye|=0;var Xe=x===0||x===90?1:-1;if(x=x===90||x===270,b[se][he]===kh?(e0(a,se,he,Xe,x,te,y,Te,Ge),e0(a,se,he,1,!x,te,y,Te,Ge),e0(a,se,he,-1,!x,te,y,Te,Ge)):e0(a,se,he,Xe,x,se,he,se,he),b[pe][ye]===kh?(t0(a,pe,ye,E===0||E===90?1:-1,E===90||E===270,te,y,Te,Ge),t0(a,pe,ye,1,!(E===90||E===270),te,y,Te,Ge),t0(a,pe,ye,-1,!(E===90||E===270),te,y,Te,Ge)):t0(a,pe,ye,Xe,x,pe,ye,pe,ye),x=_n(),ne&&sS(a,pe,ye,E,se,he,x))for((x[0]!==pe||x[1]!==ye)&&(x.unshift(ye),x.unshift(pe)),(x[x.length-2]!==se||x[x.length-1]!==he)&&(x.push(se),x.push(he)),a=Qc,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],pe=x[te+1];y>E?E++:y<E?E--:pe>ne?ne++:pe<ne&&ne--,b[E][ne]=a++,E!==y||ne!==pe;);else Cu(a,se,he,1,!1,te,y,Te,Ge),Cu(a,se,he,-1,!1,te,y,Te,Ge),Cu(a,se,he,1,!0,te,y,Te,Ge),Cu(a,se,he,-1,!0,te,y,Te,Ge);Xn(x)}}}}function sS(a,y,x,b,E,te,ne){for(var se=a.ac,he=y,pe=x;;){if(he===E&&pe===te)return!0;var ye=he,Te=pe;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Te<te)Te++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Te>te)Te--;else break;var Ge=se[ye][Te];if(Ge===0||Ge===ey)break;he=ye,pe=Te}for(;;){if(ye=b,Te=he,Ge=pe,b===0?Ge<te?(ye=90,Ge++):Ge>te&&(ye=270,Ge--):b===90?Te<E?(ye=0,Te++):Te>E&&(ye=180,Te--):b===180?Ge<te?(ye=90,Ge++):Ge>te&&(ye=270,Ge--):Te<E?(ye=0,Te++):Te>E&&(ye=180,Te--),Te=se[Te][Ge],ye!==b&&Te!==0&&Te!==ey){if(ne.push(he),ne.push(pe),sS(a,he,pe,ye,E,te,ne))return!0;ne.pop(),ne.pop()}if(se[he][pe]=ey,b===0){if(he===y)return!1;he--}else if(b===90){if(pe===x)return!1;pe--}else if(b===180){if(he===y)return!1;he++}else{if(pe===x)return!1;pe++}}}vn.Object.defineProperties(lg.prototype,{bounds:{get:function(){return new Jt(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 kh=0,Qc=1,zd=999999,qv=zd+1,ey=zd+2;lg.className="PositionArray";function _f(){xr(this),this.port=this.node=null,this.pe=[],this.ap=!1}_f.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 Nx(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}_f.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 Lr?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($r,lt.alloc()),he=a.port.ga(Ni,lt.alloc());for(E=Jt.allocAt(se.x,se.y,0,0),E.Ye(he),lt.free(se),lt.free(he),se=lt.allocAt(E.x+E.width/2,E.y+E.height/2),he=a.port.li(),ne=ne.iterator;ne.next();){var pe=ne.value;if(pe.isVisible()&&pe.fromPort!==pe.toPort){var ye=pe.fromPort===a.port||pe.fromNode!==null&&pe.fromNode.Td(b),Te=pe.computeSpot(ye,a.port);if(Te.$c()&&(ye=ye?pe.toPort:pe.fromPort,ye!==null)){var Ge=ye.part;if(Ge!==null){var Xe=Ge.findVisibleNode();Xe!==null&&Xe!==Ge&&(Ge=Xe,ye=Ge.port),ye=pe.computeOtherPoint(Ge,ye),Ge=se.ab(ye),Ge-=he,0>Ge?Ge+=360:360<=Ge&&(Ge-=360),Te=Nx(E,Te,Ge,pe.isOrthogonal),Te===0?(Te=4,180<Ge&&(Ge-=360)):Te===90?(Te=8,270<Ge&&(Ge-=360)):Te===180?Te=2:(Te=1,90>Ge&&(Ge+=360)),Xe=a.pe[te],Xe===void 0?(Xe=new ty(pe,Ge,Te),a.pe[te]=Xe):(Xe.link=pe,Xe.angle=Ge,Xe.Nc=Te),Xe.hv.set(ye),te++}}}}for(lt.free(se),a.pe.sort(_f.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,Te=a.port,b=a.node.portSpreading,se=lt.alloc(),he=lt.alloc(),ne=lt.alloc(),pe=lt.alloc(),Te.ga($r,se),Te.ga(Ci,he),Te.ga(Ni,ne),Te.ga(zo,pe),Xe=Ge=ye=Te=0,b===Hv)for(var Je=0;Je<te.length;Je++){var it=te[Je];if(it!==null){var Tt=it.link.computeThickness();switch(it.Nc){case 8:Ge+=Tt;break;case 2:Xe+=Tt;break;case 1:Te+=Tt;break;default:case 4:ye+=Tt}}}var bt=Je=0,jt=1,Ft=it=0;for(Tt=0;Tt<te.length;Tt++){var It=te[Tt];if(It!==null){if(Je!==It.Nc){switch(Je=It.Nc,Je){case 8:var _t=ne;bt=pe;break;case 2:_t=pe,bt=se;break;case 1:_t=se,bt=he;break;default:case 4:_t=he,bt=ne}switch(it=bt.x-_t.x,Ft=bt.y-_t.y,Je){case 8:Ge>Math.abs(it)?(jt=Math.abs(it)/Ge,Ge=Math.abs(it)):jt=1;break;case 2:Xe>Math.abs(Ft)?(jt=Math.abs(Ft)/Xe,Xe=Math.abs(Ft)):jt=1;break;case 1:Te>Math.abs(it)?(jt=Math.abs(it)/Te,Te=Math.abs(it)):jt=1;break;default:case 4:ye>Math.abs(Ft)?(jt=Math.abs(Ft)/ye,ye=Math.abs(Ft)):jt=1}bt=0}var Vt=It.Zo;if(b===Hv){switch(It=It.link.computeThickness(),It*=jt,Vt.set(_t),Je){case 8:Vt.x=_t.x+it/2+Ge/2-bt-It/2;break;case 2:Vt.y=_t.y+Ft/2+Xe/2-bt-It/2;break;case 1:Vt.x=_t.x+it/2-Te/2+bt+It/2;break;default:case 4:Vt.y=_t.y+Ft/2-ye/2+bt+It/2}bt+=It}else{var Rn=.5;b===Wm&&(Rn=(It.Uo+1)/(It.Gl+1)),Vt.x=_t.x+it*Rn,Vt.y=_t.y+Ft*Rn}}}for(lt.free(se),lt.free(he),lt.free(ne),lt.free(pe),_t=a.pe,te=0;te<_t.length;te++)b=_t[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,Jt.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}_f.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},_f.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,jr,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)},_f.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new lt,this.Gl=this.Uo=0,this.Zo=new lt,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 so(a){xr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new lt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}so.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},so.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},so.prototype.qb=function(){},so.prototype.toString=function(){var a=ur(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},so.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())}}},so.prototype.createNetwork=function(){return new Zi(this)},so.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Zt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Lr?y.lg(a.memberParts):y.lg(a.iterator),y},so.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")}},so.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()}},so.prototype.doLayout=function(a){var y=new yn;a instanceof Zt?(ac(this,y,a.nodes,!0,this.rh,!0,!1,!0),ac(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Lr?ac(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},so.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;ug(se);var he=se.measuredBounds,pe=he.width;he=he.height,se.moveTo(b,E),se instanceof Lr&&(se.rh=!1),b+=Math.max(pe,50)+20,ne=Math.max(ne,Math.max(he,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},so.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)&&(ug(se),this.rh(se))){var he=se.measuredBounds,pe=he.width;he=he.height,se.moveTo(x,b),se instanceof Lr&&(se.rh=!1),x+=Math.max(pe,50)+20,te=Math.max(te,Math.max(he,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},so.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Lr&&a.rh)};function ac(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 Lr&&he.layout===null?ac(a,y,he.memberParts,!1,E,te,ne,se):(ug(he),y.add(he))):ne&&he instanceof kn?y.add(he):!se||!he.Zc()||he instanceof Gn||(ug(he),y.add(he)))}}function ug(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}so.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Jt),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},so.prototype.ex=function(a){var y=new yn;return a instanceof Zt?(ac(this,y,a.nodes,!0,null,!0,!0,!0),ac(this,y,a.links,!0,null,!0,!0,!0),ac(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Lr?ac(this,y,a.memberParts,!1,null,!0,!0,!0):ac(this,y,a.iterator,!1,null,!0,!0,!0),y},so.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($r),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},vn.Object.defineProperties(so.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())}}}),so.prototype.collectParts=so.prototype.ex,so.prototype.getLayoutBounds=so.prototype.ni,so.prototype.invalidateLayout=so.prototype.C,so.className="Layout";function Zi(a){xr(this),this.Sc=a,this.wf=new yn,this.ye=new yn,this.Es=new Yt,this.zs=new Yt}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 yn,this.ye=new yn,this.Es=new Yt,this.zs=new Yt},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 Ho(this)},Zi.prototype.createEdge=function(){return new Ms(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 Lr&&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},et=Zi.prototype,et.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},et.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},et.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}et.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},et.ki=function(a){return a===null?null:this.Es.I(a)},et.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}}et.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},et.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))}et.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},et.Lo=function(a){return a===null?null:this.zs.I(a)},et.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},et.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))}},et.Ko=function(){for(var a=_n(),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]);Xn(a)},Zi.prototype.deleteArtificialVertexes=function(){for(var a=_n(),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=_n(),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]);Xn(a),Xn(y)};function Ax(a){for(var y=_n(),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]);Xn(y)}Zi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new pn;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 yn,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},vn.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 Ho(a){xr(this),this.ob=a,this.j=new Jt(0,0,10,10).freeze(),this.o=new lt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new pn,this.mg=new pn}Ho.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new pn,this.mg=new pn},Ho.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+ei(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},Ho.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;en(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof Lr)){x=Jt.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Or);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Jt.free(x);return}Jt.free(x)}a.moveTo(y.x,y.y)}},Ho.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ho.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ho.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ho.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}vn.Object.defineProperties(Ho.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=Jt.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),Jt.free(x),!(a instanceof Lr)&&(a=a.locationObject.ga(Or),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 yn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new yn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new yn,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 pn,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}}}),Ho.prototype.deleteDestinationEdge=Ho.prototype.Jl,Ho.prototype.addDestinationEdge=Ho.prototype.zl,Ho.prototype.deleteSourceEdge=Ho.prototype.Kl,Ho.prototype.addSourceEdge=Ho.prototype.Cl,Ho.className="LayoutVertex",Ho.standardComparer=oy,Ho.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 Ms(a){xr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ms.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ms.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+ei(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},Ms.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ms.prototype.commit=function(){},Ms.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},vn.Object.defineProperties(Ms.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)}}}),Ms.prototype.getOtherVertex=Ms.prototype.Ax,Ms.className="LayoutEdge";function ha(a){so.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new ln(NaN,NaN).freeze(),this.tf=new ln(10,10).freeze(),this.Jb=hg,this.Rb=r0,this.nd=cg,this.hd=hS,a&&Object.assign(this,a)}tn(ha,so),ha.prototype.cloneProtected=function(a){so.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},ha.prototype.qb=function(a){a.classType===ha?a===cg||a===o0||a===ay||a===i0?this.sorting=a:a===r0||a===Il?this.arrangement=a:a===hg||a===n0?this.alignment=a:Ot("Unknown enum value: "+a):so.prototype.qb.call(this,a)},ha.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 Lr)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 i0:E.reverse();break;case cg:E.sort(this.comparer);break;case o0: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 n0:var se=y,he=x,pe=Jt.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Te=ye=0;Te<E.length;Te++){var Ge=this.ni(E[Te],pe);ye=Math.max(ye,Ge.width)}if(ye=Math.max(ye+se,1),Te=Math.max(this.cellSize.height,1),!isFinite(Te))for(Ge=Te=0;Ge<E.length;Ge++){var Xe=this.ni(E[Ge],pe);Te=Math.max(Te,Xe.height)}Te=Math.max(Te+he,1),Ge=this.arrangement;for(var Je=Xe=this.arrangementOrigin.x,it=this.arrangementOrigin.y,Tt=0,bt=0,jt=0;jt<E.length;jt++){var Ft=E[jt],It=this.ni(Ft,pe),_t=Math.ceil((It.width+se)/ye)*ye,Vt=Math.ceil((It.height+he)/Te)*Te;switch(Ge){case Il:var Rn=Math.abs(Je-It.width);break;default:Rn=Je+It.width}switch((0<te&&Tt>te-1||0<ne&&0<Tt&&Rn-Xe>ne)&&(b.push(new Jt(0,it,ne+se,bt)),Tt=0,Je=Xe,it+=bt,bt=0),bt=Math.max(bt,Vt),Ge){case Il:It=-It.width;break;default:It=0}switch(Ft.moveTo(Je+It,it),Ge){case Il:Je-=_t;break;default:Je+=_t}Tt++}b.push(new Jt(0,it,ne+se,bt)),Jt.free(pe);break;case hg:for(he=ne,ye=te,Te=y,Ge=x,ne=Jt.alloc(),Xe=Math.max(this.cellSize.width,1),te=it=pe=0,se=lt.alloc(),Je=0;Je<E.length;Je++)bt=E[Je],Tt=this.ni(bt,ne),bt=Ph(bt,bt.locationObject,bt.locationSpot,se),pe=Math.max(pe,bt.x),it=Math.max(it,Tt.width-bt.x),te=Math.max(te,bt.y);switch(Je=this.arrangement,Je){case Il:pe+=Te;break;default:it+=Te}Xe=isFinite(Xe)?Math.max(Xe+Te,1):Math.max(pe+it,1);var qn=bt=this.arrangementOrigin.x;for(jt=this.arrangementOrigin.y,it=0,he>=pe&&(he-=pe),pe=Ft=0,_t=Math.max(this.cellSize.height,1),It=te=0,Vt=!0,Tt=lt.alloc(),Rn=0;Rn<E.length;Rn++){var Yn=E[Rn],En=this.ni(Yn,ne),hn=Ph(Yn,Yn.locationObject,Yn.locationSpot,se);if(0<it)switch(Je){case Il:qn=(qn-bt-(En.width-hn.x))/Xe,qn=Gt.$(Math.round(qn),qn)?Math.round(qn):Math.floor(qn),qn=qn*Xe+bt;break;default:qn=(qn-bt+hn.x)/Xe,qn=Gt.$(Math.round(qn),qn)?Math.round(qn):Math.ceil(qn),qn=qn*Xe+bt}else switch(Je){case Il:Ft=qn+hn.x+En.width;break;default:Ft=qn-hn.x}switch(Je){case Il:var Mr=-(qn+hn.x)+Ft;break;default:Mr=qn+En.width-hn.x-Ft}if(0<ye&&it>ye-1||0<he&&0<it&&Mr>he){for(b.push(new Jt(0,Vt?jt-te:jt,he+Te,It+te+Ge)),qn=0;qn<it&&Rn!==it;qn++){Mr=E[Rn-it+qn];var Pr=Ph(Mr,Mr.locationObject,Mr.locationSpot,Tt);Mr.moveTo(Mr.position.x,Mr.position.y+te-Pr.y)}It+=Ge,jt=Vt?jt+It:jt+(It+te),it=It=te=0,qn=bt,Vt=!1}switch(qn===bt&&(pe=Je===Il?Math.max(pe,En.width-hn.x):Math.min(pe,-hn.x)),te=Math.max(te,hn.y),It=Math.max(It,En.height-hn.y),isFinite(_t)&&(It=Math.max(It,Math.max(En.height,_t)-hn.y)),Vt?Yn.moveTo(qn-hn.x,jt-hn.y):Yn.moveTo(qn-hn.x,jt),Je){case Il:qn-=hn.x+Te;break;default:qn+=En.width-hn.x+Te}it++}if(b.push(new Jt(0,jt,he+Te,(Vt?It:It+te)+Ge)),E.length!==it)for(he=0;he<it;he++)ye=E[E.length-it+he],Te=Ph(ye,ye.locationObject,ye.locationSpot,se),ye.moveTo(ye.position.x,ye.position.y+te-Te.y);if(lt.free(se),lt.free(Tt),Je===Il)for(E=0;E<b.length;E++)te=b[E],te.width+=pe,te.x-=pe;else for(E=0;E<b.length;E++)te=b[E],te.x>pe&&(te.width+=te.x-pe,te.x=pe);Jt.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===Il?this.commitLayers(b,new lt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new lt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},ha.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}vn.Object.defineProperties(ha.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!==hg&&a!==n0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==r0&&a!==Il||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==i0&&a!==cg&&a!==o0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var n0=new Qt(ha,"Position",0),hg=new Qt(ha,"Location",1),r0=new Qt(ha,"LeftToRight",2),Il=new Qt(ha,"RightToLeft",3),ay=new Qt(ha,"Forward",4),i0=new Qt(ha,"Reverse",5),cg=new Qt(ha,"Ascending",6),o0=new Qt(ha,"Descending",7);ha.className="GridLayout",ha.standardComparer=hS,ha.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},ha.Position=n0,ha.Location=hg,ha.LeftToRight=r0,ha.RightToLeft=Il,ha.Forward=ay,ha.Reverse=i0,ha.Ascending=cg,ha.Descending=o0;function Ti(){this.On=new yn,this.Dn=new yn,this.Pa=new yn,this.cf=new Yt,this.bf=new Yt,this.aj=new Yt,this.H=null,this.tp=!1}et=Ti.prototype,et.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},et.Xe=function(a){this.H=a},et.oi=function(a){if(a instanceof Gn){if(this.On.add(a),a instanceof Lr){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 di||this.Pa.add(a);y=a.data,y===null||a instanceof di||(a instanceof kn?this.bf.add(y,a):this.cf.add(y,a))},et.pc=function(a){if(a.Ej(),a instanceof Gn){if(this.On.remove(a),a instanceof Lr){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 di||this.Pa.remove(a);y=a.data,y===null||a instanceof di||(a instanceof kn?this.bf.remove(y):this.cf.remove(y))},et.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 Lr)&&Ot('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 Lr||Ot('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||Ot('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=_n(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=_n(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=_n(),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]);Xn(y),Xn(x),Xn(a)}},Ti.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Ti.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&&gd(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&&(dl(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)}}Ti.prototype.insertLink=function(){return null},Ti.prototype.resolveReferencesForData=function(){},Ti.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,Ln('No Group template found for category "'+x+'"'),Ln(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Ln('No Node template found for category "'+x+'"'),Ln(" Using default node template")),y=a.ny))),y}Ti.prototype.getLinkCategoryForData=function(){return""},Ti.prototype.setLinkCategoryForData=function(){},Ti.prototype.setFromNodeForLink=function(){},Ti.prototype.setToNodeForLink=function(){},Ti.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,Ln('No Link template found for category "'+a+'"'),Ln(" Using default link template")),x=y.my)),x},Ti.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Ti.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Ti.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ep(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Ti.prototype.unresolveReferencesForPart=function(){},Ti.prototype.removeDataForLink=function(){},Ti.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Ti.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)},Ti.prototype.findLinkForKey=function(){return null},et=Ti.prototype,et.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},et.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Gn?a:null)},et.Kc=function(a){return a===null?null:this.bf.I(a)},et.ms=function(a){for(var y=0;y<arguments.length;++y);y=new yn;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(en(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},et.ls=function(a){for(var y=0;y<arguments.length;++y);y=new yn;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(en(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(Un(te)){if(!Un(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(en(y)&&en(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}Ti.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===no){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===wo){var ne=a.newValue;b==="nodeDataArray"&&en(ne)&&cS(this,ne),y.isModified=!0}else if(x===Eo){var se=a.oldValue;b==="nodeDataArray"&&en(se)&&this.ip(se),y.isModified=!0}else x===Ea&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===no){var he=a.propertyName,pe=a.object;pe===y.model?(he==="nodeKeyProperty"||he==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(pe,he),y.isModified=!0}else if(x===wo||x===Eo){var ye=a.change===wo,Te=ye?a.newParam:a.oldParam,Ge=ye?a.newValue:a.oldValue,Xe=this.aj.I(a.object);if(Array.isArray(Xe))for(a=0;a<Xe.length;a++){var Je=Xe[a];if(ye)Cm(Je,Ge,Te,!0);else if(!(0>Te)){var it=Te+Vp(Je);Je.pc(it,!0),wv(Je,it,Te)}}y.isModified=!0}}finally{y.aa=!0}}}}},Ti.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)},Ti.prototype.rp=function(){for(var a=this.H.model,y=new yn,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()},Ti.prototype.refreshDataBoundLinks=function(){},Ti.prototype.updateRelationshipsFromData=function(){},Ti.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=_n()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Xn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Un(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){Zc(y,function(ne){ne=ne.O.s;for(var se=ne.length,he=0;he<se;he++)Np(x,ne[he])});var b=y.Hh;if(Un(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}}}}Ti.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Yt;if(Un(a))for(var E=0;E<a.length;E++)a0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)a0(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 yn;for(var te=new Yt,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 pe=se.pg();pe!==null&&(pe=b.I(pe),pe!==null?(x.qe(he.data,x.wa(pe.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 Yt;b.each(function(Te){Te.key.data!==null&&ye.add(Te.key.data,Te.value.data)}),x(ye,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function a0(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 hr))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 Lr&&te instanceof Lr)for(y=y.memberParts;y.next();)ne=a0(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=a0(a,y.value,x,b,E),ne!==null&&ne instanceof Gn&&(ne.labeledLink=te);return te}Ti.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),en(b)&&(E.xf(b),x=y.Lc(b)))}else dl(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)),en(E)&&(x.data=E)));return x},vn.Object.defineProperties(Ti.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}}}),Ti.prototype.updateAllRelationshipsFromData=Ti.prototype.rp,Ti.prototype.findLinksByExample=Ti.prototype.ls,Ti.prototype.findNodesByExample=Ti.prototype.ms,Ti.prototype.findLinkForData=Ti.prototype.Kc,Ti.prototype.findNodeForData=Ti.prototype.ii,Ti.prototype.findPartForData=Ti.prototype.Lc,Ti.prototype.findNodeForKey=Ti.prototype.Vb,Ti.prototype.removeModeledPart=Ti.prototype.ip,Ti.prototype.removeModeledParts=Ti.prototype.Gs,Ti.prototype.rebuildParts=Ti.prototype.Wd;var pS=!1,gS=!1,mS=!1;Ti.className="PartManager";function qo(a){Ti.apply(this,arguments)}tn(qo,Ti),qo.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},qo.prototype.addModeledParts=function(a){for(Ti.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Bd(a.value);gd(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),gd(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){dl(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=h0(x,y,!0);te!==""&&(E.fromPortId=te),te=Us(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof Gn&&(E.fromNode=te)),te=h0(x,y,!1),te!==""&&(E.toPortId=te),te=Us(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}}}}qo.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)})}qo.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},qo.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},qo.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},qo.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},qo.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},qo.prototype.findPartForKey=function(a){var y=Ti.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},qo.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},qo.prototype.doModelChanged=function(a){var y=this;if(Ti.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===no){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 pe=this.Kc(a.object);if(pe!==null){var ye=a.newValue;typeof ye=="string"&&(pe.fromPortId=ye)}}else if(E==="linkToPortId"){var Te=this.Kc(a.object);if(Te!==null){var Ge=a.newValue;typeof Ge=="string"&&(Te.toPortId=Ge)}}else if(E==="nodeGroupKey"){var Xe=this.Lc(a.object);if(Xe!==null){var Je=a.newValue;if(Je!==void 0){var it=this.Vb(Je);it instanceof Lr?Xe.containingGroup=it:Xe.containingGroup=null}else Xe.containingGroup=null}}else if(E==="linkLabelKeys"){var Tt=this.Kc(a.object);if(Tt!==null){var bt=a.oldValue,jt=a.newValue;Array.isArray(bt)&&bt.forEach(function(hn){0<=jt.indexOf(hn)||(hn=y.Vb(hn),hn!==null&&(hn.labeledLink=null))}),Array.isArray(jt)&&jt.forEach(function(hn){hn=y.Vb(hn),hn!==null&&(hn.labeledLink=Tt)})}}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===wo){var _t=a.newValue;if(E==="linkDataArray"&&typeof _t=="object"&&_t!==null)yS(this,_t);else if(E==="linkLabelKeys"&&lc(_t)){var Vt=this.Kc(a.object),Rn=this.Vb(_t);Vt!==null&&Rn!==null&&(Rn.labeledLink=Vt)}x.isModified=!0}else if(b===Eo){var qn=a.oldValue;if(E==="linkDataArray"&&typeof qn=="object"&&qn!==null)this.ip(qn);else if(E==="linkLabelKeys"&&lc(qn)){var Yn=this.Vb(qn);Yn!==null&&(Yn.labeledLink=null)}x.isModified=!0}}else if(b===no){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}}}}},qo.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new yn,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){AS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&NS(y,te,!1)})},qo.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=Us(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Us(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 yn().addAll(y);var ne=new yn;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 di)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof Lr)&&(a.containingGroup=y)}}},qo.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 Lr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof Gn&&(Us(y,ne,!0)===x&&(te.link.fromNode=E),Us(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}}_l(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Lr&&(E.containingGroup=a))}},qo.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();)Rl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Rl(y,x,b.data)),a instanceof Lr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Rl(y,x,b)}}},qo.prototype.copyPartData=function(a,y){var x=Ti.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},qo.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(dl(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&&(dl(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&&Ud(te,b,te.wa(a.data),!0),Wd(te,b,se,!0),x!==null&&Ud(te,b,te.wa(x.data),!1),Wd(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},qo.prototype.findLinkForKey=qo.prototype.findLinkForKey,qo.prototype.findPartForKey=qo.prototype.findPartForKey,qo.prototype.removeAllModeledParts=qo.prototype.removeAllModeledParts,qo.prototype.addModeledParts=qo.prototype.addModeledParts,qo.prototype.addAllModeledParts=qo.prototype.addAllModeledParts,qo.className="GraphLinksPartManager";function el(){Ti.apply(this,arguments),this.Sg=null}tn(el,Ti);function s0(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||!Wa(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(dl(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}}}el.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},el.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},el.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}},el.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))},el.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},el.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},el.prototype.doModelChanged=function(a){if(Ti.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===no){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:s0(this,te,ne)}}else if(b==="parentLinkCategory"){var he=this.ii(a.object),pe=a.newValue;if(he!==null&&typeof pe=="string"){var ye=he.kh();ye!==null&&(ye.category=pe)}}y.isModified=!0}}else if(x===no){var Te=a.propertyName;a.object===y.model&&Te==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},el.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:s0(this,y,a):b!==null&&Ep(x,b,!1)))}}},el.prototype.updateDataBindings=function(a,y){Ti.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},el.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&&s0(this,E,this.ii(te))}_l(y,x)}a=y.mh(a),a!==void 0&&E instanceof Gn&&(a=this.Vb(a),s0(this,a,E))}},el.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(Eo,"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)&&Rl(y,x,E)}},el.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},el.prototype.findLinkForKey=el.prototype.findLinkForKey,el.className="TreePartManager";function ir(a,y){this.kl=new yn,this.il=new yn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,xr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Yt,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 Yt,this.Lt=new pn,this.Wg=!1,this.o=null,this.undoManager=new ho,a!==void 0&&(Un(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ir.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},ir.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ir.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ir.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)+":"+zr(E)}}return y},ir.prototype.xA=function(a){a.change!==Ea&&Ot("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Uo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ir.prototype.Qv=function(a,y){var x=this,b=!1,E=new yn,te=new yn,ne=new yn,se=this.vh;a.changes.each(function(Te){Te.model===x&&(Te.modelChange==="nodeDataArray"?Te.change===wo?E.add(Te.newValue):Te.change===Eo&&ne.add(Te.oldValue):x.lb(Te.object)?te.add(Te.object):Te.change!==no||x.modelData!==Te.object&&Te.propertyName!=="modelData"?Te.object!==null&&(se&&se.contains(Te.object)?se.get(Te.object).each(function(Ge){x.lb(Ge)&&te.add(Ge)}):Te.object instanceof ir||x.ri()&&x.Jc(Te.object)||PS(x,Te.object).each(function(Ge){te.add(Ge)})):b=!0)});var he=this.il;he.clear(),E.each(function(Te){he.add(x.wa(Te)),y||te.add(Te)});var pe=this.kl;pe.clear(),ne.each(function(Te){pe.add(x.wa(Te)),y&&te.add(Te)}),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<pe.count&&(ye===null&&(ye={}),y?ye.insertedNodeKeys=pe.Fa():ye.removedNodeKeys=pe.Fa()),pe.clear(),he.clear(),ye},ir.prototype.cloneDeep=function(a){return Gd(this,a,!0)};function Gd(a,y,x,b,E,te){function ne(Te,Ge){se?(Te.__gohashid===void 0&&te.push(Te),b.set(Te,Ge)):(Te=Wi++,b.set(Te,Ge),E.set(Te,y))}if(!en(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new Yt),se){var he=b.get(y);if(he)return he}else for(E||(E=new Yt),he=E.iterator;he.next();){var pe=he.key;if(he.value===y&&(pe=b.get(pe)))return pe}if(Array.isArray(y)){he=[],ne(y,he);for(var ye=0;ye<y.length;ye++)he.push(Gd(a,y[ye],!1,b,E,te))}else if(y instanceof lt||y instanceof ln||y instanceof Jt||y instanceof Br||y instanceof er)he=y.copy(),ne(y,he);else{if(y instanceof Ei||y instanceof Cn||y instanceof Qt)return y;if(y instanceof pn)he=new pn().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof yn)he=new yn().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Yt)he=new Yt().addAll(Gd(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]=Gd(a,y[ye],!1,b,E,te))}return x&&te.forEach(function(Te){delete Te.__gohashid}),he}et=ir.prototype,et.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},et.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},et.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,en(y)&&(a.dm(y),a.modelData=y)}et.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!bS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+hy(this,this.modelData)),a+`,
"nodeDataArray": `+sc(this,this.nodeDataArray,!0)},et.kv=function(a){xS(this,a),a=a.nodeDataArray,Un(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 yn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new Yt,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===no?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===wo||te===Eo)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function PS(a,y){for(var x=new yn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];l0(a,y,E,E,x)}return x}function l0(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(l0(a,y,ne,b,E))return!0}else if(en(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(l0(a,y,ne,b,E))return!0}return!1}et.Pv=function(a,y){var x=this,b=!1,E=new yn,te=new yn,ne=new yn,se=this.vh;a.changes.each(function(ye){ye.model===x&&(ye.modelChange==="nodeDataArray"?ye.change===wo?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):x.lb(ye.object)?te.add(ye.object):ye.change!==no||x.modelData!==ye.object&&ye.propertyName!=="modelData"?ye.object!==null&&(se&&se.contains(ye.object)?se.get(ye.object).each(function(Te){x.lb(Te)&&te.add(Te)}):ye.object instanceof ir||x.ri()&&x.Jc(ye.object)||PS(x,ye.object).each(function(Te){te.add(Te)})):b=!0)});var he=this.il;he.clear(),E.each(function(ye){he.add(x.wa(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.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)+sc(this,he.Fa(),!0)),0<te.count&&(a+=this.jy+sc(this,te.Fa(),!0)),0<pe.count&&(a+=(y?this.Wv:this.Yv)+sc(this,pe.Fa(),!0)),pe.clear(),he.clear(),a},et.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)&&Ot("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Yt;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)},et.$x=function(a,y){a.change!==Ea&&Ot("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Uo?(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 }'},et.yA=function(a,y){return this.$x(a,y)},et.np=function(a){return a===void 0&&(a=dg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},et.toJSON=function(a){return this.np(a)},et.Zw=function(a){var y=null;if(typeof a=="string")try{y=Mn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Ot("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Ot("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},et.Ky=function(a){return this.Zw(a)},ir.constructGraphLinksModel=function(){return new ir},et=ir.prototype,et.dm=function(a){if(Un(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(en(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Ot("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(en(a)){for(y in a)if(x=a[y],en(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new pn,b=0;b<x.length/2;b++)E.add(new lt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},et.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()):Un(a)?sc(this,a):en(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function sc(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new yr;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 bS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function qa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof lt)y={class:"go.Point",x:qa(x.x),y:qa(x.y)};else if(x instanceof ln)y={class:"go.Size",width:qa(x.width),height:qa(x.height)};else if(x instanceof Jt)y={class:"go.Rect",x:qa(x.x),y:qa(x.y),width:qa(x.width),height:qa(x.height)};else if(x instanceof Br)y={class:"go.Margin",top:qa(x.top),right:qa(x.right),bottom:qa(x.bottom),left:qa(x.left)};else if(x instanceof er)x.sb()?y={class:"go.Spot",x:qa(x.x),y:qa(x.y),offsetX:qa(x.offsetX),offsetY:qa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ei){if(y={class:"go.Brush",type:x.type.name},x.type===Sh?y.color=x.color:(x.type===Hu||x.type===Js)&&(y.start=x.start,y.end=x.end,x.type===Js&&(x.startRadius!==0&&(y.startRadius=qa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=qa(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 Cn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=qa(x.startX)),x.startY!==0&&(y.startY=qa(x.startY)),x.endX!==0&&(y.endX=qa(x.endX)),x.endY!==0&&(y.endY=qa(x.endY)),x.spot1.D($r)||(y.spot1=x.spot1),x.spot2.D(Ni)||(y.spot2=x.spot2),x.type===Cn.o&&(y.path=Cn.ia(x))):x instanceof Qt&&(y={class:"go.EnumValue",classType:dg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=Co(y,E);if(!bS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof pn){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 es(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function jx(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 lt(es(a.x),es(a.y));else if(y==="Size")x=new ln(es(a.width),es(a.height));else if(y==="Rect")x=new Jt(es(a.x),es(a.y),es(a.width),es(a.height));else if(y==="Margin")x=new Br(es(a.top),es(a.right),es(a.bottom),es(a.left));else if(y==="Spot")typeof a.enum=="string"?x=io(a.enum):x=new er(es(a.x),es(a.y),es(a.offsetX),es(a.offsetY));else if(y==="Brush"){if(x=new Ei,x.type=or(Ei,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof er&&(x.start=a.start),a.end instanceof er&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=es(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=es(a.endRadius)),a=a.colorStops,en(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Cn.parse(a.path):x=new Cn,x.type=or(Cn,a.type),typeof a.startX=="number"&&(x.startX=es(a.startX)),typeof a.startY=="number"&&(x.startY=es(a.startY)),typeof a.endX=="number"&&(x.endX=es(a.endX)),typeof a.endY=="number"&&(x.endY=es(a.endY)),a.spot1 instanceof er&&(x.spot1=a.spot1),a.spot2 instanceof er&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=or(b,a.name)));return x}et.Pe=function(a){return this.Lt.add(a),this},et.ik=function(a){this.Lt.remove(a)},et.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)},et.cb=function(a,y,x,b,E,te,ne){Ro(this,"",a,y,x,b,E,te,ne)},et.g=function(a,y,x,b,E){Ro(this,"",no,a,this,y,x,b,E)},et.Fs=function(a,y,x,b,E,te){Ro(this,"",no,y,a,x,b,E,te)};function Ro(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var pe=new oo;pe.model=a,pe.change=x,pe.modelChange=y,pe.propertyName=b,pe.object=E,pe.oldValue=te,pe.oldParam=se,pe.newValue=ne,pe.newParam=he,a.ds(pe)}ir.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===no){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)),ro(x,b,E)}else a.change===wo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,en(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&nr(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&An(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Un(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),Un(b)&&typeof x=="number"&&(a=a.newValue,y?nr(b,x):An(b,x,a))):Ot("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Eo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,en(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&An(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&nr(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Un(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),Un(b)&&typeof x=="number"&&(a=a.oldValue,y?An(b,x,a):nr(b,x))):Ot("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ea&&Ot("unknown ChangedEvent: "+a.toString())},ir.prototype.Ea=function(a){return this.undoManager.Ea(a)},ir.prototype.eb=function(a){return this.undoManager.eb(a)},ir.prototype.Kf=function(){return this.undoManager.Kf()},ir.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}},et=ir.prototype,et.La=function(a,y){y===void 0&&(y=""),Ro(this,"SourceChanged",Ea,y,a,null,null)},et.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;Ot("Key value for node data "+a+" is not a number or a string: "+y)}}},et.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=Co(a,x);b!==y&&this.hc(y)===null&&(ro(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ro(this,"nodeKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else ro(a,x,y)}};function lc(a){return typeof a=="number"||typeof a=="string"}et.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},et.hc=function(a){return a===null&&Ot("Model.findNodeDataForKey:key must not be null"),a!==void 0&&lc(a)?this.kb.I(a):null},et.$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))){ro(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;ro(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;ro(a,y,x)}}}}},et.xf=function(a){a!==null&&(hi(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&&Ot("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,An(a.Tc,b,y)),Ro(a,"nodeDataArray",wo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}et.Fy=function(a){if(Un(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)},et.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;nr(a.Tc,b)}Ro(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,b,null),a.qp(y)}et.nA=function(a){if(Un(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)},et.$z=function(a){if(a!==this.nodeDataArray&&Un(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()}},et.jp=function(a,y){y!==void 0&&(a=fg(this,a),a instanceof yn&&this.Vf.add(y,a))},et.Lv=function(){},et.fm=function(){},et.em=function(){},et.qp=function(){};function Rl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new yn,a.Vf.add(y,b)),b.add(x)}}function _l(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof yn&&(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 yn?a:null)}et.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ir.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):u0(this,a,!0),en(a)&&xr(a),a};function u0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=u0(a,y[x],a.copiesArrayObjects);b.push(E)}return xr(b),b}if(x&&en(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=Co(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 ir||te instanceof ho||te instanceof Uo||te instanceof oo||(te=u0(a,te,!1)),ro(x,b,te)}return xr(x),x}return y instanceof lt||y instanceof ln||y instanceof Jt||y instanceof er||y instanceof Br?y.copy():y}ir.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 zt&&(kS=!0,Ln('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Ln(" Is that really your intent?"));var b=Co(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},et=ir.prototype,et.set=function(a,y,x){this.setDataProperty(a,y,x)},et.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])}},et.Ay=function(a,y){this.ts(a,-1,y)},et.ts=function(a,y,x){0>y&&(y=a.length),An(a,y,x),Ro(this,"",wo,"",a,null,x,null,y)},et.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Ot("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];nr(a,y),Ro(this,"",Eo,"",a,x,null,y,null)},et.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Co(a,y),y===void 0))return"";if(typeof y=="string")return y;Ot("getCategoryForNodeData found a non-string category for "+a+": "+y)},et.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"nodeCategory",no,x,a,b,y))}else ro(a,x,y)}},et.lm=function(a,y){this.jm(y,this.Ro(a))},et.Tl=function(){return!1},et.Wj=function(){return!1},et.ri=function(){return!1},et.xs=function(){return!1},et.Xj=function(){return!1};function cy(){return new ir}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 kl[a]?kl[a]:Mn.go!==void 0&&Mn.go[a]?Mn.go[a]:null}function Co(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 ro(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){}}vn.Object.defineProperties(ir.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===""&&Ot("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Ot("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];en(E)||Ot("Model.nodeDataArray must only contain Objects, not: "+E),hi(E)}for(this.Tc=a,b=new pn,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(Ro(this,"nodeDataArray",no,"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"}}}),ir.prototype.setCategoryForNodeData=ir.prototype.jm,ir.prototype.getCategoryForNodeData=ir.prototype.Ro,ir.prototype.removeArrayItem=ir.prototype.ov,ir.prototype.insertArrayItem=ir.prototype.ts,ir.prototype.addArrayItem=ir.prototype.Ay,ir.prototype.assignAllDataProperties=ir.prototype.Do,ir.prototype.set=ir.prototype.set,ir.prototype.clearUnresolvedReferences=ir.prototype.Qy,ir.prototype.mergeNodeDataArray=ir.prototype.$z,ir.prototype.removeNodeDataCollection=ir.prototype.nA,ir.prototype.removeNodeData=ir.prototype.cm,ir.prototype.addNodeDataCollection=ir.prototype.Fy,ir.prototype.addNodeData=ir.prototype.xf,ir.prototype.makeNodeDataKeyUnique=ir.prototype.$u,ir.prototype.findNodeDataForKey=ir.prototype.hc,ir.prototype.containsNodeData=ir.prototype.lb,ir.prototype.setKeyForNodeData=ir.prototype.km,ir.prototype.getKeyForNodeData=ir.prototype.wa,ir.prototype.updateTargetBindings=ir.prototype.La,ir.prototype.commit=ir.prototype.commit,ir.prototype.rollbackTransaction=ir.prototype.Kf,ir.prototype.commitTransaction=ir.prototype.eb,ir.prototype.startTransaction=ir.prototype.Ea,ir.prototype.raiseDataChanged=ir.prototype.Fs,ir.prototype.raiseChanged=ir.prototype.g,ir.prototype.raiseChangedEvent=ir.prototype.cb,ir.prototype.removeChangedListener=ir.prototype.ik,ir.prototype.addChangedListener=ir.prototype.Pe,ir.prototype.writeJsonValue=ir.prototype.sm,ir.prototype.replaceJsonObjects=ir.prototype.dm,ir.prototype.applyIncrementalJSON=ir.prototype.Ky,ir.prototype.applyIncrementalJson=ir.prototype.Zw,ir.prototype.toJSON=ir.prototype.toJSON,ir.prototype.toJson=ir.prototype.np,ir.prototype.toIncrementalJSON=ir.prototype.yA,ir.prototype.toIncrementalJson=ir.prototype.$x,ir.prototype.toIncrementalData=ir.prototype.xA,ir.prototype.clear=ir.prototype.clear;var kS=!1,kl={};ir.className="Model",ir.fromJSON=ir.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Mn.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Ot("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=Mn[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof ir?y=a:Ot("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ir.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ir.safePropertyValue=Co,ir.safePropertySet=ro,kl.Brush=Ei,kl.ChangedEvent=oo,kl.Geometry=Cn,kl.Margin=Br,kl.Panel=Pn,kl.Point=lt,kl.Rect=Jt,kl.Size=ln,kl.Spot=er,kl.Transaction=Uo,kl.UndoManager=ho;function Mo(a,y,x,b){xr(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=MS,this.wk=null):(this.el=pg,this.wk=b),this.st=new yn}Mo.prototype.copy=function(){var a=new Mo;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},et=Mo.prototype,et.qb=function(a){a.classType===Mo&&(this.mode=a)},et.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.Kx=function(a){return a===void 0&&(a=null),this.mode=pg,this.backConverter=a,this},et.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},et.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function TS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}et.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==="")Ln("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=Co(y,b)),te!==void 0)if(E===null)x!==""&&ro(a,x,te);else try{if(x!==""){var ne=E(te,a);ro(a,x,ne)}else E(te,a)}catch(se){}}}},et.sp=function(a,y,x,b){if(this.el===pg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=Co(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):ro(y,x,ne);else if(he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var pe=b.itemIndex,ye=b.panel.itemArray;he.ov(ye,pe),he.ts(ye,pe,ne)}}else try{if(x!==""){var Te=te(ne,y,he);he!==null?he.setDataProperty(y,x,Te):ro(y,x,Te)}else{var Ge=te(ne,y,he);if(Ge!==void 0&&he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Xe=b.itemIndex,Je=b.panel.itemArray;he.ov(Je,Xe),he.ts(Je,Xe,Ge)}}}catch(it){}}finally{this.st.remove(a)}}}},vn.Object.defineProperties(Mo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Kt(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Kt(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Kt(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Kt(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Kt(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Kt(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Kt(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Kt(this),this.el=a}}}),Mo.prototype.updateSource=Mo.prototype.sp,Mo.prototype.updateTarget=Mo.prototype.Mv,Mo.prototype.ofModel=Mo.prototype.dA,Mo.prototype.ofObject=Mo.prototype.cp,Mo.prototype.makeTwoWay=Mo.prototype.Kx;var Ox="Binding",MS=new Qt(Mo,"OneWay",1),pg=new Qt(Mo,"TwoWay",2);Mo.className="Binding",Mo.parseEnum=function(a,y){return function(x){return x=or(a,x),x===null?y:x}},Mo.toString=zr,Mo.OneWay=MS,Mo.TwoWay=pg;function ri(a,y,x){ir.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new yn,this.wb=new Yt,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&&(Un(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}tn(ri,ir),ri.constructGraphLinksModel=ir.constructGraphLinksModel,ri.prototype.cloneProtected=function(a){ir.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},et=ri.prototype,et.clear=function(){ir.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},et.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)+":"+zr(E)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Us(this,E,!0)+"-->"+Us(this,E,!1)}return y},et.Qv=function(a,y){this.linkKeyProperty===""&&Ot("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ir.prototype.Qv.call(this,a,y),b=this,E=new yn,te=new yn,ne=new yn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===wo?E.add(ye.newValue):ye.change===Eo&&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(Te){b.Jc(Te)&&te.add(Te)}):ye.object instanceof ir||b.lb(ye.object)||LS(b,ye.object).each(function(Te){te.add(Te)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.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<pe.count&&(x===null&&(x={}),y?x.insertedLinkKeys=pe.Fa():x.removedLinkKeys=pe.Fa()),pe.clear(),he.clear(),x},et.rm=function(){var a=ir.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},et.gp=function(a){ir.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)},et.Rv=function(){var a=ir.prototype.Rv.call(this),y=`,
"linkDataArray": `+sc(this,this.linkDataArray,!0);return a+y},et.kv=function(a){ir.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 yn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];l0(a,y,E,E,x)}return x}et.Pv=function(a,y){this.linkKeyProperty===""&&Ot("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ir.prototype.Pv.call(this,a,y),b=this,E=new yn,te=new yn,ne=new yn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===wo?E.add(ye.newValue):ye.change===Eo&&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(Te){b.Jc(Te)&&te.add(Te)}):ye.object instanceof ir||b.lb(ye.object)||LS(b,ye.object).each(function(Te){te.add(Te)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.add(b.Ac(ye)),y&&te.add(ye)}),a=x,0<he.count&&(a+=(y?this.Xv:this.Vv)+sc(this,he.Fa(),!0)),0<te.count&&(a+=this.iy+sc(this,te.Fa(),!0)),0<pe.count&&(a+=(y?this.Vv:this.Xv)+sc(this,pe.Fa(),!0)),pe.clear(),he.clear(),a},et.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)&&Ot("applyIncrementalJson cannot change Model properties"),ir.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]);jS(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)},ri.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===no){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),ro(x,b,E);return}}else if(a.change===wo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,en(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===Eo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,en(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}}ir.prototype.changeState.call(this,a,y)}},et=ri.prototype,et.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),ro(x,this.nodeKeyProperty,a),this.xf(x))}return a}},et.yx=function(a){return Us(this,a,!0)},et.wv=function(a,y){Ud(this,a,y,!0)},et.Bx=function(a){return Us(this,a,!1)},et.Bv=function(a,y){Ud(this,a,y,!1)};function Us(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Co(y,a),a!==void 0))){if(lc(a))return a;Ot((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ud(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=Co(y,E);te!==x&&(_l(a,te,y),ro(y,E,x),a.hc(x)===null&&Rl(a,x,y),Ro(a,b?"linkFromKey":"linkToKey",no,E,y,te,x),typeof E=="string"&&a.La(y,E))}else ro(y,E,x)}}et.zx=function(a){return h0(this,a,!0)},et.xv=function(a,y){Wd(this,a,y,!0)},et.Cx=function(a){return h0(this,a,!1)},et.Cv=function(a,y){Wd(this,a,y,!1)};function h0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Co(y,a),y===void 0?"":y)}function Wd(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=Co(y,E);te===void 0&&(te=""),te!==x&&(ro(y,E,x),Ro(a,b?"linkFromPortId":"linkToPortId",no,E,y,te,x),typeof E=="string"&&a.La(y,E))}else ro(y,E,x)}}et.Ef=function(a){if(a===null)return c0;var y=this.je;return y===""?c0:(a=Co(a,y),a===void 0?c0:a)},et.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=Co(a,x);if(b===void 0&&(b=c0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)_l(this,b[te],a);for(ro(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Rl(this,ne,a)}Ro(this,"linkLabelKeys",no,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else ro(a,x,y)}},et.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Co(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&&Rl(this,y,a),Ro(this,"linkLabelKeys",wo,x,a,null,y,null,E)))}else Ot(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},et.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=Co(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(_l(this,y,a),Ro(this,"linkLabelKeys",Eo,x,a,y,null,E,null)))}else b!==void 0&&Ot(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},et.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;Ot("Key value for link data "+a+" is not a number or a string: "+y)}}},et.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=Co(a,x);b!==y&&this.jh(y)===null&&(ro(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ro(this,"linkKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},et.jh=function(a){return a===null&&Ot("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&lc(a)?this.wb.I(a):null},et.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))){ro(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;ro(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ro(a,y,x)}}}}},et.Jc=function(a){return a===null?!1:this.$f.contains(a)},et.fi=function(a){a!==null&&(hi(a),this.Jc(a)||NS(this,a,!0))};function NS(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&&Ot("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)),Ro(a,"linkDataArray",wo,"linkDataArray",a,null,y,null,b),dy(a,y)}et.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)},et.bm=function(a){a!==null&&AS(this,a,!0)};function AS(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(Ro(a,"linkDataArray",Eo,"linkDataArray",a,y,null,b,null),x=Us(a,y,!0),_l(a,x,y),x=Us(a,y,!1),_l(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],_l(a,x,y)}et.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)},et.Zz=function(a){if(this.linkKeyProperty===""&&Ot("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Un(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),jS(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=Us(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Rl(a,x,y),x=Us(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Rl(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&&Rl(a,x,y)}et.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):u0(this,a,!0),en(a)&&(xr(a),this.lf!==""&&ro(a,this.lf,void 0),this.mf!==""&&ro(a,this.mf,void 0),this.je!==""&&ro(a,this.je,[])),a},et.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Co(a,y)},et.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;Ot("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},et.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=Co(a,x);b!==y&&(_l(this,b,a),ro(a,x,y),this.hc(y)===null&&Rl(this,y,a),Ro(this,"nodeGroupKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},ri.prototype.copyNodeData=function(a){return a===null?null:(a=ir.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Co(a,this.Je)===void 0||ro(a,this.Je,void 0),a)},ri.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){Ud(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ud(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Wd(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Wd(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=Co(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},et=ri.prototype,et.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&&Co(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},et.jp=function(a,y){ir.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(Us(this,b,!0)===E){var ne=this.lf;ro(b,ne,te),Ro(this,"linkFromKey",no,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Us(this,b,!1)===E&&(ne=this.mf,ro(b,ne,te),Ro(this,"linkToKey",no,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,pe=0;pe<se;pe++)ne[pe]===E&&(ne[pe]=te,Ro(this,"linkLabelKeys",wo,he,b,E,te,pe,pe))}},et.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;ro(a,b,x),Ro(this,"nodeGroupKey",no,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.Lv=function(){ir.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},et.fm=function(a){ir.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=_n();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ro(this,"nodeGroupKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Us(this,b,!0)===a&&(E=this.lf,Ro(this,"linkFromKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Us(this,b,!1)===a&&(E=this.mf,Ro(this,"linkToKey",no,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&&(Ro(this,"linkLabelKeys",wo,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)_l(this,a,x[y]);Xn(x)}},et.em=function(a){ir.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Rl(this,y,a)},et.qp=function(a){ir.prototype.qp.call(this,a);var y=this.lh(a);_l(this,y,a)},et.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Co(a,y),y===void 0))return"";if(typeof y=="string")return y;Ot("getCategoryForLinkData found a non-string category for "+a+": "+y)},ri.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ri.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"linkCategory",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},ri.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},et=ri.prototype,et.lm=function(a,y){ir.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function jS(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))}et.Wj=function(){return!0},et.ri=function(){return!0},et.xs=function(){return!0},et.Xj=function(){return!0},vn.Object.defineProperties(ri.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];en(E)||Ot("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),hi(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new pn,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 yn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ro(this,"linkDataArray",no,"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"}}}),ri.prototype.setCategoryForLinkData=ri.prototype.lp,ri.prototype.getCategoryForLinkData=ri.prototype.ps,ri.prototype.assignAllDataProperties=ri.prototype.Do,ri.prototype.setGroupKeyForNodeData=ri.prototype.mp,ri.prototype.getGroupKeyForNodeData=ri.prototype.lh,ri.prototype.isGroupForNodeData=ri.prototype.Yu,ri.prototype.copyLinkData=ri.prototype.Jo,ri.prototype.mergeLinkDataArray=ri.prototype.Zz,ri.prototype.removeLinkDataCollection=ri.prototype.lA,ri.prototype.removeLinkData=ri.prototype.bm,ri.prototype.addLinkDataCollection=ri.prototype.Ey,ri.prototype.addLinkData=ri.prototype.fi,ri.prototype.containsLinkData=ri.prototype.Jc,ri.prototype.makeLinkDataKeyUnique=ri.prototype.Bs,ri.prototype.findLinkDataForKey=ri.prototype.jh,ri.prototype.setKeyForLinkData=ri.prototype.Ks,ri.prototype.getKeyForLinkData=ri.prototype.Ac,ri.prototype.removeLabelKeyForLinkData=ri.prototype.Qx,ri.prototype.addLabelKeyForLinkData=ri.prototype.Bu,ri.prototype.setLabelKeysForLinkData=ri.prototype.Ls,ri.prototype.getLabelKeysForLinkData=ri.prototype.Ef,ri.prototype.setToPortIdForLinkData=ri.prototype.Cv,ri.prototype.getToPortIdForLinkData=ri.prototype.Cx,ri.prototype.setFromPortIdForLinkData=ri.prototype.xv,ri.prototype.getFromPortIdForLinkData=ri.prototype.zx,ri.prototype.setToKeyForLinkData=ri.prototype.Bv,ri.prototype.getToKeyForLinkData=ri.prototype.Bx,ri.prototype.setFromKeyForLinkData=ri.prototype.wv,ri.prototype.getFromKeyForLinkData=ri.prototype.yx,ri.prototype.clear=ri.prototype.clear;var c0=Object.freeze([]);ri.className="GraphLinksModel",kl.GraphLinksModel=ri,ir.constructGraphLinksModel=ir.constructGraphLinksModel=function(){return new ri},ir.initDiagramModel=cy=function(){return new ri};function ts(a,y){ir.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Un(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}tn(ts,ir),ts.constructGraphLinksModel=ir.constructGraphLinksModel,ts.prototype.cloneProtected=function(a){ir.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},et=ts.prototype,et.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)+":"+zr(E)}}return y},et.rm=function(){var a=ir.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},et.gp=function(a){ir.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},et.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Ot("applyIncrementalJson cannot change Model properties"),ir.prototype.fp.call(this,a)},et.Vl=function(a){return a},et.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Co(a,y),y!==void 0)){if(lc(y))return y;Ot("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},et.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=Co(a,x);b!==y&&(_l(this,b,a),ro(a,x,y),this.hc(y)===null&&Rl(this,y,a),Ro(this,"nodeParentKey",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},et.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Co(a,y),y===void 0)?"":typeof y=="string"?y:(Ot("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},ts.prototype.getLinkCategoryForData=function(a){return this.ss(a)},ts.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=Co(a,x);b===void 0&&(b=""),b!==y&&(ro(a,x,y),Ro(this,"parentLinkCategory",no,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ro(a,x,y)}},ts.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},ts.prototype.copyNodeData=function(a){return a===null?null:(a=ir.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Co(a,this.Ke)===void 0||ro(a,this.Ke,void 0),a)},ts.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=Co(a,y);b!==x&&(ro(a,y,x),this.Fs(a,y,b,x))},et=ts.prototype,et.jp=function(a,y){ir.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},et.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;ro(a,b,x),Ro(this,"nodeParentKey",no,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.fm=function(a){ir.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=_n();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ro(this,"nodeParentKey",no,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)_l(this,a,x[y]);Xn(x)}},et.em=function(a){ir.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Rl(this,y,a)},et.qp=function(a){ir.prototype.qp.call(this,a);var y=this.mh(a);_l(this,y,a)},et.lm=function(a,y){ir.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},et.Tl=function(){return!0},et.xs=function(){return!0},vn.Object.defineProperties(ts.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"}}}),ts.prototype.setParentLinkCategoryForNodeData=ts.prototype.Ms,ts.prototype.getParentLinkCategoryForNodeData=ts.prototype.ss,ts.prototype.setParentKeyForNodeData=ts.prototype.qe,ts.prototype.getParentKeyForNodeData=ts.prototype.mh,ts.className="TreeModel",kl.TreeModel=ts;function fo(a){so.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Tl,this.Ti=0,this.Zv=new lt,this.Jp=this.me=0,this.Xr=new yg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Tl,this.K=ns,this.nd=Kd,this.hd=oy,this.tf=6,this.Nn=y0,a&&Object.assign(this,a)}tn(fo,so),fo.prototype.cloneProtected=function(a){so.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},fo.prototype.qb=function(a){a.classType===fo?a===m0||a===v0||a===p0||a===g0||a===Kd?this.sorting=a:a===qc||a===Hd||a===ns||a===hc?this.direction=a:a===Th||a===uc||a===Tl||a===Ml?this.arrangement=a:(a===zf||a===y0)&&(this.nodeDiameterFormula=a):so.prototype.qb.call(this,a)},fo.prototype.createNetwork=function(){return new Vd(this)},fo.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 pn;y.addAll(a.iterator),a=new pn;var x=new pn,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,pe=this.radius;(!isFinite(pe)||0>=pe)&&(pe=NaN);var ye=this.aspectRatio;(!isFinite(ye)||0>=ye)&&(ye=1);var Te=this.startAngle;isFinite(Te)||(Te=0);var Ge=this.sweepAngle;if((!isFinite(Ge)||360<Ge||1>Ge)&&(Ge=360),y=this.spacing,isFinite(y)||(y=NaN),se===Ml&&he===zf?se=Tl:se===Ml&&he!==zf&&(se=this.arrangement),(this.direction===qc||this.direction===Hd)&&this.sorting!==Kd){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===qc?(this.arrangement===Ml&&a.reverse(),b=new pn,b.addAll(a),b.addAll(x)):(this.arrangement===Ml&&x.reverse(),b=new pn,b.addAll(x),b.addAll(a))}he=b.length;for(var Xe=te=E=0;Xe<b.length;Xe++){var Je=Te+Ge*te*(this.direction===ns?1:-1)/he,it=b.M(Xe).diameter;isNaN(it)&&(it=cc(b.M(Xe),Je)),360>Ge&&(Xe===0||Xe===b.length-1)&&(it/=2),E+=it,te++}if(isNaN(pe)||se===Ml){if(isNaN(y)&&(y=6),se!==Tl&&se!==Ml){for(te=-1/0,ne=0;ne<he;ne++)Xe=b.M(ne),E=b.M(ne===he-1?0:ne+1),isNaN(Xe.diameter)&&cc(Xe,0),isNaN(E.diameter)&&cc(E,0),te=Math.max(te,(Xe.diameter+E.diameter)/2);ne=te+y,se===Th?pe=(te+y)/(2*Math.PI/he):pe=f0(this,ne*(360<=Ge?he:he-1),ye,Te*Math.PI/180,Ge*Math.PI/180)}else pe=f0(this,E+(360<=Ge?he:he-1)*(se!==Ml?y:1.6*y),ye,Te*Math.PI/180,Ge*Math.PI/180);te=pe*ye}else if(te=pe*ye,Xe=py(this,pe,te,Te*Math.PI/180,Ge*Math.PI/180),isNaN(y))(se===Tl||se===Ml)&&(y=(Xe-E)/(360<=Ge?he:he-1));else if(se===Tl||se===Ml)Xe=(Xe-E)/(360<=Ge?he:he-1),Xe<y?(pe=f0(this,E+y*(360<=Ge?he:he-1),ye,Te*Math.PI/180,Ge*Math.PI/180),te=pe*ye):y=Xe;else{for(ne=-1/0,E=0;E<he;E++)Je=b.M(E),it=b.M(E===he-1?0:E+1),isNaN(Je.diameter)&&cc(Je,0),isNaN(it.diameter)&&cc(it,0),ne=Math.max(ne,(Je.diameter+it.diameter)/2);ne+=y,E=f0(this,ne*(360<=Ge?he:he-1),ye,Te*Math.PI/180,Ge*Math.PI/180),E>pe?(pe=E,te=pe*ye):ne=Xe/(360<=Ge?he:he-1)}if(this.kw=se,this.lc=pe,this.Zm=ye,this.lw=Te,this.Wp=Ge,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,se=this.lc,pe=this.lw,ye=this.Wp,Te=this.Ti,Ge=this.me,he=this.Jp,this.direction!==qc&&this.direction!==Hd||b!==Ml)if(this.direction===qc||this.direction===Hd){switch(ne=0,b){case uc:ne=180*d0(this,se,Ge,pe,he)/Math.PI;break;case Tl:he=y=0,ne=a.first(),ne!==null&&(y=cc(ne,Math.PI/2)),ne=x.first(),ne!==null&&(he=cc(ne,Math.PI/2)),ne=180*d0(this,se,Ge,pe,Te+(y+he)/2)/Math.PI;break;case Th:ne=ye/y.length}if(this.direction===qc){switch(b){case uc:vg(this,a,pe,hc);break;case Tl:mg(this,a,pe,hc);break;case Th:gg(this,a,ye/2,pe,hc)}switch(b){case uc:vg(this,x,pe+ne,ns);break;case Tl:mg(this,x,pe+ne,ns);break;case Th:gg(this,x,ye/2,pe+ne,ns)}}else{switch(b){case uc:vg(this,x,pe,hc);break;case Tl:mg(this,x,pe,hc);break;case Th:gg(this,x,ye/2,pe,hc)}switch(b){case uc:vg(this,a,pe+ne,ns);break;case Tl:mg(this,a,pe+ne,ns);break;case Th:gg(this,a,ye/2,pe+ne,ns)}}}else switch(b){case uc:vg(this,y,pe,this.direction);break;case Tl:mg(this,y,pe,this.direction);break;case Th:gg(this,y,ye,pe,this.direction);break;case Ml:OS(this,y,ye,pe,this.direction)}else OS(this,y,ye,pe-ye/2,ns)}this.updateParts(),this.network=null,this.isValidLayout=!0};function gg(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 pe=b+(E===ns?he*x/(360<=te?se:se-1):-(he*x)/se),ye=y.M(he),Te=ne*Math.tan(pe)/a;Te=Math.sqrt((ne*ne+a*a*Te*Te)/(1+Te*Te)),ye.centerX=Te*Math.cos(pe),ye.centerY=Te*Math.sin(pe),ye.actualAngle=180*pe/Math.PI}}function mg(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 pe=y.M(he),ye=y.M(he===se-1?0:he+1),Te=te*Math.sin(x);pe.centerX=E*Math.cos(x),pe.centerY=Te,pe.actualAngle=180*x/Math.PI,isNaN(pe.diameter)&&cc(pe,0),isNaN(ye.diameter)&&cc(ye,0),pe=d0(a,E,te,b===ns?x:-x,(pe.diameter+ye.diameter)/2+ne),x+=b===ns?pe:-pe}}function vg(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 pe=y.M(he);pe.centerX=E*Math.cos(x),pe.centerY=te*Math.sin(x),pe.actualAngle=180*x/Math.PI,pe=d0(a,E,te,b===ns?x:-x,ne),x+=b===ns?pe:-pe}}function OS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new yg,360>x){for(te=b+(E===ns?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),pe=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=lt.alloc();for(var Te=0;Te<ye.length&&(ye[Te].centerX=he,ye[Te].centerY=pe,!(Te>=ye.length-1));Te++)BS(a,he,pe,ye,Te,E,te)||IS(a,he,pe,ye,Te,E,te),he=te.x,pe=te.y;if(lt.free(te),a.mj++,!(23<a.mj)){he=ye[0].centerX,pe=ye[0].centerY,te=ye[ye.length-1].centerX,Te=ye[ye.length-1].centerY;var Ge=Math.abs(he-te)-((ye[0].width+ye[ye.length-1].width)/2+ne),Xe=Math.abs(pe-Te)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(Xe)?Math.abs(he-te)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<Xe?Xe:1>Math.abs(Ge)?0:Ge,he=Math.abs(te)>Math.abs(Te)?0<te!=pe>Te:0<Te!=he<te,(he=E===ns?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),pe=ne*Math.sin(b*Math.PI/180),ye=lt.alloc(),Te=y.Fa(),Ge=0;Ge<Te.length&&(Te[Ge].centerX=he,Te[Ge].centerY=pe,!(Ge>=Te.length-1));Ge++)BS(a,he,pe,Te,Ge,E,ye)||IS(a,he,pe,Te,Ge,E,ye),he=ye.x,pe=ye.y;if(lt.free(ye),a.mj++,!(23<a.mj)){if(he=Math.atan2(pe,he),he=E===ns?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<Te.length;he++)ne.mk[he]=Te[he].bounds.x,ne.tm[he]=Te[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 BS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,pe=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ye=!1;if(0<=x!=(te===ns)){if(te=y+a,te>se){if(te=y-a,te<-se)return ne.x=te,ne.y=pe,!1;ye=!0}}else if(te=y-a,te<-se){if(te=y+a,te>se)return ne.x=te,ne.y=pe,!1;ye=!0}return pe=Math.sqrt(1-Math.min(1,te*te/(se*se)))*he,0>x!==ye&&(pe=-pe),Math.abs(x-pe)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=pe,!1):(ne.x=te,ne.y=pe,!0)}function IS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,pe=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===ns)){if(te=x-a,te<-he){if(te=x+a,te>he){ne.x=pe,ne.y=te;return}b=!0}}else if(te=x+a,te>he){if(te=x-a,te<-he){ne.x=pe,ne.y=te;return}b=!0}pe=Math.sqrt(1-Math.min(1,te*te/(he*he)))*se,0>y!==b&&(pe=-pe),ne.x=pe,ne.y=te}fo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},fo.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 lt(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))},fo.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,pe=0;pe<=te;pe++){b!==void 0&&E!==void 0?he=b+pe*E/te:he=pe*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 f0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function d0(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}}fo.prototype.sort=function(a){switch(this.sorting){case p0:break;case g0:a.reverse();break;case m0:a.sort(this.comparer);break;case v0:a.sort(this.comparer),a.reverse();break;case Kd:return this.ak(Fx(a));default:Ot("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new pn;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}fo.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 pn;for(var he=0,pe=0;pe<y.length;pe++){var ye=y[pe].length;if(ye===1)b.push(pe);else if(ye===0)E.add(a.M(pe));else{if(he===0)x.push(pe);else{for(var Te=ye=1/0,Ge=-1,Xe=[],Je=0;Je<x.length;Je++)0>y[x[Je]].indexOf(x[Je===x.length-1?0:Je+1])&&Xe.push(Je===x.length-1?0:Je+1);if(Xe.length===0)for(Je=0;Je<x.length;Je++)Xe.push(Je);for(Je=0;Je<Xe.length;Je++){for(var it=Xe[Je],Tt=y[pe],bt=0,jt=0;jt<ne.length;jt++){var Ft=te[ne[jt]],It=te[se[jt]];if(Ft<It){var _t=Ft;Ft=It}else _t=It;if(_t<it&&it<=Ft)for(It=0;It<Tt.length;It++){var Vt=Tt[It];0>x.indexOf(Vt)||_t<te[Vt]&&te[Vt]<Ft||_t===te[Vt]||Ft===te[Vt]||bt++}else for(It=0;It<Tt.length;It++)Vt=Tt[It],0>x.indexOf(Vt)||_t<te[Vt]&&te[Vt]<Ft&&_t!==te[Vt]&&Ft!==te[Vt]&&bt++}for(Tt=bt,jt=bt=0;jt<y[pe].length;jt++)_t=x.indexOf(y[pe][jt]),0<=_t&&(_t=Math.abs(it-(_t>=it?_t+1:_t)),bt+=_t<x.length+1-_t?_t:x.length+1-_t);for(jt=0;jt<ne.length;jt++)_t=te[ne[jt]],Ft=te[se[jt]],_t>=it&&_t++,Ft>=it&&Ft++,_t>Ft&&(It=Ft,Ft=_t,_t=It),Ft-_t<(x.length+2)/2==(_t<it&&it<=Ft)&&bt++;(Tt<ye||Tt===ye&&bt<Te)&&(ye=Tt,Te=bt,Ge=it)}for(x.splice(Ge,0,pe),ye=0;ye<x.length;ye++)te[x[ye]]=ye;for(ye=0;ye<y[pe].length;ye++)Te=y[pe][ye],0<=x.indexOf(Te)&&(ne.push(pe),se.push(Te))}he++}}for(ne=x.length;;){for(te=!0,se=0;se<b.length;se++)if(he=b[se],pe=y[he][0],ye=x.indexOf(pe),0<=ye){for(Ge=Te=0;Ge<y[pe].length;Ge++)Xe=x.indexOf(y[pe][Ge]),0>Xe||Xe===ye||(Je=Xe>ye?Xe-ye:ye-Xe,Te+=Xe<ye!=Je>ne-Je?1:-1);x.splice(0>Te?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},vn.Object.defineProperties(fo.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!==Ml&&a!==Tl&&a!==uc&&a!==Th||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ns&&a!==hc&&a!==qc&&a!==Hd||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==p0&&a!==g0&&a!==m0&&!v0&&a!==Kd||(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!==y0&&a!==zf||(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 Tl=new Qt(fo,"ConstantSpacing",0),uc=new Qt(fo,"ConstantDistance",1),Th=new Qt(fo,"ConstantAngle",2),Ml=new Qt(fo,"Packed",3),ns=new Qt(fo,"Clockwise",4),hc=new Qt(fo,"Counterclockwise",5),qc=new Qt(fo,"BidirectionalLeft",6),Hd=new Qt(fo,"BidirectionalRight",7),p0=new Qt(fo,"Forwards",8),g0=new Qt(fo,"Reverse",9),m0=new Qt(fo,"Ascending",10),v0=new Qt(fo,"Descending",11),Kd=new Qt(fo,"Optimized",12),y0=new Qt(fo,"Pythagorean",13),zf=new Qt(fo,"Circular",14);fo.className="CircularLayout",fo.ConstantSpacing=Tl,fo.ConstantDistance=uc,fo.ConstantAngle=Th,fo.Packed=Ml,fo.Clockwise=ns,fo.Counterclockwise=hc,fo.BidirectionalLeft=qc,fo.BidirectionalRight=Hd,fo.Forwards=p0,fo.Reverse=g0,fo.Ascending=m0,fo.Descending=v0,fo.Optimized=Kd,fo.Pythagorean=y0,fo.Circular=zf;function yg(){this.Pl=-1/0,this.tm=this.mk=null}yg.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},yg.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]}},yg.className="VertexArrangement";function Vd(a){Zi.call(this,a)}tn(Vd,Zi),Vd.prototype.createVertex=function(){return new Sg(this)},Vd.prototype.createEdge=function(){return new S0(this)},Vd.className="CircularNetwork";function Sg(a){Ho.call(this,a),this.u=this.Si=NaN}tn(Sg,Ho);function cc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Ml)if(x.nodeDiameterFormula===zf)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===zf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}vn.Object.defineProperties(Sg.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)}}}),Sg.className="CircularVertex";function S0(a){Ms.call(this,a)}tn(S0,Ms),S0.className="CircularEdge";function xa(a){so.call(this),this.ah=null,this.An=0,this.$d=new ln(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)}tn(xa,so),xa.prototype.cloneProtected=function(a){so.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},xa.prototype.createNetwork=function(){return new Gf(this)},xa.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 pe=_n(),ye=0;ye<se+y.vertexes.count+2;ye++)pe[ye]=null;se=0,ne.reset();for(var Te=Jt.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Te),he)he=!1,E=Te.x+Te.width/2,te=Te.y+Te.height/2,pe[0]=new lt(Te.x+Te.width+b.width,Te.y),pe[1]=new lt(Te.x,Te.y+Te.height+b.height),se=2;else{var Ge=_S(pe,se,E,te,Te.width,Te.height,b),Xe=pe[Ge],Je=new lt(Xe.x+Te.width+b.width,Xe.y),it=new lt(Xe.x,Xe.y+Te.height+b.height);for(Ge+1<se&&pe.splice(Ge+1,0,null),pe[Ge]=Je,pe[Ge+1]=it,se++,Ge=Xe.x-Te.x,Xe=Xe.y-Te.y,ye=ye.vertexes.iterator;ye.next();)Je=ye.value,Je.centerX+=Ge,Je.centerY+=Xe}for(Jt.free(Te),ye=y.vertexes.iterator;ye.next();)ne=ye.value,Ge=ne.bounds,2>se?(E=Ge.x+Ge.width/2,te=Ge.y+Ge.height/2,pe[0]=new lt(Ge.x+Ge.width+b.width,Ge.y),pe[1]=new lt(Ge.x,Ge.y+Ge.height+b.height),se=2):(he=_S(pe,se,E,te,Ge.width,Ge.height,b),Te=pe[he],Xe=new lt(Te.x+Ge.width+b.width,Te.y),Ge=new lt(Te.x,Te.y+Ge.height+b.height),he+1<se&&pe.splice(he+1,0,null),pe[he]=Xe,pe[he+1]=Ge,se++,ne.centerX=Te.x+ne.width/2,ne.centerY=Te.y+ne.height/2);for(Xn(pe),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)}}GS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},xa.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},xa.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=Bx(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),GS(a,te),Ix(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 Bx(a,y){for(var x=a.network,b=new Gf(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 pn),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 pn,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new pn,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,Gt.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 pe=se=0,ye=he.count-ne;ye<he.count;ye++){var Te=he.M(ye),Ge=null;for(te=Te.edges.iterator;te.next();){var Xe=te.value;if(Xe.Ax(Te)===E){Ge=Xe;break}}Ge!==null&&(pe+=Ge.length,se+=Te.width*Te.height)}te=E.centerX,he=E.centerY,ye=E.width,Te=E.height,Ge=E.focus,Xe=ye*Te,1>Xe&&(Xe=1),se=Gt.sqrt((se+Xe+pe*pe*4/(ne*ne))/Xe),ne=(se-1)*ye/2,se=(se-1)*Te/2,E.bounds=new Jt(te-Ge.x-ne,he-Ge.y-se,ye+2*ne,Te+2*se),E.focus=new lt(Ge.x+ne,Ge.y+se)}}return a.network=b,x}function Ix(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 Jt(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new lt(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=Gt.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,pe=0,ye=y.vertexes.iterator;ye.next();){var Te=ye.value;1>=Te.Vd?he++:(se=!0,pe++,ne+=Math.atan2(y.centerY-Te.centerY,y.centerX-Te.centerX))}if(he!==0){for(0<pe&&(ne/=pe),pe=y=0,y=se?2*Math.PI/(he+1):2*Math.PI/he,he%2===0&&(pe=y/2),1<x.count&&x.sort(function(Xe,Je){return Xe===null||Je===null||Xe===Je?0:Je.width*Je.height-Xe.width*Xe.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,Te=he.edges.iterator;Te.next();){ye=Te.value;break}Te=he.width;var Ge=he.height;Te=Gt.sqrt(Te*Te+Ge*Ge)/2,ye=te+ye.length+Te,Te=ne+(y*(se/2>>1)+pe)*(se%2===0?1:-1),he.centerX=b+ye*Math.cos(Te),he.centerY=E+ye*Math.sin(Te),se++}}}}function _S(a,y,x,b,E,te,ne){var se=9e19,he=-1,pe=0;e:for(;pe<y;pe++){var ye=a[pe],Te=ye.x-x,Ge=ye.y-b;if(Te=Te*Te+Ge*Ge,Te<se){for(Ge=pe-1;0<=Ge;Ge--)if(a[Ge].y>ye.y&&a[Ge].x-ye.x<E+ne.width)continue e;for(Ge=pe+1;Ge<y;Ge++)if(a[Ge].x>ye.x&&a[Ge].y-ye.y<te+ne.height)continue e;he=pe,se=Te}}return he}xa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},xa.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 zS(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,Gt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Gt.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,Gt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,Gt.sqrt(b*b+a*a)):b-(ne+se):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function GS(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,Tt){return it===null||Tt===null||it===Tt?0:it.centerX-Tt.centerX}):y.sort(function(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerY-Tt.centerY}),x=a.Zf;var pe=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),pe=ne.charge*a.electricalFieldY(he,ye),b+=ne.mass*a.gravitationalFieldX(he,ye),pe+=ne.mass*a.gravitationalFieldY(he,ye),ne.forceX+=b,ne.forceY+=pe;for(var Te=te+1;Te<y.length;Te++){var Ge=y[Te];if(Ge!==ne){b=Ge.bounds,se=Ge.focus,pe=b.x+se.x;var Xe=b.y+se.y;if(he-pe>x||pe-he>x){if(E)break}else if(ye-Xe>x||Xe-ye>x){if(!E)break}else{var Je=zS(ne,Ge);1>Je?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new x0),Je=b.random(),se=b.random(),he>pe?(b=Math.abs(Ge.bounds.right-ne.bounds.x),b=(1+b)*Je):he<pe?(b=Math.abs(Ge.bounds.x-ne.bounds.right),b=-(1+b)*Je):(b=Math.max(Ge.width,ne.width),b=(1+b)*Je-b/2),ye>Xe?(pe=Math.abs(Ge.bounds.bottom-ne.bounds.y),pe=(1+pe)*se):he<pe?(pe=Math.abs(Ge.bounds.y-ne.bounds.bottom),pe=-(1+pe)*se):(pe=Math.max(Ge.height,ne.height),pe=(1+pe)*se-pe/2)):(se=-(ne.charge*Ge.charge)/(Je*Je),b=(pe-he)/Je*se,pe=(Xe-ye)/Je*se),ne.forceX+=b,ne.forceY+=pe,Ge.forceX-=b,Ge.forceY-=pe}}}}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,Te=te.focus,he=ye.x+Te.x,ye=ye.y+Te.y,Te=zS(x,te),1>Te?(Te=a.randomNumberGenerator,Te===null&&(a.randomNumberGenerator=Te=new x0),se=Te.random(),Te=Te.random(),b=(b>he?1:-1)*(1+(te.width>x.width?te.width:x.width))*se,pe=(ne>ye?1:-1)*(1+(te.height>x.height?te.height:x.height))*Te):(se=se.stiffness*(Te-se.length),b=(he-b)/Te*se,pe=(ye-ne)/Te*se),x.forceX+=b,x.forceY+=pe,te.forceX-=b,te.forceY-=pe;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}xa.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},xa.prototype.moveFixedVertex=function(){},xa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},xa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Zo,y.toSpot=Zo)}},xa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Jt.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Jt.free(x)}x=Jt.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()}Jt.free(x)},xa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},xa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},xa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},xa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},xa.prototype.electricalFieldX=function(){return 0},xa.prototype.electricalFieldY=function(){return 0},xa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},xa.prototype.gravitationalFieldX=function(){return 0},xa.prototype.gravitationalFieldY=function(){return 0},xa.prototype.isFixed=function(a){return a.isFixed},vn.Object.defineProperties(xa.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"&&Ot('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())}}}),xa.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Gf(a){Zi.call(this,a)}tn(Gf,Zi),Gf.prototype.createVertex=function(){return new xg(this)},Gf.prototype.createEdge=function(){return new wg(this)},Gf.className="ForceDirectedNetwork";function xg(a){Ho.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}tn(xg,Ho),vn.Object.defineProperties(xg.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)}}}),xg.className="ForceDirectedVertex";function wg(a){Ms.call(this,a),this.j=this.o=NaN}tn(wg,Ms),vn.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 x0(){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()}x0.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},x0.className="RandomNumberGenerator";function Mi(a){so.call(this),this.kc=this.ie=25,this.K=0,this.Dk=E0,this.Zk=k0,this.Qk=T0,this.bj=4,this.rk=M0,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 lt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}tn(Mi,so),Mi.prototype.cloneProtected=function(a){so.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:Ot("Unknown enum value: "+a):so.prototype.qb.call(this,a)},Mi.prototype.createNetwork=function(){return new Xd(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!==bg&&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===bg&&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,pe=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 Te=se.fromNode;he=se.toNode;for(var Ge=se.fromPort;Ge!==null&&!Ge.Ed();)Ge=Ge.panel;for(se=se.toPort;se!==null&&!se.Ed();)se=se.panel;if(b.rev){pe=Te;var Xe=Ge;Te=he,Ge=se,he=pe,se=Xe}var Je=E.focus;pe=te.focus;var it=b.rev?te.bounds:E.bounds;Xe=lt.alloc(),ye!==Te?it.w()&&Te.isVisible()?Te.actualBounds.w()?(Ph(Te,Ge,Or,Xe),Xe.x+=Te.actualBounds.x-it.x,Xe.y+=Te.actualBounds.y-it.y):(Ph(Te,Ge,Or,Xe),Xe.w()||Xe.assign(Je)):Xe.assign(Je):it.w()?(Ph(Te,Ge,Or,Xe),Xe.w()||Xe.assign(Je)):Xe.assign(Je),Te=b.rev?E.bounds:te.bounds,ye=lt.alloc(),ne!==he?Te.w()&&he.isVisible()?he.actualBounds.w()?(Ph(he,se,Or,ye),ye.x+=he.actualBounds.x-Te.x,ye.y+=he.actualBounds.y-Te.y):(Ph(he,se,Or,ye),ye.w()||ye.assign(pe)):ye.assign(pe):Te.w()?(Ph(he,se,Or,ye),ye.w()||ye.assign(pe)):ye.assign(pe),this.K===90||this.K===270?(ne=Math.round((Xe.x-Je.x)/this.kc),he=Xe.x,se=Math.round((ye.x-pe.x)/this.kc),pe=ye.x):(ne=Math.round((Xe.y-Je.y)/this.kc),he=Xe.y,se=Math.round((ye.y-pe.y)/this.kc),pe=ye.y),lt.free(Xe),lt.free(ye),b.portFromColOffset=ne,b.portFromPos=he,b.portToColOffset=se,b.portToPos=pe}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Xe=E.layer,ye=te.layer,Te=0,it=b.link,it!==null){var Tt=it.fromPort,bt=it.toPort;if(Tt!==null&&bt!==null){var jt=it.fromNode;if(Ge=it.toNode,jt!==null&&Ge!==null){var Ft=C0(this,!0),It=C0(this,!1),_t=this.setsPortSpots?Ft:it.computeSpot(!0,Tt);Je=this.setsPortSpots?It:it.computeSpot(!1,bt);var Vt=it.isOrthogonal;_t.$c()&&_t.Hf(It)&&Je.$c()&&Je.Hf(Ft)?Te=0:(Ft=it.getLinkPoint(jt,Tt,_t,!0,Vt,Ge,bt,lt.alloc()),It=it.getLinkDirection(jt,Tt,Ft,_t,!0,Vt,Ge,bt),lt.free(Ft),_t.ys()||It!==JS(this,b,!0)?this.setsPortSpots&&jt!==null&&jt.ports.count===1&&b.rev&&(Te+=1):Te+=1,_t=it.getLinkPoint(Ge,bt,Je,!1,Vt,jt,Tt,lt.alloc()),it=it.getLinkDirection(Ge,bt,_t,Je,!1,Vt,jt,Tt),lt.free(_t),Je.ys()||it!==JS(this,b,!1)?this.setsPortSpots&&Ge!==null&&Ge.ports.count===1&&b.rev&&(Te+=2):Te+=2)}}}if(Ge=Te,Te=Ge===1||Ge===3,(Ge=Ge===2||Ge===3)&&(Je=a.createVertex(),Je.node=null,Je.Dj=1,Je.layer=Xe,Je.near=E,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=Je),it=1,Te&&it--,Xe-ye>it&&0<Xe){for(b.valid=!1,Je=a.createVertex(),Je.node=null,Je.Dj=2,Je.layer=Xe-1,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=Ge?0:ne,E.portToColOffset=0,E.portFromPos=Ge?0:he,E.portToPos=0,E=Je,Xe--;Xe-ye>it&&0<Xe;)Je=a.createVertex(),Je.node=null,Je.Dj=3,Je.layer=Xe-1,a.dh(Je),E=a.Zj(E,Je,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Je,Xe--;E=a.Zj(Je,te,b.link),E.valid=!Te,Te&&(Je.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=se,E.portFromPos=0,E.portToPos=pe}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=fc(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),dc(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 cs(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 tl(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=fc(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],pe=he.near;if(pe!==null&&pe.layer===he.layer)if(he=pe.index,he>ne)for(var ye=ne+1;ye<he;ye++){var Te=b[ye];Te.near===pe&&Te.Dj===pe.Dj||se++}else for(ye=ne-1;ye>he;ye--)Te=b[ye],Te.near===pe&&Te.Dj===pe.Dj||se++;var Ge;if(0<=x)for(he=b[ne].sourceEdgesArrayAccess,pe=0;pe<he.length;pe++){var Xe=he[pe];if(Xe.valid&&Xe.fromVertex.layer!==y)for(Te=Xe.fromVertex.index,ye=Xe.portToPos,Xe=Xe.portFromPos,Ge=pe+1;Ge<he.length;Ge++){var Je=he[Ge];if(Je.valid&&Je.fromVertex.layer!==y){var it=Je.fromVertex.index,Tt=Je.portToPos;Je=Je.portFromPos,ye<Tt&&(Te>it||Te===it&&Xe>Je)&&se++,Tt<ye&&(it>Te||it===Te&&Je>Xe)&&se++}}}if(0>=x){for(he=b[ne].destinationEdgesArrayAccess,pe=0;pe<he.length;pe++)if(Xe=he[pe],Xe.valid&&Xe.toVertex.layer!==y)for(Te=Xe.toVertex.index,ye=Xe.portToPos,Xe=Xe.portFromPos,Ge=pe+1;Ge<he.length;Ge++)Je=he[Ge],Je.valid&&Je.toVertex.layer!==y&&(it=Je.toVertex.index,Tt=Je.portToPos,Je=Je.portFromPos,Xe<Je&&(Te>it||Te===it&&ye>Tt)&&se++,Je<Xe&&(it>Te||it===Te&&Tt>ye)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var bt=0,jt=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var Ft=b[he].sourceEdgesArrayAccess;for(pe=0;pe<se.length;pe++)if(Xe=se[pe],Xe.valid&&Xe.fromVertex.layer!==y)for(Te=Xe.fromVertex.index,Xe=Xe.portFromPos,Ge=0;Ge<Ft.length;Ge++)Je=Ft[Ge],Je.valid&&Je.fromVertex.layer!==y&&(it=Je.fromVertex.index,Je=Je.portFromPos,(Te<it||Te===it&&Xe<Je)&&jt++,(it<Te||it===Te&&Je<Xe)&&bt++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,Ft=b[he].destinationEdgesArrayAccess,pe=0;pe<se.length;pe++)if(Xe=se[pe],Xe.valid&&Xe.toVertex.layer!==y)for(Te=Xe.toVertex.index,ye=Xe.portToPos,Ge=0;Ge<Ft.length;Ge++)Je=Ft[Ge],Je.valid&&Je.toVertex.layer!==y&&(it=Je.toVertex.index,Tt=Je.portToPos,(Te<it||Te===it&&ye<Tt)&&jt++,(it<Te||it===Te&&Tt<ye)&&bt++)}te[ne*E+he]=bt,te[he*E+ne]=jt}}return dc(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 w0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=fc(b,E),ne=b.tc[E],se=0,he=0;he<ne;he++){var pe=te[he].destinationEdgesArrayAccess;if(pe!==null)for(var ye=0;ye<pe.length;ye++){var Te=pe[ye];if(Te.valid&&Te.toVertex.layer!==E){var Ge=Te.fromVertex.column+Te.portFromColOffset,Xe=Te.toVertex.column+Te.portToColOffset;se+=(Math.abs(Ge-Xe)+1)*gy(Te)}}}dc(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=fc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var pe=null;0<=x&&(pe=se.destinationEdgesArrayAccess);var ye=0,Te=0,Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(ye+=Ge.column-1,Te++),he!==null)for(Ge=0;Ge<he.length;Ge++){se=he[Ge];var Xe=se.fromVertex;se.valid&&!se.rev&&Xe.layer!==y&&(ye+=Xe.column,Te++)}if(pe!==null)for(he=0;he<pe.length;he++)se=pe[he],Ge=se.toVertex,se.valid&&!se.rev&&Ge.layer!==y&&(ye+=Ge.column,Te++);te[ne]=Te===0?-1:ye/Te}return dc(a,y,b),te}function HS(a,y,x){for(var b=fc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var pe=null;0<=x&&(pe=se.destinationEdgesArrayAccess);var ye=0,Te=[],Ge=se.near;if(Ge!==null&&Ge.layer===se.layer&&(Te[ye]=Ge.column-1,ye++),se=void 0,he!==null)for(Ge=0;Ge<he.length;Ge++){se=he[Ge];var Xe=se.fromVertex;se.valid&&!se.rev&&Xe.layer!==y&&(Te[ye]=Xe.column+se.portFromColOffset,ye++)}if(pe!==null)for(he=0;he<pe.length;he++)se=pe[he],Ge=se.toVertex,se.valid&&!se.rev&&Ge.layer!==y&&(Te[ye]=Ge.column+se.portToColOffset,ye++);ye===0?te[ne]=-1:(Te.sort(function(Je,it){return Je-it}),pe=ye>>1,te[ne]=ye&1?Te[pe]:Te[pe-1]+Te[pe]>>1)}return dc(a,y,b),te}function Pg(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,pe=y.layer-he.layer;se=a.linkMinLength(se),pe===se&&Pg(a,he,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)se=ne.value,he=se.fromVertex,pe=he.layer-y.layer,se=a.linkMinLength(se),pe===se&&Pg(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(;zx(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,pe=se.destinationEdges;pe.next();)pe.value.toVertex.valid&&he++;pe=0;for(var ye=se.sourceEdges;ye.next();)ye.value.fromVertex.valid&&pe++;(E===null||te<he-pe)&&(E=se,te=he-pe)}}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 E0: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 bg: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 zx(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:ZS(this);break;case Py:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case k0:for(ZS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&$S(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 ZS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=XS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function XS(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,XS(a,te)+E)}y.layer=x}else x=y.layer;return x}function YS(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,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function $S(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)$S(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&&Pg(a,se,0,-1,!0,!1)}for(Pg(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 pe=ne.value;if(pe.component===1){var ye=0,Te=!1,Ge=pe.sourceEdgesArrayAccess;E=Ge.length;for(var Xe=0;Xe<E;Xe++){var Je=Ge[Xe],it=Je.fromVertex;ye+=1,it.component!==1&&(te+=1,it=it.layer-pe.layer,Je=a.linkMinLength(Je),b=Math.min(b,it-Je))}for(Ge=pe.destinationEdgesArrayAccess,E=Ge.length,Xe=0;Xe<E;Xe++)Je=Ge[Xe].toVertex,--ye,Je.component!==1?--te:Te=!0;(he===null||ye<se)&&!Te&&(he=pe,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(Pg(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(pe=0,ye=!1,Ge=ne.sourceEdgesArrayAccess,Te=Ge.length,Xe=0;Xe<Te;Xe++)Je=Ge[Xe].fromVertex,pe+=1,Je.component!==1?b+=1:ye=!0;for(Ge=ne.destinationEdgesArrayAccess,Te=Ge.length,Xe=0;Xe<Te;Xe++)Je=Ge[Xe],it=Je.toVertex,--pe,it.component!==1&&(--b,it=ne.layer-it.layer,Je=a.linkMinLength(Je),E=Math.min(E,it-Je));(se===null||pe>te)&&!ye&&(se=ne,te=pe)}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 JS(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}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 T0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&QS(this,x);break;case by: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 QS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var 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&&QS(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=cs(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)P0(this,b,1),pl(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=cs(this)),b=this.Ia;0<=b;b--)P0(this,b,-1),pl(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=cs(this))}for(tl(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)P0(this,b,0),pl(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=cs(this)),b=this.Ia;0<=b;b--)P0(this,b,0),pl(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=cs(this))}tl(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=pl(this,b,-1)||te;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,1)||te;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,1)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,-1)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,0)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,0)||te;E>=a?tl(this,y):(a=E,y=cs(this))}break;default:case M0: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=pl(this,b,-1)||te;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,1)||te;for(E=this.countCrossings(),E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,1)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,-1)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=pl(this,b,0)||te;for(E>=a?tl(this,y):(a=E,y=cs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=pl(this,b,0)||te;E>=a?tl(this,y):(a=E,y=cs(this))}}tl(this,y)};function P0(a,y,x){var b=fc(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);dc(a,y,b)}function pl(a,y,x){var b=fc(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,pe=!0;pe;)for(pe=!1,te=0;te<E-1;te++){var ye=x[b[te].index*E+b[te+1].index],Te=x[b[te+1].index*E+b[te].index],Ge=0,Xe=0,Je=b[te].column,it=b[te+1].column,Tt=a.nodeMinColumnSpace(b[te],!0),bt=a.nodeMinColumnSpace(b[te],!1),jt=a.nodeMinColumnSpace(b[te+1],!0),Ft=a.nodeMinColumnSpace(b[te+1],!1);Tt=Je-Tt+jt,bt=it-bt+Ft;var It=b[te].sourceEdges.iterator;for(It.reset();It.next();)if(jt=It.value,Ft=jt.fromVertex,jt.valid&&Ft.layer===y){for(jt=0;b[jt]!==Ft;)jt++;jt<te&&(Ge+=2*(te-jt),Xe+=2*(te+1-jt)),jt===te+1&&(Ge+=1),jt>te+1&&(Ge+=4*(jt-te),Xe+=4*(jt-(te+1)))}for(It=b[te].destinationEdges.iterator,It.reset();It.next();)if(jt=It.value,Ft=jt.toVertex,jt.valid&&Ft.layer===y){for(jt=0;b[jt]!==Ft;)jt++;jt===te+1&&(Xe+=1)}for(It=b[te+1].sourceEdges.iterator,It.reset();It.next();)if(jt=It.value,Ft=jt.fromVertex,jt.valid&&Ft.layer===y){for(jt=0;b[jt]!==Ft;)jt++;jt<te&&(Ge+=2*(te+1-jt),Xe+=2*(te-jt)),jt===te&&(Xe+=1),jt>te+1&&(Ge+=4*(jt-(te+1)),Xe+=4*(jt-te))}for(It=b[te+1].destinationEdges.iterator,It.reset();It.next();)if(jt=It.value,Ft=jt.toVertex,jt.valid&&Ft.layer===y){for(jt=0;b[jt]!==Ft;)jt++;jt===te&&(Ge+=1)}jt=Ft=0,It=ne[b[te].index];var _t=se[b[te].index],Vt=ne[b[te+1].index],Rn=se[b[te+1].index];It!==-1&&(Ft+=Math.abs(It-Je),jt+=Math.abs(It-bt)),_t!==-1&&(Ft+=Math.abs(_t-Je),jt+=Math.abs(_t-bt)),Vt!==-1&&(Ft+=Math.abs(Vt-it),jt+=Math.abs(Vt-Tt)),Rn!==-1&&(Ft+=Math.abs(Rn-it),jt+=Math.abs(Rn-Tt)),(Xe<Ge-.5||Xe===Ge&&Te<ye-.5||Xe===Ge&&Te===ye&&jt<Ft-.5)&&(pe=he=!0,b[te].column=bt,b[te+1].column=Tt,ye=b[te],b[te]=b[te+1],b[te+1]=ye)}for(te=0;te<E;te++)b[te].index=te;return dc(a,y,b),he}Mi.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Xx)!==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=Zd(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,-1)||x;x=Zd(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=Zd(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,0)||x}}else Hx(this)};function Zd(a,y,x){for(var b=!1;Gx(a,y,x);)b=!0;return b}function Gx(a,y,x){var b,E=fc(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,pe=!0;pe;)for(pe=!1,b=0;b<te;b++){var ye=E[b].column,Te=a.nodeMinColumnSpace(E[b],!0),Ge=a.nodeMinColumnSpace(E[b],!1),Xe=0;0>b-1||ye-E[b-1].column-1>Te+a.nodeMinColumnSpace(E[b-1],!1)?Xe=ye-1:Xe=ye,Te=b+1>=te||E[b+1].column-ye-1>Ge+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var Je=Ge=0,it=0;if(0>=x)for(var Tt=E[b].sourceEdges.iterator;Tt.next();){var bt=Tt.value,jt=bt.fromVertex;if(bt.valid&&jt.layer!==y){var Ft=gy(bt),It=bt.portFromColOffset;bt=bt.portToColOffset,jt=jt.column,Ge+=(Math.abs(ye+bt-(jt+It))+1)*Ft,Je+=(Math.abs(Xe+bt-(jt+It))+1)*Ft,it+=(Math.abs(Te+bt-(jt+It))+1)*Ft}}if(0<=x)for(Tt=E[b].destinationEdges.iterator;Tt.next();)bt=Tt.value,jt=bt.toVertex,bt.valid&&jt.layer!==y&&(Ft=gy(bt),It=bt.portFromColOffset,bt=bt.portToColOffset,jt=jt.column,Ge+=(Math.abs(ye+It-(jt+bt))+1)*Ft,Je+=(Math.abs(Xe+It-(jt+bt))+1)*Ft,it+=(Math.abs(Te+It-(jt+bt))+1)*Ft);bt=It=Ft=0,Tt=ne[E[b].index],jt=se[E[b].index],Tt!==-1&&(Ft+=Math.abs(Tt-ye),It+=Math.abs(Tt-Xe),bt+=Math.abs(Tt-Te)),jt!==-1&&(Ft+=Math.abs(jt-ye),It+=Math.abs(jt-Xe),bt+=Math.abs(jt-Te)),Je<Ge||Je===Ge&&It<Ft?(pe=he=!0,E[b].column=Xe):(it<Ge||it===Ge&&bt<Ft)&&(pe=he=!0,E[b].column=Te)}return dc(a,y,E),a.normalize(),he}function Sy(a,y,x){var b=fc(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),pe=a.nodeMinColumnSpace(b[x],!1),ye=0;if(ne[x]===-1)if(x===0&&x===E-1)ye=se;else if(x===0){var Te=b[x+1].column;Te-se===pe+a.nodeMinColumnSpace(b[x+1],!0)?ye=se-1:ye=se}else x===E-1?(Te=b[x-1].column,ye=se-Te===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,ye=(he+pe)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,ye=Math.min(ne[x],pe)):x===E-1?(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,ye=Math.max(ne[x],he)):(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,he<ne[x]&&ne[x]<pe?ye=ne[x]:he>=ne[x]?ye=he:pe<=ne[x]&&(ye=pe));ye!==se&&(te=!0,b[x].column=ye)}dc(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=cs(a),te=w0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=w0(a);ne>te?tl(a,E):ne<te&&(te=ne,E=cs(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=cs(a),te=w0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=w0(a),ne>te?tl(a,E):ne<te&&(te=ne,E=cs(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=_n(),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 yn,Kx(y,x);var te=null,ne=null,se=null,he=null,pe=(a.ve&1)!==0,ye=(a.ve&2)!==0,Te=(a.ve&4)!==0,Ge=(a.ve&8)!==0;for(pe&&(a.verticalAlignment(y,x,!0),te=b0(a,y,!0,!1)),y.reverse(),Te&&(a.verticalAlignment(y,x,!1),se=b0(a,y,!1,!1)),b=mr(y),E=b.next();!E.done;E=b.next())E.value.reverse();Ge&&(a.verticalAlignment(y,x,!1),he=b0(a,y,!1,!0)),y.reverse(),ye&&(a.verticalAlignment(y,x,!0),ne=b0(a,y,!0,!0)),Xn(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Xe){var Je=_n();pe&&Je.push(te.get(Xe)),ye&&Je.push(ne.get(Xe)),Te&&Je.push(se.get(Xe)),Ge&&Je.push(he.get(Xe)),Je.sort(function(Tt,bt){return Tt-bt});var it=Je.length;it=(Je[Math.floor((it-1)/2)]+Je[Math.ceil((it-1)/2)])/2,Xn(Je),Xe.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 pe=se[he];e:{if(pe.node===null){var ye=Ty(pe);if(0<ye.length){ye=ye[0].node===null;break e}}ye=!1}var Te=ye;if(he===se.length-1||Te){for(ye=ne.length-1,Te&&(ye=Ty(pe)[0].index);te<=he;){if(pe=se[te],!pe.bo){Te=[];for(var Ge=mr(pe.sourceEdgesArrayAccess),Xe=Ge.next();!Xe.done;Xe=Ge.next())Xe=Xe.value,Xe.valid&&Te.push(Xe);pe.bo=Te}for(pe=mr(pe.bo),Te=pe.next();!Te.done;Te=pe.next())Te=Te.value,Ge=Te.fromVertex.index,(Ge<E||Ge>ye)&&y.add(Te);te++}E=ye}}}Mi.prototype.verticalAlignment=function(a,y,x){Vx(a),a=mr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=mr(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?Ty(te):Yx(te),se=ne.length;if(0<se){ne.sort(function(Te,Ge){return Te.vi-Ge.vi});var he=(se-1)/2;for(se=Math.floor(he),he=Math.ceil(he);se<=he;se++)if(te.align===te){var pe=ne[se],ye=void 0;ye=x?L0(pe,te):L0(te,pe),!y.contains(ye)&&E<pe.vi&&(pe.align=te,te.root=pe.root,te.align=pe.root,E=pe.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 b0(a,y,x,b){for(var E=a.K===90||a.K===270,te=mr(y),ne=te.next();!ne.done;ne=te.next()){var se=mr(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=mr(y),se=te.next();!se.done;se=te.next()){se=mr(se.value);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.root===he){for(var pe=0,ye=he;ye.align!==he;){var Te=ye.align,Ge=ne?ye.width:ye.height,Xe=ne?Te.width:Te.height;if(x){var Je=L0(ye,Te),it=Je.portFromPos,Tt=Je.portToPos;Je.link!==null&&(ye.node&&ye.node!==Je.link.fromNode&&(it=ne?ye.focusX:ye.focusY),Te.node&&Te.node!==Je.link.toNode&&(Tt=ne?Te.focusX:Te.focusY))}else Je=L0(Te,ye),it=Je.portToPos,Tt=Je.portFromPos,Je.link!==null&&(ye.node&&ye.node!==Je.link.toNode&&(it=ne?ye.focusX:ye.focusY),Te.node&&Te.node!==Je.link.fromNode&&(Tt=ne?Te.focusX:Te.focusY));Ge=b?ye.qg+(Ge-it)-(Xe-Tt):ye.qg+it-Tt,Te.qg=Ge,pe=Math.min(pe,Ge),ye=ye.align}ye=he;do ye.qg=ye.qg-pe,ye=ye.align;while(ye!==he)}}for(x=mr(y),ne=x.next();!ne.done;ne=x.next())for(te=mr(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 Yt,y=mr(y),ne=y.next();!ne.done;ne=y.next())for(x=mr(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&&Ot("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=_n(),E=_n(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var se=Zx(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(pe){pe.value+=he.delta}}(te)));Xn(b),Xn(E)};function Zx(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=C0(this,!0),y=C0(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 C0(a,y){return a.K===270?y?Ca:ga:a.K===90?y?ga:Ca:a.K===180?y?Oa:aa:y?aa:Oa}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,pe=he.layer,ye=he.column|0;b?(ne=y.x+this.kc*ye,pe=this.Kd[pe]):(ne=this.Kd[pe],pe=y.y+this.kc*ye),he.centerX=ne,he.centerY=pe,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 lt(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 Jt(0,0,x,Math.abs(this.Ta[0]))):y.push(new Jt(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Jt(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Jt(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Jt(0,0,Math.abs(this.Ta[0]),x)):y.push(new Jt(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Jt(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Jt(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 pe=y.computeSpot(!0,ne);he=y.computeSpot(!1,se);var ye=x.fromVertex,Te=x.toVertex;if(x.valid)y.curve===Gs&&y.pointsCount===4&&(ye.column===Te.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,pe,!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&&pe===jr&&(b=!0),se!==null&&he===jr&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(Or),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(Or),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===Te.layer)y.zf();else{var Ge=!1,Xe=!1,Je=this.ie,it=y.firstPickIndex+1;if(y.isOrthogonal){Xe=!0;var Tt=y.pointsCount;4<Tt&&y.points.removeRange(2,Tt-3)}else if(y.curve===Gs)Ge=!0,Tt=y.pointsCount,4<Tt&&y.points.removeRange(2,Tt-3),Tt===4&&(it=2);else{Tt=y.pointsCount;var bt=pe===jr,jt=he===jr;2<Tt&&bt&&jt?y.points.removeRange(1,Tt-2):3<Tt&&bt&&!jt?y.points.removeRange(1,Tt-3):3<Tt&&!bt&&jt?y.points.removeRange(2,Tt-2):4<Tt&&!bt&&!jt&&y.points.removeRange(2,Tt-3)}if(x.rev){for(;Te!==null&&ye!==Te;){var Ft=Tt=null;for(bt=Te.sourceEdges.iterator;bt.next()&&(jt=bt.value,jt.link!==x.link||(Tt=jt.fromVertex,Ft=jt.toVertex,Tt.node!==null)););if(Tt===null)break;if(Tt!==ye){bt=y.i(it-1).x,jt=y.i(it-1).y;var It=Tt.centerX,_t=Tt.centerY;if(Xe)this.K===180||this.K===0?it===y.firstPickIndex+1?(y.m(it++,bt,jt),y.m(it++,bt,_t)):(Ft!==null?Ft.centerY:jt)!==_t&&(Ft=this.Ta[Tt.layer-1]+this.Rf.x,y.m(it++,Ft,jt),y.m(it++,Ft,_t)):it===y.firstPickIndex+1?(y.m(it++,bt,jt),y.m(it++,It,jt)):(Ft!==null?Ft.centerX:bt)!==It&&(Ft=this.Ta[Tt.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[Te.layer]);var Vt=Math.max(10,this.Ld[Te.layer]);if(Ge)this.K===180?It<=Te.bounds.x?(Te=Te.bounds.x,y.m(it++,Te-Ft,_t),y.m(it++,Te,_t),y.m(it++,Te+Vt,_t)):(y.m(it++,It-Ft,_t),y.m(it++,It,_t),y.m(it++,It+Vt,_t)):this.K===90?_t>=Te.bounds.bottom?(Te=Te.bounds.y+Te.bounds.height,y.m(it++,It,Te+Vt),y.m(it++,It,Te),y.m(it++,It,Te-Ft)):(y.m(it++,It,_t+Vt),y.m(it++,It,_t),y.m(it++,It,_t-Ft)):this.K===270?_t<=Te.bounds.y?(Te=Te.bounds.y,y.m(it++,It,Te-Ft),y.m(it++,It,Te),y.m(it++,It,Te+Vt)):(y.m(it++,It,_t-Ft),y.m(it++,It,_t),y.m(it++,It,_t+Vt)):this.K===0&&(It>=Te.bounds.right?(Te=Te.bounds.x+Te.bounds.width,y.m(it++,Te+Vt,_t),y.m(it++,Te,_t),y.m(it++,Te-Ft,_t)):(y.m(it++,It+Vt,_t),y.m(it++,It,_t),y.m(it++,It-Ft,_t)));else{y.m(it++,bt,jt);var Rn=0;this.K===180||this.K===0?((this.K===180?It>=Te.bounds.right:It<=Te.bounds.x)&&(Rn=(this.K===0?-Ft:Vt)/2),y.m(it++,bt+Rn,_t)):((this.K===270?_t>=Te.bounds.bottom:_t<=Te.bounds.y)&&(Rn=(this.K===90?-Ft:Vt)/2),y.m(it++,It,jt+Rn)),y.m(it++,It,_t)}}else Ft=Math.max(10,this.he[Tt.layer]),Vt=Math.max(10,this.Ld[Tt.layer]),Ge?this.K===180?(y.m(it++,It-Ft-Je,_t),y.m(it++,Math.min(It-Ft+Je/2,It),_t),y.m(it++,It,_t),y.m(it++,It,_t),y.m(it++,Math.max(It+Vt-Je/2,It),_t),y.m(it++,It+Vt+Je,_t)):this.K===90?(y.m(it++,It,_t+Vt+Je),y.m(it++,It,Math.max(_t+Vt-Je/2,_t)),y.m(it++,It,_t),y.m(it++,It,_t),y.m(it++,It,Math.min(_t-Ft+Je/2,_t)),y.m(it++,It,_t-Ft-Je)):this.K===270?(y.m(it++,It,_t-Ft-Je),y.m(it++,It,Math.min(_t-Ft+Je/2,_t)),y.m(it++,It,_t),y.m(it++,It,_t),y.m(it++,It,Math.max(_t+Vt-Je/2,_t)),y.m(it++,It,_t+Vt+Je)):(y.m(it++,It+Vt+Je,_t),y.m(it++,Math.max(It+Vt-Je/2,It),_t),y.m(it++,It,_t),y.m(it++,It,_t),y.m(it++,Math.min(It-Ft+Je/2,It),_t),y.m(it++,It-Ft-Je,_t)):y.m(it++,It,_t)}Te=Tt}(se===null||pe!==jr||Xe)&&(bt=y.i(it-1).x,jt=y.i(it-1).y,It=y.i(it).x,_t=y.i(it).y,Xe?(Je=this.Ld[ye.layer],this.K===180||this.K===0?(Xe=jt,Xe>=ye.bounds.y&&Xe<=ye.bounds.bottom&&(this.K===180?It>=ye.bounds.x:It<=ye.bounds.right)&&(Te=ye.centerX+(this.K===180?-Je:Je),Xe<ye.bounds.y+ye.bounds.height/2?Xe=ye.bounds.y-this.kc/2:Xe=ye.bounds.bottom+this.kc/2,y.m(it++,Te,jt),y.m(it++,Te,Xe)),y.m(it++,It,Xe)):(Xe=bt,Xe>=ye.bounds.x&&Xe<=ye.bounds.right&&(this.K===270?_t>=ye.bounds.y:_t<=ye.bounds.bottom)&&(Te=ye.centerY+(this.K===270?-Je:Je),Xe<ye.bounds.x+ye.bounds.width/2?Xe=ye.bounds.x-this.kc/2:Xe=ye.bounds.right+this.kc/2,y.m(it++,bt,Te),y.m(it++,Xe,Te)),y.m(it++,Xe,_t)),y.m(it++,It,_t)):Ge?(Ft=Math.max(10,this.he[ye.layer]),Vt=Math.max(10,this.Ld[ye.layer]),this.K===180&&It>=ye.bounds.x?(Te=ye.bounds.x+ye.bounds.width,y.L(it-2,Te,jt),y.L(it-1,Te+Vt,jt)):this.K===90&&_t<=ye.bounds.bottom?(Te=ye.bounds.y,y.L(it-2,bt,Te),y.L(it-1,bt,Te-Ft)):this.K===270&&_t>=ye.bounds.y?(Te=ye.bounds.y+ye.bounds.height,y.L(it-2,bt,Te),y.L(it-1,bt,Te+Vt)):this.K===0&&It<=ye.bounds.right&&(Te=ye.bounds.x,y.L(it-2,Te,jt),y.L(it-1,Te-Ft,jt))):(Ft=Math.max(10,this.he[ye.layer]),Vt=Math.max(10,this.Ld[ye.layer]),Xe=0,this.K===180||this.K===0?((this.K===180?It<=ye.bounds.x:It>=ye.bounds.right)&&(Xe=(this.K===0?Vt:-Ft)/2),y.m(it++,It+Xe,jt)):((this.K===270?_t<=ye.bounds.y:_t>=ye.bounds.bottom)&&(Xe=(this.K===90?Vt:-Ft)/2),y.m(it++,bt,_t+Xe)),y.m(it++,It,_t)))}else{for(;ye!==null&&ye!==Te;){for(Ft=Tt=null,ye=ye.destinationEdges.iterator;ye.next()&&(bt=ye.value,bt.link!==x.link||(Tt=bt.toVertex,Ft=bt.fromVertex,Ft.node!==null&&(Ft=null),Tt.node!==null)););if(Tt===null)break;Tt!==Te&&(bt=y.i(it-1).x,jt=y.i(it-1).y,It=Tt.centerX,_t=Tt.centerY,Xe?this.K===180||this.K===0?(Ft!==null?Ft.centerY:jt)!==_t&&(Ft=this.Ta[Tt.layer]+this.Rf.x,it===y.firstPickIndex+1&&(Ft=this.K===0?Math.max(Ft,bt):Math.min(Ft,bt)),y.m(it++,Ft,jt),y.m(it++,Ft,_t)):(Ft!==null?Ft.centerX:bt)!==It&&(Ft=this.Ta[Tt.layer]+this.Rf.y,it===y.firstPickIndex+1&&(Ft=this.K===90?Math.max(Ft,jt):Math.min(Ft,jt)),y.m(it++,bt,Ft),y.m(it++,It,Ft)):(Ft=Math.max(10,this.he[Tt.layer]),Vt=Math.max(10,this.Ld[Tt.layer]),Ge?this.K===180?(y.m(it++,It+Vt+Je,_t),y.m(it++,Math.max(It+Vt-Je/2,It),_t),y.m(it++,It,_t),y.m(it++,It,_t),y.m(it++,Math.min(It-Ft+Je/2,It),_t),y.m(it++,It-Ft-Je,_t)):this.K===90?(y.m(it++,It,_t-Ft-Je),y.m(it++,It,Math.min(_t-Ft+Je/2,_t)),y.m(it++,It,_t),y.m(it++,It,_t),y.m(it++,It,Math.max(_t+Vt-Je/2,_t)),y.m(it++,It,_t+Vt+Je)):this.K===270?(y.m(it++,It,_t+Vt+Je),y.m(it++,It,Math.max(_t+Vt-Je/2,_t)),y.m(it++,It,_t),y.m(it++,It,_t),y.m(it++,It,Math.min(_t-Ft+Je/2,_t)),y.m(it++,It,_t-Ft-Je)):(y.m(it++,It-Ft-Je,_t),y.m(it++,Math.min(It-Ft+Je/2,It),_t),y.m(it++,It,_t),y.m(it++,It,_t),y.m(it++,Math.max(It+Vt-Je/2,It),_t),y.m(it++,It+Vt+Je,_t)):this.K===180?(y.m(it++,It+Vt,_t),y.m(it++,It-Ft,_t)):this.K===90?(y.m(it++,It,_t-Ft),y.m(it++,It,_t+Vt)):this.K===270?(y.m(it++,It,_t+Vt),y.m(it++,It,_t-Ft)):(y.m(it++,It-Ft,_t),y.m(it++,It+Vt,_t)))),ye=Tt}Xe&&(bt=y.i(it-1).x,jt=y.i(it-1).y,It=y.i(it).x,_t=y.i(it).y,this.K===180||this.K===0?jt!==_t&&(Ft=this.K===0?Math.min(Math.max((It+bt)/2,this.Ta[Te.layer]+this.Rf.x),It):Math.max(Math.min((It+bt)/2,this.Ta[Te.layer]+this.Rf.x),It),y.m(it++,Ft,jt),y.m(it++,Ft,_t)):bt!==It&&(Ft=this.K===90?Math.min(Math.max((_t+jt)/2,this.Ta[Te.layer]+this.Rf.y),_t):Math.max(Math.min((_t+jt)/2,this.Ta[Te.layer]+this.Rf.y),_t),y.m(it++,bt,Ft),y.m(it++,It,Ft)))}b!==null&&Ge&&4<=y.pointsCount&&(ne!==null&&(ne=pe===jr?y.getLinkPointFromPoint(E,ne,ne.ga(Or),y.i(3),!0):y.i(0),pe===jr&&(pe=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+pe.x)/2,pe.y),y.L(2,b.x,(pe.y+b.y)/2)):(y.L(1,pe.x,(ne.y+pe.y)/2),y.L(2,(pe.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),se!==null&&(E=he===jr?y.getLinkPointFromPoint(te,se,se.ga(Or),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===jr&&(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 pn,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 pc;se.layer=Math.floor(te.y/2);var he=b.i(0),pe=b.i(b.pointsCount-1);if(se.first=he.x*he.x+he.y,se.jc=pe.x*pe.x+pe.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),pe=b.i(E+2);var ye=0;he.y<te.y?ye=pe.y<te.y?3:te.x<ne.x?2:1:he.y>te.y&&(ye=pe.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++)pe=x[he],pe.jc!==se&&(ye++,se=pe.jc);this.zi(x,this.Ux,te,te+ne);var Te=1;for(se=x[te].first,he=te;he<E;he++)pe=x[he],pe.first!==se&&(Te++,se=pe.first);for(he=!0,pe=Te,ye<Te?(he=!1,pe=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Te=te;Te<E;Te++){var Ge=x[Te];(he?Ge.first:Ge.jc)!==se&&(ye++,se=he?Ge.first:Ge.jc);var Xe=Ge.link;te=Xe.i(Ge.index),ne=Xe.i(Ge.index+1);var Je=this.linkSpacing*(ye-(pe-1)/2);y++,Xe.uh(),Xe.L(Ge.index,te.x,te.y+Je),Xe.L(Ge.index+1,ne.x,ne.y+Je),Xe.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 pc,se.layer=Math.floor(te.x/2),he=b.i(0),pe=b.i(b.pointsCount-1),se.first=he.x+he.y*he.y,se.jc=pe.x+pe.y*pe.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),pe=b.i(E+2),ye=0,he.x<te.x?ye=pe.x<te.x?3:te.y<ne.y?2:1:he.x>te.x&&(ye=pe.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++)pe=x[he],pe.jc!==se&&(ye++,se=pe.jc);for(this.zi(x,this.Ux,te,te+ne),Te=1,se=x[te].first,he=te;he<E;he++)pe=x[he],pe.first!==se&&(Te++,se=pe.first);for(he=!0,pe=Te,ye<Te?(he=!1,pe=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Te=te;Te<E;Te++)Ge=x[Te],(he?Ge.first:Ge.jc)!==se&&(ye++,se=he?Ge.first:Ge.jc),Xe=Ge.link,te=Xe.i(Ge.index),ne=Xe.i(Ge.index+1),Je=this.linkSpacing*(ye-(pe-1)/2),y++,Xe.uh(),Xe.L(Ge.index,te.x+Je,te.y),Xe.L(Ge.index+1,ne.x+Je,ne.y),Xe.zf()}te=E}a=b}}}},et=Mi.prototype,et.Vx=function(a,y){return a instanceof pc&&y instanceof pc&&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},et.Ux=function(a,y){return a instanceof pc&&y instanceof pc&&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},et.Js=function(a,y){return a instanceof pc&&y instanceof pc&&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},et.B=function(a,y){return a-=y,-1<a&&1>a},et.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Ot("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 fc(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 dc(a,y,x){a.He[a.tc[y]]=x}vn.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()):Ot("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==E0&&a!==bg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==k0&&a!==wy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==T0&&a!==by&&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!==M0&&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 E0=new Qt(Mi,"CycleDepthFirst",0),xy=new Qt(Mi,"CycleGreedy",1),bg=new Qt(Mi,"CycleFromLayers",2),k0=new Qt(Mi,"LayerOptimalLinkLength",0),wy=new Qt(Mi,"LayerLongestPathSink",1),Py=new Qt(Mi,"LayerLongestPathSource",2),T0=new Qt(Mi,"InitDepthFirstOut",0),by=new Qt(Mi,"InitDepthFirstIn",1),Cy=new Qt(Mi,"InitNaive",2),Ey=new Qt(Mi,"AggressiveNone",0),M0=new Qt(Mi,"AggressiveLess",1),ky=new Qt(Mi,"AggressiveMore",2),Xx=8;Mi.className="LayeredDigraphLayout",Mi.CycleDepthFirst=E0,Mi.CycleGreedy=xy,Mi.CycleFromLayers=bg,Mi.LayerOptimalLinkLength=k0,Mi.LayerLongestPathSink=wy,Mi.LayerLongestPathSource=Py,Mi.InitDepthFirstOut=T0,Mi.InitDepthFirstIn=by,Mi.InitNaive=Cy,Mi.AggressiveNone=Ey,Mi.AggressiveLess=M0,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 pc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}pc.className="SegInfo";function Xd(a){Zi.call(this,a)}tn(Xd,Zi),Xd.prototype.createVertex=function(){return new nl(this)},Xd.prototype.createEdge=function(){return new Cg(this)},Xd.className="LayeredDigraphNetwork";function nl(a){Ho.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}tn(nl,Ho);function ix(a,y){return a.index-y.index}function L0(a,y){if(!a.$n){for(var x=[],b=mr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=mr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Ot("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=mr(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 Yx(a){if(!a.ao){for(var y=[],x=mr(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}nl.prototype.Cl=function(a){Ho.prototype.Cl.call(this,a),this.bo=this.co=null},nl.prototype.Kl=function(a){Ho.prototype.Kl.call(this,a),this.bo=this.co=null},nl.prototype.zl=function(a){Ho.prototype.zl.call(this,a),this.$n=this.ao=null},nl.prototype.Jl=function(a){Ho.prototype.Jl.call(this,a),this.$n=this.ao=null},vn.Object.defineProperties(nl.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)}}}),nl.prototype.deleteDestinationEdge=nl.prototype.Jl,nl.prototype.addDestinationEdge=nl.prototype.zl,nl.prototype.deleteSourceEdge=nl.prototype.Kl,nl.prototype.addSourceEdge=nl.prototype.Cl,nl.className="LayeredDigraphVertex";function Cg(a){Ms.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}tn(Cg,Ms),vn.Object.defineProperties(Cg.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)}}}),Cg.className="LayeredDigraphEdge";function Xr(a){so.call(this),this.Ub=new yn,this.Wn=O0,this.ud=Eu,this.vo=D0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=B0,this.$d=new ln(10,10).freeze();var y=new Kf(this);this.W=new gl(y),this.Y=new gl(y),this.ru=[],a&&Object.assign(this,a)}tn(Xr,so),Xr.prototype.cloneProtected=function(a){so.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)},Xr.prototype.qb=function(a){a.classType===Xr?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:Ot("Unknown enum value: "+a):so.prototype.qb.call(this,a)},Xr.prototype.createNetwork=function(){return new Kf(this)},Xr.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 Zt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Lr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Xr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==I0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Zt&&(y=a),this.path===O0&&y!==null?this.ud=y.isTreePathToChildren?Eu:Wf:this.ud=this.path===O0?Eu: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 yn,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 gl&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,My(this,y));for(y=this.network.vertexes,a=null;a=$x(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof gl&&ux(this,y);if(this.Cu(),this.layerStyle===R0){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 gl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new yn,this.isValidLayout=!0};function $x(a){var y=new yn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Xr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Eu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Wf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Ot("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 Eu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Wf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Ot("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case Eu:if(0<y.destinationEdges.count){for(var x=new pn,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 Wf:if(0<y.sourceEdges.count){for(x=new pn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Ot("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++)My(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}Xr.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===Mu&&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 Jx(a,y){switch(a.vo){default:case D0:return y.parent!==null?y.parent:a.W;case By: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}}Xr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===Mu){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])}}Xr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Mu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Xr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Yd:break;case kg:a.children.reverse();break;case Tg:a.children.sort(a.comparer);break;case Mg:a.children.sort(a.comparer),a.children.reverse();break;default:Ot("Unhandled sorting value "+a.sorting.toString())}},Xr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Xr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=gc(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 pe=a.node.Mu();pe.next();){var ye=pe.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=Jt.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,Jt.free(E))};function gc(a){return a===Mh||a===Mu||a===Lh||a===Zu}function Eg(a){return a===Mh||a===Mu}function Ly(a){var y=a.parent;if(y!==null){var x=y.alignment;if(gc(x)){if(Eg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Lh)return!0}}return!1}Xr.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=gc(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,se=Ly(a),he=0,pe=a.comments,ye=pe.length,Te=lt.alloc(),Ge=0;Ge<ye;Ge++){var Xe=pe[Ge],Je=Xe.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Te.h(a.bounds.x-a.commentMargin-Je.width,a.bounds.y+he),Xe.move(Te),Xe=Xe.Sd();Xe.next();){var it=Xe.value;it.fromSpot=Oa,it.toSpot=aa}else for(Te.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=aa,it.toSpot=Oa;else if(0<=a.commentMargin)for(Te.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=aa,it.toSpot=Oa;else for(Te.h(a.bounds.x+a.commentMargin-Je.width,a.bounds.y+he),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=Oa,it.toSpot=aa;he=0<=a.commentSpacing?he+(Je.height+a.commentSpacing):he+(a.commentSpacing-Je.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Te.h(a.bounds.x+he,a.bounds.y-a.commentMargin-Je.height),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=Ca,it.toSpot=ga;else for(Te.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=ga,it.toSpot=Ca;else if(0<=a.commentMargin)for(Te.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=ga,it.toSpot=Ca;else for(Te.h(a.bounds.x+he,a.bounds.y+a.commentMargin-Je.height),Xe.move(Te),Xe=Xe.Sd();Xe.next();)it=Xe.value,it.fromSpot=Ca,it.toSpot=ga;he=0<=a.commentSpacing?he+(Je.width+a.commentSpacing):he+(a.commentSpacing-Je.width)}}if(lt.free(Te),y=he-a.commentSpacing-(b?y.height:y.width),this.ud===Eu)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)}},Xr.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 F0:hx(this,a);break;case Lg:if(a.alignment===Mu)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=gc(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=Ll(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===ku;var pe=he===Tu,ye=gc(he),Te=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Ge=a.nodeSpacing,Xe=this.computeNodeIndent(a),Je=a.rowSpacing,it=0;(b||pe||a.hm||a.im&&a.maxGenerationCount===1)&&(it=Math.max(0,a.rowIndent)),b=a.width;var Tt=a.height,bt=0,jt=0,Ft=0,It=null,_t=null,Vt=0,Rn=0,qn=0,Yn=0,En=0,hn=0,Mr=0,Pr=0;if(ye&&!Eg(he)&&135<E&&ne.reverse(),Eg(he))if(1<se)for(var gi=0;gi<se;gi++)gi%2===0&&gi!==se-1&&(Pr=Math.max(Pr,y?ne[gi].Da.width:ne[gi].Da.height));else se===1&&(Pr=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(he){case Mh:jt=135>E?cx(this,a,ne,Pr,bt,jt):fx(this,a,ne,Pr,bt,jt),Pr=jt.x,bt=jt.width,jt=jt.height;break;case Lh:for(It=0;It<se;It++)_t=ne[It],Te=_t.Da,Ft=hn===0?0:Je,y?(_t.S.h(te-Te.width,Yn+Ft),bt=Math.max(bt,Te.width),jt=Math.max(jt,Yn+Ft+Te.height),Yn+=Ft+Te.height):(_t.S.h(qn+Ft,te-Te.height),bt=Math.max(bt,qn+Ft+Te.width),jt=Math.max(jt,Te.height),qn+=Ft+Te.width),hn++;break;case Zu:for(It=0;It<se;It++)_t=ne[It],te=_t.Da,Te=hn===0?0:Je,y?(_t.S.h(Ge/2+a.focus.x,Yn+Te),bt=Math.max(bt,te.width),jt=Math.max(jt,Yn+Te+te.height),Yn+=Te+te.height):(_t.S.h(qn+Te,Ge/2+a.focus.y),bt=Math.max(bt,qn+Te+te.width),jt=Math.max(jt,te.height),qn+=Te+te.width),hn++}It=vs(this,2),_t=vs(this,2),y?(It[0].h(0,0),It[1].h(0,jt),_t[0].h(bt,0)):(It[0].h(0,0),It[1].h(bt,0),_t[0].h(0,jt)),_t[1].h(bt,jt)}else for(gi=0;gi<se;gi++){var Ui=ne[gi],$o=Ui.Da;if(y){0<Te&&0<hn&&qn+Ge+$o.width>Te&&(qn<te&&ef(a,he,te-qn,0,Mr,gi-1),En++,hn=0,Mr=gi,Ft=jt,qn=0,Yn=135<E?-jt-Je:jt+Je),A0(this,Ui,0,Yn);var ea=0;if(hn===0)It=Ui.Yo,_t=Ui.kp,Vt=$o.width,Rn=$o.height,(It===null||_t===null||E!==Ll(Ui))&&(It=vs(this,2),_t=vs(this,2),It[0].h(0,0),It[1].h(0,Rn),_t[0].h(Vt,0),_t[1].h(Vt,Rn));else{var Ra=_n();Rn=dx(this,a,Ui,It,_t,Vt,Rn,Ra),ea=Rn.x,It=Ra[0],_t=Ra[1],Vt=Rn.width,Rn=Rn.height,Xn(Ra),qn<$o.width&&0>ea&&(Uf(a,-ea,0,Mr,gi-1),j0(It,-ea,0),j0(_t,-ea,0),ea=0)}Ui.S.h(ea,Yn),bt=Math.max(bt,Vt),jt=Math.max(jt,Ft+(En===0?0:Je)+$o.height),qn=Vt}else 0<Te&&0<hn&&Yn+Ge+$o.height>Te&&(Yn<te&&ef(a,he,0,te-Yn,Mr,gi-1),En++,hn=0,Mr=gi,Ft=bt,Yn=0,qn=135<E?-bt-Je:bt+Je),A0(this,Ui,qn,0),ea=0,hn===0?(It=Ui.Yo,_t=Ui.kp,Vt=$o.width,Rn=$o.height,(It===null||_t===null||E!==Ll(Ui))&&(It=vs(this,2),_t=vs(this,2),It[0].h(0,0),It[1].h(Vt,0),_t[0].h(0,Rn),_t[1].h(Vt,Rn))):(Ra=_n(),Rn=dx(this,a,Ui,It,_t,Vt,Rn,Ra),ea=Rn.x,It=Ra[0],_t=Ra[1],Vt=Rn.width,Rn=Rn.height,Xn(Ra),Yn<$o.height&&0>ea&&(Uf(a,0,-ea,Mr,gi-1),j0(It,0,-ea),j0(_t,0,-ea),ea=0)),Ui.S.h(qn,ea),jt=Math.max(jt,Rn),bt=Math.max(bt,Ft+(En===0?0:Je)+$o.width),Yn=Rn;hn++}switch(0<En&&(y?(jt+=Math.max(0,x),qn<bt&&ef(a,he,bt-qn,0,Mr,se-1),0<it&&(pe||Uf(a,it,0,0,se-1),bt+=it)):(bt+=Math.max(0,x),Yn<jt&&ef(a,he,0,jt-Yn,Mr,se-1),0<it&&(pe||Uf(a,0,it,0,se-1),jt+=it))),it=pe=0,he){case $d:y?pe+=bt/2-a.focus.x-Xe/2:it+=jt/2-a.focus.y-Xe/2;break;case Hf:0<En?y?pe+=bt/2-a.focus.x-Xe/2:it+=jt/2-a.focus.y-Xe/2:y?(Pr=ne[0].S.x+ne[0].la.x,pe+=Pr+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-Pr)/2-a.focus.x-Xe/2):(Pr=ne[0].S.y+ne[0].la.y,it+=Pr+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-Pr)/2-a.focus.y-Xe/2);break;case ku:y?(pe-=Xe,bt+=Xe):(it-=Xe,jt+=Xe);break;case Tu:y?(pe+=bt-a.width+Xe,bt+=Xe):(it+=jt-a.height+Xe,jt+=Xe);break;case Mh:y?1<se?pe+=Pr+Ge/2-a.focus.x:pe+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?it+=Pr+Ge/2-a.focus.y:it+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Lh:y?pe+=bt+Ge/2-a.focus.x:it+=jt+Ge/2-a.focus.y;break;case Zu:break;default:jt=this.customAlignment(a,pe,it,bt,jt),pe=jt[0],it=jt[1],bt=jt[2],jt=jt[3]}for(Xe=0;Xe<se;Xe++)Pr=ne[Xe],y?Pr.S.h(Pr.S.x+Pr.la.x-pe,Pr.S.y+(135<E?(ye?-jt:-Pr.Da.height)+Pr.la.y-x:Tt+x+Pr.la.y)):Pr.S.h(Pr.S.x+(135<E?(ye?-bt:-Pr.Da.width)+Pr.la.x-x:b+x+Pr.la.x),Pr.S.y+Pr.la.y-it);if(se=ne=0,ye?y?(bt=Ny(a,bt,pe),0>pe&&(pe=0),135<E&&(it+=jt+x),jt+=Tt+x,he===Zu&&(ne+=Ge/2+a.focus.x),se+=Tt+x):(135<E&&(pe+=bt+x),bt+=b+x,jt=Ay(a,jt,it),0>it&&(it=0),he===Zu&&(se+=Ge/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>bt&&(bt=jy(he,b-bt,0),ne=bt.x,se=bt.y,bt=b,pe=0):bt=Ny(a,bt,pe),0>pe&&(ne-=pe,pe=0),135<E&&(it+=jt+x),jt=Math.max(Math.max(jt,Tt),jt+Tt+x),se+=Tt+x):(135<E&&(pe+=bt+x),bt=Math.max(Math.max(bt,b),bt+b+x),a.comments===null?Tt>jt&&(jt=jy(he,0,Tt-jt),ne=jt.x,se=jt.y,jt=Tt,it=0):jt=Ay(a,jt,it),0>it&&(se-=it,it=0),ne+=b+x),0<En)E=vs(this,4),En=vs(this,4),y?(E[2].h(0,Tt+x),E[3].h(E[2].x,jt),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,jt),En[3].h(E[3].x,En[2].y));else{for(E=vs(this,It.length+2),En=vs(this,_t.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<_t.length;he++)ye=_t[he],En[he+2].h(ye.x+ne,ye.y+se)}y?(E[0].h(pe,0),E[1].h(E[0].x,Tt),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(pe+b,0),En[1].h(En[0].x,Tt),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+Tt),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),zl(this,It),zl(this,_t),a.Yo=E,a.kp=En,a.la.h(pe,it),a.Da.h(bt,jt)}break;default:Ot("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=gc(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=Ll(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 pe=y.alignment,ye=pe===ku,Te=pe===Tu;se=gc(pe);var Ge=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Xe=y.nodeSpacing,Je=a.computeNodeIndent(y),it=ye||Te?0:Je/2,Tt=y.rowSpacing,bt=0;(ye||Te||y.hm||y.im&&y.maxGenerationCount===1)&&(bt=Math.max(0,y.rowIndent)),ye=y.width;var jt=y.height,Ft=0,It=0,_t=0,Vt=0,Rn=0,qn=0,Yn=0,En=0,hn=0,Mr=0;if(se&&!Eg(pe)&&135<b&&E.reverse(),Eg(pe))if(1<ne)for(var Pr=0;Pr<ne;Pr++){var gi=E[Pr],Ui=gi.Da;Pr%2===0&&Pr!==ne-1?hn=Math.max(hn,(x?Ui.width:Ui.height)+a.computeBusNodeSpacing(gi)-Xe):Pr%2!==0&&(Mr=Math.max(Mr,(x?Ui.width:Ui.height)+a.computeBusNodeSpacing(gi)-Xe))}else ne===1&&(hn=x?E[0].Da.width:E[0].Da.height);if(se)switch(pe){case Mh:case Mu:It=135>b?cx(a,y,E,hn,Ft,It):fx(a,y,E,hn,Ft,It),hn=It.x,Ft=It.width,It=It.height;break;case Lh:for(Ge=0;Ge<ne;Ge++)it=E[Ge],_t=it.Da,Mr=Yn===0?0:Tt,x?(it.S.h(te-_t.width,Rn+Mr),Ft=Math.max(Ft,_t.width),It=Math.max(It,Rn+Mr+_t.height),Rn+=Mr+_t.height):(it.S.h(Vt+Mr,te-_t.height),Ft=Math.max(Ft,Vt+Mr+_t.width),It=Math.max(It,_t.height),Vt+=Mr+_t.width),Yn++;break;case Zu:for(te=0;te<ne;te++)Ge=E[te],it=Ge.Da,_t=Yn===0?0:Tt,x?(Ge.S.h(Xe/2+y.focus.x,Rn+_t),Ft=Math.max(Ft,it.width),It=Math.max(It,Rn+_t+it.height),Rn+=_t+it.height):(Ge.S.h(Vt+_t,Xe/2+y.focus.y),Ft=Math.max(Ft,Vt+_t+it.width),It=Math.max(It,it.height),Vt+=_t+it.width),Yn++}else for(Mr=0;Mr<ne;Mr++)Pr=E[Mr],gi=Pr.Da,x?(0<Ge&&0<Yn&&Vt+Xe+gi.width>Ge&&(Vt<te&&ef(y,pe,te-Vt,0,En,Mr-1),qn++,Yn=0,En=Mr,_t=It,Vt=0,Rn=135<b?-It-Tt:It+Tt),Ui=Yn===0?it:Xe,A0(a,Pr,0,Rn),Pr.S.h(Vt+Ui,Rn),Ft=Math.max(Ft,Vt+Ui+gi.width),It=Math.max(It,_t+(qn===0?0:Tt)+gi.height),Vt+=Ui+gi.width):(0<Ge&&0<Yn&&Rn+Xe+gi.height>Ge&&(Rn<te&&ef(y,pe,0,te-Rn,En,Mr-1),qn++,Yn=0,En=Mr,_t=Ft,Rn=0,Vt=135<b?-Ft-Tt:Ft+Tt),Ui=Yn===0?it:Xe,A0(a,Pr,Vt,0),Pr.S.h(Vt,Rn+Ui),It=Math.max(It,Rn+Ui+gi.height),Ft=Math.max(Ft,_t+(qn===0?0:Tt)+gi.width),Rn+=Ui+gi.height),Yn++;switch(0<qn&&(x?(It+=Math.max(0,he),Vt<Ft&&ef(y,pe,Ft-Vt,0,En,ne-1),0<bt&&(Te||Uf(y,bt,0,0,ne-1),Ft+=bt)):(Ft+=Math.max(0,he),Rn<It&&ef(y,pe,0,It-Rn,En,ne-1),0<bt&&(Te||Uf(y,0,bt,0,ne-1),It+=bt))),bt=Te=0,pe){case $d:x?Te+=Ft/2-y.focus.x-Je/2:bt+=It/2-y.focus.y-Je/2;break;case Hf:0<qn?x?Te+=Ft/2-y.focus.x-Je/2:bt+=It/2-y.focus.y-Je/2:x?(a=E[0].S.x+E[0].la.x,Te+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-Je/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-Je/2);break;case ku:x?(Te-=Je,Ft+=Je):(bt-=Je,It+=Je);break;case Tu:x?(Te+=Ft-y.width+Je,Ft+=Je):(bt+=It-y.height+Je,It+=Je);break;case Mh:case Mu:x?1<ne?Te+=hn+Xe/2-y.focus.x:Te+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?bt+=hn+Xe/2-y.focus.y:bt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Lh:x?Te+=Ft+Xe/2-y.focus.x:bt+=It+Xe/2-y.focus.y;break;case Zu:break;default:a=a.customAlignment(y,Te,bt,Ft,It),Te=a[0],bt=a[1],Ft=a[2],It=a[3]}for(a=0;a<ne;a++)Je=E[a],x?Je.S.h(Je.S.x+Je.la.x-Te,Je.S.y+(135<b?(se?-It:-Je.Da.height)+Je.la.y-he:jt+he+Je.la.y)):Je.S.h(Je.S.x+(135<b?(se?-Ft:-Je.Da.width)+Je.la.x-he:ye+he+Je.la.x),Je.S.y+Je.la.y-bt);x?(Ft=Ny(y,Ft,Te),0>Te&&(Te=0),135<b&&(bt+=It+he),It=Math.max(Math.max(It,jt),It+jt+he)):(135<b&&(Te+=Ft+he),Ft=Math.max(Math.max(Ft,ye),Ft+ye+he),It=Ay(y,It,bt),0>bt&&(bt=0)),y.la.h(Te,bt),y.Da.h(Ft,It)}}Xr.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 Jt(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new Jt(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,pe=Ll(y)===90,ye=0,Te=0,Ge=0,Xe=0;Xe<ne;Xe++)if(!(Xe%2!==0||1<ne&&Xe===ne-1)){var Je=x[Xe],it=Je.Da,Tt=ye===0?0:he;if(pe){var bt=a.computeBusNodeSpacing(Je)-se;Je.S.h(b-(it.width+bt),Ge+Tt),E=Math.max(E,it.width+bt),te=Math.max(te,Ge+Tt+it.height),Ge+=Tt+it.height}else bt=a.computeBusNodeSpacing(Je)-se,Je.S.h(Te+Tt,b-(it.height+bt)),te=Math.max(te,it.height+bt),E=Math.max(E,Te+Tt+it.width),Te+=Tt+it.width;ye++}for(ye=0,Je=Te,Xe=Ge,pe?(Te=b+se,Ge=0):(Te=0,Ge=b+se),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],bt=Tt.Da;var jt=ye===0?0:he;if(pe){var Ft=a.computeBusNodeSpacing(Tt)-se;Tt.S.h(Te+Ft,Ge+jt),E=Math.max(E,Te+bt.width+Ft),te=Math.max(te,Ge+jt+bt.height),Ge+=jt+bt.height}else Ft=a.computeBusNodeSpacing(Tt)-se,Tt.S.h(Te+jt,Ge+Ft),E=Math.max(E,Te+jt+bt.width),te=Math.max(te,Ge+bt.height+Ft),Te+=jt+bt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,pe?Math.max(Math.abs(Xe),Math.abs(Ge)):Math.max(Math.abs(Je),Math.abs(Te))),pe?(x.S.h(b+se/2-x.focus.x-x.la.x,te+a),pe=b+se/2-x.focus.x-x.la.x,E=Math.max(E,pe+ne.width),0>pe&&(E-=pe),te=Math.max(te,Math.max(Xe,Ge)+a+ne.height),0>x.S.x&&(b=N0(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(Je,Te)+a+ne.width),Ge=b+se/2-x.focus.y-x.la.y,te=Math.max(te,Ge+ne.height),0>Ge&&(te-=Ge),0>x.S.y&&(b=N0(y,x.S.y,!0,b,se)))),new Jt(b,0,E,te)}function fx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new Jt(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new Jt(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,pe=Ll(y)===270,ye=0,Te=0,Ge=0,Xe=0;Xe<ne;Xe++)if(!(Xe%2!==0||1<ne&&Xe===ne-1)){var Je=x[Xe],it=Je.Da,Tt=ye===0?0:he;if(pe){var bt=a.computeBusNodeSpacing(Je)-se;Ge-=Tt+it.height,Je.S.h(b-(it.width+bt),Ge),E=Math.max(E,it.width+bt),te=Math.max(te,Math.abs(Ge))}else bt=a.computeBusNodeSpacing(Je)-se,Te-=Tt+it.width,Je.S.h(Te,b-(it.height+bt)),te=Math.max(te,it.height+bt),E=Math.max(E,Math.abs(Te));ye++}for(ye=0,Je=Te,Xe=Ge,pe?(Te=b+se,Ge=0):(Te=0,Ge=b+se),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],bt=Tt.Da;var jt=ye===0?0:he;if(pe){var Ft=a.computeBusNodeSpacing(Tt)-se;Ge-=jt+bt.height,Tt.S.h(Te+Ft,Ge),E=Math.max(E,Te+bt.width+Ft),te=Math.max(te,Math.abs(Ge))}else Ft=a.computeBusNodeSpacing(Tt)-se,Te-=jt+bt.width,Tt.S.h(Te,Ge+Ft),te=Math.max(te,Ge+bt.height+Ft),E=Math.max(E,Math.abs(Te));ye++}for(1<ne&&ne%2===1&&(he=x[ne-1],ye=he.Da,a=a.computeBusLastRowSpacing(he,pe?Math.max(Math.abs(Xe),Math.abs(Ge)):Math.max(Math.abs(Je),Math.abs(Te))),pe?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-ye.height-a),Te=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Te+ye.width),0>Te&&(E-=Te),te=Math.max(te,Math.abs(Math.min(Xe,Ge))+a+ye.height),0>he.S.x&&(b=N0(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(Je,Te))+a+ye.width),Ge=b+se/2-he.focus.y-he.la.y,te=Math.max(te,Ge+ye.height),0>Ge&&(te-=Ge),0>he.S.y&&(b=N0(y,he.S.y,!0,b,se)))),y=0;y<ne;y++)se=x[y],pe?se.S.h(se.S.x,se.S.y+te):se.S.h(se.S.x+E,se.S.y);return new Jt(b,0,E,te)}Xr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Xr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function N0(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 Ny(a,y,x){switch(a.alignment){case Hf:case $d:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ku:return a.width>y?a.width:y;case Tu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Mh:case Mu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Lh:return a.width-a.focus.x+a.nodeSpacing/2+y;case Zu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case Hf:case $d:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ku:return a.height>y?a.height:y;case Tu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Mh:case Mu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Lh:return a.height-a.focus.y+a.nodeSpacing/2+y;case Zu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case $d:y/=2,x/=2;break;case Hf:y/=2,x/=2;break;case ku:x=y=0;break;case Tu:break;default:Ot("Unhandled alignment value "+a.toString())}return new lt(y,x)}function ef(a,y,x,b,E,te){y=jy(y,x,b),Uf(a,y.x,y.y,E,te)}function Uf(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 A0(a,y,x,b){var E=y.parent;switch(a.ud){case Eu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Wf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Ot("Unhandled path value "+a.ud.toString())}}function j0(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=Ll(y),pe=he===90||he===270,ye=y.nodeSpacing;y=b;var Te=E;b=te;var Ge=ne,Xe=x.Yo,Je=x.kp;ne=x.Da;var it=pe?Math.max(Ge,ne.height):Math.max(b,ne.width);if((Xe===null||he!==Ll(x))&&(Xe=vs(a,2),Je=vs(a,2),pe?(Xe[0].h(0,0),Xe[1].h(0,ne.height),Je[0].h(ne.width,0),Je[1].h(Je[0].x,Xe[1].y)):(Xe[0].h(0,0),Xe[1].h(ne.width,0),Je[0].h(0,ne.height),Je[1].h(Xe[1].x,Je[0].y))),pe){if(Ge=9999999,!(Te===null||2>Te.length||Xe===null||2>Xe.length))for(E=x=0;x<Te.length&&E<Xe.length;){te=Te[x];var Tt=Xe[E];he=Tt.x,pe=Tt.y,he+=b;var bt=te;x+1<Te.length&&(bt=Te[x+1]);var jt=Tt;Tt=jt.x,jt=jt.y,E+1<Xe.length&&(jt=Xe[E+1],Tt=jt.x,jt=jt.y,Tt+=b);var Ft=Ge;te.y===pe?Ft=he-te.x:te.y>pe&&te.y<jt?Ft=he+(te.y-pe)/(jt-pe)*(Tt-he)-te.x:pe>te.y&&pe<bt.y&&(Ft=he-(te.x+(pe-te.y)/(bt.y-te.y)*(bt.x-te.x))),Ft<Ge&&(Ge=Ft),bt.y<=te.y?x++:jt<=pe?E++:(bt.y<=jt&&x++,jt<=bt.y&&E++)}if(Ge=b-Ge,Ge+=ye,x=Xe,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=vs(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].y<y[0].y;)pe=x[te++],ye[b++].h(pe.x+E,pe.y);for(;he<y.length;)pe=y[he++],ye[b++].h(pe.x,pe.y);for(he=y[y.length-1].y;te<x.length&&x[te].y<=he;)te++;for(;te<x.length&&x[te].y>he;)pe=x[te++],ye[b++].h(pe.x+E,pe.y);for(x=vs(a,b),he=0;he<b;he++)x[he].assign(ye[he]);zl(a,ye),b=x}if(te=Je,he=Ge,Te===null||2>Te.length||te===null||2>te.length)E=null;else{for(ye=vs(a,Te.length+te.length),E=pe=x=0;x<Te.length&&Te[x].y<te[0].y;)bt=Te[x++],ye[E++].h(bt.x,bt.y);for(;pe<te.length;)bt=te[pe++],ye[E++].h(bt.x+he,bt.y);for(te=te[te.length-1].y;x<Te.length&&Te[x].y<=te;)x++;for(;x<Te.length&&Te[x].y>te;)he=Te[x++],ye[E++].h(he.x,he.y);for(te=vs(a,E),x=0;x<E;x++)te[x].assign(ye[x]);zl(a,ye),E=te}return te=Math.max(0,Ge)+ne.width,ne=it,zl(a,y),zl(a,Xe),zl(a,Te),zl(a,Je),se[0]=b,se[1]=E,new Jt(Ge,0,te,ne)}if(b=9999999,!(Te===null||2>Te.length||Xe===null||2>Xe.length))for(E=x=0;x<Te.length&&E<Xe.length;)te=Te[x],Tt=Xe[E],he=Tt.x,pe=Tt.y,pe+=Ge,bt=te,x+1<Te.length&&(bt=Te[x+1]),jt=Tt,Tt=jt.x,jt=jt.y,E+1<Xe.length&&(jt=Xe[E+1],Tt=jt.x,jt=jt.y,jt+=Ge),Ft=b,te.x===he?Ft=pe-te.y:te.x>he&&te.x<Tt?Ft=pe+(te.x-he)/(Tt-he)*(jt-pe)-te.y:he>te.x&&he<bt.x&&(Ft=pe-(te.y+(he-te.x)/(bt.x-te.x)*(bt.y-te.y))),Ft<b&&(b=Ft),bt.x<=te.x?x++:Tt<=he?E++:(bt.x<=Tt&&x++,Tt<=bt.x&&E++);if(Ge-=b,Ge+=ye,x=Xe,E=Ge,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=vs(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].x<y[0].x;)pe=x[te++],ye[b++].h(pe.x,pe.y+E);for(;he<y.length;)pe=y[he++],ye[b++].h(pe.x,pe.y);for(he=y[y.length-1].x;te<x.length&&x[te].x<=he;)te++;for(;te<x.length&&x[te].x>he;)pe=x[te++],ye[b++].h(pe.x,pe.y+E);for(x=vs(a,b),he=0;he<b;he++)x[he].assign(ye[he]);zl(a,ye),b=x}if(te=Je,he=Ge,Te===null||2>Te.length||te===null||2>te.length)E=null;else{for(ye=vs(a,Te.length+te.length),E=pe=x=0;x<Te.length&&Te[x].x<te[0].x;)bt=Te[x++],ye[E++].h(bt.x,bt.y);for(;pe<te.length;)bt=te[pe++],ye[E++].h(bt.x,bt.y+he);for(te=te[te.length-1].x;x<Te.length&&Te[x].x<=te;)x++;for(;x<Te.length&&Te[x].x>te;)he=Te[x++],ye[E++].h(he.x,he.y);for(te=vs(a,E),x=0;x<E;x++)te[x].assign(ye[x]);zl(a,ye),E=te}return te=it,ne=Math.max(0,Ge)+ne.height,zl(a,y),zl(a,Xe),zl(a,Te),zl(a,Je),se[0]=b,se[1]=E,new Jt(Ge,0,te,ne)}function vs(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 lt;return a}function zl(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Xr.prototype.arrangeTrees=function(){if(this.Rb===I0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof gl){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),Oy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof gl&&a.push(x);switch(this.sorting){case Yd:break;case kg:a.reverse();break;case Tg:a.sort(this.comparer);break;case Mg:a.sort(this.comparer),a.reverse();break;default:Ot("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(Oy(this,E,y+E.la.x,x+E.la.y),this.Rb){case B0:x+=E.Da.height+this.$d.height;break;case Iy:y+=E.Da.width+this.$d.width;break;default:Ot("Unhandled arrangement value "+this.Rb.toString())}}}};function Oy(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];Oy(a,ne,x+ne.S.x,b+ne.S.y)}}}Xr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Xr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Xr.prototype.Gu=function(){if(this.layerStyle===R0){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 lt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new lt(-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 Jt(0,te,x,se))):this.angle===90?(E.push(new Jt(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new Jt(te,0,se,x))):(E.push(new Jt(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},Xr.prototype.commitLayers=function(){},Xr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Xr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof gl&&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])}}Xr.prototype.setPortSpots=function(a){var y=a.alignment;if(gc(y)){var x=this.ud===Eu,b=Ll(a);switch(b){case 0:var E=aa;break;case 90:E=ga;break;case 180:E=Oa;break;default:E=Ca}var te=a.children,ne=te.length;switch(y){case Mh:case Mu: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?Oa:Ca;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=Oa;break;case 90:he=Ca;break;case 180:he=aa;break;default:he=ga}else y%2===0&&(he=b===90||b===270?aa:ga);x?(a.setsPortSpot&&(se.fromSpot=E),a.setsChildPortSpot&&(se.toSpot=he)):(a.setsPortSpot&&(se.fromSpot=he),a.setsChildPortSpot&&(se.toSpot=E))}}break;case Lh:for(b=b===90||b===270?aa:ga,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 Zu:for(b=b===90||b===270?Oa:Ca,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=Ll(a),this.ud===Eu){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=aa;break;case 90:b.fromSpot=ga;break;case 180:b.fromSpot=Oa;break;default:b.fromSpot=Ca}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Oa;break;case 90:b.toSpot=Ca;break;case 180:b.toSpot=aa;break;default:b.toSpot=ga}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=aa;break;case 90:b.toSpot=ga;break;case 180:b.toSpot=Oa;break;default:b.toSpot=Ca}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Oa;break;case 90:b.fromSpot=Ca;break;case 180:b.fromSpot=aa;break;default:b.fromSpot=ga}else b.fromSpot=a.childPortSpot}};function Ll(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Xr.prototype.computeLayerSpacing=function(a){var y=Ll(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},Xr.prototype.computeNodeIndent=function(a){var y=Ll(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)},vn.Object.defineProperties(Xr.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!==D0&&a!==Dy&&a!==Fy&&a!==By||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==_y&&a!==R0||(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!==B0&&a!==Iy&&a!==I0||(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!==Yd&&a!==kg&&a!==Tg&&!Mg||(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()):Ot("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!==F0&&a!==Lg||(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!==Yd&&a!==kg&&a!==Tg&&!Mg||(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!==F0&&a!==Lg||(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 O0=new Qt(Xr,"PathDefault",-1),Eu=new Qt(Xr,"PathDestination",0),Wf=new Qt(Xr,"PathSource",1),Yd=new Qt(Xr,"SortingForwards",10),kg=new Qt(Xr,"SortingReverse",11),Tg=new Qt(Xr,"SortingAscending",12),Mg=new Qt(Xr,"SortingDescending",13),$d=new Qt(Xr,"AlignmentCenterSubtrees",20),Hf=new Qt(Xr,"AlignmentCenterChildren",21),ku=new Qt(Xr,"AlignmentStart",22),Tu=new Qt(Xr,"AlignmentEnd",23),Mh=new Qt(Xr,"AlignmentBus",24),Mu=new Qt(Xr,"AlignmentBusBranching",25),Lh=new Qt(Xr,"AlignmentTopLeftBus",26),Zu=new Qt(Xr,"AlignmentBottomRightBus",27),F0=new Qt(Xr,"CompactionNone",30),Lg=new Qt(Xr,"CompactionBlock",31),D0=new Qt(Xr,"StyleLayered",40),Fy=new Qt(Xr,"StyleLastParents",41),Dy=new Qt(Xr,"StyleAlternating",42),By=new Qt(Xr,"StyleRootOnly",43),B0=new Qt(Xr,"ArrangementVertical",50),Iy=new Qt(Xr,"ArrangementHorizontal",51),I0=new Qt(Xr,"ArrangementFixedRoots",52),Ry=new Qt(Xr,"LayerIndividual",60),_y=new Qt(Xr,"LayerSiblings",61),R0=new Qt(Xr,"LayerUniform",62);Xr.className="TreeLayout",Xr.PathDefault=O0,Xr.PathDestination=Eu,Xr.PathSource=Wf,Xr.SortingForwards=Yd,Xr.SortingReverse=kg,Xr.SortingAscending=Tg,Xr.SortingDescending=Mg,Xr.AlignmentCenterSubtrees=$d,Xr.AlignmentCenterChildren=Hf,Xr.AlignmentStart=ku,Xr.AlignmentEnd=Tu,Xr.AlignmentBus=Mh,Xr.AlignmentBusBranching=Mu,Xr.AlignmentTopLeftBus=Lh,Xr.AlignmentBottomRightBus=Zu,Xr.CompactionNone=F0,Xr.CompactionBlock=Lg,Xr.StyleLayered=D0,Xr.StyleLastParents=Fy,Xr.StyleAlternating=Dy,Xr.StyleRootOnly=By,Xr.ArrangementVertical=B0,Xr.ArrangementHorizontal=Iy,Xr.ArrangementFixedRoots=I0,Xr.LayerIndividual=Ry,Xr.LayerSiblings=_y,Xr.LayerUniform=R0;function Kf(a){Zi.call(this,a)}tn(Kf,Zi),Kf.prototype.createVertex=function(){return new gl(this)},Kf.prototype.createEdge=function(){return new Jd(this)},Kf.className="TreeNetwork";function gl(a){Ho.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 lt(0,0),this.Da=new ln(0,0),this.la=new lt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Yd,this.hd=oy,this.Kb=0,this.Jb=Hf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Lg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Zo,this.wr=!0,this.Dp=Zo}tn(gl,Ho),gl.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)},vn.Object.defineProperties(gl.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)}}}),gl.className="TreeVertex";function Jd(a){Ms.call(this,a),this.$t=new lt(0,0)}tn(Jd,Ms),Jd.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 Eu:x=this.fromVertex,b=this.toVertex;break;case Wf:x=this.toVertex,b=this.fromVertex;break;default:Ot("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=Ll(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===Gs,pe=a.isOrthogonal,ye;if(a.uh(),pe||he){for(ye=2;4<a.pointsCount;)a.pv(2);var Te=a.i(1),Ge=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Te=a.i(0),Ge=a.i(a.pointsCount-1)}var Xe=a.i(a.pointsCount-1);te===0?(x.alignment===Tu?(te=b.bottom+E.y,E.y===0&&Te.y>Xe.y+x.rowIndent&&(te=Math.min(te,Math.max(Te.y,te-y.computeNodeIndent(x))))):x.alignment===ku?(te=b.top+E.y,E.y===0&&Te.y<Xe.y-x.rowIndent&&(te=Math.max(te,Math.min(Te.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,Te.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,Ge.x,te)):(pe&&(a.m(ye,b.right+ne/2,Te.y),ye++),a.m(ye,b.right+ne/2,te),ye++,a.m(ye,b.right+ne+E.x-(pe?se/2:se),te),ye++,pe&&a.m(ye,a.i(ye-1).x,Ge.y))):te===90?(x.alignment===Tu?(te=b.right+E.x,E.x===0&&Te.x>Xe.x+x.rowIndent&&(te=Math.min(te,Math.max(Te.x,te-y.computeNodeIndent(x))))):x.alignment===ku?(te=b.left+E.x,E.x===0&&Te.x<Xe.x-x.rowIndent&&(te=Math.max(te,Math.min(Te.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,Te.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,Ge.y)):(pe&&(a.m(ye,Te.x,b.bottom+ne/2),ye++),a.m(ye,te,b.bottom+ne/2),ye++,a.m(ye,te,b.bottom+ne+E.y-(pe?se/2:se)),ye++,pe&&a.m(ye,Ge.x,a.i(ye-1).y))):te===180?(x.alignment===Tu?(te=b.bottom+E.y,E.y===0&&Te.y>Xe.y+x.rowIndent&&(te=Math.min(te,Math.max(Te.y,te-y.computeNodeIndent(x))))):x.alignment===ku?(te=b.top+E.y,E.y===0&&Te.y<Xe.y-x.rowIndent&&(te=Math.max(te,Math.min(Te.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,Te.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,Ge.x,te)):(pe&&(a.m(ye,b.left-ne/2,Te.y),ye++),a.m(ye,b.left-ne/2,te),ye++,a.m(ye,b.left-ne+E.x+(pe?se/2:se),te),ye++,pe&&a.m(ye,a.i(ye-1).x,Ge.y))):te===270?(x.alignment===Tu?(te=b.right+E.x,E.x===0&&Te.x>Xe.x+x.rowIndent&&(te=Math.min(te,Math.max(Te.x,te-y.computeNodeIndent(x))))):x.alignment===ku?(te=b.left+E.x,E.x===0&&Te.x<Xe.x-x.rowIndent&&(te=Math.max(te,Math.min(Te.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,Te.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,Ge.y)):(pe&&(a.m(ye,Te.x,b.top-ne/2),ye++),a.m(ye,te,b.top-ne/2),ye++,a.m(ye,te,b.top-ne+E.y+(pe?se/2:se)),ye++,pe&&a.m(ye,Ge.x,a.i(ye-1).y))):Ot("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=Ll(x),y!==Ll(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===Gs,E=a.isOrthogonal,b=gc(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()))}}},vn.Object.defineProperties(Jd.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)}}}),Jd.className="TreeEdge",Qi.prototype.initializeStandardTools=function(){this.gb("Action",new ll,this.mouseDownTools),this.gb("Relinking",new Bs,this.mouseDownTools),this.gb("LinkReshaping",new ko,this.mouseDownTools),this.gb("Rotating",new Va,this.mouseDownTools),this.gb("Resizing",new ba,this.mouseDownTools),this.gb("Linking",new Ka,this.mouseMoveTools),this.gb("Dragging",new uo,this.mouseMoveTools),this.gb("DragSelecting",new Ks,this.mouseMoveTools),this.gb("Panning",new va,this.mouseMoveTools),this.gb("ContextMenu",new Za,this.mouseUpTools),this.gb("TextEditing",new qi,this.mouseUpTools),this.gb("ClickCreating",new uh,this.mouseUpTools),this.gb("ClickSelecting",new Uh,this.mouseUpTools)},ru("Horizontal",new dm),ru("Spot",new gm),ru("Table",new vm),ru("Viewbox",new xm),ru("TableRow",new ym),ru("TableColumn",new Sm),ru("Graduated",new Kp),ru("Grid",new Hp),xd.add("GraphLinksModel",qo),xd.add("TreeModel",el);var _0=Mn.go,zy={get licenseKey(){return Zt.licenseKey},set licenseKey(a){Zt.licenseKey=a},get version(){return Zt.version},Group:Lr,EnumValue:Qt,List:pn,Set:yn,Map:Yt,Point:lt,Size:ln,Rect:Jt,Margin:Br,Spot:er,Geometry:Cn,PathFigure:Oo,PathSegment:fi,InputEvent:ma,DiagramEvent:hu,ChangedEvent:oo,Model:ir,GraphLinksModel:ri,TreeModel:ts,Binding:Mo,Transaction:Uo,UndoManager:ho,CommandHandler:kt,Tool:li,DraggingTool:uo,DraggingInfo:Gu,DraggingOptions:ce,LinkingBaseTool:yo,LinkingTool:Ka,RelinkingTool:Bs,LinkReshapingTool:ko,ResizingTool:ba,RotatingTool:Va,ClickSelectingTool:Uh,ActionTool:ll,ClickCreatingTool:uh,HTMLInfo:Ql,ContextMenuTool:Za,DragSelectingTool:Ks,PanningTool:va,TextEditingTool:qi,ToolManager:Qi,Animation:ya,AnimationManager:Es,AnimationTrigger:wl,Layer:ra,Diagram:Zt,Palette:Ee,Overview:Oe,Brush:Ei,GraphObject:zt,Panel:Pn,RowColumnDefinition:Io,Shape:Fr,TextBlock:Vi,Picture:us,Part:hr,Adornment:di,Node:Gn,Link:kn,Placeholder:Ja,Layout:so,LayoutNetwork:Zi,LayoutVertex:Ho,LayoutEdge:Ms,GridLayout:ha,PanelLayout:Wo,CircularLayout:fo,CircularNetwork:Vd,CircularVertex:Sg,CircularEdge:S0,ForceDirectedLayout:xa,ForceDirectedNetwork:Gf,ForceDirectedVertex:xg,ForceDirectedEdge:wg,LayeredDigraphLayout:Mi,LayeredDigraphNetwork:Xd,LayeredDigraphVertex:nl,LayeredDigraphEdge:Cg,TreeLayout:Xr,TreeNetwork:Kf,TreeVertex:gl,TreeEdge:Jd};typeof _0=="object"&&_0.version&&Ln("WARNING: a `go` object on the root object is already defined. "+("Debug"in _0?"debug ":"")+"version: "+_0.version+", replaced with version: "+zy.version),Zt.prototype.go=zy,Mn.go=zy,typeof gn.exports=="object"&&(gn.exports=typeof at.g!="undefined"?at.g.go:self.go)}();var ct=typeof at.g!="undefined"?at.g.go:self.go;const Bt=typeof at.g!="undefined"?at.g.go:self.go,oe=Bt.Group,ze=Bt.EnumValue,De=Bt.List,fe=Bt.Set,me=Bt.Map,ke=Bt.Point,Ce=Bt.Size,Se=Bt.Rect,Me=Bt.Margin,ve=Bt.Spot,we=Bt.Geometry,de=Bt.PathFigure,z=Bt.PathSegment,ee=Bt.InputEvent,ae=Bt.DiagramEvent,ie=Bt.ChangedEvent,le=Bt.Model,ue=Bt.GraphLinksModel,ge=Bt.TreeModel,Pe=Bt.Binding,je=Bt.Transaction,Be=Bt.UndoManager,Fe=Bt.CommandHandler,Ne=Bt.Tool,Ae=Bt.DraggingTool,Ie=Bt.DraggingInfo,We=Bt.LinkingBaseTool,Ye=Bt.LinkingTool,Ue=Bt.RelinkingTool,Ke=Bt.LinkReshapingTool,ot=Bt.ResizingTool,st=Bt.RotatingTool,dt=Bt.ClickSelectingTool,Ct=Bt.ActionTool,$e=Bt.ClickCreatingTool,rt=Bt.HTMLInfo,St=Bt.ContextMenuTool,Pt=Bt.DragSelectingTool,wt=Bt.PanningTool,pt=Bt.TextEditingTool,ft=Bt.ToolManager,ht=Bt.Animation,Et=Bt.AnimationManager,mt=Bt.AnimationTrigger,yt=Bt.Layer,At=Bt.Diagram,xt=Bt.Palette,tt=Bt.Overview,Ve=Bt.Brush,xe=Bt.GraphObject,Le=Bt.Panel,Ze=Bt.RowColumnDefinition,nt=Bt.Shape,Re=Bt.TextBlock,_e=Bt.TextBlockMetrics,He=Bt.Picture,Qe=Bt.Part,ut=Bt.Adornment,gt=Bt.Node,Mt=Bt.Link,Nt=Bt.Placeholder,Dt=Bt.Layout,Ht=Bt.LayoutNetwork,Xt=Bt.LayoutVertex,$t=Bt.LayoutEdge,Ut=Bt.GridLayout,sn=Bt.PanelLayout,nn=Bt.CircularLayout,Wt=Bt.CircularNetwork,bn=Bt.CircularVertex,mn=Bt.CircularEdge,jn=Bt.ForceDirectedLayout,Jn=Bt.ForceDirectedNetwork,Cr=Bt.ForceDirectedVertex,cr=Bt.ForceDirectedEdge,kr=Bt.LayeredDigraphLayout,Kr=Bt.LayeredDigraphNetwork,Ur=Bt.LayeredDigraphVertex,oi=Bt.LayeredDigraphEdge,vi=Bt.TreeLayout,Bi=Bt.TreeNetwork,Di=Bt.TreeVertex,Ii=Bt.TreeEdge,Xi=Bt.version},24334:function(gn,cn,at){var ct,Bt;(function(oe,ze){gn.exports=ze(oe)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof at.g!="undefined"?at.g:this,function(oe){"use strict";oe=oe||{};var ze=oe.Base64,De="2.6.4",fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",me=function(Ue){for(var Ke={},ot=0,st=Ue.length;ot<st;ot++)Ke[Ue.charAt(ot)]=ot;return Ke}(fe),ke=String.fromCharCode,Ce=function(Ue){if(Ue.length<2){var Ke=Ue.charCodeAt(0);return Ke<128?Ue:Ke<2048?ke(192|Ke>>>6)+ke(128|Ke&63):ke(224|Ke>>>12&15)+ke(128|Ke>>>6&63)+ke(128|Ke&63)}else{var Ke=65536+(Ue.charCodeAt(0)-55296)*1024+(Ue.charCodeAt(1)-56320);return ke(240|Ke>>>18&7)+ke(128|Ke>>>12&63)+ke(128|Ke>>>6&63)+ke(128|Ke&63)}},Se=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Me=function(Ue){return Ue.replace(Se,Ce)},ve=function(Ue){var Ke=[0,2,1][Ue.length%3],ot=Ue.charCodeAt(0)<<16|(Ue.length>1?Ue.charCodeAt(1):0)<<8|(Ue.length>2?Ue.charCodeAt(2):0),st=[fe.charAt(ot>>>18),fe.charAt(ot>>>12&63),Ke>=2?"=":fe.charAt(ot>>>6&63),Ke>=1?"=":fe.charAt(ot&63)];return st.join("")},we=oe.btoa&&typeof oe.btoa=="function"?function(Ue){return oe.btoa(Ue)}:function(Ue){if(Ue.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Ue.replace(/[\s\S]{1,3}/g,ve)},de=function(Ue){return we(Me(String(Ue)))},z=function(Ue){return Ue.replace(/[+\/]/g,function(Ke){return Ke=="+"?"-":"_"}).replace(/=/g,"")},ee=function(Ue,Ke){return Ke?z(de(Ue)):de(Ue)},ae=function(Ue){return ee(Ue,!0)},ie;oe.Uint8Array&&(ie=function(Ue,Ke){for(var ot="",st=0,dt=Ue.length;st<dt;st+=3){var Ct=Ue[st],$e=Ue[st+1],rt=Ue[st+2],St=Ct<<16|$e<<8|rt;ot+=fe.charAt(St>>>18)+fe.charAt(St>>>12&63)+(typeof $e!="undefined"?fe.charAt(St>>>6&63):"=")+(typeof rt!="undefined"?fe.charAt(St&63):"=")}return Ke?z(ot):ot});var le=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=function(Ue){switch(Ue.length){case 4:var Ke=(7&Ue.charCodeAt(0))<<18|(63&Ue.charCodeAt(1))<<12|(63&Ue.charCodeAt(2))<<6|63&Ue.charCodeAt(3),ot=Ke-65536;return ke((ot>>>10)+55296)+ke((ot&1023)+56320);case 3:return ke((15&Ue.charCodeAt(0))<<12|(63&Ue.charCodeAt(1))<<6|63&Ue.charCodeAt(2));default:return ke((31&Ue.charCodeAt(0))<<6|63&Ue.charCodeAt(1))}},ge=function(Ue){return Ue.replace(le,ue)},Pe=function(Ue){var Ke=Ue.length,ot=Ke%4,st=(Ke>0?me[Ue.charAt(0)]<<18:0)|(Ke>1?me[Ue.charAt(1)]<<12:0)|(Ke>2?me[Ue.charAt(2)]<<6:0)|(Ke>3?me[Ue.charAt(3)]:0),dt=[ke(st>>>16),ke(st>>>8&255),ke(st&255)];return dt.length-=[0,0,2,1][ot],dt.join("")},je=oe.atob&&typeof oe.atob=="function"?function(Ue){return oe.atob(Ue)}:function(Ue){return Ue.replace(/\S{1,4}/g,Pe)},Be=function(Ue){return je(String(Ue).replace(/[^A-Za-z0-9\+\/]/g,""))},Fe=function(Ue){return ge(je(Ue))},Ne=function(Ue){return String(Ue).replace(/[-_]/g,function(Ke){return Ke=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ae=function(Ue){return Fe(Ne(Ue))},Ie;oe.Uint8Array&&(Ie=function(Ue){return Uint8Array.from(Be(Ne(Ue)),function(Ke){return Ke.charCodeAt(0)})});var We=function(){var Ue=oe.Base64;return oe.Base64=ze,Ue};if(oe.Base64={VERSION:De,atob:Be,btoa:we,fromBase64:Ae,toBase64:ee,utob:Me,encode:ee,encodeURI:ae,btou:ge,decode:Ae,noConflict:We,fromUint8Array:ie,toUint8Array:Ie},typeof Object.defineProperty=="function"){var Ye=function(Ue){return{value:Ue,enumerable:!1,writable:!0,configurable:!0}};oe.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Ye(function(){return Ae(this)})),Object.defineProperty(String.prototype,"toBase64",Ye(function(Ue){return ee(this,Ue)})),Object.defineProperty(String.prototype,"toBase64URI",Ye(function(){return ee(this,!0)}))}}return oe.Meteor&&(Base64=oe.Base64),gn.exports?gn.exports.Base64=oe.Base64:(ct=[],Bt=function(){return oe.Base64}.apply(cn,ct),Bt!==void 0&&(gn.exports=Bt)),{Base64:oe.Base64}})},2859:function(gn,cn,at){"use strict";at.d(cn,{hP:function(){return tt}});var ct=function(Ve,xe){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Le,Ze){Le.__proto__=Ze}||function(Le,Ze){for(var nt in Ze)Object.prototype.hasOwnProperty.call(Ze,nt)&&(Le[nt]=Ze[nt])})(Ve,xe)};function Bt(Ve,xe){function Le(){this.constructor=Ve}ct(Ve,xe),Ve.prototype=xe===null?Object.create(xe):(Le.prototype=xe.prototype,new Le)}function oe(Ve,xe,Le,Ze){return new(Le||(Le=Promise))(function(nt,Re){function _e(ut){try{Qe(Ze.next(ut))}catch(gt){Re(gt)}}function He(ut){try{Qe(Ze.throw(ut))}catch(gt){Re(gt)}}function Qe(ut){var gt;ut.done?nt(ut.value):(gt=ut.value,gt instanceof Le?gt:new Le(function(Mt){Mt(gt)})).then(_e,He)}Qe((Ze=Ze.apply(Ve,xe||[])).next())})}function ze(Ve,xe){var Le,Ze,nt,Re,_e={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return Re={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(Re[Symbol.iterator]=function(){return this}),Re;function He(Qe){return function(ut){return function(gt){if(Le)throw new TypeError("Generator is already executing.");for(;_e;)try{if(Le=1,Ze&&(nt=2&gt[0]?Ze.return:gt[0]?Ze.throw||((nt=Ze.return)&&nt.call(Ze),0):Ze.next)&&!(nt=nt.call(Ze,gt[1])).done)return nt;switch(Ze=0,nt&&(gt=[2&gt[0],nt.value]),gt[0]){case 0:case 1:nt=gt;break;case 4:return _e.label++,{value:gt[1],done:!1};case 5:_e.label++,Ze=gt[1],gt=[0];continue;case 7:gt=_e.ops.pop(),_e.trys.pop();continue;default:if(nt=_e.trys,!((nt=nt.length>0&&nt[nt.length-1])||gt[0]!==6&&gt[0]!==2)){_e=0;continue}if(gt[0]===3&&(!nt||gt[1]>nt[0]&&gt[1]<nt[3])){_e.label=gt[1];break}if(gt[0]===6&&_e.label<nt[1]){_e.label=nt[1],nt=gt;break}if(nt&&_e.label<nt[2]){_e.label=nt[2],_e.ops.push(gt);break}nt[2]&&_e.ops.pop(),_e.trys.pop();continue}gt=xe.call(Ve,_e)}catch(Mt){gt=[6,Mt],Ze=0}finally{Le=nt=0}if(5&gt[0])throw gt[1];return{value:gt[0]?gt[1]:void 0,done:!0}}([Qe,ut])}}}function De(){for(var Ve=0,xe=0,Le=arguments.length;xe<Le;xe++)Ve+=arguments[xe].length;var Ze=Array(Ve),nt=0;for(xe=0;xe<Le;xe++)for(var Re=arguments[xe],_e=0,He=Re.length;_e<He;_e++,nt++)Ze[nt]=Re[_e];return Ze}var fe=function(){function Ve(){}return Ve.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ve.setAttributes=function(xe,Le){for(var Ze=0,nt=Le;Ze<nt.length;Ze++){var Re=nt[Ze],_e=Re[0],He=Re[1];xe.setAttribute(_e,He)}},Ve.createRect=function(xe,Le,Ze){var nt=document.createElementNS("http://www.w3.org/2000/svg","rect");return nt.setAttribute("width",xe.toString()),nt.setAttribute("height",Le.toString()),Ze&&Ve.setAttributes(nt,Ze),nt},Ve.createLine=function(xe,Le,Ze,nt,Re){var _e=document.createElementNS("http://www.w3.org/2000/svg","line");return _e.setAttribute("x1",xe.toString()),_e.setAttribute("y1",Le.toString()),_e.setAttribute("x2",Ze.toString()),_e.setAttribute("y2",nt.toString()),Re&&Ve.setAttributes(_e,Re),_e},Ve.createPolygon=function(xe,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ze.setAttribute("points",xe),Le&&Ve.setAttributes(Ze,Le),Ze},Ve.createCircle=function(xe,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ze.setAttribute("cx",(xe/2).toString()),Ze.setAttribute("cy",(xe/2).toString()),Ze.setAttribute("r",xe.toString()),Le&&Ve.setAttributes(Ze,Le),Ze},Ve.createEllipse=function(xe,Le,Ze){var nt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return nt.setAttribute("cx",(xe/2).toString()),nt.setAttribute("cy",(Le/2).toString()),nt.setAttribute("rx",(xe/2).toString()),nt.setAttribute("ry",(Le/2).toString()),Ze&&Ve.setAttributes(nt,Ze),nt},Ve.createGroup=function(xe){var Le=document.createElementNS("http://www.w3.org/2000/svg","g");return xe&&Ve.setAttributes(Le,xe),Le},Ve.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ve.createMarker=function(xe,Le,Ze,nt,Re,_e,He){var Qe=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ve.setAttributes(Qe,[["id",xe],["orient",Le],["markerWidth",Ze.toString()],["markerHeight",nt.toString()],["refX",Re.toString()],["refY",_e.toString()]]),Qe.appendChild(He),Qe},Ve.createText=function(xe){var Le=document.createElementNS("http://www.w3.org/2000/svg","text");return Le.setAttribute("x","0"),Le.setAttribute("y","0"),xe&&Ve.setAttributes(Le,xe),Le},Ve.createTSpan=function(xe,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ze.textContent=xe,Le&&Ve.setAttributes(Ze,Le),Ze},Ve.createImage=function(xe){var Le=document.createElementNS("http://www.w3.org/2000/svg","image");return xe&&Ve.setAttributes(Le,xe),Le},Ve.createPoint=function(xe,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ze.x=xe,Ze.y=Le,Ze},Ve.createPath=function(xe,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","path");return Ze.setAttribute("d",xe),Le&&Ve.setAttributes(Ze,Le),Ze},Ve}(),me=function(){function Ve(){}return Ve.addKey=function(xe){Ve.key=xe},Object.defineProperty(Ve,"isLicensed",{get:function(){return!!Ve.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ve.key)},enumerable:!1,configurable:!0}),Ve}(),ke=function(){function Ve(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ve.prototype.rasterize=function(xe,Le,Ze){var nt=this;return new Promise(function(Re){var _e=Ze!==void 0?Ze:document.createElement("canvas");xe===null&&(nt.markersOnly=!0,nt.naturalSize=!1);var He=document.createElementNS("http://www.w3.org/2000/svg","svg");He.setAttribute("xmlns","http://www.w3.org/2000/svg"),He.setAttribute("width",Le.width.baseVal.valueAsString),He.setAttribute("height",Le.height.baseVal.valueAsString),He.setAttribute("viewBox","0 0 "+Le.viewBox.baseVal.width.toString()+" "+Le.viewBox.baseVal.height.toString()),He.innerHTML=Le.innerHTML,nt.naturalSize===!0?(He.width.baseVal.value=xe.naturalWidth,He.height.baseVal.value=xe.naturalHeight):nt.width!==void 0&&nt.height!==void 0&&(He.width.baseVal.value=nt.width,He.height.baseVal.value=nt.height),_e.width=He.width.baseVal.value,_e.height=He.height.baseVal.value;var Qe=He.outerHTML,ut=_e.getContext("2d");nt.markersOnly!==!0&&ut.drawImage(xe,0,0,_e.width,_e.height);var gt=window.URL,Mt=new Image(_e.width,_e.height);Mt.setAttribute("crossOrigin","anonymous");var Nt=new Blob([Qe],{type:"image/svg+xml"}),Dt=gt.createObjectURL(Nt);Mt.onload=function(){ut.drawImage(Mt,0,0),gt.revokeObjectURL(Dt);var Ht=_e.toDataURL(nt.imageType,nt.imageQuality);Re(Ht)},Mt.src=Dt})},Ve}(),Ce=function(){},Se=function(){function Ve(xe){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+xe+"_"}return Object.defineProperty(Ve.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.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(Ve.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ve.prototype.addClass=function(xe){return this.styleSheet===void 0&&this.addStyleSheet(),xe.name=""+this.classNamePrefix+xe.localName,this.classes.push(xe),this.styleSheet.sheet.insertRule("."+xe.name+" {"+xe.style+"}",this.styleSheet.sheet.cssRules.length),xe},Ve.prototype.addRule=function(xe){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(xe),this.styleSheet.sheet.insertRule(xe.selector+" {"+xe.style+"}",this.styleSheet.sheet.cssRules.length)},Ve.prototype.addStyleSheet=function(){var xe;this.styleSheet=document.createElement("style"),((xe=this.styleSheetRoot)!==null&&xe!==void 0?xe:document.head).appendChild(this.styleSheet),this.addRule(new Me("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Me("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Me("@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;
`))},Ve.prototype.removeStyleSheet=function(){var xe;this.styleSheet&&(((xe=this.styleSheetRoot)!==null&&xe!==void 0?xe:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ve}(),Me=function(Ve,xe){this.selector=Ve,this.style=xe},ve=function(Ve,xe){this.localName=Ve,this.style=xe},we=function(){function Ve(xe,Le,Ze,nt,Re){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=xe,this.displayMode=Le,this.markerItems=Ze,this.uiStyleSettings=nt,this.styles=Re,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ve.prototype.show=function(xe){var Le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xe,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ze=document.createElement("div");Ze.className=this.toolbarBlockStyleClass.name,Ze.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ze),this.addActionButton(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Ze,'<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(Re){var _e=document.createElement("div");_e.className=""+Le.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",Re.typeName),_e.innerHTML=Re.icon,_e.addEventListener("click",function(){Le.markerToolbarButtonClicked(_e,Re)}),Le.buttons.push(_e),Le.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 nt=document.createElement("div");nt.className=this.toolbarBlockStyleClass.name,nt.style.whiteSpace="nowrap",nt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(nt),this.addActionButton(nt,'<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(nt,'<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()},Ve.prototype.addButtonClickListener=function(xe){this.buttonClickListeners.push(xe)},Ve.prototype.removeButtonClickListener=function(xe){this.buttonClickListeners.indexOf(xe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(xe),1)},Ve.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ve.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var xe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Le=0;Le<this.markerButtons.length;Le++)Le<xe||Le===xe&&this.markerButtons.length-1===xe?this.markerButtonBlock.appendChild(this.markerButtons[Le]):(Le===xe&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Le]))}},Ve.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")},Ve.prototype.resetButtonStyles=function(){var xe=this;this.buttons.forEach(function(Le){Le.className=Le.className.replace(xe.uiStyleSettings.toolbarButtonStyleColorsClassName?xe.uiStyleSettings.toolbarButtonStyleColorsClassName:xe.toolbarButtonStyleColorsClass.name,"").trim(),Le.className=Le.className.replace(xe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?xe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:xe.toolbarActiveButtonStyleColorsClass.name,"").trim(),Le.className+=" "+(xe.uiStyleSettings.toolbarButtonStyleColorsClassName?xe.uiStyleSettings.toolbarButtonStyleColorsClassName:xe.toolbarButtonStyleColorsClass.name)})},Ve.prototype.addActionButton=function(xe,Le,Ze){var nt=this,Re=document.createElement("div");switch(Re.className=""+this.toolbarButtonStyleClass.name,Re.innerHTML=Le,Re.setAttribute("data-action",Ze),Re.addEventListener("click",function(){nt.actionToolbarButtonClicked(Re,Ze)}),Ze){case"select":Re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Re.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Re.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Re.style.fill=this.uiStyleSettings.closeButtonColor}xe.appendChild(Re),this.buttons.push(Re)},Ve.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 xe=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*xe)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*xe)+`px;
padding: `+xe+`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 Me("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Me("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Ve.prototype.markerToolbarButtonClicked=function(xe,Le){this.setActiveButton(xe),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ze){return Ze("marker",Le)}),this.markerButtonOverflowBlock.style.display="none"},Ve.prototype.actionToolbarButtonClicked=function(xe,Le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ze){return Ze("action",Le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ve.prototype.setActiveButton=function(xe){this.resetButtonStyles(),xe.className=xe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),xe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ve.prototype.setActiveMarkerButton=function(xe){var Le=this.markerButtons.find(function(Ze){return Ze.getAttribute("data-type-name")===xe});Le&&this.setActiveButton(Le)},Ve.prototype.setCurrentMarker=function(xe){var Le=this;this.currentMarker=xe,this.buttons.filter(function(Ze){return/delete|notes/.test(Ze.getAttribute("data-action"))}).forEach(function(Ze){Le.currentMarker===void 0?(Ze.style.fillOpacity="0.4",Ze.style.pointerEvents="none"):(Ze.style.fillOpacity="1",Ze.style.pointerEvents="all")})},Ve}(),de=function(){function Ve(xe,Le,Ze,nt){this.panels=[],this.panelButtons=[],this.markerjsContainer=xe,this.displayMode=Le,this.uiStyleSettings=Ze,this.styles=nt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ve.prototype.addStyles=function(){var xe;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 Le=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: `+((xe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&xe!==void 0?xe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Le)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Le)+`px;
padding: `+Le+`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 Me("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Me("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Ve.prototype.show=function(xe){var Le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Le!==void 0?Le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ve.prototype.setPanelButtons=function(xe){var Le,Ze,nt=this;this.panels=xe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Le=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Le!==void 0?Le:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ze=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ze!==void 0?Ze:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Re){var _e;Re.uiStyleSettings=nt.uiStyleSettings;var He=document.createElement("div");He.className=nt.toolboxButtonStyleClass.name+" "+((_e=nt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:nt.toolboxButtonStyleColorsClass.name),He.innerHTML=Re.icon,He.title=Re.title,He.addEventListener("click",function(){nt.panelButtonClick(Re)}),nt.panelButtons.push(He),nt.buttonRow.appendChild(He)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ve.prototype.panelButtonClick=function(xe){var Le=this,Ze=-1;if(xe!==this.activePanel){Ze=this.panels.indexOf(xe),this.panelRow.innerHTML="";var nt=xe.getUi();nt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(nt),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=xe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Le.displayMode==="inline"?Le.panelRow.style.display="none":Le.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Re,_e){var He,Qe;Re.className=Le.toolboxButtonStyleClass.name+" "+(_e===Ze?""+((He=Le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&He!==void 0?He:Le.toolboxActiveButtonStyleColorsClass.name):""+((Qe=Le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:Le.toolboxButtonStyleColorsClass.name))})},Ve}(),z=function(Ve,xe){this.title=Ve,this.icon=xe},ee=function(Ve){function xe(Le,Ze,nt,Re){var _e=Ve.call(this,Le,Re||'<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=Ze,_e.currentColor=nt,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return Bt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");return Ze.style.overflow="hidden",Ze.style.whiteSpace="nowrap",this.colors.forEach(function(nt){var Re=Le.getColorBox(nt);Ze.appendChild(Re),Le.colorBoxes.push(Re)}),Ze},xe.prototype.getColorBox=function(Le){var Ze=this,nt=this.uiStyleSettings.toolbarHeight/4,Re=this.uiStyleSettings.toolbarHeight-nt,_e=document.createElement("div");_e.style.display="inline-block",_e.style.boxSizing="content-box",_e.style.width=Re-2+"px",_e.style.height=Re-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=(Re+2)/2+"px",_e.style.borderColor=Le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){Ze.setCurrentColor(Le,_e)});var He=document.createElement("div");return He.style.display="inline-block",He.style.width=Re-2+"px",He.style.height=Re-2+"px",He.style.backgroundColor=Le,He.style.borderRadius=Re/2+"px",Le==="transparent"&&(He.style.fill=this.uiStyleSettings.toolboxAccentColor,He.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(He),_e},xe.prototype.setCurrentColor=function(Le,Ze){var nt=this;this.currentColor=Le,this.colorBoxes.forEach(function(Re){Re.style.borderColor=Re===Ze?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Le)},xe}(z),ae=function(){function Ve(xe,Le,Ze){this._state="new",this._isSelected=!1,this._container=xe,this._overlayContainer=Le,this.globalSettings=Ze,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ve.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ve.prototype.ownsTarget=function(xe){return!1},Object.defineProperty(Ve.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ve.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ve.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ve.prototype.pointerDown=function(xe,Le){},Ve.prototype.dblClick=function(xe,Le){},Ve.prototype.manipulate=function(xe){},Ve.prototype.pointerUp=function(xe){this.stateChanged()},Ve.prototype.dispose=function(){},Ve.prototype.addMarkerVisualToContainer=function(xe){this.container.childNodes.length>0?this.container.insertBefore(xe,this.container.childNodes[0]):this.container.appendChild(xe)},Ve.prototype.getState=function(){return{typeName:Ve.typeName,state:this.state,notes:this.notes}},Ve.prototype.restoreState=function(xe){this._state=xe.state,this.notes=xe.notes},Ve.prototype.scale=function(xe,Le){},Ve.prototype.colorChanged=function(xe){this.onColorChanged&&this.onColorChanged(xe),this.stateChanged()},Ve.prototype.fillColorChanged=function(xe){this.onFillColorChanged&&this.onFillColorChanged(xe),this.stateChanged()},Ve.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var xe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),xe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(xe)&&this.onStateChanged(this)}},Ve.typeName="MarkerBase",Ve}(),ie=function(){function Ve(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ve.prototype.findGripByVisual=function(xe){return this.topLeft.ownsTarget(xe)?this.topLeft:this.topCenter.ownsTarget(xe)?this.topCenter:this.topRight.ownsTarget(xe)?this.topRight:this.centerLeft.ownsTarget(xe)?this.centerLeft:this.centerRight.ownsTarget(xe)?this.centerRight:this.bottomLeft.ownsTarget(xe)?this.bottomLeft:this.bottomCenter.ownsTarget(xe)?this.bottomCenter:this.bottomRight.ownsTarget(xe)?this.bottomRight:void 0},Ve}(),le=function(){function Ve(){this.GRIP_SIZE=10,this.visual=fe.createGroup(),this.visual.appendChild(fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(fe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ve.prototype.ownsTarget=function(xe){return xe===this.visual||xe===this.visual.childNodes[0]||xe===this.visual.childNodes[1]},Ve}(),ue=function(){function Ve(){}return Ve.toITransformMatrix=function(xe){return{a:xe.a,b:xe.b,c:xe.c,d:xe.d,e:xe.e,f:xe.f}},Ve.toSVGMatrix=function(xe,Le){return xe.a=Le.a,xe.b=Le.b,xe.c=Le.c,xe.d=Le.d,xe.e=Le.e,xe.f=Le.f,xe},Ve}(),ge=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.left=0,Re.top=0,Re.width=0,Re.height=0,Re.defaultSize={x:50,y:20},Re.offsetX=0,Re.offsetY=0,Re.rotationAngle=0,Re.CB_DISTANCE=10,Re._suppressMarkerCreateEvent=!1,Re.container.transform.baseVal.appendItem(fe.createTransform()),Re.setupControlBox(),Re}return Bt(xe,Ve),Object.defineProperty(xe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"visual",{get:function(){return this._visual},set:function(Le){this._visual=Le;var Ze=fe.createTransform();this._visual.transform.baseVal.appendItem(Ze)},enumerable:!1,configurable:!0}),xe.prototype.ownsTarget=function(Le){return!!Ve.prototype.ownsTarget.call(this,Le)||!!(this.controlGrips.findGripByVisual(Le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Le))},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="new"&&(this.left=Le.x,this.top=Le.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var nt=this.unrotatePoint(Le);if(this.manipulationStartX=nt.x,this.manipulationStartY=nt.y,this.offsetX=nt.x-this.left,this.offsetY=nt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ze),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ze)){this.activeGrip=this.rotatorGrip;var Re=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Re.x-this.width/2,this.top=Re.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"},xe.prototype.pointerUp=function(Le){var Ze=this.state;Ve.prototype.pointerUp.call(this,Le),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Le),this._state="select",Ze==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},xe.prototype.moveVisual=function(Le){this.visual.style.transform="translate("+Le.x+"px, "+Le.y+"px)"},xe.prototype.manipulate=function(Le){var Ze=this.unrotatePoint(Le);this.state==="creating"?this.resize(Le):this.state==="move"?(this.left=this.manipulationStartLeft+(Ze.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ze.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ze):this.state==="rotate"&&this.rotate(Le)},xe.prototype.resize=function(Le){var Ze=this.manipulationStartLeft,nt=this.manipulationStartWidth,Re=this.manipulationStartTop,_e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ze=this.manipulationStartLeft+Le.x-this.manipulationStartX,nt=this.manipulationStartWidth+this.manipulationStartLeft-Ze;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:nt=this.manipulationStartWidth+Le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Re=this.manipulationStartTop+Le.y-this.manipulationStartY,_e=this.manipulationStartHeight+this.manipulationStartTop-Re;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_e=this.manipulationStartHeight+Le.y-this.manipulationStartY}nt>=0?(this.left=Ze,this.width=nt):(this.left=Ze+nt,this.width=-nt),_e>=0?(this.top=Re,this.height=_e):(this.top=Re+_e,this.height=-_e),this.setSize()},xe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},xe.prototype.rotate=function(Le){if(Math.abs(Le.x-this.centerX)>.1){var Ze=Math.sign(Le.x-this.centerX);this.rotationAngle=180*Math.atan((Le.y-this.centerY)/(Le.x-this.centerX))/Math.PI+90*Ze,this.applyRotation()}},xe.prototype.applyRotation=function(){var Le=this.container.transform.baseVal.getItem(0);Le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Le,0)},xe.prototype.rotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Ze=this.container.getCTM(),nt=fe.createPoint(Le.x,Le.y);return{x:(nt=nt.matrixTransform(Ze)).x,y:nt.y}},xe.prototype.unrotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Ze=this.container.getCTM();Ze=Ze.inverse();var nt=fe.createPoint(Le.x,Le.y);return{x:(nt=nt.matrixTransform(Ze)).x,y:nt.y}},xe.prototype.select=function(){Ve.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xe.prototype.deselect=function(){Ve.prototype.deselect.call(this),this.controlBox.style.display="none"},xe.prototype.setupControlBox=function(){this.controlBox=fe.createGroup();var Le=fe.createTransform();Le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Le),this.container.appendChild(this.controlBox),this.controlRect=fe.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=fe.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"},xe.prototype.adjustControlBox=function(){var Le=this.controlBox.transform.baseVal.getItem(0);Le.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Le,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()},xe.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()},xe.prototype.createGrip=function(){var Le=new le;return Le.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Le.visual),Le},xe.prototype.positionGrips=function(){var Le=this.controlGrips.topLeft.GRIP_SIZE,Ze=-Le/2,nt=Ze,Re=(this.width+this.CB_DISTANCE)/2-Le/2,_e=(this.height+this.CB_DISTANCE)/2-Le/2,He=this.height+this.CB_DISTANCE-Le/2,Qe=this.width+this.CB_DISTANCE-Le/2;this.positionGrip(this.controlGrips.topLeft.visual,Ze,nt),this.positionGrip(this.controlGrips.topCenter.visual,Re,nt),this.positionGrip(this.controlGrips.topRight.visual,Qe,nt),this.positionGrip(this.controlGrips.centerLeft.visual,Ze,_e),this.positionGrip(this.controlGrips.centerRight.visual,Qe,_e),this.positionGrip(this.controlGrips.bottomLeft.visual,Ze,He),this.positionGrip(this.controlGrips.bottomCenter.visual,Re,He),this.positionGrip(this.controlGrips.bottomRight.visual,Qe,He),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Re,nt-3*this.CB_DISTANCE)},xe.prototype.positionGrip=function(Le,Ze,nt){var Re=Le.transform.baseVal.getItem(0);Re.setTranslate(Ze,nt),Le.transform.baseVal.replaceItem(Re,0)},xe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},xe.prototype.showControlBox=function(){this.controlBox.style.display=""},xe.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)},Ve.prototype.getState.call(this))},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Ze=Le;this.left=Ze.left,this.top=Ze.top,this.width=Ze.width,this.height=Ze.height,this.rotationAngle=Ze.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ze.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ze.containerTransformMatrix))},xe.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze);var nt=this.rotatePoint({x:this.left,y:this.top}),Re=this.unrotatePoint({x:nt.x*Le,y:nt.y*Ze});this.left=Re.x,this.top=Re.y,this.width=this.width*Le,this.height=this.height*Ze,this.adjustControlBox()},xe}(ae),Pe=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.fillColor="transparent",Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.opacity=1,Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setFillColor=Re.setFillColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.createVisual=Re.createVisual.bind(Re),Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual)},xe.prototype.createVisual=function(){this.visual=fe.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)},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},xe.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},xe.prototype.setSize=function(){Ve.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},xe.prototype.pointerUp=function(Le){Ve.prototype.pointerUp.call(this,Le),this.setSize()},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},xe.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ve.prototype.getState.call(this))},xe.prototype.restoreState=function(Le){var Ze=Le;this.fillColor=Ze.fillColor,this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.opacity=Ze.opacity,this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.setSize()},xe.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setSize()},xe.title="Rectangle marker",xe}(ge),je=function(Ve){function xe(Le,Ze,nt,Re){var _e=Ve.call(this,Le,Re||'<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=Ze,_e.currentWidth=nt,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return Bt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");return Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2",this.widths.forEach(function(nt){var Re=document.createElement("div");Re.style.display="flex",Re.style.flexGrow="2",Re.style.alignItems="center",Re.style.justifyContent="space-between",Re.style.padding="5px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.borderColor=nt===Le.currentWidth?Le.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Le.setCurrentWidth(nt,Re)}),Ze.appendChild(Re);var _e=document.createElement("div");_e.innerText=nt.toString(),_e.style.marginRight="5px",Re.appendChild(_e);var He=document.createElement("div");He.style.minHeight="20px",He.style.flexGrow="2",He.style.display="flex",He.style.alignItems="center";var Qe=document.createElement("hr");Qe.style.minWidth="20px",Qe.style.border="0px",Qe.style.borderTop=nt+"px solid "+Le.uiStyleSettings.toolboxColor,Qe.style.flexGrow="2",He.appendChild(Qe),Re.appendChild(He),Le.widthBoxes.push(Re)}),Ze},xe.prototype.setCurrentWidth=function(Le,Ze){var nt=this;this.currentWidth=Le,this.widthBoxes.forEach(function(Re){Re.style.borderColor=Re===Ze?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},xe}(z),Be=function(Ve){function xe(Le,Ze,nt,Re){var _e=Ve.call(this,Le,Re||'<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=Ze,_e.currentStyle=nt,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return Bt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");return Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2",this.styles.forEach(function(nt){var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.justifyContent="space-between",Re.style.padding="5px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.overflow="hidden",Re.style.maxWidth=100/Le.styles.length-5+"%",Re.style.borderColor=nt===Le.currentStyle?Le.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Le.setCurrentStyle(nt,Re)}),Ze.appendChild(Re);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.overflow="hidden";var He=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(nt!==""?'stroke-dasharray="'+nt+'"':"")+` />
</svg>`;_e.innerHTML=He,Re.appendChild(_e),Le.styleBoxes.push(Re)}),Ze},xe.prototype.setCurrentStyle=function(Le,Ze){var nt=this;this.currentStyle=Le,this.styleBoxes.forEach(function(Re){Re.style.borderColor=Re===Ze?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},xe}(z),Fe=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.strokeColor=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.strokePanel=new ee("Line color",nt.defaultColorSet,nt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new Be("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re}return Bt(xe,Ve),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.typeName="FrameMarker",xe.title="Frame marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',xe}(Pe),Ne=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Ae=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.x1=0,Re.y1=0,Re.x2=0,Re.y2=0,Re.defaultLength=50,Re.manipulationStartX=0,Re.manipulationStartY=0,Re.manipulationStartX1=0,Re.manipulationStartY1=0,Re.manipulationStartX2=0,Re.manipulationStartY2=0,Re.setupControlBox(),Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!!Ve.prototype.ownsTarget.call(this,Le)||!(!this.grip1.ownsTarget(Le)&&!this.grip2.ownsTarget(Le))},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.manipulationStartX=Le.x,this.manipulationStartY=Le.y,this.state==="new"&&(this.x1=Le.x,this.y1=Le.y,this.x2=Le.x,this.y2=Le.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(Ze)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ze)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},xe.prototype.pointerUp=function(Le){var Ze=this.state;Ve.prototype.pointerUp.call(this,Le),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(Le),this._state="select",Ze==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},xe.prototype.adjustVisual=function(){},xe.prototype.manipulate=function(Le){this.state==="creating"?this.resize(Le):this.state==="move"?(this.x1=this.manipulationStartX1+Le.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Le.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Le.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Le.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Le)},xe.prototype.resize=function(Le){switch(this.activeGrip){case this.grip1:this.x1=Le.x,this.y1=Le.y;break;case this.grip2:case void 0:this.x2=Le.x,this.y2=Le.y}this.adjustVisual(),this.adjustControlBox()},xe.prototype.select=function(){Ve.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xe.prototype.deselect=function(){Ve.prototype.deselect.call(this),this.controlBox.style.display="none"},xe.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},xe.prototype.adjustControlBox=function(){this.positionGrips()},xe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},xe.prototype.createGrip=function(){var Le=new le;return Le.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Le.visual),Le},xe.prototype.positionGrips=function(){var Le=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Le/2,this.y1-Le/2),this.positionGrip(this.grip2.visual,this.x2-Le/2,this.y2-Le/2)},xe.prototype.positionGrip=function(Le,Ze,nt){var Re=Le.transform.baseVal.getItem(0);Re.setTranslate(Ze,nt),Le.transform.baseVal.replaceItem(Re,0)},xe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ve.prototype.getState.call(this))},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Ze=Le;this.x1=Ze.x1,this.y1=Ze.y1,this.x2=Ze.x2,this.y2=Ze.y2},xe.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.x1=this.x1*Le,this.y1=this.y1*Ze,this.x2=this.x2*Le,this.y2=this.y2*Ze,this.adjustVisual(),this.adjustControlBox()},xe}(ae),Ie=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.strokeColor=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.strokePanel=new ee("Line color",nt.defaultColorSet,nt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new Be("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorLine&&Le!==this.visibleLine)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorLine=fe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=fe.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)},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},xe.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()),fe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Ze=Le;this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.createVisual(),this.adjustVisual()},xe.typeName="LineMarker",xe.title="Line marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',xe}(Ae),We=function(Ve){function xe(Le,Ze,nt,Re){var _e=Ve.call(this,Le,Re||'<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=Ze,_e.currentFont=nt,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return Bt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");return Ze.style.overflow="hidden",Ze.style.flexGrow="2",this.fonts.forEach(function(nt){var Re=document.createElement("div");Re.style.display="inline-block",Re.style.alignItems="center",Re.style.justifyContent="space-between",Re.style.padding="5px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.overflow="hidden",Re.style.maxWidth=100/Le.fonts.length-5+"%",Re.style.borderColor=nt===Le.currentFont?Le.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Le.setCurrentFont(nt,Re)}),Ze.appendChild(Re);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=nt,_e.style.overflow="hidden";var He=document.createElement("div");He.style.whiteSpace="nowrap",He.style.overflow="hidden",He.style.textOverflow="ellipsis",He.innerHTML="The quick brown fox jumps over the lazy dog",_e.appendChild(He),Re.appendChild(_e),Le.fontBoxes.push(Re)}),Ze},xe.prototype.setCurrentFont=function(Le,Ze){var nt=this;this.currentFont=Le,this.fontBoxes.forEach(function(Re){Re.style.borderColor=Re===Ze?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},xe}(z),Ye=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.color="transparent",Re.padding=5,Re.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Re.text=Re.DEFAULT_TEXT,Re.isMoved=!1,Re.color=nt.defaultColor,Re.fontFamily=nt.defaultFontFamily,Re.defaultSize={x:100,y:30},Re.setColor=Re.setColor.bind(Re),Re.setFont=Re.setFont.bind(Re),Re.renderText=Re.renderText.bind(Re),Re.sizeText=Re.sizeText.bind(Re),Re.textEditDivClicked=Re.textEditDivClicked.bind(Re),Re.showTextEditor=Re.showTextEditor.bind(Re),Re.setSize=Re.setSize.bind(Re),Re.positionTextEditor=Re.positionTextEditor.bind(Re),Re.colorPanel=new ee("Color",nt.defaultColorSet,nt.defaultColor),Re.colorPanel.onColorChanged=Re.setColor,Re.fontFamilyPanel=new We("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Re.fontFamilyPanel.onFontChanged=Re.setFont,Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){if(Ve.prototype.ownsTarget.call(this,Le)||Le===this.visual||Le===this.textElement||Le===this.bgRectangle)return!0;var Ze=!1;return this.textElement.childNodes.forEach(function(nt){nt===Le&&(Ze=!0)}),Ze},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.bgRectangle=fe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=fe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.isMoved=!1,this.pointerDownPoint=Le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},xe.prototype.renderText=function(){var Le=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(Ze){Le.textElement.appendChild(fe.createTSpan(Ze.trim()===""?" ":Ze.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},xe.prototype.getTextScale=function(){var Le=this.textElement.getBBox(),Ze=1;if(Le.width>0&&Le.height>0){var nt=(1*this.width-this.width*this.padding*2/100)/Le.width,Re=(1*this.height-this.height*this.padding*2/100)/Le.height;Ze=Math.min(nt,Re)}return Ze},xe.prototype.getTextPosition=function(Le){var Ze=this.textElement.getBBox(),nt=0,Re=0;return Ze.width>0&&Ze.height>0&&(nt=(this.width-Ze.width*Le)/2,Re=this.height/2-Ze.height*Le/2),{x:nt,y:Re}},xe.prototype.sizeText=function(){var Le=this.textElement.getBBox(),Ze=this.getTextScale(),nt=this.getTextPosition(Ze);nt.y-=Le.y*Ze,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+nt.x+"px, "+nt.y+"px) scale("+Ze+", "+Ze+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(nt.x,nt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ze,Ze))},xe.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Le.x-this.pointerDownPoint.x)>5||Math.abs(Le.y-this.pointerDownPoint.y)>5)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.isMoved=!0,this.setSize(),this.sizeText()},xe.prototype.setSize=function(){Ve.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},xe.prototype.pointerUp=function(Le){var Ze=this.state;Ze==="creating"&&(this._suppressMarkerCreateEvent=!0),Ve.prototype.pointerUp.call(this,Le),this.setSize(),(Ze==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},xe.prototype.showTextEditor=function(){var Le=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(Ze){Ze.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ze=Number.parseFloat(Le.textEditor.style.fontSize);Le.textEditor.clientWidth>=Number.parseInt(Le.textEditor.style.maxWidth)&&Ze>.9;)Ze-=.1,Le.textEditor.style.fontSize=Math.max(Ze,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ze){Ze.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ze){if(Ze.clipboardData){var nt=Ze.clipboardData.getData("text"),Re=window.getSelection();if(!Re.rangeCount)return!1;Re.deleteFromDocument(),Re.getRangeAt(0).insertNode(document.createTextNode(nt)),Ze.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Le.textEditDivClicked(Le.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},xe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Le=this.getTextScale(),Ze=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),nt=this.textElement.getBBox(),Re={x:nt.width*Le,y:nt.height*Le};Ze.x-=Re.x/2,Ze.y-=Re.y/2,this.textEditor.style.top=Ze.y+"px",this.textEditor.style.left=Ze.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ze.x+"px",this.textEditor.style.fontSize=Math.max(16*Le,12)+"px",this.textElement.style.display="none"}},xe.prototype.textEditDivClicked=function(Le){this.text=Le.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},xe.prototype.select=function(){Ve.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},xe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ve.prototype.deselect.call(this)},xe.prototype.dblClick=function(Le,Ze){Ve.prototype.dblClick.call(this,Le,Ze),this.showTextEditor()},xe.prototype.setColor=function(Le){this.textElement&&fe.setAttributes(this.textElement,[["fill",Le]]),this.color=Le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Le)},xe.prototype.setFont=function(Le){this.textElement&&fe.setAttributes(this.textElement,[["font-family",Le]]),this.fontFamily=Le,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},xe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},xe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){var Ze=Le;this.color=Ze.color,this.fontFamily=Ze.fontFamily,this.padding=Ze.padding,this.text=Ze.text,this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.setSize()},xe.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setSize(),this.sizeText(),this.positionTextEditor()},xe.typeName="TextMarker",xe.title="Text marker",xe.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>',xe}(ge),Ue=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.color="transparent",Re.lineWidth=3,Re.drawing=!1,Re.pixelRatio=1,Re.color=nt.defaultColor,Re.lineWidth=nt.defaultStrokeWidth,Re.pixelRatio=nt.freehandPixelRatio,Re.setColor=Re.setColor.bind(Re),Re.addCanvas=Re.addCanvas.bind(Re),Re.finishCreation=Re.finishCreation.bind(Re),Re.setLineWidth=Re.setLineWidth.bind(Re),Re.colorPanel=new ee("Color",nt.defaultColorSet,nt.defaultColor),Re.colorPanel.onColorChanged=Re.setColor,Re.lineWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.lineWidthPanel.onWidthChanged=Re.setLineWidth,Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.drawingImage)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.drawingImage=fe.createImage(),this.visual.appendChild(this.drawingImage);var Le=fe.createTransform();this.visual.transform.baseVal.appendItem(Le),this.addMarkerVisualToContainer(this.visual)},xe.prototype.pointerDown=function(Le,Ze){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(Le.x,Le.y),this.drawing=!0):Ve.prototype.pointerDown.call(this,Le,Ze)},xe.prototype.manipulate=function(Le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Le.x,Le.y),this.canvasContext.stroke()):Ve.prototype.manipulate.call(this,Le)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},xe.prototype.pointerUp=function(Le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ve.prototype.pointerUp.call(this,Le)},xe.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)},xe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ve.prototype.select.call(this)},xe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ve.prototype.deselect.call(this)},xe.prototype.finishCreation=function(){for(var Le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ze=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],nt=Ze[0],Re=Ze[1],_e=Ze[2],He=Ze[3],Qe=!1,ut=0;ut<this.canvasElement.height;ut++)for(var gt=0;gt<this.canvasElement.width;gt++)Le.data[ut*this.canvasElement.width*4+4*gt+3]>0&&(Qe=!0,ut<Re&&(Re=ut),gt<nt&&(nt=gt),ut>He&&(He=ut),gt>_e&&(_e=gt));if(Qe){this.left=nt/this.pixelRatio,this.top=Re/this.pixelRatio,this.width=(_e-nt)/this.pixelRatio,this.height=(He-Re)/this.pixelRatio;var Mt=document.createElement("canvas");Mt.width=_e-nt,Mt.height=He-Re,Mt.getContext("2d").putImageData(this.canvasContext.getImageData(nt,Re,_e-nt,He-Re),0,0),this.drawingImgUrl=Mt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},xe.prototype.setDrawingImage=function(){fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},xe.prototype.setColor=function(Le){this.color=Le,this.colorChanged(Le)},xe.prototype.setLineWidth=function(Le){this.lineWidth=Le},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({drawingImgUrl:this.drawingImgUrl},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.drawingImgUrl=Le.drawingImgUrl,this.setDrawingImage()},xe.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setDrawingImage()},xe.typeName="FreehandMarker",xe.title="Freehand marker",xe.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>',xe}(ge),Ke=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,nt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Re.typeBoxes=[],Re.currentType=Ze,Re.setCurrentType=Re.setCurrentType.bind(Re),Re}return Bt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2";for(var nt=function(He){var Qe="both";switch(He){case 0:Qe="both";break;case 1:Qe="start";break;case 2:Qe="end";break;case 3:Qe="none"}var ut=document.createElement("div");if(ut.style.display="flex",ut.style.flexGrow="2",ut.style.alignItems="center",ut.style.justifyContent="space-between",ut.style.padding="5px",ut.style.borderWidth="2px",ut.style.borderStyle="solid",ut.style.borderColor=Qe===Re.currentType?Re.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){Le.setCurrentType(Qe,ut)}),Ze.appendChild(ut),Qe==="both"||Qe==="start"){var gt=document.createElement("div");gt.style.display="flex",gt.style.alignItems="center",gt.style.minHeight="20px",gt.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="`+(Re.uiStyleSettings!==void 0?Re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,gt.style.marginLeft="5px",ut.appendChild(gt)}var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.alignItems="center",Mt.style.minHeight="20px",Mt.style.flexGrow="2";var Nt=document.createElement("hr");if(Nt.style.minWidth="20px",Nt.style.border="0px",Nt.style.borderTop="3px solid "+(Re.uiStyleSettings!==void 0?Re.uiStyleSettings.toolboxColor:"#eeeeee"),Nt.style.flexGrow="2",Mt.appendChild(Nt),ut.appendChild(Mt),Qe==="both"||Qe==="end"){var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.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="`+(Re.uiStyleSettings!==void 0?Re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Dt.style.marginRight="5px",ut.appendChild(Dt)}Re.typeBoxes.push(ut)},Re=this,_e=0;_e<4;_e++)nt(_e);return Ze},xe.prototype.setCurrentType=function(Le,Ze){var nt=this;this.currentType=Le,this.typeBoxes.forEach(function(Re){Re.style.borderColor=Re===Ze?nt.uiStyleSettings!==void 0?nt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},xe}(z),ot=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.arrowType="end",Re.arrowBaseHeight=10,Re.arrowBaseWidth=10,Re.getArrowPoints=Re.getArrowPoints.bind(Re),Re.setArrowType=Re.setArrowType.bind(Re),Re.arrowTypePanel=new Ke("Arrow type","end"),Re.arrowTypePanel.onArrowTypeChanged=Re.setArrowType,Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.arrow1&&Le!==this.arrow2)},xe.prototype.getArrowPoints=function(Le,Ze){var nt=this.arrowBaseWidth+2*this.strokeWidth,Re=this.arrowBaseHeight+2*this.strokeWidth;return Le-nt/2+","+(Ze+Re/2)+" "+Le+","+(Ze-Re/2)+" "+(Le+nt/2)+","+(Ze+Re/2)},xe.prototype.createTips=function(){this.arrow1=fe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=fe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow2)},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="creating"&&this.createTips()},xe.prototype.adjustVisual=function(){if(Ve.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",fe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),fe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Le=0;Math.abs(this.x1-this.x2)>.1&&(Le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ze=this.arrow1.transform.baseVal.getItem(0);Ze.setRotate(Le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ze,0);var nt=this.arrow2.transform.baseVal.getItem(0);nt.setRotate(Le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(nt,0)}},xe.prototype.setArrowType=function(Le){this.arrowType=Le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({arrowType:this.arrowType},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Ze=Le;this.arrowType=Ze.arrowType,this.createTips(),this.adjustVisual()},xe.typeName="ArrowMarker",xe.title="Arrow marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',xe}(Ie),st=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.fillColor=nt.defaultFillColor,Re.strokeWidth=0,Re.fillPanel=new ee("Color",nt.defaultColorSet,nt.defaultFillColor),Re.fillPanel.onColorChanged=Re.setFillColor,Re}return Bt(xe,Ve),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.typeName="CoverMarker",xe.title="Cover marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',xe}(Pe),dt=function(Ve){function xe(Le,Ze,nt,Re){var _e=Ve.call(this,Le,Re||'<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=Ze,_e.currentOpacity=nt,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return Bt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");return Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2",Ze.style.justifyContent="space-between",this.opacities.forEach(function(nt){var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.justifyContent="center",Re.style.padding="5px",Re.style.borderWidth="2px",Re.style.borderStyle="solid",Re.style.borderColor=nt===Le.currentOpacity?Le.uiStyleSettings.toolboxAccentColor:"transparent",Re.addEventListener("click",function(){Le.setCurrentOpacity(nt,Re)}),Ze.appendChild(Re);var _e=document.createElement("div");_e.innerText=100*nt+"%",Re.appendChild(_e),Le.opacityBoxes.push(Re)}),Ze},xe.prototype.setCurrentOpacity=function(Le,Ze){var nt=this;this.currentOpacity=Le,this.opacityBoxes.forEach(function(Re){Re.style.borderColor=Re===Ze?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},xe}(z),Ct=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.setOpacity=Re.setOpacity.bind(Re),Re.fillColor=nt.defaultHighlightColor,Re.strokeWidth=0,Re.opacity=nt.defaultHighlightOpacity,Re.fillPanel=new ee("Color",nt.defaultColorSet,Re.fillColor),Re.fillPanel.onColorChanged=Re.setFillColor,Re.opacityPanel=new dt("Opacity",nt.defaultOpacitySteps,Re.opacity),Re.opacityPanel.onOpacityChanged=Re.setOpacity,Re}return Bt(xe,Ve),xe.prototype.setOpacity=function(Le){this.opacity=Le,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.typeName="HighlightMarker",xe.title="Highlight marker",xe.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>',xe}(st),$e='<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>',rt='<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>',St=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.bgColor="transparent",Re.tipPosition={x:0,y:0},Re.tipBase1Position={x:0,y:0},Re.tipBase2Position={x:0,y:0},Re.tipMoving=!1,Re.color=nt.defaultStrokeColor,Re.bgColor=nt.defaultFillColor,Re.fontFamily=nt.defaultFontFamily,Re.defaultSize={x:100,y:30},Re.setBgColor=Re.setBgColor.bind(Re),Re.getTipPoints=Re.getTipPoints.bind(Re),Re.positionTip=Re.positionTip.bind(Re),Re.setTipPoints=Re.setTipPoints.bind(Re),Re.colorPanel=new ee("Text color",nt.defaultColorSet,Re.color,$e),Re.colorPanel.onColorChanged=Re.setColor,Re.bgColorPanel=new ee("Fill color",nt.defaultColorSet,Re.bgColor,rt),Re.bgColorPanel.onColorChanged=Re.setBgColor,Re.fontFamilyPanel=new We("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Re.fontFamilyPanel.onFontChanged=Re.setFont,Re.tipGrip=new le,Re.tipGrip.visual.transform.baseVal.appendItem(fe.createTransform()),Re.controlBox.appendChild(Re.tipGrip.visual),Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return Ve.prototype.ownsTarget.call(this,Le)||this.tipGrip.ownsTarget(Le)||this.tip===Le},xe.prototype.createTip=function(){fe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=fe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},xe.prototype.pointerDown=function(Le,Ze){this.state==="new"&&Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ze)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ve.prototype.pointerDown.call(this,Le,Ze)},xe.prototype.pointerUp=function(Le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ve.prototype.pointerUp.call(this,Le);else{var Ze=this.state==="creating";Ve.prototype.pointerUp.call(this,Le),this.setTipPoints(Ze),this.positionTip()}},xe.prototype.manipulate=function(Le){if(this.tipMoving){var Ze=this.unrotatePoint(Le);this.tipPosition={x:Ze.x-this.manipulationStartLeft,y:Ze.y-this.manipulationStartTop},this.positionTip()}else Ve.prototype.manipulate.call(this,Le)},xe.prototype.setBgColor=function(Le){this.bgRectangle&&this.tip&&(fe.setAttributes(this.bgRectangle,[["fill",Le]]),fe.setAttributes(this.tip,[["fill",Le]])),this.bgColor=Le,this.fillColorChanged(Le)},xe.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},xe.prototype.setTipPoints=function(Le){Le===void 0&&(Le=!1);var Ze=Math.min(this.height/2,15),nt=this.height/5;Le&&(this.tipPosition={x:Ze+nt/2,y:this.height+20});var Re=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Re<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(nt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:Ze,y:0},this.tipBase2Position={x:Ze+nt,y:0}):(this.tipBase1Position={x:0,y:Ze},this.tipBase2Position={x:0,y:Ze+nt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Re<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(nt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ze-nt,y:0},this.tipBase2Position={x:this.width-Ze,y:0}):(this.tipBase1Position={x:this.width,y:Ze},this.tipBase2Position={x:this.width,y:Ze+nt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Re<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(nt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ze-nt,y:this.height},this.tipBase2Position={x:this.width-Ze,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ze-nt},this.tipBase2Position={x:this.width,y:this.height-Ze}):Re<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(nt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:Ze,y:this.height},this.tipBase2Position={x:Ze+nt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ze},this.tipBase2Position={x:0,y:this.height-Ze-nt})},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.positionTip()},xe.prototype.positionTip=function(){fe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Le=this.tipGrip.visual.transform.baseVal.getItem(0);Le.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Le,0)},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xe.prototype.select=function(){this.positionTip(),Ve.prototype.select.call(this)},xe.prototype.getState=function(){var Le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){var Ze=Le;this.bgColor=Ze.bgColor,this.tipPosition=Ze.tipPosition,Ve.prototype.restoreState.call(this,Le),this.createTip(),this.setTipPoints()},xe.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.tipPosition={x:this.tipPosition.x*Le,y:this.tipPosition.y*Ze},this.positionTip()},xe.typeName="CalloutMarker",xe.title="Callout marker",xe.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>',xe}(Ye),Pt=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.fillColor="transparent",Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.opacity=1,Re.strokeColor=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.fillColor=nt.defaultFillColor,Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setFillColor=Re.setFillColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.setOpacity=Re.setOpacity.bind(Re),Re.createVisual=Re.createVisual.bind(Re),Re.strokePanel=new ee("Line color",De(nt.defaultColorSet,["transparent"]),nt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.fillPanel=new ee("Fill color",De(nt.defaultColorSet,["transparent"]),Re.fillColor,rt),Re.fillPanel.onColorChanged=Re.setFillColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new Be("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re.opacityPanel=new dt("Opacity",nt.defaultOpacitySteps,Re.opacity),Re.opacityPanel.onOpacityChanged=Re.setOpacity,Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual)},xe.prototype.createVisual=function(){this.visual=fe.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)},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},xe.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},xe.prototype.setSize=function(){Ve.prototype.setSize.call(this),fe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},xe.prototype.pointerUp=function(Le){Ve.prototype.pointerUp.call(this,Le),this.setSize()},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},xe.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xe.prototype.setOpacity=function(Le){this.opacity=Le,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){var Ze=Le;this.fillColor=Ze.fillColor,this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.opacity=Ze.opacity,this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.setSize()},xe.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setSize()},xe.typeName="EllipseMarker",xe.title="Ellipse marker",xe.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>',xe}(ge),wt=function(Ve){function xe(Le,Ze,nt){return Ve.call(this,Le,Ze,nt)||this}return Bt(xe,Ve),Object.defineProperty(xe.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.tip1&&Le!==this.tip2)},xe.prototype.createTips=function(){this.tip1=fe.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(fe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=fe.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(fe.createTransform()),this.visual.appendChild(this.tip2)},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="creating"&&this.createTips()},xe.prototype.adjustVisual=function(){if(Ve.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(fe.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()]]),fe.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 Le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ze=this.tip1.transform.baseVal.getItem(0);Ze.setRotate(Le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ze,0);var nt=this.tip2.transform.baseVal.getItem(0);nt.setRotate(Le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(nt,0)}},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le),this.createTips(),this.adjustVisual()},xe.typeName="MeasurementMarker",xe.title="Measurement marker",xe.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>',xe}(Ie),pt=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.strokePanel.colors=nt.defaultColorSet,Re.fillColor="transparent",Re}return Bt(xe,Ve),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.typeName="EllipseFrameMarker",xe.title="Ellipse frame marker",xe.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>',xe}(Pt),ft=function(){function Ve(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ve.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ve.prototype.addUndoStep=function(xe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(xe)||(this.undoStack.push(xe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(xe)&&this.redoStack.splice(0,this.redoStack.length))},Ve.prototype.replaceLastUndoStep=function(xe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=xe)},Ve.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ve.prototype.undo=function(){if(this.undoStack.length>1){var xe=this.undoStack.pop();return xe!==void 0&&this.redoStack.push(xe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ve.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ve}(),ht=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.curveX=0,Re.curveY=0,Re.manipulationStartCurveX=0,Re.manipulationStartCurveY=0,Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.positionGrips=Re.positionGrips.bind(Re),Re.addControlGrips=Re.addControlGrips.bind(Re),Re.adjustVisual=Re.adjustVisual.bind(Re),Re.setupControlBox=Re.setupControlBox.bind(Re),Re.resize=Re.resize.bind(Re),Re.strokeColor=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.strokePanel=new ee("Line color",nt.defaultColorSet,nt.defaultColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new Be("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorCurve&&Le!==this.visibleCurve&&!this.curveGrip.ownsTarget(Le))},xe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorCurve=fe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=fe.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)},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Le.x,this.curveY=Le.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ze)&&(this.activeGrip=this.curveGrip,this._state="resize")},xe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),fe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xe.prototype.setupControlBox=function(){Ve.prototype.setupControlBox.call(this),this.curveControlLine1=fe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=fe.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)},xe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ve.prototype.addControlGrips.call(this)},xe.prototype.positionGrips=function(){Ve.prototype.positionGrips.call(this);var Le=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Le/2,this.curveY-Le/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()))},xe.prototype.manipulate=function(Le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Le.y-this.manipulationStartY),Ve.prototype.manipulate.call(this,Le)},xe.prototype.resize=function(Le){this.activeGrip===this.curveGrip&&(this.curveX=Le.x,this.curveY=Le.y),Ve.prototype.resize.call(this,Le),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual()},xe.prototype.scale=function(Le,Ze){this.curveX=this.curveX*Le,this.curveY=this.curveY*Ze,Ve.prototype.scale.call(this,Le,Ze)},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Ze=Le;this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.curveX=Ze.curveX,this.curveY=Ze.curveY,this.createVisual(),this.adjustVisual()},xe.typeName="CurveMarker",xe.title="Curve marker",xe.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>',xe}(Ae),Et=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,Ze,nt)||this;return Re.fillColor="transparent",Re.strokeColor="transparent",Re.strokeWidth=0,Re.strokeDasharray="",Re.textColor="transparent",Re.fontSize="1rem",Re.isMoved=!1,Re.captionText="Caption",Re.PADDING=5,Re.captionBoxWidth=0,Re.captionBoxHeight=0,Re.strokeColor=nt.defaultColor,Re.strokeWidth=nt.defaultStrokeWidth,Re.strokeDasharray=nt.defaultStrokeDasharray,Re.fillColor=nt.defaultFillColor,Re.textColor=nt.defaultStrokeColor,Re.fontFamily=nt.defaultFontFamily,Re.fontSize=nt.defaultCaptionFontSize,Re.captionText=nt.defaultCaptionText,Re.setStrokeColor=Re.setStrokeColor.bind(Re),Re.setFillColor=Re.setFillColor.bind(Re),Re.setStrokeWidth=Re.setStrokeWidth.bind(Re),Re.setStrokeDasharray=Re.setStrokeDasharray.bind(Re),Re.createVisual=Re.createVisual.bind(Re),Re.sizeCaption=Re.sizeCaption.bind(Re),Re.setCaptionText=Re.setCaptionText.bind(Re),Re.showTextEditor=Re.showTextEditor.bind(Re),Re.positionTextEditor=Re.positionTextEditor.bind(Re),Re.finishTextEditing=Re.finishTextEditing.bind(Re),Re.setFont=Re.setFont.bind(Re),Re.setTextColor=Re.setTextColor.bind(Re),Re.strokePanel=new ee("Line color",De(nt.defaultColorSet,["transparent"]),Re.strokeColor),Re.strokePanel.onColorChanged=Re.setStrokeColor,Re.fillPanel=new ee("Fill color",De(nt.defaultColorSet,["transparent"]),Re.fillColor,rt),Re.fillPanel.onColorChanged=Re.setFillColor,Re.strokeWidthPanel=new je("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Re.strokeWidthPanel.onWidthChanged=Re.setStrokeWidth,Re.strokeStylePanel=new Be("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Re.strokeStylePanel.onStyleChanged=Re.setStrokeDasharray,Re.fontFamilyPanel=new We("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Re.fontFamilyPanel.onFontChanged=Re.setFont,Re.textColorPanel=new ee("Text color",nt.defaultColorSet,Re.textColor,$e),Re.textColorPanel.onColorChanged=Re.setTextColor,Re}return Bt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.frame&&Le!==this.captionBg&&Le!==this.captionElement)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=fe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=fe.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=fe.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()},xe.prototype.setCaptionText=function(Le){this.captionText=Le,this.captionElement.textContent=this.captionText,this.sizeCaption()},xe.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.isMoved=!1,this.pointerDownPoint=Le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},xe.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Le.x-this.pointerDownPoint.x)>5||Math.abs(Le.y-this.pointerDownPoint.y)>5)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},xe.prototype.sizeCaption=function(){var Le=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Le.width+2*this.PADDING,this.captionBoxHeight=Le.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),fe.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')"]]),fe.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')"]])},xe.prototype.showTextEditor=function(){var Le=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(Ze){Ze.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ze){Ze.key==="Enter"&&Le.finishTextEditing(Le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ze){Ze.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Le.finishTextEditing(Le.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Le.finishTextEditing(Le.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},xe.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"))},xe.prototype.finishTextEditing=function(Le){this.setCaptionText(Le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},xe.prototype.setFont=function(Le){this.captionElement&&fe.setAttributes(this.captionElement,[["font-family",Le]]),this.fontFamily=Le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},xe.prototype.setTextColor=function(Le){this.captionElement&&fe.setAttributes(this.captionElement,[["fill",Le]]),this.textColor=Le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},xe.prototype.setSize=function(){Ve.prototype.setSize.call(this),fe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},xe.prototype.pointerUp=function(Le){Ve.prototype.pointerUp.call(this,Le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},xe.prototype.dblClick=function(Le,Ze){Ve.prototype.dblClick.call(this,Le,Ze),this.showTextEditor()},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.frame&&fe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},xe.prototype.setFillColor=function(Le){this.fillColor=Le,this.captionBg&&fe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.frame&&fe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.frame&&fe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=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},Ve.prototype.getState.call(this));return Le.typeName=this.typeName,Le},xe.prototype.restoreState=function(Le){var Ze=Le;this.fillColor=Ze.fillColor,this.strokeColor=Ze.strokeColor,this.strokeWidth=Ze.strokeWidth,this.strokeDasharray=Ze.strokeDasharray,this.textColor=Ze.textColor,this.fontFamily=Ze.fontFamily,this.captionText=Ze.captionText,this.fontSize=Ze.fontSize,this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.setSize()},xe.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setSize()},xe.typeName="CaptionFrameMarker",xe.title="Caption frame marker",xe.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>',xe}(ge),mt=function(){function Ve(xe,Le){Le===void 0&&(Le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=xe,this.cancelable=Le}return Object.defineProperty(Ve.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ve.prototype.preventDefault=function(){this._defaultPrevented=!0},Ve}(),yt=function(Ve){function xe(Le,Ze,nt){var Re=Ve.call(this,Le,!1)||this;return Re.dataUrl=Ze,Re.state=nt,Re}return Bt(xe,Ve),xe}(mt),At=function(Ve){function xe(Le,Ze,nt){nt===void 0&&(nt=!1);var Re=Ve.call(this,Le,nt)||this;return Re.marker=Ze,Re}return Bt(xe,Ve),xe}(mt),xt=function(){function Ve(){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 Ve.prototype.addEventListener=function(xe,Le){this[xe].push(Le)},Ve.prototype.removeEventListener=function(xe,Le){var Ze=this[xe].indexOf(Le);Ze>-1&&this[xe].splice(Ze,1)},Ve}(),tt=function(){function Ve(xe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ne,this._isOpen=!1,this.undoRedoManager=new ft,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 xt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ve.instanceCounter++,this.styles=new Se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=xe,this.targetRoot=document.body,this.width=xe.clientWidth,this.height=xe.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(Ve.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,pt,Pt,Ct,St,wt,st,Ie,ht,Et]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,Pt,Ct,St]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,Ct]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(xe){var Le=this;this._availableMarkerTypes.splice(0),xe.forEach(function(Ze){if(typeof Ze=="string"){var nt=Le.ALL_MARKER_TYPES.find(function(Re){return Re.typeName===Ze});nt!==void 0&&Le._availableMarkerTypes.push(nt)}else Le._availableMarkerTypes.push(Ze)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(xe){this._zoomLevel=xe,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(Ve.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ve.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ve.prototype.show=function(){var xe=this;this.styles.styleSheetRoot===void 0&&Ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Le){return Le(new mt(xe))})},Ve.prototype.render=function(){return oe(this,void 0,void 0,function(){var xe;return ze(this,function(Le){switch(Le.label){case 0:return this.setCurrentMarker(),(xe=new ke).naturalSize=this.renderAtNaturalSize,xe.imageType=this.renderImageType,xe.imageQuality=this.renderImageQuality,xe.markersOnly=this.renderMarkersOnly,xe.width=this.renderWidth,xe.height=this.renderHeight,[4,xe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Le.sent(),[4,xe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Le.sent()]}})})},Ve.prototype.close=function(xe){var Le=this;if(xe===void 0&&(xe=!1),this.isOpen){var Ze=!1;xe||this.eventListeners.beforeclose.forEach(function(nt){var Re=new mt(Le,!0);nt(Re),Re.defaultPrevented&&(Ze=!0)}),Ze||(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(nt){return nt(new mt(Le))}),this.detachEvents(),this._isOpen=!1)}},Ve.prototype.addMarkersToToolbar=function(){for(var xe,Le=[],Ze=0;Ze<arguments.length;Ze++)Le[Ze]=arguments[Ze];(xe=this._availableMarkerTypes).push.apply(xe,Le)},Ve.prototype.addRenderEventListener=function(xe){this.addEventListener("render",function(Le){xe(Le.dataUrl,Le.state)})},Ve.prototype.removeRenderEventListener=function(xe){},Ve.prototype.addCloseEventListener=function(xe){this.addEventListener("close",function(){xe()})},Ve.prototype.removeCloseEventListener=function(xe){},Ve.prototype.setupResizeObserver=function(){var xe=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){xe.resize(xe.target.clientWidth,xe.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return xe.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ve.prototype.onPopupTargetResize=function(){var xe=1*this.target.clientWidth/this.target.clientHeight,Le=this.editorCanvas.clientWidth/xe>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*xe:this.editorCanvas.clientWidth,Ze=Le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/xe;this.resize(Le,Ze)},Ve.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ve.prototype.resize=function(xe,Le){this._isResizing=!0;var Ze=xe/this.imageWidth,nt=Le/this.imageHeight;this.imageWidth=Math.round(xe),this.imageHeight=Math.round(Le),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(Ze,nt),this._isResizing=!1},Ve.prototype.scaleMarkers=function(xe,Le){var Ze,nt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(xe,Le):(Ze=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Re){Re!==nt._currentMarker&&Re.scale(xe,Le)}),Ze!==void 0&&this.setCurrentMarker(Ze)},Ve.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"},Ve.prototype.setTopLeft=function(){var xe=this.editingTarget.getBoundingClientRect(),Le=this.editorCanvas.getBoundingClientRect();this.left=xe.left-Le.left,this.top=xe.top-Le.top},Ve.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)},Ve.prototype.addDefs=function(){for(var xe,Le=[],Ze=0;Ze<arguments.length;Ze++)Le[Ze]=arguments[Ze];this.defs=fe.createDefs(),this.addDefsToImage(),(xe=this.defs).append.apply(xe,Le)},Ve.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ve.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)},Ve.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ve.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ve.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)},Ve.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ve.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)},Ve.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 xe=document.createElement("a");xe.href="https://markerjs.com/",xe.target="_blank",xe.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>',xe.title="Powered by marker.js",xe.style.display="grid",xe.style.alignItems="center",xe.style.justifyItems="center",xe.style.padding="3px",xe.style.width="20px",xe.style.height="20px",this.logoUI.appendChild(xe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ve.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")},Ve.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"},Ve.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ve.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 xe=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=xe+"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 we(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 de(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ve.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ve.prototype.removeMarker=function(xe){this.markerImage.removeChild(xe.container),this.markers.indexOf(xe)>-1&&this.markers.splice(this.markers.indexOf(xe),1),xe.dispose()},Ve.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())},Ve.prototype.toolbarButtonClicked=function(xe,Le){if(xe==="marker"&&Le!==void 0)this.createNewMarker(Le);else if(xe==="action")switch(Le){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()}},Ve.prototype.deleteSelectedMarker=function(){var xe=this;if(this._currentMarker!==void 0){var Le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(nt){var Re=new At(xe,xe._currentMarker,!0);nt(Re),Re.defaultPrevented&&(Le=!0)}),!Le){var Ze=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(nt){return nt(new At(xe,Ze))})}}},Ve.prototype.clear=function(){var xe=this,Le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var He=new At(xe,void 0,!0);_e(He),He.defaultPrevented&&(Le=!0)}),!Le)){this.setCurrentMarker();for(var Ze=function(_e){var He=nt.markers[_e];nt.setCurrentMarker(nt.markers[_e]),nt._currentMarker.dispose(),nt.markerImage.removeChild(nt._currentMarker.container),nt.markers.splice(nt.markers.indexOf(nt._currentMarker),1),nt.eventListeners.markerdelete.forEach(function(Qe){return Qe(new At(xe,He))})},nt=this,Re=this.markers.length-1;Re>=0;Re--)Ze(Re);this.addUndoStep()}},Object.defineProperty(Ve.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ve.prototype.showNotesEditor=function(){var xe;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=(xe=this._currentMarker.notes)!==null&&xe!==void 0?xe:"",this.overlayContainer.appendChild(this.notesArea))},Ve.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)},Ve.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ve.prototype.addUndoStep=function(){var xe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Le=this.getState(),Ze=this.undoRedoManager.getLastUndoStep();if(!Ze||Ze.width===Le.width&&Ze.height===Le.height){var nt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Le),nt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Re){return Re(new mt(xe))})}else this.undoRedoManager.replaceLastUndoStep(Le),this.eventListeners.statechange.forEach(function(Re){return Re(new mt(xe))})}},Ve.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ve.prototype.undoStep=function(){var xe=this,Le=this.undoRedoManager.undo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ze){return Ze(new mt(xe))}))},Ve.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ve.prototype.redoStep=function(){var xe=this,Le=this.undoRedoManager.redo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ze){return Ze(new mt(xe))}))},Ve.prototype.stepZoom=function(){var xe=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=xe<this.zoomSteps.length-1?this.zoomSteps[xe+1]:this.zoomSteps[0]},Ve.prototype.panTo=function(xe){this.contentDiv.scrollBy({left:this.prevPanPoint.x-xe.x,top:this.prevPanPoint.y-xe.y}),this.prevPanPoint=xe},Ve.prototype.startRenderAndClose=function(){return oe(this,void 0,void 0,function(){var xe,Le,Ze=this;return ze(this,function(nt){switch(nt.label){case 0:return[4,this.render()];case 1:return xe=nt.sent(),Le=this.getState(),this.eventListeners.render.forEach(function(Re){return Re(new yt(Ze,xe,Le))}),this.close(!0),[2]}})})},Ve.prototype.getState=function(xe){xe===!0&&this.setCurrentMarker();var Le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ze){return Le.markers.push(Ze.getState())}),Le},Ve.prototype.restoreState=function(xe){var Le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);xe.markers.forEach(function(Ze){var nt=Le._availableMarkerTypes.find(function(_e){return _e.typeName===Ze.typeName});if(nt!==void 0){var Re=Le.addNewMarker(nt);Re.restoreState(Ze),Le.markers.push(Re)}}),xe.width&&xe.height&&(xe.width!==this.imageWidth||xe.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/xe.width,this.imageHeight/xe.height),this.eventListeners.restorestate.forEach(function(Ze){return Ze(new mt(Le))})},Ve.prototype.addNewMarker=function(xe){var Le=fe.createGroup();return this.markerImage.appendChild(Le),new xe(Le,this.overlayContainer,this.settings)},Ve.prototype.createNewMarker=function(xe){var Le,Ze=this;(Le=typeof xe=="string"?this._availableMarkerTypes.find(function(nt){return nt.typeName===xe}):xe)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Le),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(Le.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(nt){return nt(new At(Ze,Ze._currentMarker))}))},Ve.prototype.markerCreated=function(xe){var Le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(xe),this.setCurrentMarker(xe),xe instanceof Ue&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ue):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ze){return Ze(new At(Le,Le._currentMarker))})},Ve.prototype.colorChanged=function(xe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=xe,this.settings.defaultStrokeColor=xe)},Ve.prototype.fillColorChanged=function(xe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=xe)},Ve.prototype.markerStateChanged=function(xe){var Le=this;this.eventListeners.markerchange.forEach(function(Ze){return Ze(new At(Le,xe))})},Ve.prototype.setCurrentMarker=function(xe){var Le=this;this._currentMarker!==xe&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ze){return Ze(new At(Le,Le._currentMarker))})),this._currentMarker=xe,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(Ze){return Ze(new At(Le,Le._currentMarker))}))},Ve.prototype.onPointerDown=function(xe){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||xe.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Le=this.markers.find(function(Ze){return Ze.ownsTarget(xe.target)});Le!==void 0?(this.setCurrentMarker(Le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xe.clientX,xe.clientY),xe.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:xe.clientX,y:xe.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xe.clientX,xe.clientY))},Ve.prototype.onDblClick=function(xe){if(this._isFocused||this.focus(),this.mode==="select"){var Le=this.markers.find(function(Ze){return Ze.ownsTarget(xe.target)});Le!==void 0&&Le!==this._currentMarker&&this.setCurrentMarker(Le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(xe.clientX,xe.clientY),xe.target):this.setCurrentMarker()}},Ve.prototype.onPointerMove=function(xe){this.touchPoints!==1&&xe.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||xe.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(xe.clientX,xe.clientY)):this.zoomLevel>1&&this.panTo({x:xe.clientX,y:xe.clientY}))},Ve.prototype.onPointerUp=function(xe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(xe.clientX,xe.clientY)),this.isDragging=!1,this.addUndoStep()},Ve.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ve.prototype.onKeyUp=function(xe){this._currentMarker===void 0||this.notesArea!==void 0||xe.key!=="Delete"&&xe.key!=="Backspace"||this.deleteSelectedMarker()},Ve.prototype.clientToLocalCoordinates=function(xe,Le){var Ze=this.markerImage.getBoundingClientRect();return{x:(xe-Ze.left)/this.zoomLevel,y:(Le-Ze.top)/this.zoomLevel}},Ve.prototype.onWindowResize=function(){this.positionUI()},Ve.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var xe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=xe+"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()},Ve.prototype.addLicenseKey=function(xe){me.addKey(xe)},Ve.prototype.addEventListener=function(xe,Le){this.eventListeners.addEventListener(xe,Le)},Ve.prototype.removeEventListener=function(xe,Le){this.eventListeners.removeEventListener(xe,Le)},Ve.prototype.renderState=function(xe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(xe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ve.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ve.prototype.focus=function(){var xe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Le){return Le(new mt(xe))}))},Ve.prototype.blur=function(){var xe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Le){return Le(new mt(xe))}))},Ve.instanceCounter=0,Ve}()},98535:function(gn,cn,at){"use strict";at.r(cn),at.d(cn,{Panel:function(){return Ue},default:function(){return Ye}});var ct=at(14809),Bt=at(95190),oe=at(50298),ze=at(93664),De=at(92310),fe=at.n(De),me=at(18929),ke=at(48736),Ce=at(59301),Se=at(62646),Me=at(11592),ve=at(20439),we=at(4635),de=at(77900),z=at(10228),ee=Ce.forwardRef(function(Ke,ot){var st=Ke.prefixCls,dt=Ke.forceRender,Ct=Ke.className,$e=Ke.style,rt=Ke.children,St=Ke.isActive,Pt=Ke.role,wt=Ke.classNames,pt=Ke.styles,ft=Ce.useState(St||dt),ht=(0,oe.Z)(ft,2),Et=ht[0],mt=ht[1];return Ce.useEffect(function(){(dt||St)&&mt(!0)},[dt,St]),Et?Ce.createElement("div",{ref:ot,className:fe()("".concat(st,"-content"),(0,we.Z)((0,we.Z)({},"".concat(st,"-content-active"),St),"".concat(st,"-content-inactive"),!St),Ct),style:$e,role:Pt},Ce.createElement("div",{className:fe()("".concat(st,"-content-box"),wt==null?void 0:wt.body),style:pt==null?void 0:pt.body},rt)):null});ee.displayName="PanelContent";var ae=ee,ie=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],le=Ce.forwardRef(function(Ke,ot){var st=Ke.showArrow,dt=st===void 0?!0:st,Ct=Ke.headerClass,$e=Ke.isActive,rt=Ke.onItemClick,St=Ke.forceRender,Pt=Ke.className,wt=Ke.classNames,pt=wt===void 0?{}:wt,ft=Ke.styles,ht=ft===void 0?{}:ft,Et=Ke.prefixCls,mt=Ke.collapsible,yt=Ke.accordion,At=Ke.panelKey,xt=Ke.extra,tt=Ke.header,Ve=Ke.expandIcon,xe=Ke.openMotion,Le=Ke.destroyInactivePanel,Ze=Ke.children,nt=(0,Se.Z)(Ke,ie),Re=mt==="disabled",_e=xt!=null&&typeof xt!="boolean",He=(0,we.Z)((0,we.Z)((0,we.Z)({onClick:function(){rt==null||rt(At)},onKeyDown:function(Ht){(Ht.key==="Enter"||Ht.keyCode===z.Z.ENTER||Ht.which===z.Z.ENTER)&&(rt==null||rt(At))},role:yt?"tab":"button"},"aria-expanded",$e),"aria-disabled",Re),"tabIndex",Re?-1:0),Qe=typeof Ve=="function"?Ve(Ke):Ce.createElement("i",{className:"arrow"}),ut=Qe&&Ce.createElement("div",(0,ct.Z)({className:"".concat(Et,"-expand-icon")},["header","icon"].includes(mt)?He:{}),Qe),gt=fe()("".concat(Et,"-item"),(0,we.Z)((0,we.Z)({},"".concat(Et,"-item-active"),$e),"".concat(Et,"-item-disabled"),Re),Pt),Mt=fe()(Ct,"".concat(Et,"-header"),(0,we.Z)({},"".concat(Et,"-collapsible-").concat(mt),!!mt),pt.header),Nt=(0,ve.Z)({className:Mt,style:ht.header},["header","icon"].includes(mt)?{}:He);return Ce.createElement("div",(0,ct.Z)({},nt,{ref:ot,className:gt}),Ce.createElement("div",Nt,dt&&ut,Ce.createElement("span",(0,ct.Z)({className:"".concat(Et,"-header-text")},mt==="header"?He:{}),tt),_e&&Ce.createElement("div",{className:"".concat(Et,"-extra")},xt)),Ce.createElement(de.default,(0,ct.Z)({visible:$e,leavedClassName:"".concat(Et,"-content-hidden")},xe,{forceRender:St,removeOnLeave:Le}),function(Dt,Ht){var Xt=Dt.className,$t=Dt.style;return Ce.createElement(ae,{ref:Ht,prefixCls:Et,className:Xt,classNames:pt,style:$t,styles:ht,isActive:$e,forceRender:St,role:yt?"tabpanel":void 0},Ze)}))}),ue=le,ge=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Pe=function(ot,st){var dt=st.prefixCls,Ct=st.accordion,$e=st.collapsible,rt=st.destroyInactivePanel,St=st.onItemClick,Pt=st.activeKey,wt=st.openMotion,pt=st.expandIcon;return ot.map(function(ft,ht){var Et=ft.children,mt=ft.label,yt=ft.key,At=ft.collapsible,xt=ft.onItemClick,tt=ft.destroyInactivePanel,Ve=(0,Se.Z)(ft,ge),xe=String(yt!=null?yt:ht),Le=At!=null?At:$e,Ze=tt!=null?tt:rt,nt=function(He){Le!=="disabled"&&(St(He),xt==null||xt(He))},Re=!1;return Ct?Re=Pt[0]===xe:Re=Pt.indexOf(xe)>-1,Ce.createElement(ue,(0,ct.Z)({},Ve,{prefixCls:dt,key:xe,panelKey:xe,isActive:Re,accordion:Ct,openMotion:wt,expandIcon:pt,header:mt,collapsible:Le,onItemClick:nt,destroyInactivePanel:Ze}),Et)})},je=function(ot,st,dt){if(!ot)return null;var Ct=dt.prefixCls,$e=dt.accordion,rt=dt.collapsible,St=dt.destroyInactivePanel,Pt=dt.onItemClick,wt=dt.activeKey,pt=dt.openMotion,ft=dt.expandIcon,ht=ot.key||String(st),Et=ot.props,mt=Et.header,yt=Et.headerClass,At=Et.destroyInactivePanel,xt=Et.collapsible,tt=Et.onItemClick,Ve=!1;$e?Ve=wt[0]===ht:Ve=wt.indexOf(ht)>-1;var xe=xt!=null?xt:rt,Le=function(Re){xe!=="disabled"&&(Pt(Re),tt==null||tt(Re))},Ze={key:ht,panelKey:ht,header:mt,headerClass:yt,isActive:Ve,prefixCls:Ct,destroyInactivePanel:At!=null?At:St,openMotion:pt,accordion:$e,children:ot.props.children,onItemClick:Le,expandIcon:ft,collapsible:xe};return typeof ot.type=="string"?ot:(Object.keys(Ze).forEach(function(nt){typeof Ze[nt]=="undefined"&&delete Ze[nt]}),Ce.cloneElement(ot,Ze))};function Be(Ke,ot,st){return Array.isArray(Ke)?Pe(Ke,st):(0,Me.Z)(ot).map(function(dt,Ct){return je(dt,Ct,st)})}var Fe=Be,Ne=at(26112);function Ae(Ke){var ot=Ke;if(!Array.isArray(ot)){var st=(0,ze.Z)(ot);ot=st==="number"||st==="string"?[ot]:[]}return ot.map(function(dt){return String(dt)})}var Ie=Ce.forwardRef(function(Ke,ot){var st=Ke.prefixCls,dt=st===void 0?"rc-collapse":st,Ct=Ke.destroyInactivePanel,$e=Ct===void 0?!1:Ct,rt=Ke.style,St=Ke.accordion,Pt=Ke.className,wt=Ke.children,pt=Ke.collapsible,ft=Ke.openMotion,ht=Ke.expandIcon,Et=Ke.activeKey,mt=Ke.defaultActiveKey,yt=Ke.onChange,At=Ke.items,xt=fe()(dt,Pt),tt=(0,me.Z)([],{value:Et,onChange:function(_e){return yt==null?void 0:yt(_e)},defaultValue:mt,postState:Ae}),Ve=(0,oe.Z)(tt,2),xe=Ve[0],Le=Ve[1],Ze=function(_e){return Le(function(){if(St)return xe[0]===_e?[]:[_e];var He=xe.indexOf(_e),Qe=He>-1;return Qe?xe.filter(function(ut){return ut!==_e}):[].concat((0,Bt.Z)(xe),[_e])})};(0,ke.ZP)(!wt,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var nt=Fe(At,wt,{prefixCls:dt,accordion:St,openMotion:ft,expandIcon:ht,collapsible:pt,destroyInactivePanel:$e,onItemClick:Ze,activeKey:xe});return Ce.createElement("div",(0,ct.Z)({ref:ot,className:xt,style:rt,role:St?"tablist":void 0},(0,Ne.Z)(Ke,{aria:!0,data:!0})),nt)}),We=Object.assign(Ie,{Panel:ue}),Ye=We,Ue=We.Panel},66042:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Ye}});var ct=at(20439),Bt=at(50298),oe=at(43403),ze=at(34280),De=at(59301),fe=De.createContext(null),me=De.createContext({}),ke=fe,Ce=at(4635),Se=at(14809),Me=at(92310),ve=at.n(Me),we=at(77900),de=at(10228),z=at(26112),ee=at(62646),ae=at(8654),ie=["prefixCls","className","containerRef"],le=function(Ke){var ot=Ke.prefixCls,st=Ke.className,dt=Ke.containerRef,Ct=(0,ee.Z)(Ke,ie),$e=De.useContext(me),rt=$e.panel,St=(0,ae.x1)(rt,dt);return De.createElement("div",(0,Se.Z)({className:ve()("".concat(ot,"-content"),st),role:"dialog",ref:St},(0,z.Z)(Ke,{aria:!0}),{"aria-modal":"true"},Ct))},ue=le,ge=at(48736);function Pe(Ue){return typeof Ue=="string"&&String(Number(Ue))===Ue?((0,ge.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ue)):Ue}function je(Ue){warning(!("wrapperClassName"in Ue),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ue.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Be={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Fe(Ue,Ke){var ot,st,dt,Ct=Ue.prefixCls,$e=Ue.open,rt=Ue.placement,St=Ue.inline,Pt=Ue.push,wt=Ue.forceRender,pt=Ue.autoFocus,ft=Ue.keyboard,ht=Ue.classNames,Et=Ue.rootClassName,mt=Ue.rootStyle,yt=Ue.zIndex,At=Ue.className,xt=Ue.id,tt=Ue.style,Ve=Ue.motion,xe=Ue.width,Le=Ue.height,Ze=Ue.children,nt=Ue.mask,Re=Ue.maskClosable,_e=Ue.maskMotion,He=Ue.maskClassName,Qe=Ue.maskStyle,ut=Ue.afterOpenChange,gt=Ue.onClose,Mt=Ue.onMouseEnter,Nt=Ue.onMouseOver,Dt=Ue.onMouseLeave,Ht=Ue.onClick,Xt=Ue.onKeyDown,$t=Ue.onKeyUp,Ut=Ue.styles,sn=Ue.drawerRender,nn=De.useRef(),Wt=De.useRef(),bn=De.useRef();De.useImperativeHandle(Ke,function(){return nn.current});var mn=function(mr){var Ai=mr.keyCode,ar=mr.shiftKey;switch(Ai){case de.Z.TAB:{if(Ai===de.Z.TAB){if(!ar&&document.activeElement===bn.current){var Sr;(Sr=Wt.current)===null||Sr===void 0||Sr.focus({preventScroll:!0})}else if(ar&&document.activeElement===Wt.current){var Ar;(Ar=bn.current)===null||Ar===void 0||Ar.focus({preventScroll:!0})}}break}case de.Z.ESC:{gt&&ft&&(mr.stopPropagation(),gt(mr));break}}};De.useEffect(function(){if($e&&pt){var fr;(fr=nn.current)===null||fr===void 0||fr.focus({preventScroll:!0})}},[$e]);var jn=De.useState(!1),Jn=(0,Bt.Z)(jn,2),Cr=Jn[0],cr=Jn[1],kr=De.useContext(ke),Kr;typeof Pt=="boolean"?Kr=Pt?{}:{distance:0}:Kr=Pt||{};var Ur=(ot=(st=(dt=Kr)===null||dt===void 0?void 0:dt.distance)!==null&&st!==void 0?st:kr==null?void 0:kr.pushDistance)!==null&&ot!==void 0?ot:180,oi=De.useMemo(function(){return{pushDistance:Ur,push:function(){cr(!0)},pull:function(){cr(!1)}}},[Ur]);De.useEffect(function(){if($e){var fr;kr==null||(fr=kr.push)===null||fr===void 0||fr.call(kr)}else{var mr;kr==null||(mr=kr.pull)===null||mr===void 0||mr.call(kr)}},[$e]),De.useEffect(function(){return function(){var fr;kr==null||(fr=kr.pull)===null||fr===void 0||fr.call(kr)}},[]);var vi=nt&&De.createElement(we.default,(0,Se.Z)({key:"mask"},_e,{visible:$e}),function(fr,mr){var Ai=fr.className,ar=fr.style;return De.createElement("div",{className:ve()("".concat(Ct,"-mask"),Ai,ht==null?void 0:ht.mask,He),style:(0,ct.Z)((0,ct.Z)((0,ct.Z)({},ar),Qe),Ut==null?void 0:Ut.mask),onClick:Re&&$e?gt:void 0,ref:mr})}),Bi=typeof Ve=="function"?Ve(rt):Ve,Di={};if(Cr&&Ur)switch(rt){case"top":Di.transform="translateY(".concat(Ur,"px)");break;case"bottom":Di.transform="translateY(".concat(-Ur,"px)");break;case"left":Di.transform="translateX(".concat(Ur,"px)");break;default:Di.transform="translateX(".concat(-Ur,"px)");break}rt==="left"||rt==="right"?Di.width=Pe(xe):Di.height=Pe(Le);var Ii={onMouseEnter:Mt,onMouseOver:Nt,onMouseLeave:Dt,onClick:Ht,onKeyDown:Xt,onKeyUp:$t},Xi=De.createElement(we.default,(0,Se.Z)({key:"panel"},Bi,{visible:$e,forceRender:wt,onVisibleChanged:function(mr){ut==null||ut(mr)},removeOnLeave:!1,leavedClassName:"".concat(Ct,"-content-wrapper-hidden")}),function(fr,mr){var Ai=fr.className,ar=fr.style,Sr=De.createElement(ue,(0,Se.Z)({id:xt,containerRef:mr,prefixCls:Ct,className:ve()(At,ht==null?void 0:ht.content),style:(0,ct.Z)((0,ct.Z)({},tt),Ut==null?void 0:Ut.content)},(0,z.Z)(Ue,{aria:!0}),Ii),Ze);return De.createElement("div",(0,Se.Z)({className:ve()("".concat(Ct,"-content-wrapper"),ht==null?void 0:ht.wrapper,Ai),style:(0,ct.Z)((0,ct.Z)((0,ct.Z)({},Di),ar),Ut==null?void 0:Ut.wrapper)},(0,z.Z)(Ue,{data:!0})),sn?sn(Sr):Sr)}),et=(0,ct.Z)({},mt);return yt&&(et.zIndex=yt),De.createElement(ke.Provider,{value:oi},De.createElement("div",{className:ve()(Ct,"".concat(Ct,"-").concat(rt),Et,(0,Ce.Z)((0,Ce.Z)({},"".concat(Ct,"-open"),$e),"".concat(Ct,"-inline"),St)),style:et,tabIndex:-1,ref:nn,onKeyDown:mn},vi,De.createElement("div",{tabIndex:0,ref:Wt,style:Be,"aria-hidden":"true","data-sentinel":"start"}),Xi,De.createElement("div",{tabIndex:0,ref:bn,style:Be,"aria-hidden":"true","data-sentinel":"end"})))}var Ne=De.forwardRef(Fe),Ae=Ne,Ie=function(Ke){var ot=Ke.open,st=ot===void 0?!1:ot,dt=Ke.prefixCls,Ct=dt===void 0?"rc-drawer":dt,$e=Ke.placement,rt=$e===void 0?"right":$e,St=Ke.autoFocus,Pt=St===void 0?!0:St,wt=Ke.keyboard,pt=wt===void 0?!0:wt,ft=Ke.width,ht=ft===void 0?378:ft,Et=Ke.mask,mt=Et===void 0?!0:Et,yt=Ke.maskClosable,At=yt===void 0?!0:yt,xt=Ke.getContainer,tt=Ke.forceRender,Ve=Ke.afterOpenChange,xe=Ke.destroyOnClose,Le=Ke.onMouseEnter,Ze=Ke.onMouseOver,nt=Ke.onMouseLeave,Re=Ke.onClick,_e=Ke.onKeyDown,He=Ke.onKeyUp,Qe=Ke.panelRef,ut=De.useState(!1),gt=(0,Bt.Z)(ut,2),Mt=gt[0],Nt=gt[1],Dt=De.useState(!1),Ht=(0,Bt.Z)(Dt,2),Xt=Ht[0],$t=Ht[1];(0,ze.Z)(function(){$t(!0)},[]);var Ut=Xt?st:!1,sn=De.useRef(),nn=De.useRef();(0,ze.Z)(function(){Ut&&(nn.current=document.activeElement)},[Ut]);var Wt=function(Cr){var cr;if(Nt(Cr),Ve==null||Ve(Cr),!Cr&&nn.current&&!((cr=sn.current)!==null&&cr!==void 0&&cr.contains(nn.current))){var kr;(kr=nn.current)===null||kr===void 0||kr.focus({preventScroll:!0})}},bn=De.useMemo(function(){return{panel:Qe}},[Qe]);if(!tt&&!Mt&&!Ut&&xe)return null;var mn={onMouseEnter:Le,onMouseOver:Ze,onMouseLeave:nt,onClick:Re,onKeyDown:_e,onKeyUp:He},jn=(0,ct.Z)((0,ct.Z)({},Ke),{},{open:Ut,prefixCls:Ct,placement:rt,autoFocus:Pt,keyboard:pt,width:ht,mask:mt,maskClosable:At,inline:xt===!1,afterOpenChange:Wt,ref:sn},mn);return De.createElement(me.Provider,{value:bn},De.createElement(oe.Z,{open:Ut||tt||Mt,autoDestroy:!1,getContainer:xt,autoLock:mt&&(Ut||Mt)},De.createElement(Ae,jn)))},We=Ie,Ye=We},23425:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Be}});var ct=at(4635),Bt=at(14809),oe=at(93664),ze=at(20439),De=at(50298),fe=at(92310),me=at.n(fe),ke=at(18929),Ce=at(10228),Se=at(26112),Me=at(48736),ve=at(59301),we=at(17119),de=[10,20,50,100],z=function(Ne){var Ae=Ne.pageSizeOptions,Ie=Ae===void 0?de:Ae,We=Ne.locale,Ye=Ne.changeSize,Ue=Ne.pageSize,Ke=Ne.goButton,ot=Ne.quickGo,st=Ne.rootPrefixCls,dt=Ne.disabled,Ct=Ne.buildOptionText,$e=Ne.showSizeChanger,rt=Ne.sizeChangerRender,St=ve.useState(""),Pt=(0,De.Z)(St,2),wt=Pt[0],pt=Pt[1],ft=function(){return!wt||Number.isNaN(wt)?void 0:Number(wt)},ht=typeof Ct=="function"?Ct:function(Le){return"".concat(Le," ").concat(We.items_per_page)},Et=function(Ze){pt(Ze.target.value)},mt=function(Ze){Ke||wt===""||(pt(""),!(Ze.relatedTarget&&(Ze.relatedTarget.className.indexOf("".concat(st,"-item-link"))>=0||Ze.relatedTarget.className.indexOf("".concat(st,"-item"))>=0))&&(ot==null||ot(ft())))},yt=function(Ze){wt!==""&&(Ze.keyCode===Ce.Z.ENTER||Ze.type==="click")&&(pt(""),ot==null||ot(ft()))},At=function(){return Ie.some(function(Ze){return Ze.toString()===Ue.toString()})?Ie:Ie.concat([Ue]).sort(function(Ze,nt){var Re=Number.isNaN(Number(Ze))?0:Number(Ze),_e=Number.isNaN(Number(nt))?0:Number(nt);return Re-_e})},xt="".concat(st,"-options");if(!$e&&!ot)return null;var tt=null,Ve=null,xe=null;return $e&&rt&&(tt=rt({disabled:dt,size:Ue,onSizeChange:function(Ze){Ye==null||Ye(Number(Ze))},"aria-label":We.page_size,className:"".concat(xt,"-size-changer"),options:At().map(function(Le){return{label:ht(Le),value:Le}})})),ot&&(Ke&&(xe=typeof Ke=="boolean"?ve.createElement("button",{type:"button",onClick:yt,onKeyUp:yt,disabled:dt,className:"".concat(xt,"-quick-jumper-button")},We.jump_to_confirm):ve.createElement("span",{onClick:yt,onKeyUp:yt},Ke)),Ve=ve.createElement("div",{className:"".concat(xt,"-quick-jumper")},We.jump_to,ve.createElement("input",{disabled:dt,type:"text",value:wt,onChange:Et,onKeyUp:yt,onBlur:mt,"aria-label":We.page}),We.page,xe)),ve.createElement("li",{className:xt},tt,Ve)},ee=z,ae=function(Ne){var Ae=Ne.rootPrefixCls,Ie=Ne.page,We=Ne.active,Ye=Ne.className,Ue=Ne.showTitle,Ke=Ne.onClick,ot=Ne.onKeyPress,st=Ne.itemRender,dt="".concat(Ae,"-item"),Ct=me()(dt,"".concat(dt,"-").concat(Ie),(0,ct.Z)((0,ct.Z)({},"".concat(dt,"-active"),We),"".concat(dt,"-disabled"),!Ie),Ye),$e=function(){Ke(Ie)},rt=function(wt){ot(wt,Ke,Ie)},St=st(Ie,"page",ve.createElement("a",{rel:"nofollow"},Ie));return St?ve.createElement("li",{title:Ue?String(Ie):null,className:Ct,onClick:$e,onKeyDown:rt,tabIndex:0},St):null},ie=ae,le=function(Ne,Ae,Ie){return Ie};function ue(){}function ge(Fe){var Ne=Number(Fe);return typeof Ne=="number"&&!Number.isNaN(Ne)&&isFinite(Ne)&&Math.floor(Ne)===Ne}function Pe(Fe,Ne,Ae){var Ie=typeof Fe=="undefined"?Ne:Fe;return Math.floor((Ae-1)/Ie)+1}var je=function(Ne){var Ae=Ne.prefixCls,Ie=Ae===void 0?"rc-pagination":Ae,We=Ne.selectPrefixCls,Ye=We===void 0?"rc-select":We,Ue=Ne.className,Ke=Ne.current,ot=Ne.defaultCurrent,st=ot===void 0?1:ot,dt=Ne.total,Ct=dt===void 0?0:dt,$e=Ne.pageSize,rt=Ne.defaultPageSize,St=rt===void 0?10:rt,Pt=Ne.onChange,wt=Pt===void 0?ue:Pt,pt=Ne.hideOnSinglePage,ft=Ne.align,ht=Ne.showPrevNextJumpers,Et=ht===void 0?!0:ht,mt=Ne.showQuickJumper,yt=Ne.showLessItems,At=Ne.showTitle,xt=At===void 0?!0:At,tt=Ne.onShowSizeChange,Ve=tt===void 0?ue:tt,xe=Ne.locale,Le=xe===void 0?we.Z:xe,Ze=Ne.style,nt=Ne.totalBoundaryShowSizeChanger,Re=nt===void 0?50:nt,_e=Ne.disabled,He=Ne.simple,Qe=Ne.showTotal,ut=Ne.showSizeChanger,gt=ut===void 0?Ct>Re:ut,Mt=Ne.sizeChangerRender,Nt=Ne.pageSizeOptions,Dt=Ne.itemRender,Ht=Dt===void 0?le:Dt,Xt=Ne.jumpPrevIcon,$t=Ne.jumpNextIcon,Ut=Ne.prevIcon,sn=Ne.nextIcon,nn=ve.useRef(null),Wt=(0,ke.Z)(10,{value:$e,defaultValue:St}),bn=(0,De.Z)(Wt,2),mn=bn[0],jn=bn[1],Jn=(0,ke.Z)(1,{value:Ke,defaultValue:st,postState:function(hi){return Math.max(1,Math.min(hi,Pe(void 0,mn,Ct)))}}),Cr=(0,De.Z)(Jn,2),cr=Cr[0],kr=Cr[1],Kr=ve.useState(cr),Ur=(0,De.Z)(Kr,2),oi=Ur[0],vi=Ur[1];(0,ve.useEffect)(function(){vi(cr)},[cr]);var Bi=wt!==ue,Di="current"in Ne,Ii=Math.max(1,cr-(yt?3:5)),Xi=Math.min(Pe(void 0,mn,Ct),cr+(yt?3:5));function et(xr,hi){var ei=xr||ve.createElement("button",{type:"button","aria-label":hi,className:"".concat(Ie,"-item-link")});return typeof xr=="function"&&(ei=ve.createElement(xr,(0,ze.Z)({},Ne))),ei}function fr(xr){var hi=xr.target.value,ei=Pe(void 0,mn,Ct),Wi;return hi===""?Wi=hi:Number.isNaN(Number(hi))?Wi=oi:hi>=ei?Wi=ei:Wi=Number(hi),Wi}function mr(xr){return ge(xr)&&xr!==cr&&ge(Ct)&&Ct>0}var Ai=Ct>mn?mt:!1;function ar(xr){(xr.keyCode===Ce.Z.UP||xr.keyCode===Ce.Z.DOWN)&&xr.preventDefault()}function Sr(xr){var hi=fr(xr);switch(hi!==oi&&vi(hi),xr.keyCode){case Ce.Z.ENTER:on(hi);break;case Ce.Z.UP:on(hi-1);break;case Ce.Z.DOWN:on(hi+1);break;default:break}}function Ar(xr){on(fr(xr))}function lo(xr){var hi=Pe(xr,mn,Ct),ei=cr>hi&&hi!==0?hi:cr;jn(xr),vi(ei),Ve==null||Ve(cr,xr),kr(ei),wt==null||wt(ei,xr)}function on(xr){if(mr(xr)&&!_e){var hi=Pe(void 0,mn,Ct),ei=xr;return xr>hi?ei=hi:xr<1&&(ei=1),ei!==oi&&vi(ei),kr(ei),wt==null||wt(ei,mn),ei}return cr}var an=cr>1,tn=cr<Pe(void 0,mn,Ct);function vn(){an&&on(cr-1)}function gr(){tn&&on(cr+1)}function pr(){on(Ii)}function ii(){on(Xi)}function Mn(xr,hi){if(xr.key==="Enter"||xr.charCode===Ce.Z.ENTER||xr.keyCode===Ce.Z.ENTER){for(var ei=arguments.length,Wi=new Array(ei>2?ei-2:0),ci=2;ci<ei;ci++)Wi[ci-2]=arguments[ci];hi.apply(void 0,Wi)}}function sr(xr){Mn(xr,vn)}function Wr(xr){Mn(xr,gr)}function Li(xr){Mn(xr,pr)}function tr(xr){Mn(xr,ii)}function Ot(xr){var hi=Ht(xr,"prev",et(Ut,"prev page"));return ve.isValidElement(hi)?ve.cloneElement(hi,{disabled:!an}):hi}function Kt(xr){var hi=Ht(xr,"next",et(sn,"next page"));return ve.isValidElement(hi)?ve.cloneElement(hi,{disabled:!tn}):hi}function Dn(xr){(xr.type==="click"||xr.keyCode===Ce.Z.ENTER)&&on(oi)}var Ln=null,en=(0,Se.Z)(Ne,{aria:!0,data:!0}),Un=Qe&&ve.createElement("li",{className:"".concat(Ie,"-total-text")},Qe(Ct,[Ct===0?0:(cr-1)*mn+1,cr*mn>Ct?Ct:cr*mn])),Bn=null,An=Pe(void 0,mn,Ct);if(pt&&Ct<=mn)return null;var nr=[],_n={rootPrefixCls:Ie,onClick:on,onKeyPress:Mn,showTitle:xt,itemRender:Ht,page:-1},Xn=cr-1>0?cr-1:0,ur=cr+1<An?cr+1:An,zr=mt&&mt.goButton,dr=(0,oe.Z)(He)==="object"?He.readOnly:!He,dn=zr,$n=null;He&&(zr&&(typeof zr=="boolean"?dn=ve.createElement("button",{type:"button",onClick:Dn,onKeyUp:Dn},Le.jump_to_confirm):dn=ve.createElement("span",{onClick:Dn,onKeyUp:Dn},zr),dn=ve.createElement("li",{title:xt?"".concat(Le.jump_to).concat(cr,"/").concat(An):null,className:"".concat(Ie,"-simple-pager")},dn)),$n=ve.createElement("li",{title:xt?"".concat(cr,"/").concat(An):null,className:"".concat(Ie,"-simple-pager")},dr?oi:ve.createElement("input",{type:"text","aria-label":Le.jump_to,value:oi,disabled:_e,onKeyDown:ar,onKeyUp:Sr,onChange:Sr,onBlur:Ar,size:3}),ve.createElement("span",{className:"".concat(Ie,"-slash")},"/"),An));var Ir=yt?1:2;if(An<=3+Ir*2){An||nr.push(ve.createElement(ie,(0,Bt.Z)({},_n,{key:"noPager",page:1,className:"".concat(Ie,"-item-disabled")})));for(var qr=1;qr<=An;qr+=1)nr.push(ve.createElement(ie,(0,Bt.Z)({},_n,{key:qr,page:qr,active:cr===qr})))}else{var ki=yt?Le.prev_3:Le.prev_5,Qt=yt?Le.next_3:Le.next_5,or=Ht(Ii,"jump-prev",et(Xt,"prev page")),yr=Ht(Xi,"jump-next",et($t,"next page"));Et&&(Ln=or?ve.createElement("li",{title:xt?ki:null,key:"prev",onClick:pr,tabIndex:0,onKeyDown:Li,className:me()("".concat(Ie,"-jump-prev"),(0,ct.Z)({},"".concat(Ie,"-jump-prev-custom-icon"),!!Xt))},or):null,Bn=yr?ve.createElement("li",{title:xt?Qt:null,key:"next",onClick:ii,tabIndex:0,onKeyDown:tr,className:me()("".concat(Ie,"-jump-next"),(0,ct.Z)({},"".concat(Ie,"-jump-next-custom-icon"),!!$t))},yr):null);var Hn=Math.max(1,cr-Ir),Yr=Math.min(cr+Ir,An);cr-1<=Ir&&(Yr=1+Ir*2),An-cr<=Ir&&(Hn=An-Ir*2);for(var Rr=Hn;Rr<=Yr;Rr+=1)nr.push(ve.createElement(ie,(0,Bt.Z)({},_n,{key:Rr,page:Rr,active:cr===Rr})));if(cr-1>=Ir*2&&cr!==3&&(nr[0]=ve.cloneElement(nr[0],{className:me()("".concat(Ie,"-item-after-jump-prev"),nr[0].props.className)}),nr.unshift(Ln)),An-cr>=Ir*2&&cr!==An-2){var Zr=nr[nr.length-1];nr[nr.length-1]=ve.cloneElement(Zr,{className:me()("".concat(Ie,"-item-before-jump-next"),Zr.props.className)}),nr.push(Bn)}Hn!==1&&nr.unshift(ve.createElement(ie,(0,Bt.Z)({},_n,{key:1,page:1}))),Yr!==An&&nr.push(ve.createElement(ie,(0,Bt.Z)({},_n,{key:An,page:An})))}var Qr=Ot(Xn);if(Qr){var ui=!an||!An;Qr=ve.createElement("li",{title:xt?Le.prev_page:null,onClick:vn,tabIndex:ui?null:0,onKeyDown:sr,className:me()("".concat(Ie,"-prev"),(0,ct.Z)({},"".concat(Ie,"-disabled"),ui)),"aria-disabled":ui},Qr)}var Pi=Kt(ur);if(Pi){var pn,Oi;He?(pn=!tn,Oi=an?0:null):(pn=!tn||!An,Oi=pn?null:0),Pi=ve.createElement("li",{title:xt?Le.next_page:null,onClick:gr,tabIndex:Oi,onKeyDown:Wr,className:me()("".concat(Ie,"-next"),(0,ct.Z)({},"".concat(Ie,"-disabled"),pn)),"aria-disabled":pn},Pi)}var yn=me()(Ie,Ue,(0,ct.Z)((0,ct.Z)((0,ct.Z)((0,ct.Z)((0,ct.Z)({},"".concat(Ie,"-start"),ft==="start"),"".concat(Ie,"-center"),ft==="center"),"".concat(Ie,"-end"),ft==="end"),"".concat(Ie,"-simple"),He),"".concat(Ie,"-disabled"),_e));return ve.createElement("ul",(0,Bt.Z)({className:yn,style:Ze,ref:nn},en),Un,Qr,He?$n:nr,Pi,ve.createElement(ee,{locale:Le,rootPrefixCls:Ie,disabled:_e,selectPrefixCls:Ye,changeSize:lo,pageSize:mn,pageSizeOptions:Nt,quickGo:Ai?on:null,goButton:dn,showSizeChanger:gt,sizeChangerRender:Mt}))},Be=je},25930:function(gn,cn,at){"use strict";at.d(cn,{Cd:function(){return Ie}});var ct=at(14809),Bt=at(20439),oe=at(62646),ze=at(59301),De=at(92310),fe=at.n(De),me={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ke=function(){var Ue=(0,ze.useRef)([]),Ke=(0,ze.useRef)(null);return(0,ze.useEffect)(function(){var ot=Date.now(),st=!1;Ue.current.forEach(function(dt){if(dt){st=!0;var Ct=dt.style;Ct.transitionDuration=".3s, .3s, .3s, .06s",Ke.current&&ot-Ke.current<100&&(Ct.transitionDuration="0s, 0s")}}),st&&(Ke.current=Date.now())}),Ue.current},Ce=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Se=function(Ue){var Ke=(0,Bt.Z)((0,Bt.Z)({},me),Ue),ot=Ke.className,st=Ke.percent,dt=Ke.prefixCls,Ct=Ke.strokeColor,$e=Ke.strokeLinecap,rt=Ke.strokeWidth,St=Ke.style,Pt=Ke.trailColor,wt=Ke.trailWidth,pt=Ke.transition,ft=(0,oe.Z)(Ke,Ce);delete ft.gapPosition;var ht=Array.isArray(st)?st:[st],Et=Array.isArray(Ct)?Ct:[Ct],mt=ke(),yt=rt/2,At=100-rt/2,xt="M ".concat($e==="round"?yt:0,",").concat(yt,`
L `).concat($e==="round"?At:100,",").concat(yt),tt="0 0 100 ".concat(rt),Ve=0;return ze.createElement("svg",(0,ct.Z)({className:fe()("".concat(dt,"-line"),ot),viewBox:tt,preserveAspectRatio:"none",style:St},ft),ze.createElement("path",{className:"".concat(dt,"-line-trail"),d:xt,strokeLinecap:$e,stroke:Pt,strokeWidth:wt||rt,fillOpacity:"0"}),ht.map(function(xe,Le){var Ze=1;switch($e){case"round":Ze=1-rt/100;break;case"square":Ze=1-rt/2/100;break;default:Ze=1;break}var nt={strokeDasharray:"".concat(xe*Ze,"px, 100px"),strokeDashoffset:"-".concat(Ve,"px"),transition:pt||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Re=Et[Le]||Et[Et.length-1];return Ve+=xe,ze.createElement("path",{key:Le,className:"".concat(dt,"-line-path"),d:xt,strokeLinecap:$e,stroke:Re,strokeWidth:rt,fillOpacity:"0",ref:function(He){mt[Le]=He},style:nt})}))},Me=Se,ve=at(93664),we=at(50298),de=at(47273),z=0,ee=(0,de.Z)();function ae(){var Ye;return ee?(Ye=z,z+=1):Ye="TEST_OR_SSR",Ye}var ie=function(Ye){var Ue=ze.useState(),Ke=(0,we.Z)(Ue,2),ot=Ke[0],st=Ke[1];return ze.useEffect(function(){st("rc_progress_".concat(ae()))},[]),Ye||ot},le=function(Ue){var Ke=Ue.bg,ot=Ue.children;return ze.createElement("div",{style:{width:"100%",height:"100%",background:Ke}},ot)};function ue(Ye,Ue){return Object.keys(Ye).map(function(Ke){var ot=parseFloat(Ke),st="".concat(Math.floor(ot*Ue),"%");return"".concat(Ye[Ke]," ").concat(st)})}var ge=ze.forwardRef(function(Ye,Ue){var Ke=Ye.prefixCls,ot=Ye.color,st=Ye.gradientId,dt=Ye.radius,Ct=Ye.style,$e=Ye.ptg,rt=Ye.strokeLinecap,St=Ye.strokeWidth,Pt=Ye.size,wt=Ye.gapDegree,pt=ot&&(0,ve.Z)(ot)==="object",ft=pt?"#FFF":void 0,ht=Pt/2,Et=ze.createElement("circle",{className:"".concat(Ke,"-circle-path"),r:dt,cx:ht,cy:ht,stroke:ft,strokeLinecap:rt,strokeWidth:St,opacity:$e===0?0:1,style:Ct,ref:Ue});if(!pt)return Et;var mt="".concat(st,"-conic"),yt=wt?"".concat(180+wt/2,"deg"):"0deg",At=ue(ot,(360-wt)/360),xt=ue(ot,1),tt="conic-gradient(from ".concat(yt,", ").concat(At.join(", "),")"),Ve="linear-gradient(to ".concat(wt?"bottom":"top",", ").concat(xt.join(", "),")");return ze.createElement(ze.Fragment,null,ze.createElement("mask",{id:mt},Et),ze.createElement("foreignObject",{x:0,y:0,width:Pt,height:Pt,mask:"url(#".concat(mt,")")},ze.createElement(le,{bg:Ve},ze.createElement(le,{bg:tt}))))}),Pe=ge,je=100,Be=function(Ue,Ke,ot,st,dt,Ct,$e,rt,St,Pt){var wt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,pt=ot/100*360*((360-Ct)/360),ft=Ct===0?0:{bottom:0,top:180,left:90,right:-90}[$e],ht=(100-st)/100*Ke;St==="round"&&st!==100&&(ht+=Pt/2,ht>=Ke&&(ht=Ke-.01));var Et=je/2;return{stroke:typeof rt=="string"?rt:void 0,strokeDasharray:"".concat(Ke,"px ").concat(Ue),strokeDashoffset:ht+wt,transform:"rotate(".concat(dt+pt+ft,"deg)"),transformOrigin:"".concat(Et,"px ").concat(Et,"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 Ne(Ye){var Ue=Ye!=null?Ye:[];return Array.isArray(Ue)?Ue:[Ue]}var Ae=function(Ue){var Ke=(0,Bt.Z)((0,Bt.Z)({},me),Ue),ot=Ke.id,st=Ke.prefixCls,dt=Ke.steps,Ct=Ke.strokeWidth,$e=Ke.trailWidth,rt=Ke.gapDegree,St=rt===void 0?0:rt,Pt=Ke.gapPosition,wt=Ke.trailColor,pt=Ke.strokeLinecap,ft=Ke.style,ht=Ke.className,Et=Ke.strokeColor,mt=Ke.percent,yt=(0,oe.Z)(Ke,Fe),At=je/2,xt=ie(ot),tt="".concat(xt,"-gradient"),Ve=At-Ct/2,xe=Math.PI*2*Ve,Le=St>0?90+St/2:-90,Ze=xe*((360-St)/360),nt=(0,ve.Z)(dt)==="object"?dt:{count:dt,gap:2},Re=nt.count,_e=nt.gap,He=Ne(mt),Qe=Ne(Et),ut=Qe.find(function($t){return $t&&(0,ve.Z)($t)==="object"}),gt=ut&&(0,ve.Z)(ut)==="object",Mt=gt?"butt":pt,Nt=Be(xe,Ze,0,100,Le,St,Pt,wt,Mt,Ct),Dt=ke(),Ht=function(){var Ut=0;return He.map(function(sn,nn){var Wt=Qe[nn]||Qe[Qe.length-1],bn=Be(xe,Ze,Ut,sn,Le,St,Pt,Wt,Mt,Ct);return Ut+=sn,ze.createElement(Pe,{key:nn,color:Wt,ptg:sn,radius:Ve,prefixCls:st,gradientId:tt,style:bn,strokeLinecap:Mt,strokeWidth:Ct,gapDegree:St,ref:function(jn){Dt[nn]=jn},size:je})}).reverse()},Xt=function(){var Ut=Math.round(Re*(He[0]/100)),sn=100/Re,nn=0;return new Array(Re).fill(null).map(function(Wt,bn){var mn=bn<=Ut-1?Qe[0]:wt,jn=mn&&(0,ve.Z)(mn)==="object"?"url(#".concat(tt,")"):void 0,Jn=Be(xe,Ze,nn,sn,Le,St,Pt,mn,"butt",Ct,_e);return nn+=(Ze-Jn.strokeDashoffset+_e)*100/Ze,ze.createElement("circle",{key:bn,className:"".concat(st,"-circle-path"),r:Ve,cx:At,cy:At,stroke:jn,strokeWidth:Ct,opacity:1,style:Jn,ref:function(cr){Dt[bn]=cr}})})};return ze.createElement("svg",(0,ct.Z)({className:fe()("".concat(st,"-circle"),ht),viewBox:"0 0 ".concat(je," ").concat(je),style:ft,id:ot,role:"presentation"},yt),!Re&&ze.createElement("circle",{className:"".concat(st,"-circle-trail"),r:Ve,cx:At,cy:At,stroke:wt,strokeLinecap:Mt,strokeWidth:$e||Ct,style:Nt}),Re?Xt():Ht())},Ie=Ae,We={Line:Me,Circle:Ie}},6551:function(gn,cn,at){"use strict";at.d(cn,{ZP:function(){return me}});var ct=at(50298),Bt=at(59301),oe=at(47273),ze=0,De=(0,oe.Z)();function fe(){var ke;return De?(ke=ze,ze+=1):ke="TEST_OR_SSR",ke}function me(ke){var Ce=Bt.useState(),Se=(0,ct.Z)(Ce,2),Me=Se[0],ve=Se[1];return Bt.useEffect(function(){ve("rc_select_".concat(fe()))},[]),ke||Me}},37463:function(gn,cn,at){"use strict";at.d(cn,{Ac:function(){return Wt},Xo:function(){return mn},Wx:function(){return Jn},ZP:function(){return tr},lk:function(){return ue}});var ct=at(14809),Bt=at(95190),oe=at(4635),ze=at(20439),De=at(50298),fe=at(62646),me=at(93664),ke=at(18929),Ce=at(48736),Se=at(59301),Me=at(92310),ve=at.n(Me),we=at(34280),de=at(49658),z=at(8654),ee=function(Kt){var Dn=Kt.className,Ln=Kt.customizeIcon,en=Kt.customizeIconProps,Un=Kt.children,Bn=Kt.onMouseDown,An=Kt.onClick,nr=typeof Ln=="function"?Ln(en):Ln;return Se.createElement("span",{className:Dn,onMouseDown:function(Xn){Xn.preventDefault(),Bn==null||Bn(Xn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:An,"aria-hidden":!0},nr!==void 0?nr:Se.createElement("span",{className:ve()(Dn.split(/\s+/).map(function(_n){return"".concat(_n,"-icon")}))},Un))},ae=ee,ie=function(Kt,Dn,Ln,en,Un){var Bn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,An=arguments.length>6?arguments[6]:void 0,nr=arguments.length>7?arguments[7]:void 0,_n=Se.useMemo(function(){if((0,me.Z)(en)==="object")return en.clearIcon;if(Un)return Un},[en,Un]),Xn=Se.useMemo(function(){return!!(!Bn&&en&&(Ln.length||An)&&!(nr==="combobox"&&An===""))},[en,Bn,Ln.length,An,nr]);return{allowClear:Xn,clearIcon:Se.createElement(ae,{className:"".concat(Kt,"-clear"),onMouseDown:Dn,customizeIcon:_n},"\xD7")}},le=Se.createContext(null);function ue(){return Se.useContext(le)}function ge(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Kt=Se.useState(!1),Dn=(0,De.Z)(Kt,2),Ln=Dn[0],en=Dn[1],Un=Se.useRef(null),Bn=function(){window.clearTimeout(Un.current)};Se.useEffect(function(){return Bn},[]);var An=function(_n,Xn){Bn(),Un.current=window.setTimeout(function(){en(_n),Xn&&Xn()},Ot)};return[Ln,An,Bn]}function Pe(){var Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Kt=Se.useRef(null),Dn=Se.useRef(null);Se.useEffect(function(){return function(){window.clearTimeout(Dn.current)}},[]);function Ln(en){(en||Kt.current===null)&&(Kt.current=en),window.clearTimeout(Dn.current),Dn.current=window.setTimeout(function(){Kt.current=null},Ot)}return[function(){return Kt.current},Ln]}function je(Ot,Kt,Dn,Ln){var en=Se.useRef(null);en.current={open:Kt,triggerOpen:Dn,customizedTrigger:Ln},Se.useEffect(function(){function Un(Bn){var An;if(!((An=en.current)!==null&&An!==void 0&&An.customizedTrigger)){var nr=Bn.target;nr.shadowRoot&&Bn.composed&&(nr=Bn.composedPath()[0]||nr),en.current.open&&Ot().filter(function(_n){return _n}).every(function(_n){return!_n.contains(nr)&&_n!==nr})&&en.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Un),function(){return window.removeEventListener("mousedown",Un)}},[])}var Be=at(10228);function Fe(Ot){return Ot&&![Be.Z.ESC,Be.Z.SHIFT,Be.Z.BACKSPACE,Be.Z.TAB,Be.Z.WIN_KEY,Be.Z.ALT,Be.Z.META,Be.Z.WIN_KEY_RIGHT,Be.Z.CTRL,Be.Z.SEMICOLON,Be.Z.EQUALS,Be.Z.CAPS_LOCK,Be.Z.CONTEXT_MENU,Be.Z.F1,Be.Z.F2,Be.Z.F3,Be.Z.F4,Be.Z.F5,Be.Z.F6,Be.Z.F7,Be.Z.F8,Be.Z.F9,Be.Z.F10,Be.Z.F11,Be.Z.F12].includes(Ot)}var Ne=at(26112),Ae=at(11780);function Ie(Ot,Kt,Dn){var Ln=(0,ze.Z)((0,ze.Z)({},Ot),Dn?Kt:{});return Object.keys(Kt).forEach(function(en){var Un=Kt[en];typeof Un=="function"&&(Ln[en]=function(){for(var Bn,An=arguments.length,nr=new Array(An),_n=0;_n<An;_n++)nr[_n]=arguments[_n];return Un.apply(void 0,nr),(Bn=Ot[en])===null||Bn===void 0?void 0:Bn.call.apply(Bn,[Ot].concat(nr))})}),Ln}var We=Ie,Ye=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ue=function(Kt,Dn){var Ln=Kt.prefixCls,en=Kt.id,Un=Kt.inputElement,Bn=Kt.autoFocus,An=Kt.autoComplete,nr=Kt.editable,_n=Kt.activeDescendantId,Xn=Kt.value,ur=Kt.open,zr=Kt.attrs,dr=(0,fe.Z)(Kt,Ye),dn=Un||Se.createElement("input",null),$n=dn,Ir=$n.ref,qr=$n.props;return(0,Ce.Kp)(!("maxLength"in dn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),dn=Se.cloneElement(dn,(0,ze.Z)((0,ze.Z)((0,ze.Z)({type:"search"},We(dr,qr,!0)),{},{id:en,ref:(0,z.sQ)(Dn,Ir),autoComplete:An||"off",autoFocus:Bn,className:ve()("".concat(Ln,"-selection-search-input"),qr==null?void 0:qr.className),role:"combobox","aria-expanded":ur||!1,"aria-haspopup":"listbox","aria-owns":"".concat(en,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(en,"_list"),"aria-activedescendant":ur?_n:void 0},zr),{},{value:nr?Xn:"",readOnly:!nr,unselectable:nr?null:"on",style:(0,ze.Z)((0,ze.Z)({},qr.style),{},{opacity:nr?null:0})})),dn},Ke=Se.forwardRef(Ue),ot=Ke;function st(Ot){return Array.isArray(Ot)?Ot:Ot!==void 0?[Ot]:[]}var dt=typeof window!="undefined"&&window.document&&window.document.documentElement,Ct=dt;function $e(Ot){return Ot!=null}function rt(Ot){return!Ot&&Ot!==0}function St(Ot){return["string","number"].includes((0,me.Z)(Ot))}function Pt(Ot){var Kt=void 0;return Ot&&(St(Ot.title)?Kt=Ot.title.toString():St(Ot.label)&&(Kt=Ot.label.toString())),Kt}function wt(Ot,Kt){Ct?Se.useLayoutEffect(Ot,Kt):Se.useEffect(Ot,Kt)}function pt(Ot){var Kt;return(Kt=Ot.key)!==null&&Kt!==void 0?Kt:Ot.value}var ft=function(Kt){Kt.preventDefault(),Kt.stopPropagation()},ht=function(Kt){var Dn=Kt.id,Ln=Kt.prefixCls,en=Kt.values,Un=Kt.open,Bn=Kt.searchValue,An=Kt.autoClearSearchValue,nr=Kt.inputRef,_n=Kt.placeholder,Xn=Kt.disabled,ur=Kt.mode,zr=Kt.showSearch,dr=Kt.autoFocus,dn=Kt.autoComplete,$n=Kt.activeDescendantId,Ir=Kt.tabIndex,qr=Kt.removeIcon,ki=Kt.maxTagCount,Qt=Kt.maxTagTextLength,or=Kt.maxTagPlaceholder,yr=or===void 0?function(zn){return"+ ".concat(zn.length," ...")}:or,Hn=Kt.tagRender,Yr=Kt.onToggleOpen,Rr=Kt.onRemove,Zr=Kt.onInputChange,Qr=Kt.onInputPaste,ui=Kt.onInputKeyDown,Pi=Kt.onInputMouseDown,pn=Kt.onInputCompositionStart,Oi=Kt.onInputCompositionEnd,yn=Kt.onInputBlur,xr=Se.useRef(null),hi=(0,Se.useState)(0),ei=(0,De.Z)(hi,2),Wi=ei[0],ci=ei[1],Vr=(0,Se.useState)(!1),Hi=(0,De.Z)(Vr,2),qt=Hi[0],wn=Hi[1],Yt="".concat(Ln,"-selection"),lt=Un||ur==="multiple"&&An===!1||ur==="tags"?Bn:"",On=ur==="tags"||ur==="multiple"&&An===!1||zr&&(Un||qt);wt(function(){ci(xr.current.scrollWidth)},[lt]);var Sn=function(Tn,In,Nn,Zn,Wn){return Se.createElement("span",{title:Pt(Tn),className:ve()("".concat(Yt,"-item"),(0,oe.Z)({},"".concat(Yt,"-item-disabled"),Nn))},Se.createElement("span",{className:"".concat(Yt,"-item-content")},In),Zn&&Se.createElement(ae,{className:"".concat(Yt,"-item-remove"),onMouseDown:ft,onClick:Wn,customizeIcon:qr},"\xD7"))},Kn=function(Tn,In,Nn,Zn,Wn,ln){var br=function(ai){ft(ai),Yr(!Un)};return Se.createElement("span",{onMouseDown:br},Hn({label:In,value:Tn,disabled:Nn,closable:Zn,onClose:Wn,isMaxTag:!!ln}))},Qn=function(Tn){var In=Tn.disabled,Nn=Tn.label,Zn=Tn.value,Wn=!Xn&&!In,ln=Nn;if(typeof Qt=="number"&&(typeof Nn=="string"||typeof Nn=="number")){var br=String(ln);br.length>Qt&&(ln="".concat(br.slice(0,Qt),"..."))}var Er=function(Tr){Tr&&Tr.stopPropagation(),Rr(Tn)};return typeof Hn=="function"?Kn(Zn,ln,In,Wn,Er):Sn(Tn,ln,In,Wn,Er)},Vn=function(Tn){if(!en.length)return null;var In=typeof yr=="function"?yr(Tn):yr;return typeof Hn=="function"?Kn(void 0,In,!1,!1,void 0,!0):Sn({title:In},In,!1)},un=Se.createElement("div",{className:"".concat(Yt,"-search"),style:{width:Wi},onFocus:function(){wn(!0)},onBlur:function(){wn(!1)}},Se.createElement(ot,{ref:nr,open:Un,prefixCls:Ln,id:Dn,inputElement:null,disabled:Xn,autoFocus:dr,autoComplete:dn,editable:On,activeDescendantId:$n,value:lt,onKeyDown:ui,onMouseDown:Pi,onChange:Zr,onPaste:Qr,onCompositionStart:pn,onCompositionEnd:Oi,onBlur:yn,tabIndex:Ir,attrs:(0,Ne.Z)(Kt,!0)}),Se.createElement("span",{ref:xr,className:"".concat(Yt,"-search-mirror"),"aria-hidden":!0},lt,"\xA0")),Fn=Se.createElement(Ae.Z,{prefixCls:"".concat(Yt,"-overflow"),data:en,renderItem:Qn,renderRest:Vn,suffix:un,itemKey:pt,maxCount:ki});return Se.createElement("span",{className:"".concat(Yt,"-wrap")},Fn,!en.length&&!lt&&Se.createElement("span",{className:"".concat(Yt,"-placeholder")},_n))},Et=ht,mt=function(Kt){var Dn=Kt.inputElement,Ln=Kt.prefixCls,en=Kt.id,Un=Kt.inputRef,Bn=Kt.disabled,An=Kt.autoFocus,nr=Kt.autoComplete,_n=Kt.activeDescendantId,Xn=Kt.mode,ur=Kt.open,zr=Kt.values,dr=Kt.placeholder,dn=Kt.tabIndex,$n=Kt.showSearch,Ir=Kt.searchValue,qr=Kt.activeValue,ki=Kt.maxLength,Qt=Kt.onInputKeyDown,or=Kt.onInputMouseDown,yr=Kt.onInputChange,Hn=Kt.onInputPaste,Yr=Kt.onInputCompositionStart,Rr=Kt.onInputCompositionEnd,Zr=Kt.onInputBlur,Qr=Kt.title,ui=Se.useState(!1),Pi=(0,De.Z)(ui,2),pn=Pi[0],Oi=Pi[1],yn=Xn==="combobox",xr=yn||$n,hi=zr[0],ei=Ir||"";yn&&qr&&!pn&&(ei=qr),Se.useEffect(function(){yn&&Oi(!1)},[yn,qr]);var Wi=Xn!=="combobox"&&!ur&&!$n?!1:!!ei,ci=Qr===void 0?Pt(hi):Qr,Vr=Se.useMemo(function(){return hi?null:Se.createElement("span",{className:"".concat(Ln,"-selection-placeholder"),style:Wi?{visibility:"hidden"}:void 0},dr)},[hi,Wi,dr,Ln]);return Se.createElement("span",{className:"".concat(Ln,"-selection-wrap")},Se.createElement("span",{className:"".concat(Ln,"-selection-search")},Se.createElement(ot,{ref:Un,prefixCls:Ln,id:en,open:ur,inputElement:Dn,disabled:Bn,autoFocus:An,autoComplete:nr,editable:xr,activeDescendantId:_n,value:ei,onKeyDown:Qt,onMouseDown:or,onChange:function(qt){Oi(!0),yr(qt)},onPaste:Hn,onCompositionStart:Yr,onCompositionEnd:Rr,onBlur:Zr,tabIndex:dn,attrs:(0,Ne.Z)(Kt,!0),maxLength:yn?ki:void 0})),!yn&&hi?Se.createElement("span",{className:"".concat(Ln,"-selection-item"),title:ci,style:Wi?{visibility:"hidden"}:void 0},hi.label):null,Vr)},yt=mt,At=function(Kt,Dn){var Ln=(0,Se.useRef)(null),en=(0,Se.useRef)(!1),Un=Kt.prefixCls,Bn=Kt.open,An=Kt.mode,nr=Kt.showSearch,_n=Kt.tokenWithEnter,Xn=Kt.disabled,ur=Kt.prefix,zr=Kt.autoClearSearchValue,dr=Kt.onSearch,dn=Kt.onSearchSubmit,$n=Kt.onToggleOpen,Ir=Kt.onInputKeyDown,qr=Kt.onInputBlur,ki=Kt.domRef;Se.useImperativeHandle(Dn,function(){return{focus:function(ci){Ln.current.focus(ci)},blur:function(){Ln.current.blur()}}});var Qt=Pe(0),or=(0,De.Z)(Qt,2),yr=or[0],Hn=or[1],Yr=function(ci){var Vr=ci.which,Hi=Ln.current instanceof HTMLTextAreaElement;!Hi&&Bn&&(Vr===Be.Z.UP||Vr===Be.Z.DOWN)&&ci.preventDefault(),Ir&&Ir(ci),Vr===Be.Z.ENTER&&An==="tags"&&!en.current&&!Bn&&(dn==null||dn(ci.target.value)),!(Hi&&!Bn&&~[Be.Z.UP,Be.Z.DOWN,Be.Z.LEFT,Be.Z.RIGHT].indexOf(Vr))&&Fe(Vr)&&$n(!0)},Rr=function(){Hn(!0)},Zr=(0,Se.useRef)(null),Qr=function(ci){dr(ci,!0,en.current)!==!1&&$n(!0)},ui=function(){en.current=!0},Pi=function(ci){en.current=!1,An!=="combobox"&&Qr(ci.target.value)},pn=function(ci){var Vr=ci.target.value;if(_n&&Zr.current&&/[\r\n]/.test(Zr.current)){var Hi=Zr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Vr=Vr.replace(Hi,Zr.current)}Zr.current=null,Qr(Vr)},Oi=function(ci){var Vr=ci.clipboardData,Hi=Vr==null?void 0:Vr.getData("text");Zr.current=Hi||""},yn=function(ci){var Vr=ci.target;if(Vr!==Ln.current){var Hi=document.body.style.msTouchAction!==void 0;Hi?setTimeout(function(){Ln.current.focus()}):Ln.current.focus()}},xr=function(ci){var Vr=yr();ci.target!==Ln.current&&!Vr&&!(An==="combobox"&&Xn)&&ci.preventDefault(),(An!=="combobox"&&(!nr||!Vr)||!Bn)&&(Bn&&zr!==!1&&dr("",!0,!1),$n())},hi={inputRef:Ln,onInputKeyDown:Yr,onInputMouseDown:Rr,onInputChange:pn,onInputPaste:Oi,onInputCompositionStart:ui,onInputCompositionEnd:Pi,onInputBlur:qr},ei=An==="multiple"||An==="tags"?Se.createElement(Et,(0,ct.Z)({},Kt,hi)):Se.createElement(yt,(0,ct.Z)({},Kt,hi));return Se.createElement("div",{ref:ki,className:"".concat(Un,"-selector"),onClick:yn,onMouseDown:xr},ur&&Se.createElement("div",{className:"".concat(Un,"-prefix")},ur),ei)},xt=Se.forwardRef(At),tt=xt,Ve=at(65966),xe=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Le=function(Kt){var Dn=Kt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Dn,adjustY:1},htmlRegion:"scroll"}}},Ze=function(Kt,Dn){var Ln=Kt.prefixCls,en=Kt.disabled,Un=Kt.visible,Bn=Kt.children,An=Kt.popupElement,nr=Kt.animation,_n=Kt.transitionName,Xn=Kt.dropdownStyle,ur=Kt.dropdownClassName,zr=Kt.direction,dr=zr===void 0?"ltr":zr,dn=Kt.placement,$n=Kt.builtinPlacements,Ir=Kt.dropdownMatchSelectWidth,qr=Kt.dropdownRender,ki=Kt.dropdownAlign,Qt=Kt.getPopupContainer,or=Kt.empty,yr=Kt.getTriggerDOMNode,Hn=Kt.onPopupVisibleChange,Yr=Kt.onPopupMouseEnter,Rr=(0,fe.Z)(Kt,xe),Zr="".concat(Ln,"-dropdown"),Qr=An;qr&&(Qr=qr(An));var ui=Se.useMemo(function(){return $n||Le(Ir)},[$n,Ir]),Pi=nr?"".concat(Zr,"-").concat(nr):_n,pn=typeof Ir=="number",Oi=Se.useMemo(function(){return pn?null:Ir===!1?"minWidth":"width"},[Ir,pn]),yn=Xn;pn&&(yn=(0,ze.Z)((0,ze.Z)({},yn),{},{width:Ir}));var xr=Se.useRef(null);return Se.useImperativeHandle(Dn,function(){return{getPopupElement:function(){var ei;return(ei=xr.current)===null||ei===void 0?void 0:ei.popupElement}}}),Se.createElement(Ve.Z,(0,ct.Z)({},Rr,{showAction:Hn?["click"]:[],hideAction:Hn?["click"]:[],popupPlacement:dn||(dr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ui,prefixCls:Zr,popupTransitionName:Pi,popup:Se.createElement("div",{onMouseEnter:Yr},Qr),ref:xr,stretch:Oi,popupAlign:ki,popupVisible:Un,getPopupContainer:Qt,popupClassName:ve()(ur,(0,oe.Z)({},"".concat(Zr,"-empty"),or)),popupStyle:yn,getTriggerDOMNode:yr,onPopupVisibleChange:Hn}),Bn)},nt=Se.forwardRef(Ze),Re=nt,_e=at(21696);function He(Ot,Kt){var Dn=Ot.key,Ln;return"value"in Ot&&(Ln=Ot.value),Dn!=null?Dn:Ln!==void 0?Ln:"rc-index-key-".concat(Kt)}function Qe(Ot){return typeof Ot!="undefined"&&!Number.isNaN(Ot)}function ut(Ot,Kt){var Dn=Ot||{},Ln=Dn.label,en=Dn.value,Un=Dn.options,Bn=Dn.groupLabel,An=Ln||(Kt?"children":"label");return{label:An,value:en||"value",options:Un||"options",groupLabel:Bn||An}}function gt(Ot){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Dn=Kt.fieldNames,Ln=Kt.childrenAsData,en=[],Un=ut(Dn,!1),Bn=Un.label,An=Un.value,nr=Un.options,_n=Un.groupLabel;function Xn(ur,zr){Array.isArray(ur)&&ur.forEach(function(dr){if(zr||!(nr in dr)){var dn=dr[An];en.push({key:He(dr,en.length),groupOption:zr,data:dr,label:dr[Bn],value:dn})}else{var $n=dr[_n];$n===void 0&&Ln&&($n=dr.label),en.push({key:He(dr,en.length),group:!0,data:dr,label:$n}),Xn(dr[nr],!0)}})}return Xn(Ot,!1),en}function Mt(Ot){var Kt=(0,ze.Z)({},Ot);return"props"in Kt||Object.defineProperty(Kt,"props",{get:function(){return(0,Ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Kt}}),Kt}var Nt=function(Kt,Dn,Ln){if(!Dn||!Dn.length)return null;var en=!1,Un=function An(nr,_n){var Xn=(0,_e.Z)(_n),ur=Xn[0],zr=Xn.slice(1);if(!ur)return[nr];var dr=nr.split(ur);return en=en||dr.length>1,dr.reduce(function(dn,$n){return[].concat((0,Bt.Z)(dn),(0,Bt.Z)(An($n,zr)))},[]).filter(Boolean)},Bn=Un(Kt,Dn);return en?typeof Ln!="undefined"?Bn.slice(0,Ln):Bn:null},Dt=Se.createContext(null),Ht=Dt;function Xt(Ot){var Kt=Ot.visible,Dn=Ot.values;if(!Kt)return null;var Ln=50;return Se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Dn.slice(0,Ln).map(function(en){var Un=en.label,Bn=en.value;return["number","string"].includes((0,me.Z)(Un))?Un:Bn}).join(", ")),Dn.length>Ln?", ...":null)}var $t=["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"],Ut=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],sn=function(Kt){return Kt==="tags"||Kt==="multiple"},nn=Se.forwardRef(function(Ot,Kt){var Dn,Ln=Ot.id,en=Ot.prefixCls,Un=Ot.className,Bn=Ot.showSearch,An=Ot.tagRender,nr=Ot.direction,_n=Ot.omitDomProps,Xn=Ot.displayValues,ur=Ot.onDisplayValuesChange,zr=Ot.emptyOptions,dr=Ot.notFoundContent,dn=dr===void 0?"Not Found":dr,$n=Ot.onClear,Ir=Ot.mode,qr=Ot.disabled,ki=Ot.loading,Qt=Ot.getInputElement,or=Ot.getRawInputElement,yr=Ot.open,Hn=Ot.defaultOpen,Yr=Ot.onDropdownVisibleChange,Rr=Ot.activeValue,Zr=Ot.onActiveValueChange,Qr=Ot.activeDescendantId,ui=Ot.searchValue,Pi=Ot.autoClearSearchValue,pn=Ot.onSearch,Oi=Ot.onSearchSplit,yn=Ot.tokenSeparators,xr=Ot.allowClear,hi=Ot.prefix,ei=Ot.suffixIcon,Wi=Ot.clearIcon,ci=Ot.OptionList,Vr=Ot.animation,Hi=Ot.transitionName,qt=Ot.dropdownStyle,wn=Ot.dropdownClassName,Yt=Ot.dropdownMatchSelectWidth,lt=Ot.dropdownRender,On=Ot.dropdownAlign,Sn=Ot.placement,Kn=Ot.builtinPlacements,Qn=Ot.getPopupContainer,Vn=Ot.showAction,un=Vn===void 0?[]:Vn,Fn=Ot.onFocus,zn=Ot.onBlur,Tn=Ot.onKeyUp,In=Ot.onKeyDown,Nn=Ot.onMouseDown,Zn=(0,fe.Z)(Ot,$t),Wn=sn(Ir),ln=(Bn!==void 0?Bn:Wn)||Ir==="combobox",br=(0,ze.Z)({},Zn);Ut.forEach(function(io){delete br[io]}),_n==null||_n.forEach(function(io){delete br[io]});var Er=Se.useState(!1),ai=(0,De.Z)(Er,2),Tr=ai[0],Si=ai[1];Se.useEffect(function(){Si((0,de.Z)())},[]);var pi=Se.useRef(null),bi=Se.useRef(null),yi=Se.useRef(null),Ri=Se.useRef(null),Ki=Se.useRef(null),Jt=Se.useRef(!1),xi=ge(),ti=(0,De.Z)(xi,3),Hr=ti[0],Dr=ti[1],wi=ti[2];Se.useImperativeHandle(Kt,function(){var io,Ji;return{focus:(io=Ri.current)===null||io===void 0?void 0:io.focus,blur:(Ji=Ri.current)===null||Ji===void 0?void 0:Ji.blur,scrollTo:function(wr){var da;return(da=Ki.current)===null||da===void 0?void 0:da.scrollTo(wr)},nativeElement:pi.current||bi.current}});var _i=Se.useMemo(function(){var io;if(Ir!=="combobox")return ui;var Ji=(io=Xn[0])===null||io===void 0?void 0:io.value;return typeof Ji=="string"||typeof Ji=="number"?String(Ji):""},[ui,Ir,Xn]),Fi=Ir==="combobox"&&typeof Qt=="function"&&Qt()||null,ni=typeof or=="function"&&or(),$i=(0,z.x1)(bi,ni==null||(Dn=ni.props)===null||Dn===void 0?void 0:Dn.ref),_o=Se.useState(!1),fa=(0,De.Z)(_o,2),Ps=fa[0],wa=fa[1];(0,we.Z)(function(){wa(!0)},[]);var Br=(0,ke.Z)(!1,{defaultValue:Hn,value:yr}),Po=(0,De.Z)(Br,2),bo=Po[0],ta=Po[1],Ao=Ps?bo:!1,Ko=!dn&&zr;(qr||Ko&&Ao&&Ir==="combobox")&&(Ao=!1);var er=Ko?!1:Ao,jr=Se.useCallback(function(io){var Ji=io!==void 0?io:!Ao;qr||(ta(Ji),Ao!==Ji&&(Yr==null||Yr(Ji)))},[qr,Ao,ta,Yr]),$r=Se.useMemo(function(){return(yn||[]).some(function(io){return[`
`,`\r
`].includes(io)})},[yn]),mi=Se.useContext(Ht)||{},Ci=mi.maxCount,to=mi.rawValues,Or=function(Ji,sa,wr){if(!(Wn&&Qe(Ci)&&(to==null?void 0:to.size)>=Ci)){var da=!0,Gt=Ji;Zr==null||Zr(null);var Cn=Nt(Ji,yn,Qe(Ci)?Ci-to.size:void 0),Hs=wr?null:Cn;return Ir!=="combobox"&&Hs&&(Gt="",Oi==null||Oi(Hs),jr(!1),da=!1),pn&&_i!==Gt&&pn(Gt,{source:sa?"typing":"effect"}),da}},Aa=function(Ji){!Ji||!Ji.trim()||pn(Ji,{source:"submit"})};Se.useEffect(function(){!Ao&&!Wn&&Ir!=="combobox"&&Or("",!1,!1)},[Ao]),Se.useEffect(function(){bo&&qr&&ta(!1),qr&&!Jt.current&&Dr(!1)},[qr]);var zo=Pe(),jo=(0,De.Z)(zo,2),Ni=jo[0],Vo=jo[1],ja=Se.useRef(!1),vo=function(Ji){var sa=Ni(),wr=Ji.key,da=wr==="Enter";if(da&&(Ir!=="combobox"&&Ji.preventDefault(),Ao||jr(!0)),Vo(!!_i),wr==="Backspace"&&!sa&&Wn&&!_i&&Xn.length){for(var Gt=(0,Bt.Z)(Xn),Cn=null,Hs=Gt.length-1;Hs>=0;Hs-=1){var jl=Gt[Hs];if(!jl.disabled){Gt.splice(Hs,1),Cn=jl;break}}Cn&&ur(Gt,{type:"remove",values:[Cn]})}for(var Qo=arguments.length,Pa=new Array(Qo>1?Qo-1:0),Fs=1;Fs<Qo;Fs++)Pa[Fs-1]=arguments[Fs];if(Ao&&(!da||!ja.current)){var ol;da&&(ja.current=!0),(ol=Ki.current)===null||ol===void 0||ol.onKeyDown.apply(ol,[Ji].concat(Pa))}In==null||In.apply(void 0,[Ji].concat(Pa))},fs=function(Ji){for(var sa=arguments.length,wr=new Array(sa>1?sa-1:0),da=1;da<sa;da++)wr[da-1]=arguments[da];if(Ao){var Gt;(Gt=Ki.current)===null||Gt===void 0||Gt.onKeyUp.apply(Gt,[Ji].concat(wr))}Ji.key==="Enter"&&(ja.current=!1),Tn==null||Tn.apply(void 0,[Ji].concat(wr))},ds=function(Ji){var sa=Xn.filter(function(wr){return wr!==Ji});ur(sa,{type:"remove",values:[Ji]})},bs=function(){ja.current=!1},na=Se.useRef(!1),eh=function(){Dr(!0),qr||(Fn&&!na.current&&Fn.apply(void 0,arguments),un.includes("focus")&&jr(!0)),na.current=!0},ju=function(){Jt.current=!0,Dr(!1,function(){na.current=!1,Jt.current=!1,jr(!1)}),!qr&&(_i&&(Ir==="tags"?pn(_i,{source:"submit"}):Ir==="multiple"&&pn("",{source:"blur"})),zn&&zn.apply(void 0,arguments))},il=[];Se.useEffect(function(){return function(){il.forEach(function(io){return clearTimeout(io)}),il.splice(0,il.length)}},[]);var Sl=function(Ji){var sa,wr=Ji.target,da=(sa=yi.current)===null||sa===void 0?void 0:sa.getPopupElement();if(da&&da.contains(wr)){var Gt=setTimeout(function(){var Qo=il.indexOf(Gt);if(Qo!==-1&&il.splice(Qo,1),wi(),!Tr&&!da.contains(document.activeElement)){var Pa;(Pa=Ri.current)===null||Pa===void 0||Pa.focus()}});il.push(Gt)}for(var Cn=arguments.length,Hs=new Array(Cn>1?Cn-1:0),jl=1;jl<Cn;jl++)Hs[jl-1]=arguments[jl];Nn==null||Nn.apply(void 0,[Ji].concat(Hs))},Os=Se.useState({}),Vl=(0,De.Z)(Os,2),th=Vl[1];function nh(){th({})}var Zo;ni&&(Zo=function(Ji){jr(Ji)}),je(function(){var io;return[pi.current,(io=yi.current)===null||io===void 0?void 0:io.getPopupElement()]},er,jr,!!ni);var Ou=Se.useMemo(function(){return(0,ze.Z)((0,ze.Z)({},Ot),{},{notFoundContent:dn,open:Ao,triggerOpen:er,id:Ln,showSearch:ln,multiple:Wn,toggleOpen:jr})},[Ot,dn,er,Ao,Ln,ln,Wn,jr]),rh=!!ei||ki,Zl;rh&&(Zl=Se.createElement(ae,{className:ve()("".concat(en,"-arrow"),(0,oe.Z)({},"".concat(en,"-arrow-loading"),ki)),customizeIcon:ei,customizeIconProps:{loading:ki,searchValue:_i,open:Ao,focused:Hr,showSearch:ln}}));var uu=function(){var Ji;$n==null||$n(),(Ji=Ri.current)===null||Ji===void 0||Ji.focus(),ur([],{type:"clear",values:Xn}),Or("",!1,!1)},Ca=ie(en,uu,Xn,xr,Wi,qr,_i,Ir),Oa=Ca.allowClear,aa=Ca.clearIcon,ga=Se.createElement(ci,{ref:Ki}),Xl=ve()(en,Un,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(en,"-focused"),Hr),"".concat(en,"-multiple"),Wn),"".concat(en,"-single"),!Wn),"".concat(en,"-allow-clear"),xr),"".concat(en,"-show-arrow"),rh),"".concat(en,"-disabled"),qr),"".concat(en,"-loading"),ki),"".concat(en,"-open"),Ao),"".concat(en,"-customize-input"),Fi),"".concat(en,"-show-search"),ln)),Ga=Se.createElement(Re,{ref:yi,disabled:qr,prefixCls:en,visible:er,popupElement:ga,animation:Vr,transitionName:Hi,dropdownStyle:qt,dropdownClassName:wn,direction:nr,dropdownMatchSelectWidth:Yt,dropdownRender:lt,dropdownAlign:On,placement:Sn,builtinPlacements:Kn,getPopupContainer:Qn,empty:zr,getTriggerDOMNode:function(Ji){return bi.current||Ji},onPopupVisibleChange:Zo,onPopupMouseEnter:nh},ni?Se.cloneElement(ni,{ref:$i}):Se.createElement(tt,(0,ct.Z)({},Ot,{domRef:bi,prefixCls:en,inputElement:Fi,ref:Ri,id:Ln,prefix:hi,showSearch:ln,autoClearSearchValue:Pi,mode:Ir,activeDescendantId:Qr,tagRender:An,values:Xn,open:Ao,onToggleOpen:jr,activeValue:Rr,searchValue:_i,onSearch:Or,onSearchSubmit:Aa,onRemove:ds,tokenWithEnter:$r,onInputBlur:bs}))),co;return ni?co=Ga:co=Se.createElement("div",(0,ct.Z)({className:Xl},br,{ref:pi,onMouseDown:Sl,onKeyDown:vo,onKeyUp:fs,onFocus:eh,onBlur:ju}),Se.createElement(Xt,{visible:Hr&&!Ao,values:Xn}),Ga,Zl,Oa&&aa),Se.createElement(le.Provider,{value:Ou},co)}),Wt=nn,bn=function(){return null};bn.isSelectOptGroup=!0;var mn=bn,jn=function(){return null};jn.isSelectOption=!0;var Jn=jn,Cr=at(80547),cr=at(2738),kr=at(65283);function Kr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Ur=["disabled","title","children","style","className"];function oi(Ot){return typeof Ot=="string"||typeof Ot=="number"}var vi=function(Kt,Dn){var Ln=ue(),en=Ln.prefixCls,Un=Ln.id,Bn=Ln.open,An=Ln.multiple,nr=Ln.mode,_n=Ln.searchValue,Xn=Ln.toggleOpen,ur=Ln.notFoundContent,zr=Ln.onPopupScroll,dr=Se.useContext(Ht),dn=dr.maxCount,$n=dr.flattenOptions,Ir=dr.onActiveValue,qr=dr.defaultActiveFirstOption,ki=dr.onSelect,Qt=dr.menuItemSelectedIcon,or=dr.rawValues,yr=dr.fieldNames,Hn=dr.virtual,Yr=dr.direction,Rr=dr.listHeight,Zr=dr.listItemHeight,Qr=dr.optionRender,ui="".concat(en,"-item"),Pi=(0,Cr.Z)(function(){return $n},[Bn,$n],function(Vn,un){return un[0]&&Vn[1]!==un[1]}),pn=Se.useRef(null),Oi=Se.useMemo(function(){return An&&Qe(dn)&&(or==null?void 0:or.size)>=dn},[An,dn,or==null?void 0:or.size]),yn=function(un){un.preventDefault()},xr=function(un){var Fn;(Fn=pn.current)===null||Fn===void 0||Fn.scrollTo(typeof un=="number"?{index:un}:un)},hi=Se.useCallback(function(Vn){return nr==="combobox"?!1:or.has(Vn)},[nr,(0,Bt.Z)(or).toString(),or.size]),ei=function(un){for(var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,zn=Pi.length,Tn=0;Tn<zn;Tn+=1){var In=(un+Tn*Fn+zn)%zn,Nn=Pi[In]||{},Zn=Nn.group,Wn=Nn.data;if(!Zn&&!(Wn!=null&&Wn.disabled)&&(hi(Wn.value)||!Oi))return In}return-1},Wi=Se.useState(function(){return ei(0)}),ci=(0,De.Z)(Wi,2),Vr=ci[0],Hi=ci[1],qt=function(un){var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Hi(un);var zn={source:Fn?"keyboard":"mouse"},Tn=Pi[un];if(!Tn){Ir(null,-1,zn);return}Ir(Tn.value,un,zn)};(0,Se.useEffect)(function(){qt(qr!==!1?ei(0):-1)},[Pi.length,_n]);var wn=Se.useCallback(function(Vn){return nr==="combobox"?String(Vn).toLowerCase()===_n.toLowerCase():or.has(Vn)},[nr,_n,(0,Bt.Z)(or).toString(),or.size]);(0,Se.useEffect)(function(){var Vn=setTimeout(function(){if(!An&&Bn&&or.size===1){var Fn=Array.from(or)[0],zn=Pi.findIndex(function(Tn){var In=Tn.data;return _n?String(In.value).startsWith(_n):In.value===Fn});zn!==-1&&(qt(zn),xr(zn))}});if(Bn){var un;(un=pn.current)===null||un===void 0||un.scrollTo(void 0)}return function(){return clearTimeout(Vn)}},[Bn,_n]);var Yt=function(un){un!==void 0&&ki(un,{selected:!or.has(un)}),An||Xn(!1)};if(Se.useImperativeHandle(Dn,function(){return{onKeyDown:function(un){var Fn=un.which,zn=un.ctrlKey;switch(Fn){case Be.Z.N:case Be.Z.P:case Be.Z.UP:case Be.Z.DOWN:{var Tn=0;if(Fn===Be.Z.UP?Tn=-1:Fn===Be.Z.DOWN?Tn=1:Kr()&&zn&&(Fn===Be.Z.N?Tn=1:Fn===Be.Z.P&&(Tn=-1)),Tn!==0){var In=ei(Vr+Tn,Tn);xr(In),qt(In,!0)}break}case Be.Z.TAB:case Be.Z.ENTER:{var Nn,Zn=Pi[Vr];Zn&&!(Zn!=null&&(Nn=Zn.data)!==null&&Nn!==void 0&&Nn.disabled)&&!Oi?Yt(Zn.value):Yt(void 0),Bn&&un.preventDefault();break}case Be.Z.ESC:Xn(!1),Bn&&un.stopPropagation()}},onKeyUp:function(){},scrollTo:function(un){xr(un)}}}),Pi.length===0)return Se.createElement("div",{role:"listbox",id:"".concat(Un,"_list"),className:"".concat(ui,"-empty"),onMouseDown:yn},ur);var lt=Object.keys(yr).map(function(Vn){return yr[Vn]}),On=function(un){return un.label};function Sn(Vn,un){var Fn=Vn.group;return{role:Fn?"presentation":"option",id:"".concat(Un,"_list_").concat(un)}}var Kn=function(un){var Fn=Pi[un];if(!Fn)return null;var zn=Fn.data||{},Tn=zn.value,In=Fn.group,Nn=(0,Ne.Z)(zn,!0),Zn=On(Fn);return Fn?Se.createElement("div",(0,ct.Z)({"aria-label":typeof Zn=="string"&&!In?Zn:null},Nn,{key:un},Sn(Fn,un),{"aria-selected":wn(Tn)}),Tn):null},Qn={role:"listbox",id:"".concat(Un,"_list")};return Se.createElement(Se.Fragment,null,Hn&&Se.createElement("div",(0,ct.Z)({},Qn,{style:{height:0,width:0,overflow:"hidden"}}),Kn(Vr-1),Kn(Vr),Kn(Vr+1)),Se.createElement(kr.Z,{itemKey:"key",ref:pn,data:Pi,height:Rr,itemHeight:Zr,fullHeight:!1,onMouseDown:yn,onScroll:zr,virtual:Hn,direction:Yr,innerProps:Hn?null:Qn},function(Vn,un){var Fn=Vn.group,zn=Vn.groupOption,Tn=Vn.data,In=Vn.label,Nn=Vn.value,Zn=Tn.key;if(Fn){var Wn,ln=(Wn=Tn.title)!==null&&Wn!==void 0?Wn:oi(In)?In.toString():void 0;return Se.createElement("div",{className:ve()(ui,"".concat(ui,"-group"),Tn.className),title:ln},In!==void 0?In:Zn)}var br=Tn.disabled,Er=Tn.title,ai=Tn.children,Tr=Tn.style,Si=Tn.className,pi=(0,fe.Z)(Tn,Ur),bi=(0,cr.Z)(pi,lt),yi=hi(Nn),Ri=br||!yi&&Oi,Ki="".concat(ui,"-option"),Jt=ve()(ui,Ki,Si,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(Ki,"-grouped"),zn),"".concat(Ki,"-active"),Vr===un&&!Ri),"".concat(Ki,"-disabled"),Ri),"".concat(Ki,"-selected"),yi)),xi=On(Vn),ti=!Qt||typeof Qt=="function"||yi,Hr=typeof xi=="number"?xi:xi||Nn,Dr=oi(Hr)?Hr.toString():void 0;return Er!==void 0&&(Dr=Er),Se.createElement("div",(0,ct.Z)({},(0,Ne.Z)(bi),Hn?{}:Sn(Vn,un),{"aria-selected":wn(Nn),className:Jt,title:Dr,onMouseMove:function(){Vr===un||Ri||qt(un)},onClick:function(){Ri||Yt(Nn)},style:Tr}),Se.createElement("div",{className:"".concat(Ki,"-content")},typeof Qr=="function"?Qr(Vn,{index:un}):Hr),Se.isValidElement(Qt)||yi,ti&&Se.createElement(ae,{className:"".concat(ui,"-option-state"),customizeIcon:Qt,customizeIconProps:{value:Nn,disabled:Ri,isSelected:yi}},yi?"\u2713":null))}))},Bi=Se.forwardRef(vi),Di=Bi,Ii=function(Ot,Kt){var Dn=Se.useRef({values:new Map,options:new Map}),Ln=Se.useMemo(function(){var Un=Dn.current,Bn=Un.values,An=Un.options,nr=Ot.map(function(ur){if(ur.label===void 0){var zr;return(0,ze.Z)((0,ze.Z)({},ur),{},{label:(zr=Bn.get(ur.value))===null||zr===void 0?void 0:zr.label})}return ur}),_n=new Map,Xn=new Map;return nr.forEach(function(ur){_n.set(ur.value,ur),Xn.set(ur.value,Kt.get(ur.value)||An.get(ur.value))}),Dn.current.values=_n,Dn.current.options=Xn,nr},[Ot,Kt]),en=Se.useCallback(function(Un){return Kt.get(Un)||Dn.current.options.get(Un)},[Kt]);return[Ln,en]};function Xi(Ot,Kt){return st(Ot).join("").toUpperCase().includes(Kt)}var et=function(Ot,Kt,Dn,Ln,en){return Se.useMemo(function(){if(!Dn||Ln===!1)return Ot;var Un=Kt.options,Bn=Kt.label,An=Kt.value,nr=[],_n=typeof Ln=="function",Xn=Dn.toUpperCase(),ur=_n?Ln:function(dr,dn){return en?Xi(dn[en],Xn):dn[Un]?Xi(dn[Bn!=="children"?Bn:"label"],Xn):Xi(dn[An],Xn)},zr=_n?function(dr){return Mt(dr)}:function(dr){return dr};return Ot.forEach(function(dr){if(dr[Un]){var dn=ur(Dn,zr(dr));if(dn)nr.push(dr);else{var $n=dr[Un].filter(function(Ir){return ur(Dn,zr(Ir))});$n.length&&nr.push((0,ze.Z)((0,ze.Z)({},dr),{},(0,oe.Z)({},Un,$n)))}return}ur(Dn,zr(dr))&&nr.push(dr)}),nr},[Ot,Ln,en,Dn,Kt])},fr=at(6551),mr=at(11592),Ai=["children","value"],ar=["children"];function Sr(Ot){var Kt=Ot,Dn=Kt.key,Ln=Kt.props,en=Ln.children,Un=Ln.value,Bn=(0,fe.Z)(Ln,Ai);return(0,ze.Z)({key:Dn,value:Un!==void 0?Un:Dn,children:en},Bn)}function Ar(Ot){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,mr.Z)(Ot).map(function(Dn,Ln){if(!Se.isValidElement(Dn)||!Dn.type)return null;var en=Dn,Un=en.type.isSelectOptGroup,Bn=en.key,An=en.props,nr=An.children,_n=(0,fe.Z)(An,ar);return Kt||!Un?Sr(Dn):(0,ze.Z)((0,ze.Z)({key:"__RC_SELECT_GRP__".concat(Bn===null?Ln:Bn,"__"),label:Bn},_n),{},{options:Ar(nr)})}).filter(function(Dn){return Dn})}var lo=function(Kt,Dn,Ln,en,Un){return Se.useMemo(function(){var Bn=Kt,An=!Kt;An&&(Bn=Ar(Dn));var nr=new Map,_n=new Map,Xn=function(dr,dn,$n){$n&&typeof $n=="string"&&dr.set(dn[$n],dn)},ur=function zr(dr){for(var dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$n=0;$n<dr.length;$n+=1){var Ir=dr[$n];!Ir[Ln.options]||dn?(nr.set(Ir[Ln.value],Ir),Xn(_n,Ir,Ln.label),Xn(_n,Ir,en),Xn(_n,Ir,Un)):zr(Ir[Ln.options],!0)}};return ur(Bn),{options:Bn,valueOptions:nr,labelOptions:_n}},[Kt,Dn,Ln,en,Un])},on=lo;function an(Ot){var Kt=Se.useRef();Kt.current=Ot;var Dn=Se.useCallback(function(){return Kt.current.apply(Kt,arguments)},[]);return Dn}function tn(Ot){var Kt=Ot.mode,Dn=Ot.options,Ln=Ot.children,en=Ot.backfill,Un=Ot.allowClear,Bn=Ot.placeholder,An=Ot.getInputElement,nr=Ot.showSearch,_n=Ot.onSearch,Xn=Ot.defaultOpen,ur=Ot.autoFocus,zr=Ot.labelInValue,dr=Ot.value,dn=Ot.inputValue,$n=Ot.optionLabelProp,Ir=isMultiple(Kt),qr=nr!==void 0?nr:Ir||Kt==="combobox",ki=Dn||convertChildrenToData(Ln);if(warning(Kt!=="tags"||ki.every(function(Hn){return!Hn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Kt==="tags"||Kt==="combobox"){var Qt=ki.some(function(Hn){return Hn.options?Hn.options.some(function(Yr){return typeof("value"in Yr?Yr.value:Yr.key)=="number"}):typeof("value"in Hn?Hn.value:Hn.key)=="number"});warning(!Qt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Kt!=="combobox"||!$n,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Kt==="combobox"||!en,"`backfill` only works with `combobox` mode."),warning(Kt==="combobox"||!An,"`getInputElement` only work with `combobox` mode."),noteOnce(Kt!=="combobox"||!An||!Un||!Bn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_n&&!qr&&Kt!=="combobox"&&Kt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Xn||ur,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),dr!=null){var or=toArray(dr);warning(!zr||or.every(function(Hn){return _typeof(Hn)==="object"&&("key"in Hn||"value"in Hn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ir||Array.isArray(dr),"`value` should be array when `mode` is `multiple` or `tags`")}if(Ln){var yr=null;toNodeArray(Ln).some(function(Hn){if(!React.isValidElement(Hn)||!Hn.type)return!1;var Yr=Hn,Rr=Yr.type;if(Rr.isSelectOption)return!1;if(Rr.isSelectOptGroup){var Zr=toNodeArray(Hn.props.children).every(function(Qr){return!React.isValidElement(Qr)||!Hn.type||Qr.type.isSelectOption?!0:(yr=Qr.type,!1)});return!Zr}return yr=Rr,!0}),yr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(yr.displayName||yr.name||yr,"`.")),warning(dn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function vn(Ot,Kt){if(Ot){var Dn=function Ln(en){for(var Un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Bn=0;Bn<en.length;Bn++){var An=en[Bn];if(An[Kt==null?void 0:Kt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Un&&Array.isArray(An[Kt==null?void 0:Kt.options])&&Ln(An[Kt==null?void 0:Kt.options],!0))break}};Dn(Ot)}}var gr=null,pr=["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"],ii=["inputValue"];function Mn(Ot){return!Ot||(0,me.Z)(Ot)!=="object"}var sr=Se.forwardRef(function(Ot,Kt){var Dn=Ot.id,Ln=Ot.mode,en=Ot.prefixCls,Un=en===void 0?"rc-select":en,Bn=Ot.backfill,An=Ot.fieldNames,nr=Ot.inputValue,_n=Ot.searchValue,Xn=Ot.onSearch,ur=Ot.autoClearSearchValue,zr=ur===void 0?!0:ur,dr=Ot.onSelect,dn=Ot.onDeselect,$n=Ot.dropdownMatchSelectWidth,Ir=$n===void 0?!0:$n,qr=Ot.filterOption,ki=Ot.filterSort,Qt=Ot.optionFilterProp,or=Ot.optionLabelProp,yr=Ot.options,Hn=Ot.optionRender,Yr=Ot.children,Rr=Ot.defaultActiveFirstOption,Zr=Ot.menuItemSelectedIcon,Qr=Ot.virtual,ui=Ot.direction,Pi=Ot.listHeight,pn=Pi===void 0?200:Pi,Oi=Ot.listItemHeight,yn=Oi===void 0?20:Oi,xr=Ot.labelRender,hi=Ot.value,ei=Ot.defaultValue,Wi=Ot.labelInValue,ci=Ot.onChange,Vr=Ot.maxCount,Hi=(0,fe.Z)(Ot,pr),qt=(0,fr.ZP)(Dn),wn=sn(Ln),Yt=!!(!yr&&Yr),lt=Se.useMemo(function(){return qr===void 0&&Ln==="combobox"?!1:qr},[qr,Ln]),On=Se.useMemo(function(){return ut(An,Yt)},[JSON.stringify(An),Yt]),Sn=(0,ke.Z)("",{value:_n!==void 0?_n:nr,postState:function($r){return $r||""}}),Kn=(0,De.Z)(Sn,2),Qn=Kn[0],Vn=Kn[1],un=on(yr,Yr,On,Qt,or),Fn=un.valueOptions,zn=un.labelOptions,Tn=un.options,In=Se.useCallback(function(jr){var $r=st(jr);return $r.map(function(mi){var Ci,to,Or,Aa,zo;if(Mn(mi))Ci=mi;else{var jo;Or=mi.key,to=mi.label,Ci=(jo=mi.value)!==null&&jo!==void 0?jo:Or}var Ni=Fn.get(Ci);if(Ni){var Vo;if(to===void 0&&(to=Ni==null?void 0:Ni[or||On.label]),Or===void 0&&(Or=(Vo=Ni==null?void 0:Ni.key)!==null&&Vo!==void 0?Vo:Ci),Aa=Ni==null?void 0:Ni.disabled,zo=Ni==null?void 0:Ni.title,0)var ja}return{label:to,value:Ci,key:Or,disabled:Aa,title:zo}})},[On,or,Fn]),Nn=(0,ke.Z)(ei,{value:hi}),Zn=(0,De.Z)(Nn,2),Wn=Zn[0],ln=Zn[1],br=Se.useMemo(function(){var jr,$r=wn&&Wn===null?[]:Wn,mi=In($r);return Ln==="combobox"&&rt((jr=mi[0])===null||jr===void 0?void 0:jr.value)?[]:mi},[Wn,In,Ln,wn]),Er=Ii(br,Fn),ai=(0,De.Z)(Er,2),Tr=ai[0],Si=ai[1],pi=Se.useMemo(function(){if(!Ln&&Tr.length===1){var jr=Tr[0];if(jr.value===null&&(jr.label===null||jr.label===void 0))return[]}return Tr.map(function($r){var mi;return(0,ze.Z)((0,ze.Z)({},$r),{},{label:(mi=typeof xr=="function"?xr($r):$r.label)!==null&&mi!==void 0?mi:$r.value})})},[Ln,Tr,xr]),bi=Se.useMemo(function(){return new Set(Tr.map(function(jr){return jr.value}))},[Tr]);Se.useEffect(function(){if(Ln==="combobox"){var jr,$r=(jr=Tr[0])===null||jr===void 0?void 0:jr.value;Vn($e($r)?String($r):"")}},[Tr]);var yi=an(function(jr,$r){var mi=$r!=null?$r:jr;return(0,oe.Z)((0,oe.Z)({},On.value,jr),On.label,mi)}),Ri=Se.useMemo(function(){if(Ln!=="tags")return Tn;var jr=(0,Bt.Z)(Tn),$r=function(Ci){return Fn.has(Ci)};return(0,Bt.Z)(Tr).sort(function(mi,Ci){return mi.value<Ci.value?-1:1}).forEach(function(mi){var Ci=mi.value;$r(Ci)||jr.push(yi(Ci,mi.label))}),jr},[yi,Tn,Fn,Tr,Ln]),Ki=et(Ri,On,Qn,lt,Qt),Jt=Se.useMemo(function(){return Ln!=="tags"||!Qn||Ki.some(function(jr){return jr[Qt||"value"]===Qn})||Ki.some(function(jr){return jr[On.value]===Qn})?Ki:[yi(Qn)].concat((0,Bt.Z)(Ki))},[yi,Qt,Ln,Ki,Qn,On]),xi=function jr($r){var mi=(0,Bt.Z)($r).sort(function(Ci,to){return ki(Ci,to,{searchValue:Qn})});return mi.map(function(Ci){return Array.isArray(Ci.options)?(0,ze.Z)((0,ze.Z)({},Ci),{},{options:Ci.options.length>0?jr(Ci.options):Ci.options}):Ci})},ti=Se.useMemo(function(){return ki?xi(Jt):Jt},[Jt,ki,Qn]),Hr=Se.useMemo(function(){return gt(ti,{fieldNames:On,childrenAsData:Yt})},[ti,On,Yt]),Dr=function($r){var mi=In($r);if(ln(mi),ci&&(mi.length!==Tr.length||mi.some(function(Or,Aa){var zo;return((zo=Tr[Aa])===null||zo===void 0?void 0:zo.value)!==(Or==null?void 0:Or.value)}))){var Ci=Wi?mi:mi.map(function(Or){return Or.value}),to=mi.map(function(Or){return Mt(Si(Or.value))});ci(wn?Ci:Ci[0],wn?to:to[0])}},wi=Se.useState(null),_i=(0,De.Z)(wi,2),Fi=_i[0],ni=_i[1],$i=Se.useState(0),_o=(0,De.Z)($i,2),fa=_o[0],Ps=_o[1],wa=Rr!==void 0?Rr:Ln!=="combobox",Br=Se.useCallback(function(jr,$r){var mi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ci=mi.source,to=Ci===void 0?"keyboard":Ci;Ps($r),Bn&&Ln==="combobox"&&jr!==null&&to==="keyboard"&&ni(String(jr))},[Bn,Ln]),Po=function($r,mi,Ci){var to=function(){var ds,bs=Si($r);return[Wi?{label:bs==null?void 0:bs[On.label],value:$r,key:(ds=bs==null?void 0:bs.key)!==null&&ds!==void 0?ds:$r}:$r,Mt(bs)]};if(mi&&dr){var Or=to(),Aa=(0,De.Z)(Or,2),zo=Aa[0],jo=Aa[1];dr(zo,jo)}else if(!mi&&dn&&Ci!=="clear"){var Ni=to(),Vo=(0,De.Z)(Ni,2),ja=Vo[0],vo=Vo[1];dn(ja,vo)}},bo=an(function(jr,$r){var mi,Ci=wn?$r.selected:!0;Ci?mi=wn?[].concat((0,Bt.Z)(Tr),[jr]):[jr]:mi=Tr.filter(function(to){return to.value!==jr}),Dr(mi),Po(jr,Ci),Ln==="combobox"?ni(""):(!sn||zr)&&(Vn(""),ni(""))}),ta=function($r,mi){Dr($r);var Ci=mi.type,to=mi.values;(Ci==="remove"||Ci==="clear")&&to.forEach(function(Or){Po(Or.value,!1,Ci)})},Ao=function($r,mi){if(Vn($r),ni(null),mi.source==="submit"){var Ci=($r||"").trim();if(Ci){var to=Array.from(new Set([].concat((0,Bt.Z)(bi),[Ci])));Dr(to),Po(Ci,!0),Vn("")}return}mi.source!=="blur"&&(Ln==="combobox"&&Dr($r),Xn==null||Xn($r))},Ko=function($r){var mi=$r;Ln!=="tags"&&(mi=$r.map(function(to){var Or=zn.get(to);return Or==null?void 0:Or.value}).filter(function(to){return to!==void 0}));var Ci=Array.from(new Set([].concat((0,Bt.Z)(bi),(0,Bt.Z)(mi))));Dr(Ci),Ci.forEach(function(to){Po(to,!0)})},er=Se.useMemo(function(){var jr=Qr!==!1&&Ir!==!1;return(0,ze.Z)((0,ze.Z)({},un),{},{flattenOptions:Hr,onActiveValue:Br,defaultActiveFirstOption:wa,onSelect:bo,menuItemSelectedIcon:Zr,rawValues:bi,fieldNames:On,virtual:jr,direction:ui,listHeight:pn,listItemHeight:yn,childrenAsData:Yt,maxCount:Vr,optionRender:Hn})},[Vr,un,Hr,Br,wa,bo,Zr,bi,On,Qr,Ir,ui,pn,yn,Yt,Hn]);return Se.createElement(Ht.Provider,{value:er},Se.createElement(Wt,(0,ct.Z)({},Hi,{id:qt,prefixCls:Un,ref:Kt,omitDomProps:ii,mode:Ln,displayValues:pi,onDisplayValuesChange:ta,direction:ui,searchValue:Qn,onSearch:Ao,autoClearSearchValue:zr,onSearchSplit:Ko,dropdownMatchSelectWidth:Ir,OptionList:Di,emptyOptions:!Hr.length,activeValue:Fi,activeDescendantId:"".concat(qt,"_list_").concat(fa)})))}),Wr=sr;Wr.Option=Jn,Wr.OptGroup=mn;var Li=Wr,tr=Li},63158:function(gn,cn,at){"use strict";var ct=at(14809),Bt=at(4635),oe=at(50298),ze=at(62646),De=at(59301),fe=at(92310),me=at.n(fe),ke=at(18929),Ce=at(10228),Se=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Me=De.forwardRef(function(ve,we){var de,z=ve.prefixCls,ee=z===void 0?"rc-switch":z,ae=ve.className,ie=ve.checked,le=ve.defaultChecked,ue=ve.disabled,ge=ve.loadingIcon,Pe=ve.checkedChildren,je=ve.unCheckedChildren,Be=ve.onClick,Fe=ve.onChange,Ne=ve.onKeyDown,Ae=(0,ze.Z)(ve,Se),Ie=(0,ke.Z)(!1,{value:ie,defaultValue:le}),We=(0,oe.Z)(Ie,2),Ye=We[0],Ue=We[1];function Ke(Ct,$e){var rt=Ye;return ue||(rt=Ct,Ue(rt),Fe==null||Fe(rt,$e)),rt}function ot(Ct){Ct.which===Ce.Z.LEFT?Ke(!1,Ct):Ct.which===Ce.Z.RIGHT&&Ke(!0,Ct),Ne==null||Ne(Ct)}function st(Ct){var $e=Ke(!Ye,Ct);Be==null||Be($e,Ct)}var dt=me()(ee,ae,(de={},(0,Bt.Z)(de,"".concat(ee,"-checked"),Ye),(0,Bt.Z)(de,"".concat(ee,"-disabled"),ue),de));return De.createElement("button",(0,ct.Z)({},Ae,{type:"button",role:"switch","aria-checked":Ye,disabled:ue,className:dt,ref:we,onKeyDown:ot,onClick:st}),ge,De.createElement("span",{className:"".concat(ee,"-inner")},De.createElement("span",{className:"".concat(ee,"-inner-checked")},Pe),De.createElement("span",{className:"".concat(ee,"-inner-unchecked")},je)))});Me.displayName="Switch",cn.Z=Me},86351:function(gn,cn,at){"use strict";at.d(cn,{R:function(){return Bt},w:function(){return ct}});var ct={},Bt="rc-table-internal-hook"},97347:function(gn,cn,at){"use strict";at.d(cn,{L:function(){return ee},Z:function(){return ge}});var ct=at(50298),Bt=at(4635),oe=at(95190),ze=at(93664),De=at(20439),fe=at(62646),me=at(11592),ke=at(48736),Ce=at(59301),Se=at(86351),Me=at(54451);function ve(Pe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof je=="number"?je:je.endsWith("%")?Pe*parseFloat(je)/100:null}function we(Pe,je,Be){return Ce.useMemo(function(){if(je&&je>0){var Fe=0,Ne=0;Pe.forEach(function(st){var dt=ve(je,st.width);dt?Fe+=dt:Ne+=1});var Ae=Math.max(je,Be),Ie=Math.max(Ae-Fe,Ne),We=Ne,Ye=Ie/Ne,Ue=0,Ke=Pe.map(function(st){var dt=(0,De.Z)({},st),Ct=ve(je,dt.width);if(Ct)dt.width=Ct;else{var $e=Math.floor(Ye);dt.width=We===1?Ie:$e,Ie-=$e,We-=1}return Ue+=dt.width,dt});if(Ue<Ae){var ot=Ae/Ue;Ie=Ae,Ke.forEach(function(st,dt){var Ct=Math.floor(st.width*ot);st.width=dt===Ke.length-1?Ie:Ct,Ie-=Ct})}return[Ke,Math.max(Ue,Ae)]}return[Pe,je]},[Pe,je,Be])}var de=["children"],z=["fixed"];function ee(Pe){return(0,me.Z)(Pe).filter(function(je){return Ce.isValidElement(je)}).map(function(je){var Be=je.key,Fe=je.props,Ne=Fe.children,Ae=(0,fe.Z)(Fe,de),Ie=(0,De.Z)({key:Be},Ae);return Ne&&(Ie.children=ee(Ne)),Ie})}function ae(Pe){return Pe.filter(function(je){return je&&(0,ze.Z)(je)==="object"&&!je.hidden}).map(function(je){var Be=je.children;return Be&&Be.length>0?(0,De.Z)((0,De.Z)({},je),{},{children:ae(Be)}):je})}function ie(Pe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Pe.filter(function(Be){return Be&&(0,ze.Z)(Be)==="object"}).reduce(function(Be,Fe,Ne){var Ae=Fe.fixed,Ie=Ae===!0?"left":Ae,We="".concat(je,"-").concat(Ne),Ye=Fe.children;return Ye&&Ye.length>0?[].concat((0,oe.Z)(Be),(0,oe.Z)(ie(Ye,We).map(function(Ue){return(0,De.Z)({fixed:Ie},Ue)}))):[].concat((0,oe.Z)(Be),[(0,De.Z)((0,De.Z)({key:We},Fe),{},{fixed:Ie})])},[])}function le(Pe){return Pe.map(function(je){var Be=je.fixed,Fe=(0,fe.Z)(je,z),Ne=Be;return Be==="left"?Ne="right":Be==="right"&&(Ne="left"),(0,De.Z)({fixed:Ne},Fe)})}function ue(Pe,je){var Be=Pe.prefixCls,Fe=Pe.columns,Ne=Pe.children,Ae=Pe.expandable,Ie=Pe.expandedKeys,We=Pe.columnTitle,Ye=Pe.getRowKey,Ue=Pe.onTriggerExpand,Ke=Pe.expandIcon,ot=Pe.rowExpandable,st=Pe.expandIconColumnIndex,dt=Pe.direction,Ct=Pe.expandRowByClick,$e=Pe.columnWidth,rt=Pe.fixed,St=Pe.scrollWidth,Pt=Pe.clientWidth,wt=Ce.useMemo(function(){var tt=Fe||ee(Ne)||[];return ae(tt.slice())},[Fe,Ne]),pt=Ce.useMemo(function(){if(Ae){var tt=wt.slice();if(!tt.includes(Se.w)){var Ve=st||0;Ve>=0&&(Ve||rt==="left"||!rt)&&tt.splice(Ve,0,Se.w),rt==="right"&&tt.splice(wt.length,0,Se.w)}var xe=tt.indexOf(Se.w);tt=tt.filter(function(Re,_e){return Re!==Se.w||_e===xe});var Le=wt[xe],Ze;rt?Ze=rt:Ze=Le?Le.fixed:null;var nt=(0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)({},Me.v,{className:"".concat(Be,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",We),"fixed",Ze),"className","".concat(Be,"-row-expand-icon-cell")),"width",$e),"render",function(_e,He,Qe){var ut=Ye(He,Qe),gt=Ie.has(ut),Mt=ot?ot(He):!0,Nt=Ke({prefixCls:Be,expanded:gt,expandable:Mt,record:He,onExpand:Ue});return Ct?Ce.createElement("span",{onClick:function(Ht){return Ht.stopPropagation()}},Nt):Nt});return tt.map(function(Re){return Re===Se.w?nt:Re})}return wt.filter(function(Re){return Re!==Se.w})},[Ae,wt,Ye,Ie,Ke,dt]),ft=Ce.useMemo(function(){var tt=pt;return je&&(tt=je(tt)),tt.length||(tt=[{render:function(){return null}}]),tt},[je,pt,dt]),ht=Ce.useMemo(function(){return dt==="rtl"?le(ie(ft)):ie(ft)},[ft,dt,St]),Et=Ce.useMemo(function(){for(var tt=-1,Ve=ht.length-1;Ve>=0;Ve-=1){var xe=ht[Ve].fixed;if(xe==="left"||xe===!0){tt=Ve;break}}if(tt>=0)for(var Le=0;Le<=tt;Le+=1){var Ze=ht[Le].fixed;if(Ze!=="left"&&Ze!==!0)return!0}var nt=ht.findIndex(function(He){var Qe=He.fixed;return Qe==="right"});if(nt>=0)for(var Re=nt;Re<ht.length;Re+=1){var _e=ht[Re].fixed;if(_e!=="right")return!0}return!1},[ht]),mt=we(ht,St,Pt),yt=(0,ct.Z)(mt,2),At=yt[0],xt=yt[1];return[ft,At,xt,Et]}var ge=ue},4030:function(gn,cn,at){"use strict";at.d(cn,{w2:function(){return ct.w},vP:function(){return oi.v},RQ:function(){return ct.R},ER:function(){return ut},Q$:function(){return qr},TN:function(){return ci}});var ct=at(86351),Bt=at(50298),oe=at(6089),ze=at(34280),De=at(13697),fe=at(59301),me=at(4676);function ke(qt){var wn=fe.createContext(void 0),Yt=function(On){var Sn=On.value,Kn=On.children,Qn=fe.useRef(Sn);Qn.current=Sn;var Vn=fe.useState(function(){return{getValue:function(){return Qn.current},listeners:new Set}}),un=(0,Bt.Z)(Vn,1),Fn=un[0];return(0,ze.Z)(function(){(0,me.unstable_batchedUpdates)(function(){Fn.listeners.forEach(function(zn){zn(Sn)})})},[Sn]),fe.createElement(wn.Provider,{value:Fn},Kn)};return{Context:wn,Provider:Yt,defaultValue:qt}}function Ce(qt,wn){var Yt=(0,oe.Z)(typeof wn=="function"?wn:function(zn){if(wn===void 0)return zn;if(!Array.isArray(wn))return zn[wn];var Tn={};return wn.forEach(function(In){Tn[In]=zn[In]}),Tn}),lt=fe.useContext(qt==null?void 0:qt.Context),On=lt||{},Sn=On.listeners,Kn=On.getValue,Qn=fe.useRef();Qn.current=Yt(lt?Kn():qt==null?void 0:qt.defaultValue);var Vn=fe.useState({}),un=(0,Bt.Z)(Vn,2),Fn=un[1];return(0,ze.Z)(function(){if(!lt)return;function zn(Tn){var In=Yt(Tn);(0,De.Z)(Qn.current,In,!0)||Fn({})}return Sn.add(zn),function(){Sn.delete(zn)}},[lt]),Qn.current}var Se=at(14809),Me=at(8654);function ve(){var qt=fe.createContext(null);function wn(){return fe.useContext(qt)}function Yt(On,Sn){var Kn=(0,Me.Yr)(On),Qn=function(un,Fn){var zn=Kn?{ref:Fn}:{},Tn=fe.useRef(0),In=fe.useRef(un),Nn=wn();return Nn!==null?fe.createElement(On,(0,Se.Z)({},un,zn)):((!Sn||Sn(In.current,un))&&(Tn.current+=1),In.current=un,fe.createElement(qt.Provider,{value:Tn.current},fe.createElement(On,(0,Se.Z)({},un,zn))))};return Kn?fe.forwardRef(Qn):Qn}function lt(On,Sn){var Kn=(0,Me.Yr)(On),Qn=function(un,Fn){var zn=Kn?{ref:Fn}:{};return wn(),fe.createElement(On,(0,Se.Z)({},un,zn))};return Kn?fe.memo(fe.forwardRef(Qn),Sn):fe.memo(Qn,Sn)}return{makeImmutable:Yt,responseImmutable:lt,useImmutableMark:wn}}var we=ve(),de=we.makeImmutable,z=we.responseImmutable,ee=we.useImmutableMark,ae=ve(),ie=ae.makeImmutable,le=ae.responseImmutable,ue=ae.useImmutableMark,ge=ke(),Pe=ge;function je(qt,wn){var Yt=React.useRef(0);Yt.current+=1;var lt=React.useRef(qt),On=[];Object.keys(qt||{}).map(function(Kn){var Qn;(qt==null?void 0:qt[Kn])!==((Qn=lt.current)===null||Qn===void 0?void 0:Qn[Kn])&&On.push(Kn)}),lt.current=qt;var Sn=React.useRef([]);return On.length&&(Sn.current=On),React.useDebugValue(Yt.current),React.useDebugValue(Sn.current.join(", ")),wn&&console.log("".concat(wn,":"),Yt.current,Sn.current),Yt.current}var Be=null,Fe=null,Ne=at(93664),Ae=at(20439),Ie=at(4635),We=at(92310),Ye=at.n(We),Ue=at(80547),Ke=at(97938),ot=at(48736),st=fe.createContext({renderWithProps:!1}),dt=st,Ct="RC_TABLE_KEY";function $e(qt){return qt==null?[]:Array.isArray(qt)?qt:[qt]}function rt(qt){var wn=[],Yt={};return qt.forEach(function(lt){for(var On=lt||{},Sn=On.key,Kn=On.dataIndex,Qn=Sn||$e(Kn).join("-")||Ct;Yt[Qn];)Qn="".concat(Qn,"_next");Yt[Qn]=!0,wn.push(Qn)}),wn}function St(qt){return qt!=null}function Pt(qt){return typeof qt=="number"&&!Number.isNaN(qt)}function wt(qt){return qt&&(0,Ne.Z)(qt)==="object"&&!Array.isArray(qt)&&!fe.isValidElement(qt)}function pt(qt,wn,Yt,lt,On,Sn){var Kn=fe.useContext(dt),Qn=ue(),Vn=(0,Ue.Z)(function(){if(St(lt))return[lt];var un=wn==null||wn===""?[]:Array.isArray(wn)?wn:[wn],Fn=(0,Ke.Z)(qt,un),zn=Fn,Tn=void 0;if(On){var In=On(Fn,qt,Yt);wt(In)?(zn=In.children,Tn=In.props,Kn.renderWithProps=!0):zn=In}return[zn,Tn]},[Qn,qt,lt,wn,On,Yt],function(un,Fn){if(Sn){var zn=(0,Bt.Z)(un,2),Tn=zn[1],In=(0,Bt.Z)(Fn,2),Nn=In[1];return Sn(Nn,Tn)}return Kn.renderWithProps?!0:!(0,De.Z)(un,Fn,!0)});return Vn}function ft(qt,wn,Yt,lt){var On=qt+wn-1;return qt<=lt&&On>=Yt}function ht(qt,wn){return Ce(Pe,function(Yt){var lt=ft(qt,wn||1,Yt.hoverStartRow,Yt.hoverEndRow);return[lt,Yt.onHover]})}var Et=at(70425),mt=function(wn){var Yt=wn.ellipsis,lt=wn.rowType,On=wn.children,Sn,Kn=Yt===!0?{showTitle:!0}:Yt;return Kn&&(Kn.showTitle||lt==="header")&&(typeof On=="string"||typeof On=="number"?Sn=On.toString():fe.isValidElement(On)&&typeof On.props.children=="string"&&(Sn=On.props.children)),Sn};function yt(qt){var wn,Yt,lt,On,Sn,Kn,Qn,Vn,un=qt.component,Fn=qt.children,zn=qt.ellipsis,Tn=qt.scope,In=qt.prefixCls,Nn=qt.className,Zn=qt.align,Wn=qt.record,ln=qt.render,br=qt.dataIndex,Er=qt.renderIndex,ai=qt.shouldCellUpdate,Tr=qt.index,Si=qt.rowType,pi=qt.colSpan,bi=qt.rowSpan,yi=qt.fixLeft,Ri=qt.fixRight,Ki=qt.firstFixLeft,Jt=qt.lastFixLeft,xi=qt.firstFixRight,ti=qt.lastFixRight,Hr=qt.appendNode,Dr=qt.additionalProps,wi=Dr===void 0?{}:Dr,_i=qt.isSticky,Fi="".concat(In,"-cell"),ni=Ce(Pe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),$i=ni.supportSticky,_o=ni.allColumnsFixedLeft,fa=ni.rowHoverable,Ps=pt(Wn,br,Er,Fn,ln,ai),wa=(0,Bt.Z)(Ps,2),Br=wa[0],Po=wa[1],bo={},ta=typeof yi=="number"&&$i,Ao=typeof Ri=="number"&&$i;ta&&(bo.position="sticky",bo.left=yi),Ao&&(bo.position="sticky",bo.right=Ri);var Ko=(wn=(Yt=(lt=Po==null?void 0:Po.colSpan)!==null&&lt!==void 0?lt:wi.colSpan)!==null&&Yt!==void 0?Yt:pi)!==null&&wn!==void 0?wn:1,er=(On=(Sn=(Kn=Po==null?void 0:Po.rowSpan)!==null&&Kn!==void 0?Kn:wi.rowSpan)!==null&&Sn!==void 0?Sn:bi)!==null&&On!==void 0?On:1,jr=ht(Tr,er),$r=(0,Bt.Z)(jr,2),mi=$r[0],Ci=$r[1],to=(0,Et.zX)(function(ja){var vo;Wn&&Ci(Tr,Tr+er-1),wi==null||(vo=wi.onMouseEnter)===null||vo===void 0||vo.call(wi,ja)}),Or=(0,Et.zX)(function(ja){var vo;Wn&&Ci(-1,-1),wi==null||(vo=wi.onMouseLeave)===null||vo===void 0||vo.call(wi,ja)});if(Ko===0||er===0)return null;var Aa=(Qn=wi.title)!==null&&Qn!==void 0?Qn:mt({rowType:Si,ellipsis:zn,children:Br}),zo=Ye()(Fi,Nn,(Vn={},(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)(Vn,"".concat(Fi,"-fix-left"),ta&&$i),"".concat(Fi,"-fix-left-first"),Ki&&$i),"".concat(Fi,"-fix-left-last"),Jt&&$i),"".concat(Fi,"-fix-left-all"),Jt&&_o&&$i),"".concat(Fi,"-fix-right"),Ao&&$i),"".concat(Fi,"-fix-right-first"),xi&&$i),"".concat(Fi,"-fix-right-last"),ti&&$i),"".concat(Fi,"-ellipsis"),zn),"".concat(Fi,"-with-append"),Hr),"".concat(Fi,"-fix-sticky"),(ta||Ao)&&_i&&$i),(0,Ie.Z)(Vn,"".concat(Fi,"-row-hover"),!Po&&mi)),wi.className,Po==null?void 0:Po.className),jo={};Zn&&(jo.textAlign=Zn);var Ni=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},Po==null?void 0:Po.style),bo),jo),wi.style),Vo=Br;return(0,Ne.Z)(Vo)==="object"&&!Array.isArray(Vo)&&!fe.isValidElement(Vo)&&(Vo=null),zn&&(Jt||xi)&&(Vo=fe.createElement("span",{className:"".concat(Fi,"-content")},Vo)),fe.createElement(un,(0,Se.Z)({},Po,wi,{className:zo,style:Ni,title:Aa,scope:Tn,onMouseEnter:fa?to:void 0,onMouseLeave:fa?Or:void 0,colSpan:Ko!==1?Ko:null,rowSpan:er!==1?er:null}),Hr,Vo)}var At=fe.memo(yt);function xt(qt,wn,Yt,lt,On){var Sn=Yt[qt]||{},Kn=Yt[wn]||{},Qn,Vn;Sn.fixed==="left"?Qn=lt.left[On==="rtl"?wn:qt]:Kn.fixed==="right"&&(Vn=lt.right[On==="rtl"?qt:wn]);var un=!1,Fn=!1,zn=!1,Tn=!1,In=Yt[wn+1],Nn=Yt[qt-1],Zn=In&&!In.fixed||Nn&&!Nn.fixed||Yt.every(function(ai){return ai.fixed==="left"});if(On==="rtl"){if(Qn!==void 0){var Wn=Nn&&Nn.fixed==="left";Tn=!Wn&&Zn}else if(Vn!==void 0){var ln=In&&In.fixed==="right";zn=!ln&&Zn}}else if(Qn!==void 0){var br=In&&In.fixed==="left";un=!br&&Zn}else if(Vn!==void 0){var Er=Nn&&Nn.fixed==="right";Fn=!Er&&Zn}return{fixLeft:Qn,fixRight:Vn,lastFixLeft:un,firstFixRight:Fn,lastFixRight:zn,firstFixLeft:Tn,isSticky:lt.isSticky}}var tt=fe.createContext({}),Ve=tt;function xe(qt){var wn=qt.className,Yt=qt.index,lt=qt.children,On=qt.colSpan,Sn=On===void 0?1:On,Kn=qt.rowSpan,Qn=qt.align,Vn=Ce(Pe,["prefixCls","direction"]),un=Vn.prefixCls,Fn=Vn.direction,zn=fe.useContext(Ve),Tn=zn.scrollColumnIndex,In=zn.stickyOffsets,Nn=zn.flattenColumns,Zn=Yt+Sn-1,Wn=Zn+1===Tn?Sn+1:Sn,ln=xt(Yt,Yt+Wn-1,Nn,In,Fn);return fe.createElement(At,(0,Se.Z)({className:wn,index:Yt,component:"td",prefixCls:un,record:null,dataIndex:null,align:Qn,colSpan:Wn,rowSpan:Kn,render:function(){return lt}},ln))}var Le=at(62646),Ze=["children"];function nt(qt){var wn=qt.children,Yt=(0,Le.Z)(qt,Ze);return fe.createElement("tr",Yt,wn)}function Re(qt){var wn=qt.children;return wn}Re.Row=nt,Re.Cell=xe;var _e=Re;function He(qt){var wn=qt.children,Yt=qt.stickyOffsets,lt=qt.flattenColumns,On=Ce(Pe,"prefixCls"),Sn=lt.length-1,Kn=lt[Sn],Qn=fe.useMemo(function(){return{stickyOffsets:Yt,flattenColumns:lt,scrollColumnIndex:Kn!=null&&Kn.scrollbar?Sn:null}},[Kn,lt,Sn,Yt]);return fe.createElement(Ve.Provider,{value:Qn},fe.createElement("tfoot",{className:"".concat(On,"-summary")},wn))}var Qe=le(He),ut=_e,gt=at(29301),Mt=at(24514),Nt=at(75152),Dt=at(26112);function Ht(qt,wn,Yt,lt,On,Sn,Kn){qt.push({record:wn,indent:Yt,index:Kn});var Qn=Sn(wn),Vn=On==null?void 0:On.has(Qn);if(wn&&Array.isArray(wn[lt])&&Vn)for(var un=0;un<wn[lt].length;un+=1)Ht(qt,wn[lt][un],Yt+1,lt,On,Sn,un)}function Xt(qt,wn,Yt,lt){var On=fe.useMemo(function(){if(Yt!=null&&Yt.size){for(var Sn=[],Kn=0;Kn<(qt==null?void 0:qt.length);Kn+=1){var Qn=qt[Kn];Ht(Sn,Qn,0,wn,Yt,lt,Kn)}return Sn}return qt==null?void 0:qt.map(function(Vn,un){return{record:Vn,indent:0,index:un}})},[qt,wn,Yt,lt]);return On}function $t(qt,wn,Yt,lt){var On=Ce(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Sn=On.flattenColumns,Kn=On.expandableType,Qn=On.expandedKeys,Vn=On.childrenColumnName,un=On.onTriggerExpand,Fn=On.rowExpandable,zn=On.onRow,Tn=On.expandRowByClick,In=On.rowClassName,Nn=Kn==="nest",Zn=Kn==="row"&&(!Fn||Fn(qt)),Wn=Zn||Nn,ln=Qn&&Qn.has(wn),br=Vn&&qt&&qt[Vn],Er=(0,Et.zX)(un),ai=zn==null?void 0:zn(qt,Yt),Tr=ai==null?void 0:ai.onClick,Si=function(Ri){Tn&&Wn&&un(qt,Ri);for(var Ki=arguments.length,Jt=new Array(Ki>1?Ki-1:0),xi=1;xi<Ki;xi++)Jt[xi-1]=arguments[xi];Tr==null||Tr.apply(void 0,[Ri].concat(Jt))},pi;typeof In=="string"?pi=In:typeof In=="function"&&(pi=In(qt,Yt,lt));var bi=rt(Sn);return(0,Ae.Z)((0,Ae.Z)({},On),{},{columnsKey:bi,nestExpandable:Nn,expanded:ln,hasNestChildren:br,record:qt,onTriggerExpand:Er,rowSupportExpand:Zn,expandable:Wn,rowProps:(0,Ae.Z)((0,Ae.Z)({},ai),{},{className:Ye()(pi,ai==null?void 0:ai.className),onClick:Si})})}function Ut(qt){var wn=qt.prefixCls,Yt=qt.children,lt=qt.component,On=qt.cellComponent,Sn=qt.className,Kn=qt.expanded,Qn=qt.colSpan,Vn=qt.isEmpty,un=Ce(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Fn=un.scrollbarSize,zn=un.fixHeader,Tn=un.fixColumn,In=un.componentWidth,Nn=un.horizonScroll,Zn=Yt;return(Vn?Nn&&In:Tn)&&(Zn=fe.createElement("div",{style:{width:In-(zn&&!Vn?Fn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(wn,"-expanded-row-fixed")},Zn)),fe.createElement(lt,{className:Sn,style:{display:Kn?null:"none"}},fe.createElement(At,{component:On,prefixCls:wn,colSpan:Qn},Zn))}var sn=Ut;function nn(qt){var wn=qt.prefixCls,Yt=qt.record,lt=qt.onExpand,On=qt.expanded,Sn=qt.expandable,Kn="".concat(wn,"-row-expand-icon");if(!Sn)return fe.createElement("span",{className:Ye()(Kn,"".concat(wn,"-row-spaced"))});var Qn=function(un){lt(Yt,un),un.stopPropagation()};return fe.createElement("span",{className:Ye()(Kn,(0,Ie.Z)((0,Ie.Z)({},"".concat(wn,"-row-expanded"),On),"".concat(wn,"-row-collapsed"),!On)),onClick:Qn})}function Wt(qt,wn,Yt){var lt=[];function On(Sn){(Sn||[]).forEach(function(Kn,Qn){lt.push(wn(Kn,Qn)),On(Kn[Yt])})}return On(qt),lt}function bn(qt,wn,Yt,lt){return typeof qt=="string"?qt:typeof qt=="function"?qt(wn,Yt,lt):""}function mn(qt,wn,Yt,lt,On){var Sn=qt.record,Kn=qt.prefixCls,Qn=qt.columnsKey,Vn=qt.fixedInfoList,un=qt.expandIconColumnIndex,Fn=qt.nestExpandable,zn=qt.indentSize,Tn=qt.expandIcon,In=qt.expanded,Nn=qt.hasNestChildren,Zn=qt.onTriggerExpand,Wn=Qn[Yt],ln=Vn[Yt],br;Yt===(un||0)&&Fn&&(br=fe.createElement(fe.Fragment,null,fe.createElement("span",{style:{paddingLeft:"".concat(zn*lt,"px")},className:"".concat(Kn,"-row-indent indent-level-").concat(lt)}),Tn({prefixCls:Kn,expanded:In,expandable:Nn,record:Sn,onExpand:Zn})));var Er;return wn.onCell&&(Er=wn.onCell(Sn,On)),{key:Wn,fixedInfo:ln,appendCellNode:br,additionalCellProps:Er||{}}}function jn(qt){var wn=qt.className,Yt=qt.style,lt=qt.record,On=qt.index,Sn=qt.renderIndex,Kn=qt.rowKey,Qn=qt.indent,Vn=Qn===void 0?0:Qn,un=qt.rowComponent,Fn=qt.cellComponent,zn=qt.scopeCellComponent,Tn=$t(lt,Kn,On,Vn),In=Tn.prefixCls,Nn=Tn.flattenColumns,Zn=Tn.expandedRowClassName,Wn=Tn.expandedRowRender,ln=Tn.rowProps,br=Tn.expanded,Er=Tn.rowSupportExpand,ai=fe.useRef(!1);ai.current||(ai.current=br);var Tr=bn(Zn,lt,On,Vn),Si=fe.createElement(un,(0,Se.Z)({},ln,{"data-row-key":Kn,className:Ye()(wn,"".concat(In,"-row"),"".concat(In,"-row-level-").concat(Vn),ln==null?void 0:ln.className,(0,Ie.Z)({},Tr,Vn>=1)),style:(0,Ae.Z)((0,Ae.Z)({},Yt),ln==null?void 0:ln.style)}),Nn.map(function(yi,Ri){var Ki=yi.render,Jt=yi.dataIndex,xi=yi.className,ti=mn(Tn,yi,Ri,Vn,On),Hr=ti.key,Dr=ti.fixedInfo,wi=ti.appendCellNode,_i=ti.additionalCellProps;return fe.createElement(At,(0,Se.Z)({className:xi,ellipsis:yi.ellipsis,align:yi.align,scope:yi.rowScope,component:yi.rowScope?zn:Fn,prefixCls:In,key:Hr,record:lt,index:On,renderIndex:Sn,dataIndex:Jt,render:Ki,shouldCellUpdate:yi.shouldCellUpdate},Dr,{appendNode:wi,additionalProps:_i}))})),pi;if(Er&&(ai.current||br)){var bi=Wn(lt,On,Vn+1,br);pi=fe.createElement(sn,{expanded:br,className:Ye()("".concat(In,"-expanded-row"),"".concat(In,"-expanded-row-level-").concat(Vn+1),Tr),prefixCls:In,component:un,cellComponent:Fn,colSpan:Nn.length,isEmpty:!1},bi)}return fe.createElement(fe.Fragment,null,Si,pi)}var Jn=le(jn);function Cr(qt){var wn=qt.columnKey,Yt=qt.onColumnResize,lt=fe.useRef();return(0,ze.Z)(function(){lt.current&&Yt(wn,lt.current.offsetWidth)},[]),fe.createElement(gt.Z,{data:wn},fe.createElement("td",{ref:lt,style:{padding:0,border:0,height:0}},fe.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var cr=at(29194);function kr(qt){var wn=qt.prefixCls,Yt=qt.columnsKey,lt=qt.onColumnResize,On=fe.useRef(null);return fe.createElement("tr",{"aria-hidden":"true",className:"".concat(wn,"-measure-row"),style:{height:0,fontSize:0},ref:On},fe.createElement(gt.Z.Collection,{onBatchResize:function(Kn){(0,cr.Z)(On.current)&&Kn.forEach(function(Qn){var Vn=Qn.data,un=Qn.size;lt(Vn,un.offsetWidth)})}},Yt.map(function(Sn){return fe.createElement(Cr,{key:Sn,columnKey:Sn,onColumnResize:lt})})))}function Kr(qt){var wn=qt.data,Yt=qt.measureColumnWidth,lt=Ce(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),On=lt.prefixCls,Sn=lt.getComponent,Kn=lt.onColumnResize,Qn=lt.flattenColumns,Vn=lt.getRowKey,un=lt.expandedKeys,Fn=lt.childrenColumnName,zn=lt.emptyNode,Tn=Xt(wn,Fn,un,Vn),In=fe.useRef({renderWithProps:!1}),Nn=Sn(["body","wrapper"],"tbody"),Zn=Sn(["body","row"],"tr"),Wn=Sn(["body","cell"],"td"),ln=Sn(["body","cell"],"th"),br;wn.length?br=Tn.map(function(ai,Tr){var Si=ai.record,pi=ai.indent,bi=ai.index,yi=Vn(Si,Tr);return fe.createElement(Jn,{key:yi,rowKey:yi,record:Si,index:Tr,renderIndex:bi,rowComponent:Zn,cellComponent:Wn,scopeCellComponent:ln,indent:pi})}):br=fe.createElement(sn,{expanded:!0,className:"".concat(On,"-placeholder"),prefixCls:On,component:Zn,cellComponent:Wn,colSpan:Qn.length,isEmpty:!0},zn);var Er=rt(Qn);return fe.createElement(dt.Provider,{value:In.current},fe.createElement(Nn,{className:"".concat(On,"-tbody")},Yt&&fe.createElement(kr,{prefixCls:On,columnsKey:Er,onColumnResize:Kn}),br))}var Ur=le(Kr),oi=at(54451),vi=["columnType"];function Bi(qt){for(var wn=qt.colWidths,Yt=qt.columns,lt=qt.columCount,On=Ce(Pe,["tableLayout"]),Sn=On.tableLayout,Kn=[],Qn=lt||Yt.length,Vn=!1,un=Qn-1;un>=0;un-=1){var Fn=wn[un],zn=Yt&&Yt[un],Tn=void 0,In=void 0;if(zn&&(Tn=zn[oi.v],Sn==="auto"&&(In=zn.minWidth)),Fn||In||Tn||Vn){var Nn=Tn||{},Zn=Nn.columnType,Wn=(0,Le.Z)(Nn,vi);Kn.unshift(fe.createElement("col",(0,Se.Z)({key:un,style:{width:Fn,minWidth:In}},Wn))),Vn=!0}}return fe.createElement("colgroup",null,Kn)}var Di=Bi,Ii=at(95190),Xi=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function et(qt,wn){return(0,fe.useMemo)(function(){for(var Yt=[],lt=0;lt<wn;lt+=1){var On=qt[lt];if(On!==void 0)Yt[lt]=On;else return null}return Yt},[qt.join("_"),wn])}var fr=fe.forwardRef(function(qt,wn){var Yt=qt.className,lt=qt.noData,On=qt.columns,Sn=qt.flattenColumns,Kn=qt.colWidths,Qn=qt.columCount,Vn=qt.stickyOffsets,un=qt.direction,Fn=qt.fixHeader,zn=qt.stickyTopOffset,Tn=qt.stickyBottomOffset,In=qt.stickyClassName,Nn=qt.onScroll,Zn=qt.maxContentScroll,Wn=qt.children,ln=(0,Le.Z)(qt,Xi),br=Ce(Pe,["prefixCls","scrollbarSize","isSticky","getComponent"]),Er=br.prefixCls,ai=br.scrollbarSize,Tr=br.isSticky,Si=br.getComponent,pi=Si(["header","table"],"table"),bi=Tr&&!Fn?0:ai,yi=fe.useRef(null),Ri=fe.useCallback(function(_i){(0,Me.mH)(wn,_i),(0,Me.mH)(yi,_i)},[]);fe.useEffect(function(){var _i;function Fi(ni){var $i=ni,_o=$i.currentTarget,fa=$i.deltaX;fa&&(Nn({currentTarget:_o,scrollLeft:_o.scrollLeft+fa}),ni.preventDefault())}return(_i=yi.current)===null||_i===void 0||_i.addEventListener("wheel",Fi,{passive:!1}),function(){var ni;(ni=yi.current)===null||ni===void 0||ni.removeEventListener("wheel",Fi)}},[]);var Ki=fe.useMemo(function(){return Sn.every(function(_i){return _i.width})},[Sn]),Jt=Sn[Sn.length-1],xi={fixed:Jt?Jt.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Er,"-cell-scrollbar")}}},ti=(0,fe.useMemo)(function(){return bi?[].concat((0,Ii.Z)(On),[xi]):On},[bi,On]),Hr=(0,fe.useMemo)(function(){return bi?[].concat((0,Ii.Z)(Sn),[xi]):Sn},[bi,Sn]),Dr=(0,fe.useMemo)(function(){var _i=Vn.right,Fi=Vn.left;return(0,Ae.Z)((0,Ae.Z)({},Vn),{},{left:un==="rtl"?[].concat((0,Ii.Z)(Fi.map(function(ni){return ni+bi})),[0]):Fi,right:un==="rtl"?_i:[].concat((0,Ii.Z)(_i.map(function(ni){return ni+bi})),[0]),isSticky:Tr})},[bi,Vn,Tr]),wi=et(Kn,Qn);return fe.createElement("div",{style:(0,Ae.Z)({overflow:"hidden"},Tr?{top:zn,bottom:Tn}:{}),ref:Ri,className:Ye()(Yt,(0,Ie.Z)({},In,!!In))},fe.createElement(pi,{style:{tableLayout:"fixed",visibility:lt||wi?null:"hidden"}},(!lt||!Zn||Ki)&&fe.createElement(Di,{colWidths:wi?[].concat((0,Ii.Z)(wi),[bi]):[],columCount:Qn+1,columns:Hr}),Wn((0,Ae.Z)((0,Ae.Z)({},ln),{},{stickyOffsets:Dr,columns:ti,flattenColumns:Hr}))))}),mr=fe.memo(fr),Ai=function(wn){var Yt=wn.cells,lt=wn.stickyOffsets,On=wn.flattenColumns,Sn=wn.rowComponent,Kn=wn.cellComponent,Qn=wn.onHeaderRow,Vn=wn.index,un=Ce(Pe,["prefixCls","direction"]),Fn=un.prefixCls,zn=un.direction,Tn;Qn&&(Tn=Qn(Yt.map(function(Nn){return Nn.column}),Vn));var In=rt(Yt.map(function(Nn){return Nn.column}));return fe.createElement(Sn,Tn,Yt.map(function(Nn,Zn){var Wn=Nn.column,ln=xt(Nn.colStart,Nn.colEnd,On,lt,zn),br;return Wn&&Wn.onHeaderCell&&(br=Nn.column.onHeaderCell(Wn)),fe.createElement(At,(0,Se.Z)({},Nn,{scope:Wn.title?Nn.colSpan>1?"colgroup":"col":null,ellipsis:Wn.ellipsis,align:Wn.align,component:Kn,prefixCls:Fn,key:In[Zn]},ln,{additionalProps:br,rowType:"header"}))}))},ar=Ai;function Sr(qt){var wn=[];function Yt(Kn,Qn){var Vn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;wn[Vn]=wn[Vn]||[];var un=Qn,Fn=Kn.filter(Boolean).map(function(zn){var Tn={key:zn.key,className:zn.className||"",children:zn.title,column:zn,colStart:un},In=1,Nn=zn.children;return Nn&&Nn.length>0&&(In=Yt(Nn,un,Vn+1).reduce(function(Zn,Wn){return Zn+Wn},0),Tn.hasSubColumns=!0),"colSpan"in zn&&(In=zn.colSpan),"rowSpan"in zn&&(Tn.rowSpan=zn.rowSpan),Tn.colSpan=In,Tn.colEnd=Tn.colStart+In-1,wn[Vn].push(Tn),un+=In,In});return Fn}Yt(qt,0);for(var lt=wn.length,On=function(Qn){wn[Qn].forEach(function(Vn){!("rowSpan"in Vn)&&!Vn.hasSubColumns&&(Vn.rowSpan=lt-Qn)})},Sn=0;Sn<lt;Sn+=1)On(Sn);return wn}var Ar=function(wn){var Yt=wn.stickyOffsets,lt=wn.columns,On=wn.flattenColumns,Sn=wn.onHeaderRow,Kn=Ce(Pe,["prefixCls","getComponent"]),Qn=Kn.prefixCls,Vn=Kn.getComponent,un=fe.useMemo(function(){return Sr(lt)},[lt]),Fn=Vn(["header","wrapper"],"thead"),zn=Vn(["header","row"],"tr"),Tn=Vn(["header","cell"],"th");return fe.createElement(Fn,{className:"".concat(Qn,"-thead")},un.map(function(In,Nn){var Zn=fe.createElement(ar,{key:Nn,flattenColumns:On,cells:In,stickyOffsets:Yt,rowComponent:zn,cellComponent:Tn,onHeaderRow:Sn,index:Nn});return Zn}))},lo=le(Ar),on=at(97347);function an(qt,wn,Yt){var lt=(0,oi.g)(qt),On=lt.expandIcon,Sn=lt.expandedRowKeys,Kn=lt.defaultExpandedRowKeys,Qn=lt.defaultExpandAllRows,Vn=lt.expandedRowRender,un=lt.onExpand,Fn=lt.onExpandedRowsChange,zn=lt.childrenColumnName,Tn=On||nn,In=zn||"children",Nn=fe.useMemo(function(){return Vn?"row":qt.expandable&&qt.internalHooks===ct.R&&qt.expandable.__PARENT_RENDER_ICON__||wn.some(function(Tr){return Tr&&(0,Ne.Z)(Tr)==="object"&&Tr[In]})?"nest":!1},[!!Vn,wn]),Zn=fe.useState(function(){return Kn||(Qn?Wt(wn,Yt,In):[])}),Wn=(0,Bt.Z)(Zn,2),ln=Wn[0],br=Wn[1],Er=fe.useMemo(function(){return new Set(Sn||ln||[])},[Sn,ln]),ai=fe.useCallback(function(Tr){var Si=Yt(Tr,wn.indexOf(Tr)),pi,bi=Er.has(Si);bi?(Er.delete(Si),pi=(0,Ii.Z)(Er)):pi=[].concat((0,Ii.Z)(Er),[Si]),br(pi),un&&un(!bi,Tr),Fn&&Fn(pi)},[Yt,Er,wn,un,Fn]);return[lt,Nn,Er,Tn,In,ai]}function tn(qt,wn,Yt){var lt=qt.map(function(On,Sn){return xt(Sn,Sn,qt,wn,Yt)});return(0,Ue.Z)(function(){return lt},[lt],function(On,Sn){return!(0,De.Z)(On,Sn)})}function vn(qt){var wn=(0,fe.useRef)(qt),Yt=(0,fe.useState)({}),lt=(0,Bt.Z)(Yt,2),On=lt[1],Sn=(0,fe.useRef)(null),Kn=(0,fe.useRef)([]);function Qn(Vn){Kn.current.push(Vn);var un=Promise.resolve();Sn.current=un,un.then(function(){if(Sn.current===un){var Fn=Kn.current,zn=wn.current;Kn.current=[],Fn.forEach(function(Tn){wn.current=Tn(wn.current)}),Sn.current=null,zn!==wn.current&&On({})}})}return(0,fe.useEffect)(function(){return function(){Sn.current=null}},[]),[wn.current,Qn]}function gr(qt){var wn=(0,fe.useRef)(qt||null),Yt=(0,fe.useRef)();function lt(){window.clearTimeout(Yt.current)}function On(Kn){wn.current=Kn,lt(),Yt.current=window.setTimeout(function(){wn.current=null,Yt.current=void 0},100)}function Sn(){return wn.current}return(0,fe.useEffect)(function(){return lt},[]),[On,Sn]}function pr(){var qt=fe.useState(-1),wn=(0,Bt.Z)(qt,2),Yt=wn[0],lt=wn[1],On=fe.useState(-1),Sn=(0,Bt.Z)(On,2),Kn=Sn[0],Qn=Sn[1],Vn=fe.useCallback(function(un,Fn){lt(un),Qn(Fn)},[]);return[Yt,Kn,Vn]}var ii=at(47273),Mn=(0,ii.Z)()?window:null;function sr(qt,wn){var Yt=(0,Ne.Z)(qt)==="object"?qt:{},lt=Yt.offsetHeader,On=lt===void 0?0:lt,Sn=Yt.offsetSummary,Kn=Sn===void 0?0:Sn,Qn=Yt.offsetScroll,Vn=Qn===void 0?0:Qn,un=Yt.getContainer,Fn=un===void 0?function(){return Mn}:un,zn=Fn()||Mn,Tn=!!qt;return fe.useMemo(function(){return{isSticky:Tn,stickyClassName:Tn?"".concat(wn,"-sticky-holder"):"",offsetHeader:On,offsetSummary:Kn,offsetScroll:Vn,container:zn}},[Tn,Vn,On,Kn,wn,zn])}function Wr(qt,wn,Yt){var lt=(0,fe.useMemo)(function(){var On=wn.length,Sn=function(un,Fn,zn){for(var Tn=[],In=0,Nn=un;Nn!==Fn;Nn+=zn)Tn.push(In),wn[Nn].fixed&&(In+=qt[Nn]||0);return Tn},Kn=Sn(0,On,1),Qn=Sn(On-1,-1,-1).reverse();return Yt==="rtl"?{left:Qn,right:Kn}:{left:Kn,right:Qn}},[qt,wn,Yt]);return lt}var Li=Wr;function tr(qt){var wn=qt.className,Yt=qt.children;return fe.createElement("div",{className:wn},Yt)}var Ot=tr,Kt=at(8224),Dn=at(16089),Ln=at(76846);function en(qt){var wn=(0,Ln.bn)(qt),Yt=wn.getBoundingClientRect(),lt=document.documentElement;return{left:Yt.left+(window.pageXOffset||lt.scrollLeft)-(lt.clientLeft||document.body.clientLeft||0),top:Yt.top+(window.pageYOffset||lt.scrollTop)-(lt.clientTop||document.body.clientTop||0)}}var Un=function(wn,Yt){var lt,On,Sn=wn.scrollBodyRef,Kn=wn.onScroll,Qn=wn.offsetScroll,Vn=wn.container,un=wn.direction,Fn=Ce(Pe,"prefixCls"),zn=((lt=Sn.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,Tn=((On=Sn.current)===null||On===void 0?void 0:On.clientWidth)||0,In=zn&&Tn*(Tn/zn),Nn=fe.useRef(),Zn=vn({scrollLeft:0,isHiddenScrollBar:!0}),Wn=(0,Bt.Z)(Zn,2),ln=Wn[0],br=Wn[1],Er=fe.useRef({delta:0,x:0}),ai=fe.useState(!1),Tr=(0,Bt.Z)(ai,2),Si=Tr[0],pi=Tr[1],bi=fe.useRef(null);fe.useEffect(function(){return function(){Dn.Z.cancel(bi.current)}},[]);var yi=function(){pi(!1)},Ri=function(Hr){Hr.persist(),Er.current.delta=Hr.pageX-ln.scrollLeft,Er.current.x=0,pi(!0),Hr.preventDefault()},Ki=function(Hr){var Dr,wi=Hr||((Dr=window)===null||Dr===void 0?void 0:Dr.event),_i=wi.buttons;if(!Si||_i===0){Si&&pi(!1);return}var Fi=Er.current.x+Hr.pageX-Er.current.x-Er.current.delta,ni=un==="rtl";Fi=Math.max(ni?In-Tn:0,Math.min(ni?0:Tn-In,Fi));var $i=!ni||Math.abs(Fi)+Math.abs(In)<Tn;$i&&(Kn({scrollLeft:Fi/Tn*(zn+2)}),Er.current.x=Hr.pageX)},Jt=function(){Dn.Z.cancel(bi.current),bi.current=(0,Dn.Z)(function(){if(Sn.current){var Hr=en(Sn.current).top,Dr=Hr+Sn.current.offsetHeight,wi=Vn===window?document.documentElement.scrollTop+window.innerHeight:en(Vn).top+Vn.clientHeight;Dr-(0,Nt.Z)()<=wi||Hr>=wi-Qn?br(function(_i){return(0,Ae.Z)((0,Ae.Z)({},_i),{},{isHiddenScrollBar:!0})}):br(function(_i){return(0,Ae.Z)((0,Ae.Z)({},_i),{},{isHiddenScrollBar:!1})})}})},xi=function(Hr){br(function(Dr){return(0,Ae.Z)((0,Ae.Z)({},Dr),{},{scrollLeft:Hr/zn*Tn||0})})};return fe.useImperativeHandle(Yt,function(){return{setScrollLeft:xi,checkScrollBarVisible:Jt}}),fe.useEffect(function(){var ti=(0,Kt.Z)(document.body,"mouseup",yi,!1),Hr=(0,Kt.Z)(document.body,"mousemove",Ki,!1);return Jt(),function(){ti.remove(),Hr.remove()}},[In,Si]),fe.useEffect(function(){if(Sn.current){for(var ti=[],Hr=(0,Ln.bn)(Sn.current);Hr;)ti.push(Hr),Hr=Hr.parentElement;return ti.forEach(function(Dr){return Dr.addEventListener("scroll",Jt,!1)}),window.addEventListener("resize",Jt,!1),window.addEventListener("scroll",Jt,!1),Vn.addEventListener("scroll",Jt,!1),function(){ti.forEach(function(Dr){return Dr.removeEventListener("scroll",Jt)}),window.removeEventListener("resize",Jt),window.removeEventListener("scroll",Jt),Vn.removeEventListener("scroll",Jt)}}},[Vn]),fe.useEffect(function(){ln.isHiddenScrollBar||br(function(ti){var Hr=Sn.current;return Hr?(0,Ae.Z)((0,Ae.Z)({},ti),{},{scrollLeft:Hr.scrollLeft/Hr.scrollWidth*Hr.clientWidth}):ti})},[ln.isHiddenScrollBar]),zn<=Tn||!In||ln.isHiddenScrollBar?null:fe.createElement("div",{style:{height:(0,Nt.Z)(),width:Tn,bottom:Qn},className:"".concat(Fn,"-sticky-scroll")},fe.createElement("div",{onMouseDown:Ri,ref:Nn,className:Ye()("".concat(Fn,"-sticky-scroll-bar"),(0,Ie.Z)({},"".concat(Fn,"-sticky-scroll-bar-active"),Si)),style:{width:"".concat(In,"px"),transform:"translate3d(".concat(ln.scrollLeft,"px, 0, 0)")}}))},Bn=fe.forwardRef(Un);function An(qt){return null}var nr=An;function _n(qt){return null}var Xn=_n,ur="rc-table",zr=[],dr={};function dn(){return"No Data"}function $n(qt,wn){var Yt=(0,Ae.Z)({rowKey:"key",prefixCls:ur,emptyText:dn},qt),lt=Yt.prefixCls,On=Yt.className,Sn=Yt.rowClassName,Kn=Yt.style,Qn=Yt.data,Vn=Yt.rowKey,un=Yt.scroll,Fn=Yt.tableLayout,zn=Yt.direction,Tn=Yt.title,In=Yt.footer,Nn=Yt.summary,Zn=Yt.caption,Wn=Yt.id,ln=Yt.showHeader,br=Yt.components,Er=Yt.emptyText,ai=Yt.onRow,Tr=Yt.onHeaderRow,Si=Yt.onScroll,pi=Yt.internalHooks,bi=Yt.transformColumns,yi=Yt.internalRefs,Ri=Yt.tailor,Ki=Yt.getContainerWidth,Jt=Yt.sticky,xi=Yt.rowHoverable,ti=xi===void 0?!0:xi,Hr=Qn||zr,Dr=!!Hr.length,wi=pi===ct.R,_i=fe.useCallback(function(Gi,ao){return(0,Ke.Z)(br,Gi)||ao},[br]),Fi=fe.useMemo(function(){return typeof Vn=="function"?Vn:function(Gi){var ao=Gi&&Gi[Vn];return ao}},[Vn]),ni=_i(["body"]),$i=pr(),_o=(0,Bt.Z)($i,3),fa=_o[0],Ps=_o[1],wa=_o[2],Br=an(Yt,Hr,Fi),Po=(0,Bt.Z)(Br,6),bo=Po[0],ta=Po[1],Ao=Po[2],Ko=Po[3],er=Po[4],jr=Po[5],$r=un==null?void 0:un.x,mi=fe.useState(0),Ci=(0,Bt.Z)(mi,2),to=Ci[0],Or=Ci[1],Aa=(0,on.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},Yt),bo),{},{expandable:!!bo.expandedRowRender,columnTitle:bo.columnTitle,expandedKeys:Ao,getRowKey:Fi,onTriggerExpand:jr,expandIcon:Ko,expandIconColumnIndex:bo.expandIconColumnIndex,direction:zn,scrollWidth:wi&&Ri&&typeof $r=="number"?$r:null,clientWidth:to}),wi?bi:null),zo=(0,Bt.Z)(Aa,4),jo=zo[0],Ni=zo[1],Vo=zo[2],ja=zo[3],vo=Vo!=null?Vo:$r,fs=fe.useMemo(function(){return{columns:jo,flattenColumns:Ni}},[jo,Ni]),ds=fe.useRef(),bs=fe.useRef(),na=fe.useRef(),eh=fe.useRef();fe.useImperativeHandle(wn,function(){return{nativeElement:ds.current,scrollTo:function(ao){var Xo;if(na.current instanceof HTMLElement){var Fa=ao.index,ka=ao.top,fu=ao.key;if(Pt(ka)){var Jl;(Jl=na.current)===null||Jl===void 0||Jl.scrollTo({top:ka})}else{var du,sl=fu!=null?fu:Fi(Hr[Fa]);(du=na.current.querySelector('[data-row-key="'.concat(sl,'"]')))===null||du===void 0||du.scrollIntoView()}}else(Xo=na.current)!==null&&Xo!==void 0&&Xo.scrollTo&&na.current.scrollTo(ao)}}});var ju=fe.useRef(),il=fe.useState(!1),Sl=(0,Bt.Z)(il,2),Os=Sl[0],Vl=Sl[1],th=fe.useState(!1),nh=(0,Bt.Z)(th,2),Zo=nh[0],Ou=nh[1],rh=fe.useState(new Map),Zl=(0,Bt.Z)(rh,2),uu=Zl[0],Ca=Zl[1],Oa=rt(Ni),aa=Oa.map(function(Gi){return uu.get(Gi)}),ga=fe.useMemo(function(){return aa},[aa.join("_")]),Xl=Li(ga,Ni,zn),Ga=un&&St(un.y),co=un&&St(vo)||!!bo.fixed,io=co&&Ni.some(function(Gi){var ao=Gi.fixed;return ao}),Ji=fe.useRef(),sa=sr(Jt,lt),wr=sa.isSticky,da=sa.offsetHeader,Gt=sa.offsetSummary,Cn=sa.offsetScroll,Hs=sa.stickyClassName,jl=sa.container,Qo=fe.useMemo(function(){return Nn==null?void 0:Nn(Hr)},[Nn,Hr]),Pa=(Ga||wr)&&fe.isValidElement(Qo)&&Qo.type===_e&&Qo.props.fixed,Fs,ol,Fu;Ga&&(ol={overflowY:Dr?"scroll":"auto",maxHeight:un.y}),co&&(Fs={overflowX:"auto"},Ga||(ol={overflowY:"hidden"}),Fu={width:vo===!0?"auto":vo,minWidth:"100%"});var Oo=fe.useCallback(function(Gi,ao){Ca(function(Xo){if(Xo.get(Gi)!==ao){var Fa=new Map(Xo);return Fa.set(Gi,ao),Fa}return Xo})},[]),fi=gr(null),Ua=(0,Bt.Z)(fi,2),Ds=Ua[0],Fo=Ua[1];function zi(Gi,ao){ao&&(typeof ao=="function"?ao(Gi):ao.scrollLeft!==Gi&&(ao.scrollLeft=Gi,ao.scrollLeft!==Gi&&setTimeout(function(){ao.scrollLeft=Gi},0)))}var Go=(0,oe.Z)(function(Gi){var ao=Gi.currentTarget,Xo=Gi.scrollLeft,Fa=zn==="rtl",ka=typeof Xo=="number"?Xo:ao.scrollLeft,fu=ao||dr;if(!Fo()||Fo()===fu){var Jl;Ds(fu),zi(ka,bs.current),zi(ka,na.current),zi(ka,ju.current),zi(ka,(Jl=Ji.current)===null||Jl===void 0?void 0:Jl.setScrollLeft)}var du=ao||bs.current;if(du){var sl=wi&&Ri&&typeof vo=="number"?vo:du.scrollWidth,Fl=du.clientWidth;if(sl===Fl){Vl(!1),Ou(!1);return}Fa?(Vl(-ka<sl-Fl),Ou(-ka>0)):(Vl(ka>0),Ou(ka<sl-Fl))}}),ps=(0,oe.Z)(function(Gi){Go(Gi),Si==null||Si(Gi)}),xo=function(){if(co&&na.current){var ao;Go({currentTarget:(0,Ln.bn)(na.current),scrollLeft:(ao=na.current)===null||ao===void 0?void 0:ao.scrollLeft})}else Vl(!1),Ou(!1)},Cs=function(ao){var Xo,Fa=ao.width;(Xo=Ji.current)===null||Xo===void 0||Xo.checkScrollBarVisible();var ka=ds.current?ds.current.offsetWidth:Fa;wi&&Ki&&ds.current&&(ka=Ki(ds.current,ka)||ka),ka!==to&&(xo(),Or(ka))},ma=fe.useRef(!1);fe.useEffect(function(){ma.current&&xo()},[co,Qn,jo.length]),fe.useEffect(function(){ma.current=!0},[]);var hu=fe.useState(0),oo=(0,Bt.Z)(hu,2),Ea=oo[0],no=oo[1],wo=fe.useState(!0),Eo=(0,Bt.Z)(wo,2),Uo=Eo[0],ho=Eo[1];(0,ze.Z)(function(){(!Ri||!wi)&&(na.current instanceof Element?no((0,Nt.o)(na.current).width):no((0,Nt.o)(eh.current).width)),ho((0,Mt.G)("position","sticky"))},[]),fe.useEffect(function(){wi&&yi&&(yi.body.current=na.current)});var Du=fe.useCallback(function(Gi){return fe.createElement(fe.Fragment,null,fe.createElement(lo,Gi),Pa==="top"&&fe.createElement(Qe,Gi,Qo))},[Pa,Qo]),li=fe.useCallback(function(Gi){return fe.createElement(Qe,Gi,Qo)},[Qo]),uf=_i(["table"],"table"),Qi=fe.useMemo(function(){return Fn||(io?vo==="max-content"?"auto":"fixed":Ga||wr||Ni.some(function(Gi){var ao=Gi.ellipsis;return ao})?"fixed":"auto")},[Ga,io,Ni,Fn,wr]),Cc,cu={colWidths:ga,columCount:Ni.length,stickyOffsets:Xl,onHeaderRow:Tr,fixHeader:Ga,scroll:un},ih=fe.useMemo(function(){return Dr?null:typeof Er=="function"?Er():Er},[Dr,Er]),Ec=fe.createElement(Ur,{data:Hr,measureColumnWidth:Ga||co||wr}),_h=fe.createElement(Di,{colWidths:Ni.map(function(Gi){var ao=Gi.width;return ao}),columns:Ni}),Ol=Zn!=null?fe.createElement("caption",{className:"".concat(lt,"-caption")},Zn):void 0,Bu=(0,Dt.Z)(Yt,{data:!0}),uo=(0,Dt.Z)(Yt,{aria:!0});if(Ga||wr){var al;typeof ni=="function"?(al=ni(Hr,{scrollbarSize:Ea,ref:na,onScroll:Go}),cu.colWidths=Ni.map(function(Gi,ao){var Xo=Gi.width,Fa=ao===Ni.length-1?Xo-Ea:Xo;return typeof Fa=="number"&&!Number.isNaN(Fa)?Fa:0})):al=fe.createElement("div",{style:(0,Ae.Z)((0,Ae.Z)({},Fs),ol),onScroll:ps,ref:na,className:Ye()("".concat(lt,"-body"))},fe.createElement(uf,(0,Se.Z)({style:(0,Ae.Z)((0,Ae.Z)({},Fu),{},{tableLayout:Qi})},uo),Ol,_h,Ec,!Pa&&Qo&&fe.createElement(Qe,{stickyOffsets:Xl,flattenColumns:Ni},Qo)));var zh=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({noData:!Hr.length,maxContentScroll:co&&vo==="max-content"},cu),fs),{},{direction:zn,stickyClassName:Hs,onScroll:Go});Cc=fe.createElement(fe.Fragment,null,ln!==!1&&fe.createElement(mr,(0,Se.Z)({},zh,{stickyTopOffset:da,className:"".concat(lt,"-header"),ref:bs}),Du),al,Pa&&Pa!=="top"&&fe.createElement(mr,(0,Se.Z)({},zh,{stickyBottomOffset:Gt,className:"".concat(lt,"-summary"),ref:ju}),li),wr&&na.current&&na.current instanceof Element&&fe.createElement(Bn,{ref:Ji,offsetScroll:Cn,scrollBodyRef:na,onScroll:Go,container:jl,direction:zn}))}else Cc=fe.createElement("div",{style:(0,Ae.Z)((0,Ae.Z)({},Fs),ol),className:Ye()("".concat(lt,"-content")),onScroll:Go,ref:na},fe.createElement(uf,(0,Se.Z)({style:(0,Ae.Z)((0,Ae.Z)({},Fu),{},{tableLayout:Qi})},uo),Ol,_h,ln!==!1&&fe.createElement(lo,(0,Se.Z)({},cu,fs)),Ec,Qo&&fe.createElement(Qe,{stickyOffsets:Xl,flattenColumns:Ni},Qo)));var Yl=fe.createElement("div",(0,Se.Z)({className:Ye()(lt,On,(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},"".concat(lt,"-rtl"),zn==="rtl"),"".concat(lt,"-ping-left"),Os),"".concat(lt,"-ping-right"),Zo),"".concat(lt,"-layout-fixed"),Fn==="fixed"),"".concat(lt,"-fixed-header"),Ga),"".concat(lt,"-fixed-column"),io),"".concat(lt,"-fixed-column-gapped"),io&&ja),"".concat(lt,"-scroll-horizontal"),co),"".concat(lt,"-has-fix-left"),Ni[0]&&Ni[0].fixed),"".concat(lt,"-has-fix-right"),Ni[Ni.length-1]&&Ni[Ni.length-1].fixed==="right")),style:Kn,id:Wn,ref:ds},Bu),Tn&&fe.createElement(Ot,{className:"".concat(lt,"-title")},Tn(Hr)),fe.createElement("div",{ref:eh,className:"".concat(lt,"-container")},Cc),In&&fe.createElement(Ot,{className:"".concat(lt,"-footer")},In(Hr)));co&&(Yl=fe.createElement(gt.Z,{onResize:Cs},Yl));var kc=tn(Ni,Xl,zn),$l=fe.useMemo(function(){return{scrollX:vo,prefixCls:lt,getComponent:_i,scrollbarSize:Ea,direction:zn,fixedInfoList:kc,isSticky:wr,supportSticky:Uo,componentWidth:to,fixHeader:Ga,fixColumn:io,horizonScroll:co,tableLayout:Qi,rowClassName:Sn,expandedRowClassName:bo.expandedRowClassName,expandIcon:Ko,expandableType:ta,expandRowByClick:bo.expandRowByClick,expandedRowRender:bo.expandedRowRender,onTriggerExpand:jr,expandIconColumnIndex:bo.expandIconColumnIndex,indentSize:bo.indentSize,allColumnsFixedLeft:Ni.every(function(Gi){return Gi.fixed==="left"}),emptyNode:ih,columns:jo,flattenColumns:Ni,onColumnResize:Oo,hoverStartRow:fa,hoverEndRow:Ps,onHover:wa,rowExpandable:bo.rowExpandable,onRow:ai,getRowKey:Fi,expandedKeys:Ao,childrenColumnName:er,rowHoverable:ti}},[vo,lt,_i,Ea,zn,kc,wr,Uo,to,Ga,io,co,Qi,Sn,bo.expandedRowClassName,Ko,ta,bo.expandRowByClick,bo.expandedRowRender,jr,bo.expandIconColumnIndex,bo.indentSize,ih,jo,Ni,Oo,fa,Ps,wa,bo.rowExpandable,ai,Fi,Ao,er,ti]);return fe.createElement(Pe.Provider,{value:$l},Yl)}var Ir=fe.forwardRef($n);function qr(qt){return ie(Ir,qt)}var ki=qr();ki.EXPAND_COLUMN=ct.w,ki.INTERNAL_HOOKS=ct.R,ki.Column=nr,ki.ColumnGroup=Xn,ki.Summary=ut;var Qt=ki,or=at(65283),yr=ke(null),Hn=ke(null);function Yr(qt,wn,Yt){var lt=wn||1;return Yt[qt+lt]-(Yt[qt]||0)}function Rr(qt){var wn=qt.rowInfo,Yt=qt.column,lt=qt.colIndex,On=qt.indent,Sn=qt.index,Kn=qt.component,Qn=qt.renderIndex,Vn=qt.record,un=qt.style,Fn=qt.className,zn=qt.inverse,Tn=qt.getHeight,In=Yt.render,Nn=Yt.dataIndex,Zn=Yt.className,Wn=Yt.width,ln=Ce(Hn,["columnsOffset"]),br=ln.columnsOffset,Er=mn(wn,Yt,lt,On,Sn),ai=Er.key,Tr=Er.fixedInfo,Si=Er.appendCellNode,pi=Er.additionalCellProps,bi=pi.style,yi=pi.colSpan,Ri=yi===void 0?1:yi,Ki=pi.rowSpan,Jt=Ki===void 0?1:Ki,xi=lt-1,ti=Yr(xi,Ri,br),Hr=Ri>1?Wn-ti:0,Dr=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},bi),un),{},{flex:"0 0 ".concat(ti,"px"),width:"".concat(ti,"px"),marginRight:Hr,pointerEvents:"auto"}),wi=fe.useMemo(function(){return zn?Jt<=1:Ri===0||Jt===0||Jt>1},[Jt,Ri,zn]);wi?Dr.visibility="hidden":zn&&(Dr.height=Tn==null?void 0:Tn(Jt));var _i=wi?function(){return null}:In,Fi={};return(Jt===0||Ri===0)&&(Fi.rowSpan=1,Fi.colSpan=1),fe.createElement(At,(0,Se.Z)({className:Ye()(Zn,Fn),ellipsis:Yt.ellipsis,align:Yt.align,scope:Yt.rowScope,component:Kn,prefixCls:wn.prefixCls,key:ai,record:Vn,index:Sn,renderIndex:Qn,dataIndex:Nn,render:_i,shouldCellUpdate:Yt.shouldCellUpdate},Tr,{appendNode:Si,additionalProps:(0,Ae.Z)((0,Ae.Z)({},pi),{},{style:Dr},Fi)}))}var Zr=Rr,Qr=["data","index","className","rowKey","style","extra","getHeight"],ui=fe.forwardRef(function(qt,wn){var Yt=qt.data,lt=qt.index,On=qt.className,Sn=qt.rowKey,Kn=qt.style,Qn=qt.extra,Vn=qt.getHeight,un=(0,Le.Z)(qt,Qr),Fn=Yt.record,zn=Yt.indent,Tn=Yt.index,In=Ce(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Nn=In.scrollX,Zn=In.flattenColumns,Wn=In.prefixCls,ln=In.fixColumn,br=In.componentWidth,Er=Ce(yr,["getComponent"]),ai=Er.getComponent,Tr=$t(Fn,Sn,lt,zn),Si=ai(["body","row"],"div"),pi=ai(["body","cell"],"div"),bi=Tr.rowSupportExpand,yi=Tr.expanded,Ri=Tr.rowProps,Ki=Tr.expandedRowRender,Jt=Tr.expandedRowClassName,xi;if(bi&&yi){var ti=Ki(Fn,lt,zn+1,yi),Hr=bn(Jt,Fn,lt,zn),Dr={};ln&&(Dr={style:(0,Ie.Z)({},"--virtual-width","".concat(br,"px"))});var wi="".concat(Wn,"-expanded-row-cell");xi=fe.createElement(Si,{className:Ye()("".concat(Wn,"-expanded-row"),"".concat(Wn,"-expanded-row-level-").concat(zn+1),Hr)},fe.createElement(At,{component:pi,prefixCls:Wn,className:Ye()(wi,(0,Ie.Z)({},"".concat(wi,"-fixed"),ln)),additionalProps:Dr},ti))}var _i=(0,Ae.Z)((0,Ae.Z)({},Kn),{},{width:Nn});Qn&&(_i.position="absolute",_i.pointerEvents="none");var Fi=fe.createElement(Si,(0,Se.Z)({},Ri,un,{"data-row-key":Sn,ref:bi?null:wn,className:Ye()(On,"".concat(Wn,"-row"),Ri==null?void 0:Ri.className,(0,Ie.Z)({},"".concat(Wn,"-row-extra"),Qn)),style:(0,Ae.Z)((0,Ae.Z)({},_i),Ri==null?void 0:Ri.style)}),Zn.map(function(ni,$i){return fe.createElement(Zr,{key:$i,component:pi,rowInfo:Tr,column:ni,colIndex:$i,indent:zn,index:lt,renderIndex:Tn,record:Fn,inverse:Qn,getHeight:Vn})}));return bi?fe.createElement("div",{ref:wn},Fi,xi):Fi}),Pi=le(ui),pn=Pi,Oi=fe.forwardRef(function(qt,wn){var Yt=qt.data,lt=qt.onScroll,On=Ce(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Sn=On.flattenColumns,Kn=On.onColumnResize,Qn=On.getRowKey,Vn=On.expandedKeys,un=On.prefixCls,Fn=On.childrenColumnName,zn=On.scrollX,Tn=On.direction,In=Ce(yr),Nn=In.sticky,Zn=In.scrollY,Wn=In.listItemHeight,ln=In.getComponent,br=In.onScroll,Er=fe.useRef(),ai=Xt(Yt,Fn,Vn,Qn),Tr=fe.useMemo(function(){var xi=0;return Sn.map(function(ti){var Hr=ti.width,Dr=ti.key;return xi+=Hr,[Dr,Hr,xi]})},[Sn]),Si=fe.useMemo(function(){return Tr.map(function(xi){return xi[2]})},[Tr]);fe.useEffect(function(){Tr.forEach(function(xi){var ti=(0,Bt.Z)(xi,2),Hr=ti[0],Dr=ti[1];Kn(Hr,Dr)})},[Tr]),fe.useImperativeHandle(wn,function(){var xi,ti={scrollTo:function(Dr){var wi;(wi=Er.current)===null||wi===void 0||wi.scrollTo(Dr)},nativeElement:(xi=Er.current)===null||xi===void 0?void 0:xi.nativeElement};return Object.defineProperty(ti,"scrollLeft",{get:function(){var Dr;return((Dr=Er.current)===null||Dr===void 0?void 0:Dr.getScrollInfo().x)||0},set:function(Dr){var wi;(wi=Er.current)===null||wi===void 0||wi.scrollTo({left:Dr})}}),ti});var pi=function(ti,Hr){var Dr,wi=(Dr=ai[Hr])===null||Dr===void 0?void 0:Dr.record,_i=ti.onCell;if(_i){var Fi,ni=_i(wi,Hr);return(Fi=ni==null?void 0:ni.rowSpan)!==null&&Fi!==void 0?Fi:1}return 1},bi=function(ti){var Hr=ti.start,Dr=ti.end,wi=ti.getSize,_i=ti.offsetY;if(Dr<0)return null;for(var Fi=Sn.filter(function(Ko){return pi(Ko,Hr)===0}),ni=Hr,$i=function(er){if(Fi=Fi.filter(function(jr){return pi(jr,er)===0}),!Fi.length)return ni=er,1},_o=Hr;_o>=0&&!$i(_o);_o-=1);for(var fa=Sn.filter(function(Ko){return pi(Ko,Dr)!==1}),Ps=Dr,wa=function(er){if(fa=fa.filter(function(jr){return pi(jr,er)!==1}),!fa.length)return Ps=Math.max(er-1,Dr),1},Br=Dr;Br<ai.length&&!wa(Br);Br+=1);for(var Po=[],bo=function(er){var jr=ai[er];if(!jr)return 1;Sn.some(function($r){return pi($r,er)>1})&&Po.push(er)},ta=ni;ta<=Ps;ta+=1)bo(ta);var Ao=Po.map(function(Ko){var er=ai[Ko],jr=Qn(er.record,Ko),$r=function(to){var Or=Ko+to-1,Aa=Qn(ai[Or].record,Or),zo=wi(jr,Aa);return zo.bottom-zo.top},mi=wi(jr);return fe.createElement(pn,{key:Ko,data:er,rowKey:jr,index:Ko,style:{top:-_i+mi.top},extra:!0,getHeight:$r})});return Ao},yi=fe.useMemo(function(){return{columnsOffset:Si}},[Si]),Ri="".concat(un,"-tbody"),Ki=ln(["body","wrapper"]),Jt={};return Nn&&(Jt.position="sticky",Jt.bottom=0,(0,Ne.Z)(Nn)==="object"&&Nn.offsetScroll&&(Jt.bottom=Nn.offsetScroll)),fe.createElement(Hn.Provider,{value:yi},fe.createElement(or.Z,{fullHeight:!1,ref:Er,prefixCls:"".concat(Ri,"-virtual"),styles:{horizontalScrollBar:Jt},className:Ri,height:Zn,itemHeight:Wn||24,data:ai,itemKey:function(ti){return Qn(ti.record)},component:Ki,scrollWidth:zn,direction:Tn,onVirtualScroll:function(ti){var Hr,Dr=ti.x;lt({currentTarget:(Hr=Er.current)===null||Hr===void 0?void 0:Hr.nativeElement,scrollLeft:Dr})},onScroll:br,extraRender:bi},function(xi,ti,Hr){var Dr=Qn(xi.record,ti);return fe.createElement(pn,{data:xi,rowKey:Dr,index:ti,style:Hr.style})}))}),yn=le(Oi),xr=yn,hi=function(wn,Yt){var lt=Yt.ref,On=Yt.onScroll;return fe.createElement(xr,{ref:lt,data:wn,onScroll:On})};function ei(qt,wn){var Yt=qt.data,lt=qt.columns,On=qt.scroll,Sn=qt.sticky,Kn=qt.prefixCls,Qn=Kn===void 0?ur:Kn,Vn=qt.className,un=qt.listItemHeight,Fn=qt.components,zn=qt.onScroll,Tn=On||{},In=Tn.x,Nn=Tn.y;typeof In!="number"&&(In=1),typeof Nn!="number"&&(Nn=500);var Zn=(0,Et.zX)(function(br,Er){return(0,Ke.Z)(Fn,br)||Er}),Wn=(0,Et.zX)(zn),ln=fe.useMemo(function(){return{sticky:Sn,scrollY:Nn,listItemHeight:un,getComponent:Zn,onScroll:Wn}},[Sn,Nn,un,Zn,Wn]);return fe.createElement(yr.Provider,{value:ln},fe.createElement(Qt,(0,Se.Z)({},qt,{className:Ye()(Vn,"".concat(Qn,"-virtual")),scroll:(0,Ae.Z)((0,Ae.Z)({},On),{},{x:In}),components:(0,Ae.Z)((0,Ae.Z)({},Fn),{},{body:Yt!=null&&Yt.length?hi:void 0}),columns:lt,internalHooks:ct.R,tailor:!0,ref:wn})))}var Wi=fe.forwardRef(ei);function ci(qt){return ie(Wi,qt)}var Vr=ci(),Hi=null},54451:function(gn,cn,at){"use strict";at.d(cn,{g:function(){return fe},v:function(){return De}});var ct=at(20439),Bt=at(62646),oe=at(48736),ze=["expandable"],De="RC_TABLE_INTERNAL_COL_DEFINE";function fe(me){var ke=me.expandable,Ce=(0,Bt.Z)(me,ze),Se;return"expandable"in me?Se=(0,ct.Z)((0,ct.Z)({},Ce),ke):Se=Ce,Se.showExpandColumn===!1&&(Se.expandIconColumnIndex=-1),Se}},22711:function(gn,cn,at){"use strict";at.r(cn),at.d(cn,{ResizableTextArea:function(){return We},default:function(){return ot}});var ct=at(14809),Bt=at(4635),oe=at(20439),ze=at(95190),De=at(50298),fe=at(62646),me=at(92310),ke=at.n(me),Ce=at(36901),Se=at(66003),Me=at(30292),ve=at(18929),we=at(59301),de=at(93664),z=at(29301),ee=at(34280),ae=at(16089),ie=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,le=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],ue={},ge;function Pe(st){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=st.getAttribute("id")||st.getAttribute("data-reactid")||st.getAttribute("name");if(dt&&ue[Ct])return ue[Ct];var $e=window.getComputedStyle(st),rt=$e.getPropertyValue("box-sizing")||$e.getPropertyValue("-moz-box-sizing")||$e.getPropertyValue("-webkit-box-sizing"),St=parseFloat($e.getPropertyValue("padding-bottom"))+parseFloat($e.getPropertyValue("padding-top")),Pt=parseFloat($e.getPropertyValue("border-bottom-width"))+parseFloat($e.getPropertyValue("border-top-width")),wt=le.map(function(ft){return"".concat(ft,":").concat($e.getPropertyValue(ft))}).join(";"),pt={sizingStyle:wt,paddingSize:St,borderSize:Pt,boxSizing:rt};return dt&&Ct&&(ue[Ct]=pt),pt}function je(st){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,$e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ge||(ge=document.createElement("textarea"),ge.setAttribute("tab-index","-1"),ge.setAttribute("aria-hidden","true"),ge.setAttribute("name","hiddenTextarea"),document.body.appendChild(ge)),st.getAttribute("wrap")?ge.setAttribute("wrap",st.getAttribute("wrap")):ge.removeAttribute("wrap");var rt=Pe(st,dt),St=rt.paddingSize,Pt=rt.borderSize,wt=rt.boxSizing,pt=rt.sizingStyle;ge.setAttribute("style","".concat(pt,";").concat(ie)),ge.value=st.value||st.placeholder||"";var ft=void 0,ht=void 0,Et,mt=ge.scrollHeight;if(wt==="border-box"?mt+=Pt:wt==="content-box"&&(mt-=St),Ct!==null||$e!==null){ge.value=" ";var yt=ge.scrollHeight-St;Ct!==null&&(ft=yt*Ct,wt==="border-box"&&(ft=ft+St+Pt),mt=Math.max(ft,mt)),$e!==null&&(ht=yt*$e,wt==="border-box"&&(ht=ht+St+Pt),Et=mt>ht?"":"hidden",mt=Math.min(ht,mt))}var At={height:mt,overflowY:Et,resize:"none"};return ft&&(At.minHeight=ft),ht&&(At.maxHeight=ht),At}var Be=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,Ne=1,Ae=2,Ie=we.forwardRef(function(st,dt){var Ct=st,$e=Ct.prefixCls,rt=Ct.defaultValue,St=Ct.value,Pt=Ct.autoSize,wt=Ct.onResize,pt=Ct.className,ft=Ct.style,ht=Ct.disabled,Et=Ct.onChange,mt=Ct.onInternalAutoSize,yt=(0,fe.Z)(Ct,Be),At=(0,ve.Z)(rt,{value:St,postState:function(Jn){return Jn!=null?Jn:""}}),xt=(0,De.Z)(At,2),tt=xt[0],Ve=xt[1],xe=function(Jn){Ve(Jn.target.value),Et==null||Et(Jn)},Le=we.useRef();we.useImperativeHandle(dt,function(){return{textArea:Le.current}});var Ze=we.useMemo(function(){return Pt&&(0,de.Z)(Pt)==="object"?[Pt.minRows,Pt.maxRows]:[]},[Pt]),nt=(0,De.Z)(Ze,2),Re=nt[0],_e=nt[1],He=!!Pt,Qe=function(){try{if(document.activeElement===Le.current){var Jn=Le.current,Cr=Jn.selectionStart,cr=Jn.selectionEnd,kr=Jn.scrollTop;Le.current.setSelectionRange(Cr,cr),Le.current.scrollTop=kr}}catch(Kr){}},ut=we.useState(Ae),gt=(0,De.Z)(ut,2),Mt=gt[0],Nt=gt[1],Dt=we.useState(),Ht=(0,De.Z)(Dt,2),Xt=Ht[0],$t=Ht[1],Ut=function(){Nt(Fe)};(0,ee.Z)(function(){He&&Ut()},[St,Re,_e,He]),(0,ee.Z)(function(){if(Mt===Fe)Nt(Ne);else if(Mt===Ne){var jn=je(Le.current,!1,Re,_e);Nt(Ae),$t(jn)}else Qe()},[Mt]);var sn=we.useRef(),nn=function(){ae.Z.cancel(sn.current)},Wt=function(Jn){Mt===Ae&&(wt==null||wt(Jn),Pt&&(nn(),sn.current=(0,ae.Z)(function(){Ut()})))};we.useEffect(function(){return nn},[]);var bn=He?Xt:null,mn=(0,oe.Z)((0,oe.Z)({},ft),bn);return(Mt===Fe||Mt===Ne)&&(mn.overflowY="hidden",mn.overflowX="hidden"),we.createElement(z.Z,{onResize:Wt,disabled:!(Pt||wt)},we.createElement("textarea",(0,ct.Z)({},yt,{ref:Le,style:mn,className:ke()($e,pt,(0,Bt.Z)({},"".concat($e,"-disabled"),ht)),disabled:ht,value:tt,onChange:xe})))}),We=Ie,Ye=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ue=we.forwardRef(function(st,dt){var Ct,$e=st.defaultValue,rt=st.value,St=st.onFocus,Pt=st.onBlur,wt=st.onChange,pt=st.allowClear,ft=st.maxLength,ht=st.onCompositionStart,Et=st.onCompositionEnd,mt=st.suffix,yt=st.prefixCls,At=yt===void 0?"rc-textarea":yt,xt=st.showCount,tt=st.count,Ve=st.className,xe=st.style,Le=st.disabled,Ze=st.hidden,nt=st.classNames,Re=st.styles,_e=st.onResize,He=st.onClear,Qe=st.onPressEnter,ut=st.readOnly,gt=st.autoSize,Mt=st.onKeyDown,Nt=(0,fe.Z)(st,Ye),Dt=(0,ve.Z)($e,{value:rt,defaultValue:$e}),Ht=(0,De.Z)(Dt,2),Xt=Ht[0],$t=Ht[1],Ut=Xt==null?"":String(Xt),sn=we.useState(!1),nn=(0,De.Z)(sn,2),Wt=nn[0],bn=nn[1],mn=we.useRef(!1),jn=we.useState(null),Jn=(0,De.Z)(jn,2),Cr=Jn[0],cr=Jn[1],kr=(0,we.useRef)(null),Kr=(0,we.useRef)(null),Ur=function(){var Wr;return(Wr=Kr.current)===null||Wr===void 0?void 0:Wr.textArea},oi=function(){Ur().focus()};(0,we.useImperativeHandle)(dt,function(){var sr;return{resizableTextArea:Kr.current,focus:oi,blur:function(){Ur().blur()},nativeElement:((sr=kr.current)===null||sr===void 0?void 0:sr.nativeElement)||Ur()}}),(0,we.useEffect)(function(){bn(function(sr){return!Le&&sr})},[Le]);var vi=we.useState(null),Bi=(0,De.Z)(vi,2),Di=Bi[0],Ii=Bi[1];we.useEffect(function(){if(Di){var sr;(sr=Ur()).setSelectionRange.apply(sr,(0,ze.Z)(Di))}},[Di]);var Xi=(0,Se.Z)(tt,xt),et=(Ct=Xi.max)!==null&&Ct!==void 0?Ct:ft,fr=Number(et)>0,mr=Xi.strategy(Ut),Ai=!!et&&mr>et,ar=function(Wr,Li){var tr=Li;!mn.current&&Xi.exceedFormatter&&Xi.max&&Xi.strategy(Li)>Xi.max&&(tr=Xi.exceedFormatter(Li,{max:Xi.max}),Li!==tr&&Ii([Ur().selectionStart||0,Ur().selectionEnd||0])),$t(tr),(0,Me.rJ)(Wr.currentTarget,Wr,wt,tr)},Sr=function(Wr){mn.current=!0,ht==null||ht(Wr)},Ar=function(Wr){mn.current=!1,ar(Wr,Wr.currentTarget.value),Et==null||Et(Wr)},lo=function(Wr){ar(Wr,Wr.target.value)},on=function(Wr){Wr.key==="Enter"&&Qe&&Qe(Wr),Mt==null||Mt(Wr)},an=function(Wr){bn(!0),St==null||St(Wr)},tn=function(Wr){bn(!1),Pt==null||Pt(Wr)},vn=function(Wr){$t(""),oi(),(0,Me.rJ)(Ur(),Wr,wt)},gr=mt,pr;Xi.show&&(Xi.showFormatter?pr=Xi.showFormatter({value:Ut,count:mr,maxLength:et}):pr="".concat(mr).concat(fr?" / ".concat(et):""),gr=we.createElement(we.Fragment,null,gr,we.createElement("span",{className:ke()("".concat(At,"-data-count"),nt==null?void 0:nt.count),style:Re==null?void 0:Re.count},pr)));var ii=function(Wr){var Li;_e==null||_e(Wr),(Li=Ur())!==null&&Li!==void 0&&Li.style.height&&cr(!0)},Mn=!gt&&!xt&&!pt;return we.createElement(Ce.BaseInput,{ref:kr,value:Ut,allowClear:pt,handleReset:vn,suffix:gr,prefixCls:At,classNames:(0,oe.Z)((0,oe.Z)({},nt),{},{affixWrapper:ke()(nt==null?void 0:nt.affixWrapper,(0,Bt.Z)((0,Bt.Z)({},"".concat(At,"-show-count"),xt),"".concat(At,"-textarea-allow-clear"),pt))}),disabled:Le,focused:Wt,className:ke()(Ve,Ai&&"".concat(At,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},xe),Cr&&!Mn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof pr=="string"?pr:void 0}},hidden:Ze,readOnly:ut,onClear:He},we.createElement(We,(0,ct.Z)({},Nt,{autoSize:gt,maxLength:ft,onKeyDown:on,onChange:lo,onFocus:an,onBlur:tn,onCompositionStart:Sr,onCompositionEnd:Ar,className:ke()(nt==null?void 0:nt.textarea),style:(0,oe.Z)((0,oe.Z)({},Re==null?void 0:Re.textarea),{},{resize:xe==null?void 0:xe.resize}),disabled:Le,prefixCls:At,onResize:ii,ref:Kr,readOnly:ut})))}),Ke=Ue,ot=Ke},639:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ue}});var ct=at(14809),Bt=at(4635),oe=at(20439),ze=at(50298),De=at(62646),fe=at(59301),me=at(92310),ke=at.n(me),Ce=at(26112),Se=at(30699),Me=function(Pe){for(var je=Pe.prefixCls,Be=Pe.level,Fe=Pe.isStart,Ne=Pe.isEnd,Ae="".concat(je,"-indent-unit"),Ie=[],We=0;We<Be;We+=1)Ie.push(fe.createElement("span",{key:We,className:ke()(Ae,(0,Bt.Z)((0,Bt.Z)({},"".concat(Ae,"-start"),Fe[We]),"".concat(Ae,"-end"),Ne[We]))}));return fe.createElement("span",{"aria-hidden":"true",className:"".concat(je,"-indent")},Ie)},ve=fe.memo(Me),we=at(65065),de=at(34061),z=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ee="open",ae="close",ie="---",le=function(Pe){var je,Be,Fe,Ne=Pe.eventKey,Ae=Pe.className,Ie=Pe.style,We=Pe.dragOver,Ye=Pe.dragOverGapTop,Ue=Pe.dragOverGapBottom,Ke=Pe.isLeaf,ot=Pe.isStart,st=Pe.isEnd,dt=Pe.expanded,Ct=Pe.selected,$e=Pe.checked,rt=Pe.halfChecked,St=Pe.loading,Pt=Pe.domRef,wt=Pe.active,pt=Pe.data,ft=Pe.onMouseMove,ht=Pe.selectable,Et=(0,De.Z)(Pe,z),mt=fe.useContext(Se.k),yt=fe.useContext(Se.y),At=fe.useRef(null),xt=fe.useState(!1),tt=(0,ze.Z)(xt,2),Ve=tt[0],xe=tt[1],Le=!!(mt.disabled||Pe.disabled||(je=yt.nodeDisabled)!==null&&je!==void 0&&je.call(yt,pt)),Ze=fe.useMemo(function(){return!mt.checkable||Pe.checkable===!1?!1:mt.checkable},[mt.checkable,Pe.checkable]),nt=function(mr){Le||mt.onNodeSelect(mr,(0,de.F)(Pe))},Re=function(mr){Le||!Ze||Pe.disableCheckbox||mt.onNodeCheck(mr,(0,de.F)(Pe),!$e)},_e=fe.useMemo(function(){return typeof ht=="boolean"?ht:mt.selectable},[ht,mt.selectable]),He=function(mr){mt.onNodeClick(mr,(0,de.F)(Pe)),_e?nt(mr):Re(mr)},Qe=function(mr){mt.onNodeDoubleClick(mr,(0,de.F)(Pe))},ut=function(mr){mt.onNodeMouseEnter(mr,(0,de.F)(Pe))},gt=function(mr){mt.onNodeMouseLeave(mr,(0,de.F)(Pe))},Mt=function(mr){mt.onNodeContextMenu(mr,(0,de.F)(Pe))},Nt=fe.useMemo(function(){return!!(mt.draggable&&(!mt.draggable.nodeDraggable||mt.draggable.nodeDraggable(pt)))},[mt.draggable,pt]),Dt=function(mr){mr.stopPropagation(),xe(!0),mt.onNodeDragStart(mr,Pe);try{mr.dataTransfer.setData("text/plain","")}catch(Ai){}},Ht=function(mr){mr.preventDefault(),mr.stopPropagation(),mt.onNodeDragEnter(mr,Pe)},Xt=function(mr){mr.preventDefault(),mr.stopPropagation(),mt.onNodeDragOver(mr,Pe)},$t=function(mr){mr.stopPropagation(),mt.onNodeDragLeave(mr,Pe)},Ut=function(mr){mr.stopPropagation(),xe(!1),mt.onNodeDragEnd(mr,Pe)},sn=function(mr){mr.preventDefault(),mr.stopPropagation(),xe(!1),mt.onNodeDrop(mr,Pe)},nn=function(mr){St||mt.onNodeExpand(mr,(0,de.F)(Pe))},Wt=fe.useMemo(function(){var fr=(0,we.Z)(mt.keyEntities,Ne)||{},mr=fr.children;return!!(mr||[]).length},[mt.keyEntities,Ne]),bn=fe.useMemo(function(){return Ke===!1?!1:Ke||!mt.loadData&&!Wt||mt.loadData&&Pe.loaded&&!Wt},[Ke,mt.loadData,Wt,Pe.loaded]);fe.useEffect(function(){St||typeof mt.loadData=="function"&&dt&&!bn&&!Pe.loaded&&mt.onNodeLoad((0,de.F)(Pe))},[St,mt.loadData,mt.onNodeLoad,dt,bn,Pe]);var mn=fe.useMemo(function(){var fr;return(fr=mt.draggable)!==null&&fr!==void 0&&fr.icon?fe.createElement("span",{className:"".concat(mt.prefixCls,"-draggable-icon")},mt.draggable.icon):null},[mt.draggable]),jn=function(mr){var Ai=Pe.switcherIcon||mt.switcherIcon;return typeof Ai=="function"?Ai((0,oe.Z)((0,oe.Z)({},Pe),{},{isLeaf:mr})):Ai},Jn=function(){if(bn){var mr=jn(!0);return mr!==!1?fe.createElement("span",{className:ke()("".concat(mt.prefixCls,"-switcher"),"".concat(mt.prefixCls,"-switcher-noop"))},mr):null}var Ai=jn(!1);return Ai!==!1?fe.createElement("span",{onClick:nn,className:ke()("".concat(mt.prefixCls,"-switcher"),"".concat(mt.prefixCls,"-switcher_").concat(dt?ee:ae))},Ai):null},Cr=fe.useMemo(function(){if(!Ze)return null;var fr=typeof Ze!="boolean"?Ze:null;return fe.createElement("span",{className:ke()("".concat(mt.prefixCls,"-checkbox"),(0,Bt.Z)((0,Bt.Z)((0,Bt.Z)({},"".concat(mt.prefixCls,"-checkbox-checked"),$e),"".concat(mt.prefixCls,"-checkbox-indeterminate"),!$e&&rt),"".concat(mt.prefixCls,"-checkbox-disabled"),Le||Pe.disableCheckbox)),onClick:Re,role:"checkbox","aria-checked":rt?"mixed":$e,"aria-disabled":Le||Pe.disableCheckbox,"aria-label":"Select ".concat(typeof Pe.title=="string"?Pe.title:"tree node")},fr)},[Ze,$e,rt,Le,Pe.disableCheckbox,Pe.title]),cr=fe.useMemo(function(){return bn?null:dt?ee:ae},[bn,dt]),kr=fe.useMemo(function(){return fe.createElement("span",{className:ke()("".concat(mt.prefixCls,"-iconEle"),"".concat(mt.prefixCls,"-icon__").concat(cr||"docu"),(0,Bt.Z)({},"".concat(mt.prefixCls,"-icon_loading"),St))})},[mt.prefixCls,cr,St]),Kr=fe.useMemo(function(){var fr=!!mt.draggable,mr=!Pe.disabled&&fr&&mt.dragOverNodeKey===Ne;return mr?mt.dropIndicatorRender({dropPosition:mt.dropPosition,dropLevelOffset:mt.dropLevelOffset,indent:mt.indent,prefixCls:mt.prefixCls,direction:mt.direction}):null},[mt.dropPosition,mt.dropLevelOffset,mt.indent,mt.prefixCls,mt.direction,mt.draggable,mt.dragOverNodeKey,mt.dropIndicatorRender]),Ur=fe.useMemo(function(){var fr=Pe.title,mr=fr===void 0?ie:fr,Ai="".concat(mt.prefixCls,"-node-content-wrapper"),ar;if(mt.showIcon){var Sr=Pe.icon||mt.icon;ar=Sr?fe.createElement("span",{className:ke()("".concat(mt.prefixCls,"-iconEle"),"".concat(mt.prefixCls,"-icon__customize"))},typeof Sr=="function"?Sr(Pe):Sr):kr}else mt.loadData&&St&&(ar=kr);var Ar;return typeof mr=="function"?Ar=mr(pt):mt.titleRender?Ar=mt.titleRender(pt):Ar=mr,fe.createElement("span",{ref:At,title:typeof mr=="string"?mr:"",className:ke()(Ai,"".concat(Ai,"-").concat(cr||"normal"),(0,Bt.Z)({},"".concat(mt.prefixCls,"-node-selected"),!Le&&(Ct||Ve))),onMouseEnter:ut,onMouseLeave:gt,onContextMenu:Mt,onClick:He,onDoubleClick:Qe},ar,fe.createElement("span",{className:"".concat(mt.prefixCls,"-title")},Ar),Kr)},[mt.prefixCls,mt.showIcon,Pe,mt.icon,kr,mt.titleRender,pt,cr,ut,gt,Mt,He,Qe]),oi=(0,Ce.Z)(Et,{aria:!0,data:!0}),vi=(0,we.Z)(mt.keyEntities,Ne)||{},Bi=vi.level,Di=st[st.length-1],Ii=!Le&&Nt,Xi=mt.draggingNodeKey===Ne,et=ht!==void 0?{"aria-selected":!!ht}:void 0;return fe.createElement("div",(0,ct.Z)({ref:Pt,role:"treeitem","aria-expanded":Ke?void 0:dt,className:ke()(Ae,"".concat(mt.prefixCls,"-treenode"),(Fe={},(0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)(Fe,"".concat(mt.prefixCls,"-treenode-disabled"),Le),"".concat(mt.prefixCls,"-treenode-switcher-").concat(dt?"open":"close"),!Ke),"".concat(mt.prefixCls,"-treenode-checkbox-checked"),$e),"".concat(mt.prefixCls,"-treenode-checkbox-indeterminate"),rt),"".concat(mt.prefixCls,"-treenode-selected"),Ct),"".concat(mt.prefixCls,"-treenode-loading"),St),"".concat(mt.prefixCls,"-treenode-active"),wt),"".concat(mt.prefixCls,"-treenode-leaf-last"),Di),"".concat(mt.prefixCls,"-treenode-draggable"),Nt),"dragging",Xi),(0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)((0,Bt.Z)(Fe,"drop-target",mt.dropTargetKey===Ne),"drop-container",mt.dropContainerKey===Ne),"drag-over",!Le&&We),"drag-over-gap-top",!Le&&Ye),"drag-over-gap-bottom",!Le&&Ue),"filter-node",(Be=mt.filterTreeNode)===null||Be===void 0?void 0:Be.call(mt,(0,de.F)(Pe))),"".concat(mt.prefixCls,"-treenode-leaf"),bn))),style:Ie,draggable:Ii,onDragStart:Ii?Dt:void 0,onDragEnter:Nt?Ht:void 0,onDragOver:Nt?Xt:void 0,onDragLeave:Nt?$t:void 0,onDrop:Nt?sn:void 0,onDragEnd:Nt?Ut:void 0,onMouseMove:ft},et,oi),fe.createElement(ve,{prefixCls:mt.prefixCls,level:Bi,isStart:ot,isEnd:st}),mn,Jn(),Cr,Ur)};le.isTreeNode=1;var ue=le},30699:function(gn,cn,at){"use strict";at.d(cn,{k:function(){return Bt},y:function(){return oe}});var ct=at(59301),Bt=ct.createContext(null),oe=ct.createContext({})},29530:function(gn,cn,at){"use strict";at.d(cn,{OF:function(){return Ne.Z},y6:function(){return ae.y},ZP:function(){return Le}});var ct=at(14809),Bt=at(93664),oe=at(20439),ze=at(95190),De=at(99153),fe=at(84851),me=at(13028),ke=at(19257),Ce=at(93046),Se=at(4635),Me=at(92310),ve=at.n(Me),we=at(10228),de=at(26112),z=at(48736),ee=at(59301),ae=at(30699),ie=function(nt){var Re=nt.dropPosition,_e=nt.dropLevelOffset,He=nt.indent,Qe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Re){case-1:Qe.top=0,Qe.left=-_e*He;break;case 1:Qe.bottom=0,Qe.left=-_e*He;break;case 0:Qe.bottom=0,Qe.left=He;break}return ee.createElement("div",{style:Qe})},le=ie;function ue(Ze){if(Ze==null)throw new TypeError("Cannot destructure "+Ze)}var ge=at(50298),Pe=at(62646),je=at(34280),Be=at(65283),Fe=at(77900),Ne=at(639);function Ae(Ze,nt){var Re=ee.useState(!1),_e=(0,ge.Z)(Re,2),He=_e[0],Qe=_e[1];(0,je.Z)(function(){if(He)return Ze(),function(){nt()}},[He]),(0,je.Z)(function(){return Qe(!0),function(){Qe(!1)}},[])}var Ie=Ae,We=at(34061),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ue=ee.forwardRef(function(Ze,nt){var Re=Ze.className,_e=Ze.style,He=Ze.motion,Qe=Ze.motionNodes,ut=Ze.motionType,gt=Ze.onMotionStart,Mt=Ze.onMotionEnd,Nt=Ze.active,Dt=Ze.treeNodeRequiredProps,Ht=(0,Pe.Z)(Ze,Ye),Xt=ee.useState(!0),$t=(0,ge.Z)(Xt,2),Ut=$t[0],sn=$t[1],nn=ee.useContext(ae.k),Wt=nn.prefixCls,bn=Qe&&ut!=="hide";(0,je.Z)(function(){Qe&&bn!==Ut&&sn(bn)},[Qe]);var mn=function(){Qe&&gt()},jn=ee.useRef(!1),Jn=function(){Qe&&!jn.current&&(jn.current=!0,Mt())};Ie(mn,Jn);var Cr=function(kr){bn===kr&&Jn()};return Qe?ee.createElement(Fe.default,(0,ct.Z)({ref:nt,visible:Ut},He,{motionAppear:ut==="show",onVisibleChanged:Cr}),function(cr,kr){var Kr=cr.className,Ur=cr.style;return ee.createElement("div",{ref:kr,className:ve()("".concat(Wt,"-treenode-motion"),Kr),style:Ur},Qe.map(function(oi){var vi=Object.assign({},(ue(oi.data),oi.data)),Bi=oi.title,Di=oi.key,Ii=oi.isStart,Xi=oi.isEnd;delete vi.children;var et=(0,We.H8)(Di,Dt);return ee.createElement(Ne.Z,(0,ct.Z)({},vi,et,{title:Bi,active:Nt,data:oi.data,key:Di,isStart:Ii,isEnd:Xi}))}))}):ee.createElement(Ne.Z,(0,ct.Z)({domRef:nt,className:Re,style:_e},Ht,{active:Nt}))}),Ke=Ue;function ot(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Re=Ze.length,_e=nt.length;if(Math.abs(Re-_e)!==1)return{add:!1,key:null};function He(Qe,ut){var gt=new Map;Qe.forEach(function(Nt){gt.set(Nt,!0)});var Mt=ut.filter(function(Nt){return!gt.has(Nt)});return Mt.length===1?Mt[0]:null}return Re<_e?{add:!0,key:He(Ze,nt)}:{add:!1,key:He(nt,Ze)}}function st(Ze,nt,Re){var _e=Ze.findIndex(function(gt){return gt.key===Re}),He=Ze[_e+1],Qe=nt.findIndex(function(gt){return gt.key===Re});if(He){var ut=nt.findIndex(function(gt){return gt.key===He.key});return nt.slice(Qe+1,ut)}return nt.slice(Qe+1)}var dt=["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"],Ct={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},$e=function(){},rt="RC_TREE_MOTION_".concat(Math.random()),St={key:rt},Pt={key:rt,level:0,index:0,pos:"0",node:St,nodes:[St]},wt={parent:null,children:[],pos:Pt.pos,data:St,title:null,key:rt,isStart:[],isEnd:[]};function pt(Ze,nt,Re,_e){return nt===!1||!Re?Ze:Ze.slice(0,Math.ceil(Re/_e)+1)}function ft(Ze){var nt=Ze.key,Re=Ze.pos;return(0,We.km)(nt,Re)}function ht(Ze){for(var nt=String(Ze.data.key),Re=Ze;Re.parent;)Re=Re.parent,nt="".concat(Re.data.key," > ").concat(nt);return nt}var Et=ee.forwardRef(function(Ze,nt){var Re=Ze.prefixCls,_e=Ze.data,He=Ze.selectable,Qe=Ze.checkable,ut=Ze.expandedKeys,gt=Ze.selectedKeys,Mt=Ze.checkedKeys,Nt=Ze.loadedKeys,Dt=Ze.loadingKeys,Ht=Ze.halfCheckedKeys,Xt=Ze.keyEntities,$t=Ze.disabled,Ut=Ze.dragging,sn=Ze.dragOverNodeKey,nn=Ze.dropPosition,Wt=Ze.motion,bn=Ze.height,mn=Ze.itemHeight,jn=Ze.virtual,Jn=Ze.scrollWidth,Cr=Ze.focusable,cr=Ze.activeItem,kr=Ze.focused,Kr=Ze.tabIndex,Ur=Ze.onKeyDown,oi=Ze.onFocus,vi=Ze.onBlur,Bi=Ze.onActiveChange,Di=Ze.onListChangeStart,Ii=Ze.onListChangeEnd,Xi=(0,Pe.Z)(Ze,dt),et=ee.useRef(null),fr=ee.useRef(null);ee.useImperativeHandle(nt,function(){return{scrollTo:function(An){et.current.scrollTo(An)},getIndentWidth:function(){return fr.current.offsetWidth}}});var mr=ee.useState(ut),Ai=(0,ge.Z)(mr,2),ar=Ai[0],Sr=Ai[1],Ar=ee.useState(_e),lo=(0,ge.Z)(Ar,2),on=lo[0],an=lo[1],tn=ee.useState(_e),vn=(0,ge.Z)(tn,2),gr=vn[0],pr=vn[1],ii=ee.useState([]),Mn=(0,ge.Z)(ii,2),sr=Mn[0],Wr=Mn[1],Li=ee.useState(null),tr=(0,ge.Z)(Li,2),Ot=tr[0],Kt=tr[1],Dn=ee.useRef(_e);Dn.current=_e;function Ln(){var Bn=Dn.current;an(Bn),pr(Bn),Wr([]),Kt(null),Ii()}(0,je.Z)(function(){Sr(ut);var Bn=ot(ar,ut);if(Bn.key!==null)if(Bn.add){var An=on.findIndex(function(dr){var dn=dr.key;return dn===Bn.key}),nr=pt(st(on,_e,Bn.key),jn,bn,mn),_n=on.slice();_n.splice(An+1,0,wt),pr(_n),Wr(nr),Kt("show")}else{var Xn=_e.findIndex(function(dr){var dn=dr.key;return dn===Bn.key}),ur=pt(st(_e,on,Bn.key),jn,bn,mn),zr=_e.slice();zr.splice(Xn+1,0,wt),pr(zr),Wr(ur),Kt("hide")}else on!==_e&&(an(_e),pr(_e))},[ut,_e]),ee.useEffect(function(){Ut||Ln()},[Ut]);var en=Wt?gr:_e,Un={expandedKeys:ut,selectedKeys:gt,loadedKeys:Nt,loadingKeys:Dt,checkedKeys:Mt,halfCheckedKeys:Ht,dragOverNodeKey:sn,dropPosition:nn,keyEntities:Xt};return ee.createElement(ee.Fragment,null,kr&&cr&&ee.createElement("span",{style:Ct,"aria-live":"assertive"},ht(cr)),ee.createElement("div",null,ee.createElement("input",{style:Ct,disabled:Cr===!1||$t,tabIndex:Cr!==!1?Kr:null,onKeyDown:Ur,onFocus:oi,onBlur:vi,value:"",onChange:$e,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Re,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Re,"-indent")},ee.createElement("div",{ref:fr,className:"".concat(Re,"-indent-unit")}))),ee.createElement(Be.Z,(0,ct.Z)({},Xi,{data:en,itemKey:ft,height:bn,fullHeight:!1,virtual:jn,itemHeight:mn,scrollWidth:Jn,prefixCls:"".concat(Re,"-list"),ref:et,role:"tree",onVisibleChange:function(An){An.every(function(nr){return ft(nr)!==rt})&&Ln()}}),function(Bn){var An=Bn.pos,nr=Object.assign({},(ue(Bn.data),Bn.data)),_n=Bn.title,Xn=Bn.key,ur=Bn.isStart,zr=Bn.isEnd,dr=(0,We.km)(Xn,An);delete nr.key,delete nr.children;var dn=(0,We.H8)(dr,Un);return ee.createElement(Ke,(0,ct.Z)({},nr,dn,{title:_n,active:!!cr&&Xn===cr.key,pos:An,data:Bn.data,isStart:ur,isEnd:zr,motion:Wt,motionNodes:Xn===rt?sr:null,motionType:Ot,onMotionStart:Di,onMotionEnd:Ln,treeNodeRequiredProps:Un,onMouseMove:function(){Bi(null)}}))}))}),mt=Et,yt=at(82661),At=at(34643),xt=at(65065),tt=10,Ve=function(Ze){(0,ke.Z)(Re,Ze);var nt=(0,Ce.Z)(Re);function Re(){var _e;(0,De.Z)(this,Re);for(var He=arguments.length,Qe=new Array(He),ut=0;ut<He;ut++)Qe[ut]=arguments[ut];return _e=nt.call.apply(nt,[this].concat(Qe)),(0,Se.Z)((0,me.Z)(_e),"destroyed",!1),(0,Se.Z)((0,me.Z)(_e),"delayedDragEnterLogic",void 0),(0,Se.Z)((0,me.Z)(_e),"loadingRetryTimes",{}),(0,Se.Z)((0,me.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,We.w$)()}),(0,Se.Z)((0,me.Z)(_e),"dragStartMousePosition",null),(0,Se.Z)((0,me.Z)(_e),"dragNodeProps",null),(0,Se.Z)((0,me.Z)(_e),"currentMouseOverDroppableNodeKey",null),(0,Se.Z)((0,me.Z)(_e),"listRef",ee.createRef()),(0,Se.Z)((0,me.Z)(_e),"onNodeDragStart",function(gt,Mt){var Nt=_e.state,Dt=Nt.expandedKeys,Ht=Nt.keyEntities,Xt=_e.props.onDragStart,$t=Mt.eventKey;_e.dragNodeProps=Mt,_e.dragStartMousePosition={x:gt.clientX,y:gt.clientY};var Ut=(0,yt._5)(Dt,$t);_e.setState({draggingNodeKey:$t,dragChildrenKeys:(0,yt.wA)($t,Ht),indent:_e.listRef.current.getIndentWidth()}),_e.setExpandedKeys(Ut),window.addEventListener("dragend",_e.onWindowDragEnd),Xt==null||Xt({event:gt,node:(0,We.F)(Mt)})}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragEnter",function(gt,Mt){var Nt=_e.state,Dt=Nt.expandedKeys,Ht=Nt.keyEntities,Xt=Nt.dragChildrenKeys,$t=Nt.flattenNodes,Ut=Nt.indent,sn=_e.props,nn=sn.onDragEnter,Wt=sn.onExpand,bn=sn.allowDrop,mn=sn.direction,jn=Mt.pos,Jn=Mt.eventKey;if(_e.currentMouseOverDroppableNodeKey!==Jn&&(_e.currentMouseOverDroppableNodeKey=Jn),!_e.dragNodeProps){_e.resetDragState();return}var Cr=(0,yt.OM)(gt,_e.dragNodeProps,Mt,Ut,_e.dragStartMousePosition,bn,$t,Ht,Dt,mn),cr=Cr.dropPosition,kr=Cr.dropLevelOffset,Kr=Cr.dropTargetKey,Ur=Cr.dropContainerKey,oi=Cr.dropTargetPos,vi=Cr.dropAllowed,Bi=Cr.dragOverNodeKey;if(Xt.includes(Kr)||!vi){_e.resetDragState();return}if(_e.delayedDragEnterLogic||(_e.delayedDragEnterLogic={}),Object.keys(_e.delayedDragEnterLogic).forEach(function(Di){clearTimeout(_e.delayedDragEnterLogic[Di])}),_e.dragNodeProps.eventKey!==Mt.eventKey&&(gt.persist(),_e.delayedDragEnterLogic[jn]=window.setTimeout(function(){if(_e.state.draggingNodeKey!==null){var Di=(0,ze.Z)(Dt),Ii=(0,xt.Z)(Ht,Mt.eventKey);Ii&&(Ii.children||[]).length&&(Di=(0,yt.L0)(Dt,Mt.eventKey)),_e.props.hasOwnProperty("expandedKeys")||_e.setExpandedKeys(Di),Wt==null||Wt(Di,{node:(0,We.F)(Mt),expanded:!0,nativeEvent:gt.nativeEvent})}},800)),_e.dragNodeProps.eventKey===Kr&&kr===0){_e.resetDragState();return}_e.setState({dragOverNodeKey:Bi,dropPosition:cr,dropLevelOffset:kr,dropTargetKey:Kr,dropContainerKey:Ur,dropTargetPos:oi,dropAllowed:vi}),nn==null||nn({event:gt,node:(0,We.F)(Mt),expandedKeys:Dt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragOver",function(gt,Mt){var Nt=_e.state,Dt=Nt.dragChildrenKeys,Ht=Nt.flattenNodes,Xt=Nt.keyEntities,$t=Nt.expandedKeys,Ut=Nt.indent,sn=_e.props,nn=sn.onDragOver,Wt=sn.allowDrop,bn=sn.direction;if(_e.dragNodeProps){var mn=(0,yt.OM)(gt,_e.dragNodeProps,Mt,Ut,_e.dragStartMousePosition,Wt,Ht,Xt,$t,bn),jn=mn.dropPosition,Jn=mn.dropLevelOffset,Cr=mn.dropTargetKey,cr=mn.dropContainerKey,kr=mn.dropTargetPos,Kr=mn.dropAllowed,Ur=mn.dragOverNodeKey;Dt.includes(Cr)||!Kr||(_e.dragNodeProps.eventKey===Cr&&Jn===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():jn===_e.state.dropPosition&&Jn===_e.state.dropLevelOffset&&Cr===_e.state.dropTargetKey&&cr===_e.state.dropContainerKey&&kr===_e.state.dropTargetPos&&Kr===_e.state.dropAllowed&&Ur===_e.state.dragOverNodeKey||_e.setState({dropPosition:jn,dropLevelOffset:Jn,dropTargetKey:Cr,dropContainerKey:cr,dropTargetPos:kr,dropAllowed:Kr,dragOverNodeKey:Ur}),nn==null||nn({event:gt,node:(0,We.F)(Mt)}))}}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragLeave",function(gt,Mt){_e.currentMouseOverDroppableNodeKey===Mt.eventKey&&!gt.currentTarget.contains(gt.relatedTarget)&&(_e.resetDragState(),_e.currentMouseOverDroppableNodeKey=null);var Nt=_e.props.onDragLeave;Nt==null||Nt({event:gt,node:(0,We.F)(Mt)})}),(0,Se.Z)((0,me.Z)(_e),"onWindowDragEnd",function(gt){_e.onNodeDragEnd(gt,null,!0),window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragEnd",function(gt,Mt){var Nt=_e.props.onDragEnd;_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Nt==null||Nt({event:gt,node:(0,We.F)(Mt)}),_e.dragNodeProps=null,window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDrop",function(gt,Mt){var Nt,Dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ht=_e.state,Xt=Ht.dragChildrenKeys,$t=Ht.dropPosition,Ut=Ht.dropTargetKey,sn=Ht.dropTargetPos,nn=Ht.dropAllowed;if(nn){var Wt=_e.props.onDrop;if(_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Ut!==null){var bn=(0,oe.Z)((0,oe.Z)({},(0,We.H8)(Ut,_e.getTreeNodeRequiredProps())),{},{active:((Nt=_e.getActiveItem())===null||Nt===void 0?void 0:Nt.key)===Ut,data:(0,xt.Z)(_e.state.keyEntities,Ut).node}),mn=Xt.includes(Ut);(0,z.ZP)(!mn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var jn=(0,yt.yx)(sn),Jn={event:gt,node:(0,We.F)(bn),dragNode:_e.dragNodeProps?(0,We.F)(_e.dragNodeProps):null,dragNodesKeys:[_e.dragNodeProps.eventKey].concat(Xt),dropToGap:$t!==0,dropPosition:$t+Number(jn[jn.length-1])};Dt||Wt==null||Wt(Jn),_e.dragNodeProps=null}}}),(0,Se.Z)((0,me.Z)(_e),"cleanDragState",function(){var gt=_e.state.draggingNodeKey;gt!==null&&_e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_e.dragStartMousePosition=null,_e.currentMouseOverDroppableNodeKey=null}),(0,Se.Z)((0,me.Z)(_e),"triggerExpandActionExpand",function(gt,Mt){var Nt=_e.state,Dt=Nt.expandedKeys,Ht=Nt.flattenNodes,Xt=Mt.expanded,$t=Mt.key,Ut=Mt.isLeaf;if(!(Ut||gt.shiftKey||gt.metaKey||gt.ctrlKey)){var sn=Ht.filter(function(Wt){return Wt.key===$t})[0],nn=(0,We.F)((0,oe.Z)((0,oe.Z)({},(0,We.H8)($t,_e.getTreeNodeRequiredProps())),{},{data:sn.data}));_e.setExpandedKeys(Xt?(0,yt._5)(Dt,$t):(0,yt.L0)(Dt,$t)),_e.onNodeExpand(gt,nn)}}),(0,Se.Z)((0,me.Z)(_e),"onNodeClick",function(gt,Mt){var Nt=_e.props,Dt=Nt.onClick,Ht=Nt.expandAction;Ht==="click"&&_e.triggerExpandActionExpand(gt,Mt),Dt==null||Dt(gt,Mt)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDoubleClick",function(gt,Mt){var Nt=_e.props,Dt=Nt.onDoubleClick,Ht=Nt.expandAction;Ht==="doubleClick"&&_e.triggerExpandActionExpand(gt,Mt),Dt==null||Dt(gt,Mt)}),(0,Se.Z)((0,me.Z)(_e),"onNodeSelect",function(gt,Mt){var Nt=_e.state.selectedKeys,Dt=_e.state,Ht=Dt.keyEntities,Xt=Dt.fieldNames,$t=_e.props,Ut=$t.onSelect,sn=$t.multiple,nn=Mt.selected,Wt=Mt[Xt.key],bn=!nn;bn?sn?Nt=(0,yt.L0)(Nt,Wt):Nt=[Wt]:Nt=(0,yt._5)(Nt,Wt);var mn=Nt.map(function(jn){var Jn=(0,xt.Z)(Ht,jn);return Jn?Jn.node:null}).filter(Boolean);_e.setUncontrolledState({selectedKeys:Nt}),Ut==null||Ut(Nt,{event:"select",selected:bn,node:Mt,selectedNodes:mn,nativeEvent:gt.nativeEvent})}),(0,Se.Z)((0,me.Z)(_e),"onNodeCheck",function(gt,Mt,Nt){var Dt=_e.state,Ht=Dt.keyEntities,Xt=Dt.checkedKeys,$t=Dt.halfCheckedKeys,Ut=_e.props,sn=Ut.checkStrictly,nn=Ut.onCheck,Wt=Mt.key,bn,mn={event:"check",node:Mt,checked:Nt,nativeEvent:gt.nativeEvent};if(sn){var jn=Nt?(0,yt.L0)(Xt,Wt):(0,yt._5)(Xt,Wt),Jn=(0,yt._5)($t,Wt);bn={checked:jn,halfChecked:Jn},mn.checkedNodes=jn.map(function(oi){return(0,xt.Z)(Ht,oi)}).filter(Boolean).map(function(oi){return oi.node}),_e.setUncontrolledState({checkedKeys:jn})}else{var Cr=(0,At.S)([].concat((0,ze.Z)(Xt),[Wt]),!0,Ht),cr=Cr.checkedKeys,kr=Cr.halfCheckedKeys;if(!Nt){var Kr=new Set(cr);Kr.delete(Wt);var Ur=(0,At.S)(Array.from(Kr),{checked:!1,halfCheckedKeys:kr},Ht);cr=Ur.checkedKeys,kr=Ur.halfCheckedKeys}bn=cr,mn.checkedNodes=[],mn.checkedNodesPositions=[],mn.halfCheckedKeys=kr,cr.forEach(function(oi){var vi=(0,xt.Z)(Ht,oi);if(vi){var Bi=vi.node,Di=vi.pos;mn.checkedNodes.push(Bi),mn.checkedNodesPositions.push({node:Bi,pos:Di})}}),_e.setUncontrolledState({checkedKeys:cr},!1,{halfCheckedKeys:kr})}nn==null||nn(bn,mn)}),(0,Se.Z)((0,me.Z)(_e),"onNodeLoad",function(gt){var Mt,Nt=gt.key,Dt=_e.state.keyEntities,Ht=(0,xt.Z)(Dt,Nt);if(!(Ht!=null&&(Mt=Ht.children)!==null&&Mt!==void 0&&Mt.length)){var Xt=new Promise(function($t,Ut){_e.setState(function(sn){var nn=sn.loadedKeys,Wt=nn===void 0?[]:nn,bn=sn.loadingKeys,mn=bn===void 0?[]:bn,jn=_e.props,Jn=jn.loadData,Cr=jn.onLoad;if(!Jn||Wt.includes(Nt)||mn.includes(Nt))return null;var cr=Jn(gt);return cr.then(function(){var kr=_e.state.loadedKeys,Kr=(0,yt.L0)(kr,Nt);Cr==null||Cr(Kr,{event:"load",node:gt}),_e.setUncontrolledState({loadedKeys:Kr}),_e.setState(function(Ur){return{loadingKeys:(0,yt._5)(Ur.loadingKeys,Nt)}}),$t()}).catch(function(kr){if(_e.setState(function(Ur){return{loadingKeys:(0,yt._5)(Ur.loadingKeys,Nt)}}),_e.loadingRetryTimes[Nt]=(_e.loadingRetryTimes[Nt]||0)+1,_e.loadingRetryTimes[Nt]>=tt){var Kr=_e.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_e.setUncontrolledState({loadedKeys:(0,yt.L0)(Kr,Nt)}),$t()}Ut(kr)}),{loadingKeys:(0,yt.L0)(mn,Nt)}})});return Xt.catch(function(){}),Xt}}),(0,Se.Z)((0,me.Z)(_e),"onNodeMouseEnter",function(gt,Mt){var Nt=_e.props.onMouseEnter;Nt==null||Nt({event:gt,node:Mt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeMouseLeave",function(gt,Mt){var Nt=_e.props.onMouseLeave;Nt==null||Nt({event:gt,node:Mt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeContextMenu",function(gt,Mt){var Nt=_e.props.onRightClick;Nt&&(gt.preventDefault(),Nt({event:gt,node:Mt}))}),(0,Se.Z)((0,me.Z)(_e),"onFocus",function(){var gt=_e.props.onFocus;_e.setState({focused:!0});for(var Mt=arguments.length,Nt=new Array(Mt),Dt=0;Dt<Mt;Dt++)Nt[Dt]=arguments[Dt];gt==null||gt.apply(void 0,Nt)}),(0,Se.Z)((0,me.Z)(_e),"onBlur",function(){var gt=_e.props.onBlur;_e.setState({focused:!1}),_e.onActiveChange(null);for(var Mt=arguments.length,Nt=new Array(Mt),Dt=0;Dt<Mt;Dt++)Nt[Dt]=arguments[Dt];gt==null||gt.apply(void 0,Nt)}),(0,Se.Z)((0,me.Z)(_e),"getTreeNodeRequiredProps",function(){var gt=_e.state,Mt=gt.expandedKeys,Nt=gt.selectedKeys,Dt=gt.loadedKeys,Ht=gt.loadingKeys,Xt=gt.checkedKeys,$t=gt.halfCheckedKeys,Ut=gt.dragOverNodeKey,sn=gt.dropPosition,nn=gt.keyEntities;return{expandedKeys:Mt||[],selectedKeys:Nt||[],loadedKeys:Dt||[],loadingKeys:Ht||[],checkedKeys:Xt||[],halfCheckedKeys:$t||[],dragOverNodeKey:Ut,dropPosition:sn,keyEntities:nn}}),(0,Se.Z)((0,me.Z)(_e),"setExpandedKeys",function(gt){var Mt=_e.state,Nt=Mt.treeData,Dt=Mt.fieldNames,Ht=(0,We.oH)(Nt,gt,Dt);_e.setUncontrolledState({expandedKeys:gt,flattenNodes:Ht},!0)}),(0,Se.Z)((0,me.Z)(_e),"onNodeExpand",function(gt,Mt){var Nt=_e.state.expandedKeys,Dt=_e.state,Ht=Dt.listChanging,Xt=Dt.fieldNames,$t=_e.props,Ut=$t.onExpand,sn=$t.loadData,nn=Mt.expanded,Wt=Mt[Xt.key];if(!Ht){var bn=Nt.includes(Wt),mn=!nn;if((0,z.ZP)(nn&&bn||!nn&&!bn,"Expand state not sync with index check"),Nt=mn?(0,yt.L0)(Nt,Wt):(0,yt._5)(Nt,Wt),_e.setExpandedKeys(Nt),Ut==null||Ut(Nt,{node:Mt,expanded:mn,nativeEvent:gt.nativeEvent}),mn&&sn){var jn=_e.onNodeLoad(Mt);jn&&jn.then(function(){var Jn=(0,We.oH)(_e.state.treeData,Nt,Xt);_e.setUncontrolledState({flattenNodes:Jn})}).catch(function(){var Jn=_e.state.expandedKeys,Cr=(0,yt._5)(Jn,Wt);_e.setExpandedKeys(Cr)})}}}),(0,Se.Z)((0,me.Z)(_e),"onListChangeStart",function(){_e.setUncontrolledState({listChanging:!0})}),(0,Se.Z)((0,me.Z)(_e),"onListChangeEnd",function(){setTimeout(function(){_e.setUncontrolledState({listChanging:!1})})}),(0,Se.Z)((0,me.Z)(_e),"onActiveChange",function(gt){var Mt=_e.state.activeKey,Nt=_e.props,Dt=Nt.onActiveChange,Ht=Nt.itemScrollOffset,Xt=Ht===void 0?0:Ht;Mt!==gt&&(_e.setState({activeKey:gt}),gt!==null&&_e.scrollTo({key:gt,offset:Xt}),Dt==null||Dt(gt))}),(0,Se.Z)((0,me.Z)(_e),"getActiveItem",function(){var gt=_e.state,Mt=gt.activeKey,Nt=gt.flattenNodes;return Mt===null?null:Nt.find(function(Dt){var Ht=Dt.key;return Ht===Mt})||null}),(0,Se.Z)((0,me.Z)(_e),"offsetActiveKey",function(gt){var Mt=_e.state,Nt=Mt.flattenNodes,Dt=Mt.activeKey,Ht=Nt.findIndex(function(Ut){var sn=Ut.key;return sn===Dt});Ht===-1&&gt<0&&(Ht=Nt.length),Ht=(Ht+gt+Nt.length)%Nt.length;var Xt=Nt[Ht];if(Xt){var $t=Xt.key;_e.onActiveChange($t)}else _e.onActiveChange(null)}),(0,Se.Z)((0,me.Z)(_e),"onKeyDown",function(gt){var Mt=_e.state,Nt=Mt.activeKey,Dt=Mt.expandedKeys,Ht=Mt.checkedKeys,Xt=Mt.fieldNames,$t=_e.props,Ut=$t.onKeyDown,sn=$t.checkable,nn=$t.selectable;switch(gt.which){case we.Z.UP:{_e.offsetActiveKey(-1),gt.preventDefault();break}case we.Z.DOWN:{_e.offsetActiveKey(1),gt.preventDefault();break}}var Wt=_e.getActiveItem();if(Wt&&Wt.data){var bn=_e.getTreeNodeRequiredProps(),mn=Wt.data.isLeaf===!1||!!(Wt.data[Xt.children]||[]).length,jn=(0,We.F)((0,oe.Z)((0,oe.Z)({},(0,We.H8)(Nt,bn)),{},{data:Wt.data,active:!0}));switch(gt.which){case we.Z.LEFT:{mn&&Dt.includes(Nt)?_e.onNodeExpand({},jn):Wt.parent&&_e.onActiveChange(Wt.parent.key),gt.preventDefault();break}case we.Z.RIGHT:{mn&&!Dt.includes(Nt)?_e.onNodeExpand({},jn):Wt.children&&Wt.children.length&&_e.onActiveChange(Wt.children[0].key),gt.preventDefault();break}case we.Z.ENTER:case we.Z.SPACE:{sn&&!jn.disabled&&jn.checkable!==!1&&!jn.disableCheckbox?_e.onNodeCheck({},jn,!Ht.includes(Nt)):!sn&&nn&&!jn.disabled&&jn.selectable!==!1&&_e.onNodeSelect({},jn);break}}}Ut==null||Ut(gt)}),(0,Se.Z)((0,me.Z)(_e),"setUncontrolledState",function(gt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_e.destroyed){var Dt=!1,Ht=!0,Xt={};Object.keys(gt).forEach(function($t){if(_e.props.hasOwnProperty($t)){Ht=!1;return}Dt=!0,Xt[$t]=gt[$t]}),Dt&&(!Mt||Ht)&&_e.setState((0,oe.Z)((0,oe.Z)({},Xt),Nt))}}),(0,Se.Z)((0,me.Z)(_e),"scrollTo",function(gt){_e.listRef.current.scrollTo(gt)}),_e}return(0,fe.Z)(Re,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var He=this.props,Qe=He.activeKey,ut=He.itemScrollOffset,gt=ut===void 0?0:ut;Qe!==void 0&&Qe!==this.state.activeKey&&(this.setState({activeKey:Qe}),Qe!==null&&this.scrollTo({key:Qe,offset:gt}))}},{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 He=this.state,Qe=He.focused,ut=He.flattenNodes,gt=He.keyEntities,Mt=He.draggingNodeKey,Nt=He.activeKey,Dt=He.dropLevelOffset,Ht=He.dropContainerKey,Xt=He.dropTargetKey,$t=He.dropPosition,Ut=He.dragOverNodeKey,sn=He.indent,nn=this.props,Wt=nn.prefixCls,bn=nn.className,mn=nn.style,jn=nn.showLine,Jn=nn.focusable,Cr=nn.tabIndex,cr=Cr===void 0?0:Cr,kr=nn.selectable,Kr=nn.showIcon,Ur=nn.icon,oi=nn.switcherIcon,vi=nn.draggable,Bi=nn.checkable,Di=nn.checkStrictly,Ii=nn.disabled,Xi=nn.motion,et=nn.loadData,fr=nn.filterTreeNode,mr=nn.height,Ai=nn.itemHeight,ar=nn.scrollWidth,Sr=nn.virtual,Ar=nn.titleRender,lo=nn.dropIndicatorRender,on=nn.onContextMenu,an=nn.onScroll,tn=nn.direction,vn=nn.rootClassName,gr=nn.rootStyle,pr=(0,de.Z)(this.props,{aria:!0,data:!0}),ii;vi&&((0,Bt.Z)(vi)==="object"?ii=vi:typeof vi=="function"?ii={nodeDraggable:vi}:ii={});var Mn={prefixCls:Wt,selectable:kr,showIcon:Kr,icon:Ur,switcherIcon:oi,draggable:ii,draggingNodeKey:Mt,checkable:Bi,checkStrictly:Di,disabled:Ii,keyEntities:gt,dropLevelOffset:Dt,dropContainerKey:Ht,dropTargetKey:Xt,dropPosition:$t,dragOverNodeKey:Ut,indent:sn,direction:tn,dropIndicatorRender:lo,loadData:et,filterTreeNode:fr,titleRender:Ar,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(ae.k.Provider,{value:Mn},ee.createElement("div",{className:ve()(Wt,bn,vn,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(Wt,"-show-line"),jn),"".concat(Wt,"-focused"),Qe),"".concat(Wt,"-active-focused"),Nt!==null)),style:gr},ee.createElement(mt,(0,ct.Z)({ref:this.listRef,prefixCls:Wt,style:mn,data:ut,disabled:Ii,selectable:kr,checkable:!!Bi,motion:Xi,dragging:Mt!==null,height:mr,itemHeight:Ai,virtual:Sr,focusable:Jn,focused:Qe,tabIndex:cr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:on,onScroll:an,scrollWidth:ar},this.getTreeNodeRequiredProps(),pr))))}}],[{key:"getDerivedStateFromProps",value:function(He,Qe){var ut=Qe.prevProps,gt={prevProps:He};function Mt(cr){return!ut&&He.hasOwnProperty(cr)||ut&&ut[cr]!==He[cr]}var Nt,Dt=Qe.fieldNames;if(Mt("fieldNames")&&(Dt=(0,We.w$)(He.fieldNames),gt.fieldNames=Dt),Mt("treeData")?Nt=He.treeData:Mt("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Nt=(0,We.zn)(He.children)),Nt){gt.treeData=Nt;var Ht=(0,We.I8)(Nt,{fieldNames:Dt});gt.keyEntities=(0,oe.Z)((0,Se.Z)({},rt,Pt),Ht.keyEntities)}var Xt=gt.keyEntities||Qe.keyEntities;if(Mt("expandedKeys")||ut&&Mt("autoExpandParent"))gt.expandedKeys=He.autoExpandParent||!ut&&He.defaultExpandParent?(0,yt.r7)(He.expandedKeys,Xt):He.expandedKeys;else if(!ut&&He.defaultExpandAll){var $t=(0,oe.Z)({},Xt);delete $t[rt];var Ut=[];Object.keys($t).forEach(function(cr){var kr=$t[cr];kr.children&&kr.children.length&&Ut.push(kr.key)}),gt.expandedKeys=Ut}else!ut&&He.defaultExpandedKeys&&(gt.expandedKeys=He.autoExpandParent||He.defaultExpandParent?(0,yt.r7)(He.defaultExpandedKeys,Xt):He.defaultExpandedKeys);if(gt.expandedKeys||delete gt.expandedKeys,Nt||gt.expandedKeys){var sn=(0,We.oH)(Nt||Qe.treeData,gt.expandedKeys||Qe.expandedKeys,Dt);gt.flattenNodes=sn}if(He.selectable&&(Mt("selectedKeys")?gt.selectedKeys=(0,yt.BT)(He.selectedKeys,He):!ut&&He.defaultSelectedKeys&&(gt.selectedKeys=(0,yt.BT)(He.defaultSelectedKeys,He))),He.checkable){var nn;if(Mt("checkedKeys")?nn=(0,yt.E6)(He.checkedKeys)||{}:!ut&&He.defaultCheckedKeys?nn=(0,yt.E6)(He.defaultCheckedKeys)||{}:Nt&&(nn=(0,yt.E6)(He.checkedKeys)||{checkedKeys:Qe.checkedKeys,halfCheckedKeys:Qe.halfCheckedKeys}),nn){var Wt=nn,bn=Wt.checkedKeys,mn=bn===void 0?[]:bn,jn=Wt.halfCheckedKeys,Jn=jn===void 0?[]:jn;if(!He.checkStrictly){var Cr=(0,At.S)(mn,!0,Xt);mn=Cr.checkedKeys,Jn=Cr.halfCheckedKeys}gt.checkedKeys=mn,gt.halfCheckedKeys=Jn}}return Mt("loadedKeys")&&(gt.loadedKeys=He.loadedKeys),gt}}]),Re}(ee.Component);(0,Se.Z)(Ve,"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,Se.Z)(Ve,"TreeNode",Ne.Z);var xe=Ve,Le=xe},82661:function(gn,cn,at){"use strict";at.d(cn,{BT:function(){return ee},E6:function(){return le},L0:function(){return Se},OM:function(){return z},_5:function(){return Ce},r7:function(){return ue},wA:function(){return ve},yx:function(){return Me}});var ct=at(95190),Bt=at(93664),oe=at(48736),ze=at(59301),De=at(639),fe=at(65065),me=at(34061),ke=null;function Ce(ge,Pe){if(!ge)return[];var je=ge.slice(),Be=je.indexOf(Pe);return Be>=0&&je.splice(Be,1),je}function Se(ge,Pe){var je=(ge||[]).slice();return je.indexOf(Pe)===-1&&je.push(Pe),je}function Me(ge){return ge.split("-")}function ve(ge,Pe){var je=[],Be=(0,fe.Z)(Pe,ge);function Fe(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ne.forEach(function(Ae){var Ie=Ae.key,We=Ae.children;je.push(Ie),Fe(We)})}return Fe(Be.children),je}function we(ge){if(ge.parent){var Pe=Me(ge.pos);return Number(Pe[Pe.length-1])===ge.parent.children.length-1}return!1}function de(ge){var Pe=Me(ge.pos);return Number(Pe[Pe.length-1])===0}function z(ge,Pe,je,Be,Fe,Ne,Ae,Ie,We,Ye){var Ue,Ke=ge.clientX,ot=ge.clientY,st=ge.target.getBoundingClientRect(),dt=st.top,Ct=st.height,$e=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Ke),rt=($e-12)/Be,St=We.filter(function(Le){var Ze;return(Ze=Ie[Le])===null||Ze===void 0||(Ze=Ze.children)===null||Ze===void 0?void 0:Ze.length}),Pt=(0,fe.Z)(Ie,je.eventKey);if(ot<dt+Ct/2){var wt=Ae.findIndex(function(Le){return Le.key===Pt.key}),pt=wt<=0?0:wt-1,ft=Ae[pt].key;Pt=(0,fe.Z)(Ie,ft)}var ht=Pt.key,Et=Pt,mt=Pt.key,yt=0,At=0;if(!St.includes(ht))for(var xt=0;xt<rt&&we(Pt);xt+=1)Pt=Pt.parent,At+=1;var tt=Pe.data,Ve=Pt.node,xe=!0;return de(Pt)&&Pt.level===0&&ot<dt+Ct/2&&Ne({dragNode:tt,dropNode:Ve,dropPosition:-1})&&Pt.key===je.eventKey?yt=-1:(Et.children||[]).length&&St.includes(mt)?Ne({dragNode:tt,dropNode:Ve,dropPosition:0})?yt=0:xe=!1:At===0?rt>-1.5?Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?yt=1:xe=!1:Ne({dragNode:tt,dropNode:Ve,dropPosition:0})?yt=0:Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?yt=1:xe=!1:Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?yt=1:xe=!1,{dropPosition:yt,dropLevelOffset:At,dropTargetKey:Pt.key,dropTargetPos:Pt.pos,dragOverNodeKey:mt,dropContainerKey:yt===0?null:((Ue=Pt.parent)===null||Ue===void 0?void 0:Ue.key)||null,dropAllowed:xe}}function ee(ge,Pe){if(ge){var je=Pe.multiple;return je?ge.slice():ge.length?[ge[0]]:ge}}var ae=function(Pe){return Pe};function ie(ge,Pe){if(!ge)return[];var je=Pe||{},Be=je.processProps,Fe=Be===void 0?ae:Be,Ne=Array.isArray(ge)?ge:[ge];return Ne.map(function(Ae){var Ie=Ae.children,We=_objectWithoutProperties(Ae,ke),Ye=ie(Ie,Pe);return React.createElement(TreeNode,_extends({key:We.key},Fe(We)),Ye)})}function le(ge){if(!ge)return null;var Pe;if(Array.isArray(ge))Pe={checkedKeys:ge,halfCheckedKeys:void 0};else if((0,Bt.Z)(ge)==="object")Pe={checkedKeys:ge.checked||void 0,halfCheckedKeys:ge.halfChecked||void 0};else return(0,oe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Pe}function ue(ge,Pe){var je=new Set;function Be(Fe){if(!je.has(Fe)){var Ne=(0,fe.Z)(Pe,Fe);if(Ne){je.add(Fe);var Ae=Ne.parent,Ie=Ne.node;Ie.disabled||Ae&&Be(Ae.key)}}}return(ge||[]).forEach(function(Fe){Be(Fe)}),(0,ct.Z)(je)}},34643:function(gn,cn,at){"use strict";at.d(cn,{S:function(){return me}});var ct=at(48736),Bt=at(65065);function oe(ke,Ce){var Se=new Set;return ke.forEach(function(Me){Ce.has(Me)||Se.add(Me)}),Se}function ze(ke){var Ce=ke||{},Se=Ce.disabled,Me=Ce.disableCheckbox,ve=Ce.checkable;return!!(Se||Me)||ve===!1}function De(ke,Ce,Se,Me){for(var ve=new Set(ke),we=new Set,de=0;de<=Se;de+=1){var z=Ce.get(de)||new Set;z.forEach(function(le){var ue=le.key,ge=le.node,Pe=le.children,je=Pe===void 0?[]:Pe;ve.has(ue)&&!Me(ge)&&je.filter(function(Be){return!Me(Be.node)}).forEach(function(Be){ve.add(Be.key)})})}for(var ee=new Set,ae=Se;ae>=0;ae-=1){var ie=Ce.get(ae)||new Set;ie.forEach(function(le){var ue=le.parent,ge=le.node;if(!(Me(ge)||!le.parent||ee.has(le.parent.key))){if(Me(le.parent.node)){ee.add(ue.key);return}var Pe=!0,je=!1;(ue.children||[]).filter(function(Be){return!Me(Be.node)}).forEach(function(Be){var Fe=Be.key,Ne=ve.has(Fe);Pe&&!Ne&&(Pe=!1),!je&&(Ne||we.has(Fe))&&(je=!0)}),Pe&&ve.add(ue.key),je&&we.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(oe(we,ve))}}function fe(ke,Ce,Se,Me,ve){for(var we=new Set(ke),de=new Set(Ce),z=0;z<=Me;z+=1){var ee=Se.get(z)||new Set;ee.forEach(function(ue){var ge=ue.key,Pe=ue.node,je=ue.children,Be=je===void 0?[]:je;!we.has(ge)&&!de.has(ge)&&!ve(Pe)&&Be.filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){we.delete(Fe.key)})})}de=new Set;for(var ae=new Set,ie=Me;ie>=0;ie-=1){var le=Se.get(ie)||new Set;le.forEach(function(ue){var ge=ue.parent,Pe=ue.node;if(!(ve(Pe)||!ue.parent||ae.has(ue.parent.key))){if(ve(ue.parent.node)){ae.add(ge.key);return}var je=!0,Be=!1;(ge.children||[]).filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){var Ne=Fe.key,Ae=we.has(Ne);je&&!Ae&&(je=!1),!Be&&(Ae||de.has(Ne))&&(Be=!0)}),je||we.delete(ge.key),Be&&de.add(ge.key),ae.add(ge.key)}})}return{checkedKeys:Array.from(we),halfCheckedKeys:Array.from(oe(de,we))}}function me(ke,Ce,Se,Me){var ve=[],we;Me?we=Me:we=ze;var de=new Set(ke.filter(function(ie){var le=!!(0,Bt.Z)(Se,ie);return le||ve.push(ie),le})),z=new Map,ee=0;Object.keys(Se).forEach(function(ie){var le=Se[ie],ue=le.level,ge=z.get(ue);ge||(ge=new Set,z.set(ue,ge)),ge.add(le),ee=Math.max(ee,ue)}),(0,ct.ZP)(!ve.length,"Tree missing follow keys: ".concat(ve.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var ae;return Ce===!0?ae=De(de,z,ee,we):ae=fe(de,Ce.halfCheckedKeys,z,ee,we),ae}},65065:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ct}});function ct(Bt,oe){return Bt[oe]}},34061:function(gn,cn,at){"use strict";at.d(cn,{F:function(){return ue},H8:function(){return le},I8:function(){return ie},km:function(){return ve},oH:function(){return ee},w$:function(){return we},zn:function(){return z}});var ct=at(93664),Bt=at(95190),oe=at(20439),ze=at(62646),De=at(11592),fe=at(2738),me=at(48736),ke=at(65065),Ce=["children"];function Se(ge,Pe){return"".concat(ge,"-").concat(Pe)}function Me(ge){return ge&&ge.type&&ge.type.isTreeNode}function ve(ge,Pe){return ge!=null?ge:Pe}function we(ge){var Pe=ge||{},je=Pe.title,Be=Pe._title,Fe=Pe.key,Ne=Pe.children,Ae=je||"title";return{title:Ae,_title:Be||[Ae],key:Fe||"key",children:Ne||"children"}}function de(ge,Pe){var je=new Map;function Be(Fe){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Ae){var Ie=Ae[Pe.key],We=Ae[Pe.children];warning(Ie!=null,"Tree node must have a certain key: [".concat(Ne).concat(Ie,"]"));var Ye=String(Ie);warning(!je.has(Ye)||Ie===null||Ie===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),je.set(Ye,!0),Be(We,"".concat(Ne).concat(Ye," > "))})}Be(ge)}function z(ge){function Pe(je){var Be=(0,De.Z)(je);return Be.map(function(Fe){if(!Me(Fe))return(0,me.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var Ne=Fe.key,Ae=Fe.props,Ie=Ae.children,We=(0,ze.Z)(Ae,Ce),Ye=(0,oe.Z)({key:Ne},We),Ue=Pe(Ie);return Ue.length&&(Ye.children=Ue),Ye}).filter(function(Fe){return Fe})}return Pe(ge)}function ee(ge,Pe,je){var Be=we(je),Fe=Be._title,Ne=Be.key,Ae=Be.children,Ie=new Set(Pe===!0?[]:Pe),We=[];function Ye(Ue){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ue.map(function(ot,st){for(var dt=Se(Ke?Ke.pos:"0",st),Ct=ve(ot[Ne],dt),$e,rt=0;rt<Fe.length;rt+=1){var St=Fe[rt];if(ot[St]!==void 0){$e=ot[St];break}}var Pt=Object.assign((0,fe.Z)(ot,[].concat((0,Bt.Z)(Fe),[Ne,Ae])),{title:$e,key:Ct,parent:Ke,pos:dt,children:null,data:ot,isStart:[].concat((0,Bt.Z)(Ke?Ke.isStart:[]),[st===0]),isEnd:[].concat((0,Bt.Z)(Ke?Ke.isEnd:[]),[st===Ue.length-1])});return We.push(Pt),Pe===!0||Ie.has(Ct)?Pt.children=Ye(ot[Ae]||[],Pt):Pt.children=[],Pt})}return Ye(ge),We}function ae(ge,Pe,je){var Be={};(0,ct.Z)(je)==="object"?Be=je:Be={externalGetKey:je},Be=Be||{};var Fe=Be,Ne=Fe.childrenPropName,Ae=Fe.externalGetKey,Ie=Fe.fieldNames,We=we(Ie),Ye=We.key,Ue=We.children,Ke=Ne||Ue,ot;Ae?typeof Ae=="string"?ot=function(Ct){return Ct[Ae]}:typeof Ae=="function"&&(ot=function(Ct){return Ae(Ct)}):ot=function(Ct,$e){return ve(Ct[Ye],$e)};function st(dt,Ct,$e,rt){var St=dt?dt[Ke]:ge,Pt=dt?Se($e.pos,Ct):"0",wt=dt?[].concat((0,Bt.Z)(rt),[dt]):[];if(dt){var pt=ot(dt,Pt),ft={node:dt,index:Ct,pos:Pt,key:pt,parentPos:$e.node?$e.pos:null,level:$e.level+1,nodes:wt};Pe(ft)}St&&St.forEach(function(ht,Et){st(ht,Et,{node:dt,pos:Pt,level:$e?$e.level+1:-1},wt)})}st(null)}function ie(ge){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=Pe.initWrapper,Be=Pe.processEntity,Fe=Pe.onProcessFinished,Ne=Pe.externalGetKey,Ae=Pe.childrenPropName,Ie=Pe.fieldNames,We=arguments.length>2?arguments[2]:void 0,Ye=Ne||We,Ue={},Ke={},ot={posEntities:Ue,keyEntities:Ke};return je&&(ot=je(ot)||ot),ae(ge,function(st){var dt=st.node,Ct=st.index,$e=st.pos,rt=st.key,St=st.parentPos,Pt=st.level,wt=st.nodes,pt={node:dt,nodes:wt,index:Ct,key:rt,pos:$e,level:Pt},ft=ve(rt,$e);Ue[$e]=pt,Ke[ft]=pt,pt.parent=Ue[St],pt.parent&&(pt.parent.children=pt.parent.children||[],pt.parent.children.push(pt)),Be&&Be(pt,ot)},{externalGetKey:Ye,childrenPropName:Ae,fieldNames:Ie}),Fe&&Fe(ot),ot}function le(ge,Pe){var je=Pe.expandedKeys,Be=Pe.selectedKeys,Fe=Pe.loadedKeys,Ne=Pe.loadingKeys,Ae=Pe.checkedKeys,Ie=Pe.halfCheckedKeys,We=Pe.dragOverNodeKey,Ye=Pe.dropPosition,Ue=Pe.keyEntities,Ke=(0,ke.Z)(Ue,ge),ot={eventKey:ge,expanded:je.indexOf(ge)!==-1,selected:Be.indexOf(ge)!==-1,loaded:Fe.indexOf(ge)!==-1,loading:Ne.indexOf(ge)!==-1,checked:Ae.indexOf(ge)!==-1,halfChecked:Ie.indexOf(ge)!==-1,pos:String(Ke?Ke.pos:""),dragOver:We===ge&&Ye===0,dragOverGapTop:We===ge&&Ye===-1,dragOverGapBottom:We===ge&&Ye===1};return ot}function ue(ge){var Pe=ge.data,je=ge.expanded,Be=ge.selected,Fe=ge.checked,Ne=ge.loaded,Ae=ge.loading,Ie=ge.halfChecked,We=ge.dragOver,Ye=ge.dragOverGapTop,Ue=ge.dragOverGapBottom,Ke=ge.pos,ot=ge.active,st=ge.eventKey,dt=(0,oe.Z)((0,oe.Z)({},Pe),{},{expanded:je,selected:Be,checked:Fe,loaded:Ne,loading:Ae,halfChecked:Ie,dragOver:We,dragOverGapTop:Ye,dragOverGapBottom:Ue,pos:Ke,active:ot,key:st});return"props"in dt||Object.defineProperty(dt,"props",{get:function(){return(0,me.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),ge}}),dt}},90472:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return st}});var ct=at(14809),Bt=at(99153),oe=at(84851),ze=at(13028),De=at(19257),fe=at(93046),me=at(4635),ke=at(59301),Ce=at(20439),Se=at(62646),Me=at(93664),ve=at(70539),we=at(95764),de=at(95190),z=at(92310),ee=at.n(z),ae=at(26112),ie=at(48736),le=function(dt,Ct){if(dt&&Ct){var $e=Array.isArray(Ct)?Ct:Ct.split(","),rt=dt.name||"",St=dt.type||"",Pt=St.replace(/\/.*$/,"");return $e.some(function(wt){var pt=wt.trim();if(/^\*(\/\*)?$/.test(wt))return!0;if(pt.charAt(0)==="."){var ft=rt.toLowerCase(),ht=pt.toLowerCase(),Et=[ht];return(ht===".jpg"||ht===".jpeg")&&(Et=[".jpg",".jpeg"]),Et.some(function(mt){return ft.endsWith(mt)})}return/\/\*$/.test(pt)?Pt===pt.replace(/\/.*$/,""):St===pt?!0:/^\w+$/.test(pt)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(pt,"'.Skip for check.")),!0):!1})}return!0};function ue(dt,Ct){var $e="cannot ".concat(dt.method," ").concat(dt.action," ").concat(Ct.status,"'"),rt=new Error($e);return rt.status=Ct.status,rt.method=dt.method,rt.url=dt.action,rt}function ge(dt){var Ct=dt.responseText||dt.response;if(!Ct)return Ct;try{return JSON.parse(Ct)}catch($e){return Ct}}function Pe(dt){var Ct=new XMLHttpRequest;dt.onProgress&&Ct.upload&&(Ct.upload.onprogress=function(Pt){Pt.total>0&&(Pt.percent=Pt.loaded/Pt.total*100),dt.onProgress(Pt)});var $e=new FormData;dt.data&&Object.keys(dt.data).forEach(function(St){var Pt=dt.data[St];if(Array.isArray(Pt)){Pt.forEach(function(wt){$e.append("".concat(St,"[]"),wt)});return}$e.append(St,Pt)}),dt.file instanceof Blob?$e.append(dt.filename,dt.file,dt.file.name):$e.append(dt.filename,dt.file),Ct.onerror=function(Pt){dt.onError(Pt)},Ct.onload=function(){return Ct.status<200||Ct.status>=300?dt.onError(ue(dt,Ct),ge(Ct)):dt.onSuccess(ge(Ct),Ct)},Ct.open(dt.method,dt.action,!0),dt.withCredentials&&"withCredentials"in Ct&&(Ct.withCredentials=!0);var rt=dt.headers||{};return rt["X-Requested-With"]!==null&&Ct.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(rt).forEach(function(St){rt[St]!==null&&Ct.setRequestHeader(St,rt[St])}),Ct.send($e),{abort:function(){Ct.abort()}}}var je=function(){var dt=(0,we.Z)((0,ve.Z)().mark(function Ct($e,rt){var St,Pt,wt,pt,ft,ht,Et,mt;return(0,ve.Z)().wrap(function(At){for(;;)switch(At.prev=At.next){case 0:ht=function(){return ht=(0,we.Z)((0,ve.Z)().mark(function tt(Ve){return(0,ve.Z)().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.abrupt("return",new Promise(function(Ze){Ve.file(function(nt){rt(nt)?(Ve.fullPath&&!nt.webkitRelativePath&&(Object.defineProperties(nt,{webkitRelativePath:{writable:!0}}),nt.webkitRelativePath=Ve.fullPath.replace(/^\//,""),Object.defineProperties(nt,{webkitRelativePath:{writable:!1}})),Ze(nt)):Ze(null)})}));case 1:case"end":return Le.stop()}},tt)})),ht.apply(this,arguments)},ft=function(tt){return ht.apply(this,arguments)},pt=function(){return pt=(0,we.Z)((0,ve.Z)().mark(function tt(Ve){var xe,Le,Ze,nt,Re;return(0,ve.Z)().wrap(function(He){for(;;)switch(He.prev=He.next){case 0:xe=Ve.createReader(),Le=[];case 2:return He.next=5,new Promise(function(Qe){xe.readEntries(Qe,function(){return Qe([])})});case 5:if(Ze=He.sent,nt=Ze.length,nt){He.next=9;break}return He.abrupt("break",12);case 9:for(Re=0;Re<nt;Re++)Le.push(Ze[Re]);He.next=2;break;case 12:return He.abrupt("return",Le);case 13:case"end":return He.stop()}},tt)})),pt.apply(this,arguments)},wt=function(tt){return pt.apply(this,arguments)},St=[],Pt=[],$e.forEach(function(xt){return Pt.push(xt.webkitGetAsEntry())}),Et=function(){var xt=(0,we.Z)((0,ve.Z)().mark(function tt(Ve,xe){var Le,Ze;return(0,ve.Z)().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(Ve){Re.next=2;break}return Re.abrupt("return");case 2:if(Ve.path=xe||"",!Ve.isFile){Re.next=10;break}return Re.next=6,ft(Ve);case 6:Le=Re.sent,Le&&St.push(Le),Re.next=15;break;case 10:if(!Ve.isDirectory){Re.next=15;break}return Re.next=13,wt(Ve);case 13:Ze=Re.sent,Pt.push.apply(Pt,(0,de.Z)(Ze));case 15:case"end":return Re.stop()}},tt)}));return function(Ve,xe){return xt.apply(this,arguments)}}(),mt=0;case 9:if(!(mt<Pt.length)){At.next=15;break}return At.next=12,Et(Pt[mt]);case 12:mt++,At.next=9;break;case 15:return At.abrupt("return",St);case 16:case"end":return At.stop()}},Ct)}));return function($e,rt){return dt.apply(this,arguments)}}(),Be=je,Fe=+new Date,Ne=0;function Ae(){return"rc-upload-".concat(Fe,"-").concat(++Ne)}var Ie=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],We=function(dt){(0,De.Z)($e,dt);var Ct=(0,fe.Z)($e);function $e(){var rt;(0,Bt.Z)(this,$e);for(var St=arguments.length,Pt=new Array(St),wt=0;wt<St;wt++)Pt[wt]=arguments[wt];return rt=Ct.call.apply(Ct,[this].concat(Pt)),(0,me.Z)((0,ze.Z)(rt),"state",{uid:Ae()}),(0,me.Z)((0,ze.Z)(rt),"reqs",{}),(0,me.Z)((0,ze.Z)(rt),"fileInput",void 0),(0,me.Z)((0,ze.Z)(rt),"_isMounted",void 0),(0,me.Z)((0,ze.Z)(rt),"onChange",function(pt){var ft=rt.props,ht=ft.accept,Et=ft.directory,mt=pt.target.files,yt=(0,de.Z)(mt).filter(function(At){return!Et||le(At,ht)});rt.uploadFiles(yt),rt.reset()}),(0,me.Z)((0,ze.Z)(rt),"onClick",function(pt){var ft=rt.fileInput;if(ft){var ht=pt.target,Et=rt.props.onClick;if(ht&&ht.tagName==="BUTTON"){var mt=ft.parentNode;mt.focus(),ht.blur()}ft.click(),Et&&Et(pt)}}),(0,me.Z)((0,ze.Z)(rt),"onKeyDown",function(pt){pt.key==="Enter"&&rt.onClick(pt)}),(0,me.Z)((0,ze.Z)(rt),"onFileDrop",function(){var pt=(0,we.Z)((0,ve.Z)().mark(function ft(ht){var Et,mt,yt;return(0,ve.Z)().wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:if(Et=rt.props.multiple,ht.preventDefault(),ht.type!=="dragover"){xt.next=4;break}return xt.abrupt("return");case 4:if(!rt.props.directory){xt.next=11;break}return xt.next=7,Be(Array.prototype.slice.call(ht.dataTransfer.items),function(tt){return le(tt,rt.props.accept)});case 7:mt=xt.sent,rt.uploadFiles(mt),xt.next=14;break;case 11:yt=(0,de.Z)(ht.dataTransfer.files).filter(function(tt){return le(tt,rt.props.accept)}),Et===!1&&(yt=yt.slice(0,1)),rt.uploadFiles(yt);case 14:case"end":return xt.stop()}},ft)}));return function(ft){return pt.apply(this,arguments)}}()),(0,me.Z)((0,ze.Z)(rt),"uploadFiles",function(pt){var ft=(0,de.Z)(pt),ht=ft.map(function(Et){return Et.uid=Ae(),rt.processFile(Et,ft)});Promise.all(ht).then(function(Et){var mt=rt.props.onBatchStart;mt==null||mt(Et.map(function(yt){var At=yt.origin,xt=yt.parsedFile;return{file:At,parsedFile:xt}})),Et.filter(function(yt){return yt.parsedFile!==null}).forEach(function(yt){rt.post(yt)})})}),(0,me.Z)((0,ze.Z)(rt),"processFile",function(){var pt=(0,we.Z)((0,ve.Z)().mark(function ft(ht,Et){var mt,yt,At,xt,tt,Ve,xe,Le,Ze;return(0,ve.Z)().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:if(mt=rt.props.beforeUpload,yt=ht,!mt){Re.next=14;break}return Re.prev=3,Re.next=6,mt(ht,Et);case 6:yt=Re.sent,Re.next=12;break;case 9:Re.prev=9,Re.t0=Re.catch(3),yt=!1;case 12:if(yt!==!1){Re.next=14;break}return Re.abrupt("return",{origin:ht,parsedFile:null,action:null,data:null});case 14:if(At=rt.props.action,typeof At!="function"){Re.next=21;break}return Re.next=18,At(ht);case 18:xt=Re.sent,Re.next=22;break;case 21:xt=At;case 22:if(tt=rt.props.data,typeof tt!="function"){Re.next=29;break}return Re.next=26,tt(ht);case 26:Ve=Re.sent,Re.next=30;break;case 29:Ve=tt;case 30:return xe=((0,Me.Z)(yt)==="object"||typeof yt=="string")&&yt?yt:ht,xe instanceof File?Le=xe:Le=new File([xe],ht.name,{type:ht.type}),Ze=Le,Ze.uid=ht.uid,Re.abrupt("return",{origin:ht,data:Ve,parsedFile:Ze,action:xt});case 35:case"end":return Re.stop()}},ft,null,[[3,9]])}));return function(ft,ht){return pt.apply(this,arguments)}}()),(0,me.Z)((0,ze.Z)(rt),"saveFileInput",function(pt){rt.fileInput=pt}),rt}return(0,oe.Z)($e,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(St){var Pt=this,wt=St.data,pt=St.origin,ft=St.action,ht=St.parsedFile;if(this._isMounted){var Et=this.props,mt=Et.onStart,yt=Et.customRequest,At=Et.name,xt=Et.headers,tt=Et.withCredentials,Ve=Et.method,xe=pt.uid,Le=yt||Pe,Ze={action:ft,filename:At,data:wt,file:ht,headers:xt,withCredentials:tt,method:Ve||"post",onProgress:function(Re){var _e=Pt.props.onProgress;_e==null||_e(Re,ht)},onSuccess:function(Re,_e){var He=Pt.props.onSuccess;He==null||He(Re,ht,_e),delete Pt.reqs[xe]},onError:function(Re,_e){var He=Pt.props.onError;He==null||He(Re,_e,ht),delete Pt.reqs[xe]}};mt(pt),this.reqs[xe]=Le(Ze)}}},{key:"reset",value:function(){this.setState({uid:Ae()})}},{key:"abort",value:function(St){var Pt=this.reqs;if(St){var wt=St.uid?St.uid:St;Pt[wt]&&Pt[wt].abort&&Pt[wt].abort(),delete Pt[wt]}else Object.keys(Pt).forEach(function(pt){Pt[pt]&&Pt[pt].abort&&Pt[pt].abort(),delete Pt[pt]})}},{key:"render",value:function(){var St=this.props,Pt=St.component,wt=St.prefixCls,pt=St.className,ft=St.classNames,ht=ft===void 0?{}:ft,Et=St.disabled,mt=St.id,yt=St.name,At=St.style,xt=St.styles,tt=xt===void 0?{}:xt,Ve=St.multiple,xe=St.accept,Le=St.capture,Ze=St.children,nt=St.directory,Re=St.openFileDialogOnClick,_e=St.onMouseEnter,He=St.onMouseLeave,Qe=St.hasControlInside,ut=(0,Se.Z)(St,Ie),gt=ee()((0,me.Z)((0,me.Z)((0,me.Z)({},wt,!0),"".concat(wt,"-disabled"),Et),pt,pt)),Mt=nt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Nt=Et?{}:{onClick:Re?this.onClick:function(){},onKeyDown:Re?this.onKeyDown:function(){},onMouseEnter:_e,onMouseLeave:He,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Qe?void 0:"0"};return ke.createElement(Pt,(0,ct.Z)({},Nt,{className:gt,role:Qe?void 0:"button",style:At}),ke.createElement("input",(0,ct.Z)({},(0,ae.Z)(ut,{aria:!0,data:!0}),{id:mt,name:yt,disabled:Et,type:"file",ref:this.saveFileInput,onClick:function(Ht){return Ht.stopPropagation()},key:this.state.uid,style:(0,Ce.Z)({display:"none"},tt.input),className:ht.input,accept:xe},Mt,{multiple:Ve,onChange:this.onChange},Le!=null?{capture:Le}:{})),Ze)}}]),$e}(ke.Component),Ye=We;function Ue(){}var Ke=function(dt){(0,De.Z)($e,dt);var Ct=(0,fe.Z)($e);function $e(){var rt;(0,Bt.Z)(this,$e);for(var St=arguments.length,Pt=new Array(St),wt=0;wt<St;wt++)Pt[wt]=arguments[wt];return rt=Ct.call.apply(Ct,[this].concat(Pt)),(0,me.Z)((0,ze.Z)(rt),"uploader",void 0),(0,me.Z)((0,ze.Z)(rt),"saveUploader",function(pt){rt.uploader=pt}),rt}return(0,oe.Z)($e,[{key:"abort",value:function(St){this.uploader.abort(St)}},{key:"render",value:function(){return ke.createElement(Ye,(0,ct.Z)({},this.props,{ref:this.saveUploader}))}}]),$e}(ke.Component);(0,me.Z)(Ke,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ue,onError:Ue,onSuccess:Ue,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ot=Ke,st=ot},8224:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Bt}});var ct=at(4676);function Bt(oe,ze,De,fe){var me=ct.unstable_batchedUpdates?function(Ce){ct.unstable_batchedUpdates(De,Ce)}:De;return oe!=null&&oe.addEventListener&&oe.addEventListener(ze,me,fe),{remove:function(){oe!=null&&oe.removeEventListener&&oe.removeEventListener(ze,me,fe)}}}},24514:function(gn,cn,at){"use strict";at.d(cn,{G:function(){return ze}});var ct=at(47273),Bt=function(fe){if((0,ct.Z)()&&window.document.documentElement){var me=Array.isArray(fe)?fe:[fe],ke=window.document.documentElement;return me.some(function(Ce){return Ce in ke.style})}return!1},oe=function(fe,me){if(!Bt(fe))return!1;var ke=document.createElement("div"),Ce=ke.style[fe];return ke.style[fe]=me,ke.style[fe]!==Ce};function ze(De,fe){return!Array.isArray(De)&&fe!==void 0?oe(De,fe):Bt(De)}},65283:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return tt}});var ct=at(14809),Bt=at(93664),oe=at(20439),ze=at(4635),De=at(50298),fe=at(62646),me=at(92310),ke=at.n(me),Ce=at(29301),Se=at(70425),Me=at(34280),ve=at(59301),we=at(4676),de=ve.forwardRef(function(Ve,xe){var Le=Ve.height,Ze=Ve.offsetY,nt=Ve.offsetX,Re=Ve.children,_e=Ve.prefixCls,He=Ve.onInnerResize,Qe=Ve.innerProps,ut=Ve.rtl,gt=Ve.extra,Mt={},Nt={display:"flex",flexDirection:"column"};return Ze!==void 0&&(Mt={height:Le,position:"relative",overflow:"hidden"},Nt=(0,oe.Z)((0,oe.Z)({},Nt),{},(0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)({transform:"translateY(".concat(Ze,"px)")},ut?"marginRight":"marginLeft",-nt),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:Mt},ve.createElement(Ce.Z,{onResize:function(Ht){var Xt=Ht.offsetHeight;Xt&&He&&He()}},ve.createElement("div",(0,ct.Z)({style:Nt,className:ke()((0,ze.Z)({},"".concat(_e,"-holder-inner"),_e)),ref:xe},Qe),Re,gt)))});de.displayName="Filler";var z=de;function ee(Ve){var xe=Ve.children,Le=Ve.setRef,Ze=ve.useCallback(function(nt){Le(nt)},[]);return ve.cloneElement(xe,{ref:Ze})}function ae(Ve,xe,Le,Ze,nt,Re,_e,He){var Qe=He.getKey;return Ve.slice(xe,Le+1).map(function(ut,gt){var Mt=xe+gt,Nt=_e(ut,Mt,{style:{width:Ze},offsetX:nt}),Dt=Qe(ut);return ve.createElement(ee,{key:Dt,setRef:function(Xt){return Re(ut,Xt)}},Nt)})}function ie(Ve,xe,Le,Ze){var nt=Le-Ve,Re=xe-Le,_e=Math.min(nt,Re)*2;if(Ze<=_e){var He=Math.floor(Ze/2);return Ze%2?Le+He+1:Le-He}return nt>Re?Le-(Ze-Re):Le+(Ze-nt)}function le(Ve,xe,Le){var Ze=Ve.length,nt=xe.length,Re,_e;if(Ze===0&&nt===0)return null;Ze<nt?(Re=Ve,_e=xe):(Re=xe,_e=Ve);var He={__EMPTY_ITEM__:!0};function Qe(Ht){return Ht!==void 0?Le(Ht):He}for(var ut=null,gt=Math.abs(Ze-nt)!==1,Mt=0;Mt<_e.length;Mt+=1){var Nt=Qe(Re[Mt]),Dt=Qe(_e[Mt]);if(Nt!==Dt){ut=Mt,gt=gt||Nt!==Qe(_e[Mt+1]);break}}return ut===null?null:{index:ut,multiple:gt}}function ue(Ve,xe,Le){var Ze=ve.useState(Ve),nt=(0,De.Z)(Ze,2),Re=nt[0],_e=nt[1],He=ve.useState(null),Qe=(0,De.Z)(He,2),ut=Qe[0],gt=Qe[1];return ve.useEffect(function(){var Mt=le(Re||[],Ve||[],xe);(Mt==null?void 0:Mt.index)!==void 0&&(Le==null||Le(Mt.index),gt(Ve[Mt.index])),_e(Ve)},[Ve]),[ut]}var ge=at(16089),Pe=(typeof navigator=="undefined"?"undefined":(0,Bt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),je=Pe,Be=function(Ve,xe,Le,Ze){var nt=(0,ve.useRef)(!1),Re=(0,ve.useRef)(null);function _e(){clearTimeout(Re.current),nt.current=!0,Re.current=setTimeout(function(){nt.current=!1},50)}var He=(0,ve.useRef)({top:Ve,bottom:xe,left:Le,right:Ze});return He.current.top=Ve,He.current.bottom=xe,He.current.left=Le,He.current.right=Ze,function(Qe,ut){var gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Mt=Qe?ut<0&&He.current.left||ut>0&&He.current.right:ut<0&&He.current.top||ut>0&&He.current.bottom;return gt&&Mt?(clearTimeout(Re.current),nt.current=!1):(!Mt||nt.current)&&_e(),!nt.current&&Mt}};function Fe(Ve,xe,Le,Ze,nt,Re,_e){var He=(0,ve.useRef)(0),Qe=(0,ve.useRef)(null),ut=(0,ve.useRef)(null),gt=(0,ve.useRef)(!1),Mt=Be(xe,Le,Ze,nt);function Nt(sn,nn){if(ge.Z.cancel(Qe.current),!Mt(!1,nn)){var Wt=sn;if(!Wt._virtualHandled)Wt._virtualHandled=!0;else return;He.current+=nn,ut.current=nn,je||Wt.preventDefault(),Qe.current=(0,ge.Z)(function(){var bn=gt.current?10:1;_e(He.current*bn,!1),He.current=0})}}function Dt(sn,nn){_e(nn,!0),je||sn.preventDefault()}var Ht=(0,ve.useRef)(null),Xt=(0,ve.useRef)(null);function $t(sn){if(Ve){ge.Z.cancel(Xt.current),Xt.current=(0,ge.Z)(function(){Ht.current=null},2);var nn=sn.deltaX,Wt=sn.deltaY,bn=sn.shiftKey,mn=nn,jn=Wt;(Ht.current==="sx"||!Ht.current&&bn&&Wt&&!nn)&&(mn=Wt,jn=0,Ht.current="sx");var Jn=Math.abs(mn),Cr=Math.abs(jn);Ht.current===null&&(Ht.current=Re&&Jn>Cr?"x":"y"),Ht.current==="y"?Nt(sn,jn):Dt(sn,mn)}}function Ut(sn){Ve&&(gt.current=sn.detail===ut.current)}return[$t,Ut]}function Ne(Ve,xe,Le,Ze){var nt=ve.useMemo(function(){return[new Map,[]]},[Ve,Le.id,Ze]),Re=(0,De.Z)(nt,2),_e=Re[0],He=Re[1],Qe=function(gt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gt,Nt=_e.get(gt),Dt=_e.get(Mt);if(Nt===void 0||Dt===void 0)for(var Ht=Ve.length,Xt=He.length;Xt<Ht;Xt+=1){var $t,Ut=Ve[Xt],sn=xe(Ut);_e.set(sn,Xt);var nn=($t=Le.get(sn))!==null&&$t!==void 0?$t:Ze;if(He[Xt]=(He[Xt-1]||0)+nn,sn===gt&&(Nt=Xt),sn===Mt&&(Dt=Xt),Nt!==void 0&&Dt!==void 0)break}return{top:He[Nt-1]||0,bottom:He[Dt]}};return Qe}var Ae=at(99153),Ie=at(84851),We=function(){function Ve(){(0,Ae.Z)(this,Ve),(0,ze.Z)(this,"maps",void 0),(0,ze.Z)(this,"id",0),(0,ze.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ie.Z)(Ve,[{key:"set",value:function(Le,Ze){this.diffRecords.set(Le,this.maps[Le]),this.maps[Le]=Ze,this.id+=1}},{key:"get",value:function(Le){return this.maps[Le]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Ve}(),Ye=We;function Ue(Ve){var xe=parseFloat(Ve);return isNaN(xe)?0:xe}function Ke(Ve,xe,Le){var Ze=ve.useState(0),nt=(0,De.Z)(Ze,2),Re=nt[0],_e=nt[1],He=(0,ve.useRef)(new Map),Qe=(0,ve.useRef)(new Ye),ut=(0,ve.useRef)(0);function gt(){ut.current+=1}function Mt(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;gt();var Ht=function(){var Ut=!1;He.current.forEach(function(sn,nn){if(sn&&sn.offsetParent){var Wt=sn.offsetHeight,bn=getComputedStyle(sn),mn=bn.marginTop,jn=bn.marginBottom,Jn=Ue(mn),Cr=Ue(jn),cr=Wt+Jn+Cr;Qe.current.get(nn)!==cr&&(Qe.current.set(nn,cr),Ut=!0)}}),Ut&&_e(function(sn){return sn+1})};if(Dt)Ht();else{ut.current+=1;var Xt=ut.current;Promise.resolve().then(function(){Xt===ut.current&&Ht()})}}function Nt(Dt,Ht){var Xt=Ve(Dt),$t=He.current.get(Xt);Ht?(He.current.set(Xt,Ht),Mt()):He.current.delete(Xt),!$t!=!Ht&&(Ht?xe==null||xe(Dt):Le==null||Le(Dt))}return(0,ve.useEffect)(function(){return gt},[]),[Nt,Mt,Qe.current,Re]}var ot=14/15;function st(Ve,xe,Le){var Ze=(0,ve.useRef)(!1),nt=(0,ve.useRef)(0),Re=(0,ve.useRef)(0),_e=(0,ve.useRef)(null),He=(0,ve.useRef)(null),Qe,ut=function(Dt){if(Ze.current){var Ht=Math.ceil(Dt.touches[0].pageX),Xt=Math.ceil(Dt.touches[0].pageY),$t=nt.current-Ht,Ut=Re.current-Xt,sn=Math.abs($t)>Math.abs(Ut);sn?nt.current=Ht:Re.current=Xt;var nn=Le(sn,sn?$t:Ut,!1,Dt);nn&&Dt.preventDefault(),clearInterval(He.current),nn&&(He.current=setInterval(function(){sn?$t*=ot:Ut*=ot;var Wt=Math.floor(sn?$t:Ut);(!Le(sn,Wt,!0)||Math.abs(Wt)<=.1)&&clearInterval(He.current)},16))}},gt=function(){Ze.current=!1,Qe()},Mt=function(Dt){Qe(),Dt.touches.length===1&&!Ze.current&&(Ze.current=!0,nt.current=Math.ceil(Dt.touches[0].pageX),Re.current=Math.ceil(Dt.touches[0].pageY),_e.current=Dt.target,_e.current.addEventListener("touchmove",ut,{passive:!1}),_e.current.addEventListener("touchend",gt,{passive:!0}))};Qe=function(){_e.current&&(_e.current.removeEventListener("touchmove",ut),_e.current.removeEventListener("touchend",gt))},(0,Me.Z)(function(){return Ve&&xe.current.addEventListener("touchstart",Mt,{passive:!0}),function(){var Nt;(Nt=xe.current)===null||Nt===void 0||Nt.removeEventListener("touchstart",Mt),Qe(),clearInterval(He.current)}},[Ve])}function dt(Ve){return Math.floor(Math.pow(Ve,.5))}function Ct(Ve,xe){var Le="touches"in Ve?Ve.touches[0]:Ve;return Le[xe?"pageX":"pageY"]-window[xe?"scrollX":"scrollY"]}function $e(Ve,xe,Le){ve.useEffect(function(){var Ze=xe.current;if(Ve&&Ze){var nt=!1,Re,_e,He=function(){ge.Z.cancel(Re)},Qe=function Nt(){He(),Re=(0,ge.Z)(function(){Le(_e),Nt()})},ut=function(Dt){if(!(Dt.target.draggable||Dt.button!==0)){var Ht=Dt;Ht._virtualHandled||(Ht._virtualHandled=!0,nt=!0)}},gt=function(){nt=!1,He()},Mt=function(Dt){if(nt){var Ht=Ct(Dt,!1),Xt=Ze.getBoundingClientRect(),$t=Xt.top,Ut=Xt.bottom;if(Ht<=$t){var sn=$t-Ht;_e=-dt(sn),Qe()}else if(Ht>=Ut){var nn=Ht-Ut;_e=dt(nn),Qe()}else He()}};return Ze.addEventListener("mousedown",ut),Ze.ownerDocument.addEventListener("mouseup",gt),Ze.ownerDocument.addEventListener("mousemove",Mt),function(){Ze.removeEventListener("mousedown",ut),Ze.ownerDocument.removeEventListener("mouseup",gt),Ze.ownerDocument.removeEventListener("mousemove",Mt),He()}}},[Ve])}var rt=10;function St(Ve,xe,Le,Ze,nt,Re,_e,He){var Qe=ve.useRef(),ut=ve.useState(null),gt=(0,De.Z)(ut,2),Mt=gt[0],Nt=gt[1];return(0,Me.Z)(function(){if(Mt&&Mt.times<rt){if(!Ve.current){Nt(function(Xi){return(0,oe.Z)({},Xi)});return}Re();var Dt=Mt.targetAlign,Ht=Mt.originAlign,Xt=Mt.index,$t=Mt.offset,Ut=Ve.current.clientHeight,sn=!1,nn=Dt,Wt=null;if(Ut){for(var bn=Dt||Ht,mn=0,jn=0,Jn=0,Cr=Math.min(xe.length-1,Xt),cr=0;cr<=Cr;cr+=1){var kr=nt(xe[cr]);jn=mn;var Kr=Le.get(kr);Jn=jn+(Kr===void 0?Ze:Kr),mn=Jn}for(var Ur=bn==="top"?$t:Ut-$t,oi=Cr;oi>=0;oi-=1){var vi=nt(xe[oi]),Bi=Le.get(vi);if(Bi===void 0){sn=!0;break}if(Ur-=Bi,Ur<=0)break}switch(bn){case"top":Wt=jn-$t;break;case"bottom":Wt=Jn-Ut+$t;break;default:{var Di=Ve.current.scrollTop,Ii=Di+Ut;jn<Di?nn="top":Jn>Ii&&(nn="bottom")}}Wt!==null&&_e(Wt),Wt!==Mt.lastTop&&(sn=!0)}sn&&Nt((0,oe.Z)((0,oe.Z)({},Mt),{},{times:Mt.times+1,targetAlign:nn,lastTop:Wt}))}},[Mt,Ve.current]),function(Dt){if(Dt==null){He();return}if(ge.Z.cancel(Qe.current),typeof Dt=="number")_e(Dt);else if(Dt&&(0,Bt.Z)(Dt)==="object"){var Ht,Xt=Dt.align;"index"in Dt?Ht=Dt.index:Ht=xe.findIndex(function(sn){return nt(sn)===Dt.key});var $t=Dt.offset,Ut=$t===void 0?0:$t;Nt({times:0,index:Ht,offset:Ut,originAlign:Xt})}}}var Pt=ve.forwardRef(function(Ve,xe){var Le=Ve.prefixCls,Ze=Ve.rtl,nt=Ve.scrollOffset,Re=Ve.scrollRange,_e=Ve.onStartMove,He=Ve.onStopMove,Qe=Ve.onScroll,ut=Ve.horizontal,gt=Ve.spinSize,Mt=Ve.containerSize,Nt=Ve.style,Dt=Ve.thumbStyle,Ht=Ve.showScrollBar,Xt=ve.useState(!1),$t=(0,De.Z)(Xt,2),Ut=$t[0],sn=$t[1],nn=ve.useState(null),Wt=(0,De.Z)(nn,2),bn=Wt[0],mn=Wt[1],jn=ve.useState(null),Jn=(0,De.Z)(jn,2),Cr=Jn[0],cr=Jn[1],kr=!Ze,Kr=ve.useRef(),Ur=ve.useRef(),oi=ve.useState(Ht),vi=(0,De.Z)(oi,2),Bi=vi[0],Di=vi[1],Ii=ve.useRef(),Xi=function(){Ht===!0||Ht===!1||(clearTimeout(Ii.current),Di(!0),Ii.current=setTimeout(function(){Di(!1)},3e3))},et=Re-Mt||0,fr=Mt-gt||0,mr=ve.useMemo(function(){if(nt===0||et===0)return 0;var vn=nt/et;return vn*fr},[nt,et,fr]),Ai=function(gr){gr.stopPropagation(),gr.preventDefault()},ar=ve.useRef({top:mr,dragging:Ut,pageY:bn,startTop:Cr});ar.current={top:mr,dragging:Ut,pageY:bn,startTop:Cr};var Sr=function(gr){sn(!0),mn(Ct(gr,ut)),cr(ar.current.top),_e(),gr.stopPropagation(),gr.preventDefault()};ve.useEffect(function(){var vn=function(Mn){Mn.preventDefault()},gr=Kr.current,pr=Ur.current;return gr.addEventListener("touchstart",vn,{passive:!1}),pr.addEventListener("touchstart",Sr,{passive:!1}),function(){gr.removeEventListener("touchstart",vn),pr.removeEventListener("touchstart",Sr)}},[]);var Ar=ve.useRef();Ar.current=et;var lo=ve.useRef();lo.current=fr,ve.useEffect(function(){if(Ut){var vn,gr=function(Mn){var sr=ar.current,Wr=sr.dragging,Li=sr.pageY,tr=sr.startTop;ge.Z.cancel(vn);var Ot=Kr.current.getBoundingClientRect(),Kt=Mt/(ut?Ot.width:Ot.height);if(Wr){var Dn=(Ct(Mn,ut)-Li)*Kt,Ln=tr;!kr&&ut?Ln-=Dn:Ln+=Dn;var en=Ar.current,Un=lo.current,Bn=Un?Ln/Un:0,An=Math.ceil(Bn*en);An=Math.max(An,0),An=Math.min(An,en),vn=(0,ge.Z)(function(){Qe(An,ut)})}},pr=function(){sn(!1),He()};return window.addEventListener("mousemove",gr,{passive:!0}),window.addEventListener("touchmove",gr,{passive:!0}),window.addEventListener("mouseup",pr,{passive:!0}),window.addEventListener("touchend",pr,{passive:!0}),function(){window.removeEventListener("mousemove",gr),window.removeEventListener("touchmove",gr),window.removeEventListener("mouseup",pr),window.removeEventListener("touchend",pr),ge.Z.cancel(vn)}}},[Ut]),ve.useEffect(function(){return Xi(),function(){clearTimeout(Ii.current)}},[nt]),ve.useImperativeHandle(xe,function(){return{delayHidden:Xi}});var on="".concat(Le,"-scrollbar"),an={position:"absolute",visibility:Bi?null:"hidden"},tn={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ut?(an.height=8,an.left=0,an.right=0,an.bottom=0,tn.height="100%",tn.width=gt,kr?tn.left=mr:tn.right=mr):(an.width=8,an.top=0,an.bottom=0,kr?an.right=0:an.left=0,tn.width="100%",tn.height=gt,tn.top=mr),ve.createElement("div",{ref:Kr,className:ke()(on,(0,ze.Z)((0,ze.Z)((0,ze.Z)({},"".concat(on,"-horizontal"),ut),"".concat(on,"-vertical"),!ut),"".concat(on,"-visible"),Bi)),style:(0,oe.Z)((0,oe.Z)({},an),Nt),onMouseDown:Ai,onMouseMove:Xi},ve.createElement("div",{ref:Ur,className:ke()("".concat(on,"-thumb"),(0,ze.Z)({},"".concat(on,"-thumb-moving"),Ut)),style:(0,oe.Z)((0,oe.Z)({},tn),Dt),onMouseDown:Sr}))}),wt=Pt,pt=20;function ft(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Le=Ve/xe*Ve;return isNaN(Le)&&(Le=0),Le=Math.max(Le,pt),Math.floor(Le)}var ht=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Et=[],mt={overflowY:"auto",overflowAnchor:"none"};function yt(Ve,xe){var Le=Ve.prefixCls,Ze=Le===void 0?"rc-virtual-list":Le,nt=Ve.className,Re=Ve.height,_e=Ve.itemHeight,He=Ve.fullHeight,Qe=He===void 0?!0:He,ut=Ve.style,gt=Ve.data,Mt=Ve.children,Nt=Ve.itemKey,Dt=Ve.virtual,Ht=Ve.direction,Xt=Ve.scrollWidth,$t=Ve.component,Ut=$t===void 0?"div":$t,sn=Ve.onScroll,nn=Ve.onVirtualScroll,Wt=Ve.onVisibleChange,bn=Ve.innerProps,mn=Ve.extraRender,jn=Ve.styles,Jn=Ve.showScrollBar,Cr=Jn===void 0?"optional":Jn,cr=(0,fe.Z)(Ve,ht),kr=ve.useCallback(function(un){return typeof Nt=="function"?Nt(un):un==null?void 0:un[Nt]},[Nt]),Kr=Ke(kr,null,null),Ur=(0,De.Z)(Kr,4),oi=Ur[0],vi=Ur[1],Bi=Ur[2],Di=Ur[3],Ii=!!(Dt!==!1&&Re&&_e),Xi=ve.useMemo(function(){return Object.values(Bi.maps).reduce(function(un,Fn){return un+Fn},0)},[Bi.id,Bi.maps]),et=Ii&&gt&&(Math.max(_e*gt.length,Xi)>Re||!!Xt),fr=Ht==="rtl",mr=ke()(Ze,(0,ze.Z)({},"".concat(Ze,"-rtl"),fr),nt),Ai=gt||Et,ar=(0,ve.useRef)(),Sr=(0,ve.useRef)(),Ar=(0,ve.useRef)(),lo=(0,ve.useState)(0),on=(0,De.Z)(lo,2),an=on[0],tn=on[1],vn=(0,ve.useState)(0),gr=(0,De.Z)(vn,2),pr=gr[0],ii=gr[1],Mn=(0,ve.useState)(!1),sr=(0,De.Z)(Mn,2),Wr=sr[0],Li=sr[1],tr=function(){Li(!0)},Ot=function(){Li(!1)},Kt={getKey:kr};function Dn(un){tn(function(Fn){var zn;typeof un=="function"?zn=un(Fn):zn=un;var Tn=Rr(zn);return ar.current.scrollTop=Tn,Tn})}var Ln=(0,ve.useRef)({start:0,end:Ai.length}),en=(0,ve.useRef)(),Un=ue(Ai,kr),Bn=(0,De.Z)(Un,1),An=Bn[0];en.current=An;var nr=ve.useMemo(function(){if(!Ii)return{scrollHeight:void 0,start:0,end:Ai.length-1,offset:void 0};if(!et){var un;return{scrollHeight:((un=Sr.current)===null||un===void 0?void 0:un.offsetHeight)||0,start:0,end:Ai.length-1,offset:void 0}}for(var Fn=0,zn,Tn,In,Nn=Ai.length,Zn=0;Zn<Nn;Zn+=1){var Wn=Ai[Zn],ln=kr(Wn),br=Bi.get(ln),Er=Fn+(br===void 0?_e:br);Er>=an&&zn===void 0&&(zn=Zn,Tn=Fn),Er>an+Re&&In===void 0&&(In=Zn),Fn=Er}return zn===void 0&&(zn=0,Tn=0,In=Math.ceil(Re/_e)),In===void 0&&(In=Ai.length-1),In=Math.min(In+1,Ai.length-1),{scrollHeight:Fn,start:zn,end:In,offset:Tn}},[et,Ii,an,Ai,Di,Re]),_n=nr.scrollHeight,Xn=nr.start,ur=nr.end,zr=nr.offset;Ln.current.start=Xn,Ln.current.end=ur,ve.useLayoutEffect(function(){var un=Bi.getRecord();if(un.size===1){var Fn=Array.from(un.keys())[0],zn=un.get(Fn),Tn=Ai[Xn];if(Tn&&zn===void 0){var In=kr(Tn);if(In===Fn){var Nn=Bi.get(Fn),Zn=Nn-_e;Dn(function(Wn){return Wn+Zn})}}}Bi.resetRecord()},[_n]);var dr=ve.useState({width:0,height:Re}),dn=(0,De.Z)(dr,2),$n=dn[0],Ir=dn[1],qr=function(Fn){Ir({width:Fn.offsetWidth,height:Fn.offsetHeight})},ki=(0,ve.useRef)(),Qt=(0,ve.useRef)(),or=ve.useMemo(function(){return ft($n.width,Xt)},[$n.width,Xt]),yr=ve.useMemo(function(){return ft($n.height,_n)},[$n.height,_n]),Hn=_n-Re,Yr=(0,ve.useRef)(Hn);Yr.current=Hn;function Rr(un){var Fn=un;return Number.isNaN(Yr.current)||(Fn=Math.min(Fn,Yr.current)),Fn=Math.max(Fn,0),Fn}var Zr=an<=0,Qr=an>=Hn,ui=pr<=0,Pi=pr>=Xt,pn=Be(Zr,Qr,ui,Pi),Oi=function(){return{x:fr?-pr:pr,y:an}},yn=(0,ve.useRef)(Oi()),xr=(0,Se.zX)(function(un){if(nn){var Fn=(0,oe.Z)((0,oe.Z)({},Oi()),un);(yn.current.x!==Fn.x||yn.current.y!==Fn.y)&&(nn(Fn),yn.current=Fn)}});function hi(un,Fn){var zn=un;Fn?((0,we.flushSync)(function(){ii(zn)}),xr()):Dn(zn)}function ei(un){var Fn=un.currentTarget.scrollTop;Fn!==an&&Dn(Fn),sn==null||sn(un),xr()}var Wi=function(Fn){var zn=Fn,Tn=Xt?Xt-$n.width:0;return zn=Math.max(zn,0),zn=Math.min(zn,Tn),zn},ci=(0,Se.zX)(function(un,Fn){Fn?((0,we.flushSync)(function(){ii(function(zn){var Tn=zn+(fr?-un:un);return Wi(Tn)})}),xr()):Dn(function(zn){var Tn=zn+un;return Tn})}),Vr=Fe(Ii,Zr,Qr,ui,Pi,!!Xt,ci),Hi=(0,De.Z)(Vr,2),qt=Hi[0],wn=Hi[1];st(Ii,ar,function(un,Fn,zn,Tn){var In=Tn;return pn(un,Fn,zn)?!1:!In||!In._virtualHandled?(In&&(In._virtualHandled=!0),qt({preventDefault:function(){},deltaX:un?Fn:0,deltaY:un?0:Fn}),!0):!1}),$e(et,ar,function(un){Dn(function(Fn){return Fn+un})}),(0,Me.Z)(function(){function un(zn){var Tn=Zr&&zn.detail<0,In=Qr&&zn.detail>0;Ii&&!Tn&&!In&&zn.preventDefault()}var Fn=ar.current;return Fn.addEventListener("wheel",qt,{passive:!1}),Fn.addEventListener("DOMMouseScroll",wn,{passive:!0}),Fn.addEventListener("MozMousePixelScroll",un,{passive:!1}),function(){Fn.removeEventListener("wheel",qt),Fn.removeEventListener("DOMMouseScroll",wn),Fn.removeEventListener("MozMousePixelScroll",un)}},[Ii,Zr,Qr]),(0,Me.Z)(function(){if(Xt){var un=Wi(pr);ii(un),xr({x:un})}},[$n.width,Xt]);var Yt=function(){var Fn,zn;(Fn=ki.current)===null||Fn===void 0||Fn.delayHidden(),(zn=Qt.current)===null||zn===void 0||zn.delayHidden()},lt=St(ar,Ai,Bi,_e,kr,function(){return vi(!0)},Dn,Yt);ve.useImperativeHandle(xe,function(){return{nativeElement:Ar.current,getScrollInfo:Oi,scrollTo:function(Fn){function zn(Tn){return Tn&&(0,Bt.Z)(Tn)==="object"&&("left"in Tn||"top"in Tn)}zn(Fn)?(Fn.left!==void 0&&ii(Wi(Fn.left)),lt(Fn.top)):lt(Fn)}}}),(0,Me.Z)(function(){if(Wt){var un=Ai.slice(Xn,ur+1);Wt(un,Ai)}},[Xn,ur,Ai]);var On=Ne(Ai,kr,Bi,_e),Sn=mn==null?void 0:mn({start:Xn,end:ur,virtual:et,offsetX:pr,offsetY:zr,rtl:fr,getSize:On}),Kn=ae(Ai,Xn,ur,Xt,pr,oi,Mt,Kt),Qn=null;Re&&(Qn=(0,oe.Z)((0,ze.Z)({},Qe?"height":"maxHeight",Re),mt),Ii&&(Qn.overflowY="hidden",Xt&&(Qn.overflowX="hidden"),Wr&&(Qn.pointerEvents="none")));var Vn={};return fr&&(Vn.dir="rtl"),ve.createElement("div",(0,ct.Z)({ref:Ar,style:(0,oe.Z)((0,oe.Z)({},ut),{},{position:"relative"}),className:mr},Vn,cr),ve.createElement(Ce.Z,{onResize:qr},ve.createElement(Ut,{className:"".concat(Ze,"-holder"),style:Qn,ref:ar,onScroll:ei,onMouseEnter:Yt},ve.createElement(z,{prefixCls:Ze,height:_n,offsetX:pr,offsetY:zr,scrollWidth:Xt,onInnerResize:vi,ref:Sr,innerProps:bn,rtl:fr,extra:Sn},Kn))),et&&_n>Re&&ve.createElement(wt,{ref:ki,prefixCls:Ze,scrollOffset:an,scrollRange:_n,rtl:fr,onScroll:hi,onStartMove:tr,onStopMove:Ot,spinSize:yr,containerSize:$n.height,style:jn==null?void 0:jn.verticalScrollBar,thumbStyle:jn==null?void 0:jn.verticalScrollBarThumb,showScrollBar:Cr}),et&&Xt>$n.width&&ve.createElement(wt,{ref:Qt,prefixCls:Ze,scrollOffset:pr,scrollRange:Xt,rtl:fr,onScroll:hi,onStartMove:tr,onStopMove:Ot,spinSize:or,containerSize:$n.width,horizontal:!0,style:jn==null?void 0:jn.horizontalScrollBar,thumbStyle:jn==null?void 0:jn.horizontalScrollBarThumb,showScrollBar:Cr}))}var At=ve.forwardRef(yt);At.displayName="List";var xt=At,tt=xt},7062:function(gn,cn,at){var ct=at(19637),Bt=at(97573),oe=[at(96627)];gn.exports=ct.createStore(Bt,oe)},96627:function(gn,cn,at){gn.exports=ct;function ct(){return at(42424),{}}},42424: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(gn){return gn<10?"0"+gn:gn}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(gn){return rx_escapable.lastIndex=0,rx_escapable.test(gn)?'"'+gn.replace(rx_escapable,function(cn){var at=meta[cn];return typeof at=="string"?at:"\\u"+("0000"+cn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+gn+'"'}function str(gn,cn){var at,ct,Bt,oe,ze=gap,De,fe=cn[gn];switch(fe&&typeof fe=="object"&&typeof fe.toJSON=="function"&&(fe=fe.toJSON(gn)),typeof rep=="function"&&(fe=rep.call(cn,gn,fe)),typeof fe){case"string":return quote(fe);case"number":return isFinite(fe)?String(fe):"null";case"boolean":case"null":return String(fe);case"object":if(!fe)return"null";if(gap+=indent,De=[],Object.prototype.toString.apply(fe)==="[object Array]"){for(oe=fe.length,at=0;at<oe;at+=1)De[at]=str(at,fe)||"null";return Bt=De.length===0?"[]":gap?`[
`+gap+De.join(`,
`+gap)+`
`+ze+"]":"["+De.join(",")+"]",gap=ze,Bt}if(rep&&typeof rep=="object")for(oe=rep.length,at=0;at<oe;at+=1)typeof rep[at]=="string"&&(ct=rep[at],Bt=str(ct,fe),Bt&&De.push(quote(ct)+(gap?": ":":")+Bt));else for(ct in fe)Object.prototype.hasOwnProperty.call(fe,ct)&&(Bt=str(ct,fe),Bt&&De.push(quote(ct)+(gap?": ":":")+Bt));return Bt=De.length===0?"{}":gap?`{
`+gap+De.join(`,
`+gap)+`
`+ze+"}":"{"+De.join(",")+"}",gap=ze,Bt}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(gn,cn,at){var ct;if(gap="",indent="",typeof at=="number")for(ct=0;ct<at;ct+=1)indent+=" ";else typeof at=="string"&&(indent=at);if(rep=cn,cn&&typeof cn!="function"&&(typeof cn!="object"||typeof cn.length!="number"))throw new Error("JSON.stringify");return str("",{"":gn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(gn,cn){var at,ct,Bt=gn[cn];if(Bt&&typeof Bt=="object")for(at in Bt)Object.prototype.hasOwnProperty.call(Bt,at)&&(ct=walk(Bt,at),ct!==void 0?Bt[at]=ct:delete Bt[at]);return reviver.call(gn,cn,Bt)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(gn){return"\\u"+("0000"+gn.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")})}()},19637:function(gn,cn,at){var ct=at(67039),Bt=ct.slice,oe=ct.pluck,ze=ct.each,De=ct.bind,fe=ct.create,me=ct.isList,ke=ct.isFunction,Ce=ct.isObject;gn.exports={createStore:ve};var Se={version:"2.0.12",enabled:!1,get:function(we,de){var z=this.storage.read(this._namespacePrefix+we);return this._deserialize(z,de)},set:function(we,de){return de===void 0?this.remove(we):(this.storage.write(this._namespacePrefix+we,this._serialize(de)),de)},remove:function(we){this.storage.remove(this._namespacePrefix+we)},each:function(we){var de=this;this.storage.each(function(z,ee){we.call(de,de._deserialize(z),(ee||"").replace(de._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(we){return this._namespacePrefix=="__storejs_"+we+"_"},createStore:function(){return ve.apply(this,arguments)},addPlugin:function(we){this._addPlugin(we)},namespace:function(we){return ve(this.storage,this.plugins,we)}};function Me(){var we=typeof console=="undefined"?null:console;if(we){var de=we.warn?we.warn:we.log;de.apply(we,arguments)}}function ve(we,de,z){z||(z=""),we&&!me(we)&&(we=[we]),de&&!me(de)&&(de=[de]);var ee=z?"__storejs_"+z+"_":"",ae=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:ae,_testStorage:function(ge){try{var Pe="__storejs__test__";ge.write(Pe,Pe);var je=ge.read(Pe)===Pe;return ge.remove(Pe),je}catch(Be){return!1}},_assignPluginFnProp:function(ge,Pe){var je=this[Pe];this[Pe]=function(){var Fe=Bt(arguments,0),Ne=this;function Ae(){if(je)return ze(arguments,function(We,Ye){Fe[Ye]=We}),je.apply(Ne,Fe)}var Ie=[Ae].concat(Fe);return ge.apply(Ne,Ie)}},_serialize:function(ge){return JSON.stringify(ge)},_deserialize:function(ge,Pe){if(!ge)return Pe;var je="";try{je=JSON.parse(ge)}catch(Be){je=ge}return je!==void 0?je:Pe},_addStorage:function(ge){this.enabled||this._testStorage(ge)&&(this.storage=ge,this.enabled=!0)},_addPlugin:function(ge){var Pe=this;if(me(ge)){ze(ge,function(Fe){Pe._addPlugin(Fe)});return}var je=oe(this.plugins,function(Fe){return ge===Fe});if(!je){if(this.plugins.push(ge),!ke(ge))throw new Error("Plugins must be function values that return objects");var Be=ge.call(this);if(!Ce(Be))throw new Error("Plugins must return an object of function properties");ze(Be,function(Fe,Ne){if(!ke(Fe))throw new Error("Bad plugin property: "+Ne+" from plugin "+ge.name+". Plugins should only return functions.");Pe._assignPluginFnProp(Fe,Ne)})}},addStorage:function(ge){Me("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(ge)}},ue=fe(le,Se,{plugins:[]});return ue.raw={},ze(ue,function(ge,Pe){ke(ge)&&(ue.raw[Pe]=De(ue,ge))}),ze(we,function(ge){ue._addStorage(ge)}),ze(de,function(ge){ue._addPlugin(ge)}),ue}},67039:function(gn,cn,at){var ct=De(),Bt=fe(),oe=me(),ze=typeof window!="undefined"?window:at.g;gn.exports={assign:ct,create:Bt,trim:oe,bind:ke,slice:Ce,each:Se,map:Me,pluck:ve,isList:we,isFunction:de,isObject:z,Global:ze};function De(){return Object.assign?Object.assign:function(ae,ie,le,ue){for(var ge=1;ge<arguments.length;ge++)Se(Object(arguments[ge]),function(Pe,je){ae[je]=Pe});return ae}}function fe(){if(Object.create)return function(ie,le,ue,ge){var Pe=Ce(arguments,1);return ct.apply(this,[Object.create(ie)].concat(Pe))};{let ae=function(){};var ee=ae;return function(le,ue,ge,Pe){var je=Ce(arguments,1);return ae.prototype=le,ct.apply(this,[new ae].concat(je))}}}function me(){return String.prototype.trim?function(ae){return String.prototype.trim.call(ae)}:function(ae){return ae.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ke(ee,ae){return function(){return ae.apply(ee,Array.prototype.slice.call(arguments,0))}}function Ce(ee,ae){return Array.prototype.slice.call(ee,ae||0)}function Se(ee,ae){ve(ee,function(ie,le){return ae(ie,le),!1})}function Me(ee,ae){var ie=we(ee)?[]:{};return ve(ee,function(le,ue){return ie[ue]=ae(le,ue),!1}),ie}function ve(ee,ae){if(we(ee)){for(var ie=0;ie<ee.length;ie++)if(ae(ee[ie],ie))return ee[ie]}else for(var le in ee)if(ee.hasOwnProperty(le)&&ae(ee[le],le))return ee[le]}function we(ee){return ee!=null&&typeof ee!="function"&&typeof ee.length=="number"}function de(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},97573:function(gn,cn,at){gn.exports=[at(52496),at(16436),at(76673),at(35701),at(65578),at(65300)]},35701:function(gn,cn,at){var ct=at(67039),Bt=ct.Global,oe=ct.trim;gn.exports={name:"cookieStorage",read:De,write:me,each:fe,remove:ke,clearAll:Ce};var ze=Bt.document;function De(Me){if(!Me||!Se(Me))return null;var ve="(?:^|.*;\\s*)"+escape(Me).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(ze.cookie.replace(new RegExp(ve),"$1"))}function fe(Me){for(var ve=ze.cookie.split(/; ?/g),we=ve.length-1;we>=0;we--)if(oe(ve[we])){var de=ve[we].split("="),z=unescape(de[0]),ee=unescape(de[1]);Me(ee,z)}}function me(Me,ve){Me&&(ze.cookie=escape(Me)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ke(Me){!Me||!Se(Me)||(ze.cookie=escape(Me)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function Ce(){fe(function(Me,ve){ke(ve)})}function Se(Me){return new RegExp("(?:^|;\\s*)"+escape(Me).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(ze.cookie)}},52496:function(gn,cn,at){var ct=at(67039),Bt=ct.Global;gn.exports={name:"localStorage",read:ze,write:De,each:fe,remove:me,clearAll:ke};function oe(){return Bt.localStorage}function ze(Ce){return oe().getItem(Ce)}function De(Ce,Se){return oe().setItem(Ce,Se)}function fe(Ce){for(var Se=oe().length-1;Se>=0;Se--){var Me=oe().key(Se);Ce(ze(Me),Me)}}function me(Ce){return oe().removeItem(Ce)}function ke(){return oe().clear()}},65300:function(gn){gn.exports={name:"memoryStorage",read:at,write:ct,each:Bt,remove:oe,clearAll:ze};var cn={};function at(De){return cn[De]}function ct(De,fe){cn[De]=fe}function Bt(De){for(var fe in cn)cn.hasOwnProperty(fe)&&De(cn[fe],fe)}function oe(De){delete cn[De]}function ze(De){cn={}}},16436:function(gn,cn,at){var ct=at(67039),Bt=ct.Global;gn.exports={name:"oldFF-globalStorage",read:ze,write:De,each:fe,remove:me,clearAll:ke};var oe=Bt.globalStorage;function ze(Ce){return oe[Ce]}function De(Ce,Se){oe[Ce]=Se}function fe(Ce){for(var Se=oe.length-1;Se>=0;Se--){var Me=oe.key(Se);Ce(oe[Me],Me)}}function me(Ce){return oe.removeItem(Ce)}function ke(){fe(function(Ce,Se){delete oe[Ce]})}},76673:function(gn,cn,at){var ct=at(67039),Bt=ct.Global;gn.exports={name:"oldIE-userDataStorage",write:me,read:ke,each:Ce,remove:Se,clearAll:Me};var oe="storejs",ze=Bt.document,De=de(),fe=(Bt.navigator?Bt.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function me(z,ee){if(!fe){var ae=we(z);De(function(ie){ie.setAttribute(ae,ee),ie.save(oe)})}}function ke(z){if(!fe){var ee=we(z),ae=null;return De(function(ie){ae=ie.getAttribute(ee)}),ae}}function Ce(z){De(function(ee){for(var ae=ee.XMLDocument.documentElement.attributes,ie=ae.length-1;ie>=0;ie--){var le=ae[ie];z(ee.getAttribute(le.name),le.name)}})}function Se(z){var ee=we(z);De(function(ae){ae.removeAttribute(ee),ae.save(oe)})}function Me(){De(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(oe);for(var ae=ee.length-1;ae>=0;ae--)z.removeAttribute(ee[ae].name);z.save(oe)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function we(z){return z.replace(/^\d/,"___$&").replace(ve,"___")}function de(){if(!ze||!ze.documentElement||!ze.documentElement.addBehavior)return null;var z="script",ee,ae,ie;try{ae=new ActiveXObject("htmlfile"),ae.open(),ae.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),ae.close(),ee=ae.w.frames[0].document,ie=ee.createElement("div")}catch(le){ie=ze.createElement("div"),ee=ze.body}return function(le){var ue=[].slice.call(arguments,0);ue.unshift(ie),ee.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(oe),le.apply(this,ue),ee.removeChild(ie)}}},65578:function(gn,cn,at){var ct=at(67039),Bt=ct.Global;gn.exports={name:"sessionStorage",read:ze,write:De,each:fe,remove:me,clearAll:ke};function oe(){return Bt.sessionStorage}function ze(Ce){return oe().getItem(Ce)}function De(Ce,Se){return oe().setItem(Ce,Se)}function fe(Ce){for(var Se=oe().length-1;Se>=0;Se--){var Me=oe().key(Se);Ce(ze(Me),Me)}}function me(Ce){return oe().removeItem(Ce)}function ke(){return oe().clear()}},93314:function(gn){"use strict";gn.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=="},16722:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ke}});const ct=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,Bt=(Ce,Se)=>(!Se||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",oe=(Ce,Se)=>{if(Ce.clientHeight<Ce.scrollHeight||Ce.clientWidth<Ce.scrollWidth){const Me=getComputedStyle(Ce,null);return Bt(Me.overflowY,Se)||Bt(Me.overflowX,Se)||(ve=>{const we=(de=>{if(!de.ownerDocument||!de.ownerDocument.defaultView)return null;try{return de.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!we&&(we.clientHeight<ve.scrollHeight||we.clientWidth<ve.scrollWidth)})(Ce)}return!1},ze=(Ce,Se,Me,ve,we,de,z,ee)=>de<Ce&&z>Se||de>Ce&&z<Se?0:de<=Ce&&ee<=Me||z>=Se&&ee>=Me?de-Ce-ve:z>Se&&ee<Me||de<Ce&&ee>Me?z-Se+we:0,De=Ce=>{const Se=Ce.parentElement;return Se==null?Ce.getRootNode().host||null:Se},fe=(Ce,Se)=>{var Me,ve,we,de;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:ae,boundary:ie,skipOverflowHiddenElements:le}=Se,ue=typeof ie=="function"?ie:wt=>wt!==ie;if(!ct(Ce))throw new TypeError("Invalid target");const ge=document.scrollingElement||document.documentElement,Pe=[];let je=Ce;for(;ct(je)&&ue(je);){if(je=De(je),je===ge){Pe.push(je);break}je!=null&&je===document.body&&oe(je)&&!oe(document.documentElement)||je!=null&&oe(je,le)&&Pe.push(je)}const Be=(ve=(Me=window.visualViewport)==null?void 0:Me.width)!=null?ve:innerWidth,Fe=(de=(we=window.visualViewport)==null?void 0:we.height)!=null?de:innerHeight,{scrollX:Ne,scrollY:Ae}=window,{height:Ie,width:We,top:Ye,right:Ue,bottom:Ke,left:ot}=Ce.getBoundingClientRect(),{top:st,right:dt,bottom:Ct,left:$e}=(wt=>{const pt=window.getComputedStyle(wt);return{top:parseFloat(pt.scrollMarginTop)||0,right:parseFloat(pt.scrollMarginRight)||0,bottom:parseFloat(pt.scrollMarginBottom)||0,left:parseFloat(pt.scrollMarginLeft)||0}})(Ce);let rt=ee==="start"||ee==="nearest"?Ye-st:ee==="end"?Ke+Ct:Ye+Ie/2-st+Ct,St=ae==="center"?ot+We/2-$e+dt:ae==="end"?Ue+dt:ot-$e;const Pt=[];for(let wt=0;wt<Pe.length;wt++){const pt=Pe[wt],{height:ft,width:ht,top:Et,right:mt,bottom:yt,left:At}=pt.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&ot>=0&&Ke<=Fe&&Ue<=Be&&(pt===ge&&!oe(pt)||Ye>=Et&&Ke<=yt&&ot>=At&&Ue<=mt))return Pt;const xt=getComputedStyle(pt),tt=parseInt(xt.borderLeftWidth,10),Ve=parseInt(xt.borderTopWidth,10),xe=parseInt(xt.borderRightWidth,10),Le=parseInt(xt.borderBottomWidth,10);let Ze=0,nt=0;const Re="offsetWidth"in pt?pt.offsetWidth-pt.clientWidth-tt-xe:0,_e="offsetHeight"in pt?pt.offsetHeight-pt.clientHeight-Ve-Le:0,He="offsetWidth"in pt?pt.offsetWidth===0?0:ht/pt.offsetWidth:0,Qe="offsetHeight"in pt?pt.offsetHeight===0?0:ft/pt.offsetHeight:0;if(ge===pt)Ze=ee==="start"?rt:ee==="end"?rt-Fe:ee==="nearest"?ze(Ae,Ae+Fe,Fe,Ve,Le,Ae+rt,Ae+rt+Ie,Ie):rt-Fe/2,nt=ae==="start"?St:ae==="center"?St-Be/2:ae==="end"?St-Be:ze(Ne,Ne+Be,Be,tt,xe,Ne+St,Ne+St+We,We),Ze=Math.max(0,Ze+Ae),nt=Math.max(0,nt+Ne);else{Ze=ee==="start"?rt-Et-Ve:ee==="end"?rt-yt+Le+_e:ee==="nearest"?ze(Et,yt,ft,Ve,Le+_e,rt,rt+Ie,Ie):rt-(Et+ft/2)+_e/2,nt=ae==="start"?St-At-tt:ae==="center"?St-(At+ht/2)+Re/2:ae==="end"?St-mt+xe+Re:ze(At,mt,ht,tt,xe+Re,St,St+We,We);const{scrollLeft:ut,scrollTop:gt}=pt;Ze=Qe===0?0:Math.max(0,Math.min(gt+Ze/Qe,pt.scrollHeight-ft/Qe+_e)),nt=He===0?0:Math.max(0,Math.min(ut+nt/He,pt.scrollWidth-ht/He+Re)),rt+=gt-Ze,St+=ut-nt}Pt.push({el:pt,top:Ze,left:nt})}return Pt},me=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(Se=>Se===Object(Se)&&Object.keys(Se).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function ke(Ce,Se){if(!Ce.isConnected||!(we=>{let de=we;for(;de&&de.parentNode;){if(de.parentNode===document)return!0;de=de.parentNode instanceof ShadowRoot?de.parentNode.host:de.parentNode}return!1})(Ce))return;const Me=(we=>{const de=window.getComputedStyle(we);return{top:parseFloat(de.scrollMarginTop)||0,right:parseFloat(de.scrollMarginRight)||0,bottom:parseFloat(de.scrollMarginBottom)||0,left:parseFloat(de.scrollMarginLeft)||0}})(Ce);if((we=>typeof we=="object"&&typeof we.behavior=="function")(Se))return Se.behavior(fe(Ce,Se));const ve=typeof Se=="boolean"||Se==null?void 0:Se.behavior;for(const{el:we,top:de,left:z}of fe(Ce,me(Se))){const ee=de-Me.top+Me.bottom,ae=z-Me.left+Me.right;we.scroll({top:ee,left:ae,behavior:ve})}}}}]);