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 gt=at(71409),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,gt.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 gt=at(71409),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,gt.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 gt(){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,Re=le-Ae*ie;Fe=de,Ne=Ae*Fe+Re}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,Re=le-Ae*ie;Fe=(Re-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 Re=1-Pe,We=Pe,Ye=de*Re+ee*We,Ue=z*Re+ae*We,Ke=ee*Re+ie*We,ot=ae*Re+le*We,st=ie*Re+ue*We,ft=le*Re+ge*We,bt=Ye*Re+Ke*We,$e=Ue*Re+ot*We,nt=Ke*Re+st*We,xt=ot*Re+ft*We,wt=bt*Re+nt*We,Pt=$e*Re+xt*We;je.x=Ye,je.y=Ue,Be.x=bt,Be.y=$e,Fe.x=wt,Fe.y=Pt,Ne.x=nt,Ne.y=xt,Ae.x=st,Ae.y=ft}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=xe(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 xe(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=xe(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=xe(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=xe(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=xe(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=xe(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=xe(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=gt(),Be=gt(),Fe=gt(),Ne=gt();ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.42,je,Be,Fe,Ne,Ne);var Ae=gt(),Re=gt(),We=gt();ze(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.58,Ne,Ne,We,Ae,Re);var Ye=gt(),Ue=gt(),Ke=gt();ze(ue,ge+le,ue-ie,ge+le,ue-le,ge+ie,ue-le,ge,.42,Ye,Ue,Ke,Ne,Ne);var ot=gt(),st=gt(),ft=gt();return ze(ue,ge+le,ue-ie,ge+le,ue-le,ge+ie,ue-le,ge,.58,Ne,Ne,ft,ot,st),Pe.add(new go.PathSegment(go.PathSegment.Move,ft.x*z,ft.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,ft.x*z,ft.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,Re.x*z,Re.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(Re),Bt(We),Bt(Ye),Bt(Ue),Bt(Ke),Bt(ot),Bt(st),Bt(ft),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=gt(),je=gt(),Be=gt(),Fe=gt(),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 Re=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,(Re.x*.1+.9)*z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Re.x*.1+.9)*z,(Re.y*.1+.05*.9)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Re.x*z,Re.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(Re),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,gt());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,gt());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,gt());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,gt());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,gt());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,gt());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,gt());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,gt());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,gt());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,gt());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 Re=new go.PathFigure((Pe-ge)*z+Be,je*ee+Fe,!0);ae.add(Re),Re.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)),Re.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)),Re.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)),Re.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=gt(),je=gt(),Be=gt(),Fe=gt();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,Re=new go.PathFigure(Pe*z,(1-je)*ee,!1);return ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,Fe*ee,Be*z,.7*ee,Be*z,Fe*ee)),Re.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)),Re.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)),Re.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)),Re.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*ee)),Re.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*ee)),Re.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,Re=Be*Ne,We=Be*Ae;le.add(new go.PathSegment(go.PathSegment.Bezier,(ge-Ne)*z,Pe*ee,(ge-(Re+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-Re)*z,(Pe-Ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(ge+Ne)*z,Pe*ee,(ge+Re)*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+(Re+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,Re=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),Re.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={},gt=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"?gt=Ce:at=Ce;break;case"boolean":Bt=Ce,oe=!0;break}}gt===null&&(gt={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,xe=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(dt){return parseFloat(dt)>4?parseFloat(dt):5};gn.setHTML5Codebase=function(dt,ct){me=dt,xt(dt,ct)},gn.setJavaCodebase=gn.setJavaCodebaseVersion=gn.isCompiledInstalled=gn.setPreCompiledScriptPath=gn.setPreCompiledResourcePath=function(){},gn.setHTML5CodebaseVersion=function(dt,ct){var ht=parseFloat(dt);if(ht!==NaN&&ht<5){console.log("The GeoGebra HTML5 codebase version "+ht+" is deprecated. Using version latest instead.");return}fe=dt,nt(dt,ct)},gn.getHTML5CodebaseVersion=function(){return de},gn.getParameters=function(){return at},gn.setFontsCSSURL=function(dt){ue=dt},gn.setGiacJSURL=function(dt){},gn.setJNLPFile=function(dt){Se=dt},gn.setJNLPBaseDir=function(dt){},gn.inject=function(){function dt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ct="auto",ht=at.id,Et,vt=!1,Ft=0;Ft<arguments.length;Ft++){var mt=arguments[Ft];typeof mt=="string"?(mt=mt.toLowerCase(),mt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?ct=mt:ht=arguments[Ft]):typeof mt=="boolean"?vt=mt:mt instanceof HTMLElement&&(Et=mt)}St();function St(){if(!De){setTimeout(St,200);return}ct=bt(ct);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)&&ct==="html5"&&(delete at.width,delete at.height),xe=ct,ct==="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()||dt())&&Be()),Ve?(xe="screenshot",ot(tt,at,vt,ct)):Ye(tt,at,vt)}}};function je(){try{return window.self!==window.top}catch(dt){return!0}}function Be(){return at.hasOwnProperty("screenshotGenerator")&&at.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}gn.getViews=function(){return gt},gn.isJavaInstalled=function(){return!1};var Fe=function(dt){var ct=function(Ft){var mt=JSON.parse(Ft),St=function(we){return we.type=="G"||we.type=="E"},tt=mt.elements?mt.elements.filter(St)[0]:mt;if(!tt||!tt.url){ht();return}at.fileName=tt.url,Ne(tt.settings||{}),gt.is3D=!0;var Ve="https://www.geogebra.org/images/";gn.setPreviewImage(ae||tt.previewUrl,Ve+"GeoGebra_loading.png",Ve+"applet_play.png"),dt()},ht=function(){at.onError&&at.onError(),wt("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",vt="/materials/"+at.material_id+"?scope=basic";Ae("https://"+Et+"/api/proxy.php?path="+encodeURIComponent(vt),ct,ht)};function Ne(dt){var ct=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ht){dt[ht]=!!dt[ht]}),ct.forEach(function(ht){at[ht]===void 0&&dt[ht]!==void 0&&(at[ht]=dt[ht])}),at.showToolBarHelp===void 0&&(at.showToolBarHelp=at.showToolBar)}function Ae(dt,ct,ht){var Et=new XMLHttpRequest;Et.open("GET",dt),Et.onload=function(){ct(Et.responseText)},Et.onerror=ht,Et.send()}gn.isHTML5Installed=function(){return!0},gn.getLoadedAppletType=function(){return xe},gn.setPreviewImage=function(dt,ct,ht){ae=dt,ie=ct,le=ht},gn.removeExistingApplet=function(dt,ct){var ht;typeof dt=="string"&&(dt=document.getElementById(dt)),xe=null;var Et=null;for(ht=0;ht<dt.childNodes.length;ht++){var vt=dt.childNodes[ht],Ft=vt.className;Ft==="applet_screenshot"?ct?(vt.style.display="block",xe="screenshot"):vt.style.display="none":Ft!=="applet_scaler prerender"&&(dt.removeChild(vt),Et=Ft&&Ft.indexOf("appletParameters")!=-1?vt.id:null,ht--)}var mt=at.id!==void 0?at.id:Et,St=window[mt];St&&typeof St.getBase64=="function"&&(St.remove(),window[mt]=null)},gn.refreshHitPoints=function(){if(Pe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var dt=gn.getAppletObject();return dt&&typeof dt.recalculateEnvironments=="function"?(dt.recalculateEnvironments(),!0):!1},gn.startAnimation=function(){var dt=gn.getAppletObject();return dt&&typeof dt.startAnimation=="function"?(dt.startAnimation(),!0):!1},gn.stopAnimation=function(){var dt=gn.getAppletObject();return dt&&typeof dt.stopAnimation=="function"?(dt.stopAnimation(),!0):!1},gn.getAppletObject=function(){var dt=at.id!==void 0?at.id:"ggbApplet";return window[dt]},gn.resize=function(){};var Re=function(dt,ct,ht){var Et=document.createElement("param");Et.setAttribute("name",ct),Et.setAttribute("value",ht),dt.appendChild(Et)},We=function(dt){return dt&&dt!=="false"},Ye=function(dt,ct,ht){Pe(de)<=4.2&&(ht=!0);var Et=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==de||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Et=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var vt=document.createElement("div");vt.classList.add("appletParameters","notranslate");var Ft=ct.width,mt=ct.height;if(ct.disableAutoScale=ct.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ct.disableAutoScale,ct.width!==void 0)if(Pe(de)<=4.4)We(ct.showToolBar)&&(ct.height-=7),We(ct.showAlgebraInput)&&(ct.height-=37),ct.width<605&&We(ct.showToolBar)&&(ct.width=605,Ft=605);else{var St=100;(We(ct.showToolBar)||We(ct.showMenuBar))&&(ct.hasOwnProperty("customToolBar")&&(ct.customToolbar=ct.customToolBar),St=We(ct.showMenuBar)?245:155),Ft<St&&(ct.width=St,Ft=St)}vt.style.border="none",vt.style.display="inline-block";for(var tt in ct)ct.hasOwnProperty(tt)&&tt!=="appletOnLoad"&&vt.setAttribute("data-param-"+tt,ct[tt]);ue&&vt.setAttribute("data-param-fontscssurl",ue),gn.resize=function(){GGBAppletUtils.responsiveResize(dt,ct)},window.addEventListener("resize",function(At){gn.resize()});var Ve=typeof ct.appletOnLoad=="function"?ct.appletOnLoad:function(){};if(!ht&&ct.width!==void 0){ct.hasOwnProperty("showSplash")||vt.setAttribute("data-param-showSplash","false");var we=dt.querySelector(".applet_scaler.prerender"),Le=we!==null;if(Le)var Ze=we.querySelector(".ggb_preview");else{var Ze=ft(Ft,mt,ct.borderColor,!1);we=document.createElement("div"),we.className="applet_scaler",we.style.position="relative",we.style.display="block",we.style.width=Ft+"px",we.style.height=mt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(we,"66%"),Pe(de)>=5?(ct.appletOnLoad=function(At){var Dt=dt.querySelector(".ggb_preview");Dt&&Dt.parentNode.removeChild(Dt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(we),window.GGBT_wsf_view&&$(window).trigger("resize"),Ve(At)},Le||we.appendChild(Ze)):vt.appendChild(Ze),we.appendChild(vt),Le||dt.appendChild(we),setTimeout(function(){gn.resize()},1)}else{var rt=document.createElement("div");rt.className="applet_scaler",rt.style.position="relative",rt.style.display="block",rt.appendChild(vt),dt.appendChild(rt),ct.appletOnLoad=function(At){gn.resize(),Ve(At)}}function Ie(At,Dt){Dt&&typeof Dt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(At,Dt.appletOnLoad):renderGGBElement(At),wt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Dt)}function _e(At,Dt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:At,params:Dt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Kt){Ie(Kt.article,Kt.params)}),html5AppletsToProcess=null)},Pe(de)<5&&(At.className+=" geogebraweb")):Ie(At,Dt)}if(Et){scriptLoadStarted=!0;for(var He=0;He<vt.childNodes.length;He++){var Qe=vt.childNodes[He].tagName;Qe==="TABLE"&&(vt.removeChild(vt.childNodes[He]),He--)}if(ggbHTML5LoadedScript!==null){var ut=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ut!=null&&ut.parentNode.removeChild(ut)}var pt=document.createElement("script"),Mt=function(){_e(vt,ct)};pt.src=Me+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=de,ggbHTML5LoadedScript=pt.src,wt("GeoGebra HTML5 codebase loaded: '"+Me+"'.",ct),!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 At=[__webpack_require__(87963)];Mt.apply(null,At)}.bind(this)).catch(__webpack_require__.oe):(pt.onload=Mt,dt.appendChild(pt))}else _e(vt,ct);ct.height=mt,ct.width=Ft},Ue=function(dt,ct,ht){var Et=ft(ct.width,ct.height,ct.borderColor,ht),vt=document.createElement("div");vt.style.position="relative",vt.style.display="block",vt.style.width=ct.width+"px",vt.style.height=ct.height+"px",vt.className="applet_screenshot applet_scaler"+(ht?" applet_screenshot_play":""),vt.appendChild(Et);var Ft=GGBAppletUtils.getScale(ct,dt,ht);ht?(dt.appendChild(st()),window.GGBT_wsf_view||(dt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(vt,"66%"),dt.appendChild(vt),Ft!==1&&!isNaN(Ft)&&(GGBAppletUtils.scaleElement(vt,Ft),vt.style.width=ct.width+"px",vt.style.height=ct.height+"px",vt.parentNode.style.width=ct.width*Ft+"px",vt.parentNode.style.height=ct.height*Ft+"px"),gn.resize=function(){Ke(dt,Et,vt,ht)},window.addEventListener("resize",function(mt){gn.resize()}),gn.resize()};function Ke(dt,ct,ht,Et){if(dt.contains(ct)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(dt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(dt)}var vt=GGBAppletUtils.getScale(at,dt,Et);ht.parentNode!==null&&(!isNaN(vt)&&vt!==1?(GGBAppletUtils.scaleElement(ht,vt),ht.parentNode.style.width=at.width*vt+"px",ht.parentNode.style.height=at.height*vt+"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(dt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}gn.onExitFullscreen=function(dt,ct){ct.appendChild(dt)};var ot=function(dt,ct,ht,Et){Ue(dt,ct,!0);for(var vt=function(){var St=[];for(mt=0;mt<dt.childNodes.length;mt++)St.push(dt.childNodes[mt]);if(window.GGBT_wsf_view){var tt=window.GGBT_wsf_view.renderFullScreen(dt,ct.id),Ve=document.getElementById("fullscreencontainer"),we=jQuery(dt).find(".fullscreencontent");we.length>0?(tt.remove(),we.attr("id","fullscreencontent").show(),jQuery(Ve).append(we),window.dispatchEvent(new Event("resize"))):Ye(tt,ct,!1),window.GGBT_wsf_view.launchFullScreen(Ve)}else xe=Et,Ye(dt,ct,!1);if(!window.GGBT_wsf_view)for(mt=0;mt<St.length;mt++)dt.removeChild(St[mt])},Ft=dt.getElementsByClassName("ggb_preview_play"),mt=0;mt<Ft.length;mt++)Ft[mt].addEventListener("click",vt,!1),Ft[mt].addEventListener("ontouchstart",vt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(dt),Be()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},st=function(){var dt=document.createElement("div");if(dt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var ct='.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=ct:ht.appendChild(document.createTextNode(ct)),document.getElementsByTagName("head")[0].appendChild(ht)}return dt},ft=function(dt,ct,ht,Et){var vt=document.createElement("div");vt.className="ggb_preview",vt.style.position="absolute",vt.style.zIndex="90",vt.style.width=dt-2+"px",vt.style.height=ct-2+"px",vt.style.top="0px",vt.style.left="0px",vt.style.overflow="hidden",vt.style.backgroundColor="white";var Ft="lightgrey";ht!==void 0&&(ht==="none"?Ft="transparent":Ft=ht),vt.style.border="1px solid "+Ft;var mt=document.createElement("img");if(mt.style.position="relative",mt.style.zIndex="1000",mt.style.top="-1px",mt.style.left="-1px",ae!==null&&mt.setAttribute("src",ae),mt.style.opacity=.7,ie!==null){var St,tt,Ve;if(!Et){St=document.createElement("img"),St.style.position="absolute",St.style.zIndex="1001",St.style.opacity=1,mt.style.opacity=.3,tt=360,tt>dt/4*3&&(tt=dt/4*3),Ve=tt/5.8,St.setAttribute("src",ie),St.setAttribute("width",tt),St.setAttribute("height",Ve);var we=(dt-tt)/2,Le=(ct-Ve)/2;St.style.left=we+"px",St.style.top=Le+"px",vt.appendChild(St)}}return vt.appendChild(mt),vt},bt=function(dt){return dt=dt.toLowerCase(),dt==="html5"||dt==="screenshot"?dt:"html5"},$e=["web","webSimple","web3d","tablet","tablet3d","phone"],nt=function(dt,ct){if(de=dt,ct){xt(de,!0);return}var ht=!Bt;if(ht){var Et=Pe(de);!isNaN(Et)&&Et<4.4&&(ht=!1)}var vt,Ft;window.location.protocol.substr(0,4)==="http"?vt=window.location.protocol:vt="http:";var mt=de.indexOf("//");mt>0?Ft=de:mt===0?Ft=vt+de:Ft="https://www.geogebra.org/apps/5.2.814.0/";for(var St in $e)if(de.slice($e[St].length*-1)===$e[St]||de.slice(($e[St].length+1)*-1)===$e[St]+"/"){xt(Ft,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ht&&!gt.is3D&&!gt.AV&&!gt.SV&&!gt.CV&&!gt.EV2&&!gt.CP&&!gt.PC&&!gt.DA&&!gt.FI&&!gt.PV&&!We(at.showToolBar)&&!We(at.showMenuBar)&&!We(at.showAlgebraInput)&&!We(at.enableRightClick)&&(!at.appName||at.appName=="classic")?Ft+="webSimple/":Ft+="web3d/",xt(Ft,!1)},xt=function(dt,ct){if(dt.requirejs){Me=dt;return}dt.slice(-1)!=="/"&&(dt+="/"),Me=dt,ct===null&&(ct=dt.indexOf("http")===-1),ve=ct,z="web.nocache.js",ee=!1;var ht=Me.split("/");ht.length>1&&(!ct&&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=dt.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&&dt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Et+" is deprecated. Using version latest instead."),nt("5.0",ct))},wt=function(dt,ct){window.console&&window.console.log&&(!ct||typeof ct.showLogging=="undefined"||ct.showLogging&&ct.showLogging!=="false")&&console.log(dt)};at.material_id!==void 0?Fe(Pt):Pt();function Pt(){var dt=cn;fe!==null?dt=fe:parseFloat(dt)<5&&(dt="5.0"),nt(dt,!1),me!==null&&xt(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 xe=0,de=0,z=0,ee=0,ae=0,ie=0,le=0;if(Me)xe=Me.offsetWidth,de=Math.max(ke?Me.offsetWidth:0,Me.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xe=Math.min(window.innerWidth,document.documentElement.clientWidth),de=Math.min(window.innerHeight,document.documentElement.clientHeight),z=xe):(xe=window.innerWidth,de=window.innerHeight,z=window.innerWidth),De){var ue=De.getBoundingClientRect();ue.left>0&&ue.left<=xe&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ae=xe-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<xe?xe=fe:xe-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(me===void 0||!me)&&(de-=le)),{width:xe,height:de}}function gt(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"},xe=ve(De.autoHeight),de=at(fe,De.width,me,xe,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=gt(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():{},gt=gn[webModule.__softPermutationId],Bt=O;Bt<gt.length;Bt++){var oe=gt[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(gt){function Bt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var oe=Bt();if(oe){gt();return}function ze(){if(!oe){if(!Bt())return;oe=!0,gt(),o.removeEventListener&&o.removeEventListener(Z,ze,!1),De&&clearInterval(De)}}o.addEventListener&&o.addEventListener(Z,ze,!1);var De=setInterval(function(){ze()},$)}function at(gt){var Bt=u(),oe=Bt.body,ze=Bt.createElement(_);ze.language=ab,ze.crossOrigin=W,ze.src=gt,webModule.__errFn&&(ze.onerror=function(){webModule.__errFn(L,new Error(bb+gt))}),oe.appendChild(ze)}cn(function(){at(gn)})}webModule.__startLoadingFragment=function(gn){return C(gn)},webModule.__installRunAsyncCode=function(gn){var cn=u(),at=cn.body,gt=cn.createElement(_);gt.language=ab,gt.text=gn,at.appendChild(gt),at.removeChild(gt)};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 gt(){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=gt()),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=[],gt=[];function Bt(De){var fe=gt[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 gt=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],xe=Ce?`${Ce}/${ve.name}`:`${ve.name}`;Se.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:xe})}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,xe=arguments,de=function(){Me=null,Se||ke.apply(ve,xe)},z=Se&&!Me;clearTimeout(Me),Me=setTimeout(de,Ce),z&&ke.apply(ve,xe)}}const fe=!0,me=gt.Z.API_SERVER},9507:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Me}});var gt=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,xe,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,xe)).next())}),Me=({data:ve,className:xe,fullWidth:de,style:z={},onClose:ee,onOk:ae,showFullTools:ie,noAssociationId:le})=>{const ue=(0,gt.useRef)(null),ge=(0,gt.useRef)(null),Pe=(0,gt.useRef)(null),je=(0,gt.useRef)(null),[Be,Fe]=(0,gt.useState)(!1),[Ne,Ae]=(0,gt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,gt.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&&Re()):(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 Re=()=>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 ft=document.querySelector(st.name);ft&&ft.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 gt.createElement(gt.Fragment,null,(ve==null?void 0:ve.visible)&&gt.createElement(De.Z,{spinning:Be,tip:Ne,style:{position:"absolute",width:"100vw"}},gt.createElement("div",{ref:je,className:ze()(Bt.imageDimensions,xe,de?Bt.fullWidth:""),style:z},gt.createElement("img",{className:Bt.img,ref:ue}))))}},76562:function(gn,cn,at){"use strict";var gt=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,gt.forwardRef)(({callback:Me,showSaveButton:ve,value:xe=""},de)=>{const z=(0,gt.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,gt.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}},xe||""),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 gt=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 xe=({img:de,buttonProps:z={},styles:ee={},customText:ae,ButtonText:ie,ButtonClick:le,Buttonclass:ue,ButtonTwo:ge,imgStyles:Pe,loading:je=!1,className:Be=""})=>gt.createElement("section",{className:`tc animated fadeIn ${Be}`,style:Me({color:"#999",margin:"100px auto",visibility:je?"hidden":"visible"},ee)},gt.createElement("img",{src:de||Bt,style:ve(Me({},Pe),{pointerEvents:"none",userSelect:"none"})}),gt.createElement("p",{className:"mt20 font14"},ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&gt.createElement(oe.ZP,Me({className:ue,onClick:le},z),ie),ge&&ge);cn.Z=xe},45677:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ue}});var gt=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),xe=Object.defineProperty,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(ge,Pe,je)=>Pe in ge?xe(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{Re(je.next(We))}catch(Ye){Fe(Ye)}},Ae=We=>{try{Re(je.throw(We))}catch(Ye){Fe(Ye)}},Re=We=>We.done?Be(We.value):Promise.resolve(We.value).then(Ne,Ae);Re((je=je.apply(ge,Pe)).next())}),ue=({editOffice:ge="view",data:Pe,issaver:je,onSaver:Be,theme:Fe,type:Ne,filename:Ae,monacoEditor:Re,className:We,style:Ye,close:Ue,onClose:Ke,hasMask:ot,disabledDownload:st,onImgDimensions:ft,showNodata:bt,recordInfo:$e})=>{const[nt,xt]=(0,gt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[wt,Pt]=(0,gt.useState)(""),[dt,ct]=(0,gt.useState)(),ht=window.ENV==="build"?"/react/build":"",Et=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,Ft=10*(1024*1024),mt=(0,gt.useRef)();Pe!=null&&Pe.startsWith("/api")&&Ne!=="txt"&&(Pe=Se.Z.API_SERVER+Pe);const St=Ze=>Ze.substring(Ze.lastIndexOf("/")+1).split(".").pop();Ae&&Re&&(Re.filename=Ae),(0,gt.useEffect)(()=>{var Ze,rt;const Ie=(rt=(Ze=document.cookie)==null?void 0:Ze.replace(/\s/g,""))==null?void 0:rt.split(";");Ie==null||Ie.map(_e=>{let He=_e.split("=");He[0]==="_educoder_session"&&Pt(He[1])})},[]),(0,gt.useEffect)(()=>{Ne==="office"&&(Pe.indexOf("bigfilescdn.")>-1||Pe.indexOf("bigfiles1")>-1?ct({url:Pe,fileType:St(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 rt=new URL(Ze).pathname.split("/").pop();const Ie=yield(0,ke.gJ)({attachment_id:rt});Ie.url=Et+Ie.url,ct(Ie)}),we=()=>{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:mt},!!ft&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>mt.current},ve.createElement("span",{onClick:()=>{Ke(),ft()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!st&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>mt.current},ve.createElement("span",{onClick:Le},ve.createElement("i",{className:"icon-quxiaozhiding"}))),je&&ve.createElement(fe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>mt.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:()=>mt.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({},Re)))),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"&&dt&&ve.createElement("iframe",{src:`${ht}/office.html?key=${dt.key}&url=${btoa(dt.url)}&callbackUrl=${Et+(dt.callbackUrl||"")}&fileType=${dt.fileType}&title=${dt.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,bt?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:we,disabled:st},"\u4E0B\u8F7D")}):ve.createElement(oe.ZP,{type:"primary",size:"middle",onClick:we,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 gt=at(59301),Bt=at(8944),oe=at(81428),ze=at(64018),De=at(79710),fe=at(346),me=at(51257),ke=at(15342),Ce=at(1012),Se=at(45677),Me=at(59301),xe=({html:Ae})=>{const Re=(0,gt.useRef)(null),We=(0,gt.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,gt.useEffect)(()=>{const Ue=Re.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,gt.useEffect)(()=>{We.current&&(We.current.innerHTML=Ae)},[Ae]),Me.createElement("div",{ref:Re})};function de(Ae){const Re=["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(${Re.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,Re,We)=>Re in Ae?z(Ae,Re,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ae[Re]=We,ue=(Ae,Re)=>{for(var We in Re||(Re={}))ae.call(Re,We)&&le(Ae,We,Re[We]);if(ee)for(var We of ee(Re))ie.call(Re,We)&&le(Ae,We,Re[We]);return Ae};const ge="@\u2581\u2581@",Pe="@\u2581@",je=/<pre[^>]*>/g;function Be(Ae){let Re=document.createElement("div");return Re.innerHTML=Ae,Re.childNodes.length===0?"":Re.childNodes[0].nodeValue}const Fe=(Ae,Re)=>{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 Re?Ae.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(We,(ot,st,ft,bt,$e,nt,xt)=>{const wt=st||bt||nt,Pt=ft||$e||xt||"?";return fe.Z.API_SERVER+"/api/attachments/"+wt+Pt+"&t="+(0,me.Jn)(wt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ae=Ae.replace(Ke,(ot,st,ft,bt,$e,nt,xt)=>{const wt=st||bt||nt,Pt=ft||$e||xt||"?";return fe.Z.API_SERVER+"/attachments/download/"+wt+Pt+"&t="+(0,me.Jn)(wt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(We,(ot,st,ft,bt,$e,nt,xt)=>{const wt=st||bt||nt,Pt=ft||$e||xt||"?";return fe.Z.API_SERVER+"/api/attachments/"+wt+Pt+"&t="+(0,me.Jn)(wt,Date.now())+(ot.indexOf(")")>-1?")":"&")}).replace(Ye,(ot,st,ft,bt,$e)=>{const nt=st||bt,xt=ft||$e||"";return'"'+fe.Z.API_SERVER+"/api/attachments/"+nt+xt+nt+xt+"&t="+(0,me.Jn)(nt,Date.now())}).replace(Ue,(ot,st,ft,bt,$e)=>{const nt=st||bt,xt=ft||$e||"";return"("+fe.Z.API_SERVER+"/files/uploads/"+nt+xt+nt+xt+"&t="+(0,me.Jn)(nt,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:Re,showTextOnly:We,showLines:Ye,style:Ue={},stylesPrev:Ke={},highlightKeywords:ot,showProgramFill:st,isProgramFill:ft,disabledFill:bt=!1,programFillValue:$e,onFillChange:nt=Pt=>{},onFillBlur:xt=()=>{},onFillFocus:wt=()=>{}})=>{let Pt=de(String(Ae||""));const[dt,ct]=(0,gt.useState)(""),[ht,Et]=(0,gt.useState)("office"),[vt,Ft]=(0,gt.useState)([]),mt=(0,gt.useRef)("a"+(0,Ce.Z)()),St={},tt=Mt=>/<style[\s\S]*?>/i.test(Mt||""),Ve=(Mt,At,Dt)=>{const Kt=document.createElement(Mt===Pe?"input":"textarea");Kt.style.width="100%",Kt.style.height=Mt===Pe?"40px":"151px",Kt.rows=5,Kt.spellcheck=!1,Kt.name="edu-program-fill",Kt.placeholder="\u8BF7\u8F93\u5165",Kt.dataset.id=At;const Xt=Object.keys(St).length;return St[Xt]=Kt,`<span class="edu-program-fill-wrap ${Mt===Pe?"":"show"}" style="width:${Mt===Pe?"400px":"100%"}" title=${Dt||""}><span>${Kt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function we(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(Pt)?Mt:Mt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(At,Dt){let Kt=Dt.replace(/(\n|\r)/g,"").split("}"),Xt=[];return Kt.map($t=>{$t!=""&&Xt.push(`.${mt.current} ${$t}`)}),`<style>${Xt.join("}")}</style>`}),Ze=(0,gt.useMemo)(()=>{try{const Kt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Xt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,$t=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ut=/\(\/attachments\/download\//g;Pt=Pt.replace(Ut,"("+fe.Z.API_SERVER+"/attachments/download/").replace(Kt,"("+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(Kt){}if(st){let Kt=-1;return Pt=Pt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Xt,$t,Ut){var sn;return++Kt,Ve(Xt,Kt,(sn=$e==null?void 0:$e[Kt])==null?void 0:sn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Le(Pt||"")}</pre>`}let Mt=Le(Pt);Mt=(0,oe.ZP)(Mt);const At=(0,oe.ez)();Pt.match(/\[TOC\]/)&&(Mt=Mt.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,(Kt,Xt)=>{const{type:$t,expression:Ut}=At[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 Kt=ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return He(Dt,Kt),Dt.innerHTML}return setTimeout(()=>pt(),500),Dt.innerHTML},[Pt,ot]);(0,gt.useEffect)(()=>{Qe.current&&Qe.current.querySelectorAll(["input","textarea"]).forEach(At=>{At.oninput=rt,At.onblur=Ie,At.onfocus=_e})},[vt]),(0,gt.useEffect)(()=>{var Mt,At,Dt,Kt,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,tn]of Ut.entries())tn.value=((Mt=$e==null?void 0:$e[sn])==null?void 0:Mt.value)||"",((At=$e==null?void 0:$e[sn])==null?void 0:At.type)==="warning"?tn.className="program-fill-warning":((Dt=$e==null?void 0:$e[sn])==null?void 0:Dt.type)==="success"?tn.className="program-fill-success":tn.className="";for(const[sn,tn]of $t.entries())tn.innerHTML=(Kt=$e==null?void 0:$e[sn])!=null&&Kt.score?`${(Xt=$e==null?void 0:$e[sn])==null?void 0:Xt.score}\u5206`:"";Ft($e)}catch($t){console.log($t,"error")}},[$e]);const rt=Mt=>{vt[Mt.target.dataset.id]=vt[Mt.target.dataset.id]||{},vt[Mt.target.dataset.id].value=Mt.target.value,Ft([...vt]),nt(vt,Mt.target.dataset.id)},Ie=Mt=>{vt[Mt.target.dataset.id]=vt[Mt.target.dataset.id]||{},vt[Mt.target.dataset.id].value=Mt.target.value,Ft([...vt]),xt(vt,Mt.target.dataset.id)},_e=Mt=>{vt[Mt.target.dataset.id]=vt[Mt.target.dataset.id]||{},vt[Mt.target.dataset.id].value=Mt.target.value,Ft([...vt]),wt(vt,Mt.target.dataset.id)};function He(Mt,At){return Mt.childNodes.forEach(Dt=>{var Kt;if(Dt.childNodes.length>0)He(Dt,At);else if(Dt.nodeName!=="IMG")if(Dt.innerHTML)Dt.innerHTML=(Kt=Dt.innerHTML)==null?void 0:Kt.replace(new RegExp(At,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Xt=document.createElement("span");Xt.innerHTML=Dt.textContent.replace(new RegExp(At,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Dt.replaceWith(Xt)}})}const Qe=(0,gt.useRef)();oe.jb.WebkitLineClamp=Ye,Ye&&(Ue=ue(ue({},Ue),oe.jb));function ut(Mt){let At=Mt.target;if(At.tagName.toUpperCase()==="A"){let Dt=At.getAttribute("href");if(Dt.indexOf("office")>-1)Mt.preventDefault(),ct(Dt),Et("office");else if(Dt.indexOf("application/pdf")>-1)Mt.preventDefault(),ct(Dt),Et("pdf");else if(Dt.indexOf("text/html")>-1)Mt.preventDefault(),ct(Dt),Et("html");else if(Dt.startsWith("#")){Mt.preventDefault();let Kt=document.getElementById(Dt.replace("#",""));Kt&&Kt.scrollIntoView(!0)}}}const pt=()=>{var Mt;const At=(Mt=Qe.current)==null?void 0:Mt.querySelectorAll("video");At==null||At.forEach(Dt=>{if(Dt.oncontextmenu=()=>!1,Dt.src.indexOf(".m3u8")>-1&&!Dt.canPlayType("application/vnd.apple.mpegurl")){if(De.ZP.isSupported()){var Kt=new De.ZP;Kt.loadSource(Dt.src),Kt.attachMedia(Dt)}}})};return(0,gt.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,gt.useEffect)(()=>{var Mt;const At=Dt=>{Dt.preventDefault(),Dt.clipboardData.setData("text",window.getSelection().toString())};return(Mt=Qe.current)==null||Mt.addEventListener("copy",At),()=>{var Dt;(Dt=Qe.current)==null||Dt.removeEventListener("copy",At)}},[Qe.current]),gt.createElement(gt.Fragment,null,We&&gt.createElement("div",{ref:Qe},Ze),!We&&!tt(Ze)&&gt.createElement("div",{ref:Qe,style:ue({},Ue),className:`${Re||""} ${bt?"disabled-fill":""} markdown-body ${mt.current}`,dangerouslySetInnerHTML:{__html:Ze}}),!We&&tt(Ze)&&gt.createElement(xe,{html:Ze}),gt.createElement(Se.Z,{close:!0,data:dt,type:dt!=null&&dt.length?ht:"",style:ue({},Ke),onClose:()=>ct("")}))}},8343:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ze}});var gt=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,gt.useState)(De),ve=(0,gt.useRef)();function xe(){ve.current=!0}(0,gt.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:xe},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 gt=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,xe=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Re,We,Ye)=>We in Re?Me(Re,We,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Re[We]=Ye,ie=(Re,We)=>{for(var Ye in We||(We={}))z.call(We,Ye)&&ae(Re,Ye,We[Ye]);if(de)for(var Ye of de(We))ee.call(We,Ye)&&ae(Re,Ye,We[Ye]);return Re},le=(Re,We)=>ve(Re,xe(We)),ue=(Re,We)=>{var Ye={};for(var Ue in Re)z.call(Re,Ue)&&We.indexOf(Ue)<0&&(Ye[Ue]=Re[Ue]);if(Re!=null&&de)for(var Ue of de(Re))We.indexOf(Ue)<0&&ee.call(Re,Ue)&&(Ye[Ue]=Re[Ue]);return Ye},ge=(Re,We,Ye)=>new Promise((Ue,Ke)=>{var ot=bt=>{try{ft(Ye.next(bt))}catch($e){Ke($e)}},st=bt=>{try{ft(Ye.throw(bt))}catch($e){Ke($e)}},ft=bt=>bt.done?Ue(bt.value):Promise.resolve(bt.value).then(ot,st);ft((Ye=Ye.apply(Re,We)).next())});const{Dragger:Pe}=Bt.default,je=Re=>{const We="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var Ue=fe().enc.Utf8.parse(We);let Ke=fe().enc.Utf8.parse(Ye);var ot=fe().AES.decrypt(Re,Ue,{iv:Ke,mode:fe().mode.CBC});return ot.toString(fe().enc.Utf8)};let Be;const Fe=Re=>ge(void 0,[Re],function*({identifier:We,oldFilename:Ye,newFilename:Ue}){var Ke,ot,st,ft,bt,$e;const nt=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});nt.data=JSON.parse(je(nt.data));const xt=new OSS({endpoint:(Ke=nt==null?void 0:nt.data)==null?void 0:Ke.end_point,region:(ot=nt==null?void 0:nt.data)==null?void 0:ot.region,accessKeyId:(st=nt==null?void 0:nt.data)==null?void 0:st.access_key_id,accessKeySecret:(ft=nt==null?void 0:nt.data)==null?void 0:ft.access_key_secret,bucket:(bt=nt==null?void 0:nt.data)==null?void 0:bt.bucket,stsToken:($e=nt==null?void 0:nt.data)==null?void 0:$e.security_token});return new Promise((wt,Pt)=>{console.log(11111,`${We}/${Ye}`,`${We}/${Ue}`,nt.data),xt.copy(`/${We}/${Ye}`,`/${We}/${Ue}`).then(dt=>{console.log("\u62F7\u8D1D\u6210\u529F",dt)}).catch(dt=>{console.log(dt)})})}),Ne=(Re,We,Ye)=>ge(void 0,null,function*(){var Ue,Ke,ot,st,ft,bt;We.file_name=Re.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 nt=Re.name.split(".");nt.pop();const xt=We.realFileName?nt.join(""):(0,me.Z)(),wt=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:(ft=$e==null?void 0:$e.data)==null?void 0:ft.bucket,stsToken:(bt=$e==null?void 0:$e.data)==null?void 0:bt.security_token});return new Promise((Pt,dt)=>{var ct;wt.multipartUpload(`${xt}`,new Blob([Re],{type:Re.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(ct=$e==null?void 0:$e.data)==null?void 0:ct.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;Re.response=(Et=ht.data)==null?void 0:Et.data,Pt(ht==null?void 0:ht.data)}).catch(function(ht){dt(ht),console.log("err:",ht)})})}),Ae=Re=>{var We=Re,{user:Ye,cancelUpload:Ue}=We,Ke=ue(We,["user","cancelUpload"]);const[ot,st]=(0,gt.useState)([]);let[ft,bt]=(0,gt.useState)();const $e={onRemove:xt=>{st([...ot.filter(wt=>wt.name!==xt.name)]),Ke.onChange(ot.filter(wt=>wt.name!==xt.name))},disabled:Ke.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(xt=>xt.file),customRequest:()=>{},beforeUpload:xt=>ge(void 0,null,function*(){let wt=Ke.maxSize||1073741824;if(ot.filter(Pt=>Pt.name===xt.name).length){oe.ZP.info(`${xt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(xt==null?void 0:xt.size)>wt?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${wt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:xt.name,file:xt}),st([...ot]),Ke.onChange(ot),!1)})},nt=(xt,wt)=>ge(void 0,null,function*(){var Pt,dt,ct,ht,Et,vt;wt.file_name=xt.name;const Ft=xt.name,mt=yield(0,ze.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(mt.data=JSON.parse(je(mt.data)),(mt==null?void 0:mt.status)!==0){ot[ot.findIndex(Ve=>Ve.name===Ft)].status="error",ot[ot.findIndex(Ve=>Ve.name===Ft)].file.status="error",Ke.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ft=new(Se())({endpoint:(Pt=mt==null?void 0:mt.data)==null?void 0:Pt.end_point,region:(dt=mt==null?void 0:mt.data)==null?void 0:dt.region,accessKeyId:(ct=mt==null?void 0:mt.data)==null?void 0:ct.access_key_id,accessKeySecret:(ht=mt==null?void 0:mt.data)==null?void 0:ht.access_key_secret,bucket:(Et=mt==null?void 0:mt.data)==null?void 0:Et.bucket,stsToken:(vt=mt==null?void 0:mt.data)==null?void 0:vt.security_token}),console.log(xt,"file"),bt(ft);const St=xt.name.split(".");St.pop();const tt=Ft.indexOf(".")>-1?wt.realFileName?St.join("."):(0,me.Z)():Ft;return new Promise((Ve,we)=>{var Le;try{ft.multipartUpload(`${Ke.identifier}/${tt}${Ft.indexOf(".")>-1?"."+Ft.split(".").pop():""}`,new Blob([xt.file],{type:xt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Ze,rt,Ie)=>{try{console.log("\u8FDB\u5EA6",Ze,rt,Ie);const _e=ot.findIndex(He=>He.name===Ft);ot[_e].file.percent=Ze*100,ot[_e].tempCheckpoint=rt,st([...ot])}catch(_e){}},checkpoint:ot[ot.findIndex(Ze=>Ze.name===Ft)].tempCheckpoint,callback:{customValue:{id:Ft+""},url:(Le=mt==null?void 0:mt.data)==null?void 0:Le.callback_url,host:mt==null?void 0:mt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ze.rz)(wt)}}).then(function(Ze){var rt,Ie,_e;const He=ot.findIndex(ut=>ut.name===Ft);let Qe="done";if(((rt=Ze.data)==null?void 0:rt.status)===0){xt.response=(Ie=Ze.data)==null?void 0:Ie.data;const ut=ot.findIndex(pt=>pt.name===Ft);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(rt=>rt.name===Ft)].status="error",ot[ot.findIndex(rt=>rt.name===Ft)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),st([...ot]),Ke.onChange(ot),we(Ze),console.log("err:",Ze)})}catch(Ze){}})});return(0,gt.useEffect)(()=>{ot.every(xt=>xt==="done"||xt==="error")&&Ke.onComplete(ot)},[ot]),(0,gt.useEffect)(()=>{Ue&&(ft==null||ft.cancel())},[Ue]),(0,gt.useEffect)(()=>{Ke.uploading&&ot.map(xt=>ge(void 0,null,function*(){var wt;if((!xt.status||xt.status==="error")&&!Ue){xt.status="uploading",xt.file.status="uploading";const Pt=yield nt(xt,{login:(wt=Ye==null?void 0:Ye.userInfo)==null?void 0:wt.login,container_type:Ke.container_type,container_id:Ke.container_id,description:Ke.description,realFileName:Ke.realFileName})}}))},[Ke.uploading]),gt.createElement(Pe,le(ie({},$e),{height:Ke.height,className:Ke.className}),gt.createElement("p",{className:"ant-upload-hint"},Ke.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};cn.ZP=(0,ke.connect)(({loading:Re,globalSetting:We,user:Ye})=>({globalSetting:We,loading:Re.models.competitions,user:Ye}))(Ae)},69720:function(gn,cn,at){"use strict";at.d(cn,{h:function(){return ge}});var gt=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,xe=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={}))xe.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,gt.useState)("python");function Ne(Re){Fe(ue[Re][1])}function Ae(Re){Pe(Re)}return gt.createElement(oe.default,ae(ee({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ae,style:{width:500}}),gt.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},gt.createElement(Bt.default,{getPopupContainer:Re=>Re.parentNode,onChange:Ne},Object.keys(ue).map(Re=>gt.createElement(ie,{key:Re,value:Re},ue[Re][0])))),gt.createElement(oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},gt.createElement(ge,{mode:Be})),gt.createElement("div",{className:"flex-container flex-end"},gt.createElement(ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),gt.createElement(ze.ZP,{type:"ghost",onClick:je},"\u53D6\u6D88")))};function ge({value:Pe,onChange:je,mode:Be,options:Fe={}}){const Ne=(0,gt.useRef)(),[Ae,Re]=(0,gt.useState)();return(0,gt.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,gt.useEffect)(()=>{Ae&&Ae.setOption("mode",Be)},[Ae,Be]),(0,gt.useEffect)(()=>{Ae&&(Pe!==Ae.getValue()||Pe==="")&&setTimeout(()=>{Ae.setValue(Pe||"")},300)},[Ae,Pe]),(0,gt.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));Re(We)}},[Ne.current,Ae]),gt.createElement("div",{className:"my-codemirror-container"},gt.createElement("textarea",{ref:Ne}))}},39793:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Rr}});var gt=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:rn,showTextOnly:Yt,showLines:nr,style:gr={}})=>{const Cr=(0,gt.useMemo)(()=>"",[on]);return gt.createElement(gt.Fragment,null,gt.createElement("div",{dangerouslySetInnerHTML:{__html:Cr}}))},xe=at(59301),de=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ue=(on,rn,Yt)=>rn in on?de(on,rn,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):on[rn]=Yt,ge=(on,rn)=>{for(var Yt in rn||(rn={}))ie.call(rn,Yt)&&ue(on,Yt,rn[Yt]);if(ae)for(var Yt of ae(rn))le.call(rn,Yt)&&ue(on,Yt,rn[Yt]);return on},Pe=(on,rn)=>z(on,ee(rn));let je=[{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\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",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 Be({onActionCallback:on,title:rn,icon:Yt,actionName:nr,className:gr="",children:Cr}){function Nn(){on(nr)}return xe.createElement("a",{title:rn,className:gr,onClick:Nn},xe.createElement("i",{className:`${Yt}`}),Cr)}var Fe=({watch:on,showNullButton:rn,showNullProgramButton:Yt,onActionCallback:nr,fullScreen:gr,insertTemp:Cr,hidetoolBar:Nn,extraUse:qn})=>{const Ir=[...je,{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 xe.createElement("ul",{className:"markdown-toolbar-container"},!Nn&&Ir.map((gi,bi)=>xe.createElement("li",{key:bi},gi.actionName?xe.createElement(Be,Pe(ge({},gi),{onActionCallback:nr})):xe.createElement("span",{className:"v-line"}))),rn?xe.createElement("li",null,xe.createElement(Be,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:nr},xe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Yt?xe.createElement(xe.Fragment,null,xe.createElement("li",null,xe.createElement(Be,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:nr},xe.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),xe.createElement("li",null,xe.createElement(Be,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:nr},xe.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Cr&&xe.createElement("li",null,xe.createElement(Be,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Cr}`,onActionCallback:nr},xe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),qn&&xe.createElement("li",null,qn),xe.createElement("li",{className:"btn-full-screen"},xe.createElement(Be,{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:nr})))},Ne=at(91558),Ae=at(28284),Re=at(37568),We=at(99571),Ye=Object.defineProperty,Ue=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,bt=(on,rn,Yt)=>rn in on?Ye(on,rn,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):on[rn]=Yt,$e=(on,rn)=>{for(var Yt in rn||(rn={}))st.call(rn,Yt)&&bt(on,Yt,rn[Yt]);if(ot)for(var Yt of ot(rn))ft.call(rn,Yt)&&bt(on,Yt,rn[Yt]);return on},nt=(on,rn)=>Ue(on,Ke(rn));const xt={labelCol:{span:4},wrapperCol:{span:20}};var wt=({callback:on,onCancel:rn})=>{function Yt(nr){on(nr)}return gt.createElement(Ae.default,nt($e({},xt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Yt,style:{width:500}}),gt.createElement(Ae.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},gt.createElement(Re.default,null)),gt.createElement(Ae.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},gt.createElement(Re.default,null)),gt.createElement("div",{className:"flex-container flex-end"},gt.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),gt.createElement(We.ZP,{type:"ghost",onClick:rn},"\u53D6\u6D88")))},Pt=at(69720),dt=at(17077),ct=at(62957),ht=at(77019),Et=at(9507),vt=at(59301),Ft=({callback:on,onCancel:rn})=>{const Yt=document.createElement("canvas"),nr=Yt.getContext("2d");Yt.width=1e3,Yt.height=800,nr.fillStyle="#ffffff",nr.fillRect(0,0,Yt.width,Yt.height);const gr=Yt.toDataURL("image/png");return vt.createElement(ct.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},vt.createElement(ht.Z,{style:{height:"100vh"}},vt.createElement(Et.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:gr,visible:!0,title:String(Date.now())},onOk:Cr=>{on({src:Cr.url})},onClose:rn})))},mt=at(12378);function St(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(St,go.CommandHandler),St.prototype.canAlignSelection=function(){var on=this.diagram;return!(on===null||on.isReadOnly||on.isModelReadOnly||on.selection.count<2)},St.prototype.alignLeft=function(){var on=this.diagram;on.startTransaction("aligning left");var rn=1/0;on.selection.each(function(Yt){Yt instanceof go.Link||(rn=Math.min(Yt.position.x,rn))}),on.selection.each(function(Yt){Yt instanceof go.Link||Yt.move(new go.Point(rn,Yt.position.y))}),on.commitTransaction("aligning left")},St.prototype.alignRight=function(){var on=this.diagram;on.startTransaction("aligning right");var rn=-1/0;on.selection.each(function(Yt){if(!(Yt instanceof go.Link)){var nr=Yt.actualBounds.x+Yt.actualBounds.width;rn=Math.max(nr,rn)}}),on.selection.each(function(Yt){Yt instanceof go.Link||Yt.move(new go.Point(rn-Yt.actualBounds.width,Yt.position.y))}),on.commitTransaction("aligning right")},St.prototype.alignTop=function(){var on=this.diagram;on.startTransaction("alignTop");var rn=1/0;on.selection.each(function(Yt){Yt instanceof go.Link||(rn=Math.min(Yt.position.y,rn))}),on.selection.each(function(Yt){Yt instanceof go.Link||Yt.move(new go.Point(Yt.position.x,rn))}),on.commitTransaction("alignTop")},St.prototype.alignBottom=function(){var on=this.diagram;on.startTransaction("aligning bottom");var rn=-1/0;on.selection.each(function(Yt){if(!(Yt instanceof go.Link)){var nr=Yt.actualBounds.y+Yt.actualBounds.height;rn=Math.max(nr,rn)}}),on.selection.each(function(Yt){Yt instanceof go.Link||Yt.move(new go.Point(Yt.actualBounds.x,rn-Yt.actualBounds.height))}),on.commitTransaction("aligning bottom")},St.prototype.alignCenterX=function(){var on=this.diagram,rn=on.selection.first();if(rn){on.startTransaction("aligning Center X");var Yt=rn.actualBounds.x+rn.actualBounds.width/2;on.selection.each(function(nr){nr instanceof go.Link||nr.move(new go.Point(Yt-nr.actualBounds.width/2,nr.actualBounds.y))}),on.commitTransaction("aligning Center X")}},St.prototype.alignCenterY=function(){var on=this.diagram,rn=on.selection.first();if(rn){on.startTransaction("aligning Center Y");var Yt=rn.actualBounds.y+rn.actualBounds.height/2;on.selection.each(function(nr){nr instanceof go.Link||nr.move(new go.Point(nr.actualBounds.x,Yt-nr.actualBounds.height/2))}),on.commitTransaction("aligning Center Y")}},St.prototype.alignColumn=function(on){var rn=this.diagram;rn.startTransaction("align Column"),on===void 0&&(on=0),on=parseFloat(on);var Yt=new Array;rn.selection.each(function(qn){qn instanceof go.Link||Yt.push(qn)});for(var nr=0;nr<Yt.length-1;nr++){var gr=Yt[nr],Cr=gr.actualBounds.y+gr.actualBounds.height+on,Nn=Yt[nr+1];Nn.move(new go.Point(gr.actualBounds.x,Cr))}rn.commitTransaction("align Column")},St.prototype.alignRow=function(on){on===void 0&&(on=0),on=parseFloat(on);var rn=this.diagram;rn.startTransaction("align Row");var Yt=new Array;rn.selection.each(function(qn){qn instanceof go.Link||Yt.push(qn)});for(var nr=0;nr<Yt.length-1;nr++){var gr=Yt[nr],Cr=gr.actualBounds.x+gr.actualBounds.width+on,Nn=Yt[nr+1];Nn.move(new go.Point(Cr,gr.actualBounds.y))}rn.commitTransaction("align Row")},St.prototype.canRotate=function(on){var rn=this.diagram;return!(rn===null||rn.isReadOnly||rn.isModelReadOnly||rn.selection.count<1)},St.prototype.rotate=function(on){on===void 0&&(on=90);var rn=this.diagram;rn.startTransaction("rotate "+on.toString());var rn=this.diagram;rn.selection.each(function(Yt){Yt instanceof go.Link||Yt instanceof go.Group||(Yt.angle+=on)}),rn.commitTransaction("rotate "+on.toString())},St.prototype.pullToFront=function(){var on=this.diagram;on.startTransaction("pullToFront");var rn=new go.Map;on.selection.each(function(Yt){rn.set(Yt.layer,0)}),rn.iteratorKeys.each(function(Yt){var nr=0;Yt.parts.each(function(gr){if(!gr.isSelected){var Cr=gr.zOrder;isNaN(Cr)?gr.zOrder=0:nr=Math.max(nr,Cr)}}),rn.set(Yt,nr)}),on.selection.each(function(Yt){St._assignZOrder(Yt,rn.get(Yt.layer)+1)}),on.commitTransaction("pullToFront")},St.prototype.pushToBack=function(){var on=this.diagram;on.startTransaction("pushToBack");var rn=new go.Map;on.selection.each(function(Yt){rn.set(Yt.layer,0)}),rn.iteratorKeys.each(function(Yt){var nr=0;Yt.parts.each(function(gr){if(!gr.isSelected){var Cr=gr.zOrder;isNaN(Cr)?gr.zOrder=0:nr=Math.min(nr,Cr)}}),rn.set(Yt,nr)}),on.selection.each(function(Yt){St._assignZOrder(Yt,rn.get(Yt.layer)-1-St._findGroupDepth(Yt))}),on.commitTransaction("pushToBack")},St._assignZOrder=function(on,rn,Yt){Yt===void 0&&(Yt=on),on.layer===Yt.layer&&(on.zOrder=rn),on instanceof go.Group&&on.memberParts.each(function(nr){St._assignZOrder(nr,rn+1,Yt)})},St._findGroupDepth=function(on){if(on instanceof go.Group){var rn=0;return on.memberParts.each(function(Yt){rn=Math.max(rn,St._findGroupDepth(Yt))}),rn+1}else return 0},St.prototype.doKeyDown=function(){var on=this.diagram;if(on!==null){var rn=on.lastInput;if(rn.key==="Up"||rn.key==="Down"||rn.key==="Left"||rn.key==="Right"){var Yt=this.arrowKeyBehavior;if(Yt==="none")return;if(Yt==="select"){this._arrowKeySelect();return}else if(Yt==="move"){this._arrowKeyMove();return}else if(Yt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},St.prototype._getAllParts=function(){var on=new Array;return this.diagram.nodes.each(function(rn){on.push(rn)}),this.diagram.parts.each(function(rn){on.push(rn)}),on},St.prototype._arrowKeyMove=function(){var on=this.diagram,rn=on.lastInput,Yt=0,nr=0;if(rn.control||rn.meta)Yt=1,nr=1;else if(on.grid!==null){var gr=on.grid.gridCellSize;nr=gr.width,Yt=gr.height}on.startTransaction("arrowKeyMove"),on.selection.each(function(Cr){rn.key==="Up"?Cr.move(new go.Point(Cr.actualBounds.x,Cr.actualBounds.y-Yt)):rn.key==="Down"?Cr.move(new go.Point(Cr.actualBounds.x,Cr.actualBounds.y+Yt)):rn.key==="Left"?Cr.move(new go.Point(Cr.actualBounds.x-nr,Cr.actualBounds.y)):rn.key==="Right"&&Cr.move(new go.Point(Cr.actualBounds.x+nr,Cr.actualBounds.y))}),on.commitTransaction("arrowKeyMove")},St.prototype._arrowKeySelect=function(){var on=this.diagram,rn=on.lastInput,Yt=null;rn.key==="Up"?Yt=this._findNearestPartTowards(270):rn.key==="Down"?Yt=this._findNearestPartTowards(90):rn.key==="Left"?Yt=this._findNearestPartTowards(180):rn.key==="Right"&&(Yt=this._findNearestPartTowards(0)),Yt!==null&&(rn.shift?Yt.isSelected=!0:rn.control||rn.meta?Yt.isSelected=!Yt.isSelected:on.select(Yt))},St.prototype._findNearestPartTowards=function(on){var rn=this.diagram.selection.first();if(rn===null)return null;for(var Yt=rn.actualBounds.center,nr=this._getAllParts(),gr=1/0,Cr=rn,Nn=0;Nn<nr.length;Nn++){var qn=nr[Nn];if(qn!==rn&&qn.canSelect()){var Ir=qn.actualBounds.center,gi=Yt.directionPoint(Ir),bi=this._angleCloseness(gi,on);if(bi<=45){var Nt=Yt.distanceSquaredPoint(Ir);Nt*=1+Math.sin(bi*Math.PI/180),Nt<gr&&(gr=Nt,Cr=qn)}}}return Cr},St.prototype._angleCloseness=function(on,rn){return Math.min(Math.abs(rn-on),Math.min(Math.abs(rn+360-on),Math.abs(rn-360-on)))},St.prototype._arrowKeyTree=function(){var on=this.diagram,rn=on.selection.first();if(rn instanceof go.Node){var Yt=on.lastInput;if(Yt.key==="Right"){if(!rn.isTreeLeaf)if(!rn.isTreeExpanded)on.commandHandler.canExpandTree(rn)&&on.commandHandler.expandTree(rn);else{var nr=this._sortTreeChildrenByY(rn).first();nr!==null&&on.select(nr)}}else if(Yt.key==="Left")if(!rn.isTreeLeaf&&rn.isTreeExpanded)on.commandHandler.canCollapseTree(rn)&&on.commandHandler.collapseTree(rn);else{var gr=rn.findTreeParentNode();gr!==null&&on.select(gr)}else if(Yt.key==="Up"){var gr=rn.findTreeParentNode();if(gr!==null){var Cr=this._sortTreeChildrenByY(gr),Nn=Cr.indexOf(rn);if(Nn>0){for(var qn=Cr.elt(Nn-1);qn!==null&&qn.isTreeExpanded&&!qn.isTreeLeaf;){var Ir=this._sortTreeChildrenByY(qn);qn=Ir.last()}qn!==null&&on.select(qn)}else on.select(gr)}}else if(Yt.key==="Down")if(rn.isTreeExpanded&&!rn.isTreeLeaf){var nr=this._sortTreeChildrenByY(rn).first();nr!==null&&on.select(nr)}else for(;rn!==null;){var gr=rn.findTreeParentNode();if(gr===null)break;var Cr=this._sortTreeChildrenByY(gr),Nn=Cr.indexOf(rn);if(Nn<Cr.length-1){on.select(Cr.elt(Nn+1));break}else rn=gr}var gi=on.selection.first();gi!==null&&on.scrollToRect(gi.actualBounds)}},St.prototype._sortTreeChildrenByY=function(on){var rn=new go.List().addAll(on.findTreeChildrenNodes());return rn.sort(function(Yt,nr){var gr=Yt.location,Cr=nr.location;return gr.y<Cr.y?-1:gr.y>Cr.y?1:gr.x<Cr.x?-1:gr.x>Cr.x?1:0}),rn},St.prototype.copyToClipboard=function(on){go.CommandHandler.prototype.copyToClipboard.call(this,on),this._lastPasteOffset.set(this.pasteOffset)},St.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(St.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(St.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 tt=St,Ve=at(63720),we=at(5269),Le=at(38986),Ze={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},rt=at(48790),Ie=at(59301),_e=(on,rn,Yt)=>new Promise((nr,gr)=>{var Cr=Ir=>{try{qn(Yt.next(Ir))}catch(gi){gr(gi)}},Nn=Ir=>{try{qn(Yt.throw(Ir))}catch(gi){gr(gi)}},qn=Ir=>Ir.done?nr(Ir.value):Promise.resolve(Ir.value).then(Cr,Nn);qn((Yt=Yt.apply(on,rn)).next())});function He({onCancel:on,callback:rn}){let Yt=(0,gt.useRef)(),nr=(0,gt.useRef)(),gr=(0,gt.useRef)(),Cr=(0,gt.useRef)(!1);const Nn=(0,gt.useRef)(!1),[qn,Ir]=(0,gt.useState)(0);function gi(){const Nt=mt.bx.make,Ht={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"};Yt.current=new mt.S0(nr.current,{padding:20,grid:Nt(mt.s_,"Grid",Nt(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Nt(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Hn=>{var ur=Hn.diagram.commandHandler.addTopLevelParts(Hn.diagram.selection,!0);ur||Hn.diagram.currentTool.doCancel()},commandHandler:Nt(tt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Hn=>{var ur=Hn.subject;ur.location=ur.location.copy().snapToGridPoint(Hn.diagram.grid.gridOrigin,Hn.diagram.grid.gridCellSize),setTimeout(()=>{Hn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Hn=>{var ur=Hn.subject;setTimeout(()=>{Hn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Hn=>{var ur=Hn.parameter.part;ur.invalidateConnectedLinks();var Jn=Hn.subject;Hn.diagram.toolManager.linkingTool.isForwards?Jn.toNode.invalidateConnectedLinks():Jn.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Yt.current.nodeTemplate=Nt(mt.NB,"Auto",{locationSpot:mt.z6.Center,locationObjectName:"SHAPE",desiredSize:new mt.$u(120,60),minSize:new mt.$u(40,40),resizable:!0,resizeCellSize:new mt.$u(10,10),rotatable:!0},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),new mt.KX("desiredSize","size",mt.$u.parse).makeTwoWay(mt.$u.stringify),Nt(mt.bn,{name:"SHAPE",fill:Ht.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("figure"),new mt.KX("fill"),new mt.KX("stroke","borderColor"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Nt(mt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Nt(mt.al,{margin:1,textAlign:"center",overflow:mt.al.OverflowEllipsis,editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),Yt.current.nodeTemplate.toolTip=Nt("ToolTip",Nt(mt.s_,"Vertical",{maxSize:new mt.$u(200,NaN)},Nt(mt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new mt.KX("text")),Nt(mt.al,{font:"10pt sans-serif",textAlign:"center"},new mt.KX("text","details"))));function Mn(Hn,ur){var Jn=(yr,Fr)=>{yr.handled=!0,yr.diagram.model.commit(Wr=>{var $r=Fr.part.adornedPart,ii=new mt.E9().setRectSpot($r.actualBounds,Hn);ii.subtract($r.location),ii.scale(2,2),ii.x+=Math.sign(ii.x)*130,ii.y+=Math.sign(ii.y)*130,ii.add($r.location),ii.snapToGridPoint(yr.diagram.grid.gridOrigin,yr.diagram.grid.gridCellSize);var hi=Wr.copyNodeData($r.data);Wr.setGroupKeyForNodeData(hi,Wr.getGroupKeyForNodeData($r.data)),Wr.addNodeData(hi);var mn={from:$r.key,to:Wr.getKeyForNodeData(hi)};Wr.addLinkData(mn);var Li=yr.diagram.findNodeForData(hi);Li.location=ii,yr.diagram.select(Li),setTimeout(()=>{yr.diagram.commandHandler.editTextBlock()},20)})};return Nt(mt.bn,{figure:ur,alignment:Hn,alignmentFocus:Hn.opposite(),width:Hn.equals(mt.z6.Top)||Hn.equals(mt.z6.Bottom)?25:18,height:Hn.equals(mt.z6.Top)||Hn.equals(mt.z6.Bottom)?18:25,fill:"orange",stroke:Ht.white,strokeWidth:4,mouseEnter:(yr,Fr)=>Fr.fill="dodgerblue",mouseLeave:(yr,Fr)=>Fr.fill="orange",isActionable:!0,click:Jn,contextClick:Jn})}function jn(Hn){return Nt(mt.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(ur,Jn)=>Jn.fill="dodgerblue",mouseLeave:(ur,Jn)=>Jn.fill="orange",click:(ur,Jn)=>{ur.diagram.commandHandler.showContextMenu(Jn.part.adornedPart)}},Hn||{})}Yt.current.nodeTemplate.selectionAdornmentTemplate=Nt(mt.uz,"Spot",Nt(mt.Vm,{padding:10}),Mn(mt.z6.Top,"TriangleUp"),Mn(mt.z6.Left,"TriangleLeft"),Mn(mt.z6.Right,"TriangleRight"),Mn(mt.z6.Bottom,"TriangleDown"),jn({alignment:new mt.z6(.75,0)}));function en(Hn,ur){return(Jn,yr)=>{Jn.handled=!0,Jn.diagram.model.commit(Fr=>{Fr.set(yr.part.adornedPart.data,Hn,ur)})}}function Fn(Hn,ur){return ur||(ur="color"),Nt(mt.bn,{width:16,height:16,stroke:"lightgray",fill:Hn,margin:1,background:"transparent",mouseEnter:(Jn,yr)=>yr.stroke="dodgerblue",mouseLeave:(Jn,yr)=>yr.stroke="lightgray",click:en(ur,Hn),contextClick:en(ur,Hn)})}function Dn(){return[Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",Fn(Ht.white,"fill"),Fn(Ht.beige,"fill"),Fn(Ht.extralightblue,"fill"),Fn(Ht.extralightred,"fill"))),Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",Fn(Ht.lightgray,"fill"),Fn(Ht.lightgreen,"fill"),Fn(Ht.lightblue,"fill"),Fn(Ht.lightred,"fill")))]}function Ln(){return[Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",Fn(Ht.black),Fn(Ht.green),Fn(Ht.blue),Fn(Ht.red))),Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",Fn(Ht.white),Fn(Ht.magenta),Fn(Ht.purple),Fn(Ht.orange)))]}function er(Hn,ur){return ur||(ur="thickness"),Nt(mt.bn,"LineH",{width:16,height:16,strokeWidth:Hn,margin:1,background:"transparent",mouseEnter:(Jn,yr)=>yr.background="dodgerblue",mouseLeave:(Jn,yr)=>yr.background="transparent",click:en(ur,Hn),contextClick:en(ur,Hn)})}function zn(Hn,ur){return ur||(ur="dash"),Nt(mt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Hn,margin:1,background:"transparent",mouseEnter:(Jn,yr)=>yr.background="dodgerblue",mouseLeave:(Jn,yr)=>yr.background="transparent",click:en(ur,Hn),contextClick:en(ur,Hn)})}function Zn(){return[Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",er(1),er(2),er(3),er(4))),Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",zn(null),zn([2,4]),zn([4,4])))]}function rr(Hn,ur){return ur||(ur="figure"),Nt(mt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Hn,margin:1,background:"transparent",mouseEnter:(Jn,yr)=>yr.fill="dodgerblue",mouseLeave:(Jn,yr)=>yr.fill="lightgray",click:en(ur,Hn),contextClick:en(ur,Hn)})}Yt.current.nodeTemplate.contextMenu=Nt("ContextMenu",Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",rr("Rectangle"),rr("RoundedRectangle"),rr("Ellipse"),rr("Diamond"))),Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",rr("Parallelogram2"),rr("ManualOperation"),rr("Procedure"),rr("Cylinder1"))),Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",rr("Terminator"),rr("CreateRequest"),rr("Document"),rr("TriangleDown"))),Dn(),Ln(),Zn()),Yt.current.groupTemplate=Nt(mt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:mt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Hn,ur)=>{var Jn=ur.addMembers(ur.diagram.selection,!0);Jn||ur.diagram.currentTool.doCancel()},avoidable:!1},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),Nt(mt.s_,"Auto",{name:"BODY"},Nt(mt.bn,{parameter1:10,fill:Ht.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("fill"),new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Nt(mt.Vm,{background:"transparent",margin:20})),Nt(mt.al,{alignment:mt.z6.Top,alignmentFocus:mt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new mt.KX("text"),new mt.KX("stroke","color"))),Yt.current.groupTemplate.selectionAdornmentTemplate=Nt(mt.uz,"Spot",Nt(mt.s_,"Auto",Nt(mt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Nt(mt.Vm,{margin:1.5})),jn({alignment:mt.z6.TopRight,alignmentFocus:mt.z6.BottomRight})),Yt.current.groupTemplate.contextMenu=Nt("ContextMenu",Dn(),Ln(),Zn()),Yt.current.linkTemplate=Nt(mt.rU,{layerName:"Foreground",routing:mt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new mt.KX("fromSpot","fromSpot",mt.z6.parse),new mt.KX("toSpot","toSpot",mt.z6.parse),new mt.KX("fromShortLength","dir",Hn=>Hn>=1?10:0),new mt.KX("toShortLength","dir",Hn=>Hn>=1?10:0),new mt.KX("points").makeTwoWay(),Nt(mt.bn,{strokeWidth:2},new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Nt(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,0),segmentOrientation:mt.rU.OrientAlong,alignmentFocus:mt.z6.Right,figure:"circle",width:10,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Hn=>Hn===1)),Nt(mt.bn,{segmentIndex:-1,segmentOffset:new mt.E9(-10,6),segmentOrientation:mt.rU.OrientPlus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Hn=>Hn>=1),new mt.KX("width","thickness",Hn=>7+3*Hn),new mt.KX("height","thickness",Hn=>7+3*Hn),new mt.KX("segmentOffset","thickness",Hn=>new mt.E9(-15,4+1.5*Hn))),Nt(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,-6),segmentOrientation:mt.rU.OrientMinus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Hn=>Hn===2),new mt.KX("width","thickness",Hn=>7+3*Hn),new mt.KX("height","thickness",Hn=>7+3*Hn),new mt.KX("segmentOffset","thickness",Hn=>new mt.E9(-15,4+1.5*Hn))),Nt(mt.al,{alignmentFocus:new mt.z6(0,1,-4,0),editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),Yt.current.linkTemplate.selectionAdornmentTemplate=Nt(mt.uz,Nt(mt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Kr(2)},new mt.KX("pathPattern","thickness",Kr)),jn({alignmentFocus:new mt.z6(0,0,-6,-4)}));function Kr(Hn){return Nt(mt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Hn+4).toString()+" H3"})}function cr(Hn){var ur="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Hn===0?ur="M0 0 M16 16 M0 8 L16 8":Hn===2&&(ur="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Nt(mt.bn,{geometryString:ur,margin:2,background:"transparent",mouseEnter:(Jn,yr)=>yr.background="dodgerblue",mouseLeave:(Jn,yr)=>yr.background="transparent",click:en("dir",Hn),contextClick:en("dir",Hn)})}function pr(Hn){var ur=(Jn,yr)=>{Jn.handled=!0,Jn.diagram.model.commit(Fr=>{var Wr=yr.part.adornedPart;Fr.set(Wr.data,Hn?"toSpot":"fromSpot",mt.z6.stringify(mt.z6.AllSides)),(Hn?Wr.toNode:Wr.fromNode).invalidateConnectedLinks()})};return Nt(mt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Jn,yr)=>yr.background="dodgerblue",mouseLeave:(Jn,yr)=>yr.background="transparent",click:ur,contextClick:ur})}function an(Hn,ur){var Jn=0,yr=mt.z6.RightSide;Hn.equals(mt.z6.Top)?(Jn=270,yr=mt.z6.TopSide):Hn.equals(mt.z6.Left)?(Jn=180,yr=mt.z6.LeftSide):Hn.equals(mt.z6.Bottom)&&(Jn=90,yr=mt.z6.BottomSide),ur||(Jn-=180);var Fr=(Wr,$r)=>{Wr.handled=!0,Wr.diagram.model.commit(ii=>{var hi=$r.part.adornedPart;ii.set(hi.data,ur?"toSpot":"fromSpot",mt.z6.stringify(yr)),(ur?hi.toNode:hi.fromNode).invalidateConnectedLinks()})};return Nt(mt.bn,{alignment:Hn,alignmentFocus:Hn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Jn,background:"transparent",mouseEnter:(Wr,$r)=>$r.background="dodgerblue",mouseLeave:(Wr,$r)=>$r.background="transparent",click:Fr,contextClick:Fr})}Yt.current.linkTemplate.contextMenu=Nt("ContextMenu",Ln(),Zn(),Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",cr(0),cr(1),cr(2))),Nt("ContextMenuButton",Nt(mt.s_,"Horizontal",Nt(mt.s_,"Spot",pr(!1),an(mt.z6.Top,!1),an(mt.z6.Left,!1),an(mt.z6.Right,!1),an(mt.z6.Bottom,!1)),Nt(mt.s_,"Spot",{margin:new mt.Zt(0,0,0,2)},pr(!0),an(mt.z6.Top,!0),an(mt.z6.Left,!0),an(mt.z6.Right,!0),an(mt.z6.Bottom,!0)))));const Vr=`{ "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 ei=["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 Di(Hn){return console.log("shapeName:",Hn),ei.indexOf(Hn)>=0}var dn=new mt.YI(gr.current,{maxSelectionCount:1,linkTemplate:Nt(mt.rU,{locationSpot:mt.z6.Center,selectionAdornmentTemplate:Nt(mt.uz,"Link",{locationSpot:mt.z6.Center},Nt(mt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Nt(mt.bn,{toArrow:"Standard",stroke:null}))},{routing:mt.rU.AvoidsNodes,curve:mt.rU.JumpOver,corner:5,toShortLength:4},new mt.KX("points"),Nt(mt.bn,{isPanelMain:!0,strokeWidth:2}),Nt(mt.bn,{toArrow:"Standard",stroke:null})),model:new mt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...mt.bn.getFigureGenerators().toArray().map(Hn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Hn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Yt.current.addDiagramListener("TextEdited",function(Hn){var ur;const Jn=Hn.subject.part;var yr=(ur=document.activeElement)==null?void 0:ur.value;typeof yr=="string"&&yr.trim()===""&&Yt.current.model.commit(function(Fr){Fr.set(Jn.data,"text","\u672A\u547D\u540D"),Yt.current.commandHandler.stopCommand()},"increment")}),dn.nodeTemplate=Nt(mt.NB,"Auto",{locationSpot:mt.z6.Center},new mt.KX("location","location",mt.E9.parse).makeTwoWay(mt.E9.stringify),Nt(mt.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new mt.KX("stroke").makeTwoWay(),new mt.KX("fill").makeTwoWay(),new mt.KX("figure")),Nt(mt.al,{margin:new mt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new mt.$u(16,16),maxSize:new mt.$u(10,NaN),textAlign:"center",editable:!0},new mt.KX("key").makeTwoWay())),setTimeout(()=>{Yt.current.grid=Nt(mt.s_,"Grid",Nt(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Nt(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Yt.current.grid.visible=!0,Yt.current.grid.gridCellStroke="darkgray",Yt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Yt.current,Yt.current}const bi=()=>_e(this,null,function*(){var Nt,Ht=Yt.current.makeImage();const Mn=yield(0,Le.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Ht.src,file_data:JSON.stringify({login:(Nt=(0,rt.eY)())==null?void 0:Nt.login,data:JSON.parse(Yt.current.model.toJson())})}});rn({src:Mn.url})});return(0,gt.useEffect)(()=>(setTimeout(()=>{gi()},500),Ir(qn+1),()=>{Yt.current=null}),[]),Ie.createElement("div",{ref:Nn,className:"body-overflow-initial"},Ie.createElement(ct.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!qn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ie.createElement(ht.Z,null,Ie.createElement(we.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ie.createElement(we.Z,{onClick:()=>{var Nt,Ht,Mn=Yt.current.selection.first();if(Cr.current=!Cr.current,document.activeElement&&Mn){let jn=(Ht=(Nt=document.activeElement)==null?void 0:Nt.value)==null?void 0:Ht.trim();typeof jn=="string"&&Yt.current.model.commit(function(en){en.set(Mn.data,"text",jn||"\u672A\u547D\u540D"),Yt.current.commandHandler.stopCommand()},"increment")}Ir(qn+1)}},Ie.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:on},Ie.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Cr.current?"none":"block"},className:Ze.flowChartWrp},Ie.createElement("div",{style:{display:"flex",height:"100%"}},Ie.createElement("div",{style:{width:"300px",height:"100%"}},Ie.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ie.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ze.myPaletteDiv,ref:gr})),Ie.createElement("div",{style:{flex:1,position:"relative"}},Ie.createElement("div",{ref:nr,style:{height:"80vh"}}))),Ie.createElement("div",{className:"tr"},Ie.createElement(We.ZP,{size:"large",onClick:bi,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Qe=He,ut=at(47889),pt=at(71051);const Mt=ut.ZP.Group,At={margin:"0 8px"};var Dt=({callback:on,onCancel:rn})=>{function Yt(nr){on(nr)}return gt.createElement(Ae.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Yt},gt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},gt.createElement("span",{style:At},"\u5355\u5143\u683C\u6570\uFF1A"),gt.createElement("span",{style:At},"\u884C\u6570"),gt.createElement(Ae.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},gt.createElement(pt.Z,null)),gt.createElement("span",{style:At},"\u5217\u6570"),gt.createElement(Ae.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},gt.createElement(pt.Z,null))),gt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},gt.createElement("span",{style:At},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),gt.createElement(Ae.default.Item,{name:"align"},gt.createElement(Mt,null,gt.createElement(ut.ZP,{value:"default"},gt.createElement("i",{className:"fa fa-align-justify"})),gt.createElement(ut.ZP,{value:"left"},gt.createElement("i",{className:"fa fa-align-left"})),gt.createElement(ut.ZP,{value:"center"},gt.createElement("i",{className:"fa fa-align-center"})),gt.createElement(ut.ZP,{value:"right"},gt.createElement("i",{className:"fa fa-align-right"}))))),gt.createElement("div",{className:"flex-container flex-end"},gt.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),gt.createElement(We.ZP,{type:"ghost",onClick:rn},"\u53D6\u6D88")))},Kt=at(71411),Xt=at(43001),$t=at.n(Xt),sn=(0,gt.forwardRef)(({use3d:on,width:rn,height:Yt,callback:nr,showSaveButton:gr},Cr)=>{const Nn=(0,gt.useRef)(),qn=(0,gt.useRef)(),[Ir,gi]=(0,gt.useState)(!1),bi=(0,gt.useRef)({id:Nn,appName:"graphing",width:rn||1e3,height:Yt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,gt.useEffect)(()=>{qn.current=new($t())(bi.current,!0),window.onload=function(){qn.current.inject("applet_container")}},[]);const Nt=()=>{var Ht=window.ggbApplet.getPNGBase64(1,!0,72);return nr&&nr(Ht),Ht};return(0,gt.useEffect)(()=>{bi.current.appName=Ir?"3D":"graphing",qn.current.inject("applet_container")},[Ir]),(0,gt.useEffect)(()=>{gi(on)},[on]),(0,gt.useImperativeHandle)(Cr,()=>({getImgData:Nt})),gt.createElement(gt.Fragment,null,gt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Nn}),gt.createElement(ht.Z,{align:"middle"},gt.createElement(we.Z,{flex:1},gt.createElement(Kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ir,onChange:Ht=>gi(Ht)})),gt.createElement(we.Z,null,gt.createElement(We.ZP,{size:"large",onClick:Nt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),tn=at(76562),Wt=at(6767);const Pn="link",Sn="upload-image",Tn="add-flowchart",Kn="draw-image",Mr="add-flowchart",fr="code-block",Er="add-table",Hr="------------",Ur={default:Hr,left:`:${Hr}`,center:`:${Hr}:`,right:`${Hr}:`};var ri=at(37808);function Pi(){}let Ui=0;const Fi=1e4,zi="\u2581",Xi="@\u2581\u2581@",et="@\u2581@",dr=`
**\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`,mr=["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 Mi(on){return/^\d+$/.test(on)?`${on}px`:on}const Sr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",jr={[Sr+"-B"]:"bold",[Sr+"-I"]:"italic"},to={[Pn]:"\u6DFB\u52A0\u94FE\u63A5",[fr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Sn]:"\u6DFB\u52A0\u56FE\u7247",[Kn]:"\u6DFB\u52A0\u753B\u56FE",[Tn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Er]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Rr=({defaultValue:on="",onChange:rn,width:Yt="100%",height:nr=400,miniToolbar:gr=!1,isFocus:Cr=!1,watch:Nn,insertTemp:qn,mode:Ir="markdown",id:gi="markdown-editor-id",showResizeBar:bi=!1,noStorage:Nt=!1,showNullButton:Ht=!1,showNullProgramButton:Mn=!1,hidetoolBar:jn=!1,fullScreen:en=!1,onBlur:Fn,onCMBeforeChange:Dn,onFullScreen:Ln,className:er="",disablePaste:zn=!1,disabled:Zn=!1,disabledFill:rr=!1,placeholder:Kr="",values:cr="",extraUse:pr})=>{const[an,Vr]=(0,gt.useState)(null),[ei,Di]=(0,gt.useState)(on),[dn,Hn]=(0,gt.useState)(Nn),[ur,Jn]=(0,gt.useState)(en),[yr,Fr]=(0,gt.useState)(""),[Wr,$r]=(0,gt.useState)(0),[ii,hi]=(0,gt.useState)(nr),[mn,Li]=(0,gt.useState)(!1),[vn,xr]=(0,gt.useState)(0),[ui,si]=(0,gt.useState)(0),Ii=(0,gt.useRef)(),pi=(0,gt.useRef)(),Zr=(0,gt.useRef)(),Gi=(0,gt.useRef)();(0,gt.useEffect)(()=>{const Yn=window.scrollY||window.pageYOffset;Di(cr),an==null||an.setValue(cr),window.scrollTo(0,Yn)},[cr]),(0,gt.useEffect)(()=>{Ln==null||Ln(ur)},[ur]),(0,gt.useEffect)(()=>{if(Ii.current){let Yn=function(ln,lr){var wr;if(zn){lr.preventDefault();return}const Jr=lr.clipboardData;if(Jr){const Nr=Jr.types.toString(),Si=Jr.items;if(Nr==="Files"||Jr.types.indexOf("Files")>-1){if(lr.preventDefault(),Ir=="stex")return;try{let vi=Si[1];((wr=Si[0])==null?void 0:wr.kind)==="file"&&(vi=Si[0]);const mi=vi.getAsFile(),Ci=mi.name.split(".").pop();(0,dt.I)(mi,Ei=>{var Ki,Qt,xi;Ei.id?((Ki=mi==null?void 0:mi.type)==null?void 0:Ki.indexOf("image"))>-1?On.replaceSelection(`<img width="100%" src="/api/attachments/${Ei.id}?type=${Ei.content_type})" alt="" />`):((Qt=mi==null?void 0:mi.type)==null?void 0:Qt.indexOf("video"))>-1?On.replaceSelection(`<video width="100%" controls src="/api/attachments/${Ei.id}"></video>`):((xi=mi==null?void 0:mi.type)==null?void 0:xi.indexOf("pdf"))>-1?On.replaceSelection(`<a href="/api/attachments/${Ei.id}?type=${mi.type}&disposition=inline" target="_blank">${mi.name}</a>`):mr.includes(Ci)?On.replaceSelection(`<a href="/api/attachments/${Ei.id}?type=office&disposition=inline" target="_blank">${mi.name}</a>`):On.replaceSelection(`[${mi.name}](/api/attachments/${Ei.id}?type=${Ei.content_type})`):(Ei==null?void 0:Ei.status)===401&&(document.location.href="/user/login")})}catch(vi){Wt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const On=oe().fromTextArea(Ii.current,{mode:Ir,lineNumbers:!gr,lineWrapping:!0,value:on,autoCloseTags:!0,autoCloseBrackets:!0});return On.on("keyup",function(ln,lr){lr.keyCode===8&&(ln.getValue()==""?On.setOption("placeholder",Kr):On.setOption("placeholder",null))}),On.on("keydown",function(ln,lr){if(lr.keyCode===8){var wr=wn(ln);wr&&lr.preventDefault()}}),Cr&&On.focus(),On.on("paste",Yn),Zn&&On.on("beforeChange",function(ln,lr){(lr.origin==="paste"||lr.origin==="+input")&&lr.cancel()}),Vr(On),()=>{On.off("paste",Yn)}}},[]);const qt=(0,gt.useCallback)(()=>{if(pi.current)try{}catch(Yn){console.log(Yn,"---- to set md editor body height")}},[ii,pi,ur]);(0,gt.useEffect)(()=>{function Yn(){let On=new ze.Z(ln=>{for(let lr of ln)(lr.target.offsetHeight>0||lr.target.offsetWidth>0)&&(qt(),an.setSize("100%","100%"),an.refresh())});return On.observe(Ii.current.parentElement),On}if(an){const On=Yn();return()=>{var ln,lr;(ln=Ii.current)!=null&&ln.parentElement&&On.unobserve((lr=Ii.current)==null?void 0:lr.parentElement)}}},[an,qt]),(0,gt.useEffect)(()=>{if(an){let Yn=[];for(const[On,ln]of Object.entries(jr)){let lr={[On]:()=>{Jt(ln)}};Yn.push(lr),an.addKeyMap(lr)}return()=>{for(let On of Yn)an.removeKeyMap(On)}}},[an]),(0,gt.useEffect)(()=>{en!==ur&&Jn(en)},[en]),(0,ri.Z)(()=>{if(!Nt&&Wr>0){let Yn=new Date().getTime(),On=window.sessionStorage.getItem(gi);Yn>=Wr+Fi&&(!On||On!==ei)&&(window.sessionStorage.setItem(gi,ei),Li(!0))}},Fi),(0,gt.useEffect)(()=>{Hn(Nn)},[an,Nn]),(0,gt.useEffect)(()=>{an&&Cr&&an.focus()},[an,Cr]),(0,gt.useEffect)(()=>{if(dn&&an){let Yn=function(ln){let lr=ln.target;if(Gi.current){let wr=lr.scrollTop/lr.scrollHeight;Gi.current.scrollTop=Gi.current.scrollHeight*wr}};const On=an.getScrollerElement();return On.addEventListener("scroll",Yn),()=>{On.removeEventListener("scroll",Yn)}}},[an,dn]),(0,gt.useEffect)(()=>{if(an&&Dn){let Yn=function(On,ln){Dn(On,ln)};return an.on("beforeChange",Yn),()=>{an.off("beforeChange",Yn)}}},[an,Dn]),(0,gt.useEffect)(()=>{if(an&&Fn){let Yn=function(){Fn(an.getValue())};return an.on("blur",Yn),()=>{an.off("blur",Yn)}}},[an,Fn]);function wn(Yn,On){var ln=Yn.getDoc(),lr=ln.getCursor(),wr=ln.getLine(lr.line),Jr=wr.charAt(lr.ch-1),Nr=wr.lastIndexOf("@\u2581@",lr.ch),Si=wr.lastIndexOf("@\u2581\u2581@",lr.ch),vi=Nr>Si?Nr:Si,mi=Nr>Si?3:4;if(Xi.indexOf(Jr)===-1)return null;if(console.log("change1:",On,Yn,wr,lr,vi,Nr,Si,Jr),vi>=0&&lr.ch-vi<5){var Ci=vi+mi;return ln.replaceRange("",{line:lr.line,ch:vi},{line:lr.line,ch:Ci}),{line:lr.line,ch:Ci}}return null}(0,gt.useEffect)(()=>{if(an){let Yn=function(On,ln){const lr=On.getValue();Di(lr),$r(new Date().getTime()),On.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),rn&&(Mn?rn(lr,An(lr)):rn(lr))};return an.on("change",Yn),()=>{an.off("change",Yn)}}},[an,rn]),(0,gt.useEffect)(()=>{if(an)if(on==null)an.setValue(""),Di("");else{const Yn=window.scrollY||window.pageYOffset;on!==an.getValue()&&(an.setValue(on),Di(on),an.setCursor(Zn?1:an.lineCount(),0),window.scrollTo(0,Yn))}},[an,on]);const Jt=(0,gt.useCallback)(Yn=>{const On=an.getCursor(),ln=an.getSelection();let lr=ln.split(`
`);switch(Yn){case"bold":return an.replaceSelection("**"+ln+"**"),ln===""&&an.setCursor(On.line,On.ch+2),an.focus();case"italic":return an.replaceSelection("*"+ln+"*"),ln===""&&an.setCursor(On.line,On.ch+1),an.focus();case"code":return an.replaceSelection("`"+ln+"`"),ln===""&&an.setCursor(On.line,On.ch+1),an.focus();case"inline-latex":return Fr("inline-latex"),an.focus();case"latex":return an.replaceSelection("```latex\n"+ln+"\n```"),an.setCursor(On.line+1,ln.length+1),an.focus();case"line-break":return an.replaceSelection(`<br/>
`),an.focus();case"list-ul":return ln===""?an.replaceSelection("- "+ln):an.replaceSelection(lr.map(wr=>wr===""?"":`- ${wr}`).join(`
`)),an.focus();case"list-ol":return ln===""?an.replaceSelection("1. "+ln):an.replaceSelection(lr.map((wr,Jr)=>wr===""?"":`${Jr+1}. ${wr}`).join(`
`)),an.focus();case"add-null-ch":return ln===""&&an.setCursor(On.line,On.ch),an.replaceSelection(zi),an.focus();case"add-signal":return ln===""&&an.setCursor(On.line,On.ch),an.replaceSelection(et),an.focus();case"add-multiple":return ln===""&&an.setCursor(On.line,On.ch),an.replaceSelection(Xi),an.focus();case"inster-template-1":return ln===""&&an.setCursor(On.line,On.ch),an.replaceSelection(dr),an.focus();case"eraser":return an.setValue(""),an.focus();case"trigger-watch":return Hn(!dn),an.focus();case"trigger-full-screen":return Jn(!ur),an.focus();case Pn:Fr(Pn);return;case fr:Fr(fr);return;case Sn:Fr(Sn);return;case Kn:Fr(Kn);return;case"maths-latex":Fr("maths-latex");return;case Tn:Fr(Tn);return;case Er:Fr(Er);return;default:throw new Error}},[an,dn,ur]),lt=(0,gt.useCallback)((Yn,On)=>{var ln,lr,wr,Jr,Nr,Si;switch(Fr(""),yr){case Pn:const{title:Ki,link:Qt}=Yn;return an.replaceSelection(`[${Ki}](${Qt})`),an.focus();case fr:const{language:xi,content:ci}=Yn;return an.replaceSelection(["```"+xi,ci,"```"].join(`
`)),an.focus();case"maths-latex":for(var vi=atob(Yn),mi=new Uint8Array(vi.length),Ci=0;Ci<vi.length;Ci++)mi[Ci]=vi.charCodeAt(Ci);var Ei=new Blob([mi],{type:"image/png"});(0,dt.I)(Ei,Ao=>{Ao.id?an.replaceSelection(`![,](/api/attachments/${Ao.id}?type=${Ao.content_type})`):(Ao==null?void 0:Ao.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":an.replaceSelection("`$$"+Yn+"$$`");break;case Sn:case Kn:case Mr:const{src:zr,alt:oi}=Yn,Xr=On,Ri=(wr=(lr=(ln=Xr==null?void 0:Xr.name)==null?void 0:ln.split("."))==null?void 0:lr.pop)==null?void 0:wr.call(lr);return((Jr=Xr==null?void 0:Xr.type)==null?void 0:Jr.indexOf("image"))>-1||!(Xr!=null&&Xr.type)?Xr!=null&&Xr.align||Xr!=null&&Xr.width?an.replaceSelection(`<p style="text-align:${Xr.align||"initial"}"><img width="${Xr.width?Xr.width+"%":"initial"}" src="${zr}" alt="${oi||""}" /></p>`):an.replaceSelection(`<img width="100%" src="${zr}" alt="${oi||""}" />`):((Nr=Xr==null?void 0:Xr.type)==null?void 0:Nr.indexOf("video"))>-1?an.replaceSelection(`<video width="100%" controls src="${zr}"></video>`):((Si=Xr==null?void 0:Xr.type)==null?void 0:Si.indexOf("pdf"))>-1?an.replaceSelection(`<a href="${zr}?type=${Xr.type}&disposition=inline" target="_blank">${Xr.name}</a>`):mr.includes(Ri)?an.replaceSelection(`<a href="${zr}?type=office&disposition=inline" target="_blank">${Xr.name}</a>`):an.replaceSelection(`[${Xr.name}](${zr})`),an.focus();case Er:const{row:Bi,col:ti,align:eo}=Yn;let pa=`
`;for(let Ao=0;Ao<Bi;Ao++){let Ps=[],wa=[];for(let Ar=0;Ar<ti;Ar++)Ao===1&&wa.push(Ur[eo]),Ps.push(" ");Ao===1&&(pa+=`| ${wa.join(" | ")} |
`),pa+=`| ${Ps.join(ti===1?"":" | ")} |
`}return an.replaceSelection(pa+`
`),an.focus();default:throw new Error}},[an,yr]),In=(0,gt.useMemo)(()=>{switch(yr){case Pn:return gt.createElement(wt,{callback:lt,onCancel:pn});case fr:return gt.createElement(Pt.Z,{callback:lt,onCancel:pn});case Sn:return gt.createElement(dt.Z,{callback:lt,onCancel:pn});case Tn:return gt.createElement(Qe,{callback:lt,onCancel:pn});case Er:return gt.createElement(Dt,{callback:lt,onCancel:pn});case"maths-latex":return gt.createElement(sn,{showSaveButton:!0,callback:lt});case"inline-latex":return gt.createElement(tn.Z,{showSaveButton:!0,callback:lt});default:return null}},[yr]);function pn(){Fr("")}(0,gt.useEffect)(()=>{if(Zr.current){let Yn=function(Nr){wr=!0,Jr=Nr.pageY},On=function(){wr=!1},ln=function(Nr){if(wr){let Si=Nr.pageY-Jr;Si<0&&(Si=0),Si>300&&(Si=300);let vi=nr+Si+"px";hi(vi)}},lr=Zr.current,wr=!1,Jr=0;return lr.addEventListener("mousedown",Yn),document.addEventListener("mousemove",ln),document.addEventListener("mouseup",On),()=>{lr.removeEventListener("mousedown",Yn),document.removeEventListener("mousemove",ln),document.removeEventListener("mouseup",On)}}},[an,Zr]),(0,gt.useEffect)(()=>{hi(nr)},[nr]);const Un=Mi(Yt),Xn=Mi(ii),Wn={width:Un,height:Xn},hn=(0,gt.useMemo)(()=>{if(Wr){let Yn=new Date(Wr),On=Yn.getHours(),ln=Yn.getMinutes(),lr=Yn.getSeconds();return On=On<10?"0"+On:On,ln=ln<10?"0"+ln:ln,lr=lr<10?"0"+lr:lr,`${On}:${ln}:${lr}`}return 0},[Wr]),An=Yn=>{const On=[];if(Mn){let ln=-1;Yn=Yn.replace(/(@▁▁@|@▁@)/g,function(lr,wr,Jr){On.push({multiLine:lr!==et})})}return On};function _n(){window.sessionStorage.removeItem(gi),Li(!1),$r(0)}function kn(){Li(!1),$r(0),an.setValue(window.sessionStorage.getItem(gi))}(0,gt.useEffect)(()=>{to[yr]&&yr!==Kn&&yr!==Tn&&setTimeout(()=>{const Yn=document.getElementsByClassName("markdown-popup-form")[0],On=window.innerWidth/2-Yn.offsetWidth/2,ln=window.innerHeight/2-Yn.offsetHeight/2;xr(On),si(ln)},0)},[yr]);const Bn=Yn=>{Yn.preventDefault();const On=Yn.clientX-vn,ln=Yn.clientY-ui;document.body.onmousemove=lr=>{let wr=lr.clientX-On,Jr=lr.clientY-ln;const Nr=document.getElementsByClassName("markdown-popup-form")[0],Si=window.innerWidth-Nr.offsetWidth,vi=window.innerHeight-Nr.offsetHeight;wr=Math.max(0,Math.min(wr,Si)),Jr=Math.max(0,Math.min(Jr,vi)),sr(lr.clientX,lr.clientY,On,ln)&&(xr(wr),si(Jr))},document.body.onmouseup=function(){document.body.onmousemove=null}},sr=(Yn,On,ln,lr)=>{const wr=document.body.clientHeight,Jr=document.body.clientWidth;return Yn<20&&ln>Yn||Yn>Jr-20&&ln<Yn||On<20&&lr>On||On>wr-20&&lr<On?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return gt.createElement(gt.Fragment,null,gt.createElement("div",{className:"markdown-editor-wrapper",ref:pi},gt.createElement("div",{className:`markdown-editor-container ${er} ${dn?"on-preview":""} ${gr?"mini":""} ${ur?"full-screen":""}`,style:Wn},gt.createElement(Fe,{insertTemp:qn,watch:dn,fullScreen:ur,showNullButton:Ht,showNullProgramButton:Mn,onActionCallback:Jt,hidetoolBar:jn,extraUse:pr}),gt.createElement("div",{className:"markdown-editor-body"},gt.createElement("div",{className:"codemirror-container"},gt.createElement("textarea",{ref:Ii,placeholder:Kr})),dn?gt.createElement("div",{ref:Gi,className:"preview-container"},Ir==="stex"&&gt.createElement(ve,{value:ei}),Ir!=="stex"&&gt.createElement(Me.Z,{disabledFill:rr,showProgramFill:Mn,value:ei})):null))),bi?gt.createElement("a",{ref:Zr,className:"editor-resize"}):null,yr===Kn&&gt.createElement(Ft,{callback:lt,onCancel:pn}),yr===Tn&&gt.createElement(Qe,{callback:lt,onCancel:pn}),gt.createElement(Ne.Z,null,to[yr]&&yr!==Kn&&yr!==Tn?gt.createElement(ct.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:vn,top:ui},title:gt.createElement("div",{style:{cursor:"move"},onMouseDown:Bn},to[yr]),open:!0,onCancel:pn,footer:null,destroyOnClose:!0,width:yr===Tn?"1200px":null,height:yr===Tn?"80vh":null,className:"markdown-popup-form"},In):null))}},17077:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return je},I:function(){return Fe}});var gt=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,xe=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Ne,Ae,Re)=>Ae in Ne?Me(Ne,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Ne[Ae]=Re,ie=(Ne,Ae)=>{for(var Re in Ae||(Ae={}))z.call(Ae,Re)&&ae(Ne,Re,Ae[Re]);if(de)for(var Re of de(Ae))ee.call(Ae,Re)&&ae(Ne,Re,Ae[Re]);return Ne},le=(Ne,Ae)=>ve(Ne,xe(Ae));const{useForm:ue}=gt.default,ge={width:280,marginRight:10},Pe={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Ne,onCancel:Ae})=>{const[Re]=ue();let We=(0,Ce.useRef)();function Ye(ot){We.current.width=Re.getFieldValue("width"),We.current.align=Re.getFieldValue("align"),Ne(ot,We.current)}function Ue(ot,st){if(ot.status===-1){Bt.ZP.error(ot.message);return}Re.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(gt.default,le(ie({form:Re},Pe),{className:"upload-image-panel",onFinish:Ye,style:{width:470,overflow:"hidden"}}),Se.createElement(gt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Se.createElement("div",{className:"flex-container"},Se.createElement(gt.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(gt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Se.createElement(oe.default,{style:{width:264}})),Se.createElement(gt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Se.createElement(ze.Z,null,Se.createElement(gt.default.Item,{name:"width",style:{margin:0}},Se.createElement(De.Z,{style:{width:264}})),Se.createElement("span",{className:"ml8"},"%"))),Se.createElement(gt.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(gt.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 Re=new FormData;Re.append("editormd-image-file",Ne),Re.append("file_param_name","editormd-image-file"),Re.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(Re)}},91558:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return oe}});var gt=at(59301),Bt=at(4676);class oe extends gt.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 gt=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,xe=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(Qe,ut,pt)=>ut in Qe?Se(Qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Qe[ut]=pt,ae=(Qe,ut)=>{for(var pt in ut||(ut={}))de.call(ut,pt)&&ee(Qe,pt,ut[pt]);if(xe)for(var pt of xe(ut))z.call(ut,pt)&&ee(Qe,pt,ut[pt]);return Qe},ie=(Qe,ut)=>Me(Qe,ve(ut)),le=(Qe,ut,pt)=>new Promise((Mt,At)=>{var Dt=$t=>{try{Xt(pt.next($t))}catch(Ut){At(Ut)}},Kt=$t=>{try{Xt(pt.throw($t))}catch(Ut){At(Ut)}},Xt=$t=>$t.done?Mt($t.value):Promise.resolve($t.value).then(Dt,Kt);Xt((pt=pt.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(pt=>({label:pt,kind:Qe.languages.CompletionItemKind.Keyword,insertText:pt})),Pe=Qe=>Object.keys(ue.tables).map(ut=>({label:ut,kind:Qe.languages.CompletionItemKind.Variable,insertText:ut})),je=(Qe,ut)=>{const pt=ue.tables[Qe];return pt?pt.map(Mt=>({label:Mt,kind:ut.languages.CompletionItemKind.Field,insertText:Mt})):[]};function Be(Qe,ut,pt,Mt,At){let Dt=ut.getWordUntilPosition(pt),Kt={startLineNumber:pt.lineNumber,endLineNumber:pt.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:Kt}));return At.map($t=>{Xt.push(ie(ae({},$t),{range:Kt}))}),Xt}var Fe=Qe=>{ue.languages.map(At=>(Qe.languages.registerDocumentFormattingEditProvider(At,{provideDocumentFormattingEdits(Dt,Kt,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}]})}}),At));const ut=De.quickKey.map(At=>({label:At.label,kind:Qe.languages.CompletionItemKind.Method,insertText:At.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),pt=fe.quickKey.map(At=>({label:At.label,kind:Qe.languages.CompletionItemKind.Method,insertText:At.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Mt=ze.quickKey.map(At=>({label:At.label,kind:Qe.languages.CompletionItemKind.Method,insertText:At.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Qe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(At,Dt){var Kt=At.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},$t=At.getLineContent(Dt.lineNumber).substring(Kt.startColumn-2,Kt.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(At,Dt){var Kt=At.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.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(At,Dt){var Kt=At.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},$t=At.getLineContent(Dt.lineNumber).substring(Kt.startColumn-2,Kt.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(At,Dt){var Kt=At.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},$t=At.getLineContent(Dt.lineNumber).substring(Kt.startColumn-2,Kt.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(At,Dt){var Kt=At.getWordUntilPosition(Dt),Xt={startLineNumber:Dt.lineNumber,endLineNumber:Dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},$t=At.getLineContent(Dt.lineNumber).substring(Kt.startColumn-2,Kt.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,Re=(Qe,ut,pt)=>ut in Qe?Ae(Qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Qe[ut]=pt,We=(Qe,ut,pt)=>Re(Qe,typeof ut!="symbol"?ut+"":ut,pt);const Ye=class mx{constructor(ut,pt,Mt){this.placeholder=ut,this.editor=pt,this.monaco=Mt,pt.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),ft=at(25399),bt=at(89392),$e=at(49535),nt=at(56102),xt=Object.defineProperty,wt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,Et=(Qe,ut,pt)=>ut in Qe?xt(Qe,ut,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Qe[ut]=pt,vt=(Qe,ut)=>{for(var pt in ut||(ut={}))ct.call(ut,pt)&&Et(Qe,pt,ut[pt]);if(dt)for(var pt of dt(ut))ht.call(ut,pt)&&Et(Qe,pt,ut[pt]);return Qe},Ft=(Qe,ut)=>wt(Qe,Pt(ut)),mt=(Qe,ut)=>{var pt={};for(var Mt in Qe)ct.call(Qe,Mt)&&ut.indexOf(Mt)<0&&(pt[Mt]=Qe[Mt]);if(Qe!=null&&dt)for(var Mt of dt(Qe))ut.indexOf(Mt)<0&&ht.call(Qe,Mt)&&(pt[Mt]=Qe[Mt]);return pt},St=(Qe,ut,pt)=>new Promise((Mt,At)=>{var Dt=$t=>{try{Xt(pt.next($t))}catch(Ut){At(Ut)}},Kt=$t=>{try{Xt(pt.throw($t))}catch(Ut){At(Ut)}},Xt=$t=>$t.done?Mt($t.value):Promise.resolve($t.value).then(Dt,Kt);Xt((pt=pt.apply(Qe,ut)).next())});function tt(Qe){return/^\d+$/.test(Qe)?`${Qe}px`:Qe}function Ve(){}let we=!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 pt=0;pt<Qe.length;pt++){let Mt=Le[Qe[pt]];if(Mt)return Mt}return ut[0]}return Le[ut]||ut}let rt=null;const Ie=()=>St(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:pt="100%",height:Mt="100%",value:At,language:Dt="javascript",style:Kt={},options:Xt={},overrideServices:$t={},theme:Ut="vs-dark",onEditBlur:sn,isCopy:tn=!1,onSave:Wt,autoHeight:Pn=!1,forbidCopy:Sn=!1,onChange:Tn=Ve,editorDidMount:Kn=Ve,onFocus:Mr=Ve,onBreakPoint:fr=Ve,breakPointValue:Er=[],filename:Hr="educoder.txt",errorLine:Ur,errorContent:ri="",highlightLine:Pi,openBreakPoint:Ui=!1,placeholder:Fi="",showMiniMap:zi=!0}=ut,Xi=mt(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,gt.useRef)(),dr=(0,gt.useRef)({}),mr=(0,gt.useRef)(),Mi=(0,gt.useRef)(),ar=(0,gt.useRef)([]),Sr=(0,gt.useRef)(!1),jr=(0,gt.useRef)(),to=(0,gt.useRef)(),Rr=(0,gt.useRef)(!1),[on,rn]=(0,gt.useState)(!1);function Yt(){let Dn;return et.current&&(Dn=new Bt.Z(Ln=>{for(let er of Ln)(er.target.offsetHeight>0||er.target.offsetWidth>0)&&dr.current.instance.layout()}),Dn.observe(et.current)),Dn}function nr(){st.ZP.warning({content:decodeURIComponent(Ne),key:"monaco-editor-tip"})}const gr=()=>{let Dn=dr.current.instance;if(At!=null&&Dn&&on){const Ln=Dn.getModel();Ln&&At!==Ln.getValue()&&(we=!0,Ln.setValue(At),Dn.layout(),we=!1)}};(0,gt.useEffect)(()=>{const Dn=$e.Z.subscribe("formatDocument",Ln=>{var er;let zn=dr.current.instance;(er=zn==null?void 0:zn.getAction)==null||er.call(zn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ln=>{Tn(Ln)},Dn},[]),(0,gt.useEffect)(()=>{var Dn;let Ln=dr.current.instance;Mi.current&&clearTimeout(Mi.current),Mi.current=setTimeout(()=>{gr()},500),At&&(At!=null&&At.length)&&((Dn=Ln==null?void 0:Ln.updateOptions)==null||Dn.call(Ln,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(At.split(/\r\n|\r|\n/g).length))+3,5)}))},[At,on,dr.current]),(0,gt.useEffect)(()=>{if(Ur&&dr.current&&dr.current.instance){let Ln=dr.current.instance;Ln.changeViewZones(function(er){var zn=document.createElement("div");zn.style.padding="10px 20px",zn.style.width="calc(100% - 20px)",zn.className="my-error-line-wrp",zn.innerHTML=ri,er.addZone({afterLineNumber:Ur||11,heightInLines:3,domNode:zn})});var Dn={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Ln.addOverlayWidget(Dn),Ln.revealPositionInCenter({lineNumber:20,column:1})}},[Ur,dr.current,on]);const Cr=(Dn="",Ln)=>{if(!Dn||Dn.trim()==="")return!0;const zn=dr.current.instance.getModel().getLineTokens(Ln);let Zn=!1;for(let rr=0;rr<2;rr++)zn.getStandardTokenType(rr)===1&&(Zn=!0);return Zn};(0,gt.useEffect)(()=>{var Dn;const Ln=(Dn=dr.current)==null?void 0:Dn.instance;if(Ln&&on&&Sn){const er=Ln.onDidBlurEditorWidget(()=>{Rr.current=!1}),zn=Ln.onDidFocusEditorText(()=>{Rr.current=!0});return()=>{er.dispose(),zn.dispose()}}},[dr.current,on,Sn]),(0,gt.useEffect)(()=>{var Dn;if((Dn=dr.current)!=null&&Dn.instance&&on&&Ui){let Ln=dr.current.instance,er=Ln.getModel();if(!er)return;(()=>{var Hn;let ur=[],Jn=[];const yr=er.getAllDecorations();for(let Wr of yr)Wr.options.className==="highlighted-line"&&(ur.push((Hn=Wr==null?void 0:Wr.range)==null?void 0:Hn.startLineNumber),Jn.push(Wr==null?void 0:Wr.id));if(Pi===ur[0])return;er.deltaDecorations(Jn,[]);const Fr=er.getLineCount();Pi&&Pi<=Fr&&(Ln.deltaDecorations([],[{range:new rt.Range(Pi,1,Pi,er.getLineMaxColumn(Pi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ln.revealLineInCenter(Pi))})();const Zn=(Hn=!1)=>{var ur;let Jn=[],yr=[];const Fr=er.getAllDecorations();for(let Wr of Fr)Wr.options.linesDecorationsClassName==="breakpoints-select"&&(Jn.push((ur=Wr==null?void 0:Wr.range)==null?void 0:ur.startLineNumber),yr.push(Wr==null?void 0:Wr.id));if(Hn)return{lines:Jn,ids:yr};fr(Jn)},rr=Hn=>St(void 0,null,function*(){let ur={range:new rt.Range(Hn,1,Hn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield er.deltaDecorations([],[ur]),Zn()}),Kr=Hn=>St(void 0,null,function*(){let ur=[];const Jn=Ln.getLineDecorations(Hn);for(let yr of Jn)yr.options.linesDecorationsClassName==="breakpoints-select"&&ur.push(yr.id);yield er.deltaDecorations(ur,[]),Zn()}),cr=Hn=>{let ur=Ln.getLineDecorations(Hn);for(let Jn of ur)if(Jn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,bt.isEqual)(Er,Zn(!0).lines)){er.deltaDecorations(Zn(!0).ids,[]);const Hn=Er.map(ur=>({range:new rt.Range(ur,1,ur,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));er.deltaDecorations([],Hn)}const pr=Ln.onDidChangeModelContent(Hn=>{let ur=Ln.getPosition();if(ur){let Jn=ur.lineNumber;clearTimeout(to.current),to.current=setTimeout(()=>{Cr(er.getLineContent(Jn),Jn)?Kr(Jn):cr(Jn)?(Kr(Jn),rr(Jn)):Zn()},100)}}),an=Ln.onMouseDown(Hn=>{var ur,Jn,yr;if(Hn.target.detail&&((yr=(Jn=(ur=Hn.target)==null?void 0:ur.element)==null?void 0:Jn.className)!=null&&yr.includes("line-numbers"))){let Fr=Hn.target.position.lineNumber;if(Cr(er.getLineContent(Fr),Fr))return;cr(Fr)?Kr(Fr):rr(Fr)}}),Vr=Hn=>{let ur={range:new rt.Range(Hn,1,Hn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ar.current=Ln.deltaDecorations(ar.current,[ur])},ei=()=>{ar.current=Ln.deltaDecorations(ar.current,[])},Di=Ln.onMouseMove(Hn=>{var ur,Jn,yr;if(ei(),Hn.target.detail&&((yr=(Jn=(ur=Hn.target)==null?void 0:ur.element)==null?void 0:Jn.className)!=null&&yr.includes("line-numbers"))){let Fr=Hn.target.position.lineNumber;if(Cr(er.getLineContent(Fr),Fr))return;Vr(Fr)}}),dn=Ln.onMouseLeave(()=>{ei()});return()=>{pr.dispose(),an.dispose(),Di.dispose(),dn.dispose()}}},[dr.current,on,Er,Pi,Ui,Dt]),(0,gt.useEffect)(()=>{var Dn;(Dn=dr.current)!=null&&Dn.instance&&Ui&&dr.current.instance.setPosition({lineNumber:0,column:0})},[Pi]);function Nn(){let Dn=dr.current.instance;if(Dn){const Ln=Dn.getSelection(),er=dr.current.pastePos||{},zn=new rt.Range(er.startLineNumber||Ln.endLineNumber,er.startColumn||Ln.endColumn,er.endLineNumber||Ln.endLineNumber,er.endColumn||Ln.endColumn);setTimeout(()=>{Dn.executeEdits("",[{range:zn,text:""}])},300)}}function qn(Dn){(window.navigator.platform.match("Mac")?Dn.metaKey:Dn.ctrlKey)&&Dn.keyCode==83&&(Dn.preventDefault(),Wt())}const Ir=()=>{if(Pn&&dr.current.instance){const Dn=dr.current.instance.getContentHeight();en(Dn<Mt?Mt:Dn)}else en(Mt)};function gi(Dn){var Ln=document.createEvent("MouseEvents");Ln.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Dn.dispatchEvent(Ln)}const bi=Dn=>{if(!Rr.current)return;const{keyCode:Ln,ctrlKey:er,metaKey:zn,target:Zn,type:rr}=Dn;return(rr==="paste"||(Ln===67||Ln===86)&&(zn||er))&&Zn.nodeName==="TEXTAREA"&&(nr(),Dn.preventDefault()),!1};function Nt(Dn,Ln){var er=window.URL||window.webkitURL||window,zn=new Blob([Ln]),Zn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Zn.href=er.createObjectURL(zn),Zn.download=Dn,gi(Zn)}(0,gt.useEffect)(()=>{Ir()},[Ir]),(0,gt.useEffect)(()=>{et.current&&!on&&Promise.all([at.e(8909),at.e(6656)]).then(at.bind(at,71448)).then(Dn=>{try{rt=Dn,dr.current.instance=rt.editor.create(et.current,{value:At,language:Ze(Dt),theme:Ut,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:zi||!1}},$t);const Ln=dr.current.instance;let Zn=[...ot.BH._menuItems].find(pr=>pr[0]._debugName=="EditorContext")[1],rr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Kr=(pr,an)=>{var Vr,ei;let Di=pr._first;do an.includes((ei=(Vr=Di.element)==null?void 0:Vr.command)==null?void 0:ei.id)&&pr._remove(Di);while(Di=Di.next)};if(Kn(Ln,rt),setTimeout(()=>{Ir(),dr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Nt(Hr||"educoder.txt",Ln.getValue())}})},500),dr.current.subscription=Ln.onDidChangeModelContent(pr=>{Sr.current?clearTimeout(jr.current):(Ir(),Tn(Ln.getValue(),pr)),jr.current=setTimeout(()=>{Sr.current=!1},500)}),window.Monaco||Fe(rt,Ze(Dt)),Sn&&(Kr(Zn,rr),et.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",bi),window.removeEventListener("paste",bi),window.addEventListener("keydown",bi),window.addEventListener("paste",bi)),window.Monaco=rt,sn&&Ln.onDidBlurEditorWidget(()=>{sn(Ln.getValue())}),Mr&&Ln.onDidFocusEditorText(()=>{Sn&&Ie(),Mr(Ln.getValue())}),Sn){Ie();try{Ln.onDidPaste(pr=>{const an=Ln.getSelection(),Vr=dr.current.pastePos||{},ei=new rt.Range(Vr.startLineNumber||an.endLineNumber,Vr.startColumn||an.endColumn,Vr.endLineNumber||an.endLineNumber,Vr.endColumn||an.endColumn);Ln.executeEdits("",[{range:pr.range,text:""}])})}catch(pr){}}let cr=Yt();return Fi&&typeof Fi=="string"&&new Ke(Fi,Ln,rt),rn(!0),()=>{const pr=dr.current.instance;pr.dispose();const an=pr.getModel();an&&an.dispose(),dr.current.subscription&&dr.current.subscription.dispose(),cr.unobserve(et.current)}}catch(Ln){}})},[]),(0,gt.useEffect)(()=>{if(dr.current.instance&&on)return document.addEventListener("keydown",qn,!1),()=>{document.removeEventListener("keydown",qn)}},[Wt,on]),(0,gt.useEffect)(()=>{let Dn=dr.current.instance;if(Dn&&on){let Ln=Ze(Dt);rt.editor.setModelLanguage(Dn.getModel(),Ln)}},[Dt,on]),(0,gt.useEffect)(()=>{dr.current.instance&&on&&rt.editor.setTheme(Ut)},[Ut,on]),(0,gt.useEffect)(()=>{let Dn=dr.current.instance;mr.current=Xt,Dn&&on&&(Dn.updateOptions(vt({},Xt)),setTimeout(()=>{Dn.getModel().updateOptions(vt({},Xt))},200))},[JSON.stringify(Xt),on]),(0,gt.useEffect)(()=>{let Dn=dr.current.instance;Dn&&on&&Dn.layout()},[pt,Mt,on]);const[Ht,Mn]=(0,gt.useState)(tt(pt)),[jn,en]=(0,gt.useState)(tt(Mt)),Fn=Ft(vt({},Kt),{width:Ht,height:jn,position:"relative"});return gt.createElement("div",{className:"my-monaco-editor",ref:et,style:Fn},tn&&gt.createElement(nt.CopyToClipboard,{text:At,onCopy:()=>st.ZP.success("\u590D\u5236\u6210\u529F")},gt.createElement(ft.Z,{title:"\u590D\u5236\u4EE3\u7801"},gt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},gt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function He({width:Qe="100%",height:ut="100%",original:pt,modified:Mt,language:At,options:Dt={}}){const Kt=(0,gt.useRef)(),[Xt,$t]=(0,gt.useState)(null);function Ut(Pn){let Sn;return Kt.current&&(Sn=new Bt.Z(Tn=>{for(let Kn of Tn)(Kn.target.offsetHeight>0||Kn.target.offsetWidth>0)&&Pn.layout()}),Sn.observe(Kt.current)),Sn}(0,gt.useEffect)(()=>(Kt.current&&Promise.all([at.e(8909),at.e(9404)]).then(at.bind(at,2550)).then(Pn=>{rt=Pn;const Sn=rt.editor.createDiffEditor(Kt.current,Ft(vt({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(Sn);let Tn=Ut(Sn);return()=>{Sn.dispose();const Kn=Sn.getModel();Kn&&Kn.dispose(),Tn.unobserve(Kt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,gt.useEffect)(()=>{Xt&&Xt.setModel({original:rt.editor.createModel(pt,At),modified:rt.editor.createModel(Mt,At)})},[pt,Mt,At,Xt]);const sn=tt(Qe),tn=tt(ut),Wt={width:sn,height:tn};return gt.createElement("div",{className:"my-diff-editor",ref:Kt,style:Wt})}},58397:function(gn,cn,at){"use strict";var gt=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:xe,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 gt=at(59301);function Bt(oe,ze){const De=(0,gt.useRef)();(0,gt.useEffect)(()=>{De.current=oe}),(0,gt.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 gt=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),xe=at(82326),de=at(71051),z=at(47889),ee=at(62673),ae=at(77736),ie=at(93725),le=at(59301);const{Option:ue}=xe.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(jr=>{const{id:to,name:Rr,sub_disciplines:on}=jr;let rn={value:to,label:Rr};Sr.push(rn),on&&on.length>0&&(rn.children=[],Be(on,rn.children))})}function Fe(ar,Sr){var jr;let to=[];for(let Rr=0;Rr<ar.length;Rr++){const on=ar[Rr];if(((jr=on.sub_disciplines)==null?void 0:jr.length)>0){to[0]=on.id;for(let rn=0;rn<on.sub_disciplines.length;rn++){const Yt=on.sub_disciplines[rn];if(Yt.id===Sr)return to[1]=Yt.id,[to,Yt.tag_disciplines||Yt.sub_disciplines||[]]}}}return[to,[]]}var Ne=at(25690),Ae=at(24334),Re=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 ft(ar,Sr){return(0,Ue.gz)(`practices/${ar}`,Sr)}function bt(ar,Sr){return post(`exercises/${ar}/exercise_questions.json`,Sr)}function $e(ar,Sr){return put(`exercise_questions/${ar}.json`,Sr)}var nt=at(8343),xt=at(30641),wt=at(75975),Pt=at(58397),dt=at(91558),ct=at(23992),ht={"code-panel-container":"code-panel-container___BZjjl","action-oj-bar":"action-oj-bar___xbXpK",active:"active___EMVKI"},Et=Object.defineProperty,vt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Ve=(ar,Sr,jr)=>Sr in ar?Et(ar,Sr,{enumerable:!0,configurable:!0,writable:!0,value:jr}):ar[Sr]=jr,we=(ar,Sr)=>{for(var jr in Sr||(Sr={}))St.call(Sr,jr)&&Ve(ar,jr,Sr[jr]);if(mt)for(var jr of mt(Sr))tt.call(Sr,jr)&&Ve(ar,jr,Sr[jr]);return ar},Le=(ar,Sr)=>vt(ar,Ft(Sr));const Ze={theme:(0,ct.G)("cmCodeMode","vs-dark"),fontSize:(0,ct.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,ct.G)("cmTabToSpace",!0)};var rt=(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))(rt||{});function Ie(ar,Sr){switch(Sr.type){case 3:return Le(we({},ar),{showEditorSetting:Sr.payload});case 1:return Le(we({},ar),{theme:Sr.payload});case 0:return Le(we({},ar),{fontSize:Sr.payload});case 2:return Le(we({},ar),{tabToSpace:Sr.payload});default:throw new Error}}var _e=({value:ar,onChange:Sr,language:jr,onLanguage:to,languageItems:Rr,ActionBarRender:on=rn=>gt.createElement(He,{languageItems:Rr,onLanguage:to,language:jr,onShowCodeSetting:rn})})=>{const[rn,Yt]=(0,gt.useReducer)(Ie,Ze),{theme:nr,fontSize:gr,showEditorSetting:Cr,tabToSpace:Nn}=rn;console.log(ar,jr,"value");const qn={onFontSizeChange:Nt=>{Yt({type:0,payload:Nt}),(0,ct.t)("cmFontSize",Nt)},tabToSpace:Nn,cmFontSize:gr,className:"oj",cmCodeMode:nr,onTabToSpace:Nt=>{Yt({type:2,payload:Nt}),(0,ct.t)("cmTabToSpace",Nt)},onCodeModeChange:Nt=>{Yt({type:1,payload:Nt}),(0,ct.t)("cmCodeMode",Nt)}};function Ir(){Yt({type:3,payload:!1})}function gi(){Yt({type:3,payload:!0})}const bi={value:ar,language:jr,onChange:Sr,theme:nr,height:"calc(100% - 56px)",options:{fontSize:gr,insertSpaces:Nn}};return gt.createElement(gt.Fragment,null,gt.createElement("div",{className:ht["code-panel-container"]},on(gi),gt.createElement(wt.ZP,we({key:jr},bi))),gt.createElement(dt.Z,null,gt.createElement(xt.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Cr,onClose:Ir},gt.createElement(Pt.Z,we({},qn)))))};function He({languageItems:ar,language:Sr,onShowCodeSetting:jr,onLanguage:to}){return gt.createElement("div",{className:ht["action-oj-bar"]},ar==null?void 0:ar.map(Rr=>gt.createElement("div",{className:Sr===(Rr==null?void 0:Rr.language)?ht.active:"",onClick:()=>to(Rr==null?void 0:Rr.language),key:Rr==null?void 0:Rr.language},Rr==null?void 0:Rr.language)),gt.createElement("a",{onClick:jr},gt.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"},pt=(ar,Sr,jr)=>new Promise((to,Rr)=>{var on=nr=>{try{Yt(jr.next(nr))}catch(gr){Rr(gr)}},rn=nr=>{try{Yt(jr.throw(nr))}catch(gr){Rr(gr)}},Yt=nr=>nr.done?to(nr.value):Promise.resolve(nr.value).then(on,rn);Yt((jr=jr.apply(ar,Sr)).next())}),At=({visible:ar,onOK:Sr,onCancel:jr})=>{const[to,Rr]=(0,gt.useState)(!1),[on,rn]=(0,gt.useState)(!1),[Yt,nr]=(0,gt.useState)("1"),[gr,Cr]=(0,gt.useState)(""),[Nn,qn]=(0,gt.useState)([]),Ir=()=>pt(void 0,null,function*(){if(!gr){me.ZP.warning(`\u9898\u76EE${Mn}\u4E0D\u80FD\u4E3A\u7A7A`);return}rn(!0);const jn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:ar,name:gr}});if((jn==null?void 0:jn.status)===0){Sr();return}rn(!1)}),gi=(jn="")=>pt(void 0,null,function*(){Rr(!0);let en=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:ar,search:jn}});qn(en.tag_disciplines||[]),Rr(!1)}),bi=jn=>{let en=jn.name;ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:gt.createElement("div",null,gt.createElement(oe.default,{defaultValue:en,placeholder:`\u8BF7\u8F93\u5165${Mn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20,onChange:Fn=>{en=Fn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>pt(void 0,null,function*(){if(!en)return me.ZP.warning(`\u9898\u76EE${Mn}\u4E0D\u80FD\u4E3A\u7A7A`),Promise.reject();const Fn=yield(0,Ue.ZP)(`/api/tag_disciplines/${jn.id}/rename.json`,{method:"post",body:{id:jn.id,name:en}});(Fn==null?void 0:Fn.status)===0&&gi()})})},Nt=jn=>{ze.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:ar==="practice"?gt.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",gt.createElement("span",{className:"c-light-primary"},jn.name),"\u201D\u5220\u9664\u5417\uFF1F",gt.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):gt.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",gt.createElement("span",{className:"c-light-primary"},jn.name),"\u201D\u5220\u9664\u5417\uFF1F",gt.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:()=>pt(void 0,null,function*(){const en=yield(0,Ue.ZP)(`/api/tag_disciplines/${jn.id}.json`,{method:"delete",body:{id:jn.id}});(en==null?void 0:en.status)===0&&gi()})})},Ht=jn=>{gi(jn)},Mn=ar==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return gt.createElement(ze.default,{afterClose:()=>{rn(!1),Rr(!1),Cr(""),nr("1"),qn([])},centered:!0,keyboard:!1,width:600,title:`${Mn}\u7BA1\u7406`,open:!!ar,className:ut.customModal,footer:null,onCancel:jr},gt.createElement("section",{className:ut.wrap},gt.createElement(Qe.default,{activeKey:Yt,onChange:jn=>{Cr(""),nr(jn),gi()}},gt.createElement(Qe.default.TabPane,{tab:`\u65B0\u589E${Mn}`,key:"1"},gt.createElement(oe.default,{value:gr,onChange:jn=>Cr(jn.target.value),className:ut.in,placeholder:`\u8F93\u5165${Mn}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20}),gt.createElement("div",{className:ut.btns},gt.createElement(Me.ZP,{onClick:jr,className:"mr20"},"\u53D6\u6D88 "),gt.createElement(Me.ZP,{loading:on,onClick:Ir,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),gt.createElement(Qe.default.TabPane,{tab:`\u5DF2\u6709${Mn}`,key:"2"},gt.createElement(oe.default.Search,{allowClear:!0,onSearch:Ht,value:gr,onChange:jn=>Cr(jn.target.value),className:ut.in,placeholder:`\u8F93\u5165${Mn}\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2`}),gt.createElement(ve.default,{dataSource:Nn,bordered:!1,loading:to,scroll:Nn.length>7?{y:300}:{},style:{padding:"0 0px 20px 0px"},columns:[{title:`${Mn}\u540D\u79F0`,dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:(jn,en)=>gt.createElement("span",null,gt.createElement("span",{onClick:()=>bi(en),className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),gt.createElement("span",{onClick:()=>Nt(en),className:"current c-grey-666"},"\u5220\u9664"))}],pagination:!1})))))},Dt=at(346),Kt=at(3532),Xt=at(61186),$t=at.n(Xt),Ut=at(51257),sn=at(76902),tn=at(48790),Wt=at(59301),Pn=Object.defineProperty,Sn=Object.defineProperties,Tn=Object.getOwnPropertyDescriptors,Kn=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,Er=(ar,Sr,jr)=>Sr in ar?Pn(ar,Sr,{enumerable:!0,configurable:!0,writable:!0,value:jr}):ar[Sr]=jr,Hr=(ar,Sr)=>{for(var jr in Sr||(Sr={}))Mr.call(Sr,jr)&&Er(ar,jr,Sr[jr]);if(Kn)for(var jr of Kn(Sr))fr.call(Sr,jr)&&Er(ar,jr,Sr[jr]);return ar},Ur=(ar,Sr)=>Sn(ar,Tn(Sr)),ri=(ar,Sr,jr)=>new Promise((to,Rr)=>{var on=nr=>{try{Yt(jr.next(nr))}catch(gr){Rr(gr)}},rn=nr=>{try{Yt(jr.throw(nr))}catch(gr){Rr(gr)}},Yt=nr=>nr.done?to(nr.value):Promise.resolve(nr.value).then(on,rn);Yt((jr=jr.apply(ar,Sr)).next())});const{TextArea:Pi}=oe.default,{confirm:Ui}=ze.default,{Panel:Fi}=De.default,zi={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 dr(ar,Sr){switch(Sr.type){case 0:return Hr(Hr({},ar),Sr.payload);case 1:return Ur(Hr({},ar),{loading:Sr.payload});case 2:return Ur(Hr({},ar),{status:Sr.payload});default:throw new Error}}var mr=()=>{var ar,Sr,jr;const to=(0,Ne.useLocation)(),{id:Rr}=(0,Ne.useParams)(),[on]=fe.default.useForm(),[rn,Yt]=(0,gt.useState)(),[nr,gr]=(0,gt.useState)(!1),[Cr,Nn]=(0,gt.useState)([]),[qn,Ir]=(0,gt.useState)([]),[gi,bi]=(0,gt.useState)([]),[Nt,Ht]=(0,gt.useState)([]),[Mn,jn]=(0,gt.useState)([]),[en,Fn]=(0,gt.useState)("C"),[Dn,Ln]=(0,gt.useReducer)(dr,zi),{loading:er,data:zn,user:Zn,status:rr}=Dn,Kr=zn==null?void 0:zn.hack_sets,cr=(ar=zn==null?void 0:zn.hack)==null?void 0:ar.test_set_average,[pr,an]=(0,gt.useState)(!1),Vr=(0,gt.useRef)([]),[ei,Di]=(0,gt.useState)(!1),[dn,Hn]=(0,gt.useState)(!1),ur=(0,gt.useRef)(!0),[Jn,yr]=(0,gt.useState)({});(0,gt.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,gt.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)});const Fr=()=>ri(void 0,null,function*(){const pn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}}),Un=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});Ir(pn.tag_disciplines||[]),bi(Un.tag_disciplines||[])});var Wr=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}];const $r=(0,gt.useCallback)(()=>ri(void 0,null,function*(){if(Ln({type:1,payload:!0}),Rr){const pn=yield st(Rr),{user:Un,language:Xn,practice_sets:Wn,practice_codes:hn,description:An,difficulty:_n,name:kn,open_or_not:Bn,time_limit:sr,test_set_average:Yn,test_set_score:On,status:ln,tag_discipline_ids:lr,source_discipline_ids:wr,item_banks_group_id:Jr,is_file:Nr=!1,hide_actual_output:Si,review_privilege:vi,review_description:mi,submit_rule:Ci}=pn;yr({review_privilege:vi,status:ln,review_description:mi,name:kn}),an(Si);const Ki=Nr?[{input:"",output:"",score:100,position:1}]:Wn;Nr?(Nn(Wn),on.setFieldsValue({hack_sets:Ki})):Nn([]),Ln({type:0,payload:{loading:!0,user:Un,status:ln,data:{hack:{difficulty:_n,name:kn,description:An,open_or_not:Bn,time_limit:sr,test_set_average:Yn,test_set_score:On,tag_discipline_ids:lr,source_discipline_ids:wr,is_file:Nr,submit_rule:Ci},hack_sets:Ki}}}),Yt({hack:{difficulty:_n,name:kn,description:An,open_or_not:Bn,time_limit:sr,test_set_average:Yn,test_set_score:On,tag_discipline_ids:lr,source_discipline_ids:wr,is_file:Nr}});const xi=hn==null?void 0:hn.map(ci=>Ur(Hr({},ci),{code:Ae.Base64.decode(ci==null?void 0:ci.code)}));jn(xi),Vr.current=xi}else{const{user:pn}=yield ot();Ln({type:0,payload:{loading:!0,status:0,user:pn,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}]}}}),Yt({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),jn(Wr),Vr.current=Wr}Ln({type:1,payload:!1})}),[Rr]);(0,gt.useEffect)(()=>{try{$r(),Fr()}catch(pn){console.log(pn,"----")}},[]);function ii(pn,Un){return ri(this,null,function*(){var Xn;const{hack_sets:Wn,hack:hn}=Hr({},pn);hn.hide_actual_output=pr;let An=[],_n=[],kn=0;const Bn=hn!=null&&hn.is_file?Cr.map((On,ln)=>Ur(Hr({},On),{position:ln+1})):Wn.map(On=>Ur(Hr({},On),{is_file:!1}));for(let On of Bn)kn+=On.score,On.id&&On.id>=0?An.push(On):_n.push(On);if(!(Bn!=null&&Bn.length)){me.ZP.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A");return}if(kn!==100&&!hn.test_set_score){me.ZP.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(Bn!=null&&Bn.some(On=>!On.output)){me.ZP.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A");return}ur.current?Di(!0):Hn(!0);let sr;const Yn=Mn==null?void 0:Mn.map(On=>Ur(Hr({},On),{code:Ae.Base64.encode(On==null?void 0:On.code)}));if(Rr?sr=yield ft(Rr,{practice:hn,practice_codes:Yn,practice_sets:_n,update_practice_sets:An}):sr=yield Ke({practice:hn,practice_codes:Yn,practice_sets:Bn,publish:!ur.current}),Di(!1),Hn(!1),(sr==null?void 0:sr.status)===0){if((Xn=sr==null?void 0:sr.similar_practice)!=null&&Xn.length){gr(!0),Ht(sr==null?void 0:sr.similar_practice);return}if(Rr){if(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),!ur.current){const On=yield(0,Ue.ZP)(`/api/practices/${Rr}/start`,{method:"get"});(On==null?void 0:On.status)===0&&Ne.history.push(`/problems/${On==null?void 0:On.identifier}/oj/${Rr}`)}}else me.ZP.success("\u65B0\u5EFA\u6210\u529F"),Ne.history.replace(`/problems/${sr==null?void 0:sr.identifier}/ojedit`)}})}function hi(){Ne.history.replace("/problems")}const mn=pn=>{const Un=Math.floor(100/pn.length),Xn=Un+100%pn.length;pn=pn.map((Wn,hn)=>hn===pn.length-1?Ur(Hr({},Wn),{score:Xn}):Ur(Hr({},Wn),{score:Un})),Nn(pn)};function Li(pn){pn.target.value||mn(Cr),Ln({type:0,payload:{data:Ur(Hr({},zn),{hack:Ur(Hr({},zn.hack),{test_set_score:pn.target.value})})}})}function vn(pn){Ln({type:0,payload:{data:Ur(Hr({},zn),{hack:Ur(Hr({},zn.hack),{is_file:pn.target.value})})}})}function xr(pn){an(pn.target.checked)}function ui(pn){const Un=pn.target.value;Un&&mn(Cr),Ln({type:0,payload:{data:Ur(Hr({},zn),{hack:Ur(Hr({},zn.hack),{test_set_average:Un})})}})}function si(){let pn=on.getFieldValue("hack_sets");const Un=pn.length+1,Xn=Math.floor(100/Un),Wn=100%Un;pn.map((hn,An)=>(cr&&(hn.score=Xn),hn.position=An+1,hn)),pn.push({input:"",output:"",position:Un,score:cr?Xn+Wn:0}),on.setFieldsValue({hack_sets:pn}),Ln({type:0,payload:{data:Ur(Hr({},zn),{hack_sets:pn})}})}(0,gt.useEffect)(()=>{if(cr){const pn=Kr==null?void 0:Kr.length,Un=Math.floor(100/pn),Xn=100%pn;Kr==null||Kr.map((Wn,hn)=>(Wn.score=Un,Wn.position=hn+1,hn===pn-1&&(Wn.score=Un+Xn),Wn)),Ln({type:0,payload:{data:Ur(Hr({},zn),{hack_sets:Kr})}}),on.setFieldsValue({hack_sets:Kr})}},[cr]);function Ii(pn){let Un=on.getFieldValue("hack_sets");const Xn=(Un==null?void 0:Un.length)-1,Wn=Math.ceil(100/Xn),hn=100%Xn;Un.splice(pn,1),Un==null||Un.map((An,_n)=>(cr&&(An.score=Wn,_n===Xn-1&&(An.score=Wn+hn)),An.position=_n+1,An)),Ln({type:0,payload:{data:Ur(Hr({},zn),{hack_sets:Un})}}),on.setFieldsValue({hack_sets:Un})}function pi(pn){Fn(pn)}const Zr=pn=>{var Un;const Xn=(Un=Vr.current)==null?void 0:Un.findIndex(Wn=>Wn.language===en);Vr.current[Xn].code=pn,jn(Vr.current)},Gi=pn=>{Yt(Hr({},on.getFieldsValue()))},qt=pn=>ri(void 0,null,function*(){const Un=yield(0,Ue.ZP)(`/api/practices/${pn}/start`,{method:"get"});(Un==null?void 0:Un.status)===0&&(0,Ut.xg)(`/problems/${Un==null?void 0:Un.identifier}/oj/${pn}`)}),wn=()=>ri(void 0,null,function*(){const pn=yield st(Rr),{name:Un,status:Xn,review_privilege:Wn,review_description:hn}=pn;yr({review_privilege:Wn,status:Xn,review_description:hn,name:Un})}),Jt=()=>{let pn="";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:pn,onChange:Un=>{pn=Un}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ri(void 0,null,function*(){if(!pn)return me.ZP.warning("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Un=yield(0,Ue.ZP)(`/api/practices/${Rr}/review.json`,{method:"post",body:{op:"fail",description:pn}});(Un==null?void 0:Un.status)===0&&(me.ZP.success("\u63D0\u4EA4\u6210\u529F"),wn())})})},lt=()=>ri(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${Jn==null?void 0:Jn.name}\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F`,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ri(void 0,null,function*(){const pn=yield(0,Ue.ZP)(`/api/practices/${Rr}/review.json`,{method:"post",body:{op:"pass"}});(pn==null?void 0:pn.status)===0&&(me.ZP.success("\u63D0\u4EA4\u6210\u529F"),wn())})})}),In=()=>{const pn=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:()=>pn.destroy()}))),content:Wt.createElement("div",null,Wt.createElement(sn.Z,{className:"mt20",value:(Jn==null?void 0:Jn.review_description)||""}))})};return Wt.createElement(Se.Z,{spinning:er,size:"large",className:Bt["oj-custom-large-spin"]},zn?Wt.createElement(gt.Fragment,null,Wt.createElement("header",{className:Bt.header},Wt.createElement("div",null,Wt.createElement("img",{src:`${Dt.Z.IMG_SERVER}/images/${Zn==null?void 0:Zn.image_url}`,alt:"user",width:30}),Wt.createElement("span",null,Zn==null?void 0:Zn.name)),Wt.createElement("h2",null," ",(Sr=zn==null?void 0:zn.hack)==null?void 0:Sr.name," "),Rr?Wt.createElement("a",{className:Bt.btn_back,onClick:hi}," ",Wt.createElement(Re.Z,null),"\u9000\u51FA"):null),Wt.createElement(fe.default,{form:on,initialValues:zn,layout:"vertical",className:Bt["oj-form-container"],onValuesChange:Gi,onFinish:ii},Wt.createElement(nt.Z,{hideResize:!0,className:Bt["oj-problems"],leftChild:Wt.createElement(Mi,{formValue:rn,onRemoveTestCase:Ii,onAddTestCase:si,hack:zn.hack,onChangeScore:Li,onChangehide:xr,onChangeAverage:ui,onChangeFile:vn,uploadData:Cr,setUploadData:Nn,handleUploadRatio:mn,ischecked:pr,pointData:qn,sourceData:gi,getPointData:Fr}),rightChild:Wt.createElement(_e,{value:(jr=Mn==null?void 0:Mn.find(pn=>pn.language===en))==null?void 0:jr.code,onChange:Zr,onLanguage:pi,languageItems:Mn,language:en})}),Wt.createElement("div",{className:Bt.footer},!!Rr&&Wt.createElement("div",{className:Bt.result},Wt.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Jn!=null&&Jn.review_privilege?Wt.createElement(Wt.Fragment,null,Wt.createElement("div",{onClick:lt,className:Bt.pass},"\u901A\u8FC7"),Wt.createElement("div",{onClick:Jt,className:Bt.noPass},"\u4E0D\u901A\u8FC7")):Wt.createElement(Wt.Fragment,null,(Jn==null?void 0:Jn.status)===0&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Jn==null?void 0:Jn.status)===1&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Jn==null?void 0:Jn.status)===2&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Jn==null?void 0:Jn.status)===3&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Jn==null?void 0:Jn.status)===4&&Wt.createElement("div",{className:Bt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Jn==null?void 0:Jn.status)===5&&Wt.createElement("div",{className:Bt.noPassText},Wt.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Wt.createElement("span",{onClick:In},"\u67E5\u770B\u539F\u56E0")))),Wt.createElement(Me.ZP,{type:"primary",ghost:!0,onClick:hi},"\u9000\u51FA\u7F16\u8F91"),Wt.createElement(Me.ZP,{disabled:dn,loading:ei,type:"primary",onClick:()=>{ur.current=!0,on.submit()}},"\u4FDD\u5B58 "),Rr?Wt.createElement(Me.ZP,{disabled:ei,loading:dn,style:{background:"#2FC25B",border:0},type:"primary",onClick:()=>{ur.current=!1,on.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Wt.createElement(Me.ZP,{disabled:ei,loading:dn,type:"primary",onClick:()=>{ur.current=!1,on.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Wt.createElement(ze.default,{centered:!0,destroyOnClose:!0,footer:null,open:nr,onCancel:()=>gr(!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:Nt,bordered:!1,scroll:Nt.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:(pn,Un)=>Wt.createElement("span",{onClick:()=>qt(Un==null?void 0:Un.identifier),style:{textDecorationLine:"underline"},className:"current c-light-primary"},pn)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:pn=>{var Un;return(Un=$t()(pn))==null?void 0:Un.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Mi({ischecked:ar,formValue:Sr,hack:jr,onChangeAverage:to,onChangeScore:Rr,onChangehide:on,onChangeFile:rn,onAddTestCase:Yt,onRemoveTestCase:nr,uploadData:gr,setUploadData:Cr,handleUploadRatio:Nn,pointData:qn,sourceData:Ir,getPointData:gi}){var bi,Nt;const{test_set_average:Ht,test_set_score:Mn}=jr,[jn,en]=(0,gt.useState)(!1),[Fn,Dn]=(0,gt.useState)(!1),Ln=(cr,pr)=>{const an=[...gr];an.splice(pr,1),Ht?Nn(an):Cr(an)},er=(cr,pr)=>{console.log(cr,pr);const an=gr.map((Vr,ei)=>ei===pr?Ur(Hr({},Vr),{score:cr.target.value?Number(cr.target.value):0}):Vr);Cr(an)},zn=cr=>{const pr=gr.concat(cr);jr.test_set_average?Nn(pr):Cr(pr)};function Zn(cr){cr.stopPropagation()}function rr(){if((0,tn.Ny)()){Dn("practice");return}let cr="";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:pr=>{cr=pr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ri(this,null,function*(){const pr=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:cr}});(pr==null?void 0:pr.status)===0&&gi()})})}function Kr(){if((0,tn.Ny)()){Dn("practice_source");return}let cr="";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:pr=>{cr=pr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ri(this,null,function*(){const pr=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:cr}});(pr==null?void 0:pr.status)===0&&gi()})})}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,((Nt=(bi=Sr==null?void 0:Sr.hack)==null?void 0:bi.name)==null?void 0:Nt.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(xe.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(xe.default,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:cr=>cr.parentNode},Ir.map(cr=>Wt.createElement(xe.default.Option,{key:cr.id,value:cr.id},cr.name)))),Wt.createElement(Me.ZP,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:()=>Kr()},(0,tn.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(xe.default,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:cr=>cr.parentNode},qn.map(cr=>Wt.createElement(xe.default.Option,{key:cr.id,value:cr.id},cr.name)))),Wt.createElement(Me.ZP,{type:"primary",ghost:!0,onClick:()=>rr()},(0,tn.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",!jr.is_file&&Wt.createElement(Me.ZP,{style:{height:40},type:"primary",ghost:!0,onClick:Yt},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Wt.createElement(fe.default.Item,{name:["hack","test_set_score"]},Wt.createElement(z.ZP.Group,{onChange:Rr},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:on},"\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:rn},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"))),!jr.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:to},Wt.createElement(z.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Wt.createElement(z.ZP,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),jr.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(Kt.Y2,{disabled:jr==null?void 0:jr.test_set_average,inputChange:er,showScore:!jr.test_set_score,data:gr,onRemove:Ln})),!jr.is_file&&Wt.createElement(fe.default.List,{name:"hack_sets"},(cr,{})=>Wt.createElement(De.default,{accordion:!0},cr.map((pr,an)=>Wt.createElement(Fi,{key:`${pr.key}--${an}`,header:Wt.createElement("a",{className:Bt["test-case-name"]},Wt.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",an+1),Mn?null:Wt.createElement(Wt.Fragment,null,Wt.createElement(fe.default.Item,{name:[pr.name,"score"],fieldKey:[pr.fieldKey,"score"],rules:[{required:!0,message:`\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6${an+1}\u8BC4\u5206`}]},Wt.createElement(de.Z,{onClick:Zn,min:0,max:100,disabled:Ht})),Wt.createElement("span",null,"%"))),extra:an>0?Wt.createElement("div",{onClick:Zn},Wt.createElement(ie.Z,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(an+1),onConfirm:()=>{nr(an)}},Wt.createElement(We.Z,{className:Bt["btn-remove-case"]}))):null},Wt.createElement(fe.default.Item,{label:"\u8F93\u5165",name:[pr.name,"input"],fieldKey:[pr.fieldKey,"input"]},Wt.createElement(Pi,null)),Wt.createElement(fe.default.Item,{label:"\u8F93\u51FA",name:[pr.name,"output"],fieldKey:[pr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Wt.createElement(Pi,null)))))))),Wt.createElement(Kt.ZP,{rootIdentifier:null,visible:jn,onClose:()=>en(!1),onOK:zn}),Wt.createElement(At,{visible:Fn,onCancel:()=>{Dn(!1),gi()},onOK:()=>{Dn(!1),gi()}}))}},3532:function(gn,cn,at){"use strict";at.d(cn,{Y2:function(){return st},ZP:function(){return ft}});var gt=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==",xe=at(47257),de=at.n(xe),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=(bt,$e,nt)=>$e in bt?ge(bt,$e,{enumerable:!0,configurable:!0,writable:!0,value:nt}):bt[$e]=nt,Re=(bt,$e)=>{for(var nt in $e||($e={}))Fe.call($e,nt)&&Ae(bt,nt,$e[nt]);if(Be)for(var nt of Be($e))Ne.call($e,nt)&&Ae(bt,nt,$e[nt]);return bt},We=(bt,$e)=>Pe(bt,je($e)),Ye=(bt,$e,nt)=>new Promise((xt,wt)=>{var Pt=ht=>{try{ct(nt.next(ht))}catch(Et){wt(Et)}},dt=ht=>{try{ct(nt.throw(ht))}catch(Et){wt(Et)}},ct=ht=>ht.done?xt(ht.value):Promise.resolve(ht.value).then(Pt,dt);ct((nt=nt.apply(bt,$e)).next())});const{Dragger:Ue}=Bt.default,Ke=bt=>{const $e=Et=>Et&&Et.substring(0,Et.lastIndexOf("."));for(var nt=[...bt],xt=0,wt=[],Pt=0;Pt<nt.length;Pt++){for(var dt="",ct=0;ct<wt.length;ct++)if($e(wt[ct][0].name)==$e(nt[Pt].name)){xt=1,dt=ct;break}if(xt==1)wt[dt].push(nt[Pt]),xt=0;else if(xt==0){let Et=new Array;Et.push(nt[Pt]),wt.push(Et)}}return wt.map(Et=>{if(Et.forEach(vt=>{let Ft=vt.name.split(/\.(?=[^\.]+$)/);vt.name=`${Ft[0]}.${Ft[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:bt,onOK:$e,visible:nt,wrapClassName:xt,rootIdentifier:wt,multiple:Pt=!1,defaultMultipleValue:dt=!0})=>{const[ct,ht]=(0,gt.useState)([]),[Et,vt]=(0,gt.useState)({}),[Ft,mt]=(0,gt.useState)(!1),[St,tt]=(0,gt.useState)(!0),Ve=(0,gt.useRef)([]),we=(0,gt.useRef)(0),Le=()=>{bt()};(0,gt.useEffect)(()=>{Ze()},[]),(0,gt.useEffect)(()=>{nt&&(Ve.current=[],we.current=0,ht([]),tt(dt))},[nt]);const Ze=()=>Ye(void 0,null,function*(){try{const Mt=yield(0,ee.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),At=JSON.parse((0,z.pe)(Mt.data));vt(At)}catch(Mt){}}),rt=Mt=>Mt&&Mt.substring(0,Mt.lastIndexOf(".")),Ie=Mt=>{var At,Dt;const Kt=rt((At=Mt[0])==null?void 0:At.name)||rt((Dt=Mt[1])==null?void 0:Dt.name),Xt=ct.filter($t=>rt($t.name)!==Kt);Ve.current=[...Xt],ht([...Xt])},_e=Mt=>{if(!St){const Ut=new FormData;Ut.append("file",Mt.file),(0,ee.ZP)("/api/attachments/get_file_content.json",{method:"post",body:Ut},!0).then(tn=>{if(tn.status===0){we.current=we.current+1;const Wt=Ve.current.map(Pn=>{var Sn;if(Pn.name===Mt.name){const Tn=Re({},Pn);return(Sn=Mt==null?void 0:Mt.name)!=null&&Sn.includes(".in")?Tn.input=tn==null?void 0:tn.content:Tn.output=tn==null?void 0:tn.content,Tn}return Pn});if(Ve.current=[...Wt],ht([...Wt]),we.current>0&&we.current===ct.length){mt(!1);let Pn=Ke(Wt);Pn=Pn.filter(Sn=>{var Tn,Kn;return!!((Tn=Sn[0])!=null&&Tn.name&&((Kn=Sn[1])!=null&&Kn.name))}),Pn=Pn.map(Sn=>We(Re(Re({},Sn[0]),Sn[1]),{is_file:!1})),$e(Pn),bt()}}else mt(!1),bt()});return}const At=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,Kt={container_type:"TestSet",file_name:Dt},Xt=(0,ae.Z)();let $t=`testsets/${wt}/${Xt}${Dt.indexOf(".")>-1?"."+Dt.split(".").pop():""}`;wt===null&&($t=`testsets/${Xt}${Dt.indexOf(".")>-1?"."+Dt.split(".").pop():""}`),At.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)(Kt)}}).then(function(Ut){if(Ut.data.status===0){we.current=we.current+1;const sn=Ve.current.map(tn=>{var Wt,Pn,Sn,Tn,Kn,Mr,fr,Er,Hr,Ur,ri,Pi,Ui,Fi,zi,Xi,et;if(tn.name===((Pn=(Wt=Ut.data)==null?void 0:Wt.data)==null?void 0:Pn.file_name)){const dr=Re({},tn);return(Kn=(Tn=(Sn=Ut.data)==null?void 0:Sn.data)==null?void 0:Tn.file_name)!=null&&Kn.includes(".in")?(dr.in_object_key=(fr=(Mr=Ut.data)==null?void 0:Mr.data)==null?void 0:fr.object,dr.in_object_size=(Hr=(Er=Ut.data)==null?void 0:Er.data)==null?void 0:Hr.size,dr.input=(ri=(Ur=Ut.data)==null?void 0:Ur.data)==null?void 0:ri.file_name,dr.in_file=Mt):(dr.out_object_key=(Ui=(Pi=Ut.data)==null?void 0:Pi.data)==null?void 0:Ui.object,dr.out_object_size=(zi=(Fi=Ut.data)==null?void 0:Fi.data)==null?void 0:zi.size,dr.output=(et=(Xi=Ut.data)==null?void 0:Xi.data)==null?void 0:et.file_name,dr.out_file=Mt),dr}return tn});if(Ve.current=[...sn],ht([...sn]),we.current>0&&we.current===ct.length){mt(!1);let tn=Ke(sn);tn=tn.filter(Wt=>{var Pn,Sn;return!!((Pn=Wt[0])!=null&&Pn.name&&((Sn=Wt[1])!=null&&Sn.name))}),tn=tn.map(Wt=>We(Re(Re({},Wt[0]),Wt[1]),{is_file:!0})),$e(tn),bt()}}})},He=Mt=>new Promise((At,Dt)=>{let Kt=0,Xt=[];for(let $t=0;$t<Mt.length;$t++)Mt[$t].file.slice(0,1).arrayBuffer().then(()=>{Kt++,Kt===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()):At(Mt))}).catch(Ut=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Ut),Kt++,Xt.push(Mt[$t].name),Kt===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()):At(Mt))})}),Qe=()=>Ye(void 0,null,function*(){if(ct.length===0){oe.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield He(ct),mt(!0),Ke(ct).some(At=>{var Dt,Kt;return!((Dt=At[0])!=null&&Dt.name&&((Kt=At[1])!=null&&Kt.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*(){ct.map(At=>Ye(void 0,null,function*(){_e(At)}))}),onCancel:()=>{mt(!1)}});return}ct.map(At=>Ye(void 0,null,function*(){_e(At)}))}),ut={name:"file",fileList:ct,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:Mt=>{if(ct!=null&&ct.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 At={name:Mt.name,uid:Mt.uid,file:Mt,percent:0};return ct.push(At),Ve.current=[...ct],ht([...ct]),!1}},pt=Ke(ct);return console.log(ct,pt,"fileList"),ue.createElement(ze.default,{open:nt,wrapClassName:xt,onOk:Qe,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Ft},onCancel:Le,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:Me.wrap},ct.length?ue.createElement("div",null,ue.createElement(De.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:Pt?"visible":"hidden"}},ue.createElement("span",{className:Me.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(fe.ZP.Group,{className:`ml20 ${Me.testCaseRadio}`,optionType:"button",value:St,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,Re({},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:pt,onRemove:Ie})):ue.createElement("div",{className:`${Me.noData} mb30`},ue.createElement(Bt.default.Dragger,We(Re({},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:bt=[],onRemove:$e,width:nt="auto",showScore:xt=!1,disabled:wt=!1,inputChange:Pt,onEvaluatingChange:dt,onSelectAll:ct,checkAll1:ht,checkAll2:Et,checkAll3:vt,checkAll4:Ft,checkAll5:mt,showEvaluatingSetting:St=!1,className:tt="",isProgramHomework:Ve=!1})=>{const we={value:"",filename:"",dataUrl:""},[Le,Ze]=(0,gt.useState)(Re({},we)),rt=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)},Ie=(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 bt.length?ue.createElement("div",{className:tt,style:{width:nt}},ue.createElement("div",{className:`${Ve?Me.headProgram:Me.head}`},St&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:ht,onChange:He=>{ct(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:xt?Ve?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:xt?Ve?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),xt&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),St&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:Ft,onChange:He=>{ct(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"}))),St&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:Et,onChange:He=>{ct(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"}))),St&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:mt,onChange:He=>{ct(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"}))),St&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:vt,onChange:He=>{ct(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"}},bt.map((He,Qe)=>{var ut,pt,Mt,At;return ue.createElement("div",{key:Qe,className:Me.list,style:Ve?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},St&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(ke.default,{checked:!!He.hidden,onChange:Dt=>{dt(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:xt?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 Kt;typeof Dt=="string"?(Kt=yield fetch(Dt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Ze({value:yield Kt.text(),filename:"",dataUrl:Dt})):(Kt=yield(0,ie.db)(Dt.file),Ze({value:Kt.text,filename:Dt.name,dataUrl:Kt.link}))})},He.input||((pt=He[0])==null?void 0:pt.name))),ue.createElement("div",{className:Me.info,style:{width:xt?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 Kt;typeof Dt=="string"?(Kt=yield fetch(Dt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Ze({value:yield Kt.text(),filename:"",dataUrl:Dt})):(Kt=yield(0,ie.db)(Dt.file),Ze({value:Kt.text,filename:Dt.name,dataUrl:Kt.link}))})},He.output||((At=He[1])==null?void 0:At.name))),xt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Se.default,{size:"large",addonAfter:Ve?"%":null,disabled:wt,style:{width:"80%"},onChange:Dt=>Pt(Dt,Qe),value:He.score}),!Ve&&ue.createElement("span",null,"\xA0%")),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.input_visible||!1,onChange:Dt=>{dt(Dt.target.checked,Qe,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.is_invisible||!1,onChange:Dt=>{dt(Dt.target.checked,Qe,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.actual_output_visible||!1,onChange:Dt=>{dt(Dt.target.checked,Qe,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),St&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.last_match_rule||!1,onChange:Dt=>{dt(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(Re({},we)),monacoEditor:{value:Le.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var ft=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 gt=at(32834),Bt=at.n(gt),oe=at(11690),ze=at.n(oe);let De=1;function fe(Ne,Ae){const Re=Ne.match(/^(\s+)(?:```)/);if(Re===null)return Ae;const We=Re[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 xe(Ne,Ae,Re,We){if(Ae>=Ne.length||Ne[Ae].level<=Re)return Ae;var Ye=Ne[Ae];We.push("<li><a href='#"+De+Ye.anchor+"'>"+Ye.text+"</a>"),Ae++;var Ue=[];return Ae=xe(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=xe(Ne,Ae,Re,We),Ae}function de(){return xe(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 Re=Ae[0];let We=fe(Re,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:Re,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,Re)=>{const We=ie();return le[We]={type:"inline",expression:Re},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,Re){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}">${Re?Ne:(0,oe.escape)(Ne,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Re?Ne:(0,oe.escape)(Ne,!0))+"</code></pre>"},Ce.heading=function(Ne,Ae,Re){let We=this.options.headerPrefix+Re.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 gt=at(7062),Bt=at.n(gt);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 gt})(function(){var at,gt,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 xe=new Error("Cannot find module '"+Se+"'");throw xe.code="MODULE_NOT_FOUND",xe}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 xe(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function de(z){return z?xe(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,Re,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,Re=le.length;Ae<Re;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,xe(je)||(je=[je]),je.forEach(function(Ne){var Ae={};Object.keys(Ne).forEach(function(Re){Ae[Re.slice(0,1).toLowerCase()+Re.slice(1,Re.length)]=Ne[Re]}),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&&(xe(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"),xe=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,Re=oe("../common/utils/setSTSToken"),We=Re.setSTSToken,Ye=oe("../common/utils/retry"),Ue=Ye.retry,Ke=oe("../common/utils/isFunction"),ot=Ke.isFunction,st=new xe;function ft(){var Pt=z.name,dt=z.version;Pt&&Pt.toLowerCase&&Pt.toLowerCase()==="ie"&&dt.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function bt(){return location&&location.protocol==="https:"}function $e(Pt,dt){if(ft(),!(this instanceof $e))return new $e(Pt,dt);Pt&&Pt.inited?this.options=Pt:this.options=$e.initOptions(Pt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ae,this.agent=this.options.agent||st),this.ctx=dt,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}ze.exports=$e,$e.initOptions=function(dt){dt.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var ct=Object.assign({secure:bt(),useFetch:!1},dt);return ge(ct)};var nt=$e.prototype;nt.debug=Me,de(nt,oe("./object")),de(nt,oe("./bucket")),de(nt,oe("../common/bucket/getBucketWebsite")),de(nt,oe("../common/bucket/putBucketWebsite")),de(nt,oe("../common/bucket/deleteBucketWebsite")),de(nt,oe("../common/bucket/getBucketLifecycle")),de(nt,oe("../common/bucket/putBucketLifecycle")),de(nt,oe("../common/bucket/deleteBucketLifecycle")),de(nt,oe("../common/bucket/putBucketVersioning")),de(nt,oe("../common/bucket/getBucketVersioning")),de(nt,oe("../common/bucket/getBucketInventory")),de(nt,oe("../common/bucket/deleteBucketInventory")),de(nt,oe("../common/bucket/listBucketInventory")),de(nt,oe("../common/bucket/putBucketInventory")),de(nt,oe("../common/bucket/abortBucketWorm")),de(nt,oe("../common/bucket/completeBucketWorm")),de(nt,oe("../common/bucket/extendBucketWorm")),de(nt,oe("../common/bucket/getBucketWorm")),de(nt,oe("../common/bucket/initiateBucketWorm")),de(nt,oe("./managed-upload")),de(nt,oe("../common/multipart-copy")),de(nt,oe("../common/multipart")),de(nt,oe("../common/parallel")),nt.signature=function(dt){return this.debug("authorization stringToSign: %s",dt,"info"),ue.computeSignature(this.options.accessKeySecret,dt,this.options.headerEncoding)},nt._getReqUrl=Ae,nt.authorization=function(dt,ct,ht,Et){var vt=ue.buildCanonicalString(dt.toUpperCase(),ct,{headers:Et,parameters:ht});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,vt,this.options.headerEncoding)},nt.request=function(){var Pt=(0,Se.default)(Ce.default.mark(function dt(ct){var ht=this;return Ce.default.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(!this.options.retryMax){vt.next=6;break}return vt.next=3,Ue(xt.bind(this),this.options.retryMax,{errorHandler:function(mt){var St=function(Ve){if(ct.stream)return!1;var we=[-1,-2].includes(Ve.status),Le=ht.options.requestErrorRetryHandle||function(){return!0};return we&&Le(Ve)};return!!St(mt)}})(ct);case 3:return vt.abrupt("return",vt.sent);case 6:return vt.abrupt("return",xt.call(this,ct));case 7:case"end":return vt.stop()}},dt,this)}));return function(dt){return Pt.apply(this,arguments)}}();function xt(Pt){return wt.apply(this,arguments)}function wt(){return wt=(0,Se.default)(Ce.default.mark(function Pt(dt){var ct,ht,Et,vt,Ft,mt;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 ct=je.call(this,dt),this.options.useFetch||(ct.params.mode="disable-fetch"),vt=!!dt.stream,tt.prev=6,tt.next=9,this.urllib.request(ct.url,ct.params);case 9:ht=tt.sent,this.debug("response %s %s, got %s, headers: %j",dt.method,ct.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&&dt.successStatuses&&dt.successStatuses.indexOf(ht.status)===-1)){tt.next=28;break}return tt.next=19,this.requestError(ht);case 19:if(Ft=tt.sent,!(Ft.code==="RequestTimeTooSkewed"&&!vt)){tt.next=25;break}return this.options.amendTimeSkewed=+new Date(Ft.serverTime)-new Date,tt.next=24,this.request(dt);case 24:return tt.abrupt("return",tt.sent);case 25:Ft.params=dt,tt.next=32;break;case 28:if(!Et){tt.next=32;break}return tt.next=31,this.requestError(Et);case 31:Ft=tt.sent;case 32:if(!Ft){tt.next=34;break}throw Ft;case 34:if(!dt.xmlResponse){tt.next=39;break}return tt.next=37,this.parseXML(ht.data);case 37:mt=tt.sent,ht.data=mt;case 39:return tt.abrupt("return",ht);case 40:case"end":return tt.stop()}},Pt,this,[[6,13]])})),wt.apply(this,arguments)}nt._getResource=function(dt){var ct="/";return dt.bucket&&(ct+="".concat(dt.bucket,"/")),dt.object&&(ct+=Fe(dt.object,this.options.headerEncoding)),ct},nt._escape=function(dt){return ee.encodeURIComponent(dt).replace(/%2F/g,"/")},nt._getUserAgent=function(){var dt=me&&me.browser?"js":"nodejs",ct="aliyun-sdk-".concat(dt,"/").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(ct," ").concat(ht))},nt._checkUserAgent=function(dt){var ct=dt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return ct},nt.checkBrowserAndVersion=function(dt,ct){return le.name===dt&&le.version.split(".")[0]===ct},nt.parseXML=function(dt){return new Promise(function(ct,ht){fe.isBuffer(dt)&&(dt=dt.toString()),ve.parseString(dt,{explicitRoot:!1,explicitArray:!1},function(Et,vt){Et?ht(Et):ct(vt)})})},nt.requestError=function(){var Pt=(0,Se.default)(Ce.default.mark(function ct(ht){var Et,vt,Ft,mt;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 vt=String(ht.data),this.debug("request response error data: %s",vt,"error"),tt.prev=7,tt.next=10,this.parseXML(vt);case 10:if(tt.t0=tt.sent,tt.t0){tt.next=13;break}tt.t0={};case 13:Ft=tt.t0,tt.next=23;break;case 16:return tt.prev=16,tt.t1=tt.catch(7),this.debug(vt,"error"),tt.t1.message+=`
raw xml: `.concat(vt),tt.t1.status=ht.status,tt.t1.requestId=ht.headers["x-oss-request-id"],tt.abrupt("return",tt.t1);case 23:mt=Ft.Message||"unknow request error, status: ".concat(ht.status),Ft.Condition&&(mt+=" (condition: ".concat(Ft.Condition,")")),Et=new Error(mt),Et.name=Ft.Code?"".concat(Ft.Code,"Error"):"UnknownError",Et.status=ht.status,Et.code=Ft.Code,Et.requestId=Ft.RequestId,Et.hostId=Ft.HostId,Et.serverTime=Ft.ServerTime;case 32:return this.debug("generate error %j",Et,"error"),tt.abrupt("return",Et);case 34:case"end":return tt.stop()}},ct,this,[[7,16]])}));function dt(ct){return Pt.apply(this,arguments)}return dt}()}).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"),xe=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(Re,We){var Ye,Ue,Ke,ot,st,ft,bt,$e,nt,xt=arguments;return ke.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(Ye=xt.length>2&&xt[2]!==void 0?xt[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){Pt.next=8;break}return We&&ae(We)&&(Ye.checkpoint.file=We),Pt.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return Pt.abrupt("return",Pt.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),Pt.next=14,this._getFileSize(We);case 14:if(Ke=Pt.sent,!(Ke<Ue)){Pt.next=26;break}return Ye.contentLength=Ke,Pt.next=19,this.put(Re,We,Ye);case 19:if(ot=Pt.sent,!(Ye&&Ye.progress)){Pt.next=23;break}return Pt.next=23,Ye.progress(1);case 23:return st={res:ot.res,bucket:this.options.bucket,name:Re,etag:ot.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(st.data=ot.data),Pt.abrupt("return",st);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){Pt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<Ue)){Pt.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ue));case 30:return Pt.next=32,this.initMultipartUpload(Re,Ye);case 32:if(ft=Pt.sent,bt=ft.uploadId,$e=this._getPartSize(Ke,Ye.partSize),nt={file:We,name:Re,fileSize:Ke,partSize:$e,uploadId:bt,doneParts:[]},!(Ye&&Ye.progress)){Pt.next=39;break}return Pt.next=39,Ye.progress(0,nt,ft.res);case 39:return Pt.next=41,this._resumeMultipart(nt,Ye);case 41:return Pt.abrupt("return",Pt.sent);case 42:case"end":return Pt.stop()}},Ae,this)}));function Ne(Ae,Re){return Fe.apply(this,arguments)}return Ne}(),ue._resumeMultipart=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re,We){var Ye,Ue,Ke,ot,st,ft,bt,$e,nt,xt,wt,Pt,dt,ct,ht,Et,vt,Ft,mt;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=Re.file,Ke=Re.fileSize,ot=Re.partSize,st=Re.uploadId,ft=Re.doneParts,bt=Re.name,$e=[],ft.length>0&&xe(ft).to($e),nt=this._divideParts(Ke,ot),xt=nt.length,wt=!1,Pt=function(we,Le){return new Promise(function(){var Ze=(0,Ce.default)(ke.default.mark(function rt(Ie,_e){var He,Qe,ut,pt,Mt;return ke.default.wrap(function(Dt){for(;;)switch(Dt.prev=Dt.next){case 0:if(Dt.prev=0,we.isCancel()){Dt.next=29;break}return He=nt[Le-1],Dt.next=5,we._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,we._uploadPart(bt,st,Le,ut,We);case 10:pt=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 we._makeAbortEvent();case 17:throw Dt.t0;case 18:if(!(!we.isCancel()&&!wt)){Dt.next=26;break}if(Re.doneParts.push({number:Le,etag:pt.res.headers.etag}),!We.progress){Dt.next=23;break}return Dt.next=23,We.progress(ft.length/(xt+1),Re,pt.res);case 23:Ie({number:Le,etag:pt.res.headers.etag}),Dt.next=27;break;case 26:Ie();case 27:Dt.next=30;break;case 29:Ie();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,xe(Dt.t1).to(Mt),_e(Mt);case 41:case"end":return Dt.stop()}},rt,null,[[0,32],[7,13]])}));return function(rt,Ie){return Ze.apply(this,arguments)}}())},dt=Array.from(new Array(xt),function(Ve,we){return we+1}),ct=$e.map(function(Ve){return Ve.number}),ht=dt.filter(function(Ve){return ct.indexOf(Ve)<0}),Et=5,vt=We.parallel||Et,tt.next=17,this._parallel(ht,vt,function(Ve){return new Promise(function(we,Le){Pt(Ye,Ve).then(function(Ze){Ze&&$e.push(Ze),we()}).catch(function(Ze){Le(Ze)})})});case 17:if(Ft=tt.sent,wt=!0,mt=Ft.find(function(Ve){return Ve.name==="abort"}),!mt){tt.next=22;break}throw mt;case 22:if(!this.isCancel()){tt.next=25;break}throw Pt=null,this._makeCancelEvent();case 25:if(!(Ft&&Ft.length>0)){tt.next=28;break}throw Ft[0].message="Failed to upload some parts with error: ".concat(Ft[0].toString()," part_num: ").concat(Ft[0].partNum),Ft[0];case 28:return tt.next=30,this.completeMultipartUpload(bt,st,$e,We);case 30:return tt.abrupt("return",tt.sent);case 31:case"end":return tt.stop()}},Ae,this)}));function Ne(Ae,Re){return Fe.apply(this,arguments)}return Ne}(),ue._getFileSize=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re){return ke.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(Re)){Ye.next=4;break}return Ye.abrupt("return",Re.length);case 4:if(!(z(Re)||ae(Re))){Ye.next=6;break}return Ye.abrupt("return",Re.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 Re=this.start,We=Re+Ne;We=We>this.fileBuffer.length?this.fileBuffer.length:We,this.start=We,Ae=this.push(this.fileBuffer.slice(Re,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 Re=this;this.reader.onload=function(Ye){Re.fileBuffer=fe.from(new Uint8Array(Ye.target.result)),Re.file=null,Re.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 Re=new FileReader;Re.onload=function(We){Ne(We.target.result)},Re.onerror=function(We){Ae(We)},Re.readAsArrayBuffer(Fe)})}ue._createBuffer=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re,We,Ye){var Ue,Ke;return ke.default.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:if(!(z(Re)||ae(Re))){st.next=8;break}return Ue=Re.slice(We,Ye),st.next=4,Be(Ue);case 4:return Ke=st.sent,st.abrupt("return",fe.from(Ke));case 8:if(!le(Re)){st.next=12;break}return st.abrupt("return",Re.subarray(We,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return st.stop()}},Ae)}));function Ne(Ae,Re,We){return Fe.apply(this,arguments)}return Ne}(),ue._getPartSize=function(Ne,Ae){var Re=1e4,We=1*1024*1024;Ae||(Ae=We);var Ye=Math.ceil(Ne/Re);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 Re=Math.ceil(Ne/Ae),We=[],Ye=0;Ye<Re;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"),xe=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,Re,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,Re,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,Re){return Be.apply(this,arguments)}return Fe}(),je.put=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye,Ue,Ke,ot,st;return me.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(We=We||{},We.disabledMD5=We.disabledMD5===void 0?!0:!!We.disabledMD5,We.headers=We.headers||{},Ae=this._objectName(Ae),!ue(Re)){bt.next=8;break}Ye=Re,bt.next=19;break;case 8:if(!(ee(Re)||ie(Re))){bt.next=18;break}return We.mime||(ie(Re)?We.mime=ve.getType(Me.extname(Re.name)):We.mime=Re.type),bt.next=12,this._createBuffer(Re,0,Re.size);case 12:return Ye=bt.sent,bt.next=15,this._getFileSize(Re);case 15:We.contentLength=bt.sent,bt.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),xe.encodeCallback(Ke,We),Ke.mime=We.mime,Ke.disabledMD5=We.disabledMD5,Ke.content=Ye,Ke.successStatuses=[200],bt.next=29,this.request(Ke);case 29:return ot=bt.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())),bt.abrupt("return",st);case 33:case"end":return bt.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),je.putStream=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye,Ue,Ke,ot;return me.default.wrap(function(ft){for(;;)switch(ft.prev=ft.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),xe.encodeCallback(Ue,We),Ue.mime=We.mime,Ue.stream=Re,Ue.successStatuses=[200],ft.next=13,this.request(Ue);case 13:return Ke=ft.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())),ft.abrupt("return",ot);case 17:case"end":return ft.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){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,Re,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:Re||{},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,Re){return Be.apply(this,arguments)}return Fe}(),je.list=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re){var We,Ye,Ue,Ke,ot;return me.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return We=this._objectRequestParams("GET","",Re),We.query=Ae,We.xmlResponse=!0,We.successStatuses=[200],ft.next=6,this.request(We);case 6:return Ye=ft.sent,Ue=Ye.data.Contents||[],Ke=this,Ue&&(Array.isArray(Ue)||(Ue=[Ue]),Ue=Ue.map(function(bt){return{name:bt.Key,url:Ke._objectUrl(bt.Key),lastModified:bt.LastModified,etag:bt.ETag,type:bt.Type,size:Number(bt.Size),storageClass:bt.StorageClass,owner:{id:bt.Owner.ID,displayName:bt.Owner.DisplayName}}})),ot=Ye.data.CommonPrefixes||null,ot&&(Array.isArray(ot)||(ot=[ot]),ot=ot.map(function(bt){return bt.Prefix})),ft.abrupt("return",{res:Ye.res,objects:Ue,prefixes:ot,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return ft.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 Re,We,Ye,Ue,Ke,ot,st,ft=arguments;return me.default.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return Re=ft.length>1&&ft[1]!==void 0?ft[1]:{},We=Ae["continuation-token"]||Ae.continuationToken,We&&(Re.subres=Object.assign({"continuation-token":We},Re.subres)),Ye=this._objectRequestParams("GET","",Re),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(nt){var xt=null;return nt.Owner&&(xt={id:nt.Owner.ID,displayName:nt.Owner.DisplayName}),{name:nt.Key,url:ot._objectUrl(nt.Key),lastModified:nt.LastModified,etag:nt.ETag,type:nt.Type,size:Number(nt.Size),storageClass:nt.StorageClass,owner:xt}})),st=Ue.data.CommonPrefixes||null,st&&(Array.isArray(st)||(st=[st]),st=st.map(function(nt){return nt.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 Re,We,Ye,Ue,Ke=arguments;return me.default.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return Re=Ke.length>1&&Ke[1]!==void 0?Ke[1]:{type:"Archive"},Re=Re||{},Re.subres=Object.assign({restore:""},Re.subres),Re.versionId&&(Re.subres.versionId=Re.versionId),We=this._objectRequestParams("POST",Ae,Re),Re.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Re.Days?Re.Days:2,JobParameters:{Tier:Re.JobParameters?Re.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 Re={object:Ne,bucket:this.options.bucket,method:Fe,subres:Ae&&Ae.subres,timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx};return Ae.headers&&(Re.headers={},Se(Ae.headers).to(Re.headers)),Re},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(Re){Re?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,xe){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(xe,de){var z,ee;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return Ce.checkBucketName(xe),z=this._bucketRequestParams("DELETE",xe,"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,xe,de){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(xe,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(xe),ee=this._bucketRequestParams("POST",xe,{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,xe){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(xe,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(xe),ae=this._bucketRequestParams("DELETE",xe,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 xe(de,z){return ve.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(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 xe(de,z){return ve.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(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(xe,de,z,ee){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function xe(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()}},xe,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(xe,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function xe(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()}},xe,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,xe=oe("../utils/formatObjKey"),de=xe.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 xe(de,z){return ve.apply(this,arguments)}return xe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(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,xe=De;xe.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(xe,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function xe(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()}},xe,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(xe,de,z){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function xe(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()}},xe,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(xe){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function xe(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()}},xe,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(xe,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function xe(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()}},xe,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,xe=oe("../utils/deepCopy"),de=xe.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 Re=(0,ke.default)(me.default.mark(function Ye(Ue,Ke,ot){var st,ft,bt,$e,nt;return me.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(Se(Ue),ve(Ke)){wt.next=3;break}throw new Error("rules must be Array");case 3:return st=this._bucketRequestParams("PUT",Ue,"lifecycle",ot),ft=[],bt={LifecycleConfiguration:{Rule:ft}},Ke.forEach(function(Pt){Be(Pt),Ae(Pt),Pt.id&&(Pt.ID=Pt.id,delete Pt.id),ft.push(Pt)}),$e=ie(bt,{headers:!0,firstUpperCase:!0}),st.content=$e,st.mime="xml",st.successStatuses=[200],wt.next=13,this.request(st);case 13:return nt=wt.sent,wt.abrupt("return",{res:nt.res});case 15:case"end":return wt.stop()}},Ye,this)}));function We(Ye,Ue,Ke){return Re.apply(this,arguments)}return We}();function Be(Re){Re.days&&(Re.expiration={days:Re.days}),Re.date&&(Re.expiration={createdBeforeDate:Re.date})}function Fe(Re,We){var Ye=Re.days,Ue=Re.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(Re){if(!ve(Re)&&!ee(Re))throw new Error("tag must be Object or Array");Re=ee(Re)?[Re]:Re;var We={},Ye=de(Re);Ye.forEach(function(Ue){We[Ue.key]=Ue.value}),ue(We)}function Ae(Re){if(Re.id&&Pe(Re.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Re.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Re.status))throw new Error("Status must be Enabled or Disabled");if(Re.transition){if(!["IA","Archive"].includes(Re.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(Re.transition,"Transition")}if(Re.expiration){if(!Re.expiration.expiredObjectDeleteMarker)Fe(Re.expiration,"Expiration");else if(Re.expiration.days||Re.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Re.abortMultipartUpload&&Fe(Re.abortMultipartUpload,"AbortMultipartUpload"),!Re.expiration&&!Re.abortMultipartUpload&&!Re.transition&&!Re.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Re.tag){if(Re.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Ne(Re.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,xe=De;xe.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,xe=oe("../utils/isArray"),de=xe.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(xe){ve["x:".concat(xe)]=Ce.callback.customValue[xe].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 xe(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=xe},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(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"),xe=ve.checkConfigValid;function de(z,ee){xe(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"),xe=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(Re){for(;;)switch(Re.prev=Re.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(xe(Pe)):"",ue=xe(ue),Fe={"x-oss-process":"".concat(ge,"|sys/saveas,o_").concat(ue).concat(Be)},je.content=Me.stringify(Fe),Re.next=12,this.request(je);case 12:return Ne=Re.sent,Re.abrupt("return",{res:Ne.res,status:Ne.res.status});case 14:case"end":return Re.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 xe(de,z,ee,ae,ie){return ve.apply(this,arguments)}return xe}(),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,Re,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),Re={name:z,copySize:Be,partSize:Ae,uploadId:Ne,doneParts:[]},!(ae&&ae.progress)){Ue.next=29;break}return Ue.next=29,ae.progress(0,Re,Fe.res);case 29:return Ue.next=31,this._resumeMultipartCopy(Re,ee,ae);case 31:return Ue.abrupt("return",Ue.sent);case 32:case"end":return Ue.stop()}},de,this)}));function xe(de,z){return ve.apply(this,arguments)}return xe}(),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,Re,We,Ye,Ue,Ke,ot,st,ft,bt,$e,nt;return me.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(!this.isCancel()){wt.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,Re={headers:{}},ae.copyheaders&&Se(ae.copyheaders).to(Re.headers),le&&Se(ue).to(Re),We=function(dt,ct,ht){return new Promise(function(){var Et=(0,ke.default)(me.default.mark(function vt(Ft,mt){var St,tt,Ve;return me.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(Le.prev=0,dt.isCancel()){Le.next=22;break}return St=Ne[ct-1],tt="".concat(St.start,"-").concat(St.end-1),Le.prev=4,Le.next=7,dt.uploadPartCopy(Fe,je,ct,tt,ht,Re);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 dt._makeAbortEvent();case 14:throw Le.t0;case 15:if(dt.isCancel()){Le.next=22;break}if(Ce("content-range ".concat(Ve.res.headers["content-range"])),Be.push({number:ct,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:Ft(),Le.next=29;break;case 25:Le.prev=25,Le.t1=Le.catch(0),Le.t1.partNum=ct,mt(Le.t1);case 29:case"end":return Le.stop()}},vt,null,[[0,25],[4,10]])}));return function(vt,Ft){return Et.apply(this,arguments)}}())},Ye=Array.from(new Array(Ae),function(Pt,dt){return dt+1}),Ue=Be.map(function(Pt){return Pt.number}),Ke=Ye.filter(function(Pt){return Ue.indexOf(Pt)<0}),ot=5,st=ae.parallel||ot,!(this.checkBrowserAndVersion("Internet Explorer","10")||st===1)){wt.next=28;break}ft=0;case 18:if(!(ft<Ke.length)){wt.next=26;break}if(!this.isCancel()){wt.next=21;break}throw this._makeCancelEvent();case 21:return wt.next=23,We(this,Ke[ft],ee);case 23:ft++,wt.next=18;break;case 26:wt.next=40;break;case 28:return wt.next=30,this._parallelNode(Ke,st,We,ee);case 30:if(bt=wt.sent,$e=bt.find(function(Pt){return Pt.name==="abort"}),!$e){wt.next=34;break}throw $e;case 34:if(!this.isCancel()){wt.next=36;break}throw this._makeCancelEvent();case 36:if(!(bt&&bt.length>0)){wt.next=40;break}throw nt=bt[0],nt.message="Failed to copy some parts with error: ".concat(nt.toString()," part_num: ").concat(nt.partNum),nt;case 40:return wt.next=42,this.completeMultipartUpload(Fe,je,Be,ae);case 42:return wt.abrupt("return",wt.sent);case 43:case"end":return wt.stop()}},de,this)}));function xe(de,z,ee){return ve.apply(this,arguments)}return xe}(),Me._divideMultipartCopyParts=function(xe,de,z){for(var ee=Math.ceil(xe/de),ae=[],ie=0;ie<ee;ie++){var le=de*ie+z,ue=Math.min(le+de,xe+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 xe(de,z,ee){return ve.apply(this,arguments)}return xe}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(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"),xe=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,Re;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 Re=Ye.sent,Ye.abrupt("return",{res:Re.res,uploadId:Re.data.UploadId,bucket:Re.data.Bucket,name:Re.data.Key,partNumberMarker:Re.data.PartNumberMarker,nextPartNumberMarker:Re.data.NextPartNumberMarker,maxParts:Re.data.MaxParts,isTruncated:Re.data.IsTruncated,parts:Re.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(Re){for(;;)switch(Re.prev=Re.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],Re.next=12,this.request(Fe);case 12:return Ne=Re.sent,Re.abrupt("return",{res:Ne.res,bucket:Ne.data.Bucket,name:Ne.data.Key,uploadId:Ne.data.UploadId});case 14:case"end":return Re.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,Re){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,Re);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,Re,We,Ye,Ue,Ke,ot;return ke.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:for(Ne=Be.concat().sort(function(bt,$e){return bt.number-$e.number}).filter(function(bt,$e,nt){return!$e||bt.number!==nt[$e-1].number}),Ae=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,Re=0;Re<Ne.length;Re++)We=Ne[Re],Ae+=`<Part>
`,Ae+="<PartNumber>".concat(We.number,`</PartNumber>
`),Ae+="<ETag>".concat(We.etag,`</ETag>
`),Ae+=`</Part>
`;return Ae+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=xe(Fe,function(bt){if(z(bt))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],ft.next=17,this.request(Ue);case 17:if(Ke=ft.sent,!Fe.progress){ft.next=21;break}return ft.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())),ft.abrupt("return",ot);case 24:case"end":return ft.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,Re,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},Re=this._objectRequestParams("PUT",Pe,Ae),Re.mime=Ae.mime,We=fe&&fe.browser,We?Re.content=Fe.content:Re.stream=Fe.stream,Re.successStatuses=[200],Re.disabledMD5=Ne.disabledMD5,Ke.next=15,this.request(Re);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,Re.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"),xe=oe("../utils/isIP"),de=xe.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,Re,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),Re=ve._signatureForURL(this.options.accessKeySecret,Be,Ae,Fe),We=Ce.parse(this._getReqUrl(Ne)),We.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Re.Signature},Me(Re.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,xe=["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 xe.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(xe){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",xe,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 xe=(0,ke.default)(me.default.mark(function z(ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,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,Re=Ae.data,We=Re&&Re.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 xe.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(xe){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),xe=this._objectName(xe),z=this._objectRequestParams("DELETE",xe,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 xe=fe.parse(ve),de=this.options.bucket;xe.hostname="".concat(de,".").concat(xe.hostname),xe.host="".concat(de,".").concat(xe.host),ve=xe.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 xe=(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(Re){for(;;)switch(Re.prev=Re.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),Re.prev=11,Fe=this._objectRequestParams("GET",ee,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],Re.next=17,this.request(Fe);case 17:Be=Re.sent,ue&&le.destroy(),Re.next=28;break;case 21:if(Re.prev=21,Re.t0=Re.catch(11),!ue){Re.next=27;break}return le.destroy(),Re.next=27,this._deleteFileSafe(ae);case 27:throw Re.t0;case 28:return Re.abrupt("return",{res:Be.res,content:Be.data});case 29:case"end":return Re.stop()}},z,this,[[11,21]])}));function de(z,ee){return xe.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(xe){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),xe=this._objectName(xe),z=this._objectRequestParams("GET",xe,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"),xe=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&&(xe(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&&(xe(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(xe,de){var z,ee;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return de=de||{},xe=this._objectName(xe),de.subres=Object.assign({objectMeta:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),z=this._objectRequestParams("HEAD",xe,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,xe){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 xe(de){return ve.apply(this,arguments)}return xe}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(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(xe){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),xe=this._objectName(xe),z=this._objectRequestParams("GET",xe,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 xe(de){return ve.apply(this,arguments)}return xe}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(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(xe,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,xe=this._objectName(xe),ee=this._objectRequestParams("PUT",xe,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,xe,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,xe=De;xe.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(xe,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),xe=this._objectName(xe),ee=this._objectRequestParams("PUT",xe,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,xe,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(Re){for(;;)switch(Re.prev=Re.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)){Re.next=26;break}if(!le.isCancel()){Re.next=11;break}return Re.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)){Re.next=23;break}return Re.prev=13,Fe+=1,Re.next=17,Promise.all(ge);case 17:Re.next=22;break;case 19:Re.prev=19,Re.t0=Re.catch(13),ue.push(Re.t0);case 22:ge=[];case 23:Ne++,Re.next=8;break;case 26:return Re.abrupt("return",ue);case 27:case"end":return Re.stop()}},de,this,[[13,19]])}));function xe(de,z,ee,ae){return ve.apply(this,arguments)}return xe}(),Me._parallel=function(xe,de,z){var ee=this;return new Promise(function(ae){var ie=[];if(de<=0||!xe){ae(ie);return}function le(Re){return function(){if(Re===null)throw new Error("Callback was already called.");var We=Re;Re=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(Re){var We=-1,Ye=Re.length;return function(){return++We<Ye&&!ee.isCancel()?{value:Re[We],key:We}:null}}var ge=ue(xe),Pe=!1,je=0,Be=!1;function Fe(Re){je-=1,Re?(Pe=!0,ie.push(Re),ae(ie)):Pe&&je<=0?(Pe=!0,ae(ie)):Be||(ee.isCancel()?ae(ie):Ae())}function Ne(Re,We){z(Re).then(function(Ye){We(null,Ye)}).catch(function(Ye){We(Ye)})}function Ae(){for(Be=!0;je<de&&!Pe&&!ee.isCancel();){var Re=ge();if(Re===null||ie.length>0){Pe=!0,je<=0&&ae(ie);return}je+=1,Ne(Re.value,le(Fe))}Be=!1}Ae()})},Me.cancel=function(xe){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=[],xe&&this.abortMultipartUpload(xe.name,xe.uploadId,xe.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 xe={status:0,name:"cancel"};return xe},Me._makeAbortEvent=function(){var xe={status:0,name:"abort",message:"upload task has been abort"};return xe}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(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,xe){var de="".concat(ve),z="?";if(ke.string(xe)&&xe.trim()!=="")de+=z+xe;else if(ke.array(xe))xe.sort(),de+=z+xe.join("&");else if(xe){var ee=function(le,ue){return le[0]>ue[0]?1:le[0]<ue[0]?-1:0},ae=function(le){de+=z+le,(xe[le]||xe[le]===0)&&(de+="=".concat(xe[le])),z="&"};Object.keys(xe).sort(ee).forEach(ae)}return de},De.buildCanonicalString=function(ve,xe,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(xe,de.parameters)),ue.join(`
`)},De.computeSignature=function(ve,xe){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=me.createHmac("sha1",ve);return z.update(fe.from(xe,de)).digest("base64")},De.authorization=function(ve,xe,de,z){return"OSS ".concat(ve,":").concat(this.computeSignature(xe,de,z))},De._signatureForURL=function(ve){var xe=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=xe.subResource,le=ie===void 0?{}:ie;if(xe.process){var ue="x-oss-process";le[ue]=xe.process}if(xe.trafficLimit){var ge="x-oss-traffic-limit";le[ge]=xe.trafficLimit}if(xe.response&&Object.keys(xe.response).forEach(function(Fe){var Ne="response-".concat(Fe.toLowerCase());le[Ne]=xe.response[Fe]}),Object.keys(xe).forEach(function(Fe){var Ne=Fe.toLowerCase(),Ae=xe[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(xe,"security-token")&&(le["security-token"]=xe["security-token"]),Object.prototype.hasOwnProperty.call(xe,"callback")){var Pe={callbackUrl:encodeURI(xe.callback.url),callbackBody:xe.callback.body};if(xe.callback.host&&(Pe.callbackHost=xe.callback.host),xe.callback.contentType&&(Pe.callbackBodyType=xe.callback.contentType),le.callback=fe.from(JSON.stringify(Pe)).toString("base64"),xe.callback.customValue){var je={};Object.keys(xe.callback.customValue).forEach(function(Fe){je["x:".concat(Fe)]=xe.callback.customValue[Fe]}),le["callback-var"]=fe.from(JSON.stringify(je)).toString("base64")}}var Be=this.buildCanonicalString(xe.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(xe){if(!Ce(xe))throw new Error("tag must be Object");var de=Object.entries(xe);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"),xe=oe("./encoder"),de=xe.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 Re={"x-oss-date":Se(Ae,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Re["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Re["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Re,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Re["x-oss-security-token"]=this.options.stsToken),Me(Ne.headers).to(Re),je(Re,"Content-Type")||(Ne.mime&&Ne.mime.indexOf("/")>0?Re["Content-Type"]=Ne.mime:Pe()?Re["Content-Type"]="application/octet-stream":Re["Content-Type"]=Ce.getType(Ne.mime||ve.extname(Ne.object||""))),je(Re,"Content-Type")||Be(Re,"Content-Type"),Ne.content&&(Ne.disabledMD5||(!Ne.headers||!Ne.headers["Content-MD5"]?Re["Content-MD5"]=me.createHash("md5").update(fe.from(Ne.content,"utf8")).digest("base64"):Re["Content-MD5"]=Ne.headers["Content-MD5"]),Re["Content-Length"]||(Re["Content-Length"]=Ne.content.length));var We=Object.prototype.hasOwnProperty;for(var Ye in Re)Re[Ye]&&We.call(Re,Ye)&&(Re[Ye]=de(String(Re[Ye]),this.options.headerEncoding));var Ue=this._getResource(Ne);if(Re.authorization=this.authorization(Ne.method,Ue,Ne.subres,Re,this.options.headerEncoding),ee(this.options.endpoint.hostname)){var Ke=this.options,ot=Ke.region,st=Ke.internal,ft=Ke.secure,bt=ie(ot,st,ft);Re.host="".concat(Ne.bucket,".").concat(bt.host)}var $e=ue.bind(this)(Ne);ke("request %s %s, with headers %j, !!stream: %s",Ne.method,$e,Re,!!Ne.stream);var nt=Ne.timeout||this.options.timeout,xt={method:Ne.method,content:Ne.content,stream:Ne.stream,headers:Re,timeout:nt,writeStream:Ne.writeStream,customResponse:Ne.customResponse,ctx:Ne.ctx||this.ctx};return this.agent&&(xt.agent=this.agent),this.httpsAgent&&(xt.httpsAgent=this.httpsAgent),xt.enableProxy=!!this.options.enableProxy,xt.proxy=this.options.proxy?this.options.proxy:null,{url:$e,params:xt}}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,xe,de){if(fe.isObject(ve)){var z=xe.remove,ee=z===void 0?[]:z,ae=xe.rename,ie=ae===void 0?{}:ae,le=xe.camel,ue=le===void 0?[]:le,ge=xe.bool,Pe=ge===void 0?[]:ge,je=xe.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,Re){return Re.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,xe){xe&&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,xe,de){var z=Se(ve,xe,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 xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xe&&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(xe){var de,z;xe.prefix=xe.Filter.Prefix,delete xe.Filter,xe.OSSBucketDestination=xe.Destination.OSSBucketDestination,xe.OSSBucketDestination.rolename=xe.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete xe.OSSBucketDestination.RoleArn,xe.OSSBucketDestination.bucket=xe.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete xe.OSSBucketDestination.Bucket,delete xe.Destination,xe.frequency=xe.Schedule.Frequency,delete xe.Schedule.Frequency,!((de=xe==null?void 0:xe.OptionalFields)===null||de===void 0)&&de.Field&&!ke.isArray((z=xe.OptionalFields)===null||z===void 0?void 0:z.Field)&&(xe.OptionalFields.Field=[xe.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 xe;if(Array.isArray(Se)){xe=[];for(var de=0;de<Se.length;de++)xe.push(ke(Se[de],Me,ve))}else xe={},Object.keys(Se).forEach(function(z){xe[Ce(z,Me,ve)]=ke(Se[z],Me,ve)});return xe}De.formatObjKey=ke;function Ce(Se,Me,ve){return ve&&ve.exclude&&ve.exclude.includes(Se)||(Me==="firstUpperCase"?Se=Se.replace(/^./,function(xe){return xe.toUpperCase()}):Me==="firstLowerCase"&&(Se=Se.replace(/^./,function(xe){return xe.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(xe){return"<".concat(ve,">").concat(ke(xe),"</").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 xe=0,de=function(){};return{s:de,n:function(){return xe>=Se.length?{done:!0}:{done:!1,value:Se[xe++]}},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,xe=new Array(Me);ve<Me;ve++)xe[ve]=Se[ve];return xe}Object.defineProperty(De,"__esModule",{value:!0}),De.omit=void 0;function Ce(Se,Me){var ve=Object.assign({},Se),xe=fe(Me),de;try{for(xe.s();!(de=xe.n()).done;){var z=de.value;delete ve[z]}}catch(ee){xe.e(ee)}finally{xe.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,xe=Ce.errorHandler,de=xe===void 0?function(){return!0}:xe,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 xe=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(xe+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 xe(){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()}},xe,this)})),Me.apply(this,arguments)}De.setSTSToken=Se;function ve(xe){var de=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(xe);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,xe,de){try{var z=ke[xe](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 xe=ke.apply(Ce,Se);function de(ee){fe(xe,Me,ve,de,z,"next",ee)}function z(ee){fe(xe,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 ft=ot.length,bt=st.length,$e=0,nt=Math.min(ft,bt);$e<nt;++$e)if(ot[$e]!==st[$e]){ft=ot[$e],bt=st[$e];break}return ft<bt?-1:bt<ft?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,xe=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(xe)return ot.name;var st=ot.toString(),ft=st.match(ae);return ft&&ft[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 ft=st.stackStartFunction||Pe;if(Error.captureStackTrace)Error.captureStackTrace(this,ft);else{var bt=new Error;if(bt.stack){var $e=bt.stack,nt=ie(ft),xt=$e.indexOf(`
`+nt);if(xt>=0){var wt=$e.indexOf(`
`,xt+1);$e=$e.substring(wt+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(xe||!Se.isFunction(ot))return Se.inspect(ot);var st=ie(ot),ft=st?": "+st:"";return"[Function"+ft+"]"}function ge(ot){return le(ue(ot.actual),128)+" "+ot.operator+" "+le(ue(ot.expected),128)}function Pe(ot,st,ft,bt,$e){throw new ee.AssertionError({message:ft,actual:ot,expected:st,operator:bt,stackStartFunction:$e})}ee.fail=Pe;function je(ot,st){ot||Pe(ot,!0,st,"==",ee.ok)}ee.ok=je,ee.equal=function(st,ft,bt){st!=ft&&Pe(st,ft,bt,"==",ee.equal)},ee.notEqual=function(st,ft,bt){st==ft&&Pe(st,ft,bt,"!=",ee.notEqual)},ee.deepEqual=function(st,ft,bt){Be(st,ft,!1)||Pe(st,ft,bt,"deepEqual",ee.deepEqual)},ee.deepStrictEqual=function(st,ft,bt){Be(st,ft,!0)||Pe(st,ft,bt,"deepStrictEqual",ee.deepStrictEqual)};function Be(ot,st,ft,bt){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 ft?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;bt=bt||{actual:[],expected:[]};var $e=bt.actual.indexOf(ot);return $e!==-1&&$e===bt.expected.indexOf(st)?!0:(bt.actual.push(ot),bt.expected.push(st),Ne(ot,st,ft,bt))}function Fe(ot){return Object.prototype.toString.call(ot)=="[object Arguments]"}function Ne(ot,st,ft,bt){if(ot==null||st===null||st===void 0)return!1;if(Se.isPrimitive(ot)||Se.isPrimitive(st))return ot===st;if(ft&&Object.getPrototypeOf(ot)!==Object.getPrototypeOf(st))return!1;var $e=Fe(ot),nt=Fe(st);if($e&&!nt||!$e&&nt)return!1;if($e)return ot=ve.call(ot),st=ve.call(st),Be(ot,st,ft);var xt=Ke(ot),wt=Ke(st),Pt,dt;if(xt.length!==wt.length)return!1;for(xt.sort(),wt.sort(),dt=xt.length-1;dt>=0;dt--)if(xt[dt]!==wt[dt])return!1;for(dt=xt.length-1;dt>=0;dt--)if(Pt=xt[dt],!Be(ot[Pt],st[Pt],ft,bt))return!1;return!0}ee.notDeepEqual=function(st,ft,bt){Be(st,ft,!1)&&Pe(st,ft,bt,"notDeepEqual",ee.notDeepEqual)},ee.notDeepStrictEqual=Ae;function Ae(ot,st,ft){Be(ot,st,!0)&&Pe(ot,st,ft,"notDeepStrictEqual",Ae)}ee.strictEqual=function(st,ft,bt){st!==ft&&Pe(st,ft,bt,"===",ee.strictEqual)},ee.notStrictEqual=function(st,ft,bt){st===ft&&Pe(st,ft,bt,"!==",ee.notStrictEqual)};function Re(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(ft){}return Error.isPrototypeOf(st)?!1:st.call({},ot)===!0}function We(ot){var st;try{ot()}catch(ft){st=ft}return st}function Ye(ot,st,ft,bt){var $e;if(typeof st!="function")throw new TypeError('"block" argument must be a function');typeof ft=="string"&&(bt=ft,ft=null),$e=We(st),bt=(ft&&ft.name?" ("+ft.name+").":".")+(bt?" "+bt:"."),ot&&!$e&&Pe($e,ft,"Missing expected exception"+bt);var nt=typeof bt=="string",xt=!ot&&Se.isError($e),wt=!ot&&$e&&!ft;if((xt&&nt&&Re($e,ft)||wt)&&Pe($e,ft,"Got unwanted exception"+bt),ot&&$e&&ft&&!Re($e,ft)||!ot&&$e)throw $e}ee.throws=function(ot,st,ft){Ye(!0,ot,st,ft)},ee.doesNotThrow=function(ot,st,ft){Ye(!1,ot,st,ft)},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 ft in ot)Me.call(ot,ft)&&st.push(ft);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(wt){if(!Ne(wt)){for(var Pt=[],dt=0;dt<arguments.length;dt++)Pt.push(Me(arguments[dt]));return Pt.join(" ")}for(var dt=1,ct=arguments,ht=ct.length,Et=String(wt).replace(ke,function(Ft){if(Ft==="%%")return"%";if(dt>=ht)return Ft;switch(Ft){case"%s":return String(ct[dt++]);case"%d":return Number(ct[dt++]);case"%j":try{return JSON.stringify(ct[dt++])}catch(mt){return"[Circular]"}default:return Ft}}),vt=ct[dt];dt<ht;vt=ct[++dt])je(vt)||!Ye(vt)?Et+=" "+vt:Et+=" "+Me(vt);return Et},De.deprecate=function(wt,Pt){if(Re(me.process))return function(){return De.deprecate(wt,Pt).apply(this,arguments)};if(fe.noDeprecation===!0)return wt;var dt=!1;function ct(){if(!dt){if(fe.throwDeprecation)throw new Error(Pt);fe.traceDeprecation?console.trace(Pt):console.error(Pt),dt=!0}return wt.apply(this,arguments)}return ct};var Ce={},Se;De.debuglog=function(wt){if(Re(Se)&&(Se=fe.env.NODE_DEBUG||""),wt=wt.toUpperCase(),!Ce[wt])if(new RegExp("\\b"+wt+"\\b","i").test(Se)){var Pt=fe.pid;Ce[wt]=function(){var dt=De.format.apply(De,arguments);console.error("%s %d: %s",wt,Pt,dt)}}else Ce[wt]=function(){};return Ce[wt]};function Me(wt,Pt){var dt={seen:[],stylize:xe};return arguments.length>=3&&(dt.depth=arguments[2]),arguments.length>=4&&(dt.colors=arguments[3]),Pe(Pt)?dt.showHidden=Pt:Pt&&De._extend(dt,Pt),Re(dt.showHidden)&&(dt.showHidden=!1),Re(dt.depth)&&(dt.depth=2),Re(dt.colors)&&(dt.colors=!1),Re(dt.customInspect)&&(dt.customInspect=!0),dt.colors&&(dt.stylize=ve),z(dt,wt,dt.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(wt,Pt){var dt=Me.styles[Pt];return dt?"\x1B["+Me.colors[dt][0]+"m"+wt+"\x1B["+Me.colors[dt][1]+"m":wt}function xe(wt,Pt){return wt}function de(wt){var Pt={};return wt.forEach(function(dt,ct){Pt[dt]=!0}),Pt}function z(wt,Pt,dt){if(wt.customInspect&&Pt&&ot(Pt.inspect)&&Pt.inspect!==De.inspect&&!(Pt.constructor&&Pt.constructor.prototype===Pt)){var ct=Pt.inspect(dt,wt);return Ne(ct)||(ct=z(wt,ct,dt)),ct}var ht=ee(wt,Pt);if(ht)return ht;var Et=Object.keys(Pt),vt=de(Et);if(wt.showHidden&&(Et=Object.getOwnPropertyNames(Pt)),Ke(Pt)&&(Et.indexOf("message")>=0||Et.indexOf("description")>=0))return ae(Pt);if(Et.length===0){if(ot(Pt)){var Ft=Pt.name?": "+Pt.name:"";return wt.stylize("[Function"+Ft+"]","special")}if(We(Pt))return wt.stylize(RegExp.prototype.toString.call(Pt),"regexp");if(Ue(Pt))return wt.stylize(Date.prototype.toString.call(Pt),"date");if(Ke(Pt))return ae(Pt)}var mt="",St=!1,tt=["{","}"];if(ge(Pt)&&(St=!0,tt=["[","]"]),ot(Pt)){var Ve=Pt.name?": "+Pt.name:"";mt=" [Function"+Ve+"]"}if(We(Pt)&&(mt=" "+RegExp.prototype.toString.call(Pt)),Ue(Pt)&&(mt=" "+Date.prototype.toUTCString.call(Pt)),Ke(Pt)&&(mt=" "+ae(Pt)),Et.length===0&&(!St||Pt.length==0))return tt[0]+mt+tt[1];if(dt<0)return We(Pt)?wt.stylize(RegExp.prototype.toString.call(Pt),"regexp"):wt.stylize("[Object]","special");wt.seen.push(Pt);var we;return St?we=ie(wt,Pt,dt,vt,Et):we=Et.map(function(Le){return le(wt,Pt,dt,vt,Le,St)}),wt.seen.pop(),ue(we,mt,tt)}function ee(wt,Pt){if(Re(Pt))return wt.stylize("undefined","undefined");if(Ne(Pt)){var dt="'"+JSON.stringify(Pt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return wt.stylize(dt,"string")}if(Fe(Pt))return wt.stylize(""+Pt,"number");if(Pe(Pt))return wt.stylize(""+Pt,"boolean");if(je(Pt))return wt.stylize("null","null")}function ae(wt){return"["+Error.prototype.toString.call(wt)+"]"}function ie(wt,Pt,dt,ct,ht){for(var Et=[],vt=0,Ft=Pt.length;vt<Ft;++vt)xt(Pt,String(vt))?Et.push(le(wt,Pt,dt,ct,String(vt),!0)):Et.push("");return ht.forEach(function(mt){mt.match(/^\d+$/)||Et.push(le(wt,Pt,dt,ct,mt,!0))}),Et}function le(wt,Pt,dt,ct,ht,Et){var vt,Ft,mt;if(mt=Object.getOwnPropertyDescriptor(Pt,ht)||{value:Pt[ht]},mt.get?mt.set?Ft=wt.stylize("[Getter/Setter]","special"):Ft=wt.stylize("[Getter]","special"):mt.set&&(Ft=wt.stylize("[Setter]","special")),xt(ct,ht)||(vt="["+ht+"]"),Ft||(wt.seen.indexOf(mt.value)<0?(je(dt)?Ft=z(wt,mt.value,null):Ft=z(wt,mt.value,dt-1),Ft.indexOf(`
`)>-1&&(Et?Ft=Ft.split(`
`).map(function(St){return" "+St}).join(`
`).substr(2):Ft=`
`+Ft.split(`
`).map(function(St){return" "+St}).join(`
`))):Ft=wt.stylize("[Circular]","special")),Re(vt)){if(Et&&ht.match(/^\d+$/))return Ft;vt=JSON.stringify(""+ht),vt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(vt=vt.substr(1,vt.length-2),vt=wt.stylize(vt,"name")):(vt=vt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),vt=wt.stylize(vt,"string"))}return vt+": "+Ft}function ue(wt,Pt,dt){var ct=0,ht=wt.reduce(function(Et,vt){return ct++,vt.indexOf(`
`)>=0&&ct++,Et+vt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ht>60?dt[0]+(Pt===""?"":Pt+`
`)+" "+wt.join(`,
`)+" "+dt[1]:dt[0]+Pt+" "+wt.join(", ")+" "+dt[1]}function ge(wt){return Array.isArray(wt)}De.isArray=ge;function Pe(wt){return typeof wt=="boolean"}De.isBoolean=Pe;function je(wt){return wt===null}De.isNull=je;function Be(wt){return wt==null}De.isNullOrUndefined=Be;function Fe(wt){return typeof wt=="number"}De.isNumber=Fe;function Ne(wt){return typeof wt=="string"}De.isString=Ne;function Ae(wt){return typeof wt=="symbol"}De.isSymbol=Ae;function Re(wt){return wt===void 0}De.isUndefined=Re;function We(wt){return Ye(wt)&&ft(wt)==="[object RegExp]"}De.isRegExp=We;function Ye(wt){return typeof wt=="object"&&wt!==null}De.isObject=Ye;function Ue(wt){return Ye(wt)&&ft(wt)==="[object Date]"}De.isDate=Ue;function Ke(wt){return Ye(wt)&&(ft(wt)==="[object Error]"||wt instanceof Error)}De.isError=Ke;function ot(wt){return typeof wt=="function"}De.isFunction=ot;function st(wt){return wt===null||typeof wt=="boolean"||typeof wt=="number"||typeof wt=="string"||typeof wt=="symbol"||typeof wt=="undefined"}De.isPrimitive=st,De.isBuffer=oe("./support/isBuffer");function ft(wt){return Object.prototype.toString.call(wt)}function bt(wt){return wt<10?"0"+wt.toString(10):wt.toString(10)}var $e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function nt(){var wt=new Date,Pt=[bt(wt.getHours()),bt(wt.getMinutes()),bt(wt.getSeconds())].join(":");return[wt.getDate(),$e[wt.getMonth()],Pt].join(" ")}De.log=function(){console.log("%s - %s",nt(),De.format.apply(De,arguments))},De.inherits=oe("inherits"),De._extend=function(wt,Pt){if(!Pt||!Ye(Pt))return wt;for(var dt=Object.keys(Pt),ct=dt.length;ct--;)wt[dt[ct]]=Pt[dt[ct]];return wt};function xt(wt,Pt){return Object.prototype.hasOwnProperty.call(wt,Pt)}}).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=xe,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 xe(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(Pt){var dt=de.match(Pt);return dt&&dt.length>1&&dt[1]||""}function ee(Pt){var dt=de.match(Pt);return dt&&dt.length>1&&dt[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),Re=/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),ft=!st&&/[^-]mobi/i.test(de),bt=/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"):bt?($e.xbox=fe,$e.osname="Xbox"):We?($e.windows=fe,$e.osname="Windows"):Ue&&($e.linux=fe,$e.osname="Linux");function nt(Pt){switch(Pt){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 xt="";$e.windows?xt=nt(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):$e.windowsphone?xt=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):$e.mac?(xt=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),xt=xt.replace(/[_\s]/g,".")):ae?(xt=z(/os (\d+([_\s]\d+)*) like mac os x/i),xt=xt.replace(/[_\s]/g,".")):le?xt=z(/android[ \/-](\d+(\.\d+)*)/i):$e.webos?xt=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):$e.blackberry?xt=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):$e.bada?xt=z(/bada\/(\d+(\.\d+)*)/i):$e.tizen&&(xt=z(/tizen[\/\s](\d+(\.\d+)*)/i)),xt&&($e.osversion=xt);var wt=!$e.windows&&xt.split(".")[0];return st||ge||ae=="ipad"||le&&(wt==3||wt>=4&&!ft)||$e.silk?$e.tablet=fe:(ft||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 xe(de,z,ee){return!ve(de,z,ee)}return ke.isUnsupportedBrowser=ve,ke.compareVersions=Me,ke.check=xe,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 xe(_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 xe(_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(rt(_e,ArrayBuffer)||_e&&rt(_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 pt=ue(_e);if(pt)return pt;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 xe(_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),pt=ut.write(_e,He);return pt!==Qe&&(ut=ut.slice(0,pt)),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"||Ie(_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(rt(He,Uint8Array)&&(He=ve.from(He,He.offset,He.byteLength)),rt(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,pt=Qe.length,Mt=0,At=Math.min(ut,pt);Mt<At;++Mt)if(He[Mt]!==Qe[Mt]){ut=He[Mt],pt=Qe[Mt];break}return ut<pt?-1:pt<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 pt=ve.allocUnsafe(Qe),Mt=0;for(ut=0;ut<He.length;++ut){var At=He[ut];if(rt(At,Uint8Array)&&(At=ve.from(At)),!ve.isBuffer(At))throw new TypeError('"list" argument must be an Array of Buffers');At.copy(pt,Mt),Mt+=At.length}return pt};function je(_e,He){if(ve.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||rt(_e,ArrayBuffer))return _e.byteLength;if(typeof _e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _e);var Qe=_e.length,ut=arguments.length>2&&arguments[2]===!0;if(!ut&&Qe===0)return 0;for(var pt=!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(pt)return ut?-1:tt(_e).length;He=(""+He).toLowerCase(),pt=!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 wt(this,He,Qe);case"utf8":case"utf-8":return ft(this,He,Qe);case"ascii":return nt(this,He,Qe);case"latin1":case"binary":return xt(this,He,Qe);case"base64":return st(this,He,Qe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pt(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?ft(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,pt,Mt){if(rt(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),pt===void 0&&(pt=0),Mt===void 0&&(Mt=this.length),Qe<0||ut>He.length||pt<0||Mt>this.length)throw new RangeError("out of range index");if(pt>=Mt&&Qe>=ut)return 0;if(pt>=Mt)return-1;if(Qe>=ut)return 1;if(Qe>>>=0,ut>>>=0,pt>>>=0,Mt>>>=0,this===He)return 0;for(var At=Mt-pt,Dt=ut-Qe,Kt=Math.min(At,Dt),Xt=this.slice(pt,Mt),$t=He.slice(Qe,ut),Ut=0;Ut<Kt;++Ut)if(Xt[Ut]!==$t[Ut]){At=Xt[Ut],Dt=$t[Ut];break}return At<Dt?-1:Dt<At?1:0};function Ne(_e,He,Qe,ut,pt){if(_e.length===0)return-1;if(typeof Qe=="string"?(ut=Qe,Qe=0):Qe>2147483647?Qe=2147483647:Qe<-2147483648&&(Qe=-2147483648),Qe=+Qe,Ie(Qe)&&(Qe=pt?0:_e.length-1),Qe<0&&(Qe=_e.length+Qe),Qe>=_e.length){if(pt)return-1;Qe=_e.length-1}else if(Qe<0)if(pt)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,pt);if(typeof He=="number")return He=He&255,typeof Uint8Array.prototype.indexOf=="function"?pt?Uint8Array.prototype.indexOf.call(_e,He,Qe):Uint8Array.prototype.lastIndexOf.call(_e,He,Qe):Ae(_e,[He],Qe,ut,pt);throw new TypeError("val must be string, number or Buffer")}function Ae(_e,He,Qe,ut,pt){var Mt=1,At=_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,At/=2,Dt/=2,Qe/=2}function Kt(tn,Wt){return Mt===1?tn[Wt]:tn.readUInt16BE(Wt*Mt)}var Xt;if(pt){var $t=-1;for(Xt=Qe;Xt<At;Xt++)if(Kt(_e,Xt)===Kt(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>At&&(Qe=At-Dt),Xt=Qe;Xt>=0;Xt--){for(var Ut=!0,sn=0;sn<Dt;sn++)if(Kt(_e,Xt+sn)!==Kt(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 Re(_e,He,Qe,ut){Qe=Number(Qe)||0;var pt=_e.length-Qe;ut?(ut=Number(ut),ut>pt&&(ut=pt)):ut=pt;var Mt=He.length;ut>Mt/2&&(ut=Mt/2);for(var At=0;At<ut;++At){var Dt=parseInt(He.substr(At*2,2),16);if(Ie(Dt))return At;_e[Qe+At]=Dt}return At}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(we(He,_e.length-Qe),_e,Qe,ut)}ve.prototype.write=function(He,Qe,ut,pt){if(Qe===void 0)pt="utf8",ut=this.length,Qe=0;else if(ut===void 0&&typeof Qe=="string")pt=Qe,ut=this.length,Qe=0;else if(isFinite(Qe))Qe=Qe>>>0,isFinite(ut)?(ut=ut>>>0,pt===void 0&&(pt="utf8")):(pt=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");pt||(pt="utf8");for(var At=!1;;)switch(pt){case"hex":return Re(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(At)throw new TypeError("Unknown encoding: "+pt);pt=(""+pt).toLowerCase(),At=!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 ft(_e,He,Qe){Qe=Math.min(_e.length,Qe);for(var ut=[],pt=He;pt<Qe;){var Mt=_e[pt],At=null,Dt=Mt>239?4:Mt>223?3:Mt>191?2:1;if(pt+Dt<=Qe){var Kt,Xt,$t,Ut;switch(Dt){case 1:Mt<128&&(At=Mt);break;case 2:Kt=_e[pt+1],(Kt&192)===128&&(Ut=(Mt&31)<<6|Kt&63,Ut>127&&(At=Ut));break;case 3:Kt=_e[pt+1],Xt=_e[pt+2],(Kt&192)===128&&(Xt&192)===128&&(Ut=(Mt&15)<<12|(Kt&63)<<6|Xt&63,Ut>2047&&(Ut<55296||Ut>57343)&&(At=Ut));break;case 4:Kt=_e[pt+1],Xt=_e[pt+2],$t=_e[pt+3],(Kt&192)===128&&(Xt&192)===128&&($t&192)===128&&(Ut=(Mt&15)<<18|(Kt&63)<<12|(Xt&63)<<6|$t&63,Ut>65535&&Ut<1114112&&(At=Ut))}}At===null?(At=65533,Dt=1):At>65535&&(At-=65536,ut.push(At>>>10&1023|55296),At=56320|At&1023),ut.push(At),pt+=Dt}return $e(ut)}var bt=4096;function $e(_e){var He=_e.length;if(He<=bt)return String.fromCharCode.apply(String,_e);for(var Qe="",ut=0;ut<He;)Qe+=String.fromCharCode.apply(String,_e.slice(ut,ut+=bt));return Qe}function nt(_e,He,Qe){var ut="";Qe=Math.min(_e.length,Qe);for(var pt=He;pt<Qe;++pt)ut+=String.fromCharCode(_e[pt]&127);return ut}function xt(_e,He,Qe){var ut="";Qe=Math.min(_e.length,Qe);for(var pt=He;pt<Qe;++pt)ut+=String.fromCharCode(_e[pt]);return ut}function wt(_e,He,Qe){var ut=_e.length;(!He||He<0)&&(He=0),(!Qe||Qe<0||Qe>ut)&&(Qe=ut);for(var pt="",Mt=He;Mt<Qe;++Mt)pt+=St(_e[Mt]);return pt}function Pt(_e,He,Qe){for(var ut=_e.slice(He,Qe),pt="",Mt=0;Mt<ut.length;Mt+=2)pt+=String.fromCharCode(ut[Mt]+ut[Mt+1]*256);return pt}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 pt=this.subarray(He,Qe);return pt.__proto__=ve.prototype,pt};function dt(_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||dt(He,Qe,this.length);for(var pt=this[He],Mt=1,At=0;++At<Qe&&(Mt*=256);)pt+=this[He+At]*Mt;return pt},ve.prototype.readUIntBE=function(He,Qe,ut){He=He>>>0,Qe=Qe>>>0,ut||dt(He,Qe,this.length);for(var pt=this[He+--Qe],Mt=1;Qe>0&&(Mt*=256);)pt+=this[He+--Qe]*Mt;return pt},ve.prototype.readUInt8=function(He,Qe){return He=He>>>0,Qe||dt(He,1,this.length),this[He]},ve.prototype.readUInt16LE=function(He,Qe){return He=He>>>0,Qe||dt(He,2,this.length),this[He]|this[He+1]<<8},ve.prototype.readUInt16BE=function(He,Qe){return He=He>>>0,Qe||dt(He,2,this.length),this[He]<<8|this[He+1]},ve.prototype.readUInt32LE=function(He,Qe){return He=He>>>0,Qe||dt(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||dt(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||dt(He,Qe,this.length);for(var pt=this[He],Mt=1,At=0;++At<Qe&&(Mt*=256);)pt+=this[He+At]*Mt;return Mt*=128,pt>=Mt&&(pt-=Math.pow(2,8*Qe)),pt},ve.prototype.readIntBE=function(He,Qe,ut){He=He>>>0,Qe=Qe>>>0,ut||dt(He,Qe,this.length);for(var pt=Qe,Mt=1,At=this[He+--pt];pt>0&&(Mt*=256);)At+=this[He+--pt]*Mt;return Mt*=128,At>=Mt&&(At-=Math.pow(2,8*Qe)),At},ve.prototype.readInt8=function(He,Qe){return He=He>>>0,Qe||dt(He,1,this.length),this[He]&128?(255-this[He]+1)*-1:this[He]},ve.prototype.readInt16LE=function(He,Qe){He=He>>>0,Qe||dt(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||dt(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||dt(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||dt(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||dt(He,4,this.length),ke.read(this,He,!0,23,4)},ve.prototype.readFloatBE=function(He,Qe){return He=He>>>0,Qe||dt(He,4,this.length),ke.read(this,He,!1,23,4)},ve.prototype.readDoubleLE=function(He,Qe){return He=He>>>0,Qe||dt(He,8,this.length),ke.read(this,He,!0,52,8)},ve.prototype.readDoubleBE=function(He,Qe){return He=He>>>0,Qe||dt(He,8,this.length),ke.read(this,He,!1,52,8)};function ct(_e,He,Qe,ut,pt,Mt){if(!ve.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(He>pt||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,pt){if(He=+He,Qe=Qe>>>0,ut=ut>>>0,!pt){var Mt=Math.pow(2,8*ut)-1;ct(this,He,Qe,ut,Mt,0)}var At=1,Dt=0;for(this[Qe]=He&255;++Dt<ut&&(At*=256);)this[Qe+Dt]=He/At&255;return Qe+ut},ve.prototype.writeUIntBE=function(He,Qe,ut,pt){if(He=+He,Qe=Qe>>>0,ut=ut>>>0,!pt){var Mt=Math.pow(2,8*ut)-1;ct(this,He,Qe,ut,Mt,0)}var At=ut-1,Dt=1;for(this[Qe+At]=He&255;--At>=0&&(Dt*=256);)this[Qe+At]=He/Dt&255;return Qe+ut},ve.prototype.writeUInt8=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ct(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||ct(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||ct(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||ct(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||ct(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,pt){if(He=+He,Qe=Qe>>>0,!pt){var Mt=Math.pow(2,8*ut-1);ct(this,He,Qe,ut,Mt-1,-Mt)}var At=0,Dt=1,Kt=0;for(this[Qe]=He&255;++At<ut&&(Dt*=256);)He<0&&Kt===0&&this[Qe+At-1]!==0&&(Kt=1),this[Qe+At]=(He/Dt>>0)-Kt&255;return Qe+ut},ve.prototype.writeIntBE=function(He,Qe,ut,pt){if(He=+He,Qe=Qe>>>0,!pt){var Mt=Math.pow(2,8*ut-1);ct(this,He,Qe,ut,Mt-1,-Mt)}var At=ut-1,Dt=1,Kt=0;for(this[Qe+At]=He&255;--At>=0&&(Dt*=256);)He<0&&Kt===0&&this[Qe+At+1]!==0&&(Kt=1),this[Qe+At]=(He/Dt>>0)-Kt&255;return Qe+ut},ve.prototype.writeInt8=function(He,Qe,ut){return He=+He,Qe=Qe>>>0,ut||ct(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||ct(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||ct(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||ct(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||ct(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,pt,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,pt){return He=+He,Qe=Qe>>>0,pt||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 vt(_e,He,Qe,ut,pt){return He=+He,Qe=Qe>>>0,pt||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 vt(this,He,Qe,!0,ut)},ve.prototype.writeDoubleBE=function(He,Qe,ut){return vt(this,He,Qe,!1,ut)},ve.prototype.copy=function(He,Qe,ut,pt){if(!ve.isBuffer(He))throw new TypeError("argument should be a Buffer");if(ut||(ut=0),!pt&&pt!==0&&(pt=this.length),Qe>=He.length&&(Qe=He.length),Qe||(Qe=0),pt>0&&pt<ut&&(pt=ut),pt===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(pt<0)throw new RangeError("sourceEnd out of bounds");pt>this.length&&(pt=this.length),He.length-Qe<pt-ut&&(pt=He.length-Qe+ut);var Mt=pt-ut;if(this===He&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(Qe,ut,pt);else if(this===He&&ut<Qe&&Qe<pt)for(var At=Mt-1;At>=0;--At)He[At+Qe]=this[At+ut];else Uint8Array.prototype.set.call(He,this.subarray(ut,pt),Qe);return Mt},ve.prototype.fill=function(He,Qe,ut,pt){if(typeof He=="string"){if(typeof Qe=="string"?(pt=Qe,Qe=0,ut=this.length):typeof ut=="string"&&(pt=ut,ut=this.length),pt!==void 0&&typeof pt!="string")throw new TypeError("encoding must be a string");if(typeof pt=="string"&&!ve.isEncoding(pt))throw new TypeError("Unknown encoding: "+pt);if(He.length===1){var Mt=He.charCodeAt(0);(pt==="utf8"&&Mt<128||pt==="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 At;if(typeof He=="number")for(At=Qe;At<ut;++At)this[At]=He;else{var Dt=ve.isBuffer(He)?He:ve.from(He,pt),Kt=Dt.length;if(Kt===0)throw new TypeError('The value "'+He+'" is invalid for argument "value"');for(At=0;At<ut-Qe;++At)this[At+Qe]=Dt[At%Kt]}return this};var Ft=/[^+/0-9A-Za-z-_]/g;function mt(_e){if(_e=_e.split("=")[0],_e=_e.trim().replace(Ft,""),_e.length<2)return"";for(;_e.length%4!==0;)_e=_e+"=";return _e}function St(_e){return _e<16?"0"+_e.toString(16):_e.toString(16)}function tt(_e,He){He=He||1/0;for(var Qe,ut=_e.length,pt=null,Mt=[],At=0;At<ut;++At){if(Qe=_e.charCodeAt(At),Qe>55295&&Qe<57344){if(!pt){if(Qe>56319){(He-=3)>-1&&Mt.push(239,191,189);continue}else if(At+1===ut){(He-=3)>-1&&Mt.push(239,191,189);continue}pt=Qe;continue}if(Qe<56320){(He-=3)>-1&&Mt.push(239,191,189),pt=Qe;continue}Qe=(pt-55296<<10|Qe-56320)+65536}else pt&&(He-=3)>-1&&Mt.push(239,191,189);if(pt=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 we(_e,He){for(var Qe,ut,pt,Mt=[],At=0;At<_e.length&&!((He-=2)<0);++At)Qe=_e.charCodeAt(At),ut=Qe>>8,pt=Qe%256,Mt.push(pt),Mt.push(ut);return Mt}function Le(_e){return me.toByteArray(mt(_e))}function Ze(_e,He,Qe,ut){for(var pt=0;pt<ut&&!(pt+Qe>=He.length||pt>=_e.length);++pt)He[pt+Qe]=_e[pt];return pt}function rt(_e,He){return _e instanceof He||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===He.name}function Ie(_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),xe=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+xe(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 xe=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);xe&&Ce.__defineGetter__(ve,xe),de&&Ce.__defineSetter__(ve,de),!xe&&!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 xe=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);xe&&Ce.__defineGetter__(ve,xe),de&&Ce.__defineSetter__(ve,de),!xe&&!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"),xe=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),Re=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,ft,bt,$e,nt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},xt={BigInt64Array:8,BigUint64Array:8},wt=function(Ft){if(!Se(Ft))return!1;var mt=ve(Ft);return mt==="DataView"||Me(nt,mt)||Me(xt,mt)},Pt=function(vt){if(!Se(vt))return!1;var Ft=ve(vt);return Me(nt,Ft)||Me(xt,Ft)},dt=function(vt){if(Pt(vt))return vt;throw We("Target is not a typed array")},ct=function(vt){if(Ce(vt)&&(!le||ae(Ne,vt)))return vt;throw We(xe(vt)+" is not a typed array constructor")},ht=function(vt,Ft,mt,St){if(me){if(mt)for(var tt in nt){var Ve=ke[tt];if(Ve&&Me(Ve.prototype,vt))try{delete Ve.prototype[vt]}catch(we){try{Ve.prototype[vt]=Ft}catch(Le){}}}(!Ae[vt]||mt)&&z(Ae,vt,mt?Ft:ot&&je[vt]||Ft,St)}},Et=function(vt,Ft,mt){var St,tt;if(me){if(le){if(mt){for(St in nt)if(tt=ke[St],tt&&Me(tt,vt))try{delete tt[vt]}catch(Ve){}}if(!Ne[vt]||mt)try{return z(Ne,vt,mt?Ft:ot&&Ne[vt]||Ft)}catch(Ve){}else return}for(St in nt)tt=ke[St],tt&&(!tt[vt]||mt)&&z(tt,vt,Ft)}};for(ft in nt)bt=ke[ft],$e=bt&&bt.prototype,$e?de($e,Ke,bt):ot=!1;for(ft in xt)bt=ke[ft],$e=bt&&bt.prototype,$e&&de($e,Ke,bt);if((!ot||!Ce(Ne)||Ne===Function.prototype)&&(Ne=function(){throw We("Incorrect invocation")},ot))for(ft in nt)ke[ft]&&le(ke[ft],Ne);if((!ot||!Ae||Ae===Re)&&(Ae=Ne.prototype,ot))for(ft in nt)ke[ft]&&le(ke[ft].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(ft in nt)ke[ft]&&de(ke[ft],Ue,ft)}ze.exports={NATIVE_ARRAY_BUFFER_VIEWS:ot,TYPED_ARRAY_CONSTRUCTOR:Ke,TYPED_ARRAY_TAG:st&&Ue,aTypedArray:dt,aTypedArrayConstructor:ct,exportTypedArrayMethod:ht,exportTypedArrayStaticMethod:Et,isView:wt,isTypedArray:Pt,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"),xe=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,Re=Se.CONFIGURABLE,We=Ne.get,Ye=Ne.set,Ue="ArrayBuffer",Ke="DataView",ot="prototype",st="Wrong length",ft="Wrong index",bt=fe[Ue],$e=bt,nt=$e&&$e[ot],xt=fe[Ke],wt=xt&&xt[ot],Pt=Object.prototype,dt=fe.Array,ct=fe.RangeError,ht=me(je),Et=me([].reverse),vt=ie.pack,Ft=ie.unpack,mt=function(At){return[At&255]},St=function(At){return[At&255,At>>8&255]},tt=function(At){return[At&255,At>>8&255,At>>16&255,At>>24&255]},Ve=function(At){return At[3]<<24|At[2]<<16|At[1]<<8|At[0]},we=function(At){return vt(At,23,4)},Le=function(At){return vt(At,52,8)},Ze=function(At,Dt){Pe(At[ot],Dt,{get:function(){return We(this)[Dt]}})},rt=function(At,Dt,Kt,Xt){var $t=ae(Kt),Ut=We(At);if($t+Dt>Ut.byteLength)throw ct(ft);var sn=We(Ut.buffer).bytes,tn=$t+Ut.byteOffset,Wt=Be(sn,tn,tn+Dt);return Xt?Wt:Et(Wt)},Ie=function(At,Dt,Kt,Xt,$t,Ut){var sn=ae(Kt),tn=We(At);if(sn+Dt>tn.byteLength)throw ct(ft);for(var Wt=We(tn.buffer).bytes,Pn=sn+tn.byteOffset,Sn=Xt(+$t),Tn=0;Tn<Dt;Tn++)Wt[Pn+Tn]=Sn[Ut?Tn:Dt-Tn-1]};if(!Ce)$e=function(Dt){de(this,nt);var Kt=ae(Dt);Ye(this,{bytes:ht(dt(Kt),0),byteLength:Kt}),ke||(this.byteLength=Kt)},nt=$e[ot],xt=function(Dt,Kt,Xt){de(this,wt),de(Dt,nt);var $t=We(Dt).byteLength,Ut=z(Kt);if(Ut<0||Ut>$t)throw ct("Wrong offset");if(Xt=Xt===void 0?$t-Ut:ee(Xt),Ut+Xt>$t)throw ct(st);Ye(this,{buffer:Dt,byteLength:Xt,byteOffset:Ut}),ke||(this.buffer=Dt,this.byteLength=Xt,this.byteOffset=Ut)},wt=xt[ot],ke&&(Ze($e,"byteLength"),Ze(xt,"buffer"),Ze(xt,"byteLength"),Ze(xt,"byteOffset")),ve(wt,{getInt8:function(Dt){return rt(this,1,Dt)[0]<<24>>24},getUint8:function(Dt){return rt(this,1,Dt)[0]},getInt16:function(Dt){var Kt=rt(this,2,Dt,arguments.length>1?arguments[1]:void 0);return(Kt[1]<<8|Kt[0])<<16>>16},getUint16:function(Dt){var Kt=rt(this,2,Dt,arguments.length>1?arguments[1]:void 0);return Kt[1]<<8|Kt[0]},getInt32:function(Dt){return Ve(rt(this,4,Dt,arguments.length>1?arguments[1]:void 0))},getUint32:function(Dt){return Ve(rt(this,4,Dt,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Dt){return Ft(rt(this,4,Dt,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Dt){return Ft(rt(this,8,Dt,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Dt,Kt){Ie(this,1,Dt,mt,Kt)},setUint8:function(Dt,Kt){Ie(this,1,Dt,mt,Kt)},setInt16:function(Dt,Kt){Ie(this,2,Dt,St,Kt,arguments.length>2?arguments[2]:void 0)},setUint16:function(Dt,Kt){Ie(this,2,Dt,St,Kt,arguments.length>2?arguments[2]:void 0)},setInt32:function(Dt,Kt){Ie(this,4,Dt,tt,Kt,arguments.length>2?arguments[2]:void 0)},setUint32:function(Dt,Kt){Ie(this,4,Dt,tt,Kt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Dt,Kt){Ie(this,4,Dt,we,Kt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Dt,Kt){Ie(this,8,Dt,Le,Kt,arguments.length>2?arguments[2]:void 0)}});else{var _e=Ae&&bt.name!==Ue;if(!xe(function(){bt(1)})||!xe(function(){new bt(-1)})||xe(function(){return new bt,new bt(1.5),new bt(NaN),_e&&!Re})){$e=function(Dt){return de(this,nt),new bt(ae(Dt))},$e[ot]=nt;for(var He=ge(bt),Qe=0,ut;He.length>Qe;)(ut=He[Qe++])in $e||Me($e,ut,bt[ut]);nt.constructor=$e}else _e&&Re&&Me(bt,"name",Ue);ue&&le(wt)!==Pt&&ue(wt,Pt);var pt=new xt(new $e(2)),Mt=me(wt.setInt8);pt.setInt8(0,2147483648),pt.setInt8(1,2147483649),(pt.getInt8(0)||!pt.getInt8(1))&&ve(wt,{setInt8:function(Dt,Kt){Mt(this,Dt,Kt<<24>>24)},setUint8:function(Dt,Kt){Mt(this,Dt,Kt<<24>>24)}},{unsafe:!0})}Fe($e,Ue),Fe(xt,Ke),ze.exports={ArrayBuffer:$e,DataView:xt}},{"../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 xe=fe(this),de=ke(xe),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 xe?xe[z]=xe[ee]:delete xe[z],z+=le,ee+=le;return xe}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(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),xe=arguments.length,de=me(xe>1?arguments[1]:void 0,ve),z=xe>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"),xe=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,Re,We,Ye,Ue,Ke;if(Fe&&!(this==ae&&Me(Fe)))for(Ye=z(ue,Fe),Ue=Ye.next,Re=ge?new this:[];!(We=ke(Ue,Ye)).done;Ne++)Ke=Be?Se(Ye,je,[We.value,Ne],!0):We.value,de(Re,Ne,Ke);else for(Ae=xe(ue),Re=ge?new this(Ae):ae(Ae);Ae>Ne;Ne++)Ke=Be?je(ue[Ne],Ne):ue[Ne],de(Re,Ne,Ke);return Re.length=Ne,Re}},{"../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,xe){var de=fe(Me),z=ke(de),ee=me(xe,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),xe=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),Re=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=Re(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:xe(0),map:xe(1),filter:xe(2),some:xe(3),every:xe(4),find:xe(5),findIndex:xe(6),filterReject:xe(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(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,xe=!!ve&&1/[1].lastIndexOf(1,-0)<0,de=Se("lastIndexOf"),z=xe||!de;ze.exports=z?function(ae){if(xe)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(xe){return function(de,z,ee,ae){me(z);var ie=ke(de),le=Ce(ie),ue=Se(ie),ge=xe?ue-1:0,Pe=xe?-1:1;if(ee<2)for(;;){if(ge in le){ae=le[ge],ge+=Pe;break}if(ge+=Pe,xe?ge<0:ue<=ge)throw Me("Reduce of empty array with no initial value")}for(;xe?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,xe,de){for(var z=ke(ve),ee=me(xe,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 xe=Me.length,de=me(xe/2);return xe<8?Ce(Me,ve):Se(Me,ke(fe(Me,0,de),ve),ke(fe(Me,de),ve),ve)},Ce=function(Me,ve){for(var xe=Me.length,de=1,z,ee;de<xe;){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,xe,de){for(var z=ve.length,ee=xe.length,ae=0,ie=0;ae<z||ie<ee;)Me[ae+ie]=ae<z&&ie<ee?de(ve[ae],xe[ie])<=0?ve[ae++]:xe[ie++]:ae<z?ve[ae++]:xe[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(xe){var de;return me(xe)&&(de=xe.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 xe=!1;try{var de={};de[me]=function(){return{next:function(){return{done:xe=!0}}}},Me(de)}catch(z){}return xe}},{"../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,xe=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:xe?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 xe=me(Me),de=Ce.f,z=ke.f,ee=0;ee<xe.length;ee++){var ae=xe[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,xe,de,z){var ee=xe+" 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"),xe=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",Re=function(){return this};ze.exports=function(We,Ye,Ue,Ke,ot,st,ft){Me(Ue,Ye,Ke);var bt=function(vt){if(vt===ot&&Pt)return Pt;if(!je&&vt in xt)return xt[vt];switch(vt){case Fe:return function(){return new Ue(this,vt)};case Ne:return function(){return new Ue(this,vt)};case Ae:return function(){return new Ue(this,vt)}}return function(){return new Ue(this)}},$e=Ye+" Iterator",nt=!1,xt=We.prototype,wt=xt[Be]||xt["@@iterator"]||ot&&xt[ot],Pt=!je&&wt||bt(ot),dt=Ye=="Array"&&xt.entries||wt,ct,ht,Et;if(dt&&(ct=ve(dt.call(new We)),ct!==Object.prototype&&ct.next&&(!ke&&ve(ct)!==Pe&&(xe?xe(ct,Pe):Se(ct[Be])||ee(ct,Be,Re)),de(ct,$e,!0,!0),ke&&(ie[$e]=Re))),ue&&ot==Ne&&wt&&wt.name!==Ne&&(!ke&&ge?z(xt,"name",Ne):(nt=!0,Pt=function(){return me(wt,this)})),ot)if(ht={values:bt(Ne),keys:st?Pt:bt(Fe),entries:bt(Ae)},ft)for(Et in ht)(je||nt||!(Et in xt))&&ee(xt,Et,ht[Et]);else fe({target:Ye,proto:!0,forced:je||nt},ht);return(!ke||ft)&&xt[Be]!==Pt&&ee(xt,Be,Pt,{name:ot}),ie[Ye]=Pt,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,xe;Me&&(ve=Me.split("."),xe=ve[0]>0&&ve[0]<4?1:+(ve[0]+ve[1])),!xe&&me&&(ve=me.match(/Edge\/(\d+)/),(!ve||ve[1]>=74)&&(ve=me.match(/Chrome\/(\d+)/),ve&&(xe=+ve[1]))),ze.exports=xe},{"../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(xe,de){var z=xe.target,ee=xe.global,ae=xe.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],xe.noTargetGet?(je=me(le,ue),ge=je&&je.value):ge=le[ue],ie=ve(ee?ue:z+(ae?".":"#")+ue,xe.forced),!ie&&ge!==void 0){if(typeof Pe==typeof ge)continue;Me(Pe,ge)}(xe.sham||ge&&ge.sham)&&ke(Pe,"sham",!0),Ce(le,ue,Pe,xe)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(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"),xe=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 Re=fe(je),We=Be.exec;return We===ke||We===xe.exec?le&&!Ae?{done:!0,value:ge(Be,Fe,Ne)}:{done:!0,value:Re(Fe,Be,Ne)}:{done:!1}});me(String.prototype,de,Pe[0]),me(xe,ie,Pe[1])}ae&&Me(xe[ie],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(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(xe,de){var z=arguments.length<2?Me(xe):de;if(ke(z))return Ce(me(z,xe));throw ve(Se(xe)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(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,xe=/\$([$&'`]|\d{1,2})/g;ze.exports=function(de,z,ee,ae,ie,le){var ue=ee+de.length,ge=ae.length,Pe=xe;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,xe=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:xe,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,xe;return ke&&fe(ve=Se.constructor)&&ve!==Me&&me(xe=ve.prototype)&&xe!==Me.prototype&&ke(Ce,xe),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"),xe=oe("../internals/shared-key"),de=oe("../internals/hidden-keys"),z="Object already initialized",ee=me.TypeError,ae=me.WeakMap,ie,le,ue,ge=function(Re){return ue(Re)?le(Re):ie(Re,{})},Pe=function(Re){return function(We){var Ye;if(!Ce(We)||(Ye=le(We)).type!==Re)throw ee("Incompatible receiver, "+Re+" 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(Re,We){if(Fe(je,Re))throw new ee(z);return We.facade=Re,Ne(je,Re,We),We},le=function(Re){return Be(je,Re)||{}},ue=function(Re){return Fe(je,Re)}}else{var Ae=xe("state");de[Ae]=!0,ie=function(Re,We){if(Me(Re,Ae))throw new ee(z);return We.facade=Re,Se(Re,Ae,We),We},le=function(Re){return Me(Re,Ae)?Re[Ae]:{}},ue=function(Re){return Me(Re,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(){},xe=[],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,xe,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==xe?!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",xe=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 xe=me("Symbol");return ke(xe)&&Ce(xe.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"),xe=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),Re,We,Ye,Ue,Ke,ot,st,ft=function($e){return Re&&ee(Re,"normal",$e),new ie(!0,$e)},bt=function($e){return Be?(Ce($e),Ne?Ae($e[0],$e[1],ft):Ae($e[0],$e[1])):Ne?Ae($e,ft):Ae($e)};if(Fe)Re=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=bt(ue[Ye]),Ke&&xe(le,Ke))return Ke;return new ie(!1)}Re=de(ue,We)}for(ot=Re.next;!(st=ke(ot,Re)).done;){try{Ke=bt(st.value)}catch($e){ee(Re,"throw",$e)}if(typeof Ke=="object"&&Ke&&xe(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,xe;me(Ce);try{if(ve=ke(Ce,"return"),!ve){if(Se==="throw")throw Me;return Me}ve=fe(ve,Ce)}catch(de){xe=!0,ve=de}if(Se==="throw")throw Me;if(xe)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"),xe=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[xe].call(le)!==le});ie?z={}:ve&&(z=ke(z)),me(z[xe])||Se(z,xe,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"),xe=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 Re,We;for(xe&&(Re=ee.domain)&&Re.exit();ge;){We=ge.fn,ge=ge.next;try{We()}catch(Ye){throw ge?je():Pe=void 0,Ye}}Pe=void 0,Re&&Re.enter()},!Se&&!xe&&!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)}):xe?je=function(){ee.nextTick(ue)}:(Ce=me(Ce,fe),je=function(){Ce(ue)})),ze.exports=le||function(Re){var We={fn:Re,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"),xe=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=xe(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),Re=Ae.length,We=0,Ye;Re>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"),xe=">",de="<",z="prototype",ee="script",ae=ve("IE_PROTO"),ie=function(){},le=function(Be){return de+ee+xe+Be+de+"/"+ee+xe},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(xe,de){Ce(xe);for(var z=Se(de),ee=Me(de),ae=ee.length,ie=0,le;ae>ie;)ke.f(xe,le=ee[ie++],z[le]);return xe}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(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,xe=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 xe(le,ue,ge)}:xe:function(le,ue,ge){if(Se(le),ue=Me(ue),Se(ge),ke)try{return xe(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"),xe=oe("../internals/ie8-dom-define"),de=Object.getOwnPropertyDescriptor;De.f=fe?de:function(ee,ae){if(ee=Se(ee),ae=Me(ae),xe)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(xe){return Ce(Se)}};ze.exports.f=function(xe){return Se&&fe(xe)=="Window"?Me(xe):ke(me(xe))}},{"../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"),xe=fe.Object,de=xe.prototype;ze.exports=Me?xe.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 xe?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,xe){var de=ke(ve),z=0,ee=[],ae;for(ae in de)!me(Se,ae)&&me(de,ae)&&Me(ee,ae);for(;xe.length>z;)me(de,ae=xe[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(xe,de){return me(xe),ke(de),Ce?Me(xe,de):xe.__proto__=de,xe}}():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),xe=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:xe(!0),values:xe(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(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 xe,de;if(ve==="string"&&ke(xe=Me.toString)&&!Ce(de=me(xe,Me))||ke(xe=Me.valueOf)&&!Ce(de=me(xe,Me))||ve!=="string"&&ke(xe=Me.toString)&&!Ce(de=me(xe,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(xe){var de=ke.f(Se(xe)),z=Ce.f;return z?Me(de,z(xe)):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"),xe=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||xe&&!(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"),xe=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")||xe&&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(xe,de){var z=xe.exec;if(Ce(z)){var ee=me(z,xe,de);return ee!==null&&ke(ee),ee}if(Se(xe)==="RegExp")return me(Me,xe,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"),xe=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/,Re=/b*/g;return fe(ae,Ae,"a"),fe(ae,Re,"a"),Ae.lastIndex!==0||Re.lastIndex!==0}(),Be=Se.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Ne=je||Fe||Be||de||z;Ne&&(ie=function(Re){var We=this,Ye=xe(We),Ue=ke(Re),Ke=Ye.raw,ot,st,ft,bt,$e,nt,xt;if(Ke)return Ke.lastIndex=We.lastIndex,ot=fe(ie,Ke,Ue),We.lastIndex=Ke.lastIndex,ot;var wt=Ye.groups,Pt=Be&&We.sticky,dt=fe(Ce,We),ct=We.source,ht=0,Et=Ue;if(Pt&&(dt=ge(dt,"y",""),ue(dt,"g")===-1&&(dt+="g"),Et=Pe(Ue,We.lastIndex),We.lastIndex>0&&(!We.multiline||We.multiline&&le(Ue,We.lastIndex-1)!==`
`)&&(ct="(?: "+ct+")",Et=" "+Et,ht++),st=new RegExp("^(?:"+ct+")",dt)),Fe&&(st=new RegExp("^"+ct+"$(?!\\s)",dt)),je&&(ft=We.lastIndex),bt=fe(ae,Pt?st:We,Et),Pt?bt?(bt.input=Pe(bt.input,ht),bt[0]=Pe(bt[0],ht),bt.index=We.lastIndex,We.lastIndex+=bt[0].length):We.lastIndex=0:je&&bt&&(We.lastIndex=We.global?bt.index+bt[0].length:ft),Fe&&bt&&bt.length>1&&fe(ee,bt[0],st,function(){for($e=1;$e<arguments.length-2;$e++)arguments[$e]===void 0&&(bt[$e]=void 0)}),bt&&wt)for(bt.groups=nt=ve(null),$e=0;$e<wt.length;$e++)xt=wt[$e],nt[xt[0]]=bt[xt[1]];return bt}),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),xe=me.f;Ce&&ve&&!ve[Se]&&xe(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,xe;return ve===void 0||(xe=fe(ve)[Ce])==null?Me:me(xe)}},{"../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),xe=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:xe(!1),charAt:xe(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(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+"*"),xe=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,xe,"")),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,xe=ke("toPrimitive");Me&&!Me[xe]&&Ce(Me,xe,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"),xe=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",Re,We,Ye,Ue;try{Re=fe.location}catch(bt){}var Ke=function(bt){if(Se(Ne,bt)){var $e=Ne[bt];delete Ne[bt],$e()}},ot=function(bt){return function(){Ke(bt)}},st=function(bt){Ke(bt.data)},ft=function(bt){fe.postMessage(Be(bt),Re.protocol+"//"+Re.host)};(!ie||!le)&&(ie=function($e){z(arguments.length,1);var nt=Ce($e)?$e:Pe($e),xt=xe(arguments,1);return Ne[++Fe]=function(){me(nt,void 0,xt)},We(Fe),Fe},le=function($e){delete Ne[$e]},ae?We=function(bt){ue.nextTick(ot(bt))}:ge&&ge.now?We=function(bt){ge.now(ot(bt))}:je&&!ee?(Ye=new je,Ue=Ye.port2,Ye.port1.onmessage=st,We=ke(Ue.postMessage,Ue)):fe.addEventListener&&Ce(fe.postMessage)&&!fe.importScripts&&Re&&Re.protocol!=="file:"&&!Me(ft)?(We=ft,fe.addEventListener("message",st,!1)):Ae in de("script")?We=function(bt){ve.appendChild(de("script"))[Ae]=function(){ve.removeChild(this),Ke(bt)}}:We=function(bt){setTimeout(ot(bt),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"),xe=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 xe("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"),xe=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"),Re=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"),ft=oe("../internals/inherit-if-required"),bt=st.get,$e=st.set,nt=Ke.f,xt=ot.f,wt=Math.round,Pt=me.RangeError,dt=ve.ArrayBuffer,ct=dt.prototype,ht=ve.DataView,Et=Me.NATIVE_ARRAY_BUFFER_VIEWS,vt=Me.TYPED_ARRAY_CONSTRUCTOR,Ft=Me.TYPED_ARRAY_TAG,mt=Me.TypedArray,St=Me.TypedArrayPrototype,tt=Me.aTypedArrayConstructor,Ve=Me.isTypedArray,we="BYTES_PER_ELEMENT",Le="Wrong length",Ze=function(ut,pt){tt(ut);for(var Mt=0,At=pt.length,Dt=new ut(At);At>Mt;)Dt[Mt]=pt[Mt++];return Dt},rt=function(ut,pt){nt(ut,pt,{get:function(){return bt(this)[pt]}})},Ie=function(ut){var pt;return Ne(ct,ut)||(pt=Pe(ut))=="ArrayBuffer"||pt=="SharedArrayBuffer"},_e=function(ut,pt){return Ve(ut)&&!Be(pt)&&pt in ut&&ee(+pt)&&pt>=0},He=function(pt,Mt){return Mt=ue(Mt),_e(pt,Mt)?de(2,pt[Mt]):xt(pt,Mt)},Qe=function(pt,Mt,At){return Mt=ue(Mt),_e(pt,Mt)&&je(At)&&ge(At,"value")&&!ge(At,"get")&&!ge(At,"set")&&!At.configurable&&(!ge(At,"writable")||At.writable)&&(!ge(At,"enumerable")||At.enumerable)?(pt[Mt]=At.value,pt):nt(pt,Mt,At)};Ce?(Et||(ot.f=He,Ke.f=Qe,rt(St,"buffer"),rt(St,"byteOffset"),rt(St,"byteLength"),rt(St,"length")),fe({target:"Object",stat:!0,forced:!Et},{getOwnPropertyDescriptor:He,defineProperty:Qe}),ze.exports=function(ut,pt,Mt){var At=ut.match(/\d+$/)[0]/8,Dt=ut+(Mt?"Clamped":"")+"Array",Kt="get"+ut,Xt="set"+ut,$t=me[Dt],Ut=$t,sn=Ut&&Ut.prototype,tn={},Wt=function(Tn,Kn){var Mr=bt(Tn);return Mr.view[Kt](Kn*At+Mr.byteOffset,!0)},Pn=function(Tn,Kn,Mr){var fr=bt(Tn);Mt&&(Mr=(Mr=wt(Mr))<0?0:Mr>255?255:Mr&255),fr.view[Xt](Kn*At+fr.byteOffset,Mr,!0)},Sn=function(Tn,Kn){nt(Tn,Kn,{get:function(){return Wt(this,Kn)},set:function(Mr){return Pn(this,Kn,Mr)},enumerable:!0})};Et?Se&&(Ut=pt(function(Tn,Kn,Mr,fr){return xe(Tn,sn),ft(function(){return je(Kn)?Ie(Kn)?fr!==void 0?new $t(Kn,le(Mr,At),fr):Mr!==void 0?new $t(Kn,le(Mr,At)):new $t(Kn):Ve(Kn)?Ze(Ut,Kn):ke(We,Ut,Kn):new $t(ie(Kn))}(),Tn,Ut)}),Ae&&Ae(Ut,mt),Ye(Re($t),function(Tn){Tn in Ut||z(Ut,Tn,$t[Tn])}),Ut.prototype=sn):(Ut=pt(function(Tn,Kn,Mr,fr){xe(Tn,sn);var Er=0,Hr=0,Ur,ri,Pi;if(!je(Kn))Pi=ie(Kn),ri=Pi*At,Ur=new dt(ri);else if(Ie(Kn)){Ur=Kn,Hr=le(Mr,At);var Ui=Kn.byteLength;if(fr===void 0){if(Ui%At||(ri=Ui-Hr,ri<0))throw Pt(Le)}else if(ri=ae(fr)*At,ri+Hr>Ui)throw Pt(Le);Pi=ri/At}else return Ve(Kn)?Ze(Ut,Kn):ke(We,Ut,Kn);for($e(Tn,{buffer:Ur,byteOffset:Hr,byteLength:ri,length:Pi,view:new ht(Ur)});Er<Pi;)Sn(Tn,Er++)}),Ae&&Ae(Ut,mt),sn=Ut.prototype=Fe(St)),sn.constructor!==Ut&&z(sn,"constructor",Ut),z(sn,vt,Ut),Ft&&z(sn,Ft,Dt),tn[Dt]=Ut,fe({global:!0,forced:Ut!=$t,sham:!Et},tn),we in Ut||z(Ut,we,At),we in sn||z(sn,we,At),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"),xe=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,Re;if(Pe&&!xe(Pe))for(Ae=Me(ie,Pe),Re=Ae.next,ie=[];!(Ne=me(Re,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"),xe=fe.Symbol,de=xe&&xe.for,z=Me?xe:xe&&xe.withoutSetter||Ce;ze.exports=function(ee){if(!ke(ve,ee)||!(Se||typeof ve[ee]=="string")){var ae="Symbol."+ee;Se&&ke(xe,ee)?ve[ee]=xe[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"),xe=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(xe(this,de))(ve(Ne-Fe)),Re=new z(this),We=new z(Ae),Ye=0;Fe<Ne;)le(We,Ye++,ie(Re,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"),xe=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 Re=Me(this),We=de(Re,0),Ye=0,Ue,Ke,ot,st,ft;for(Ue=-1,ot=arguments.length;Ue<ot;Ue++)if(ft=Ue===-1?Re:arguments[Ue],Be(ft)){if(st=ve(ft),Ye+st>le)throw ge(ue);for(Ke=0;Ke<st;Ke++,Ye++)Ke in ft&&xe(We,Ye,ft[Ke])}else{if(Ye>=le)throw ge(ue);xe(We,Ye++,ft)}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"),xe=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&&xe&&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,xe=Se("join",",");fe({target:"Array",proto:!0,forced:ve||!xe},{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"),xe=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=xe(this),Ne=ve(Fe),Ae=Me(je,Ne),Re=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,Re);for(Ye=new(We===void 0?ue:We)(ge(Re-Ae,0)),Ue=0;Ae<Re;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"),xe=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 Re="",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),Re.charAt(Re.length-1)!==Ye&&(Re+=Ye);return Re!=="DGBEFHACIJK"}}),Ne=Pe||!je||!Be||!Fe,Ae=function(Re){return function(We,Ye){return Ye===void 0?-1:We===void 0?1:Re!==void 0?+Re(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(xe(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"),xe=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,Re,We,Ye,Ue,Ke,ot;if(Ae===0?Re=We=0:Ae===1?(Re=0,We=Fe-Ne):(Re=Ae-2,We=ie(ae(Ce(je),0),Fe-Ne)),Fe+Re-We>le)throw ee(ue);for(Ye=ve(Be,We),Ue=0;Ue<We;Ue++)Ke=Ne+Ue,Ke in Be&&xe(Ye,Ue,Be[Ke]);if(Ye.length=We,Re<We){for(Ue=Ne;Ue<Fe-We;Ue++)Ke=Ue+We,ot=Ue+Re,Ke in Be?Be[ot]=Be[Ke]:delete Be[ot];for(Ue=Fe;Ue>Fe-We+Re;Ue--)delete Be[Ue-1]}else if(Re>We)for(Ue=Fe-We;Ue>Ne;Ue--)Ke=Ue+We-1,ot=Ue+Re-1,Ke in Be?Be[ot]=Be[Ke]:delete Be[ot];for(Ue=0;Ue<Re;Ue++)Be[Ue+Ne]=arguments[Ue+2];return Be.length=Fe-We+Re,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(/]*)/,xe=ke(ve.exec),de="name";fe&&!me&&Ce(Se,de,{configurable:!0,get:function(){try{return xe(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"),xe=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))!="{}"}),Re=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(ft,bt){if(xe(st)&&(bt=Ce(st,this,ft,bt)),!z(bt))return bt}),ot[1]=Ke,ke(ie,null,ot)},Ye=function(Ue,Ke,ot){var st=ue(ot,Ke-1),ft=ue(ot,Ke+1);return le(Fe,Ue)&&!le(Ne,ft)||le(Ne,Ue)&&!le(Fe,st)?"\\u"+je(ge(Ue,0),16):Ue};ie&&fe({target:"JSON",stat:!0,forced:Ae||Re},{stringify:function(Ke,ot,st){var ft=ee(arguments),bt=ke(Ae?We:ie,null,ft);return Re&&typeof bt=="string"?Pe(bt,Be,Ye):bt}})},{"../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"),xe=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),Re=function(st){var ft=z(st,"number");return typeof ft=="bigint"?ft:We(ft)},We=function(st){var ft=z(st,"number"),bt,$e,nt,xt,wt,Pt,dt,ct;if(de(ft))throw Fe("Cannot convert a Symbol value to a number");if(typeof ft=="string"&&ft.length>2){if(ft=ge(ft),bt=Ae(ft,0),bt===43||bt===45){if($e=Ae(ft,2),$e===88||$e===120)return NaN}else if(bt===48){switch(Ae(ft,1)){case 66:case 98:nt=2,xt=49;break;case 79:case 111:nt=8,xt=55;break;default:return+ft}for(wt=Ne(ft,2),Pt=wt.length,dt=0;dt<Pt;dt++)if(ct=Ae(wt,dt),ct<48||ct>xt)return NaN;return parseInt(wt,nt)}}return+ft};if(Ce(Pe,!je(" 0o1")||!je("0b1")||je("+0x1"))){for(var Ye=function(ft){var bt=arguments.length<1?0:je(Re(ft)),$e=this;return xe(Be,$e)&&ee(function(){ue($e)})?ve(Object(bt),$e,Ye):bt},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(xe){var de=Ce.f;return de?de(Se(xe)):[]}})},{"../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"),xe=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;xe.catch!==de&&ve(xe,"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"),xe=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"),Re=oe("../internals/promise-constructor-detection"),We=oe("../internals/new-promise-capability"),Ye="Promise",Ue=Re.CONSTRUCTOR,Ke=Re.REJECTION_EVENT,ot=Re.SUBCLASSING,st=Ne.getterFor(Ye),ft=Ne.set,bt=Ae&&Ae.prototype,$e=Ae,nt=bt,xt=Ce.TypeError,wt=Ce.document,Pt=Ce.process,dt=We.f,ct=dt,ht=!!(wt&&wt.createEvent&&Ce.dispatchEvent),Et="unhandledrejection",vt="rejectionhandled",Ft=0,mt=1,St=2,tt=1,Ve=2,we,Le,Ze,rt,Ie=function(Xt){var $t;return ie(Xt)&&ae($t=Xt.then)?$t:!1},_e=function(Xt,$t){var Ut=$t.value,sn=$t.state==mt,tn=sn?Xt.ok:Xt.fail,Wt=Xt.resolve,Pn=Xt.reject,Sn=Xt.domain,Tn,Kn,Mr;try{tn?(sn||($t.rejection===Ve&&Mt($t),$t.rejection=tt),tn===!0?Tn=Ut:(Sn&&Sn.enter(),Tn=tn(Ut),Sn&&(Sn.exit(),Mr=!0)),Tn===Xt.promise?Pn(xt("Promise-chain cycle")):(Kn=Ie(Tn))?Se(Kn,Tn,Wt,Pn):Wt(Tn)):Pn(Ut)}catch(fr){Sn&&!Mr&&Sn.exit(),Pn(fr)}},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,tn;ht?(sn=wt.createEvent("Event"),sn.promise=$t,sn.reason=Ut,sn.initEvent(Xt,!1,!0),Ce.dispatchEvent(sn)):sn={promise:$t,reason:Ut},!Ke&&(tn=Ce["on"+Xt])?tn(sn):Xt===Et&&je("Unhandled promise rejection",Ut)},ut=function(Xt){Se(ge,Ce,function(){var $t=Xt.facade,Ut=Xt.value,sn=pt(Xt),tn;if(sn&&(tn=Be(function(){ke?Pt.emit("unhandledRejection",Ut,$t):Qe(Et,$t,Ut)}),Xt.rejection=ke||pt(Xt)?Ve:tt,tn.error))throw tn.value})},pt=function(Xt){return Xt.rejection!==tt&&!Xt.parent},Mt=function(Xt){Se(ge,Ce,function(){var $t=Xt.facade;ke?Pt.emit("rejectionHandled",$t):Qe(vt,$t,Xt.value)})},At=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=St,He(Xt,!0))},Kt=function(Xt,$t,Ut){if(!Xt.done){Xt.done=!0,Ut&&(Xt=Ut);try{if(Xt.facade===$t)throw xt("Promise can't be resolved itself");var sn=Ie($t);sn?Pe(function(){var tn={done:!1};try{Se(sn,$t,At(Kt,tn,Xt),At(Dt,tn,Xt))}catch(Wt){Dt(tn,Wt,Xt)}}):(Xt.value=$t,Xt.state=mt,He(Xt,!1))}catch(tn){Dt({done:!1},tn,Xt)}}};if(Ue&&($e=function($t){le(this,nt),ee($t),Se(we,this);var Ut=st(this);try{$t(At(Kt,Ut),At(Dt,Ut))}catch(sn){Dt(Ut,sn)}},nt=$e.prototype,we=function($t){ft(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:Ft,value:void 0})},we.prototype=ve(nt,{then:function($t,Ut){var sn=st(this),tn=dt(ue(this,$e));return sn.parent=!0,tn.ok=ae($t)?$t:!0,tn.fail=ae(Ut)&&Ut,tn.domain=ke?Pt.domain:void 0,sn.state==Ft?sn.reactions.add(tn):Pe(function(){_e(tn,sn)}),tn.promise}}),Le=function(){var Xt=new we,$t=st(Xt);this.promise=Xt,this.resolve=At(Kt,$t),this.reject=At(Dt,$t)},We.f=dt=function(Xt){return Xt===$e||Xt===Ze?new Le(Xt):ct(Xt)},!me&&ae(Ae)&&bt!==Object.prototype)){rt=bt.then,ot||Me(bt,"then",function($t,Ut){var sn=this;return new $e(function(tn,Wt){Se(rt,sn,tn,Wt)}).then($t,Ut)},{unsafe:!0});try{delete bt.constructor}catch(Xt){}xe&&xe(bt,nt)}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"),xe=ke&&!Se;fe({target:"Promise",stat:!0,forced:ke||Se},{resolve:function(z){return Me(xe&&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,xe=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"),Re=me.RegExp,We=Re.prototype,Ye=me.SyntaxError,Ue=ke(We.exec),Ke=ke("".charAt),ot=ke("".replace),st=ke("".indexOf),ft=ke("".slice),bt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,$e=/a/g,nt=/a/g,xt=new Re($e)!==$e,wt=ae.MISSED_STICKY,Pt=ae.UNSUPPORTED_Y,dt=fe&&(!xt||wt||Fe||Ne||ue(function(){return nt[Ae]=!1,Re($e)!=$e||Re(nt)==nt||Re($e,"i")!="/a/i"})),ct=function(mt){for(var St=mt.length,tt=0,Ve="",we=!1,Le;tt<=St;tt++){if(Le=Ke(mt,tt),Le==="\\"){Ve+=Le+Ke(mt,++tt);continue}!we&&Le==="."?Ve+="[\\s\\S]":(Le==="["?we=!0:Le==="]"&&(we=!1),Ve+=Le)}return Ve},ht=function(mt){for(var St=mt.length,tt=0,Ve="",we=[],Le={},Ze=!1,rt=!1,Ie=0,_e="",He;tt<=St;tt++){if(He=Ke(mt,tt),He==="\\")He=He+Ke(mt,++tt);else if(He==="]")Ze=!1;else if(!Ze)switch(!0){case He==="[":Ze=!0;break;case He==="(":Ue(bt,ft(mt,tt+1))&&(tt+=2,rt=!0),Ve+=He,Ie++;continue;case(He===">"&&rt):if(_e===""||ge(Le,_e))throw new Ye("Invalid capture group name");Le[_e]=!0,we[we.length]=[_e,Ie],rt=!1,_e="";continue}rt?_e+=He:Ve+=He}return[Ve,we]};if(Ce("RegExp",dt)){for(var Et=function(St,tt){var Ve=xe(We,this),we=de(St),Le=tt===void 0,Ze=[],rt=St,Ie,_e,He,Qe,ut,pt;if(!Ve&&we&&Le&&St.constructor===Et)return St;if((we||xe(We,St))&&(St=St.source,Le&&(tt=ee(rt))),St=St===void 0?"":z(St),tt=tt===void 0?"":z(tt),rt=St,Fe&&"dotAll"in $e&&(_e=!!tt&&st(tt,"s")>-1,_e&&(tt=ot(tt,/s/g,""))),Ie=tt,wt&&"sticky"in $e&&(He=!!tt&&st(tt,"y")>-1,He&&Pt&&(tt=ot(tt,/y/g,""))),Ne&&(Qe=ht(St),St=Qe[0],Ze=Qe[1]),ut=Se(Re(St,tt),Ve?this:We,Et),(_e||He||Ze.length)&&(pt=Pe(ut),_e&&(pt.dotAll=!0,pt.raw=Et(ct(St),Ie)),He&&(pt.sticky=!0),Ze.length&&(pt.groups=Ze)),St!==rt)try{Me(ut,"source",rt===""?"(?:)":rt)}catch(Mt){}return ut},vt=ve(Re),Ft=0;vt.length>Ft;)ie(Et,Re,vt[Ft++]);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",xe=RegExp.prototype,de=xe[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(xe){Me(this,{type:Se,string:me(xe),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"),xe=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=xe(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"),xe=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),Re=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,ft){var bt=Ue?"$":"$0";return[function(nt,xt){var wt=ee(this),Pt=nt==null?void 0:ie(nt,Pe);return Pt?me(Pt,nt,wt,xt):me(st,z(wt),nt,xt)},function($e,nt){var xt=Me(this),wt=z($e);if(typeof nt=="string"&&Ae(nt,bt)===-1&&Ae(nt,"$<")===-1){var Pt=ft(st,xt,wt,nt);if(Pt.done)return Pt.value}var dt=ve(nt);dt||(nt=z(nt));var ct=xt.global;if(ct){var ht=xt.unicode;xt.lastIndex=0}for(var Et=[];;){var vt=ue(xt,wt);if(vt===null||(Ne(Et,vt),!ct))break;var Ft=z(vt[0]);Ft===""&&(xt.lastIndex=ae(wt,de(xt.lastIndex),ht))}for(var mt="",St=0,tt=0;tt<Et.length;tt++){vt=Et[tt];for(var Ve=z(vt[0]),we=je(Be(xe(vt.index),wt.length),0),Le=[],Ze=1;Ze<vt.length;Ze++)Ne(Le,We(vt[Ze]));var rt=vt.groups;if(dt){var Ie=Fe([Ve],Le,we,wt);rt!==void 0&&Ne(Ie,rt);var _e=z(fe(nt,void 0,Ie))}else _e=le(Ve,wt,we,Le,rt,nt);we>=St&&(mt+=Re(wt,St,we)+_e,St=we+Ve.length)}return mt+Re(wt,St)}]},!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"),xe=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=xe(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"),xe=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),Re=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(ft,bt){var $e=ee(ve(this)),nt=bt===void 0?Be:bt>>>0;if(nt===0)return[];if(ft===void 0)return[$e];if(!Se(ft))return me(Ke,$e,ft,nt);for(var xt=[],wt=(ft.ignoreCase?"i":"")+(ft.multiline?"m":"")+(ft.unicode?"u":"")+(ft.sticky?"y":""),Pt=0,dt=new RegExp(ft.source,wt+"g"),ct,ht,Et;(ct=me(ue,dt,$e))&&(ht=dt.lastIndex,!(ht>Pt&&(Re(xt,We($e,Pt,ct.index)),ct.length>1&&ct.index<$e.length&&fe(Ne,xt,ie(ct,1)),Et=ct[0].length,Pt=ht,xt.length>=nt)));)dt.lastIndex===ct.index&&dt.lastIndex++;return Pt===$e.length?(Et||!Ae(dt,""))&&Re(xt,""):Re(xt,We($e,Pt)),xt.length>nt?ie(xt,0,nt):xt}:"0".split(void 0,0).length?st=function(ft,bt){return ft===void 0&&bt===0?[]:me(Ke,this,ft,bt)}:st=Ke,[function(bt,$e){var nt=ve(this),xt=bt==null?void 0:ae(bt,Ue);return xt?me(xt,bt,nt,$e):me(st,ee(nt),bt,$e)},function(ft,bt){var $e=Me(this),nt=ee(ft),xt=ot(st,$e,nt,bt,st!==Ke);if(xt.done)return xt.value;var wt=xe($e,RegExp),Pt=$e.unicode,dt=($e.ignoreCase?"i":"")+($e.multiline?"m":"")+($e.unicode?"u":"")+(je?"g":"y"),ct=new wt(je?"^(?:"+$e.source+")":$e,dt),ht=bt===void 0?Be:bt>>>0;if(ht===0)return[];if(nt.length===0)return le(ct,nt)===null?[nt]:[];for(var Et=0,vt=0,Ft=[];vt<nt.length;){ct.lastIndex=je?0:vt;var mt=le(ct,je?We(nt,vt):nt),St;if(mt===null||(St=Fe(z(ct.lastIndex+(je?vt:0)),nt.length))===Et)vt=de(nt,vt,Pt);else{if(Re(Ft,We(nt,Et,vt)),Ft.length===ht)return Ft;for(var tt=1;tt<=mt.length-1;tt++)if(Re(Ft,mt[tt]),Ft.length===ht)return Ft;vt=Et=St}}return Re(Ft,We(nt,Et)),Ft}]},!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"),xe=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"),Re=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"),ft=oe("../internals/well-known-symbol"),bt=oe("../internals/well-known-symbol-wrapped"),$e=oe("../internals/define-well-known-symbol"),nt=oe("../internals/symbol-define-to-primitive"),xt=oe("../internals/set-to-string-tag"),wt=oe("../internals/internal-state"),Pt=oe("../internals/array-iteration").forEach,dt=Ke("hidden"),ct="Symbol",ht="prototype",Et=wt.set,vt=wt.getterFor(ct),Ft=Object[ht],mt=me.Symbol,St=mt&&mt[ht],tt=me.TypeError,Ve=me.QObject,we=Ne.f,Le=Ae.f,Ze=Be.f,rt=We.f,Ie=Ce([].push),_e=Ue("symbols"),He=Ue("op-symbols"),Qe=Ue("wks"),ut=!Ve||!Ve[ht]||!Ve[ht].findChild,pt=Me&&xe(function(){return ge(Le({},"a",{get:function(){return Le(this,"a",{value:7}).a}})).a!=7})?function(tn,Wt,Pn){var Sn=we(Ft,Wt);Sn&&delete Ft[Wt],Le(tn,Wt,Pn),Sn&&tn!==Ft&&Le(Ft,Wt,Sn)}:Le,Mt=function(tn,Wt){var Pn=_e[tn]=ge(St);return Et(Pn,{type:ct,tag:tn,description:Wt}),Me||(Pn.description=Wt),Pn},At=function(Wt,Pn,Sn){Wt===Ft&&At(He,Pn,Sn),ee(Wt);var Tn=ie(Pn);return ee(Sn),de(_e,Tn)?(Sn.enumerable?(de(Wt,dt)&&Wt[dt][Tn]&&(Wt[dt][Tn]=!1),Sn=ge(Sn,{enumerable:ue(0,!1)})):(de(Wt,dt)||Le(Wt,dt,ue(1,{})),Wt[dt][Tn]=!0),pt(Wt,Tn,Sn)):Le(Wt,Tn,Sn)},Dt=function(Wt,Pn){ee(Wt);var Sn=ae(Pn),Tn=Pe(Sn).concat(sn(Sn));return Pt(Tn,function(Kn){(!Me||ke(Xt,Sn,Kn))&&At(Wt,Kn,Sn[Kn])}),Wt},Kt=function(Wt,Pn){return Pn===void 0?ge(Wt):Dt(ge(Wt),Pn)},Xt=function(Wt){var Pn=ie(Wt),Sn=ke(rt,this,Pn);return this===Ft&&de(_e,Pn)&&!de(He,Pn)?!1:Sn||!de(this,Pn)||!de(_e,Pn)||de(this,dt)&&this[dt][Pn]?Sn:!0},$t=function(Wt,Pn){var Sn=ae(Wt),Tn=ie(Pn);if(!(Sn===Ft&&de(_e,Tn)&&!de(He,Tn))){var Kn=we(Sn,Tn);return Kn&&de(_e,Tn)&&!(de(Sn,dt)&&Sn[dt][Tn])&&(Kn.enumerable=!0),Kn}},Ut=function(Wt){var Pn=Ze(ae(Wt)),Sn=[];return Pt(Pn,function(Tn){!de(_e,Tn)&&!de(ot,Tn)&&Ie(Sn,Tn)}),Sn},sn=function(tn){var Wt=tn===Ft,Pn=Ze(Wt?He:ae(tn)),Sn=[];return Pt(Pn,function(Tn){de(_e,Tn)&&(!Wt||de(Ft,Tn))&&Ie(Sn,_e[Tn])}),Sn};ve||(mt=function(){if(z(St,this))throw tt("Symbol is not a constructor");var Wt=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),Pn=st(Wt),Sn=function(Tn){this===Ft&&ke(Sn,He,Tn),de(this,dt)&&de(this[dt],Pn)&&(this[dt][Pn]=!1),pt(this,Pn,ue(1,Tn))};return Me&&ut&&pt(Ft,Pn,{configurable:!0,set:Sn}),Mt(Pn,Wt)},St=mt[ht],Ye(St,"toString",function(){return vt(this).tag}),Ye(mt,"withoutSetter",function(tn){return Mt(st(tn),tn)}),We.f=Xt,Ae.f=At,Re.f=Dt,Ne.f=$t,je.f=Be.f=Ut,Fe.f=sn,bt.f=function(tn){return Mt(ft(tn),tn)},Me&&(Le(St,"description",{configurable:!0,get:function(){return vt(this).description}}),Se||Ye(Ft,"propertyIsEnumerable",Xt,{unsafe:!0}))),fe({global:!0,wrap:!0,forced:!ve,sham:!ve},{Symbol:mt}),Pt(Pe(Qe),function(tn){$e(tn)}),fe({target:ct,stat:!0,forced:!ve},{useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),fe({target:"Object",stat:!0,forced:!ve,sham:!Me},{create:Kt,defineProperty:At,defineProperties:Dt,getOwnPropertyDescriptor:$t}),fe({target:"Object",stat:!0,forced:!ve},{getOwnPropertyNames:Ut}),nt(),xt(mt,ct),ot[dt]=!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"),xe=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:xe(arguments[0]),Re=ve(ae,this)?new ee(Ae):Ae===void 0?ee():ee(Ae);return Ae===""&&(ie[Re]=!0),Re};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),Re=ge(Ae);if(Se(ie,Ae))return"";var We=ue?Fe(Re,7,-1):Be(Re,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"),xe=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,xe[ee]=z,ee}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(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(xe,de){return Ce(Se(this),xe,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 xe=arguments.length;return me(ke,Ce(this),ve,xe>1?arguments[1]:void 0,xe>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(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 xe=me(Ce(this),ve,arguments.length>1?arguments[1]:void 0);return ke(this,xe)})},{"../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"),xe=fe.Uint8Array,de=ke(Se.values),z=ke(Se.keys),ee=ke(Se.entries),ae=Ce.aTypedArray,ie=Ce.exportTypedArrayMethod,le=xe&&xe.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 xe=arguments.length;return me(ke,Ce(this),xe>1?[ve,arguments[1]]:[ve])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(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(xe,de){return new(ke(xe))(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,xe=Ce(ve/2),de=0,z;de<xe;)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"),xe=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 xe("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"),xe=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(xe)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,Re){return(Ae/4|0)-(Re/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(xe,de){var z=Se(this),ee=z.length,ae=ke(xe,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,xe=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])});xe("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,xe=Ce([].join);me(function(){ve.call({})})&&(ve=function(){return xe(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(xe){if(xe&&xe.forEach!==Ce)try{Se(xe,"forEach",Ce)}catch(de){xe.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"),xe=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[xe]||Se(ae,xe,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 xe(ge){return ge===void 0}De.isUndefined=xe;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,xe=/\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"](),Re=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(Re,3),L:ke(Math.round(Re/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(xe)||[""]).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,xe){for(ve=String(ve),xe=xe||2;ve.length<xe;)ve="0"+ve;return ve}function Ce(ve){var xe=new Date(ve.getFullYear(),ve.getMonth(),ve.getDate());xe.setDate(xe.getDate()-(xe.getDay()+6)%7+3);var de=new Date(xe.getFullYear(),0,4);de.setDate(de.getDate()-(de.getDay()+6)%7+3);var z=xe.getTimezoneOffset()-de.getTimezoneOffset();xe.setHours(xe.getHours()-z);var ee=(xe-de)/(864e5*7);return 1+Math.floor(ee)}function Se(ve){var xe=ve.getDay();return xe===0&&(xe=7),xe}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="",xe=0,de=0;for(xe=Se.index;xe<Ce.length;xe++){switch(Ce.charCodeAt(xe)){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!==xe&&(ve+=Ce.substring(de,xe)),de=xe+1,ve+=Me}return de!==xe?ve+Ce.substring(de,xe):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,Re,We){return Function.prototype.apply.call(Ae,Re,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 xe(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 Re=[],We=1;We<arguments.length;We++)Re.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(Re.length>0&&(Ke=Re[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,Re);else for(var ft=st.length,bt=ue(st,ft),We=0;We<ft;++We)me(bt[We],this,Re);return!0};function z(Ne,Ae,Re,We){var Ye,Ue,Ke;if(xe(Re),Ue=Ne._events,Ue===void 0?(Ue=Ne._events=Object.create(null),Ne._eventsCount=0):(Ue.newListener!==void 0&&(Ne.emit("newListener",Ae,Re.listener?Re.listener:Re),Ue=Ne._events),Ke=Ue[Ae]),Ke===void 0)Ke=Ue[Ae]=Re,++Ne._eventsCount;else if(typeof Ke=="function"?Ke=Ue[Ae]=We?[Re,Ke]:[Ke,Re]:We?Ke.unshift(Re):Ke.push(Re),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,Re){return z(this,Ae,Re,!1)},Me.prototype.on=Me.prototype.addListener,Me.prototype.prependListener=function(Ae,Re){return z(this,Ae,Re,!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,Re){var We={fired:!1,wrapFn:void 0,target:Ne,type:Ae,listener:Re},Ye=ee.bind(We);return Ye.listener=Re,We.wrapFn=Ye,Ye}Me.prototype.once=function(Ae,Re){return xe(Re),this.on(Ae,ae(this,Ae,Re)),this},Me.prototype.prependOnceListener=function(Ae,Re){return xe(Re),this.prependListener(Ae,ae(this,Ae,Re)),this},Me.prototype.removeListener=function(Ae,Re){var We,Ye,Ue,Ke,ot;if(xe(Re),Ye=this._events,Ye===void 0)return this;if(We=Ye[Ae],We===void 0)return this;if(We===Re||We.listener===Re)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Ae],Ye.removeListener&&this.emit("removeListener",Ae,We.listener||Re));else if(typeof We!="function"){for(Ue=-1,Ke=We.length-1;Ke>=0;Ke--)if(We[Ke]===Re||We[Ke].listener===Re){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||Re)}return this},Me.prototype.off=Me.prototype.removeListener,Me.prototype.removeAllListeners=function(Ae){var Re,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(Re=We[Ae],typeof Re=="function")this.removeListener(Ae,Re);else if(Re!==void 0)for(Ye=Re.length-1;Ye>=0;Ye--)this.removeListener(Ae,Re[Ye]);return this};function ie(Ne,Ae,Re){var We=Ne._events;if(We===void 0)return[];var Ye=We[Ae];return Ye===void 0?[]:typeof Ye=="function"?Re?[Ye.listener||Ye]:[Ye]:Re?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 Re=Ae[Ne];if(typeof Re=="function")return 1;if(Re!==void 0)return Re.length}return 0}Me.prototype.eventNames=function(){return this._eventsCount>0?ke(this._events):[]};function ue(Ne,Ae){for(var Re=new Array(Ae),We=0;We<Ae;++We)Re[We]=Ne[We];return Re}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),Re=0;Re<Ae.length;++Re)Ae[Re]=Ne[Re].listener||Ne[Re];return Ae}function je(Ne,Ae){return new Promise(function(Re,We){function Ye(Ke){Ne.removeListener(Ae,Ue),We(Ke)}function Ue(){typeof Ne.removeListener=="function"&&Ne.removeListener("error",Ye),Re([].slice.call(arguments))}Fe(Ne,Ae,Ue,{once:!0}),Ae!=="error"&&Be(Ne,Ye,{once:!0})})}function Be(Ne,Ae,Re){typeof Ne.on=="function"&&Fe(Ne,"error",Ae,Re)}function Fe(Ne,Ae,Re,We){if(typeof Ne.on=="function")We.once?Ne.once(Ae,Re):Ne.on(Ae,Re);else if(typeof Ne.addEventListener=="function")Ne.addEventListener(Ae,function Ye(Ue){We.once&&Ne.removeEventListener(Ae,Ye),Re(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 xe=me.call(arguments,1),de,z=function(){if(this instanceof de){var ue=ve.apply(this,xe.concat(me.call(arguments)));return Object(ue)===ue?ue:this}else return ve.apply(Me,xe.concat(me.call(arguments)))},ee=Math.max(0,ve.length-xe.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(ft){}},Me=Object.getOwnPropertyDescriptor;if(Me)try{Me({},"")}catch(st){Me=null}var ve=function(){throw new Ce},xe=Me?function(){try{return arguments.callee,ve}catch(st){try{return Me(arguments,"callee").get}catch(ft){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%":xe,"%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(ft){var bt;if(ft==="%AsyncFunction%")bt=Se("async function () {}");else if(ft==="%GeneratorFunction%")bt=Se("function* () {}");else if(ft==="%AsyncGeneratorFunction%")bt=Se("async function* () {}");else if(ft==="%AsyncGenerator%"){var $e=st("%AsyncGeneratorFunction%");$e&&(bt=$e.prototype)}else if(ft==="%AsyncIteratorPrototype%"){var nt=st("%AsyncGenerator%");nt&&ee&&(bt=ee(nt.prototype))}return le[ft]=bt,bt},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),Re=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(ft){var bt=Re(ft,0,1),$e=Re(ft,-1);if(bt==="%"&&$e!=="%")throw new me("invalid intrinsic syntax, expected closing `%`");if($e==="%"&&bt!=="%")throw new me("invalid intrinsic syntax, expected opening `%`");var nt=[];return Ae(ft,Ye,function(xt,wt,Pt,dt){nt[nt.length]=Pt?Ae(dt,Ue,"$1"):wt||xt}),nt},ot=function(ft,bt){var $e=ft,nt;if(Be(Pe,$e)&&(nt=Pe[$e],$e="%"+nt[0]+"%"),Be(le,$e)){var xt=le[$e];if(xt===ae&&(xt=ge($e)),typeof xt=="undefined"&&!bt)throw new Ce("intrinsic "+ft+" exists, but is not available. Please file an issue!");return{alias:nt,name:$e,value:xt}}throw new me("intrinsic "+ft+" does not exist!")};ze.exports=function(ft,bt){if(typeof ft!="string"||ft.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof bt!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(We(/^%?[^%]*%?$/,ft)===null)throw new me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $e=Ke(ft),nt=$e.length>0?$e[0]:"",xt=ot("%"+nt+"%",bt),wt=xt.name,Pt=xt.value,dt=!1,ct=xt.alias;ct&&(nt=ct[0],Ne($e,Fe([0,1],ct)));for(var ht=1,Et=!0;ht<$e.length;ht+=1){var vt=$e[ht],Ft=Re(vt,0,1),mt=Re(vt,-1);if((Ft==='"'||Ft==="'"||Ft==="`"||mt==='"'||mt==="'"||mt==="`")&&Ft!==mt)throw new me("property names with quotes must have matching quotes");if((vt==="constructor"||!Et)&&(dt=!0),nt+="."+vt,wt="%"+nt+"%",Be(le,wt))Pt=le[wt];else if(Pt!=null){if(!(vt in Pt)){if(!bt)throw new Ce("base intrinsic for "+ft+" exists, but the property is not available.");return}if(Me&&ht+1>=$e.length){var St=Me(Pt,vt);Et=!!St,Et&&"get"in St&&!("originalValue"in St.get)?Pt=St.get:Pt=Pt[vt]}else Et=Be(Pt,vt),Pt=Pt[vt];Et&&!dt&&(le[wt]=Pt)}}return Pt}},{"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,xe=Se*8-Ce-1,de=(1<<xe)-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+=xe;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,xe,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?(xe=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?(xe=0,ve=ee):ve+ae>=1?(xe=(me*de-1)*Math.pow(2,Se),ve=ve+ae):(xe=me*Math.pow(2,ae-1)*Math.pow(2,Se),ve=0));Se>=8;fe[ke+le]=xe&255,le+=ue,xe/=256,Se-=8);for(ve=ve<<Se|xe,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&&xe())}function xe(){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(xe);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(xe){return fe&&xe&&typeof xe=="object"&&Symbol.toStringTag in xe?!1:ke(xe)==="[object Arguments]"},Se=function(xe){return Ce(xe)?!0:xe!==null&&typeof xe=="object"&&typeof xe.length=="number"&&xe.length>=0&&ke(xe)!=="[object Array]"&&ke(xe.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}},xe=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;xe.call(je)===xe.call(document.all)&&(Pe=function(Fe){if((ge||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var Ne=xe.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=xe.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(xe){}},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(ft){for(var bt={},$e=0,nt=ft.length;$e<nt;$e++)bt[ft.charAt($e)]=$e;return bt}(Se),ve=String.fromCharCode,xe=function(ft){if(ft.length<2){var bt=ft.charCodeAt(0);return bt<128?ft:bt<2048?ve(192|bt>>>6)+ve(128|bt&63):ve(224|bt>>>12&15)+ve(128|bt>>>6&63)+ve(128|bt&63)}else{var bt=65536+(ft.charCodeAt(0)-55296)*1024+(ft.charCodeAt(1)-56320);return ve(240|bt>>>18&7)+ve(128|bt>>>12&63)+ve(128|bt>>>6&63)+ve(128|bt&63)}},de=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(ft){return ft.replace(de,xe)},ee=function(ft){var bt=[0,2,1][ft.length%3],$e=ft.charCodeAt(0)<<16|(ft.length>1?ft.charCodeAt(1):0)<<8|(ft.length>2?ft.charCodeAt(2):0),nt=[Se.charAt($e>>>18),Se.charAt($e>>>12&63),bt>=2?"=":Se.charAt($e>>>6&63),bt>=1?"=":Se.charAt($e&63)];return nt.join("")},ae=me.btoa&&typeof me.btoa=="function"?function(ft){return me.btoa(ft)}:function(ft){if(ft.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ft.replace(/[\s\S]{1,3}/g,ee)},ie=function(ft){return ae(z(String(ft)))},le=function(ft){return ft.replace(/[+\/]/g,function(bt){return bt=="+"?"-":"_"}).replace(/=/g,"")},ue=function(ft,bt){return bt?le(ie(ft)):ie(ft)},ge=function(ft){return ue(ft,!0)},Pe;me.Uint8Array&&(Pe=function(ft,bt){for(var $e="",nt=0,xt=ft.length;nt<xt;nt+=3){var wt=ft[nt],Pt=ft[nt+1],dt=ft[nt+2],ct=wt<<16|Pt<<8|dt;$e+=Se.charAt(ct>>>18)+Se.charAt(ct>>>12&63)+(typeof Pt!="undefined"?Se.charAt(ct>>>6&63):"=")+(typeof dt!="undefined"?Se.charAt(ct&63):"=")}return bt?le($e):$e});var je=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Be=function(ft){switch(ft.length){case 4:var bt=(7&ft.charCodeAt(0))<<18|(63&ft.charCodeAt(1))<<12|(63&ft.charCodeAt(2))<<6|63&ft.charCodeAt(3),$e=bt-65536;return ve(($e>>>10)+55296)+ve(($e&1023)+56320);case 3:return ve((15&ft.charCodeAt(0))<<12|(63&ft.charCodeAt(1))<<6|63&ft.charCodeAt(2));default:return ve((31&ft.charCodeAt(0))<<6|63&ft.charCodeAt(1))}},Fe=function(ft){return ft.replace(je,Be)},Ne=function(ft){var bt=ft.length,$e=bt%4,nt=(bt>0?Me[ft.charAt(0)]<<18:0)|(bt>1?Me[ft.charAt(1)]<<12:0)|(bt>2?Me[ft.charAt(2)]<<6:0)|(bt>3?Me[ft.charAt(3)]:0),xt=[ve(nt>>>16),ve(nt>>>8&255),ve(nt&255)];return xt.length-=[0,0,2,1][$e],xt.join("")},Ae=me.atob&&typeof me.atob=="function"?function(ft){return me.atob(ft)}:function(ft){return ft.replace(/\S{1,4}/g,Ne)},Re=function(ft){return Ae(String(ft).replace(/[^A-Za-z0-9\+\/]/g,""))},We=function(ft){return Fe(Ae(ft))},Ye=function(ft){return String(ft).replace(/[-_]/g,function(bt){return bt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ue=function(ft){return We(Ye(ft))},Ke;me.Uint8Array&&(Ke=function(ft){return Uint8Array.from(Re(Ye(ft)),function(bt){return bt.charCodeAt(0)})});var ot=function(){var ft=me.Base64;return me.Base64=ke,ft};if(me.Base64={VERSION:Ce,atob:Re,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(ft){return{value:ft,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(ft){return ue(this,ft)})),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 xe=Object.getOwnPropertyDescriptor(Ce,ve);Object.defineProperty(ke,ve,xe)}}),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 xe=Se[0];this._extensions[Ce]=xe[0]!=="*"?xe:xe.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):xe(ee);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ee))};function ve(ee){if(ee=String(ee),!(ee.length>100)){var 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 xe(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={},xe=0;xe<10;xe++)ve["_"+String.fromCharCode(xe)]=xe;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 xe,de=Ce(Me),z,ee=1;ee<arguments.length;ee++){xe=Object(arguments[ee]);for(var ae in xe)me.call(xe,ae)&&(de[ae]=xe[ae]);if(fe){z=fe(xe);for(var ie=0;ie<z.length;ie++)ke.call(xe,z[ie])&&(de[z[ie]]=xe[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 xe="",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(xe.length<2||de!==2||xe.charCodeAt(xe.length-1)!==46||xe.charCodeAt(xe.length-2)!==46){if(xe.length>2){var le=xe.lastIndexOf("/");if(le!==xe.length-1){le===-1?(xe="",de=0):(xe=xe.slice(0,le),de=xe.length-1-xe.lastIndexOf("/")),z=ie,ee=0;continue}}else if(xe.length===2||xe.length===1){xe="",de=0,z=ie,ee=0;continue}}ve&&(xe.length>0?xe+="/..":xe="..",de=2)}else xe.length>0?xe+="/"+Me.slice(z+1,ie):xe=Me.slice(z+1,ie),de=ie-z-1;z=ie,ee=0}else ae===46&&ee!==-1?++ee:ee=-1}return xe}function Ce(Me,ve){var xe=ve.dir||ve.root,de=ve.base||(ve.name||"")+(ve.ext||"");return xe?xe===ve.root?xe+de:xe+Me+de:de}var Se={resolve:function(){for(var ve="",xe=!1,de,z=arguments.length-1;z>=-1&&!xe;z--){var ee;z>=0?ee=arguments[z]:(de===void 0&&(de=fe.cwd()),ee=de),me(ee),ee.length!==0&&(ve=ee+"/"+ve,xe=ee.charCodeAt(0)===47)}return ve=ke(ve,!xe),xe?ve.length>0?"/"+ve:"/":ve.length>0?ve:"."},normalize:function(ve){if(me(ve),ve.length===0)return".";var xe=ve.charCodeAt(0)===47,de=ve.charCodeAt(ve.length-1)===47;return ve=ke(ve,!xe),ve.length===0&&!xe&&(ve="."),ve.length>0&&de&&(ve+="/"),xe?"/"+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,xe=0;xe<arguments.length;++xe){var de=arguments[xe];me(de),de.length>0&&(ve===void 0?ve=de:ve+="/"+de)}return ve===void 0?".":Se.normalize(ve)},relative:function(ve,xe){if(me(ve),me(xe),ve===xe||(ve=Se.resolve(ve),xe=Se.resolve(xe),ve===xe))return"";for(var de=1;de<ve.length&&ve.charCodeAt(de)===47;++de);for(var z=ve.length,ee=z-de,ae=1;ae<xe.length&&xe.charCodeAt(ae)===47;++ae);for(var ie=xe.length,le=ie-ae,ue=ee<le?ee:le,ge=-1,Pe=0;Pe<=ue;++Pe){if(Pe===ue){if(le>ue){if(xe.charCodeAt(ae+Pe)===47)return xe.slice(ae+Pe+1);if(Pe===0)return xe.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=xe.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+xe.slice(ae+ge):(ae+=ge,xe.charCodeAt(ae)===47&&++ae,xe.slice(ae))},_makeLong:function(ve){return ve},dirname:function(ve){if(me(ve),ve.length===0)return".";for(var xe=ve.charCodeAt(0),de=xe===47,z=-1,ee=!0,ae=ve.length-1;ae>=1;--ae)if(xe=ve.charCodeAt(ae),xe===47){if(!ee){z=ae;break}}else ee=!1;return z===-1?de?"/":".":de&&z===1?"//":ve.slice(0,z)},basename:function(ve,xe){if(xe!==void 0&&typeof xe!="string")throw new TypeError('"ext" argument must be a string');me(ve);var de=0,z=-1,ee=!0,ae;if(xe!==void 0&&xe.length>0&&xe.length<=ve.length){if(xe.length===ve.length&&xe===ve)return"";var ie=xe.length-1,le=-1;for(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===xe.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 xe=-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?xe===-1?xe=ie:ae!==1&&(ae=1):xe!==-1&&(ae=-1)}return xe===-1||z===-1||ae===0||ae===1&&xe===z-1&&xe===de+1?"":ve.slice(xe,z)},format:function(ve){if(ve===null||typeof ve!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof ve);return Ce("/",ve)},parse:function(ve){me(ve);var xe={root:"",dir:"",base:"",ext:"",name:""};if(ve.length===0)return xe;var de=ve.charCodeAt(0),z=de===47,ee;z?(xe.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?xe.base=xe.name=ve.slice(1,le):xe.base=xe.name=ve.slice(ie,le)):(ie===0&&z?(xe.name=ve.slice(1,ae),xe.base=ve.slice(1,le)):(xe.name=ve.slice(ie,ae),xe.base=ve.slice(ie,le)),xe.ext=ve.slice(ae,le)),ie>0?xe.dir=ve.slice(0,ie-1):z&&(xe.dir="/"),xe},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 xe=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<=xe)for(;++ot<st;)Ke(Ue[ot],ot,Ue);else je(Ue,Ke)}function Pe(Ue){return Ue=Re(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,ft){ot=Ke(ot,st,ft,Ue)}),ot}function Re(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||{},ft=st.userAgent||"";Ue||(Ue=ft);var bt=ot||z==Ce,$e=ot?!!st.likeChrome:/\bChrome\b/.test(Ue)&&!/internal|\n/i.test(ie.toString()),nt="Object",xt=ot?nt:"ScriptBridgingProxyObject",wt=ot?nt:"Environment",Pt=ot&&Ke.java?"JavaPackage":Be(Ke.java),dt=ot?nt:"RuntimeObject",ct=/\bJava/.test(Pt)&&Ke.java,ht=ct&&Be(Ke.environment)==wt,Et=ct?"a":"\u03B1",vt=ct?"b":"\u03B2",Ft=Ke.document||{},mt=Ke.operamini||Ke.opera,St=de.test(St=ot&&mt?mt["[[Class]]"]:Be(mt))?St:mt=null,tt,Ve=Ue,we=[],Le=null,Ze=Ue==ft,rt=Ze&&mt&&typeof mt.version=="function"&&mt.version(),Ie,_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=At({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}}),pt=Kt(["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(tn){return Ae(tn,function(Wt,Pn){return Wt||RegExp("\\b"+(Pn.pattern||Ne(Pn))+"\\b","i").exec(Ue)&&(Pn.label||Pn)})}function At(tn){return Ae(tn,function(Wt,Pn,Sn){return Wt||(Pn[Qe]||Pn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Qe)]||RegExp("\\b"+Ne(Sn)+"(?:\\b|\\w*\\d)","i").exec(Ue))&&Sn})}function Dt(tn){return Ae(tn,function(Wt,Pn){return Wt||RegExp("\\b"+(Pn.pattern||Ne(Pn))+"\\b","i").exec(Ue)&&(Pn.label||Pn)})}function Kt(tn){return Ae(tn,function(Wt,Pn){var Sn=Pn.pattern||Ne(Pn);return!Wt&&(Wt=RegExp("\\b"+Sn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ue))&&(Wt=ue(Wt,Sn,Pn.label||Pn)),Wt})}function Xt(tn){return Ae(tn,function(Wt,Pn){var Sn=Pn.pattern||Ne(Pn);return!Wt&&(Wt=RegExp("\\b"+Sn+" *\\d+[.\\w_]*","i").exec(Ue)||RegExp("\\b"+Sn+" *\\w+-[\\w]*","i").exec(Ue)||RegExp("\\b"+Sn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ue))&&((Wt=String(Pn.label&&!RegExp(Sn,"i").test(Pn.label)?Pn.label:Wt).split("/"))[1]&&!/[\d.]+/.test(Wt[0])&&(Wt[0]+=" "+Wt[1]),Pn=Pn.label||Pn,Wt=Pe(Wt[0].replace(RegExp(Sn,"i"),Pn).replace(RegExp("; *(?:"+Pn+"[_-])?","i")," ").replace(RegExp("("+Pn+")[-_.]?(\\w)","i"),"$1 $2"))),Wt})}function $t(tn){return Ae(tn,function(Wt,Pn){return Wt||(RegExp(Pn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ue)||0)[1]||null})}function Ut(){return this.description||""}if(_e&&(_e=[_e]),/\bAndroid\b/.test(pt)&&!Qe&&(tt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ue))&&(Qe=Re(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)&&we.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"),pt="iOS"+((tt=/ OS ([\d_]+)/i.exec(Ue))?" "+tt[1].replace(/_/g,"."):"")):He=="Konqueror"&&/^Linux\b/i.test(pt)?pt="Kubuntu":ut&&ut!="Google"&&(/Chrome/.test(He)&&!/\bMobile Safari\b/i.test(Ue)||/\bVita\b/.test(Qe))||/\bAndroid\b/.test(pt)&&/^Chrome/.test(He)&&/\bVersion\//i.test(Ue)?(He="Android Browser",pt=/\bAndroid\b/.test(pt)?pt:"Android"):He=="Silk"?(/\bMobi/i.test(Ue)||(pt="Android",we.unshift("desktop mode")),/Accelerated *= *true/i.test(Ue)&&we.unshift("accelerated")):He=="UC Browser"&&/\bUCWEB\b/.test(Ue)?we.push("speed mode"):He=="PaleMoon"&&(tt=/\bFirefox\/([\d.]+)\b/.exec(Ue))?we.push("identifying as Firefox "+tt[1]):He=="Firefox"&&(tt=/\b(Mobile|Tablet|TV)\b/i.exec(Ue))?(pt||(pt="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||pt)&&(Qe||ut||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(pt))&&(He=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(pt)?pt:tt)+" Browser")):He=="Electron"&&(tt=(/\bChrome\/([\d.]+)\b/.exec(Ue)||0)[1])&&we.push("Chromium "+tt),rt||(rt=$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(rt)>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)&&(pt=="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",pt="Windows Phone "+(/\+$/.test(tt)?tt:tt+".x"),we.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ue)?(He="IE Mobile",pt="Windows Phone 8.x",we.unshift("desktop mode"),rt||(rt=(/\brv:([\d.]+)/.exec(Ue)||0)[1])):He!="IE"&&_e=="Trident"&&(tt=/\brv:([\d.]+)/.exec(Ue))&&(He&&we.push("identifying as "+He+(rt?" "+rt:"")),He="IE",rt=tt[1]),Ze){if(Fe(Ke,"global"))if(ct&&(tt=ct.lang.System,Ve=tt.getProperty("os.arch"),pt=pt||tt.getProperty("os.name")+" "+tt.getProperty("os.version")),ht){try{rt=Ke.require("ringo/engine").version.join("."),He="RingoJS"}catch(tn){(tt=Ke.system)&&tt.global.system==Ke.system&&(He="Narwhal",pt||(pt=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"?(we.push("Node "+tt.versions.node),He="Electron",rt=tt.versions.electron):typeof tt.versions.nw=="string"&&(we.push("Chromium "+rt,"Node "+tt.versions.node),He="NW.js",rt=tt.versions.nw)),He||(He="Node.js",Ve=tt.arch,pt=tt.platform,rt=/[\d.]+/.exec(tt.version),rt=rt?rt[0]:null));else Be(tt=Ke.runtime)==xt?(He="Adobe AIR",pt=tt.flash.system.Capabilities.os):Be(tt=Ke.phantom)==dt?(He="PhantomJS",rt=(tt=tt.version||null)&&tt.major+"."+tt.minor+"."+tt.patch):typeof Ft.documentMode=="number"&&(tt=/\bTrident\/(\d+)/i.exec(Ue))?(rt=[rt,Ft.documentMode],(tt=+tt[1]+4)!=rt[1]&&(we.push("IE "+rt[1]+" mode"),_e&&(_e[1]=""),rt[1]=tt),rt=He=="IE"?String(rt[1].toFixed(1)):rt[0]):typeof Ft.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(He)&&(we.push("masking as "+He+" "+rt),He="IE",rt="11.0",_e=["Trident"],pt="Windows");pt=pt&&Pe(pt)}if(rt&&(tt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(rt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ue+";"+(Ze&&st.appMinorVersion))||/\bMinefield\b/i.test(Ue)&&"a")&&(Le=/b/i.test(tt)?"beta":"alpha",rt=rt.replace(RegExp(tt+"\\+?$"),"")+(Le=="beta"?vt:Et)+(/\d+\+?/.exec(tt)||"")),He=="Fennec"||He=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(pt))He="Firefox Mobile";else if(He=="Maxthon"&&rt)rt=rt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Qe))Qe=="Xbox 360"&&(pt=null),Qe=="Xbox 360"&&/\bIEMobile\b/.test(Ue)&&we.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(He)||He&&!Qe&&!/Browser|Mobi/.test(He))&&(pt=="Windows CE"||/Mobi/i.test(Ue)))He+=" Mobile";else if(He=="IE"&&Ze)try{Ke.external===null&&we.unshift("platform preview")}catch(tn){we.unshift("embedded")}else(/\bBlackBerry\b/.test(Qe)||/\bBB10\b/.test(Ue))&&(tt=(RegExp(Qe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ue)||0)[1]||rt)?(tt=[tt,/BB10/.test(Ue)],pt=(tt[1]?(Qe=null,ut="BlackBerry"):"Device Software")+" "+tt[0],rt=null):this!=je&&Qe!="Wii"&&(Ze&&mt||/Opera/.test(He)&&/\b(?:MSIE|Firefox)\b/i.test(Ue)||He=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(pt)||He=="IE"&&(pt&&!/^Win/.test(pt)&&rt>5.5||/\bWindows XP\b/.test(pt)&&rt>8||rt==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)&&pt=="Mac OS"&&(pt=null),tt="identify"+tt):(tt="mask"+tt,St?He=Pe(St.replace(/([a-z])([A-Z])/g,"$1 $2")):He="Opera",/\bIE\b/.test(tt)&&(pt=null),Ze||(rt=null)),_e=["Presto"],we.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",rt=tt[1].slice(0,-1)):(rt==tt[1]||rt==(tt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ue)||0)[1]))&&(rt=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"&&(!rt||parseInt(rt)>45)?rt=tt:He=="Chrome"&&/\bHeadlessChrome/i.test(Ue)&&we.unshift("headless")),He=="Opera"&&(tt=/\bzbov|zvav$/.exec(pt))?(He+=" ",we.unshift("desktop mode"),tt=="zvav"?(He+="Mini",rt=null):He+="Mobile",pt=pt.replace(RegExp(" *"+tt+"$"),"")):He=="Safari"&&/\bChrome\b/.exec(_e&&_e[1])?(we.unshift("desktop mode"),He="Chrome Mobile",rt=null,/\bOS X\b/.test(pt)?(ut="Apple",pt="iOS 4.3+"):pt=null):/\bSRWare Iron\b/.test(He)&&!rt&&(rt=$t("Chrome")),rt&&rt.indexOf(tt=/[\d.]+$/.exec(pt))==0&&Ue.indexOf("/"+tt+"-")>-1&&(pt=Re(pt.replace(tt,""))),pt&&pt.indexOf(He)!=-1&&!RegExp(He+" OS").test(pt)&&(pt=pt.replace(RegExp(" *"+Ne(He)+" *"),"")),_e&&!/\b(?:Avant|Nook)\b/.test(He)&&(/Browser|Lunascape|Maxthon/.test(He)||He!="Safari"&&/^iOS/.test(pt)&&/\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])&&we.push(tt),we.length&&(we=["("+we.join("; ")+")"]),ut&&Qe&&Qe.indexOf(ut)<0&&we.push("on "+ut),Qe&&we.push((/^on /.test(we[we.length-1])?"":"on ")+Qe),pt&&(tt=/ ([\d.+]+)$/.exec(pt),Ie=tt&&pt.charAt(pt.length-tt[0].length-1)=="/",pt={architecture:32,family:tt&&!Ie?pt.replace(tt[0],""):pt,version:tt?tt[1]:null,toString:function(){var tn=this.version;return this.family+(tn&&!Ie?" "+tn:"")+(this.architecture==64?" 64-bit":"")}}),(tt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Ve))&&!/\bi686\b/i.test(Ve)?(pt&&(pt.architecture=64,pt.family=pt.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))&&we.unshift("32-bit")):pt&&/^OS X/.test(pt.family)&&He=="Chrome"&&parseFloat(rt)>=39&&(pt.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&&rt,sn.os=pt||{architecture:null,family:null,version:null,toString:function(){return"null"}},sn.parse=We,sn.toString=Ut,sn.version&&we.unshift(rt),sn.name&&we.unshift(He),pt&&He&&!(pt==String(pt).split(" ")[0]&&(pt==He.split(" ")[0]||Qe))&&we.push(Qe?"("+pt+")":"on "+pt),we.length&&(sn.description=we.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,xe,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(xe=new Array(ve-1),de=0;de<xe.length;)xe[de++]=arguments[de];return fe.nextTick(function(){ke.apply(null,xe)})}}}).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 xe=[],de=!1,z,ee=-1;function ae(){!de||!z||(de=!1,z.length?xe=z.concat(xe):ee=-1,xe.length&&ie())}function ie(){if(!de){var ge=Me(ae);de=!0;for(var Pe=xe.length;Pe;){for(z=xe,xe=[];++ee<Pe;)z&&z[ee].run();ee=-1,Pe=xe.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];xe.push(new le(ge,Pe)),xe.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,xe=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=xe-de,Ne=Math.floor,Ae=String.fromCharCode,Re;function We(Pt){throw new RangeError(Be[Pt])}function Ye(Pt,dt){for(var ct=Pt.length,ht=[];ct--;)ht[ct]=dt(Pt[ct]);return ht}function Ue(Pt,dt){var ct=Pt.split("@"),ht="";ct.length>1&&(ht=ct[0]+"@",Pt=ct[1]),Pt=Pt.replace(je,".");var Et=Pt.split("."),vt=Ye(Et,dt).join(".");return ht+vt}function Ke(Pt){for(var dt=[],ct=0,ht=Pt.length,Et,vt;ct<ht;)Et=Pt.charCodeAt(ct++),Et>=55296&&Et<=56319&&ct<ht?(vt=Pt.charCodeAt(ct++),(vt&64512)==56320?dt.push(((Et&1023)<<10)+(vt&1023)+65536):(dt.push(Et),ct--)):dt.push(Et);return dt}function ot(Pt){return Ye(Pt,function(dt){var ct="";return dt>65535&&(dt-=65536,ct+=Ae(dt>>>10&1023|55296),dt=56320|dt&1023),ct+=Ae(dt),ct}).join("")}function st(Pt){return Pt-48<10?Pt-22:Pt-65<26?Pt-65:Pt-97<26?Pt-97:xe}function ft(Pt,dt){return Pt+22+75*(Pt<26)-((dt!=0)<<5)}function bt(Pt,dt,ct){var ht=0;for(Pt=ct?Ne(Pt/ae):Pt>>1,Pt+=Ne(Pt/dt);Pt>Fe*z>>1;ht+=xe)Pt=Ne(Pt/Fe);return Ne(ht+(Fe+1)*Pt/(Pt+ee))}function $e(Pt){var dt=[],ct=Pt.length,ht,Et=0,vt=le,Ft=ie,mt,St,tt,Ve,we,Le,Ze,rt,Ie;for(mt=Pt.lastIndexOf(ue),mt<0&&(mt=0),St=0;St<mt;++St)Pt.charCodeAt(St)>=128&&We("not-basic"),dt.push(Pt.charCodeAt(St));for(tt=mt>0?mt+1:0;tt<ct;){for(Ve=Et,we=1,Le=xe;tt>=ct&&We("invalid-input"),Ze=st(Pt.charCodeAt(tt++)),(Ze>=xe||Ze>Ne((ve-Et)/we))&&We("overflow"),Et+=Ze*we,rt=Le<=Ft?de:Le>=Ft+z?z:Le-Ft,!(Ze<rt);Le+=xe)Ie=xe-rt,we>Ne(ve/Ie)&&We("overflow"),we*=Ie;ht=dt.length+1,Ft=bt(Et-Ve,ht,Ve==0),Ne(Et/ht)>ve-vt&&We("overflow"),vt+=Ne(Et/ht),Et%=ht,dt.splice(Et++,0,vt)}return ot(dt)}function nt(Pt){var dt,ct,ht,Et,vt,Ft,mt,St,tt,Ve,we,Le=[],Ze,rt,Ie,_e;for(Pt=Ke(Pt),Ze=Pt.length,dt=le,ct=0,vt=ie,Ft=0;Ft<Ze;++Ft)we=Pt[Ft],we<128&&Le.push(Ae(we));for(ht=Et=Le.length,Et&&Le.push(ue);ht<Ze;){for(mt=ve,Ft=0;Ft<Ze;++Ft)we=Pt[Ft],we>=dt&&we<mt&&(mt=we);for(rt=ht+1,mt-dt>Ne((ve-ct)/rt)&&We("overflow"),ct+=(mt-dt)*rt,dt=mt,Ft=0;Ft<Ze;++Ft)if(we=Pt[Ft],we<dt&&++ct>ve&&We("overflow"),we==dt){for(St=ct,tt=xe;Ve=tt<=vt?de:tt>=vt+z?z:tt-vt,!(St<Ve);tt+=xe)_e=St-Ve,Ie=xe-Ve,Le.push(Ae(ft(Ve+_e%Ie,0))),St=Ne(_e/Ie);Le.push(Ae(ft(St,0))),vt=bt(ct,rt,ht==Et),ct=0,++ht}++ct,++dt}return Le.join("")}function xt(Pt){return Ue(Pt,function(dt){return ge.test(dt)?$e(dt.slice(4).toLowerCase()):dt})}function wt(Pt){return Ue(Pt,function(dt){return Pe.test(dt)?"xn--"+nt(dt):dt})}if(Me={version:"1.4.1",ucs2:{decode:Ke,encode:ot},decode:$e,encode:nt,toASCII:wt,toUnicode:xt},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(Re in Me)Me.hasOwnProperty(Re)&&(ke[Re]=Me[Re]);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 xe=/\+/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(xe,"%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,xe){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):xe?encodeURIComponent(fe(xe))+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=[],xe=0;xe<Se.length;xe++)ve.push(Me(Se[xe],xe));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 xe=Me[ve];de.prototype[xe]||(de.prototype[xe]=Se.prototype[xe])}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(we,Le){return we.listeners(Le).length},xe=oe("./internal/streams/stream"),de=oe("safe-buffer").Buffer,z=me.Uint8Array||function(){};function ee(we){return de.from(we)}function ae(we){return de.isBuffer(we)||we 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,xe);var Be=["error","close","destroy","pause","resume"];function Fe(we,Le,Ze){if(typeof we.prependListener=="function")return we.prependListener(Le,Ze);!we._events||!we._events[Le]?we.on(Le,Ze):Ce(we._events[Le])?we._events[Le].unshift(Ze):we._events[Le]=[Ze,we._events[Le]]}function Ne(we,Le){Se=Se||oe("./_stream_duplex"),we=we||{};var Ze=Le instanceof Se;this.objectMode=!!we.objectMode,Ze&&(this.objectMode=this.objectMode||!!we.readableObjectMode);var rt=we.highWaterMark,Ie=we.readableHighWaterMark,_e=this.objectMode?16:16*1024;rt||rt===0?this.highWaterMark=rt:Ze&&(Ie||Ie===0)?this.highWaterMark=Ie: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=we.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,we.encoding&&(je||(je=oe("string_decoder/").StringDecoder),this.decoder=new je(we.encoding),this.encoding=we.encoding)}function Ae(we){if(Se=Se||oe("./_stream_duplex"),!(this instanceof Ae))return new Ae(we);this._readableState=new Ne(we,this),this.readable=!0,we&&(typeof we.read=="function"&&(this._read=we.read),typeof we.destroy=="function"&&(this._destroy=we.destroy)),xe.call(this)}Object.defineProperty(Ae.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(we){this._readableState&&(this._readableState.destroyed=we)}}),Ae.prototype.destroy=Pe.destroy,Ae.prototype._undestroy=Pe.undestroy,Ae.prototype._destroy=function(we,Le){this.push(null),Le(we)},Ae.prototype.push=function(we,Le){var Ze=this._readableState,rt;return Ze.objectMode?rt=!0:typeof we=="string"&&(Le=Le||Ze.defaultEncoding,Le!==Ze.encoding&&(we=de.from(we,Le),Le=""),rt=!0),Re(this,we,Le,!1,rt)},Ae.prototype.unshift=function(we){return Re(this,we,null,!0,!1)};function Re(we,Le,Ze,rt,Ie){var _e=we._readableState;if(Le===null)_e.reading=!1,ft(we,_e);else{var He;Ie||(He=Ye(_e,Le)),He?we.emit("error",He):_e.objectMode||Le&&Le.length>0?(typeof Le!="string"&&!_e.objectMode&&Object.getPrototypeOf(Le)!==de.prototype&&(Le=ee(Le)),rt?_e.endEmitted?we.emit("error",new Error("stream.unshift() after end event")):We(we,_e,Le,!0):_e.ended?we.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(we,_e,Le,!1):nt(we,_e)):We(we,_e,Le,!1))):rt||(_e.reading=!1)}return Ue(_e)}function We(we,Le,Ze,rt){Le.flowing&&Le.length===0&&!Le.sync?(we.emit("data",Ze),we.read(0)):(Le.length+=Le.objectMode?1:Ze.length,rt?Le.buffer.unshift(Ze):Le.buffer.push(Ze),Le.needReadable&&bt(we)),nt(we,Le)}function Ye(we,Le){var Ze;return!ae(Le)&&typeof Le!="string"&&Le!==void 0&&!we.objectMode&&(Ze=new TypeError("Invalid non-string/buffer chunk")),Ze}function Ue(we){return!we.ended&&(we.needReadable||we.length<we.highWaterMark||we.length===0)}Ae.prototype.isPaused=function(){return this._readableState.flowing===!1},Ae.prototype.setEncoding=function(we){return je||(je=oe("string_decoder/").StringDecoder),this._readableState.decoder=new je(we),this._readableState.encoding=we,this};var Ke=8388608;function ot(we){return we>=Ke?we=Ke:(we--,we|=we>>>1,we|=we>>>2,we|=we>>>4,we|=we>>>8,we|=we>>>16,we++),we}function st(we,Le){return we<=0||Le.length===0&&Le.ended?0:Le.objectMode?1:we!==we?Le.flowing&&Le.length?Le.buffer.head.data.length:Le.length:(we>Le.highWaterMark&&(Le.highWaterMark=ot(we)),we<=Le.length?we:Le.ended?Le.length:(Le.needReadable=!0,0))}Ae.prototype.read=function(we){ue("read",we),we=parseInt(we,10);var Le=this._readableState,Ze=we;if(we!==0&&(Le.emittedReadable=!1),we===0&&Le.needReadable&&(Le.length>=Le.highWaterMark||Le.ended))return ue("read: emitReadable",Le.length,Le.ended),Le.length===0&&Le.ended?St(this):bt(this),null;if(we=st(we,Le),we===0&&Le.ended)return Le.length===0&&St(this),null;var rt=Le.needReadable;ue("need readable",rt),(Le.length===0||Le.length-we<Le.highWaterMark)&&(rt=!0,ue("length less than watermark",rt)),Le.ended||Le.reading?(rt=!1,ue("reading or ended",rt)):rt&&(ue("do read"),Le.reading=!0,Le.sync=!0,Le.length===0&&(Le.needReadable=!0),this._read(Le.highWaterMark),Le.sync=!1,Le.reading||(we=st(Ze,Le)));var Ie;return we>0?Ie=Et(we,Le):Ie=null,Ie===null?(Le.needReadable=!0,we=0):Le.length-=we,Le.length===0&&(Le.ended||(Le.needReadable=!0),Ze!==we&&Le.ended&&St(this)),Ie!==null&&this.emit("data",Ie),Ie};function ft(we,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,bt(we)}}function bt(we){var Le=we._readableState;Le.needReadable=!1,Le.emittedReadable||(ue("emitReadable",Le.flowing),Le.emittedReadable=!0,Le.sync?ke.nextTick($e,we):$e(we))}function $e(we){ue("emit readable"),we.emit("readable"),ht(we)}function nt(we,Le){Le.readingMore||(Le.readingMore=!0,ke.nextTick(xt,we,Le))}function xt(we,Le){for(var Ze=Le.length;!Le.reading&&!Le.flowing&&!Le.ended&&Le.length<Le.highWaterMark&&(ue("maybeReadMore read 0"),we.read(0),Ze!==Le.length);)Ze=Le.length;Le.readingMore=!1}Ae.prototype._read=function(we){this.emit("error",new Error("_read() is not implemented"))},Ae.prototype.pipe=function(we,Le){var Ze=this,rt=this._readableState;switch(rt.pipesCount){case 0:rt.pipes=we;break;case 1:rt.pipes=[rt.pipes,we];break;default:rt.pipes.push(we);break}rt.pipesCount+=1,ue("pipe count=%d opts=%j",rt.pipesCount,Le);var Ie=(!Le||Le.end!==!1)&&we!==fe.stdout&&we!==fe.stderr,_e=Ie?Qe:Ut;rt.endEmitted?ke.nextTick(_e):Ze.once("end",_e),we.on("unpipe",He);function He(sn,tn){ue("onunpipe"),sn===Ze&&tn&&tn.hasUnpiped===!1&&(tn.hasUnpiped=!0,Mt())}function Qe(){ue("onend"),we.end()}var ut=wt(Ze);we.on("drain",ut);var pt=!1;function Mt(){ue("cleanup"),we.removeListener("close",Xt),we.removeListener("finish",$t),we.removeListener("drain",ut),we.removeListener("error",Kt),we.removeListener("unpipe",He),Ze.removeListener("end",Qe),Ze.removeListener("end",Ut),Ze.removeListener("data",Dt),pt=!0,rt.awaitDrain&&(!we._writableState||we._writableState.needDrain)&&ut()}var At=!1;Ze.on("data",Dt);function Dt(sn){ue("ondata"),At=!1;var tn=we.write(sn);tn===!1&&!At&&((rt.pipesCount===1&&rt.pipes===we||rt.pipesCount>1&&Ve(rt.pipes,we)!==-1)&&!pt&&(ue("false write response, pause",Ze._readableState.awaitDrain),Ze._readableState.awaitDrain++,At=!0),Ze.pause())}function Kt(sn){ue("onerror",sn),Ut(),we.removeListener("error",Kt),ve(we,"error")===0&&we.emit("error",sn)}Fe(we,"error",Kt);function Xt(){we.removeListener("finish",$t),Ut()}we.once("close",Xt);function $t(){ue("onfinish"),we.removeListener("close",Xt),Ut()}we.once("finish",$t);function Ut(){ue("unpipe"),Ze.unpipe(we)}return we.emit("pipe",Ze),rt.flowing||(ue("pipe resume"),Ze.resume()),we};function wt(we){return function(){var Le=we._readableState;ue("pipeOnDrain",Le.awaitDrain),Le.awaitDrain&&Le.awaitDrain--,Le.awaitDrain===0&&ve(we,"data")&&(Le.flowing=!0,ht(we))}}Ae.prototype.unpipe=function(we){var Le=this._readableState,Ze={hasUnpiped:!1};if(Le.pipesCount===0)return this;if(Le.pipesCount===1)return we&&we!==Le.pipes?this:(we||(we=Le.pipes),Le.pipes=null,Le.pipesCount=0,Le.flowing=!1,we&&we.emit("unpipe",this,Ze),this);if(!we){var rt=Le.pipes,Ie=Le.pipesCount;Le.pipes=null,Le.pipesCount=0,Le.flowing=!1;for(var _e=0;_e<Ie;_e++)rt[_e].emit("unpipe",this,Ze);return this}var He=Ve(Le.pipes,we);return He===-1?this:(Le.pipes.splice(He,1),Le.pipesCount-=1,Le.pipesCount===1&&(Le.pipes=Le.pipes[0]),we.emit("unpipe",this,Ze),this)},Ae.prototype.on=function(we,Le){var Ze=xe.prototype.on.call(this,we,Le);if(we==="data")this._readableState.flowing!==!1&&this.resume();else if(we==="readable"){var rt=this._readableState;!rt.endEmitted&&!rt.readableListening&&(rt.readableListening=rt.needReadable=!0,rt.emittedReadable=!1,rt.reading?rt.length&&bt(this):ke.nextTick(Pt,this))}return Ze},Ae.prototype.addListener=Ae.prototype.on;function Pt(we){ue("readable nexttick read 0"),we.read(0)}Ae.prototype.resume=function(){var we=this._readableState;return we.flowing||(ue("resume"),we.flowing=!0,dt(this,we)),this};function dt(we,Le){Le.resumeScheduled||(Le.resumeScheduled=!0,ke.nextTick(ct,we,Le))}function ct(we,Le){Le.reading||(ue("resume read 0"),we.read(0)),Le.resumeScheduled=!1,Le.awaitDrain=0,we.emit("resume"),ht(we),Le.flowing&&!Le.reading&&we.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(we){var Le=we._readableState;for(ue("flow",Le.flowing);Le.flowing&&we.read()!==null;);}Ae.prototype.wrap=function(we){var Le=this,Ze=this._readableState,rt=!1;we.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)}),we.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||(rt=!0,we.pause())}});for(var Ie in we)this[Ie]===void 0&&typeof we[Ie]=="function"&&(this[Ie]=function(He){return function(){return we[He].apply(we,arguments)}}(Ie));for(var _e=0;_e<Be.length;_e++)we.on(Be[_e],this.emit.bind(this,Be[_e]));return this._read=function(He){ue("wrapped _read",He),rt&&(rt=!1,we.resume())},this},Object.defineProperty(Ae.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Ae._fromList=Et;function Et(we,Le){if(Le.length===0)return null;var Ze;return Le.objectMode?Ze=Le.buffer.shift():!we||we>=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=vt(we,Le.buffer,Le.decoder),Ze}function vt(we,Le,Ze){var rt;return we<Le.head.data.length?(rt=Le.head.data.slice(0,we),Le.head.data=Le.head.data.slice(we)):we===Le.head.data.length?rt=Le.shift():rt=Ze?Ft(we,Le):mt(we,Le),rt}function Ft(we,Le){var Ze=Le.head,rt=1,Ie=Ze.data;for(we-=Ie.length;Ze=Ze.next;){var _e=Ze.data,He=we>_e.length?_e.length:we;if(He===_e.length?Ie+=_e:Ie+=_e.slice(0,we),we-=He,we===0){He===_e.length?(++rt,Ze.next?Le.head=Ze.next:Le.head=Le.tail=null):(Le.head=Ze,Ze.data=_e.slice(He));break}++rt}return Le.length-=rt,Ie}function mt(we,Le){var Ze=de.allocUnsafe(we),rt=Le.head,Ie=1;for(rt.data.copy(Ze),we-=rt.data.length;rt=rt.next;){var _e=rt.data,He=we>_e.length?_e.length:we;if(_e.copy(Ze,Ze.length-we,0,He),we-=He,we===0){He===_e.length?(++Ie,rt.next?Le.head=rt.next:Le.head=Le.tail=null):(Le.head=rt,rt.data=_e.slice(He));break}++Ie}return Le.length-=Ie,Ze}function St(we){var Le=we._readableState;if(Le.length>0)throw new Error('"endReadable()" called on non-empty stream');Le.endEmitted||(Le.ended=!0,ke.nextTick(tt,Le,we))}function tt(we,Le){!we.endEmitted&&we.length===0&&(we.endEmitted=!0,Le.readable=!1,Le.emit("end"))}function Ve(we,Le){for(var Ze=0,rt=we.length;Ze<rt;Ze++)if(we[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,xe){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,xe!=null&&this.push(xe),z(ve);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function 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(xe,de){Me(ve,xe,de)}):Me(this,null,null)}Ce.prototype.push=function(ve,xe){return this._transformState.needTransform=!1,fe.prototype.push.call(this,ve,xe)},Ce.prototype._transform=function(ve,xe,de){throw new Error("_transform() is not implemented")},Ce.prototype._write=function(ve,xe,de){var z=this._transformState;if(z.writecb=de,z.writechunk=ve,z.writeencoding=xe,!z.transforming){var ee=this._readableState;(z.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},Ce.prototype._read=function(ve){var xe=this._transformState;xe.writechunk!==null&&xe.writecb&&!xe.transforming?(xe.transforming=!0,this._transform(xe.writechunk,xe.writeencoding,xe.afterTransform)):xe.needTransform=!0},Ce.prototype._destroy=function(ve,xe){var de=this;fe.prototype._destroy.call(this,ve,function(z){xe(z),de.emit("close")})};function Me(ve,xe,de){if(xe)return ve.emit("error",xe);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(ct,ht,Et){this.chunk=ct,this.encoding=ht,this.callback=Et,this.next=null}function Me(ct){var ht=this;this.next=null,this.entry=null,this.finish=function(){dt(ht,ct)}}var ve=!fe.browser&&["v0.10","v0.9."].indexOf(fe.version.slice(0,5))>-1?ke:Ce.nextTick,xe;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(ct){return ae.from(ct)}function ue(ct){return ae.isBuffer(ct)||ct instanceof ie}var ge=oe("./internal/streams/destroy");de.inherits(Fe,ee);function Pe(){}function je(ct,ht){xe=xe||oe("./_stream_duplex"),ct=ct||{};var Et=ht instanceof xe;this.objectMode=!!ct.objectMode,Et&&(this.objectMode=this.objectMode||!!ct.writableObjectMode);var vt=ct.highWaterMark,Ft=ct.writableHighWaterMark,mt=this.objectMode?16:16*1024;vt||vt===0?this.highWaterMark=vt:Et&&(Ft||Ft===0)?this.highWaterMark=Ft:this.highWaterMark=mt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var St=ct.decodeStrings===!1;this.decodeStrings=!St,this.defaultEncoding=ct.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(ct){}}();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(ct){return Be.call(this,ct)?!0:this!==Fe?!1:ct&&ct._writableState instanceof je}})):Be=function(ct){return ct instanceof this};function Fe(ct){if(xe=xe||oe("./_stream_duplex"),!Be.call(Fe,this)&&!(this instanceof xe))return new Fe(ct);this._writableState=new je(ct,this),this.writable=!0,ct&&(typeof ct.write=="function"&&(this._write=ct.write),typeof ct.writev=="function"&&(this._writev=ct.writev),typeof ct.destroy=="function"&&(this._destroy=ct.destroy),typeof ct.final=="function"&&(this._final=ct.final)),ee.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Ne(ct,ht){var Et=new Error("write after end");ct.emit("error",Et),Ce.nextTick(ht,Et)}function Ae(ct,ht,Et,vt){var Ft=!0,mt=!1;return Et===null?mt=new TypeError("May not write null values to stream"):typeof Et!="string"&&Et!==void 0&&!ht.objectMode&&(mt=new TypeError("Invalid non-string/buffer chunk")),mt&&(ct.emit("error",mt),Ce.nextTick(vt,mt),Ft=!1),Ft}Fe.prototype.write=function(ct,ht,Et){var vt=this._writableState,Ft=!1,mt=!vt.objectMode&&ue(ct);return mt&&!ae.isBuffer(ct)&&(ct=le(ct)),typeof ht=="function"&&(Et=ht,ht=null),mt?ht="buffer":ht||(ht=vt.defaultEncoding),typeof Et!="function"&&(Et=Pe),vt.ended?Ne(this,Et):(mt||Ae(this,vt,ct,Et))&&(vt.pendingcb++,Ft=We(this,vt,mt,ct,ht,Et)),Ft},Fe.prototype.cork=function(){var ct=this._writableState;ct.corked++},Fe.prototype.uncork=function(){var ct=this._writableState;ct.corked&&(ct.corked--,!ct.writing&&!ct.corked&&!ct.finished&&!ct.bufferProcessing&&ct.bufferedRequest&&bt(this,ct))},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 Re(ct,ht,Et){return!ct.objectMode&&ct.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(ct,ht,Et,vt,Ft,mt){if(!Et){var St=Re(ht,vt,Ft);vt!==St&&(Et=!0,Ft="buffer",vt=St)}var tt=ht.objectMode?1:vt.length;ht.length+=tt;var Ve=ht.length<ht.highWaterMark;if(Ve||(ht.needDrain=!0),ht.writing||ht.corked){var we=ht.lastBufferedRequest;ht.lastBufferedRequest={chunk:vt,encoding:Ft,isBuf:Et,callback:mt,next:null},we?we.next=ht.lastBufferedRequest:ht.bufferedRequest=ht.lastBufferedRequest,ht.bufferedRequestCount+=1}else Ye(ct,ht,!1,tt,vt,Ft,mt);return Ve}function Ye(ct,ht,Et,vt,Ft,mt,St){ht.writelen=vt,ht.writecb=St,ht.writing=!0,ht.sync=!0,Et?ct._writev(Ft,ht.onwrite):ct._write(Ft,mt,ht.onwrite),ht.sync=!1}function Ue(ct,ht,Et,vt,Ft){--ht.pendingcb,Et?(Ce.nextTick(Ft,vt),Ce.nextTick(wt,ct,ht),ct._writableState.errorEmitted=!0,ct.emit("error",vt)):(Ft(vt),ct._writableState.errorEmitted=!0,ct.emit("error",vt),wt(ct,ht))}function Ke(ct){ct.writing=!1,ct.writecb=null,ct.length-=ct.writelen,ct.writelen=0}function ot(ct,ht){var Et=ct._writableState,vt=Et.sync,Ft=Et.writecb;if(Ke(Et),ht)Ue(ct,Et,vt,ht,Ft);else{var mt=$e(Et);!mt&&!Et.corked&&!Et.bufferProcessing&&Et.bufferedRequest&&bt(ct,Et),vt?ve(st,ct,Et,mt,Ft):st(ct,Et,mt,Ft)}}function st(ct,ht,Et,vt){Et||ft(ct,ht),ht.pendingcb--,vt(),wt(ct,ht)}function ft(ct,ht){ht.length===0&&ht.needDrain&&(ht.needDrain=!1,ct.emit("drain"))}function bt(ct,ht){ht.bufferProcessing=!0;var Et=ht.bufferedRequest;if(ct._writev&&Et&&Et.next){var vt=ht.bufferedRequestCount,Ft=new Array(vt),mt=ht.corkedRequestsFree;mt.entry=Et;for(var St=0,tt=!0;Et;)Ft[St]=Et,Et.isBuf||(tt=!1),Et=Et.next,St+=1;Ft.allBuffers=tt,Ye(ct,ht,!0,ht.length,Ft,"",mt.finish),ht.pendingcb++,ht.lastBufferedRequest=null,mt.next?(ht.corkedRequestsFree=mt.next,mt.next=null):ht.corkedRequestsFree=new Me(ht),ht.bufferedRequestCount=0}else{for(;Et;){var Ve=Et.chunk,we=Et.encoding,Le=Et.callback,Ze=ht.objectMode?1:Ve.length;if(Ye(ct,ht,!1,Ze,Ve,we,Le),Et=Et.next,ht.bufferedRequestCount--,ht.writing)break}Et===null&&(ht.lastBufferedRequest=null)}ht.bufferedRequest=Et,ht.bufferProcessing=!1}Fe.prototype._write=function(ct,ht,Et){Et(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(ct,ht,Et){var vt=this._writableState;typeof ct=="function"?(Et=ct,ct=null,ht=null):typeof ht=="function"&&(Et=ht,ht=null),ct!=null&&this.write(ct,ht),vt.corked&&(vt.corked=1,this.uncork()),!vt.ending&&!vt.finished&&Pt(this,vt,Et)};function $e(ct){return ct.ending&&ct.length===0&&ct.bufferedRequest===null&&!ct.finished&&!ct.writing}function nt(ct,ht){ct._final(function(Et){ht.pendingcb--,Et&&ct.emit("error",Et),ht.prefinished=!0,ct.emit("prefinish"),wt(ct,ht)})}function xt(ct,ht){!ht.prefinished&&!ht.finalCalled&&(typeof ct._final=="function"?(ht.pendingcb++,ht.finalCalled=!0,Ce.nextTick(nt,ct,ht)):(ht.prefinished=!0,ct.emit("prefinish")))}function wt(ct,ht){var Et=$e(ht);return Et&&(xt(ct,ht),ht.pendingcb===0&&(ht.finished=!0,ct.emit("finish"))),Et}function Pt(ct,ht,Et){ht.ending=!0,wt(ct,ht),Et&&(ht.finished?Ce.nextTick(Et):ct.once("finish",Et)),ht.ended=!0,ct.writable=!1}function dt(ct,ht,Et){var vt=ct.entry;for(ct.entry=null;vt;){var Ft=vt.callback;ht.pendingcb--,Ft(Et),vt=vt.next}ht.corkedRequestsFree?ht.corkedRequestsFree.next=ct:ht.corkedRequestsFree=ct}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ct){this._writableState&&(this._writableState.destroyed=ct)}}),Fe.prototype.destroy=ge.destroy,Fe.prototype._undestroy=ge.undestroy,Fe.prototype._destroy=function(ct,ht){this.end(),ht(ct)}}).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 xe={data:ve,next:null};this.length>0?this.tail.next=xe:this.head=xe,this.tail=xe,++this.length},Se.prototype.unshift=function(ve){var xe={data:ve,next:this.head};this.length===0&&(this.tail=xe),this.head=xe,++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 xe=this.head,de=""+xe.data;xe=xe.next;)de+=ve+xe.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 xe=me.allocUnsafe(ve>>>0),de=this.head,z=0;de;)Ce(de.data,xe,z),z+=de.data.length,de=de.next;return xe},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,xe=this._readableState&&this._readableState.destroyed,de=this._writableState&&this._writableState.destroyed;return xe||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",xe=Me.asyncIterator||"@@asyncIterator",de=Me.toStringTag||"@@toStringTag";function z(xt,wt,Pt){return Object.defineProperty(xt,wt,{value:Pt,enumerable:!0,configurable:!0,writable:!0}),xt[wt]}try{z({},"")}catch(xt){z=function(wt,Pt,dt){return wt[Pt]=dt}}function ee(xt,wt,Pt,dt){var ct=wt&&wt.prototype instanceof je?wt:je,ht=Object.create(ct.prototype),Et=new bt(dt||[]);return ht._invoke=Ke(xt,Pt,Et),ht}me.wrap=ee;function ae(xt,wt,Pt){try{return{type:"normal",arg:xt.call(wt,Pt)}}catch(dt){return{type:"throw",arg:dt}}}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,Re=Ae&&Ae(Ae($e([])));Re&&Re!==ke&&Ce.call(Re,ve)&&(Ne=Re);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(xt){["next","throw","return"].forEach(function(wt){z(xt,wt,function(Pt){return this._invoke(wt,Pt)})})}me.isGeneratorFunction=function(xt){var wt=typeof xt=="function"&&xt.constructor;return wt?wt===Be||(wt.displayName||wt.name)==="GeneratorFunction":!1},me.mark=function(xt){return Object.setPrototypeOf?Object.setPrototypeOf(xt,Fe):(xt.__proto__=Fe,z(xt,de,"GeneratorFunction")),xt.prototype=Object.create(We),xt},me.awrap=function(xt){return{__await:xt}};function Ue(xt,wt){function Pt(ht,Et,vt,Ft){var mt=ae(xt[ht],xt,Et);if(mt.type==="throw")Ft(mt.arg);else{var St=mt.arg,tt=St.value;return tt&&typeof tt=="object"&&Ce.call(tt,"__await")?wt.resolve(tt.__await).then(function(Ve){Pt("next",Ve,vt,Ft)},function(Ve){Pt("throw",Ve,vt,Ft)}):wt.resolve(tt).then(function(Ve){St.value=Ve,vt(St)},function(Ve){return Pt("throw",Ve,vt,Ft)})}}var dt;function ct(ht,Et){function vt(){return new wt(function(Ft,mt){Pt(ht,Et,Ft,mt)})}return dt=dt?dt.then(vt,vt):vt()}this._invoke=ct}Ye(Ue.prototype),z(Ue.prototype,xe,function(){return this}),me.AsyncIterator=Ue,me.async=function(xt,wt,Pt,dt,ct){ct===void 0&&(ct=Promise);var ht=new Ue(ee(xt,wt,Pt,dt),ct);return me.isGeneratorFunction(wt)?ht:ht.next().then(function(Et){return Et.done?Et.value:ht.next()})};function Ke(xt,wt,Pt){var dt=ie;return function(ht,Et){if(dt===ue)throw new Error("Generator is already running");if(dt===ge){if(ht==="throw")throw Et;return nt()}for(Pt.method=ht,Pt.arg=Et;;){var vt=Pt.delegate;if(vt){var Ft=ot(vt,Pt);if(Ft){if(Ft===Pe)continue;return Ft}}if(Pt.method==="next")Pt.sent=Pt._sent=Pt.arg;else if(Pt.method==="throw"){if(dt===ie)throw dt=ge,Pt.arg;Pt.dispatchException(Pt.arg)}else Pt.method==="return"&&Pt.abrupt("return",Pt.arg);dt=ue;var mt=ae(xt,wt,Pt);if(mt.type==="normal"){if(dt=Pt.done?ge:le,mt.arg===Pe)continue;return{value:mt.arg,done:Pt.done}}else mt.type==="throw"&&(dt=ge,Pt.method="throw",Pt.arg=mt.arg)}}}function ot(xt,wt){var Pt=xt.iterator[wt.method];if(Pt===Se){if(wt.delegate=null,wt.method==="throw"){if(xt.iterator.return&&(wt.method="return",wt.arg=Se,ot(xt,wt),wt.method==="throw"))return Pe;wt.method="throw",wt.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pe}var dt=ae(Pt,xt.iterator,wt.arg);if(dt.type==="throw")return wt.method="throw",wt.arg=dt.arg,wt.delegate=null,Pe;var ct=dt.arg;if(!ct)return wt.method="throw",wt.arg=new TypeError("iterator result is not an object"),wt.delegate=null,Pe;if(ct.done)wt[xt.resultName]=ct.value,wt.next=xt.nextLoc,wt.method!=="return"&&(wt.method="next",wt.arg=Se);else return ct;return wt.delegate=null,Pe}Ye(We),z(We,de,"Generator"),z(We,ve,function(){return this}),z(We,"toString",function(){return"[object Generator]"});function st(xt){var wt={tryLoc:xt[0]};1 in xt&&(wt.catchLoc=xt[1]),2 in xt&&(wt.finallyLoc=xt[2],wt.afterLoc=xt[3]),this.tryEntries.push(wt)}function ft(xt){var wt=xt.completion||{};wt.type="normal",delete wt.arg,xt.completion=wt}function bt(xt){this.tryEntries=[{tryLoc:"root"}],xt.forEach(st,this),this.reset(!0)}me.keys=function(xt){var wt=[];for(var Pt in xt)wt.push(Pt);return wt.reverse(),function dt(){for(;wt.length;){var ct=wt.pop();if(ct in xt)return dt.value=ct,dt.done=!1,dt}return dt.done=!0,dt}};function $e(xt){if(xt){var wt=xt[ve];if(wt)return wt.call(xt);if(typeof xt.next=="function")return xt;if(!isNaN(xt.length)){var Pt=-1,dt=function ct(){for(;++Pt<xt.length;)if(Ce.call(xt,Pt))return ct.value=xt[Pt],ct.done=!1,ct;return ct.value=Se,ct.done=!0,ct};return dt.next=dt}}return{next:nt}}me.values=$e;function nt(){return{value:Se,done:!0}}return bt.prototype={constructor:bt,reset:function(xt){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(ft),!xt)for(var wt in this)wt.charAt(0)==="t"&&Ce.call(this,wt)&&!isNaN(+wt.slice(1))&&(this[wt]=Se)},stop:function(){this.done=!0;var xt=this.tryEntries[0],wt=xt.completion;if(wt.type==="throw")throw wt.arg;return this.rval},dispatchException:function(xt){if(this.done)throw xt;var wt=this;function Pt(Ft,mt){return ht.type="throw",ht.arg=xt,wt.next=Ft,mt&&(wt.method="next",wt.arg=Se),!!mt}for(var dt=this.tryEntries.length-1;dt>=0;--dt){var ct=this.tryEntries[dt],ht=ct.completion;if(ct.tryLoc==="root")return Pt("end");if(ct.tryLoc<=this.prev){var Et=Ce.call(ct,"catchLoc"),vt=Ce.call(ct,"finallyLoc");if(Et&&vt){if(this.prev<ct.catchLoc)return Pt(ct.catchLoc,!0);if(this.prev<ct.finallyLoc)return Pt(ct.finallyLoc)}else if(Et){if(this.prev<ct.catchLoc)return Pt(ct.catchLoc,!0)}else if(vt){if(this.prev<ct.finallyLoc)return Pt(ct.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(xt,wt){for(var Pt=this.tryEntries.length-1;Pt>=0;--Pt){var dt=this.tryEntries[Pt];if(dt.tryLoc<=this.prev&&Ce.call(dt,"finallyLoc")&&this.prev<dt.finallyLoc){var ct=dt;break}}ct&&(xt==="break"||xt==="continue")&&ct.tryLoc<=wt&&wt<=ct.finallyLoc&&(ct=null);var ht=ct?ct.completion:{};return ht.type=xt,ht.arg=wt,ct?(this.method="next",this.next=ct.finallyLoc,Pe):this.complete(ht)},complete:function(xt,wt){if(xt.type==="throw")throw xt.arg;return xt.type==="break"||xt.type==="continue"?this.next=xt.arg:xt.type==="return"?(this.rval=this.arg=xt.arg,this.method="return",this.next="end"):xt.type==="normal"&&wt&&(this.next=wt),Pe},finish:function(xt){for(var wt=this.tryEntries.length-1;wt>=0;--wt){var Pt=this.tryEntries[wt];if(Pt.finallyLoc===xt)return this.complete(Pt.completion,Pt.afterLoc),ft(Pt),Pe}},catch:function(xt){for(var wt=this.tryEntries.length-1;wt>=0;--wt){var Pt=this.tryEntries[wt];if(Pt.tryLoc===xt){var dt=Pt.completion;if(dt.type==="throw"){var ct=dt.arg;ft(Pt)}return ct}}throw new Error("illegal catch attempt")},delegateYield:function(xt,wt,Pt){return this.delegate={iterator:$e(xt),resultName:wt,nextLoc:Pt},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 xe=me(Se);return Me!==void 0?typeof ve=="string"?xe.fill(Me,ve):xe.fill(Me):xe.fill(0),xe},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(St,tt){return new Ce(St,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(St,tt){if(!(this instanceof Ce))return new Ce(St,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=!!St,Ve.noscript=!!(St||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(St){function tt(){}tt.prototype=St;var Ve=new tt;return Ve}),Object.keys||(Object.keys=function(St){var tt=[];for(var Ve in St)St.hasOwnProperty(Ve)&&tt.push(Ve);return tt});function Se(St){for(var tt=Math.max(me.MAX_BUFFER_LENGTH,10),Ve=0,we=0,Le=ke.length;we<Le;we++){var Ze=St[ke[we]].length;if(Ze>tt)switch(ke[we]){case"textNode":ft(St);break;case"cdata":st(St,"oncdata",St.cdata),St.cdata="";break;case"script":st(St,"onscript",St.script),St.script="";break;default:$e(St,"Max buffer length exceeded: "+ke[we])}Ve=Math.max(Ve,Ze)}var rt=me.MAX_BUFFER_LENGTH-Ve;St.bufferCheckPosition=rt+St.position}function Me(St){for(var tt=0,Ve=ke.length;tt<Ve;tt++)St[ke[tt]]=""}function ve(St){ft(St),St.cdata!==""&&(st(St,"oncdata",St.cdata),St.cdata=""),St.script!==""&&(st(St,"onscript",St.script),St.script="")}Ce.prototype={end:function(){nt(this)},write:mt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){ve(this)}};var xe;try{xe=oe("stream").Stream}catch(St){xe=function(){}}var de=me.EVENTS.filter(function(St){return St!=="error"&&St!=="end"});function z(St,tt){return new ee(St,tt)}function ee(St,tt){if(!(this instanceof ee))return new ee(St,tt);xe.apply(this),this._parser=new Ce(St,tt),this.writable=!0,this.readable=!0;var Ve=this;this._parser.onend=function(){Ve.emit("end")},this._parser.onerror=function(we){Ve.emit("error",we),Ve._parser.error=null},this._decoder=null,de.forEach(function(we){Object.defineProperty(Ve,"on"+we,{get:function(){return Ve._parser["on"+we]},set:function(Le){if(!Le)return Ve.removeAllListeners(we),Ve._parser["on"+we]=Le,Le;Ve.on(we,Le)},enumerable:!0,configurable:!1})})}ee.prototype=Object.create(xe.prototype,{constructor:{value:ee}}),ee.prototype.write=function(St){if(typeof fe=="function"&&typeof fe.isBuffer=="function"&&fe.isBuffer(St)){if(!this._decoder){var tt=oe("string_decoder").StringDecoder;this._decoder=new tt("utf8")}St=this._decoder.write(St)}return this._parser.write(St.toString()),this.emit("data",St),!0},ee.prototype.end=function(St){return St&&St.length&&this.write(St),this._parser.end(),!0},ee.prototype.on=function(St,tt){var Ve=this;return!Ve._parser["on"+St]&&de.indexOf(St)!==-1&&(Ve._parser["on"+St]=function(){var we=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);we.splice(0,0,St),Ve.emit.apply(Ve,we)}),xe.prototype.on.call(Ve,St,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(St){return St===" "||St===`
`||St==="\r"||St===" "}function Ae(St){return St==='"'||St==="'"}function Re(St){return St===">"||Ne(St)}function We(St,tt){return St.test(tt)}function Ye(St,tt){return!We(St,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(St){var tt=me.ENTITIES[St],Ve=typeof tt=="number"?String.fromCharCode(tt):tt;me.ENTITIES[St]=Ve});for(var Ke in me.STATE)me.STATE[me.STATE[Ke]]=Ke;Ue=me.STATE;function ot(St,tt,Ve){St[tt]&&St[tt](Ve)}function st(St,tt,Ve){St.textNode&&ft(St),ot(St,tt,Ve)}function ft(St){St.textNode=bt(St.opt,St.textNode),St.textNode&&ot(St,"ontext",St.textNode),St.textNode=""}function bt(St,tt){return St.trim&&(tt=tt.trim()),St.normalize&&(tt=tt.replace(/\s+/g," ")),tt}function $e(St,tt){return ft(St),St.trackPosition&&(tt+=`
Line: `+St.line+`
Column: `+St.column+`
Char: `+St.c),tt=new Error(tt),St.error=tt,ot(St,"onerror",tt),St}function nt(St){return St.sawRoot&&!St.closedRoot&&xt(St,"Unclosed root tag"),St.state!==Ue.BEGIN&&St.state!==Ue.BEGIN_WHITESPACE&&St.state!==Ue.TEXT&&$e(St,"Unexpected end"),ft(St),St.c="",St.closed=!0,ot(St,"onend"),Ce.call(St,St.strict,St.opt),St}function xt(St,tt){if(typeof St!="object"||!(St instanceof Ce))throw new Error("bad call to strictFail");St.strict&&$e(St,tt)}function wt(St){St.strict||(St.tagName=St.tagName[St.looseCase]());var tt=St.tags[St.tags.length-1]||St,Ve=St.tag={name:St.tagName,attributes:{}};St.opt.xmlns&&(Ve.ns=tt.ns),St.attribList.length=0,st(St,"onopentagstart",Ve)}function Pt(St,tt){var Ve=St.indexOf(":"),we=Ve<0?["",St]:St.split(":"),Le=we[0],Ze=we[1];return tt&&St==="xmlns"&&(Le="xmlns",Ze=""),{prefix:Le,local:Ze}}function dt(St){if(St.strict||(St.attribName=St.attribName[St.looseCase]()),St.attribList.indexOf(St.attribName)!==-1||St.tag.attributes.hasOwnProperty(St.attribName)){St.attribName=St.attribValue="";return}if(St.opt.xmlns){var tt=Pt(St.attribName,!0),Ve=tt.prefix,we=tt.local;if(Ve==="xmlns")if(we==="xml"&&St.attribValue!==le)xt(St,"xml: prefix must be bound to "+le+`
Actual: `+St.attribValue);else if(we==="xmlns"&&St.attribValue!==ue)xt(St,"xmlns: prefix must be bound to "+ue+`
Actual: `+St.attribValue);else{var Le=St.tag,Ze=St.tags[St.tags.length-1]||St;Le.ns===Ze.ns&&(Le.ns=Object.create(Ze.ns)),Le.ns[we]=St.attribValue}St.attribList.push([St.attribName,St.attribValue])}else St.tag.attributes[St.attribName]=St.attribValue,st(St,"onattribute",{name:St.attribName,value:St.attribValue});St.attribName=St.attribValue=""}function ct(St,tt){if(St.opt.xmlns){var Ve=St.tag,we=Pt(St.tagName);Ve.prefix=we.prefix,Ve.local=we.local,Ve.uri=Ve.ns[we.prefix]||"",Ve.prefix&&!Ve.uri&&(xt(St,"Unbound namespace prefix: "+JSON.stringify(St.tagName)),Ve.uri=we.prefix);var Le=St.tags[St.tags.length-1]||St;Ve.ns&&Le.ns!==Ve.ns&&Object.keys(Ve.ns).forEach(function(Dt){st(St,"onopennamespace",{prefix:Dt,uri:Ve.ns[Dt]})});for(var Ze=0,rt=St.attribList.length;Ze<rt;Ze++){var Ie=St.attribList[Ze],_e=Ie[0],He=Ie[1],Qe=Pt(_e,!0),ut=Qe.prefix,pt=Qe.local,Mt=ut===""?"":Ve.ns[ut]||"",At={name:_e,value:He,prefix:ut,local:pt,uri:Mt};ut&&ut!=="xmlns"&&!Mt&&(xt(St,"Unbound namespace prefix: "+JSON.stringify(ut)),At.uri=ut),St.tag.attributes[_e]=At,st(St,"onattribute",At)}St.attribList.length=0}St.tag.isSelfClosing=!!tt,St.sawRoot=!0,St.tags.push(St.tag),st(St,"onopentag",St.tag),tt||(!St.noscript&&St.tagName.toLowerCase()==="script"?St.state=Ue.SCRIPT:St.state=Ue.TEXT,St.tag=null,St.tagName=""),St.attribName=St.attribValue="",St.attribList.length=0}function ht(St){if(!St.tagName){xt(St,"Weird empty close tag."),St.textNode+="</>",St.state=Ue.TEXT;return}if(St.script){if(St.tagName!=="script"){St.script+="</"+St.tagName+">",St.tagName="",St.state=Ue.SCRIPT;return}st(St,"onscript",St.script),St.script=""}var tt=St.tags.length,Ve=St.tagName;St.strict||(Ve=Ve[St.looseCase]());for(var we=Ve;tt--;){var Le=St.tags[tt];if(Le.name!==we)xt(St,"Unexpected close tag");else break}if(tt<0){xt(St,"Unmatched closing tag: "+St.tagName),St.textNode+="</"+St.tagName+">",St.state=Ue.TEXT;return}St.tagName=Ve;for(var Ze=St.tags.length;Ze-- >tt;){var rt=St.tag=St.tags.pop();St.tagName=St.tag.name,st(St,"onclosetag",St.tagName);var Ie={};for(var _e in rt.ns)Ie[_e]=rt.ns[_e];var He=St.tags[St.tags.length-1]||St;St.opt.xmlns&&rt.ns!==He.ns&&Object.keys(rt.ns).forEach(function(Qe){var ut=rt.ns[Qe];st(St,"onclosenamespace",{prefix:Qe,uri:ut})})}tt===0&&(St.closedRoot=!0),St.tagName=St.attribValue=St.attribName="",St.attribList.length=0,St.state=Ue.TEXT}function Et(St){var tt=St.entity,Ve=tt.toLowerCase(),we,Le="";return St.ENTITIES[tt]?St.ENTITIES[tt]:St.ENTITIES[Ve]?St.ENTITIES[Ve]:(tt=Ve,tt.charAt(0)==="#"&&(tt.charAt(1)==="x"?(tt=tt.slice(2),we=parseInt(tt,16),Le=we.toString(16)):(tt=tt.slice(1),we=parseInt(tt,10),Le=we.toString(10))),tt=tt.replace(/^0+/,""),isNaN(we)||Le.toLowerCase()!==tt?(xt(St,"Invalid character entity"),"&"+St.entity+";"):String.fromCodePoint(we))}function vt(St,tt){tt==="<"?(St.state=Ue.OPEN_WAKA,St.startTagPosition=St.position):Ne(tt)||(xt(St,"Non-whitespace before first tag."),St.textNode=tt,St.state=Ue.TEXT)}function Ft(St,tt){var Ve="";return tt<St.length&&(Ve=St.charAt(tt)),Ve}function mt(St){var tt=this;if(this.error)throw this.error;if(tt.closed)return $e(tt,"Cannot write after close. Assign an onready handler.");if(St===null)return nt(tt);typeof St=="object"&&(St=St.toString());for(var Ve=0,we="";we=Ft(St,Ve++),tt.c=we,!!we;)switch(tt.trackPosition&&(tt.position++,we===`
`?(tt.line++,tt.column=0):tt.column++),tt.state){case Ue.BEGIN:if(tt.state=Ue.BEGIN_WHITESPACE,we==="\uFEFF")continue;vt(tt,we);continue;case Ue.BEGIN_WHITESPACE:vt(tt,we);continue;case Ue.TEXT:if(tt.sawRoot&&!tt.closedRoot){for(var Le=Ve-1;we&&we!=="<"&&we!=="&";)we=Ft(St,Ve++),we&&tt.trackPosition&&(tt.position++,we===`
`?(tt.line++,tt.column=0):tt.column++);tt.textNode+=St.substring(Le,Ve-1)}we==="<"&&!(tt.sawRoot&&tt.closedRoot&&!tt.strict)?(tt.state=Ue.OPEN_WAKA,tt.startTagPosition=tt.position):(!Ne(we)&&(!tt.sawRoot||tt.closedRoot)&&xt(tt,"Text data outside of root node."),we==="&"?tt.state=Ue.TEXT_ENTITY:tt.textNode+=we);continue;case Ue.SCRIPT:we==="<"?tt.state=Ue.SCRIPT_ENDING:tt.script+=we;continue;case Ue.SCRIPT_ENDING:we==="/"?tt.state=Ue.CLOSE_TAG:(tt.script+="<"+we,tt.state=Ue.SCRIPT);continue;case Ue.OPEN_WAKA:if(we==="!")tt.state=Ue.SGML_DECL,tt.sgmlDecl="";else if(!Ne(we))if(We(Pe,we))tt.state=Ue.OPEN_TAG,tt.tagName=we;else if(we==="/")tt.state=Ue.CLOSE_TAG,tt.tagName="";else if(we==="?")tt.state=Ue.PROC_INST,tt.procInstName=tt.procInstBody="";else{if(xt(tt,"Unencoded <"),tt.startTagPosition+1<tt.position){var Ze=tt.position-tt.startTagPosition;we=new Array(Ze).join(" ")+we}tt.textNode+="<"+we,tt.state=Ue.TEXT}continue;case Ue.SGML_DECL:(tt.sgmlDecl+we).toUpperCase()===ae?(st(tt,"onopencdata"),tt.state=Ue.CDATA,tt.sgmlDecl="",tt.cdata=""):tt.sgmlDecl+we==="--"?(tt.state=Ue.COMMENT,tt.comment="",tt.sgmlDecl=""):(tt.sgmlDecl+we).toUpperCase()===ie?(tt.state=Ue.DOCTYPE,(tt.doctype||tt.sawRoot)&&xt(tt,"Inappropriately located doctype declaration"),tt.doctype="",tt.sgmlDecl=""):we===">"?(st(tt,"onsgmldeclaration",tt.sgmlDecl),tt.sgmlDecl="",tt.state=Ue.TEXT):(Ae(we)&&(tt.state=Ue.SGML_DECL_QUOTED),tt.sgmlDecl+=we);continue;case Ue.SGML_DECL_QUOTED:we===tt.q&&(tt.state=Ue.SGML_DECL,tt.q=""),tt.sgmlDecl+=we;continue;case Ue.DOCTYPE:we===">"?(tt.state=Ue.TEXT,st(tt,"ondoctype",tt.doctype),tt.doctype=!0):(tt.doctype+=we,we==="["?tt.state=Ue.DOCTYPE_DTD:Ae(we)&&(tt.state=Ue.DOCTYPE_QUOTED,tt.q=we));continue;case Ue.DOCTYPE_QUOTED:tt.doctype+=we,we===tt.q&&(tt.q="",tt.state=Ue.DOCTYPE);continue;case Ue.DOCTYPE_DTD:tt.doctype+=we,we==="]"?tt.state=Ue.DOCTYPE:Ae(we)&&(tt.state=Ue.DOCTYPE_DTD_QUOTED,tt.q=we);continue;case Ue.DOCTYPE_DTD_QUOTED:tt.doctype+=we,we===tt.q&&(tt.state=Ue.DOCTYPE_DTD,tt.q="");continue;case Ue.COMMENT:we==="-"?tt.state=Ue.COMMENT_ENDING:tt.comment+=we;continue;case Ue.COMMENT_ENDING:we==="-"?(tt.state=Ue.COMMENT_ENDED,tt.comment=bt(tt.opt,tt.comment),tt.comment&&st(tt,"oncomment",tt.comment),tt.comment=""):(tt.comment+="-"+we,tt.state=Ue.COMMENT);continue;case Ue.COMMENT_ENDED:we!==">"?(xt(tt,"Malformed comment"),tt.comment+="--"+we,tt.state=Ue.COMMENT):tt.state=Ue.TEXT;continue;case Ue.CDATA:we==="]"?tt.state=Ue.CDATA_ENDING:tt.cdata+=we;continue;case Ue.CDATA_ENDING:we==="]"?tt.state=Ue.CDATA_ENDING_2:(tt.cdata+="]"+we,tt.state=Ue.CDATA);continue;case Ue.CDATA_ENDING_2:we===">"?(tt.cdata&&st(tt,"oncdata",tt.cdata),st(tt,"onclosecdata"),tt.cdata="",tt.state=Ue.TEXT):we==="]"?tt.cdata+="]":(tt.cdata+="]]"+we,tt.state=Ue.CDATA);continue;case Ue.PROC_INST:we==="?"?tt.state=Ue.PROC_INST_ENDING:Ne(we)?tt.state=Ue.PROC_INST_BODY:tt.procInstName+=we;continue;case Ue.PROC_INST_BODY:if(!tt.procInstBody&&Ne(we))continue;we==="?"?tt.state=Ue.PROC_INST_ENDING:tt.procInstBody+=we;continue;case Ue.PROC_INST_ENDING:we===">"?(st(tt,"onprocessinginstruction",{name:tt.procInstName,body:tt.procInstBody}),tt.procInstName=tt.procInstBody="",tt.state=Ue.TEXT):(tt.procInstBody+="?"+we,tt.state=Ue.PROC_INST_BODY);continue;case Ue.OPEN_TAG:We(je,we)?tt.tagName+=we:(wt(tt),we===">"?ct(tt):we==="/"?tt.state=Ue.OPEN_TAG_SLASH:(Ne(we)||xt(tt,"Invalid character in tag name"),tt.state=Ue.ATTRIB));continue;case Ue.OPEN_TAG_SLASH:we===">"?(ct(tt,!0),ht(tt)):(xt(tt,"Forward-slash in opening tag not followed by >"),tt.state=Ue.ATTRIB);continue;case Ue.ATTRIB:if(Ne(we))continue;we===">"?ct(tt):we==="/"?tt.state=Ue.OPEN_TAG_SLASH:We(Pe,we)?(tt.attribName=we,tt.attribValue="",tt.state=Ue.ATTRIB_NAME):xt(tt,"Invalid attribute name");continue;case Ue.ATTRIB_NAME:we==="="?tt.state=Ue.ATTRIB_VALUE:we===">"?(xt(tt,"Attribute without value"),tt.attribValue=tt.attribName,dt(tt),ct(tt)):Ne(we)?tt.state=Ue.ATTRIB_NAME_SAW_WHITE:We(je,we)?tt.attribName+=we:xt(tt,"Invalid attribute name");continue;case Ue.ATTRIB_NAME_SAW_WHITE:if(we==="=")tt.state=Ue.ATTRIB_VALUE;else{if(Ne(we))continue;xt(tt,"Attribute without value"),tt.tag.attributes[tt.attribName]="",tt.attribValue="",st(tt,"onattribute",{name:tt.attribName,value:""}),tt.attribName="",we===">"?ct(tt):We(Pe,we)?(tt.attribName=we,tt.state=Ue.ATTRIB_NAME):(xt(tt,"Invalid attribute name"),tt.state=Ue.ATTRIB)}continue;case Ue.ATTRIB_VALUE:if(Ne(we))continue;Ae(we)?(tt.q=we,tt.state=Ue.ATTRIB_VALUE_QUOTED):(xt(tt,"Unquoted attribute value"),tt.state=Ue.ATTRIB_VALUE_UNQUOTED,tt.attribValue=we);continue;case Ue.ATTRIB_VALUE_QUOTED:if(we!==tt.q){we==="&"?tt.state=Ue.ATTRIB_VALUE_ENTITY_Q:tt.attribValue+=we;continue}dt(tt),tt.q="",tt.state=Ue.ATTRIB_VALUE_CLOSED;continue;case Ue.ATTRIB_VALUE_CLOSED:Ne(we)?tt.state=Ue.ATTRIB:we===">"?ct(tt):we==="/"?tt.state=Ue.OPEN_TAG_SLASH:We(Pe,we)?(xt(tt,"No whitespace between attributes"),tt.attribName=we,tt.attribValue="",tt.state=Ue.ATTRIB_NAME):xt(tt,"Invalid attribute name");continue;case Ue.ATTRIB_VALUE_UNQUOTED:if(!Re(we)){we==="&"?tt.state=Ue.ATTRIB_VALUE_ENTITY_U:tt.attribValue+=we;continue}dt(tt),we===">"?ct(tt):tt.state=Ue.ATTRIB;continue;case Ue.CLOSE_TAG:if(tt.tagName)we===">"?ht(tt):We(je,we)?tt.tagName+=we:tt.script?(tt.script+="</"+tt.tagName,tt.tagName="",tt.state=Ue.SCRIPT):(Ne(we)||xt(tt,"Invalid tagname in closing tag"),tt.state=Ue.CLOSE_TAG_SAW_WHITE);else{if(Ne(we))continue;Ye(Pe,we)?tt.script?(tt.script+="</"+we,tt.state=Ue.SCRIPT):xt(tt,"Invalid tagname in closing tag."):tt.tagName=we}continue;case Ue.CLOSE_TAG_SAW_WHITE:if(Ne(we))continue;we===">"?ht(tt):xt(tt,"Invalid characters in closing tag");continue;case Ue.TEXT_ENTITY:case Ue.ATTRIB_VALUE_ENTITY_Q:case Ue.ATTRIB_VALUE_ENTITY_U:var rt,Ie;switch(tt.state){case Ue.TEXT_ENTITY:rt=Ue.TEXT,Ie="textNode";break;case Ue.ATTRIB_VALUE_ENTITY_Q:rt=Ue.ATTRIB_VALUE_QUOTED,Ie="attribValue";break;case Ue.ATTRIB_VALUE_ENTITY_U:rt=Ue.ATTRIB_VALUE_UNQUOTED,Ie="attribValue";break}we===";"?(tt[Ie]+=Et(tt),tt.entity="",tt.state=rt):We(tt.entity.length?Fe:Be,we)?tt.entity+=we:(xt(tt,"Invalid character in entity name"),tt[Ie]+="&"+tt.entity+we,tt.entity="",tt.state=rt);continue;default:throw new Error(tt,"Unknown state: "+tt.state)}return tt.position>=tt.bufferCheckPosition&&Se(tt),tt}String.fromCodePoint||function(){var St=String.fromCharCode,tt=Math.floor,Ve=function(){var we=16384,Le=[],Ze,rt,Ie=-1,_e=arguments.length;if(!_e)return"";for(var He="";++Ie<_e;){var Qe=Number(arguments[Ie]);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,rt=Qe%1024+56320,Le.push(Ze,rt)),(Ie+1===_e||Le.length>we)&&(He+=St.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 xe(){Me.readable&&Me.resume&&Me.resume()}Ce.on("drain",xe),!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",xe),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(xe,de){xe.prototype=Object.create(de.prototype),xe.prototype.constructor=xe,xe.__proto__=de}var me={};function ke(xe,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=xe,me[xe]=ae}function Ce(xe,de){if(Array.isArray(xe)){var z=xe.length;return xe=xe.map(function(ee){return String(ee)}),z>2?"one of ".concat(de," ").concat(xe.slice(0,z-1).join(", "),", or ")+xe[z-1]:z===2?"one of ".concat(de," ").concat(xe[0]," or ").concat(xe[1]):"of ".concat(de," ").concat(xe[0])}else return"of ".concat(de," ").concat(String(xe))}function Se(xe,de,z){return xe.substr(!z||z<0?0:+z,de.length)===de}function Me(xe,de,z){return(z===void 0||z>xe.length)&&(z=xe.length),xe.substring(z-de.length,z)===de}function ve(xe,de,z){return typeof z!="number"&&(z=0),z+de.length>xe.length?!1:xe.indexOf(de,z)!==-1}ke("ERR_INVALID_OPT_VALUE",function(xe,de){return'The value "'+de+'" is invalid for option "'+xe+'"'},TypeError),ke("ERR_INVALID_ARG_TYPE",function(xe,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(xe," argument"))ae="The ".concat(xe," ").concat(ee," ").concat(Ce(de,"type"));else{var ie=ve(xe,".")?"property":"argument";ae='The "'.concat(xe,'" ').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(xe){return"The "+xe+" method is not implemented"}),ke("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ke("ERR_STREAM_DESTROYED",function(xe){return"Cannot call "+xe+" 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(xe){return"Unknown encoding: "+xe},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=xe;var ke=oe("./_stream_readable"),Ce=oe("./_stream_writable");oe("inherits")(xe,ke);for(var Se=me(Ce.prototype),Me=0;Me<Se.length;Me++){var ve=Se[Me];xe.prototype[ve]||(xe.prototype[ve]=Ce.prototype[ve])}function xe(ee){if(!(this instanceof xe))return new xe(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(xe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(xe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(xe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function de(){this._writableState.ended||fe.nextTick(z,this)}function z(ee){ee.end()}Object.defineProperty(xe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(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,xe=(typeof me!="undefined"?me:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function de(Ie){return ve.from(Ie)}function z(Ie){return ve.isBuffer(Ie)||Ie instanceof xe}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,Re,We;oe("inherits")(st,Me);var Ye=le.errorOrDestroy,Ue=["error","close","destroy","pause","resume"];function Ke(Ie,_e,He){if(typeof Ie.prependListener=="function")return Ie.prependListener(_e,He);!Ie._events||!Ie._events[_e]?Ie.on(_e,He):Array.isArray(Ie._events[_e])?Ie._events[_e].unshift(He):Ie._events[_e]=[He,Ie._events[_e]]}function ot(Ie,_e,He){ke=ke||oe("./_stream_duplex"),Ie=Ie||{},typeof He!="boolean"&&(He=_e instanceof ke),this.objectMode=!!Ie.objectMode,He&&(this.objectMode=this.objectMode||!!Ie.readableObjectMode),this.highWaterMark=ge(this,Ie,"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=Ie.emitClose!==!1,this.autoDestroy=!!Ie.autoDestroy,this.destroyed=!1,this.defaultEncoding=Ie.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ie.encoding&&(Ae||(Ae=oe("string_decoder/").StringDecoder),this.decoder=new Ae(Ie.encoding),this.encoding=Ie.encoding)}function st(Ie){if(ke=ke||oe("./_stream_duplex"),!(this instanceof st))return new st(Ie);var _e=this instanceof ke;this._readableState=new ot(Ie,this,_e),this.readable=!0,Ie&&(typeof Ie.read=="function"&&(this._read=Ie.read),typeof Ie.destroy=="function"&&(this._destroy=Ie.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(Ie,_e){_e(Ie)},st.prototype.push=function(Ie,_e){var He=this._readableState,Qe;return He.objectMode?Qe=!0:typeof Ie=="string"&&(_e=_e||He.defaultEncoding,_e!==He.encoding&&(Ie=ve.from(Ie,_e),_e=""),Qe=!0),ft(this,Ie,_e,!1,Qe)},st.prototype.unshift=function(Ie){return ft(this,Ie,null,!0,!1)};function ft(Ie,_e,He,Qe,ut){ae("readableAddChunk",_e);var pt=Ie._readableState;if(_e===null)pt.reading=!1,Pt(Ie,pt);else{var Mt;if(ut||(Mt=$e(pt,_e)),Mt)Ye(Ie,Mt);else if(pt.objectMode||_e&&_e.length>0)if(typeof _e!="string"&&!pt.objectMode&&Object.getPrototypeOf(_e)!==ve.prototype&&(_e=de(_e)),Qe)pt.endEmitted?Ye(Ie,new Ne):bt(Ie,pt,_e,!0);else if(pt.ended)Ye(Ie,new Be);else{if(pt.destroyed)return!1;pt.reading=!1,pt.decoder&&!He?(_e=pt.decoder.write(_e),pt.objectMode||_e.length!==0?bt(Ie,pt,_e,!1):ht(Ie,pt)):bt(Ie,pt,_e,!1)}else Qe||(pt.reading=!1,ht(Ie,pt))}return!pt.ended&&(pt.length<pt.highWaterMark||pt.length===0)}function bt(Ie,_e,He,Qe){_e.flowing&&_e.length===0&&!_e.sync?(_e.awaitDrain=0,Ie.emit("data",He)):(_e.length+=_e.objectMode?1:He.length,Qe?_e.buffer.unshift(He):_e.buffer.push(He),_e.needReadable&&dt(Ie)),ht(Ie,_e)}function $e(Ie,_e){var He;return!z(_e)&&typeof _e!="string"&&_e!==void 0&&!Ie.objectMode&&(He=new je("chunk",["string","Buffer","Uint8Array"],_e)),He}st.prototype.isPaused=function(){return this._readableState.flowing===!1},st.prototype.setEncoding=function(Ie){Ae||(Ae=oe("string_decoder/").StringDecoder);var _e=new Ae(Ie);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 nt=1073741824;function xt(Ie){return Ie>=nt?Ie=nt:(Ie--,Ie|=Ie>>>1,Ie|=Ie>>>2,Ie|=Ie>>>4,Ie|=Ie>>>8,Ie|=Ie>>>16,Ie++),Ie}function wt(Ie,_e){return Ie<=0||_e.length===0&&_e.ended?0:_e.objectMode?1:Ie!==Ie?_e.flowing&&_e.length?_e.buffer.head.data.length:_e.length:(Ie>_e.highWaterMark&&(_e.highWaterMark=xt(Ie)),Ie<=_e.length?Ie:_e.ended?_e.length:(_e.needReadable=!0,0))}st.prototype.read=function(Ie){ae("read",Ie),Ie=parseInt(Ie,10);var _e=this._readableState,He=Ie;if(Ie!==0&&(_e.emittedReadable=!1),Ie===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):dt(this),null;if(Ie=wt(Ie,_e),Ie===0&&_e.ended)return _e.length===0&&Le(this),null;var Qe=_e.needReadable;ae("need readable",Qe),(_e.length===0||_e.length-Ie<_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||(Ie=wt(He,_e)));var ut;return Ie>0?ut=we(Ie,_e):ut=null,ut===null?(_e.needReadable=_e.length<=_e.highWaterMark,Ie=0):(_e.length-=Ie,_e.awaitDrain=0),_e.length===0&&(_e.ended||(_e.needReadable=!0),He!==Ie&&_e.ended&&Le(this)),ut!==null&&this.emit("data",ut),ut};function Pt(Ie,_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?dt(Ie):(_e.needReadable=!1,_e.emittedReadable||(_e.emittedReadable=!0,ct(Ie)))}}function dt(Ie){var _e=Ie._readableState;ae("emitReadable",_e.needReadable,_e.emittedReadable),_e.needReadable=!1,_e.emittedReadable||(ae("emitReadable",_e.flowing),_e.emittedReadable=!0,fe.nextTick(ct,Ie))}function ct(Ie){var _e=Ie._readableState;ae("emitReadable_",_e.destroyed,_e.length,_e.ended),!_e.destroyed&&(_e.length||_e.ended)&&(Ie.emit("readable"),_e.emittedReadable=!1),_e.needReadable=!_e.flowing&&!_e.ended&&_e.length<=_e.highWaterMark,Ve(Ie)}function ht(Ie,_e){_e.readingMore||(_e.readingMore=!0,fe.nextTick(Et,Ie,_e))}function Et(Ie,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){var He=_e.length;if(ae("maybeReadMore read 0"),Ie.read(0),He===_e.length)break}_e.readingMore=!1}st.prototype._read=function(Ie){Ye(this,new Fe("_read()"))},st.prototype.pipe=function(Ie,_e){var He=this,Qe=this._readableState;switch(Qe.pipesCount){case 0:Qe.pipes=Ie;break;case 1:Qe.pipes=[Qe.pipes,Ie];break;default:Qe.pipes.push(Ie);break}Qe.pipesCount+=1,ae("pipe count=%d opts=%j",Qe.pipesCount,_e);var ut=(!_e||_e.end!==!1)&&Ie!==fe.stdout&&Ie!==fe.stderr,pt=ut?At:Wt;Qe.endEmitted?fe.nextTick(pt):He.once("end",pt),Ie.on("unpipe",Mt);function Mt(Pn,Sn){ae("onunpipe"),Pn===He&&Sn&&Sn.hasUnpiped===!1&&(Sn.hasUnpiped=!0,Xt())}function At(){ae("onend"),Ie.end()}var Dt=vt(He);Ie.on("drain",Dt);var Kt=!1;function Xt(){ae("cleanup"),Ie.removeListener("close",sn),Ie.removeListener("finish",tn),Ie.removeListener("drain",Dt),Ie.removeListener("error",Ut),Ie.removeListener("unpipe",Mt),He.removeListener("end",At),He.removeListener("end",Wt),He.removeListener("data",$t),Kt=!0,Qe.awaitDrain&&(!Ie._writableState||Ie._writableState.needDrain)&&Dt()}He.on("data",$t);function $t(Pn){ae("ondata");var Sn=Ie.write(Pn);ae("dest.write",Sn),Sn===!1&&((Qe.pipesCount===1&&Qe.pipes===Ie||Qe.pipesCount>1&&rt(Qe.pipes,Ie)!==-1)&&!Kt&&(ae("false write response, pause",Qe.awaitDrain),Qe.awaitDrain++),He.pause())}function Ut(Pn){ae("onerror",Pn),Wt(),Ie.removeListener("error",Ut),Se(Ie,"error")===0&&Ye(Ie,Pn)}Ke(Ie,"error",Ut);function sn(){Ie.removeListener("finish",tn),Wt()}Ie.once("close",sn);function tn(){ae("onfinish"),Ie.removeListener("close",sn),Wt()}Ie.once("finish",tn);function Wt(){ae("unpipe"),He.unpipe(Ie)}return Ie.emit("pipe",He),Qe.flowing||(ae("pipe resume"),He.resume()),Ie};function vt(Ie){return function(){var He=Ie._readableState;ae("pipeOnDrain",He.awaitDrain),He.awaitDrain&&He.awaitDrain--,He.awaitDrain===0&&Se(Ie,"data")&&(He.flowing=!0,Ve(Ie))}}st.prototype.unpipe=function(Ie){var _e=this._readableState,He={hasUnpiped:!1};if(_e.pipesCount===0)return this;if(_e.pipesCount===1)return Ie&&Ie!==_e.pipes?this:(Ie||(Ie=_e.pipes),_e.pipes=null,_e.pipesCount=0,_e.flowing=!1,Ie&&Ie.emit("unpipe",this,He),this);if(!Ie){var Qe=_e.pipes,ut=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var pt=0;pt<ut;pt++)Qe[pt].emit("unpipe",this,{hasUnpiped:!1});return this}var Mt=rt(_e.pipes,Ie);return Mt===-1?this:(_e.pipes.splice(Mt,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),Ie.emit("unpipe",this,He),this)},st.prototype.on=function(Ie,_e){var He=Me.prototype.on.call(this,Ie,_e),Qe=this._readableState;return Ie==="data"?(Qe.readableListening=this.listenerCount("readable")>0,Qe.flowing!==!1&&this.resume()):Ie==="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?dt(this):Qe.reading||fe.nextTick(mt,this)),He},st.prototype.addListener=st.prototype.on,st.prototype.removeListener=function(Ie,_e){var He=Me.prototype.removeListener.call(this,Ie,_e);return Ie==="readable"&&fe.nextTick(Ft,this),He},st.prototype.removeAllListeners=function(Ie){var _e=Me.prototype.removeAllListeners.apply(this,arguments);return(Ie==="readable"||Ie===void 0)&&fe.nextTick(Ft,this),_e};function Ft(Ie){var _e=Ie._readableState;_e.readableListening=Ie.listenerCount("readable")>0,_e.resumeScheduled&&!_e.paused?_e.flowing=!0:Ie.listenerCount("data")>0&&Ie.resume()}function mt(Ie){ae("readable nexttick read 0"),Ie.read(0)}st.prototype.resume=function(){var Ie=this._readableState;return Ie.flowing||(ae("resume"),Ie.flowing=!Ie.readableListening,St(this,Ie)),Ie.paused=!1,this};function St(Ie,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,fe.nextTick(tt,Ie,_e))}function tt(Ie,_e){ae("resume",_e.reading),_e.reading||Ie.read(0),_e.resumeScheduled=!1,Ie.emit("resume"),Ve(Ie),_e.flowing&&!_e.reading&&Ie.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(Ie){var _e=Ie._readableState;for(ae("flow",_e.flowing);_e.flowing&&Ie.read()!==null;);}st.prototype.wrap=function(Ie){var _e=this,He=this._readableState,Qe=!1;Ie.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)}),Ie.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 At=_e.push(Mt);At||(Qe=!0,Ie.pause())}});for(var ut in Ie)this[ut]===void 0&&typeof Ie[ut]=="function"&&(this[ut]=function(At){return function(){return Ie[At].apply(Ie,arguments)}}(ut));for(var pt=0;pt<Ue.length;pt++)Ie.on(Ue[pt],this.emit.bind(this,Ue[pt]));return this._read=function(Mt){ae("wrapped _read",Mt),Qe&&(Qe=!1,Ie.resume())},this},typeof Symbol=="function"&&(st.prototype[Symbol.asyncIterator]=function(){return Re===void 0&&(Re=oe("./internal/streams/async_iterator")),Re(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=we,Object.defineProperty(st.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function we(Ie,_e){if(_e.length===0)return null;var He;return _e.objectMode?He=_e.buffer.shift():!Ie||Ie>=_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(Ie,_e.decoder),He}function Le(Ie){var _e=Ie._readableState;ae("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,fe.nextTick(Ze,_e,Ie))}function Ze(Ie,_e){if(ae("endReadableNT",Ie.endEmitted,Ie.length),!Ie.endEmitted&&Ie.length===0&&(Ie.endEmitted=!0,_e.readable=!1,_e.emit("end"),Ie.autoDestroy)){var He=_e._writableState;(!He||He.autoDestroy&&He.finished)&&_e.destroy()}}typeof Symbol=="function"&&(st.from=function(Ie,_e){return We===void 0&&(We=oe("./internal/streams/from")),We(st,Ie,_e)});function rt(Ie,_e){for(var He=0,Qe=Ie.length;He<Qe;He++)if(Ie[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=xe;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")(xe,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 xe(ee){if(!(this instanceof xe))return new xe(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)}xe.prototype.push=function(ee,ae){return this._transformState.needTransform=!1,Me.prototype.push.call(this,ee,ae)},xe.prototype._transform=function(ee,ae,ie){ie(new me("_transform()"))},xe.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)}},xe.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},xe.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,we,Le){this.chunk=Ve,this.encoding=we,this.callback=Le,this.next=null}function Ce(Ve){var we=this;this.next=null,this.entry=null,this.finish=function(){tt(we,Ve)}}var Se;ot.WritableState=Ue;var Me={deprecate:oe("util-deprecate")},ve=oe("./internal/streams/stream"),xe=oe("buffer").Buffer,de=(typeof me!="undefined"?me:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(Ve){return xe.from(Ve)}function ee(Ve){return xe.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,Re=ue.ERR_UNKNOWN_ENCODING,We=ae.errorOrDestroy;oe("inherits")(ot,ve);function Ye(){}function Ue(Ve,we,Le){Se=Se||oe("./_stream_duplex"),Ve=Ve||{},typeof Le!="boolean"&&(Le=we 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(rt){Pt(we,rt)},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 we=this.bufferedRequest,Le=[];we;)Le.push(we),we=we.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(we){return Ke.call(this,we)?!0:this!==ot?!1:we&&we._writableState instanceof Ue}})):Ke=function(we){return we instanceof this};function ot(Ve){Se=Se||oe("./_stream_duplex");var we=this instanceof Se;if(!we&&!Ke.call(ot,this))return new ot(Ve);this._writableState=new Ue(Ve,this,we),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,we){var Le=new Ae;We(Ve,Le),fe.nextTick(we,Le)}function ft(Ve,we,Le,Ze){var rt;return Le===null?rt=new Ne:typeof Le!="string"&&!we.objectMode&&(rt=new ge("chunk",["string","Buffer"],Le)),rt?(We(Ve,rt),fe.nextTick(Ze,rt),!1):!0}ot.prototype.write=function(Ve,we,Le){var Ze=this._writableState,rt=!1,Ie=!Ze.objectMode&&ee(Ve);return Ie&&!xe.isBuffer(Ve)&&(Ve=z(Ve)),typeof we=="function"&&(Le=we,we=null),Ie?we="buffer":we||(we=Ze.defaultEncoding),typeof Le!="function"&&(Le=Ye),Ze.ending?st(this,Le):(Ie||ft(this,Ze,Ve,Le))&&(Ze.pendingcb++,rt=$e(this,Ze,Ie,Ve,we,Le)),rt},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(we){if(typeof we=="string"&&(we=we.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((we+"").toLowerCase())>-1))throw new Re(we);return this._writableState.defaultEncoding=we,this},Object.defineProperty(ot.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function bt(Ve,we,Le){return!Ve.objectMode&&Ve.decodeStrings!==!1&&typeof we=="string"&&(we=xe.from(we,Le)),we}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $e(Ve,we,Le,Ze,rt,Ie){if(!Le){var _e=bt(we,Ze,rt);Ze!==_e&&(Le=!0,rt="buffer",Ze=_e)}var He=we.objectMode?1:Ze.length;we.length+=He;var Qe=we.length<we.highWaterMark;if(Qe||(we.needDrain=!0),we.writing||we.corked){var ut=we.lastBufferedRequest;we.lastBufferedRequest={chunk:Ze,encoding:rt,isBuf:Le,callback:Ie,next:null},ut?ut.next=we.lastBufferedRequest:we.bufferedRequest=we.lastBufferedRequest,we.bufferedRequestCount+=1}else nt(Ve,we,!1,He,Ze,rt,Ie);return Qe}function nt(Ve,we,Le,Ze,rt,Ie,_e){we.writelen=Ze,we.writecb=_e,we.writing=!0,we.sync=!0,we.destroyed?we.onwrite(new Fe("write")):Le?Ve._writev(rt,we.onwrite):Ve._write(rt,Ie,we.onwrite),we.sync=!1}function xt(Ve,we,Le,Ze,rt){--we.pendingcb,Le?(fe.nextTick(rt,Ze),fe.nextTick(mt,Ve,we),Ve._writableState.errorEmitted=!0,We(Ve,Ze)):(rt(Ze),Ve._writableState.errorEmitted=!0,We(Ve,Ze),mt(Ve,we))}function wt(Ve){Ve.writing=!1,Ve.writecb=null,Ve.length-=Ve.writelen,Ve.writelen=0}function Pt(Ve,we){var Le=Ve._writableState,Ze=Le.sync,rt=Le.writecb;if(typeof rt!="function")throw new je;if(wt(Le),we)xt(Ve,Le,Ze,we,rt);else{var Ie=Et(Le)||Ve.destroyed;!Ie&&!Le.corked&&!Le.bufferProcessing&&Le.bufferedRequest&&ht(Ve,Le),Ze?fe.nextTick(dt,Ve,Le,Ie,rt):dt(Ve,Le,Ie,rt)}}function dt(Ve,we,Le,Ze){Le||ct(Ve,we),we.pendingcb--,Ze(),mt(Ve,we)}function ct(Ve,we){we.length===0&&we.needDrain&&(we.needDrain=!1,Ve.emit("drain"))}function ht(Ve,we){we.bufferProcessing=!0;var Le=we.bufferedRequest;if(Ve._writev&&Le&&Le.next){var Ze=we.bufferedRequestCount,rt=new Array(Ze),Ie=we.corkedRequestsFree;Ie.entry=Le;for(var _e=0,He=!0;Le;)rt[_e]=Le,Le.isBuf||(He=!1),Le=Le.next,_e+=1;rt.allBuffers=He,nt(Ve,we,!0,we.length,rt,"",Ie.finish),we.pendingcb++,we.lastBufferedRequest=null,Ie.next?(we.corkedRequestsFree=Ie.next,Ie.next=null):we.corkedRequestsFree=new Ce(we),we.bufferedRequestCount=0}else{for(;Le;){var Qe=Le.chunk,ut=Le.encoding,pt=Le.callback,Mt=we.objectMode?1:Qe.length;if(nt(Ve,we,!1,Mt,Qe,ut,pt),Le=Le.next,we.bufferedRequestCount--,we.writing)break}Le===null&&(we.lastBufferedRequest=null)}we.bufferedRequest=Le,we.bufferProcessing=!1}ot.prototype._write=function(Ve,we,Le){Le(new Pe("_write()"))},ot.prototype._writev=null,ot.prototype.end=function(Ve,we,Le){var Ze=this._writableState;return typeof Ve=="function"?(Le=Ve,Ve=null,we=null):typeof we=="function"&&(Le=we,we=null),Ve!=null&&this.write(Ve,we),Ze.corked&&(Ze.corked=1,this.uncork()),Ze.ending||St(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 vt(Ve,we){Ve._final(function(Le){we.pendingcb--,Le&&We(Ve,Le),we.prefinished=!0,Ve.emit("prefinish"),mt(Ve,we)})}function Ft(Ve,we){!we.prefinished&&!we.finalCalled&&(typeof Ve._final=="function"&&!we.destroyed?(we.pendingcb++,we.finalCalled=!0,fe.nextTick(vt,Ve,we)):(we.prefinished=!0,Ve.emit("prefinish")))}function mt(Ve,we){var Le=Et(we);if(Le&&(Ft(Ve,we),we.pendingcb===0&&(we.finished=!0,Ve.emit("finish"),we.autoDestroy))){var Ze=Ve._readableState;(!Ze||Ze.autoDestroy&&Ze.endEmitted)&&Ve.destroy()}return Le}function St(Ve,we,Le){we.ending=!0,mt(Ve,we),Le&&(we.finished?fe.nextTick(Le):Ve.once("finish",Le)),we.ended=!0,Ve.writable=!1}function tt(Ve,we,Le){var Ze=Ve.entry;for(Ve.entry=null;Ze;){var rt=Ze.callback;we.pendingcb--,rt(Le),Ze=Ze.next}we.corkedRequestsFree.next=Ve}Object.defineProperty(ot.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(we){this._writableState&&(this._writableState.destroyed=we)}}),ot.prototype.destroy=ae.destroy,ot.prototype._undestroy=ae.undestroy,ot.prototype._destroy=function(Ve,we){we(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,Re){return Ae=Ce(Ae),Ae in Ne?Object.defineProperty(Ne,Ae,{value:Re,enumerable:!0,configurable:!0,writable:!0}):Ne[Ae]=Re,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 Re=Ne[Symbol.toPrimitive];if(Re!==void 0){var We=Re.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"),xe=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 Re=Ne[ie].read();Re!==null&&(Ne[ee]=null,Ne[ve]=null,Ne[xe]=null,Ae(le(Re,!1)))}}function ge(Ne){fe.nextTick(ue,Ne)}function Pe(Ne,Ae){return function(Re,We){Ne.then(function(){if(Ae[z]){Re(le(void 0,!0));return}Ae[ae](Re,We)},We)}}var je=Object.getPrototypeOf(function(){}),Be=Object.setPrototypeOf((me={get stream(){return this[ie]},next:function(){var Ae=this,Re=this[de];if(Re!==null)return Promise.reject(Re);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(Re,We){Ae[ie].destroy(null,function(Ye){if(Ye){We(Ye);return}Re(le(void 0,!0))})})}),me),je),Fe=function(Ae){var Re,We=Object.create(Be,(Re={},ke(Re,ie,{value:Ae,writable:!0}),ke(Re,ve,{value:null,writable:!0}),ke(Re,xe,{value:null,writable:!0}),ke(Re,de,{value:null,writable:!0}),ke(Re,z,{value:Ae._readableState.endEmitted,writable:!0}),ke(Re,ae,{value:function(Ue,Ke){var ot=We[ie].read();ot?(We[ee]=null,We[ve]=null,We[xe]=null,Ue(le(ot,!1))):(We[ve]=Ue,We[xe]=Ke)},writable:!0}),Re));return We[ee]=null,Me(Ae,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ue=We[xe];Ue!==null&&(We[ee]=null,We[ve]=null,We[xe]=null,Ue(Ye)),We[de]=Ye;return}var Ke=We[ve];Ke!==null&&(We[ee]=null,We[ve]=null,We[xe]=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=xe(ue,"string");return typeof ge=="symbol"?ge:String(ge)}function xe(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(xe,de){var z=this,ee=this._readableState&&this._readableState.destroyed,ae=this._writableState&&this._writableState.destroyed;return ee||ae?(de?de(xe):xe&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,fe.nextTick(Me,this,xe)):fe.nextTick(Me,this,xe)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(xe||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(xe,de){Me(xe,de),Ce(xe)}function Ce(xe){xe._writableState&&!xe._writableState.emitClose||xe._readableState&&!xe._readableState.emitClose||xe.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(xe,de){xe.emit("error",de)}function ve(xe,de){var z=xe._readableState,ee=xe._writableState;z&&z.autoDestroy||ee&&ee.autoDestroy?xe.destroy(de):xe.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 xe=arguments.length,de=new Array(xe),z=0;z<xe;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,xe){if(typeof ve=="function")return Se(Me,null,ve);ve||(ve={}),xe=me(xe||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||xe.call(Me)},le=Me._readableState&&Me._readableState.endEmitted,ue=function(){de=!1,le=!0,z||xe.call(Me)},ge=function(Fe){xe.call(Me,Fe)},Pe=function(){var Fe;if(de&&!le)return(!Me._readableState||!Me._readableState.ended)&&(Fe=new fe),xe.call(Me,Fe);if(z&&!ae)return(!Me._writableState||!Me._writableState.ended)&&(Fe=new fe),xe.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 xe(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 xe(Be,Ne,Ae,function(Re){Pe||(Pe=Re),Re&&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 xe=me(Se,ve,Me);if(xe!=null){if(!(isFinite(xe)&&Math.floor(xe)===xe)||xe<0){var de=ve?Me:"highWaterMark";throw new fe(de,xe)}return Math.floor(xe)}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 xe(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=xe(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 xe(Ce.call(setTimeout,window,arguments),clearTimeout)},De.setInterval=function(){return new xe(Ce.call(setInterval,window,arguments),clearInterval)},De.clearTimeout=De.clearInterval=function(de){de.close()};function xe(de,z){this._id=de,this._clearFn=z}xe.prototype.unref=xe.prototype.ref=function(){},xe.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",xe=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,pt){if(typeof ut!="object")return!1;try{return pt(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 Re(ut){return ke(ut)==="Int32Array"}De.isInt32Array=Re;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 xe(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 ft(ut){return xe(ut)==="[object Set]"}ft.working=typeof Set!="undefined"&&ft(new Set);function bt(ut){return typeof Set=="undefined"?!1:ft.working?ft(ut):ut instanceof Set}De.isSet=bt;function $e(ut){return xe(ut)==="[object WeakMap]"}$e.working=typeof WeakMap!="undefined"&&$e(new WeakMap);function nt(ut){return typeof WeakMap=="undefined"?!1:$e.working?$e(ut):ut instanceof WeakMap}De.isWeakMap=nt;function xt(ut){return xe(ut)==="[object WeakSet]"}xt.working=typeof WeakSet!="undefined"&&xt(new WeakSet);function wt(ut){return xt(ut)}De.isWeakSet=wt;function Pt(ut){return xe(ut)==="[object ArrayBuffer]"}Pt.working=typeof ArrayBuffer!="undefined"&&Pt(new ArrayBuffer);function dt(ut){return typeof ArrayBuffer=="undefined"?!1:Pt.working?Pt(ut):ut instanceof ArrayBuffer}De.isArrayBuffer=dt;function ct(ut){return xe(ut)==="[object DataView]"}ct.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&ct(new DataView(new ArrayBuffer(1),0,1));function ht(ut){return typeof DataView=="undefined"?!1:ct.working?ct(ut):ut instanceof DataView}De.isDataView=ht;var Et=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function vt(ut){return xe(ut)==="[object SharedArrayBuffer]"}function Ft(ut){return typeof Et=="undefined"?!1:(typeof vt.working=="undefined"&&(vt.working=vt(new Et)),vt.working?vt(ut):ut instanceof Et)}De.isSharedArrayBuffer=Ft;function mt(ut){return xe(ut)==="[object AsyncFunction]"}De.isAsyncFunction=mt;function St(ut){return xe(ut)==="[object Map Iterator]"}De.isMapIterator=St;function tt(ut){return xe(ut)==="[object Set Iterator]"}De.isSetIterator=tt;function Ve(ut){return xe(ut)==="[object Generator]"}De.isGeneratorObject=Ve;function we(ut){return xe(ut)==="[object WebAssembly.Module]"}De.isWebAssemblyCompiledModule=we;function Le(ut){return le(ut,de)}De.isNumberObject=Le;function Ze(ut){return le(ut,z)}De.isStringObject=Ze;function rt(ut){return le(ut,ee)}De.isBooleanObject=rt;function Ie(ut){return Me&&le(ut,ae)}De.isBigIntObject=Ie;function _e(ut){return ve&&le(ut,ie)}De.isSymbolObject=_e;function He(ut){return Le(ut)||Ze(ut)||rt(ut)||Ie(ut)||_e(ut)}De.isBoxedPrimitive=He;function Qe(ut){return typeof Uint8Array!="undefined"&&(dt(ut)||Ft(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 vt=Object.keys(Et),Ft={},mt=0;mt<vt.length;mt++)Ft[vt[mt]]=Object.getOwnPropertyDescriptor(Et,vt[mt]);return Ft},ke=/%[sdj%]/g;De.format=function(ht){if(!Ae(ht)){for(var Et=[],vt=0;vt<arguments.length;vt++)Et.push(ve(arguments[vt]));return Et.join(" ")}for(var vt=1,Ft=arguments,mt=Ft.length,St=String(ht).replace(ke,function(Ve){if(Ve==="%%")return"%";if(vt>=mt)return Ve;switch(Ve){case"%s":return String(Ft[vt++]);case"%d":return Number(Ft[vt++]);case"%j":try{return JSON.stringify(Ft[vt++])}catch(we){return"[Circular]"}default:return Ve}}),tt=Ft[vt];vt<mt;tt=Ft[++vt])Be(tt)||!Ue(tt)?St+=" "+tt:St+=" "+ve(tt);return St},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 vt=!1;function Ft(){if(!vt){if(fe.throwDeprecation)throw new Error(Et);fe.traceDeprecation?console.trace(Et):console.error(Et),vt=!0}return ht.apply(this,arguments)}return Ft};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 vt=De.format.apply(De,arguments);console.error("%s %d: %s",ht,Et,vt)}}else Ce[ht]=function(){};return Ce[ht]};function ve(ht,Et){var vt={seen:[],stylize:de};return arguments.length>=3&&(vt.depth=arguments[2]),arguments.length>=4&&(vt.colors=arguments[3]),je(Et)?vt.showHidden=Et:Et&&De._extend(vt,Et),We(vt.showHidden)&&(vt.showHidden=!1),We(vt.depth)&&(vt.depth=2),We(vt.colors)&&(vt.colors=!1),We(vt.customInspect)&&(vt.customInspect=!0),vt.colors&&(vt.stylize=xe),ee(vt,ht,vt.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 xe(ht,Et){var vt=ve.styles[Et];return vt?"\x1B["+ve.colors[vt][0]+"m"+ht+"\x1B["+ve.colors[vt][1]+"m":ht}function de(ht,Et){return ht}function z(ht){var Et={};return ht.forEach(function(vt,Ft){Et[vt]=!0}),Et}function ee(ht,Et,vt){if(ht.customInspect&&Et&&st(Et.inspect)&&Et.inspect!==De.inspect&&!(Et.constructor&&Et.constructor.prototype===Et)){var Ft=Et.inspect(vt,ht);return Ae(Ft)||(Ft=ee(ht,Ft,vt)),Ft}var mt=ae(ht,Et);if(mt)return mt;var St=Object.keys(Et),tt=z(St);if(ht.showHidden&&(St=Object.getOwnPropertyNames(Et)),ot(Et)&&(St.indexOf("message")>=0||St.indexOf("description")>=0))return ie(Et);if(St.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 we="",Le=!1,Ze=["{","}"];if(Pe(Et)&&(Le=!0,Ze=["[","]"]),st(Et)){var rt=Et.name?": "+Et.name:"";we=" [Function"+rt+"]"}if(Ye(Et)&&(we=" "+RegExp.prototype.toString.call(Et)),Ke(Et)&&(we=" "+Date.prototype.toUTCString.call(Et)),ot(Et)&&(we=" "+ie(Et)),St.length===0&&(!Le||Et.length==0))return Ze[0]+we+Ze[1];if(vt<0)return Ye(Et)?ht.stylize(RegExp.prototype.toString.call(Et),"regexp"):ht.stylize("[Object]","special");ht.seen.push(Et);var Ie;return Le?Ie=le(ht,Et,vt,tt,St):Ie=St.map(function(_e){return ue(ht,Et,vt,tt,_e,Le)}),ht.seen.pop(),ge(Ie,we,Ze)}function ae(ht,Et){if(We(Et))return ht.stylize("undefined","undefined");if(Ae(Et)){var vt="'"+JSON.stringify(Et).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ht.stylize(vt,"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,vt,Ft,mt){for(var St=[],tt=0,Ve=Et.length;tt<Ve;++tt)wt(Et,String(tt))?St.push(ue(ht,Et,vt,Ft,String(tt),!0)):St.push("");return mt.forEach(function(we){we.match(/^\d+$/)||St.push(ue(ht,Et,vt,Ft,we,!0))}),St}function ue(ht,Et,vt,Ft,mt,St){var tt,Ve,we;if(we=Object.getOwnPropertyDescriptor(Et,mt)||{value:Et[mt]},we.get?we.set?Ve=ht.stylize("[Getter/Setter]","special"):Ve=ht.stylize("[Getter]","special"):we.set&&(Ve=ht.stylize("[Setter]","special")),wt(Ft,mt)||(tt="["+mt+"]"),Ve||(ht.seen.indexOf(we.value)<0?(Be(vt)?Ve=ee(ht,we.value,null):Ve=ee(ht,we.value,vt-1),Ve.indexOf(`
`)>-1&&(St?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(St&&mt.match(/^\d+$/))return Ve;tt=JSON.stringify(""+mt),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,vt){var Ft=0,mt=ht.reduce(function(St,tt){return Ft++,tt.indexOf(`
`)>=0&&Ft++,St+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?vt[0]+(Et===""?"":Et+`
`)+" "+ht.join(`,
`)+" "+vt[1]:vt[0]+Et+" "+ht.join(", ")+" "+vt[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 Re(ht){return typeof ht=="symbol"}De.isSymbol=Re;function We(ht){return ht===void 0}De.isUndefined=We;function Ye(ht){return Ue(ht)&&bt(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)&&bt(ht)==="[object Date]"}De.isDate=Ke,De.types.isDate=Ke;function ot(ht){return Ue(ht)&&(bt(ht)==="[object Error]"||ht instanceof Error)}De.isError=ot,De.types.isNativeError=ot;function st(ht){return typeof ht=="function"}De.isFunction=st;function ft(ht){return ht===null||typeof ht=="boolean"||typeof ht=="number"||typeof ht=="string"||typeof ht=="symbol"||typeof ht=="undefined"}De.isPrimitive=ft,De.isBuffer=oe("./support/isBuffer");function bt(ht){return Object.prototype.toString.call(ht)}function $e(ht){return ht<10?"0"+ht.toString(10):ht.toString(10)}var nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xt(){var ht=new Date,Et=[$e(ht.getHours()),$e(ht.getMinutes()),$e(ht.getSeconds())].join(":");return[ht.getDate(),nt[ht.getMonth()],Et].join(" ")}De.log=function(){console.log("%s - %s",xt(),De.format.apply(De,arguments))},De.inherits=oe("inherits"),De._extend=function(ht,Et){if(!Et||!Ue(Et))return ht;for(var vt=Object.keys(Et),Ft=vt.length;Ft--;)ht[vt[Ft]]=Et[vt[Ft]];return ht};function wt(ht,Et){return Object.prototype.hasOwnProperty.call(ht,Et)}var Pt=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(Pt&&Et[Pt]){var vt=Et[Pt];if(typeof vt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(vt,Pt,{value:vt,enumerable:!1,writable:!1,configurable:!0}),vt}function vt(){for(var Ft,mt,St=new Promise(function(we,Le){Ft=we,mt=Le}),tt=[],Ve=0;Ve<arguments.length;Ve++)tt.push(arguments[Ve]);tt.push(function(we,Le){we?mt(we):Ft(Le)});try{Et.apply(this,tt)}catch(we){mt(we)}return St}return Object.setPrototypeOf(vt,Object.getPrototypeOf(Et)),Pt&&Object.defineProperty(vt,Pt,{value:vt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(vt,me(Et))},De.promisify.custom=Pt;function dt(ht,Et){if(!ht){var vt=new Error("Promise was rejected with a falsy value");vt.reason=ht,ht=vt}return Et(ht)}function ct(ht){if(typeof ht!="function")throw new TypeError('The "original" argument must be of type Function');function Et(){for(var vt=[],Ft=0;Ft<arguments.length;Ft++)vt.push(arguments[Ft]);var mt=vt.pop();if(typeof mt!="function")throw new TypeError("The last argument must be of type Function");var St=this,tt=function(){return mt.apply(St,arguments)};ht.apply(this,vt).then(function(Ve){fe.nextTick(tt.bind(null,null,Ve))},function(Ve){fe.nextTick(dt.bind(null,Ve,tt))})}return Object.setPrototypeOf(Et,Object.getPrototypeOf(ht)),Object.defineProperties(Et,me(ht)),Et}De.callbackify=ct}).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"),xe=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};xe&&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(!xe){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(xe){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 xe)Me.call(xe,de)&&(ee=xe[de],this.options[de]=ee)}return ve.prototype.buildObject=function(xe){var de,z,ee,ae,ie;return de=this.options.attrkey,z=this.options.charkey,Object.keys(xe).length===1&&this.options.rootName===me["0.2"].rootName?(ie=Object.keys(xe)[0],xe=xe[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,xe).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,xe,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;xe=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=xe.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,Re,We,Ye;if(Re={},Re[ge]="",!Be.options.ignoreAttrs){Ye=Fe.attributes;for(Ne in Ye)ae.call(Ye,Ne)&&(!(ue in Re)&&!Be.options.mergeAttrs&&(Re[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(Re,We,Ae):ke(Re[ue],We,Ae))}return Re["#name"]=Be.options.tagNameProcessors?Me(Be.options.tagNameProcessors,Fe.name):Fe.name,Be.options.xmlns&&(Re[Be.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),je.push(Re)}}(this),this.saxParser.onclosetag=function(Be){return function(){var Fe,Ne,Ae,Re,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 ft,bt,$e;for($e=[],ft=0,bt=je.length;ft<bt;ft++)Re=je[ft],$e.push(Re["#name"]);return $e}().concat(We).join("/"),function(){var ft;try{return Ye=Be.options.validator(st,ot&&ot[We],Ye)}catch(bt){return ft=bt,Be.emit("error",ft)}}()),Be.options.explicitChildren&&!Be.options.mergeAttrs&&typeof Ye=="object"){if(!Be.options.preserveChildrenOrder)Re={},Be.options.attrkey in Ye&&(Re[Be.options.attrkey]=Ye[Be.options.attrkey],delete Ye[Be.options.attrkey]),!Be.options.charsAsChildren&&Be.options.charkey in Ye&&(Re[Be.options.charkey]=Ye[Be.options.charkey],delete Ye[Be.options.charkey]),Object.getOwnPropertyNames(Ye).length>0&&(Re[Be.options.childkey]=Ye),Ye=Re;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,xe){for(var de in xe)Me.call(xe,de)&&(ve[de]=xe[de]);function z(){this.constructor=ve}return z.prototype=xe.prototype,ve.prototype=new z,ve.__super__=xe.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(xe,ve);function xe(de){this.message=de}return xe}(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,xe=[].slice,de={}.hasOwnProperty;fe=function(){var z,ee,ae,ie,le,ue;if(ue=arguments[0],le=2<=arguments.length?xe.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 xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe,de){if(ve.__super__.constructor.call(this,xe),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(xe){return this.options.writer.cdata(this,this.options.writer.filterOptions(xe))},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 xe(){this.constructor=Se}return xe.prototype=Me.prototype,Se.prototype=new xe,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,xe){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,xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.deleteData=function(ve,xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.replaceData=function(ve,xe,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 xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe,de){if(ve.__super__.constructor.call(this,xe),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(xe){return this.options.writer.comment(this,this.options.writer.filterOptions(xe))},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 xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe,de,z,ee,ae,ie){if(ve.__super__.constructor.call(this,xe),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(xe){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(xe))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe,de,z){if(ve.__super__.constructor.call(this,xe),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(xe){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(xe))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,xe){for(var de in xe)Me.call(xe,de)&&(ve[de]=xe[de]);function z(){this.constructor=ve}return z.prototype=xe.prototype,ve.prototype=new z,ve.__super__=xe.prototype,ve},Me={}.hasOwnProperty;Ce=oe("./Utility").isObject,ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(ve){Se(xe,ve);function xe(de,z,ee,ae){if(xe.__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(xe.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(xe.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(xe.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(xe.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(xe.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(xe.prototype,"xmlVersion",{get:function(){return null}}),xe.prototype.toString=function(de){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(de))},xe}(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 xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe,de,z){if(ve.__super__.constructor.call(this,xe),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(xe){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(xe))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,xe){for(var de in xe)Me.call(xe,de)&&(ve[de]=xe[de]);function z(){this.constructor=ve}return z.prototype=xe.prototype,ve.prototype=new z,ve.__super__=xe.prototype,ve},Me={}.hasOwnProperty;Ce=oe("./Utility").isObject,ke=oe("./XMLNode"),fe=oe("./NodeType"),ze.exports=me=function(ve){Se(xe,ve);function xe(de,z,ee,ae){var ie;xe.__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 xe.prototype.toString=function(de){return this.options.writer.declaration(this,this.options.writer.filterOptions(de))},xe}(ke)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,xe,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,xe=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}(xe)}).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,xe,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;xe=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?xe(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,xe,de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye={}.hasOwnProperty;We=oe("./Utility"),Ae=We.isObject,Ne=We.isFunction,Re=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"),xe=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 ft;this.name="?xml",this.type=fe.Document,Ke||(Ke={}),ft={},Ke.writer?Re(Ke.writer)&&(ft=Ke.writer,Ke.writer=new Pe):Ke.writer=new Pe,this.options=Ke,this.writer=Ke.writer,this.writerOptions=this.writer.filterOptions(ft),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,ft,bt,$e,nt,xt,wt;switch(Ke.type){case fe.CData:this.cdata(Ke.value);break;case fe.Comment:this.comment(Ke.value);break;case fe.Element:ft={},xt=Ke.attribs;for(st in xt)Ye.call(xt,st)&&(ot=xt[st],ft[st]=ot.value);this.node(Ke.name,ft);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(wt=Ke.children,$e=0,nt=wt.length;$e<nt;$e++)bt=wt[$e],this.createChildNode(bt),bt.type===fe.Element&&this.up();return this},Ue.prototype.dummy=function(){return this},Ue.prototype.node=function(Ke,ot,st){var ft;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)||(ft=[ot,st],st=ft[0],ot=ft[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 ft,bt,$e,nt,xt,wt;if(this.currentNode&&this.currentNode.type===fe.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ke)||Ae(Ke)||Ne(Ke))for(nt=this.options.noValidation,this.options.noValidation=!0,wt=new ae(this.options).element("TEMP_ROOT"),wt.element(Ke),this.options.noValidation=nt,xt=wt.children,bt=0,$e=xt.length;bt<$e;bt++)ft=xt[bt],this.createChildNode(ft),ft.type===fe.Element&&this.up();else this.node(Ke,ot,st);return this},Ue.prototype.attribute=function(Ke,ot){var st,ft;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)&&(ft=Ke[st],this.attribute(st,ft));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,ft,bt,$e,nt;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++)ft=Ke[st],this.instruction(ft);else if(Ae(Ke))for(ft in Ke)Ye.call(Ke,ft)&&(bt=Ke[ft],this.instruction(ft,bt));else Ne(ot)&&(ot=ot.apply()),nt=new ue(this,Ke,ot),this.onData(this.writer.processingInstruction(nt,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ue.prototype.declaration=function(Ke,ot,st){var ft;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ft=new z(this,Ke,ot,st),this.onData(this.writer.declaration(ft,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,ft,bt){var $e;return this.openCurrent(),$e=new Me(this,Ke,ot,st,ft,bt),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 xe(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 xe(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,ft,bt;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,bt=Ke.attribs;for(ft in bt)Ye.call(bt,ft)&&(ot=bt[ft],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 xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe){ve.__super__.constructor.call(this,xe),this.type=fe.Dummy}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(xe){return""},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,xe,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"),xe=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)),xe(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,xe,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,xe=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,xe||(xe=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,Re,We,Ye,Ue;if(this.nodeType===me.Element||this.nodeType===me.DocumentFragment){for(Ue="",Ye=this.children,Re=0,We=Ye.length;Re<We;Re++)Ae=Ye[Re],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 Re,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++)Re=Ue[We],Ke.push(Re.setParent(this));return Ke},Ne.prototype.element=function(Ae,Re,We){var Ye,Ue,Ke,ot,st,ft,bt,$e,nt,xt,wt;if(ft=null,Re===null&&We==null&&(nt=[{},null],Re=nt[0],We=nt[1]),Re==null&&(Re={}),Re=ue(Re),je(Re)||(xt=[Re,We],We=xt[0],Re=xt[1]),Ae!=null&&(Ae=ue(Ae)),Array.isArray(Ae))for(Ke=0,bt=Ae.length;Ke<bt;Ke++)Ue=Ae[Ke],ft=this.element(Ue);else if(Pe(Ae))ft=this.element(Ae.apply());else if(je(Ae)){for(st in Ae)if(Fe.call(Ae,st))if(wt=Ae[st],Pe(wt)&&(wt=wt.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&st.indexOf(this.stringify.convertAttKey)===0)ft=this.attribute(st.substr(this.stringify.convertAttKey.length),wt);else if(!this.options.separateArrayItems&&Array.isArray(wt)&&ge(wt))ft=this.dummy();else if(je(wt)&&ge(wt))ft=this.element(st);else if(!this.options.keepNullNodes&&wt==null)ft=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(wt))for(ot=0,$e=wt.length;ot<$e;ot++)Ue=wt[ot],Ye={},Ye[st]=Ue,ft=this.element(Ye);else je(wt)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&st.indexOf(this.stringify.convertTextKey)===0?ft=this.element(wt):(ft=this.element(st),ft.element(wt)):ft=this.element(st,wt)}else!this.options.keepNullNodes&&We===null?ft=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Ae.indexOf(this.stringify.convertTextKey)===0?ft=this.text(We):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Ae.indexOf(this.stringify.convertCDataKey)===0?ft=this.cdata(We):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Ae.indexOf(this.stringify.convertCommentKey)===0?ft=this.comment(We):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Ae.indexOf(this.stringify.convertRawKey)===0?ft=this.raw(We):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Ae.indexOf(this.stringify.convertPIKey)===0?ft=this.instruction(Ae.substr(this.stringify.convertPIKey.length),We):ft=this.node(Ae,Re,We);if(ft==null)throw new Error("Could not create any elements with: "+Ae+". "+this.debugInfo());return ft},Ne.prototype.insertBefore=function(Ae,Re,We){var Ye,Ue,Ke,ot,st;if(Ae!=null&&Ae.type)return Ke=Ae,ot=Re,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,Re,We),Array.prototype.push.apply(this.parent.children,st),Ye},Ne.prototype.insertAfter=function(Ae,Re,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,Re,We),Array.prototype.push.apply(this.parent.children,Ke),Ye},Ne.prototype.remove=function(){var Ae,Re;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(Re=[])),this.parent},Ne.prototype.node=function(Ae,Re,We){var Ye,Ue;return Ae!=null&&(Ae=ue(Ae)),Re||(Re={}),Re=ue(Re),je(Re)||(Ue=[Re,We],We=Ue[0],Re=Ue[1]),Ye=new xe(this,Ae,Re),We!=null&&Ye.text(We),this.children.push(Ye),Ye},Ne.prototype.text=function(Ae){var Re;return je(Ae)&&this.element(Ae),Re=new le(this,Ae),this.children.push(Re),this},Ne.prototype.cdata=function(Ae){var Re;return Re=new ke(this,Ae),this.children.push(Re),this},Ne.prototype.comment=function(Ae){var Re;return Re=new Ce(this,Ae),this.children.push(Re),this},Ne.prototype.commentBefore=function(Ae){var Re,We,Ye;return We=this.parent.children.indexOf(this),Ye=this.parent.children.splice(We),Re=this.parent.comment(Ae),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.commentAfter=function(Ae){var Re,We,Ye;return We=this.parent.children.indexOf(this),Ye=this.parent.children.splice(We+1),Re=this.parent.comment(Ae),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.raw=function(Ae){var Re;return Re=new ie(this,Ae),this.children.push(Re),this},Ne.prototype.dummy=function(){var Ae;return Ae=new ve(this),Ae},Ne.prototype.instruction=function(Ae,Re){var We,Ye,Ue,Ke,ot;if(Ae!=null&&(Ae=ue(Ae)),Re!=null&&(Re=ue(Re)),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(Re)&&(Re=Re.apply()),Ue=new ae(this,Ae,Re),this.children.push(Ue);return this},Ne.prototype.instructionBefore=function(Ae,Re){var We,Ye,Ue;return Ye=this.parent.children.indexOf(this),Ue=this.parent.children.splice(Ye),We=this.parent.instruction(Ae,Re),Array.prototype.push.apply(this.parent.children,Ue),this},Ne.prototype.instructionAfter=function(Ae,Re){var We,Ye,Ue;return Ye=this.parent.children.indexOf(this),Ue=this.parent.children.splice(Ye+1),We=this.parent.instruction(Ae,Re),Array.prototype.push.apply(this.parent.children,Ue),this},Ne.prototype.declaration=function(Ae,Re,We){var Ye,Ue;return Ye=this.document(),Ue=new Se(Ye,Ae,Re,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,Re){var We,Ye,Ue,Ke,ot,st,ft,bt,$e,nt;for(Ye=this.document(),Ue=new Me(Ye,Ae,Re),$e=Ye.children,Ke=ot=0,ft=$e.length;ot<ft;Ke=++ot)if(We=$e[Ke],We.type===me.DocType)return Ye.children[Ke]=Ue,Ue;for(nt=Ye.children,Ke=st=0,bt=nt.length;st<bt;Ke=++st)if(We=nt[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 Re;return Re=Ae.root().clone(),Re.parent=this,Re.isRoot=!1,this.children.push(Re),this},Ne.prototype.debugInfo=function(Ae){var Re,We;return Ae=Ae||this.name,Ae==null&&!((Re=this.parent)!=null&&Re.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,Re,We){return this.element(Ae,Re,We)},Ne.prototype.nod=function(Ae,Re,We){return this.node(Ae,Re,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,Re){return this.instruction(Ae,Re)},Ne.prototype.doc=function(){return this.document()},Ne.prototype.dec=function(Ae,Re,We){return this.declaration(Ae,Re,We)},Ne.prototype.e=function(Ae,Re,We){return this.element(Ae,Re,We)},Ne.prototype.n=function(Ae,Re,We){return this.node(Ae,Re,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,Re){return this.instruction(Ae,Re)},Ne.prototype.u=function(){return this.up()},Ne.prototype.importXMLBuilder=function(Ae){return this.importDocument(Ae)},Ne.prototype.replaceChild=function(Ae,Re){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,Re){return!0},Ne.prototype.hasAttributes=function(){return this.attribs.length!==0},Ne.prototype.compareDocumentPosition=function(Ae){var Re,We;return Re=this,Re===Ae?0:this.document()!==Ae.document()?(We=fe.Disconnected|fe.ImplementationSpecific,Math.random()<.5?We|=fe.Preceding:We|=fe.Following,We):Re.isAncestor(Ae)?fe.Contains|fe.Preceding:Re.isDescendant(Ae)?fe.Contains|fe.Following:Re.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 Re,We,Ye;if(Ae.nodeType!==this.nodeType||Ae.children.length!==this.children.length)return!1;for(Re=We=0,Ye=this.children.length-1;0<=Ye?We<=Ye:We>=Ye;Re=0<=Ye?++We:--We)if(!this.children[Re].isEqualNode(Ae.children[Re]))return!1;return!0},Ne.prototype.getFeature=function(Ae,Re){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.setUserData=function(Ae,Re,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 Re,We,Ye,Ue,Ke;for(Ke=this.children,Ye=0,Ue=Ke.length;Ye<Ue;Ye++)if(Re=Ke[Ye],Ae===Re||(We=Re.isDescendant(Ae),We))return!0;return!1},Ne.prototype.isAncestor=function(Ae){return Ae.isDescendant(this)},Ne.prototype.isPreceding=function(Ae){var Re,We;return Re=this.treePosition(Ae),We=this.treePosition(this),Re===-1||We===-1?!1:Re<We},Ne.prototype.isFollowing=function(Ae){var Re,We;return Re=this.treePosition(Ae),We=this.treePosition(this),Re===-1||We===-1?!1:Re>We},Ne.prototype.treePosition=function(Ae){var Re,We;return We=0,Re=!1,this.foreachTreeNode(this.document(),function(Ye){if(We++,!Re&&Ye===Ae)return Re=!0}),Re?We:-1},Ne.prototype.foreachTreeNode=function(Ae,Re){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=Re(We))return ot;if(ot=this.foreachTreeNode(We,Re),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 xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe,de,z){if(ve.__super__.constructor.call(this,xe),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(xe){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(xe))},ve.prototype.isEqualNode=function(xe){return!(!ve.__super__.isEqualNode.apply(this,arguments).isEqualNode(xe)||xe.target!==this.target)},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(oe,ze,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe,de){if(ve.__super__.constructor.call(this,xe),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(xe){return this.options.writer.raw(this,this.options.writer.filterOptions(xe))},ve}(me)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se=function(ve,xe){for(var de in xe)Me.call(xe,de)&&(ve[de]=xe[de]);function z(){this.constructor=ve}return z.prototype=xe.prototype,ve.prototype=new z,ve.__super__=xe.prototype,ve},Me={}.hasOwnProperty;fe=oe("./NodeType"),Ce=oe("./XMLWriterBase"),me=oe("./WriterState"),ze.exports=ke=function(ve){Se(xe,ve);function xe(de,z){this.stream=de,xe.__super__.constructor.call(this,z)}return xe.prototype.endline=function(de,z,ee){return de.isLastRootNode&&z.state===me.CloseTag?"":xe.__super__.endline.call(this,de,z,ee)},xe.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},xe.prototype.attribute=function(de,z,ee){return this.stream.write(xe.__super__.attribute.call(this,de,z,ee))},xe.prototype.cdata=function(de,z,ee){return this.stream.write(xe.__super__.cdata.call(this,de,z,ee))},xe.prototype.comment=function(de,z,ee){return this.stream.write(xe.__super__.comment.call(this,de,z,ee))},xe.prototype.declaration=function(de,z,ee){return this.stream.write(xe.__super__.declaration.call(this,de,z,ee))},xe.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)},xe.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)},xe.prototype.processingInstruction=function(de,z,ee){return this.stream.write(xe.__super__.processingInstruction.call(this,de,z,ee))},xe.prototype.raw=function(de,z,ee){return this.stream.write(xe.__super__.raw.call(this,de,z,ee))},xe.prototype.text=function(de,z,ee){return this.stream.write(xe.__super__.text.call(this,de,z,ee))},xe.prototype.dtdAttList=function(de,z,ee){return this.stream.write(xe.__super__.dtdAttList.call(this,de,z,ee))},xe.prototype.dtdElement=function(de,z,ee){return this.stream.write(xe.__super__.dtdElement.call(this,de,z,ee))},xe.prototype.dtdEntity=function(de,z,ee){return this.stream.write(xe.__super__.dtdEntity.call(this,de,z,ee))},xe.prototype.dtdNotation=function(de,z,ee){return this.stream.write(xe.__super__.dtdNotation.call(this,de,z,ee))},xe}(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 xe(){this.constructor=Se}return xe.prototype=Me.prototype,Se.prototype=new xe,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,xe){var de,z,ee,ae,ie;for(xe=this.filterOptions(xe),ae="",ie=ve.children,z=0,ee=ie.length;z<ee;z++)de=ie[z],ae+=this.writeChildNode(de,xe,0);return xe.pretty&&ae.slice(-xe.newline.length)===xe.newline&&(ae=ae.slice(0,-xe.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,xe;Se||(Se={}),this.options=Se,this.options.version||(this.options.version="1.0"),ve=Se.stringify||{};for(Me in ve)ke.call(ve,Me)&&(xe=ve[Me],this[Me]=xe)}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 xe in ve)Se.call(ve,xe)&&(Me[xe]=ve[xe]);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(xe,de){if(ve.__super__.constructor.call(this,xe),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 xe,de,z;for(z="",de=this.previousSibling;de;)z=de.data+z,de=de.previousSibling;for(z+=this.data,xe=this.nextSibling;xe;)z=z+xe.data,xe=xe.nextSibling;return z}}),ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(xe){return this.options.writer.text(this,this.options.writer.filterOptions(xe))},ve.prototype.splitText=function(xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve.prototype.replaceWholeText=function(xe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(oe,ze,De){(function(){var fe,me,ke,Ce,Se,Me,ve,xe,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"),xe=oe("./XMLDTDNotation"),me=oe("./WriterState"),ze.exports=ge=function(){function Be(Fe){var Ne,Ae,Re;Fe||(Fe={}),this.options=Fe,Ae=Fe.writer||{};for(Ne in Ae)je.call(Ae,Ne)&&(Re=Ae[Ne],this["_"+Ne]=this[Ne],this[Ne]=Re)}return Be.prototype.filterOptions=function(Fe){var Ne,Ae,Re,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=(Re=Fe.newline)!=null?Re:`
`,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 Re;return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.pretty&&(Re=(Ae||0)+Ne.offset+1,Re>0)?new Array(Re).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 Re;return this.openAttribute(Fe,Ne,Ae),Re=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Ne,Ae),Re},Be.prototype.cdata=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<![CDATA[",Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+="]]>"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.comment=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!-- ",Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=" -->"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.declaration=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<?xml",Ne.state=me.InsideTag,Re+=' version="'+Fe.version+'"',Fe.encoding!=null&&(Re+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(Re+=' standalone="'+Fe.standalone+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+"?>",Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.docType=function(Fe,Ne,Ae){var Re,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++)Re=Ke[We],Ue+=this.writeChildNode(Re,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 Re,We,Ye,Ue,Ke,ot,st,ft,bt,$e,nt,xt,wt,Pt;Ae||(Ae=0),$e=!1,nt="",this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,nt+=this.indent(Fe,Ne,Ae)+"<"+Fe.name,xt=Fe.attribs;for(bt in xt)je.call(xt,bt)&&(Re=xt[bt],nt+=this.attribute(Re,Ne,Ae));if(Ye=Fe.children.length,Ue=Ye===0?null:Fe.children[0],Ye===0||Fe.children.every(function(dt){return(dt.type===fe.Text||dt.type===fe.Raw)&&dt.value===""}))Ne.allowEmpty?(nt+=">",Ne.state=me.CloseTag,nt+="</"+Fe.name+">"+this.endline(Fe,Ne,Ae)):(Ne.state=me.CloseTag,nt+=Ne.spaceBeforeSlash+"/>"+this.endline(Fe,Ne,Ae));else if(Ne.pretty&&Ye===1&&(Ue.type===fe.Text||Ue.type===fe.Raw)&&Ue.value!=null)nt+=">",Ne.state=me.InsideTag,Ne.suppressPrettyCount++,$e=!0,nt+=this.writeChildNode(Ue,Ne,Ae+1),Ne.suppressPrettyCount--,$e=!1,Ne.state=me.CloseTag,nt+="</"+Fe.name+">"+this.endline(Fe,Ne,Ae);else{if(Ne.dontPrettyTextNodes){for(wt=Fe.children,Ke=0,st=wt.length;Ke<st;Ke++)if(We=wt[Ke],(We.type===fe.Text||We.type===fe.Raw)&&We.value!=null){Ne.suppressPrettyCount++,$e=!0;break}}for(nt+=">"+this.endline(Fe,Ne,Ae),Ne.state=me.InsideTag,Pt=Fe.children,ot=0,ft=Pt.length;ot<ft;ot++)We=Pt[ot],nt+=this.writeChildNode(We,Ne,Ae+1);Ne.state=me.CloseTag,nt+=this.indent(Fe,Ne,Ae)+"</"+Fe.name+">",$e&&Ne.suppressPrettyCount--,nt+=this.endline(Fe,Ne,Ae),Ne.state=me.None}return this.closeNode(Fe,Ne,Ae),nt},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 Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<?",Ne.state=me.InsideTag,Re+=Fe.target,Fe.value&&(Re+=" "+Fe.value),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+"?>",Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.raw=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae),Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.text=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae),Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdAttList=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ATTLIST",Ne.state=me.InsideTag,Re+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(Re+=" "+Fe.defaultValueType),Fe.defaultValue&&(Re+=' "'+Fe.defaultValue+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdElement=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ELEMENT",Ne.state=me.InsideTag,Re+=" "+Fe.name+" "+Fe.value,Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdEntity=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ENTITY",Ne.state=me.InsideTag,Fe.pe&&(Re+=" %"),Re+=" "+Fe.name,Fe.value?Re+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?Re+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Re+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(Re+=" NDATA "+Fe.nData)),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdNotation=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!NOTATION",Ne.state=me.InsideTag,Re+=" "+Fe.name,Fe.pubID&&Fe.sysID?Re+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?Re+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(Re+=' SYSTEM "'+Fe.sysID+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},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,xe,de,z;z=oe("./Utility"),xe=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=xe({},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 xe(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 xe(z)},De.createHmac=function(z,ee){return xe(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(xe,de){if(xe.length%me!==0){var z=xe.length+(me-xe.length%me);xe=fe.concat([xe,ke],z)}for(var ee=[],ae=de?xe.readInt32BE:xe.readInt32LE,ie=0;ie<xe.length;ie+=me)ee.push(ae.call(xe,ie));return ee}function Me(xe,de,z){for(var ee=fe.alloc(de),ae=z?ee.writeInt32BE:ee.writeInt32LE,ie=0;ie<xe.length;ie++)ae.call(ee,xe[ie],ie*4,!0);return ee}function ve(xe,de,z,ee){fe.isBuffer(xe)||(xe=fe.from(xe));var ae=de(Se(xe,ee),xe.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=xe(ie,le,ue,ge,ee[Pe+0],6,-198630844),ge=xe(ge,ie,le,ue,ee[Pe+7],10,1126891415),ue=xe(ue,ge,ie,le,ee[Pe+14],15,-1416354905),le=xe(le,ue,ge,ie,ee[Pe+5],21,-57434055),ie=xe(ie,le,ue,ge,ee[Pe+12],6,1700485571),ge=xe(ge,ie,le,ue,ee[Pe+3],10,-1894986606),ue=xe(ue,ge,ie,le,ee[Pe+10],15,-1051523),le=xe(le,ue,ge,ie,ee[Pe+1],21,-2054922799),ie=xe(ie,le,ue,ge,ee[Pe+8],6,1873313359),ge=xe(ge,ie,le,ue,ee[Pe+15],10,-30611744),ue=xe(ue,ge,ie,le,ee[Pe+6],15,-1560198380),le=xe(le,ue,ge,ie,ee[Pe+13],21,1309151649),ie=xe(ie,le,ue,ge,ee[Pe+4],6,-145523070),ge=xe(ge,ie,le,ue,ee[Pe+11],10,-1120210379),ue=xe(ue,ge,ie,le,ee[Pe+2],15,718787259),le=xe(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 xe(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,xe){ve[xe>>5]|=128<<24-xe%32,ve[(xe+64>>9<<4)+15]=xe;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,xe,de,z){return ve<20?xe&de|~xe&z:ve<40?xe^de^z:ve<60?xe&de|xe&z|de&z:xe^de^z}function Ce(ve){return ve<20?1518500249:ve<40?1859775393:ve<60?-1894007588:-899497514}function Se(ve,xe){var de=(ve&65535)+(xe&65535),z=(ve>>16)+(xe>>16)+(de>>16);return z<<16|de&65535}function Me(ve,xe){return ve<<xe|ve>>>32-xe}ze.exports=function(xe){return fe.hash(xe,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 xe(de){return de instanceof Se}ze.exports.writableStream=function(z){return xe(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(xe,de){typeof xe=="string"?xe=Me.parse(xe):xe=Ce(xe);var z=fe.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=xe.protocol||z,ae=xe.hostname||xe.host,ie=xe.port,le=xe.path||"/";ae&&ae.indexOf(":")!==-1&&(ae="["+ae+"]"),xe.url=(ae?ee+"//"+ae:"")+(ie?":"+ie:"")+le,xe.method=(xe.method||"GET").toUpperCase(),xe.headers=xe.headers||{};var ue=new me(xe);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(xe){}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(xe){me=null}}else me=null;return me}function Ce(xe){var de=ke();if(!de)return!1;try{return de.responseType=xe,de.responseType===xe}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(xe){return typeof xe=="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"),xe=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=xe(ke.concat(ue._body)):Ce.blobConstructor?je=new me.Blob(ue._body.map(function(We){return xe(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 Re=ue._xhr=new me.XMLHttpRequest;try{Re.open(ue._opts.method,ue._opts.url,!0)}catch(We){fe.nextTick(function(){ue.emit("error",We)});return}"responseType"in Re&&(Re.responseType=ue._mode.split(":")[0]),"withCredentials"in Re&&(Re.withCredentials=!!ge.withCredentials),ue._mode==="text"&&"overrideMimeType"in Re&&Re.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in ge&&(Re.timeout=ge.requestTimeout,Re.ontimeout=function(){ue.emit("requestTimeout")}),Be.forEach(function(We){Re.setRequestHeader(We[0],We[1])}),ue._response=null,Re.onreadystatechange=function(){switch(Re.readyState){case z.LOADING:case z.DONE:ue._onXHRProgress();break}},ue._mode==="moz-chunked-arraybuffer"&&(Re.onprogress=function(){ue._onXHRProgress()}),Re.onerror=function(){ue._destroyed||ue.emit("error",new Error("XHR error"))};try{Re.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},xe=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,Re){ie._destroyed?Re():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(xe,Me.Readable),xe.prototype._read=function(){var de=this,z=de._resumeFetch;z&&(de._resumeFetch=null,z())},xe.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=Re,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]*$/,xe=/^(\/\/?(?!\/)[^\?\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("#")?"?":"#",ft=Ye.split(st),bt=/\\/g;ft[0]=ft[0].replace(bt,"/"),Ye=ft.join(st);var $e=Ye;if($e=$e.trim(),!Ke&&Ye.split("#").length===1){var nt=xe.exec($e);if(nt)return this.path=$e,this.href=$e,this.pathname=nt[1],nt[2]?(this.search=nt[2],Ue?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ue&&(this.search="",this.query={}),this}var xt=Me.exec($e);if(xt){xt=xt[0];var wt=xt.toLowerCase();this.protocol=wt,$e=$e.substr(xt.length)}if(Ke||xt||$e.match(/^\/\/[^@\/]+@[^@\/]+/)){var Pt=$e.substr(0,2)==="//";Pt&&!(xt&&je[xt])&&($e=$e.substr(2),this.slashes=!0)}if(!je[xt]&&(Pt||xt&&!Be[xt])){for(var dt=-1,ct=0;ct<ie.length;ct++){var ht=$e.indexOf(ie[ct]);ht!==-1&&(dt===-1||ht<dt)&&(dt=ht)}var Et,vt;dt===-1?vt=$e.lastIndexOf("@"):vt=$e.lastIndexOf("@",dt),vt!==-1&&(Et=$e.slice(0,vt),$e=$e.slice(vt+1),this.auth=decodeURIComponent(Et)),dt=-1;for(var ct=0;ct<ae.length;ct++){var ht=$e.indexOf(ae[ct]);ht!==-1&&(dt===-1||ht<dt)&&(dt=ht)}dt===-1&&(dt=$e.length),this.host=$e.slice(0,dt),$e=$e.slice(dt),this.parseHost(),this.hostname=this.hostname||"";var Ft=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Ft)for(var mt=this.hostname.split("."),ct=0,St=mt.length;ct<St;ct++){var tt=mt[ct];if(tt&&!tt.match(ue)){for(var Ve="",we=0,Le=tt.length;we<Le;we++)tt.charCodeAt(we)>127?Ve+="x":Ve+=tt[we];if(!Ve.match(ue)){var Ze=mt.slice(0,ct),rt=mt.slice(ct+1),Ie=tt.match(ge);Ie&&(Ze.push(Ie[1]),rt.unshift(Ie[2])),rt.length&&($e="/"+rt.join(".")+$e),this.hostname=Ze.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ft||(this.hostname=ke.toASCII(this.hostname));var _e=this.port?":"+this.port:"",He=this.hostname||"";this.host=He+_e,this.href+=this.host,Ft&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),$e[0]!=="/"&&($e="/"+$e))}if(!Pe[wt])for(var ct=0,St=ee.length;ct<St;ct++){var Qe=ee[ct];if($e.indexOf(Qe)!==-1){var ut=encodeURIComponent(Qe);ut===Qe&&(ut=escape(Qe)),$e=$e.split(Qe).join(ut)}}var pt=$e.indexOf("#");pt!==-1&&(this.hash=$e.substr(pt),$e=$e.slice(0,pt));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[wt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",At=this.search||"";this.path=_e+At}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,ft="";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&&(ft=Fe.stringify(this.query));var bt=this.search||ft&&"?"+ft||"";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),bt&&bt.charAt(0)!=="?"&&(bt="?"+bt),Ke=Ke.replace(/[?#]/g,function($e){return encodeURIComponent($e)}),bt=bt.replace("#","%23"),Ue+st+Ke+bt+ot};function Re(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 ft=ot[st];Ke[ft]=this[ft]}if(Ke.hash=Ye.hash,Ye.href==="")return Ke.href=Ke.format(),Ke;if(Ye.slashes&&!Ye.protocol){for(var bt=Object.keys(Ye),$e=0;$e<bt.length;$e++){var nt=bt[$e];nt!=="protocol"&&(Ke[nt]=Ye[nt])}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 xt=Object.keys(Ye),wt=0;wt<xt.length;wt++){var Pt=xt[wt];Ke[Pt]=Ye[Pt]}return Ke.href=Ke.format(),Ke}if(Ke.protocol=Ye.protocol,!Ye.host&&!je[Ye.protocol]){for(var St=(Ye.pathname||"").split("/");St.length&&!(Ye.host=St.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),St[0]!==""&&St.unshift(""),St.length<2&&St.unshift(""),Ke.pathname=St.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 dt=Ke.pathname||"",ct=Ke.search||"";Ke.path=dt+ct}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)==="/",vt=Et||ht||Ke.host&&Ye.pathname,Ft=vt,mt=Ke.pathname&&Ke.pathname.split("/")||[],St=Ye.pathname&&Ye.pathname.split("/")||[],tt=Ke.protocol&&!Be[Ke.protocol];if(tt&&(Ke.hostname="",Ke.port=null,Ke.host&&(mt[0]===""?mt[0]=Ke.host:mt.unshift(Ke.host)),Ke.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(St[0]===""?St[0]=Ye.host:St.unshift(Ye.host)),Ye.host=null),vt=vt&&(St[0]===""||mt[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,mt=St;else if(St.length)mt||(mt=[]),mt.pop(),mt=mt.concat(St),Ke.search=Ye.search,Ke.query=Ye.query;else if(!Ce.isNullOrUndefined(Ye.search)){if(tt){Ke.hostname=Ke.host=mt.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(!mt.length)return Ke.pathname=null,Ke.search?Ke.path="/"+Ke.search:Ke.path=null,Ke.href=Ke.format(),Ke;for(var we=mt.slice(-1)[0],Le=(Ke.host||Ye.host||mt.length>1)&&(we==="."||we==="..")||we==="",Ze=0,rt=mt.length;rt>=0;rt--)we=mt[rt],we==="."?mt.splice(rt,1):we===".."?(mt.splice(rt,1),Ze++):Ze&&(mt.splice(rt,1),Ze--);if(!vt&&!Ft)for(;Ze--;Ze)mt.unshift("..");vt&&mt[0]!==""&&(!mt[0]||mt[0].charAt(0)!=="/")&&mt.unshift(""),Le&&mt.join("/").substr(-1)!=="/"&&mt.push("");var Ie=mt[0]===""||mt[0]&&mt[0].charAt(0)==="/";if(tt){Ke.hostname=Ke.host=Ie?"":mt.length?mt.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 vt=vt||Ke.host&&mt.length,vt&&!Ie&&mt.unshift(""),mt.length?Ke.pathname=mt.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"),xe=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,Re){De.requestWithCallback(Be,Fe,ge(Ae,Re))})},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 Re=++ee;Fe.requestUrls=Fe.requestUrls||[];var We={requestId:Re,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,ft=le(Fe.agent,De.agent),bt=Fe.fixJSONCtlChars;Ue.protocol==="https:"&&(st=xe,ft=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:ft,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 nt=Fe.auth||Ue.auth;nt&&($e.auth=nt);var xt=Fe.content||Fe.data,wt=Ke==="GET"||Ke==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&xt&&!(typeof xt=="string"||me.isBuffer(xt)))if(wt)xt=Fe.nestedQuerystring?qs.stringify(xt):querystring.stringify(xt);else{var Pt=$e.headers["Content-Type"]||$e.headers["content-type"];Pt||(Fe.contentType==="json"?Pt="application/json":Pt="application/x-www-form-urlencoded",$e.headers["Content-Type"]=Pt),ue(Pt)==="application/json"?xt=JSON.stringify(xt):xt=Fe.nestedQuerystring?qs.stringify(xt):querystring.stringify(xt)}wt&&xt&&($e.path+=(Ue.query?"&":"?")+xt,xt=null);var dt=0;if(xt){var ct=xt.length;me.isBuffer(xt)||(ct=me.byteLength(xt)),dt=$e.headers["Content-Length"]=ct}Fe.dataType==="json"&&($e.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest($e);var ht=null,Et=null,vt=null,Ft=!1,mt=!1,St=0,tt=-1,Ve=!1,we="",Le="",Ze=null;Fe.timing&&(Ze={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function rt(){ht&&(clearTimeout(ht),ht=null)}function Ie(){Et&&(clearTimeout(Et),Et=null)}function _e(Ut,sn,tn){if(Ie(),!Ne){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Re,fe.pid,$e.method,Be),Ut&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),Re,fe.pid,Ut.name,Ut.message,Ut.stack);return}var Wt=Ne;Ne=null;var Pn={};tn&&(tt=tn.statusCode,Pn=tn.headers);var Sn=Date.now()-Ye;Ze&&(Ze.contentDownload=Sn),de("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Sn,St,tt,$e.method,$e.host,$e.path,mt,Ze);var Tn={status:tt,statusCode:tt,headers:Pn,size:St,aborted:Ve,rt:Sn,keepAliveSocket:mt,data:sn,requestUrls:Fe.requestUrls,timing:Ze,remoteAddress:we,remotePort:Le};if(Ut){var Kn="";ft&&typeof ft.getCurrentStatus=="function"&&(Kn=", agent status: "+JSON.stringify(ft.getCurrentStatus())),Ut.message+=", "+$e.method+" "+Be+" "+tt+" (connected: "+Ft+", keepalive socket: "+mt+Kn+`)
headers: `+JSON.stringify(Pn),Ut.data=sn,Ut.path=$e.path,Ut.status=tt,Ut.headers=Pn,Ut.res=Tn}Wt(Ut,sn,Fe.streaming?tn:Tn),Fe.emitter&&(We.url=Be,We.socket=Xt&&Xt.connection,We.options=$e,We.size=dt,Fe.emitter.emit("response",{requestId:Re,error:Ut,ctx:Fe.ctx,req:We,res:Tn}))}function He(Ut){var sn=null;if(Fe.followRedirect&&statuses.redirect[Ut.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var tn=Ut.headers.location;if(!tn)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,tn):Me.resolve(Be,tn);de("Request#%d %s: `redirected` from %s to %s",Re,$e.path,Be,Wt),Ie(),Fe.headers&&Fe.headers.Host&&ie.test(tn)&&(Fe.headers.Host=null);var Pn=Ne;return Ne=null,De.requestWithCallback(Wt,Fe,Pn),{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,tn){var Wt=Ut.headers["content-encoding"];return tn(null,sn,Wt)}var ut=Fe.writeStream;de("Request#%d %s %s with headers %j, options.path: %s",Re,Ke,Be,$e.headers,$e.path),Fe.requestUrls.push(Be);function pt(Ut){if(Ze&&(Ze.waiting=Date.now()-Ye),de("Request#%d %s `req response` event emit: status %d, headers: %j",Re,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",Re,Be,St)}),Ut.on("error",function(){de("Request#%d %s: `res error` event emit, total size %d",Re,Be,St)}),Ut.on("aborted",function(){Ve=!0,de("Request#%d %s: `res aborted` event emit, total size %d",Re,Be,St)}),ut){var tn=He(Ut);if(tn.redirect){Ut.resume();return}return tn.error?(Ut.resume(),ut.end(),_e(tn.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",Re,Be),_e(vt||null,null,Ut)}),Ut.pipe(ut))}var Wt=[];Ut.on("data",function(Pn){de("Request#%d %s: `res data` event emit, size %d",Re,Be,Pn.length),St+=Pn.length,Wt.push(Pn)}),Ut.on("end",function(){var Pn=me.concat(Wt,St);if(de("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Re,Be,St,Ut._dumped),vt)return _e(vt,Pn,Ut);var Sn=He(Ut);if(Sn.error)return _e(Sn.error,Pn,Ut);Sn.redirect||Qe(Ut,Pn,function(Tn,Kn,Mr){if(Tn)return _e(Tn,Pn,Ut);if(!Mr&&Pe.indexOf(Fe.dataType)>=0){try{Kn=decodeBodyByCharset(Kn,Ut)}catch(Er){return de("decodeBodyByCharset error: %s",Er),_e(null,Kn,Ut)}if(Fe.dataType==="json")if(St===0)Kn=null;else{var fr=parseJSON(Kn,bt);fr.error?Tn=fr.error:Kn=fr.data}}Ve&&de("Request#%d %s: Remote socket was terminated before `response.end()` was called",Re,Be),_e(Tn,Kn,Ut)})})}var Mt,At;Array.isArray(Fe.timeout)?(Mt=z(Fe.timeout[0]),At=z(Fe.timeout[1])):Mt=At=z(Fe.timeout),de("ConnectTimeout: %d, ResponseTimeout: %d",Mt,At);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"),vt=new Error(Ut),vt.name=sn,vt.requestId=Re,de("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Re,Be,vt.name,Ut,Ft),$t()},Mt)}function Kt(){de("Response timer ticking, timeout: %d",At),Et=setTimeout(function(){Et=null;var Ut="Response timeout for "+At+"ms",sn="ResponseTimeoutError";vt=new Error(Ut),vt.name=sn,vt.requestId=Re,de("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Re,Be,vt.name,Ut,Ft),$t()},At)}var Xt;$e.mode=Fe.mode?Fe.mode:"";try{Xt=st.request($e,pt)}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";vt=new Error(Ut),vt.name=sn,vt.requestId=Re,$t()});function $t(){de("Request#%d %s abort, connected: %s",Re,Be,Ft),Xt.socket||(vt.noSocket=!0,_e(vt)),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(tn,Wt,Pn){de("Request#%d %s lookup: %s, %s, %s",Re,Be,tn,Wt,Pn),Ze&&(Ze.dnslookup=Date.now()-Ye),Wt&&(we=Wt)}),Ut.once("connect",function(){Ze&&(Ze.connected=Date.now()-Ye),rt(),Kt(),de("Request#%d %s new socket connected",Re,Be),Ft=!0,we||(we=Ut.remoteAddress),Le=Ut.remotePort});return}de("Request#%d %s reuse socket connected, readyState: %s",Re,Be,sn),Ft=!0,mt=!0,we||(we=Ut.remoteAddress),Le=Ut.remotePort,rt(),Kt()}),Xt.on("error",function(Ut){(Ut.name==="Error"||Ut.name==="TypeError")&&(Ut.name=Ft?"ResponseError":"RequestError"),Ut.message+=' (req "error")',de("Request#%d %s `req error` event emit, %s: %s",Re,Be,Ut.name,Ut.message),_e(vt||Ut)}),ut&&ut.once("error",function(Ut){Ut.message+=' (writeStream "error")',vt=Ut,de("Request#%d %s `writeStream error` event emit, %s: %s",Re,Be,Ut.name,Ut.message),$t()}),Fe.stream?(Fe.stream.pipe(Xt),Fe.stream.once("error",function(Ut){Ut.message+=' (stream "error")',vt=Ut,de("Request#%d %s `readStream error` event emit, %s: %s",Re,Be,Ut.name,Ut.message),$t()})):Xt.end(xt),Xt.requestId=Re,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(gt){gt(at(89780))})(function(gt){gt.defineOption("placeholder","",function(ke,Ce,Se){var Me=Se&&Se!=gt.Init;if(Ce&&!Me)ke.on("blur",De),ke.on("change",fe),ke.on("swapDoc",fe),gt.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),gt.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(gt){gt(at(89780))})(function(gt){var Bt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=gt.Pos;gt.defineOption("autoCloseBrackets",!1,function(z,ee,ae){ae&&ae!=gt.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 gt.Pass;for(var ae=ze(ee,"pairs"),ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return gt.Pass;var ue=xe(z,ie[le].head);if(!ue||ae.indexOf(ue)%2!=0)return gt.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 gt.Pass;for(var ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return gt.Pass;var ue=xe(z,ie[le].head);if(!ue||ae.indexOf(ue)%2!=0)return gt.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=gt.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 gt.Pass;var ie=ze(ae,"pairs"),le=ie.indexOf(ee);if(le==-1)return gt.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],Re=Ae.head,We,Ye=z.getRange(Re,oe(Re.line,Re.ch+1));if(Be&&!Ae.empty())We="surround";else if((Pe||!Be)&&Ye==ee)Pe&&de(z,Re)?We="both":ge.indexOf(ee)>=0&&z.getRange(Re,oe(Re.line,Re.ch+3))==ee+ee+ee?We="skipThree":We="skip";else if(Pe&&Re.ch>1&&ge.indexOf(ee)>=0&&z.getRange(oe(Re.line,Re.ch-2),Re)==ee+ee){if(Re.ch>2&&/\bstring/.test(z.getTokenTypeAt(oe(Re.line,Re.ch-2))))return gt.Pass;We="addFour"}else if(Pe){var Ue=Re.ch==0?" ":z.getRange(oe(Re.line,Re.ch-1),Re);if(!gt.isWordChar(Ye)&&Ue!=ee&&!gt.isWordChar(Ue))We="both";else return gt.Pass}else if(Be&&(Ye.length===0||/\s/.test(Ye)||ue.indexOf(Ye)>-1))We="both";else return gt.Pass;if(!Fe)Fe=We;else if(Fe!=We)return gt.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 ft=z.getSelections(),st=0;st<ft.length;st++)ft[st]=Ke+ft[st]+ot;z.replaceSelections(ft,"around"),ft=z.listSelections().slice();for(var st=0;st<ft.length;st++)ft[st]=Me(ft[st]);z.setSelections(ft)}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 xe(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(gt){gt(at(89780),at(32855))})(function(gt){gt.defineOption("autoCloseTags",!1,function(Ce,Se,Me){if(Me!=gt.Init&&Me&&Ce.removeKeyMap("autoCloseTags"),!!Se){var ve={name:"autoCloseTags"};(typeof Se!="object"||Se.whenClosing!==!1)&&(ve["'/'"]=function(xe){return fe(xe)}),(typeof Se!="object"||Se.whenOpening!==!1)&&(ve["'>'"]=function(xe){return ze(xe)}),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 gt.Pass;for(var Se=Ce.listSelections(),Me=[],ve=Ce.getOption("autoCloseTags"),xe=0;xe<Se.length;xe++){if(!Se[xe].empty())return gt.Pass;var de=Se[xe].head,z=Ce.getTokenAt(de),ee=gt.innerMode(Ce.getMode(),z.state),ae=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ae),le=ie&&ie.name;if(!le)return gt.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 gt.Pass;var Be=typeof ve=="object"&&ve.emptyTags;if(Be&&me(Be,le)>-1){Me[xe]={text:"/>",newPos:gt.Pos(de.line,de.ch+2)};continue}var Fe=Pe&&me(Pe,je)>-1;Me[xe]={indent:Fe,text:">"+(Fe?`
`:"")+"</"+le+">",newPos:Fe?gt.Pos(de.line+1,0):gt.Pos(de.line,de.ch+1)}}for(var Ne=typeof ve=="object"&&ve.dontIndentOnAutoClose,xe=Se.length-1;xe>=0;xe--){var Ae=Me[xe];Ce.replaceRange(Ae.text,Se[xe].head,Se[xe].anchor,"+insert");var Re=Ce.listSelections().slice(0);Re[xe]={head:Ae.newPos,anchor:Ae.newPos},Ce.setSelections(Re),!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=[],xe=Se?"/":"</",de=Ce.getOption("autoCloseTags"),z=typeof de=="object"&&de.dontIndentOnSlash,ee=0;ee<Me.length;ee++){if(!Me[ee].empty())return gt.Pass;var ae=Me[ee].head,ie=Ce.getTokenAt(ae),le=gt.innerMode(Ce.getMode(),ie.state),ue=le.state;if(Se&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=ae.ch-1))return gt.Pass;var ge,Pe=le.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(Pe&&le.mode.name=="javascript")ge=xe+"script";else if(Pe&&le.mode.name=="css")ge=xe+"style";else{var je=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ue);if(!je||je.length&&ke(Ce,je,je[je.length-1],ae))return gt.Pass;ge=xe+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")?gt.Pass:De(Ce,!0)}gt.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,xe){if(!gt.scanForClosingTag)return!1;var de=Math.min(Ce.lastLine()+1,ve.line+500),z=gt.scanForClosingTag(Ce,ve,null,de);if(!z||z.tag!=Me)return!1;for(var ee=xe?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=gt.scanForClosingTag(Ce,ve,null,de);if(!ie||ie.tag!=Me)return!1;ve=ie.to}return!0}})},32855:function(gn,cn,at){(function(gt){gt(at(89780))})(function(gt){"use strict";var Bt=gt.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 xe(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=xe(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)}}}}gt.registerHelper("fold","xml",function(ae,ie){for(var le=new me(ae,ie.line,0);;){var ue=xe(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}}}),gt.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"})}}},gt.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}}},gt.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,gt=/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),xe=/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=gt||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 Re(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 ft(re){var ce=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,ce)}}function bt(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,yt=Oe||0;;){var Lt=re.indexOf(" ",qe);if(Lt<0||Lt>=ce)return yt+(ce-qe);yt+=Lt-qe,yt+=Ee-yt%Ee,qe=Lt+1}}var nt=function(){this.id=null,this.f=null,this.time=0,this.handler=ft(this.onTimeout,this)};nt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},nt.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 xt(re,ce){for(var Ee=0;Ee<re.length;++Ee)if(re[Ee]==ce)return Ee;return-1}var wt=50,Pt={toString:function(){return"CodeMirror.Pass"}},dt={scroll:!1},ct={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 yt=qe-be;if(qe==re.length||Oe+yt>=ce)return be+Math.min(yt,ce-Oe);if(Oe+=qe-be,Oe+=Ee-Oe%Ee,be=qe+1,Oe>=ce)return be}}var vt=[""];function Ft(re){for(;vt.length<=re;)vt.push(mt(vt)+" ");return vt[re]}function mt(re){return re[re.length-1]}function St(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 we(re,ce){var Ee;return Object.create?Ee=Object.create(re):(Ve.prototype=re,Ee=new Ve),ce&&bt(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 rt(re,ce){return ce?ce.source.indexOf("\\w")>-1&&Ze(re)?!0:ce.test(re):Ze(re)}function Ie(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 pt(re,ce,Ee,be){if(!re)return be(ce,Ee,"ltr",0);for(var Oe=!1,qe=0;qe<re.length;++qe){var yt=re[qe];(yt.from<Ee&&yt.to>ce||ce==Ee&&yt.to==ce)&&(be(Math.max(yt.from,ce),Math.min(yt.to,Ee),yt.level==1?"rtl":"ltr",qe),Oe=!0)}Oe||be(ce,Ee,"ltr")}var Mt=null;function At(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]/,yt=/[Lb1n]/,Lt=/[1n]/;function kt(Rt,nn,zt){this.level=Rt,this.from=nn,this.to=zt}return function(Rt,nn){var zt=nn=="ltr"?"L":"R";if(Rt.length==0||nn=="ltr"&&!be.test(Rt))return!1;for(var yn=Rt.length,fn=[],tr=0;tr<yn;++tr)fn.push(Ee(Rt.charCodeAt(tr)));for(var or=0,vr=zt;or<yn;++or){var Lr=fn[or];Lr=="m"?fn[or]=vr:vr=Lr}for(var qr=0,Gr=zt;qr<yn;++qr){var ai=fn[qr];ai=="1"&&Gr=="r"?fn[qr]="n":qe.test(ai)&&(Gr=ai,ai=="r"&&(fn[qr]="R"))}for(var Oi=1,_r=fn[0];Oi<yn-1;++Oi){var qi=fn[Oi];qi=="+"&&_r=="1"&&fn[Oi+1]=="1"?fn[Oi]="1":qi==","&&_r==fn[Oi+1]&&(_r=="1"||_r=="n")&&(fn[Oi]=_r),_r=qi}for(var Yo=0;Yo<yn;++Yo){var Ia=fn[Yo];if(Ia==",")fn[Yo]="N";else if(Ia=="%"){var ia=void 0;for(ia=Yo+1;ia<yn&&fn[ia]=="%";++ia);for(var Rs=Yo&&fn[Yo-1]=="!"||ia<yn&&fn[ia]=="1"?"1":"N",ms=Yo;ms<ia;++ms)fn[ms]=Rs;Yo=ia-1}}for(var Ma=0,Xs=zt;Ma<yn;++Ma){var as=fn[Ma];Xs=="L"&&as=="1"?fn[Ma]="L":qe.test(as)&&(Xs=as)}for(var La=0;La<yn;++La)if(Oe.test(fn[La])){var mo=void 0;for(mo=La+1;mo<yn&&Oe.test(fn[mo]);++mo);for(var ua=(La?fn[La-1]:zt)=="L",Xa=(mo<yn?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,da=0;da<yn;)if(yt.test(fn[da])){var Af=da;for(++da;da<yn&&yt.test(fn[da]);++da);oa.push(new kt(0,Af,da))}else{var cl=da,Ys=oa.length,_s=nn=="rtl"?1:0;for(++da;da<yn&&fn[da]!="L";++da);for(var Io=cl;Io<da;)if(Lt.test(fn[Io])){cl<Io&&(oa.splice(Ys,0,new kt(1,cl,Io)),Ys+=_s);var Ya=Io;for(++Io;Io<da&&Lt.test(fn[Io]);++Io);oa.splice(Ys,0,new kt(2,Ya,Io)),Ys+=_s,cl=Io}else++Io;cl<da&&oa.splice(Ys,0,new kt(1,cl,da))}return nn=="ltr"&&(oa[0].level==1&&(bl=Rt.match(/^\s+/))&&(oa[0].from=bl[0].length,oa.unshift(new kt(0,0,bl[0].length))),mt(oa).level==1&&(bl=Rt.match(/\s+$/))&&(mt(oa).to-=bl[0].length,oa.push(new kt(0,yn-bl[0].length,yn)))),nn=="rtl"?oa.reverse():oa}}();function Kt(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=xt(Oe,Ee);qe>-1&&(be[ce]=Oe.slice(0,qe).concat(Oe.slice(qe+1)))}}}function tn(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}}),tn(re,Ee||ce.type,re,ce),fr(ce)||ce.codemirrorIgnore}function Pn(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)xt(Ee,ce[be])==-1&&Ee.push(ce[be])}function Sn(re,ce){return Ut(re,ce).length>0}function Tn(re){re.prototype.on=function(ce,Ee){$t(this,ce,Ee)},re.prototype.off=function(ce,Ee){sn(this,ce,Ee)}}function Kn(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Mr(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function fr(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function Er(re){Kn(re),Mr(re)}function Hr(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 ri=function(){if(De&&fe<9)return!1;var re=Ae("div");return"draggable"in re||"dragDrop"in re}(),Pi;function Ui(re){if(Pi==null){var ce=Ae("span","\u200B");Ne(re,Ae("span",[ce,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Pi=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(De&&fe<8))}var Ee=Pi?Ae("span","\u200B"):Ae("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Ee.setAttribute("cm-text",""),Ee}var Fi;function zi(re){if(Fi!=null)return Fi;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:Fi=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),yt=qe.indexOf("\r");yt!=-1?(Ee.push(qe.slice(0,yt)),ce+=yt+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},dr=function(){var re=Ae("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),mr=null;function Mi(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 jr(re,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),ar[re]=ce}function to(re,ce){Sr[re]=ce}function Rr(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=we(ce,re),re.name=ce.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return Rr("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return Rr("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function on(re,ce){ce=Rr(ce);var Ee=ar[ce.name];if(!Ee)return on(re,"text/plain");var be=Ee(re,ce);if(rn.hasOwnProperty(ce.name)){var Oe=rn[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 yt in ce.modeProps)be[yt]=ce.modeProps[yt];return be}var rn={};function Yt(re,ce){var Ee=rn.hasOwnProperty(re)?rn[re]:rn[re]={};bt(ce,Ee)}function nr(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 gr(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 Cr(re,ce,Ee){return re.startState?re.startState(ce,Ee):!0}var Nn=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};Nn.prototype.eol=function(){return this.pos>=this.string.length},Nn.prototype.sol=function(){return this.pos==this.lineStart},Nn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Nn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Nn.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},Nn.prototype.eatWhile=function(re){for(var ce=this.pos;this.eat(re););return this.pos>ce},Nn.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},Nn.prototype.skipToEnd=function(){this.pos=this.string.length},Nn.prototype.skipTo=function(re){var ce=this.string.indexOf(re,this.pos);if(ce>-1)return this.pos=ce,!0},Nn.prototype.backUp=function(re){this.pos-=re},Nn.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)},Nn.prototype.indentation=function(){return $e(this.string,null,this.tabSize)-(this.lineStart?$e(this.string,this.lineStart,this.tabSize):0)},Nn.prototype.match=function(re,ce,Ee){if(typeof re=="string"){var be=function(yt){return Ee?yt.toLowerCase():yt},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)}},Nn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Nn.prototype.hideFirstChars=function(re,ce){this.lineStart+=re;try{return ce()}finally{this.lineStart-=re}},Nn.prototype.lookAhead=function(re){var ce=this.lineOracle;return ce&&ce.lookAhead(re)},Nn.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function qn(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 Ir(re,ce,Ee){var be=[],Oe=ce.line;return re.iter(ce.line,Ee.line+1,function(qe){var yt=qe.text;Oe==Ee.line&&(yt=yt.slice(0,Ee.ch)),Oe==ce.line&&(yt=yt.slice(ce.ch)),be.push(yt),++Oe}),be}function gi(re,ce,Ee){var be=[];return re.iter(ce,Ee,function(Oe){be.push(Oe.text)}),be}function bi(re,ce){var Ee=ce-re.height;if(Ee)for(var be=re;be;be=be.parent)be.height+=Ee}function Nt(re){if(re.parent==null)return null;for(var ce=re.parent,Ee=xt(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 Ht(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 yt=0;yt<re.lines.length;++yt){var Lt=re.lines[yt],kt=Lt.height;if(ce<kt)break;ce-=kt}return Ee+yt}function Mn(re,ce){return ce>=re.first&&ce<re.first+re.size}function jn(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 Fn(re,ce){return re.line-ce.line||re.ch-ce.ch}function Dn(re,ce){return re.sticky==ce.sticky&&Fn(re,ce)==0}function Ln(re){return en(re.line,re.ch)}function er(re,ce){return Fn(re,ce)<0?ce:re}function zn(re,ce){return Fn(re,ce)<0?re:ce}function Zn(re,ce){return Math.max(re.first,Math.min(ce,re.first+re.size-1))}function rr(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,qn(re,Ee).text.length):Kr(ce,qn(re,ce.line).text.length)}function Kr(re,ce){var Ee=re.ch;return Ee==null||Ee>ce?en(re.line,ce):Ee<0?en(re.line,0):re}function cr(re,ce){for(var Ee=[],be=0;be<ce.length;be++)Ee[be]=rr(re,ce[be]);return Ee}var pr=function(re,ce){this.state=re,this.lookAhead=ce},an=function(re,ce,Ee,be){this.state=ce,this.doc=re,this.line=Ee,this.maxLookAhead=be||0,this.baseTokens=null,this.baseTokenPos=1};an.prototype.lookAhead=function(re){var ce=this.doc.getLine(this.line+re);return ce!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),ce},an.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}},an.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},an.fromSaved=function(re,ce,Ee){return ce instanceof pr?new an(re,nr(re.mode,ce.state),Ee,ce.lookAhead):new an(re,nr(re.mode,ce),Ee)},an.prototype.save=function(re){var ce=re!==!1?nr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pr(ce,this.maxLookAhead):ce};function Vr(re,ce,Ee,be){var Oe=[re.state.modeGen],qe={};Wr(re,ce.text,re.doc.mode,Ee,function(Rt,nn){return Oe.push(Rt,nn)},qe,be);for(var yt=Ee.state,Lt=function(Rt){Ee.baseTokens=Oe;var nn=re.state.overlays[Rt],zt=1,yn=0;Ee.state=!0,Wr(re,ce.text,nn.mode,Ee,function(fn,tr){for(var or=zt;yn<fn;){var vr=Oe[zt];vr>fn&&Oe.splice(zt,1,fn,Oe[zt+1],vr),zt+=2,yn=Math.min(fn,vr)}if(tr)if(nn.opaque)Oe.splice(or,zt-or,fn,"overlay "+tr),zt=or+2;else for(;or<zt;or+=2){var Lr=Oe[or+1];Oe[or+1]=(Lr?Lr+" ":"")+"overlay "+tr}},qe),Ee.state=yt,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 ei(re,ce,Ee){if(!ce.styles||ce.styles[0]!=re.state.modeGen){var be=Di(re,Nt(ce)),Oe=ce.text.length>re.options.maxHighlightLength&&nr(re.doc.mode,be.state),qe=Vr(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 Di(re,ce,Ee){var be=re.doc,Oe=re.display;if(!be.mode.startState)return new an(be,!0,ce);var qe=$r(re,ce,Ee),yt=qe>be.first&&qn(be,qe-1).stateAfter,Lt=yt?an.fromSaved(be,yt,qe):new an(be,Cr(be.mode),qe);return be.iter(qe,ce,function(kt){dn(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 dn(re,ce,Ee,be){var Oe=re.doc.mode,qe=new Nn(ce,re.options.tabSize,Ee);for(qe.start=qe.pos=be||0,ce==""&&Hn(Oe,Ee.state);!qe.eol();)ur(Oe,qe,Ee.state),qe.start=qe.pos}function Hn(re,ce){if(re.blankLine)return re.blankLine(ce);if(re.innerMode){var Ee=gr(re,ce);if(Ee.mode.blankLine)return Ee.mode.blankLine(Ee.state)}}function ur(re,ce,Ee,be){for(var Oe=0;Oe<10;Oe++){be&&(be[0]=gr(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 Jn=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,yt;ce=rr(Oe,ce);var Lt=qn(Oe,ce.line),kt=Di(re,ce.line,Ee),Rt=new Nn(Lt.text,re.options.tabSize,kt),nn;for(be&&(nn=[]);(be||Rt.pos<ce.ch)&&!Rt.eol();)Rt.start=Rt.pos,yt=ur(qe,Rt,kt.state),be&&nn.push(new Jn(Rt,yt,nr(Oe.mode,kt.state)));return be?nn:new Jn(Rt,yt,kt.state)}function Fr(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 Wr(re,ce,Ee,be,Oe,qe,yt){var Lt=Ee.flattenSpans;Lt==null&&(Lt=re.options.flattenSpans);var kt=0,Rt=null,nn=new Nn(ce,re.options.tabSize,be),zt,yn=re.options.addModeClass&&[null];for(ce==""&&Fr(Hn(Ee,be.state),qe);!nn.eol();){if(nn.pos>re.options.maxHighlightLength?(Lt=!1,yt&&dn(re,ce,be,nn.pos),nn.pos=ce.length,zt=null):zt=Fr(ur(Ee,nn,be.state,yn),qe),yn){var fn=yn[0].name;fn&&(zt="m-"+(zt?fn+" "+zt:fn))}if(!Lt||Rt!=zt){for(;kt<nn.start;)kt=Math.min(nn.start,kt+5e3),Oe(kt,Rt);Rt=zt}nn.start=nn.pos}for(;kt<nn.pos;){var tr=Math.min(nn.pos,kt+5e3);Oe(tr,Rt),kt=tr}}function $r(re,ce,Ee){for(var be,Oe,qe=re.doc,yt=Ee?-1:ce-(re.doc.mode.innerMode?1e3:100),Lt=ce;Lt>yt;--Lt){if(Lt<=qe.first)return qe.first;var kt=qn(qe,Lt-1),Rt=kt.stateAfter;if(Rt&&(!Ee||Lt+(Rt instanceof pr?Rt.lookAhead:0)<=qe.modeFrontier))return Lt;var nn=$e(kt.text,null,re.options.tabSize);(Oe==null||be>nn)&&(Oe=Lt-1,be=nn)}return Oe}function ii(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=qn(re,be).stateAfter;if(Oe&&(!(Oe instanceof pr)||be+Oe.lookAhead<ce)){Ee=be+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Ee)}}var hi=!1,mn=!1;function Li(){hi=!0}function vn(){mn=!0}function xr(re,ce,Ee){this.marker=re,this.from=ce,this.to=Ee}function ui(re,ce){if(re)for(var Ee=0;Ee<re.length;++Ee){var be=re[Ee];if(be.marker==ce)return be}}function si(re,ce){for(var Ee,be=0;be<re.length;++be)re[be]!=ce&&(Ee||(Ee=[])).push(re[be]);return Ee}function Ii(re,ce){re.markedSpans=re.markedSpans?re.markedSpans.concat([ce]):[ce],ce.marker.attachLine(re)}function pi(re,ce,Ee){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],yt=qe.marker,Lt=qe.from==null||(yt.inclusiveLeft?qe.from<=ce:qe.from<ce);if(Lt||qe.from==ce&&yt.type=="bookmark"&&(!Ee||!qe.marker.insertLeft)){var kt=qe.to==null||(yt.inclusiveRight?qe.to>=ce:qe.to>ce);(be||(be=[])).push(new xr(yt,qe.from,kt?null:qe.to))}}return be}function Zr(re,ce,Ee){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],yt=qe.marker,Lt=qe.to==null||(yt.inclusiveRight?qe.to>=ce:qe.to>ce);if(Lt||qe.from==ce&&yt.type=="bookmark"&&(!Ee||qe.marker.insertLeft)){var kt=qe.from==null||(yt.inclusiveLeft?qe.from<=ce:qe.from<ce);(be||(be=[])).push(new xr(yt,kt?null:qe.from-ce,qe.to==null?null:qe.to-ce))}}return be}function Gi(re,ce){if(ce.full)return null;var Ee=Mn(re,ce.from.line)&&qn(re,ce.from.line).markedSpans,be=Mn(re,ce.to.line)&&qn(re,ce.to.line).markedSpans;if(!Ee&&!be)return null;var Oe=ce.from.ch,qe=ce.to.ch,yt=Fn(ce.from,ce.to)==0,Lt=pi(Ee,Oe,yt),kt=Zr(be,qe,yt),Rt=ce.text.length==1,nn=mt(ce.text).length+(Rt?Oe:0);if(Lt)for(var zt=0;zt<Lt.length;++zt){var yn=Lt[zt];if(yn.to==null){var fn=ui(kt,yn.marker);fn?Rt&&(yn.to=fn.to==null?null:fn.to+nn):yn.to=Oe}}if(kt)for(var tr=0;tr<kt.length;++tr){var or=kt[tr];if(or.to!=null&&(or.to+=nn),or.from==null){var vr=ui(Lt,or.marker);vr||(or.from=nn,Rt&&(Lt||(Lt=[])).push(or))}else or.from+=nn,Rt&&(Lt||(Lt=[])).push(or)}Lt&&(Lt=qt(Lt)),kt&&kt!=Lt&&(kt=qt(kt));var Lr=[Lt];if(!Rt){var qr=ce.text.length-2,Gr;if(qr>0&&Lt)for(var ai=0;ai<Lt.length;++ai)Lt[ai].to==null&&(Gr||(Gr=[])).push(new xr(Lt[ai].marker,null,null));for(var Oi=0;Oi<qr;++Oi)Lr.push(Gr);Lr.push(kt)}return Lr}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 tr=0;tr<fn.markedSpans.length;++tr){var or=fn.markedSpans[tr].marker;or.readOnly&&(!be||xt(be,or)==-1)&&(be||(be=[])).push(or)}}),!be)return null;for(var Oe=[{from:ce,to:Ee}],qe=0;qe<be.length;++qe)for(var yt=be[qe],Lt=yt.find(0),kt=0;kt<Oe.length;++kt){var Rt=Oe[kt];if(!(Fn(Rt.to,Lt.from)<0||Fn(Rt.from,Lt.to)>0)){var nn=[kt,1],zt=Fn(Rt.from,Lt.from),yn=Fn(Rt.to,Lt.to);(zt<0||!yt.inclusiveLeft&&!zt)&&nn.push({from:Rt.from,to:Lt.from}),(yn>0||!yt.inclusiveRight&&!yn)&&nn.push({from:Lt.to,to:Rt.to}),Oe.splice.apply(Oe,nn),kt+=nn.length-3}}return Oe}function Jt(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 In(re){return re.inclusiveLeft?-1:0}function pn(re){return re.inclusiveRight?1:0}function Un(re,ce){var Ee=re.lines.length-ce.lines.length;if(Ee!=0)return Ee;var be=re.find(),Oe=ce.find(),qe=Fn(be.from,Oe.from)||In(re)-In(ce);if(qe)return-qe;var yt=Fn(be.to,Oe.to)||pn(re)-pn(ce);return yt||ce.id-re.id}function Xn(re,ce){var Ee=mn&&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||Un(be,Oe.marker)<0)&&(be=Oe.marker);return be}function Wn(re){return Xn(re,!0)}function hn(re){return Xn(re,!1)}function An(re,ce){var Ee=mn&&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||Un(be,qe.marker)<0)&&(be=qe.marker)}return be}function _n(re,ce,Ee,be,Oe){var qe=qn(re,ce),yt=mn&&qe.markedSpans;if(yt)for(var Lt=0;Lt<yt.length;++Lt){var kt=yt[Lt];if(kt.marker.collapsed){var Rt=kt.marker.find(0),nn=Fn(Rt.from,Ee)||In(kt.marker)-In(Oe),zt=Fn(Rt.to,be)||pn(kt.marker)-pn(Oe);if(!(nn>=0&&zt<=0||nn<=0&&zt>=0)&&(nn<=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Fn(Rt.to,Ee)>=0:Fn(Rt.to,Ee)>0)||nn>=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Fn(Rt.from,be)<=0:Fn(Rt.from,be)<0)))return!0}}}function kn(re){for(var ce;ce=Wn(re);)re=ce.find(-1,!0).line;return re}function Bn(re){for(var ce;ce=hn(re);)re=ce.find(1,!0).line;return re}function sr(re){for(var ce,Ee;ce=hn(re);)re=ce.find(1,!0).line,(Ee||(Ee=[])).push(re);return Ee}function Yn(re,ce){var Ee=qn(re,ce),be=kn(Ee);return Ee==be?ce:Nt(be)}function On(re,ce){if(ce>re.lastLine())return ce;var Ee=qn(re,ce),be;if(!ln(re,Ee))return ce;for(;be=hn(Ee);)Ee=be.find(1,!0).line;return Nt(Ee)+1}function ln(re,ce){var Ee=mn&&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&&lr(re,ce,be))return!0}}}function lr(re,ce,Ee){if(Ee.to==null){var be=Ee.marker.find(1,!0);return lr(re,be.line,ui(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)&&lr(re,ce,Oe))return!0}function wr(re){re=kn(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 yt=0;yt<qe.children.length;++yt){var Lt=qe.children[yt];if(Lt==Ee)break;ce+=Lt.height}return ce}function Jr(re){if(re.height==0)return 0;for(var ce=re.text.length,Ee,be=re;Ee=Wn(be);){var Oe=Ee.find(0,!0);be=Oe.from.line,ce+=Oe.from.ch-Oe.to.ch}for(be=re;Ee=hn(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 Nr(re){var ce=re.display,Ee=re.doc;ce.maxLine=qn(Ee,Ee.first),ce.maxLineLength=Jr(ce.maxLine),ce.maxLineChanged=!0,Ee.iter(function(be){var Oe=Jr(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 Nt(this)},Tn(Si);function vi(re,ce,Ee,be){re.text=ce,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),Jt(re),lt(re,Ee);var Oe=be?be(re):1;Oe!=re.height&&bi(re,Oe)}function mi(re){re.parent=null,Jt(re)}var Ci={},Ei={};function Ki(re,ce){if(!re||/^\s*$/.test(re))return null;var Ee=ce.addModeClass?Ei:Ci;return Ee[re]||(Ee[re]=re.replace(/\S+/g,"cm-$&"))}function Qt(re,ce){var Ee=Re("span",null,null,me?"padding-right: .1px":null),be={pre:Re("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,yt=void 0;be.pos=0,be.addToken=ci,zi(re.display.measure)&&(yt=Kt(qe,re.doc.direction))&&(be.addToken=oi(be.addToken,yt)),be.map=[];var Lt=ce!=re.display.externalMeasured&&Nt(qe);Ri(qe,be,ei(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(Ui(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 tn(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 ci(re,ce,Ee,be,Oe,qe,yt){if(ce){var Lt=re.splitSpaces?zr(ce,re.trailingSpace):ce,kt=re.cm.state.specialChars,Rt=!1,nn;if(!kt.test(ce))re.col+=ce.length,nn=document.createTextNode(Lt),re.map.push(re.pos,re.pos+ce.length,nn),De&&fe<9&&(Rt=!0),re.pos+=ce.length;else{nn=document.createDocumentFragment();for(var zt=0;;){kt.lastIndex=zt;var yn=kt.exec(ce),fn=yn?yn.index-zt:ce.length-zt;if(fn){var tr=document.createTextNode(Lt.slice(zt,zt+fn));De&&fe<9?nn.appendChild(Ae("span",[tr])):nn.appendChild(tr),re.map.push(re.pos,re.pos+fn,tr),re.col+=fn,re.pos+=fn}if(!yn)break;zt+=fn+1;var or=void 0;if(yn[0]==" "){var vr=re.cm.options.tabSize,Lr=vr-re.col%vr;or=nn.appendChild(Ae("span",Ft(Lr),"cm-tab")),or.setAttribute("role","presentation"),or.setAttribute("cm-text"," "),re.col+=Lr}else yn[0]=="\r"||yn[0]==`
`?(or=nn.appendChild(Ae("span",yn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),or.setAttribute("cm-text",yn[0]),re.col+=1):(or=re.cm.options.specialCharPlaceholder(yn[0]),or.setAttribute("cm-text",yn[0]),De&&fe<9?nn.appendChild(Ae("span",[or])):nn.appendChild(or),re.col+=1);re.map.push(re.pos,re.pos+1,or),re.pos++}}if(re.trailingSpace=Lt.charCodeAt(ce.length-1)==32,Ee||be||Oe||Rt||qe||yt){var qr=Ee||"";be&&(qr+=be),Oe&&(qr+=Oe);var Gr=Ae("span",[nn],qr,qe);if(yt)for(var ai in yt)yt.hasOwnProperty(ai)&&ai!="style"&&ai!="class"&&Gr.setAttribute(ai,yt[ai]);return re.content.appendChild(Gr)}re.content.appendChild(nn)}}function zr(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 oi(re,ce){return function(Ee,be,Oe,qe,yt,Lt,kt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var Rt=Ee.pos,nn=Rt+be.length;;){for(var zt=void 0,yn=0;yn<ce.length&&(zt=ce[yn],!(zt.to>Rt&&zt.from<=Rt));yn++);if(zt.to>=nn)return re(Ee,be,Oe,qe,yt,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 Xr(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 Ri(re,ce,Ee){var be=re.markedSpans,Oe=re.text,qe=0;if(!be){for(var yt=1;yt<Ee.length;yt+=2)ce.addToken(ce,Oe.slice(qe,qe=Ee[yt]),Ki(Ee[yt+1],ce.cm.options));return}for(var Lt=Oe.length,kt=0,Rt=1,nn="",zt,yn,fn=0,tr,or,vr,Lr,qr;;){if(fn==kt){tr=or=vr=yn="",qr=null,Lr=null,fn=1/0;for(var Gr=[],ai=void 0,Oi=0;Oi<be.length;++Oi){var _r=be[Oi],qi=_r.marker;if(qi.type=="bookmark"&&_r.from==kt&&qi.widgetNode)Gr.push(qi);else if(_r.from<=kt&&(_r.to==null||_r.to>kt||qi.collapsed&&_r.to==kt&&_r.from==kt)){if(_r.to!=null&&_r.to!=kt&&fn>_r.to&&(fn=_r.to,or=""),qi.className&&(tr+=" "+qi.className),qi.css&&(yn=(yn?yn+";":"")+qi.css),qi.startStyle&&_r.from==kt&&(vr+=" "+qi.startStyle),qi.endStyle&&_r.to==fn&&(ai||(ai=[])).push(qi.endStyle,_r.to),qi.title&&((qr||(qr={})).title=qi.title),qi.attributes)for(var Yo in qi.attributes)(qr||(qr={}))[Yo]=qi.attributes[Yo];qi.collapsed&&(!Lr||Un(Lr.marker,qi)<0)&&(Lr=_r)}else _r.from>kt&&fn>_r.from&&(fn=_r.from)}if(ai)for(var Ia=0;Ia<ai.length;Ia+=2)ai[Ia+1]==fn&&(or+=" "+ai[Ia]);if(!Lr||Lr.from==kt)for(var ia=0;ia<Gr.length;++ia)Xr(ce,0,Gr[ia]);if(Lr&&(Lr.from||0)==kt){if(Xr(ce,(Lr.to==null?Lt+1:Lr.to)-kt,Lr.marker,Lr.from==null),Lr.to==null)return;Lr.to==kt&&(Lr=!1)}}if(kt>=Lt)break;for(var Rs=Math.min(Lt,fn);;){if(nn){var ms=kt+nn.length;if(!Lr){var Ma=ms>Rs?nn.slice(0,Rs-kt):nn;ce.addToken(ce,Ma,zt?zt+tr:tr,vr,kt+Ma.length==fn?or:"",yn,qr)}if(ms>=Rs){nn=nn.slice(Rs-kt),kt=Rs;break}kt=ms,vr=""}nn=Oe.slice(qe,qe=Ee[Rt++]),zt=Ki(Ee[Rt++],ce.cm.options)}}}function Bi(re,ce,Ee){this.line=ce,this.rest=sr(ce),this.size=this.rest?Nt(mt(this.rest))-Ee+1:1,this.node=this.text=null,this.hidden=ln(re,ce)}function ti(re,ce,Ee){for(var be=[],Oe,qe=ce;qe<Ee;qe=Oe){var yt=new Bi(re.doc,qn(re.doc,qe),qe);Oe=qe+yt.size,be.push(yt)}return be}var eo=null;function pa(re){eo?eo.ops.push(re):re.ownsGroup=eo={ops:[re],delayedCallbacks:[]}}function Ao(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{Ao(Ee)}finally{eo=null,ce(Ee)}}var wa=null;function Ar(re,ce){var Ee=Ut(re,ce);if(Ee.length){var be=Array.prototype.slice.call(arguments,2),Oe;eo?Oe=eo.delayedCallbacks:wa?Oe=wa:(Oe=wa=[],setTimeout(Po,0));for(var qe=function(Lt){Oe.push(function(){return Ee[Lt].apply(null,be)})},yt=0;yt<Ee.length;++yt)qe(yt)}}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"?Qn(re,ce):qe=="gutter"?Qr(re,ce,Ee,be):qe=="class"?Or(re,ce):qe=="widget"&&wi(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 jo(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):Qt(re,ce)}function Qn(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,Or(re,ce)):Ee&&(ce.text.className=Ee)}function Or(re,ce){jo(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 Qr(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 yt=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),yt.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",jn(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,nn=qe.hasOwnProperty(Rt)&&qe[Rt];nn&&Lt.appendChild(Ae("div",[nn],"CodeMirror-gutter-elt","left: "+be.gutterLeft[Rt]+"px; width: "+be.gutterWidth[Rt]+"px"))}}}function wi(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);no(re,ce,Ee)}function ki(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),Or(re,ce),Qr(re,ce,Ee,be),no(re,ce,be),ce.node}function no(re,ce,Ee){if(Dr(re,ce.line,ce,Ee,!0),ce.rest)for(var be=0;be<ce.rest.length;be++)Dr(re,ce.rest[be],ce,Ee,!1)}function Dr(re,ce,Ee,be,Oe){if(ce.widgets)for(var qe=ta(Ee),yt=0,Lt=ce.widgets;yt<Lt.length;++yt){var kt=Lt[yt],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),Ar(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 Oo(re,ce){for(var Ee=Hr(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 ji(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 wt-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 yt=ce.text.firstChild.getClientRects(),Lt=0;Lt<yt.length-1;Lt++){var kt=yt[Lt],Rt=yt[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(Nt(re.rest[Oe])>Ee)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function eh(re,ce){ce=kn(ce);var Ee=Nt(ce),be=re.display.externalMeasured=new Bi(re.doc,ce,Ee);be.lineN=Ee;var Oe=be.built=Qt(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=Nt(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||""),yt;return ce.cache.hasOwnProperty(qe)?yt=ce.cache[qe]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(bs(re,ce.view,ce.rect),ce.hasHeights=!0),yt=Zo(re,ce,Ee,be),yt.bogus||(ce.cache[qe]=yt)),{left:yt.left,right:yt.right,top:Oe?yt.rtop:yt.top,bottom:Oe?yt.rbottom:yt.bottom}}var Vl={left:0,right:0,top:0,bottom:0};function th(re,ce,Ee){for(var be,Oe,qe,yt,Lt,kt,Rt=0;Rt<re.length;Rt+=3)if(Lt=re[Rt],kt=re[Rt+1],ce<Lt?(Oe=0,qe=1,yt="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&&(yt="right")),Oe!=null){if(be=re[Rt+2],Lt==kt&&Ee==(be.insertLeft?"left":"right")&&(yt=Ee),Ee=="left"&&Oe==0)for(;Rt&&re[Rt-2]==re[Rt-3]&&re[Rt-1].insertLeft;)be=re[(Rt-=3)+2],yt="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],yt="right";break}return{node:be,start:Oe,end:qe,collapse:yt,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,yt=Oe.start,Lt=Oe.end,kt=Oe.collapse,Rt;if(qe.nodeType==3){for(var nn=0;nn<4;nn++){for(;yt&&He(ce.line.text.charAt(Oe.coverStart+yt));)--yt;for(;Oe.coverStart+Lt<Oe.coverEnd&&He(ce.line.text.charAt(Oe.coverStart+Lt));)++Lt;if(De&&fe<9&&yt==0&&Lt==Oe.coverEnd-Oe.coverStart?Rt=qe.parentNode.getBoundingClientRect():Rt=nh(We(qe,yt,Lt).getClientRects(),be),Rt.left||Rt.right||yt==0)break;Lt=yt,yt=yt-1,kt="right"}De&&fe<11&&(Rt=Ou(re.display.measure,Rt))}else{yt>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&&!yt&&(!Rt||!Rt.left&&!Rt.right)){var yn=qe.parentNode.getClientRects()[0];yn?Rt={left:yn.left,right:yn.left+Fs(re.display),top:yn.top,bottom:yn.bottom}:Rt=Vl}for(var fn=Rt.top-ce.rect.top,tr=Rt.bottom-ce.rect.top,or=(fn+tr)/2,vr=ce.view.measure.heights,Lr=0;Lr<vr.length-1&&!(or<vr[Lr]);Lr++);var qr=Lr?vr[Lr-1]:0,Gr=vr[Lr],ai={left:(kt=="right"?Rt.right:Rt.left)-ce.rect.left,right:(kt=="left"?Rt.left:Rt.right)-ce.rect.left,top:qr,bottom:Gr};return!Rt.left&&!Rt.right&&(ai.bogus=!0),re.options.singleCursorHeightPerLine||(ai.rtop=fn,ai.rbottom=tr),ai}function Ou(re,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Mi(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 yt=wr(ce);if(be=="local"?yt+=ji(re.display):yt-=re.display.viewOffset,be=="page"||be=="window"){var Lt=re.display.lineSpace.getBoundingClientRect();yt+=Lt.top+(be=="window"?0:Oa());var kt=Lt.left+(be=="window"?0:Ca());Ee.left+=kt,Ee.right+=kt}return Ee.top+=yt,Ee.bottom+=yt,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 yt=re.display.lineSpace.getBoundingClientRect();return{left:be-yt.left,top:Oe-yt.top}}function Ga(re,ce,Ee,be,Oe){return be||(be=qn(re.doc,ce.line)),ga(re,be,ju(re,be,ce.ch,Oe),Ee)}function co(re,ce,Ee,be,Oe,qe){be=be||qn(re.doc,ce.line),Oe||(Oe=Sl(re,be));function yt(tr,or){var vr=Os(re,Oe,tr,or?"right":"left",qe);return or?vr.left=vr.right:vr.right=vr.left,ga(re,be,vr,Ee)}var Lt=Kt(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 yt(Rt=="before"?kt-1:kt,Rt=="before");function nn(tr,or,vr){var Lr=Lt[or],qr=Lr.level==1;return yt(vr?tr-1:tr,qr!=vr)}var zt=At(Lt,kt,Rt),yn=Mt,fn=nn(kt,zt,Rt=="before");return yn!=null&&(fn.other=nn(kt,yn,Rt!="before")),fn}function oo(re,ce){var Ee=0;ce=rr(re.doc,ce),re.options.lineWrapping||(Ee=Fs(re.display)*ce.ch);var be=qn(re.doc,ce.line),Oe=wr(be)+ji(re.display);return{left:Ee,right:Ee,top:Oe,bottom:Oe+be.height}}function $i(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 $i(be.first,0,null,-1,-1);var Oe=Ht(be,Ee),qe=be.first+be.size-1;if(Oe>qe)return $i(be.first+be.size-1,qn(be,qe).text.length,null,1,1);ce<0&&(ce=0);for(var yt=qn(be,Oe);;){var Lt=bn(re,yt,Oe,ce,Ee),kt=An(yt,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;yt=qn(be,Oe=Rt.line)}}function Pr(re,ce,Ee,be){be-=aa(ce);var Oe=ce.text.length,qe=ut(function(yt){return Os(re,Ee,yt-1).bottom<=be},Oe,0);return Oe=ut(function(yt){return Os(re,Ee,yt).top>be},qe,Oe),{begin:qe,end:Oe}}function fa(re,ce,Ee,be){Ee||(Ee=Sl(re,ce));var Oe=ga(re,ce,Os(re,Ee,be),"line").top;return Pr(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 bn(re,ce,Ee,be,Oe){Oe-=wr(ce);var qe=Sl(re,ce),yt=aa(ce),Lt=0,kt=ce.text.length,Rt=!0,nn=Kt(ce,re.doc.direction);if(nn){var zt=(re.options.lineWrapping?jl:Hs)(re,ce,Ee,qe,nn,be,Oe);Rt=zt.level!=1,Lt=Rt?zt.from:zt.to-1,kt=Rt?zt.to:zt.from-1}var yn=null,fn=null,tr=ut(function(Oi){var _r=Os(re,qe,Oi);return _r.top+=yt,_r.bottom+=yt,Gt(_r,be,Oe,!1)?(_r.top<=Oe&&_r.left<=be&&(yn=Oi,fn=_r),!0):!1},Lt,kt),or,vr,Lr=!1;if(fn){var qr=be-fn.left<fn.right-be,Gr=qr==Rt;tr=yn+(Gr?0:1),vr=Gr?"after":"before",or=qr?fn.left:fn.right}else{!Rt&&(tr==kt||tr==Lt)&&tr++,vr=tr==0?"after":tr==ce.text.length?"before":Os(re,qe,tr-(Rt?1:0)).bottom+yt<=Oe==Rt?"after":"before";var ai=co(re,en(Ee,tr,vr),"line",ce,qe);or=ai.left,Lr=Oe<ai.top?-1:Oe>=ai.bottom?1:0}return tr=Qe(ce.text,tr,1),$i(Ee,tr,vr,Lr,be-or)}function Hs(re,ce,Ee,be,Oe,qe,yt){var Lt=ut(function(zt){var yn=Oe[zt],fn=yn.level!=1;return Gt(co(re,en(Ee,fn?yn.to:yn.from,fn?"before":"after"),"line",ce,be),qe,yt,!0)},0,Oe.length-1),kt=Oe[Lt];if(Lt>0){var Rt=kt.level!=1,nn=co(re,en(Ee,Rt?kt.from:kt.to,Rt?"after":"before"),"line",ce,be);Gt(nn,qe,yt,!0)&&nn.top>yt&&(kt=Oe[Lt-1])}return kt}function jl(re,ce,Ee,be,Oe,qe,yt){var Lt=Pr(re,ce,be,yt),kt=Lt.begin,Rt=Lt.end;/\s/.test(ce.text.charAt(Rt-1))&&Rt--;for(var nn=null,zt=null,yn=0;yn<Oe.length;yn++){var fn=Oe[yn];if(!(fn.from>=Rt||fn.to<=kt)){var tr=fn.level!=1,or=Os(re,be,tr?Math.min(Rt,fn.to)-1:Math.max(kt,fn.from)).right,vr=or<qe?qe-or+1e9:or-qe;(!nn||zt>vr)&&(nn=fn,zt=vr)}}return nn||(nn=Oe[Oe.length-1]),nn.from<kt&&(nn={from:kt,to:nn.to,level:nn.level}),nn.to>Rt&&(nn={from:nn.from,to:Rt,level:nn.level}),nn}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,yt=0;qe;qe=qe.nextSibling,++yt){var Lt=re.display.gutterSpecs[yt].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 Fo(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 yt=0;yt<Oe.widgets.length;yt++)Oe.widgets[yt].height&&(qe+=Oe.widgets[yt].height);return Ee?qe+(Math.ceil(Oe.text.length/be)||1)*ce:qe+ce}}function fi(re){var ce=re.doc,Ee=Fo(re);ce.iter(function(be){var Oe=Ee(be);Oe!=be.height&&bi(be,Oe)})}function Ua(re,ce,Ee,be){var Oe=re.display;if(!Ee&&Hr(ce).getAttribute("cm-not-content")=="true")return null;var qe,yt,Lt=Oe.lineSpace.getBoundingClientRect();try{qe=ce.clientX-Lt.left,yt=ce.clientY-Lt.top}catch(zt){return null}var kt=sa(re,qe,yt),Rt;if(be&&kt.xRel>0&&(Rt=qn(re.doc,kt.line).text).length==kt.ch){var nn=$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))-nn))}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 Do(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)mn&&Yn(re.doc,ce)<Oe.viewTo&&Go(re);else if(Ee<=Oe.viewFrom)mn&&On(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 yt=ps(re,ce,ce,-1);yt?(Oe.view=Oe.view.slice(0,yt.index),Oe.viewTo=yt.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(ti(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 _i(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 yt=qe.changes||(qe.changes=[]);xt(yt,Ee)==-1&&yt.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,yt=re.display.view;if(!mn||Ee==re.doc.first+re.doc.size)return{index:Oe,lineN:Ee};for(var Lt=re.display.viewFrom,kt=0;kt<Oe;kt++)Lt+=yt[kt].size;if(Lt!=ce){if(be>0){if(Oe==yt.length-1)return null;qe=Lt+yt[Oe].size-ce,Oe++}else qe=Lt-ce;ce+=qe,Ee+=qe}for(;Yn(re.doc,Ee)!=Ee;){if(Oe==(be<0?0:yt.length-1))return null;Ee+=be*yt[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=ti(re,ce,Ee),be.viewFrom=ce):(be.viewFrom>ce?be.view=ti(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(ti(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(),yt=0;yt<Ee.sel.ranges.length;yt++)if(!(!ce&&yt==Ee.sel.primIndex)){var Lt=Ee.sel.ranges[yt];if(!(Lt.from().line>=re.display.viewTo||Lt.to().line<re.display.viewFrom)){var kt=Lt.empty();(kt||re.options.showCursorWhenSelecting)&&ao(re,Lt.head,Oe),kt||ro(re,Lt,qe)}}return be}function ao(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 ro(re,ce,Ee){var be=re.display,Oe=re.doc,qe=document.createDocumentFragment(),yt=ja(re.display),Lt=yt.left,kt=Math.max(be.sizerWidth,fs(re)-be.sizer.offsetLeft)-yt.right,Rt=Oe.direction=="ltr";function nn(Gr,ai,Oi,_r){ai<0&&(ai=0),ai=Math.round(ai),_r=Math.round(_r),qe.appendChild(Ae("div",null,"CodeMirror-selected","position: absolute; left: "+Gr+`px;
top: `+ai+"px; width: "+(Oi==null?kt-Gr:Oi)+`px;
height: `+(_r-ai)+"px"))}function zt(Gr,ai,Oi){var _r=qn(Oe,Gr),qi=_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=fa(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=Kt(_r,Oe.direction);return pt(ms,ai||0,Oi==null?qi:Oi,function(Ma,Xs,as,La){var mo=as=="ltr",ua=ia(Ma,mo?"left":"right"),Xa=ia(Xs-1,mo?"right":"left"),ss=ai==null&&Ma==0,Bl=Oi==null&&Xs==qi,oa=La==0,bl=!ms||La==ms.length-1;if(Xa.top-ua.top<=3){var da=(Rt?ss:Bl)&&oa,Af=(Rt?Bl:ss)&&bl,cl=da?Lt:(mo?ua:Xa).left,Ys=Af?kt:(mo?Xa:ua).right;nn(cl,ua.top,Ys-cl,ua.bottom)}else{var _s,Io,Ya,yu;mo?(_s=Rt&&ss&&oa?Lt:ua.left,Io=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,Io=!Rt&&ss&&oa?kt:ua.right,Ya=!Rt&&Bl&&bl?Lt:Xa.left,yu=Rt?Rs(Xs,as,"after"):kt),nn(_s,ua.top,Io-_s,ua.bottom),ua.bottom<Xa.top&&nn(Lt,ua.bottom,null,Xa.top),nn(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 yn=ce.from(),fn=ce.to();if(yn.line==fn.line)zt(yn.line,yn.ch,fn.ch);else{var tr=qn(Oe,yn.line),or=qn(Oe,fn.line),vr=kn(tr)==kn(or),Lr=zt(yn.line,yn.ch,vr?tr.text.length+1:null).end,qr=zt(fn.line,vr?0:null,fn.ch).start;vr&&(Lr.top<qr.top-2?(nn(Lr.right,Lr.top,null,Lr.bottom),nn(Lt,qr.top,qr.left,qr.bottom)):nn(Lr.right,Lr.top,qr.left-Lr.right,Lr.bottom)),Lr.bottom<qr.top&&nn(Lt,Lr.bottom,null,qr.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||(tn(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&&(tn(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,yt=void 0,Lt=0;if(!Oe.hidden){if(De&&fe<8){var kt=Oe.node.offsetTop+Oe.node.offsetHeight;yt=kt-Ee,Ee=kt}else{var Rt=Oe.node.getBoundingClientRect();yt=Rt.bottom-Rt.top,!qe&&Oe.text.firstChild&&(Lt=Oe.text.firstChild.getBoundingClientRect().right-Rt.left-1)}var nn=Oe.line.height-yt;if((nn>.005||nn<-.005)&&(bi(Oe.line,yt),uf(Oe.line),Oe.rest))for(var zt=0;zt<Oe.rest.length;zt++)uf(Oe.rest[zt]);if(Lt>re.display.sizerWidth){var yn=Math.ceil(Lt/Fs(re.display));yn>re.display.maxLineLength&&(re.display.maxLineLength=yn,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 Ji(re,ce,Ee){var be=Ee&&Ee.top!=null?Math.max(0,Ee.top):re.scroller.scrollTop;be=Math.floor(be-ji(re));var Oe=Ee&&Ee.bottom!=null?Ee.bottom:be+re.wrapper.clientHeight,qe=Ht(ce,be),yt=Ht(ce,Oe);if(Ee&&Ee.ensure){var Lt=Ee.ensure.from.line,kt=Ee.ensure.to.line;Lt<qe?(qe=Lt,yt=Ht(ce,wr(qn(ce,Lt))+re.wrapper.clientHeight)):Math.min(kt,ce.lastLine())>=yt&&(qe=Ht(ce,wr(qn(ce,kt))-re.wrapper.clientHeight),yt=kt)}return{from:qe,to:Math.max(yt,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&&!xe){var qe=Ae("div","\u200B",null,`position: absolute;
top: `+(ce.top-Ee.viewOffset-ji(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 yt=!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),nn=re.doc.scrollTop,zt=re.doc.scrollLeft;if(Rt.scrollTop!=null&&(Yl(re,Rt.scrollTop),Math.abs(re.doc.scrollTop-nn)>1&&(yt=!0)),Rt.scrollLeft!=null&&($l(re,Rt.scrollLeft),Math.abs(re.doc.scrollLeft-zt)>1&&(yt=!0)),!yt)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),yt={};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)yt.scrollTop=kt?0:ce.top;else if(ce.bottom>Oe+qe){var nn=Math.min(ce.top,(Rt?Lt:ce.bottom)-qe);nn!=Oe&&(yt.scrollTop=nn)}var zt=re.options.fixedGutter?0:Ee.gutters.offsetWidth,yn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Ee.scroller.scrollLeft-zt,fn=fs(re)-Ee.gutters.offsetWidth,tr=ce.right-ce.left>fn;return tr&&(ce.right=ce.left+fn),ce.left<10?yt.scrollLeft=0:ce.left<yn?yt.scrollLeft=Math.max(0,ce.left+zt-(tr?0:10)):ce.right>fn+yn-3&&(yt.scrollLeft=ce.right+(tr?0:10)-fn),yt}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=oo(re,ce.from),be=oo(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||(gt||ah(re,{top:ce}),kc(re,ce,!0),gt&&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 Wi(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 so=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")};so.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}},so.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},so.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},so.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 nt,this.disableVert=new nt},so.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)},so.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=Wi(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,Wi(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:so,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},pa(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 yt=0;yt<ce.length;yt++)oh(ce[yt])}function Q0(re){var ce=re.cm,Ee=ce.display;_g(ce),re.updateMaxLine&&Nr(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=Wi(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,rr(be,re.scrollToPos.from),rr(be,re.scrollToPos.to),re.scrollToPos.margin);Cc(ce,Oe)}var qe=re.maybeHiddenMarkers,yt=re.maybeUnhiddenMarkers;if(qe)for(var Lt=0;Lt<qe.length;++Lt)qe[Lt].lines.length||tn(qe[Lt],"hide");if(yt)for(var kt=0;kt<yt.length;++kt)yt[kt].lines.length&&tn(yt[kt],"unhide");Ee.wrapper.offsetHeight&&(be.scrollTop=ce.display.scroller.scrollTop),re.changeObjs&&tn(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,ft(Ka,re))}function Ka(re){var ce=re.doc;if(!(ce.highlightFrontier>=re.display.viewTo)){var Ee=+new Date+re.options.workTime,be=Di(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 yt=qe.styles,Lt=qe.text.length>re.options.maxHighlightLength?nr(ce.mode,be.state):null,kt=Vr(re,qe,be,!0);Lt&&(be.state=Lt),qe.styles=kt.styles;var Rt=qe.styleClasses,nn=kt.classes;nn?qe.styleClasses=nn:Rt&&(qe.styleClasses=null);for(var zt=!yt||yt.length!=qe.styles.length||Rt!=nn&&(!Rt||!nn||Rt.bgClass!=nn.bgClass||Rt.textClass!=nn.textClass),yn=0;!zt&&yn<yt.length;++yn)zt=yt[yn]!=qe.styles[yn];zt&&Oe.push(be.line),qe.stateAfter=be.save(),be.nextLine()}else qe.text.length<=re.options.maxHighlightLength&&dn(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++)_i(re,Oe[qe],"text")})}}var Gh=function(re,ce,Ee){var be=re.display;this.viewport=ce,this.visible=Ji(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){Sn(re,ce)&&this.events.push(arguments)},Gh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)tn.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),yt=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>yt&&Ee.viewTo-yt<20&&(yt=Math.min(Oe,Ee.viewTo)),mn&&(qe=Yn(re.doc,qe),yt=On(re.doc,yt));var Lt=qe!=Ee.viewFrom||yt!=Ee.viewTo||Ee.lastWrapHeight!=ce.wrapperHeight||Ee.lastWrapWidth!=ce.wrapperWidth;xo(re,qe,yt),Ee.viewOffset=wr(qn(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=Ji(re.display,re.doc,Ee),ce.visible.from>=re.display.viewFrom&&ce.visible.to<=re.display.viewTo)break}else be&&(ce.visible=Ji(re.display,re.doc,Ee));if(!ed(re,ce))break;li(re);var Oe=Wi(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=Wi(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,yt=qe.firstChild;function Lt(tr){var or=tr.nextSibling;return me&&ae&&re.display.currentWheelTarget==tr?tr.style.display="none":tr.parentNode.removeChild(tr),or}for(var kt=be.view,Rt=be.viewFrom,nn=0;nn<kt.length;nn++){var zt=kt[nn];if(!zt.hidden)if(!zt.node||zt.node.parentNode!=qe){var yn=ki(re,zt,Rt,Ee);qe.insertBefore(yn,yt)}else{for(;yt!=zt.node;)yt=Lt(yt);var fn=Oe&&ce!=null&&ce<=Rt&&zt.lineNumber;zt.changes&&(xt(zt.changes,"gutter")>-1&&(fn=!1),bo(re,zt,Rt,Ee)),fn&&(Fe(zt.lineNumber),zt.lineNumber.appendChild(document.createTextNode(jn(re.options,Rt)))),yt=zt.node.nextSibling}Rt+=zt.size}for(;yt;)yt=Lt(yt)}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",yt=0;yt<Ee.length;yt++)if(!Ee[yt].hidden){re.options.fixedGutter&&(Ee[yt].gutter&&(Ee[yt].gutter.style.left=qe),Ee[yt].gutterBackground&&(Ee[yt].gutterBackground.style.left=qe));var Lt=Ee[yt].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=jn(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,yt=Oe.offsetWidth-qe;return be.lineGutter.style.width="",be.lineNumInnerWidth=Math.max(qe,be.lineGutter.offsetWidth-yt)+1,be.lineNumWidth=be.lineNumInnerWidth+yt,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],yt=null;if(typeof qe!="string"&&(yt=qe.style,qe=qe.className),qe=="CodeMirror-linenumbers")if(ce)be=!0;else continue;Ee.push({className:qe,style:yt})}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,yt=Oe.style,Lt=ce.appendChild(Ae("div",null,"CodeMirror-gutter "+qe));yt&&(Lt.style.cssText=yt),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),Do(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=Re("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=Re("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var qe=Re("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: "+wt+"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&&!(gt&&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:gt?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,yt=qe.scroller,Lt=yt.scrollWidth>yt.clientWidth,kt=yt.scrollHeight>yt.clientHeight;if(be&&Lt||Oe&&kt){if(Oe&&ae&&me){e:for(var Rt=ce.target,nn=qe.view;Rt!=yt;Rt=Rt.parentNode)for(var zt=0;zt<nn.length;zt++)if(nn[zt].node==Rt){re.display.currentWheelTarget=Rt;break e}}if(be&&!gt&&!Se&&va!=null){Oe&&kt&&Yl(re,Math.max(0,yt.scrollTop+Oe*va)),$l(re,Math.max(0,yt.scrollLeft+be*va)),(!Oe||Oe&&kt)&&Kn(ce),qe.wheelStartX=null;return}if(Oe&&va!=null){var yn=Oe*va,fn=re.doc.scrollTop,tr=fn+qe.wrapper.clientHeight;yn<0?fn=Math.max(0,fn+yn-50):tr=Math.min(re.doc.height,tr+yn+50),ah(re,{top:fn,bottom:tr})}Ks<20&&(qe.wheelStartX==null?(qe.wheelStartX=yt.scrollLeft,qe.wheelStartY=yt.scrollTop,qe.wheelDX=be,qe.wheelDY=Oe,setTimeout(function(){if(qe.wheelStartX!=null){var or=yt.scrollLeft-qe.wheelStartX,vr=yt.scrollTop-qe.wheelStartY,Lr=vr&&qe.wheelDY&&vr/qe.wheelDY||or&&qe.wheelDX&&or/qe.wheelDX;qe.wheelStartX=qe.wheelStartY=null,Lr&&(va=(va*Ks+Lr)/(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(!Dn(Ee.anchor,be.anchor)||!Dn(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(Ln(this.ranges[ce].anchor),Ln(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(Fn(ce,be.from())>=0&&Fn(re,be.to())<=0)return Ee}return-1};var To=function(re,ce){this.anchor=re,this.head=ce};To.prototype.from=function(){return zn(this.anchor,this.head)},To.prototype.to=function(){return er(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(yn,fn){return Fn(yn.from(),fn.from())}),Ee=xt(ce,Oe);for(var qe=1;qe<ce.length;qe++){var yt=ce[qe],Lt=ce[qe-1],kt=Fn(Lt.to(),yt.from());if(be&&!yt.empty()?kt>0:kt>=0){var Rt=zn(Lt.from(),yt.from()),nn=er(Lt.to(),yt.to()),zt=Lt.empty()?yt.from()==yt.head:Lt.from()==Lt.head;qe<=Ee&&--Ee,ce.splice(--qe,2,new To(zt?nn:Rt,zt?Rt:nn))}}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,mt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function Wh(re,ce){if(Fn(re,ce.from)<0)return re;if(Fn(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,yt=0;yt<ce.length;yt++){var Lt=ce[yt],kt=Mc(Lt.from,Oe,qe),Rt=Mc(hh(Lt),Oe,qe);if(Oe=Lt.to,qe=Rt,Ee=="around"){var nn=re.sel.ranges[yt],zt=Fn(nn.head,nn.anchor)<0;be[yt]=new To(zt?Rt:kt,zt?kt:Rt)}else be[yt]=new To(kt,kt)}return new xl(be,re.sel.primIndex)}function Qi(re){re.doc.mode=on(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&&Do(re)}function up(re,ce){return ce.from.ch==0&&ce.to.ch==0&&mt(ce.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function nd(re,ce,Ee,be){function Oe(qr){return Ee?Ee[qr]:null}function qe(qr,Gr,ai){vi(qr,Gr,ai,be),Ar(qr,"change",qr,ce)}function yt(qr,Gr){for(var ai=[],Oi=qr;Oi<Gr;++Oi)ai.push(new Si(Rt[Oi],Oe(Oi),be));return ai}var Lt=ce.from,kt=ce.to,Rt=ce.text,nn=qn(re,Lt.line),zt=qn(re,kt.line),yn=mt(Rt),fn=Oe(Rt.length-1),tr=kt.line-Lt.line;if(ce.full)re.insert(0,yt(0,Rt.length)),re.remove(Rt.length,re.size-Rt.length);else if(up(re,ce)){var or=yt(0,Rt.length-1);qe(zt,zt.text,fn),tr&&re.remove(Lt.line,tr),or.length&&re.insert(Lt.line,or)}else if(nn==zt)if(Rt.length==1)qe(nn,nn.text.slice(0,Lt.ch)+yn+nn.text.slice(kt.ch),fn);else{var vr=yt(1,Rt.length-1);vr.push(new Si(yn+nn.text.slice(kt.ch),fn,be)),qe(nn,nn.text.slice(0,Lt.ch)+Rt[0],Oe(0)),re.insert(Lt.line+1,vr)}else if(Rt.length==1)qe(nn,nn.text.slice(0,Lt.ch)+Rt[0]+zt.text.slice(kt.ch),Oe(0)),re.remove(Lt.line+1,tr);else{qe(nn,nn.text.slice(0,Lt.ch)+Rt[0],Oe(0)),qe(zt,yn+zt.text.slice(kt.ch),fn);var Lr=yt(1,Rt.length-1);tr>1&&re.remove(Lt.line+1,tr-1),re.insert(Lt.line+1,Lr)}Ar(re,"change",re,ce)}function ql(re,ce,Ee){function be(Oe,qe,yt){if(Oe.linked)for(var Lt=0;Lt<Oe.linked.length;++Lt){var kt=Oe.linked[Lt];if(kt.doc!=qe){var Rt=yt&&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||Nr(re),re.options.mode=ce.modeOption,Do(re)}function df(re){(re.doc.direction=="rtl"?Ke:Be)(re.display.lineDiv,"CodeMirror-rtl")}function ev(re){yo(re,function(){df(re),Do(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:Ln(ce.from),to:hh(ce),text:Ir(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=mt(re);if(ce.ranges)re.pop();else break}}function pf(re,ce){if(ce)return Nc(re.done),mt(re.done);if(re.done.length&&!mt(re.done).ranges)return mt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),mt(re.done)}function gf(re,ce,Ee,be){var Oe=re.history;Oe.undone.length=0;var qe=+new Date,yt,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)=="*"))&&(yt=pf(Oe,Oe.lastOp==be)))Lt=mt(yt.changes),Fn(ce.from,ce.to)==0&&Fn(ce.from,Lt.to)==0?Lt.to=hh(ce):yt.changes.push(id(re,ce));else{var kt=mt(Oe.done);for((!kt||!kt.ranges)&&Ac(re.sel,Oe.done),yt={changes:[id(re,ce)],generation:Oe.generation},Oe.done.push(yt);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||tn(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,mt(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=mt(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(yt){yt.markedSpans&&((Oe||(Oe=ce["spans_"+re.id]={}))[qe]=yt.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=Gi(re,ce);if(!Ee)return be;if(!be)return Ee;for(var Oe=0;Oe<Ee.length;++Oe){var qe=Ee[Oe],yt=be[Oe];if(qe&&yt)e:for(var Lt=0;Lt<yt.length;++Lt){for(var kt=yt[Lt],Rt=0;Rt<qe.length;++Rt)if(qe[Rt].marker==kt.marker)continue e;qe.push(kt)}else yt&&(Ee[Oe]=yt)}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 yt=qe.changes,Lt=[];be.push({changes:Lt});for(var kt=0;kt<yt.length;++kt){var Rt=yt[kt],nn=void 0;if(Lt.push({from:Rt.from,to:Rt.to,text:Rt.text}),ce)for(var zt in Rt)(nn=zt.match(/^spans_(\d+)$/))&&xt(ce,Number(nn[1]))>-1&&(mt(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=Fn(ce,Oe)<0;qe!=Fn(Ee,Oe)<0?(Oe=ce,ce=Ee):qe!=Fn(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 yt=Dl(re.cm,be,re.sel.primIndex);gs(re,yt,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(rr(re,Oe[qe].anchor),rr(re,Oe[qe].head))},origin:Ee&&Ee.origin};return tn(re,"beforeSelectionChange",re,be),re.cm&&tn(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=mt(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){(Sn(re,"beforeSelectionChange")||re.cm&&Sn(re.cm,"beforeSelectionChange"))&&(ce=Ug(re,ce,Ee));var be=Ee&&Ee.bias||(Fn(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,Pn(re.cm)),Ar(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 yt=ce.ranges[qe],Lt=ce.ranges.length==re.sel.ranges.length&&re.sel.ranges[qe],kt=Sf(re,yt.anchor,Lt&&Lt.anchor,Ee,be),Rt=Sf(re,yt.head,Lt&&Lt.head,Ee,be);(Oe||kt!=yt.anchor||Rt!=yt.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=qn(re,ce.line);if(qe.markedSpans)for(var yt=0;yt<qe.markedSpans.length;++yt){var Lt=qe.markedSpans[yt],kt=Lt.marker,Rt="selectLeft"in kt?!kt.selectLeft:kt.inclusiveLeft,nn="selectRight"in kt?!kt.selectRight:kt.inclusiveRight;if((Lt.from==null||(Rt?Lt.from<=ce.ch:Lt.from<ce.ch))&&(Lt.to==null||(nn?Lt.to>=ce.ch:Lt.to>ce.ch))){if(Oe&&(tn(kt,"beforeCursorEnter"),kt.explicitlyCleared))if(qe.markedSpans){--yt;continue}else break;if(!kt.atomic)continue;if(Ee){var zt=kt.find(be<0?1:-1),yn=void 0;if((be<0?nn:Rt)&&(zt=fp(re,zt,-be,zt&&zt.line==ce.line?qe:null)),zt&&zt.line==ce.line&&(yn=Fn(zt,Ee))&&(be<0?yn<0:yn>0))return _u(re,zt,ce,be,Oe)}var fn=kt.find(be<0?-1:1);return(be<0?Rt:nn)&&(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,yt=_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 yt||(re.cantEdit=!0,en(re.first,0))}function fp(re,ce,Ee,be){return Ee<0&&ce.ch==0?ce.line>re.first?rr(re,en(ce.line-1)):null:Ee>0&&ce.ch==(be||qn(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()),dt)}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,yt,Lt){Oe&&(be.from=rr(re,Oe)),qe&&(be.to=rr(re,qe)),yt&&(be.text=yt),Lt!==void 0&&(be.origin=Lt)}),tn(re,"beforeChange",re,be),re.cm&&tn(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(!((Sn(re,"beforeChange")||re.cm&&Sn(re.cm,"beforeChange"))&&(ce=xf(re,ce,!0),!ce))){var be=hi&&!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]==""&&Fn(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,Gi(re,ce));var be=[];ql(re,function(Oe,qe){!qe&&xt(be,Oe.history)==-1&&(pp(Oe.history,ce),be.push(Oe.history)),jc(Oe,ce,null,Gi(Oe,ce))})}}function wf(re,ce,Ee){var be=re.cm&&re.cm.state.suppressEdits;if(!(be&&!Ee)){for(var Oe=re.history,qe,yt=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}yt=qe}else if(be){Lt.push(qe);return}else break;var nn=[];Ac(yt,kt),kt.push({changes:nn,generation:Oe.generation}),Oe.generation=qe.generation||++Oe.maxGeneration;for(var zt=Sn(re,"beforeChange")||re.cm&&Sn(re.cm,"beforeChange"),yn=function(or){var vr=qe.changes[or];if(vr.origin=ce,zt&&!xf(re,vr,!1))return Lt.length=0,{};nn.push(id(re,vr));var Lr=or?hf(re,vr):mt(Lt);jc(re,vr,Lr,od(re,vr)),!or&&re.cm&&re.cm.scrollIntoView({from:vr.from,to:hh(vr)});var qr=[];ql(re,function(Gr,ai){!ai&&xt(qr,Gr.history)==-1&&(pp(Gr.history,vr),qr.push(Gr.history)),jc(Gr,vr,null,od(Gr,vr))})},fn=qe.changes.length-1;fn>=0;--fn){var tr=yn(fn);if(tr)return tr.v}}}}function dp(re,ce){if(ce!=0&&(re.first+=ce,re.sel=new xl(St(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)){Do(re.cm,re.first,re.first-ce,ce);for(var Ee=re.cm.display,be=Ee.viewFrom;be<Ee.viewTo;be++)_i(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:[mt(ce.text)],origin:ce.origin}}var qe=re.lastLine();ce.to.line>qe&&(ce={from:ce.from,to:en(qe,qn(re,qe).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=Ir(re,ce.from,ce.to),Ee||(Ee=hf(re,ce)),re.cm?Wg(re.cm,ce,be):nd(re,ce,be),Kh(re,Ee,dt),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,yt=ce.to,Lt=!1,kt=qe.line;re.options.lineWrapping||(kt=Nt(kn(qn(be,qe.line))),be.iter(kt,yt.line+1,function(fn){if(fn==Oe.maxLine)return Lt=!0,!0})),be.sel.contains(ce.from,ce.to)>-1&&Pn(re),nd(be,ce,Ee,Fo(re)),re.options.lineWrapping||(be.iter(kt,qe.line+ce.text.length,function(fn){var tr=Jr(fn);tr>Oe.maxLineLength&&(Oe.maxLine=fn,Oe.maxLineLength=tr,Oe.maxLineChanged=!0,Lt=!1)}),Lt&&(re.curOp.updateMaxLine=!0)),ii(be,qe.line),Tc(re,400);var Rt=ce.text.length-(yt.line-qe.line)-1;ce.full?Do(re):qe.line==yt.line&&ce.text.length==1&&!up(re.doc,ce)?_i(re,qe.line,"text"):Do(re,qe.line,yt.line+1,Rt);var nn=Sn(re,"changes"),zt=Sn(re,"change");if(zt||nn){var yn={from:qe,to:yt,text:ce.text,removed:ce.removed,origin:ce.origin};zt&&Ar(re,"change",re,yn),nn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(yn)}re.display.selForContextMenu=null}function Zh(re,ce,Ee,be,Oe){var qe;be||(be=Ee),Fn(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],yt=!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){yt=!1;break}}yt||(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=qn(re,Zn(re,ce)):Oe=Nt(ce),Oe==null?null:(be(qe,Oe)&&re.cm&&_i(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,mi(Oe),Ar(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),yt=be.height;if(be.removeInner(re,qe),this.height-=yt-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 yt=Oe.lines.length%25+25,Lt=yt;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,yt),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=xt(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 yt=Math.min(ce,qe-re);if(Oe.iterN(re,yt,Ee))return!0;if((ce-=yt)==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=Nt(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);bi(Ee,Math.max(0,Ee.height-qe)),re&&(yo(re,function(){Kg(re,Ee,-qe),_i(re,be,"widget")}),Ar(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)||bi(be,be.height+Oe),Ee&&yo(Ee,function(){Ee.curOp.forceUpdate=!0,Kg(Ee,be,Oe),Ar(Ee,"lineWidgetChanged",Ee,re,Nt(be))}))},Tn(zu);function Kg(re,ce,Ee){wr(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(yt){var Lt=yt.widgets||(yt.widgets=[]);if(Oe.insertAt==null?Lt.push(Oe):Lt.splice(Math.min(Lt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=yt,qe&&!ln(re,yt)){var kt=wr(yt)<re.scrollTop;bi(yt,yt.height+zo(Oe)),kt&&_h(qe,Oe.height),qe.curOp.forceUpdate=!0}return!0}),qe&&Ar(qe,"lineWidgetAdded",qe,Oe,typeof ce=="number"?ce:Nt(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),Sn(this,"clear")){var Ee=this.find();Ee&&Ar(this,"clear",Ee.from,Ee.to)}for(var be=null,Oe=null,qe=0;qe<this.lines.length;++qe){var yt=this.lines[qe],Lt=ui(yt.markedSpans,this);re&&!this.collapsed?_i(re,Nt(yt),"text"):re&&(Lt.to!=null&&(Oe=Nt(yt)),Lt.from!=null&&(be=Nt(yt))),yt.markedSpans=si(yt.markedSpans,Lt),Lt.from==null&&this.collapsed&&!ln(this.doc,yt)&&re&&bi(yt,Pa(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var kt=0;kt<this.lines.length;++kt){var Rt=kn(this.lines[kt]),nn=Jr(Rt);nn>re.display.maxLineLength&&(re.display.maxLine=Rt,re.display.maxLineLength=nn,re.display.maxLineChanged=!0)}be!=null&&re&&this.collapsed&&Do(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&&Ar(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],yt=ui(qe.markedSpans,this);if(yt.from!=null&&(Ee=en(ce?qe:Nt(qe),yt.from),re==-1))return Ee;if(yt.to!=null&&(be=en(ce?qe:Nt(qe),yt.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=Nt(ce.line),yt=il(be,qe);if(yt&&(rh(yt),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&&bi(Oe,Oe.height+kt)}Ar(be,"markerChanged",be,re)})},Zt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||xt(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Zt.prototype.detachLine=function(re){if(this.lines.splice(xt(this.lines,re),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Tn(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),yt=Fn(ce,Ee);if(be&&bt(be,qe,!1),yt>0||yt==0&&qe.clearWhenEmpty!==!1)return qe;if(qe.replacedWith&&(qe.collapsed=!0,qe.widgetNode=Re("span",[qe.replacedWith],"CodeMirror-widget"),be.handleMouseEvents||qe.widgetNode.setAttribute("cm-ignore-events","true"),be.insertLeft&&(qe.widgetNode.insertLeft=!0)),qe.collapsed){if(_n(re,ce.line,ce,Ee,qe)||ce.line!=Ee.line&&_n(re,Ee.line,ce,Ee,qe))throw new Error("Inserting collapsed marker partially overlapping an existing one");vn()}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&&kn(zt)==kt.display.maxLine&&(Rt=!0),qe.collapsed&&Lt!=ce.line&&bi(zt,0),Ii(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)&&bi(zt,0)}),qe.clearOnEnter&&$t(qe,"beforeCursorEnter",function(){return qe.clear()}),qe.readOnly&&(Li(),(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)Do(kt,ce.line,Ee.line+1);else if(qe.className||qe.startStyle||qe.endStyle||qe.css||qe.attributes||qe.title)for(var nn=ce.line;nn<=Ee.line;nn++)_i(kt,nn,"text");qe.atomic&&vf(kt.doc),Ar(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();Ar(this,"clear")}},gu.prototype.find=function(re,ce){return this.primary.find(re,ce)},Tn(gu);function Zg(re,ce,Ee,be,Oe){be=bt(be),be.shared=!1;var qe=[Yh(re,ce,Ee,be,Oe)],yt=qe[0],Lt=be.widgetNode;return ql(re,function(kt){Lt&&(be.widgetNode=Lt.cloneNode(!0)),qe.push(Yh(kt,rr(kt,ce),rr(kt,Ee),be,Oe));for(var Rt=0;Rt<kt.linked.length;++Rt)if(kt.linked[Rt].isParent)return;yt=mt(qe)}),new gu(qe,yt)}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),yt=re.clipPos(Oe.to);if(Fn(qe,yt)){var Lt=Yh(re,qe,yt,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 yt=0;yt<Oe.markers.length;yt++){var Lt=Oe.markers[yt];xt(qe,Lt.doc)==-1&&(Lt.parent=null,Oe.markers.splice(yt--,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),dt)};os.prototype=we(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=gi(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,qn(this,Ee).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&Bu(this.cm,0,0),gs(this,Iu(ce),dt)}),replaceRange:function(re,ce,Ee,be){ce=rr(this,ce),Ee=Ee?rr(this,Ee):ce,Zh(this,re,ce,Ee,be)},getRange:function(re,ce,Ee){var be=Ir(this,rr(this,re),rr(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(Mn(this,re))return qn(this,re)},getLineNumber:function(re){return Nt(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=qn(this,re)),kn(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return rr(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,rr(this,typeof re=="number"?en(re,ce||0):re),null,Ee)}),setSelection:Ha(function(re,ce,Ee){Hh(this,rr(this,re),rr(this,ce||re),Ee)}),extendSelection:Ha(function(re,ce,Ee){sd(this,rr(this,re),ce&&rr(this,ce),Ee)}),extendSelections:Ha(function(re,ce){Gg(this,cr(this,re),ce)}),extendSelectionsBy:Ha(function(re,ce){var Ee=St(this.sel.ranges,re);Gg(this,cr(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(rr(this,re[Oe].anchor),rr(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(rr(this,re),rr(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=Ir(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=Ir(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 yt=Oe.ranges[qe];be[qe]={from:yt.from(),to:yt.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&&Ie(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,Ie(Ee.gutterMarkers)&&(Ee.gutterMarkers=null),!0})})}),lineInfo:function(re){var ce;if(typeof re=="number"){if(!Mn(this,re)||(ce=re,re=qn(this,re),!re))return null}else if(ce=Nt(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 yt=qe.match(je(Ee));if(!yt)return!1;var Lt=yt.index+yt[0].length;be[Oe]=qe.slice(0,yt.index)+(!yt.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,rr(this,re),rr(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=rr(this,re),Yh(this,re,re,Ee,"bookmark")},findMarksAt:function(re){re=rr(this,re);var ce=[],Ee=qn(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=rr(this,re),ce=rr(this,ce);var be=[],Oe=re.line;return this.iter(re.line,ce.line+1,function(qe){var yt=qe.markedSpans;if(yt)for(var Lt=0;Lt<yt.length;Lt++){var kt=yt[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}),rr(this,en(Ee,ce))},indexFromPos:function(re){re=rr(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(gi(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(gi(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)||Oo(ce.display,re))){Kn(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),yt=0,Lt=function(){++yt==Oe&&Da(ce,function(){Ee=rr(ce.doc,Ee);var fn={from:Ee,to:Ee,text:ce.doc.splitLines(qe.filter(function(tr){return tr!=null}).join(ce.doc.lineSeparator())),origin:"paste"};dh(ce.doc,fn),ld(ce.doc,Iu(rr(ce.doc,Ee),rr(ce.doc,hh(fn))))})()},kt=function(fn,tr){if(ce.options.allowDropFileTypes&&xt(ce.options.allowDropFileTypes,fn.type)==-1){Lt();return}var or=new FileReader;or.onerror=function(){return Lt()},or.onload=function(){var vr=or.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(vr)){Lt();return}qe[tr]=vr,Lt()},or.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 nn=re.dataTransfer.getData("Text");if(nn){var zt;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(zt=ce.listSelections()),Kh(ce.doc,Iu(Ee,Ee)),zt)for(var yn=0;yn<zt.length;++yn)Zh(ce.doc,"",zt[yn].anchor,zt[yn].head,"drag");ce.replaceSelection(nn,"around","paste"),ce.display.input.focus()}}catch(fn){}}}}function Yg(re,ce){if(De&&(!re.state.draggingText||+new Date-Pf<100)){Er(ce);return}if(!(Wt(re,ce)||Oo(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();ao(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,yt=0;yt<ce.length-1;yt++){var Lt=ce[yt];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=St(Ee.split(" "),xp),qe=0;qe<Oe.length;qe++){var yt=void 0,Lt=void 0;qe==Oe.length-1?(Lt=Oe.join(" "),yt=be):(Lt=Oe.slice(0,qe+1).join(" "),yt="...");var kt=ce[Lt];if(!kt)ce[Lt]=yt;else if(kt!=yt)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 yt=Pl(re,ce.fallthrough[qe],Ee,be);if(yt)return yt}}}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&&Fn(qe.from,mt(be).to)<=0;){var yt=be.pop();if(Fn(yt.from,qe.from)<0){qe.from=yt.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=Kt(Ee,ce.doc.direction);if(qe){var yt=Oe<0?mt(qe):qe[0],Lt=Oe<0==(yt.level==1),kt=Lt?"after":"before",Rt;if(yt.level>0||ce.doc.direction=="rtl"){var nn=Sl(ce,Ee);Rt=Oe<0?Ee.text.length-1:0;var zt=Os(ce,nn,Rt).top;Rt=ut(function(yn){return Os(ce,nn,yn).top==zt},Oe<0==(yt.level==1)?yt.from:yt.to-1,Rt),kt=="before"&&(Rt=bp(Ee,Rt,1))}else Rt=Oe<0?yt.to:yt.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=Kt(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=At(Oe,Ee.ch,Ee.sticky),yt=Oe[qe];if(re.doc.direction=="ltr"&&yt.level%2==0&&(be>0?yt.to>Ee.ch:yt.from<Ee.ch))return Sa(ce,Ee,be);var Lt=function(Lr,qr){return bp(ce,Lr instanceof en?Lr.ch:Lr,qr)},kt,Rt=function(Lr){return re.options.lineWrapping?(kt=kt||Sl(re,ce),fa(re,ce,kt,Lr)):{begin:0,end:ce.text.length}},nn=Rt(Ee.sticky=="before"?Lt(Ee,-1):Ee.ch);if(re.doc.direction=="rtl"||yt.level==1){var zt=yt.level==1==be<0,yn=Lt(Ee,zt?1:-1);if(yn!=null&&(zt?yn<=yt.to&&yn<=nn.end:yn>=yt.from&&yn>=nn.begin)){var fn=zt?"before":"after";return new en(Ee.line,yn,fn)}}var tr=function(Lr,qr,Gr){for(var ai=function(Yo,Ia){return Ia?new en(Ee.line,Lt(Yo,1),"before"):new en(Ee.line,Yo,"after")};Lr>=0&&Lr<Oe.length;Lr+=qr){var Oi=Oe[Lr],_r=qr>0==(Oi.level!=1),qi=_r?Gr.begin:Lt(Gr.end,-1);if(Oi.from<=qi&&qi<Oi.to||(qi=_r?Oi.from:Lt(Oi.to,-1),Gr.begin<=qi&&qi<Gr.end))return ai(qi,_r)}},or=tr(qe+be,be,nn);if(or)return or;var vr=be>0?nn.end:Lt(nn.begin,-1);return vr!=null&&!(be>0&&vr==ce.text.length)&&(or=tr(be>0?0:Oe.length-1,be,Rt(vr)),or)?or:null}var ph={selectAll:ya,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),dt)},killLine:function(re){return Zs(re,function(ce){if(ce.empty()){var Ee=qn(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:rr(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(),yt=$e(re.getLine(qe.line),qe.ch,be);ce.push(Ft(be-yt%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=qn(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 yt=qn(re.doc,Oe.line-1).text;yt&&(Oe=new en(Oe.line,1),re.replaceRange(qe.charAt(0)+re.doc.lineSeparator()+yt.charAt(yt.length-1),en(Oe.line-1,yt.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=qn(re.doc,ce),be=kn(Ee);return be!=Ee&&(ce=Nt(be)),Ef(!0,re,be,ce,1)}function Ic(re,ce){var Ee=qn(re.doc,ce),be=Bn(Ee);return be!=Ee&&(ce=Nt(be)),Ef(!0,re,Ee,ce,-1)}function Cp(re,ce){var Ee=Bc(re,ce.line),be=qn(re.doc,Ee.line),Oe=Kt(be,re.doc.direction);if(!Oe||Oe[0].level==0){var qe=Math.max(Ee.ch,be.text.search(/\S/)),yt=ce.line==Ee.line&&ce.ch<=qe&&ce.ch;return en(Ee.line,yt?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)!=Pt}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 nt;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"&&Ar(re,"keyHandled",re,ce,Ee),(Oe=="handled"||Oe=="multi")&&(Kn(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&&!dr&&(ae?re.metaKey:re.ctrlKey)&&ce.replaceSelection("",null,"cut")),gt&&!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())&&!(Oo(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,Kn(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&&Fn(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,Oo(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):Hr(re)==Ee.scroller&&Kn(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(yt){if(typeof yt=="string"&&(yt=ph[yt]),!yt)return!1;var Lt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Lt=yt(re,Ee)!=Pt}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(ft(Eo,re),0):re.curOp.focus=Ue();var Oe=gd(re,Ee,be),qe=re.doc.sel,yt;re.options.dragDrop&&ri&&!re.isReadOnly()&&Ee=="single"&&(yt=qe.contains(ce))>-1&&(Fn((yt=qe.ranges[yt]).from(),ce)<0||ce.xRel>0)&&(Fn(yt.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,yt=Da(re,function(Rt){me&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,sn(Oe.wrapper.ownerDocument,"mouseup",yt),sn(Oe.wrapper.ownerDocument,"mousemove",Lt),sn(Oe.scroller,"dragstart",kt),sn(Oe.scroller,"drop",yt),qe||(Kn(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=yt,yt.copy=!be.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),$t(Oe.wrapper.ownerDocument,"mouseup",yt),$t(Oe.wrapper.ownerDocument,"mousemove",Lt),$t(Oe.scroller,"dragstart",kt),$t(Oe.scroller,"drop",yt),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),rr(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;Kn(ce);var yt,Lt,kt=qe.sel,Rt=kt.ranges;if(be.addNew&&!be.extend?(Lt=qe.sel.contains(Ee),Lt>-1?yt=Rt[Lt]:yt=new To(Ee,Ee)):(yt=qe.sel.primary(),Lt=qe.sel.primIndex),be.unit=="rectangle")be.addNew||(yt=new To(Ee,Ee)),Ee=Ua(re,ce,!0,!0),Lt=-1;else{var nn=Op(re,Ee,be.unit);be.extend?yt=ad(yt,nn.anchor,nn.head,be.extend):yt=nn}be.addNew?Lt==-1?(Lt=Rt.length,gs(qe,Dl(re,Rt.concat([yt]),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,yt,ct):(Lt=0,gs(qe,new xl([yt],0),ct),kt=qe.sel);var zt=Ee;function yn(Gr){if(Fn(zt,Gr)!=0)if(zt=Gr,be.unit=="rectangle"){for(var ai=[],Oi=re.options.tabSize,_r=$e(qn(qe,Ee.line).text,Ee.ch,Oi),qi=$e(qn(qe,Gr.line).text,Gr.ch,Oi),Yo=Math.min(_r,qi),Ia=Math.max(_r,qi),ia=Math.min(Ee.line,Gr.line),Rs=Math.min(re.lastLine(),Math.max(Ee.line,Gr.line));ia<=Rs;ia++){var ms=qn(qe,ia).text,Ma=Et(ms,Yo,Oi);Yo==Ia?ai.push(new To(en(ia,Ma),en(ia,Ma))):ms.length>Ma&&ai.push(new To(en(ia,Ma),en(ia,Et(ms,Ia,Oi))))}ai.length||ai.push(new To(Ee,Ee)),gs(qe,Dl(re,kt.ranges.slice(0,Lt).concat(ai),Lt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Gr)}else{var Xs=yt,as=Op(re,Gr,be.unit),La=Xs.anchor,mo;Fn(as.anchor,La)>0?(mo=as.head,La=zn(Xs.from(),as.anchor)):(mo=as.anchor,La=er(Xs.to(),as.head));var ua=kt.ranges.slice(0);ua[Lt]=nm(re,new To(rr(qe,La),mo)),gs(qe,Dl(re,ua,Lt),ct)}}var fn=Oe.wrapper.getBoundingClientRect(),tr=0;function or(Gr){var ai=++tr,Oi=Ua(re,Gr,!0,be.unit=="rectangle");if(Oi)if(Fn(Oi,zt)!=0){re.curOp.focus=Ue(),yn(Oi);var _r=Ji(Oe,qe);(Oi.line>=_r.to||Oi.line<_r.from)&&setTimeout(Da(re,function(){tr==ai&&or(Gr)}),150)}else{var qi=Gr.clientY<fn.top?-20:Gr.clientY>fn.bottom?20:0;qi&&setTimeout(Da(re,function(){tr==ai&&(Oe.scroller.scrollTop+=qi,or(Gr))}),50)}}function vr(Gr){re.state.selectingText=!1,tr=1/0,Gr&&(Kn(Gr),Oe.input.focus()),sn(Oe.wrapper.ownerDocument,"mousemove",Lr),sn(Oe.wrapper.ownerDocument,"mouseup",qr),qe.history.lastSelOrigin=null}var Lr=Da(re,function(Gr){Gr.buttons===0||!Ur(Gr)?vr(Gr):or(Gr)}),qr=Da(re,vr);re.state.selectingText=qr,$t(Oe.wrapper.ownerDocument,"mousemove",Lr),$t(Oe.wrapper.ownerDocument,"mouseup",qr)}function nm(re,ce){var Ee=ce.anchor,be=ce.head,Oe=qn(re.doc,Ee.line);if(Fn(Ee,be)==0&&Ee.sticky==be.sticky)return ce;var qe=Kt(Oe);if(!qe)return ce;var yt=At(qe,Ee.ch,Ee.sticky),Lt=qe[yt];if(Lt.from!=Ee.ch&&Lt.to!=Ee.ch)return ce;var kt=yt+(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 nn=At(qe,be.ch,be.sticky),zt=nn-yt||(be.ch-Ee.ch)*(Lt.level==1?-1:1);nn==kt-1||nn==kt?Rt=zt<0:Rt=zt>0}var yn=qe[kt+(Rt?-1:0)],fn=Rt==(yn.level==1),tr=fn?yn.from:yn.to,or=fn?"after":"before";return Ee.ch==tr&&Ee.sticky==or?ce:new To(new en(Ee.line,tr,or),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(yn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;be&&Kn(ce);var yt=re.display,Lt=yt.lineDiv.getBoundingClientRect();if(qe>Lt.bottom||!Sn(re,Ee))return fr(ce);qe-=Lt.top-yt.viewOffset;for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=yt.gutters.childNodes[kt];if(Rt&&Rt.getBoundingClientRect().right>=Oe){var nn=Ht(re.doc,qe),zt=re.display.gutterSpecs[kt];return tn(re,Ee,re,nn,zt.className,ce),fr(ce)}}}function vd(re,ce){return md(re,ce,"gutterClick",!0)}function yd(re,ce){Oo(re.display,ce)||rm(re,ce)||Wt(re,ce,"contextmenu")||Pe||re.display.input.onContextMenu(ce)}function rm(re,ce){return Sn(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,yt){re.defaults[be]=Oe,qe&&(ce[be]=yt?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),Do(be)},!0),Ee("lineSeparator",null,function(be,Oe){if(be.doc.lineSep=Oe,!!Oe){var qe=[],yt=be.doc.first;be.doc.iter(function(kt){for(var Rt=0;;){var nn=kt.text.indexOf(Oe,Rt);if(nn==-1)break;Rt=nn+Oe.length,qe.push(en(yt,nn))}yt++});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 yt=$h(Oe),Lt=qe!=gh&&$h(qe);Lt&&Lt.detach&&Lt.detach(be,yt),yt.attach&&yt.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"),Nr(re)),fi(re),Do(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?bt(ce):{},bt(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 nt,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 yt in kf)kf.hasOwnProperty(yt)&&kf[yt](this,ce[yt],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)||Oo(re.display,kt))){Kn(kt);var nn=re.findWordAt(Rt);sd(re.doc,nn.anchor,nn.head)}}})):$t(ce.scroller,"dblclick",function(kt){return Wt(re,kt)||Kn(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 yt(kt,Rt){if(Rt.left==null)return!0;var nn=Rt.left-kt.left,zt=Rt.top-kt.top;return nn*nn+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&&!Oo(ce,kt)&&Rt.left!=null&&!Rt.moved&&new Date-Rt.start<300){var nn=re.coordsChar(ce.activeTouch,"page"),zt;!Rt.prev||yt(Rt,Rt.prev)?zt=new To(nn,nn):!Rt.prev.prev||yt(Rt,Rt.prev.prev)?zt=re.findWordAt(nn):zt=new To(en(nn.line,0),rr(re.doc,en(nn.line+1,0))),re.setSelection(zt.anchor,zt.head),re.focus(),Kn(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),tn(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)||Er(kt)},over:function(kt){Wt(re,kt)||($g(re,kt),Er(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=Di(re,ce).state:Ee="prev");var yt=re.options.tabSize,Lt=qn(Oe,ce),kt=$e(Lt.text,null,yt);Lt.stateAfter&&(Lt.stateAfter=null);var Rt=Lt.text.match(/^\s*/)[0],nn;if(!be&&!/\S/.test(Lt.text))nn=0,Ee="not";else if(Ee=="smart"&&(nn=Oe.mode.indent(qe,Lt.text.slice(Rt.length),Lt.text),nn==Pt||nn>150)){if(!be)return;Ee="prev"}Ee=="prev"?ce>Oe.first?nn=$e(qn(Oe,ce-1).text,null,yt):nn=0:Ee=="add"?nn=kt+re.options.indentUnit:Ee=="subtract"?nn=kt-re.options.indentUnit:typeof Ee=="number"&&(nn=kt+Ee),nn=Math.max(0,nn);var zt="",yn=0;if(re.options.indentWithTabs)for(var fn=Math.floor(nn/yt);fn;--fn)yn+=yt,zt+=" ";if(yn<nn&&(zt+=Ft(nn-yn)),zt!=Rt)return Zh(Oe,zt,en(ce,0),en(ce,Rt.length),"+input"),Lt.stateAfter=null,!0;for(var tr=0;tr<Oe.sel.ranges.length;tr++){var or=Oe.sel.ranges[tr];if(or.head.line==ce&&or.head.ch<Rt.length){var vr=en(ce,Rt.length);fh(Oe,tr,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 yt=+new Date-200,Lt=Oe=="paste"||re.state.pasteIncoming>yt,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 nn=0;nn<Is.text.length;nn++)Rt.push(qe.splitLines(Is.text[nn]))}}else kt.length==be.ranges.length&&re.options.pasteLinesPerSelection&&(Rt=St(kt,function(Lr){return[Lr]}));for(var zt=re.curOp.updateInput,yn=be.ranges.length-1;yn>=0;yn--){var fn=be.ranges[yn],tr=fn.from(),or=fn.to();fn.empty()&&(Ee&&Ee>0?tr=en(tr.line,tr.ch-Ee):re.state.overwrite&&!Lt?or=en(or.line,Math.min(qn(qe,or.line).text.length,or.ch+mt(kt).length)):Lt&&Is&&Is.lineWise&&Is.text.join(`
`)==kt.join(`
`)&&(tr=or=en(tr.line,0)));var vr={from:tr,to:or,text:Rt?Rt[yn%Rt.length]:kt,origin:Oe||(Lt?"paste":re.state.cutIncoming>yt?"cut":"+input")};dh(re.doc,vr),Ar(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),yt=!1;if(qe.electricChars){for(var Lt=0;Lt<qe.electricChars.length;Lt++)if(ce.indexOf(qe.electricChars.charAt(Lt))>-1){yt=Ba(re,Oe.head.line,"smart");break}}else qe.electricInput&&qe.electricInput.test(qn(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(yt=Ba(re,Oe.head.line,"smart"));yt&&Ar(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,yt=qe[be];qe[be]==Oe&&be!="mode"||(qe[be]=Oe,ce.hasOwnProperty(be)&&Da(this,ce[be])(this,Oe,yt),tn(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(yt){return yt.priority}),this.state.modeGen++,Do(this)}),removeOverlay:Wa(function(be){for(var Oe=this.state.overlays,qe=0;qe<Oe.length;++qe){var yt=Oe[qe].modeSpec;if(yt==be||typeof be=="string"&&yt.name==be){Oe.splice(qe,1),this.state.modeGen++,Do(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"),Mn(this.doc,be)&&Ba(this,be,Oe,qe)}),indentSelection:Wa(function(be){for(var Oe=this.doc.sel.ranges,qe=-1,yt=0;yt<Oe.length;yt++){var Lt=Oe[yt];if(Lt.empty())Lt.head.line>qe&&(Ba(this,Lt.head.line,be,!0),qe=Lt.head.line,yt==this.doc.sel.primIndex&&Ol(this));else{var kt=Lt.from(),Rt=Lt.to(),nn=Math.max(qe,kt.line);qe=Math.min(this.lastLine(),Rt.line-(Rt.ch?0:1))+1;for(var zt=nn;zt<qe;++zt)Ba(this,zt,be);var yn=this.doc.sel.ranges;kt.ch==0&&Oe.length==yn.length&&yn[yt].from().ch>0&&fh(this.doc,yt,new To(kt,yn[yt].to()),dt)}}}),getTokenAt:function(be,Oe){return yr(this,be,Oe)},getLineTokens:function(be,Oe){return yr(this,en(be),Oe,!0)},getTokenTypeAt:function(be){be=rr(this.doc,be);var Oe=ei(this,qn(this.doc,be.line)),qe=0,yt=(Oe.length-1)/2,Lt=be.ch,kt;if(Lt==0)kt=Oe[2];else for(;;){var Rt=qe+yt>>1;if((Rt?Oe[Rt*2-1]:0)>=Lt)yt=Rt;else if(Oe[Rt*2+1]<Lt)qe=Rt+1;else{kt=Oe[Rt*2+2];break}}var nn=kt?kt.indexOf("overlay "):-1;return nn<0?kt:nn==0?null:kt.slice(0,nn-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 yt=Ee[Oe],Lt=this.getModeAt(be);if(typeof Lt[Oe]=="string")yt[Lt[Oe]]&&qe.push(yt[Lt[Oe]]);else if(Lt[Oe])for(var kt=0;kt<Lt[Oe].length;kt++){var Rt=yt[Lt[Oe][kt]];Rt&&qe.push(Rt)}else Lt.helperType&&yt[Lt.helperType]?qe.push(yt[Lt.helperType]):yt[Lt.name]&&qe.push(yt[Lt.name]);for(var nn=0;nn<yt._global.length;nn++){var zt=yt._global[nn];zt.pred(Lt,this)&&xt(qe,zt.val)==-1&&qe.push(zt.val)}return qe},getStateAfter:function(be,Oe){var qe=this.doc;return be=Zn(qe,be==null?qe.first+qe.size-1:be),Di(this,be+1,Oe).state},cursorCoords:function(be,Oe){var qe,yt=this.doc.sel.primary();return be==null?qe=yt.head:typeof be=="object"?qe=rr(this.doc,be):qe=be?yt.from():yt.to(),co(this,qe,Oe||"page")},charCoords:function(be,Oe){return Ga(this,rr(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,Ht(this.doc,be+this.display.viewOffset)},heightAtLine:function(be,Oe,qe){var yt=!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,yt=!0),Lt=qn(this.doc,be)}else Lt=be;return ga(this,Lt,{top:0,left:0},Oe||"page",qe||yt).top+(yt?this.doc.height-wr(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,yt,Lt){var kt=this.display;be=co(this,rr(this.doc,be));var Rt=be.bottom,nn=be.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),kt.sizer.appendChild(Oe),yt=="over")Rt=be.top;else if(yt=="above"||yt=="near"){var zt=Math.max(kt.wrapper.clientHeight,this.doc.height),yn=Math.max(kt.sizer.clientWidth,kt.lineSpace.clientWidth);(yt=="above"||be.bottom+Oe.offsetHeight>zt)&&be.top>Oe.offsetHeight?Rt=be.top-Oe.offsetHeight:be.bottom+Oe.offsetHeight<=zt&&(Rt=be.bottom),nn+Oe.offsetWidth>yn&&(nn=yn-Oe.offsetWidth)}Oe.style.top=Rt+"px",Oe.style.left=Oe.style.right="",Lt=="right"?(nn=kt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Lt=="left"?nn=0:Lt=="middle"&&(nn=(kt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=nn+"px"),qe&&ih(this,{left:nn,top:Rt,right:nn+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,yt){var Lt=1;Oe<0&&(Lt=-1,Oe=-Oe);for(var kt=rr(this.doc,be),Rt=0;Rt<Oe&&(kt=Mf(this.doc,kt,Lt,qe,yt),!kt.hitSide);++Rt);return kt},moveH:Wa(function(be,Oe){var qe=this;this.extendSelectionsBy(function(yt){return qe.display.shift||qe.doc.extend||yt.empty()?Mf(qe.doc,yt.head,be,Oe,qe.options.rtlMoveVisually):be<0?yt.from():yt.to()},ht)}),deleteH:Wa(function(be,Oe){var qe=this.doc.sel,yt=this.doc;qe.somethingSelected()?yt.replaceSelection("",null,"+delete"):Zs(this,function(Lt){var kt=Mf(yt,Lt.head,be,Oe,!1);return be<0?{from:kt,to:Lt.head}:{from:Lt.head,to:kt}})}),findPosV:function(be,Oe,qe,yt){var Lt=1,kt=yt;Oe<0&&(Lt=-1,Oe=-Oe);for(var Rt=rr(this.doc,be),nn=0;nn<Oe;++nn){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,yt=this.doc,Lt=[],kt=!this.display.shift&&!yt.extend&&yt.sel.somethingSelected();if(yt.extendSelectionsBy(function(nn){if(kt)return be<0?nn.from():nn.to();var zt=co(qe,nn.head,"div");nn.goalColumn!=null&&(zt.left=nn.goalColumn),Lt.push(zt.left);var yn=vh(qe,zt,be,Oe);return Oe=="page"&&nn==yt.sel.primary()&&_h(qe,Ga(qe,yn,"div").top-zt.top),yn},ht),Lt.length)for(var Rt=0;Rt<yt.sel.ranges.length;Rt++)yt.sel.ranges[Rt].goalColumn=Lt[Rt]}),findWordAt:function(be){var Oe=this.doc,qe=qn(Oe,be.line).text,yt=be.ch,Lt=be.ch;if(qe){var kt=this.getHelper(be,"wordChars");(be.sticky=="before"||Lt==qe.length)&&yt?--yt:++Lt;for(var Rt=qe.charAt(yt),nn=rt(Rt,kt)?function(zt){return rt(zt,kt)}:/\s/.test(Rt)?function(zt){return/\s/.test(zt)}:function(zt){return!/\s/.test(zt)&&!rt(zt)};yt>0&&nn(qe.charAt(yt-1));)--yt;for(;Lt<qe.length&&nn(qe.charAt(Lt));)++Lt}return new To(en(be.line,yt),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"),tn(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,yt=function(kt){return typeof kt=="number"||/^\d+$/.test(String(kt))?kt+"px":kt};be!=null&&(this.display.wrapper.style.width=yt(be)),Oe!=null&&(this.display.wrapper.style.height=yt(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){_i(qe,Lt,"widget");break}}++Lt}),this.curOp.forceUpdate=!0,tn(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;Do(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),tn(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,Ar(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}},Tn(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,yt){re.registerHelper(be,Oe,yt),Ee[be]._global.push({pred:qe,val:yt})}}function Mf(re,ce,Ee,be,Oe){var qe=ce,yt=Ee,Lt=qn(re,ce.line),kt=Oe&&re.direction=="rtl"?-Ee:Ee;function Rt(){var qr=ce.line+kt;return qr<re.first||qr>=re.first+re.size?!1:(ce=new en(qr,ce.ch,ce.sticky),Lt=qn(re,qr))}function nn(qr){var Gr;if(be=="codepoint"){var ai=Lt.text.charCodeAt(ce.ch+(be>0?0:-1));isNaN(ai)?Gr=null:Gr=new en(ce.line,Math.max(0,Math.min(Lt.text.length,ce.ch+Ee*(ai>=55296&&ai<56320?2:1))),-Ee)}else Oe?Gr=cd(re.cm,Lt,ce,Ee):Gr=Sa(Lt,ce,Ee);if(Gr==null)if(!qr&&Rt())ce=Ef(Oe,re.cm,Lt,ce.line,kt);else return!1;else ce=Gr;return!0}if(be=="char"||be=="codepoint")nn();else if(be=="column")nn(!0);else if(be=="word"||be=="group")for(var zt=null,yn=be=="group",fn=re.cm&&re.cm.getHelper(ce,"wordChars"),tr=!0;!(Ee<0&&!nn(!tr));tr=!1){var or=Lt.text.charAt(ce.ch)||`
`,vr=rt(or,fn)?"w":yn&&or==`
`?"n":!yn||/\s/.test(or)?null:"p";if(yn&&!tr&&!vr&&(vr="s"),zt&&zt!=vr){Ee<0&&(Ee=1,nn(),ce.sticky="after");break}if(vr&&(zt=vr),Ee>0&&!nn(!tr))break}var Lr=Sf(re,ce,qe,yt,!0);return Dn(qe,Lr)&&(Lr.hitSide=!0),Lr}function vh(re,ce,Ee,be){var Oe=re.doc,qe=ce.left,yt;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);yt=(Ee>0?ce.bottom:ce.top)+Ee*kt}else be=="line"&&(yt=Ee>0?ce.bottom+3:ce.top-3);for(var Rt;Rt=sa(re,qe,yt),!!Rt.outside;){if(Ee<0?yt<=0:yt>=Oe.height){Rt.hitSide=!0;break}yt+=Ee*5}return Rt}var Bo=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new nt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Bo.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 yt(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,dt),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 nn=_p(),zt=nn.firstChild;be.display.lineSpace.insertBefore(nn,be.display.lineSpace.firstChild),zt.value=Is.text.join(`
`);var yn=document.activeElement;st(zt),setTimeout(function(){be.display.lineSpace.removeChild(nn),yn.focus(),yn==Oe&&Ee.showPrimarySelection()},50)}}$t(Oe,"copy",yt),$t(Oe,"cut",yt)},Bo.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Bo.prototype.prepareSelection=function(){var re=hu(this.cm,!1);return re.focus=document.activeElement==this.div,re},Bo.prototype.showSelection=function(re,ce){!re||!this.cm.display.view.length||((re.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Bo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Bo.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),yt=Lf(ce,re.focusNode,re.focusOffset);if(!(qe&&!qe.bad&&yt&&!yt.bad&&Fn(zn(qe,yt),be)==0&&Fn(er(qe,yt),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 nn=Lt[Lt.length-1].measure,zt=nn.maps?nn.maps[nn.maps.length-1]:nn.map;Rt={node:zt[zt.length-1],offset:zt[zt.length-2]-zt[zt.length-3]}}if(!kt||!Rt){re.removeAllRanges();return}var yn=re.rangeCount&&re.getRangeAt(0),fn;try{fn=We(kt.node,kt.offset,Rt.offset,Rt.node)}catch(tr){}fn&&(!gt&&ce.state.focused?(re.collapse(kt.node,kt.offset),fn.collapsed||(re.removeAllRanges(),re.addRange(fn))):(re.removeAllRanges(),re.addRange(fn)),yn&&re.anchorNode==null?re.addRange(yn):gt&&this.startGracePeriod()),this.rememberSelection()}},Bo.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)},Bo.prototype.showMultipleSelections=function(re){Ne(this.cm.display.cursorDiv,re.cursors),Ne(this.cm.display.selectionDiv,re.selection)},Bo.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Bo.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var ce=re.getRangeAt(0).commonAncestorContainer;return Ye(this.div,ce)},Bo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Bo.prototype.blur=function(){this.div.blur()},Bo.prototype.getField=function(){return this.div},Bo.prototype.supportsTouch=function(){return!0},Bo.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)},Bo.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Bo.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),dt),(Ee.bad||be.bad)&&(ce.curOp.selectionChanged=!0)})}}},Bo.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,qn(re.doc,be.line-1).length)),Oe.ch==qn(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,yt,Lt;be.line==ce.viewFrom||(qe=Ds(re,be.line))==0?(yt=Nt(ce.view[0].line),Lt=ce.view[0].node):(yt=Nt(ce.view[qe].line),Lt=ce.view[qe-1].node.nextSibling);var kt=Ds(re,Oe.line),Rt,nn;if(kt==ce.view.length-1?(Rt=ce.viewTo-1,nn=ce.lineDiv.lastChild):(Rt=Nt(ce.view[kt+1].line)-1,nn=ce.view[kt+1].node.previousSibling),!Lt)return!1;for(var zt=re.doc.splitLines(Uc(re,Lt,nn,yt,Rt)),yn=Ir(re.doc,en(yt,0),en(Rt,qn(re.doc,Rt).text.length));zt.length>1&&yn.length>1;)if(mt(zt)==mt(yn))zt.pop(),yn.pop(),Rt--;else if(zt[0]==yn[0])zt.shift(),yn.shift(),yt++;else break;for(var fn=0,tr=0,or=zt[0],vr=yn[0],Lr=Math.min(or.length,vr.length);fn<Lr&&or.charCodeAt(fn)==vr.charCodeAt(fn);)++fn;for(var qr=mt(zt),Gr=mt(yn),ai=Math.min(qr.length-(zt.length==1?fn:0),Gr.length-(yn.length==1?fn:0));tr<ai&&qr.charCodeAt(qr.length-tr-1)==Gr.charCodeAt(Gr.length-tr-1);)++tr;if(zt.length==1&&yn.length==1&&yt==be.line)for(;fn&&fn>be.ch&&qr.charCodeAt(qr.length-tr-1)==Gr.charCodeAt(Gr.length-tr-1);)fn--,tr++;zt[zt.length-1]=qr.slice(0,qr.length-tr).replace(/^\u200b+/,""),zt[0]=zt[0].slice(fn).replace(/\u200b+$/,"");var Oi=en(yt,fn),_r=en(Rt,yn.length?mt(yn).length-tr:0);if(zt.length>1||zt[0]||Fn(Oi,_r))return Zh(re.doc,zt,Oi,_r,"+input"),!0},Bo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Bo.prototype.reset=function(){this.forceCompositionEnd()},Bo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Bo.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))},Bo.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&yo(this.cm,function(){return Do(re.cm)})},Bo.prototype.setUneditable=function(re){re.contentEditable="false"},Bo.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))},Bo.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Bo.prototype.onContextMenu=function(){},Bo.prototype.resetPosition=function(){},Bo.prototype.needsContentAttribute=!0;function wd(re,ce){var Ee=il(re,ce.line);if(!Ee||Ee.hidden)return null;var be=qn(re.doc,ce.line),Oe=na(Ee,be,ce.line),qe=Kt(be,re.doc.direction),yt="left";if(qe){var Lt=At(qe,ce.ch);yt=Lt%2?"right":"left"}var kt=th(Oe.map,ce.ch,yt);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="",yt=!1,Lt=re.doc.lineSeparator(),kt=!1;function Rt(fn){return function(tr){return tr.id==fn}}function nn(){yt&&(qe+=Lt,kt&&(qe+=Lt),yt=kt=!1)}function zt(fn){fn&&(nn(),qe+=fn)}function yn(fn){if(fn.nodeType==1){var tr=fn.getAttribute("cm-text");if(tr){zt(tr);return}var or=fn.getAttribute("cm-marker"),vr;if(or){var Lr=re.findMarks(en(be,0),en(Oe+1,0),Rt(+or));Lr.length&&(vr=Lr[0].find(0))&&zt(Ir(re.doc,vr.from,vr.to).join(Lt));return}if(fn.getAttribute("contenteditable")=="false")return;var qr=/^(pre|div|p|li|table|br)$/i.test(fn.nodeName);if(!/^br$/i.test(fn.nodeName)&&fn.textContent.length==0)return;qr&&nn();for(var Gr=0;Gr<fn.childNodes.length;Gr++)yn(fn.childNodes[Gr]);/^(pre|p)$/i.test(fn.nodeName)&&(kt=!0),qr&&(yt=!0)}else fn.nodeType==3&&zt(fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;yn(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(Nt(re.line),0),!0);if(ce==be&&(Oe=!0,ce=be.childNodes[Ee],Ee=0,!ce)){var qe=re.rest?mt(re.rest):re.line;return Gc(en(Nt(qe),qe.text.length),Oe)}var yt=ce.nodeType==3?ce:null,Lt=ce;for(!yt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(yt=ce.firstChild,Ee&&(Ee=yt.nodeValue.length));Lt.parentNode!=be;)Lt=Lt.parentNode;var kt=re.measure,Rt=kt.maps;function nn(vr,Lr,qr){for(var Gr=-1;Gr<(Rt?Rt.length:0);Gr++)for(var ai=Gr<0?kt.map:Rt[Gr],Oi=0;Oi<ai.length;Oi+=3){var _r=ai[Oi+2];if(_r==vr||_r==Lr){var qi=Nt(Gr<0?re.line:re.rest[Gr]),Yo=ai[Oi]+qr;return(qr<0||_r!=vr)&&(Yo=ai[Oi+(qr?1:0)]),en(qi,Yo)}}}var zt=nn(yt,Lt,Ee);if(zt)return Gc(zt,Oe);for(var yn=Lt.nextSibling,fn=yt?yt.nodeValue.length-Ee:0;yn;yn=yn.nextSibling){if(zt=nn(yn,yn.firstChild,0),zt)return Gc(en(zt.line,zt.ch-fn),Oe);fn+=yn.textContent.length}for(var tr=Lt.previousSibling,or=Ee;tr;tr=tr.previousSibling){if(zt=nn(tr,tr.firstChild,-1),zt)return Gc(en(zt.line,zt.ch+or),Oe);or+=tr.textContent.length}}var Ta=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new nt,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(yt){Wt(be,yt)||Dp(yt,be)||(be.state.pasteIncoming=+new Date,Ee.fastPoll())});function qe(yt){if(!Wt(be,yt)){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()});else if(be.options.lineWiseCopyCut){var Lt=Ip(be);tc({lineWise:!0,text:Lt.text}),yt.type=="cut"?be.setSelections(Lt.ranges,null,dt):(Ee.prevInput="",Oe.value=Lt.text.join(`
`),st(Oe))}else return;yt.type=="cut"&&(be.state.cutIncoming=+new Date)}}$t(Oe,"cut",qe),$t(Oe,"copy",qe),$t(re.scroller,"paste",function(yt){if(!(Oo(re,yt)||Wt(be,yt))){if(!Oe.dispatchEvent){be.state.pasteIncoming=+new Date,Ee.focus();return}var Lt=new Event("paste");Lt.clipboardData=yt.clipboardData,Oe.dispatchEvent(Lt)}}),$t(re.lineSpace,"selectstart",function(yt){Oo(re,yt)||Kn(yt)}),$t(Oe,"compositionstart",function(){var yt=be.getCursor("from");Ee.composing&&Ee.composing.range.clear(),Ee.composing={start:yt,range:be.markText(yt,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(),yt=ce.lineDiv.getBoundingClientRect();be.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Oe.top+yt.top-qe.top)),be.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Oe.left+yt.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 yt=0,Lt=Math.min(be.length,Oe.length);yt<Lt&&be.charCodeAt(yt)==Oe.charCodeAt(yt);)++yt;return yo(ce,function(){Tf(ce,Oe.slice(yt),be.length-yt,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),yt=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),dt);var kt=Oe.style.cssText,Rt=ce.wrapper.style.cssText,nn=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(re.clientY-nn.top-5)+"px; left: "+(re.clientX-nn.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 yn(){if(Oe.selectionStart!=null){var or=Ee.somethingSelected(),vr="\u200B"+(or?Oe.value:"");Oe.value="\u21DA",Oe.value=vr,ce.prevInput=or?"":"\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=yt),Oe.selectionStart!=null)){(!De||De&&fe<9)&&yn();var or=0,vr=function(){be.selForContextMenu==Ee.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&ce.prevInput=="\u200B"?Da(Ee,ya)(Ee):or++<10?be.detectingSelectAll=setTimeout(vr,500):(be.selForContextMenu=null,be.input.reset())};be.detectingSelectAll=setTimeout(vr,200)}}if(De&&fe>=9&&yn(),Pe){Er(re);var tr=function(){sn(window,"mouseup",tr),setTimeout(fn,20)};$t(window,"mouseup",tr)}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?bt(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 yt=qe.submit=function(){be(),qe.submit=Oe,qe.submit(),qe.submit=yt}}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=Pt,re.signal=tn,re.Line=Si,re.changeEnd=hh,re.scrollbarModel=fu,re.Pos=en,re.cmpPos=Fn,re.modes=ar,re.mimeModes=Sr,re.resolveMode=Rr,re.getMode=on,re.modeExtensions=rn,re.extendMode=Yt,re.copyState=nr,re.startState=Cr,re.innerMode=gr,re.commands=ph,re.keyMap=Vs,re.keyName=qg,re.isModifierKey=Dc,re.lookupKey=Pl,re.normalizeKeyMap=wp,re.StringStream=Nn,re.SharedTextMarker=gu,re.TextMarker=Zt,re.LineWidget=zu,re.e_preventDefault=Kn,re.e_stopPropagation=Mr,re.e_stop=Er,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)&&xt(Gu,Nf)<0&&(po.prototype[Nf]=function(re){return function(){return re.apply(this.doc,arguments)}}(os.prototype[Nf]));return Tn(os),po.inputStyles={textarea:Ta,contenteditable:Bo},po.defineMode=function(re){!po.defaults.mode&&re!="null"&&(po.defaults.mode=re),jr.apply(this,arguments)},po.defineMIME=to,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(gt){gt(at(89780),at(15525),at(98101))})(function(gt){"use strict";gt.defineMode("markdown",function(Bt,oe){var ze=gt.getMode(Bt,"text/html"),De=ze.name=="null";function fe($e){if(gt.findModeByName){var nt=gt.findModeByName($e);nt&&($e=nt.mime||nt.mimes[0])}var xt=gt.getMode(Bt,$e);return xt.name=="null"?null:xt}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?/^(#+)/:/^(#+)(?: |$)/,xe=/^ {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,nt,xt){return nt.f=nt.inline=xt,xt($e,nt)}function ue($e,nt,xt){return nt.f=nt.block=xt,xt($e,nt)}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 nt=De;if(!nt){var xt=gt.innerMode(ze,$e.htmlState);nt=xt.mode.name=="xml"&&xt.state.tagStart===null&&!xt.state.context&&xt.state.tokenize.isInText}nt&&($e.f=Re,$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,nt){var xt=$e.column()===nt.indentation,wt=ge(nt.prevLine.stream),Pt=nt.indentedCode,dt=nt.prevLine.hr,ct=nt.list!==!1,ht=(nt.listStack[nt.listStack.length-1]||0)+3;nt.indentedCode=!1;var Et=nt.indentation;if(nt.indentationDiff===null&&(nt.indentationDiff=nt.indentation,ct)){for(nt.list=null;Et<nt.listStack[nt.listStack.length-1];)nt.listStack.pop(),nt.listStack.length?nt.indentation=nt.listStack[nt.listStack.length-1]:nt.list=!1;nt.list!==!1&&(nt.indentationDiff=Et-nt.listStack[nt.listStack.length-1])}var vt=!wt&&!dt&&!nt.prevLine.header&&(!ct||!Pt)&&!nt.prevLine.fencedCodeEnd,Ft=(nt.list===!1||dt||wt)&&nt.indentation<=ht&&$e.match(Ce),mt=null;if(nt.indentationDiff>=4&&(Pt||nt.prevLine.fencedCodeEnd||nt.prevLine.header||wt))return $e.skipToEnd(),nt.indentedCode=!0,me.code;if($e.eatSpace())return null;if(xt&&nt.indentation<=ht&&(mt=$e.match(ve))&&mt[1].length<=6)return nt.quote=0,nt.header=mt[1].length,nt.thisLine.header=!0,oe.highlightFormatting&&(nt.formatting="header"),nt.f=nt.inline,Ne(nt);if(nt.indentation<=ht&&$e.eat(">"))return nt.quote=xt?1:nt.quote+1,oe.highlightFormatting&&(nt.formatting="quote"),$e.eatSpace(),Ne(nt);if(!Ft&&!nt.setext&&xt&&nt.indentation<=ht&&(mt=$e.match(Se))){var St=mt[1]?"ol":"ul";return nt.indentation=Et+$e.current().length,nt.list=!0,nt.quote=0,nt.listStack.push(nt.indentation),nt.em=!1,nt.strong=!1,nt.code=!1,nt.strikethrough=!1,oe.taskLists&&$e.match(Me,!1)&&(nt.taskList=!0),nt.f=nt.inline,oe.highlightFormatting&&(nt.formatting=["list","list-"+St]),Ne(nt)}else{if(xt&&nt.indentation<=ht&&(mt=$e.match(z,!0)))return nt.quote=0,nt.fencedEndRE=new RegExp(mt[1]+"+ *$"),nt.localMode=oe.fencedCodeBlockHighlighting&&fe(mt[2]||oe.fencedCodeBlockDefaultMode),nt.localMode&&(nt.localState=gt.startState(nt.localMode)),nt.f=nt.block=Fe,oe.highlightFormatting&&(nt.formatting="code-block"),nt.code=-1,Ne(nt);if(nt.setext||(!vt||!ct)&&!nt.quote&&nt.list===!1&&!nt.code&&!Ft&&!ee.test($e.string)&&(mt=$e.lookAhead(1))&&(mt=mt.match(xe)))return nt.setext?(nt.header=nt.setext,nt.setext=0,$e.skipToEnd(),oe.highlightFormatting&&(nt.formatting="header")):(nt.header=mt[0].charAt(0)=="="?1:2,nt.setext=nt.header),nt.thisLine.header=!0,nt.f=nt.inline,Ne(nt);if(Ft)return $e.skipToEnd(),nt.hr=!0,nt.thisLine.hr=!0,me.hr;if($e.peek()==="[")return le($e,nt,ot)}return le($e,nt,nt.inline)}function Be($e,nt){var xt=ze.token($e,nt.htmlState);if(!De){var wt=gt.innerMode(ze,nt.htmlState);(wt.mode.name=="xml"&&wt.state.tagStart===null&&!wt.state.context&&wt.state.tokenize.isInText||nt.md_inside&&$e.current().indexOf(">")>-1)&&(nt.f=Re,nt.block=je,nt.htmlState=null)}return xt}function Fe($e,nt){var xt=nt.listStack[nt.listStack.length-1]||0,wt=nt.indentation<xt,Pt=xt+3;if(nt.fencedEndRE&&nt.indentation<=Pt&&(wt||$e.match(nt.fencedEndRE))){oe.highlightFormatting&&(nt.formatting="code-block");var dt;return wt||(dt=Ne(nt)),nt.localMode=nt.localState=null,nt.block=je,nt.f=Re,nt.fencedEndRE=null,nt.code=0,nt.thisLine.fencedCodeEnd=!0,wt?ue($e,nt,nt.block):dt}else return nt.localMode?nt.localMode.token($e,nt.localState):($e.skipToEnd(),me.code)}function Ne($e){var nt=[];if($e.formatting){nt.push(me.formatting),typeof $e.formatting=="string"&&($e.formatting=[$e.formatting]);for(var xt=0;xt<$e.formatting.length;xt++)nt.push(me.formatting+"-"+$e.formatting[xt]),$e.formatting[xt]==="header"&&nt.push(me.formatting+"-"+$e.formatting[xt]+"-"+$e.header),$e.formatting[xt]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=$e.quote?nt.push(me.formatting+"-"+$e.formatting[xt]+"-"+$e.quote):nt.push("error"))}if($e.taskOpen)return nt.push("meta"),nt.length?nt.join(" "):null;if($e.taskClosed)return nt.push("property"),nt.length?nt.join(" "):null;if($e.linkHref?nt.push(me.linkHref,"url"):($e.strong&&nt.push(me.strong),$e.em&&nt.push(me.em),$e.strikethrough&&nt.push(me.strikethrough),$e.emoji&&nt.push(me.emoji),$e.linkText&&nt.push(me.linkText),$e.code&&nt.push(me.code),$e.image&&nt.push(me.image),$e.imageAltText&&nt.push(me.imageAltText,"link"),$e.imageMarker&&nt.push(me.imageMarker)),$e.header&&nt.push(me.header,me.header+"-"+$e.header),$e.quote&&(nt.push(me.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=$e.quote?nt.push(me.quote+"-"+$e.quote):nt.push(me.quote+"-"+oe.maxBlockquoteDepth)),$e.list!==!1){var wt=($e.listStack.length-1)%3;wt?wt===1?nt.push(me.list2):nt.push(me.list3):nt.push(me.list1)}return $e.trailingSpaceNewLine?nt.push("trailing-space-new-line"):$e.trailingSpace&&nt.push("trailing-space-"+($e.trailingSpace%2?"a":"b")),nt.length?nt.join(" "):null}function Ae($e,nt){if($e.match(de,!0))return Ne(nt)}function Re($e,nt){var xt=nt.text($e,nt);if(typeof xt!="undefined")return xt;if(nt.list)return nt.list=null,Ne(nt);if(nt.taskList){var wt=$e.match(Me,!0)[1]===" ";return wt?nt.taskOpen=!0:nt.taskClosed=!0,oe.highlightFormatting&&(nt.formatting="task"),nt.taskList=!1,Ne(nt)}if(nt.taskOpen=!1,nt.taskClosed=!1,nt.header&&$e.match(/^#+$/,!0))return oe.highlightFormatting&&(nt.formatting="header"),Ne(nt);var Pt=$e.next();if(nt.linkTitle){nt.linkTitle=!1;var dt=Pt;Pt==="("&&(dt=")"),dt=(dt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ct="^\\s*(?:[^"+dt+"\\\\]+|\\\\\\\\|\\\\.)"+dt;if($e.match(new RegExp(ct),!0))return me.linkHref}if(Pt==="`"){var ht=nt.formatting;oe.highlightFormatting&&(nt.formatting="code"),$e.eatWhile("`");var Et=$e.current().length;if(nt.code==0&&(!nt.quote||Et==1))return nt.code=Et,Ne(nt);if(Et==nt.code){var vt=Ne(nt);return nt.code=0,vt}else return nt.formatting=ht,Ne(nt)}else if(nt.code)return Ne(nt);if(Pt==="\\"&&($e.next(),oe.highlightFormatting)){var Ft=Ne(nt),mt=me.formatting+"-escape";return Ft?Ft+" "+mt:mt}if(Pt==="!"&&$e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return nt.imageMarker=!0,nt.image=!0,oe.highlightFormatting&&(nt.formatting="image"),Ne(nt);if(Pt==="["&&nt.imageMarker&&$e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return nt.imageMarker=!1,nt.imageAltText=!0,oe.highlightFormatting&&(nt.formatting="image"),Ne(nt);if(Pt==="]"&&nt.imageAltText){oe.highlightFormatting&&(nt.formatting="image");var Ft=Ne(nt);return nt.imageAltText=!1,nt.image=!1,nt.inline=nt.f=Ye,Ft}if(Pt==="["&&!nt.image)return nt.linkText&&$e.match(/^.*?\]/)||(nt.linkText=!0,oe.highlightFormatting&&(nt.formatting="link")),Ne(nt);if(Pt==="]"&&nt.linkText){oe.highlightFormatting&&(nt.formatting="link");var Ft=Ne(nt);return nt.linkText=!1,nt.inline=nt.f=$e.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Re,Ft}if(Pt==="<"&&$e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){nt.f=nt.inline=We,oe.highlightFormatting&&(nt.formatting="link");var Ft=Ne(nt);return Ft?Ft+=" ":Ft="",Ft+me.linkInline}if(Pt==="<"&&$e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){nt.f=nt.inline=We,oe.highlightFormatting&&(nt.formatting="link");var Ft=Ne(nt);return Ft?Ft+=" ":Ft="",Ft+me.linkEmail}if(oe.xml&&Pt==="<"&&$e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var St=$e.string.indexOf(">",$e.pos);if(St!=-1){var tt=$e.string.substring($e.start,St);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(nt.md_inside=!0)}return $e.backUp(1),nt.htmlState=gt.startState(ze),ue($e,nt,Be)}if(oe.xml&&Pt==="<"&&$e.match(/^\/\w*?>/))return nt.md_inside=!1,"tag";if(Pt==="*"||Pt==="_"){for(var Ve=1,we=$e.pos==1?" ":$e.string.charAt($e.pos-2);Ve<3&&$e.eat(Pt);)Ve++;var Le=$e.peek()||" ",Ze=!/\s/.test(Le)&&(!ae.test(Le)||/\s/.test(we)||ae.test(we)),rt=!/\s/.test(we)&&(!ae.test(we)||/\s/.test(Le)||ae.test(Le)),Ie=null,_e=null;if(Ve%2&&(!nt.em&&Ze&&(Pt==="*"||!rt||ae.test(we))?Ie=!0:nt.em==Pt&&rt&&(Pt==="*"||!Ze||ae.test(Le))&&(Ie=!1)),Ve>1&&(!nt.strong&&Ze&&(Pt==="*"||!rt||ae.test(we))?_e=!0:nt.strong==Pt&&rt&&(Pt==="*"||!Ze||ae.test(Le))&&(_e=!1)),_e!=null||Ie!=null){oe.highlightFormatting&&(nt.formatting=Ie==null?"strong":_e==null?"em":"strong em"),Ie===!0&&(nt.em=Pt),_e===!0&&(nt.strong=Pt);var vt=Ne(nt);return Ie===!1&&(nt.em=!1),_e===!1&&(nt.strong=!1),vt}}else if(Pt===" "&&($e.eat("*")||$e.eat("_"))){if($e.peek()===" ")return Ne(nt);$e.backUp(1)}if(oe.strikethrough){if(Pt==="~"&&$e.eatWhile(Pt)){if(nt.strikethrough){oe.highlightFormatting&&(nt.formatting="strikethrough");var vt=Ne(nt);return nt.strikethrough=!1,vt}else if($e.match(/^[^\s]/,!1))return nt.strikethrough=!0,oe.highlightFormatting&&(nt.formatting="strikethrough"),Ne(nt)}else if(Pt===" "&&$e.match(/^~~/,!0)){if($e.peek()===" ")return Ne(nt);$e.backUp(2)}}if(oe.emoji&&Pt===":"&&$e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){nt.emoji=!0,oe.highlightFormatting&&(nt.formatting="emoji");var He=Ne(nt);return nt.emoji=!1,He}return Pt===" "&&($e.match(/^ +$/,!1)?nt.trailingSpace++:nt.trailingSpace&&(nt.trailingSpaceNewLine=!0)),Ne(nt)}function We($e,nt){var xt=$e.next();if(xt===">"){nt.f=nt.inline=Re,oe.highlightFormatting&&(nt.formatting="link");var wt=Ne(nt);return wt?wt+=" ":wt="",wt+me.linkInline}return $e.match(/^[^>]+/,!0),me.linkInline}function Ye($e,nt){if($e.eatSpace())return null;var xt=$e.next();return xt==="("||xt==="["?(nt.f=nt.inline=Ke(xt==="("?")":"]"),oe.highlightFormatting&&(nt.formatting="link-string"),nt.linkHref=!0,Ne(nt)):"error"}var Ue={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ke($e){return function(nt,xt){var wt=nt.next();if(wt===$e){xt.f=xt.inline=Re,oe.highlightFormatting&&(xt.formatting="link-string");var Pt=Ne(xt);return xt.linkHref=!1,Pt}return nt.match(Ue[$e]),xt.linkHref=!0,Ne(xt)}}function ot($e,nt){return $e.match(/^([^\]\\]|\\.)*\]:/,!1)?(nt.f=st,$e.next(),oe.highlightFormatting&&(nt.formatting="link"),nt.linkText=!0,Ne(nt)):le($e,nt,Re)}function st($e,nt){if($e.match(/^\]:/,!0)){nt.f=nt.inline=ft,oe.highlightFormatting&&(nt.formatting="link");var xt=Ne(nt);return nt.linkText=!1,xt}return $e.match(/^([^\]\\]|\\.)+/,!0),me.linkText}function ft($e,nt){return $e.eatSpace()?null:($e.match(/^[^\s]+/,!0),$e.peek()===void 0?nt.linkTitle=!0:$e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),nt.f=nt.inline=Re,me.linkHref+" url")}var bt={startState:function(){return{f:je,prevLine:{stream:null},thisLine:{stream:null},block:je,htmlState:null,indentation:0,inline:Re,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&&gt.copyState(ze,$e.htmlState),indentation:$e.indentation,localMode:$e.localMode,localState:$e.localMode?gt.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,nt){if(nt.formatting=!1,$e!=nt.thisLine.stream){if(nt.header=0,nt.hr=!1,$e.match(/^\s*$/,!0))return Pe(nt),null;if(nt.prevLine=nt.thisLine,nt.thisLine={stream:$e},nt.taskList=!1,nt.trailingSpace=0,nt.trailingSpaceNewLine=!1,!nt.localState&&(nt.f=nt.block,nt.f!=Be)){var xt=$e.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(nt.indentation=xt,nt.indentationDiff=null,xt>0)return null}}return nt.f($e,nt)},innerMode:function($e){return $e.block==Be?{state:$e.htmlState,mode:ze}:$e.localState?{state:$e.localState,mode:$e.localMode}:{state:$e,mode:bt}},indent:function($e,nt,xt){return $e.block==Be&&ze.indent?ze.indent($e.htmlState,nt,xt):$e.localState&&$e.localMode.indent?$e.localMode.indent($e.localState,nt,xt):gt.Pass},blankLine:Pe,getType:Ne,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return bt},"xml"),gt.defineMIME("text/markdown","markdown"),gt.defineMIME("text/x-markdown","markdown")})},98101:function(gn,cn,at){(function(gt){gt(at(89780))})(function(gt){"use strict";gt.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<gt.modeInfo.length;Bt++){var oe=gt.modeInfo[Bt];oe.mimes&&(oe.mime=oe.mimes[0])}gt.findModeByMIME=function(ze){ze=ze.toLowerCase();for(var De=0;De<gt.modeInfo.length;De++){var fe=gt.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 gt.findModeByMIME("application/xml");if(/\+json$/.test(ze))return gt.findModeByMIME("application/json")},gt.findModeByExtension=function(ze){ze=ze.toLowerCase();for(var De=0;De<gt.modeInfo.length;De++){var fe=gt.modeInfo[De];if(fe.ext){for(var me=0;me<fe.ext.length;me++)if(fe.ext[me]==ze)return fe}}},gt.findModeByFileName=function(ze){for(var De=0;De<gt.modeInfo.length;De++){var fe=gt.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 gt.findModeByExtension(ke)},gt.findModeByName=function(ze){ze=ze.toLowerCase();for(var De=0;De<gt.modeInfo.length;De++){var fe=gt.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(gt){gt(at(89780))})(function(gt){"use strict";gt.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,xe),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,xe);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 xe(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:"%"}}),gt.defineMIME("text/x-stex","stex"),gt.defineMIME("text/x-latex","stex")})},15525:function(gn,cn,at){(function(gt){gt(at(89780))})(function(gt){"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};gt.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=xe,"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 xe(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=xe;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"?Re:We=="word"&&me.allowUnquoted?(Me="string",Fe):(Me="error",Fe(We,Ye,Ue))}function Re(We,Ye,Ue){return We=="string"?Re: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 gt.Pass;if(We.tokenize!=xe&&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()}}}),gt.defineMIME("text/xml","xml"),gt.defineMIME("application/xml","xml"),gt.mimeModes.hasOwnProperty("text/html")||gt.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 Pi},FJ:function(){return ue},Hn:function(){return le},KX:function(){return Pe},NB:function(){return pt},S0:function(){return mt},UL:function(){return Se},Vk:function(){return ie},Vm:function(){return At},YI:function(){return St},ZA:function(){return oe},Zt:function(){return Me},al:function(){return Ie},bn:function(){return rt},bx:function(){return we},g2:function(){return tt},h1:function(){return Ae},hD:function(){return Tn},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 dr(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:dr(a)}}function Mi(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 jr;e:{var to={a:!0},Rr={};try{Rr.__proto__=to,jr=Rr.a;break e}catch(a){}jr=!1}Sr=jr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var on=Sr;function rn(a,y){if(a.prototype=ar(y.prototype),a.prototype.constructor=a,on)on(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var Yt=typeof at.g!="undefined"&&at.g!=null?at.g:self,nr=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},gr=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Cr(a,y){if(y){var x=Yt;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&&gr(x,a,{writable:!0,value:y})}}Cr("Object.assign",function(a){return a||nr}),Cr("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 Nn=typeof globalThis=="object"&&globalThis||typeof at.g=="object"&&at.g.global===at.g&&at.g||typeof self=="object"&&self.self===self&&self||{};Nn.requestAnimationFrame===void 0&&(Nn.setImmediate===void 0?Nn.requestAnimationFrame=function(a){Nn.setTimeout(a,0)}:Nn.requestAnimationFrame=Nn.setImmediate);function qn(){}function Ir(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&Nn.clearTimeout(x),x=gi(function(){x=-1,a.apply(b,E)},y)}}function gi(a,y){return Nn.setTimeout(a,y)}function bi(a){return Nn.document.createElement(a)}function Nt(a){throw Error(a)}function Ht(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Nt(a)}function Mn(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),Nt(x+" is not in the range "+y+": "+a)}function jn(a){Nn.console&&Nn.console.log(a)}function en(a){return typeof a=="object"&&a!==null}function Fn(a){return Array.isArray(a)||Nn.NodeList&&a instanceof Nn.NodeList||Nn.HTMLCollection&&a instanceof Nn.HTMLCollection}function Dn(a){return Array.prototype.slice.call(a)}function Ln(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Nt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function er(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Nt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function zn(){var a=Di.pop();return a===void 0?[]:a}function Zn(a){a.length=0,Di.push(a)}function rr(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(en(a)&&a.constructor)return rr(a.constructor);return typeof a}function Kr(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 cr(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 pr(a,y,x){Object.defineProperty(Ji.prototype,a,{get:y,set:x})}function an(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 Vr=Nn.navigator!==void 0&&0<Nn.navigator.userAgent.indexOf("Trident/7"),ei=Nn.navigator!==void 0&&Nn.navigator.platform!==void 0&&Nn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Di=[];Object.freeze([]),qn.className="Util",qn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",qn.adym="gojs.net",qn.vfo="28e645fdb266",qn.className="Util";function dn(a,y,x){xr(this),this.j=a,this.xa=y,this.o=x}dn.prototype.toString=function(){return"EnumValue."+this.xa};function Hn(a,y){return y==null||y===""?null:a[y]}Yt.Object.defineProperties(dn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),dn.className="EnumValue";function ur(){this.ew=[]}ur.prototype.toString=function(){return this.ew.join("")},ur.prototype.add=function(a){a!==""&&this.ew.push(a)},ur.className="StringBuilder";function Jn(){}Jn.className="PropertyCollection";var yr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Nn.console&&Nn.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 Fr(){}Fr.prototype.reset=function(){},Fr.prototype.next=function(){return!1},Fr.prototype.Ad=function(){return!1},Fr.prototype.first=function(){return null},Fr.prototype.any=function(){return!1},Fr.prototype.all=function(){return!0},Fr.prototype.each=function(){return this},Fr.prototype.map=function(){return this},Fr.prototype.filter=function(){return this},Fr.prototype.de=function(){},Fr.prototype.toString=function(){return"EmptyIterator"},Yt.Object.defineProperties(Fr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Fr.prototype.first=Fr.prototype.first,Fr.prototype.hasNext=Fr.prototype.Ad,Fr.prototype.next=Fr.prototype.next,Fr.prototype.reset=Fr.prototype.reset;var Wr=null;Fr.className="EmptyIterator",Wr=new Fr;function $r(a){this.key=-1,this.value=a}$r.prototype.reset=function(){this.key=-1},$r.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},$r.prototype.Ad=function(){return this.next()},$r.prototype.first=function(){return this.key=0,this.value},$r.prototype.any=function(a){return this.key=-1,a(this.value)},$r.prototype.all=function(a){return this.key=-1,a(this.value)},$r.prototype.each=function(a){return this.key=-1,a(this.value),this},$r.prototype.map=function(a){return new $r(a(this.value))},$r.prototype.filter=function(a){return a(this.value)?new $r(this.value):Wr},$r.prototype.de=function(){this.value=null},$r.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Yt.Object.defineProperties($r.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),$r.prototype.first=$r.prototype.first,$r.prototype.hasNext=$r.prototype.Ad,$r.prototype.next=$r.prototype.next,$r.prototype.reset=$r.prototype.reset,$r.className="SingletonIterator";function ii(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}ii.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},ii.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},ii.prototype.Ad=function(){return this.next()},ii.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},ii.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},ii.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},ii.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},ii.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 mn,a.s=x,a.xb(),a.iterator},ii.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 mn,a.s=x,a.xb(),a.iterator},ii.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},ii.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Yt.Object.defineProperties(ii.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}}}),ii.prototype.first=ii.prototype.first,ii.prototype.hasNext=ii.prototype.Ad,ii.prototype.next=ii.prototype.next,ii.prototype.reset=ii.prototype.reset,ii.className="ListIterator";function hi(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}hi.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},hi.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)},hi.prototype.Ad=function(){return this.next()},hi.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},hi.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},hi.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},hi.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},hi.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 mn,a.s=x,a.xb(),a.iterator},hi.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 mn,a.s=x,a.xb(),a.iterator},hi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},hi.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Yt.Object.defineProperties(hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),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="ListIteratorBackwards";function mn(a){xr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=mn.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()#"+si(this)},et.add=function(a){return a===null?this:(this._isFrozen&&Ht(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&&Ht(this);var y=this.s;if(Fn(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&&Ht(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)&&Mn(a,"0 <= i < length",mn,"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)&&Mn(a,"0 <= i < length",mn,"setElt:i"),this._isFrozen&&Ht(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&&Ht(this);var a=this.s;return 0<a.length?a.pop():null},mn.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},mn.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},mn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},mn.prototype.map=function(a){for(var y=new mn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},mn.prototype.filter=function(a){for(var y=new mn,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=mn.prototype,et.Gb=function(a,y){0>a&&Mn(a,">= 0",mn,"insertAt:i"),this._isFrozen&&Ht(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&&Ht(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)&&Mn(a,"0 <= i < length",mn,"removeAt:i"),this._isFrozen&&Ht(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&&Ht(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},mn.prototype.copy=function(){var a=new mn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},et=mn.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 vn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},et.sort=function(a){return this._isFrozen&&Ht(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&&Ht(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Mn(y,"0 <= from < length",mn,"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&&Ht(this),this.s.reverse(),this.xb(),this},Yt.Object.defineProperties(mn.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 Wr;var a=this.Sa;return a!==null?(a.reset(),a):new ii(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Wr;var a=this.Hg;return a!==null?(a.reset(),a):new hi(this)}}}),mn.prototype.reverse=mn.prototype.reverse,mn.prototype.sortRange=mn.prototype.zi,mn.prototype.sort=mn.prototype.sort,mn.prototype.toSet=mn.prototype.Iv,mn.prototype.toArray=mn.prototype.Fa,mn.prototype.removeRange=mn.prototype.removeRange,mn.prototype.removeAt=mn.prototype.mb,mn.prototype.delete=mn.prototype.delete,mn.prototype.remove=mn.prototype.remove,mn.prototype.insertAt=mn.prototype.Gb,mn.prototype.pop=mn.prototype.pop,mn.prototype.last=mn.prototype.jc,mn.prototype.first=mn.prototype.first,mn.prototype.set=mn.prototype.set,mn.prototype.setElt=mn.prototype.cd,mn.prototype.get=mn.prototype.get,mn.prototype.elt=mn.prototype.M,mn.prototype.indexOf=mn.prototype.indexOf,mn.prototype.has=mn.prototype.has,mn.prototype.contains=mn.prototype.contains,mn.prototype.clear=mn.prototype.clear,mn.prototype.addAll=mn.prototype.addAll,mn.prototype.push=mn.prototype.push,mn.prototype.add=mn.prototype.add,mn.prototype.thaw=mn.prototype.ka,mn.prototype.freeze=mn.prototype.freeze,mn.className="List";function Li(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Li.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Li.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)},Li.prototype.Ad=function(){return this.next()},Li.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},Li.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},Li.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},Li.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},Li.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new mn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Li.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Li.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Li.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Yt.Object.defineProperties(Li.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Li.prototype.first=Li.prototype.first,Li.prototype.hasNext=Li.prototype.Ad,Li.prototype.next=Li.prototype.next,Li.prototype.reset=Li.prototype.reset,Li.className="SetIterator";function vn(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"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=vn.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()#"+si(this)},et.add=function(a){if(a===null)return this;this._isFrozen&&Ht(this,a);var y=a;return en(a)&&(y=ui(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&&Ht(this),Fn(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=si(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},vn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},vn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},vn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},vn.prototype.map=function(a){for(var y=new vn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},vn.prototype.filter=function(a){for(var y=new vn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},et=vn.prototype,et.remove=function(a){if(a===null)return!1;this._isFrozen&&Ht(this,a);var y=a;if(en(a)&&(y=si(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&&Ht(this),Fn(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&&Ht(this);var y=new vn;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&&Ht(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},vn.prototype.copy=function(){var a=new vn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},vn.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},vn.prototype.Hv=function(){var a=new mn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function xr(a){a.__gohashid=Ii++}function ui(a){var y=a.__gohashid;return y===void 0&&(y=Ii++,a.__gohashid=y),y}function si(a){return a.__gohashid}Yt.Object.defineProperties(vn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Wr;var a=this.Sa;return a!==null?(a.reset(),a):new Li(this)}}}),vn.prototype.toList=vn.prototype.Hv,vn.prototype.toArray=vn.prototype.Fa,vn.prototype.clear=vn.prototype.clear,vn.prototype.retainAll=vn.prototype.pA,vn.prototype.removeAll=vn.prototype.hp,vn.prototype.delete=vn.prototype.delete,vn.prototype.remove=vn.prototype.remove,vn.prototype.first=vn.prototype.first,vn.prototype.containsAny=vn.prototype.Ty,vn.prototype.containsAll=vn.prototype.Sy,vn.prototype.has=vn.prototype.has,vn.prototype.contains=vn.prototype.contains,vn.prototype.addAll=vn.prototype.addAll,vn.prototype.add=vn.prototype.add,vn.prototype.thaw=vn.prototype.ka,vn.prototype.freeze=vn.prototype.freeze;var Ii=1;vn.className="Set",vn.uniqueHash=xr,vn.hashIdUnique=ui,vn.hashId=si;function pi(a){this.ma=a,this.qa=a.Ja,this.sa=null}pi.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},pi.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)},pi.prototype.Ad=function(){return this.next()},pi.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},pi.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},pi.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},pi.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},pi.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new mn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},pi.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},pi.prototype.de=function(){this.value=this.key=null,this.qa=-1},pi.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Yt.Object.defineProperties(pi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),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="MapKeySetIterator";function Zr(a){vn.call(this),xr(this),this._isFrozen=!0,this.ma=a}rn(Zr,vn),et=Zr.prototype,et.freeze=function(){return this},et.ka=function(){return this},et.toString=function(){return"MapKeySet("+this.ma.toString()+")"},et.add=function(){Nt("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(){Nt("This Set is read-only: "+this.toString())},et.delete=function(a){return this.remove(a)},et.clear=function(){Nt("This Set is read-only: "+this.toString())},et.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Zr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Zr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Zr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Zr.prototype.map=function(a){for(var y=new vn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Zr.prototype.filter=function(a){for(var y=new vn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Zr.prototype.copy=function(){return new Zr(this.ma)},Zr.prototype.Iv=function(){var a=new vn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Zr.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},Zr.prototype.Hv=function(){var a=new mn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Yt.Object.defineProperties(Zr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Wr:new pi(this.ma)}}}),Zr.prototype.toList=Zr.prototype.Hv,Zr.prototype.toArray=Zr.prototype.Fa,Zr.prototype.toSet=Zr.prototype.Iv,Zr.prototype.first=Zr.prototype.first,Zr.prototype.clear=Zr.prototype.clear,Zr.prototype.delete=Zr.prototype.delete,Zr.prototype.remove=Zr.prototype.remove,Zr.prototype.has=Zr.prototype.has,Zr.prototype.contains=Zr.prototype.contains,Zr.prototype.add=Zr.prototype.add,Zr.prototype.thaw=Zr.prototype.ka,Zr.prototype.freeze=Zr.prototype.freeze,Zr.className="MapKeySet";function Gi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Gi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Gi.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)},Gi.prototype.Ad=function(){return this.next()},Gi.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},Gi.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},Gi.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},Gi.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},Gi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new mn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Gi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new mn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Gi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Gi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Yt.Object.defineProperties(Gi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Gi.prototype.first=Gi.prototype.first,Gi.prototype.hasNext=Gi.prototype.Ad,Gi.prototype.next=Gi.prototype.next,Gi.prototype.reset=Gi.prototype.reset,Gi.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 mn;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 mn;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"},Yt.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 Jt(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"&&Nt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=Jt.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()#"+si(this)},et.add=function(a,y){this._isFrozen&&Ht(this,a);var x=a;en(a)&&(x=ui(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(Fn(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 Jt)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},Jt.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Jt.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Jt.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Jt.prototype.map=function(a){for(var y=new Jt,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Jt.prototype.filter=function(a){for(var y=new Jt,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},et=Jt.prototype,et.contains=function(a){var y=a;return en(a)&&(y=si(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=si(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&&Ht(this,a);var y=a;if(en(a)&&(y=si(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&&Ht(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()},Jt.prototype.copy=function(){var a=new Jt,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Jt.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},Jt.prototype.Lf=function(){return new Zr(this)},Yt.Object.defineProperties(Jt.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Wr;var a=this.Sa;return a!==null?(a.reset(),a):new wn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Wr:new pi(this)}},iteratorValues:{get:function(){if(0>=this.count)return Wr;var a=this.jf;return a!==null?(a.reset(),a):new Gi(this)}}}),Jt.prototype.toKeySet=Jt.prototype.Lf,Jt.prototype.toArray=Jt.prototype.Fa,Jt.prototype.clear=Jt.prototype.clear,Jt.prototype.delete=Jt.prototype.delete,Jt.prototype.remove=Jt.prototype.remove,Jt.prototype.get=Jt.prototype.get,Jt.prototype.getValue=Jt.prototype.I,Jt.prototype.has=Jt.prototype.has,Jt.prototype.contains=Jt.prototype.contains,Jt.prototype.first=Jt.prototype.first,Jt.prototype.addAll=Jt.prototype.addAll,Jt.prototype.set=Jt.prototype.set,Jt.prototype.add=Jt.prototype.add,Jt.prototype.thaw=Jt.prototype.ka,Jt.prototype.freeze=Jt.prototype.freeze,Jt.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):Nt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var In,pn,Un,Xn,Wn;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)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function hn(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 An(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 _n(a.x-this.x,a.y-this.y)},et.direction=function(a,y){return _n(a-this.x,y-this.y)};function _n(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 kn(a,y){return y.Cd(a),a}function Bn(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 sr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Yn(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=On.pop();return a===void 0?new lt:a},lt.allocAt=function(a,y){var x=On.pop();return x===void 0?new lt(a,y):(x.x=a,x.y=y,x)},lt.free=function(a){On.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 On=[];lt.className="Point",lt.parse=hn,lt.stringify=An,lt.distanceLineSegmentSquared=Bn,lt.distanceSquared=sr,lt.direction=Yn,lt.Origin=In=new lt(0,0).ja(),lt.InfiniteTopLeft=pn=new lt(-1/0,-1/0).ja(),lt.InfiniteBottomRight=Un=new lt(1/0,1/0).ja(),lt.SixPoint=Xn=new lt(6,6).ja(),lt.NoPoint=Wn=new lt(NaN,NaN).ja(),lt.parse=hn,lt.stringify=An,lt.distanceLineSegmentSquared=Bn,lt.distanceSquared=sr,lt.direction=Yn;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):Nt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var lr,wr,Jr,Nr,Si,vi,mi;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)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ci(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 Ei(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=Ci,ln.stringify=Ei,ln.ZeroSize=lr=new ln(0,0).ja(),ln.OneSize=wr=new ln(1,1).ja(),ln.SixSize=Jr=new ln(6,6).ja(),ln.EightSize=Nr=new ln(8,8).ja(),ln.TenSize=Si=new ln(10,10).ja(),ln.InfiniteSize=vi=new ln(1/0,1/0).ja(),ln.NoSize=mi=new ln(NaN,NaN).ja(),ln.parse=Ci,ln.stringify=Ei;function Qt(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):Nt("Incorrect second argument supplied to Rect constructor "+y)):Nt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}et=Qt.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},Qt.prototype.copy=function(){var a=new Qt;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},et=Qt.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)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ci(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 Qt(x,E,te,ne)}return new Qt}function zr(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 Qt?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 oi(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 Xr(this,y,a,y,a)},et.Co=function(a){return Xr(this,a.top,a.right,a.bottom,a.left)},et.Fv=function(a){return Xr(this,-a.top,-a.right,-a.bottom,-a.left)},et.Hz=function(a,y,x,b){return Xr(this,a,y,x,b)};function Xr(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 Ri(this,a.x,a.y,a.width,a.height)},et.Uu=function(a,y,x,b){return Ri(this,a,y,x,b)};function Ri(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 Bi(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 ti(this,a.x,a.y,0,0)},et.ed=function(a){return ti(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),ti(this,a,y,x,b)};function ti(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 eo(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 pa(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},Qt.alloc=function(){var a=wa.pop();return a===void 0?new Qt:a},Qt.allocAt=function(a,y,x,b){var E=wa.pop();return E===void 0?new Qt(a,y,x,b):E.h(a,y,x,b)},Qt.free=function(a){wa.push(a)},Yt.Object.defineProperties(Qt.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}}}),Qt.prototype.isEmpty=Qt.prototype.Mz,Qt.prototype.isReal=Qt.prototype.w,Qt.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Gt.Fx(a,y,x,b,E,te,ne,se)},Qt.prototype.setSpot=Qt.prototype.yi,Qt.prototype.union=Qt.prototype.Kv,Qt.prototype.unionRect=Qt.prototype.ed,Qt.prototype.unionPoint=Qt.prototype.Ye,Qt.prototype.intersects=Qt.prototype.Vu,Qt.prototype.intersectsRect=Qt.prototype.Yc,Qt.prototype.intersect=Qt.prototype.Uu,Qt.prototype.intersectRect=Qt.prototype.Ex,Qt.prototype.grow=Qt.prototype.Hz,Qt.prototype.subtractMargin=Qt.prototype.Fv,Qt.prototype.addMargin=Qt.prototype.Co,Qt.prototype.inflate=Qt.prototype.Bc,Qt.prototype.offset=Qt.prototype.offset,Qt.prototype.contains=Qt.prototype.contains,Qt.prototype.containsRect=Qt.prototype.Re,Qt.prototype.containsPoint=Qt.prototype.ca,Qt.prototype.equalsApprox=Qt.prototype.Xa,Qt.prototype.equalTo=Qt.prototype.hi,Qt.prototype.equals=Qt.prototype.D,Qt.prototype.setSize=Qt.prototype.tA,Qt.prototype.setPoint=Qt.prototype.dd,Qt.prototype.set=Qt.prototype.set,Qt.prototype.setTo=Qt.prototype.sg;var Ao=null,Ps=null,wa=[];Qt.className="Rect",Qt.parse=ci,Qt.stringify=zr,Qt.contains=eo,Qt.intersects=pa,Qt.ZeroRect=Ao=new Qt(0,0,0,0).ja(),Qt.NoRect=Ps=new Qt(NaN,NaN,NaN,NaN).ja(),Qt.parse=ci,Qt.stringify=zr,Qt.contains=eo,Qt.intersects=pa;function Ar(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):Nt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Ar.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ar.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ar.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ar.prototype.copy=function(){var a=new Ar;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},et=Ar.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)&&Nt("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 Ar;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ar(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Ar(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Ar(x,E):new Ar(x,E,te,ne)}return new Ar}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 Ar?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)},Ar.alloc=function(){var a=Ko.pop();return a===void 0?new Ar:a},Ar.free=function(a){Ko.push(a)},Ar.prototype.isReal=Ar.prototype.w,Ar.prototype.equalsApprox=Ar.prototype.Xa,Ar.prototype.equalTo=Ar.prototype.hi,Ar.prototype.equals=Ar.prototype.D,Ar.prototype.set=Ar.prototype.set,Ar.prototype.setTo=Ar.prototype.sg;var ta=null,jo=null,Ko=[];Ar.className="Margin",Ar.parse=Po,Ar.stringify=bo,Ar.ZeroMargin=ta=new Ar(0,0,0,0).ja(),Ar.TwoMargin=jo=new Ar(2,2,2,2).ja(),Ar.parse=Po,Ar.stringify=bo;function Qn(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 Or,Qr,wi,ki,no,Dr,Aa,zo,Oo,ji,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;Qn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Qn.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Qn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Qn.prototype.copy=function(){var a=new Qn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},et=Qn.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)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this};function co(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function oo(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Or;if(a==="TopLeft")return Qr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return wi;if(a==="TopRight")return ki;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return no;if(a==="Center")return Dr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Aa;if(a==="BottomLeft")return zo;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Oo;if(a==="BottomRight")return ji;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 Qn(x,E,te,ne)}return new Qn}function $i(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(Or)?"None":this.D(Qr)?"TopLeft":this.D(wi)?"Top":this.D(ki)?"TopRight":this.D(no)?"Left":this.D(Dr)?"Center":this.D(Aa)?"Right":this.D(zo)?"BottomLeft":this.D(Oo)?"Bottom":this.D(ji)?"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 Qn?(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 Qn(.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},Qn.alloc=function(){var a=sa.pop();return a===void 0?new Qn:a},Qn.free=function(a){sa.push(a)},Qn.prototype.isDefault=Qn.prototype.Xb,Qn.prototype.isNone=Qn.prototype.ys,Qn.prototype.isSide=Qn.prototype.$c,Qn.prototype.isNoSpot=Qn.prototype.Mc,Qn.prototype.isSpot=Qn.prototype.sb,Qn.prototype.includesSide=Qn.prototype.Hf,Qn.prototype.opposite=Qn.prototype.gv,Qn.prototype.equals=Qn.prototype.D,Qn.prototype.set=Qn.prototype.set,Qn.prototype.setTo=Qn.prototype.sg;var sa=[];Qn.className="Spot",Qn.parse=oo,Qn.stringify=$i,Qn.None=Or=co(new Qn(0,0,0,0),0).ja(),Qn.Default=Zo=co(new Qn(0,0,-1,0),-1).ja(),Qn.TopLeft=Qr=new Qn(0,0,0,0).ja(),Qn.TopCenter=wi=new Qn(.5,0,0,0).ja(),Qn.TopRight=ki=new Qn(1,0,0,0).ja(),Qn.LeftCenter=no=new Qn(0,.5,0,0).ja(),Qn.Center=Dr=new Qn(.5,.5,0,0).ja(),Qn.RightCenter=Aa=new Qn(1,.5,0,0).ja(),Qn.BottomLeft=zo=new Qn(0,1,0,0).ja(),Qn.BottomCenter=Oo=new Qn(.5,1,0,0).ja(),Qn.BottomRight=ji=new Qn(1,1,0,0).ja(),Qn.MiddleTop=Ca=wi,Qn.MiddleLeft=Oa=no,Qn.MiddleRight=aa=Aa,Qn.MiddleBottom=ga=Oo,Qn.Top=Zl=wi,Qn.Left=Ou=no,Qn.Right=rh=Aa,Qn.Bottom=uu=Oo,Qn.TopSide=Vo=co(new Qn(0,0,1,1),1).ja(),Qn.LeftSide=ja=co(new Qn(0,0,1,2),1).ja(),Qn.RightSide=vo=co(new Qn(0,0,1,4),1).ja(),Qn.BottomSide=fs=co(new Qn(0,0,1,8),1).ja(),Qn.TopBottomSides=ds=co(new Qn(0,0,1,9),1).ja(),Qn.LeftRightSides=bs=co(new Qn(0,0,1,6),1).ja(),Qn.TopLeftSides=na=co(new Qn(0,0,1,3),1).ja(),Qn.TopRightSides=eh=co(new Qn(0,0,1,5),1).ja(),Qn.BottomLeftSides=ju=co(new Qn(0,0,1,10),1).ja(),Qn.BottomRightSides=il=co(new Qn(0,0,1,12),1).ja(),Qn.NotTopSide=Sl=co(new Qn(0,0,1,14),1).ja(),Qn.NotLeftSide=Os=co(new Qn(0,0,1,13),1).ja(),Qn.NotRightSide=Vl=co(new Qn(0,0,1,11),1).ja(),Qn.NotBottomSide=th=co(new Qn(0,0,1,7),1).ja(),Qn.AllSides=nh=co(new Qn(0,0,1,15),1).ja(),Xl=new Qn(.156,.156).ja(),Ga=new Qn(.844,.844).ja(),Qn.parse=oo,Qn.stringify=$i;function Pr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Pr.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},Pr.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},Pr.prototype.copy=function(){var a=new Pr;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},Pr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Pr.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},Pr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Pr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Pr.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},Pr.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},Pr.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},Pr.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=Pr.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},Pr.alloc=function(){var a=fa.pop();return a===void 0?new Pr:a},Pr.free=function(a){fa.push(a)},Pr.prototype.transformRect=Pr.prototype.pp,Pr.prototype.transformPoint=Pr.prototype.Ga,Pr.prototype.scale=Pr.prototype.scale,Pr.prototype.translate=Pr.prototype.translate,Pr.prototype.rotate=Pr.prototype.rotate,Pr.prototype.invert=Pr.prototype.Vj,Pr.prototype.multiplyInverted=Pr.prototype.bv,Pr.prototype.multiply=Pr.prototype.multiply,Pr.prototype.reset=Pr.prototype.reset,Pr.prototype.isIdentity=Pr.prototype.ws,Pr.prototype.equals=Pr.prototype.D,Pr.prototype.setTransform=Pr.prototype.setTransform,Pr.prototype.set=Pr.prototype.set;var fa=[];Pr.className="Transform",Pr.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,Ct=(x+it)/2;return Gt.cs(a,y,Ge,Xe,b,x,Tt,Ct,he,pe,ye,Te)||Gt.cs(Tt,Ct,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 Yn(((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))ti(pe,a,y,0,0),ti(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))ti(se,a,y,0,0),ti(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,Ct=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Je+Tt)/2,x=(it+Ct)/2,Tt=(Tt+E)/2,Ct=(Ct+te)/2;var jt=(b+Tt)/2,Ot=(x+Ct)/2,It=1/0,_t=!1,Vt=0,Rn=0;return Gt.Eo(a,y,Je,it,b,x,jt,Ot,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,Ot,Tt,Ct,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,Ct=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(Je+Tt)/2,x=(it+Ct)/2,Tt=(Tt+E)/2,Ct=(Ct+te)/2;var jt=(b+Tt)/2,Ot=(x+Ct)/2;Xe+=Gt.Fo(a,y,Je,it,b,x,jt,Ot,he,pe,ye,Te,Ge),Xe+=Gt.Fo(jt,Ot,Tt,Ct,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,Ct){var jt=(Tt-a)*(Tt-a)+(Ct-y)*(Ct-y);jt<Te&&(Te=jt,he.h(Tt,Ct))}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):!!(eo(a,y,x,b,E,te)||eo(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 Jn,um:new Jn,Mf:new Jn,Nf:0,vm:100};Gt.za=Gt.AA;function bn(a){xr(this),this.l=2,a===void 0&&(a=bn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===bn.o?this.ee=new mn:(bn.V===null&&(bn.V=new mn().freeze()),this.ee=bn.V),this.aq=this.ee.Ja,this.Ip=new Qt().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Qr,this.gg=ji,this.Rk=this.Sk=NaN,this.Uf=yn}bn.prototype.copy=function(){var a=new bn;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===bn.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},bn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},bn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==bn.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},bn.prototype.ka=function(){if(Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==bn.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},bn.prototype.Xa=function(a){if(!(a instanceof bn))return!1;if(this.type!==a.type)return this.type===bn.j&&a.type===bn.o?Hs(this,a):a.type===bn.j&&this.type===bn.o?Hs(a,this):!1;if(this.type===bn.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!==bn.j||y.type!==bn.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===_i&&Gt.B(a.endX,y.endX)&&Gt.B(a.endY,y.endY))))}bn.ia=function(a){return a.toString()},bn.prototype.qb=function(a){a.classType===bn&&(this.type=a)},bn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case bn.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 bn.u:var y=new Qt(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 bn.F:if(y=new Qt(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 bn.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()}},bn.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},bn.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(kr){var br=parseFloat(b()),yi=parseFloat(b());Tt===Tt.toLowerCase()&&(br=Ot.x+br,yi=Ot.y+yi),kr.h(br,yi)}function te(){return E(Ot),Ot}function ne(){return E(jt),jt}function se(){var kr=Ct.toLowerCase();return kr!=="c"&&kr!=="s"&&kr!=="q"&&kr!=="t"?Ot:new lt(2*Ot.x-jt.x,2*Ot.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=zn();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,Zn(he)}}var it=-1,Tt="",Ct="";he=new lt(0,0);var jt=new lt(0,0),Ot=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(Ct=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(Ot);!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();)Ot=new lt((Tt===Tt.toLowerCase()?Ot.x:0)+parseFloat(b()),Ot.y),a.lineTo(Ot.x,Ot.y);break;case"V":for(;!x();)Ot=new lt(Ot.x,(Tt===Tt.toLowerCase()?Ot.y:0)+parseFloat(b())),a.lineTo(Ot.x,Ot.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 $n=parseFloat(b()),Vn=parseFloat(b()),Cn=Vn,un=!1;x()||(Cn=parseFloat(b()),x()||(un=parseFloat(b())!==0)),Tt===Tt.toLowerCase()&&(Rn+=Ot.x,$n+=Ot.y),a.arcTo(Je,Vt,Rn,$n,Vn,Cn,un)}break;case"A":for(;!x();)Je=Math.abs(parseFloat(b())),Vt=Math.abs(parseFloat(b())),Rn=parseFloat(b()),Vn=$n=!1,un=Cn=0,Cn=b(),Cn.length===1?($n=!!parseFloat(Cn),Vn=!!parseFloat(b()),Cn=parseFloat(b())):Cn.length===2?($n=!!parseFloat(Cn[0]),Vn=!!parseFloat(Cn[1]),Cn=parseFloat(b())):($n=!!parseFloat(Cn[0]),Vn=!!parseFloat(Cn[1]),Cn=parseFloat(Cn.slice(2))),un=parseFloat(b()),Tt===Tt.toLowerCase()&&(Cn=Ot.x+Cn,un=Ot.y+un),Ot.h(Cn,un),bx(a,Je,Vt,Rn,$n,Vn,Cn,un);break;case"Z":Px(a),Ot.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},bn.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)},bn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===bn.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},bn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===bn.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),ti(a,0,0,0,0),a.freeze()},bn.prototype.ix=function(){var a=new Qt;return jl(this,a,!0),a};function jl(a,y,x){switch(a.type){case bn.j:case bn.u:case bn.F:x?y.h(a.od,a.pd,0,0):ti(y,a.od,a.pd,0,0),ti(y,a.Dc,a.Ec,0,0);break;case bn.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):ti(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 _i:case Do:he=Te.endX,pe=Te.endY,ti(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,ti(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:Nt("Unknown Segment type: "+Te.type)}}}break;default:Nt("Unknown Geometry type: "+a.type)}}bn.prototype.normalize=function(){this._isFrozen&&Ht(this);var a=this.ix();return this.offset(-a.x,-a.y),new lt(-a.x,-a.y)},bn.prototype.offset=function(a,y){return this._isFrozen&&Ht(this),this.transform(1,0,0,1,a,y),this},bn.prototype.scale=function(a,y){return this._isFrozen&&Ht(this),this.transform(a,0,0,y,0,0),this},bn.prototype.rotate=function(a,y,x){this._isFrozen&&Ht(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Pr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Pr.free(b),this},et=bn.prototype,et.transform=function(a,y,x,b,E,te){switch(this.type){case bn.j:case bn.u:case bn.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 bn.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 _i:case Do: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:Nt("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 bn.j:return Gt.Yb(x,b,E,te,y,a.x,a.y);case bn.u:var ne=Qt.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),Qt.free(ne),a;case bn.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 bn.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 Ct=it.segments;he=it.startX,pe=it.startY;for(var jt=he,Ot=pe,It=Ct.s,_t=0;_t<=Ct.length;_t++){var Vt=void 0;if(_t!==Ct.length){Vt=It[_t];var Rn=Vt.type;a=Vt.endX,Te=Vt.endY}else Rn=_i,a=jt,Te=Ot;switch(Rn){case Do:if(jt=Pa(te,y,ne,y,he,pe,jt,Ot),isNaN(jt))return!0;se+=jt,jt=a,Ot=Te;break;case _i: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 $n=Rn.length;if($n===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 Vn=0;Vn<$n;Vn++){if(Vt=Rn[Vn],Vn===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:Nt("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===bn.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===bn.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===bn.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===bn.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===bn.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],Ct=Ge[it+1];if(it!==0){Gt.qh(pe,ye,Tt,Ct,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=Ct}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===bn.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===bn.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===bn.F){var te=new Fo;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 Do: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 _i: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:Nt("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(sr(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&&Ht(this),this.fg=new Qn(a,y,E,te).freeze(),this.gg=new Qn(x,b,ne,se).freeze(),this},Yt.Object.defineProperties(bn.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===bn.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===bn.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&&Ht(this,a),this.na=a,a===bn.o?this.ee=new mn:(bn.V===null&&(bn.V=new mn().freeze()),this.ee=bn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Ht(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Ht(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Ht(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Ht(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Ht(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Ht(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Ht(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Ht(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),bn.prototype.setSpots=bn.prototype.pm,bn.prototype.add=bn.prototype.add,bn.prototype.getFractionForPoint=bn.prototype.xx,bn.prototype.getPointAndAngleAlongPath=bn.prototype.Qu,bn.prototype.getAngleAlongPath=bn.prototype.wx,bn.prototype.getPointAlongPath=bn.prototype.Pu,bn.prototype.containsPoint=bn.prototype.ca,bn.prototype.transform=bn.prototype.transform,bn.prototype.rotate=bn.prototype.rotate,bn.prototype.scale=bn.prototype.scale,bn.prototype.offset=bn.prototype.offset,bn.prototype.normalize=bn.prototype.normalize,bn.prototype.computeBoundsWithoutOrigin=bn.prototype.ix,bn.prototype.equalsApprox=bn.prototype.Xa,bn.className="Geometry",bn.j=new dn(bn,"Line",0),bn.u=new dn(bn,"Rectangle",1),bn.F=new dn(bn,"Ellipse",2),bn.o=new dn(bn,"Path",3),bn.V=null,bn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",bn.className="Geometry",bn.stringify=bn.ia,bn.fillPath=bn.nb,bn.parse=bn.parse,bn.Line=bn.j,bn.Rectangle=bn.u,bn.Ellipse=bn.F,bn.Path=bn.o;function Fo(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 mn,this.sr=this.pl.Ja,this.fw=null}Fo.prototype.copy=function(){var a=new Fo;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=Fo.prototype,et.Xa=function(a){if(!(a instanceof Fo&&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 Do:te=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case _i: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:Nt("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},Yt.Object.defineProperties(Fo.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&&Ht(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Ht(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Ht(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Ht(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Ht(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Ht(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Fo.prototype.add=Fo.prototype.add,Fo.prototype.equalsApprox=Fo.prototype.Xa,Fo.className="PathFigure";function fi(a,y,x,b,E,te,ne,se){xr(this),a===void 0&&(a=_i),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 Do:case _i: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 Do:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case _i: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=Pr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),bn.Ha(te,ne),Pr.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,Ct,jt){return(it*jt<Tt*Ct?-1:1)*Math.acos((it*Ct+Tt*jt)/(Math.sqrt(it*it+Tt*Tt)*Math.sqrt(Ct*Ct+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=Pr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Xe),bn.Ha(y,te),Pr.free(te),a.ae=y,a.ae}Yt.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&&Ht(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ht(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Ht(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ht(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ht(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Ht(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Ht(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Ht(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Ht(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Mn(a,">= zero",fi,"radiusX"),this._isFrozen&&Ht(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Mn(a,">= zero",fi,"radiusY"),this._isFrozen&&Ht(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Ht(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&&Ht(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&&Ht(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&&Ht(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&&Ht(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),fi.prototype.equalsApprox=fi.prototype.Xa;var Do=new dn(fi,"Move",0),_i=new dn(fi,"Line",1),Go=new dn(fi,"Bezier",2),ps=new dn(fi,"QuadraticBezier",3),xo=new dn(fi,"Arc",4),Cs=new dn(fi,"SvgArc",4);fi.className="PathSegment",fi.Move=Do,fi.Line=_i,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},Yt.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},Yt.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 ao(){this.Fm=ro,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}ao.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},ao.prototype.copy=function(){var a=new ao;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},ao.prototype.qb=function(a){a.classType===ao&&(this.change=a)},ao.prototype.toString=function(){var a="";return a=this.change===Ea?a+"* ":this.change===ro?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+=Kr(this.object)),this.oldValue!==null&&(a+=" old: "+Kr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Kr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},ao.prototype.I=function(a){return a?this.oldValue:this.newValue},ao.prototype.Dz=function(a){return a?this.oldParam:this.newParam},ao.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},ao.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},ao.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},ao.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Yt.Object.defineProperties(ao.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}}}),ao.prototype.redo=ao.prototype.redo,ao.prototype.canRedo=ao.prototype.canRedo,ao.prototype.undo=ao.prototype.undo,ao.prototype.canUndo=ao.prototype.canUndo,ao.prototype.getParam=ao.prototype.Dz,ao.prototype.getValue=ao.prototype.I,ao.prototype.clear=ao.prototype.clear;var Ea=new dn(ao,"Transaction",-1),ro=new dn(ao,"Property",0),wo=new dn(ao,"Insert",1),Eo=new dn(ao,"Remove",2);ao.className="ChangedEvent",ao.Transaction=Ea,ao.Property=ro,ao.Insert=wo,ao.Remove=Eo;function Uo(){this.o=new mn().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 Jt,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===ro&&b.object){var E=y.get(b.object);E||(E=new Jt,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()}},Yt.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 vn,this.Jd=!1,this.u=new mn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new mn().freeze(),this.hl=new mn,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&&jn("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){jn("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){jn("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 ao;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||jn("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},Yt.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":rr(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(ei?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||(ei?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=gi(function(){x.doWaitAfter(b)},a)},li.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Nn.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},Yt.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 Ji(){li.call(this),this.name="ToolManager",this.hb=new mn,this.ob=new mn,this.Hb=new mn,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}rn(Ji,li),Ji.prototype.initializeStandardTools=function(){},Ji.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()}},Ji.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)},Ji.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)}Ji.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof di&&(y===a||y.rg(a))||this.hideToolTip()},Ji.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()))},Ji.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)},Ji.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()},Ji.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&&(Nn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=gi(function(){E.hideToolTip()},a)}},Ji.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}},Ji.prototype.hideToolTip=function(){this.zj!==-1&&(Nn.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)},Ji.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()},Ji.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ji.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ji.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ji.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},Ji.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},Ji.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)},Yt.Object.defineProperties(Ji.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}}}),Ji.prototype.replaceStandardTool=Ji.prototype.gb;var cu=new dn(Ji,"WheelScroll",0),ih=new dn(Ji,"WheelZoom",1),Ec=new dn(Ji,"WheelNone",2),_h=new dn(Ji,"GestureZoom",3),Ol=new dn(Ji,"GestureCancel",4),Bu=new dn(Ji,"GestureNone",5);Ji.className="ToolManager",Ji.WheelScroll=cu,Ji.WheelZoom=ih,Ji.WheelNone=Ec,Ji.GestureZoom=_h,Ji.GestureCancel=Ol,Ji.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 vn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var al;rn(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,(ei?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 En?(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(In):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);so(E),Wi(E),Yl(E),E.diagram.ug()}y.clear()}so(this),this.tl.h(NaN,NaN),oh!==null&&(oh.currentCursor=""),la=oh=null,Wi(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;Wi(a),Fa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}uo.prototype.doCancel=function(){Wi(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 Jt,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 En&&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 Wi(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 En&&(x.value.point=new lt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function so(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 En&&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 Tr)){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 Tr)&&(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(Dr,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=Qt.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Gn&&Q0(x,b,a);Qt.free(a)}}}function J0(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Tr||(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 En},!0,function(E){return E instanceof En},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()?(Wi(this),Xo(this,this.draggedParts,!0)):this.mayDragOut()?($l(this,!1),Xo(this,this.copiedParts,!1)):Wi(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?(Wi(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,Wi(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||(ei?!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,Wi(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 vn;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=Qt.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,Qt.free(te),te=a.Fr,ne=new Jt,se=lt.alloc(),he=y.iterator;he.next();)pe=he.value,pe instanceof En&&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},Yt.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 mn,pr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ji.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 En,y=new Br;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Br,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Gn,y=new Br,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=wr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Gn,y=new Br,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=wr,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 Jt,this.Of=this.gj=this.Pf=null}rn(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=Dr,te=lt.alloc(),x.location=y.ga(Dr,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=wr,y.fromSpot=Or,y.toSpot=Or),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(Dr,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 vn;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 vn,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 vn,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}Yt.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}rn(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 En)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(){},Yt.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 dn(Ka,"Either",0),_g=new dn(Ka,"ForwardsOnly",0),zg=new dn(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 Br;a.figure="Diamond",a.desiredSize=Nr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Br,a.figure="Diamond",a.desiredSize=Nr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Qt}rn(Bs,yo),Bs.prototype.updateAdornments=function(a){if(a!==null&&a instanceof En){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=xn.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 En))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=lr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=lr),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)}Yt.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",pr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),pr("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 Br;a.figure="Rectangle",a.desiredSize=Jr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Br,a.figure="Diamond",a.desiredSize=Nr,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 mn}rn(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 En){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=xn.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 En){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(Dr)},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(Dr,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(Dr,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)}},Yt.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 dn(ko,"None",0),sh=new dn(ko,"Horizontal",1),lh=new dn(ko,"Vertical",2),td=new dn(ko,"All",3);ko.className="LinkReshapingTool",ko.None=lp,ko.Horizontal=sh,ko.Vertical=lh,ko.All=td,pr("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 Br;a.alignmentFocus=Dr,a.figure="Rectangle",a.desiredSize=Jr,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)}rn(ba,li),ba.prototype.updateAdornments=function(a){if(!(a===null||a instanceof En)){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=xn.Spot,y.locationSpot=Dr;var x=new Ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Qr)),y.add(this.makeHandle(a,ki)),y.add(this.makeHandle(a,ji)),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=Dr),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 xn)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 Tr){var b=new mn;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=Dr);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 Br&&(a=Ev(this.adornedObject)),!(a===tr||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},Yt.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",pr("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 Br;a.figure="Ellipse",a.desiredSize=Nr,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}rn(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=xn.Position,y.locationSpot=Dr;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(Dr)},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},Yt.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",pr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){li.call(this),this.name="ClickSelecting"}rn(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}rn(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)}rn(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},Yt.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 Br;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}rn(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 Qt(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),ei?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 mn,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)}},Yt.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(Nn.document,"scroll",a.Kw,!1),a.stopTool()}}rn(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(Nn.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)}},Yt.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",pr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),pr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),pr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),pr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),pr("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}Yt.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()}}rn(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=bi("div");var x=bi("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=bi("style");Nn.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",Nn.document.body&&(Nn.document.body.appendChild(y),Nn.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 mn;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=bi("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=bi("li"),te.className="goCXli";var ne=bi("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}},Yt.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",pr("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)}rn(Qi,li);function ff(a,y){if(po){var x=bi("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(Dr),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 Qt(this.textBlock.ga(Qr),this.textBlock.ga(ji));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},Yt.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 dn(Qi,"LostFocus",0),ql=new dn(Qi,"MouseDown",1),rd=new dn(Qi,"Tab",2),df=new dn(Qi,"Enter",3),ev=new dn(Qi,"SingleClick",0),Lc=new dn(Qi,"SingleClickSelected",1),id=new dn(Qi,"DoubleClick",2),Nc=new dn(Qi,"StateNone",0),pf=new dn(Qi,"StateActive",1),gf=new dn(Qi,"StateEditing",2),hp=new dn(Qi,"StateValidating",3),mf=new dn(Qi,"StateInvalid",4),Ac=new dn(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,pr("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 vn,this.ce=new ya,this.ce.Yd=this,this.Ei=new vn,this.pu=new vn,this.Sr=new vn,this.pr=new vn,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),Nn.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 En&&(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)),Nn.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),Nn.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 Jt;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 Qt(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}Yt.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&&Mn(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 dn(Es,"Default",1),Sf=new dn(Es,"AnimateLocations",2),fp=new dn(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=In,this.vc=new Jt,this.Tt=new Jt,this.yl=new vn,this.Ut=new vn,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 Tr&&(b=y.placeholder),b!==null?(x=b.ga(Qr),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 Tr)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 Tr&&(x=y.placeholder),x!==null){var b=x.ga(Qr);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 Tr)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},Yt.Object.defineProperties(ya.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Mn(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:Nt("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))}Yt.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 dn(wl,"Default",1),Xh=new dn(wl,"Immediate",2),Oc=new dn(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 mn,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 Tr?E++:he instanceof Gn?b++:he instanceof En?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&&si(b)&&(se+=" #"+si(b)),x instanceof Gn?se+=" "+Kr(b):x instanceof En&&(se+=" "+Kr(x.fromNode)+" "+Kr(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),kn(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 mn||b instanceof vn||(b=new vn),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),kn(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 mn||E instanceof vn||(E=new vn),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 mn||E instanceof vn)&&(te=E),E=!0),te instanceof mn||te instanceof vn||(te=new vn),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),kn(se,Te.oe),he.h(a.x+y,a.y),kn(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=zn();for(var E=zn(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof En){if(ne.fd===!1)continue}else if(ne instanceof di&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&Bi(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]);Zn(a),Zn(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=Qt.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(Qt.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=Qt.alloc(),ye=0;ye<te;ye++){var Te=E[ye];b.contains(Te)&&a.Oj(y,Te,x,se,he,pe,!1)}Qt.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 En&&(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(ro,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 Tr&&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}Yt.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===""&&Nt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Nt("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)&&Mn(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(Nn.document,"DOMContentLoaded",b,!1),x.setRTL()};Nn.document.body!==null?this.setRTL():x.addEventListener(Nn.document,"DOMContentLoaded",b,!1)}this.ol=null,xd.add("Model",Ni);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===ro&&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 lo,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"||Nn.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 mn,a.pj=new Jt,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 Pr,a.zu=new lt(NaN,NaN).freeze(),a.ut=new Qt(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ar(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=Qr,a.Bt=Qr,a.Fc=!0,a.pn=!1,a.De=new vn,a.Eh=new Jt,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ar(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 vn,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 Jt,a.Xn=new mn,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 Ar(5).freeze(),a.Hw=new vn().freeze(),a.Nt=999999999,a.nw=new vn().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 vn,a.ow=new vn,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 Qt,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 Qt(NaN,NaN,NaN,NaN).freeze(),a.wo=new ln(NaN,NaN).freeze(),a.Sp=new Qt(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Jt;var y=new Gn,x=new Vi;x.bind(new Mo("text","",Kr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Gn,x=new Vi,x.stroke="brown",x.bind(new Mo("text","",Kr)),y.add(x),a.Lg.add("Comment",y),y=new Gn,y.selectable=!1,y.avoidable=!1,x=new Br,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 Jt,y=new Tr,y.selectionObjectName="GROUPPANEL",y.type=xn.Vertical,x=new Vi,x.font="bold 12pt sans-serif",x.bind(new Mo("text","",Kr)),y.add(x),x=new xn(xn.Auto),x.name="GROUPPANEL";var b=new Br;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Ja,b.padding=new Ar(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Jt,y=new En,x=new Br,x.isPanelMain=!0,y.add(x),x=new Br,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new En,x=new Br,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new di,y.type=xn.Auto,x=new Br,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ja,x.margin=new Ar(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new di,y.type=xn.Link,x=new Br,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 Ni,a.toolManager=new Ji,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=Wn,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new 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 vn().freeze(),a.nw=new vn().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(),Di=[],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 lo,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=Nn.document.body);var y=bi("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=Nn.document.body);var y=0;if(po){var x=om;y=Yh,x===null&&(x=om=bi("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Yh=bi("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||ei||(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||Nt("Diagram setup requires an argument DIV."),a.Ka!==null&&Nt("Diagram has already completed setup."),typeof y=="string"?a.Ka=Nn.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Nt("No DIV or DIV id supplied: "+y),a.Ka===null&&Nt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Nt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Nn.ResizeObserver){var x=Ir(function(){a.$b()},250);a.ol=new Nn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Nn.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=Nn.go;var E=new fl(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",Nn.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=bi("div");var te=bi("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=Ir(function(){a.Yh=null,a.N()},300),a.Ov=Ir(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=Nn.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=Nn.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(Nn,"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:Nn.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=Nn.scrollX||Nn.pageXOffset,y=Nn.scrollY||Nn.pageYOffset;this.ta.focus(),Nn.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 xn(xn.Grid);y.name="GRID";var x=new Br;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Br,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Br,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Br,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Br,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Br,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 Ct=Tt;Ge<he||Xe<pe?(Tt=lt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Ct&&(Tt.x=Ct/E+ne,this.ju=Ct),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(Ct+ne,this.position.y)),ye>Je&&(this.position=Tt.h(-(y.scrollWidth-this.Aa)+Ct-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 Qt),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(Fn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof En||(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 En||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new Qt(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=Qt.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,Qt.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()?Dr: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 Qt(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(Qr,y)),lt.free(y)}else this.eq=null,this.fq=Wn};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(Qr,pe),se=pe.x-a.fq.x/a.scale,he=pe.y-a.fq.y/a.scale,E=Or,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 mn||E instanceof vn||(E=new vn),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 mn||b instanceof vn||(b=new vn),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 mn||E instanceof vn||(E=new vn),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 vn;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 mn||E instanceof vn||(E=new vn),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 mn||E instanceof vn)&&(te=E),E=!0),te instanceof mn||te instanceof vn||(te=new vn),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 mn||E instanceof vn)&&(te=E),E=!0),te instanceof mn||te instanceof vn||(te=new vn),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),ei&&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,ei&&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?kn(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&&gi(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;Nn.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];Io(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=Qt.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),Qt.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 vn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Tr&&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 Tr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Tr&&x.isVisible()&&Ef(this,x);for(a.reset();a.next();)x=a.value,x instanceof En&&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=zn(),b=zn(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof Tr?(_s(te)||Ya(te)||rc(te))&&Ef(a,te):te instanceof En?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(Zn(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();Zn(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&&Nt("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&&(Pr.prototype.Cd=Pr.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&&(Pr.prototype.Cd=Pr.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&&Nt("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 Qt(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=Pr.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),Pr.free(Tt),ph(a,y),y.globalAlpha=a.pb;var Ct=a.Qj("Grid");if(ne){var jt=new vn,Ot=ne.iterator;for(Ot.reset();Ot.next();){var It=Ot.value;It instanceof hr&&(pe||It.layer!==Ct)&&(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===Ct?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 Jn,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(ei||Vr),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 Jn,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 xn,b=a instanceof Zt,E;for(E in y){E===""&&Nt("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):Nt("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!cr(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&cr(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 Nt('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 Jt,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=Qt.alloc(),Ap(this,this.computeBounds(b)),Qt.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=zn(),a=zn(),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 Qt(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),kn(ye,it),kn(Xe,it),b.push(new Qt(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 Qt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),kn(ye,it),kn(Xe,it),b.push(new Qt(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 Qt(Math.min(ye.x,Xe.x),Math.min(ye.y,Xe.y),Math.abs(ye.x-Xe.x),Math.abs(ye.y-Xe.y))),kn(ye,it),kn(Xe,it),b.push(new Qt(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&&Nt("No div specified"),this.ta===null&&Nt("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=Qt.alloc(),Xe=ne.Pa.s,it=Xe.length,Je=he.length;for(var Tt=0;Tt<it;Tt++){var Ct=Xe[Tt],jt=$c(Ct,Ct.actualBounds);e:{for(var Ot=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-Ot,Vt.y-Ot,Vt.width+It,Vt.height+It)){jt=!0;break e}}jt=!1}jt&&ne.Oj(E,Ct,this,Te,ye,Ge,!0)}Qt.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()}Zn(b),Zn(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,Ct=0,jt=0,Ot=0,It=0,_t=ye.width,Vt=ye.height,Rn=a.rj;a.contentAlignment.sb()?(Tt.width>_t&&(Ct=Rn.left,jt=Rn.right),Tt.height>Vt&&(Ot=Rn.top,It=Rn.bottom)):(Ct=Rn.left,jt=Rn.right,Ot=Rn.top,It=Rn.bottom);var $n=Tt.width+Ct+jt,Vn=Tt.height+Ot+It;Rn=a.scale;var Cn=$n>he/Rn,un=Vn>pe/Rn;if(!(te||a.gf||a.Be||Cn||un))return!0;Ct=Tt.x-Ct,he=ye.x,jt=Tt.right+jt,pe=ye.right+ne,Ot=Tt.y-Ot;var kr=ye.y;Tt=Tt.bottom+It,ye=ye.bottom+se;var br="1px";if(It="1px",a.scrollMode===mh&&(Cn||un)&&(Cn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Cn=1,Ct+1<he&&(Cn=Math.max((he-Ct)*Rn+a.Aa,Cn)),jt>pe+1&&(Cn=Math.max((jt-pe)*Rn+a.Aa,Cn)),_t+ne+1<$n&&(Cn=Math.max(($n-_t)*Rn+a.Aa,Cn)),br=Cn.toString()+"px"),un&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Cn=1,Ot+1<kr&&(Cn=Math.max((kr-Ot)*Rn+a.ya,Cn)),Tt>ye+1&&(Cn=Math.max((Tt-ye)*Rn+a.ya,Cn)),Vt+se+1<Vn&&(Cn=Math.max((Vn-Vt)*Rn+a.ya,Cn)),It=Cn.toString()+"px")),Cn=br!=="1px",un=It!=="1px",Cn&&un||!Cn&&!un||(un&&(pe-=a.Db),Cn&&(ye-=a.Db),$n<_t+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Ct+1<he&&(ne=Math.max((he-Ct)*Rn+a.Aa,ne)),jt>pe+1&&(ne=Math.max((jt-pe)*Rn+a.Aa,ne)),_t+1<$n&&(ne=Math.max(($n-_t)*Rn+a.Aa,ne)),br=ne.toString()+"px"),Cn=br!=="1px",ne=a.ya,Cn!==a.Be&&(ne=Cn?a.ya-a.Db:a.ya+a.Db),Vn<Vt+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,Ot+1<kr&&(se=Math.max((kr-Ot)*Rn+ne,se)),Tt>ye+1&&(se=Math.max((Tt-ye)*Rn+ne,se)),Vt+1<Vn&&(se=Math.max((Vn-Vt)*Rn+ne,se)),It=se.toString()+"px"),un=It!=="1px"),a.qr&&Cn===a.Be&&un===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Cn!==a.Be&&(br==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Cn,it.style.width=br,un!==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(),un?(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=un,it.style.height=It,a.gu=!0,te&&(a.pn=!0),y=Je.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(_t+1<$n?y=(a.position.x-Ct)*Rn:Ct+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<Vn?Je.scrollTop=(a.position.y-Ot)*Rn:Ot+1<kr?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=Qt.allocAt(E,Te,Ge,Xe),a.onViewportBoundsChanged(x,a.viewportBounds,Rn,te),Qt.free(x),!1):!0}et=Zt.prototype,et.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Nt("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&&Nt('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 Tr&&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),Fn(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 vn,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 Jt;if(a!==null)if(Fn(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 Tr&&(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 En)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=zn(),he=zn(),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 En&&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 En)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),Zn(se),Zn(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 En&&(y.suspendsRouting=!0)}function Qh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof En&&(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(In);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&&Nt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Nt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Nt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Nt("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&&Nt("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&&Nt("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 mn),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 mn),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 ao;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(ro,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===ro){var E=a.object;if(io(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 xn)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 Ro&&(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))):Nt("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 xn)typeof Ge=="number"&&Xe instanceof zt?y?Te.Gb(Ge,Xe):Te.pc(Ge):typeof Ge=="number"&&Xe instanceof Ro&&(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)):Nt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ea&&Nt("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 Ji&&(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=Qt.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Qt.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,Qt.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),Fn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof hr||Nt("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||Nt("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 vn().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||Nt("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}Nt("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):Nt("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 Qt(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),kn(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 Ni}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;gi(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 vn&&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 vn&&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:Mi(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:Mi(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=Qt.alloc();Ap(this,this.computeBounds(a)),Qt.free(a)}},et.rz=function(){for(var a=new vn,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 mn,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 mn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new Jt,b=new Jt;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;Nt("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=Qt.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)}Qt.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Qt.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof Gn&&Sd(a,ne,b,y);Qt.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 Tr)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=gi(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=Qt.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ap(a,y),Qt.free(y),a.Fc=!0,a.bd(),Fp(a))}},a.vp))}Zt.prototype.ug=function(){this.vk!==-1&&(Nn.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=Qt.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(In)||(y=new lt(y.x+te.x/E,y.y+te.y/E)),Qt.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 Tr&&(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):Nn.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 Nn.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"&&Nt('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"&&Nt("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 Ar(pe):pe instanceof Ar||Nt("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,Ct=a.documentBounds.copy();if(Ct.Fv(a.yb),Je)for(var jt=a.Wa.s,Ot=jt.length,It=0;It<Ot;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 $n=_t[Rn];$n.isInDocumentBounds&&$n.isVisible()&&($n=$n.actualBounds,$n.w()&&Ct.ed($n))}}}if(jt=new lt(Ct.x,Ct.y),he!==null){for(Ot=new Qt(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,Ot.assign(Vt)):Ot.ed(Vt))));Ct.width=Ot.width,Ct.height=Ot.height,jt.x=Ot.x,jt.y=Ot.y}return se!==null&&se.w()&&(jt=se,te||(te=Tt)),Ot=se=0,pe!==null&&(se=pe.left+pe.right,Ot=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-Ot))),E!==null&&te!==null?(te==="NaN"&&(te=Tt),E.w()?(E=_t,Ct=It):isNaN(It)?(E=_t,Ct=Ct.height*te):(E=Ct.width*te,Ct=It)):E!==null?E.w()?(te=Math.min(_t/Ct.width,It/Ct.height),E=_t,Ct=It):isNaN(It)?(te=_t/Ct.width,E=_t,Ct=Ct.height*te):(te=It/Ct.height,E=Ct.width*te,Ct=It):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/Ct.width,(ne.height-Ot)/Ct.height),te>Tt?(te=Tt,E=Ct.width,Ct=Ct.height):(E=ne.width,Ct=ne.height)):(E=Ct.width*te,Ct=Ct.height*te):(te=Tt,E=Ct.width,Ct=Ct.height),pe!==null?(E+=se,Ct+=Ot):pe=new Ar(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)&&(Ct=Math.min(Ct,ne))),Te.width=Math.ceil(E),Te.height=Math.ceil(Ct),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(Ct)),te,jt,he,ye,Je,y),b.context):(a.Xm=!1,cd(a,it,pe,new ln(Math.ceil(E),Math.ceil(Ct)),te,jt,he,ye,Je,y),a.Xm=!0,Te.context)}Yt.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,Nn.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,Nn.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(Nn,"resize",this.Ov,!1),this.removeEventListener(Nn,"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)&&Mn(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&&Mn(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&&Mn(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 Mn(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&&Nt("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(Nn,"pointermove",this.dk,!0),this.addEventListener(Nn,"pointerdown",this.ui,!0),this.addEventListener(Nn,"pointerup",this.fk,!0),this.addEventListener(Nn,"pointerout",this.ek,!0),this.addEventListener(Nn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Nn,"wheel",this.$j,!0),this.addEventListener(Nn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Nn,"pointermove",this.dk,!0),this.removeEventListener(Nn,"pointerdown",this.ui,!0),this.removeEventListener(Nn,"pointerup",this.fk,!0),this.removeEventListener(Nn,"pointerout",this.ek,!0),this.removeEventListener(Nn,"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(Nn,"wheel",this.$j,!0),this.removeEventListener(Nn,"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!==xn.Grid&&Nt("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||Nt("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 Ar(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()||Nt("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()||Nt("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)):Mn(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)):Mn(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 Ar(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&&Nt("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!==Bo&&a!==wd&&Nt("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 Ar(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Yt.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 Jt,om=null,po=Nn.document!==void 0,zc=null,ec="",Ba=new dn(Zt,"None",0),Is=new dn(Zt,"Uniform",1),tc=new dn(Zt,"UniformToFill",2),Tf=new dn(Zt,"CycleAll",10),Dp=new dn(Zt,"CycleNotDirected",11),Bp=new dn(Zt,"CycleNotDirectedFast",12),Ip=new dn(Zt,"CycleNotUndirected",13),Rp=new dn(Zt,"CycleDestinationTree",14),_p=new dn(Zt,"CycleSourceTree",15),mh=new dn(Zt,"DocumentScroll",1),Mf=new dn(Zt,"InfiniteScroll",2),vh=new dn(Zt,"TreeParentCollapsed",21),Bo=new dn(Zt,"AllParentsCollapsed",22),wd=new dn(Zt,"AnyParentsCollapsed",23),zp=new mn,Gc="2.3.10",Uc="image",Lf=null,am=!1;function Ta(){if(po){var a=Nn.document.createElement("canvas"),y=a.getContext("2d"),x=an("7ca11abfd022028846");y[x]=an("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",qn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Pr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Gt.za],E=1;5>E;E++)y[an("7ca11abfd7330390")](an(b[E-1]),10,15*E);for(y[x]=an("39f046ebb36e4b"),x=1;5>x;x++)y[an("7ca11abfd7330390")](an(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Pr.prototype.Cd=Pr.prototype.Eu),Lf=a}}Zt.className="Diagram",Zt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Nn.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?Nn.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=Bo,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=Nn[an("76a715b2f73f148a")][an("72ba13b5")]||"";if(a.Rc=!0,po){var b=Zt[an("76a115b6ed251eaf4692")];if(b)for(var E=zp.iterator;E.next()&&(b=E.value,b=an(b).split(an("39e9")),!(6>b.length));){var te=an(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=an(qn[an("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=Nn[an("74a900bae4370f8b51")][an("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[an("73a612b6fb191d")](an("3aad1ab6e022098b4dc4")),te=an(b[2]),-1<ne&&(se=se[an("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[an("76ad18b4f73e")],se=x[an("73a612b6fb191d")](an("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[an("73a612b6fb191d")](te),0>ne&&te!==an("7da71ca0ad381e90")&&(ne=y[an("73a612b6fb191d")](an("76a715b2ef3e149757"))),0>ne&&(ne=y[an("73a612b6fb191d")](an("76a715b2ef3e149757"))),0>ne&&(ne=y[an("73a612b6fb191d")](an("2bfa41fdb3784bca12"))),0>ne&&(ne=x[an("73a612b6fb191d")](an("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[an("73a612b6fb191d")](an("35"))||y[an("73a612b6fb191d")](an("35"))===-1),!a.Rc||x[an("73a612b6fb191d")](an("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[an("73a612b6fb191d")](te)),!a.Rc)||(ne=Nn[an("76a715b2f73f148a")][an("69ad17a1e03e")],se=ne[an("73a612b6fb191d")](an("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[an("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=Nn.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[an("79a417a0f0181a8946")]=b,Nn.document[an("78a712aa")]){Nn.document[an("78a712aa")][an("7bb806b6ed32388c4a875b")](ne),he=Nn.getComputedStyle(ne).getPropertyValue(an("78a704b7e62456904c9b12701b6532a8"));var pe=Nn.getComputedStyle(ne).getPropertyValue(an("75b817b0ea2202"));if(Nn.document[an("78a712aa")][an("68ad1bbcf533388c4a875b")](ne),he){if(ne=Nn[an("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(an("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[an("76ad18b4f73e")],E=x[an("73a612b6fb191d")](an("35e7"))+2;E<ye;E++)y+=x[E];x=y[an("73a612b6fb191d")](an("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[an("73a612b6fb191d")](an("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}Yt.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=Qr,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"||Nn.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}rn(Ee,Zt);function be(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=wi,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"||Nn.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 Br;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 Ar(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(),yt(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&&yt(b)},x.autoScale=Is,x.vb=!1,y&&Object.assign(x,y),x}rn(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&&Nt("No div specified"),this.ta===null&&Nt("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=Qt.alloc().assign(a.viewportBounds).ed(y.viewportBounds),eu(y,E),Qt.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=Qt.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)}Qt.free(Ge),E.globalAlpha=ye}}}}}function yt(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 Br&&(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 Ao;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(),yt(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))},Yt.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&Nt("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),yt(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),yt(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}rn(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=Ao,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=ei?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 Ji&&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 vn,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 vn;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 mn,x.addAll(te),zc=x,ec=y.model.dataFormat}}y.R("ClipboardChanged",x)},kt.prototype.pasteFromClipboard=function(){var a=new vn,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=Ao):(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 Tr)||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 Tr&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof hr&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){gi(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 En){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 mn;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 mn;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 mn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new mn,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 Tr)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 nn(a){var y=zn();for(a=a.iterator;a.next();){var x=a.value;x instanceof En||y.push(x)}a=new vn,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 Zn(y),a}kt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof En)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 mn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof Tr&&te.canUngroup()&&b.add(te)}var ne=new mn;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 En)){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 Tr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Tr&&y.canUngroup())return!0;return!1},kt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=nn(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 mn;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 Tr&&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 Tr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Tr&&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 mn;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 Tr&&!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 Tr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Tr&&!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(Dr):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 Jt,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 En&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Yt.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||Nt("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=mi,this.Ab=new Pr,this.wh=new Pr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ta,this.uc=new Qt(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Qt(NaN,NaN,NaN,NaN).freeze(),this.dc=new Qt(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 yn,fn,tr,or,vr,Lr,qr,Gr,ai,Oi;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=Dn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},zt.prototype.Vw=function(a){var y=this.Dh;if(Fn(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===En?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Nt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===zt&&(this.stretch=a)},et.toString=function(){return rr(this.constructor)+"#"+si(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=Or,a.yj=Or,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===ro&&da(this)&&qi(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 Jt),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 xn&&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 xn&&Zc(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function qi(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(ro,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 Pr);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?Bn(a.x,a.y,0,0,0,b.height)<=y||Bn(a.x,a.y,0,b.height,b.width,b.height)<=y||Bn(a.x,a.y,b.width,b.height,b.width,0)<=y||Bn(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=eo(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 Br?eo(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 eo(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=Qt.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),Qt.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=Qt.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),Qt.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 Qn){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 Qt);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),ti(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),ti(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),ti(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 xn;switch(ss(this,!0)){case fn:ne=E=0,se&&(y=a=1/0);break;case yn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case or: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()||Nt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Io(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=Qt.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()||Nt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),yu(this,!1),Qt.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)&&(Io(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case yn:Io(a,!0),a.measure(b,E,0,0);break;case or:Io(a,!0),a.measure(b,te,0,0);break;case vr:Io(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(),oi(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 xn&&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 Ti&&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 Ti&&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,Ct=Ge.m12,jt=Ge.m22,Ot=Ge.dy,It,_t=It=0;Ge=It*Je+_t*it+Tt;var Vt=It*Ct+_t*jt+Ot;It=Xe.width+Te,_t=0;var Rn=It*Je+_t*it+Tt;It=It*Ct+_t*jt+Ot,_t=Math.min(Ge,Rn);var $n=Math.min(Vt,It),Vn=Math.max(Ge+0,Rn)-_t,Cn=Math.max(Vt+0,It)-$n;Ge=_t,Vt=$n,It=Xe.width+Te,_t=Xe.height+Te,Rn=It*Je+_t*it+Tt,It=It*Ct+_t*jt+Ot,_t=Math.min(Ge,Rn),$n=Math.min(Vt,It),Vn=Math.max(Ge+Vn,Rn)-_t,Cn=Math.max(Vt+Cn,It)-$n,Ge=_t,Vt=$n,It=0,_t=Xe.height+Te,Rn=It*Je+_t*it+Tt,It=It*Ct+_t*jt+Ot,_t=Math.min(Ge,Rn),$n=Math.min(Vt,It),Vn=Math.max(Ge+Vn,Rn)-_t,Cn=Math.max(Vt+Cn,It)-$n,Ge=_t,Vt=$n,Te=y.viewportBounds,Xe=Te.x,Je=Te.y,Ge=!(Ge>Te.width+Xe||Xe>Vn+Ge||Vt>Te.height+Je||Je>Cn+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,Vn=Math.max(ne.x,Vt.x),Cn=Math.max(ne.y,Vt.y),Te=Math.min(ne.right,Vt.right)-Vn,Xe=Math.min(ne.bottom,Vt.bottom)-Cn,Je=this.tb,Je!==null&&(Vn=Je.x,Cn=Je.y,Te=Je.width,Xe=Je.height),Vn>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(Vn,Cn,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 xn)),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===xn.Auto||y.type===xn.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 Ti&&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 Ti&&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===xn.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 xn;var se=a instanceof xn?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"+Ii++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof xn&&(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 xn?xh(this):!1;if(!(this instanceof xn&&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 xn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Br){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 xn))&&(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 Ct=a.diagram;Ct!==null&&x.yk===-1&&gi(function(){Ct.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}et.rg=function(a){if(a instanceof xn)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 xn?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,Dr),a.rotate(this.Kb,te.x,te.y),lt.free(te)}},et.v=function(a){if(!_s(this)){a===void 0&&(a=!1),Io(this,!0),yu(this,!0);var y=this.panel;y===null||a||y.v()}},et.Uj=function(){_s(this)||(Io(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===xn.Table?Bl(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===xn.Auto&&b.Pb()===a?oa(a,yn,y):x===Lr?b!==null?b.type===xn.Spot&&b.Pb()===a?oa(a,yn,y):(x=b.defaultStretch,x===Lr?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!==Lr)return oa(a,E,b);var te=E=null;switch(y.stretch){case vr:te=!0;break;case yn:te=!0}switch(x.stretch){case or:E=!0;break;case yn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===or||y===yn),te===null&&(te=y===vr||y===yn),E===!0&&te===!0?oa(a,yn,b):E===!0?oa(a,or,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===or)return fn;if(y===yn)return vr}else{if(y===vr)return fn;if(y===yn)return or}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===vr)return fn;if(y===yn)return or}else{if(y===or)return fn;if(y===yn)return vr}return y}function bl(a,y){a.l=y?a.l|512:a.l&-513}function da(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 Io(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 xn?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)&&Nt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new mn),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 xn?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 Jt),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=Dn(arguments),b=te(x),en(b)||Nt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=Nn.go[a]}if(b===null&&(E!=null&&E.constructor||Nt("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?Nt("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 Br)a.figure=y;else if(a instanceof us)a.source=y;else if(a instanceof xn)y=Cl.I(y),y!==null&&(a.type=y);else if(a instanceof Ti){var x=Hn(Ti,y);x!==null?a.type=x:Nt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof bn?(y=Hn(bn,y),y!==null&&(a.type=y)):a instanceof fi&&(y=Hn(fi,y),y!==null&&(a.type=y));else if(y instanceof zt)a instanceof xn||Nt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ro){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 Ro?km(b,y):Nt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof dn)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 Ro?a.bind(y):Nt("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):Nt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Fo)a instanceof bn&&a.type===bn.o?a.figures.add(y):Nt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof fi)a instanceof Fo?a.segments.add(y):Nt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof lo)a instanceof Zt||a instanceof Tr?a.layout=y:Nt("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 Ti){x=new Jn;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 Ro){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Nt("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)&&Nt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new Jn;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Bc(a,E)}else Bc(a,y);else Nt('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}Yt.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:In},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:Lr},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)&&Mn(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 Ti&&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 Ti&&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&&Nt("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 Br&&this.qc(),this.g("desiredSize",b,a),da(this)&&(a=this.part,a!==null&&(qi(this,a,"width"),qi(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 Br&&this.qc(),this.g("desiredSize",y,a),da(this)&&(a=this.part,a!==null&&qi(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 Br&&this.qc(),this.g("desiredSize",y,a),da(this)&&(a=this.part,a!==null&&qi(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:lr},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:vi},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 Ar(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()&&Nt("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&&Mn(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&&Mn(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&&Mn(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&&Mn(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||Nt("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:Or},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&&Mn(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&&Mn(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:Or},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&&Mn(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&&Mn(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 Jt,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(xn,xn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof xn){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(Br,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Qn(0,0,2.76142374915397,2.761423749153969),spot2:new Qn(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 xn&&(x=b.fb("ButtonBorder"),x instanceof Br)){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 xn&&(x=b.fb("ButtonBorder"),x instanceof Br&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof xn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Br){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 xn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Br){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 xn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Br){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 xn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Br))){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(Br,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Nr},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(Br,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Nr},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 Tr){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,xn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},$s(Br,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Qn(0,0,4,6),spot2:new Qn(1,1,-4,-4)}))}),yh("ContextMenu",function(){return $s(di,xn.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=or;var y=a.fb("ButtonBorder");return y instanceof Br&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Qn(0,0,2,3),y.spot2=new Qn(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(Br,{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 Br&&(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(Br,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:yn,geometryStretch:tr,visible:!1},y!==""?new Mo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof xn){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 Ar(0,1,0,0)});var y=$s(xn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ar(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 dn(zt,"None",0),zt.Default=Lr=new dn(zt,"Default",0),zt.Vertical=vr=new dn(zt,"Vertical",4),zt.Horizontal=or=new dn(zt,"Horizontal",5),zt.Fill=yn=new dn(zt,"Fill",3),zt.Uniform=tr=new dn(zt,"Uniform",1),zt.UniformToFill=qr=new dn(zt,"UniformToFill",2),zt.FlipVertical=Gr=new dn(zt,"FlipVertical",1),zt.FlipHorizontal=ai=new dn(zt,"FlipHorizontal",2),zt.FlipBoth=Oi=new dn(zt,"FlipBoth",3),zt.make=$s,zt.getBuilders=function(){var a=new Jt,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;Nt('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=lr,this.o=vi,this.hg=Lr,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=In,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?Nn.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},Yt.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=Ii++,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"+Ii++,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"+Ii++,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=Dn(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,Nn.document));var y=new nu(this,Nn.document,!0);a===void 0&&(a=new Jn);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?Nn.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},Yt.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&&Nt("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 Pr,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 Ti&&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(){},Yt.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 Ti(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=wi,this.Lk=Oo):this.Lk=a===Js?this.Qd=Dr:this.Qd=Or,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ti.prototype.copy=function(){var a=new Ti;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=Ti.prototype,et.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},et.ka=function(){return Object.isFrozen(this)&&Nt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},et.qb=function(a){a.classType===Ti&&(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&&Ht(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Mn(a,"0 <= loc <= 1",Ti,"addColorStop:loc"),this.we===null&&(this.we=new Jt),this.we.add(a,y),this.na===Sh&&(this.type=Hu),this.xe=null,this},et.Vz=function(a,y){if(this._isFrozen&&Ht(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&&Ht(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 Ti?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:Nt("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 Ti||Nt("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}Yt.Object.defineProperties(Ti.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Ht(this,a),this.na=a,this.start.Mc()&&(a===Hu?this.start=wi:a===Js&&(this.start=Dr)),this.end.Mc()&&(a===Hu?this.end=Oo:a===Js&&(this.end=Dr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Ht(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Ht(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Ht(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Ht(this,a),0>a&&Mn(a,">= zero",Ti,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Ht(this,a),0>a&&Mn(a,">= zero",Ti,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Ht(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Ht(this,a),this.cr=a,this.xe=null}}}),Ti.prototype.isDark=Ti.prototype.Gx,Ti.prototype.darkenBy=Ti.prototype.Wy,Ti.prototype.lightenBy=Ti.prototype.Vz,Ti.prototype.addColorStop=Ti.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;Ti.className="Brush";var Sh;Ti.Solid=Sh=new dn(Ti,"Solid",0);var Hu;Ti.Linear=Hu=new dn(Ti,"Linear",1);var Js;Ti.Radial=Js=new dn(Ti,"Radial",2);var Md;Ti.Pattern=Md=new dn(Ti,"Pattern",4);var Ld;Ti.Lab=Ld=new dn(Ti,"Lab",5);var r1;Ti.HSL=r1=new dn(Ti,"HSL",6),Ti.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},Ti.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)},Ti.lighten=function(a){return e1(a)},Ti.lightenBy=e1,Ti.darken=function(a){return t1(a)},Ti.darkenBy=t1,Ti.mix=av,Ti.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(){},Yt.Object.defineProperties(Wo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return xn}}}),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"}rn(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 Br&&pe.isGeometryPositioned&&(pe=pe.strokeWidth/2,Ge-=pe,Xe-=pe),ti(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 Br&&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"}rn(dm,Wo),dm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=zn(),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!==or)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));Zn(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===yn||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=Dr),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"}rn(pm,Wo),pm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=zn();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);Zn(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===yn||Tt===or)&&(it=Math.max(x.width-Xe-Je,0)),Xe=it+Xe+Je,Je=ye.alignment,Je.Xb()&&(Je=a.defaultAlignment),Je.sb()||(Je=Dr),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"}rn(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=Qt.allocAt(-pe.left,-pe.top,Xe,Je),Ct=Qt.allocAt(0,0,te,ne);pv(he,Ct,!0),te=Ct.width,ne=Ct.height;for(var jt=!0,Ot=Ku(a),It=0;It<se;It++){var _t=b[It];Ge=y;var Vt=x;if(_t!==he&&(_t.visible||_t===Ot)){pe=_t.margin;var Rn=pe.left,$n=pe.top;switch(Xe=pe.right+pe.left,Je=pe.top+pe.bottom,pe=ss(_t,!1),pe){case yn:Ge=te,Vt=ne,$n=Rn=Je=Xe=0;break;case or:Ge=te,Rn=Xe=0;break;case vr:Vt=ne,$n=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=Dr);var Vn=_t.alignmentFocus;if(Vn.Xb()&&(Vn=Dr),Vt=null,_t instanceof xn&&_t.$e!==""&&(Vt=_t.fb(_t.$e),Vt===_t&&(Vt=null)),Rn=Ct.x-Rn,$n=Ct.y-$n,Vt!==null){for(_t.arrange(0,0,Ge.width,Ge.height),Ge=Vt.actualBounds,Ge=lt.allocAt(Ge.x+(Vn.x*Ge.width-Vn.offsetX),Ge.y+(Vn.y*Ge.height-Vn.offsetY)),Vt=Vt.panel;Vt!==_t;)Vt.transform.Ga(Ge),Vt=Vt.panel;Rn+=pe.x*te+pe.offsetX-Ge.x,$n+=pe.y*ne+pe.offsetY-Ge.y,lt.free(Ge)}else Rn+=pe.x*te+pe.offsetX-(Vn.x*Ge.width+Vn.offsetX),$n+=pe.y*ne+pe.offsetY-(Vn.y*Ge.height+Vn.offsetY);jt?(jt=!1,E.h(Rn,$n,Xe,Je)):ti(E,Rn,$n,Xe,Je)}}switch(jt?E.assign(Tt):it?E.Uu(Ct.x,Ct.y,Ct.width,Ct.height):ti(E,Tt.x,Tt.y,Tt.width,Tt.height),Qt.free(Tt),Qt.free(Ct),pe=he.stretch,pe===Lr&&(pe=ss(he,!1)),pe){case fn:return;case yn:if(!isFinite(y)&&!isFinite(x))return;break;case or: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,Ct=Qt.allocAt(-pe.left,-pe.top,Xe,Je),pv(he,Ct,!0),te=Ct.width,ne=Ct.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==Ot||(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=Dr),x=x.alignmentFocus,x.Xb()&&(x=Dr),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)):ti(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(Ct.x,Ct.y,Ct.width,Ct.height):ti(E,Tt.x,Tt.y,Tt.width,Tt.height),Qt.free(Ct)},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=Qt.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=Dr);var Je=Te.alignmentFocus;if(Je.Xb()&&(Je=Dr),pe=null,Te instanceof xn&&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)}}Qt.free(ne)};function pv(a,y,x){var b=null;if(a instanceof xn&&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"}rn(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 Br&&(it=he,Je=it.strokeWidth*it.scale);var Tt=Math.max(pe.width+Ge,0);pe=Math.max(pe.height+Xe,0);var Ct=yv(he),jt=Ct.x*Tt+Ct.offsetX;Ct=Ct.y*pe+Ct.offsetY;var Ot=Sv(he),It=Ot.x*Tt+Ot.offsetX;for(Ot=Ot.y*pe+Ot.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(jt-It)-Je,0)),isFinite(x)&&(Te=Math.max(Math.abs(Ct-Ot)-Je,0)),Je=ln.alloc(),Je.h(0,0),a=Ku(a),Ot=0;Ot<se;Ot++)Ct=b[Ot],Ct===he||!Ct.visible&&Ct!==a||(pe=Ct.margin,Tt=pe.right+pe.left,jt=pe.top+pe.bottom,Ct.measure(ye,Te,0,0),pe=Ct.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(Ct=yv(he),Ot=Sv(he),se=b=0,Ot.x!==Ct.x&&Ot.y!==Ct.y&&(b=Je.width/Math.abs(Ot.x-Ct.x),se=Je.height/Math.abs(Ot.y-Ct.y)),ln.free(Je),Je=0,it!==null&&(Je=it.strokeWidth*it.scale,Ev(it)===tr&&(b=se=Math.max(b,se))),b+=Math.abs(Ct.offsetX)+Math.abs(Ot.offsetX)+Je,se+=Math.abs(Ct.offsetY)+Math.abs(Ot.offsetY)+Je,it=he.stretch,it===Lr&&(it=ss(he,!1)),it){case fn:ne=te=0;break;case yn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case or: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=Qt.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,ti(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=Dr),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&&(eo(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 Qt(te.x,te.y,te.width,te.height))));Qt.free(te)};function vm(){this.xa="Base",this.name="Table"}rn(vm,Wo),vm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=zn(),se=zn(),he=0;he<te;he++){var pe=b[he],ye=pe instanceof xn?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===xn.TableRow?Je.row=pe.row:ye.type===xn.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 Ct=ne[Tt];Ct.visible&&(Io(Ct,!0),yu(Ct,!0),it[Ct.row]||(it[Ct.row]=[]),it[Ct.row][Ct.column]||(it[Ct.row][Ct.column]=[]),it[Ct.row][Ct.column].push(Ct))}Zn(ne);var jt=zn(),Ot=zn(),It=zn(),_t={count:0},Vt={count:0},Rn=y,$n=x,Vn=a.rowDefs,Cn=a.colDefs,un=null;te=Vn.length;for(var kr=0;kr<te;kr++)un=Vn[kr],un!==void 0&&(un.actual=0);te=Cn.length;for(var br=0;br<te;br++)un=Cn[br],un!==void 0&&(un.actual=0);for(var yi=it.length,Hi=0,$o=0;$o<yi;$o++)it[$o]&&(Hi=Math.max(Hi,it[$o].length));var ea=Math.min(a.topIndex,yi-1),Ra=Math.min(a.leftIndex,Hi-1),Jo=0;yi=it.length;for(var Nh=Ku(a),Lo=0;Lo<yi;Lo++)if(it[Lo]){Hi=it[Lo].length;var Gl=a.Fb(Lo);Gl.actual=0;for(var _a=Gl.oc=0;_a<Hi;_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||Ot.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!==yn&&za!==or||(_t[_a]=-1,_t.count++),Vt[Lo]!==void 0||za!==yn&&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===or)){un=a.Fb(Lo);var vc=un.Wc();Jo=Math.max(As-un.actual,0),Jo+vc>$n&&(Jo=Math.max($n-vc,0));var z0=un.oa===0;un.oc=un.oc+Jo,un.actual=un.oa+Jo,$n=Math.max($n-(Jo+(z0?vc:0)),0)}if(ys.columnSpan===1&&(za===fn||za===vr)){un=a.Eb(_a);var Ag=un.Wc();Jo=Math.max(tf-un.actual,0),Jo+Ag>Rn&&(Jo=Math.max(Rn-Ag,0));var Gy=un.oa===0;un.oc=un.oc+Jo,un.actual=un.oa+Jo,Rn=Math.max(Rn-(Jo+(Gy?Ag:0)),0)}mc&&ys.Uj()}}}}}Zn(jt);var Lu=0,Xu=0;te=a.columnCount;for(var Zf=0;Zf<te;Zf++){var yc=Cn[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=Vn[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=$n=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($n)&&Vt[rs.row]!==null?Xf===0?Oh=No.actual+$n:Oh=Vt[rs.row]/Xf*Nu:Vt[rs.row]!==null?Oh=$n:Oh=No.actual||$n,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 or:ca.height=Math.max(ca.height,No.actual+$n);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($n)&&(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,$n=Math.max($n-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))}}Zn(It);var Ju=ln.alloc(),Hl=zn(),rl=zn();if(te=Ot.length,te!==0){for(var xc=0;xc<yi;xc++)if(it[xc]){Hi=it[xc].length;var rp=a.Fb(xc);Hl[xc]=rp.actual;for(var wc=0;wc<Hi;wc++)if(it[xc][wc]){var W0=a.Eb(wc);rl[wc]=W0.actual}}}for(var ip=0;ip<te;ip++){var So=Ot[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 yn: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 or: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++)un=a.Fb(So.row+Fh),Jo=0,Jo=za===yn||za===vr?Math.max(un.minimum,Hl[So.row+Fh]===0?un.maximum:Math.min(Hl[So.row+Fh],un.maximum)):Math.max(un.minimum,isNaN(un.Hc)?un.maximum:Math.min(un.Hc,un.maximum)),Ju.height+=Jo,js+=un.minimum;for(var yl=1;yl<So.columnSpan&&!(So.column+yl>=a.columnCount);yl++)un=a.Eb(So.column+yl),Jo=0,Jo=za===yn||za===or?Math.max(un.minimum,rl[So.column+yl]===0?un.maximum:Math.min(rl[So.column+yl],un.maximum)):Math.max(un.minimum,isNaN(un.Hc)?un.maximum:Math.min(un.Hc,un.maximum)),Ju.width+=Jo,H0+=un.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++)un=a.Fb(So.row+sp),bc+=un.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++){un=a.Fb(So.row+Qu);var Ih=un.oa||0,sf=Bh(So,un,Au);un.actual=Math.min(un.maximum,Ih+sf),un.oa!==Ih&&(Dh-=un.oa-Ih)}for(;0<Dh;){var Kl=un.oa||0;if(isNaN(un.height)&&un.maximum>Kl&&(un.actual=Math.min(un.maximum,Kl+Dh),un.oa!==Kl&&(Dh-=un.oa-Kl)),un.index===0)break;un=a.Fb(un.index-1)}}for(var $f=0,Rh=0;Rh<So.columnSpan&&!(So.column+Rh>=a.columnCount);Rh++)un=a.Eb(So.column+Rh),$f+=un.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++){un=a.Eb(So.column+lf);var Fg=un.oa||0,Hy=qu(So,un,Wy);un.actual=Math.min(un.maximum,Fg+Hy),un.oa!==Fg&&(Jf-=un.oa-Fg)}for(;0<Jf;){var K0=un.oa||0;if(isNaN(un.width)&&un.maximum>K0&&(un.actual=Math.min(un.maximum,K0+Jf),un.oa!==K0&&(Jf-=un.oa-K0)),un.index===0)break;un=a.Eb(un.index-1)}}}}Zn(Ot),ln.free(Ju),ln.free(ca),Hl!==void 0&&Zn(Hl),rl!==void 0&&Zn(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++)Cn[Z0]!==void 0&&(un=a.Eb(Z0),isFinite(un.width)?(Dg+=un.width,Dg+=un.Wc()):Tm(un)===Zp?(Dg+=un.oa,Dg+=un.Wc()):un.oa!==0&&(Lu+=un.oa,Lu+=un.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++)Cn[X0]!==void 0&&(un=a.Eb(X0),isFinite(un.width)||Tm(un)===Zp||(un.actual=un.oa*Qx),un.position=E.width,un.oa!==0&&(E.width+=un.oa,E.width+=un.Wc()));te=a.rowCount;for(var Y0=0;Y0<te;Y0++)Vn[Y0]!==void 0&&(un=a.Fb(Y0),isFinite(un.height)?(Bg+=un.height,Bg+=un.Wc()):Tm(un)===Zp?(Bg+=un.oa,Bg+=un.Wc()):un.oa!==0&&(Xu+=un.oa,Xu+=un.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++)Vn[$0]!==void 0&&(un=a.Fb($0),isFinite(un.height)||Tm(un)===Zp||(un.actual=un.oa*qx),un.position=E.height,un.oa!==0&&(E.height+=un.oa,E.height+=un.Wc()));te=se.length;for(var Ky=0;Ky<te;Ky++){var Ig=se[Ky],Vy=0,Zy=0;Ig.type===xn.TableRow?(Vy=E.width,un=a.Fb(Ig.row),Zy=un.actual):(un=a.Eb(Ig.column),Vy=un.actual,Zy=E.height),Ig.measuredBounds.h(0,0,Vy,Zy),Io(Ig,!1)}Zn(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 Ct=0;Ct<y.length;Ct++){var jt=y[Ct];if(jt instanceof xn&&jt.visible&&xh(jt)){if(jt.type===xn.TableRow){se=a.Fb(jt.row);var Ot=a.Eb(Tt)}else se=a.Fb(it),Ot=a.Eb(jt.column);he=se.position+Te+E,se.oa!==0&&(he+=se.Io(Math.max(it,Xe))),se=Ot.position+Ge+te,Ot.oa!==0&&(se+=Ot.Io(Math.max(Tt,Je))),Ot=jt.measuredBounds,jt.Uk(),jt.actualBounds.ka();var It=jt.actualBounds,_t=Qt.allocAt(It.x,It.y,It.width,It.height);It.x=jt.type===xn.TableRow?te:se,It.y=jt.type===xn.TableColumn?E:he,It.width=Ot.width,It.height=Ot.height,jt.actualBounds.freeze(),yu(jt,!1),oi(_t,It)||ye===null||(ye.oh(),jt.Pn(ye)),Qt.free(_t)}}for(Ct=ln.alloc(),jt=0;jt<pe;jt++)if(ne[jt]){for(ye=ne[jt].length,Ot=a.Fb(jt),he=Ot.position+Te+E,Ot.oa!==0&&(he+=Ot.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,$n=0;$n<Rn;$n++){var Vn=Vt[$n],Cn=Vn.measuredBounds;Ct.h(0,0);for(var un=1;un<Vn.rowSpan&&!(jt+un>=a.rowCount);un++){var kr=a.Fb(jt+un);kr.oa!==0&&(Ct.height+=kr.total)}for(un=1;un<Vn.columnSpan&&!(It+un>=a.columnCount);un++)kr=a.Eb(It+un),kr.oa!==0&&(Ct.width+=kr.total);var br=_t.oa+Ct.width,yi=Ot.oa+Ct.height;un=se,kr=he;var Hi=br,$o=yi,ea=se,Ra=he,Jo=br,Nh=yi;se+br>x.width&&(Jo=Math.max(x.width-se,0)),he+yi>x.height&&(Nh=Math.max(x.height-he,0));var Lo=Vn.alignment;if(Lo.Xb()){Lo=a.defaultAlignment,Lo.sb()||(Lo=Dr);var Gl=Lo.x,_a=Lo.y,Ah=Lo.offsetX;Lo=Lo.offsetY;var Ws=_t.alignment,ml=Ot.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=Cn.width,ml=Cn.height;var Ls=Vn.margin,ys=Ls.left+Ls.right,mc=Ls.top+Ls.bottom,Ul=Bl(Vn,Ot,_t,!1);!isNaN(Vn.desiredSize.width)||Ul!==yn&&Ul!==or||(Ws=Math.max(br-ys,0)),!isNaN(Vn.desiredSize.height)||Ul!==yn&&Ul!==vr||(ml=Math.max(yi-mc,0)),br=Vn.maxSize,yi=Vn.minSize,Ws=Math.min(br.width,Ws),ml=Math.min(br.height,ml),Ws=Math.max(yi.width,Ws),ml=Math.max(yi.height,ml),br=ml+mc,un+=Hi*Gl-(Ws+ys)*Gl+Ah+Ls.left,kr+=$o*_a-br*_a+Lo+Ls.top,Vn.visible&&(eo(ea,Ra,Jo,Nh,un,kr,Cn.width,Cn.height)?Vn.arrange(un,kr,Ws,ml):Vn.arrange(un,kr,Ws,ml,new Qt(ea,Ra,Jo,Nh)))}}}for(ln.free(Ct),a=0;a<b;a++)x=y[a],te=x instanceof xn?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"}rn(ym,Wo),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}rn(Sm,Wo),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}rn(xm,Wo),xm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Nt("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===tr?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&&(Io(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=Dr),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"}rn(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 Ct=Je[Tt],jt=[];if(Xe.push(jt),Ct.visible){var Ot=Ct.interval;if(!(0>Ot)){Ct=mv(Ct.figure);for(var It=0;It<it;It++)if(It!==Tt){var _t=Je[It];_t.visible&&mv(_t.figure)===Ct&&(_t=_t.interval,_t>Ot&&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,Ct=Math.abs(jt),!(2>E*Ct*x))){if(Ot=Vt.segmentIndex,(!isFinite(Ot)||isNaN(Ot))&&(Ot=0),0>Ot&&(Ot=Ct-Math.min(-Ot,Ct)),Ot=Math.round(Ot%Ct),Ct=Vt.opacity,It=1,Ct!==1){if(Ct===0)continue;It=y.globalAlpha,y.globalAlpha=It*Ct}_t=Xe[Tt];var Rn=!1,$n=Vt.strokeDashArray;if($n!==null&&(Rn=!0,y.js($n,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(),$n=Vt=Math.floor((Ge-E)/E);$n<=Vt+pe;$n++){var Vn=$n*E+Ge;0<=Vn&&Vn<=se&&wm($n,jt,Ot,_t)&&(y.moveTo(Vn,0),y.lineTo(Vn,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(),$n=Vt=Math.floor((Te-b)/b);$n<=Vt+ye;$n++)Vn=$n*b+Te,0<=Vn&&Vn<=he&&wm($n,jt,Ot,_t)&&(y.moveTo(0,Vn),y.lineTo(se,Vn));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),Vn=$n=Math.floor((Ge-E)/E);Vn<=$n+pe;Vn++){var Cn=Vn*E+Ge;0<=Cn+Vt&&Cn<=se&&wm(Vn,jt,Ot,_t)&&y.fillRect(Cn,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),Vn=$n=Math.floor((Te-b)/b);Vn<=$n+ye;Vn++)Cn=Vn*b+Te,0<=Cn+Vt&&Cn<=he&&wm(Vn,jt,Ot,_t)&&y.fillRect(0,Cn,se,Vt);Rn&&y.fs(),Ct!==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"}rn(Pm,Wo),Pm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof di||a instanceof En){var ne=null,se=null;if(a instanceof En&&(ne=a),a instanceof di&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof En){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=Pr.alloc();for(var it=lt.alloc(),Tt=lt.alloc(),Ct=0;Ct<te;Ct++){var jt=b[Ct];if(jt!==pe)if(jt.isPanelMain&&jt instanceof Br){i1(a,se,Ge,jt);var Ot=jt.measuredBounds;x.ed(Ot),Xe.push(Ot)}else if(2>Te)jt.measure(1/0,1/0,0,0),Ot=jt.measuredBounds,x.ed(Ot),Xe.push(Ot);else{var It=jt.segmentIndex,_t=jt.segmentFraction,Vt=jt.alignmentFocus;Vt.Mc()&&(Vt=Dr);var Rn=jt.segmentOrientation,$n=jt.segmentOffset;if(isNaN(It)){var Vn=he.ua;Ot=zn(),Vn.Qu(_t,Ot);var Cn=lt.allocAt(Ot[0],Ot[1]);if(Cn.add(he.i(0)),Vn.type===bn.j?Cn.offset(-Vn.startX,-Vn.startY):(Vn=Vn.figures.first(),Vn!==null&&Cn.offset(-Vn.startX,-Vn.startY)),Vn=Ot[2],Rn!==Qa){var un=he.computeAngle(jt,Rn,Vn);jt.Kb=un}un=Cn.x-y.x;var kr=Cn.y-y.y;lt.free(Cn),Zn(Ot)}else if(It<-Te||It>=Te)Ot=lt.alloc(),he.vg(),he.computeMidPoint(Ot),Vn=he.midAngle,Rn!==Qa&&(un=he.computeAngle(jt,Rn,Vn),jt.Kb=un),un=Ot.x-y.x,kr=Ot.y-y.y,lt.free(Ot);else{if(un=0,0<=It?(kr=ye.M(It),Ot=It<Te-1?ye.M(It+1):kr):(un=Te+It,kr=ye.M(un),Ot=0<un?ye.M(un-1):kr),kr.Xa(Ot)){0<=It?(Vn=0<It?ye.M(It-1):kr,un=It<Te-2?ye.M(It+2):Ot):(Vn=un<Te-1?ye.M(un+1):kr,un=1<un?ye.M(un-2):Ot),Cn=Vn.Bf(kr);var br=Ot.Bf(un);Vn=Cn>br+10?0<=It?Vn.ab(kr):kr.ab(Vn):br>Cn+10?0<=It?Ot.ab(un):un.ab(Ot):0<=It?Vn.ab(un):un.ab(Vn)}else Vn=0<=It?kr.ab(Ot):Ot.ab(kr);Rn!==Qa&&(un=he.computeAngle(jt,Rn,Vn),jt.Kb=un),un=kr.x+(Ot.x-kr.x)*_t-y.x,kr=kr.y+(Ot.y-kr.y)*_t-y.y}jt.measure(1/0,1/0,0,0),Ot=jt.measuredBounds,Cn=jt.naturalBounds;var yi=0;jt instanceof Br&&(yi=jt.strokeWidth),br=Cn.width+yi;var Hi=Cn.height+yi;Je.reset(),Je.translate(-Ot.x,-Ot.y),Je.scale(jt.scale,jt.scale),Je.rotate(Rn===Qa?jt.angle:Vn,br/2,Hi/2),Rn!==rg&&Rn!==og||Je.rotate(90,br/2,Hi/2),Rn!==ig&&Rn!==ag||Je.rotate(-90,br/2,Hi/2),Rn===Qm&&(45<Vn&&135>Vn||225<Vn&&315>Vn)&&Je.rotate(-Vn,br/2,Hi/2),Cn=new Qt(0,0,br,Hi),it.xi(Cn,Vt),Je.Ga(it),Vt=-it.x+yi/2*jt.scale,jt=-it.y+yi/2*jt.scale,Tt.assign($n),yi=isNaN($n.x);var $o=isNaN($n.y);if(yi||$o){br=br/2+3,Hi=Hi/2+3;var ea=45<=Vn&&135>=Vn,Ra=225<=Vn&&315>=Vn;Rn===Qa&&(ea||Ra)?(Tt.x=$o?br:$n.y,Tt.y=yi?Hi:$n.x,ea?0<=It||isNaN(It)&&.5>_t||!yi||(Tt.y=-Hi):Ra&&((0<=It||isNaN(It)&&.5>_t)&&yi&&(Tt.y=-Hi),$o&&(Tt.x=-br))):(yi&&(Tt.x=0<=It||isNaN(It)&&.5>_t?br:-br),$o&&(Tt.y=-Hi),Tt.rotate(Vn))}else Tt.rotate(Vn);un+=Tt.x,kr+=Tt.y,Cn.set(Ot),Cn.h(un+Vt,kr+jt,Ot.width,Ot.height),Xe.push(Cn),x.ed(Cn)}}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),Pr.free(Je),lt.free(it),lt.free(Tt)}}}},Pm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof di||a instanceof En){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 En)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=zn();Xe.Qu(he,Je);var it=lt.allocAt(Je[0],Je[1]);it.add(Te.i(0)),Xe.type===bn.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),Zn(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 Ct=Xe.Bf(Je),jt=Tt.Bf(it);Xe=Ct>jt+10?0<=se?Xe.ab(Je):Je.ab(Xe):jt>Ct+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=Dr),Je=Pr.alloc(),Je.reset(),Je.scale(ne.scale,ne.scale),Je.rotate(ne.angle,0,0);var Ot=ne.naturalBounds;it=Qt.allocAt(0,0,Ot.width,Ot.height),Ct=lt.alloc(),Ct.xi(it,Ge),Je.Ga(Ct),Ge=-Ct.x,jt=-Ct.y;var It=Ot.width,_t=Ot.height;Ot=lt.alloc(),Ot.assign(ye);var Vt=isNaN(ye.x),Rn=isNaN(ye.y);if(Vt||Rn){It=It/2+3,_t=_t/2+3;var $n=45<=Xe&&135>=Xe,Vn=225<=Xe&&315>=Xe;pe===Qa&&($n||Vn)?(Ot.x=Rn?It:ye.y,Ot.y=Vt?_t:ye.x,$n?0<=se||isNaN(se)&&.5>he||!Vt||(Ot.y=-_t):Vn&&((0<=se||isNaN(se)&&.5>he)&&Vt&&(Ot.y=-_t),Rn&&(Ot.x=-It))):(Vt&&(Ot.x=0<=se||isNaN(se)&&.5>he?It:-It),Rn&&(Ot.y=-_t),Ot.rotate(Xe))}else Ot.rotate(Xe);Te+=Ot.x,Tt+=Ot.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(Ot),lt.free(Ct),Qt.free(it),Pr.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===xn.Link&&a.adornedObject instanceof Br&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof En&&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),Io(b,!1)}}function Kp(){this.xa="Base"}rn(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 Qt(-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,Ct=Xe.flattenedTotalLength,jt=it.length,Ot=0,It=0,_t=zn(),Vt=0;Vt<jt;Vt++){var Rn=it[Vt],$n=[];It=Ot=0;for(var Vn=Rn.length,Cn=0;Cn<Vn;Cn+=2){var un=Rn[Cn],kr=Rn[Cn+1];if(Cn!==0){var br=180*Math.atan2(kr-It,un-Ot)/Math.PI;0>br&&(br+=360),$n.push(br)}Ot=un,It=kr}_t.push($n)}if(a.graduatedIntervals===null){for(var yi=[],Hi=a.O.s,$o=Hi.length,ea=0;ea<$o;ea++){var Ra=Hi[ea],Jo=[];if(yi.push(Jo),Ra.visible){var Nh=Ra.interval;if(!(0>Nh)){for(var Lo=0;Lo<$o;Lo++)if(Lo!==ea){var Gl=Hi[Lo];if(Gl.visible&&Ra.constructor===Gl.constructor){var _a=Gl.interval;_a>Nh&&Jo.push(_a)}}}}}a.graduatedIntervals=yi}var Ah=a.graduatedIntervals,Ws=a.O.s,ml=Ws.length,Ls=0,ys=0,mc=Ct;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*Ct/a.graduatedRange&&Ns.graduatedSkip===null)){var Vf=Tt[0][0],ou=0,Ss=0;ys=Ct*Ns.graduatedStart-1e-4,mc=Ct*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 Br&&!Ns.graduatedSkip(As,Ns))&&(Ls=(As-a.graduatedMin)*Ct/a.graduatedRange,Ls>Ct&&(Ls=Ct),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)}Zn(_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 Br){var $u=a,Oh=E,rf=No.alignmentFocus;rf.Mc()&&(rf=wi);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=Qt.allocAt(0,0,np,of),ws=lt.alloc();ws.xi(Yf,rf),Qt.free(Yf);for(var Ju=-ws.x,Hl=-ws.y,rl=new Qt,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),ti(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=wi);for(var yl=No.segmentOrientation,op=No.segmentOffset,Pc=new Qt,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=En.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=Pr.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=Qt.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 Qt(Og,ap,Bh.width,Bh.height),Fg=new Qt(Bh.x,Bh.y,Bh.width,Bh.height),Hy=new Qt(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),Qt.free($f),Pr.free(Kl)}vl.graduatedBounds!==null&&vl.graduatedBounds.push(Pc),ti(H0,Pc.x,Pc.y,Pc.width,Pc.height)}Io(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 Br){if(!(2>a.graduatedTickUnit*Ge.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ge.graduatedSkip===null)){var it=Ge.measuredBounds,Tt=Ge.strokeWidth*Ge.scale,Ct=Ge.alignmentFocus;Ct.Mc()&&(Ct=wi);for(var jt=0;jt<Je;jt++){var Ot=Xe[jt].$l,It=Xe[jt].angle,_t=Ct,Vt=Ge.Ab;Vt.reset(),Vt.translate(Ot.x+se.x,Ot.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++)Ct=Xe[Tt],Ct.actualBounds&&Ct.measuredBounds&&Ct.naturalBounds&&(it.ec=Ct.text||"",it.Kb=Ct.Sz||0,it.Gc=Ct.lineCount||0,jt=Ct.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]),Ct.naturalBounds&&(it.dc=Ct.naturalBounds),Ct.actualBounds&&(jt=Ct.actualBounds,it.arrange(jt.x,jt.y,jt.width,jt.height)),jt=Ct.actualBounds,it.arrange(jt.x,jt.y,jt.width,jt.height),Ot=Ct.measuredBounds,Ct=Ct.naturalBounds,It=it.Ab,It.reset(),It.translate(jt.x+se.x,jt.y+se.y),It.translate(-Ot.x,-Ot.y),it.no(It,Ct.x,Ct.y,Ct.width,Ct.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 xn(a,y){if(zt.call(this),this.na=null,a===void 0)this.na=xn.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=xn.Position,y=a);this.na===null&&Nt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===xn.Grid?1048576:0),this.O=new mn,this.yb=ta,this.Tm=Zo,this.Uf=Lr,this.$g=null,this.$e="",this.jg=new Qt(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=tr,this.jn=Si,this.kn=In,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}rn(xn,zt),xn.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},xn.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},xn.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=xn.prototype,et.toString=function(){return"Panel("+this.type.name+")#"+si(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===xn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===xn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===xn.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===xn.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===xn.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===xn.Grid||this.na===xn.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===xn.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 Ct=Te[Tt];Ct.visible&&Ct!==Ge&&Ct.Sj(se,a,he,x,ye)&&(pe=!0,Ct=(se-ye.x)*(se-ye.x)+(a-ye.y)*(a-ye.y),Ct<b&&(b=Ct,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===xn.Auto||this.na===xn.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 xn||E instanceof Vi||te!==fn)&&E.v(!0)}}}},et.Uj=function(){if(!_s(this)){Io(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 yn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case or: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(eo(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)&&(kn(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 xn){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 xn&&s1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof xn){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 xn){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 xn){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 xn?x=Math.max(x,h1(E)):E instanceof Br&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}et.se=function(){return!(this.type===xn.TableRow||this.type===xn.TableColumn)};function xh(a){return a.type===xn.TableRow||a.type===xn.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:kn(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),eo(-(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===xn.Spot)?this.Pb():null,he&&(pe.se()?kn(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()?kn(se.set(a),Ge.transform):se.set(a),!he||Ge!==pe)){var Xe=null;if(Ge instanceof xn?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=eo(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:kn(lt.allocAt(a.x,a.y),this.transform);if(E=eo(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()?kn(pe.set(a),Te.transform):pe.set(a);var Ge=Te;Te=Te instanceof xn?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=Pr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&Pr.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 xn?ye:null,Ge=Pr.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)),Pr.free(Ge))}}return te===void 0&&Pr.free(ne),b}return te===void 0&&Pr.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 xn&&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:kn(lt.allocAt(a.x,a.y),this.transform),pe=se?y:kn(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||Bn(he.x,he.y,0,0,0,ne.height)<=ye||Bn(he.x,he.y,0,ne.height,ne.width,ne.height)<=ye||Bn(he.x,he.y,ne.width,ne.height,ne.width,0)<=ye||Bn(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,kn(he.set(a),it),kn(pe.set(y),it)):(he.set(a),pe.set(y)),it=Je,Je=Je instanceof xn?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 Br&&(y=a.spot1,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Qr),y}function Sv(a){var y=null;return a instanceof Br&&(y=a.spot2,y===Zo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=ji),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&&Nt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Nt("Cannot make a Panel contain itself: "+this.toString()),Nt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Nt("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!==xn.Grid||y instanceof Br||Nt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==xn.Graduated||y instanceof Br||y instanceof Vi||Nt("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 Jt),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 Nt("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 xn&&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),Io(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 xn?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&&Mn(a,">= 0",xn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ro;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&&Mn(a,">= 0",xn,"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 Ro?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&&Mn(a,">= 0",xn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ro;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&&Mn(a,">= 0",xn,"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 Ro?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 Ro(y)),this},et.By=function(a,y){return(a=this.Eb(a))&&km(a,new Ro(y)),this},et.nz=function(a){if(0>a||this.type!==xn.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!==xn.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!==xn.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!==xn.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&&Nt("Template cannot have .data be non-null: "+a),a.allBindings=y=new mn;else if(y._isFrozen)return;var x=new mn;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 mn),Xe.srcBindings.add(Ge))),y.add(Ge)}if(ye instanceof xn&&ye.type===xn.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 mn),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 xn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):jn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Ro?(ne=si(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof zt?(ne=si(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Nt("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 xn&&(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 xn))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 xn&&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 xn)||te.data!==y[ne])return!0;E++,ne++}return!1}function Vp(a){if(a.type===xn.Spot||a.type===xn.Auto)return Math.min(a.O.length,1);if(a.type===xn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Br&&b.isPanelMain))break}return x}return a.type===xn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof xn&&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 xn){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 Jt),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 xn){var E=y,te=x;b.type===xn.TableRow?b.row=E:b.type===xn.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;Nt("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,jn('No item template Panel found for category "'+y+'" on '+a),jn(" Using default item template."),a=new xn,y=new Vi,y.bind(new Mo("text","",Kr)),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 xn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof xn&&!te.isEnabled||Em(a,te,x)}}}function ru(a,y){y.name=a,Cl.add(a,y)}Yt.Object.defineProperties(xn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===xn.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&&Mn(a,">= 0",xn,"padding"),a=new Ar(a)):(0>a.left&&Mn(a.left,">= 0",xn,"padding:value.left"),0>a.right&&Mn(a.right,">= 0",xn,"padding:value.right"),0>a.top&&Mn(a.top,">= 0",xn,"padding:value.top"),0>a.bottom&&Mn(a.bottom,">= 0",xn,"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 Ar(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 Ti)&&(a instanceof Ti&&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)||Nt("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 Ti)&&(a instanceof Ti&&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)||Nt("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||Nt("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()||Nt("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),da(this)&&(a=this.part,a!==null&&qi(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),da(this)&&(a=this.part,a!==null&&qi(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)&&Nt("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)&&Nt("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 En?(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 Jt}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof hr||a.isPanelMain)&&Nt("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 Tr&&(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))}}}),Yt.Object.defineProperties(xn,{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")}}}),xn.prototype.rebuildItemElements=xn.prototype.mv,xn.prototype.findItemPanelForData=xn.prototype.sx,xn.prototype.updateTargetBindings=xn.prototype.La,xn.prototype.copyTemplate=xn.prototype.Uy,xn.prototype.graduatedValueForPoint=xn.prototype.Gz,xn.prototype.graduatedPointForValue=xn.prototype.Fz,xn.prototype.findColumnForLocalX=xn.prototype.fz,xn.prototype.findRowForLocalY=xn.prototype.nz,xn.prototype.addColumnDefinition=xn.prototype.By,xn.prototype.addRowDefinition=xn.prototype.Hy,xn.prototype.addRowColumnDefinition=xn.prototype.Gy,xn.prototype.removeColumnDefinition=xn.prototype.jA,xn.prototype.getColumnDefinition=xn.prototype.Eb,xn.prototype.removeRowDefinition=xn.prototype.oA,xn.prototype.getRowDefinition=xn.prototype.Fb,xn.prototype.removeAt=xn.prototype.mb,xn.prototype.remove=xn.prototype.remove,xn.prototype.insertAt=xn.prototype.Gb,xn.prototype.elt=xn.prototype.M,xn.prototype.add=xn.prototype.add,xn.prototype.findObject=xn.prototype.fb,xn.prototype.findInVisualTree=xn.prototype.Nl,xn.prototype.walkVisualTreeFrom=xn.prototype.qm,xn.prototype.findMainElement=xn.prototype.Pb;var g1=!1,m1=null,Cl=new Jt;xn.className="Panel",xn.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 Ro(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=Lr,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))}Ro.prototype.copy=function(){var a=new Ro;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=Dn(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=Dn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}et=Ro.prototype,et.qb=function(a){a.classType===Ro&&(this.sizing=a)},et.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+si(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===xn.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(ro,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)&&Nt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new mn),this.be.add(E),this},Yt.Object.defineProperties(Ro.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&&Mn(a,">= 0",Ro,"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&&Mn(a,">= 0",Ro,"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))&&Mn(a,">= 0",Ro,"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&&Mn(a,">= 0",Ro,"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 Ar(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 Ti&&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)||Nt("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 Ti&&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}}}),Ro.prototype.computeEffectiveSpacing=Ro.prototype.Wc,Ro.prototype.computeEffectiveSpacingTop=Ro.prototype.Io;var Cv=new dn(Ro,"Default",0),Zp=new dn(Ro,"None",1),Mm=new dn(Ro,"ProportionalExtra",2);Ro.className="RowColumnDefinition",Ro.Default=Cv,Ro.None=Zp,Ro.ProportionalExtra=Mm;function Br(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)}rn(Br,zt),Br.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=Dn(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=Br.prototype,et.th=function(){zt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},et.qb=function(a){a===fn||a===tr||a===qr||a===Lr?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)+")#"+si(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=zn(),Ct=2;Ct<E;Ct+=2)pe=x[Ct],ye=x[Ct+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 Br&&(Te-=b.strokeWidth),1>Te&&(Te=1),E=x=Te,pe=ne/2,ye=pe!==0,Ct=0,Je=Tt[Ct],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){Zn(Tt);return}E>Je?(jt=E-Je,E=Je):jt=0;var Ot=Math.sqrt(E*E/(1+Ge*Ge));if(0>Te&&(Ot=-Ot),se+=Ot,he+=Ge*Ot,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(Ct++,Ct===Tt.length){Zn(Tt);return}Je=Tt[Ct],Te=Je[0],Xe=Je[1],Ge=Je[2],Je=Je[3],E=jt}}Zn(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===xn.Link&&se instanceof di&&se.category==="Selection"&&se.adornedObject instanceof Br&&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===bn.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===bn.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===bn.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===bn.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 Do:a.moveTo(it.endX,it.endY);break;case _i: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 Ct=0;Ct<Tt;Ct++){var jt=Xe[Ct];Ct===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(Ct=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],Ct=Xe[7])}else Tt=Xe!==null?Xe.endX:pe.startX,Ct=Xe!==null?Xe.endY:pe.startY;if(Xe=Ds(it,pe,Tt,Ct),Tt=Xe.length,Tt===0){a.lineTo(it.endX,it.endY);break}for(Ct=0;Ct<Tt;Ct++)jt=Xe[Ct],a.bezierCurveTo(jt[2],jt[3],jt[4],jt[5],jt[6],jt[7]);break;default:Nt("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=zn(),te.type===bn.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===bn.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 Do: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 _i: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++)Ct=it[Tt],Gt.Qe(ne,E,Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7],.5,b),ne=Ct[6],E=Ct[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++)Ct=it[Tt],Gt.Qe(ne,E,Ct[2],Ct[3],Ct[4],Ct[5],Ct[6],Ct[7],.5,b),ne=Ct[6],E=Ct[7];break;default:Nt("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===bn.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===bn.F){if(E=new Fo,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)}Zn(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 Qn){a.Mc()&&Nt("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 Qt);var y=this.naturalBounds,x=this.oe;y=Qt.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),ti(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),ti(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),ti(a,b.x,b.y,0,0),Qt.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!==bn.j||y||(E+=2);var te=Qt.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return Qt.free(te),!1;if(b=E+1e-4,x.type===bn.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:(Qt.free(te),Gt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===bn.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 Qt.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),Qt.free(te),a}if(x.type===bn.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 Qt.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),Qt.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===bn.o)return Qt.free(te),this.fill===null?Fs(x,a.x,a.y,E):Qo(x,a,E,1<this.strokeWidth,y);Nt("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):Nt("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 yn:pe=Math.max(a-te,0),ye=Math.max(y-te,0);break;case or: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 yn:se=pe,he=ye;break;case tr:x=Math.min(pe/se,ye/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:Nt(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=Br.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===Lr?yn:y:y===Lr?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===bn.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=zn(),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 Zn(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);Zn(y)}else if(pe.type===bn.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===bn.F){y=Qt.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}Qt.free(y)}else if(pe.type===bn.o){Ge=lt.alloc();var Je=se-te,it=he-ne,Tt=Je*Je+it*it,Ct=te,jt=ne;if(0<Tt&&Xe.contains(Ct,jt)&&(Ge.x=Ct,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),Ct-=Je,jt-=it;Xe.contains(Ct,jt);)Ct-=Je,jt-=it;for(E.x=se,E.y=he,it=0;it<pe.figures.count;it++){var Ot=pe.figures.s[it],It=Ot.isFilled?Ct:te,_t=Ot.isFilled?jt:ne,Vt=Ot.segments;Xe=Ot.startX,Je=Ot.startY;for(var Rn=Xe,$n=Je,Vn=0;Vn<Vt.count;Vn++){var Cn=Vt.s[Vn],un=Cn.type,kr=Cn.endX,br=Cn.endY,yi=!1;switch(un){case Do:Rn=kr,$n=br;break;case _i:yi=Nm(Xe,Je,kr,br,It,_t,se,he,Ge);break;case Go:yi=Gt.Eo(Xe,Je,Cn.point1X,Cn.point1Y,Cn.point2X,Cn.point2Y,kr,br,It,_t,se,he,.6,Ge);break;case ps:yi=Gt.Eo(Xe,Je,Xe+2/3*(Cn.point1X-Xe),Je+2/3*(Cn.point1Y-Je),kr+2/3*(Cn.point1X-kr),br+2/3*(Cn.point1Y-br),kr,br,It,_t,se,he,.6,Ge);break;case xo:case Cs:un=Cn.type===xo?Ua(Cn,Ot):Ds(Cn,Ot,Xe,Je);var Hi=un.length;if(Hi===0){yi=Nm(Xe,Je,Cn.type===xo?Cn.centerX:Cn.endX,Cn.type===xo?Cn.centerY:Cn.endY,It,_t,se,he,Ge);break}for(br=null,kr=0;kr<Hi;kr++){if(br=un[kr],kr===0&&Nm(Xe,Je,br[0],br[1],It,_t,se,he,Ge)){var $o=Lm(It,_t,Ge,Tt,E);$o<Tt&&(Tt=$o,ye=!0)}Gt.Eo(br[0],br[1],br[2],br[3],br[4],br[5],br[6],br[7],It,_t,se,he,.6,Ge)&&($o=Lm(It,_t,Ge,Tt,E),$o<Tt&&(Tt=$o,ye=!0))}kr=br[6],br=br[7];break;default:Nt("Unknown Segment type: "+un)}Xe=kr,Je=br,yi&&(yi=Lm(It,_t,Ge,Tt,E),yi<Tt&&(Tt=yi,ye=!0)),Cn.isClosed&&(kr=Rn,br=$n,Nm(Xe,Je,kr,br,It,_t,se,he,Ge)&&(Cn=Lm(It,_t,Ge,Tt,E),Cn<Tt&&(Tt=Cn,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 Nt("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=Pr.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),Pr.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,Ct){for(var jt=Tt.length,Ot=0;Ot<jt;Ot+=2)if(Ct.zd(Tt[Ot],Tt[Ot+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,sr(a.x,a.y,se,he)<=E&&sr(a.x,a.y,pe,he)<=E&&sr(a.x,a.y,se,ne)<=E&&sr(a.x,a.y,pe,ne)<=E)return!0}if(se=y.startX,he=y.startY,pe=y.endX,ne=y.endY,y.type===bn.j){if(x=(se-pe)*(a.x-pe)+(he-ne)*(a.y-ne),Bn(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===bn.u)return y=!1,x&&(y=Bn(a.x,a.y,se,he,se,ne)<=E||Bn(a.x,a.y,se,he,pe,he)<=E||Bn(a.x,a.y,pe,he,pe,ne)<=E||Bn(a.x,a.y,se,ne,pe,ne)<=E),y;if(y.type===bn.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 Bn(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!(sr(y,te,-ye,0)>=E||sr(y,te,0,-Te)>=E||sr(y,te,0,Te)>=E||sr(y,te,ye,0)>=E)}else if(y.type===bn.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&&Bn(a.x,a.y,te,se,te,pe)>E&&Bn(a.x,a.y,te,se,he,se)>E&&Bn(a.x,a.y,he,pe,te,pe)>E&&Bn(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 Do:case _i:if(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E)return!1;break;case Go:var Ge=zn();if(Gt.Qe(ne,ye,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.8,Ge),ne=b(Ge,a),Zn(Ge),ne||(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E))return!1;break;case ps:if(Ge=zn(),Gt.ep(ne,ye,Te.point1X,Te.point1Y,Te.endX,Te.endY,.8,Ge),ne=b(Ge,a),Zn(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=zn(),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 Zn(Je),!1;Zn(Je),Te!==null&&(ne=Te[6],ye=Te[7]);break;default:Nt("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 Qn(1-aa.x,aa.y)))}Br.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&&Nt("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=bn.parse(Gt.um[b],!1),wu[b]=a,x!==b&&(wu[x]=b),b}}return typeof y=="string"?y:y instanceof bn?a:null}Yt.Object.defineProperties(Br.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),da(this)&&(a=this.part,a!==null&&qi(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=bn.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 Ti&&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 Ti&&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 Mn(a,"value >= 0",Br,"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"?Mn(a,'"butt", "round", or "square"',Br,"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"?Mn(a,'"miter", "bevel", or "round"',Br,"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)||Nt("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()])||Nt("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?Nt("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?Nt("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:Lr},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))}}}),Br.prototype.intersectsRect=Br.prototype.Yc,Br.prototype.containedInRect=Br.prototype.fh,Br.prototype.getNearestIntersectionPoint=Br.prototype.rs,Br.prototype.getDocumentBounds=Br.prototype.mi,Br.prototype.getDocumentPoint=Br.prototype.ga;var wu=new Jn,kv=new Jn;Br.className="Shape",Br.getFigureGenerators=function(){var a=new Jt,y;for(y in Gt.Ze)y!==y.toLowerCase()&&a.add(y,Gt.Ze[y]);return a.freeze(),a},Br.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a},Br.getArrowheadGeometries=function(){var a=new Jt;for(b in Gt.um)if(wu[b]===void 0){var y=bn.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 bn&&a.add(x,b)}return a.freeze(),a},Br.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=bn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Nt("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=Lr,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}rn(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 ai:a.translate(E,0),a.scale(-1,1);break;case Gr:a.translate(0,te),a.scale(1,-1);break;case Oi: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 ai:a.scale(-1,1),a.translate(-E,0);break;case Gr:a.scale(1,-1),a.translate(0,-te);break;case Oi: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}Yt.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 Ti&&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&&Mn(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 dn(Vi,"None",0),P1=new dn(Vi,"WrapFit",1),Nv=new dn(Vi,"WrapDesiredSize",2),b1=new dn(Vi,"WrapBreakAll",3),Av=new dn(Vi,"OverflowClip",0),Om=new dn(Vi,"OverflowEllipsis",1),$p=new dn(Vi,"FormatTrim",0),C1=new dn(Vi,"FormatNone",0),xx=/[ \u200b\u00ad]/,jv=new Jn,E1=0,Fm=new Jn,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 Jn,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=yn,this.Zg=this.Hd=null,this.Mk=Dr,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;rn(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===tr||a===qr?this.imageStretch=a:zt.prototype.qb.call(this,a)},us.prototype.toString=function(){return"Picture("+this.source+")#"+si(this)};function Od(a){a===void 0&&(a=""),a!==""?jd[a]&&(delete jd[a],Bm--):(jd=new Jn,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()||(Io(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=zn();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);Zn(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 yn:Te=b.width,Ge=b.height;break;case tr:case qr:Xe===tr?(Xe=Math.min(b.height/Ge,b.width/Te),Te*=Xe,Ge*=Xe):Xe===qr&&(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,Ct=x.__goCache;Xe=null;var jt=wx;if(!E){if(x.sq&&Ct!==void 0&&4<it&&Tt>jt*jt)for(Ct.gi===null&&(L1(Ct,4,pe,ye,x),L1(Ct,16,pe,ye,x)),E=Ct.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(Ot){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Ot){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 ai: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 Oi:a.translate(Math.min(b.width,Te),Math.min(b.height,Ge)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Ct!==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(Ot){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(Ot){this.en=!1}switch(this.flip){case ai: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 Oi: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===yn||te===or?(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===yn||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)},Yt.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||Nt("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 vn),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()||(Io(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=bi("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 Jn,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 bn,this.mc=null}Fd.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new bn,this.mc=null};function Dd(a,y,x,b,E,te){a.mc=new Fo,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(Do);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(_i);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 bn(bn.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 bn(bn.u),b.endX=y,b.endY=x,b.defaultStretch=tr,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 bn().add(new Fo(a,0,!0).add(new fi(_i,y-a,0)).add(new fi(Go,y,a,y-te,0,y,te)).add(new fi(_i,y,x-a)).add(new fi(Go,y-a,x,y,x-te,y-te,x)).add(new fi(_i,a,x)).add(new fi(Go,0,x-a,te,x,0,x-te)).add(new fi(_i,0,a)).add(new fi(Go,a,0,0,te,te,0).close())),1<te&&(E.spot1=new Qn(0,0,te,te),E.spot2=new Qn(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 bn(bn.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 bn(bn.F),b.endX=y,b.endY=x,b.spot1=Xl,b.spot2=Ga,b.defaultStretch=tr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("TriangleRight",function(a,y,x){return new bn().add(new Fo(0,0).add(new fi(_i,y,.5*x)).add(new fi(_i,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new bn().add(new Fo(0,0).add(new fi(_i,y,0)).add(new fi(_i,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new bn().add(new Fo(y,x).add(new fi(_i,0,.5*x)).add(new fi(_i,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new bn().add(new Fo(y,x).add(new fi(_i,0,x)).add(new fi(_i,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new bn().add(new Fo(.5*y,0).add(new fi(_i,0,.5*x)).add(new fi(_i,.5*y,x)).add(new fi(_i,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("LineH",function(a,y,x){return a=new bn(bn.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 bn(bn.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 bn().add(new Fo(0,x/2,!1).add(new fi(_i,y,x/2)).add(new fi(Do,y/2,0)).add(new fi(_i,y/2,x)))}),Na("XLine",function(a,y,x){return new bn().add(new Fo(0,x,!1).add(new fi(_i,y,0)).add(new fi(Do,0,0)).add(new fi(_i,y,x)))}),Na("LineRight",function(a,y,x){return new bn().add(new Fo(.25*y,0,!1).add(new fi(_i,.75*y,.5*x)).add(new fi(_i,.25*y,x)))}),Na("LineDown",function(a,y,x){return new bn().add(new Fo(0,.25*x,!1).add(new fi(_i,.5*y,.75*x)).add(new fi(_i,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new bn().add(new Fo(.75*y,0,!1).add(new fi(_i,.25*y,.5*x)).add(new fi(_i,.75*y,x)))}),Na("LineUp",function(a,y,x){return new bn().add(new Fo(0,.75*x,!1).add(new fi(_i,.5*y,.25*x)).add(new fi(_i,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=mi,this.ir=null,this.jr="",this.lr=Zo,this.Gq="",this.Hq=Qr,this.Pq=pn,this.Kq=Un,this.Up=null,this.Cq=127,this.zr=Xn,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"?xn.call(this,a):(xn.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 Qt,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}rn(hr,xn),hr.prototype.cloneProtected=function(a){xn.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){xn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},et.toString=function(){var a=rr(this.constructor)+"#"+si(this);return this.data!==null&&(a+="("+Kr(this.data)+")"),a};function hs(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}et.th=function(){xn.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 xn?Zc(E,function(he){ly(se.partManager,he),_c(se,he)}):qh(se,E):a===Eo&&y==="elements"&&(E instanceof xn?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(xn.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 xn&&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 Jt),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=zn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Zn(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 Tr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof di))break e;dl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=xn.Link),x.adornedObject=y)}if(x!==null){x.type===xn.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=Qt.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Qt.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 Pr);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=Dr;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 Jt),y.I(a)!==null)return y.I(a);var x=xn.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()?Dr: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 Qt),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 Br?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=Qt.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),Qt.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=Qt.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),Qt.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||oi(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)?(Bi(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,jn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),jn(" Old class: "+rr(a.constructor)+", new class: "+rr(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(){xn.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 Tr?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 Tr&&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 Tr&&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 Tr)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 En)for(y=y.labelNodes;y.next();)oc(a,y.value,x,b,E,te)}}Yt.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?Wr: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!==xn.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:pn},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:Un},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:Qr},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 En||(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 En?(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:mi},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&&Nt("Cannot make a Group a member of itself: "+this.toString()),Nt("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 Tr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Kv(a,this):this instanceof Tr&&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 Tr){for(x=new vn,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 Nt("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:Xn},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)}rn(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 En&&y instanceof Br){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 Br&&(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 xn){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 xn&&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(){},Yt.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=jo,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 mn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}rn(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 vn),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===Bo){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 vn,y=new vn;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 ii(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 ii(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 ii(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 vn,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 vn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):Wr},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 vn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):Wr},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 vn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):Wr},et.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ii(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 ii(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 Jt: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=zn()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Zn(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 vn;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 ii(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 mn,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 mn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new $r(x):Wr},et.wz=function(a){a===void 0&&(a=1/0);var y=new vn;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 vn;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 vn;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}Yt.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:jo},set:function(a){typeof a=="number"&&(a=new Ar(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 dn(Gn,"SpreadingNone",10),Wm=new dn(Gn,"SpreadingEvenly",11),Hv=new dn(Gn,"SpreadingPacked",12);Gn.className="Node",Gn.SpreadingNone=Ex,Gn.SpreadingEvenly=Wm,Gn.SpreadingPacked=Hv;function Tr(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 vn,this.$a=null,this.Sc=new lo,this.Sc.group=this,this.gl=new vn,this.tb=this.$p=null,y&&Object.assign(this,y)}rn(Tr,Gn),Tr.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=Tr.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 En)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&&Nt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof xn){var se=E.Nl(function(he){return he instanceof Ja});se instanceof Ja&&(this.$a===null?this.$a=se:this.$a!==se&&Nt("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 xn&&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!==xn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof xn&&(a=a.Pb()),this.tb===null&&(this.tb=new Qt),a.mi(this.tb),a instanceof Br&&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 En||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 En&&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 Tr&&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 En&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof Tr&&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 En&&!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)},Tr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=nn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Tr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=nn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Tr.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=Tr.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 vn,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 vn,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 vn;return a(this,y),y},et.Rj=function(){var a=new vn;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)},Tr.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 Tr&&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 En)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}Tr.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 Tr&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof Gn)te.Bd(y),x.Cj(te,b);else if(te instanceof En)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}Tr.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 vn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof En&&(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 En&&(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)}},Yt.Object.defineProperties(Tr.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&&Nt("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)}}}),Tr.prototype.expandSubGraph=Tr.prototype.expandSubGraph,Tr.prototype.collapseSubGraph=Tr.prototype.collapseSubGraph,Tr.prototype.findSubGraphParts=Tr.prototype.Rj,Tr.prototype.findContainingGroupChain=Tr.prototype.hz,Tr.prototype.findExternalNodesConnected=Tr.prototype.iz,Tr.prototype.findExternalLinksConnected=Tr.prototype.Lu,Tr.prototype.ensureBounds=Tr.prototype.Va,Tr.className="Group";function Ja(a){zt.call(this),this.yb=ta,this.ko=new Qt(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}rn(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 eo(0,0,y.width,y.height,a.x,a.y)},Ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Tr||a instanceof di)||Nt("Placeholder is not inside a Group or Adornment."),a instanceof Tr){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 Br&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,pe=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==xn.Link&&(se=te.ga(a.category==="Selection"?Qr:a.locationSpot,lt.alloc()),a.location=se,lt.free(se)),isNaN(pe)||isNaN(ne)?(a=te.ga(Qr,lt.alloc()),pe=Qt.allocAt(a.x,a.y,0,0),pe.Ye(te.ga(ji,a)),pe.Ye(te.ga(ki,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),Qt.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 Tr&&!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=Qt.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof Tr&&!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)),Qt.free(x),b&&y instanceof Tr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Tr))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 En&&(!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},Yt.Object.defineProperties(Ja.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ar(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ja.className="Placeholder";function En(a){hr.call(this,xn.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 mn().freeze(),this.Tg=this.Mg=null,this.ml=new Qt,this.ua=new bn,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)}rn(En,hr),En.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=En.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===En?(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&&Nt("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},En.prototype.computeAngle=function(a,y,x){return En.computeAngle(y,x)},En.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=En.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 vn),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))},En.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},En.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)},En.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},En.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},En.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Wn),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),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},En.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=En.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 mn,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()}}},En.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(If||(If=new Gn,If.desiredSize=lr,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=lr,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 Ct=Xe,jt=Je;Gt.B(he,0)?jt=0<se?jt-pe:jt+pe:(Ct=(0>he?-1:1)*Te+Xe,jt=ye*(Ct-Xe)+Je),this.Fj(),this.ne(te),this.yf(it,Tt),this.yf(Ct,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=Qt.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))),Qt.free(se))}else{Te=this.isAvoiding,Ge&&(ye&&Te||pe)&&this.Fj();var Ot=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>Ot&&(Xe-=180)),0>Xe?Xe+=360:360<=Xe&&(Xe-=360),pe&&(Tt+=Math.abs(Ot)*(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(Dr,lt.alloc()),Ct=lt.allocAt(Tt.x+1e3*Je,Tt.y+1e3*it),this.getLinkPointFromPoint(a,y,Tt,Ct,!0,Te),lt.free(Tt),lt.free(Ct))),Tt=this.getLinkPoint(b,E,x,!1,ye,a,y);var It=jt=Ct=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>Ot&&(It+=180)),0>It?It+=360:360<=It&&(It-=360),pe&&(_t+=Math.abs(Ot)*(ye?1:2)),It===0?Ct=_t:It===90?jt=_t:It===180?Ct=-_t:It===270?jt=-_t:(Ct=_t*Math.cos(It*Math.PI/180),jt=_t*Math.sin(It*Math.PI/180)),x.Mc()&&pe&&(x=E.ga(Dr,lt.alloc()),ne=lt.allocAt(x.x+1e3*Ct,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+Ct,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}En.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)}En.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 Qt(y.ga(Qr,he),y.ga(ji,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},En.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(Dr,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(Dr,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},En.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)},En.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Dr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Zo?Or:y)):(a=y||this.toPort,a===null?a=Dr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Zo?Or:y)),a};function Id(a){return a===Or||a.x===.5&&a.y===.5}function Vm(a){return a.x===.5&&a.y===.5?a:Dr}En.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(Dr))},En.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},En.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=Pr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&Pr.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=Pr.alloc(),Te.set(ne),ye instanceof xn)se=ye.Cf(a,y,x,b,E,Te);else if(this.path===ye){if(ye instanceof Br)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(),Ct=lt.alloc(),jt=lt.alloc(),Ot=Pr.alloc();Ot.set(Je),Ot.bv(ye.transform),Ot.Vj(),Ct.x=Ge,Ct.y=it,Ct.transform(Ot),Tt.x=se,Tt.y=it,Tt.transform(Ot),Je=!1,Yc(ye,Tt,Ct,jt)?Je=!0:(Tt.x=Ge,Tt.y=Xe,Tt.transform(Ot),Yc(ye,Tt,Ct,jt)?Je=!0:(Ct.x=se,Ct.y=Xe,Ct.transform(Ot),Yc(ye,Tt,Ct,jt)?Je=!0:(Tt.x=se,Tt.y=it,Tt.transform(Ot),Yc(ye,Tt,Ct,jt)&&(Je=!0)))),Pr.free(Ot),lt.free(Tt),lt.free(Ct),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)),Pr.free(Te)}}}return te===void 0&&Pr.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&Pr.free(ne),!1},En.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},En.prototype.computeCorner=function(){if(this.curve===Gs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},En.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},En.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(Dr).ab(x.ga(Dr))/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},En.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Qa&&x.bb()}},En.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=zn(),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),Zn(x)}}return a},En.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},En.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},En.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,Ct=.5;pe!==0&&(Ct=((E-it)*(E-ne)+(te-Tt)*(te-Te))/pe);var jt=E+Ct*(ne-E),Ot=te+Ct*(Te-te);y=Math.sqrt((it-jt)*(it-jt)+(Tt-Ot)*(Tt-Ot)),Tt<Je*(it-jt)+Ot&&(y=-y),0<Je&&(y=-y),it=se+Ct*(he-se),Ct=ye+Ct*(Ge-ye),Je!==0?(y=it+y/Xe,this.L(a,y,Ct-(y-it)/Je)):this.L(a,it,Ct+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}},En.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)}},En.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)}En.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Bn(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=Bn(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},En.prototype.qc=function(){this.lk=!1,this.v()},En.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 Br&&(E.ua=this.ua)}}},En.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=bn.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 Ct=Xe.x;Xe=Xe.y;var jt=Je.x;Je=Je.y;var Ot=it*Zm(Tt,Ge,Ct,Xe);it*=Zm(Ct,Xe,jt,Je),Gt.$(Ge,Xe)&&Gt.$(Ct,jt)&&(Ct>Tt?Je>Xe?(te.x=Ct-Ot,te.y=Xe-Ot,E.x=Ct+it,E.y=Xe+it):(te.x=Ct-Ot,te.y=Xe+Ot,E.x=Ct+it,E.y=Xe-it):Je>Xe?(te.x=Ct+Ot,te.y=Xe-Ot,E.x=Ct-it,E.y=Xe+it):(te.x=Ct+Ot,te.y=Xe+Ot,E.x=Ct-it,E.y=Xe-it)),Gt.$(Tt,Ct)&&Gt.$(Xe,Je)&&(Xe>Ge?(jt>Ct?(te.x=Ct-Ot,te.y=Xe-Ot,E.x=Ct+it):(te.x=Ct+Ot,te.y=Xe-Ot,E.x=Ct-it),E.y=Xe+it):(jt>Ct?(te.x=Ct-Ot,te.y=Xe+Ot,E.x=Ct+it):(te.x=Ct+Ot,te.y=Xe+Ot,E.x=Ct-it),E.y=Xe-it)),(Gt.$(Tt,Ct)&&Gt.$(Ct,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,In)),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,In)),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,In)),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,Ct=this.i(pe),it=x,Gt.B(te.y,Ge.y)&&Gt.B(Ge.x,Ct.x))if(Je=Math.min(ne,Math.abs(Ge.x-E.x)/2),Je=Ot=Math.min(Je,Math.abs(Ct.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,Ct.y>Ge.y?jt=Ge.y+Ot:jt=Ge.y-Ot,Ct=lt.allocAt(It,_t),Bf(this,se,Te,Tt,te,Ct,it),lt.free(Ct),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,Ct.y)?(Je=Math.min(ne,Math.abs(Ge.y-E.y)/2),Je=Ot=Math.min(Je,Math.abs(Ct.x-Ge.x)/2),Gt.B(Ot,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,Ct.x>Ge.x?Xe=Ge.x+Ot:Xe=Ge.x-Ot,Ct=lt.allocAt(It,_t),Bf(this,se,Te,Tt,te,Ct,it),lt.free(Ct),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=bn.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}En.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 En){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()))}En.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 En&&(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 En&&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())}}En.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},En.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},En.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)},En.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&&(er(y.links,a),y.Sl()))}En.prototype.ph=function(){return!0},Yt.Object.defineProperties(En.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&&Mn(a,">= 0",En,"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&&Mn(a,">= 0",En,"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?Wr: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 Br?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 mn,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 mn,b=0;b<a.length;b++)E=a[b],x.add(new lt(E.x,E.y).freeze())}}else if(a instanceof mn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Nt("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)}}}),En.prototype.invalidateOtherJumpOvers=En.prototype.Xo,En.prototype.findClosestSegment=En.prototype.ez,En.prototype.updateRoute=En.prototype.vg,En.prototype.invalidateRoute=En.prototype.bb,En.prototype.rollbackRoute=En.prototype.rv,En.prototype.commitRoute=En.prototype.zf,En.prototype.startRoute=En.prototype.uh,En.prototype.clearPoints=En.prototype.Fj,En.prototype.removePoint=En.prototype.pv,En.prototype.addPointAt=En.prototype.yf,En.prototype.addPoint=En.prototype.ne,En.prototype.insertPointAt=En.prototype.m,En.prototype.insertPoint=En.prototype.Kz,En.prototype.setPointAt=En.prototype.L,En.prototype.setPoint=En.prototype.dd,En.prototype.getPoint=En.prototype.i,En.prototype.getOtherPort=En.prototype.Cz,En.prototype.getOtherNode=En.prototype.To;var If=null,Rf=null,Jv=new dn(En,"Normal",1),Mx=new dn(En,"Orthogonal",2),Lx=new dn(En,"AvoidsNodes",6),nS=new dn(En,"AvoidsNodesStraight",7),Qa=new dn(En,"None",0),Gs=new dn(En,"Bezier",9),Eh=new dn(En,"JumpGap",10),Rd=new dn(En,"JumpOver",11),tg=new dn(En,"End",17),Ym=new dn(En,"Scale",18),$m=new dn(En,"Stretch",19),ng=new dn(En,"OrientAlong",21),rg=new dn(En,"OrientPlus90",22),ig=new dn(En,"OrientMinus90",23),Qv=new dn(En,"OrientOpposite",24),Jm=new dn(En,"OrientUpright",25),og=new dn(En,"OrientPlus90Upright",26),ag=new dn(En,"OrientMinus90Upright",27),Qm=new dn(En,"OrientUpright45",28),rS=16,iS=14,sg=8;En.className="Link",En.Normal=Jv,En.Orthogonal=Mx,En.AvoidsNodes=Lx,En.AvoidsNodesStraight=nS,En.None=Qa,En.Bezier=Gs,En.JumpGap=Eh,En.JumpOver=Rd,En.End=tg,En.Scale=Ym,En.Stretch=$m,En.OrientAlong=ng,En.OrientPlus90=rg,En.OrientMinus90=ig,En.OrientOpposite=Qv,En.OrientUpright=Jm,En.OrientPlus90Upright=og,En.OrientMinus90Upright=ag,En.OrientUpright45=Qm,En.EndSegmentStep=8,En.CurvinessStart=rS,En.SpacingMin=iS,En.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=zn(),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);Zn(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++}}}Yt.Object.defineProperties(lg.prototype,{bounds:{get:function(){return new Qt(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 Tr?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(Qr,lt.alloc()),he=a.port.ga(ji,lt.alloc());for(E=Qt.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(Qr,se),Te.ga(ki,he),Te.ga(ji,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 Ct=Je=0,jt=1,Ot=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;Ct=pe;break;case 2:_t=pe,Ct=se;break;case 1:_t=se,Ct=he;break;default:case 4:_t=he,Ct=ne}switch(it=Ct.x-_t.x,Ot=Ct.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(Ot)?(jt=Math.abs(Ot)/Xe,Xe=Math.abs(Ot)):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(Ot)?(jt=Math.abs(Ot)/ye,ye=Math.abs(Ot)):jt=1}Ct=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-Ct-It/2;break;case 2:Vt.y=_t.y+Ot/2+Xe/2-Ct-It/2;break;case 1:Vt.x=_t.x+it/2-Te/2+Ct+It/2;break;default:case 4:Vt.y=_t.y+Ot/2-ye/2+Ct+It/2}Ct+=It}else{var Rn=.5;b===Wm&&(Rn=(It.Uo+1)/(It.Gl+1)),Vt.x=_t.x+it*Rn,Vt.y=_t.y+Ot*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,Qt.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,Or,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 lo(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)}lo.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},lo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},lo.prototype.qb=function(){},lo.prototype.toString=function(){var a=rr(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},lo.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())}}},lo.prototype.createNetwork=function(){return new Zi(this)},lo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Zt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Tr?y.lg(a.memberParts):y.lg(a.iterator),y},lo.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")}},lo.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()}},lo.prototype.doLayout=function(a){var y=new vn;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 Tr?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},lo.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 Tr&&(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++}},lo.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 En)&&(ug(se),this.rh(se))){var he=se.measuredBounds,pe=he.width;he=he.height,se.moveTo(x,b),se instanceof Tr&&(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++}}},lo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Tr&&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 Tr&&he.layout===null?ac(a,y,he.memberParts,!1,E,te,ne,se):(ug(he),y.add(he))):ne&&he instanceof En?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()}lo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Qt),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},lo.prototype.ex=function(a){var y=new vn;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 Tr?ac(this,y,a.memberParts,!1,null,!0,!0,!0):ac(this,y,a.iterator,!1,null,!0,!0,!0),y},lo.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(Qr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Yt.Object.defineProperties(lo.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())}}}),lo.prototype.collectParts=lo.prototype.ex,lo.prototype.getLayoutBounds=lo.prototype.ni,lo.prototype.invalidateLayout=lo.prototype.C,lo.className="Layout";function Zi(a){xr(this),this.Sc=a,this.wf=new vn,this.ye=new vn,this.Es=new Jt,this.zs=new Jt}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 vn,this.ye=new vn,this.Es=new Jt,this.zs=new Jt},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 En){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 Tr&&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 En&&(!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=zn(),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]);Zn(a)},Zi.prototype.deleteArtificialVertexes=function(){for(var a=zn(),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=zn(),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]);Zn(a),Zn(y)};function Ax(a){for(var y=zn(),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]);Zn(y)}Zi.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new mn;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 vn,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},Yt.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 Qt(0,0,10,10).freeze(),this.o=new lt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new mn,this.mg=new mn}Ho.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new mn,this.mg=new mn},Ho.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+si(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 Tr)){x=Qt.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Dr);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Qt.free(x);return}Qt.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}Yt.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=Qt.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),Qt.free(x),!(a instanceof Tr)&&(a=a.locationObject.ga(Dr),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 vn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new vn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new vn,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 mn,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#"+si(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},Yt.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){lo.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)}rn(ha,lo),ha.prototype.cloneProtected=function(a){lo.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:Nt("Unknown enum value: "+a):lo.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 Tr)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=Qt.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,Ct=0,jt=0;jt<E.length;jt++){var Ot=E[jt],It=this.ni(Ot,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 Qt(0,it,ne+se,Ct)),Tt=0,Je=Xe,it+=Ct,Ct=0),Ct=Math.max(Ct,Vt),Ge){case Il:It=-It.width;break;default:It=0}switch(Ot.moveTo(Je+It,it),Ge){case Il:Je-=_t;break;default:Je+=_t}Tt++}b.push(new Qt(0,it,ne+se,Ct)),Qt.free(pe);break;case hg:for(he=ne,ye=te,Te=y,Ge=x,ne=Qt.alloc(),Xe=Math.max(this.cellSize.width,1),te=it=pe=0,se=lt.alloc(),Je=0;Je<E.length;Je++)Ct=E[Je],Tt=this.ni(Ct,ne),Ct=Ph(Ct,Ct.locationObject,Ct.locationSpot,se),pe=Math.max(pe,Ct.x),it=Math.max(it,Tt.width-Ct.x),te=Math.max(te,Ct.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 $n=Ct=this.arrangementOrigin.x;for(jt=this.arrangementOrigin.y,it=0,he>=pe&&(he-=pe),pe=Ot=0,_t=Math.max(this.cellSize.height,1),It=te=0,Vt=!0,Tt=lt.alloc(),Rn=0;Rn<E.length;Rn++){var Vn=E[Rn],Cn=this.ni(Vn,ne),un=Ph(Vn,Vn.locationObject,Vn.locationSpot,se);if(0<it)switch(Je){case Il:$n=($n-Ct-(Cn.width-un.x))/Xe,$n=Gt.$(Math.round($n),$n)?Math.round($n):Math.floor($n),$n=$n*Xe+Ct;break;default:$n=($n-Ct+un.x)/Xe,$n=Gt.$(Math.round($n),$n)?Math.round($n):Math.ceil($n),$n=$n*Xe+Ct}else switch(Je){case Il:Ot=$n+un.x+Cn.width;break;default:Ot=$n-un.x}switch(Je){case Il:var kr=-($n+un.x)+Ot;break;default:kr=$n+Cn.width-un.x-Ot}if(0<ye&&it>ye-1||0<he&&0<it&&kr>he){for(b.push(new Qt(0,Vt?jt-te:jt,he+Te,It+te+Ge)),$n=0;$n<it&&Rn!==it;$n++){kr=E[Rn-it+$n];var br=Ph(kr,kr.locationObject,kr.locationSpot,Tt);kr.moveTo(kr.position.x,kr.position.y+te-br.y)}It+=Ge,jt=Vt?jt+It:jt+(It+te),it=It=te=0,$n=Ct,Vt=!1}switch($n===Ct&&(pe=Je===Il?Math.max(pe,Cn.width-un.x):Math.min(pe,-un.x)),te=Math.max(te,un.y),It=Math.max(It,Cn.height-un.y),isFinite(_t)&&(It=Math.max(It,Math.max(Cn.height,_t)-un.y)),Vt?Vn.moveTo($n-un.x,jt-un.y):Vn.moveTo($n-un.x,jt),Je){case Il:$n-=un.x+Te;break;default:$n+=Cn.width-un.x+Te}it++}if(b.push(new Qt(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);Qt.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}Yt.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 dn(ha,"Position",0),hg=new dn(ha,"Location",1),r0=new dn(ha,"LeftToRight",2),Il=new dn(ha,"RightToLeft",3),ay=new dn(ha,"Forward",4),i0=new dn(ha,"Reverse",5),cg=new dn(ha,"Ascending",6),o0=new dn(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 Ni(){this.On=new vn,this.Dn=new vn,this.Pa=new vn,this.cf=new Jt,this.bf=new Jt,this.aj=new Jt,this.H=null,this.tp=!1}et=Ni.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 Tr){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 En?this.Dn.add(a):a instanceof di||this.Pa.add(a);y=a.data,y===null||a instanceof di||(a instanceof En?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 Tr){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 En?this.Dn.remove(a):a instanceof di||this.Pa.remove(a);y=a.data,y===null||a instanceof di||(a instanceof En?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 Tr)&&Nt('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 Tr||Nt('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 En||Nt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=zn(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=zn(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=zn(),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]);Zn(y),Zn(x),Zn(a)}},Ni.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Ni.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)}}Ni.prototype.insertLink=function(){return null},Ni.prototype.resolveReferencesForData=function(){},Ni.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,jn('No Group template found for category "'+x+'"'),jn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,jn('No Node template found for category "'+x+'"'),jn(" Using default node template")),y=a.ny))),y}Ni.prototype.getLinkCategoryForData=function(){return""},Ni.prototype.setLinkCategoryForData=function(){},Ni.prototype.setFromNodeForLink=function(){},Ni.prototype.setToNodeForLink=function(){},Ni.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,jn('No Link template found for category "'+a+'"'),jn(" Using default link template")),x=y.my)),x},Ni.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Ni.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Ni.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ep(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Ni.prototype.unresolveReferencesForPart=function(){},Ni.prototype.removeDataForLink=function(){},Ni.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Ni.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)},Ni.prototype.findLinkForKey=function(){return null},et=Ni.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 vn;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 vn;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(Fn(te)){if(!Fn(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}Ni.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===ro){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===ro){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}}}}},Ni.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)},Ni.prototype.rp=function(){for(var a=this.H.model,y=new vn,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()},Ni.prototype.refreshDataBoundLinks=function(){},Ni.prototype.updateRelationshipsFromData=function(){},Ni.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=zn()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Zn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Fn(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(Fn(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}}}}Ni.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Jt;if(Fn(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 vn;for(var te=new Jt,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof En)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 Jt;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 Tr&&te instanceof Tr)for(y=y.memberParts;y.next();)ne=a0(a,y.value,x,b,E),ne instanceof En||ne===null||(ne.containingGroup=te)}else if(y instanceof En&&te instanceof En)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}Ni.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof En||(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 En||(E=y.copyNodeData(b)),en(E)&&(x.data=E)));return x},Yt.Object.defineProperties(Ni.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}}}),Ni.prototype.updateAllRelationshipsFromData=Ni.prototype.rp,Ni.prototype.findLinksByExample=Ni.prototype.ls,Ni.prototype.findNodesByExample=Ni.prototype.ms,Ni.prototype.findLinkForData=Ni.prototype.Kc,Ni.prototype.findNodeForData=Ni.prototype.ii,Ni.prototype.findPartForData=Ni.prototype.Lc,Ni.prototype.findNodeForKey=Ni.prototype.Vb,Ni.prototype.removeModeledPart=Ni.prototype.ip,Ni.prototype.removeModeledParts=Ni.prototype.Gs,Ni.prototype.rebuildParts=Ni.prototype.Wd;var pS=!1,gS=!1,mS=!1;Ni.className="PartManager";function qo(a){Ni.apply(this,arguments)}rn(qo,Ni),qo.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},qo.prototype.addModeledParts=function(a){for(Ni.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=Ni.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(Ni.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===ro){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 Tr?Xe.containingGroup=it:Xe.containingGroup=null}else Xe.containingGroup=null}}else if(E==="linkLabelKeys"){var Tt=this.Kc(a.object);if(Tt!==null){var Ct=a.oldValue,jt=a.newValue;Array.isArray(Ct)&&Ct.forEach(function(un){0<=jt.indexOf(un)||(un=y.Vb(un),un!==null&&(un.labeledLink=null))}),Array.isArray(jt)&&jt.forEach(function(un){un=y.Vb(un),un!==null&&(un.labeledLink=Tt)})}}else if(E==="linkCategory"){var Ot=this.Kc(a.object),It=a.newValue;Ot!==null&&typeof It=="string"&&(Ot.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 $n=a.oldValue;if(E==="linkDataArray"&&typeof $n=="object"&&$n!==null)this.ip($n);else if(E==="linkLabelKeys"&&lc($n)){var Vn=this.Vb($n);Vn!==null&&(Vn.labeledLink=null)}x.isModified=!0}}else if(b===ro){var Cn=a.propertyName;a.object!==x.model||Cn!=="linkFromKeyProperty"&&Cn!=="linkToKeyProperty"&&Cn!=="linkFromPortIdProperty"&&Cn!=="linkToPortIdProperty"&&Cn!=="linkLabelKeysProperty"&&Cn!=="nodeIsGroupProperty"&&Cn!=="nodeGroupKeyProperty"&&Cn!=="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 vn,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 En){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 vn().addAll(y);var ne=new vn;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 Tr)&&(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 Tr&&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 Tr&&(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 Tr)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=Ni.prototype.copyPartData.call(this,a,y);if(a instanceof En)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 En){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(){Ni.apply(this,arguments),this.Sg=null}rn(el,Ni);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(Ni.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===ro){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===ro){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){Ni.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 vn,this.il=new vn,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 Jt,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 Jt,this.Lt=new mn,this.Wg=!1,this.o=null,this.undoManager=new ho,a!==void 0&&(Fn(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)+":"+Kr(E)}}return y},ir.prototype.xA=function(a){a.change!==Ea&&Nt("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 vn,te=new vn,ne=new vn,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!==ro||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=Ii++,b.set(Te,Ge),E.set(Te,y))}if(!en(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new Jt),se){var he=b.get(y);if(he)return he}else for(E||(E=new Jt),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 Qt||y instanceof Ar||y instanceof Qn)he=y.copy(),ne(y,he);else{if(y instanceof Ti||y instanceof bn||y instanceof dn)return y;if(y instanceof mn)he=new mn().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof vn)he=new vn().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Jt)he=new Jt().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,Fn(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 vn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new Jt,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===ro?(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 vn,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 vn,te=new vn,ne=new vn,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!==ro||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)&&Nt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Jt;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&&Nt("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=Nn.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Nt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Nt("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(Fn(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:Nt("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 mn,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()):Fn(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 ur;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 Qt)y={class:"go.Rect",x:qa(x.x),y:qa(x.y),width:qa(x.width),height:qa(x.height)};else if(x instanceof Ar)y={class:"go.Margin",top:qa(x.top),right:qa(x.right),bottom:qa(x.bottom),left:qa(x.left)};else if(x instanceof Qn)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 Ti){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 bn?(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(Qr)||(y.spot1=x.spot1),x.spot2.D(ji)||(y.spot2=x.spot2),x.type===bn.o&&(y.path=bn.ia(x))):x instanceof dn&&(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 mn){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 Qt(es(a.x),es(a.y),es(a.width),es(a.height));else if(y==="Margin")x=new Ar(es(a.top),es(a.right),es(a.bottom),es(a.left));else if(y==="Spot")typeof a.enum=="string"?x=oo(a.enum):x=new Qn(es(a.x),es(a.y),es(a.offsetX),es(a.offsetY));else if(y==="Brush"){if(x=new Ti,x.type=Hn(Ti,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Qn&&(x.start=a.start),a.end instanceof Qn&&(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=bn.parse(a.path):x=new bn,x.type=Hn(bn,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 Qn&&(x.spot1=a.spot1),a.spot2 instanceof Qn&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Hn(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){_o(this,"",a,y,x,b,E,te,ne)},et.g=function(a,y,x,b,E){_o(this,"",ro,a,this,y,x,b,E)},et.Fs=function(a,y,x,b,E,te){_o(this,"",ro,y,a,x,b,E,te)};function _o(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var pe=new ao;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===ro){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)),io(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&&er(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Ln(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Fn(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),Fn(b)&&typeof x=="number"&&(a=a.newValue,y?er(b,x):Ln(b,x,a))):Nt("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&&Ln(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&er(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Fn(b)&&a.propertyName&&(b=Co(a.object,a.propertyName)),Fn(b)&&typeof x=="number"&&(a=a.oldValue,y?Ln(b,x,a):er(b,x))):Nt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ea&&Nt("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=""),_o(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;Nt("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&&(io(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),_o(this,"nodeKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else io(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&&Nt("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))){io(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;io(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;io(a,y,x)}}}}},et.xf=function(a){a!==null&&(ui(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&&Nt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Ln(a.Tc,b,y)),_o(a,"nodeDataArray",wo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}et.Fy=function(a){if(Fn(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;er(a.Tc,b)}_o(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,b,null),a.qp(y)}et.nA=function(a){if(Fn(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&&Fn(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 vn&&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 vn,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 vn&&(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 vn?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 ao||(te=u0(a,te,!1)),io(x,b,te)}return xr(x),x}return y instanceof lt||y instanceof ln||y instanceof Qt||y instanceof Qn||y instanceof Ar?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,jn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),jn(" Is that really your intent?"));var b=Co(a,y);b!==x&&(io(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),Ln(a,y,x),_o(this,"",wo,"",a,null,x,null,y)},et.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Nt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];er(a,y),_o(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;Nt("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&&(io(a,x,y),_o(this,"nodeCategory",ro,x,a,b,y))}else io(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]:Nn.go!==void 0&&Nn.go[a]?Nn.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 io(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){}}Yt.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===""&&Nt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Nt("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)||Nt("Model.nodeDataArray must only contain Objects, not: "+E),ui(E)}for(this.Tc=a,b=new mn,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(_o(this,"nodeDataArray",ro,"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=Nn.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Nt("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=Nn[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof ir?y=a:Nt("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=io,kl.Brush=Ti,kl.ChangedEvent=ao,kl.Geometry=bn,kl.Margin=Ar,kl.Panel=xn,kl.Point=lt,kl.Rect=Qt,kl.Size=ln,kl.Spot=Qn,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 vn}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==="")jn("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!==""&&io(a,x,te);else try{if(x!==""){var ne=E(te,a);io(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):io(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):io(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)}}}},Yt.Object.defineProperties(Mo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Ht(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Ht(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Ht(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Ht(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Ht(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Ht(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Ht(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Ht(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 dn(Mo,"OneWay",1),pg=new dn(Mo,"TwoWay",2);Mo.className="Binding",Mo.parseEnum=function(a,y){return function(x){return x=Hn(a,x),x===null?y:x}},Mo.toString=Kr,Mo.OneWay=MS,Mo.TwoWay=pg;function ni(a,y,x){ir.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new vn,this.wb=new Jt,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&&(Fn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}rn(ni,ir),ni.constructGraphLinksModel=ir.constructGraphLinksModel,ni.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=ni.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)+":"+Kr(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===""&&Nt("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 vn,te=new vn,ne=new vn,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 vn,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===""&&Nt("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 vn,te=new vn,ne=new vn,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)&&Nt("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)},ni.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===ro){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),io(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=ni.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),io(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;Nt((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),io(y,E,x),a.hc(x)===null&&Rl(a,x,y),_o(a,b?"linkFromKey":"linkToKey",ro,E,y,te,x),typeof E=="string"&&a.La(y,E))}else io(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&&(io(y,E,x),_o(a,b?"linkFromPortId":"linkToPortId",ro,E,y,te,x),typeof E=="string"&&a.La(y,E))}else io(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(io(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Rl(this,ne,a)}_o(this,"linkLabelKeys",ro,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else io(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),_o(this,"linkLabelKeys",wo,x,a,null,y,null,E)))}else Nt(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),_o(this,"linkLabelKeys",Eo,x,a,y,null,E,null)))}else b!==void 0&&Nt(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;Nt("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&&(io(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),_o(this,"linkKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},et.jh=function(a){return a===null&&Nt("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))){io(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;io(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;io(a,y,x)}}}}},et.Jc=function(a){return a===null?!1:this.$f.contains(a)},et.fi=function(a){a!==null&&(ui(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&&Nt("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)),_o(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(_o(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===""&&Nt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Fn(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!==""&&io(a,this.lf,void 0),this.mf!==""&&io(a,this.mf,void 0),this.je!==""&&io(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;Nt("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),io(a,x,y),this.hc(y)===null&&Rl(this,y,a),_o(this,"nodeGroupKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},ni.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||io(a,this.Je,void 0),a)},ni.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&&(io(a,y,x),this.Fs(a,y,b,x))},et=ni.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;io(b,ne,te),_o(this,"linkFromKey",ro,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Us(this,b,!1)===E&&(ne=this.mf,io(b,ne,te),_o(this,"linkToKey",ro,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,_o(this,"linkLabelKeys",wo,he,b,E,te,pe,pe))}},et.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;io(a,b,x),_o(this,"nodeGroupKey",ro,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=zn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;_o(this,"nodeGroupKey",ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Us(this,b,!0)===a&&(E=this.lf,_o(this,"linkFromKey",ro,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Us(this,b,!1)===a&&(E=this.mf,_o(this,"linkToKey",ro,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&&(_o(this,"linkLabelKeys",wo,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)_l(this,a,x[y]);Zn(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;Nt("getCategoryForLinkData found a non-string category for "+a+": "+y)},ni.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ni.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&&(io(a,x,y),_o(this,"linkCategory",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(a,x,y)}},ni.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},et=ni.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},Yt.Object.defineProperties(ni.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)||Nt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),ui(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new mn,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 vn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,_o(this,"linkDataArray",ro,"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"}}}),ni.prototype.setCategoryForLinkData=ni.prototype.lp,ni.prototype.getCategoryForLinkData=ni.prototype.ps,ni.prototype.assignAllDataProperties=ni.prototype.Do,ni.prototype.setGroupKeyForNodeData=ni.prototype.mp,ni.prototype.getGroupKeyForNodeData=ni.prototype.lh,ni.prototype.isGroupForNodeData=ni.prototype.Yu,ni.prototype.copyLinkData=ni.prototype.Jo,ni.prototype.mergeLinkDataArray=ni.prototype.Zz,ni.prototype.removeLinkDataCollection=ni.prototype.lA,ni.prototype.removeLinkData=ni.prototype.bm,ni.prototype.addLinkDataCollection=ni.prototype.Ey,ni.prototype.addLinkData=ni.prototype.fi,ni.prototype.containsLinkData=ni.prototype.Jc,ni.prototype.makeLinkDataKeyUnique=ni.prototype.Bs,ni.prototype.findLinkDataForKey=ni.prototype.jh,ni.prototype.setKeyForLinkData=ni.prototype.Ks,ni.prototype.getKeyForLinkData=ni.prototype.Ac,ni.prototype.removeLabelKeyForLinkData=ni.prototype.Qx,ni.prototype.addLabelKeyForLinkData=ni.prototype.Bu,ni.prototype.setLabelKeysForLinkData=ni.prototype.Ls,ni.prototype.getLabelKeysForLinkData=ni.prototype.Ef,ni.prototype.setToPortIdForLinkData=ni.prototype.Cv,ni.prototype.getToPortIdForLinkData=ni.prototype.Cx,ni.prototype.setFromPortIdForLinkData=ni.prototype.xv,ni.prototype.getFromPortIdForLinkData=ni.prototype.zx,ni.prototype.setToKeyForLinkData=ni.prototype.Bv,ni.prototype.getToKeyForLinkData=ni.prototype.Bx,ni.prototype.setFromKeyForLinkData=ni.prototype.wv,ni.prototype.getFromKeyForLinkData=ni.prototype.yx,ni.prototype.clear=ni.prototype.clear;var c0=Object.freeze([]);ni.className="GraphLinksModel",kl.GraphLinksModel=ni,ir.constructGraphLinksModel=ir.constructGraphLinksModel=function(){return new ni},ir.initDiagramModel=cy=function(){return new ni};function ts(a,y){ir.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Fn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}rn(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)+":"+Kr(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&&Nt("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;Nt("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),io(a,x,y),this.hc(y)===null&&Rl(this,y,a),_o(this,"nodeParentKey",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(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:(Nt("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&&(io(a,x,y),_o(this,"parentLinkCategory",ro,x,a,b,y),typeof x=="string"&&this.La(a,x))}else io(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||io(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&&(io(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;io(a,b,x),_o(this,"nodeParentKey",ro,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=zn();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;_o(this,"nodeParentKey",ro,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]);Zn(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},Yt.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){lo.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)}rn(fo,lo),fo.prototype.cloneProtected=function(a){lo.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):lo.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 mn;y.addAll(a.iterator),a=new mn;var x=new mn,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 mn,b.addAll(a),b.addAll(x)):(this.arrangement===Ml&&x.reverse(),b=new mn,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:Nt("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new mn;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 mn;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],Ct=0,jt=0;jt<ne.length;jt++){var Ot=te[ne[jt]],It=te[se[jt]];if(Ot<It){var _t=Ot;Ot=It}else _t=It;if(_t<it&&it<=Ot)for(It=0;It<Tt.length;It++){var Vt=Tt[It];0>x.indexOf(Vt)||_t<te[Vt]&&te[Vt]<Ot||_t===te[Vt]||Ot===te[Vt]||Ct++}else for(It=0;It<Tt.length;It++)Vt=Tt[It],0>x.indexOf(Vt)||_t<te[Vt]&&te[Vt]<Ot&&_t!==te[Vt]&&Ot!==te[Vt]&&Ct++}for(Tt=Ct,jt=Ct=0;jt<y[pe].length;jt++)_t=x.indexOf(y[pe][jt]),0<=_t&&(_t=Math.abs(it-(_t>=it?_t+1:_t)),Ct+=_t<x.length+1-_t?_t:x.length+1-_t);for(jt=0;jt<ne.length;jt++)_t=te[ne[jt]],Ot=te[se[jt]],_t>=it&&_t++,Ot>=it&&Ot++,_t>Ot&&(It=Ot,Ot=_t,_t=It),Ot-_t<(x.length+2)/2==(_t<it&&it<=Ot)&&Ct++;(Tt<ye||Tt===ye&&Ct<Te)&&(ye=Tt,Te=Ct,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},Yt.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 dn(fo,"ConstantSpacing",0),uc=new dn(fo,"ConstantDistance",1),Th=new dn(fo,"ConstantAngle",2),Ml=new dn(fo,"Packed",3),ns=new dn(fo,"Clockwise",4),hc=new dn(fo,"Counterclockwise",5),qc=new dn(fo,"BidirectionalLeft",6),Hd=new dn(fo,"BidirectionalRight",7),p0=new dn(fo,"Forwards",8),g0=new dn(fo,"Reverse",9),m0=new dn(fo,"Ascending",10),v0=new dn(fo,"Descending",11),Kd=new dn(fo,"Optimized",12),y0=new dn(fo,"Pythagorean",13),zf=new dn(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)}rn(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}rn(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}Yt.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)}rn(S0,Ms),S0.className="CircularEdge";function xa(a){lo.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)}rn(xa,lo),xa.prototype.cloneProtected=function(a){lo.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=zn(),ye=0;ye<se+y.vertexes.count+2;ye++)pe[ye]=null;se=0,ne.reset();for(var Te=Qt.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(Qt.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(Zn(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 mn),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 mn,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new mn,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 Qt(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 Qt(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=Qt.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Qt.free(x)}x=Qt.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()}Qt.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},Yt.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"&&Nt('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)}rn(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}rn(xg,Ho),Yt.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}rn(wg,Ms),Yt.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 Ai(a){lo.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)}rn(Ai,lo),Ai.prototype.cloneProtected=function(a){lo.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},Ai.prototype.qb=function(a){a.classType===Ai?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:Nt("Unknown enum value: "+a):lo.prototype.qb.call(this,a)},Ai.prototype.createNetwork=function(){return new Xd(this)},Ai.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,Dr,Xe),Xe.x+=Te.actualBounds.x-it.x,Xe.y+=Te.actualBounds.y-it.y):(Ph(Te,Ge,Dr,Xe),Xe.w()||Xe.assign(Je)):Xe.assign(Je):it.w()?(Ph(Te,Ge,Dr,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,Dr,ye),ye.x+=he.actualBounds.x-Te.x,ye.y+=he.actualBounds.y-Te.y):(Ph(he,se,Dr,ye),ye.w()||ye.assign(pe)):ye.assign(pe):Te.w()?(Ph(he,se,Dr,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,Ct=it.toPort;if(Tt!==null&&Ct!==null){var jt=it.fromNode;if(Ge=it.toNode,jt!==null&&Ge!==null){var Ot=C0(this,!0),It=C0(this,!1),_t=this.setsPortSpots?Ot:it.computeSpot(!0,Tt);Je=this.setsPortSpots?It:it.computeSpot(!1,Ct);var Vt=it.isOrthogonal;_t.$c()&&_t.Hf(It)&&Je.$c()&&Je.Hf(Ot)?Te=0:(Ot=it.getLinkPoint(jt,Tt,_t,!0,Vt,Ge,Ct,lt.alloc()),It=it.getLinkDirection(jt,Tt,Ot,_t,!0,Vt,Ge,Ct),lt.free(Ot),_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,Ct,Je,!1,Vt,jt,Tt,lt.alloc()),it=it.getLinkDirection(Ge,Ct,_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},Ai.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}Ai.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},Ai.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 Ct=0,jt=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var Ot=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<Ot.length;Ge++)Je=Ot[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)&&Ct++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,Ot=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<Ot.length;Ge++)Je=Ot[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)&&Ct++)}te[ne*E+he]=Ct,te[he*E+ne]=jt}}return dc(a,y,b),te}Ai.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}Ai.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)}}Ai.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++}Ai.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}Ai.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))}Ai.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),Ct=a.nodeMinColumnSpace(b[te],!1),jt=a.nodeMinColumnSpace(b[te+1],!0),Ot=a.nodeMinColumnSpace(b[te+1],!1);Tt=Je-Tt+jt,Ct=it-Ct+Ot;var It=b[te].sourceEdges.iterator;for(It.reset();It.next();)if(jt=It.value,Ot=jt.fromVertex,jt.valid&&Ot.layer===y){for(jt=0;b[jt]!==Ot;)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,Ot=jt.toVertex,jt.valid&&Ot.layer===y){for(jt=0;b[jt]!==Ot;)jt++;jt===te+1&&(Xe+=1)}for(It=b[te+1].sourceEdges.iterator,It.reset();It.next();)if(jt=It.value,Ot=jt.fromVertex,jt.valid&&Ot.layer===y){for(jt=0;b[jt]!==Ot;)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,Ot=jt.toVertex,jt.valid&&Ot.layer===y){for(jt=0;b[jt]!==Ot;)jt++;jt===te&&(Ge+=1)}jt=Ot=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&&(Ot+=Math.abs(It-Je),jt+=Math.abs(It-Ct)),_t!==-1&&(Ot+=Math.abs(_t-Je),jt+=Math.abs(_t-Ct)),Vt!==-1&&(Ot+=Math.abs(Vt-it),jt+=Math.abs(Vt-Tt)),Rn!==-1&&(Ot+=Math.abs(Rn-it),jt+=Math.abs(Rn-Tt)),(Xe<Ge-.5||Xe===Ge&&Te<ye-.5||Xe===Ge&&Te===ye&&jt<Ot-.5)&&(pe=he=!0,b[te].column=Ct,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}Ai.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 Ct=Tt.value,jt=Ct.fromVertex;if(Ct.valid&&jt.layer!==y){var Ot=gy(Ct),It=Ct.portFromColOffset;Ct=Ct.portToColOffset,jt=jt.column,Ge+=(Math.abs(ye+Ct-(jt+It))+1)*Ot,Je+=(Math.abs(Xe+Ct-(jt+It))+1)*Ot,it+=(Math.abs(Te+Ct-(jt+It))+1)*Ot}}if(0<=x)for(Tt=E[b].destinationEdges.iterator;Tt.next();)Ct=Tt.value,jt=Ct.toVertex,Ct.valid&&jt.layer!==y&&(Ot=gy(Ct),It=Ct.portFromColOffset,Ct=Ct.portToColOffset,jt=jt.column,Ge+=(Math.abs(ye+It-(jt+Ct))+1)*Ot,Je+=(Math.abs(Xe+It-(jt+Ct))+1)*Ot,it+=(Math.abs(Te+It-(jt+Ct))+1)*Ot);Ct=It=Ot=0,Tt=ne[E[b].index],jt=se[E[b].index],Tt!==-1&&(Ot+=Math.abs(Tt-ye),It+=Math.abs(Tt-Xe),Ct+=Math.abs(Tt-Te)),jt!==-1&&(Ot+=Math.abs(jt-ye),It+=Math.abs(jt-Xe),Ct+=Math.abs(jt-Te)),Je<Ge||Je===Ge&&It<Ot?(pe=he=!0,E[b].column=Xe):(it<Ge||it===Ge&&Ct<Ot)&&(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=zn(),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 vn,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)),Zn(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Xe){var Je=zn();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,Ct){return Tt-Ct});var it=Je.length;it=(Je[Math.floor((it-1)/2)]+Je[Math.ceil((it-1)/2)])/2,Zn(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}}}Ai.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 Jt,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&&Nt("Could not determine previous vertex in layer"),y[x][a-1]}Ai.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=zn(),E=zn(),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)));Zn(b),Zn(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}Ai.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}Ai.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()},Ai.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 Qt(0,0,x,Math.abs(this.Ta[0]))):y.push(new Qt(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Qt(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Qt(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Qt(0,0,Math.abs(this.Ta[0]),x)):y.push(new Qt(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Qt(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Qt(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Ai.prototype.commitLayers=function(){},Ai.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===Or&&(b=!0),se!==null&&he===Or&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(Dr),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(Dr),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 Ct=pe===Or,jt=he===Or;2<Tt&&Ct&&jt?y.points.removeRange(1,Tt-2):3<Tt&&Ct&&!jt?y.points.removeRange(1,Tt-3):3<Tt&&!Ct&&jt?y.points.removeRange(2,Tt-2):4<Tt&&!Ct&&!jt&&y.points.removeRange(2,Tt-3)}if(x.rev){for(;Te!==null&&ye!==Te;){var Ot=Tt=null;for(Ct=Te.sourceEdges.iterator;Ct.next()&&(jt=Ct.value,jt.link!==x.link||(Tt=jt.fromVertex,Ot=jt.toVertex,Tt.node!==null)););if(Tt===null)break;if(Tt!==ye){Ct=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++,Ct,jt),y.m(it++,Ct,_t)):(Ot!==null?Ot.centerY:jt)!==_t&&(Ot=this.Ta[Tt.layer-1]+this.Rf.x,y.m(it++,Ot,jt),y.m(it++,Ot,_t)):it===y.firstPickIndex+1?(y.m(it++,Ct,jt),y.m(it++,It,jt)):(Ot!==null?Ot.centerX:Ct)!==It&&(Ot=this.Ta[Tt.layer-1]+this.Rf.y,y.m(it++,Ct,Ot),y.m(it++,It,Ot));else if(it===y.firstPickIndex+1){Ot=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-Ot,_t),y.m(it++,Te,_t),y.m(it++,Te+Vt,_t)):(y.m(it++,It-Ot,_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-Ot)):(y.m(it++,It,_t+Vt),y.m(it++,It,_t),y.m(it++,It,_t-Ot)):this.K===270?_t<=Te.bounds.y?(Te=Te.bounds.y,y.m(it++,It,Te-Ot),y.m(it++,It,Te),y.m(it++,It,Te+Vt)):(y.m(it++,It,_t-Ot),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-Ot,_t)):(y.m(it++,It+Vt,_t),y.m(it++,It,_t),y.m(it++,It-Ot,_t)));else{y.m(it++,Ct,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?-Ot:Vt)/2),y.m(it++,Ct+Rn,_t)):((this.K===270?_t>=Te.bounds.bottom:_t<=Te.bounds.y)&&(Rn=(this.K===90?-Ot:Vt)/2),y.m(it++,It,jt+Rn)),y.m(it++,It,_t)}}else Ot=Math.max(10,this.he[Tt.layer]),Vt=Math.max(10,this.Ld[Tt.layer]),Ge?this.K===180?(y.m(it++,It-Ot-Je,_t),y.m(it++,Math.min(It-Ot+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-Ot+Je/2,_t)),y.m(it++,It,_t-Ot-Je)):this.K===270?(y.m(it++,It,_t-Ot-Je),y.m(it++,It,Math.min(_t-Ot+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-Ot+Je/2,It),_t),y.m(it++,It-Ot-Je,_t)):y.m(it++,It,_t)}Te=Tt}(se===null||pe!==Or||Xe)&&(Ct=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=Ct,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++,Ct,Te),y.m(it++,Xe,Te)),y.m(it++,Xe,_t)),y.m(it++,It,_t)):Ge?(Ot=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,Ct,Te),y.L(it-1,Ct,Te-Ot)):this.K===270&&_t>=ye.bounds.y?(Te=ye.bounds.y+ye.bounds.height,y.L(it-2,Ct,Te),y.L(it-1,Ct,Te+Vt)):this.K===0&&It<=ye.bounds.right&&(Te=ye.bounds.x,y.L(it-2,Te,jt),y.L(it-1,Te-Ot,jt))):(Ot=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:-Ot)/2),y.m(it++,It+Xe,jt)):((this.K===270?_t<=ye.bounds.y:_t>=ye.bounds.bottom)&&(Xe=(this.K===90?Vt:-Ot)/2),y.m(it++,Ct,_t+Xe)),y.m(it++,It,_t)))}else{for(;ye!==null&&ye!==Te;){for(Ot=Tt=null,ye=ye.destinationEdges.iterator;ye.next()&&(Ct=ye.value,Ct.link!==x.link||(Tt=Ct.toVertex,Ot=Ct.fromVertex,Ot.node!==null&&(Ot=null),Tt.node!==null)););if(Tt===null)break;Tt!==Te&&(Ct=y.i(it-1).x,jt=y.i(it-1).y,It=Tt.centerX,_t=Tt.centerY,Xe?this.K===180||this.K===0?(Ot!==null?Ot.centerY:jt)!==_t&&(Ot=this.Ta[Tt.layer]+this.Rf.x,it===y.firstPickIndex+1&&(Ot=this.K===0?Math.max(Ot,Ct):Math.min(Ot,Ct)),y.m(it++,Ot,jt),y.m(it++,Ot,_t)):(Ot!==null?Ot.centerX:Ct)!==It&&(Ot=this.Ta[Tt.layer]+this.Rf.y,it===y.firstPickIndex+1&&(Ot=this.K===90?Math.max(Ot,jt):Math.min(Ot,jt)),y.m(it++,Ct,Ot),y.m(it++,It,Ot)):(Ot=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-Ot+Je/2,It),_t),y.m(it++,It-Ot-Je,_t)):this.K===90?(y.m(it++,It,_t-Ot-Je),y.m(it++,It,Math.min(_t-Ot+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-Ot+Je/2,_t)),y.m(it++,It,_t-Ot-Je)):(y.m(it++,It-Ot-Je,_t),y.m(it++,Math.min(It-Ot+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-Ot,_t)):this.K===90?(y.m(it++,It,_t-Ot),y.m(it++,It,_t+Vt)):this.K===270?(y.m(it++,It,_t+Vt),y.m(it++,It,_t-Ot)):(y.m(it++,It-Ot,_t),y.m(it++,It+Vt,_t)))),ye=Tt}Xe&&(Ct=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&&(Ot=this.K===0?Math.min(Math.max((It+Ct)/2,this.Ta[Te.layer]+this.Rf.x),It):Math.max(Math.min((It+Ct)/2,this.Ta[Te.layer]+this.Rf.x),It),y.m(it++,Ot,jt),y.m(it++,Ot,_t)):Ct!==It&&(Ot=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++,Ct,Ot),y.m(it++,It,Ot)))}b!==null&&Ge&&4<=y.pointsCount&&(ne!==null&&(ne=pe===Or?y.getLinkPointFromPoint(E,ne,ne.ga(Dr),y.i(3),!0):y.i(0),pe===Or&&(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===Or?y.getLinkPointFromPoint(te,se,se.ga(Dr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===Or&&(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()},Ai.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new mn,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=Ai.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)&&Nt("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}Yt.Object.defineProperties(Ai.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()):Nt("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 dn(Ai,"CycleDepthFirst",0),xy=new dn(Ai,"CycleGreedy",1),bg=new dn(Ai,"CycleFromLayers",2),k0=new dn(Ai,"LayerOptimalLinkLength",0),wy=new dn(Ai,"LayerLongestPathSink",1),Py=new dn(Ai,"LayerLongestPathSource",2),T0=new dn(Ai,"InitDepthFirstOut",0),by=new dn(Ai,"InitDepthFirstIn",1),Cy=new dn(Ai,"InitNaive",2),Ey=new dn(Ai,"AggressiveNone",0),M0=new dn(Ai,"AggressiveLess",1),ky=new dn(Ai,"AggressiveMore",2),Xx=8;Ai.className="LayeredDigraphLayout",Ai.CycleDepthFirst=E0,Ai.CycleGreedy=xy,Ai.CycleFromLayers=bg,Ai.LayerOptimalLinkLength=k0,Ai.LayerLongestPathSink=wy,Ai.LayerLongestPathSource=Py,Ai.InitDepthFirstOut=T0,Ai.InitDepthFirstIn=by,Ai.InitNaive=Cy,Ai.AggressiveNone=Ey,Ai.AggressiveLess=M0,Ai.AggressiveMore=ky,Ai.PackNone=0,Ai.PackExpand=1,Ai.PackStraighten=2,Ai.PackMedian=4,Ai.PackAll=15,Ai.AlignNone=0,Ai.AlignUpperLeft=1,Ai.AlignUpperRight=2,Ai.AlignLowerLeft=4,Ai.AlignLowerRight=8,Ai.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)}rn(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}rn(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;Nt("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},Yt.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}rn(Cg,Ms),Yt.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 Yr(a){lo.call(this),this.Ub=new vn,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)}rn(Yr,lo),Yr.prototype.cloneProtected=function(a){lo.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)},Yr.prototype.qb=function(a){a.classType===Yr?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:Nt("Unknown enum value: "+a):lo.prototype.qb.call(this,a)},Yr.prototype.createNetwork=function(){return new Kf(this)},Yr.prototype.makeNetwork=function(a){function y(b){if(b instanceof Gn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof En){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 Tr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Yr.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 vn,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 vn,this.isValidLayout=!0};function $x(a){var y=new vn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Yr.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:Nt("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:Nt("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 mn,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 mn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Nt("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}Yr.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}}Yr.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])}}Yr.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])}}Yr.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:Nt("Unhandled sorting value "+a.sorting.toString())}},Yr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Yr.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=Qt.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,Qt.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}Yr.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)}},Yr.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,Ct=0,jt=0,Ot=0,It=null,_t=null,Vt=0,Rn=0,$n=0,Vn=0,Cn=0,un=0,kr=0,br=0;if(ye&&!Eg(he)&&135<E&&ne.reverse(),Eg(he))if(1<se)for(var yi=0;yi<se;yi++)yi%2===0&&yi!==se-1&&(br=Math.max(br,y?ne[yi].Da.width:ne[yi].Da.height));else se===1&&(br=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(he){case Mh:jt=135>E?cx(this,a,ne,br,Ct,jt):fx(this,a,ne,br,Ct,jt),br=jt.x,Ct=jt.width,jt=jt.height;break;case Lh:for(It=0;It<se;It++)_t=ne[It],Te=_t.Da,Ot=un===0?0:Je,y?(_t.S.h(te-Te.width,Vn+Ot),Ct=Math.max(Ct,Te.width),jt=Math.max(jt,Vn+Ot+Te.height),Vn+=Ot+Te.height):(_t.S.h($n+Ot,te-Te.height),Ct=Math.max(Ct,$n+Ot+Te.width),jt=Math.max(jt,Te.height),$n+=Ot+Te.width),un++;break;case Zu:for(It=0;It<se;It++)_t=ne[It],te=_t.Da,Te=un===0?0:Je,y?(_t.S.h(Ge/2+a.focus.x,Vn+Te),Ct=Math.max(Ct,te.width),jt=Math.max(jt,Vn+Te+te.height),Vn+=Te+te.height):(_t.S.h($n+Te,Ge/2+a.focus.y),Ct=Math.max(Ct,$n+Te+te.width),jt=Math.max(jt,te.height),$n+=Te+te.width),un++}It=vs(this,2),_t=vs(this,2),y?(It[0].h(0,0),It[1].h(0,jt),_t[0].h(Ct,0)):(It[0].h(0,0),It[1].h(Ct,0),_t[0].h(0,jt)),_t[1].h(Ct,jt)}else for(yi=0;yi<se;yi++){var Hi=ne[yi],$o=Hi.Da;if(y){0<Te&&0<un&&$n+Ge+$o.width>Te&&($n<te&&ef(a,he,te-$n,0,kr,yi-1),Cn++,un=0,kr=yi,Ot=jt,$n=0,Vn=135<E?-jt-Je:jt+Je),A0(this,Hi,0,Vn);var ea=0;if(un===0)It=Hi.Yo,_t=Hi.kp,Vt=$o.width,Rn=$o.height,(It===null||_t===null||E!==Ll(Hi))&&(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=zn();Rn=dx(this,a,Hi,It,_t,Vt,Rn,Ra),ea=Rn.x,It=Ra[0],_t=Ra[1],Vt=Rn.width,Rn=Rn.height,Zn(Ra),$n<$o.width&&0>ea&&(Uf(a,-ea,0,kr,yi-1),j0(It,-ea,0),j0(_t,-ea,0),ea=0)}Hi.S.h(ea,Vn),Ct=Math.max(Ct,Vt),jt=Math.max(jt,Ot+(Cn===0?0:Je)+$o.height),$n=Vt}else 0<Te&&0<un&&Vn+Ge+$o.height>Te&&(Vn<te&&ef(a,he,0,te-Vn,kr,yi-1),Cn++,un=0,kr=yi,Ot=Ct,Vn=0,$n=135<E?-Ct-Je:Ct+Je),A0(this,Hi,$n,0),ea=0,un===0?(It=Hi.Yo,_t=Hi.kp,Vt=$o.width,Rn=$o.height,(It===null||_t===null||E!==Ll(Hi))&&(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=zn(),Rn=dx(this,a,Hi,It,_t,Vt,Rn,Ra),ea=Rn.x,It=Ra[0],_t=Ra[1],Vt=Rn.width,Rn=Rn.height,Zn(Ra),Vn<$o.height&&0>ea&&(Uf(a,0,-ea,kr,yi-1),j0(It,0,-ea),j0(_t,0,-ea),ea=0)),Hi.S.h($n,ea),jt=Math.max(jt,Rn),Ct=Math.max(Ct,Ot+(Cn===0?0:Je)+$o.width),Vn=Rn;un++}switch(0<Cn&&(y?(jt+=Math.max(0,x),$n<Ct&&ef(a,he,Ct-$n,0,kr,se-1),0<it&&(pe||Uf(a,it,0,0,se-1),Ct+=it)):(Ct+=Math.max(0,x),Vn<jt&&ef(a,he,0,jt-Vn,kr,se-1),0<it&&(pe||Uf(a,0,it,0,se-1),jt+=it))),it=pe=0,he){case $d:y?pe+=Ct/2-a.focus.x-Xe/2:it+=jt/2-a.focus.y-Xe/2;break;case Hf:0<Cn?y?pe+=Ct/2-a.focus.x-Xe/2:it+=jt/2-a.focus.y-Xe/2:y?(br=ne[0].S.x+ne[0].la.x,pe+=br+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-br)/2-a.focus.x-Xe/2):(br=ne[0].S.y+ne[0].la.y,it+=br+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-br)/2-a.focus.y-Xe/2);break;case ku:y?(pe-=Xe,Ct+=Xe):(it-=Xe,jt+=Xe);break;case Tu:y?(pe+=Ct-a.width+Xe,Ct+=Xe):(it+=jt-a.height+Xe,jt+=Xe);break;case Mh:y?1<se?pe+=br+Ge/2-a.focus.x:pe+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?it+=br+Ge/2-a.focus.y:it+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Lh:y?pe+=Ct+Ge/2-a.focus.x:it+=jt+Ge/2-a.focus.y;break;case Zu:break;default:jt=this.customAlignment(a,pe,it,Ct,jt),pe=jt[0],it=jt[1],Ct=jt[2],jt=jt[3]}for(Xe=0;Xe<se;Xe++)br=ne[Xe],y?br.S.h(br.S.x+br.la.x-pe,br.S.y+(135<E?(ye?-jt:-br.Da.height)+br.la.y-x:Tt+x+br.la.y)):br.S.h(br.S.x+(135<E?(ye?-Ct:-br.Da.width)+br.la.x-x:b+x+br.la.x),br.S.y+br.la.y-it);if(se=ne=0,ye?y?(Ct=Ny(a,Ct,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+=Ct+x),Ct+=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>Ct&&(Ct=jy(he,b-Ct,0),ne=Ct.x,se=Ct.y,Ct=b,pe=0):Ct=Ny(a,Ct,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+=Ct+x),Ct=Math.max(Math.max(Ct,b),Ct+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<Cn)E=vs(this,4),Cn=vs(this,4),y?(E[2].h(0,Tt+x),E[3].h(E[2].x,jt),Cn[2].h(Ct,E[2].y),Cn[3].h(Cn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Ct,E[2].y),Cn[2].h(E[2].x,jt),Cn[3].h(E[3].x,Cn[2].y));else{for(E=vs(this,It.length+2),Cn=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],Cn[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])),Cn[0].h(pe+b,0),Cn[1].h(Cn[0].x,Tt),Cn[2].y<Cn[1].y&&(Cn[2].x<Cn[0].x?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].y<Cn[2].y&&(Cn[3].x<Cn[0].x?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),E[2].y-=x/2,Cn[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])),Cn[0].h(0,it+Tt),Cn[1].h(b,Cn[0].y),Cn[2].x<Cn[1].x&&(Cn[2].y<Cn[0].y?Cn[2].assign(Cn[1]):Cn[1].assign(Cn[2])),Cn[3].x<Cn[2].x&&(Cn[3].y<Cn[0].y?Cn[3].assign(Cn[2]):Cn[2].assign(Cn[3])),E[2].x-=x/2,Cn[2].x-=x/2),zl(this,It),zl(this,_t),a.Yo=E,a.kp=Cn,a.la.h(pe,it),a.Da.h(Ct,jt)}break;default:Nt("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,Ct=0;(ye||Te||y.hm||y.im&&y.maxGenerationCount===1)&&(Ct=Math.max(0,y.rowIndent)),ye=y.width;var jt=y.height,Ot=0,It=0,_t=0,Vt=0,Rn=0,$n=0,Vn=0,Cn=0,un=0,kr=0;if(se&&!Eg(pe)&&135<b&&E.reverse(),Eg(pe))if(1<ne)for(var br=0;br<ne;br++){var yi=E[br],Hi=yi.Da;br%2===0&&br!==ne-1?un=Math.max(un,(x?Hi.width:Hi.height)+a.computeBusNodeSpacing(yi)-Xe):br%2!==0&&(kr=Math.max(kr,(x?Hi.width:Hi.height)+a.computeBusNodeSpacing(yi)-Xe))}else ne===1&&(un=x?E[0].Da.width:E[0].Da.height);if(se)switch(pe){case Mh:case Mu:It=135>b?cx(a,y,E,un,Ot,It):fx(a,y,E,un,Ot,It),un=It.x,Ot=It.width,It=It.height;break;case Lh:for(Ge=0;Ge<ne;Ge++)it=E[Ge],_t=it.Da,kr=Vn===0?0:Tt,x?(it.S.h(te-_t.width,Rn+kr),Ot=Math.max(Ot,_t.width),It=Math.max(It,Rn+kr+_t.height),Rn+=kr+_t.height):(it.S.h(Vt+kr,te-_t.height),Ot=Math.max(Ot,Vt+kr+_t.width),It=Math.max(It,_t.height),Vt+=kr+_t.width),Vn++;break;case Zu:for(te=0;te<ne;te++)Ge=E[te],it=Ge.Da,_t=Vn===0?0:Tt,x?(Ge.S.h(Xe/2+y.focus.x,Rn+_t),Ot=Math.max(Ot,it.width),It=Math.max(It,Rn+_t+it.height),Rn+=_t+it.height):(Ge.S.h(Vt+_t,Xe/2+y.focus.y),Ot=Math.max(Ot,Vt+_t+it.width),It=Math.max(It,it.height),Vt+=_t+it.width),Vn++}else for(kr=0;kr<ne;kr++)br=E[kr],yi=br.Da,x?(0<Ge&&0<Vn&&Vt+Xe+yi.width>Ge&&(Vt<te&&ef(y,pe,te-Vt,0,Cn,kr-1),$n++,Vn=0,Cn=kr,_t=It,Vt=0,Rn=135<b?-It-Tt:It+Tt),Hi=Vn===0?it:Xe,A0(a,br,0,Rn),br.S.h(Vt+Hi,Rn),Ot=Math.max(Ot,Vt+Hi+yi.width),It=Math.max(It,_t+($n===0?0:Tt)+yi.height),Vt+=Hi+yi.width):(0<Ge&&0<Vn&&Rn+Xe+yi.height>Ge&&(Rn<te&&ef(y,pe,0,te-Rn,Cn,kr-1),$n++,Vn=0,Cn=kr,_t=Ot,Rn=0,Vt=135<b?-Ot-Tt:Ot+Tt),Hi=Vn===0?it:Xe,A0(a,br,Vt,0),br.S.h(Vt,Rn+Hi),It=Math.max(It,Rn+Hi+yi.height),Ot=Math.max(Ot,_t+($n===0?0:Tt)+yi.width),Rn+=Hi+yi.height),Vn++;switch(0<$n&&(x?(It+=Math.max(0,he),Vt<Ot&&ef(y,pe,Ot-Vt,0,Cn,ne-1),0<Ct&&(Te||Uf(y,Ct,0,0,ne-1),Ot+=Ct)):(Ot+=Math.max(0,he),Rn<It&&ef(y,pe,0,It-Rn,Cn,ne-1),0<Ct&&(Te||Uf(y,0,Ct,0,ne-1),It+=Ct))),Ct=Te=0,pe){case $d:x?Te+=Ot/2-y.focus.x-Je/2:Ct+=It/2-y.focus.y-Je/2;break;case Hf:0<$n?x?Te+=Ot/2-y.focus.x-Je/2:Ct+=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,Ct+=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,Ot+=Je):(Ct-=Je,It+=Je);break;case Tu:x?(Te+=Ot-y.width+Je,Ot+=Je):(Ct+=It-y.height+Je,It+=Je);break;case Mh:case Mu:x?1<ne?Te+=un+Xe/2-y.focus.x:Te+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Ct+=un+Xe/2-y.focus.y:Ct+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Lh:x?Te+=Ot+Xe/2-y.focus.x:Ct+=It+Xe/2-y.focus.y;break;case Zu:break;default:a=a.customAlignment(y,Te,Ct,Ot,It),Te=a[0],Ct=a[1],Ot=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?-Ot:-Je.Da.width)+Je.la.x-he:ye+he+Je.la.x),Je.S.y+Je.la.y-Ct);x?(Ot=Ny(y,Ot,Te),0>Te&&(Te=0),135<b&&(Ct+=It+he),It=Math.max(Math.max(It,jt),It+jt+he)):(135<b&&(Te+=Ot+he),Ot=Math.max(Math.max(Ot,ye),Ot+ye+he),It=Ay(y,It,Ct),0>Ct&&(Ct=0)),y.la.h(Te,Ct),y.Da.h(Ot,It)}}Yr.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 Qt(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new Qt(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 Ct=a.computeBusNodeSpacing(Je)-se;Je.S.h(b-(it.width+Ct),Ge+Tt),E=Math.max(E,it.width+Ct),te=Math.max(te,Ge+Tt+it.height),Ge+=Tt+it.height}else Ct=a.computeBusNodeSpacing(Je)-se,Je.S.h(Te+Tt,b-(it.height+Ct)),te=Math.max(te,it.height+Ct),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],Ct=Tt.Da;var jt=ye===0?0:he;if(pe){var Ot=a.computeBusNodeSpacing(Tt)-se;Tt.S.h(Te+Ot,Ge+jt),E=Math.max(E,Te+Ct.width+Ot),te=Math.max(te,Ge+jt+Ct.height),Ge+=jt+Ct.height}else Ot=a.computeBusNodeSpacing(Tt)-se,Tt.S.h(Te+jt,Ge+Ot),E=Math.max(E,Te+jt+Ct.width),te=Math.max(te,Ge+Ct.height+Ot),Te+=jt+Ct.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 Qt(b,0,E,te)}function fx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new Qt(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new Qt(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 Ct=a.computeBusNodeSpacing(Je)-se;Ge-=Tt+it.height,Je.S.h(b-(it.width+Ct),Ge),E=Math.max(E,it.width+Ct),te=Math.max(te,Math.abs(Ge))}else Ct=a.computeBusNodeSpacing(Je)-se,Te-=Tt+it.width,Je.S.h(Te,b-(it.height+Ct)),te=Math.max(te,it.height+Ct),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],Ct=Tt.Da;var jt=ye===0?0:he;if(pe){var Ot=a.computeBusNodeSpacing(Tt)-se;Ge-=jt+Ct.height,Tt.S.h(Te+Ot,Ge),E=Math.max(E,Te+Ct.width+Ot),te=Math.max(te,Math.abs(Ge))}else Ot=a.computeBusNodeSpacing(Tt)-se,Te-=jt+Ct.width,Tt.S.h(Te,Ge+Ot),te=Math.max(te,Ge+Ct.height+Ot),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 Qt(b,0,E,te)}Yr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Yr.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:Nt("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:Nt("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 Ct=te;x+1<Te.length&&(Ct=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 Ot=Ge;te.y===pe?Ot=he-te.x:te.y>pe&&te.y<jt?Ot=he+(te.y-pe)/(jt-pe)*(Tt-he)-te.x:pe>te.y&&pe<Ct.y&&(Ot=he-(te.x+(pe-te.y)/(Ct.y-te.y)*(Ct.x-te.x))),Ot<Ge&&(Ge=Ot),Ct.y<=te.y?x++:jt<=pe?E++:(Ct.y<=jt&&x++,jt<=Ct.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;)Ct=Te[x++],ye[E++].h(Ct.x,Ct.y);for(;pe<te.length;)Ct=te[pe++],ye[E++].h(Ct.x+he,Ct.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 Qt(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,Ct=te,x+1<Te.length&&(Ct=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),Ot=b,te.x===he?Ot=pe-te.y:te.x>he&&te.x<Tt?Ot=pe+(te.x-he)/(Tt-he)*(jt-pe)-te.y:he>te.x&&he<Ct.x&&(Ot=pe-(te.y+(he-te.x)/(Ct.x-te.x)*(Ct.y-te.y))),Ot<b&&(b=Ot),Ct.x<=te.x?x++:Tt<=he?E++:(Ct.x<=Tt&&x++,Tt<=Ct.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;)Ct=Te[x++],ye[E++].h(Ct.x,Ct.y);for(;pe<te.length;)Ct=te[pe++],ye[E++].h(Ct.x,Ct.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 Qt(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)}Yr.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:Nt("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:Nt("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)}}}Yr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Yr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Yr.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 Qt(0,te,x,se))):this.angle===90?(E.push(new Qt(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new Qt(te,0,se,x))):(E.push(new Qt(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},Yr.prototype.commitLayers=function(){},Yr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Yr.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])}}Yr.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}Yr.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},Yr.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)},Yt.Object.defineProperties(Yr.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()):Nt("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 dn(Yr,"PathDefault",-1),Eu=new dn(Yr,"PathDestination",0),Wf=new dn(Yr,"PathSource",1),Yd=new dn(Yr,"SortingForwards",10),kg=new dn(Yr,"SortingReverse",11),Tg=new dn(Yr,"SortingAscending",12),Mg=new dn(Yr,"SortingDescending",13),$d=new dn(Yr,"AlignmentCenterSubtrees",20),Hf=new dn(Yr,"AlignmentCenterChildren",21),ku=new dn(Yr,"AlignmentStart",22),Tu=new dn(Yr,"AlignmentEnd",23),Mh=new dn(Yr,"AlignmentBus",24),Mu=new dn(Yr,"AlignmentBusBranching",25),Lh=new dn(Yr,"AlignmentTopLeftBus",26),Zu=new dn(Yr,"AlignmentBottomRightBus",27),F0=new dn(Yr,"CompactionNone",30),Lg=new dn(Yr,"CompactionBlock",31),D0=new dn(Yr,"StyleLayered",40),Fy=new dn(Yr,"StyleLastParents",41),Dy=new dn(Yr,"StyleAlternating",42),By=new dn(Yr,"StyleRootOnly",43),B0=new dn(Yr,"ArrangementVertical",50),Iy=new dn(Yr,"ArrangementHorizontal",51),I0=new dn(Yr,"ArrangementFixedRoots",52),Ry=new dn(Yr,"LayerIndividual",60),_y=new dn(Yr,"LayerSiblings",61),R0=new dn(Yr,"LayerUniform",62);Yr.className="TreeLayout",Yr.PathDefault=O0,Yr.PathDestination=Eu,Yr.PathSource=Wf,Yr.SortingForwards=Yd,Yr.SortingReverse=kg,Yr.SortingAscending=Tg,Yr.SortingDescending=Mg,Yr.AlignmentCenterSubtrees=$d,Yr.AlignmentCenterChildren=Hf,Yr.AlignmentStart=ku,Yr.AlignmentEnd=Tu,Yr.AlignmentBus=Mh,Yr.AlignmentBusBranching=Mu,Yr.AlignmentTopLeftBus=Lh,Yr.AlignmentBottomRightBus=Zu,Yr.CompactionNone=F0,Yr.CompactionBlock=Lg,Yr.StyleLayered=D0,Yr.StyleLastParents=Fy,Yr.StyleAlternating=Dy,Yr.StyleRootOnly=By,Yr.ArrangementVertical=B0,Yr.ArrangementHorizontal=Iy,Yr.ArrangementFixedRoots=I0,Yr.LayerIndividual=Ry,Yr.LayerSiblings=_y,Yr.LayerUniform=R0;function Kf(a){Zi.call(this,a)}rn(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}rn(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)},Yt.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)}rn(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:Nt("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))):Nt("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()))}}},Yt.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",Ji.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=Nn.go,zy={get licenseKey(){return Zt.licenseKey},set licenseKey(a){Zt.licenseKey=a},get version(){return Zt.version},Group:Tr,EnumValue:dn,List:mn,Set:vn,Map:Jt,Point:lt,Size:ln,Rect:Qt,Margin:Ar,Spot:Qn,Geometry:bn,PathFigure:Fo,PathSegment:fi,InputEvent:ma,DiagramEvent:hu,ChangedEvent:ao,Model:ir,GraphLinksModel:ni,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:Ji,Animation:ya,AnimationManager:Es,AnimationTrigger:wl,Layer:ra,Diagram:Zt,Palette:Ee,Overview:Oe,Brush:Ti,GraphObject:zt,Panel:xn,RowColumnDefinition:Ro,Shape:Br,TextBlock:Vi,Picture:us,Part:hr,Adornment:di,Node:Gn,Link:En,Placeholder:Ja,Layout:lo,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:Ai,LayeredDigraphNetwork:Xd,LayeredDigraphVertex:nl,LayeredDigraphEdge:Cg,TreeLayout:Yr,TreeNetwork:Kf,TreeVertex:gl,TreeEdge:Jd};typeof _0=="object"&&_0.version&&jn("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,Nn.go=zy,typeof gn.exports=="object"&&(gn.exports=typeof at.g!="undefined"?at.g.go:self.go)}();var gt=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,xe=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,Re=Bt.DraggingInfo,We=Bt.LinkingBaseTool,Ye=Bt.LinkingTool,Ue=Bt.RelinkingTool,Ke=Bt.LinkReshapingTool,ot=Bt.ResizingTool,st=Bt.RotatingTool,ft=Bt.ClickSelectingTool,bt=Bt.ActionTool,$e=Bt.ClickCreatingTool,nt=Bt.HTMLInfo,xt=Bt.ContextMenuTool,wt=Bt.DragSelectingTool,Pt=Bt.PanningTool,dt=Bt.TextEditingTool,ct=Bt.ToolManager,ht=Bt.Animation,Et=Bt.AnimationManager,vt=Bt.AnimationTrigger,Ft=Bt.Layer,mt=Bt.Diagram,St=Bt.Palette,tt=Bt.Overview,Ve=Bt.Brush,we=Bt.GraphObject,Le=Bt.Panel,Ze=Bt.RowColumnDefinition,rt=Bt.Shape,Ie=Bt.TextBlock,_e=Bt.TextBlockMetrics,He=Bt.Picture,Qe=Bt.Part,ut=Bt.Adornment,pt=Bt.Node,Mt=Bt.Link,At=Bt.Placeholder,Dt=Bt.Layout,Kt=Bt.LayoutNetwork,Xt=Bt.LayoutVertex,$t=Bt.LayoutEdge,Ut=Bt.GridLayout,sn=Bt.PanelLayout,tn=Bt.CircularLayout,Wt=Bt.CircularNetwork,Pn=Bt.CircularVertex,Sn=Bt.CircularEdge,Tn=Bt.ForceDirectedLayout,Kn=Bt.ForceDirectedNetwork,Mr=Bt.ForceDirectedVertex,fr=Bt.ForceDirectedEdge,Er=Bt.LayeredDigraphLayout,Hr=Bt.LayeredDigraphNetwork,Ur=Bt.LayeredDigraphVertex,ri=Bt.LayeredDigraphEdge,Pi=Bt.TreeLayout,Ui=Bt.TreeNetwork,Fi=Bt.TreeVertex,zi=Bt.TreeEdge,Xi=Bt.version},24334:function(gn,cn,at){var gt,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("")},xe=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 xe(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,ft=Ue.length;st<ft;st+=3){var bt=Ue[st],$e=Ue[st+1],nt=Ue[st+2],xt=bt<<16|$e<<8|nt;ot+=fe.charAt(xt>>>18)+fe.charAt(xt>>>12&63)+(typeof $e!="undefined"?fe.charAt(xt>>>6&63):"=")+(typeof nt!="undefined"?fe.charAt(xt&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),ft=[ke(st>>>16),ke(st>>>8&255),ke(st&255)];return ft.length-=[0,0,2,1][ot],ft.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))},Re;oe.Uint8Array&&(Re=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:xe,fromBase64:Ae,toBase64:ee,utob:Me,encode:ee,encodeURI:ae,btou:ge,decode:Ae,noConflict:We,fromUint8Array:ie,toUint8Array:Re},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:(gt=[],Bt=function(){return oe.Base64}.apply(cn,gt),Bt!==void 0&&(gn.exports=Bt)),{Base64:oe.Base64}})},2859:function(gn,cn,at){"use strict";at.d(cn,{hP:function(){return tt}});var gt=function(Ve,we){return(gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Le,Ze){Le.__proto__=Ze}||function(Le,Ze){for(var rt in Ze)Object.prototype.hasOwnProperty.call(Ze,rt)&&(Le[rt]=Ze[rt])})(Ve,we)};function Bt(Ve,we){function Le(){this.constructor=Ve}gt(Ve,we),Ve.prototype=we===null?Object.create(we):(Le.prototype=we.prototype,new Le)}function oe(Ve,we,Le,Ze){return new(Le||(Le=Promise))(function(rt,Ie){function _e(ut){try{Qe(Ze.next(ut))}catch(pt){Ie(pt)}}function He(ut){try{Qe(Ze.throw(ut))}catch(pt){Ie(pt)}}function Qe(ut){var pt;ut.done?rt(ut.value):(pt=ut.value,pt instanceof Le?pt:new Le(function(Mt){Mt(pt)})).then(_e,He)}Qe((Ze=Ze.apply(Ve,we||[])).next())})}function ze(Ve,we){var Le,Ze,rt,Ie,_e={label:0,sent:function(){if(1&rt[0])throw rt[1];return rt[1]},trys:[],ops:[]};return Ie={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(Ie[Symbol.iterator]=function(){return this}),Ie;function He(Qe){return function(ut){return function(pt){if(Le)throw new TypeError("Generator is already executing.");for(;_e;)try{if(Le=1,Ze&&(rt=2&pt[0]?Ze.return:pt[0]?Ze.throw||((rt=Ze.return)&&rt.call(Ze),0):Ze.next)&&!(rt=rt.call(Ze,pt[1])).done)return rt;switch(Ze=0,rt&&(pt=[2&pt[0],rt.value]),pt[0]){case 0:case 1:rt=pt;break;case 4:return _e.label++,{value:pt[1],done:!1};case 5:_e.label++,Ze=pt[1],pt=[0];continue;case 7:pt=_e.ops.pop(),_e.trys.pop();continue;default:if(rt=_e.trys,!((rt=rt.length>0&&rt[rt.length-1])||pt[0]!==6&&pt[0]!==2)){_e=0;continue}if(pt[0]===3&&(!rt||pt[1]>rt[0]&&pt[1]<rt[3])){_e.label=pt[1];break}if(pt[0]===6&&_e.label<rt[1]){_e.label=rt[1],rt=pt;break}if(rt&&_e.label<rt[2]){_e.label=rt[2],_e.ops.push(pt);break}rt[2]&&_e.ops.pop(),_e.trys.pop();continue}pt=we.call(Ve,_e)}catch(Mt){pt=[6,Mt],Ze=0}finally{Le=rt=0}if(5&pt[0])throw pt[1];return{value:pt[0]?pt[1]:void 0,done:!0}}([Qe,ut])}}}function De(){for(var Ve=0,we=0,Le=arguments.length;we<Le;we++)Ve+=arguments[we].length;var Ze=Array(Ve),rt=0;for(we=0;we<Le;we++)for(var Ie=arguments[we],_e=0,He=Ie.length;_e<He;_e++,rt++)Ze[rt]=Ie[_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(we,Le){for(var Ze=0,rt=Le;Ze<rt.length;Ze++){var Ie=rt[Ze],_e=Ie[0],He=Ie[1];we.setAttribute(_e,He)}},Ve.createRect=function(we,Le,Ze){var rt=document.createElementNS("http://www.w3.org/2000/svg","rect");return rt.setAttribute("width",we.toString()),rt.setAttribute("height",Le.toString()),Ze&&Ve.setAttributes(rt,Ze),rt},Ve.createLine=function(we,Le,Ze,rt,Ie){var _e=document.createElementNS("http://www.w3.org/2000/svg","line");return _e.setAttribute("x1",we.toString()),_e.setAttribute("y1",Le.toString()),_e.setAttribute("x2",Ze.toString()),_e.setAttribute("y2",rt.toString()),Ie&&Ve.setAttributes(_e,Ie),_e},Ve.createPolygon=function(we,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ze.setAttribute("points",we),Le&&Ve.setAttributes(Ze,Le),Ze},Ve.createCircle=function(we,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ze.setAttribute("cx",(we/2).toString()),Ze.setAttribute("cy",(we/2).toString()),Ze.setAttribute("r",we.toString()),Le&&Ve.setAttributes(Ze,Le),Ze},Ve.createEllipse=function(we,Le,Ze){var rt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return rt.setAttribute("cx",(we/2).toString()),rt.setAttribute("cy",(Le/2).toString()),rt.setAttribute("rx",(we/2).toString()),rt.setAttribute("ry",(Le/2).toString()),Ze&&Ve.setAttributes(rt,Ze),rt},Ve.createGroup=function(we){var Le=document.createElementNS("http://www.w3.org/2000/svg","g");return we&&Ve.setAttributes(Le,we),Le},Ve.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ve.createMarker=function(we,Le,Ze,rt,Ie,_e,He){var Qe=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ve.setAttributes(Qe,[["id",we],["orient",Le],["markerWidth",Ze.toString()],["markerHeight",rt.toString()],["refX",Ie.toString()],["refY",_e.toString()]]),Qe.appendChild(He),Qe},Ve.createText=function(we){var Le=document.createElementNS("http://www.w3.org/2000/svg","text");return Le.setAttribute("x","0"),Le.setAttribute("y","0"),we&&Ve.setAttributes(Le,we),Le},Ve.createTSpan=function(we,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ze.textContent=we,Le&&Ve.setAttributes(Ze,Le),Ze},Ve.createImage=function(we){var Le=document.createElementNS("http://www.w3.org/2000/svg","image");return we&&Ve.setAttributes(Le,we),Le},Ve.createPoint=function(we,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ze.x=we,Ze.y=Le,Ze},Ve.createPath=function(we,Le){var Ze=document.createElementNS("http://www.w3.org/2000/svg","path");return Ze.setAttribute("d",we),Le&&Ve.setAttributes(Ze,Le),Ze},Ve}(),me=function(){function Ve(){}return Ve.addKey=function(we){Ve.key=we},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(we,Le,Ze){var rt=this;return new Promise(function(Ie){var _e=Ze!==void 0?Ze:document.createElement("canvas");we===null&&(rt.markersOnly=!0,rt.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,rt.naturalSize===!0?(He.width.baseVal.value=we.naturalWidth,He.height.baseVal.value=we.naturalHeight):rt.width!==void 0&&rt.height!==void 0&&(He.width.baseVal.value=rt.width,He.height.baseVal.value=rt.height),_e.width=He.width.baseVal.value,_e.height=He.height.baseVal.value;var Qe=He.outerHTML,ut=_e.getContext("2d");rt.markersOnly!==!0&&ut.drawImage(we,0,0,_e.width,_e.height);var pt=window.URL,Mt=new Image(_e.width,_e.height);Mt.setAttribute("crossOrigin","anonymous");var At=new Blob([Qe],{type:"image/svg+xml"}),Dt=pt.createObjectURL(At);Mt.onload=function(){ut.drawImage(Mt,0,0),pt.revokeObjectURL(Dt);var Kt=_e.toDataURL(rt.imageType,rt.imageQuality);Ie(Kt)},Mt.src=Dt})},Ve}(),Ce=function(){},Se=function(){function Ve(we){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+we+"_"}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(we){return this.styleSheet===void 0&&this.addStyleSheet(),we.name=""+this.classNamePrefix+we.localName,this.classes.push(we),this.styleSheet.sheet.insertRule("."+we.name+" {"+we.style+"}",this.styleSheet.sheet.cssRules.length),we},Ve.prototype.addRule=function(we){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(we),this.styleSheet.sheet.insertRule(we.selector+" {"+we.style+"}",this.styleSheet.sheet.cssRules.length)},Ve.prototype.addStyleSheet=function(){var we;this.styleSheet=document.createElement("style"),((we=this.styleSheetRoot)!==null&&we!==void 0?we: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 we;this.styleSheet&&(((we=this.styleSheetRoot)!==null&&we!==void 0?we:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ve}(),Me=function(Ve,we){this.selector=Ve,this.style=we},ve=function(Ve,we){this.localName=Ve,this.style=we},xe=function(){function Ve(we,Le,Ze,rt,Ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=we,this.displayMode=Le,this.markerItems=Ze,this.uiStyleSettings=rt,this.styles=Ie,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(we){var Le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,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(Ie){var _e=document.createElement("div");_e.className=""+Le.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",Ie.typeName),_e.innerHTML=Ie.icon,_e.addEventListener("click",function(){Le.markerToolbarButtonClicked(_e,Ie)}),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 rt=document.createElement("div");rt.className=this.toolbarBlockStyleClass.name,rt.style.whiteSpace="nowrap",rt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(rt),this.addActionButton(rt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(rt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ve.prototype.addButtonClickListener=function(we){this.buttonClickListeners.push(we)},Ve.prototype.removeButtonClickListener=function(we){this.buttonClickListeners.indexOf(we)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(we),1)},Ve.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ve.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var we=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<we||Le===we&&this.markerButtons.length-1===we?this.markerButtonBlock.appendChild(this.markerButtons[Le]):(Le===we&&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 we=this;this.buttons.forEach(function(Le){Le.className=Le.className.replace(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name,"").trim(),Le.className=Le.className.replace(we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?we.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:we.toolbarActiveButtonStyleColorsClass.name,"").trim(),Le.className+=" "+(we.uiStyleSettings.toolbarButtonStyleColorsClassName?we.uiStyleSettings.toolbarButtonStyleColorsClassName:we.toolbarButtonStyleColorsClass.name)})},Ve.prototype.addActionButton=function(we,Le,Ze){var rt=this,Ie=document.createElement("div");switch(Ie.className=""+this.toolbarButtonStyleClass.name,Ie.innerHTML=Le,Ie.setAttribute("data-action",Ze),Ie.addEventListener("click",function(){rt.actionToolbarButtonClicked(Ie,Ze)}),Ze){case"select":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ie.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ie.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ie.style.fill=this.uiStyleSettings.closeButtonColor}we.appendChild(Ie),this.buttons.push(Ie)},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 we=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*we)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*we)+`px;
padding: `+we+`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(we,Le){this.setActiveButton(we),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ze){return Ze("marker",Le)}),this.markerButtonOverflowBlock.style.display="none"},Ve.prototype.actionToolbarButtonClicked=function(we,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(we){this.resetButtonStyles(),we.className=we.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),we.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ve.prototype.setActiveMarkerButton=function(we){var Le=this.markerButtons.find(function(Ze){return Ze.getAttribute("data-type-name")===we});Le&&this.setActiveButton(Le)},Ve.prototype.setCurrentMarker=function(we){var Le=this;this.currentMarker=we,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(we,Le,Ze,rt){this.panels=[],this.panelButtons=[],this.markerjsContainer=we,this.displayMode=Le,this.uiStyleSettings=Ze,this.styles=rt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ve.prototype.addStyles=function(){var we;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: `+((we=this.uiStyleSettings.toolboxBackgroundColor)!==null&&we!==void 0?we: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(we){var Le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=we,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(we){var Le,Ze,rt=this;this.panels=we,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(Ie){var _e;Ie.uiStyleSettings=rt.uiStyleSettings;var He=document.createElement("div");He.className=rt.toolboxButtonStyleClass.name+" "+((_e=rt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:rt.toolboxButtonStyleColorsClass.name),He.innerHTML=Ie.icon,He.title=Ie.title,He.addEventListener("click",function(){rt.panelButtonClick(Ie)}),rt.panelButtons.push(He),rt.buttonRow.appendChild(He)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ve.prototype.panelButtonClick=function(we){var Le=this,Ze=-1;if(we!==this.activePanel){Ze=this.panels.indexOf(we),this.panelRow.innerHTML="";var rt=we.getUi();rt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(rt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=we}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(Ie,_e){var He,Qe;Ie.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,we){this.title=Ve,this.icon=we},ee=function(Ve){function we(Le,Ze,rt,Ie){var _e=Ve.call(this,Le,Ie||'<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=rt,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return Bt(we,Ve),we.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");return Ze.style.overflow="hidden",Ze.style.whiteSpace="nowrap",this.colors.forEach(function(rt){var Ie=Le.getColorBox(rt);Ze.appendChild(Ie),Le.colorBoxes.push(Ie)}),Ze},we.prototype.getColorBox=function(Le){var Ze=this,rt=this.uiStyleSettings.toolbarHeight/4,Ie=this.uiStyleSettings.toolbarHeight-rt,_e=document.createElement("div");_e.style.display="inline-block",_e.style.boxSizing="content-box",_e.style.width=Ie-2+"px",_e.style.height=Ie-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=(Ie+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=Ie-2+"px",He.style.height=Ie-2+"px",He.style.backgroundColor=Le,He.style.borderRadius=Ie/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},we.prototype.setCurrentColor=function(Le,Ze){var rt=this;this.currentColor=Le,this.colorBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Le)},we}(z),ae=function(){function Ve(we,Le,Ze){this._state="new",this._isSelected=!1,this._container=we,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(we){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(we,Le){},Ve.prototype.dblClick=function(we,Le){},Ve.prototype.manipulate=function(we){},Ve.prototype.pointerUp=function(we){this.stateChanged()},Ve.prototype.dispose=function(){},Ve.prototype.addMarkerVisualToContainer=function(we){this.container.childNodes.length>0?this.container.insertBefore(we,this.container.childNodes[0]):this.container.appendChild(we)},Ve.prototype.getState=function(){return{typeName:Ve.typeName,state:this.state,notes:this.notes}},Ve.prototype.restoreState=function(we){this._state=we.state,this.notes=we.notes},Ve.prototype.scale=function(we,Le){},Ve.prototype.colorChanged=function(we){this.onColorChanged&&this.onColorChanged(we),this.stateChanged()},Ve.prototype.fillColorChanged=function(we){this.onFillColorChanged&&this.onFillColorChanged(we),this.stateChanged()},Ve.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var we=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),we.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(we)&&this.onStateChanged(this)}},Ve.typeName="MarkerBase",Ve}(),ie=function(){function Ve(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ve.prototype.findGripByVisual=function(we){return this.topLeft.ownsTarget(we)?this.topLeft:this.topCenter.ownsTarget(we)?this.topCenter:this.topRight.ownsTarget(we)?this.topRight:this.centerLeft.ownsTarget(we)?this.centerLeft:this.centerRight.ownsTarget(we)?this.centerRight:this.bottomLeft.ownsTarget(we)?this.bottomLeft:this.bottomCenter.ownsTarget(we)?this.bottomCenter:this.bottomRight.ownsTarget(we)?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(we){return we===this.visual||we===this.visual.childNodes[0]||we===this.visual.childNodes[1]},Ve}(),ue=function(){function Ve(){}return Ve.toITransformMatrix=function(we){return{a:we.a,b:we.b,c:we.c,d:we.d,e:we.e,f:we.f}},Ve.toSVGMatrix=function(we,Le){return we.a=Le.a,we.b=Le.b,we.c=Le.c,we.d=Le.d,we.e=Le.e,we.f=Le.f,we},Ve}(),ge=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.left=0,Ie.top=0,Ie.width=0,Ie.height=0,Ie.defaultSize={x:50,y:20},Ie.offsetX=0,Ie.offsetY=0,Ie.rotationAngle=0,Ie.CB_DISTANCE=10,Ie._suppressMarkerCreateEvent=!1,Ie.container.transform.baseVal.appendItem(fe.createTransform()),Ie.setupControlBox(),Ie}return Bt(we,Ve),Object.defineProperty(we.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(we.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(we.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}),we.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))},we.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 rt=this.unrotatePoint(Le);if(this.manipulationStartX=rt.x,this.manipulationStartY=rt.y,this.offsetX=rt.x-this.left,this.offsetY=rt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ze),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ze)){this.activeGrip=this.rotatorGrip;var Ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ie.x-this.width/2,this.top=Ie.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"},we.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)},we.prototype.moveVisual=function(Le){this.visual.style.transform="translate("+Le.x+"px, "+Le.y+"px)"},we.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)},we.prototype.resize=function(Le){var Ze=this.manipulationStartLeft,rt=this.manipulationStartWidth,Ie=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,rt=this.manipulationStartWidth+this.manipulationStartLeft-Ze;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:rt=this.manipulationStartWidth+Le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ie=this.manipulationStartTop+Le.y-this.manipulationStartY,_e=this.manipulationStartHeight+this.manipulationStartTop-Ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_e=this.manipulationStartHeight+Le.y-this.manipulationStartY}rt>=0?(this.left=Ze,this.width=rt):(this.left=Ze+rt,this.width=-rt),_e>=0?(this.top=Ie,this.height=_e):(this.top=Ie+_e,this.height=-_e),this.setSize()},we.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},we.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()}},we.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)},we.prototype.rotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Ze=this.container.getCTM(),rt=fe.createPoint(Le.x,Le.y);return{x:(rt=rt.matrixTransform(Ze)).x,y:rt.y}},we.prototype.unrotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Ze=this.container.getCTM();Ze=Ze.inverse();var rt=fe.createPoint(Le.x,Le.y);return{x:(rt=rt.matrixTransform(Ze)).x,y:rt.y}},we.prototype.select=function(){Ve.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},we.prototype.deselect=function(){Ve.prototype.deselect.call(this),this.controlBox.style.display="none"},we.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"},we.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()},we.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()},we.prototype.createGrip=function(){var Le=new le;return Le.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Le.visual),Le},we.prototype.positionGrips=function(){var Le=this.controlGrips.topLeft.GRIP_SIZE,Ze=-Le/2,rt=Ze,Ie=(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,rt),this.positionGrip(this.controlGrips.topCenter.visual,Ie,rt),this.positionGrip(this.controlGrips.topRight.visual,Qe,rt),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,Ie,He),this.positionGrip(this.controlGrips.bottomRight.visual,Qe,He),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ie,rt-3*this.CB_DISTANCE)},we.prototype.positionGrip=function(Le,Ze,rt){var Ie=Le.transform.baseVal.getItem(0);Ie.setTranslate(Ze,rt),Le.transform.baseVal.replaceItem(Ie,0)},we.prototype.hideControlBox=function(){this.controlBox.style.display="none"},we.prototype.showControlBox=function(){this.controlBox.style.display=""},we.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))},we.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))},we.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze);var rt=this.rotatePoint({x:this.left,y:this.top}),Ie=this.unrotatePoint({x:rt.x*Le,y:rt.y*Ze});this.left=Ie.x,this.top=Ie.y,this.width=this.width*Le,this.height=this.height*Ze,this.adjustControlBox()},we}(ae),Pe=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual)},we.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)},we.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},we.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le)},we.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},we.prototype.setSize=function(){Ve.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},we.prototype.pointerUp=function(Le){Ve.prototype.pointerUp.call(this,Le),this.setSize()},we.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},we.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.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))},we.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()},we.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setSize()},we.title="Rectangle marker",we}(ge),je=function(Ve){function we(Le,Ze,rt,Ie){var _e=Ve.call(this,Le,Ie||'<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=rt,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return Bt(we,Ve),we.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(rt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.flexGrow="2",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=rt===Le.currentWidth?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Le.setCurrentWidth(rt,Ie)}),Ze.appendChild(Ie);var _e=document.createElement("div");_e.innerText=rt.toString(),_e.style.marginRight="5px",Ie.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=rt+"px solid "+Le.uiStyleSettings.toolboxColor,Qe.style.flexGrow="2",He.appendChild(Qe),Ie.appendChild(He),Le.widthBoxes.push(Ie)}),Ze},we.prototype.setCurrentWidth=function(Le,Ze){var rt=this;this.currentWidth=Le,this.widthBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},we}(z),Be=function(Ve){function we(Le,Ze,rt,Ie){var _e=Ve.call(this,Le,Ie||'<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=rt,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return Bt(we,Ve),we.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(rt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Le.styles.length-5+"%",Ie.style.borderColor=rt===Le.currentStyle?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Le.setCurrentStyle(rt,Ie)}),Ze.appendChild(Ie);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" '+(rt!==""?'stroke-dasharray="'+rt+'"':"")+` />
</svg>`;_e.innerHTML=He,Ie.appendChild(_e),Le.styleBoxes.push(Ie)}),Ze},we.prototype.setCurrentStyle=function(Le,Ze){var rt=this;this.currentStyle=Le,this.styleBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},we}(z),Fe=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Bt(we,Ve),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=we.typeName,Le},we.typeName="FrameMarker",we.title="Frame marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',we}(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 we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.x1=0,Ie.y1=0,Ie.x2=0,Ie.y2=0,Ie.defaultLength=50,Ie.manipulationStartX=0,Ie.manipulationStartY=0,Ie.manipulationStartX1=0,Ie.manipulationStartY1=0,Ie.manipulationStartX2=0,Ie.manipulationStartY2=0,Ie.setupControlBox(),Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return!!Ve.prototype.ownsTarget.call(this,Le)||!(!this.grip1.ownsTarget(Le)&&!this.grip2.ownsTarget(Le))},we.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")},we.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)},we.prototype.adjustVisual=function(){},we.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)},we.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()},we.prototype.select=function(){Ve.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},we.prototype.deselect=function(){Ve.prototype.deselect.call(this),this.controlBox.style.display="none"},we.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},we.prototype.adjustControlBox=function(){this.positionGrips()},we.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},we.prototype.createGrip=function(){var Le=new le;return Le.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Le.visual),Le},we.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)},we.prototype.positionGrip=function(Le,Ze,rt){var Ie=Le.transform.baseVal.getItem(0);Ie.setTranslate(Ze,rt),Le.transform.baseVal.replaceItem(Ie,0)},we.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ve.prototype.getState.call(this))},we.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},we.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()},we}(ae),Re=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorLine&&Le!==this.visibleLine)},we.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)},we.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},we.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()]]))},we.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ve.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.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()},we.typeName="LineMarker",we.title="Line marker",we.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',we}(Ae),We=function(Ve){function we(Le,Ze,rt,Ie){var _e=Ve.call(this,Le,Ie||'<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=rt,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return Bt(we,Ve),we.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");return Ze.style.overflow="hidden",Ze.style.flexGrow="2",this.fonts.forEach(function(rt){var Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Le.fonts.length-5+"%",Ie.style.borderColor=rt===Le.currentFont?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Le.setCurrentFont(rt,Ie)}),Ze.appendChild(Ie);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=rt,_e.style.overflow="hidden";var 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),Ie.appendChild(_e),Le.fontBoxes.push(Ie)}),Ze},we.prototype.setCurrentFont=function(Le,Ze){var rt=this;this.currentFont=Le,this.fontBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},we}(z),Ye=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.color="transparent",Ie.padding=5,Ie.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ie.text=Ie.DEFAULT_TEXT,Ie.isMoved=!1,Ie.color=rt.defaultColor,Ie.fontFamily=rt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setColor=Ie.setColor.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.renderText=Ie.renderText.bind(Ie),Ie.sizeText=Ie.sizeText.bind(Ie),Ie.textEditDivClicked=Ie.textEditDivClicked.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.setSize=Ie.setSize.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.colorPanel=new ee("Color",rt.defaultColorSet,rt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.fontFamilyPanel=new We("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie}return Bt(we,Ve),we.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(rt){rt===Le&&(Ze=!0)}),Ze},we.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()},we.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")},we.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)}},we.prototype.getTextScale=function(){var Le=this.textElement.getBBox(),Ze=1;if(Le.width>0&&Le.height>0){var rt=(1*this.width-this.width*this.padding*2/100)/Le.width,Ie=(1*this.height-this.height*this.padding*2/100)/Le.height;Ze=Math.min(rt,Ie)}return Ze},we.prototype.getTextPosition=function(Le){var Ze=this.textElement.getBBox(),rt=0,Ie=0;return Ze.width>0&&Ze.height>0&&(rt=(this.width-Ze.width*Le)/2,Ie=this.height/2-Ze.height*Le/2),{x:rt,y:Ie}},we.prototype.sizeText=function(){var Le=this.textElement.getBBox(),Ze=this.getTextScale(),rt=this.getTextPosition(Ze);rt.y-=Le.y*Ze,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+rt.x+"px, "+rt.y+"px) scale("+Ze+", "+Ze+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(rt.x,rt.y),this.textElement.transform.baseVal.getItem(1).setScale(Ze,Ze))},we.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)},we.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.isMoved=!0,this.setSize(),this.sizeText()},we.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()]]))},we.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},we.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 rt=Ze.clipboardData.getData("text"),Ie=window.getSelection();if(!Ie.rangeCount)return!1;Ie.deleteFromDocument(),Ie.getRangeAt(0).insertNode(document.createTextNode(rt)),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")},we.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}),rt=this.textElement.getBBox(),Ie={x:rt.width*Le,y:rt.height*Le};Ze.x-=Ie.x/2,Ze.y-=Ie.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"}},we.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()},we.prototype.select=function(){Ve.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},we.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ve.prototype.deselect.call(this)},we.prototype.dblClick=function(Le,Ze){Ve.prototype.dblClick.call(this,Le,Ze),this.showTextEditor()},we.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)},we.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()},we.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},we.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),we.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=we.typeName,Le},we.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()},we.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setSize(),this.sizeText(),this.positionTextEditor()},we.typeName="TextMarker",we.title="Text marker",we.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>',we}(ge),Ue=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.color="transparent",Ie.lineWidth=3,Ie.drawing=!1,Ie.pixelRatio=1,Ie.color=rt.defaultColor,Ie.lineWidth=rt.defaultStrokeWidth,Ie.pixelRatio=rt.freehandPixelRatio,Ie.setColor=Ie.setColor.bind(Ie),Ie.addCanvas=Ie.addCanvas.bind(Ie),Ie.finishCreation=Ie.finishCreation.bind(Ie),Ie.setLineWidth=Ie.setLineWidth.bind(Ie),Ie.colorPanel=new ee("Color",rt.defaultColorSet,rt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.lineWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.lineWidthPanel.onWidthChanged=Ie.setLineWidth,Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.drawingImage)},we.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)},we.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)},we.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)},we.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()]])},we.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)},we.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)},we.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ve.prototype.select.call(this)},we.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ve.prototype.deselect.call(this)},we.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],rt=Ze[0],Ie=Ze[1],_e=Ze[2],He=Ze[3],Qe=!1,ut=0;ut<this.canvasElement.height;ut++)for(var pt=0;pt<this.canvasElement.width;pt++)Le.data[ut*this.canvasElement.width*4+4*pt+3]>0&&(Qe=!0,ut<Ie&&(Ie=ut),pt<rt&&(rt=pt),ut>He&&(He=ut),pt>_e&&(_e=pt));if(Qe){this.left=rt/this.pixelRatio,this.top=Ie/this.pixelRatio,this.width=(_e-rt)/this.pixelRatio,this.height=(He-Ie)/this.pixelRatio;var Mt=document.createElement("canvas");Mt.width=_e-rt,Mt.height=He-Ie,Mt.getContext("2d").putImageData(this.canvasContext.getImageData(rt,Ie,_e-rt,He-Ie),0,0),this.drawingImgUrl=Mt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},we.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})},we.prototype.setColor=function(Le){this.color=Le,this.colorChanged(Le)},we.prototype.setLineWidth=function(Le){this.lineWidth=Le},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Object.assign({drawingImgUrl:this.drawingImgUrl},Ve.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.drawingImgUrl=Le.drawingImgUrl,this.setDrawingImage()},we.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setDrawingImage()},we.typeName="FreehandMarker",we.title="Freehand marker",we.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>',we}(ge),Ke=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,rt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ie.typeBoxes=[],Ie.currentType=Ze,Ie.setCurrentType=Ie.setCurrentType.bind(Ie),Ie}return Bt(we,Ve),we.prototype.getUi=function(){var Le=this,Ze=document.createElement("div");Ze.style.display="flex",Ze.style.overflow="hidden",Ze.style.flexGrow="2";for(var rt=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===Ie.currentType?Ie.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){Le.setCurrentType(Qe,ut)}),Ze.appendChild(ut),Qe==="both"||Qe==="start"){var pt=document.createElement("div");pt.style.display="flex",pt.style.alignItems="center",pt.style.minHeight="20px",pt.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="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,pt.style.marginLeft="5px",ut.appendChild(pt)}var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.alignItems="center",Mt.style.minHeight="20px",Mt.style.flexGrow="2";var At=document.createElement("hr");if(At.style.minWidth="20px",At.style.border="0px",At.style.borderTop="3px solid "+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee"),At.style.flexGrow="2",Mt.appendChild(At),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="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Dt.style.marginRight="5px",ut.appendChild(Dt)}Ie.typeBoxes.push(ut)},Ie=this,_e=0;_e<4;_e++)rt(_e);return Ze},we.prototype.setCurrentType=function(Le,Ze){var rt=this;this.currentType=Le,this.typeBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?rt.uiStyleSettings!==void 0?rt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},we}(z),ot=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.arrowType="end",Ie.arrowBaseHeight=10,Ie.arrowBaseWidth=10,Ie.getArrowPoints=Ie.getArrowPoints.bind(Ie),Ie.setArrowType=Ie.setArrowType.bind(Ie),Ie.arrowTypePanel=new Ke("Arrow type","end"),Ie.arrowTypePanel.onArrowTypeChanged=Ie.setArrowType,Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.arrow1&&Le!==this.arrow2)},we.prototype.getArrowPoints=function(Le,Ze){var rt=this.arrowBaseWidth+2*this.strokeWidth,Ie=this.arrowBaseHeight+2*this.strokeWidth;return Le-rt/2+","+(Ze+Ie/2)+" "+Le+","+(Ze-Ie/2)+" "+(Le+rt/2)+","+(Ze+Ie/2)},we.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)},we.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="creating"&&this.createTips()},we.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 rt=this.arrow2.transform.baseVal.getItem(0);rt.setRotate(Le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(rt,0)}},we.prototype.setArrowType=function(Le){this.arrowType=Le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Object.assign({arrowType:this.arrowType},Ve.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Ze=Le;this.arrowType=Ze.arrowType,this.createTips(),this.adjustVisual()},we.typeName="ArrowMarker",we.title="Arrow marker",we.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',we}(Re),st=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.fillColor=rt.defaultFillColor,Ie.strokeWidth=0,Ie.fillPanel=new ee("Color",rt.defaultColorSet,rt.defaultFillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie}return Bt(we,Ve),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=we.typeName,Le},we.typeName="CoverMarker",we.title="Cover marker",we.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',we}(Pe),ft=function(Ve){function we(Le,Ze,rt,Ie){var _e=Ve.call(this,Le,Ie||'<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=rt,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return Bt(we,Ve),we.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(rt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="center",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=rt===Le.currentOpacity?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Le.setCurrentOpacity(rt,Ie)}),Ze.appendChild(Ie);var _e=document.createElement("div");_e.innerText=100*rt+"%",Ie.appendChild(_e),Le.opacityBoxes.push(Ie)}),Ze},we.prototype.setCurrentOpacity=function(Le,Ze){var rt=this;this.currentOpacity=Le,this.opacityBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Ze?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},we}(z),bt=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.fillColor=rt.defaultHighlightColor,Ie.strokeWidth=0,Ie.opacity=rt.defaultHighlightOpacity,Ie.fillPanel=new ee("Color",rt.defaultColorSet,Ie.fillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.opacityPanel=new ft("Opacity",rt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Bt(we,Ve),we.prototype.setOpacity=function(Le){this.opacity=Le,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=we.typeName,Le},we.typeName="HighlightMarker",we.title="Highlight marker",we.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>',we}(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>',nt='<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>',xt=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.bgColor="transparent",Ie.tipPosition={x:0,y:0},Ie.tipBase1Position={x:0,y:0},Ie.tipBase2Position={x:0,y:0},Ie.tipMoving=!1,Ie.color=rt.defaultStrokeColor,Ie.bgColor=rt.defaultFillColor,Ie.fontFamily=rt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setBgColor=Ie.setBgColor.bind(Ie),Ie.getTipPoints=Ie.getTipPoints.bind(Ie),Ie.positionTip=Ie.positionTip.bind(Ie),Ie.setTipPoints=Ie.setTipPoints.bind(Ie),Ie.colorPanel=new ee("Text color",rt.defaultColorSet,Ie.color,$e),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.bgColorPanel=new ee("Fill color",rt.defaultColorSet,Ie.bgColor,nt),Ie.bgColorPanel.onColorChanged=Ie.setBgColor,Ie.fontFamilyPanel=new We("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.tipGrip=new le,Ie.tipGrip.visual.transform.baseVal.appendItem(fe.createTransform()),Ie.controlBox.appendChild(Ie.tipGrip.visual),Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return Ve.prototype.ownsTarget.call(this,Le)||this.tipGrip.ownsTarget(Le)||this.tip===Le},we.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)},we.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)},we.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()}},we.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)},we.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)},we.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},we.prototype.setTipPoints=function(Le){Le===void 0&&(Le=!1);var Ze=Math.min(this.height/2,15),rt=this.height/5;Le&&(this.tipPosition={x:Ze+rt/2,y:this.height+20});var Ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(rt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:Ze,y:0},this.tipBase2Position={x:Ze+rt,y:0}):(this.tipBase1Position={x:0,y:Ze},this.tipBase2Position={x:0,y:Ze+rt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(rt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ze-rt,y:0},this.tipBase2Position={x:this.width-Ze,y:0}):(this.tipBase1Position={x:this.width,y:Ze},this.tipBase2Position={x:this.width,y:Ze+rt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(rt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ze-rt,y:this.height},this.tipBase2Position={x:this.width-Ze,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ze-rt},this.tipBase2Position={x:this.width,y:this.height-Ze}):Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(rt=this.width/5,Ze=Math.min(this.width/2,15),this.tipBase1Position={x:Ze,y:this.height},this.tipBase2Position={x:Ze+rt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ze},this.tipBase2Position={x:0,y:this.height-Ze-rt})},we.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.positionTip()},we.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(we.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),we.prototype.select=function(){this.positionTip(),Ve.prototype.select.call(this)},we.prototype.getState=function(){var Le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ve.prototype.getState.call(this));return Le.typeName=we.typeName,Le},we.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()},we.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()},we.typeName="CalloutMarker",we.title="Callout marker",we.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>',we}(Ye),wt=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.fillColor=rt.defaultFillColor,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.strokePanel=new ee("Line color",De(rt.defaultColorSet,["transparent"]),rt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new ee("Fill color",De(rt.defaultColorSet,["transparent"]),Ie.fillColor,nt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.opacityPanel=new ft("Opacity",rt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual)},we.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)},we.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},we.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le)},we.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},we.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()]])},we.prototype.pointerUp=function(Le){Ve.prototype.pointerUp.call(this,Le),this.setSize()},we.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},we.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},we.prototype.setOpacity=function(Le){this.opacity=Le,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),we.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=we.typeName,Le},we.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()},we.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setSize()},we.typeName="EllipseMarker",we.title="Ellipse marker",we.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>',we}(ge),Pt=function(Ve){function we(Le,Ze,rt){return Ve.call(this,Le,Ze,rt)||this}return Bt(we,Ve),Object.defineProperty(we.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),we.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.tip1&&Le!==this.tip2)},we.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)},we.prototype.pointerDown=function(Le,Ze){Ve.prototype.pointerDown.call(this,Le,Ze),this.state==="creating"&&this.createTips()},we.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 rt=this.tip2.transform.baseVal.getItem(0);rt.setRotate(Le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(rt,0)}},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=we.typeName,Le},we.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le),this.createTips(),this.adjustVisual()},we.typeName="MeasurementMarker",we.title="Measurement marker",we.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>',we}(Re),dt=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.strokePanel.colors=rt.defaultColorSet,Ie.fillColor="transparent",Ie}return Bt(we,Ve),Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=we.typeName,Le},we.typeName="EllipseFrameMarker",we.title="Ellipse frame marker",we.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>',we}(wt),ct=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(we){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(we)||(this.undoStack.push(we),JSON.stringify(this.lastRedoStep)!==JSON.stringify(we)&&this.redoStack.splice(0,this.redoStack.length))},Ve.prototype.replaceLastUndoStep=function(we){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=we)},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 we=this.undoStack.pop();return we!==void 0&&this.redoStack.push(we),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 we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.curveX=0,Ie.curveY=0,Ie.manipulationStartCurveX=0,Ie.manipulationStartCurveY=0,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.positionGrips=Ie.positionGrips.bind(Ie),Ie.addControlGrips=Ie.addControlGrips.bind(Ie),Ie.adjustVisual=Ie.adjustVisual.bind(Ie),Ie.setupControlBox=Ie.setupControlBox.bind(Ie),Ie.resize=Ie.resize.bind(Ie),Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorCurve&&Le!==this.visibleCurve&&!this.curveGrip.ownsTarget(Le))},we.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},we.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)},we.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")},we.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()]]))},we.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)},we.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ve.prototype.addControlGrips.call(this)},we.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()))},we.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)},we.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)},we.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual()},we.prototype.scale=function(Le,Ze){this.curveX=this.curveX*Le,this.curveY=this.curveY*Ze,Ve.prototype.scale.call(this,Le,Ze)},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),we.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=we.typeName,Le},we.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()},we.typeName="CurveMarker",we.title="Curve marker",we.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>',we}(Ae),Et=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,Ze,rt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.textColor="transparent",Ie.fontSize="1rem",Ie.isMoved=!1,Ie.captionText="Caption",Ie.PADDING=5,Ie.captionBoxWidth=0,Ie.captionBoxHeight=0,Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.fillColor=rt.defaultFillColor,Ie.textColor=rt.defaultStrokeColor,Ie.fontFamily=rt.defaultFontFamily,Ie.fontSize=rt.defaultCaptionFontSize,Ie.captionText=rt.defaultCaptionText,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.sizeCaption=Ie.sizeCaption.bind(Ie),Ie.setCaptionText=Ie.setCaptionText.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.finishTextEditing=Ie.finishTextEditing.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.setTextColor=Ie.setTextColor.bind(Ie),Ie.strokePanel=new ee("Line color",De(rt.defaultColorSet,["transparent"]),Ie.strokeColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new ee("Fill color",De(rt.defaultColorSet,["transparent"]),Ie.fillColor,nt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.fontFamilyPanel=new We("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.textColorPanel=new ee("Text color",rt.defaultColorSet,Ie.textColor,$e),Ie.textColorPanel.onColorChanged=Ie.setTextColor,Ie}return Bt(we,Ve),we.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.frame&&Le!==this.captionBg&&Le!==this.captionElement)},we.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()},we.prototype.setCaptionText=function(Le){this.captionText=Le,this.captionElement.textContent=this.captionText,this.sizeCaption()},we.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")},we.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)},we.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},we.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')"]])},we.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()},we.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"))},we.prototype.finishTextEditing=function(Le){this.setCaptionText(Le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},we.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()},we.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()},we.prototype.setSize=function(){Ve.prototype.setSize.call(this),fe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},we.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},we.prototype.dblClick=function(Le,Ze){Ve.prototype.dblClick.call(this,Le,Ze),this.showTextEditor()},we.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.frame&&fe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},we.prototype.setFillColor=function(Le){this.fillColor=Le,this.captionBg&&fe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},we.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.frame&&fe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},we.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.frame&&fe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(we.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),we.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},we.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()},we.prototype.scale=function(Le,Ze){Ve.prototype.scale.call(this,Le,Ze),this.setSize()},we.typeName="CaptionFrameMarker",we.title="Caption frame marker",we.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>',we}(ge),vt=function(){function Ve(we,Le){Le===void 0&&(Le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=we,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}(),Ft=function(Ve){function we(Le,Ze,rt){var Ie=Ve.call(this,Le,!1)||this;return Ie.dataUrl=Ze,Ie.state=rt,Ie}return Bt(we,Ve),we}(vt),mt=function(Ve){function we(Le,Ze,rt){rt===void 0&&(rt=!1);var Ie=Ve.call(this,Le,rt)||this;return Ie.marker=Ze,Ie}return Bt(we,Ve),we}(vt),St=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(we,Le){this[we].push(Le)},Ve.prototype.removeEventListener=function(we,Le){var Ze=this[we].indexOf(Le);Ze>-1&&this[we].splice(Ze,1)},Ve}(),tt=function(){function Ve(we){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 ct,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new St,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ve.instanceCounter++,this.styles=new Se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=we,this.targetRoot=document.body,this.width=we.clientWidth,this.height=we.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,dt,wt,bt,xt,Pt,st,Re,ht,Et]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,wt,bt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,bt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(we){var Le=this;this._availableMarkerTypes.splice(0),we.forEach(function(Ze){if(typeof Ze=="string"){var rt=Le.ALL_MARKER_TYPES.find(function(Ie){return Ie.typeName===Ze});rt!==void 0&&Le._availableMarkerTypes.push(rt)}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(we){this._zoomLevel=we,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 we=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 vt(we))})},Ve.prototype.render=function(){return oe(this,void 0,void 0,function(){var we;return ze(this,function(Le){switch(Le.label){case 0:return this.setCurrentMarker(),(we=new ke).naturalSize=this.renderAtNaturalSize,we.imageType=this.renderImageType,we.imageQuality=this.renderImageQuality,we.markersOnly=this.renderMarkersOnly,we.width=this.renderWidth,we.height=this.renderHeight,[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Le.sent(),[4,we.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Le.sent()]}})})},Ve.prototype.close=function(we){var Le=this;if(we===void 0&&(we=!1),this.isOpen){var Ze=!1;we||this.eventListeners.beforeclose.forEach(function(rt){var Ie=new vt(Le,!0);rt(Ie),Ie.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(rt){return rt(new vt(Le))}),this.detachEvents(),this._isOpen=!1)}},Ve.prototype.addMarkersToToolbar=function(){for(var we,Le=[],Ze=0;Ze<arguments.length;Ze++)Le[Ze]=arguments[Ze];(we=this._availableMarkerTypes).push.apply(we,Le)},Ve.prototype.addRenderEventListener=function(we){this.addEventListener("render",function(Le){we(Le.dataUrl,Le.state)})},Ve.prototype.removeRenderEventListener=function(we){},Ve.prototype.addCloseEventListener=function(we){this.addEventListener("close",function(){we()})},Ve.prototype.removeCloseEventListener=function(we){},Ve.prototype.setupResizeObserver=function(){var we=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){we.resize(we.target.clientWidth,we.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return we.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ve.prototype.onPopupTargetResize=function(){var we=1*this.target.clientWidth/this.target.clientHeight,Le=this.editorCanvas.clientWidth/we>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*we:this.editorCanvas.clientWidth,Ze=Le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/we;this.resize(Le,Ze)},Ve.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ve.prototype.resize=function(we,Le){this._isResizing=!0;var Ze=we/this.imageWidth,rt=Le/this.imageHeight;this.imageWidth=Math.round(we),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,rt),this._isResizing=!1},Ve.prototype.scaleMarkers=function(we,Le){var Ze,rt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(we,Le):(Ze=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ie){Ie!==rt._currentMarker&&Ie.scale(we,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 we=this.editingTarget.getBoundingClientRect(),Le=this.editorCanvas.getBoundingClientRect();this.left=we.left-Le.left,this.top=we.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 we,Le=[],Ze=0;Ze<arguments.length;Ze++)Le[Ze]=arguments[Ze];this.defs=fe.createDefs(),this.addDefsToImage(),(we=this.defs).append.apply(we,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 we=document.createElement("a");we.href="https://markerjs.com/",we.target="_blank",we.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>',we.title="Powered by marker.js",we.style.display="grid",we.style.alignItems="center",we.style.justifyItems="center",we.style.padding="3px",we.style.width="20px",we.style.height="20px",this.logoUI.appendChild(we),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 we=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=we+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new xe(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new 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(we){this.markerImage.removeChild(we.container),this.markers.indexOf(we)>-1&&this.markers.splice(this.markers.indexOf(we),1),we.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(we,Le){if(we==="marker"&&Le!==void 0)this.createNewMarker(Le);else if(we==="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 we=this;if(this._currentMarker!==void 0){var Le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(rt){var Ie=new mt(we,we._currentMarker,!0);rt(Ie),Ie.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(rt){return rt(new mt(we,Ze))})}}},Ve.prototype.clear=function(){var we=this,Le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var He=new mt(we,void 0,!0);_e(He),He.defaultPrevented&&(Le=!0)}),!Le)){this.setCurrentMarker();for(var Ze=function(_e){var He=rt.markers[_e];rt.setCurrentMarker(rt.markers[_e]),rt._currentMarker.dispose(),rt.markerImage.removeChild(rt._currentMarker.container),rt.markers.splice(rt.markers.indexOf(rt._currentMarker),1),rt.eventListeners.markerdelete.forEach(function(Qe){return Qe(new mt(we,He))})},rt=this,Ie=this.markers.length-1;Ie>=0;Ie--)Ze(Ie);this.addUndoStep()}},Object.defineProperty(Ve.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ve.prototype.showNotesEditor=function(){var we;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=(we=this._currentMarker.notes)!==null&&we!==void 0?we:"",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 we=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 rt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Le),rt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ie){return Ie(new vt(we))})}else this.undoRedoManager.replaceLastUndoStep(Le),this.eventListeners.statechange.forEach(function(Ie){return Ie(new vt(we))})}},Ve.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ve.prototype.undoStep=function(){var we=this,Le=this.undoRedoManager.undo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ze){return Ze(new vt(we))}))},Ve.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ve.prototype.redoStep=function(){var we=this,Le=this.undoRedoManager.redo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ze){return Ze(new vt(we))}))},Ve.prototype.stepZoom=function(){var we=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=we<this.zoomSteps.length-1?this.zoomSteps[we+1]:this.zoomSteps[0]},Ve.prototype.panTo=function(we){this.contentDiv.scrollBy({left:this.prevPanPoint.x-we.x,top:this.prevPanPoint.y-we.y}),this.prevPanPoint=we},Ve.prototype.startRenderAndClose=function(){return oe(this,void 0,void 0,function(){var we,Le,Ze=this;return ze(this,function(rt){switch(rt.label){case 0:return[4,this.render()];case 1:return we=rt.sent(),Le=this.getState(),this.eventListeners.render.forEach(function(Ie){return Ie(new Ft(Ze,we,Le))}),this.close(!0),[2]}})})},Ve.prototype.getState=function(we){we===!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(we){var Le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);we.markers.forEach(function(Ze){var rt=Le._availableMarkerTypes.find(function(_e){return _e.typeName===Ze.typeName});if(rt!==void 0){var Ie=Le.addNewMarker(rt);Ie.restoreState(Ze),Le.markers.push(Ie)}}),we.width&&we.height&&(we.width!==this.imageWidth||we.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/we.width,this.imageHeight/we.height),this.eventListeners.restorestate.forEach(function(Ze){return Ze(new vt(Le))})},Ve.prototype.addNewMarker=function(we){var Le=fe.createGroup();return this.markerImage.appendChild(Le),new we(Le,this.overlayContainer,this.settings)},Ve.prototype.createNewMarker=function(we){var Le,Ze=this;(Le=typeof we=="string"?this._availableMarkerTypes.find(function(rt){return rt.typeName===we}):we)&&(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(rt){return rt(new mt(Ze,Ze._currentMarker))}))},Ve.prototype.markerCreated=function(we){var Le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(we),this.setCurrentMarker(we),we instanceof Ue&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ue):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ze){return Ze(new mt(Le,Le._currentMarker))})},Ve.prototype.colorChanged=function(we){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=we,this.settings.defaultStrokeColor=we)},Ve.prototype.fillColorChanged=function(we){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=we)},Ve.prototype.markerStateChanged=function(we){var Le=this;this.eventListeners.markerchange.forEach(function(Ze){return Ze(new mt(Le,we))})},Ve.prototype.setCurrentMarker=function(we){var Le=this;this._currentMarker!==we&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ze){return Ze(new mt(Le,Le._currentMarker))})),this._currentMarker=we,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 mt(Le,Le._currentMarker))}))},Ve.prototype.onPointerDown=function(we){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||we.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(we.target)});Le!==void 0?(this.setCurrentMarker(Le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:we.clientX,y:we.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(we.clientX,we.clientY))},Ve.prototype.onDblClick=function(we){if(this._isFocused||this.focus(),this.mode==="select"){var Le=this.markers.find(function(Ze){return Ze.ownsTarget(we.target)});Le!==void 0&&Le!==this._currentMarker&&this.setCurrentMarker(Le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(we.clientX,we.clientY),we.target):this.setCurrentMarker()}},Ve.prototype.onPointerMove=function(we){this.touchPoints!==1&&we.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||we.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(we.clientX,we.clientY)):this.zoomLevel>1&&this.panTo({x:we.clientX,y:we.clientY}))},Ve.prototype.onPointerUp=function(we){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(we.clientX,we.clientY)),this.isDragging=!1,this.addUndoStep()},Ve.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ve.prototype.onKeyUp=function(we){this._currentMarker===void 0||this.notesArea!==void 0||we.key!=="Delete"&&we.key!=="Backspace"||this.deleteSelectedMarker()},Ve.prototype.clientToLocalCoordinates=function(we,Le){var Ze=this.markerImage.getBoundingClientRect();return{x:(we-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 we=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=we+"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(we){me.addKey(we)},Ve.prototype.addEventListener=function(we,Le){this.eventListeners.addEventListener(we,Le)},Ve.prototype.removeEventListener=function(we,Le){this.eventListeners.removeEventListener(we,Le)},Ve.prototype.renderState=function(we){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(we),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ve.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ve.prototype.focus=function(){var we=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 vt(we))}))},Ve.prototype.blur=function(){var we=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Le){return Le(new vt(we))}))},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 gt=at(71409),Bt=at(62730),oe=at(11036),ze=at(28788),De=at(92310),fe=at.n(De),me=at(18929),ke=at(48736),Ce=at(59301),Se=at(39224),Me=at(11592),ve=at(89490),xe=at(87075),de=at(77900),z=at(10228),ee=Ce.forwardRef(function(Ke,ot){var st=Ke.prefixCls,ft=Ke.forceRender,bt=Ke.className,$e=Ke.style,nt=Ke.children,xt=Ke.isActive,wt=Ke.role,Pt=Ke.classNames,dt=Ke.styles,ct=Ce.useState(xt||ft),ht=(0,oe.Z)(ct,2),Et=ht[0],vt=ht[1];return Ce.useEffect(function(){(ft||xt)&&vt(!0)},[ft,xt]),Et?Ce.createElement("div",{ref:ot,className:fe()("".concat(st,"-content"),(0,xe.Z)((0,xe.Z)({},"".concat(st,"-content-active"),xt),"".concat(st,"-content-inactive"),!xt),bt),style:$e,role:wt},Ce.createElement("div",{className:fe()("".concat(st,"-content-box"),Pt==null?void 0:Pt.body),style:dt==null?void 0:dt.body},nt)):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,ft=st===void 0?!0:st,bt=Ke.headerClass,$e=Ke.isActive,nt=Ke.onItemClick,xt=Ke.forceRender,wt=Ke.className,Pt=Ke.classNames,dt=Pt===void 0?{}:Pt,ct=Ke.styles,ht=ct===void 0?{}:ct,Et=Ke.prefixCls,vt=Ke.collapsible,Ft=Ke.accordion,mt=Ke.panelKey,St=Ke.extra,tt=Ke.header,Ve=Ke.expandIcon,we=Ke.openMotion,Le=Ke.destroyInactivePanel,Ze=Ke.children,rt=(0,Se.Z)(Ke,ie),Ie=vt==="disabled",_e=St!=null&&typeof St!="boolean",He=(0,xe.Z)((0,xe.Z)((0,xe.Z)({onClick:function(){nt==null||nt(mt)},onKeyDown:function(Kt){(Kt.key==="Enter"||Kt.keyCode===z.Z.ENTER||Kt.which===z.Z.ENTER)&&(nt==null||nt(mt))},role:Ft?"tab":"button"},"aria-expanded",$e),"aria-disabled",Ie),"tabIndex",Ie?-1:0),Qe=typeof Ve=="function"?Ve(Ke):Ce.createElement("i",{className:"arrow"}),ut=Qe&&Ce.createElement("div",(0,gt.Z)({className:"".concat(Et,"-expand-icon")},["header","icon"].includes(vt)?He:{}),Qe),pt=fe()("".concat(Et,"-item"),(0,xe.Z)((0,xe.Z)({},"".concat(Et,"-item-active"),$e),"".concat(Et,"-item-disabled"),Ie),wt),Mt=fe()(bt,"".concat(Et,"-header"),(0,xe.Z)({},"".concat(Et,"-collapsible-").concat(vt),!!vt),dt.header),At=(0,ve.Z)({className:Mt,style:ht.header},["header","icon"].includes(vt)?{}:He);return Ce.createElement("div",(0,gt.Z)({},rt,{ref:ot,className:pt}),Ce.createElement("div",At,ft&&ut,Ce.createElement("span",(0,gt.Z)({className:"".concat(Et,"-header-text")},vt==="header"?He:{}),tt),_e&&Ce.createElement("div",{className:"".concat(Et,"-extra")},St)),Ce.createElement(de.default,(0,gt.Z)({visible:$e,leavedClassName:"".concat(Et,"-content-hidden")},we,{forceRender:xt,removeOnLeave:Le}),function(Dt,Kt){var Xt=Dt.className,$t=Dt.style;return Ce.createElement(ae,{ref:Kt,prefixCls:Et,className:Xt,classNames:dt,style:$t,styles:ht,isActive:$e,forceRender:xt,role:Ft?"tabpanel":void 0},Ze)}))}),ue=le,ge=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Pe=function(ot,st){var ft=st.prefixCls,bt=st.accordion,$e=st.collapsible,nt=st.destroyInactivePanel,xt=st.onItemClick,wt=st.activeKey,Pt=st.openMotion,dt=st.expandIcon;return ot.map(function(ct,ht){var Et=ct.children,vt=ct.label,Ft=ct.key,mt=ct.collapsible,St=ct.onItemClick,tt=ct.destroyInactivePanel,Ve=(0,Se.Z)(ct,ge),we=String(Ft!=null?Ft:ht),Le=mt!=null?mt:$e,Ze=tt!=null?tt:nt,rt=function(He){Le!=="disabled"&&(xt(He),St==null||St(He))},Ie=!1;return bt?Ie=wt[0]===we:Ie=wt.indexOf(we)>-1,Ce.createElement(ue,(0,gt.Z)({},Ve,{prefixCls:ft,key:we,panelKey:we,isActive:Ie,accordion:bt,openMotion:Pt,expandIcon:dt,header:vt,collapsible:Le,onItemClick:rt,destroyInactivePanel:Ze}),Et)})},je=function(ot,st,ft){if(!ot)return null;var bt=ft.prefixCls,$e=ft.accordion,nt=ft.collapsible,xt=ft.destroyInactivePanel,wt=ft.onItemClick,Pt=ft.activeKey,dt=ft.openMotion,ct=ft.expandIcon,ht=ot.key||String(st),Et=ot.props,vt=Et.header,Ft=Et.headerClass,mt=Et.destroyInactivePanel,St=Et.collapsible,tt=Et.onItemClick,Ve=!1;$e?Ve=Pt[0]===ht:Ve=Pt.indexOf(ht)>-1;var we=St!=null?St:nt,Le=function(Ie){we!=="disabled"&&(wt(Ie),tt==null||tt(Ie))},Ze={key:ht,panelKey:ht,header:vt,headerClass:Ft,isActive:Ve,prefixCls:bt,destroyInactivePanel:mt!=null?mt:xt,openMotion:dt,accordion:$e,children:ot.props.children,onItemClick:Le,expandIcon:ct,collapsible:we};return typeof ot.type=="string"?ot:(Object.keys(Ze).forEach(function(rt){typeof Ze[rt]=="undefined"&&delete Ze[rt]}),Ce.cloneElement(ot,Ze))};function Be(Ke,ot,st){return Array.isArray(Ke)?Pe(Ke,st):(0,Me.Z)(ot).map(function(ft,bt){return je(ft,bt,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(ft){return String(ft)})}var Re=Ce.forwardRef(function(Ke,ot){var st=Ke.prefixCls,ft=st===void 0?"rc-collapse":st,bt=Ke.destroyInactivePanel,$e=bt===void 0?!1:bt,nt=Ke.style,xt=Ke.accordion,wt=Ke.className,Pt=Ke.children,dt=Ke.collapsible,ct=Ke.openMotion,ht=Ke.expandIcon,Et=Ke.activeKey,vt=Ke.defaultActiveKey,Ft=Ke.onChange,mt=Ke.items,St=fe()(ft,wt),tt=(0,me.Z)([],{value:Et,onChange:function(_e){return Ft==null?void 0:Ft(_e)},defaultValue:vt,postState:Ae}),Ve=(0,oe.Z)(tt,2),we=Ve[0],Le=Ve[1],Ze=function(_e){return Le(function(){if(xt)return we[0]===_e?[]:[_e];var He=we.indexOf(_e),Qe=He>-1;return Qe?we.filter(function(ut){return ut!==_e}):[].concat((0,Bt.Z)(we),[_e])})};(0,ke.ZP)(!Pt,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var rt=Fe(mt,Pt,{prefixCls:ft,accordion:xt,openMotion:ct,expandIcon:ht,collapsible:dt,destroyInactivePanel:$e,onItemClick:Ze,activeKey:we});return Ce.createElement("div",(0,gt.Z)({ref:ot,className:St,style:nt,role:xt?"tablist":void 0},(0,Ne.Z)(Ke,{aria:!0,data:!0})),rt)}),We=Object.assign(Re,{Panel:ue}),Ye=We,Ue=We.Panel},66042:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Ye}});var gt=at(89490),Bt=at(11036),oe=at(43403),ze=at(34280),De=at(59301),fe=De.createContext(null),me=De.createContext({}),ke=fe,Ce=at(87075),Se=at(71409),Me=at(92310),ve=at.n(Me),xe=at(77900),de=at(10228),z=at(26112),ee=at(39224),ae=at(8654),ie=["prefixCls","className","containerRef"],le=function(Ke){var ot=Ke.prefixCls,st=Ke.className,ft=Ke.containerRef,bt=(0,ee.Z)(Ke,ie),$e=De.useContext(me),nt=$e.panel,xt=(0,ae.x1)(nt,ft);return De.createElement("div",(0,Se.Z)({className:ve()("".concat(ot,"-content"),st),role:"dialog",ref:xt},(0,z.Z)(Ke,{aria:!0}),{"aria-modal":"true"},bt))},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,ft,bt=Ue.prefixCls,$e=Ue.open,nt=Ue.placement,xt=Ue.inline,wt=Ue.push,Pt=Ue.forceRender,dt=Ue.autoFocus,ct=Ue.keyboard,ht=Ue.classNames,Et=Ue.rootClassName,vt=Ue.rootStyle,Ft=Ue.zIndex,mt=Ue.className,St=Ue.id,tt=Ue.style,Ve=Ue.motion,we=Ue.width,Le=Ue.height,Ze=Ue.children,rt=Ue.mask,Ie=Ue.maskClosable,_e=Ue.maskMotion,He=Ue.maskClassName,Qe=Ue.maskStyle,ut=Ue.afterOpenChange,pt=Ue.onClose,Mt=Ue.onMouseEnter,At=Ue.onMouseOver,Dt=Ue.onMouseLeave,Kt=Ue.onClick,Xt=Ue.onKeyDown,$t=Ue.onKeyUp,Ut=Ue.styles,sn=Ue.drawerRender,tn=De.useRef(),Wt=De.useRef(),Pn=De.useRef();De.useImperativeHandle(Ke,function(){return tn.current});var Sn=function(mr){var Mi=mr.keyCode,ar=mr.shiftKey;switch(Mi){case de.Z.TAB:{if(Mi===de.Z.TAB){if(!ar&&document.activeElement===Pn.current){var Sr;(Sr=Wt.current)===null||Sr===void 0||Sr.focus({preventScroll:!0})}else if(ar&&document.activeElement===Wt.current){var jr;(jr=Pn.current)===null||jr===void 0||jr.focus({preventScroll:!0})}}break}case de.Z.ESC:{pt&&ct&&(mr.stopPropagation(),pt(mr));break}}};De.useEffect(function(){if($e&&dt){var dr;(dr=tn.current)===null||dr===void 0||dr.focus({preventScroll:!0})}},[$e]);var Tn=De.useState(!1),Kn=(0,Bt.Z)(Tn,2),Mr=Kn[0],fr=Kn[1],Er=De.useContext(ke),Hr;typeof wt=="boolean"?Hr=wt?{}:{distance:0}:Hr=wt||{};var Ur=(ot=(st=(ft=Hr)===null||ft===void 0?void 0:ft.distance)!==null&&st!==void 0?st:Er==null?void 0:Er.pushDistance)!==null&&ot!==void 0?ot:180,ri=De.useMemo(function(){return{pushDistance:Ur,push:function(){fr(!0)},pull:function(){fr(!1)}}},[Ur]);De.useEffect(function(){if($e){var dr;Er==null||(dr=Er.push)===null||dr===void 0||dr.call(Er)}else{var mr;Er==null||(mr=Er.pull)===null||mr===void 0||mr.call(Er)}},[$e]),De.useEffect(function(){return function(){var dr;Er==null||(dr=Er.pull)===null||dr===void 0||dr.call(Er)}},[]);var Pi=rt&&De.createElement(xe.default,(0,Se.Z)({key:"mask"},_e,{visible:$e}),function(dr,mr){var Mi=dr.className,ar=dr.style;return De.createElement("div",{className:ve()("".concat(bt,"-mask"),Mi,ht==null?void 0:ht.mask,He),style:(0,gt.Z)((0,gt.Z)((0,gt.Z)({},ar),Qe),Ut==null?void 0:Ut.mask),onClick:Ie&&$e?pt:void 0,ref:mr})}),Ui=typeof Ve=="function"?Ve(nt):Ve,Fi={};if(Mr&&Ur)switch(nt){case"top":Fi.transform="translateY(".concat(Ur,"px)");break;case"bottom":Fi.transform="translateY(".concat(-Ur,"px)");break;case"left":Fi.transform="translateX(".concat(Ur,"px)");break;default:Fi.transform="translateX(".concat(-Ur,"px)");break}nt==="left"||nt==="right"?Fi.width=Pe(we):Fi.height=Pe(Le);var zi={onMouseEnter:Mt,onMouseOver:At,onMouseLeave:Dt,onClick:Kt,onKeyDown:Xt,onKeyUp:$t},Xi=De.createElement(xe.default,(0,Se.Z)({key:"panel"},Ui,{visible:$e,forceRender:Pt,onVisibleChanged:function(mr){ut==null||ut(mr)},removeOnLeave:!1,leavedClassName:"".concat(bt,"-content-wrapper-hidden")}),function(dr,mr){var Mi=dr.className,ar=dr.style,Sr=De.createElement(ue,(0,Se.Z)({id:St,containerRef:mr,prefixCls:bt,className:ve()(mt,ht==null?void 0:ht.content),style:(0,gt.Z)((0,gt.Z)({},tt),Ut==null?void 0:Ut.content)},(0,z.Z)(Ue,{aria:!0}),zi),Ze);return De.createElement("div",(0,Se.Z)({className:ve()("".concat(bt,"-content-wrapper"),ht==null?void 0:ht.wrapper,Mi),style:(0,gt.Z)((0,gt.Z)((0,gt.Z)({},Fi),ar),Ut==null?void 0:Ut.wrapper)},(0,z.Z)(Ue,{data:!0})),sn?sn(Sr):Sr)}),et=(0,gt.Z)({},vt);return Ft&&(et.zIndex=Ft),De.createElement(ke.Provider,{value:ri},De.createElement("div",{className:ve()(bt,"".concat(bt,"-").concat(nt),Et,(0,Ce.Z)((0,Ce.Z)({},"".concat(bt,"-open"),$e),"".concat(bt,"-inline"),xt)),style:et,tabIndex:-1,ref:tn,onKeyDown:Sn},Pi,De.createElement("div",{tabIndex:0,ref:Wt,style:Be,"aria-hidden":"true","data-sentinel":"start"}),Xi,De.createElement("div",{tabIndex:0,ref:Pn,style:Be,"aria-hidden":"true","data-sentinel":"end"})))}var Ne=De.forwardRef(Fe),Ae=Ne,Re=function(Ke){var ot=Ke.open,st=ot===void 0?!1:ot,ft=Ke.prefixCls,bt=ft===void 0?"rc-drawer":ft,$e=Ke.placement,nt=$e===void 0?"right":$e,xt=Ke.autoFocus,wt=xt===void 0?!0:xt,Pt=Ke.keyboard,dt=Pt===void 0?!0:Pt,ct=Ke.width,ht=ct===void 0?378:ct,Et=Ke.mask,vt=Et===void 0?!0:Et,Ft=Ke.maskClosable,mt=Ft===void 0?!0:Ft,St=Ke.getContainer,tt=Ke.forceRender,Ve=Ke.afterOpenChange,we=Ke.destroyOnClose,Le=Ke.onMouseEnter,Ze=Ke.onMouseOver,rt=Ke.onMouseLeave,Ie=Ke.onClick,_e=Ke.onKeyDown,He=Ke.onKeyUp,Qe=Ke.panelRef,ut=De.useState(!1),pt=(0,Bt.Z)(ut,2),Mt=pt[0],At=pt[1],Dt=De.useState(!1),Kt=(0,Bt.Z)(Dt,2),Xt=Kt[0],$t=Kt[1];(0,ze.Z)(function(){$t(!0)},[]);var Ut=Xt?st:!1,sn=De.useRef(),tn=De.useRef();(0,ze.Z)(function(){Ut&&(tn.current=document.activeElement)},[Ut]);var Wt=function(Mr){var fr;if(At(Mr),Ve==null||Ve(Mr),!Mr&&tn.current&&!((fr=sn.current)!==null&&fr!==void 0&&fr.contains(tn.current))){var Er;(Er=tn.current)===null||Er===void 0||Er.focus({preventScroll:!0})}},Pn=De.useMemo(function(){return{panel:Qe}},[Qe]);if(!tt&&!Mt&&!Ut&&we)return null;var Sn={onMouseEnter:Le,onMouseOver:Ze,onMouseLeave:rt,onClick:Ie,onKeyDown:_e,onKeyUp:He},Tn=(0,gt.Z)((0,gt.Z)({},Ke),{},{open:Ut,prefixCls:bt,placement:nt,autoFocus:wt,keyboard:dt,width:ht,mask:vt,maskClosable:mt,inline:St===!1,afterOpenChange:Wt,ref:sn},Sn);return De.createElement(me.Provider,{value:Pn},De.createElement(oe.Z,{open:Ut||tt||Mt,autoDestroy:!1,getContainer:St,autoLock:vt&&(Ut||Mt)},De.createElement(Ae,Tn)))},We=Re,Ye=We},23425:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return Be}});var gt=at(87075),Bt=at(71409),oe=at(28788),ze=at(89490),De=at(11036),fe=at(92310),me=at.n(fe),ke=at(18929),Ce=at(10228),Se=at(26112),Me=at(48736),ve=at(59301),xe=at(17119),de=[10,20,50,100],z=function(Ne){var Ae=Ne.pageSizeOptions,Re=Ae===void 0?de:Ae,We=Ne.locale,Ye=Ne.changeSize,Ue=Ne.pageSize,Ke=Ne.goButton,ot=Ne.quickGo,st=Ne.rootPrefixCls,ft=Ne.disabled,bt=Ne.buildOptionText,$e=Ne.showSizeChanger,nt=Ne.sizeChangerRender,xt=ve.useState(""),wt=(0,De.Z)(xt,2),Pt=wt[0],dt=wt[1],ct=function(){return!Pt||Number.isNaN(Pt)?void 0:Number(Pt)},ht=typeof bt=="function"?bt:function(Le){return"".concat(Le," ").concat(We.items_per_page)},Et=function(Ze){dt(Ze.target.value)},vt=function(Ze){Ke||Pt===""||(dt(""),!(Ze.relatedTarget&&(Ze.relatedTarget.className.indexOf("".concat(st,"-item-link"))>=0||Ze.relatedTarget.className.indexOf("".concat(st,"-item"))>=0))&&(ot==null||ot(ct())))},Ft=function(Ze){Pt!==""&&(Ze.keyCode===Ce.Z.ENTER||Ze.type==="click")&&(dt(""),ot==null||ot(ct()))},mt=function(){return Re.some(function(Ze){return Ze.toString()===Ue.toString()})?Re:Re.concat([Ue]).sort(function(Ze,rt){var Ie=Number.isNaN(Number(Ze))?0:Number(Ze),_e=Number.isNaN(Number(rt))?0:Number(rt);return Ie-_e})},St="".concat(st,"-options");if(!$e&&!ot)return null;var tt=null,Ve=null,we=null;return $e&&nt&&(tt=nt({disabled:ft,size:Ue,onSizeChange:function(Ze){Ye==null||Ye(Number(Ze))},"aria-label":We.page_size,className:"".concat(St,"-size-changer"),options:mt().map(function(Le){return{label:ht(Le),value:Le}})})),ot&&(Ke&&(we=typeof Ke=="boolean"?ve.createElement("button",{type:"button",onClick:Ft,onKeyUp:Ft,disabled:ft,className:"".concat(St,"-quick-jumper-button")},We.jump_to_confirm):ve.createElement("span",{onClick:Ft,onKeyUp:Ft},Ke)),Ve=ve.createElement("div",{className:"".concat(St,"-quick-jumper")},We.jump_to,ve.createElement("input",{disabled:ft,type:"text",value:Pt,onChange:Et,onKeyUp:Ft,onBlur:vt,"aria-label":We.page}),We.page,we)),ve.createElement("li",{className:St},tt,Ve)},ee=z,ae=function(Ne){var Ae=Ne.rootPrefixCls,Re=Ne.page,We=Ne.active,Ye=Ne.className,Ue=Ne.showTitle,Ke=Ne.onClick,ot=Ne.onKeyPress,st=Ne.itemRender,ft="".concat(Ae,"-item"),bt=me()(ft,"".concat(ft,"-").concat(Re),(0,gt.Z)((0,gt.Z)({},"".concat(ft,"-active"),We),"".concat(ft,"-disabled"),!Re),Ye),$e=function(){Ke(Re)},nt=function(Pt){ot(Pt,Ke,Re)},xt=st(Re,"page",ve.createElement("a",{rel:"nofollow"},Re));return xt?ve.createElement("li",{title:Ue?String(Re):null,className:bt,onClick:$e,onKeyDown:nt,tabIndex:0},xt):null},ie=ae,le=function(Ne,Ae,Re){return Re};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 Re=typeof Fe=="undefined"?Ne:Fe;return Math.floor((Ae-1)/Re)+1}var je=function(Ne){var Ae=Ne.prefixCls,Re=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,ft=Ne.total,bt=ft===void 0?0:ft,$e=Ne.pageSize,nt=Ne.defaultPageSize,xt=nt===void 0?10:nt,wt=Ne.onChange,Pt=wt===void 0?ue:wt,dt=Ne.hideOnSinglePage,ct=Ne.align,ht=Ne.showPrevNextJumpers,Et=ht===void 0?!0:ht,vt=Ne.showQuickJumper,Ft=Ne.showLessItems,mt=Ne.showTitle,St=mt===void 0?!0:mt,tt=Ne.onShowSizeChange,Ve=tt===void 0?ue:tt,we=Ne.locale,Le=we===void 0?xe.Z:we,Ze=Ne.style,rt=Ne.totalBoundaryShowSizeChanger,Ie=rt===void 0?50:rt,_e=Ne.disabled,He=Ne.simple,Qe=Ne.showTotal,ut=Ne.showSizeChanger,pt=ut===void 0?bt>Ie:ut,Mt=Ne.sizeChangerRender,At=Ne.pageSizeOptions,Dt=Ne.itemRender,Kt=Dt===void 0?le:Dt,Xt=Ne.jumpPrevIcon,$t=Ne.jumpNextIcon,Ut=Ne.prevIcon,sn=Ne.nextIcon,tn=ve.useRef(null),Wt=(0,ke.Z)(10,{value:$e,defaultValue:xt}),Pn=(0,De.Z)(Wt,2),Sn=Pn[0],Tn=Pn[1],Kn=(0,ke.Z)(1,{value:Ke,defaultValue:st,postState:function(ui){return Math.max(1,Math.min(ui,Pe(void 0,Sn,bt)))}}),Mr=(0,De.Z)(Kn,2),fr=Mr[0],Er=Mr[1],Hr=ve.useState(fr),Ur=(0,De.Z)(Hr,2),ri=Ur[0],Pi=Ur[1];(0,ve.useEffect)(function(){Pi(fr)},[fr]);var Ui=Pt!==ue,Fi="current"in Ne,zi=Math.max(1,fr-(Ft?3:5)),Xi=Math.min(Pe(void 0,Sn,bt),fr+(Ft?3:5));function et(xr,ui){var si=xr||ve.createElement("button",{type:"button","aria-label":ui,className:"".concat(Re,"-item-link")});return typeof xr=="function"&&(si=ve.createElement(xr,(0,ze.Z)({},Ne))),si}function dr(xr){var ui=xr.target.value,si=Pe(void 0,Sn,bt),Ii;return ui===""?Ii=ui:Number.isNaN(Number(ui))?Ii=ri:ui>=si?Ii=si:Ii=Number(ui),Ii}function mr(xr){return ge(xr)&&xr!==fr&&ge(bt)&&bt>0}var Mi=bt>Sn?vt:!1;function ar(xr){(xr.keyCode===Ce.Z.UP||xr.keyCode===Ce.Z.DOWN)&&xr.preventDefault()}function Sr(xr){var ui=dr(xr);switch(ui!==ri&&Pi(ui),xr.keyCode){case Ce.Z.ENTER:Rr(ui);break;case Ce.Z.UP:Rr(ui-1);break;case Ce.Z.DOWN:Rr(ui+1);break;default:break}}function jr(xr){Rr(dr(xr))}function to(xr){var ui=Pe(xr,Sn,bt),si=fr>ui&&ui!==0?ui:fr;Tn(xr),Pi(si),Ve==null||Ve(fr,xr),Er(si),Pt==null||Pt(si,xr)}function Rr(xr){if(mr(xr)&&!_e){var ui=Pe(void 0,Sn,bt),si=xr;return xr>ui?si=ui:xr<1&&(si=1),si!==ri&&Pi(si),Er(si),Pt==null||Pt(si,Sn),si}return fr}var on=fr>1,rn=fr<Pe(void 0,Sn,bt);function Yt(){on&&Rr(fr-1)}function nr(){rn&&Rr(fr+1)}function gr(){Rr(zi)}function Cr(){Rr(Xi)}function Nn(xr,ui){if(xr.key==="Enter"||xr.charCode===Ce.Z.ENTER||xr.keyCode===Ce.Z.ENTER){for(var si=arguments.length,Ii=new Array(si>2?si-2:0),pi=2;pi<si;pi++)Ii[pi-2]=arguments[pi];ui.apply(void 0,Ii)}}function qn(xr){Nn(xr,Yt)}function Ir(xr){Nn(xr,nr)}function gi(xr){Nn(xr,gr)}function bi(xr){Nn(xr,Cr)}function Nt(xr){var ui=Kt(xr,"prev",et(Ut,"prev page"));return ve.isValidElement(ui)?ve.cloneElement(ui,{disabled:!on}):ui}function Ht(xr){var ui=Kt(xr,"next",et(sn,"next page"));return ve.isValidElement(ui)?ve.cloneElement(ui,{disabled:!rn}):ui}function Mn(xr){(xr.type==="click"||xr.keyCode===Ce.Z.ENTER)&&Rr(ri)}var jn=null,en=(0,Se.Z)(Ne,{aria:!0,data:!0}),Fn=Qe&&ve.createElement("li",{className:"".concat(Re,"-total-text")},Qe(bt,[bt===0?0:(fr-1)*Sn+1,fr*Sn>bt?bt:fr*Sn])),Dn=null,Ln=Pe(void 0,Sn,bt);if(dt&&bt<=Sn)return null;var er=[],zn={rootPrefixCls:Re,onClick:Rr,onKeyPress:Nn,showTitle:St,itemRender:Kt,page:-1},Zn=fr-1>0?fr-1:0,rr=fr+1<Ln?fr+1:Ln,Kr=vt&&vt.goButton,cr=(0,oe.Z)(He)==="object"?He.readOnly:!He,pr=Kr,an=null;He&&(Kr&&(typeof Kr=="boolean"?pr=ve.createElement("button",{type:"button",onClick:Mn,onKeyUp:Mn},Le.jump_to_confirm):pr=ve.createElement("span",{onClick:Mn,onKeyUp:Mn},Kr),pr=ve.createElement("li",{title:St?"".concat(Le.jump_to).concat(fr,"/").concat(Ln):null,className:"".concat(Re,"-simple-pager")},pr)),an=ve.createElement("li",{title:St?"".concat(fr,"/").concat(Ln):null,className:"".concat(Re,"-simple-pager")},cr?ri:ve.createElement("input",{type:"text","aria-label":Le.jump_to,value:ri,disabled:_e,onKeyDown:ar,onKeyUp:Sr,onChange:Sr,onBlur:jr,size:3}),ve.createElement("span",{className:"".concat(Re,"-slash")},"/"),Ln));var Vr=Ft?1:2;if(Ln<=3+Vr*2){Ln||er.push(ve.createElement(ie,(0,Bt.Z)({},zn,{key:"noPager",page:1,className:"".concat(Re,"-item-disabled")})));for(var ei=1;ei<=Ln;ei+=1)er.push(ve.createElement(ie,(0,Bt.Z)({},zn,{key:ei,page:ei,active:fr===ei})))}else{var Di=Ft?Le.prev_3:Le.prev_5,dn=Ft?Le.next_3:Le.next_5,Hn=Kt(zi,"jump-prev",et(Xt,"prev page")),ur=Kt(Xi,"jump-next",et($t,"next page"));Et&&(jn=Hn?ve.createElement("li",{title:St?Di:null,key:"prev",onClick:gr,tabIndex:0,onKeyDown:gi,className:me()("".concat(Re,"-jump-prev"),(0,gt.Z)({},"".concat(Re,"-jump-prev-custom-icon"),!!Xt))},Hn):null,Dn=ur?ve.createElement("li",{title:St?dn:null,key:"next",onClick:Cr,tabIndex:0,onKeyDown:bi,className:me()("".concat(Re,"-jump-next"),(0,gt.Z)({},"".concat(Re,"-jump-next-custom-icon"),!!$t))},ur):null);var Jn=Math.max(1,fr-Vr),yr=Math.min(fr+Vr,Ln);fr-1<=Vr&&(yr=1+Vr*2),Ln-fr<=Vr&&(Jn=Ln-Vr*2);for(var Fr=Jn;Fr<=yr;Fr+=1)er.push(ve.createElement(ie,(0,Bt.Z)({},zn,{key:Fr,page:Fr,active:fr===Fr})));if(fr-1>=Vr*2&&fr!==3&&(er[0]=ve.cloneElement(er[0],{className:me()("".concat(Re,"-item-after-jump-prev"),er[0].props.className)}),er.unshift(jn)),Ln-fr>=Vr*2&&fr!==Ln-2){var Wr=er[er.length-1];er[er.length-1]=ve.cloneElement(Wr,{className:me()("".concat(Re,"-item-before-jump-next"),Wr.props.className)}),er.push(Dn)}Jn!==1&&er.unshift(ve.createElement(ie,(0,Bt.Z)({},zn,{key:1,page:1}))),yr!==Ln&&er.push(ve.createElement(ie,(0,Bt.Z)({},zn,{key:Ln,page:Ln})))}var $r=Nt(Zn);if($r){var ii=!on||!Ln;$r=ve.createElement("li",{title:St?Le.prev_page:null,onClick:Yt,tabIndex:ii?null:0,onKeyDown:qn,className:me()("".concat(Re,"-prev"),(0,gt.Z)({},"".concat(Re,"-disabled"),ii)),"aria-disabled":ii},$r)}var hi=Ht(rr);if(hi){var mn,Li;He?(mn=!rn,Li=on?0:null):(mn=!rn||!Ln,Li=mn?null:0),hi=ve.createElement("li",{title:St?Le.next_page:null,onClick:nr,tabIndex:Li,onKeyDown:Ir,className:me()("".concat(Re,"-next"),(0,gt.Z)({},"".concat(Re,"-disabled"),mn)),"aria-disabled":mn},hi)}var vn=me()(Re,Ue,(0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)((0,gt.Z)({},"".concat(Re,"-start"),ct==="start"),"".concat(Re,"-center"),ct==="center"),"".concat(Re,"-end"),ct==="end"),"".concat(Re,"-simple"),He),"".concat(Re,"-disabled"),_e));return ve.createElement("ul",(0,Bt.Z)({className:vn,style:Ze,ref:tn},en),Fn,$r,He?an:er,hi,ve.createElement(ee,{locale:Le,rootPrefixCls:Re,disabled:_e,selectPrefixCls:Ye,changeSize:to,pageSize:Sn,pageSizeOptions:At,quickGo:Mi?Rr:null,goButton:pr,showSizeChanger:pt,sizeChangerRender:Mt}))},Be=je},25930:function(gn,cn,at){"use strict";at.d(cn,{Cd:function(){return Re}});var gt=at(71409),Bt=at(89490),oe=at(39224),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(ft){if(ft){st=!0;var bt=ft.style;bt.transitionDuration=".3s, .3s, .3s, .06s",Ke.current&&ot-Ke.current<100&&(bt.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,ft=Ke.prefixCls,bt=Ke.strokeColor,$e=Ke.strokeLinecap,nt=Ke.strokeWidth,xt=Ke.style,wt=Ke.trailColor,Pt=Ke.trailWidth,dt=Ke.transition,ct=(0,oe.Z)(Ke,Ce);delete ct.gapPosition;var ht=Array.isArray(st)?st:[st],Et=Array.isArray(bt)?bt:[bt],vt=ke(),Ft=nt/2,mt=100-nt/2,St="M ".concat($e==="round"?Ft:0,",").concat(Ft,`
L `).concat($e==="round"?mt:100,",").concat(Ft),tt="0 0 100 ".concat(nt),Ve=0;return ze.createElement("svg",(0,gt.Z)({className:fe()("".concat(ft,"-line"),ot),viewBox:tt,preserveAspectRatio:"none",style:xt},ct),ze.createElement("path",{className:"".concat(ft,"-line-trail"),d:St,strokeLinecap:$e,stroke:wt,strokeWidth:Pt||nt,fillOpacity:"0"}),ht.map(function(we,Le){var Ze=1;switch($e){case"round":Ze=1-nt/100;break;case"square":Ze=1-nt/2/100;break;default:Ze=1;break}var rt={strokeDasharray:"".concat(we*Ze,"px, 100px"),strokeDashoffset:"-".concat(Ve,"px"),transition:dt||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ie=Et[Le]||Et[Et.length-1];return Ve+=we,ze.createElement("path",{key:Le,className:"".concat(ft,"-line-path"),d:St,strokeLinecap:$e,stroke:Ie,strokeWidth:nt,fillOpacity:"0",ref:function(He){vt[Le]=He},style:rt})}))},Me=Se,ve=at(28788),xe=at(11036),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,xe.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,ft=Ye.radius,bt=Ye.style,$e=Ye.ptg,nt=Ye.strokeLinecap,xt=Ye.strokeWidth,wt=Ye.size,Pt=Ye.gapDegree,dt=ot&&(0,ve.Z)(ot)==="object",ct=dt?"#FFF":void 0,ht=wt/2,Et=ze.createElement("circle",{className:"".concat(Ke,"-circle-path"),r:ft,cx:ht,cy:ht,stroke:ct,strokeLinecap:nt,strokeWidth:xt,opacity:$e===0?0:1,style:bt,ref:Ue});if(!dt)return Et;var vt="".concat(st,"-conic"),Ft=Pt?"".concat(180+Pt/2,"deg"):"0deg",mt=ue(ot,(360-Pt)/360),St=ue(ot,1),tt="conic-gradient(from ".concat(Ft,", ").concat(mt.join(", "),")"),Ve="linear-gradient(to ".concat(Pt?"bottom":"top",", ").concat(St.join(", "),")");return ze.createElement(ze.Fragment,null,ze.createElement("mask",{id:vt},Et),ze.createElement("foreignObject",{x:0,y:0,width:wt,height:wt,mask:"url(#".concat(vt,")")},ze.createElement(le,{bg:Ve},ze.createElement(le,{bg:tt}))))}),Pe=ge,je=100,Be=function(Ue,Ke,ot,st,ft,bt,$e,nt,xt,wt){var Pt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,dt=ot/100*360*((360-bt)/360),ct=bt===0?0:{bottom:0,top:180,left:90,right:-90}[$e],ht=(100-st)/100*Ke;xt==="round"&&st!==100&&(ht+=wt/2,ht>=Ke&&(ht=Ke-.01));var Et=je/2;return{stroke:typeof nt=="string"?nt:void 0,strokeDasharray:"".concat(Ke,"px ").concat(Ue),strokeDashoffset:ht+Pt,transform:"rotate(".concat(ft+dt+ct,"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,ft=Ke.steps,bt=Ke.strokeWidth,$e=Ke.trailWidth,nt=Ke.gapDegree,xt=nt===void 0?0:nt,wt=Ke.gapPosition,Pt=Ke.trailColor,dt=Ke.strokeLinecap,ct=Ke.style,ht=Ke.className,Et=Ke.strokeColor,vt=Ke.percent,Ft=(0,oe.Z)(Ke,Fe),mt=je/2,St=ie(ot),tt="".concat(St,"-gradient"),Ve=mt-bt/2,we=Math.PI*2*Ve,Le=xt>0?90+xt/2:-90,Ze=we*((360-xt)/360),rt=(0,ve.Z)(ft)==="object"?ft:{count:ft,gap:2},Ie=rt.count,_e=rt.gap,He=Ne(vt),Qe=Ne(Et),ut=Qe.find(function($t){return $t&&(0,ve.Z)($t)==="object"}),pt=ut&&(0,ve.Z)(ut)==="object",Mt=pt?"butt":dt,At=Be(we,Ze,0,100,Le,xt,wt,Pt,Mt,bt),Dt=ke(),Kt=function(){var Ut=0;return He.map(function(sn,tn){var Wt=Qe[tn]||Qe[Qe.length-1],Pn=Be(we,Ze,Ut,sn,Le,xt,wt,Wt,Mt,bt);return Ut+=sn,ze.createElement(Pe,{key:tn,color:Wt,ptg:sn,radius:Ve,prefixCls:st,gradientId:tt,style:Pn,strokeLinecap:Mt,strokeWidth:bt,gapDegree:xt,ref:function(Tn){Dt[tn]=Tn},size:je})}).reverse()},Xt=function(){var Ut=Math.round(Ie*(He[0]/100)),sn=100/Ie,tn=0;return new Array(Ie).fill(null).map(function(Wt,Pn){var Sn=Pn<=Ut-1?Qe[0]:Pt,Tn=Sn&&(0,ve.Z)(Sn)==="object"?"url(#".concat(tt,")"):void 0,Kn=Be(we,Ze,tn,sn,Le,xt,wt,Sn,"butt",bt,_e);return tn+=(Ze-Kn.strokeDashoffset+_e)*100/Ze,ze.createElement("circle",{key:Pn,className:"".concat(st,"-circle-path"),r:Ve,cx:mt,cy:mt,stroke:Tn,strokeWidth:bt,opacity:1,style:Kn,ref:function(fr){Dt[Pn]=fr}})})};return ze.createElement("svg",(0,gt.Z)({className:fe()("".concat(st,"-circle"),ht),viewBox:"0 0 ".concat(je," ").concat(je),style:ct,id:ot,role:"presentation"},Ft),!Ie&&ze.createElement("circle",{className:"".concat(st,"-circle-trail"),r:Ve,cx:mt,cy:mt,stroke:Pt,strokeLinecap:Mt,strokeWidth:$e||bt,style:At}),Ie?Xt():Kt())},Re=Ae,We={Line:Me,Circle:Re}},6551:function(gn,cn,at){"use strict";at.d(cn,{ZP:function(){return me}});var gt=at(11036),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,gt.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 Sn},Wx:function(){return Kn},ZP:function(){return bi},lk:function(){return ue}});var gt=at(71409),Bt=at(62730),oe=at(87075),ze=at(89490),De=at(11036),fe=at(39224),me=at(28788),ke=at(18929),Ce=at(48736),Se=at(59301),Me=at(92310),ve=at.n(Me),xe=at(34280),de=at(49658),z=at(8654),ee=function(Ht){var Mn=Ht.className,jn=Ht.customizeIcon,en=Ht.customizeIconProps,Fn=Ht.children,Dn=Ht.onMouseDown,Ln=Ht.onClick,er=typeof jn=="function"?jn(en):jn;return Se.createElement("span",{className:Mn,onMouseDown:function(Zn){Zn.preventDefault(),Dn==null||Dn(Zn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ln,"aria-hidden":!0},er!==void 0?er:Se.createElement("span",{className:ve()(Mn.split(/\s+/).map(function(zn){return"".concat(zn,"-icon")}))},Fn))},ae=ee,ie=function(Ht,Mn,jn,en,Fn){var Dn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ln=arguments.length>6?arguments[6]:void 0,er=arguments.length>7?arguments[7]:void 0,zn=Se.useMemo(function(){if((0,me.Z)(en)==="object")return en.clearIcon;if(Fn)return Fn},[en,Fn]),Zn=Se.useMemo(function(){return!!(!Dn&&en&&(jn.length||Ln)&&!(er==="combobox"&&Ln===""))},[en,Dn,jn.length,Ln,er]);return{allowClear:Zn,clearIcon:Se.createElement(ae,{className:"".concat(Ht,"-clear"),onMouseDown:Mn,customizeIcon:zn},"\xD7")}},le=Se.createContext(null);function ue(){return Se.useContext(le)}function ge(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ht=Se.useState(!1),Mn=(0,De.Z)(Ht,2),jn=Mn[0],en=Mn[1],Fn=Se.useRef(null),Dn=function(){window.clearTimeout(Fn.current)};Se.useEffect(function(){return Dn},[]);var Ln=function(zn,Zn){Dn(),Fn.current=window.setTimeout(function(){en(zn),Zn&&Zn()},Nt)};return[jn,Ln,Dn]}function Pe(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ht=Se.useRef(null),Mn=Se.useRef(null);Se.useEffect(function(){return function(){window.clearTimeout(Mn.current)}},[]);function jn(en){(en||Ht.current===null)&&(Ht.current=en),window.clearTimeout(Mn.current),Mn.current=window.setTimeout(function(){Ht.current=null},Nt)}return[function(){return Ht.current},jn]}function je(Nt,Ht,Mn,jn){var en=Se.useRef(null);en.current={open:Ht,triggerOpen:Mn,customizedTrigger:jn},Se.useEffect(function(){function Fn(Dn){var Ln;if(!((Ln=en.current)!==null&&Ln!==void 0&&Ln.customizedTrigger)){var er=Dn.target;er.shadowRoot&&Dn.composed&&(er=Dn.composedPath()[0]||er),en.current.open&&Nt().filter(function(zn){return zn}).every(function(zn){return!zn.contains(er)&&zn!==er})&&en.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Fn),function(){return window.removeEventListener("mousedown",Fn)}},[])}var Be=at(10228);function Fe(Nt){return Nt&&![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(Nt)}var Ne=at(26112),Ae=at(11780);function Re(Nt,Ht,Mn){var jn=(0,ze.Z)((0,ze.Z)({},Nt),Mn?Ht:{});return Object.keys(Ht).forEach(function(en){var Fn=Ht[en];typeof Fn=="function"&&(jn[en]=function(){for(var Dn,Ln=arguments.length,er=new Array(Ln),zn=0;zn<Ln;zn++)er[zn]=arguments[zn];return Fn.apply(void 0,er),(Dn=Nt[en])===null||Dn===void 0?void 0:Dn.call.apply(Dn,[Nt].concat(er))})}),jn}var We=Re,Ye=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ue=function(Ht,Mn){var jn=Ht.prefixCls,en=Ht.id,Fn=Ht.inputElement,Dn=Ht.autoFocus,Ln=Ht.autoComplete,er=Ht.editable,zn=Ht.activeDescendantId,Zn=Ht.value,rr=Ht.open,Kr=Ht.attrs,cr=(0,fe.Z)(Ht,Ye),pr=Fn||Se.createElement("input",null),an=pr,Vr=an.ref,ei=an.props;return(0,Ce.Kp)(!("maxLength"in pr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),pr=Se.cloneElement(pr,(0,ze.Z)((0,ze.Z)((0,ze.Z)({type:"search"},We(cr,ei,!0)),{},{id:en,ref:(0,z.sQ)(Mn,Vr),autoComplete:Ln||"off",autoFocus:Dn,className:ve()("".concat(jn,"-selection-search-input"),ei==null?void 0:ei.className),role:"combobox","aria-expanded":rr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(en,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(en,"_list"),"aria-activedescendant":rr?zn:void 0},Kr),{},{value:er?Zn:"",readOnly:!er,unselectable:er?null:"on",style:(0,ze.Z)((0,ze.Z)({},ei.style),{},{opacity:er?null:0})})),pr},Ke=Se.forwardRef(Ue),ot=Ke;function st(Nt){return Array.isArray(Nt)?Nt:Nt!==void 0?[Nt]:[]}var ft=typeof window!="undefined"&&window.document&&window.document.documentElement,bt=ft;function $e(Nt){return Nt!=null}function nt(Nt){return!Nt&&Nt!==0}function xt(Nt){return["string","number"].includes((0,me.Z)(Nt))}function wt(Nt){var Ht=void 0;return Nt&&(xt(Nt.title)?Ht=Nt.title.toString():xt(Nt.label)&&(Ht=Nt.label.toString())),Ht}function Pt(Nt,Ht){bt?Se.useLayoutEffect(Nt,Ht):Se.useEffect(Nt,Ht)}function dt(Nt){var Ht;return(Ht=Nt.key)!==null&&Ht!==void 0?Ht:Nt.value}var ct=function(Ht){Ht.preventDefault(),Ht.stopPropagation()},ht=function(Ht){var Mn=Ht.id,jn=Ht.prefixCls,en=Ht.values,Fn=Ht.open,Dn=Ht.searchValue,Ln=Ht.autoClearSearchValue,er=Ht.inputRef,zn=Ht.placeholder,Zn=Ht.disabled,rr=Ht.mode,Kr=Ht.showSearch,cr=Ht.autoFocus,pr=Ht.autoComplete,an=Ht.activeDescendantId,Vr=Ht.tabIndex,ei=Ht.removeIcon,Di=Ht.maxTagCount,dn=Ht.maxTagTextLength,Hn=Ht.maxTagPlaceholder,ur=Hn===void 0?function(_n){return"+ ".concat(_n.length," ...")}:Hn,Jn=Ht.tagRender,yr=Ht.onToggleOpen,Fr=Ht.onRemove,Wr=Ht.onInputChange,$r=Ht.onInputPaste,ii=Ht.onInputKeyDown,hi=Ht.onInputMouseDown,mn=Ht.onInputCompositionStart,Li=Ht.onInputCompositionEnd,vn=Ht.onInputBlur,xr=Se.useRef(null),ui=(0,Se.useState)(0),si=(0,De.Z)(ui,2),Ii=si[0],pi=si[1],Zr=(0,Se.useState)(!1),Gi=(0,De.Z)(Zr,2),qt=Gi[0],wn=Gi[1],Jt="".concat(jn,"-selection"),lt=Fn||rr==="multiple"&&Ln===!1||rr==="tags"?Dn:"",In=rr==="tags"||rr==="multiple"&&Ln===!1||Kr&&(Fn||qt);Pt(function(){pi(xr.current.scrollWidth)},[lt]);var pn=function(kn,Bn,sr,Yn,On){return Se.createElement("span",{title:wt(kn),className:ve()("".concat(Jt,"-item"),(0,oe.Z)({},"".concat(Jt,"-item-disabled"),sr))},Se.createElement("span",{className:"".concat(Jt,"-item-content")},Bn),Yn&&Se.createElement(ae,{className:"".concat(Jt,"-item-remove"),onMouseDown:ct,onClick:On,customizeIcon:ei},"\xD7"))},Un=function(kn,Bn,sr,Yn,On,ln){var lr=function(Jr){ct(Jr),yr(!Fn)};return Se.createElement("span",{onMouseDown:lr},Jn({label:Bn,value:kn,disabled:sr,closable:Yn,onClose:On,isMaxTag:!!ln}))},Xn=function(kn){var Bn=kn.disabled,sr=kn.label,Yn=kn.value,On=!Zn&&!Bn,ln=sr;if(typeof dn=="number"&&(typeof sr=="string"||typeof sr=="number")){var lr=String(ln);lr.length>dn&&(ln="".concat(lr.slice(0,dn),"..."))}var wr=function(Nr){Nr&&Nr.stopPropagation(),Fr(kn)};return typeof Jn=="function"?Un(Yn,ln,Bn,On,wr):pn(kn,ln,Bn,On,wr)},Wn=function(kn){if(!en.length)return null;var Bn=typeof ur=="function"?ur(kn):ur;return typeof Jn=="function"?Un(void 0,Bn,!1,!1,void 0,!0):pn({title:Bn},Bn,!1)},hn=Se.createElement("div",{className:"".concat(Jt,"-search"),style:{width:Ii},onFocus:function(){wn(!0)},onBlur:function(){wn(!1)}},Se.createElement(ot,{ref:er,open:Fn,prefixCls:jn,id:Mn,inputElement:null,disabled:Zn,autoFocus:cr,autoComplete:pr,editable:In,activeDescendantId:an,value:lt,onKeyDown:ii,onMouseDown:hi,onChange:Wr,onPaste:$r,onCompositionStart:mn,onCompositionEnd:Li,onBlur:vn,tabIndex:Vr,attrs:(0,Ne.Z)(Ht,!0)}),Se.createElement("span",{ref:xr,className:"".concat(Jt,"-search-mirror"),"aria-hidden":!0},lt,"\xA0")),An=Se.createElement(Ae.Z,{prefixCls:"".concat(Jt,"-overflow"),data:en,renderItem:Xn,renderRest:Wn,suffix:hn,itemKey:dt,maxCount:Di});return Se.createElement("span",{className:"".concat(Jt,"-wrap")},An,!en.length&&!lt&&Se.createElement("span",{className:"".concat(Jt,"-placeholder")},zn))},Et=ht,vt=function(Ht){var Mn=Ht.inputElement,jn=Ht.prefixCls,en=Ht.id,Fn=Ht.inputRef,Dn=Ht.disabled,Ln=Ht.autoFocus,er=Ht.autoComplete,zn=Ht.activeDescendantId,Zn=Ht.mode,rr=Ht.open,Kr=Ht.values,cr=Ht.placeholder,pr=Ht.tabIndex,an=Ht.showSearch,Vr=Ht.searchValue,ei=Ht.activeValue,Di=Ht.maxLength,dn=Ht.onInputKeyDown,Hn=Ht.onInputMouseDown,ur=Ht.onInputChange,Jn=Ht.onInputPaste,yr=Ht.onInputCompositionStart,Fr=Ht.onInputCompositionEnd,Wr=Ht.onInputBlur,$r=Ht.title,ii=Se.useState(!1),hi=(0,De.Z)(ii,2),mn=hi[0],Li=hi[1],vn=Zn==="combobox",xr=vn||an,ui=Kr[0],si=Vr||"";vn&&ei&&!mn&&(si=ei),Se.useEffect(function(){vn&&Li(!1)},[vn,ei]);var Ii=Zn!=="combobox"&&!rr&&!an?!1:!!si,pi=$r===void 0?wt(ui):$r,Zr=Se.useMemo(function(){return ui?null:Se.createElement("span",{className:"".concat(jn,"-selection-placeholder"),style:Ii?{visibility:"hidden"}:void 0},cr)},[ui,Ii,cr,jn]);return Se.createElement("span",{className:"".concat(jn,"-selection-wrap")},Se.createElement("span",{className:"".concat(jn,"-selection-search")},Se.createElement(ot,{ref:Fn,prefixCls:jn,id:en,open:rr,inputElement:Mn,disabled:Dn,autoFocus:Ln,autoComplete:er,editable:xr,activeDescendantId:zn,value:si,onKeyDown:dn,onMouseDown:Hn,onChange:function(qt){Li(!0),ur(qt)},onPaste:Jn,onCompositionStart:yr,onCompositionEnd:Fr,onBlur:Wr,tabIndex:pr,attrs:(0,Ne.Z)(Ht,!0),maxLength:vn?Di:void 0})),!vn&&ui?Se.createElement("span",{className:"".concat(jn,"-selection-item"),title:pi,style:Ii?{visibility:"hidden"}:void 0},ui.label):null,Zr)},Ft=vt,mt=function(Ht,Mn){var jn=(0,Se.useRef)(null),en=(0,Se.useRef)(!1),Fn=Ht.prefixCls,Dn=Ht.open,Ln=Ht.mode,er=Ht.showSearch,zn=Ht.tokenWithEnter,Zn=Ht.disabled,rr=Ht.prefix,Kr=Ht.autoClearSearchValue,cr=Ht.onSearch,pr=Ht.onSearchSubmit,an=Ht.onToggleOpen,Vr=Ht.onInputKeyDown,ei=Ht.onInputBlur,Di=Ht.domRef;Se.useImperativeHandle(Mn,function(){return{focus:function(pi){jn.current.focus(pi)},blur:function(){jn.current.blur()}}});var dn=Pe(0),Hn=(0,De.Z)(dn,2),ur=Hn[0],Jn=Hn[1],yr=function(pi){var Zr=pi.which,Gi=jn.current instanceof HTMLTextAreaElement;!Gi&&Dn&&(Zr===Be.Z.UP||Zr===Be.Z.DOWN)&&pi.preventDefault(),Vr&&Vr(pi),Zr===Be.Z.ENTER&&Ln==="tags"&&!en.current&&!Dn&&(pr==null||pr(pi.target.value)),!(Gi&&!Dn&&~[Be.Z.UP,Be.Z.DOWN,Be.Z.LEFT,Be.Z.RIGHT].indexOf(Zr))&&Fe(Zr)&&an(!0)},Fr=function(){Jn(!0)},Wr=(0,Se.useRef)(null),$r=function(pi){cr(pi,!0,en.current)!==!1&&an(!0)},ii=function(){en.current=!0},hi=function(pi){en.current=!1,Ln!=="combobox"&&$r(pi.target.value)},mn=function(pi){var Zr=pi.target.value;if(zn&&Wr.current&&/[\r\n]/.test(Wr.current)){var Gi=Wr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Zr=Zr.replace(Gi,Wr.current)}Wr.current=null,$r(Zr)},Li=function(pi){var Zr=pi.clipboardData,Gi=Zr==null?void 0:Zr.getData("text");Wr.current=Gi||""},vn=function(pi){var Zr=pi.target;if(Zr!==jn.current){var Gi=document.body.style.msTouchAction!==void 0;Gi?setTimeout(function(){jn.current.focus()}):jn.current.focus()}},xr=function(pi){var Zr=ur();pi.target!==jn.current&&!Zr&&!(Ln==="combobox"&&Zn)&&pi.preventDefault(),(Ln!=="combobox"&&(!er||!Zr)||!Dn)&&(Dn&&Kr!==!1&&cr("",!0,!1),an())},ui={inputRef:jn,onInputKeyDown:yr,onInputMouseDown:Fr,onInputChange:mn,onInputPaste:Li,onInputCompositionStart:ii,onInputCompositionEnd:hi,onInputBlur:ei},si=Ln==="multiple"||Ln==="tags"?Se.createElement(Et,(0,gt.Z)({},Ht,ui)):Se.createElement(Ft,(0,gt.Z)({},Ht,ui));return Se.createElement("div",{ref:Di,className:"".concat(Fn,"-selector"),onClick:vn,onMouseDown:xr},rr&&Se.createElement("div",{className:"".concat(Fn,"-prefix")},rr),si)},St=Se.forwardRef(mt),tt=St,Ve=at(65352),we=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Le=function(Ht){var Mn=Ht===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Mn,adjustY:1},htmlRegion:"scroll"}}},Ze=function(Ht,Mn){var jn=Ht.prefixCls,en=Ht.disabled,Fn=Ht.visible,Dn=Ht.children,Ln=Ht.popupElement,er=Ht.animation,zn=Ht.transitionName,Zn=Ht.dropdownStyle,rr=Ht.dropdownClassName,Kr=Ht.direction,cr=Kr===void 0?"ltr":Kr,pr=Ht.placement,an=Ht.builtinPlacements,Vr=Ht.dropdownMatchSelectWidth,ei=Ht.dropdownRender,Di=Ht.dropdownAlign,dn=Ht.getPopupContainer,Hn=Ht.empty,ur=Ht.getTriggerDOMNode,Jn=Ht.onPopupVisibleChange,yr=Ht.onPopupMouseEnter,Fr=(0,fe.Z)(Ht,we),Wr="".concat(jn,"-dropdown"),$r=Ln;ei&&($r=ei(Ln));var ii=Se.useMemo(function(){return an||Le(Vr)},[an,Vr]),hi=er?"".concat(Wr,"-").concat(er):zn,mn=typeof Vr=="number",Li=Se.useMemo(function(){return mn?null:Vr===!1?"minWidth":"width"},[Vr,mn]),vn=Zn;mn&&(vn=(0,ze.Z)((0,ze.Z)({},vn),{},{width:Vr}));var xr=Se.useRef(null);return Se.useImperativeHandle(Mn,function(){return{getPopupElement:function(){var si;return(si=xr.current)===null||si===void 0?void 0:si.popupElement}}}),Se.createElement(Ve.Z,(0,gt.Z)({},Fr,{showAction:Jn?["click"]:[],hideAction:Jn?["click"]:[],popupPlacement:pr||(cr==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ii,prefixCls:Wr,popupTransitionName:hi,popup:Se.createElement("div",{onMouseEnter:yr},$r),ref:xr,stretch:Li,popupAlign:Di,popupVisible:Fn,getPopupContainer:dn,popupClassName:ve()(rr,(0,oe.Z)({},"".concat(Wr,"-empty"),Hn)),popupStyle:vn,getTriggerDOMNode:ur,onPopupVisibleChange:Jn}),Dn)},rt=Se.forwardRef(Ze),Ie=rt,_e=at(67900);function He(Nt,Ht){var Mn=Nt.key,jn;return"value"in Nt&&(jn=Nt.value),Mn!=null?Mn:jn!==void 0?jn:"rc-index-key-".concat(Ht)}function Qe(Nt){return typeof Nt!="undefined"&&!Number.isNaN(Nt)}function ut(Nt,Ht){var Mn=Nt||{},jn=Mn.label,en=Mn.value,Fn=Mn.options,Dn=Mn.groupLabel,Ln=jn||(Ht?"children":"label");return{label:Ln,value:en||"value",options:Fn||"options",groupLabel:Dn||Ln}}function pt(Nt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Mn=Ht.fieldNames,jn=Ht.childrenAsData,en=[],Fn=ut(Mn,!1),Dn=Fn.label,Ln=Fn.value,er=Fn.options,zn=Fn.groupLabel;function Zn(rr,Kr){Array.isArray(rr)&&rr.forEach(function(cr){if(Kr||!(er in cr)){var pr=cr[Ln];en.push({key:He(cr,en.length),groupOption:Kr,data:cr,label:cr[Dn],value:pr})}else{var an=cr[zn];an===void 0&&jn&&(an=cr.label),en.push({key:He(cr,en.length),group:!0,data:cr,label:an}),Zn(cr[er],!0)}})}return Zn(Nt,!1),en}function Mt(Nt){var Ht=(0,ze.Z)({},Nt);return"props"in Ht||Object.defineProperty(Ht,"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`."),Ht}}),Ht}var At=function(Ht,Mn,jn){if(!Mn||!Mn.length)return null;var en=!1,Fn=function Ln(er,zn){var Zn=(0,_e.Z)(zn),rr=Zn[0],Kr=Zn.slice(1);if(!rr)return[er];var cr=er.split(rr);return en=en||cr.length>1,cr.reduce(function(pr,an){return[].concat((0,Bt.Z)(pr),(0,Bt.Z)(Ln(an,Kr)))},[]).filter(Boolean)},Dn=Fn(Ht,Mn);return en?typeof jn!="undefined"?Dn.slice(0,jn):Dn:null},Dt=Se.createContext(null),Kt=Dt;function Xt(Nt){var Ht=Nt.visible,Mn=Nt.values;if(!Ht)return null;var jn=50;return Se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Mn.slice(0,jn).map(function(en){var Fn=en.label,Dn=en.value;return["number","string"].includes((0,me.Z)(Fn))?Fn:Dn}).join(", ")),Mn.length>jn?", ...":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(Ht){return Ht==="tags"||Ht==="multiple"},tn=Se.forwardRef(function(Nt,Ht){var Mn,jn=Nt.id,en=Nt.prefixCls,Fn=Nt.className,Dn=Nt.showSearch,Ln=Nt.tagRender,er=Nt.direction,zn=Nt.omitDomProps,Zn=Nt.displayValues,rr=Nt.onDisplayValuesChange,Kr=Nt.emptyOptions,cr=Nt.notFoundContent,pr=cr===void 0?"Not Found":cr,an=Nt.onClear,Vr=Nt.mode,ei=Nt.disabled,Di=Nt.loading,dn=Nt.getInputElement,Hn=Nt.getRawInputElement,ur=Nt.open,Jn=Nt.defaultOpen,yr=Nt.onDropdownVisibleChange,Fr=Nt.activeValue,Wr=Nt.onActiveValueChange,$r=Nt.activeDescendantId,ii=Nt.searchValue,hi=Nt.autoClearSearchValue,mn=Nt.onSearch,Li=Nt.onSearchSplit,vn=Nt.tokenSeparators,xr=Nt.allowClear,ui=Nt.prefix,si=Nt.suffixIcon,Ii=Nt.clearIcon,pi=Nt.OptionList,Zr=Nt.animation,Gi=Nt.transitionName,qt=Nt.dropdownStyle,wn=Nt.dropdownClassName,Jt=Nt.dropdownMatchSelectWidth,lt=Nt.dropdownRender,In=Nt.dropdownAlign,pn=Nt.placement,Un=Nt.builtinPlacements,Xn=Nt.getPopupContainer,Wn=Nt.showAction,hn=Wn===void 0?[]:Wn,An=Nt.onFocus,_n=Nt.onBlur,kn=Nt.onKeyUp,Bn=Nt.onKeyDown,sr=Nt.onMouseDown,Yn=(0,fe.Z)(Nt,$t),On=sn(Vr),ln=(Dn!==void 0?Dn:On)||Vr==="combobox",lr=(0,ze.Z)({},Yn);Ut.forEach(function(oo){delete lr[oo]}),zn==null||zn.forEach(function(oo){delete lr[oo]});var wr=Se.useState(!1),Jr=(0,De.Z)(wr,2),Nr=Jr[0],Si=Jr[1];Se.useEffect(function(){Si((0,de.Z)())},[]);var vi=Se.useRef(null),mi=Se.useRef(null),Ci=Se.useRef(null),Ei=Se.useRef(null),Ki=Se.useRef(null),Qt=Se.useRef(!1),xi=ge(),ci=(0,De.Z)(xi,3),zr=ci[0],oi=ci[1],Xr=ci[2];Se.useImperativeHandle(Ht,function(){var oo,$i;return{focus:(oo=Ei.current)===null||oo===void 0?void 0:oo.focus,blur:($i=Ei.current)===null||$i===void 0?void 0:$i.blur,scrollTo:function(Pr){var fa;return(fa=Ki.current)===null||fa===void 0?void 0:fa.scrollTo(Pr)},nativeElement:vi.current||mi.current}});var Ri=Se.useMemo(function(){var oo;if(Vr!=="combobox")return ii;var $i=(oo=Zn[0])===null||oo===void 0?void 0:oo.value;return typeof $i=="string"||typeof $i=="number"?String($i):""},[ii,Vr,Zn]),Bi=Vr==="combobox"&&typeof dn=="function"&&dn()||null,ti=typeof Hn=="function"&&Hn(),eo=(0,z.x1)(mi,ti==null||(Mn=ti.props)===null||Mn===void 0?void 0:Mn.ref),pa=Se.useState(!1),Ao=(0,De.Z)(pa,2),Ps=Ao[0],wa=Ao[1];(0,xe.Z)(function(){wa(!0)},[]);var Ar=(0,ke.Z)(!1,{defaultValue:Jn,value:ur}),Po=(0,De.Z)(Ar,2),bo=Po[0],ta=Po[1],jo=Ps?bo:!1,Ko=!pr&&Kr;(ei||Ko&&jo&&Vr==="combobox")&&(jo=!1);var Qn=Ko?!1:jo,Or=Se.useCallback(function(oo){var $i=oo!==void 0?oo:!jo;ei||(ta($i),jo!==$i&&(yr==null||yr($i)))},[ei,jo,ta,yr]),Qr=Se.useMemo(function(){return(vn||[]).some(function(oo){return[`
`,`\r
`].includes(oo)})},[vn]),wi=Se.useContext(Kt)||{},ki=wi.maxCount,no=wi.rawValues,Dr=function($i,sa,Pr){if(!(On&&Qe(ki)&&(no==null?void 0:no.size)>=ki)){var fa=!0,Gt=$i;Wr==null||Wr(null);var bn=At($i,vn,Qe(ki)?ki-no.size:void 0),Hs=Pr?null:bn;return Vr!=="combobox"&&Hs&&(Gt="",Li==null||Li(Hs),Or(!1),fa=!1),mn&&Ri!==Gt&&mn(Gt,{source:sa?"typing":"effect"}),fa}},Aa=function($i){!$i||!$i.trim()||mn($i,{source:"submit"})};Se.useEffect(function(){!jo&&!On&&Vr!=="combobox"&&Dr("",!1,!1)},[jo]),Se.useEffect(function(){bo&&ei&&ta(!1),ei&&!Qt.current&&oi(!1)},[ei]);var zo=Pe(),Oo=(0,De.Z)(zo,2),ji=Oo[0],Vo=Oo[1],ja=Se.useRef(!1),vo=function($i){var sa=ji(),Pr=$i.key,fa=Pr==="Enter";if(fa&&(Vr!=="combobox"&&$i.preventDefault(),jo||Or(!0)),Vo(!!Ri),Pr==="Backspace"&&!sa&&On&&!Ri&&Zn.length){for(var Gt=(0,Bt.Z)(Zn),bn=null,Hs=Gt.length-1;Hs>=0;Hs-=1){var jl=Gt[Hs];if(!jl.disabled){Gt.splice(Hs,1),bn=jl;break}}bn&&rr(Gt,{type:"remove",values:[bn]})}for(var Qo=arguments.length,Pa=new Array(Qo>1?Qo-1:0),Fs=1;Fs<Qo;Fs++)Pa[Fs-1]=arguments[Fs];if(jo&&(!fa||!ja.current)){var ol;fa&&(ja.current=!0),(ol=Ki.current)===null||ol===void 0||ol.onKeyDown.apply(ol,[$i].concat(Pa))}Bn==null||Bn.apply(void 0,[$i].concat(Pa))},fs=function($i){for(var sa=arguments.length,Pr=new Array(sa>1?sa-1:0),fa=1;fa<sa;fa++)Pr[fa-1]=arguments[fa];if(jo){var Gt;(Gt=Ki.current)===null||Gt===void 0||Gt.onKeyUp.apply(Gt,[$i].concat(Pr))}$i.key==="Enter"&&(ja.current=!1),kn==null||kn.apply(void 0,[$i].concat(Pr))},ds=function($i){var sa=Zn.filter(function(Pr){return Pr!==$i});rr(sa,{type:"remove",values:[$i]})},bs=function(){ja.current=!1},na=Se.useRef(!1),eh=function(){oi(!0),ei||(An&&!na.current&&An.apply(void 0,arguments),hn.includes("focus")&&Or(!0)),na.current=!0},ju=function(){Qt.current=!0,oi(!1,function(){na.current=!1,Qt.current=!1,Or(!1)}),!ei&&(Ri&&(Vr==="tags"?mn(Ri,{source:"submit"}):Vr==="multiple"&&mn("",{source:"blur"})),_n&&_n.apply(void 0,arguments))},il=[];Se.useEffect(function(){return function(){il.forEach(function(oo){return clearTimeout(oo)}),il.splice(0,il.length)}},[]);var Sl=function($i){var sa,Pr=$i.target,fa=(sa=Ci.current)===null||sa===void 0?void 0:sa.getPopupElement();if(fa&&fa.contains(Pr)){var Gt=setTimeout(function(){var Qo=il.indexOf(Gt);if(Qo!==-1&&il.splice(Qo,1),Xr(),!Nr&&!fa.contains(document.activeElement)){var Pa;(Pa=Ei.current)===null||Pa===void 0||Pa.focus()}});il.push(Gt)}for(var bn=arguments.length,Hs=new Array(bn>1?bn-1:0),jl=1;jl<bn;jl++)Hs[jl-1]=arguments[jl];sr==null||sr.apply(void 0,[$i].concat(Hs))},Os=Se.useState({}),Vl=(0,De.Z)(Os,2),th=Vl[1];function nh(){th({})}var Zo;ti&&(Zo=function($i){Or($i)}),je(function(){var oo;return[vi.current,(oo=Ci.current)===null||oo===void 0?void 0:oo.getPopupElement()]},Qn,Or,!!ti);var Ou=Se.useMemo(function(){return(0,ze.Z)((0,ze.Z)({},Nt),{},{notFoundContent:pr,open:jo,triggerOpen:Qn,id:jn,showSearch:ln,multiple:On,toggleOpen:Or})},[Nt,pr,Qn,jo,jn,ln,On,Or]),rh=!!si||Di,Zl;rh&&(Zl=Se.createElement(ae,{className:ve()("".concat(en,"-arrow"),(0,oe.Z)({},"".concat(en,"-arrow-loading"),Di)),customizeIcon:si,customizeIconProps:{loading:Di,searchValue:Ri,open:jo,focused:zr,showSearch:ln}}));var uu=function(){var $i;an==null||an(),($i=Ei.current)===null||$i===void 0||$i.focus(),rr([],{type:"clear",values:Zn}),Dr("",!1,!1)},Ca=ie(en,uu,Zn,xr,Ii,ei,Ri,Vr),Oa=Ca.allowClear,aa=Ca.clearIcon,ga=Se.createElement(pi,{ref:Ki}),Xl=ve()(en,Fn,(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"),zr),"".concat(en,"-multiple"),On),"".concat(en,"-single"),!On),"".concat(en,"-allow-clear"),xr),"".concat(en,"-show-arrow"),rh),"".concat(en,"-disabled"),ei),"".concat(en,"-loading"),Di),"".concat(en,"-open"),jo),"".concat(en,"-customize-input"),Bi),"".concat(en,"-show-search"),ln)),Ga=Se.createElement(Ie,{ref:Ci,disabled:ei,prefixCls:en,visible:Qn,popupElement:ga,animation:Zr,transitionName:Gi,dropdownStyle:qt,dropdownClassName:wn,direction:er,dropdownMatchSelectWidth:Jt,dropdownRender:lt,dropdownAlign:In,placement:pn,builtinPlacements:Un,getPopupContainer:Xn,empty:Kr,getTriggerDOMNode:function($i){return mi.current||$i},onPopupVisibleChange:Zo,onPopupMouseEnter:nh},ti?Se.cloneElement(ti,{ref:eo}):Se.createElement(tt,(0,gt.Z)({},Nt,{domRef:mi,prefixCls:en,inputElement:Bi,ref:Ei,id:jn,prefix:ui,showSearch:ln,autoClearSearchValue:hi,mode:Vr,activeDescendantId:$r,tagRender:Ln,values:Zn,open:jo,onToggleOpen:Or,activeValue:Fr,searchValue:Ri,onSearch:Dr,onSearchSubmit:Aa,onRemove:ds,tokenWithEnter:Qr,onInputBlur:bs}))),co;return ti?co=Ga:co=Se.createElement("div",(0,gt.Z)({className:Xl},lr,{ref:vi,onMouseDown:Sl,onKeyDown:vo,onKeyUp:fs,onFocus:eh,onBlur:ju}),Se.createElement(Xt,{visible:zr&&!jo,values:Zn}),Ga,Zl,Oa&&aa),Se.createElement(le.Provider,{value:Ou},co)}),Wt=tn,Pn=function(){return null};Pn.isSelectOptGroup=!0;var Sn=Pn,Tn=function(){return null};Tn.isSelectOption=!0;var Kn=Tn,Mr=at(80547),fr=at(2738),Er=at(65283);function Hr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Ur=["disabled","title","children","style","className"];function ri(Nt){return typeof Nt=="string"||typeof Nt=="number"}var Pi=function(Ht,Mn){var jn=ue(),en=jn.prefixCls,Fn=jn.id,Dn=jn.open,Ln=jn.multiple,er=jn.mode,zn=jn.searchValue,Zn=jn.toggleOpen,rr=jn.notFoundContent,Kr=jn.onPopupScroll,cr=Se.useContext(Kt),pr=cr.maxCount,an=cr.flattenOptions,Vr=cr.onActiveValue,ei=cr.defaultActiveFirstOption,Di=cr.onSelect,dn=cr.menuItemSelectedIcon,Hn=cr.rawValues,ur=cr.fieldNames,Jn=cr.virtual,yr=cr.direction,Fr=cr.listHeight,Wr=cr.listItemHeight,$r=cr.optionRender,ii="".concat(en,"-item"),hi=(0,Mr.Z)(function(){return an},[Dn,an],function(Wn,hn){return hn[0]&&Wn[1]!==hn[1]}),mn=Se.useRef(null),Li=Se.useMemo(function(){return Ln&&Qe(pr)&&(Hn==null?void 0:Hn.size)>=pr},[Ln,pr,Hn==null?void 0:Hn.size]),vn=function(hn){hn.preventDefault()},xr=function(hn){var An;(An=mn.current)===null||An===void 0||An.scrollTo(typeof hn=="number"?{index:hn}:hn)},ui=Se.useCallback(function(Wn){return er==="combobox"?!1:Hn.has(Wn)},[er,(0,Bt.Z)(Hn).toString(),Hn.size]),si=function(hn){for(var An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,_n=hi.length,kn=0;kn<_n;kn+=1){var Bn=(hn+kn*An+_n)%_n,sr=hi[Bn]||{},Yn=sr.group,On=sr.data;if(!Yn&&!(On!=null&&On.disabled)&&(ui(On.value)||!Li))return Bn}return-1},Ii=Se.useState(function(){return si(0)}),pi=(0,De.Z)(Ii,2),Zr=pi[0],Gi=pi[1],qt=function(hn){var An=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Gi(hn);var _n={source:An?"keyboard":"mouse"},kn=hi[hn];if(!kn){Vr(null,-1,_n);return}Vr(kn.value,hn,_n)};(0,Se.useEffect)(function(){qt(ei!==!1?si(0):-1)},[hi.length,zn]);var wn=Se.useCallback(function(Wn){return er==="combobox"?String(Wn).toLowerCase()===zn.toLowerCase():Hn.has(Wn)},[er,zn,(0,Bt.Z)(Hn).toString(),Hn.size]);(0,Se.useEffect)(function(){var Wn=setTimeout(function(){if(!Ln&&Dn&&Hn.size===1){var An=Array.from(Hn)[0],_n=hi.findIndex(function(kn){var Bn=kn.data;return zn?String(Bn.value).startsWith(zn):Bn.value===An});_n!==-1&&(qt(_n),xr(_n))}});if(Dn){var hn;(hn=mn.current)===null||hn===void 0||hn.scrollTo(void 0)}return function(){return clearTimeout(Wn)}},[Dn,zn]);var Jt=function(hn){hn!==void 0&&Di(hn,{selected:!Hn.has(hn)}),Ln||Zn(!1)};if(Se.useImperativeHandle(Mn,function(){return{onKeyDown:function(hn){var An=hn.which,_n=hn.ctrlKey;switch(An){case Be.Z.N:case Be.Z.P:case Be.Z.UP:case Be.Z.DOWN:{var kn=0;if(An===Be.Z.UP?kn=-1:An===Be.Z.DOWN?kn=1:Hr()&&_n&&(An===Be.Z.N?kn=1:An===Be.Z.P&&(kn=-1)),kn!==0){var Bn=si(Zr+kn,kn);xr(Bn),qt(Bn,!0)}break}case Be.Z.TAB:case Be.Z.ENTER:{var sr,Yn=hi[Zr];Yn&&!(Yn!=null&&(sr=Yn.data)!==null&&sr!==void 0&&sr.disabled)&&!Li?Jt(Yn.value):Jt(void 0),Dn&&hn.preventDefault();break}case Be.Z.ESC:Zn(!1),Dn&&hn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(hn){xr(hn)}}}),hi.length===0)return Se.createElement("div",{role:"listbox",id:"".concat(Fn,"_list"),className:"".concat(ii,"-empty"),onMouseDown:vn},rr);var lt=Object.keys(ur).map(function(Wn){return ur[Wn]}),In=function(hn){return hn.label};function pn(Wn,hn){var An=Wn.group;return{role:An?"presentation":"option",id:"".concat(Fn,"_list_").concat(hn)}}var Un=function(hn){var An=hi[hn];if(!An)return null;var _n=An.data||{},kn=_n.value,Bn=An.group,sr=(0,Ne.Z)(_n,!0),Yn=In(An);return An?Se.createElement("div",(0,gt.Z)({"aria-label":typeof Yn=="string"&&!Bn?Yn:null},sr,{key:hn},pn(An,hn),{"aria-selected":wn(kn)}),kn):null},Xn={role:"listbox",id:"".concat(Fn,"_list")};return Se.createElement(Se.Fragment,null,Jn&&Se.createElement("div",(0,gt.Z)({},Xn,{style:{height:0,width:0,overflow:"hidden"}}),Un(Zr-1),Un(Zr),Un(Zr+1)),Se.createElement(Er.Z,{itemKey:"key",ref:mn,data:hi,height:Fr,itemHeight:Wr,fullHeight:!1,onMouseDown:vn,onScroll:Kr,virtual:Jn,direction:yr,innerProps:Jn?null:Xn},function(Wn,hn){var An=Wn.group,_n=Wn.groupOption,kn=Wn.data,Bn=Wn.label,sr=Wn.value,Yn=kn.key;if(An){var On,ln=(On=kn.title)!==null&&On!==void 0?On:ri(Bn)?Bn.toString():void 0;return Se.createElement("div",{className:ve()(ii,"".concat(ii,"-group"),kn.className),title:ln},Bn!==void 0?Bn:Yn)}var lr=kn.disabled,wr=kn.title,Jr=kn.children,Nr=kn.style,Si=kn.className,vi=(0,fe.Z)(kn,Ur),mi=(0,fr.Z)(vi,lt),Ci=ui(sr),Ei=lr||!Ci&&Li,Ki="".concat(ii,"-option"),Qt=ve()(ii,Ki,Si,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(Ki,"-grouped"),_n),"".concat(Ki,"-active"),Zr===hn&&!Ei),"".concat(Ki,"-disabled"),Ei),"".concat(Ki,"-selected"),Ci)),xi=In(Wn),ci=!dn||typeof dn=="function"||Ci,zr=typeof xi=="number"?xi:xi||sr,oi=ri(zr)?zr.toString():void 0;return wr!==void 0&&(oi=wr),Se.createElement("div",(0,gt.Z)({},(0,Ne.Z)(mi),Jn?{}:pn(Wn,hn),{"aria-selected":wn(sr),className:Qt,title:oi,onMouseMove:function(){Zr===hn||Ei||qt(hn)},onClick:function(){Ei||Jt(sr)},style:Nr}),Se.createElement("div",{className:"".concat(Ki,"-content")},typeof $r=="function"?$r(Wn,{index:hn}):zr),Se.isValidElement(dn)||Ci,ci&&Se.createElement(ae,{className:"".concat(ii,"-option-state"),customizeIcon:dn,customizeIconProps:{value:sr,disabled:Ei,isSelected:Ci}},Ci?"\u2713":null))}))},Ui=Se.forwardRef(Pi),Fi=Ui,zi=function(Nt,Ht){var Mn=Se.useRef({values:new Map,options:new Map}),jn=Se.useMemo(function(){var Fn=Mn.current,Dn=Fn.values,Ln=Fn.options,er=Nt.map(function(rr){if(rr.label===void 0){var Kr;return(0,ze.Z)((0,ze.Z)({},rr),{},{label:(Kr=Dn.get(rr.value))===null||Kr===void 0?void 0:Kr.label})}return rr}),zn=new Map,Zn=new Map;return er.forEach(function(rr){zn.set(rr.value,rr),Zn.set(rr.value,Ht.get(rr.value)||Ln.get(rr.value))}),Mn.current.values=zn,Mn.current.options=Zn,er},[Nt,Ht]),en=Se.useCallback(function(Fn){return Ht.get(Fn)||Mn.current.options.get(Fn)},[Ht]);return[jn,en]};function Xi(Nt,Ht){return st(Nt).join("").toUpperCase().includes(Ht)}var et=function(Nt,Ht,Mn,jn,en){return Se.useMemo(function(){if(!Mn||jn===!1)return Nt;var Fn=Ht.options,Dn=Ht.label,Ln=Ht.value,er=[],zn=typeof jn=="function",Zn=Mn.toUpperCase(),rr=zn?jn:function(cr,pr){return en?Xi(pr[en],Zn):pr[Fn]?Xi(pr[Dn!=="children"?Dn:"label"],Zn):Xi(pr[Ln],Zn)},Kr=zn?function(cr){return Mt(cr)}:function(cr){return cr};return Nt.forEach(function(cr){if(cr[Fn]){var pr=rr(Mn,Kr(cr));if(pr)er.push(cr);else{var an=cr[Fn].filter(function(Vr){return rr(Mn,Kr(Vr))});an.length&&er.push((0,ze.Z)((0,ze.Z)({},cr),{},(0,oe.Z)({},Fn,an)))}return}rr(Mn,Kr(cr))&&er.push(cr)}),er},[Nt,jn,en,Mn,Ht])},dr=at(6551),mr=at(11592),Mi=["children","value"],ar=["children"];function Sr(Nt){var Ht=Nt,Mn=Ht.key,jn=Ht.props,en=jn.children,Fn=jn.value,Dn=(0,fe.Z)(jn,Mi);return(0,ze.Z)({key:Mn,value:Fn!==void 0?Fn:Mn,children:en},Dn)}function jr(Nt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,mr.Z)(Nt).map(function(Mn,jn){if(!Se.isValidElement(Mn)||!Mn.type)return null;var en=Mn,Fn=en.type.isSelectOptGroup,Dn=en.key,Ln=en.props,er=Ln.children,zn=(0,fe.Z)(Ln,ar);return Ht||!Fn?Sr(Mn):(0,ze.Z)((0,ze.Z)({key:"__RC_SELECT_GRP__".concat(Dn===null?jn:Dn,"__"),label:Dn},zn),{},{options:jr(er)})}).filter(function(Mn){return Mn})}var to=function(Ht,Mn,jn,en,Fn){return Se.useMemo(function(){var Dn=Ht,Ln=!Ht;Ln&&(Dn=jr(Mn));var er=new Map,zn=new Map,Zn=function(cr,pr,an){an&&typeof an=="string"&&cr.set(pr[an],pr)},rr=function Kr(cr){for(var pr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,an=0;an<cr.length;an+=1){var Vr=cr[an];!Vr[jn.options]||pr?(er.set(Vr[jn.value],Vr),Zn(zn,Vr,jn.label),Zn(zn,Vr,en),Zn(zn,Vr,Fn)):Kr(Vr[jn.options],!0)}};return rr(Dn),{options:Dn,valueOptions:er,labelOptions:zn}},[Ht,Mn,jn,en,Fn])},Rr=to;function on(Nt){var Ht=Se.useRef();Ht.current=Nt;var Mn=Se.useCallback(function(){return Ht.current.apply(Ht,arguments)},[]);return Mn}function rn(Nt){var Ht=Nt.mode,Mn=Nt.options,jn=Nt.children,en=Nt.backfill,Fn=Nt.allowClear,Dn=Nt.placeholder,Ln=Nt.getInputElement,er=Nt.showSearch,zn=Nt.onSearch,Zn=Nt.defaultOpen,rr=Nt.autoFocus,Kr=Nt.labelInValue,cr=Nt.value,pr=Nt.inputValue,an=Nt.optionLabelProp,Vr=isMultiple(Ht),ei=er!==void 0?er:Vr||Ht==="combobox",Di=Mn||convertChildrenToData(jn);if(warning(Ht!=="tags"||Di.every(function(Jn){return!Jn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ht==="tags"||Ht==="combobox"){var dn=Di.some(function(Jn){return Jn.options?Jn.options.some(function(yr){return typeof("value"in yr?yr.value:yr.key)=="number"}):typeof("value"in Jn?Jn.value:Jn.key)=="number"});warning(!dn,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ht!=="combobox"||!an,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ht==="combobox"||!en,"`backfill` only works with `combobox` mode."),warning(Ht==="combobox"||!Ln,"`getInputElement` only work with `combobox` mode."),noteOnce(Ht!=="combobox"||!Ln||!Fn||!Dn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),zn&&!ei&&Ht!=="combobox"&&Ht!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Zn||rr,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),cr!=null){var Hn=toArray(cr);warning(!Kr||Hn.every(function(Jn){return _typeof(Jn)==="object"&&("key"in Jn||"value"in Jn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Vr||Array.isArray(cr),"`value` should be array when `mode` is `multiple` or `tags`")}if(jn){var ur=null;toNodeArray(jn).some(function(Jn){if(!React.isValidElement(Jn)||!Jn.type)return!1;var yr=Jn,Fr=yr.type;if(Fr.isSelectOption)return!1;if(Fr.isSelectOptGroup){var Wr=toNodeArray(Jn.props.children).every(function($r){return!React.isValidElement($r)||!Jn.type||$r.type.isSelectOption?!0:(ur=$r.type,!1)});return!Wr}return ur=Fr,!0}),ur&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ur.displayName||ur.name||ur,"`.")),warning(pr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Yt(Nt,Ht){if(Nt){var Mn=function jn(en){for(var Fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dn=0;Dn<en.length;Dn++){var Ln=en[Dn];if(Ln[Ht==null?void 0:Ht.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Fn&&Array.isArray(Ln[Ht==null?void 0:Ht.options])&&jn(Ln[Ht==null?void 0:Ht.options],!0))break}};Mn(Nt)}}var nr=null,gr=["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"],Cr=["inputValue"];function Nn(Nt){return!Nt||(0,me.Z)(Nt)!=="object"}var qn=Se.forwardRef(function(Nt,Ht){var Mn=Nt.id,jn=Nt.mode,en=Nt.prefixCls,Fn=en===void 0?"rc-select":en,Dn=Nt.backfill,Ln=Nt.fieldNames,er=Nt.inputValue,zn=Nt.searchValue,Zn=Nt.onSearch,rr=Nt.autoClearSearchValue,Kr=rr===void 0?!0:rr,cr=Nt.onSelect,pr=Nt.onDeselect,an=Nt.dropdownMatchSelectWidth,Vr=an===void 0?!0:an,ei=Nt.filterOption,Di=Nt.filterSort,dn=Nt.optionFilterProp,Hn=Nt.optionLabelProp,ur=Nt.options,Jn=Nt.optionRender,yr=Nt.children,Fr=Nt.defaultActiveFirstOption,Wr=Nt.menuItemSelectedIcon,$r=Nt.virtual,ii=Nt.direction,hi=Nt.listHeight,mn=hi===void 0?200:hi,Li=Nt.listItemHeight,vn=Li===void 0?20:Li,xr=Nt.labelRender,ui=Nt.value,si=Nt.defaultValue,Ii=Nt.labelInValue,pi=Nt.onChange,Zr=Nt.maxCount,Gi=(0,fe.Z)(Nt,gr),qt=(0,dr.ZP)(Mn),wn=sn(jn),Jt=!!(!ur&&yr),lt=Se.useMemo(function(){return ei===void 0&&jn==="combobox"?!1:ei},[ei,jn]),In=Se.useMemo(function(){return ut(Ln,Jt)},[JSON.stringify(Ln),Jt]),pn=(0,ke.Z)("",{value:zn!==void 0?zn:er,postState:function(Qr){return Qr||""}}),Un=(0,De.Z)(pn,2),Xn=Un[0],Wn=Un[1],hn=Rr(ur,yr,In,dn,Hn),An=hn.valueOptions,_n=hn.labelOptions,kn=hn.options,Bn=Se.useCallback(function(Or){var Qr=st(Or);return Qr.map(function(wi){var ki,no,Dr,Aa,zo;if(Nn(wi))ki=wi;else{var Oo;Dr=wi.key,no=wi.label,ki=(Oo=wi.value)!==null&&Oo!==void 0?Oo:Dr}var ji=An.get(ki);if(ji){var Vo;if(no===void 0&&(no=ji==null?void 0:ji[Hn||In.label]),Dr===void 0&&(Dr=(Vo=ji==null?void 0:ji.key)!==null&&Vo!==void 0?Vo:ki),Aa=ji==null?void 0:ji.disabled,zo=ji==null?void 0:ji.title,0)var ja}return{label:no,value:ki,key:Dr,disabled:Aa,title:zo}})},[In,Hn,An]),sr=(0,ke.Z)(si,{value:ui}),Yn=(0,De.Z)(sr,2),On=Yn[0],ln=Yn[1],lr=Se.useMemo(function(){var Or,Qr=wn&&On===null?[]:On,wi=Bn(Qr);return jn==="combobox"&&nt((Or=wi[0])===null||Or===void 0?void 0:Or.value)?[]:wi},[On,Bn,jn,wn]),wr=zi(lr,An),Jr=(0,De.Z)(wr,2),Nr=Jr[0],Si=Jr[1],vi=Se.useMemo(function(){if(!jn&&Nr.length===1){var Or=Nr[0];if(Or.value===null&&(Or.label===null||Or.label===void 0))return[]}return Nr.map(function(Qr){var wi;return(0,ze.Z)((0,ze.Z)({},Qr),{},{label:(wi=typeof xr=="function"?xr(Qr):Qr.label)!==null&&wi!==void 0?wi:Qr.value})})},[jn,Nr,xr]),mi=Se.useMemo(function(){return new Set(Nr.map(function(Or){return Or.value}))},[Nr]);Se.useEffect(function(){if(jn==="combobox"){var Or,Qr=(Or=Nr[0])===null||Or===void 0?void 0:Or.value;Wn($e(Qr)?String(Qr):"")}},[Nr]);var Ci=on(function(Or,Qr){var wi=Qr!=null?Qr:Or;return(0,oe.Z)((0,oe.Z)({},In.value,Or),In.label,wi)}),Ei=Se.useMemo(function(){if(jn!=="tags")return kn;var Or=(0,Bt.Z)(kn),Qr=function(ki){return An.has(ki)};return(0,Bt.Z)(Nr).sort(function(wi,ki){return wi.value<ki.value?-1:1}).forEach(function(wi){var ki=wi.value;Qr(ki)||Or.push(Ci(ki,wi.label))}),Or},[Ci,kn,An,Nr,jn]),Ki=et(Ei,In,Xn,lt,dn),Qt=Se.useMemo(function(){return jn!=="tags"||!Xn||Ki.some(function(Or){return Or[dn||"value"]===Xn})||Ki.some(function(Or){return Or[In.value]===Xn})?Ki:[Ci(Xn)].concat((0,Bt.Z)(Ki))},[Ci,dn,jn,Ki,Xn,In]),xi=function Or(Qr){var wi=(0,Bt.Z)(Qr).sort(function(ki,no){return Di(ki,no,{searchValue:Xn})});return wi.map(function(ki){return Array.isArray(ki.options)?(0,ze.Z)((0,ze.Z)({},ki),{},{options:ki.options.length>0?Or(ki.options):ki.options}):ki})},ci=Se.useMemo(function(){return Di?xi(Qt):Qt},[Qt,Di,Xn]),zr=Se.useMemo(function(){return pt(ci,{fieldNames:In,childrenAsData:Jt})},[ci,In,Jt]),oi=function(Qr){var wi=Bn(Qr);if(ln(wi),pi&&(wi.length!==Nr.length||wi.some(function(Dr,Aa){var zo;return((zo=Nr[Aa])===null||zo===void 0?void 0:zo.value)!==(Dr==null?void 0:Dr.value)}))){var ki=Ii?wi:wi.map(function(Dr){return Dr.value}),no=wi.map(function(Dr){return Mt(Si(Dr.value))});pi(wn?ki:ki[0],wn?no:no[0])}},Xr=Se.useState(null),Ri=(0,De.Z)(Xr,2),Bi=Ri[0],ti=Ri[1],eo=Se.useState(0),pa=(0,De.Z)(eo,2),Ao=pa[0],Ps=pa[1],wa=Fr!==void 0?Fr:jn!=="combobox",Ar=Se.useCallback(function(Or,Qr){var wi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ki=wi.source,no=ki===void 0?"keyboard":ki;Ps(Qr),Dn&&jn==="combobox"&&Or!==null&&no==="keyboard"&&ti(String(Or))},[Dn,jn]),Po=function(Qr,wi,ki){var no=function(){var ds,bs=Si(Qr);return[Ii?{label:bs==null?void 0:bs[In.label],value:Qr,key:(ds=bs==null?void 0:bs.key)!==null&&ds!==void 0?ds:Qr}:Qr,Mt(bs)]};if(wi&&cr){var Dr=no(),Aa=(0,De.Z)(Dr,2),zo=Aa[0],Oo=Aa[1];cr(zo,Oo)}else if(!wi&&pr&&ki!=="clear"){var ji=no(),Vo=(0,De.Z)(ji,2),ja=Vo[0],vo=Vo[1];pr(ja,vo)}},bo=on(function(Or,Qr){var wi,ki=wn?Qr.selected:!0;ki?wi=wn?[].concat((0,Bt.Z)(Nr),[Or]):[Or]:wi=Nr.filter(function(no){return no.value!==Or}),oi(wi),Po(Or,ki),jn==="combobox"?ti(""):(!sn||Kr)&&(Wn(""),ti(""))}),ta=function(Qr,wi){oi(Qr);var ki=wi.type,no=wi.values;(ki==="remove"||ki==="clear")&&no.forEach(function(Dr){Po(Dr.value,!1,ki)})},jo=function(Qr,wi){if(Wn(Qr),ti(null),wi.source==="submit"){var ki=(Qr||"").trim();if(ki){var no=Array.from(new Set([].concat((0,Bt.Z)(mi),[ki])));oi(no),Po(ki,!0),Wn("")}return}wi.source!=="blur"&&(jn==="combobox"&&oi(Qr),Zn==null||Zn(Qr))},Ko=function(Qr){var wi=Qr;jn!=="tags"&&(wi=Qr.map(function(no){var Dr=_n.get(no);return Dr==null?void 0:Dr.value}).filter(function(no){return no!==void 0}));var ki=Array.from(new Set([].concat((0,Bt.Z)(mi),(0,Bt.Z)(wi))));oi(ki),ki.forEach(function(no){Po(no,!0)})},Qn=Se.useMemo(function(){var Or=$r!==!1&&Vr!==!1;return(0,ze.Z)((0,ze.Z)({},hn),{},{flattenOptions:zr,onActiveValue:Ar,defaultActiveFirstOption:wa,onSelect:bo,menuItemSelectedIcon:Wr,rawValues:mi,fieldNames:In,virtual:Or,direction:ii,listHeight:mn,listItemHeight:vn,childrenAsData:Jt,maxCount:Zr,optionRender:Jn})},[Zr,hn,zr,Ar,wa,bo,Wr,mi,In,$r,Vr,ii,mn,vn,Jt,Jn]);return Se.createElement(Kt.Provider,{value:Qn},Se.createElement(Wt,(0,gt.Z)({},Gi,{id:qt,prefixCls:Fn,ref:Ht,omitDomProps:Cr,mode:jn,displayValues:vi,onDisplayValuesChange:ta,direction:ii,searchValue:Xn,onSearch:jo,autoClearSearchValue:Kr,onSearchSplit:Ko,dropdownMatchSelectWidth:Vr,OptionList:Fi,emptyOptions:!zr.length,activeValue:Bi,activeDescendantId:"".concat(qt,"_list_").concat(Ao)})))}),Ir=qn;Ir.Option=Kn,Ir.OptGroup=Sn;var gi=Ir,bi=gi},63158:function(gn,cn,at){"use strict";var gt=at(71409),Bt=at(87075),oe=at(11036),ze=at(39224),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,xe){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),Re=(0,ke.Z)(!1,{value:ie,defaultValue:le}),We=(0,oe.Z)(Re,2),Ye=We[0],Ue=We[1];function Ke(bt,$e){var nt=Ye;return ue||(nt=bt,Ue(nt),Fe==null||Fe(nt,$e)),nt}function ot(bt){bt.which===Ce.Z.LEFT?Ke(!1,bt):bt.which===Ce.Z.RIGHT&&Ke(!0,bt),Ne==null||Ne(bt)}function st(bt){var $e=Ke(!Ye,bt);Be==null||Be($e,bt)}var ft=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,gt.Z)({},Ae,{type:"button",role:"switch","aria-checked":Ye,disabled:ue,className:ft,ref:xe,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 gt}});var gt={},Bt="rc-table-internal-hook"},97347:function(gn,cn,at){"use strict";at.d(cn,{L:function(){return ee},Z:function(){return ge}});var gt=at(11036),Bt=at(87075),oe=at(62730),ze=at(28788),De=at(89490),fe=at(39224),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 xe(Pe,je,Be){return Ce.useMemo(function(){if(je&&je>0){var Fe=0,Ne=0;Pe.forEach(function(st){var ft=ve(je,st.width);ft?Fe+=ft:Ne+=1});var Ae=Math.max(je,Be),Re=Math.max(Ae-Fe,Ne),We=Ne,Ye=Re/Ne,Ue=0,Ke=Pe.map(function(st){var ft=(0,De.Z)({},st),bt=ve(je,ft.width);if(bt)ft.width=bt;else{var $e=Math.floor(Ye);ft.width=We===1?Re:$e,Re-=$e,We-=1}return Ue+=ft.width,ft});if(Ue<Ae){var ot=Ae/Ue;Re=Ae,Ke.forEach(function(st,ft){var bt=Math.floor(st.width*ot);st.width=ft===Ke.length-1?Re:bt,Re-=bt})}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),Re=(0,De.Z)({key:Be},Ae);return Ne&&(Re.children=ee(Ne)),Re})}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,Re=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:Re},Ue)}))):[].concat((0,oe.Z)(Be),[(0,De.Z)((0,De.Z)({key:We},Fe),{},{fixed:Re})])},[])}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,Re=Pe.expandedKeys,We=Pe.columnTitle,Ye=Pe.getRowKey,Ue=Pe.onTriggerExpand,Ke=Pe.expandIcon,ot=Pe.rowExpandable,st=Pe.expandIconColumnIndex,ft=Pe.direction,bt=Pe.expandRowByClick,$e=Pe.columnWidth,nt=Pe.fixed,xt=Pe.scrollWidth,wt=Pe.clientWidth,Pt=Ce.useMemo(function(){var tt=Fe||ee(Ne)||[];return ae(tt.slice())},[Fe,Ne]),dt=Ce.useMemo(function(){if(Ae){var tt=Pt.slice();if(!tt.includes(Se.w)){var Ve=st||0;Ve>=0&&(Ve||nt==="left"||!nt)&&tt.splice(Ve,0,Se.w),nt==="right"&&tt.splice(Pt.length,0,Se.w)}var we=tt.indexOf(Se.w);tt=tt.filter(function(Ie,_e){return Ie!==Se.w||_e===we});var Le=Pt[we],Ze;nt?Ze=nt:Ze=Le?Le.fixed:null;var rt=(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),pt=Re.has(ut),Mt=ot?ot(He):!0,At=Ke({prefixCls:Be,expanded:pt,expandable:Mt,record:He,onExpand:Ue});return bt?Ce.createElement("span",{onClick:function(Kt){return Kt.stopPropagation()}},At):At});return tt.map(function(Ie){return Ie===Se.w?rt:Ie})}return Pt.filter(function(Ie){return Ie!==Se.w})},[Ae,Pt,Ye,Re,Ke,ft]),ct=Ce.useMemo(function(){var tt=dt;return je&&(tt=je(tt)),tt.length||(tt=[{render:function(){return null}}]),tt},[je,dt,ft]),ht=Ce.useMemo(function(){return ft==="rtl"?le(ie(ct)):ie(ct)},[ct,ft,xt]),Et=Ce.useMemo(function(){for(var tt=-1,Ve=ht.length-1;Ve>=0;Ve-=1){var we=ht[Ve].fixed;if(we==="left"||we===!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 rt=ht.findIndex(function(He){var Qe=He.fixed;return Qe==="right"});if(rt>=0)for(var Ie=rt;Ie<ht.length;Ie+=1){var _e=ht[Ie].fixed;if(_e!=="right")return!0}return!1},[ht]),vt=xe(ht,xt,wt),Ft=(0,gt.Z)(vt,2),mt=Ft[0],St=Ft[1];return[ct,mt,St,Et]}var ge=ue},4030:function(gn,cn,at){"use strict";at.d(cn,{w2:function(){return gt.w},vP:function(){return ri.v},RQ:function(){return gt.R},ER:function(){return ut},Q$:function(){return ei},TN:function(){return pi}});var gt=at(86351),Bt=at(11036),oe=at(6089),ze=at(34280),De=at(13697),fe=at(59301),me=at(4676);function ke(qt){var wn=fe.createContext(void 0),Jt=function(In){var pn=In.value,Un=In.children,Xn=fe.useRef(pn);Xn.current=pn;var Wn=fe.useState(function(){return{getValue:function(){return Xn.current},listeners:new Set}}),hn=(0,Bt.Z)(Wn,1),An=hn[0];return(0,ze.Z)(function(){(0,me.unstable_batchedUpdates)(function(){An.listeners.forEach(function(_n){_n(pn)})})},[pn]),fe.createElement(wn.Provider,{value:An},Un)};return{Context:wn,Provider:Jt,defaultValue:qt}}function Ce(qt,wn){var Jt=(0,oe.Z)(typeof wn=="function"?wn:function(_n){if(wn===void 0)return _n;if(!Array.isArray(wn))return _n[wn];var kn={};return wn.forEach(function(Bn){kn[Bn]=_n[Bn]}),kn}),lt=fe.useContext(qt==null?void 0:qt.Context),In=lt||{},pn=In.listeners,Un=In.getValue,Xn=fe.useRef();Xn.current=Jt(lt?Un():qt==null?void 0:qt.defaultValue);var Wn=fe.useState({}),hn=(0,Bt.Z)(Wn,2),An=hn[1];return(0,ze.Z)(function(){if(!lt)return;function _n(kn){var Bn=Jt(kn);(0,De.Z)(Xn.current,Bn,!0)||An({})}return pn.add(_n),function(){pn.delete(_n)}},[lt]),Xn.current}var Se=at(71409),Me=at(8654);function ve(){var qt=fe.createContext(null);function wn(){return fe.useContext(qt)}function Jt(In,pn){var Un=(0,Me.Yr)(In),Xn=function(hn,An){var _n=Un?{ref:An}:{},kn=fe.useRef(0),Bn=fe.useRef(hn),sr=wn();return sr!==null?fe.createElement(In,(0,Se.Z)({},hn,_n)):((!pn||pn(Bn.current,hn))&&(kn.current+=1),Bn.current=hn,fe.createElement(qt.Provider,{value:kn.current},fe.createElement(In,(0,Se.Z)({},hn,_n))))};return Un?fe.forwardRef(Xn):Xn}function lt(In,pn){var Un=(0,Me.Yr)(In),Xn=function(hn,An){var _n=Un?{ref:An}:{};return wn(),fe.createElement(In,(0,Se.Z)({},hn,_n))};return Un?fe.memo(fe.forwardRef(Xn),pn):fe.memo(Xn,pn)}return{makeImmutable:Jt,responseImmutable:lt,useImmutableMark:wn}}var xe=ve(),de=xe.makeImmutable,z=xe.responseImmutable,ee=xe.useImmutableMark,ae=ve(),ie=ae.makeImmutable,le=ae.responseImmutable,ue=ae.useImmutableMark,ge=ke(),Pe=ge;function je(qt,wn){var Jt=React.useRef(0);Jt.current+=1;var lt=React.useRef(qt),In=[];Object.keys(qt||{}).map(function(Un){var Xn;(qt==null?void 0:qt[Un])!==((Xn=lt.current)===null||Xn===void 0?void 0:Xn[Un])&&In.push(Un)}),lt.current=qt;var pn=React.useRef([]);return In.length&&(pn.current=In),React.useDebugValue(Jt.current),React.useDebugValue(pn.current.join(", ")),wn&&console.log("".concat(wn,":"),Jt.current,pn.current),Jt.current}var Be=null,Fe=null,Ne=at(28788),Ae=at(89490),Re=at(87075),We=at(92310),Ye=at.n(We),Ue=at(80547),Ke=at(97938),ot=at(48736),st=fe.createContext({renderWithProps:!1}),ft=st,bt="RC_TABLE_KEY";function $e(qt){return qt==null?[]:Array.isArray(qt)?qt:[qt]}function nt(qt){var wn=[],Jt={};return qt.forEach(function(lt){for(var In=lt||{},pn=In.key,Un=In.dataIndex,Xn=pn||$e(Un).join("-")||bt;Jt[Xn];)Xn="".concat(Xn,"_next");Jt[Xn]=!0,wn.push(Xn)}),wn}function xt(qt){return qt!=null}function wt(qt){return typeof qt=="number"&&!Number.isNaN(qt)}function Pt(qt){return qt&&(0,Ne.Z)(qt)==="object"&&!Array.isArray(qt)&&!fe.isValidElement(qt)}function dt(qt,wn,Jt,lt,In,pn){var Un=fe.useContext(ft),Xn=ue(),Wn=(0,Ue.Z)(function(){if(xt(lt))return[lt];var hn=wn==null||wn===""?[]:Array.isArray(wn)?wn:[wn],An=(0,Ke.Z)(qt,hn),_n=An,kn=void 0;if(In){var Bn=In(An,qt,Jt);Pt(Bn)?(_n=Bn.children,kn=Bn.props,Un.renderWithProps=!0):_n=Bn}return[_n,kn]},[Xn,qt,lt,wn,In,Jt],function(hn,An){if(pn){var _n=(0,Bt.Z)(hn,2),kn=_n[1],Bn=(0,Bt.Z)(An,2),sr=Bn[1];return pn(sr,kn)}return Un.renderWithProps?!0:!(0,De.Z)(hn,An,!0)});return Wn}function ct(qt,wn,Jt,lt){var In=qt+wn-1;return qt<=lt&&In>=Jt}function ht(qt,wn){return Ce(Pe,function(Jt){var lt=ct(qt,wn||1,Jt.hoverStartRow,Jt.hoverEndRow);return[lt,Jt.onHover]})}var Et=at(70425),vt=function(wn){var Jt=wn.ellipsis,lt=wn.rowType,In=wn.children,pn,Un=Jt===!0?{showTitle:!0}:Jt;return Un&&(Un.showTitle||lt==="header")&&(typeof In=="string"||typeof In=="number"?pn=In.toString():fe.isValidElement(In)&&typeof In.props.children=="string"&&(pn=In.props.children)),pn};function Ft(qt){var wn,Jt,lt,In,pn,Un,Xn,Wn,hn=qt.component,An=qt.children,_n=qt.ellipsis,kn=qt.scope,Bn=qt.prefixCls,sr=qt.className,Yn=qt.align,On=qt.record,ln=qt.render,lr=qt.dataIndex,wr=qt.renderIndex,Jr=qt.shouldCellUpdate,Nr=qt.index,Si=qt.rowType,vi=qt.colSpan,mi=qt.rowSpan,Ci=qt.fixLeft,Ei=qt.fixRight,Ki=qt.firstFixLeft,Qt=qt.lastFixLeft,xi=qt.firstFixRight,ci=qt.lastFixRight,zr=qt.appendNode,oi=qt.additionalProps,Xr=oi===void 0?{}:oi,Ri=qt.isSticky,Bi="".concat(Bn,"-cell"),ti=Ce(Pe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),eo=ti.supportSticky,pa=ti.allColumnsFixedLeft,Ao=ti.rowHoverable,Ps=dt(On,lr,wr,An,ln,Jr),wa=(0,Bt.Z)(Ps,2),Ar=wa[0],Po=wa[1],bo={},ta=typeof Ci=="number"&&eo,jo=typeof Ei=="number"&&eo;ta&&(bo.position="sticky",bo.left=Ci),jo&&(bo.position="sticky",bo.right=Ei);var Ko=(wn=(Jt=(lt=Po==null?void 0:Po.colSpan)!==null&&lt!==void 0?lt:Xr.colSpan)!==null&&Jt!==void 0?Jt:vi)!==null&&wn!==void 0?wn:1,Qn=(In=(pn=(Un=Po==null?void 0:Po.rowSpan)!==null&&Un!==void 0?Un:Xr.rowSpan)!==null&&pn!==void 0?pn:mi)!==null&&In!==void 0?In:1,Or=ht(Nr,Qn),Qr=(0,Bt.Z)(Or,2),wi=Qr[0],ki=Qr[1],no=(0,Et.zX)(function(ja){var vo;On&&ki(Nr,Nr+Qn-1),Xr==null||(vo=Xr.onMouseEnter)===null||vo===void 0||vo.call(Xr,ja)}),Dr=(0,Et.zX)(function(ja){var vo;On&&ki(-1,-1),Xr==null||(vo=Xr.onMouseLeave)===null||vo===void 0||vo.call(Xr,ja)});if(Ko===0||Qn===0)return null;var Aa=(Xn=Xr.title)!==null&&Xn!==void 0?Xn:vt({rowType:Si,ellipsis:_n,children:Ar}),zo=Ye()(Bi,sr,(Wn={},(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)(Wn,"".concat(Bi,"-fix-left"),ta&&eo),"".concat(Bi,"-fix-left-first"),Ki&&eo),"".concat(Bi,"-fix-left-last"),Qt&&eo),"".concat(Bi,"-fix-left-all"),Qt&&pa&&eo),"".concat(Bi,"-fix-right"),jo&&eo),"".concat(Bi,"-fix-right-first"),xi&&eo),"".concat(Bi,"-fix-right-last"),ci&&eo),"".concat(Bi,"-ellipsis"),_n),"".concat(Bi,"-with-append"),zr),"".concat(Bi,"-fix-sticky"),(ta||jo)&&Ri&&eo),(0,Re.Z)(Wn,"".concat(Bi,"-row-hover"),!Po&&wi)),Xr.className,Po==null?void 0:Po.className),Oo={};Yn&&(Oo.textAlign=Yn);var ji=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},Po==null?void 0:Po.style),bo),Oo),Xr.style),Vo=Ar;return(0,Ne.Z)(Vo)==="object"&&!Array.isArray(Vo)&&!fe.isValidElement(Vo)&&(Vo=null),_n&&(Qt||xi)&&(Vo=fe.createElement("span",{className:"".concat(Bi,"-content")},Vo)),fe.createElement(hn,(0,Se.Z)({},Po,Xr,{className:zo,style:ji,title:Aa,scope:kn,onMouseEnter:Ao?no:void 0,onMouseLeave:Ao?Dr:void 0,colSpan:Ko!==1?Ko:null,rowSpan:Qn!==1?Qn:null}),zr,Vo)}var mt=fe.memo(Ft);function St(qt,wn,Jt,lt,In){var pn=Jt[qt]||{},Un=Jt[wn]||{},Xn,Wn;pn.fixed==="left"?Xn=lt.left[In==="rtl"?wn:qt]:Un.fixed==="right"&&(Wn=lt.right[In==="rtl"?qt:wn]);var hn=!1,An=!1,_n=!1,kn=!1,Bn=Jt[wn+1],sr=Jt[qt-1],Yn=Bn&&!Bn.fixed||sr&&!sr.fixed||Jt.every(function(Jr){return Jr.fixed==="left"});if(In==="rtl"){if(Xn!==void 0){var On=sr&&sr.fixed==="left";kn=!On&&Yn}else if(Wn!==void 0){var ln=Bn&&Bn.fixed==="right";_n=!ln&&Yn}}else if(Xn!==void 0){var lr=Bn&&Bn.fixed==="left";hn=!lr&&Yn}else if(Wn!==void 0){var wr=sr&&sr.fixed==="right";An=!wr&&Yn}return{fixLeft:Xn,fixRight:Wn,lastFixLeft:hn,firstFixRight:An,lastFixRight:_n,firstFixLeft:kn,isSticky:lt.isSticky}}var tt=fe.createContext({}),Ve=tt;function we(qt){var wn=qt.className,Jt=qt.index,lt=qt.children,In=qt.colSpan,pn=In===void 0?1:In,Un=qt.rowSpan,Xn=qt.align,Wn=Ce(Pe,["prefixCls","direction"]),hn=Wn.prefixCls,An=Wn.direction,_n=fe.useContext(Ve),kn=_n.scrollColumnIndex,Bn=_n.stickyOffsets,sr=_n.flattenColumns,Yn=Jt+pn-1,On=Yn+1===kn?pn+1:pn,ln=St(Jt,Jt+On-1,sr,Bn,An);return fe.createElement(mt,(0,Se.Z)({className:wn,index:Jt,component:"td",prefixCls:hn,record:null,dataIndex:null,align:Xn,colSpan:On,rowSpan:Un,render:function(){return lt}},ln))}var Le=at(39224),Ze=["children"];function rt(qt){var wn=qt.children,Jt=(0,Le.Z)(qt,Ze);return fe.createElement("tr",Jt,wn)}function Ie(qt){var wn=qt.children;return wn}Ie.Row=rt,Ie.Cell=we;var _e=Ie;function He(qt){var wn=qt.children,Jt=qt.stickyOffsets,lt=qt.flattenColumns,In=Ce(Pe,"prefixCls"),pn=lt.length-1,Un=lt[pn],Xn=fe.useMemo(function(){return{stickyOffsets:Jt,flattenColumns:lt,scrollColumnIndex:Un!=null&&Un.scrollbar?pn:null}},[Un,lt,pn,Jt]);return fe.createElement(Ve.Provider,{value:Xn},fe.createElement("tfoot",{className:"".concat(In,"-summary")},wn))}var Qe=le(He),ut=_e,pt=at(29301),Mt=at(24514),At=at(75152),Dt=at(26112);function Kt(qt,wn,Jt,lt,In,pn,Un){qt.push({record:wn,indent:Jt,index:Un});var Xn=pn(wn),Wn=In==null?void 0:In.has(Xn);if(wn&&Array.isArray(wn[lt])&&Wn)for(var hn=0;hn<wn[lt].length;hn+=1)Kt(qt,wn[lt][hn],Jt+1,lt,In,pn,hn)}function Xt(qt,wn,Jt,lt){var In=fe.useMemo(function(){if(Jt!=null&&Jt.size){for(var pn=[],Un=0;Un<(qt==null?void 0:qt.length);Un+=1){var Xn=qt[Un];Kt(pn,Xn,0,wn,Jt,lt,Un)}return pn}return qt==null?void 0:qt.map(function(Wn,hn){return{record:Wn,indent:0,index:hn}})},[qt,wn,Jt,lt]);return In}function $t(qt,wn,Jt,lt){var In=Ce(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),pn=In.flattenColumns,Un=In.expandableType,Xn=In.expandedKeys,Wn=In.childrenColumnName,hn=In.onTriggerExpand,An=In.rowExpandable,_n=In.onRow,kn=In.expandRowByClick,Bn=In.rowClassName,sr=Un==="nest",Yn=Un==="row"&&(!An||An(qt)),On=Yn||sr,ln=Xn&&Xn.has(wn),lr=Wn&&qt&&qt[Wn],wr=(0,Et.zX)(hn),Jr=_n==null?void 0:_n(qt,Jt),Nr=Jr==null?void 0:Jr.onClick,Si=function(Ei){kn&&On&&hn(qt,Ei);for(var Ki=arguments.length,Qt=new Array(Ki>1?Ki-1:0),xi=1;xi<Ki;xi++)Qt[xi-1]=arguments[xi];Nr==null||Nr.apply(void 0,[Ei].concat(Qt))},vi;typeof Bn=="string"?vi=Bn:typeof Bn=="function"&&(vi=Bn(qt,Jt,lt));var mi=nt(pn);return(0,Ae.Z)((0,Ae.Z)({},In),{},{columnsKey:mi,nestExpandable:sr,expanded:ln,hasNestChildren:lr,record:qt,onTriggerExpand:wr,rowSupportExpand:Yn,expandable:On,rowProps:(0,Ae.Z)((0,Ae.Z)({},Jr),{},{className:Ye()(vi,Jr==null?void 0:Jr.className),onClick:Si})})}function Ut(qt){var wn=qt.prefixCls,Jt=qt.children,lt=qt.component,In=qt.cellComponent,pn=qt.className,Un=qt.expanded,Xn=qt.colSpan,Wn=qt.isEmpty,hn=Ce(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),An=hn.scrollbarSize,_n=hn.fixHeader,kn=hn.fixColumn,Bn=hn.componentWidth,sr=hn.horizonScroll,Yn=Jt;return(Wn?sr&&Bn:kn)&&(Yn=fe.createElement("div",{style:{width:Bn-(_n&&!Wn?An:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(wn,"-expanded-row-fixed")},Yn)),fe.createElement(lt,{className:pn,style:{display:Un?null:"none"}},fe.createElement(mt,{component:In,prefixCls:wn,colSpan:Xn},Yn))}var sn=Ut;function tn(qt){var wn=qt.prefixCls,Jt=qt.record,lt=qt.onExpand,In=qt.expanded,pn=qt.expandable,Un="".concat(wn,"-row-expand-icon");if(!pn)return fe.createElement("span",{className:Ye()(Un,"".concat(wn,"-row-spaced"))});var Xn=function(hn){lt(Jt,hn),hn.stopPropagation()};return fe.createElement("span",{className:Ye()(Un,(0,Re.Z)((0,Re.Z)({},"".concat(wn,"-row-expanded"),In),"".concat(wn,"-row-collapsed"),!In)),onClick:Xn})}function Wt(qt,wn,Jt){var lt=[];function In(pn){(pn||[]).forEach(function(Un,Xn){lt.push(wn(Un,Xn)),In(Un[Jt])})}return In(qt),lt}function Pn(qt,wn,Jt,lt){return typeof qt=="string"?qt:typeof qt=="function"?qt(wn,Jt,lt):""}function Sn(qt,wn,Jt,lt,In){var pn=qt.record,Un=qt.prefixCls,Xn=qt.columnsKey,Wn=qt.fixedInfoList,hn=qt.expandIconColumnIndex,An=qt.nestExpandable,_n=qt.indentSize,kn=qt.expandIcon,Bn=qt.expanded,sr=qt.hasNestChildren,Yn=qt.onTriggerExpand,On=Xn[Jt],ln=Wn[Jt],lr;Jt===(hn||0)&&An&&(lr=fe.createElement(fe.Fragment,null,fe.createElement("span",{style:{paddingLeft:"".concat(_n*lt,"px")},className:"".concat(Un,"-row-indent indent-level-").concat(lt)}),kn({prefixCls:Un,expanded:Bn,expandable:sr,record:pn,onExpand:Yn})));var wr;return wn.onCell&&(wr=wn.onCell(pn,In)),{key:On,fixedInfo:ln,appendCellNode:lr,additionalCellProps:wr||{}}}function Tn(qt){var wn=qt.className,Jt=qt.style,lt=qt.record,In=qt.index,pn=qt.renderIndex,Un=qt.rowKey,Xn=qt.indent,Wn=Xn===void 0?0:Xn,hn=qt.rowComponent,An=qt.cellComponent,_n=qt.scopeCellComponent,kn=$t(lt,Un,In,Wn),Bn=kn.prefixCls,sr=kn.flattenColumns,Yn=kn.expandedRowClassName,On=kn.expandedRowRender,ln=kn.rowProps,lr=kn.expanded,wr=kn.rowSupportExpand,Jr=fe.useRef(!1);Jr.current||(Jr.current=lr);var Nr=Pn(Yn,lt,In,Wn),Si=fe.createElement(hn,(0,Se.Z)({},ln,{"data-row-key":Un,className:Ye()(wn,"".concat(Bn,"-row"),"".concat(Bn,"-row-level-").concat(Wn),ln==null?void 0:ln.className,(0,Re.Z)({},Nr,Wn>=1)),style:(0,Ae.Z)((0,Ae.Z)({},Jt),ln==null?void 0:ln.style)}),sr.map(function(Ci,Ei){var Ki=Ci.render,Qt=Ci.dataIndex,xi=Ci.className,ci=Sn(kn,Ci,Ei,Wn,In),zr=ci.key,oi=ci.fixedInfo,Xr=ci.appendCellNode,Ri=ci.additionalCellProps;return fe.createElement(mt,(0,Se.Z)({className:xi,ellipsis:Ci.ellipsis,align:Ci.align,scope:Ci.rowScope,component:Ci.rowScope?_n:An,prefixCls:Bn,key:zr,record:lt,index:In,renderIndex:pn,dataIndex:Qt,render:Ki,shouldCellUpdate:Ci.shouldCellUpdate},oi,{appendNode:Xr,additionalProps:Ri}))})),vi;if(wr&&(Jr.current||lr)){var mi=On(lt,In,Wn+1,lr);vi=fe.createElement(sn,{expanded:lr,className:Ye()("".concat(Bn,"-expanded-row"),"".concat(Bn,"-expanded-row-level-").concat(Wn+1),Nr),prefixCls:Bn,component:hn,cellComponent:An,colSpan:sr.length,isEmpty:!1},mi)}return fe.createElement(fe.Fragment,null,Si,vi)}var Kn=le(Tn);function Mr(qt){var wn=qt.columnKey,Jt=qt.onColumnResize,lt=fe.useRef();return(0,ze.Z)(function(){lt.current&&Jt(wn,lt.current.offsetWidth)},[]),fe.createElement(pt.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 fr=at(29194);function Er(qt){var wn=qt.prefixCls,Jt=qt.columnsKey,lt=qt.onColumnResize,In=fe.useRef(null);return fe.createElement("tr",{"aria-hidden":"true",className:"".concat(wn,"-measure-row"),style:{height:0,fontSize:0},ref:In},fe.createElement(pt.Z.Collection,{onBatchResize:function(Un){(0,fr.Z)(In.current)&&Un.forEach(function(Xn){var Wn=Xn.data,hn=Xn.size;lt(Wn,hn.offsetWidth)})}},Jt.map(function(pn){return fe.createElement(Mr,{key:pn,columnKey:pn,onColumnResize:lt})})))}function Hr(qt){var wn=qt.data,Jt=qt.measureColumnWidth,lt=Ce(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),In=lt.prefixCls,pn=lt.getComponent,Un=lt.onColumnResize,Xn=lt.flattenColumns,Wn=lt.getRowKey,hn=lt.expandedKeys,An=lt.childrenColumnName,_n=lt.emptyNode,kn=Xt(wn,An,hn,Wn),Bn=fe.useRef({renderWithProps:!1}),sr=pn(["body","wrapper"],"tbody"),Yn=pn(["body","row"],"tr"),On=pn(["body","cell"],"td"),ln=pn(["body","cell"],"th"),lr;wn.length?lr=kn.map(function(Jr,Nr){var Si=Jr.record,vi=Jr.indent,mi=Jr.index,Ci=Wn(Si,Nr);return fe.createElement(Kn,{key:Ci,rowKey:Ci,record:Si,index:Nr,renderIndex:mi,rowComponent:Yn,cellComponent:On,scopeCellComponent:ln,indent:vi})}):lr=fe.createElement(sn,{expanded:!0,className:"".concat(In,"-placeholder"),prefixCls:In,component:Yn,cellComponent:On,colSpan:Xn.length,isEmpty:!0},_n);var wr=nt(Xn);return fe.createElement(ft.Provider,{value:Bn.current},fe.createElement(sr,{className:"".concat(In,"-tbody")},Jt&&fe.createElement(Er,{prefixCls:In,columnsKey:wr,onColumnResize:Un}),lr))}var Ur=le(Hr),ri=at(54451),Pi=["columnType"];function Ui(qt){for(var wn=qt.colWidths,Jt=qt.columns,lt=qt.columCount,In=Ce(Pe,["tableLayout"]),pn=In.tableLayout,Un=[],Xn=lt||Jt.length,Wn=!1,hn=Xn-1;hn>=0;hn-=1){var An=wn[hn],_n=Jt&&Jt[hn],kn=void 0,Bn=void 0;if(_n&&(kn=_n[ri.v],pn==="auto"&&(Bn=_n.minWidth)),An||Bn||kn||Wn){var sr=kn||{},Yn=sr.columnType,On=(0,Le.Z)(sr,Pi);Un.unshift(fe.createElement("col",(0,Se.Z)({key:hn,style:{width:An,minWidth:Bn}},On))),Wn=!0}}return fe.createElement("colgroup",null,Un)}var Fi=Ui,zi=at(62730),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 Jt=[],lt=0;lt<wn;lt+=1){var In=qt[lt];if(In!==void 0)Jt[lt]=In;else return null}return Jt},[qt.join("_"),wn])}var dr=fe.forwardRef(function(qt,wn){var Jt=qt.className,lt=qt.noData,In=qt.columns,pn=qt.flattenColumns,Un=qt.colWidths,Xn=qt.columCount,Wn=qt.stickyOffsets,hn=qt.direction,An=qt.fixHeader,_n=qt.stickyTopOffset,kn=qt.stickyBottomOffset,Bn=qt.stickyClassName,sr=qt.onScroll,Yn=qt.maxContentScroll,On=qt.children,ln=(0,Le.Z)(qt,Xi),lr=Ce(Pe,["prefixCls","scrollbarSize","isSticky","getComponent"]),wr=lr.prefixCls,Jr=lr.scrollbarSize,Nr=lr.isSticky,Si=lr.getComponent,vi=Si(["header","table"],"table"),mi=Nr&&!An?0:Jr,Ci=fe.useRef(null),Ei=fe.useCallback(function(Ri){(0,Me.mH)(wn,Ri),(0,Me.mH)(Ci,Ri)},[]);fe.useEffect(function(){var Ri;function Bi(ti){var eo=ti,pa=eo.currentTarget,Ao=eo.deltaX;Ao&&(sr({currentTarget:pa,scrollLeft:pa.scrollLeft+Ao}),ti.preventDefault())}return(Ri=Ci.current)===null||Ri===void 0||Ri.addEventListener("wheel",Bi,{passive:!1}),function(){var ti;(ti=Ci.current)===null||ti===void 0||ti.removeEventListener("wheel",Bi)}},[]);var Ki=fe.useMemo(function(){return pn.every(function(Ri){return Ri.width})},[pn]),Qt=pn[pn.length-1],xi={fixed:Qt?Qt.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(wr,"-cell-scrollbar")}}},ci=(0,fe.useMemo)(function(){return mi?[].concat((0,zi.Z)(In),[xi]):In},[mi,In]),zr=(0,fe.useMemo)(function(){return mi?[].concat((0,zi.Z)(pn),[xi]):pn},[mi,pn]),oi=(0,fe.useMemo)(function(){var Ri=Wn.right,Bi=Wn.left;return(0,Ae.Z)((0,Ae.Z)({},Wn),{},{left:hn==="rtl"?[].concat((0,zi.Z)(Bi.map(function(ti){return ti+mi})),[0]):Bi,right:hn==="rtl"?Ri:[].concat((0,zi.Z)(Ri.map(function(ti){return ti+mi})),[0]),isSticky:Nr})},[mi,Wn,Nr]),Xr=et(Un,Xn);return fe.createElement("div",{style:(0,Ae.Z)({overflow:"hidden"},Nr?{top:_n,bottom:kn}:{}),ref:Ei,className:Ye()(Jt,(0,Re.Z)({},Bn,!!Bn))},fe.createElement(vi,{style:{tableLayout:"fixed",visibility:lt||Xr?null:"hidden"}},(!lt||!Yn||Ki)&&fe.createElement(Fi,{colWidths:Xr?[].concat((0,zi.Z)(Xr),[mi]):[],columCount:Xn+1,columns:zr}),On((0,Ae.Z)((0,Ae.Z)({},ln),{},{stickyOffsets:oi,columns:ci,flattenColumns:zr}))))}),mr=fe.memo(dr),Mi=function(wn){var Jt=wn.cells,lt=wn.stickyOffsets,In=wn.flattenColumns,pn=wn.rowComponent,Un=wn.cellComponent,Xn=wn.onHeaderRow,Wn=wn.index,hn=Ce(Pe,["prefixCls","direction"]),An=hn.prefixCls,_n=hn.direction,kn;Xn&&(kn=Xn(Jt.map(function(sr){return sr.column}),Wn));var Bn=nt(Jt.map(function(sr){return sr.column}));return fe.createElement(pn,kn,Jt.map(function(sr,Yn){var On=sr.column,ln=St(sr.colStart,sr.colEnd,In,lt,_n),lr;return On&&On.onHeaderCell&&(lr=sr.column.onHeaderCell(On)),fe.createElement(mt,(0,Se.Z)({},sr,{scope:On.title?sr.colSpan>1?"colgroup":"col":null,ellipsis:On.ellipsis,align:On.align,component:Un,prefixCls:An,key:Bn[Yn]},ln,{additionalProps:lr,rowType:"header"}))}))},ar=Mi;function Sr(qt){var wn=[];function Jt(Un,Xn){var Wn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;wn[Wn]=wn[Wn]||[];var hn=Xn,An=Un.filter(Boolean).map(function(_n){var kn={key:_n.key,className:_n.className||"",children:_n.title,column:_n,colStart:hn},Bn=1,sr=_n.children;return sr&&sr.length>0&&(Bn=Jt(sr,hn,Wn+1).reduce(function(Yn,On){return Yn+On},0),kn.hasSubColumns=!0),"colSpan"in _n&&(Bn=_n.colSpan),"rowSpan"in _n&&(kn.rowSpan=_n.rowSpan),kn.colSpan=Bn,kn.colEnd=kn.colStart+Bn-1,wn[Wn].push(kn),hn+=Bn,Bn});return An}Jt(qt,0);for(var lt=wn.length,In=function(Xn){wn[Xn].forEach(function(Wn){!("rowSpan"in Wn)&&!Wn.hasSubColumns&&(Wn.rowSpan=lt-Xn)})},pn=0;pn<lt;pn+=1)In(pn);return wn}var jr=function(wn){var Jt=wn.stickyOffsets,lt=wn.columns,In=wn.flattenColumns,pn=wn.onHeaderRow,Un=Ce(Pe,["prefixCls","getComponent"]),Xn=Un.prefixCls,Wn=Un.getComponent,hn=fe.useMemo(function(){return Sr(lt)},[lt]),An=Wn(["header","wrapper"],"thead"),_n=Wn(["header","row"],"tr"),kn=Wn(["header","cell"],"th");return fe.createElement(An,{className:"".concat(Xn,"-thead")},hn.map(function(Bn,sr){var Yn=fe.createElement(ar,{key:sr,flattenColumns:In,cells:Bn,stickyOffsets:Jt,rowComponent:_n,cellComponent:kn,onHeaderRow:pn,index:sr});return Yn}))},to=le(jr),Rr=at(97347);function on(qt,wn,Jt){var lt=(0,ri.g)(qt),In=lt.expandIcon,pn=lt.expandedRowKeys,Un=lt.defaultExpandedRowKeys,Xn=lt.defaultExpandAllRows,Wn=lt.expandedRowRender,hn=lt.onExpand,An=lt.onExpandedRowsChange,_n=lt.childrenColumnName,kn=In||tn,Bn=_n||"children",sr=fe.useMemo(function(){return Wn?"row":qt.expandable&&qt.internalHooks===gt.R&&qt.expandable.__PARENT_RENDER_ICON__||wn.some(function(Nr){return Nr&&(0,Ne.Z)(Nr)==="object"&&Nr[Bn]})?"nest":!1},[!!Wn,wn]),Yn=fe.useState(function(){return Un||(Xn?Wt(wn,Jt,Bn):[])}),On=(0,Bt.Z)(Yn,2),ln=On[0],lr=On[1],wr=fe.useMemo(function(){return new Set(pn||ln||[])},[pn,ln]),Jr=fe.useCallback(function(Nr){var Si=Jt(Nr,wn.indexOf(Nr)),vi,mi=wr.has(Si);mi?(wr.delete(Si),vi=(0,zi.Z)(wr)):vi=[].concat((0,zi.Z)(wr),[Si]),lr(vi),hn&&hn(!mi,Nr),An&&An(vi)},[Jt,wr,wn,hn,An]);return[lt,sr,wr,kn,Bn,Jr]}function rn(qt,wn,Jt){var lt=qt.map(function(In,pn){return St(pn,pn,qt,wn,Jt)});return(0,Ue.Z)(function(){return lt},[lt],function(In,pn){return!(0,De.Z)(In,pn)})}function Yt(qt){var wn=(0,fe.useRef)(qt),Jt=(0,fe.useState)({}),lt=(0,Bt.Z)(Jt,2),In=lt[1],pn=(0,fe.useRef)(null),Un=(0,fe.useRef)([]);function Xn(Wn){Un.current.push(Wn);var hn=Promise.resolve();pn.current=hn,hn.then(function(){if(pn.current===hn){var An=Un.current,_n=wn.current;Un.current=[],An.forEach(function(kn){wn.current=kn(wn.current)}),pn.current=null,_n!==wn.current&&In({})}})}return(0,fe.useEffect)(function(){return function(){pn.current=null}},[]),[wn.current,Xn]}function nr(qt){var wn=(0,fe.useRef)(qt||null),Jt=(0,fe.useRef)();function lt(){window.clearTimeout(Jt.current)}function In(Un){wn.current=Un,lt(),Jt.current=window.setTimeout(function(){wn.current=null,Jt.current=void 0},100)}function pn(){return wn.current}return(0,fe.useEffect)(function(){return lt},[]),[In,pn]}function gr(){var qt=fe.useState(-1),wn=(0,Bt.Z)(qt,2),Jt=wn[0],lt=wn[1],In=fe.useState(-1),pn=(0,Bt.Z)(In,2),Un=pn[0],Xn=pn[1],Wn=fe.useCallback(function(hn,An){lt(hn),Xn(An)},[]);return[Jt,Un,Wn]}var Cr=at(47273),Nn=(0,Cr.Z)()?window:null;function qn(qt,wn){var Jt=(0,Ne.Z)(qt)==="object"?qt:{},lt=Jt.offsetHeader,In=lt===void 0?0:lt,pn=Jt.offsetSummary,Un=pn===void 0?0:pn,Xn=Jt.offsetScroll,Wn=Xn===void 0?0:Xn,hn=Jt.getContainer,An=hn===void 0?function(){return Nn}:hn,_n=An()||Nn,kn=!!qt;return fe.useMemo(function(){return{isSticky:kn,stickyClassName:kn?"".concat(wn,"-sticky-holder"):"",offsetHeader:In,offsetSummary:Un,offsetScroll:Wn,container:_n}},[kn,Wn,In,Un,wn,_n])}function Ir(qt,wn,Jt){var lt=(0,fe.useMemo)(function(){var In=wn.length,pn=function(hn,An,_n){for(var kn=[],Bn=0,sr=hn;sr!==An;sr+=_n)kn.push(Bn),wn[sr].fixed&&(Bn+=qt[sr]||0);return kn},Un=pn(0,In,1),Xn=pn(In-1,-1,-1).reverse();return Jt==="rtl"?{left:Xn,right:Un}:{left:Un,right:Xn}},[qt,wn,Jt]);return lt}var gi=Ir;function bi(qt){var wn=qt.className,Jt=qt.children;return fe.createElement("div",{className:wn},Jt)}var Nt=bi,Ht=at(8224),Mn=at(16089),jn=at(76846);function en(qt){var wn=(0,jn.bn)(qt),Jt=wn.getBoundingClientRect(),lt=document.documentElement;return{left:Jt.left+(window.pageXOffset||lt.scrollLeft)-(lt.clientLeft||document.body.clientLeft||0),top:Jt.top+(window.pageYOffset||lt.scrollTop)-(lt.clientTop||document.body.clientTop||0)}}var Fn=function(wn,Jt){var lt,In,pn=wn.scrollBodyRef,Un=wn.onScroll,Xn=wn.offsetScroll,Wn=wn.container,hn=wn.direction,An=Ce(Pe,"prefixCls"),_n=((lt=pn.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,kn=((In=pn.current)===null||In===void 0?void 0:In.clientWidth)||0,Bn=_n&&kn*(kn/_n),sr=fe.useRef(),Yn=Yt({scrollLeft:0,isHiddenScrollBar:!0}),On=(0,Bt.Z)(Yn,2),ln=On[0],lr=On[1],wr=fe.useRef({delta:0,x:0}),Jr=fe.useState(!1),Nr=(0,Bt.Z)(Jr,2),Si=Nr[0],vi=Nr[1],mi=fe.useRef(null);fe.useEffect(function(){return function(){Mn.Z.cancel(mi.current)}},[]);var Ci=function(){vi(!1)},Ei=function(zr){zr.persist(),wr.current.delta=zr.pageX-ln.scrollLeft,wr.current.x=0,vi(!0),zr.preventDefault()},Ki=function(zr){var oi,Xr=zr||((oi=window)===null||oi===void 0?void 0:oi.event),Ri=Xr.buttons;if(!Si||Ri===0){Si&&vi(!1);return}var Bi=wr.current.x+zr.pageX-wr.current.x-wr.current.delta,ti=hn==="rtl";Bi=Math.max(ti?Bn-kn:0,Math.min(ti?0:kn-Bn,Bi));var eo=!ti||Math.abs(Bi)+Math.abs(Bn)<kn;eo&&(Un({scrollLeft:Bi/kn*(_n+2)}),wr.current.x=zr.pageX)},Qt=function(){Mn.Z.cancel(mi.current),mi.current=(0,Mn.Z)(function(){if(pn.current){var zr=en(pn.current).top,oi=zr+pn.current.offsetHeight,Xr=Wn===window?document.documentElement.scrollTop+window.innerHeight:en(Wn).top+Wn.clientHeight;oi-(0,At.Z)()<=Xr||zr>=Xr-Xn?lr(function(Ri){return(0,Ae.Z)((0,Ae.Z)({},Ri),{},{isHiddenScrollBar:!0})}):lr(function(Ri){return(0,Ae.Z)((0,Ae.Z)({},Ri),{},{isHiddenScrollBar:!1})})}})},xi=function(zr){lr(function(oi){return(0,Ae.Z)((0,Ae.Z)({},oi),{},{scrollLeft:zr/_n*kn||0})})};return fe.useImperativeHandle(Jt,function(){return{setScrollLeft:xi,checkScrollBarVisible:Qt}}),fe.useEffect(function(){var ci=(0,Ht.Z)(document.body,"mouseup",Ci,!1),zr=(0,Ht.Z)(document.body,"mousemove",Ki,!1);return Qt(),function(){ci.remove(),zr.remove()}},[Bn,Si]),fe.useEffect(function(){if(pn.current){for(var ci=[],zr=(0,jn.bn)(pn.current);zr;)ci.push(zr),zr=zr.parentElement;return ci.forEach(function(oi){return oi.addEventListener("scroll",Qt,!1)}),window.addEventListener("resize",Qt,!1),window.addEventListener("scroll",Qt,!1),Wn.addEventListener("scroll",Qt,!1),function(){ci.forEach(function(oi){return oi.removeEventListener("scroll",Qt)}),window.removeEventListener("resize",Qt),window.removeEventListener("scroll",Qt),Wn.removeEventListener("scroll",Qt)}}},[Wn]),fe.useEffect(function(){ln.isHiddenScrollBar||lr(function(ci){var zr=pn.current;return zr?(0,Ae.Z)((0,Ae.Z)({},ci),{},{scrollLeft:zr.scrollLeft/zr.scrollWidth*zr.clientWidth}):ci})},[ln.isHiddenScrollBar]),_n<=kn||!Bn||ln.isHiddenScrollBar?null:fe.createElement("div",{style:{height:(0,At.Z)(),width:kn,bottom:Xn},className:"".concat(An,"-sticky-scroll")},fe.createElement("div",{onMouseDown:Ei,ref:sr,className:Ye()("".concat(An,"-sticky-scroll-bar"),(0,Re.Z)({},"".concat(An,"-sticky-scroll-bar-active"),Si)),style:{width:"".concat(Bn,"px"),transform:"translate3d(".concat(ln.scrollLeft,"px, 0, 0)")}}))},Dn=fe.forwardRef(Fn);function Ln(qt){return null}var er=Ln;function zn(qt){return null}var Zn=zn,rr="rc-table",Kr=[],cr={};function pr(){return"No Data"}function an(qt,wn){var Jt=(0,Ae.Z)({rowKey:"key",prefixCls:rr,emptyText:pr},qt),lt=Jt.prefixCls,In=Jt.className,pn=Jt.rowClassName,Un=Jt.style,Xn=Jt.data,Wn=Jt.rowKey,hn=Jt.scroll,An=Jt.tableLayout,_n=Jt.direction,kn=Jt.title,Bn=Jt.footer,sr=Jt.summary,Yn=Jt.caption,On=Jt.id,ln=Jt.showHeader,lr=Jt.components,wr=Jt.emptyText,Jr=Jt.onRow,Nr=Jt.onHeaderRow,Si=Jt.onScroll,vi=Jt.internalHooks,mi=Jt.transformColumns,Ci=Jt.internalRefs,Ei=Jt.tailor,Ki=Jt.getContainerWidth,Qt=Jt.sticky,xi=Jt.rowHoverable,ci=xi===void 0?!0:xi,zr=Xn||Kr,oi=!!zr.length,Xr=vi===gt.R,Ri=fe.useCallback(function(Wi,so){return(0,Ke.Z)(lr,Wi)||so},[lr]),Bi=fe.useMemo(function(){return typeof Wn=="function"?Wn:function(Wi){var so=Wi&&Wi[Wn];return so}},[Wn]),ti=Ri(["body"]),eo=gr(),pa=(0,Bt.Z)(eo,3),Ao=pa[0],Ps=pa[1],wa=pa[2],Ar=on(Jt,zr,Bi),Po=(0,Bt.Z)(Ar,6),bo=Po[0],ta=Po[1],jo=Po[2],Ko=Po[3],Qn=Po[4],Or=Po[5],Qr=hn==null?void 0:hn.x,wi=fe.useState(0),ki=(0,Bt.Z)(wi,2),no=ki[0],Dr=ki[1],Aa=(0,Rr.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},Jt),bo),{},{expandable:!!bo.expandedRowRender,columnTitle:bo.columnTitle,expandedKeys:jo,getRowKey:Bi,onTriggerExpand:Or,expandIcon:Ko,expandIconColumnIndex:bo.expandIconColumnIndex,direction:_n,scrollWidth:Xr&&Ei&&typeof Qr=="number"?Qr:null,clientWidth:no}),Xr?mi:null),zo=(0,Bt.Z)(Aa,4),Oo=zo[0],ji=zo[1],Vo=zo[2],ja=zo[3],vo=Vo!=null?Vo:Qr,fs=fe.useMemo(function(){return{columns:Oo,flattenColumns:ji}},[Oo,ji]),ds=fe.useRef(),bs=fe.useRef(),na=fe.useRef(),eh=fe.useRef();fe.useImperativeHandle(wn,function(){return{nativeElement:ds.current,scrollTo:function(so){var Xo;if(na.current instanceof HTMLElement){var Fa=so.index,ka=so.top,fu=so.key;if(wt(ka)){var Jl;(Jl=na.current)===null||Jl===void 0||Jl.scrollTo({top:ka})}else{var du,sl=fu!=null?fu:Bi(zr[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(so)}}});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=nt(ji),aa=Oa.map(function(Wi){return uu.get(Wi)}),ga=fe.useMemo(function(){return aa},[aa.join("_")]),Xl=gi(ga,ji,_n),Ga=hn&&xt(hn.y),co=hn&&xt(vo)||!!bo.fixed,oo=co&&ji.some(function(Wi){var so=Wi.fixed;return so}),$i=fe.useRef(),sa=qn(Qt,lt),Pr=sa.isSticky,fa=sa.offsetHeader,Gt=sa.offsetSummary,bn=sa.offsetScroll,Hs=sa.stickyClassName,jl=sa.container,Qo=fe.useMemo(function(){return sr==null?void 0:sr(zr)},[sr,zr]),Pa=(Ga||Pr)&&fe.isValidElement(Qo)&&Qo.type===_e&&Qo.props.fixed,Fs,ol,Fu;Ga&&(ol={overflowY:oi?"scroll":"auto",maxHeight:hn.y}),co&&(Fs={overflowX:"auto"},Ga||(ol={overflowY:"hidden"}),Fu={width:vo===!0?"auto":vo,minWidth:"100%"});var Fo=fe.useCallback(function(Wi,so){Ca(function(Xo){if(Xo.get(Wi)!==so){var Fa=new Map(Xo);return Fa.set(Wi,so),Fa}return Xo})},[]),fi=nr(null),Ua=(0,Bt.Z)(fi,2),Ds=Ua[0],Do=Ua[1];function _i(Wi,so){so&&(typeof so=="function"?so(Wi):so.scrollLeft!==Wi&&(so.scrollLeft=Wi,so.scrollLeft!==Wi&&setTimeout(function(){so.scrollLeft=Wi},0)))}var Go=(0,oe.Z)(function(Wi){var so=Wi.currentTarget,Xo=Wi.scrollLeft,Fa=_n==="rtl",ka=typeof Xo=="number"?Xo:so.scrollLeft,fu=so||cr;if(!Do()||Do()===fu){var Jl;Ds(fu),_i(ka,bs.current),_i(ka,na.current),_i(ka,ju.current),_i(ka,(Jl=$i.current)===null||Jl===void 0?void 0:Jl.setScrollLeft)}var du=so||bs.current;if(du){var sl=Xr&&Ei&&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(Wi){Go(Wi),Si==null||Si(Wi)}),xo=function(){if(co&&na.current){var so;Go({currentTarget:(0,jn.bn)(na.current),scrollLeft:(so=na.current)===null||so===void 0?void 0:so.scrollLeft})}else Vl(!1),Ou(!1)},Cs=function(so){var Xo,Fa=so.width;(Xo=$i.current)===null||Xo===void 0||Xo.checkScrollBarVisible();var ka=ds.current?ds.current.offsetWidth:Fa;Xr&&Ki&&ds.current&&(ka=Ki(ds.current,ka)||ka),ka!==no&&(xo(),Dr(ka))},ma=fe.useRef(!1);fe.useEffect(function(){ma.current&&xo()},[co,Xn,Oo.length]),fe.useEffect(function(){ma.current=!0},[]);var hu=fe.useState(0),ao=(0,Bt.Z)(hu,2),Ea=ao[0],ro=ao[1],wo=fe.useState(!0),Eo=(0,Bt.Z)(wo,2),Uo=Eo[0],ho=Eo[1];(0,ze.Z)(function(){(!Ei||!Xr)&&(na.current instanceof Element?ro((0,At.o)(na.current).width):ro((0,At.o)(eh.current).width)),ho((0,Mt.G)("position","sticky"))},[]),fe.useEffect(function(){Xr&&Ci&&(Ci.body.current=na.current)});var Du=fe.useCallback(function(Wi){return fe.createElement(fe.Fragment,null,fe.createElement(to,Wi),Pa==="top"&&fe.createElement(Qe,Wi,Qo))},[Pa,Qo]),li=fe.useCallback(function(Wi){return fe.createElement(Qe,Wi,Qo)},[Qo]),uf=Ri(["table"],"table"),Ji=fe.useMemo(function(){return An||(oo?vo==="max-content"?"auto":"fixed":Ga||Pr||ji.some(function(Wi){var so=Wi.ellipsis;return so})?"fixed":"auto")},[Ga,oo,ji,An,Pr]),Cc,cu={colWidths:ga,columCount:ji.length,stickyOffsets:Xl,onHeaderRow:Nr,fixHeader:Ga,scroll:hn},ih=fe.useMemo(function(){return oi?null:typeof wr=="function"?wr():wr},[oi,wr]),Ec=fe.createElement(Ur,{data:zr,measureColumnWidth:Ga||co||Pr}),_h=fe.createElement(Fi,{colWidths:ji.map(function(Wi){var so=Wi.width;return so}),columns:ji}),Ol=Yn!=null?fe.createElement("caption",{className:"".concat(lt,"-caption")},Yn):void 0,Bu=(0,Dt.Z)(Jt,{data:!0}),uo=(0,Dt.Z)(Jt,{aria:!0});if(Ga||Pr){var al;typeof ti=="function"?(al=ti(zr,{scrollbarSize:Ea,ref:na,onScroll:Go}),cu.colWidths=ji.map(function(Wi,so){var Xo=Wi.width,Fa=so===ji.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:Ji})},uo),Ol,_h,Ec,!Pa&&Qo&&fe.createElement(Qe,{stickyOffsets:Xl,flattenColumns:ji},Qo)));var zh=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({noData:!zr.length,maxContentScroll:co&&vo==="max-content"},cu),fs),{},{direction:_n,stickyClassName:Hs,onScroll:Go});Cc=fe.createElement(fe.Fragment,null,ln!==!1&&fe.createElement(mr,(0,Se.Z)({},zh,{stickyTopOffset:fa,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),Pr&&na.current&&na.current instanceof Element&&fe.createElement(Dn,{ref:$i,offsetScroll:bn,scrollBodyRef:na,onScroll:Go,container:jl,direction:_n}))}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:Ji})},uo),Ol,_h,ln!==!1&&fe.createElement(to,(0,Se.Z)({},cu,fs)),Ec,Qo&&fe.createElement(Qe,{stickyOffsets:Xl,flattenColumns:ji},Qo)));var Yl=fe.createElement("div",(0,Se.Z)({className:Ye()(lt,In,(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(lt,"-rtl"),_n==="rtl"),"".concat(lt,"-ping-left"),Os),"".concat(lt,"-ping-right"),Zo),"".concat(lt,"-layout-fixed"),An==="fixed"),"".concat(lt,"-fixed-header"),Ga),"".concat(lt,"-fixed-column"),oo),"".concat(lt,"-fixed-column-gapped"),oo&&ja),"".concat(lt,"-scroll-horizontal"),co),"".concat(lt,"-has-fix-left"),ji[0]&&ji[0].fixed),"".concat(lt,"-has-fix-right"),ji[ji.length-1]&&ji[ji.length-1].fixed==="right")),style:Un,id:On,ref:ds},Bu),kn&&fe.createElement(Nt,{className:"".concat(lt,"-title")},kn(zr)),fe.createElement("div",{ref:eh,className:"".concat(lt,"-container")},Cc),Bn&&fe.createElement(Nt,{className:"".concat(lt,"-footer")},Bn(zr)));co&&(Yl=fe.createElement(pt.Z,{onResize:Cs},Yl));var kc=rn(ji,Xl,_n),$l=fe.useMemo(function(){return{scrollX:vo,prefixCls:lt,getComponent:Ri,scrollbarSize:Ea,direction:_n,fixedInfoList:kc,isSticky:Pr,supportSticky:Uo,componentWidth:no,fixHeader:Ga,fixColumn:oo,horizonScroll:co,tableLayout:Ji,rowClassName:pn,expandedRowClassName:bo.expandedRowClassName,expandIcon:Ko,expandableType:ta,expandRowByClick:bo.expandRowByClick,expandedRowRender:bo.expandedRowRender,onTriggerExpand:Or,expandIconColumnIndex:bo.expandIconColumnIndex,indentSize:bo.indentSize,allColumnsFixedLeft:ji.every(function(Wi){return Wi.fixed==="left"}),emptyNode:ih,columns:Oo,flattenColumns:ji,onColumnResize:Fo,hoverStartRow:Ao,hoverEndRow:Ps,onHover:wa,rowExpandable:bo.rowExpandable,onRow:Jr,getRowKey:Bi,expandedKeys:jo,childrenColumnName:Qn,rowHoverable:ci}},[vo,lt,Ri,Ea,_n,kc,Pr,Uo,no,Ga,oo,co,Ji,pn,bo.expandedRowClassName,Ko,ta,bo.expandRowByClick,bo.expandedRowRender,Or,bo.expandIconColumnIndex,bo.indentSize,ih,Oo,ji,Fo,Ao,Ps,wa,bo.rowExpandable,Jr,Bi,jo,Qn,ci]);return fe.createElement(Pe.Provider,{value:$l},Yl)}var Vr=fe.forwardRef(an);function ei(qt){return ie(Vr,qt)}var Di=ei();Di.EXPAND_COLUMN=gt.w,Di.INTERNAL_HOOKS=gt.R,Di.Column=er,Di.ColumnGroup=Zn,Di.Summary=ut;var dn=Di,Hn=at(65283),ur=ke(null),Jn=ke(null);function yr(qt,wn,Jt){var lt=wn||1;return Jt[qt+lt]-(Jt[qt]||0)}function Fr(qt){var wn=qt.rowInfo,Jt=qt.column,lt=qt.colIndex,In=qt.indent,pn=qt.index,Un=qt.component,Xn=qt.renderIndex,Wn=qt.record,hn=qt.style,An=qt.className,_n=qt.inverse,kn=qt.getHeight,Bn=Jt.render,sr=Jt.dataIndex,Yn=Jt.className,On=Jt.width,ln=Ce(Jn,["columnsOffset"]),lr=ln.columnsOffset,wr=Sn(wn,Jt,lt,In,pn),Jr=wr.key,Nr=wr.fixedInfo,Si=wr.appendCellNode,vi=wr.additionalCellProps,mi=vi.style,Ci=vi.colSpan,Ei=Ci===void 0?1:Ci,Ki=vi.rowSpan,Qt=Ki===void 0?1:Ki,xi=lt-1,ci=yr(xi,Ei,lr),zr=Ei>1?On-ci:0,oi=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},mi),hn),{},{flex:"0 0 ".concat(ci,"px"),width:"".concat(ci,"px"),marginRight:zr,pointerEvents:"auto"}),Xr=fe.useMemo(function(){return _n?Qt<=1:Ei===0||Qt===0||Qt>1},[Qt,Ei,_n]);Xr?oi.visibility="hidden":_n&&(oi.height=kn==null?void 0:kn(Qt));var Ri=Xr?function(){return null}:Bn,Bi={};return(Qt===0||Ei===0)&&(Bi.rowSpan=1,Bi.colSpan=1),fe.createElement(mt,(0,Se.Z)({className:Ye()(Yn,An),ellipsis:Jt.ellipsis,align:Jt.align,scope:Jt.rowScope,component:Un,prefixCls:wn.prefixCls,key:Jr,record:Wn,index:pn,renderIndex:Xn,dataIndex:sr,render:Ri,shouldCellUpdate:Jt.shouldCellUpdate},Nr,{appendNode:Si,additionalProps:(0,Ae.Z)((0,Ae.Z)({},vi),{},{style:oi},Bi)}))}var Wr=Fr,$r=["data","index","className","rowKey","style","extra","getHeight"],ii=fe.forwardRef(function(qt,wn){var Jt=qt.data,lt=qt.index,In=qt.className,pn=qt.rowKey,Un=qt.style,Xn=qt.extra,Wn=qt.getHeight,hn=(0,Le.Z)(qt,$r),An=Jt.record,_n=Jt.indent,kn=Jt.index,Bn=Ce(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),sr=Bn.scrollX,Yn=Bn.flattenColumns,On=Bn.prefixCls,ln=Bn.fixColumn,lr=Bn.componentWidth,wr=Ce(ur,["getComponent"]),Jr=wr.getComponent,Nr=$t(An,pn,lt,_n),Si=Jr(["body","row"],"div"),vi=Jr(["body","cell"],"div"),mi=Nr.rowSupportExpand,Ci=Nr.expanded,Ei=Nr.rowProps,Ki=Nr.expandedRowRender,Qt=Nr.expandedRowClassName,xi;if(mi&&Ci){var ci=Ki(An,lt,_n+1,Ci),zr=Pn(Qt,An,lt,_n),oi={};ln&&(oi={style:(0,Re.Z)({},"--virtual-width","".concat(lr,"px"))});var Xr="".concat(On,"-expanded-row-cell");xi=fe.createElement(Si,{className:Ye()("".concat(On,"-expanded-row"),"".concat(On,"-expanded-row-level-").concat(_n+1),zr)},fe.createElement(mt,{component:vi,prefixCls:On,className:Ye()(Xr,(0,Re.Z)({},"".concat(Xr,"-fixed"),ln)),additionalProps:oi},ci))}var Ri=(0,Ae.Z)((0,Ae.Z)({},Un),{},{width:sr});Xn&&(Ri.position="absolute",Ri.pointerEvents="none");var Bi=fe.createElement(Si,(0,Se.Z)({},Ei,hn,{"data-row-key":pn,ref:mi?null:wn,className:Ye()(In,"".concat(On,"-row"),Ei==null?void 0:Ei.className,(0,Re.Z)({},"".concat(On,"-row-extra"),Xn)),style:(0,Ae.Z)((0,Ae.Z)({},Ri),Ei==null?void 0:Ei.style)}),Yn.map(function(ti,eo){return fe.createElement(Wr,{key:eo,component:vi,rowInfo:Nr,column:ti,colIndex:eo,indent:_n,index:lt,renderIndex:kn,record:An,inverse:Xn,getHeight:Wn})}));return mi?fe.createElement("div",{ref:wn},Bi,xi):Bi}),hi=le(ii),mn=hi,Li=fe.forwardRef(function(qt,wn){var Jt=qt.data,lt=qt.onScroll,In=Ce(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),pn=In.flattenColumns,Un=In.onColumnResize,Xn=In.getRowKey,Wn=In.expandedKeys,hn=In.prefixCls,An=In.childrenColumnName,_n=In.scrollX,kn=In.direction,Bn=Ce(ur),sr=Bn.sticky,Yn=Bn.scrollY,On=Bn.listItemHeight,ln=Bn.getComponent,lr=Bn.onScroll,wr=fe.useRef(),Jr=Xt(Jt,An,Wn,Xn),Nr=fe.useMemo(function(){var xi=0;return pn.map(function(ci){var zr=ci.width,oi=ci.key;return xi+=zr,[oi,zr,xi]})},[pn]),Si=fe.useMemo(function(){return Nr.map(function(xi){return xi[2]})},[Nr]);fe.useEffect(function(){Nr.forEach(function(xi){var ci=(0,Bt.Z)(xi,2),zr=ci[0],oi=ci[1];Un(zr,oi)})},[Nr]),fe.useImperativeHandle(wn,function(){var xi,ci={scrollTo:function(oi){var Xr;(Xr=wr.current)===null||Xr===void 0||Xr.scrollTo(oi)},nativeElement:(xi=wr.current)===null||xi===void 0?void 0:xi.nativeElement};return Object.defineProperty(ci,"scrollLeft",{get:function(){var oi;return((oi=wr.current)===null||oi===void 0?void 0:oi.getScrollInfo().x)||0},set:function(oi){var Xr;(Xr=wr.current)===null||Xr===void 0||Xr.scrollTo({left:oi})}}),ci});var vi=function(ci,zr){var oi,Xr=(oi=Jr[zr])===null||oi===void 0?void 0:oi.record,Ri=ci.onCell;if(Ri){var Bi,ti=Ri(Xr,zr);return(Bi=ti==null?void 0:ti.rowSpan)!==null&&Bi!==void 0?Bi:1}return 1},mi=function(ci){var zr=ci.start,oi=ci.end,Xr=ci.getSize,Ri=ci.offsetY;if(oi<0)return null;for(var Bi=pn.filter(function(Ko){return vi(Ko,zr)===0}),ti=zr,eo=function(Qn){if(Bi=Bi.filter(function(Or){return vi(Or,Qn)===0}),!Bi.length)return ti=Qn,1},pa=zr;pa>=0&&!eo(pa);pa-=1);for(var Ao=pn.filter(function(Ko){return vi(Ko,oi)!==1}),Ps=oi,wa=function(Qn){if(Ao=Ao.filter(function(Or){return vi(Or,Qn)!==1}),!Ao.length)return Ps=Math.max(Qn-1,oi),1},Ar=oi;Ar<Jr.length&&!wa(Ar);Ar+=1);for(var Po=[],bo=function(Qn){var Or=Jr[Qn];if(!Or)return 1;pn.some(function(Qr){return vi(Qr,Qn)>1})&&Po.push(Qn)},ta=ti;ta<=Ps;ta+=1)bo(ta);var jo=Po.map(function(Ko){var Qn=Jr[Ko],Or=Xn(Qn.record,Ko),Qr=function(no){var Dr=Ko+no-1,Aa=Xn(Jr[Dr].record,Dr),zo=Xr(Or,Aa);return zo.bottom-zo.top},wi=Xr(Or);return fe.createElement(mn,{key:Ko,data:Qn,rowKey:Or,index:Ko,style:{top:-Ri+wi.top},extra:!0,getHeight:Qr})});return jo},Ci=fe.useMemo(function(){return{columnsOffset:Si}},[Si]),Ei="".concat(hn,"-tbody"),Ki=ln(["body","wrapper"]),Qt={};return sr&&(Qt.position="sticky",Qt.bottom=0,(0,Ne.Z)(sr)==="object"&&sr.offsetScroll&&(Qt.bottom=sr.offsetScroll)),fe.createElement(Jn.Provider,{value:Ci},fe.createElement(Hn.Z,{fullHeight:!1,ref:wr,prefixCls:"".concat(Ei,"-virtual"),styles:{horizontalScrollBar:Qt},className:Ei,height:Yn,itemHeight:On||24,data:Jr,itemKey:function(ci){return Xn(ci.record)},component:Ki,scrollWidth:_n,direction:kn,onVirtualScroll:function(ci){var zr,oi=ci.x;lt({currentTarget:(zr=wr.current)===null||zr===void 0?void 0:zr.nativeElement,scrollLeft:oi})},onScroll:lr,extraRender:mi},function(xi,ci,zr){var oi=Xn(xi.record,ci);return fe.createElement(mn,{data:xi,rowKey:oi,index:ci,style:zr.style})}))}),vn=le(Li),xr=vn,ui=function(wn,Jt){var lt=Jt.ref,In=Jt.onScroll;return fe.createElement(xr,{ref:lt,data:wn,onScroll:In})};function si(qt,wn){var Jt=qt.data,lt=qt.columns,In=qt.scroll,pn=qt.sticky,Un=qt.prefixCls,Xn=Un===void 0?rr:Un,Wn=qt.className,hn=qt.listItemHeight,An=qt.components,_n=qt.onScroll,kn=In||{},Bn=kn.x,sr=kn.y;typeof Bn!="number"&&(Bn=1),typeof sr!="number"&&(sr=500);var Yn=(0,Et.zX)(function(lr,wr){return(0,Ke.Z)(An,lr)||wr}),On=(0,Et.zX)(_n),ln=fe.useMemo(function(){return{sticky:pn,scrollY:sr,listItemHeight:hn,getComponent:Yn,onScroll:On}},[pn,sr,hn,Yn,On]);return fe.createElement(ur.Provider,{value:ln},fe.createElement(dn,(0,Se.Z)({},qt,{className:Ye()(Wn,"".concat(Xn,"-virtual")),scroll:(0,Ae.Z)((0,Ae.Z)({},In),{},{x:Bn}),components:(0,Ae.Z)((0,Ae.Z)({},An),{},{body:Jt!=null&&Jt.length?ui:void 0}),columns:lt,internalHooks:gt.R,tailor:!0,ref:wn})))}var Ii=fe.forwardRef(si);function pi(qt){return ie(Ii,qt)}var Zr=pi(),Gi=null},54451:function(gn,cn,at){"use strict";at.d(cn,{g:function(){return fe},v:function(){return De}});var gt=at(89490),Bt=at(39224),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,gt.Z)((0,gt.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 gt=at(71409),Bt=at(87075),oe=at(89490),ze=at(62730),De=at(11036),fe=at(39224),me=at(92310),ke=at.n(me),Ce=at(36901),Se=at(66003),Me=at(30292),ve=at(18929),xe=at(59301),de=at(28788),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 ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,bt=st.getAttribute("id")||st.getAttribute("data-reactid")||st.getAttribute("name");if(ft&&ue[bt])return ue[bt];var $e=window.getComputedStyle(st),nt=$e.getPropertyValue("box-sizing")||$e.getPropertyValue("-moz-box-sizing")||$e.getPropertyValue("-webkit-box-sizing"),xt=parseFloat($e.getPropertyValue("padding-bottom"))+parseFloat($e.getPropertyValue("padding-top")),wt=parseFloat($e.getPropertyValue("border-bottom-width"))+parseFloat($e.getPropertyValue("border-top-width")),Pt=le.map(function(ct){return"".concat(ct,":").concat($e.getPropertyValue(ct))}).join(";"),dt={sizingStyle:Pt,paddingSize:xt,borderSize:wt,boxSizing:nt};return ft&&bt&&(ue[bt]=dt),dt}function je(st){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,bt=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 nt=Pe(st,ft),xt=nt.paddingSize,wt=nt.borderSize,Pt=nt.boxSizing,dt=nt.sizingStyle;ge.setAttribute("style","".concat(dt,";").concat(ie)),ge.value=st.value||st.placeholder||"";var ct=void 0,ht=void 0,Et,vt=ge.scrollHeight;if(Pt==="border-box"?vt+=wt:Pt==="content-box"&&(vt-=xt),bt!==null||$e!==null){ge.value=" ";var Ft=ge.scrollHeight-xt;bt!==null&&(ct=Ft*bt,Pt==="border-box"&&(ct=ct+xt+wt),vt=Math.max(ct,vt)),$e!==null&&(ht=Ft*$e,Pt==="border-box"&&(ht=ht+xt+wt),Et=vt>ht?"":"hidden",vt=Math.min(ht,vt))}var mt={height:vt,overflowY:Et,resize:"none"};return ct&&(mt.minHeight=ct),ht&&(mt.maxHeight=ht),mt}var Be=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,Ne=1,Ae=2,Re=xe.forwardRef(function(st,ft){var bt=st,$e=bt.prefixCls,nt=bt.defaultValue,xt=bt.value,wt=bt.autoSize,Pt=bt.onResize,dt=bt.className,ct=bt.style,ht=bt.disabled,Et=bt.onChange,vt=bt.onInternalAutoSize,Ft=(0,fe.Z)(bt,Be),mt=(0,ve.Z)(nt,{value:xt,postState:function(Kn){return Kn!=null?Kn:""}}),St=(0,De.Z)(mt,2),tt=St[0],Ve=St[1],we=function(Kn){Ve(Kn.target.value),Et==null||Et(Kn)},Le=xe.useRef();xe.useImperativeHandle(ft,function(){return{textArea:Le.current}});var Ze=xe.useMemo(function(){return wt&&(0,de.Z)(wt)==="object"?[wt.minRows,wt.maxRows]:[]},[wt]),rt=(0,De.Z)(Ze,2),Ie=rt[0],_e=rt[1],He=!!wt,Qe=function(){try{if(document.activeElement===Le.current){var Kn=Le.current,Mr=Kn.selectionStart,fr=Kn.selectionEnd,Er=Kn.scrollTop;Le.current.setSelectionRange(Mr,fr),Le.current.scrollTop=Er}}catch(Hr){}},ut=xe.useState(Ae),pt=(0,De.Z)(ut,2),Mt=pt[0],At=pt[1],Dt=xe.useState(),Kt=(0,De.Z)(Dt,2),Xt=Kt[0],$t=Kt[1],Ut=function(){At(Fe)};(0,ee.Z)(function(){He&&Ut()},[xt,Ie,_e,He]),(0,ee.Z)(function(){if(Mt===Fe)At(Ne);else if(Mt===Ne){var Tn=je(Le.current,!1,Ie,_e);At(Ae),$t(Tn)}else Qe()},[Mt]);var sn=xe.useRef(),tn=function(){ae.Z.cancel(sn.current)},Wt=function(Kn){Mt===Ae&&(Pt==null||Pt(Kn),wt&&(tn(),sn.current=(0,ae.Z)(function(){Ut()})))};xe.useEffect(function(){return tn},[]);var Pn=He?Xt:null,Sn=(0,oe.Z)((0,oe.Z)({},ct),Pn);return(Mt===Fe||Mt===Ne)&&(Sn.overflowY="hidden",Sn.overflowX="hidden"),xe.createElement(z.Z,{onResize:Wt,disabled:!(wt||Pt)},xe.createElement("textarea",(0,gt.Z)({},Ft,{ref:Le,style:Sn,className:ke()($e,dt,(0,Bt.Z)({},"".concat($e,"-disabled"),ht)),disabled:ht,value:tt,onChange:we})))}),We=Re,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=xe.forwardRef(function(st,ft){var bt,$e=st.defaultValue,nt=st.value,xt=st.onFocus,wt=st.onBlur,Pt=st.onChange,dt=st.allowClear,ct=st.maxLength,ht=st.onCompositionStart,Et=st.onCompositionEnd,vt=st.suffix,Ft=st.prefixCls,mt=Ft===void 0?"rc-textarea":Ft,St=st.showCount,tt=st.count,Ve=st.className,we=st.style,Le=st.disabled,Ze=st.hidden,rt=st.classNames,Ie=st.styles,_e=st.onResize,He=st.onClear,Qe=st.onPressEnter,ut=st.readOnly,pt=st.autoSize,Mt=st.onKeyDown,At=(0,fe.Z)(st,Ye),Dt=(0,ve.Z)($e,{value:nt,defaultValue:$e}),Kt=(0,De.Z)(Dt,2),Xt=Kt[0],$t=Kt[1],Ut=Xt==null?"":String(Xt),sn=xe.useState(!1),tn=(0,De.Z)(sn,2),Wt=tn[0],Pn=tn[1],Sn=xe.useRef(!1),Tn=xe.useState(null),Kn=(0,De.Z)(Tn,2),Mr=Kn[0],fr=Kn[1],Er=(0,xe.useRef)(null),Hr=(0,xe.useRef)(null),Ur=function(){var Ir;return(Ir=Hr.current)===null||Ir===void 0?void 0:Ir.textArea},ri=function(){Ur().focus()};(0,xe.useImperativeHandle)(ft,function(){var qn;return{resizableTextArea:Hr.current,focus:ri,blur:function(){Ur().blur()},nativeElement:((qn=Er.current)===null||qn===void 0?void 0:qn.nativeElement)||Ur()}}),(0,xe.useEffect)(function(){Pn(function(qn){return!Le&&qn})},[Le]);var Pi=xe.useState(null),Ui=(0,De.Z)(Pi,2),Fi=Ui[0],zi=Ui[1];xe.useEffect(function(){if(Fi){var qn;(qn=Ur()).setSelectionRange.apply(qn,(0,ze.Z)(Fi))}},[Fi]);var Xi=(0,Se.Z)(tt,St),et=(bt=Xi.max)!==null&&bt!==void 0?bt:ct,dr=Number(et)>0,mr=Xi.strategy(Ut),Mi=!!et&&mr>et,ar=function(Ir,gi){var bi=gi;!Sn.current&&Xi.exceedFormatter&&Xi.max&&Xi.strategy(gi)>Xi.max&&(bi=Xi.exceedFormatter(gi,{max:Xi.max}),gi!==bi&&zi([Ur().selectionStart||0,Ur().selectionEnd||0])),$t(bi),(0,Me.rJ)(Ir.currentTarget,Ir,Pt,bi)},Sr=function(Ir){Sn.current=!0,ht==null||ht(Ir)},jr=function(Ir){Sn.current=!1,ar(Ir,Ir.currentTarget.value),Et==null||Et(Ir)},to=function(Ir){ar(Ir,Ir.target.value)},Rr=function(Ir){Ir.key==="Enter"&&Qe&&Qe(Ir),Mt==null||Mt(Ir)},on=function(Ir){Pn(!0),xt==null||xt(Ir)},rn=function(Ir){Pn(!1),wt==null||wt(Ir)},Yt=function(Ir){$t(""),ri(),(0,Me.rJ)(Ur(),Ir,Pt)},nr=vt,gr;Xi.show&&(Xi.showFormatter?gr=Xi.showFormatter({value:Ut,count:mr,maxLength:et}):gr="".concat(mr).concat(dr?" / ".concat(et):""),nr=xe.createElement(xe.Fragment,null,nr,xe.createElement("span",{className:ke()("".concat(mt,"-data-count"),rt==null?void 0:rt.count),style:Ie==null?void 0:Ie.count},gr)));var Cr=function(Ir){var gi;_e==null||_e(Ir),(gi=Ur())!==null&&gi!==void 0&&gi.style.height&&fr(!0)},Nn=!pt&&!St&&!dt;return xe.createElement(Ce.BaseInput,{ref:Er,value:Ut,allowClear:dt,handleReset:Yt,suffix:nr,prefixCls:mt,classNames:(0,oe.Z)((0,oe.Z)({},rt),{},{affixWrapper:ke()(rt==null?void 0:rt.affixWrapper,(0,Bt.Z)((0,Bt.Z)({},"".concat(mt,"-show-count"),St),"".concat(mt,"-textarea-allow-clear"),dt))}),disabled:Le,focused:Wt,className:ke()(Ve,Mi&&"".concat(mt,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},we),Mr&&!Nn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof gr=="string"?gr:void 0}},hidden:Ze,readOnly:ut,onClear:He},xe.createElement(We,(0,gt.Z)({},At,{autoSize:pt,maxLength:ct,onKeyDown:Rr,onChange:to,onFocus:on,onBlur:rn,onCompositionStart:Sr,onCompositionEnd:jr,className:ke()(rt==null?void 0:rt.textarea),style:(0,oe.Z)((0,oe.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:we==null?void 0:we.resize}),disabled:Le,prefixCls:mt,onResize:Cr,ref:Hr,readOnly:ut})))}),Ke=Ue,ot=Ke},639:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return ue}});var gt=at(71409),Bt=at(87075),oe=at(89490),ze=at(11036),De=at(39224),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"),Re=[],We=0;We<Be;We+=1)Re.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")},Re)},ve=fe.memo(Me),xe=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,Re=Pe.style,We=Pe.dragOver,Ye=Pe.dragOverGapTop,Ue=Pe.dragOverGapBottom,Ke=Pe.isLeaf,ot=Pe.isStart,st=Pe.isEnd,ft=Pe.expanded,bt=Pe.selected,$e=Pe.checked,nt=Pe.halfChecked,xt=Pe.loading,wt=Pe.domRef,Pt=Pe.active,dt=Pe.data,ct=Pe.onMouseMove,ht=Pe.selectable,Et=(0,De.Z)(Pe,z),vt=fe.useContext(Se.k),Ft=fe.useContext(Se.y),mt=fe.useRef(null),St=fe.useState(!1),tt=(0,ze.Z)(St,2),Ve=tt[0],we=tt[1],Le=!!(vt.disabled||Pe.disabled||(je=Ft.nodeDisabled)!==null&&je!==void 0&&je.call(Ft,dt)),Ze=fe.useMemo(function(){return!vt.checkable||Pe.checkable===!1?!1:vt.checkable},[vt.checkable,Pe.checkable]),rt=function(mr){Le||vt.onNodeSelect(mr,(0,de.F)(Pe))},Ie=function(mr){Le||!Ze||Pe.disableCheckbox||vt.onNodeCheck(mr,(0,de.F)(Pe),!$e)},_e=fe.useMemo(function(){return typeof ht=="boolean"?ht:vt.selectable},[ht,vt.selectable]),He=function(mr){vt.onNodeClick(mr,(0,de.F)(Pe)),_e?rt(mr):Ie(mr)},Qe=function(mr){vt.onNodeDoubleClick(mr,(0,de.F)(Pe))},ut=function(mr){vt.onNodeMouseEnter(mr,(0,de.F)(Pe))},pt=function(mr){vt.onNodeMouseLeave(mr,(0,de.F)(Pe))},Mt=function(mr){vt.onNodeContextMenu(mr,(0,de.F)(Pe))},At=fe.useMemo(function(){return!!(vt.draggable&&(!vt.draggable.nodeDraggable||vt.draggable.nodeDraggable(dt)))},[vt.draggable,dt]),Dt=function(mr){mr.stopPropagation(),we(!0),vt.onNodeDragStart(mr,Pe);try{mr.dataTransfer.setData("text/plain","")}catch(Mi){}},Kt=function(mr){mr.preventDefault(),mr.stopPropagation(),vt.onNodeDragEnter(mr,Pe)},Xt=function(mr){mr.preventDefault(),mr.stopPropagation(),vt.onNodeDragOver(mr,Pe)},$t=function(mr){mr.stopPropagation(),vt.onNodeDragLeave(mr,Pe)},Ut=function(mr){mr.stopPropagation(),we(!1),vt.onNodeDragEnd(mr,Pe)},sn=function(mr){mr.preventDefault(),mr.stopPropagation(),we(!1),vt.onNodeDrop(mr,Pe)},tn=function(mr){xt||vt.onNodeExpand(mr,(0,de.F)(Pe))},Wt=fe.useMemo(function(){var dr=(0,xe.Z)(vt.keyEntities,Ne)||{},mr=dr.children;return!!(mr||[]).length},[vt.keyEntities,Ne]),Pn=fe.useMemo(function(){return Ke===!1?!1:Ke||!vt.loadData&&!Wt||vt.loadData&&Pe.loaded&&!Wt},[Ke,vt.loadData,Wt,Pe.loaded]);fe.useEffect(function(){xt||typeof vt.loadData=="function"&&ft&&!Pn&&!Pe.loaded&&vt.onNodeLoad((0,de.F)(Pe))},[xt,vt.loadData,vt.onNodeLoad,ft,Pn,Pe]);var Sn=fe.useMemo(function(){var dr;return(dr=vt.draggable)!==null&&dr!==void 0&&dr.icon?fe.createElement("span",{className:"".concat(vt.prefixCls,"-draggable-icon")},vt.draggable.icon):null},[vt.draggable]),Tn=function(mr){var Mi=Pe.switcherIcon||vt.switcherIcon;return typeof Mi=="function"?Mi((0,oe.Z)((0,oe.Z)({},Pe),{},{isLeaf:mr})):Mi},Kn=function(){if(Pn){var mr=Tn(!0);return mr!==!1?fe.createElement("span",{className:ke()("".concat(vt.prefixCls,"-switcher"),"".concat(vt.prefixCls,"-switcher-noop"))},mr):null}var Mi=Tn(!1);return Mi!==!1?fe.createElement("span",{onClick:tn,className:ke()("".concat(vt.prefixCls,"-switcher"),"".concat(vt.prefixCls,"-switcher_").concat(ft?ee:ae))},Mi):null},Mr=fe.useMemo(function(){if(!Ze)return null;var dr=typeof Ze!="boolean"?Ze:null;return fe.createElement("span",{className:ke()("".concat(vt.prefixCls,"-checkbox"),(0,Bt.Z)((0,Bt.Z)((0,Bt.Z)({},"".concat(vt.prefixCls,"-checkbox-checked"),$e),"".concat(vt.prefixCls,"-checkbox-indeterminate"),!$e&&nt),"".concat(vt.prefixCls,"-checkbox-disabled"),Le||Pe.disableCheckbox)),onClick:Ie,role:"checkbox","aria-checked":nt?"mixed":$e,"aria-disabled":Le||Pe.disableCheckbox,"aria-label":"Select ".concat(typeof Pe.title=="string"?Pe.title:"tree node")},dr)},[Ze,$e,nt,Le,Pe.disableCheckbox,Pe.title]),fr=fe.useMemo(function(){return Pn?null:ft?ee:ae},[Pn,ft]),Er=fe.useMemo(function(){return fe.createElement("span",{className:ke()("".concat(vt.prefixCls,"-iconEle"),"".concat(vt.prefixCls,"-icon__").concat(fr||"docu"),(0,Bt.Z)({},"".concat(vt.prefixCls,"-icon_loading"),xt))})},[vt.prefixCls,fr,xt]),Hr=fe.useMemo(function(){var dr=!!vt.draggable,mr=!Pe.disabled&&dr&&vt.dragOverNodeKey===Ne;return mr?vt.dropIndicatorRender({dropPosition:vt.dropPosition,dropLevelOffset:vt.dropLevelOffset,indent:vt.indent,prefixCls:vt.prefixCls,direction:vt.direction}):null},[vt.dropPosition,vt.dropLevelOffset,vt.indent,vt.prefixCls,vt.direction,vt.draggable,vt.dragOverNodeKey,vt.dropIndicatorRender]),Ur=fe.useMemo(function(){var dr=Pe.title,mr=dr===void 0?ie:dr,Mi="".concat(vt.prefixCls,"-node-content-wrapper"),ar;if(vt.showIcon){var Sr=Pe.icon||vt.icon;ar=Sr?fe.createElement("span",{className:ke()("".concat(vt.prefixCls,"-iconEle"),"".concat(vt.prefixCls,"-icon__customize"))},typeof Sr=="function"?Sr(Pe):Sr):Er}else vt.loadData&&xt&&(ar=Er);var jr;return typeof mr=="function"?jr=mr(dt):vt.titleRender?jr=vt.titleRender(dt):jr=mr,fe.createElement("span",{ref:mt,title:typeof mr=="string"?mr:"",className:ke()(Mi,"".concat(Mi,"-").concat(fr||"normal"),(0,Bt.Z)({},"".concat(vt.prefixCls,"-node-selected"),!Le&&(bt||Ve))),onMouseEnter:ut,onMouseLeave:pt,onContextMenu:Mt,onClick:He,onDoubleClick:Qe},ar,fe.createElement("span",{className:"".concat(vt.prefixCls,"-title")},jr),Hr)},[vt.prefixCls,vt.showIcon,Pe,vt.icon,Er,vt.titleRender,dt,fr,ut,pt,Mt,He,Qe]),ri=(0,Ce.Z)(Et,{aria:!0,data:!0}),Pi=(0,xe.Z)(vt.keyEntities,Ne)||{},Ui=Pi.level,Fi=st[st.length-1],zi=!Le&&At,Xi=vt.draggingNodeKey===Ne,et=ht!==void 0?{"aria-selected":!!ht}:void 0;return fe.createElement("div",(0,gt.Z)({ref:wt,role:"treeitem","aria-expanded":Ke?void 0:ft,className:ke()(Ae,"".concat(vt.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(vt.prefixCls,"-treenode-disabled"),Le),"".concat(vt.prefixCls,"-treenode-switcher-").concat(ft?"open":"close"),!Ke),"".concat(vt.prefixCls,"-treenode-checkbox-checked"),$e),"".concat(vt.prefixCls,"-treenode-checkbox-indeterminate"),nt),"".concat(vt.prefixCls,"-treenode-selected"),bt),"".concat(vt.prefixCls,"-treenode-loading"),xt),"".concat(vt.prefixCls,"-treenode-active"),Pt),"".concat(vt.prefixCls,"-treenode-leaf-last"),Fi),"".concat(vt.prefixCls,"-treenode-draggable"),At),"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",vt.dropTargetKey===Ne),"drop-container",vt.dropContainerKey===Ne),"drag-over",!Le&&We),"drag-over-gap-top",!Le&&Ye),"drag-over-gap-bottom",!Le&&Ue),"filter-node",(Be=vt.filterTreeNode)===null||Be===void 0?void 0:Be.call(vt,(0,de.F)(Pe))),"".concat(vt.prefixCls,"-treenode-leaf"),Pn))),style:Re,draggable:zi,onDragStart:zi?Dt:void 0,onDragEnter:At?Kt:void 0,onDragOver:At?Xt:void 0,onDragLeave:At?$t:void 0,onDrop:At?sn:void 0,onDragEnd:At?Ut:void 0,onMouseMove:ct},et,ri),fe.createElement(ve,{prefixCls:vt.prefixCls,level:Ui,isStart:ot,isEnd:st}),Sn,Kn(),Mr,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 gt=at(59301),Bt=gt.createContext(null),oe=gt.createContext({})},62379:function(gn,cn,at){"use strict";at.d(cn,{OF:function(){return Ne.Z},y6:function(){return ae.y},ZP:function(){return Le}});var gt=at(71409),Bt=at(28788),oe=at(89490),ze=at(62730),De=at(16552),fe=at(19210),me=at(90264),ke=at(46654),Ce=at(37205),Se=at(87075),Me=at(92310),ve=at.n(Me),xe=at(10228),de=at(26112),z=at(48736),ee=at(59301),ae=at(30699),ie=function(rt){var Ie=rt.dropPosition,_e=rt.dropLevelOffset,He=rt.indent,Qe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ie){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(11036),Pe=at(39224),je=at(34280),Be=at(65283),Fe=at(77900),Ne=at(639);function Ae(Ze,rt){var Ie=ee.useState(!1),_e=(0,ge.Z)(Ie,2),He=_e[0],Qe=_e[1];(0,je.Z)(function(){if(He)return Ze(),function(){rt()}},[He]),(0,je.Z)(function(){return Qe(!0),function(){Qe(!1)}},[])}var Re=Ae,We=at(34061),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ue=ee.forwardRef(function(Ze,rt){var Ie=Ze.className,_e=Ze.style,He=Ze.motion,Qe=Ze.motionNodes,ut=Ze.motionType,pt=Ze.onMotionStart,Mt=Ze.onMotionEnd,At=Ze.active,Dt=Ze.treeNodeRequiredProps,Kt=(0,Pe.Z)(Ze,Ye),Xt=ee.useState(!0),$t=(0,ge.Z)(Xt,2),Ut=$t[0],sn=$t[1],tn=ee.useContext(ae.k),Wt=tn.prefixCls,Pn=Qe&&ut!=="hide";(0,je.Z)(function(){Qe&&Pn!==Ut&&sn(Pn)},[Qe]);var Sn=function(){Qe&&pt()},Tn=ee.useRef(!1),Kn=function(){Qe&&!Tn.current&&(Tn.current=!0,Mt())};Re(Sn,Kn);var Mr=function(Er){Pn===Er&&Kn()};return Qe?ee.createElement(Fe.default,(0,gt.Z)({ref:rt,visible:Ut},He,{motionAppear:ut==="show",onVisibleChanged:Mr}),function(fr,Er){var Hr=fr.className,Ur=fr.style;return ee.createElement("div",{ref:Er,className:ve()("".concat(Wt,"-treenode-motion"),Hr),style:Ur},Qe.map(function(ri){var Pi=Object.assign({},(ue(ri.data),ri.data)),Ui=ri.title,Fi=ri.key,zi=ri.isStart,Xi=ri.isEnd;delete Pi.children;var et=(0,We.H8)(Fi,Dt);return ee.createElement(Ne.Z,(0,gt.Z)({},Pi,et,{title:Ui,active:At,data:ri.data,key:Fi,isStart:zi,isEnd:Xi}))}))}):ee.createElement(Ne.Z,(0,gt.Z)({domRef:rt,className:Ie,style:_e},Kt,{active:At}))}),Ke=Ue;function ot(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=Ze.length,_e=rt.length;if(Math.abs(Ie-_e)!==1)return{add:!1,key:null};function He(Qe,ut){var pt=new Map;Qe.forEach(function(At){pt.set(At,!0)});var Mt=ut.filter(function(At){return!pt.has(At)});return Mt.length===1?Mt[0]:null}return Ie<_e?{add:!0,key:He(Ze,rt)}:{add:!1,key:He(rt,Ze)}}function st(Ze,rt,Ie){var _e=Ze.findIndex(function(pt){return pt.key===Ie}),He=Ze[_e+1],Qe=rt.findIndex(function(pt){return pt.key===Ie});if(He){var ut=rt.findIndex(function(pt){return pt.key===He.key});return rt.slice(Qe+1,ut)}return rt.slice(Qe+1)}var ft=["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"],bt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},$e=function(){},nt="RC_TREE_MOTION_".concat(Math.random()),xt={key:nt},wt={key:nt,level:0,index:0,pos:"0",node:xt,nodes:[xt]},Pt={parent:null,children:[],pos:wt.pos,data:xt,title:null,key:nt,isStart:[],isEnd:[]};function dt(Ze,rt,Ie,_e){return rt===!1||!Ie?Ze:Ze.slice(0,Math.ceil(Ie/_e)+1)}function ct(Ze){var rt=Ze.key,Ie=Ze.pos;return(0,We.km)(rt,Ie)}function ht(Ze){for(var rt=String(Ze.data.key),Ie=Ze;Ie.parent;)Ie=Ie.parent,rt="".concat(Ie.data.key," > ").concat(rt);return rt}var Et=ee.forwardRef(function(Ze,rt){var Ie=Ze.prefixCls,_e=Ze.data,He=Ze.selectable,Qe=Ze.checkable,ut=Ze.expandedKeys,pt=Ze.selectedKeys,Mt=Ze.checkedKeys,At=Ze.loadedKeys,Dt=Ze.loadingKeys,Kt=Ze.halfCheckedKeys,Xt=Ze.keyEntities,$t=Ze.disabled,Ut=Ze.dragging,sn=Ze.dragOverNodeKey,tn=Ze.dropPosition,Wt=Ze.motion,Pn=Ze.height,Sn=Ze.itemHeight,Tn=Ze.virtual,Kn=Ze.scrollWidth,Mr=Ze.focusable,fr=Ze.activeItem,Er=Ze.focused,Hr=Ze.tabIndex,Ur=Ze.onKeyDown,ri=Ze.onFocus,Pi=Ze.onBlur,Ui=Ze.onActiveChange,Fi=Ze.onListChangeStart,zi=Ze.onListChangeEnd,Xi=(0,Pe.Z)(Ze,ft),et=ee.useRef(null),dr=ee.useRef(null);ee.useImperativeHandle(rt,function(){return{scrollTo:function(Ln){et.current.scrollTo(Ln)},getIndentWidth:function(){return dr.current.offsetWidth}}});var mr=ee.useState(ut),Mi=(0,ge.Z)(mr,2),ar=Mi[0],Sr=Mi[1],jr=ee.useState(_e),to=(0,ge.Z)(jr,2),Rr=to[0],on=to[1],rn=ee.useState(_e),Yt=(0,ge.Z)(rn,2),nr=Yt[0],gr=Yt[1],Cr=ee.useState([]),Nn=(0,ge.Z)(Cr,2),qn=Nn[0],Ir=Nn[1],gi=ee.useState(null),bi=(0,ge.Z)(gi,2),Nt=bi[0],Ht=bi[1],Mn=ee.useRef(_e);Mn.current=_e;function jn(){var Dn=Mn.current;on(Dn),gr(Dn),Ir([]),Ht(null),zi()}(0,je.Z)(function(){Sr(ut);var Dn=ot(ar,ut);if(Dn.key!==null)if(Dn.add){var Ln=Rr.findIndex(function(cr){var pr=cr.key;return pr===Dn.key}),er=dt(st(Rr,_e,Dn.key),Tn,Pn,Sn),zn=Rr.slice();zn.splice(Ln+1,0,Pt),gr(zn),Ir(er),Ht("show")}else{var Zn=_e.findIndex(function(cr){var pr=cr.key;return pr===Dn.key}),rr=dt(st(_e,Rr,Dn.key),Tn,Pn,Sn),Kr=_e.slice();Kr.splice(Zn+1,0,Pt),gr(Kr),Ir(rr),Ht("hide")}else Rr!==_e&&(on(_e),gr(_e))},[ut,_e]),ee.useEffect(function(){Ut||jn()},[Ut]);var en=Wt?nr:_e,Fn={expandedKeys:ut,selectedKeys:pt,loadedKeys:At,loadingKeys:Dt,checkedKeys:Mt,halfCheckedKeys:Kt,dragOverNodeKey:sn,dropPosition:tn,keyEntities:Xt};return ee.createElement(ee.Fragment,null,Er&&fr&&ee.createElement("span",{style:bt,"aria-live":"assertive"},ht(fr)),ee.createElement("div",null,ee.createElement("input",{style:bt,disabled:Mr===!1||$t,tabIndex:Mr!==!1?Hr:null,onKeyDown:Ur,onFocus:ri,onBlur:Pi,value:"",onChange:$e,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Ie,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Ie,"-indent")},ee.createElement("div",{ref:dr,className:"".concat(Ie,"-indent-unit")}))),ee.createElement(Be.Z,(0,gt.Z)({},Xi,{data:en,itemKey:ct,height:Pn,fullHeight:!1,virtual:Tn,itemHeight:Sn,scrollWidth:Kn,prefixCls:"".concat(Ie,"-list"),ref:et,role:"tree",onVisibleChange:function(Ln){Ln.every(function(er){return ct(er)!==nt})&&jn()}}),function(Dn){var Ln=Dn.pos,er=Object.assign({},(ue(Dn.data),Dn.data)),zn=Dn.title,Zn=Dn.key,rr=Dn.isStart,Kr=Dn.isEnd,cr=(0,We.km)(Zn,Ln);delete er.key,delete er.children;var pr=(0,We.H8)(cr,Fn);return ee.createElement(Ke,(0,gt.Z)({},er,pr,{title:zn,active:!!fr&&Zn===fr.key,pos:Ln,data:Dn.data,isStart:rr,isEnd:Kr,motion:Wt,motionNodes:Zn===nt?qn:null,motionType:Nt,onMotionStart:Fi,onMotionEnd:jn,treeNodeRequiredProps:Fn,onMouseMove:function(){Ui(null)}}))}))}),vt=Et,Ft=at(82661),mt=at(34643),St=at(65065),tt=10,Ve=function(Ze){(0,ke.Z)(Ie,Ze);var rt=(0,Ce.Z)(Ie);function Ie(){var _e;(0,De.Z)(this,Ie);for(var He=arguments.length,Qe=new Array(He),ut=0;ut<He;ut++)Qe[ut]=arguments[ut];return _e=rt.call.apply(rt,[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(pt,Mt){var At=_e.state,Dt=At.expandedKeys,Kt=At.keyEntities,Xt=_e.props.onDragStart,$t=Mt.eventKey;_e.dragNodeProps=Mt,_e.dragStartMousePosition={x:pt.clientX,y:pt.clientY};var Ut=(0,Ft._5)(Dt,$t);_e.setState({draggingNodeKey:$t,dragChildrenKeys:(0,Ft.wA)($t,Kt),indent:_e.listRef.current.getIndentWidth()}),_e.setExpandedKeys(Ut),window.addEventListener("dragend",_e.onWindowDragEnd),Xt==null||Xt({event:pt,node:(0,We.F)(Mt)})}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragEnter",function(pt,Mt){var At=_e.state,Dt=At.expandedKeys,Kt=At.keyEntities,Xt=At.dragChildrenKeys,$t=At.flattenNodes,Ut=At.indent,sn=_e.props,tn=sn.onDragEnter,Wt=sn.onExpand,Pn=sn.allowDrop,Sn=sn.direction,Tn=Mt.pos,Kn=Mt.eventKey;if(_e.currentMouseOverDroppableNodeKey!==Kn&&(_e.currentMouseOverDroppableNodeKey=Kn),!_e.dragNodeProps){_e.resetDragState();return}var Mr=(0,Ft.OM)(pt,_e.dragNodeProps,Mt,Ut,_e.dragStartMousePosition,Pn,$t,Kt,Dt,Sn),fr=Mr.dropPosition,Er=Mr.dropLevelOffset,Hr=Mr.dropTargetKey,Ur=Mr.dropContainerKey,ri=Mr.dropTargetPos,Pi=Mr.dropAllowed,Ui=Mr.dragOverNodeKey;if(Xt.includes(Hr)||!Pi){_e.resetDragState();return}if(_e.delayedDragEnterLogic||(_e.delayedDragEnterLogic={}),Object.keys(_e.delayedDragEnterLogic).forEach(function(Fi){clearTimeout(_e.delayedDragEnterLogic[Fi])}),_e.dragNodeProps.eventKey!==Mt.eventKey&&(pt.persist(),_e.delayedDragEnterLogic[Tn]=window.setTimeout(function(){if(_e.state.draggingNodeKey!==null){var Fi=(0,ze.Z)(Dt),zi=(0,St.Z)(Kt,Mt.eventKey);zi&&(zi.children||[]).length&&(Fi=(0,Ft.L0)(Dt,Mt.eventKey)),_e.props.hasOwnProperty("expandedKeys")||_e.setExpandedKeys(Fi),Wt==null||Wt(Fi,{node:(0,We.F)(Mt),expanded:!0,nativeEvent:pt.nativeEvent})}},800)),_e.dragNodeProps.eventKey===Hr&&Er===0){_e.resetDragState();return}_e.setState({dragOverNodeKey:Ui,dropPosition:fr,dropLevelOffset:Er,dropTargetKey:Hr,dropContainerKey:Ur,dropTargetPos:ri,dropAllowed:Pi}),tn==null||tn({event:pt,node:(0,We.F)(Mt),expandedKeys:Dt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragOver",function(pt,Mt){var At=_e.state,Dt=At.dragChildrenKeys,Kt=At.flattenNodes,Xt=At.keyEntities,$t=At.expandedKeys,Ut=At.indent,sn=_e.props,tn=sn.onDragOver,Wt=sn.allowDrop,Pn=sn.direction;if(_e.dragNodeProps){var Sn=(0,Ft.OM)(pt,_e.dragNodeProps,Mt,Ut,_e.dragStartMousePosition,Wt,Kt,Xt,$t,Pn),Tn=Sn.dropPosition,Kn=Sn.dropLevelOffset,Mr=Sn.dropTargetKey,fr=Sn.dropContainerKey,Er=Sn.dropTargetPos,Hr=Sn.dropAllowed,Ur=Sn.dragOverNodeKey;Dt.includes(Mr)||!Hr||(_e.dragNodeProps.eventKey===Mr&&Kn===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():Tn===_e.state.dropPosition&&Kn===_e.state.dropLevelOffset&&Mr===_e.state.dropTargetKey&&fr===_e.state.dropContainerKey&&Er===_e.state.dropTargetPos&&Hr===_e.state.dropAllowed&&Ur===_e.state.dragOverNodeKey||_e.setState({dropPosition:Tn,dropLevelOffset:Kn,dropTargetKey:Mr,dropContainerKey:fr,dropTargetPos:Er,dropAllowed:Hr,dragOverNodeKey:Ur}),tn==null||tn({event:pt,node:(0,We.F)(Mt)}))}}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragLeave",function(pt,Mt){_e.currentMouseOverDroppableNodeKey===Mt.eventKey&&!pt.currentTarget.contains(pt.relatedTarget)&&(_e.resetDragState(),_e.currentMouseOverDroppableNodeKey=null);var At=_e.props.onDragLeave;At==null||At({event:pt,node:(0,We.F)(Mt)})}),(0,Se.Z)((0,me.Z)(_e),"onWindowDragEnd",function(pt){_e.onNodeDragEnd(pt,null,!0),window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragEnd",function(pt,Mt){var At=_e.props.onDragEnd;_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),At==null||At({event:pt,node:(0,We.F)(Mt)}),_e.dragNodeProps=null,window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDrop",function(pt,Mt){var At,Dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Kt=_e.state,Xt=Kt.dragChildrenKeys,$t=Kt.dropPosition,Ut=Kt.dropTargetKey,sn=Kt.dropTargetPos,tn=Kt.dropAllowed;if(tn){var Wt=_e.props.onDrop;if(_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Ut!==null){var Pn=(0,oe.Z)((0,oe.Z)({},(0,We.H8)(Ut,_e.getTreeNodeRequiredProps())),{},{active:((At=_e.getActiveItem())===null||At===void 0?void 0:At.key)===Ut,data:(0,St.Z)(_e.state.keyEntities,Ut).node}),Sn=Xt.includes(Ut);(0,z.ZP)(!Sn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Tn=(0,Ft.yx)(sn),Kn={event:pt,node:(0,We.F)(Pn),dragNode:_e.dragNodeProps?(0,We.F)(_e.dragNodeProps):null,dragNodesKeys:[_e.dragNodeProps.eventKey].concat(Xt),dropToGap:$t!==0,dropPosition:$t+Number(Tn[Tn.length-1])};Dt||Wt==null||Wt(Kn),_e.dragNodeProps=null}}}),(0,Se.Z)((0,me.Z)(_e),"cleanDragState",function(){var pt=_e.state.draggingNodeKey;pt!==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(pt,Mt){var At=_e.state,Dt=At.expandedKeys,Kt=At.flattenNodes,Xt=Mt.expanded,$t=Mt.key,Ut=Mt.isLeaf;if(!(Ut||pt.shiftKey||pt.metaKey||pt.ctrlKey)){var sn=Kt.filter(function(Wt){return Wt.key===$t})[0],tn=(0,We.F)((0,oe.Z)((0,oe.Z)({},(0,We.H8)($t,_e.getTreeNodeRequiredProps())),{},{data:sn.data}));_e.setExpandedKeys(Xt?(0,Ft._5)(Dt,$t):(0,Ft.L0)(Dt,$t)),_e.onNodeExpand(pt,tn)}}),(0,Se.Z)((0,me.Z)(_e),"onNodeClick",function(pt,Mt){var At=_e.props,Dt=At.onClick,Kt=At.expandAction;Kt==="click"&&_e.triggerExpandActionExpand(pt,Mt),Dt==null||Dt(pt,Mt)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDoubleClick",function(pt,Mt){var At=_e.props,Dt=At.onDoubleClick,Kt=At.expandAction;Kt==="doubleClick"&&_e.triggerExpandActionExpand(pt,Mt),Dt==null||Dt(pt,Mt)}),(0,Se.Z)((0,me.Z)(_e),"onNodeSelect",function(pt,Mt){var At=_e.state.selectedKeys,Dt=_e.state,Kt=Dt.keyEntities,Xt=Dt.fieldNames,$t=_e.props,Ut=$t.onSelect,sn=$t.multiple,tn=Mt.selected,Wt=Mt[Xt.key],Pn=!tn;Pn?sn?At=(0,Ft.L0)(At,Wt):At=[Wt]:At=(0,Ft._5)(At,Wt);var Sn=At.map(function(Tn){var Kn=(0,St.Z)(Kt,Tn);return Kn?Kn.node:null}).filter(Boolean);_e.setUncontrolledState({selectedKeys:At}),Ut==null||Ut(At,{event:"select",selected:Pn,node:Mt,selectedNodes:Sn,nativeEvent:pt.nativeEvent})}),(0,Se.Z)((0,me.Z)(_e),"onNodeCheck",function(pt,Mt,At){var Dt=_e.state,Kt=Dt.keyEntities,Xt=Dt.checkedKeys,$t=Dt.halfCheckedKeys,Ut=_e.props,sn=Ut.checkStrictly,tn=Ut.onCheck,Wt=Mt.key,Pn,Sn={event:"check",node:Mt,checked:At,nativeEvent:pt.nativeEvent};if(sn){var Tn=At?(0,Ft.L0)(Xt,Wt):(0,Ft._5)(Xt,Wt),Kn=(0,Ft._5)($t,Wt);Pn={checked:Tn,halfChecked:Kn},Sn.checkedNodes=Tn.map(function(ri){return(0,St.Z)(Kt,ri)}).filter(Boolean).map(function(ri){return ri.node}),_e.setUncontrolledState({checkedKeys:Tn})}else{var Mr=(0,mt.S)([].concat((0,ze.Z)(Xt),[Wt]),!0,Kt),fr=Mr.checkedKeys,Er=Mr.halfCheckedKeys;if(!At){var Hr=new Set(fr);Hr.delete(Wt);var Ur=(0,mt.S)(Array.from(Hr),{checked:!1,halfCheckedKeys:Er},Kt);fr=Ur.checkedKeys,Er=Ur.halfCheckedKeys}Pn=fr,Sn.checkedNodes=[],Sn.checkedNodesPositions=[],Sn.halfCheckedKeys=Er,fr.forEach(function(ri){var Pi=(0,St.Z)(Kt,ri);if(Pi){var Ui=Pi.node,Fi=Pi.pos;Sn.checkedNodes.push(Ui),Sn.checkedNodesPositions.push({node:Ui,pos:Fi})}}),_e.setUncontrolledState({checkedKeys:fr},!1,{halfCheckedKeys:Er})}tn==null||tn(Pn,Sn)}),(0,Se.Z)((0,me.Z)(_e),"onNodeLoad",function(pt){var Mt,At=pt.key,Dt=_e.state.keyEntities,Kt=(0,St.Z)(Dt,At);if(!(Kt!=null&&(Mt=Kt.children)!==null&&Mt!==void 0&&Mt.length)){var Xt=new Promise(function($t,Ut){_e.setState(function(sn){var tn=sn.loadedKeys,Wt=tn===void 0?[]:tn,Pn=sn.loadingKeys,Sn=Pn===void 0?[]:Pn,Tn=_e.props,Kn=Tn.loadData,Mr=Tn.onLoad;if(!Kn||Wt.includes(At)||Sn.includes(At))return null;var fr=Kn(pt);return fr.then(function(){var Er=_e.state.loadedKeys,Hr=(0,Ft.L0)(Er,At);Mr==null||Mr(Hr,{event:"load",node:pt}),_e.setUncontrolledState({loadedKeys:Hr}),_e.setState(function(Ur){return{loadingKeys:(0,Ft._5)(Ur.loadingKeys,At)}}),$t()}).catch(function(Er){if(_e.setState(function(Ur){return{loadingKeys:(0,Ft._5)(Ur.loadingKeys,At)}}),_e.loadingRetryTimes[At]=(_e.loadingRetryTimes[At]||0)+1,_e.loadingRetryTimes[At]>=tt){var Hr=_e.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_e.setUncontrolledState({loadedKeys:(0,Ft.L0)(Hr,At)}),$t()}Ut(Er)}),{loadingKeys:(0,Ft.L0)(Sn,At)}})});return Xt.catch(function(){}),Xt}}),(0,Se.Z)((0,me.Z)(_e),"onNodeMouseEnter",function(pt,Mt){var At=_e.props.onMouseEnter;At==null||At({event:pt,node:Mt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeMouseLeave",function(pt,Mt){var At=_e.props.onMouseLeave;At==null||At({event:pt,node:Mt})}),(0,Se.Z)((0,me.Z)(_e),"onNodeContextMenu",function(pt,Mt){var At=_e.props.onRightClick;At&&(pt.preventDefault(),At({event:pt,node:Mt}))}),(0,Se.Z)((0,me.Z)(_e),"onFocus",function(){var pt=_e.props.onFocus;_e.setState({focused:!0});for(var Mt=arguments.length,At=new Array(Mt),Dt=0;Dt<Mt;Dt++)At[Dt]=arguments[Dt];pt==null||pt.apply(void 0,At)}),(0,Se.Z)((0,me.Z)(_e),"onBlur",function(){var pt=_e.props.onBlur;_e.setState({focused:!1}),_e.onActiveChange(null);for(var Mt=arguments.length,At=new Array(Mt),Dt=0;Dt<Mt;Dt++)At[Dt]=arguments[Dt];pt==null||pt.apply(void 0,At)}),(0,Se.Z)((0,me.Z)(_e),"getTreeNodeRequiredProps",function(){var pt=_e.state,Mt=pt.expandedKeys,At=pt.selectedKeys,Dt=pt.loadedKeys,Kt=pt.loadingKeys,Xt=pt.checkedKeys,$t=pt.halfCheckedKeys,Ut=pt.dragOverNodeKey,sn=pt.dropPosition,tn=pt.keyEntities;return{expandedKeys:Mt||[],selectedKeys:At||[],loadedKeys:Dt||[],loadingKeys:Kt||[],checkedKeys:Xt||[],halfCheckedKeys:$t||[],dragOverNodeKey:Ut,dropPosition:sn,keyEntities:tn}}),(0,Se.Z)((0,me.Z)(_e),"setExpandedKeys",function(pt){var Mt=_e.state,At=Mt.treeData,Dt=Mt.fieldNames,Kt=(0,We.oH)(At,pt,Dt);_e.setUncontrolledState({expandedKeys:pt,flattenNodes:Kt},!0)}),(0,Se.Z)((0,me.Z)(_e),"onNodeExpand",function(pt,Mt){var At=_e.state.expandedKeys,Dt=_e.state,Kt=Dt.listChanging,Xt=Dt.fieldNames,$t=_e.props,Ut=$t.onExpand,sn=$t.loadData,tn=Mt.expanded,Wt=Mt[Xt.key];if(!Kt){var Pn=At.includes(Wt),Sn=!tn;if((0,z.ZP)(tn&&Pn||!tn&&!Pn,"Expand state not sync with index check"),At=Sn?(0,Ft.L0)(At,Wt):(0,Ft._5)(At,Wt),_e.setExpandedKeys(At),Ut==null||Ut(At,{node:Mt,expanded:Sn,nativeEvent:pt.nativeEvent}),Sn&&sn){var Tn=_e.onNodeLoad(Mt);Tn&&Tn.then(function(){var Kn=(0,We.oH)(_e.state.treeData,At,Xt);_e.setUncontrolledState({flattenNodes:Kn})}).catch(function(){var Kn=_e.state.expandedKeys,Mr=(0,Ft._5)(Kn,Wt);_e.setExpandedKeys(Mr)})}}}),(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(pt){var Mt=_e.state.activeKey,At=_e.props,Dt=At.onActiveChange,Kt=At.itemScrollOffset,Xt=Kt===void 0?0:Kt;Mt!==pt&&(_e.setState({activeKey:pt}),pt!==null&&_e.scrollTo({key:pt,offset:Xt}),Dt==null||Dt(pt))}),(0,Se.Z)((0,me.Z)(_e),"getActiveItem",function(){var pt=_e.state,Mt=pt.activeKey,At=pt.flattenNodes;return Mt===null?null:At.find(function(Dt){var Kt=Dt.key;return Kt===Mt})||null}),(0,Se.Z)((0,me.Z)(_e),"offsetActiveKey",function(pt){var Mt=_e.state,At=Mt.flattenNodes,Dt=Mt.activeKey,Kt=At.findIndex(function(Ut){var sn=Ut.key;return sn===Dt});Kt===-1&&pt<0&&(Kt=At.length),Kt=(Kt+pt+At.length)%At.length;var Xt=At[Kt];if(Xt){var $t=Xt.key;_e.onActiveChange($t)}else _e.onActiveChange(null)}),(0,Se.Z)((0,me.Z)(_e),"onKeyDown",function(pt){var Mt=_e.state,At=Mt.activeKey,Dt=Mt.expandedKeys,Kt=Mt.checkedKeys,Xt=Mt.fieldNames,$t=_e.props,Ut=$t.onKeyDown,sn=$t.checkable,tn=$t.selectable;switch(pt.which){case xe.Z.UP:{_e.offsetActiveKey(-1),pt.preventDefault();break}case xe.Z.DOWN:{_e.offsetActiveKey(1),pt.preventDefault();break}}var Wt=_e.getActiveItem();if(Wt&&Wt.data){var Pn=_e.getTreeNodeRequiredProps(),Sn=Wt.data.isLeaf===!1||!!(Wt.data[Xt.children]||[]).length,Tn=(0,We.F)((0,oe.Z)((0,oe.Z)({},(0,We.H8)(At,Pn)),{},{data:Wt.data,active:!0}));switch(pt.which){case xe.Z.LEFT:{Sn&&Dt.includes(At)?_e.onNodeExpand({},Tn):Wt.parent&&_e.onActiveChange(Wt.parent.key),pt.preventDefault();break}case xe.Z.RIGHT:{Sn&&!Dt.includes(At)?_e.onNodeExpand({},Tn):Wt.children&&Wt.children.length&&_e.onActiveChange(Wt.children[0].key),pt.preventDefault();break}case xe.Z.ENTER:case xe.Z.SPACE:{sn&&!Tn.disabled&&Tn.checkable!==!1&&!Tn.disableCheckbox?_e.onNodeCheck({},Tn,!Kt.includes(At)):!sn&&tn&&!Tn.disabled&&Tn.selectable!==!1&&_e.onNodeSelect({},Tn);break}}}Ut==null||Ut(pt)}),(0,Se.Z)((0,me.Z)(_e),"setUncontrolledState",function(pt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,At=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_e.destroyed){var Dt=!1,Kt=!0,Xt={};Object.keys(pt).forEach(function($t){if(_e.props.hasOwnProperty($t)){Kt=!1;return}Dt=!0,Xt[$t]=pt[$t]}),Dt&&(!Mt||Kt)&&_e.setState((0,oe.Z)((0,oe.Z)({},Xt),At))}}),(0,Se.Z)((0,me.Z)(_e),"scrollTo",function(pt){_e.listRef.current.scrollTo(pt)}),_e}return(0,fe.Z)(Ie,[{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,pt=ut===void 0?0:ut;Qe!==void 0&&Qe!==this.state.activeKey&&(this.setState({activeKey:Qe}),Qe!==null&&this.scrollTo({key:Qe,offset:pt}))}},{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,pt=He.keyEntities,Mt=He.draggingNodeKey,At=He.activeKey,Dt=He.dropLevelOffset,Kt=He.dropContainerKey,Xt=He.dropTargetKey,$t=He.dropPosition,Ut=He.dragOverNodeKey,sn=He.indent,tn=this.props,Wt=tn.prefixCls,Pn=tn.className,Sn=tn.style,Tn=tn.showLine,Kn=tn.focusable,Mr=tn.tabIndex,fr=Mr===void 0?0:Mr,Er=tn.selectable,Hr=tn.showIcon,Ur=tn.icon,ri=tn.switcherIcon,Pi=tn.draggable,Ui=tn.checkable,Fi=tn.checkStrictly,zi=tn.disabled,Xi=tn.motion,et=tn.loadData,dr=tn.filterTreeNode,mr=tn.height,Mi=tn.itemHeight,ar=tn.scrollWidth,Sr=tn.virtual,jr=tn.titleRender,to=tn.dropIndicatorRender,Rr=tn.onContextMenu,on=tn.onScroll,rn=tn.direction,Yt=tn.rootClassName,nr=tn.rootStyle,gr=(0,de.Z)(this.props,{aria:!0,data:!0}),Cr;Pi&&((0,Bt.Z)(Pi)==="object"?Cr=Pi:typeof Pi=="function"?Cr={nodeDraggable:Pi}:Cr={});var Nn={prefixCls:Wt,selectable:Er,showIcon:Hr,icon:Ur,switcherIcon:ri,draggable:Cr,draggingNodeKey:Mt,checkable:Ui,checkStrictly:Fi,disabled:zi,keyEntities:pt,dropLevelOffset:Dt,dropContainerKey:Kt,dropTargetKey:Xt,dropPosition:$t,dragOverNodeKey:Ut,indent:sn,direction:rn,dropIndicatorRender:to,loadData:et,filterTreeNode:dr,titleRender:jr,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:Nn},ee.createElement("div",{className:ve()(Wt,Pn,Yt,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(Wt,"-show-line"),Tn),"".concat(Wt,"-focused"),Qe),"".concat(Wt,"-active-focused"),At!==null)),style:nr},ee.createElement(vt,(0,gt.Z)({ref:this.listRef,prefixCls:Wt,style:Sn,data:ut,disabled:zi,selectable:Er,checkable:!!Ui,motion:Xi,dragging:Mt!==null,height:mr,itemHeight:Mi,virtual:Sr,focusable:Kn,focused:Qe,tabIndex:fr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Rr,onScroll:on,scrollWidth:ar},this.getTreeNodeRequiredProps(),gr))))}}],[{key:"getDerivedStateFromProps",value:function(He,Qe){var ut=Qe.prevProps,pt={prevProps:He};function Mt(fr){return!ut&&He.hasOwnProperty(fr)||ut&&ut[fr]!==He[fr]}var At,Dt=Qe.fieldNames;if(Mt("fieldNames")&&(Dt=(0,We.w$)(He.fieldNames),pt.fieldNames=Dt),Mt("treeData")?At=He.treeData:Mt("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),At=(0,We.zn)(He.children)),At){pt.treeData=At;var Kt=(0,We.I8)(At,{fieldNames:Dt});pt.keyEntities=(0,oe.Z)((0,Se.Z)({},nt,wt),Kt.keyEntities)}var Xt=pt.keyEntities||Qe.keyEntities;if(Mt("expandedKeys")||ut&&Mt("autoExpandParent"))pt.expandedKeys=He.autoExpandParent||!ut&&He.defaultExpandParent?(0,Ft.r7)(He.expandedKeys,Xt):He.expandedKeys;else if(!ut&&He.defaultExpandAll){var $t=(0,oe.Z)({},Xt);delete $t[nt];var Ut=[];Object.keys($t).forEach(function(fr){var Er=$t[fr];Er.children&&Er.children.length&&Ut.push(Er.key)}),pt.expandedKeys=Ut}else!ut&&He.defaultExpandedKeys&&(pt.expandedKeys=He.autoExpandParent||He.defaultExpandParent?(0,Ft.r7)(He.defaultExpandedKeys,Xt):He.defaultExpandedKeys);if(pt.expandedKeys||delete pt.expandedKeys,At||pt.expandedKeys){var sn=(0,We.oH)(At||Qe.treeData,pt.expandedKeys||Qe.expandedKeys,Dt);pt.flattenNodes=sn}if(He.selectable&&(Mt("selectedKeys")?pt.selectedKeys=(0,Ft.BT)(He.selectedKeys,He):!ut&&He.defaultSelectedKeys&&(pt.selectedKeys=(0,Ft.BT)(He.defaultSelectedKeys,He))),He.checkable){var tn;if(Mt("checkedKeys")?tn=(0,Ft.E6)(He.checkedKeys)||{}:!ut&&He.defaultCheckedKeys?tn=(0,Ft.E6)(He.defaultCheckedKeys)||{}:At&&(tn=(0,Ft.E6)(He.checkedKeys)||{checkedKeys:Qe.checkedKeys,halfCheckedKeys:Qe.halfCheckedKeys}),tn){var Wt=tn,Pn=Wt.checkedKeys,Sn=Pn===void 0?[]:Pn,Tn=Wt.halfCheckedKeys,Kn=Tn===void 0?[]:Tn;if(!He.checkStrictly){var Mr=(0,mt.S)(Sn,!0,Xt);Sn=Mr.checkedKeys,Kn=Mr.halfCheckedKeys}pt.checkedKeys=Sn,pt.halfCheckedKeys=Kn}}return Mt("loadedKeys")&&(pt.loadedKeys=He.loadedKeys),pt}}]),Ie}(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 we=Ve,Le=we},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 gt=at(62730),Bt=at(28788),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 Re=Ae.key,We=Ae.children;je.push(Re),Fe(We)})}return Fe(Be.children),je}function xe(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,Re,We,Ye){var Ue,Ke=ge.clientX,ot=ge.clientY,st=ge.target.getBoundingClientRect(),ft=st.top,bt=st.height,$e=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Ke),nt=($e-12)/Be,xt=We.filter(function(Le){var Ze;return(Ze=Re[Le])===null||Ze===void 0||(Ze=Ze.children)===null||Ze===void 0?void 0:Ze.length}),wt=(0,fe.Z)(Re,je.eventKey);if(ot<ft+bt/2){var Pt=Ae.findIndex(function(Le){return Le.key===wt.key}),dt=Pt<=0?0:Pt-1,ct=Ae[dt].key;wt=(0,fe.Z)(Re,ct)}var ht=wt.key,Et=wt,vt=wt.key,Ft=0,mt=0;if(!xt.includes(ht))for(var St=0;St<nt&&xe(wt);St+=1)wt=wt.parent,mt+=1;var tt=Pe.data,Ve=wt.node,we=!0;return de(wt)&&wt.level===0&&ot<ft+bt/2&&Ne({dragNode:tt,dropNode:Ve,dropPosition:-1})&&wt.key===je.eventKey?Ft=-1:(Et.children||[]).length&&xt.includes(vt)?Ne({dragNode:tt,dropNode:Ve,dropPosition:0})?Ft=0:we=!1:mt===0?nt>-1.5?Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?Ft=1:we=!1:Ne({dragNode:tt,dropNode:Ve,dropPosition:0})?Ft=0:Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?Ft=1:we=!1:Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?Ft=1:we=!1,{dropPosition:Ft,dropLevelOffset:mt,dropTargetKey:wt.key,dropTargetPos:wt.pos,dragOverNodeKey:vt,dropContainerKey:Ft===0?null:((Ue=wt.parent)===null||Ue===void 0?void 0:Ue.key)||null,dropAllowed:we}}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 Re=Ae.children,We=_objectWithoutProperties(Ae,ke),Ye=ie(Re,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,Re=Ne.node;Re.disabled||Ae&&Be(Ae.key)}}}return(ge||[]).forEach(function(Fe){Be(Fe)}),(0,gt.Z)(je)}},34643:function(gn,cn,at){"use strict";at.d(cn,{S:function(){return me}});var gt=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),xe=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||xe.has(Fe))&&(je=!0)}),Pe&&ve.add(ue.key),je&&xe.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(oe(xe,ve))}}function fe(ke,Ce,Se,Me,ve){for(var xe=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;!xe.has(ge)&&!de.has(ge)&&!ve(Pe)&&Be.filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){xe.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=xe.has(Ne);je&&!Ae&&(je=!1),!Be&&(Ae||de.has(Ne))&&(Be=!0)}),je||xe.delete(ge.key),Be&&de.add(ge.key),ae.add(ge.key)}})}return{checkedKeys:Array.from(xe),halfCheckedKeys:Array.from(oe(de,xe))}}function me(ke,Ce,Se,Me){var ve=[],xe;Me?xe=Me:xe=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,gt.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,xe):ae=fe(de,Ce.halfCheckedKeys,z,ee,xe),ae}},65065:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return gt}});function gt(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 xe},zn:function(){return z}});var gt=at(28788),Bt=at(62730),oe=at(89490),ze=at(39224),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 xe(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 Re=Ae[Pe.key],We=Ae[Pe.children];warning(Re!=null,"Tree node must have a certain key: [".concat(Ne).concat(Re,"]"));var Ye=String(Re);warning(!je.has(Ye)||Re===null||Re===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,Re=Ae.children,We=(0,ze.Z)(Ae,Ce),Ye=(0,oe.Z)({key:Ne},We),Ue=Pe(Re);return Ue.length&&(Ye.children=Ue),Ye}).filter(function(Fe){return Fe})}return Pe(ge)}function ee(ge,Pe,je){var Be=xe(je),Fe=Be._title,Ne=Be.key,Ae=Be.children,Re=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 ft=Se(Ke?Ke.pos:"0",st),bt=ve(ot[Ne],ft),$e,nt=0;nt<Fe.length;nt+=1){var xt=Fe[nt];if(ot[xt]!==void 0){$e=ot[xt];break}}var wt=Object.assign((0,fe.Z)(ot,[].concat((0,Bt.Z)(Fe),[Ne,Ae])),{title:$e,key:bt,parent:Ke,pos:ft,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(wt),Pe===!0||Re.has(bt)?wt.children=Ye(ot[Ae]||[],wt):wt.children=[],wt})}return Ye(ge),We}function ae(ge,Pe,je){var Be={};(0,gt.Z)(je)==="object"?Be=je:Be={externalGetKey:je},Be=Be||{};var Fe=Be,Ne=Fe.childrenPropName,Ae=Fe.externalGetKey,Re=Fe.fieldNames,We=xe(Re),Ye=We.key,Ue=We.children,Ke=Ne||Ue,ot;Ae?typeof Ae=="string"?ot=function(bt){return bt[Ae]}:typeof Ae=="function"&&(ot=function(bt){return Ae(bt)}):ot=function(bt,$e){return ve(bt[Ye],$e)};function st(ft,bt,$e,nt){var xt=ft?ft[Ke]:ge,wt=ft?Se($e.pos,bt):"0",Pt=ft?[].concat((0,Bt.Z)(nt),[ft]):[];if(ft){var dt=ot(ft,wt),ct={node:ft,index:bt,pos:wt,key:dt,parentPos:$e.node?$e.pos:null,level:$e.level+1,nodes:Pt};Pe(ct)}xt&&xt.forEach(function(ht,Et){st(ht,Et,{node:ft,pos:wt,level:$e?$e.level+1:-1},Pt)})}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,Re=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 ft=st.node,bt=st.index,$e=st.pos,nt=st.key,xt=st.parentPos,wt=st.level,Pt=st.nodes,dt={node:ft,nodes:Pt,index:bt,key:nt,pos:$e,level:wt},ct=ve(nt,$e);Ue[$e]=dt,Ke[ct]=dt,dt.parent=Ue[xt],dt.parent&&(dt.parent.children=dt.parent.children||[],dt.parent.children.push(dt)),Be&&Be(dt,ot)},{externalGetKey:Ye,childrenPropName:Ae,fieldNames:Re}),Fe&&Fe(ot),ot}function le(ge,Pe){var je=Pe.expandedKeys,Be=Pe.selectedKeys,Fe=Pe.loadedKeys,Ne=Pe.loadingKeys,Ae=Pe.checkedKeys,Re=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:Re.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,Re=ge.halfChecked,We=ge.dragOver,Ye=ge.dragOverGapTop,Ue=ge.dragOverGapBottom,Ke=ge.pos,ot=ge.active,st=ge.eventKey,ft=(0,oe.Z)((0,oe.Z)({},Pe),{},{expanded:je,selected:Be,checked:Fe,loaded:Ne,loading:Ae,halfChecked:Re,dragOver:We,dragOverGapTop:Ye,dragOverGapBottom:Ue,pos:Ke,active:ot,key:st});return"props"in ft||Object.defineProperty(ft,"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}}),ft}},90472:function(gn,cn,at){"use strict";at.d(cn,{Z:function(){return st}});var gt=at(71409),Bt=at(16552),oe=at(19210),ze=at(90264),De=at(46654),fe=at(37205),me=at(87075),ke=at(59301),Ce=at(89490),Se=at(39224),Me=at(28788),ve=at(58676),xe=at(93195),de=at(62730),z=at(92310),ee=at.n(z),ae=at(26112),ie=at(48736),le=function(ft,bt){if(ft&&bt){var $e=Array.isArray(bt)?bt:bt.split(","),nt=ft.name||"",xt=ft.type||"",wt=xt.replace(/\/.*$/,"");return $e.some(function(Pt){var dt=Pt.trim();if(/^\*(\/\*)?$/.test(Pt))return!0;if(dt.charAt(0)==="."){var ct=nt.toLowerCase(),ht=dt.toLowerCase(),Et=[ht];return(ht===".jpg"||ht===".jpeg")&&(Et=[".jpg",".jpeg"]),Et.some(function(vt){return ct.endsWith(vt)})}return/\/\*$/.test(dt)?wt===dt.replace(/\/.*$/,""):xt===dt?!0:/^\w+$/.test(dt)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(dt,"'.Skip for check.")),!0):!1})}return!0};function ue(ft,bt){var $e="cannot ".concat(ft.method," ").concat(ft.action," ").concat(bt.status,"'"),nt=new Error($e);return nt.status=bt.status,nt.method=ft.method,nt.url=ft.action,nt}function ge(ft){var bt=ft.responseText||ft.response;if(!bt)return bt;try{return JSON.parse(bt)}catch($e){return bt}}function Pe(ft){var bt=new XMLHttpRequest;ft.onProgress&&bt.upload&&(bt.upload.onprogress=function(wt){wt.total>0&&(wt.percent=wt.loaded/wt.total*100),ft.onProgress(wt)});var $e=new FormData;ft.data&&Object.keys(ft.data).forEach(function(xt){var wt=ft.data[xt];if(Array.isArray(wt)){wt.forEach(function(Pt){$e.append("".concat(xt,"[]"),Pt)});return}$e.append(xt,wt)}),ft.file instanceof Blob?$e.append(ft.filename,ft.file,ft.file.name):$e.append(ft.filename,ft.file),bt.onerror=function(wt){ft.onError(wt)},bt.onload=function(){return bt.status<200||bt.status>=300?ft.onError(ue(ft,bt),ge(bt)):ft.onSuccess(ge(bt),bt)},bt.open(ft.method,ft.action,!0),ft.withCredentials&&"withCredentials"in bt&&(bt.withCredentials=!0);var nt=ft.headers||{};return nt["X-Requested-With"]!==null&&bt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(nt).forEach(function(xt){nt[xt]!==null&&bt.setRequestHeader(xt,nt[xt])}),bt.send($e),{abort:function(){bt.abort()}}}var je=function(){var ft=(0,xe.Z)((0,ve.Z)().mark(function bt($e,nt){var xt,wt,Pt,dt,ct,ht,Et,vt;return(0,ve.Z)().wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:ht=function(){return ht=(0,xe.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(rt){nt(rt)?(Ve.fullPath&&!rt.webkitRelativePath&&(Object.defineProperties(rt,{webkitRelativePath:{writable:!0}}),rt.webkitRelativePath=Ve.fullPath.replace(/^\//,""),Object.defineProperties(rt,{webkitRelativePath:{writable:!1}})),Ze(rt)):Ze(null)})}));case 1:case"end":return Le.stop()}},tt)})),ht.apply(this,arguments)},ct=function(tt){return ht.apply(this,arguments)},dt=function(){return dt=(0,xe.Z)((0,ve.Z)().mark(function tt(Ve){var we,Le,Ze,rt,Ie;return(0,ve.Z)().wrap(function(He){for(;;)switch(He.prev=He.next){case 0:we=Ve.createReader(),Le=[];case 2:return He.next=5,new Promise(function(Qe){we.readEntries(Qe,function(){return Qe([])})});case 5:if(Ze=He.sent,rt=Ze.length,rt){He.next=9;break}return He.abrupt("break",12);case 9:for(Ie=0;Ie<rt;Ie++)Le.push(Ze[Ie]);He.next=2;break;case 12:return He.abrupt("return",Le);case 13:case"end":return He.stop()}},tt)})),dt.apply(this,arguments)},Pt=function(tt){return dt.apply(this,arguments)},xt=[],wt=[],$e.forEach(function(St){return wt.push(St.webkitGetAsEntry())}),Et=function(){var St=(0,xe.Z)((0,ve.Z)().mark(function tt(Ve,we){var Le,Ze;return(0,ve.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Ve){Ie.next=2;break}return Ie.abrupt("return");case 2:if(Ve.path=we||"",!Ve.isFile){Ie.next=10;break}return Ie.next=6,ct(Ve);case 6:Le=Ie.sent,Le&&xt.push(Le),Ie.next=15;break;case 10:if(!Ve.isDirectory){Ie.next=15;break}return Ie.next=13,Pt(Ve);case 13:Ze=Ie.sent,wt.push.apply(wt,(0,de.Z)(Ze));case 15:case"end":return Ie.stop()}},tt)}));return function(Ve,we){return St.apply(this,arguments)}}(),vt=0;case 9:if(!(vt<wt.length)){mt.next=15;break}return mt.next=12,Et(wt[vt]);case 12:vt++,mt.next=9;break;case 15:return mt.abrupt("return",xt);case 16:case"end":return mt.stop()}},bt)}));return function($e,nt){return ft.apply(this,arguments)}}(),Be=je,Fe=+new Date,Ne=0;function Ae(){return"rc-upload-".concat(Fe,"-").concat(++Ne)}var Re=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],We=function(ft){(0,De.Z)($e,ft);var bt=(0,fe.Z)($e);function $e(){var nt;(0,Bt.Z)(this,$e);for(var xt=arguments.length,wt=new Array(xt),Pt=0;Pt<xt;Pt++)wt[Pt]=arguments[Pt];return nt=bt.call.apply(bt,[this].concat(wt)),(0,me.Z)((0,ze.Z)(nt),"state",{uid:Ae()}),(0,me.Z)((0,ze.Z)(nt),"reqs",{}),(0,me.Z)((0,ze.Z)(nt),"fileInput",void 0),(0,me.Z)((0,ze.Z)(nt),"_isMounted",void 0),(0,me.Z)((0,ze.Z)(nt),"onChange",function(dt){var ct=nt.props,ht=ct.accept,Et=ct.directory,vt=dt.target.files,Ft=(0,de.Z)(vt).filter(function(mt){return!Et||le(mt,ht)});nt.uploadFiles(Ft),nt.reset()}),(0,me.Z)((0,ze.Z)(nt),"onClick",function(dt){var ct=nt.fileInput;if(ct){var ht=dt.target,Et=nt.props.onClick;if(ht&&ht.tagName==="BUTTON"){var vt=ct.parentNode;vt.focus(),ht.blur()}ct.click(),Et&&Et(dt)}}),(0,me.Z)((0,ze.Z)(nt),"onKeyDown",function(dt){dt.key==="Enter"&&nt.onClick(dt)}),(0,me.Z)((0,ze.Z)(nt),"onFileDrop",function(){var dt=(0,xe.Z)((0,ve.Z)().mark(function ct(ht){var Et,vt,Ft;return(0,ve.Z)().wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(Et=nt.props.multiple,ht.preventDefault(),ht.type!=="dragover"){St.next=4;break}return St.abrupt("return");case 4:if(!nt.props.directory){St.next=11;break}return St.next=7,Be(Array.prototype.slice.call(ht.dataTransfer.items),function(tt){return le(tt,nt.props.accept)});case 7:vt=St.sent,nt.uploadFiles(vt),St.next=14;break;case 11:Ft=(0,de.Z)(ht.dataTransfer.files).filter(function(tt){return le(tt,nt.props.accept)}),Et===!1&&(Ft=Ft.slice(0,1)),nt.uploadFiles(Ft);case 14:case"end":return St.stop()}},ct)}));return function(ct){return dt.apply(this,arguments)}}()),(0,me.Z)((0,ze.Z)(nt),"uploadFiles",function(dt){var ct=(0,de.Z)(dt),ht=ct.map(function(Et){return Et.uid=Ae(),nt.processFile(Et,ct)});Promise.all(ht).then(function(Et){var vt=nt.props.onBatchStart;vt==null||vt(Et.map(function(Ft){var mt=Ft.origin,St=Ft.parsedFile;return{file:mt,parsedFile:St}})),Et.filter(function(Ft){return Ft.parsedFile!==null}).forEach(function(Ft){nt.post(Ft)})})}),(0,me.Z)((0,ze.Z)(nt),"processFile",function(){var dt=(0,xe.Z)((0,ve.Z)().mark(function ct(ht,Et){var vt,Ft,mt,St,tt,Ve,we,Le,Ze;return(0,ve.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(vt=nt.props.beforeUpload,Ft=ht,!vt){Ie.next=14;break}return Ie.prev=3,Ie.next=6,vt(ht,Et);case 6:Ft=Ie.sent,Ie.next=12;break;case 9:Ie.prev=9,Ie.t0=Ie.catch(3),Ft=!1;case 12:if(Ft!==!1){Ie.next=14;break}return Ie.abrupt("return",{origin:ht,parsedFile:null,action:null,data:null});case 14:if(mt=nt.props.action,typeof mt!="function"){Ie.next=21;break}return Ie.next=18,mt(ht);case 18:St=Ie.sent,Ie.next=22;break;case 21:St=mt;case 22:if(tt=nt.props.data,typeof tt!="function"){Ie.next=29;break}return Ie.next=26,tt(ht);case 26:Ve=Ie.sent,Ie.next=30;break;case 29:Ve=tt;case 30:return we=((0,Me.Z)(Ft)==="object"||typeof Ft=="string")&&Ft?Ft:ht,we instanceof File?Le=we:Le=new File([we],ht.name,{type:ht.type}),Ze=Le,Ze.uid=ht.uid,Ie.abrupt("return",{origin:ht,data:Ve,parsedFile:Ze,action:St});case 35:case"end":return Ie.stop()}},ct,null,[[3,9]])}));return function(ct,ht){return dt.apply(this,arguments)}}()),(0,me.Z)((0,ze.Z)(nt),"saveFileInput",function(dt){nt.fileInput=dt}),nt}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(xt){var wt=this,Pt=xt.data,dt=xt.origin,ct=xt.action,ht=xt.parsedFile;if(this._isMounted){var Et=this.props,vt=Et.onStart,Ft=Et.customRequest,mt=Et.name,St=Et.headers,tt=Et.withCredentials,Ve=Et.method,we=dt.uid,Le=Ft||Pe,Ze={action:ct,filename:mt,data:Pt,file:ht,headers:St,withCredentials:tt,method:Ve||"post",onProgress:function(Ie){var _e=wt.props.onProgress;_e==null||_e(Ie,ht)},onSuccess:function(Ie,_e){var He=wt.props.onSuccess;He==null||He(Ie,ht,_e),delete wt.reqs[we]},onError:function(Ie,_e){var He=wt.props.onError;He==null||He(Ie,_e,ht),delete wt.reqs[we]}};vt(dt),this.reqs[we]=Le(Ze)}}},{key:"reset",value:function(){this.setState({uid:Ae()})}},{key:"abort",value:function(xt){var wt=this.reqs;if(xt){var Pt=xt.uid?xt.uid:xt;wt[Pt]&&wt[Pt].abort&&wt[Pt].abort(),delete wt[Pt]}else Object.keys(wt).forEach(function(dt){wt[dt]&&wt[dt].abort&&wt[dt].abort(),delete wt[dt]})}},{key:"render",value:function(){var xt=this.props,wt=xt.component,Pt=xt.prefixCls,dt=xt.className,ct=xt.classNames,ht=ct===void 0?{}:ct,Et=xt.disabled,vt=xt.id,Ft=xt.name,mt=xt.style,St=xt.styles,tt=St===void 0?{}:St,Ve=xt.multiple,we=xt.accept,Le=xt.capture,Ze=xt.children,rt=xt.directory,Ie=xt.openFileDialogOnClick,_e=xt.onMouseEnter,He=xt.onMouseLeave,Qe=xt.hasControlInside,ut=(0,Se.Z)(xt,Re),pt=ee()((0,me.Z)((0,me.Z)((0,me.Z)({},Pt,!0),"".concat(Pt,"-disabled"),Et),dt,dt)),Mt=rt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},At=Et?{}:{onClick:Ie?this.onClick:function(){},onKeyDown:Ie?this.onKeyDown:function(){},onMouseEnter:_e,onMouseLeave:He,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Qe?void 0:"0"};return ke.createElement(wt,(0,gt.Z)({},At,{className:pt,role:Qe?void 0:"button",style:mt}),ke.createElement("input",(0,gt.Z)({},(0,ae.Z)(ut,{aria:!0,data:!0}),{id:vt,name:Ft,disabled:Et,type:"file",ref:this.saveFileInput,onClick:function(Kt){return Kt.stopPropagation()},key:this.state.uid,style:(0,Ce.Z)({display:"none"},tt.input),className:ht.input,accept:we},Mt,{multiple:Ve,onChange:this.onChange},Le!=null?{capture:Le}:{})),Ze)}}]),$e}(ke.Component),Ye=We;function Ue(){}var Ke=function(ft){(0,De.Z)($e,ft);var bt=(0,fe.Z)($e);function $e(){var nt;(0,Bt.Z)(this,$e);for(var xt=arguments.length,wt=new Array(xt),Pt=0;Pt<xt;Pt++)wt[Pt]=arguments[Pt];return nt=bt.call.apply(bt,[this].concat(wt)),(0,me.Z)((0,ze.Z)(nt),"uploader",void 0),(0,me.Z)((0,ze.Z)(nt),"saveUploader",function(dt){nt.uploader=dt}),nt}return(0,oe.Z)($e,[{key:"abort",value:function(xt){this.uploader.abort(xt)}},{key:"render",value:function(){return ke.createElement(Ye,(0,gt.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 gt=at(4676);function Bt(oe,ze,De,fe){var me=gt.unstable_batchedUpdates?function(Ce){gt.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 gt=at(47273),Bt=function(fe){if((0,gt.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 gt=at(71409),Bt=at(28788),oe=at(89490),ze=at(87075),De=at(11036),fe=at(39224),me=at(92310),ke=at.n(me),Ce=at(29301),Se=at(70425),Me=at(34280),ve=at(59301),xe=at(4676),de=ve.forwardRef(function(Ve,we){var Le=Ve.height,Ze=Ve.offsetY,rt=Ve.offsetX,Ie=Ve.children,_e=Ve.prefixCls,He=Ve.onInnerResize,Qe=Ve.innerProps,ut=Ve.rtl,pt=Ve.extra,Mt={},At={display:"flex",flexDirection:"column"};return Ze!==void 0&&(Mt={height:Le,position:"relative",overflow:"hidden"},At=(0,oe.Z)((0,oe.Z)({},At),{},(0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)((0,ze.Z)({transform:"translateY(".concat(Ze,"px)")},ut?"marginRight":"marginLeft",-rt),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:Mt},ve.createElement(Ce.Z,{onResize:function(Kt){var Xt=Kt.offsetHeight;Xt&&He&&He()}},ve.createElement("div",(0,gt.Z)({style:At,className:ke()((0,ze.Z)({},"".concat(_e,"-holder-inner"),_e)),ref:we},Qe),Ie,pt)))});de.displayName="Filler";var z=de;function ee(Ve){var we=Ve.children,Le=Ve.setRef,Ze=ve.useCallback(function(rt){Le(rt)},[]);return ve.cloneElement(we,{ref:Ze})}function ae(Ve,we,Le,Ze,rt,Ie,_e,He){var Qe=He.getKey;return Ve.slice(we,Le+1).map(function(ut,pt){var Mt=we+pt,At=_e(ut,Mt,{style:{width:Ze},offsetX:rt}),Dt=Qe(ut);return ve.createElement(ee,{key:Dt,setRef:function(Xt){return Ie(ut,Xt)}},At)})}function ie(Ve,we,Le,Ze){var rt=Le-Ve,Ie=we-Le,_e=Math.min(rt,Ie)*2;if(Ze<=_e){var He=Math.floor(Ze/2);return Ze%2?Le+He+1:Le-He}return rt>Ie?Le-(Ze-Ie):Le+(Ze-rt)}function le(Ve,we,Le){var Ze=Ve.length,rt=we.length,Ie,_e;if(Ze===0&&rt===0)return null;Ze<rt?(Ie=Ve,_e=we):(Ie=we,_e=Ve);var He={__EMPTY_ITEM__:!0};function Qe(Kt){return Kt!==void 0?Le(Kt):He}for(var ut=null,pt=Math.abs(Ze-rt)!==1,Mt=0;Mt<_e.length;Mt+=1){var At=Qe(Ie[Mt]),Dt=Qe(_e[Mt]);if(At!==Dt){ut=Mt,pt=pt||At!==Qe(_e[Mt+1]);break}}return ut===null?null:{index:ut,multiple:pt}}function ue(Ve,we,Le){var Ze=ve.useState(Ve),rt=(0,De.Z)(Ze,2),Ie=rt[0],_e=rt[1],He=ve.useState(null),Qe=(0,De.Z)(He,2),ut=Qe[0],pt=Qe[1];return ve.useEffect(function(){var Mt=le(Ie||[],Ve||[],we);(Mt==null?void 0:Mt.index)!==void 0&&(Le==null||Le(Mt.index),pt(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,we,Le,Ze){var rt=(0,ve.useRef)(!1),Ie=(0,ve.useRef)(null);function _e(){clearTimeout(Ie.current),rt.current=!0,Ie.current=setTimeout(function(){rt.current=!1},50)}var He=(0,ve.useRef)({top:Ve,bottom:we,left:Le,right:Ze});return He.current.top=Ve,He.current.bottom=we,He.current.left=Le,He.current.right=Ze,function(Qe,ut){var pt=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 pt&&Mt?(clearTimeout(Ie.current),rt.current=!1):(!Mt||rt.current)&&_e(),!rt.current&&Mt}};function Fe(Ve,we,Le,Ze,rt,Ie,_e){var He=(0,ve.useRef)(0),Qe=(0,ve.useRef)(null),ut=(0,ve.useRef)(null),pt=(0,ve.useRef)(!1),Mt=Be(we,Le,Ze,rt);function At(sn,tn){if(ge.Z.cancel(Qe.current),!Mt(!1,tn)){var Wt=sn;if(!Wt._virtualHandled)Wt._virtualHandled=!0;else return;He.current+=tn,ut.current=tn,je||Wt.preventDefault(),Qe.current=(0,ge.Z)(function(){var Pn=pt.current?10:1;_e(He.current*Pn,!1),He.current=0})}}function Dt(sn,tn){_e(tn,!0),je||sn.preventDefault()}var Kt=(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(){Kt.current=null},2);var tn=sn.deltaX,Wt=sn.deltaY,Pn=sn.shiftKey,Sn=tn,Tn=Wt;(Kt.current==="sx"||!Kt.current&&Pn&&Wt&&!tn)&&(Sn=Wt,Tn=0,Kt.current="sx");var Kn=Math.abs(Sn),Mr=Math.abs(Tn);Kt.current===null&&(Kt.current=Ie&&Kn>Mr?"x":"y"),Kt.current==="y"?At(sn,Tn):Dt(sn,Sn)}}function Ut(sn){Ve&&(pt.current=sn.detail===ut.current)}return[$t,Ut]}function Ne(Ve,we,Le,Ze){var rt=ve.useMemo(function(){return[new Map,[]]},[Ve,Le.id,Ze]),Ie=(0,De.Z)(rt,2),_e=Ie[0],He=Ie[1],Qe=function(pt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt,At=_e.get(pt),Dt=_e.get(Mt);if(At===void 0||Dt===void 0)for(var Kt=Ve.length,Xt=He.length;Xt<Kt;Xt+=1){var $t,Ut=Ve[Xt],sn=we(Ut);_e.set(sn,Xt);var tn=($t=Le.get(sn))!==null&&$t!==void 0?$t:Ze;if(He[Xt]=(He[Xt-1]||0)+tn,sn===pt&&(At=Xt),sn===Mt&&(Dt=Xt),At!==void 0&&Dt!==void 0)break}return{top:He[At-1]||0,bottom:He[Dt]}};return Qe}var Ae=at(16552),Re=at(19210),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,Re.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 we=parseFloat(Ve);return isNaN(we)?0:we}function Ke(Ve,we,Le){var Ze=ve.useState(0),rt=(0,De.Z)(Ze,2),Ie=rt[0],_e=rt[1],He=(0,ve.useRef)(new Map),Qe=(0,ve.useRef)(new Ye),ut=(0,ve.useRef)(0);function pt(){ut.current+=1}function Mt(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;pt();var Kt=function(){var Ut=!1;He.current.forEach(function(sn,tn){if(sn&&sn.offsetParent){var Wt=sn.offsetHeight,Pn=getComputedStyle(sn),Sn=Pn.marginTop,Tn=Pn.marginBottom,Kn=Ue(Sn),Mr=Ue(Tn),fr=Wt+Kn+Mr;Qe.current.get(tn)!==fr&&(Qe.current.set(tn,fr),Ut=!0)}}),Ut&&_e(function(sn){return sn+1})};if(Dt)Kt();else{ut.current+=1;var Xt=ut.current;Promise.resolve().then(function(){Xt===ut.current&&Kt()})}}function At(Dt,Kt){var Xt=Ve(Dt),$t=He.current.get(Xt);Kt?(He.current.set(Xt,Kt),Mt()):He.current.delete(Xt),!$t!=!Kt&&(Kt?we==null||we(Dt):Le==null||Le(Dt))}return(0,ve.useEffect)(function(){return pt},[]),[At,Mt,Qe.current,Ie]}var ot=14/15;function st(Ve,we,Le){var Ze=(0,ve.useRef)(!1),rt=(0,ve.useRef)(0),Ie=(0,ve.useRef)(0),_e=(0,ve.useRef)(null),He=(0,ve.useRef)(null),Qe,ut=function(Dt){if(Ze.current){var Kt=Math.ceil(Dt.touches[0].pageX),Xt=Math.ceil(Dt.touches[0].pageY),$t=rt.current-Kt,Ut=Ie.current-Xt,sn=Math.abs($t)>Math.abs(Ut);sn?rt.current=Kt:Ie.current=Xt;var tn=Le(sn,sn?$t:Ut,!1,Dt);tn&&Dt.preventDefault(),clearInterval(He.current),tn&&(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))}},pt=function(){Ze.current=!1,Qe()},Mt=function(Dt){Qe(),Dt.touches.length===1&&!Ze.current&&(Ze.current=!0,rt.current=Math.ceil(Dt.touches[0].pageX),Ie.current=Math.ceil(Dt.touches[0].pageY),_e.current=Dt.target,_e.current.addEventListener("touchmove",ut,{passive:!1}),_e.current.addEventListener("touchend",pt,{passive:!0}))};Qe=function(){_e.current&&(_e.current.removeEventListener("touchmove",ut),_e.current.removeEventListener("touchend",pt))},(0,Me.Z)(function(){return Ve&&we.current.addEventListener("touchstart",Mt,{passive:!0}),function(){var At;(At=we.current)===null||At===void 0||At.removeEventListener("touchstart",Mt),Qe(),clearInterval(He.current)}},[Ve])}function ft(Ve){return Math.floor(Math.pow(Ve,.5))}function bt(Ve,we){var Le="touches"in Ve?Ve.touches[0]:Ve;return Le[we?"pageX":"pageY"]-window[we?"scrollX":"scrollY"]}function $e(Ve,we,Le){ve.useEffect(function(){var Ze=we.current;if(Ve&&Ze){var rt=!1,Ie,_e,He=function(){ge.Z.cancel(Ie)},Qe=function At(){He(),Ie=(0,ge.Z)(function(){Le(_e),At()})},ut=function(Dt){if(!(Dt.target.draggable||Dt.button!==0)){var Kt=Dt;Kt._virtualHandled||(Kt._virtualHandled=!0,rt=!0)}},pt=function(){rt=!1,He()},Mt=function(Dt){if(rt){var Kt=bt(Dt,!1),Xt=Ze.getBoundingClientRect(),$t=Xt.top,Ut=Xt.bottom;if(Kt<=$t){var sn=$t-Kt;_e=-ft(sn),Qe()}else if(Kt>=Ut){var tn=Kt-Ut;_e=ft(tn),Qe()}else He()}};return Ze.addEventListener("mousedown",ut),Ze.ownerDocument.addEventListener("mouseup",pt),Ze.ownerDocument.addEventListener("mousemove",Mt),function(){Ze.removeEventListener("mousedown",ut),Ze.ownerDocument.removeEventListener("mouseup",pt),Ze.ownerDocument.removeEventListener("mousemove",Mt),He()}}},[Ve])}var nt=10;function xt(Ve,we,Le,Ze,rt,Ie,_e,He){var Qe=ve.useRef(),ut=ve.useState(null),pt=(0,De.Z)(ut,2),Mt=pt[0],At=pt[1];return(0,Me.Z)(function(){if(Mt&&Mt.times<nt){if(!Ve.current){At(function(Xi){return(0,oe.Z)({},Xi)});return}Ie();var Dt=Mt.targetAlign,Kt=Mt.originAlign,Xt=Mt.index,$t=Mt.offset,Ut=Ve.current.clientHeight,sn=!1,tn=Dt,Wt=null;if(Ut){for(var Pn=Dt||Kt,Sn=0,Tn=0,Kn=0,Mr=Math.min(we.length-1,Xt),fr=0;fr<=Mr;fr+=1){var Er=rt(we[fr]);Tn=Sn;var Hr=Le.get(Er);Kn=Tn+(Hr===void 0?Ze:Hr),Sn=Kn}for(var Ur=Pn==="top"?$t:Ut-$t,ri=Mr;ri>=0;ri-=1){var Pi=rt(we[ri]),Ui=Le.get(Pi);if(Ui===void 0){sn=!0;break}if(Ur-=Ui,Ur<=0)break}switch(Pn){case"top":Wt=Tn-$t;break;case"bottom":Wt=Kn-Ut+$t;break;default:{var Fi=Ve.current.scrollTop,zi=Fi+Ut;Tn<Fi?tn="top":Kn>zi&&(tn="bottom")}}Wt!==null&&_e(Wt),Wt!==Mt.lastTop&&(sn=!0)}sn&&At((0,oe.Z)((0,oe.Z)({},Mt),{},{times:Mt.times+1,targetAlign:tn,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 Kt,Xt=Dt.align;"index"in Dt?Kt=Dt.index:Kt=we.findIndex(function(sn){return rt(sn)===Dt.key});var $t=Dt.offset,Ut=$t===void 0?0:$t;At({times:0,index:Kt,offset:Ut,originAlign:Xt})}}}var wt=ve.forwardRef(function(Ve,we){var Le=Ve.prefixCls,Ze=Ve.rtl,rt=Ve.scrollOffset,Ie=Ve.scrollRange,_e=Ve.onStartMove,He=Ve.onStopMove,Qe=Ve.onScroll,ut=Ve.horizontal,pt=Ve.spinSize,Mt=Ve.containerSize,At=Ve.style,Dt=Ve.thumbStyle,Kt=Ve.showScrollBar,Xt=ve.useState(!1),$t=(0,De.Z)(Xt,2),Ut=$t[0],sn=$t[1],tn=ve.useState(null),Wt=(0,De.Z)(tn,2),Pn=Wt[0],Sn=Wt[1],Tn=ve.useState(null),Kn=(0,De.Z)(Tn,2),Mr=Kn[0],fr=Kn[1],Er=!Ze,Hr=ve.useRef(),Ur=ve.useRef(),ri=ve.useState(Kt),Pi=(0,De.Z)(ri,2),Ui=Pi[0],Fi=Pi[1],zi=ve.useRef(),Xi=function(){Kt===!0||Kt===!1||(clearTimeout(zi.current),Fi(!0),zi.current=setTimeout(function(){Fi(!1)},3e3))},et=Ie-Mt||0,dr=Mt-pt||0,mr=ve.useMemo(function(){if(rt===0||et===0)return 0;var Yt=rt/et;return Yt*dr},[rt,et,dr]),Mi=function(nr){nr.stopPropagation(),nr.preventDefault()},ar=ve.useRef({top:mr,dragging:Ut,pageY:Pn,startTop:Mr});ar.current={top:mr,dragging:Ut,pageY:Pn,startTop:Mr};var Sr=function(nr){sn(!0),Sn(bt(nr,ut)),fr(ar.current.top),_e(),nr.stopPropagation(),nr.preventDefault()};ve.useEffect(function(){var Yt=function(Nn){Nn.preventDefault()},nr=Hr.current,gr=Ur.current;return nr.addEventListener("touchstart",Yt,{passive:!1}),gr.addEventListener("touchstart",Sr,{passive:!1}),function(){nr.removeEventListener("touchstart",Yt),gr.removeEventListener("touchstart",Sr)}},[]);var jr=ve.useRef();jr.current=et;var to=ve.useRef();to.current=dr,ve.useEffect(function(){if(Ut){var Yt,nr=function(Nn){var qn=ar.current,Ir=qn.dragging,gi=qn.pageY,bi=qn.startTop;ge.Z.cancel(Yt);var Nt=Hr.current.getBoundingClientRect(),Ht=Mt/(ut?Nt.width:Nt.height);if(Ir){var Mn=(bt(Nn,ut)-gi)*Ht,jn=bi;!Er&&ut?jn-=Mn:jn+=Mn;var en=jr.current,Fn=to.current,Dn=Fn?jn/Fn:0,Ln=Math.ceil(Dn*en);Ln=Math.max(Ln,0),Ln=Math.min(Ln,en),Yt=(0,ge.Z)(function(){Qe(Ln,ut)})}},gr=function(){sn(!1),He()};return window.addEventListener("mousemove",nr,{passive:!0}),window.addEventListener("touchmove",nr,{passive:!0}),window.addEventListener("mouseup",gr,{passive:!0}),window.addEventListener("touchend",gr,{passive:!0}),function(){window.removeEventListener("mousemove",nr),window.removeEventListener("touchmove",nr),window.removeEventListener("mouseup",gr),window.removeEventListener("touchend",gr),ge.Z.cancel(Yt)}}},[Ut]),ve.useEffect(function(){return Xi(),function(){clearTimeout(zi.current)}},[rt]),ve.useImperativeHandle(we,function(){return{delayHidden:Xi}});var Rr="".concat(Le,"-scrollbar"),on={position:"absolute",visibility:Ui?null:"hidden"},rn={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ut?(on.height=8,on.left=0,on.right=0,on.bottom=0,rn.height="100%",rn.width=pt,Er?rn.left=mr:rn.right=mr):(on.width=8,on.top=0,on.bottom=0,Er?on.right=0:on.left=0,rn.width="100%",rn.height=pt,rn.top=mr),ve.createElement("div",{ref:Hr,className:ke()(Rr,(0,ze.Z)((0,ze.Z)((0,ze.Z)({},"".concat(Rr,"-horizontal"),ut),"".concat(Rr,"-vertical"),!ut),"".concat(Rr,"-visible"),Ui)),style:(0,oe.Z)((0,oe.Z)({},on),At),onMouseDown:Mi,onMouseMove:Xi},ve.createElement("div",{ref:Ur,className:ke()("".concat(Rr,"-thumb"),(0,ze.Z)({},"".concat(Rr,"-thumb-moving"),Ut)),style:(0,oe.Z)((0,oe.Z)({},rn),Dt),onMouseDown:Sr}))}),Pt=wt,dt=20;function ct(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Le=Ve/we*Ve;return isNaN(Le)&&(Le=0),Le=Math.max(Le,dt),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=[],vt={overflowY:"auto",overflowAnchor:"none"};function Ft(Ve,we){var Le=Ve.prefixCls,Ze=Le===void 0?"rc-virtual-list":Le,rt=Ve.className,Ie=Ve.height,_e=Ve.itemHeight,He=Ve.fullHeight,Qe=He===void 0?!0:He,ut=Ve.style,pt=Ve.data,Mt=Ve.children,At=Ve.itemKey,Dt=Ve.virtual,Kt=Ve.direction,Xt=Ve.scrollWidth,$t=Ve.component,Ut=$t===void 0?"div":$t,sn=Ve.onScroll,tn=Ve.onVirtualScroll,Wt=Ve.onVisibleChange,Pn=Ve.innerProps,Sn=Ve.extraRender,Tn=Ve.styles,Kn=Ve.showScrollBar,Mr=Kn===void 0?"optional":Kn,fr=(0,fe.Z)(Ve,ht),Er=ve.useCallback(function(hn){return typeof At=="function"?At(hn):hn==null?void 0:hn[At]},[At]),Hr=Ke(Er,null,null),Ur=(0,De.Z)(Hr,4),ri=Ur[0],Pi=Ur[1],Ui=Ur[2],Fi=Ur[3],zi=!!(Dt!==!1&&Ie&&_e),Xi=ve.useMemo(function(){return Object.values(Ui.maps).reduce(function(hn,An){return hn+An},0)},[Ui.id,Ui.maps]),et=zi&&pt&&(Math.max(_e*pt.length,Xi)>Ie||!!Xt),dr=Kt==="rtl",mr=ke()(Ze,(0,ze.Z)({},"".concat(Ze,"-rtl"),dr),rt),Mi=pt||Et,ar=(0,ve.useRef)(),Sr=(0,ve.useRef)(),jr=(0,ve.useRef)(),to=(0,ve.useState)(0),Rr=(0,De.Z)(to,2),on=Rr[0],rn=Rr[1],Yt=(0,ve.useState)(0),nr=(0,De.Z)(Yt,2),gr=nr[0],Cr=nr[1],Nn=(0,ve.useState)(!1),qn=(0,De.Z)(Nn,2),Ir=qn[0],gi=qn[1],bi=function(){gi(!0)},Nt=function(){gi(!1)},Ht={getKey:Er};function Mn(hn){rn(function(An){var _n;typeof hn=="function"?_n=hn(An):_n=hn;var kn=Fr(_n);return ar.current.scrollTop=kn,kn})}var jn=(0,ve.useRef)({start:0,end:Mi.length}),en=(0,ve.useRef)(),Fn=ue(Mi,Er),Dn=(0,De.Z)(Fn,1),Ln=Dn[0];en.current=Ln;var er=ve.useMemo(function(){if(!zi)return{scrollHeight:void 0,start:0,end:Mi.length-1,offset:void 0};if(!et){var hn;return{scrollHeight:((hn=Sr.current)===null||hn===void 0?void 0:hn.offsetHeight)||0,start:0,end:Mi.length-1,offset:void 0}}for(var An=0,_n,kn,Bn,sr=Mi.length,Yn=0;Yn<sr;Yn+=1){var On=Mi[Yn],ln=Er(On),lr=Ui.get(ln),wr=An+(lr===void 0?_e:lr);wr>=on&&_n===void 0&&(_n=Yn,kn=An),wr>on+Ie&&Bn===void 0&&(Bn=Yn),An=wr}return _n===void 0&&(_n=0,kn=0,Bn=Math.ceil(Ie/_e)),Bn===void 0&&(Bn=Mi.length-1),Bn=Math.min(Bn+1,Mi.length-1),{scrollHeight:An,start:_n,end:Bn,offset:kn}},[et,zi,on,Mi,Fi,Ie]),zn=er.scrollHeight,Zn=er.start,rr=er.end,Kr=er.offset;jn.current.start=Zn,jn.current.end=rr,ve.useLayoutEffect(function(){var hn=Ui.getRecord();if(hn.size===1){var An=Array.from(hn.keys())[0],_n=hn.get(An),kn=Mi[Zn];if(kn&&_n===void 0){var Bn=Er(kn);if(Bn===An){var sr=Ui.get(An),Yn=sr-_e;Mn(function(On){return On+Yn})}}}Ui.resetRecord()},[zn]);var cr=ve.useState({width:0,height:Ie}),pr=(0,De.Z)(cr,2),an=pr[0],Vr=pr[1],ei=function(An){Vr({width:An.offsetWidth,height:An.offsetHeight})},Di=(0,ve.useRef)(),dn=(0,ve.useRef)(),Hn=ve.useMemo(function(){return ct(an.width,Xt)},[an.width,Xt]),ur=ve.useMemo(function(){return ct(an.height,zn)},[an.height,zn]),Jn=zn-Ie,yr=(0,ve.useRef)(Jn);yr.current=Jn;function Fr(hn){var An=hn;return Number.isNaN(yr.current)||(An=Math.min(An,yr.current)),An=Math.max(An,0),An}var Wr=on<=0,$r=on>=Jn,ii=gr<=0,hi=gr>=Xt,mn=Be(Wr,$r,ii,hi),Li=function(){return{x:dr?-gr:gr,y:on}},vn=(0,ve.useRef)(Li()),xr=(0,Se.zX)(function(hn){if(tn){var An=(0,oe.Z)((0,oe.Z)({},Li()),hn);(vn.current.x!==An.x||vn.current.y!==An.y)&&(tn(An),vn.current=An)}});function ui(hn,An){var _n=hn;An?((0,xe.flushSync)(function(){Cr(_n)}),xr()):Mn(_n)}function si(hn){var An=hn.currentTarget.scrollTop;An!==on&&Mn(An),sn==null||sn(hn),xr()}var Ii=function(An){var _n=An,kn=Xt?Xt-an.width:0;return _n=Math.max(_n,0),_n=Math.min(_n,kn),_n},pi=(0,Se.zX)(function(hn,An){An?((0,xe.flushSync)(function(){Cr(function(_n){var kn=_n+(dr?-hn:hn);return Ii(kn)})}),xr()):Mn(function(_n){var kn=_n+hn;return kn})}),Zr=Fe(zi,Wr,$r,ii,hi,!!Xt,pi),Gi=(0,De.Z)(Zr,2),qt=Gi[0],wn=Gi[1];st(zi,ar,function(hn,An,_n,kn){var Bn=kn;return mn(hn,An,_n)?!1:!Bn||!Bn._virtualHandled?(Bn&&(Bn._virtualHandled=!0),qt({preventDefault:function(){},deltaX:hn?An:0,deltaY:hn?0:An}),!0):!1}),$e(et,ar,function(hn){Mn(function(An){return An+hn})}),(0,Me.Z)(function(){function hn(_n){var kn=Wr&&_n.detail<0,Bn=$r&&_n.detail>0;zi&&!kn&&!Bn&&_n.preventDefault()}var An=ar.current;return An.addEventListener("wheel",qt,{passive:!1}),An.addEventListener("DOMMouseScroll",wn,{passive:!0}),An.addEventListener("MozMousePixelScroll",hn,{passive:!1}),function(){An.removeEventListener("wheel",qt),An.removeEventListener("DOMMouseScroll",wn),An.removeEventListener("MozMousePixelScroll",hn)}},[zi,Wr,$r]),(0,Me.Z)(function(){if(Xt){var hn=Ii(gr);Cr(hn),xr({x:hn})}},[an.width,Xt]);var Jt=function(){var An,_n;(An=Di.current)===null||An===void 0||An.delayHidden(),(_n=dn.current)===null||_n===void 0||_n.delayHidden()},lt=xt(ar,Mi,Ui,_e,Er,function(){return Pi(!0)},Mn,Jt);ve.useImperativeHandle(we,function(){return{nativeElement:jr.current,getScrollInfo:Li,scrollTo:function(An){function _n(kn){return kn&&(0,Bt.Z)(kn)==="object"&&("left"in kn||"top"in kn)}_n(An)?(An.left!==void 0&&Cr(Ii(An.left)),lt(An.top)):lt(An)}}}),(0,Me.Z)(function(){if(Wt){var hn=Mi.slice(Zn,rr+1);Wt(hn,Mi)}},[Zn,rr,Mi]);var In=Ne(Mi,Er,Ui,_e),pn=Sn==null?void 0:Sn({start:Zn,end:rr,virtual:et,offsetX:gr,offsetY:Kr,rtl:dr,getSize:In}),Un=ae(Mi,Zn,rr,Xt,gr,ri,Mt,Ht),Xn=null;Ie&&(Xn=(0,oe.Z)((0,ze.Z)({},Qe?"height":"maxHeight",Ie),vt),zi&&(Xn.overflowY="hidden",Xt&&(Xn.overflowX="hidden"),Ir&&(Xn.pointerEvents="none")));var Wn={};return dr&&(Wn.dir="rtl"),ve.createElement("div",(0,gt.Z)({ref:jr,style:(0,oe.Z)((0,oe.Z)({},ut),{},{position:"relative"}),className:mr},Wn,fr),ve.createElement(Ce.Z,{onResize:ei},ve.createElement(Ut,{className:"".concat(Ze,"-holder"),style:Xn,ref:ar,onScroll:si,onMouseEnter:Jt},ve.createElement(z,{prefixCls:Ze,height:zn,offsetX:gr,offsetY:Kr,scrollWidth:Xt,onInnerResize:Pi,ref:Sr,innerProps:Pn,rtl:dr,extra:pn},Un))),et&&zn>Ie&&ve.createElement(Pt,{ref:Di,prefixCls:Ze,scrollOffset:on,scrollRange:zn,rtl:dr,onScroll:ui,onStartMove:bi,onStopMove:Nt,spinSize:ur,containerSize:an.height,style:Tn==null?void 0:Tn.verticalScrollBar,thumbStyle:Tn==null?void 0:Tn.verticalScrollBarThumb,showScrollBar:Mr}),et&&Xt>an.width&&ve.createElement(Pt,{ref:dn,prefixCls:Ze,scrollOffset:gr,scrollRange:Xt,rtl:dr,onScroll:ui,onStartMove:bi,onStopMove:Nt,spinSize:Hn,containerSize:an.width,horizontal:!0,style:Tn==null?void 0:Tn.horizontalScrollBar,thumbStyle:Tn==null?void 0:Tn.horizontalScrollBarThumb,showScrollBar:Mr}))}var mt=ve.forwardRef(Ft);mt.displayName="List";var St=mt,tt=St},7062:function(gn,cn,at){var gt=at(19637),Bt=at(97573),oe=[at(96627)];gn.exports=gt.createStore(Bt,oe)},96627:function(gn,cn,at){gn.exports=gt;function gt(){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,gt,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"&&(gt=rep[at],Bt=str(gt,fe),Bt&&De.push(quote(gt)+(gap?": ":":")+Bt));else for(gt in fe)Object.prototype.hasOwnProperty.call(fe,gt)&&(Bt=str(gt,fe),Bt&&De.push(quote(gt)+(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 gt;if(gap="",indent="",typeof at=="number")for(gt=0;gt<at;gt+=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,gt,Bt=gn[cn];if(Bt&&typeof Bt=="object")for(at in Bt)Object.prototype.hasOwnProperty.call(Bt,at)&&(gt=walk(Bt,at),gt!==void 0?Bt[at]=gt: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 gt=at(67039),Bt=gt.slice,oe=gt.pluck,ze=gt.each,De=gt.bind,fe=gt.create,me=gt.isList,ke=gt.isFunction,Ce=gt.isObject;gn.exports={createStore:ve};var Se={version:"2.0.12",enabled:!1,get:function(xe,de){var z=this.storage.read(this._namespacePrefix+xe);return this._deserialize(z,de)},set:function(xe,de){return de===void 0?this.remove(xe):(this.storage.write(this._namespacePrefix+xe,this._serialize(de)),de)},remove:function(xe){this.storage.remove(this._namespacePrefix+xe)},each:function(xe){var de=this;this.storage.each(function(z,ee){xe.call(de,de._deserialize(z),(ee||"").replace(de._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(xe){return this._namespacePrefix=="__storejs_"+xe+"_"},createStore:function(){return ve.apply(this,arguments)},addPlugin:function(xe){this._addPlugin(xe)},namespace:function(xe){return ve(this.storage,this.plugins,xe)}};function Me(){var xe=typeof console=="undefined"?null:console;if(xe){var de=xe.warn?xe.warn:xe.log;de.apply(xe,arguments)}}function ve(xe,de,z){z||(z=""),xe&&!me(xe)&&(xe=[xe]),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 Re=[Ae].concat(Fe);return ge.apply(Ne,Re)}},_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(xe,function(ge){ue._addStorage(ge)}),ze(de,function(ge){ue._addPlugin(ge)}),ue}},67039:function(gn,cn,at){var gt=De(),Bt=fe(),oe=me(),ze=typeof window!="undefined"?window:at.g;gn.exports={assign:gt,create:Bt,trim:oe,bind:ke,slice:Ce,each:Se,map:Me,pluck:ve,isList:xe,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 gt.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,gt.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=xe(ee)?[]:{};return ve(ee,function(le,ue){return ie[ue]=ae(le,ue),!1}),ie}function ve(ee,ae){if(xe(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 xe(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 gt=at(67039),Bt=gt.Global,oe=gt.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),xe=ve.length-1;xe>=0;xe--)if(oe(ve[xe])){var de=ve[xe].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 gt=at(67039),Bt=gt.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:gt,each:Bt,remove:oe,clearAll:ze};var cn={};function at(De){return cn[De]}function gt(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 gt=at(67039),Bt=gt.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 gt=at(67039),Bt=gt.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=xe(z);De(function(ie){ie.setAttribute(ae,ee),ie.save(oe)})}}function ke(z){if(!fe){var ee=xe(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=xe(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 xe(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 gt=at(67039),Bt=gt.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 gt=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 xe=(de=>{if(!de.ownerDocument||!de.ownerDocument.defaultView)return null;try{return de.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!xe&&(xe.clientHeight<ve.scrollHeight||xe.clientWidth<ve.scrollWidth)})(Ce)}return!1},ze=(Ce,Se,Me,ve,xe,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+xe:0,De=Ce=>{const Se=Ce.parentElement;return Se==null?Ce.getRootNode().host||null:Se},fe=(Ce,Se)=>{var Me,ve,xe,de;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:ae,boundary:ie,skipOverflowHiddenElements:le}=Se,ue=typeof ie=="function"?ie:Pt=>Pt!==ie;if(!gt(Ce))throw new TypeError("Invalid target");const ge=document.scrollingElement||document.documentElement,Pe=[];let je=Ce;for(;gt(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=(xe=window.visualViewport)==null?void 0:xe.height)!=null?de:innerHeight,{scrollX:Ne,scrollY:Ae}=window,{height:Re,width:We,top:Ye,right:Ue,bottom:Ke,left:ot}=Ce.getBoundingClientRect(),{top:st,right:ft,bottom:bt,left:$e}=(Pt=>{const dt=window.getComputedStyle(Pt);return{top:parseFloat(dt.scrollMarginTop)||0,right:parseFloat(dt.scrollMarginRight)||0,bottom:parseFloat(dt.scrollMarginBottom)||0,left:parseFloat(dt.scrollMarginLeft)||0}})(Ce);let nt=ee==="start"||ee==="nearest"?Ye-st:ee==="end"?Ke+bt:Ye+Re/2-st+bt,xt=ae==="center"?ot+We/2-$e+ft:ae==="end"?Ue+ft:ot-$e;const wt=[];for(let Pt=0;Pt<Pe.length;Pt++){const dt=Pe[Pt],{height:ct,width:ht,top:Et,right:vt,bottom:Ft,left:mt}=dt.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&ot>=0&&Ke<=Fe&&Ue<=Be&&(dt===ge&&!oe(dt)||Ye>=Et&&Ke<=Ft&&ot>=mt&&Ue<=vt))return wt;const St=getComputedStyle(dt),tt=parseInt(St.borderLeftWidth,10),Ve=parseInt(St.borderTopWidth,10),we=parseInt(St.borderRightWidth,10),Le=parseInt(St.borderBottomWidth,10);let Ze=0,rt=0;const Ie="offsetWidth"in dt?dt.offsetWidth-dt.clientWidth-tt-we:0,_e="offsetHeight"in dt?dt.offsetHeight-dt.clientHeight-Ve-Le:0,He="offsetWidth"in dt?dt.offsetWidth===0?0:ht/dt.offsetWidth:0,Qe="offsetHeight"in dt?dt.offsetHeight===0?0:ct/dt.offsetHeight:0;if(ge===dt)Ze=ee==="start"?nt:ee==="end"?nt-Fe:ee==="nearest"?ze(Ae,Ae+Fe,Fe,Ve,Le,Ae+nt,Ae+nt+Re,Re):nt-Fe/2,rt=ae==="start"?xt:ae==="center"?xt-Be/2:ae==="end"?xt-Be:ze(Ne,Ne+Be,Be,tt,we,Ne+xt,Ne+xt+We,We),Ze=Math.max(0,Ze+Ae),rt=Math.max(0,rt+Ne);else{Ze=ee==="start"?nt-Et-Ve:ee==="end"?nt-Ft+Le+_e:ee==="nearest"?ze(Et,Ft,ct,Ve,Le+_e,nt,nt+Re,Re):nt-(Et+ct/2)+_e/2,rt=ae==="start"?xt-mt-tt:ae==="center"?xt-(mt+ht/2)+Ie/2:ae==="end"?xt-vt+we+Ie:ze(mt,vt,ht,tt,we+Ie,xt,xt+We,We);const{scrollLeft:ut,scrollTop:pt}=dt;Ze=Qe===0?0:Math.max(0,Math.min(pt+Ze/Qe,dt.scrollHeight-ct/Qe+_e)),rt=He===0?0:Math.max(0,Math.min(ut+rt/He,dt.scrollWidth-ht/He+Ie)),nt+=pt-Ze,xt+=ut-rt}wt.push({el:dt,top:Ze,left:rt})}return wt},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||!(xe=>{let de=xe;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=(xe=>{const de=window.getComputedStyle(xe);return{top:parseFloat(de.scrollMarginTop)||0,right:parseFloat(de.scrollMarginRight)||0,bottom:parseFloat(de.scrollMarginBottom)||0,left:parseFloat(de.scrollMarginLeft)||0}})(Ce);if((xe=>typeof xe=="object"&&typeof xe.behavior=="function")(Se))return Se.behavior(fe(Ce,Se));const ve=typeof Se=="boolean"||Se==null?void 0:Se.behavior;for(const{el:xe,top:de,left:z}of fe(Ce,me(Se))){const ee=de-Me.top+Me.bottom,ae=z-Me.left+Me.right;xe.scroll({top:ee,left:ae,behavior:ve})}}}}]);