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.
1296 lines
2.6 MiB
1296 lines
2.6 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[6913],{97309:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return pe}});var st=ot(87462),Ft=ot(67294),ae={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"},Ge=ae,Re=ot(17207),fe=function(Ee,we){return Ft.createElement(Re.Z,(0,st.Z)({},Ee,{ref:we,icon:Ge}))},pe=Ft.forwardRef(fe)},32693:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return pe}});var st=ot(87462),Ft=ot(67294),ae={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"},Ge=ae,Re=ot(17207),fe=function(Ee,we){return Ft.createElement(Re.Z,(0,st.Z)({},Ee,{ref:we,icon:Ge}))},pe=Ft.forwardRef(fe)},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(Sn,vn){"use strict";vn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},12867:function(){"use strict"},18023:function(){"use strict";function Sn(de,ee,z,oe){z===void 0&&(z=0),oe===void 0&&(oe=1/0),this._name=de,this._defaultValue=ee,this._minimum=z,this._maximum=oe}Object.defineProperty(Sn.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(Sn.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(Sn.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(Sn.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,ee){var z=go.Shape._FigureParameters[de];return z?z[ee]:null},go.Shape.setFigureParameter=function(de,ee,z){if(!(z instanceof Sn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+z);if(z.defaultValue<z.minimum||z.defaultValue>z.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+z.defaultValue);var oe=go.Shape._FigureParameters[de];oe||(oe=[],go.Shape._FigureParameters[de]=oe),oe[ee]=z};var vn=[];function ot(de,ee){var z=vn.pop();return z===void 0?new go.Point(de,ee):(z.x=de,z.y=ee,z)}function st(){var de=vn.pop();return de===void 0?new go.Point:de}function Ft(de){vn.push(de)}function ae(de,ee,z,oe,ie,le,ue,me,xe){xe||(xe=new go.Point);var Ae=de-z,De=ie-ue,Fe=NaN,je=NaN;if(Ae===0)if(De===0)de===z&&(Fe=de,je=ee);else{var Le=(le-me)/De,Be=le-Le*ie;Fe=de,je=Le*Fe+Be}else if(De===0){var Ue=(ee-oe)/Ae,Je=ee-Ue*de;Fe=ie,je=Ue*Fe+Je}else{var Ue=(ee-oe)/Ae,Le=(le-me)/De,Je=ee-Ue*de,Be=le-Le*ie;Fe=(Be-Je)/(Ue-Le),je=Ue*Fe+Je}return xe.x=Fe,xe.y=je,xe}function Ge(de,ee,z,oe,ie,le,ue,me,xe,Ae,De,Fe,je,Le){var Be=1-xe,Ue=xe,Je=de*Be+z*Ue,He=ee*Be+oe*Ue,We=z*Be+ie*Ue,at=oe*Be+le*Ue,ft=ie*Be+ue*Ue,mt=le*Be+me*Ue,Lt=Je*Be+We*Ue,Xe=He*Be+at*Ue,et=We*Be+ft*Ue,lt=at*Be+mt*Ue,vt=Lt*Be+et*Ue,wt=Xe*Be+lt*Ue;Ae.x=Je,Ae.y=He,De.x=Lt,De.y=Xe,Fe.x=vt,Fe.y=wt,je.x=et,je.y=lt,Le.x=ft,Le.y=mt}var Re=new go.Spot(.156,.156),fe=new go.Spot(.844,.844),pe=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Sn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(de,ee,z){var oe=de?de.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=5),oe=Math.min(oe,ee/3),oe=Math.min(oe,z/3);var ie=oe*pe,le=new go.Geometry().add(new go.PathFigure(oe,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)).add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,ee-ie,0,ee,ie)).add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)).add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,z-ie,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,oe,z)).add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,ie,z,0,z-ie)).add(new go.PathSegment(go.PathSegment.Line,0,oe)).add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()));return ie>1&&(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,1,-ie,-ie)),le}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(ee,z).add(new go.PathSegment(go.PathSegment.Line,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(ee,z).add(new go.PathSegment(go.PathSegment.Line,0,z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(.5*ee,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(de,ee,z){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=z/2,oe.endX=ee,oe.endY=z/2,oe}),go.Shape.defineFigureGenerator("LineV",function(de,ee,z){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=ee/2,oe.startY=0,oe.endX=ee/2,oe.endY=z,oe}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,z/2,!1).add(new go.PathSegment(go.PathSegment.Line,ee,z/2)).add(new go.PathSegment(go.PathSegment.Move,ee/2,0)).add(new go.PathSegment(go.PathSegment.Line,ee/2,z)))}),go.Shape.defineFigureGenerator("XLine",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,z,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)))}),go.Shape.defineFigureGenerator("LineRight",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(.25*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.25*ee,z)))}),go.Shape.defineFigureGenerator("LineDown",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,.25*z,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,.75*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)))}),go.Shape.defineFigureGenerator("LineLeft",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(.75*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.75*ee,z)))}),go.Shape.defineFigureGenerator("LineUp",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,.75*z,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,.25*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(de,ee,z){var oe=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(oe*ee,(1-oe)*z,!1).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Move,oe*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,(1-oe)*z)).add(new go.PathSegment(go.PathSegment.Move,0,z/2)).add(new go.PathSegment(go.PathSegment.Line,ee,z/2)).add(new go.PathSegment(go.PathSegment.Move,ee/2,0)).add(new go.PathSegment(go.PathSegment.Line,ee/2,z)))}),go.Shape.defineFigureGenerator("CircleLine",function(de,ee,z){var oe=ee/2,ie=new go.Geometry().add(new go.PathFigure(ee,ee/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,oe,oe,oe,oe).close()));return ie.spot1=Re,ie.spot2=fe,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(de,ee,z){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=0,oe.startY=0,oe.endX=ee,oe.endY=z,oe}),go.Shape.defineFigureGenerator("Line2",function(de,ee,z){var oe=new go.Geometry(go.Geometry.Line);return oe.startX=ee,oe.startY=0,oe.endX=0,oe.endY=z,oe}),go.Shape.defineFigureGenerator("Curve1",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ee,z,pe*ee,0,ee,(1-pe)*z)))}),go.Shape.defineFigureGenerator("Curve2",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ee,z,0,pe*z,(1-pe)*ee,z)))}),go.Shape.defineFigureGenerator("Curve3",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(ee,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,z,ee,pe*z,pe*ee,z)))}),go.Shape.defineFigureGenerator("Curve4",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(ee,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,z,(1-pe)*ee,0,0,(1-pe)*z)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(ee,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Sn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)?oe=.1:oe<-1?oe=-1:oe>1&&(oe=1);var ie=Math.abs(oe)*ee;if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=ee,le.endY=z,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())),ie<ee/2&&le.setSpots(ie/ee,0,(ee-ie)/ee,1),le}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Sn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)?oe=10:oe<-ee?oe=-ee:oe>ee&&(oe=ee);var ie=Math.abs(oe);if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=ee,le.endY=z,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())),ie<ee/2&&le.setSpots(ie/ee,0,(ee-ie)/ee,1),le}}),go.Shape.setFigureParameter("Trapezoid1",0,new Sn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)?oe=.2:oe<.5?oe=-.5:oe>.5&&(oe=.5);var ie=Math.abs(oe)*ee;if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=ee,le.endY=z,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())),ie<ee/2&&le.setSpots(ie/ee,0,(ee-ie)/ee,1),le}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Sn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)?oe=20:oe<-ee?oe=-ee/2:oe>ee&&(oe=ee/2);var ie=Math.abs(oe);if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=ee,le.endY=z,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())),ie<ee/2&&le.setSpots(ie/ee,0,(ee-ie)/ee,1),le}}),go.Shape.setFigureParameter("ManualOperation",0,new Sn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)?oe=10:oe<-ee?oe=-ee/2:oe>ee&&(oe=ee/2);var ie=Math.abs(oe);if(oe===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=ee,le.endY=z,le}else{var le=new go.Geometry;return oe>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee-ie,z)).add(new go.PathSegment(go.PathSegment.Line,ie,z).close())):le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,ee-ie,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close())),ie<ee/2&&le.setSpots(ie/ee,0,(ee-ie)/ee,1),le}});var be=[];function Ee(){var de=be.pop();return de===void 0?[]:de}function we(de){de.length=0,be.push(de)}function Te(de){for(var ee=Ee(),z=.5,oe=.5,ie=Math.PI*1.5,le=0,ue=0;ue<de;ue++)le=2*Math.PI/de*ue+ie,ee[ue]=new go.Point(oe+z*Math.cos(le),oe+z*Math.sin(le));return ee.push(ee[0]),ee}function ve(de){var ee=Pe(de),z=Ee();z[0]=ee[0];for(var oe=1,ie=1;oe<ee.length;oe+=2,ie+=3)z[ie]=ee[oe],z[ie+1]=ee[oe],z[ie+2]=ee[oe+1];return we(ee),z}function Pe(de){for(var ee=Te(de),z=Ee(),oe=Math.floor(ee.length/2),ie=ee.length-1,le=de%2===0?2:1,ue=0;ue<ie;ue++){var me=ee[ue],xe=ee[ue+1],Ae=ee[(oe+ue-1)%ie],De=ee[(oe+ue+le)%ie];z[ue*2]=me,z[ue*2+1]=ae(me.x,me.y,Ae.x,Ae.y,xe.x,xe.y,De.x,De.y,new go.Point)}return z[z.length]=z[0],we(ee),z}go.Shape.defineFigureGenerator("Pentagon",function(de,ee,z){var oe=Te(5),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<5;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(de,ee,z){var oe=Te(6),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<6;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(de,ee,z){var oe=Te(7),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<7;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(de,ee,z){var oe=Te(8),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<8;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(de,ee,z){var oe=Te(9),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<9;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(de,ee,z){var oe=Te(10),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(de,ee,z){var oe=Te(12),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(de,ee,z){var oe=Pe(5),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(de,ee,z){var oe=Pe(6),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(de,ee,z){var oe=Pe(7),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<14;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(de,ee,z){var oe=Pe(8),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<16;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(de,ee,z){var oe=Pe(9),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<18;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(de,ee,z){var oe=Pe(10),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<20;ue++)le.add(new go.PathSegment(go.PathSegment.Line,oe[ue].x*ee,oe[ue].y*z));return le.add(new go.PathSegment(go.PathSegment.Line,oe[0].x*ee,oe[0].y*z).close()),we(oe),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(de,ee,z){var oe=ve(5),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*ee,oe[ue+2].y*z,oe[ue].x*ee,oe[ue].y*z,oe[ue+1].x*ee,oe[ue+1].y*z));return le.segments.last().close(),we(oe),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(de,ee,z){var oe=ve(6),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*ee,oe[ue+2].y*z,oe[ue].x*ee,oe[ue].y*z,oe[ue+1].x*ee,oe[ue+1].y*z));return le.segments.last().close(),we(oe),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(de,ee,z){var oe=ve(7),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*ee,oe[ue+2].y*z,oe[ue].x*ee,oe[ue].y*z,oe[ue+1].x*ee,oe[ue+1].y*z));return le.segments.last().close(),we(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(de,ee,z){var oe=ve(8),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*ee,oe[ue+2].y*z,oe[ue].x*ee,oe[ue].y*z,oe[ue+1].x*ee,oe[ue+1].y*z));return le.segments.last().close(),we(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(de,ee,z){var oe=ve(9),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*ee,oe[ue+2].y*z,oe[ue].x*ee,oe[ue].y*z,oe[ue+1].x*ee,oe[ue+1].y*z));return le.segments.last().close(),we(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(de,ee,z){var oe=ve(10),ie=new go.Geometry,le=new go.PathFigure(oe[0].x*ee,oe[0].y*z,!0);ie.add(le);for(var ue=1;ue<oe.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,oe[ue+2].x*ee,oe[ue+2].y*z,oe[ue].x*ee,oe[ue].y*z,oe[ue+1].x*ee,oe[ue+1].y*z));return le.segments.last().close(),we(oe),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new Sn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Sn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(de,ee,z){var oe=de?de.parameter1:NaN,ie=de?de.parameter2:NaN;isNaN(oe)&&(oe=8),isNaN(ie)&&(ie=8);var le=new go.Geometry,ue=new go.PathFigure(0,0,!0);return le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe<ee/2&&ie<z/2&&(ue.add(new go.PathSegment(go.PathSegment.Move,oe,ie)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,z-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,ee-oe,z-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,ee-oe,ie).close())),le.setSpots(0,0,1,1,oe,ie,-oe,-ie),le}),go.Shape.setFigureParameter("Ring",0,new Sn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(de,ee,z){var oe=de?de.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=8);var ie=ee/2,le=new go.Geometry,ue=new go.PathFigure(ee,ee/2,!0);le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var me=Math.max(ie-oe,0);return me>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,ee/2+me,ee/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,me,me).close())),le.spot1=Re,le.spot2=fe,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(.08034461*ee,.1944299*z,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*ee,.05349299*z,-.09239631*ee,.07836421*z,.1406031*ee,-.0542823*z)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*ee,.074219*z,.2450511*ee,-.00697547*z,.3776197*ee,-.01112067*z)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*ee,.07004196*z,.4539471*ee,0,.6066018*ee,-.02526587*z)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*ee,.08370865*z,.6914277*ee,-.01904177*z,.8921095*ee,-.01220843*z)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*ee,.3194596*z,1.036446*ee,.04105738*z,1.020377*ee,.3022052*z)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*ee,.562044*z,1.04448*ee,.360238*z,.992256*ee,.5219009*z)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*ee,.8217117*z,1.032337*ee,.5771781*z,1.018411*ee,.8120651*z)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*ee,.9156953*z,1.028411*ee,.9571472*z,.8556702*ee,1.052487*z)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*ee,.9310455*z,.7431877*ee,1.009325*z,.5624123*ee,1.021761*z)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*ee,.9344623*z,.4820677*ee,1.031761*z,.3030112*ee,1.002796*z)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ee,.870098*z,.2329994*ee,1.01518*z,.03213784*ee,1.01518*z)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*ee,.6545475*z,-.02812061*ee,.9032597*z,-.01205169*ee,.6835638*z)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*ee,.4265613*z,-.01812061*ee,.6089503*z,-.00606892*ee,.4555777*z)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ee,.1944299*z,-.01606892*ee,.3892545*z,-.01205169*ee,.1944299*z))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(de,ee,z){var oe=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(oe*ee,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,oe*z)).add(new go.PathSegment(go.PathSegment.Line,ee,(1-oe)*z)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,z)).add(new go.PathSegment(go.PathSegment.Line,oe*ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*z)).add(new go.PathSegment(go.PathSegment.Line,0,oe*z).close())).setSpots(oe/2,oe/2,1-oe/2,1-oe/2)}),go.Shape.setFigureParameter("Pie",0,new Sn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Sn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(de,ee,z){var oe=de?de.parameter1:NaN,ie=de?de.parameter2:NaN;isNaN(oe)&&(oe=0),isNaN(ie)&&(ie=315);var le=oe%360;le<0&&(le+=360);var ue=ie%360,me=Math.min(ee,z)/2;return new go.Geometry().add(new go.PathFigure(me,me).add(new go.PathSegment(go.PathSegment.Arc,le,ue,me,me,me,me).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(de,ee,z){var oe=pe/Math.SQRT2*.5,ie=Math.SQRT2/2,le=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ee,z,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*ee,le*z,ee,(1-oe)*z,(ie+oe)*ee,(le+oe)*z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(de,ee,z){var oe=de?de.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30);var ie=Math.min(oe,ee)/2,le=ee/2,ue=z/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,ee,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,ee,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,z)).add(new go.PathSegment(go.PathSegment.Line,le-ie,z)).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 Sn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(de,ee,z){var oe=de?de.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=Math.min(oe,ee)/2,le=ee/2,ue=z/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,ee,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,ee,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,z)).add(new go.PathSegment(go.PathSegment.Line,le-ie,z)).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 Sn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(de,ee,z){var oe=de?de.parameter1:NaN;if((isNaN(oe)||oe<0)&&(oe=30),ee===0||z===0){var ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=ee,ie.endY=z,ie}else{var le=ee/2,ue=z/2,me=Math.atan2(z,ee),xe=oe-Math.min(Math.cos(me)*oe/2,le),Ae=oe-Math.min(Math.sin(me)*oe/2,ue),ie=new go.Geometry,De=new go.PathFigure(xe,0,!0);return ie.add(De),De.add(new go.PathSegment(go.PathSegment.Line,le,.2*z)),De.add(new go.PathSegment(go.PathSegment.Line,ee-xe,0)),De.add(new go.PathSegment(go.PathSegment.Line,ee,Ae)),De.add(new go.PathSegment(go.PathSegment.Line,.8*ee,ue)),De.add(new go.PathSegment(go.PathSegment.Line,ee,z-Ae)),De.add(new go.PathSegment(go.PathSegment.Line,ee-xe,z)),De.add(new go.PathSegment(go.PathSegment.Line,le,.8*z)),De.add(new go.PathSegment(go.PathSegment.Line,xe,z)),De.add(new go.PathSegment(go.PathSegment.Line,0,z-Ae)),De.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ue)),De.add(new go.PathSegment(go.PathSegment.Line,0,Ae).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new Sn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(de,ee,z){var oe=de?de.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=10);var ie=new go.Geometry,le=new go.PathFigure(.1*ee,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*z).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new Sn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,oe*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*ee,oe*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+oe/2)*ee,(1-oe)*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,(1-oe)*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-oe)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*ee,(1-oe)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-oe/2)*ee,oe*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,oe*z).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new Sn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.5);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,z,Math.abs(1-oe)*ee,.25*z,Math.abs(1-oe)*ee,.75*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*ee,.75*z,oe*ee,.25*z).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,pe*ee,0,ee,(.5-pe/2)*z)).add(new go.PathSegment(go.PathSegment.Bezier,0,z,ee,(.5+pe/2)*z,pe*ee,z).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,z,ee,0,ee,z)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*ee,.75*z,.5*ee,.25*z).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(.5*ee,z,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*z,.1*ee,.8*z,0,.5*z)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.3*z,0,0,.45*ee,0)).add(new go.PathSegment(go.PathSegment.Bezier,ee,.3*z,.55*ee,0,ee,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,.5*z,.9*ee,.8*z).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(.5*ee,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*ee,.01*z)).add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.6*ee,.2*z,ee,.25*z)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ee,.7*z,ee,.8*z,.6*ee,.8*z)).add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,.5*ee,.75*z,.55*ee,.95*z)).add(new go.PathSegment(go.PathSegment.Line,.25*ee,z)).add(new go.PathSegment(go.PathSegment.Bezier,.45*ee,.7*z,.45*ee,.95*z,.5*ee,.75*z)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,.4*ee,.8*z,0,.8*z)).add(new go.PathSegment(go.PathSegment.Bezier,.49*ee,.01*z,0,.25*z,.4*ee,.2*z).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.4*ee,.6*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*ee,z,.5*ee,.75*z,.45*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*ee,.6*z,.55*ee,.95*z,.5*ee,.75*z));var le=.2,ue=.3,me=0,xe=le*pe;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*ee,(.5+le+me)*z,(.5-le+ue)*ee,(.5+xe+me)*z,(.5-xe+ue)*ee,(.5+le+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*ee,(.5+me)*z,(.5+xe+ue)*ee,(.5+le+me)*z,(.5+le+ue)*ee,(.5+xe+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*ee,(.5-le+me)*z,(1-.5+le+ue)*ee,(.5-xe+me)*z,(.5+xe+ue)*ee,(.5-le+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*ee,.36771243*z,(.5-xe+ue)*ee,(.5-le+me)*z,(.5-le+ue+.05)*ee,(.5-xe+me-.02)*z)),le=.2,ue=0,me=-.3,xe=le*pe,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*ee,(.5+me)*z,(.5+xe+ue)*ee,(.5+le+me)*z,(.5+le+ue)*ee,(.5+xe+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*ee,(.5-le+me)*z,(1-.5+le+ue)*ee,(.5-xe+me)*z,(.5+xe+ue)*ee,(.5-le+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*ee,(.5+me)*z,(.5-xe+ue)*ee,(.5-le+me)*z,(.5-le+ue)*ee,(.5-xe+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-xe+ue)*ee,(.5+le+me)*z,(.5-le+ue)*ee,(.5+xe+me)*z,(.5-xe+ue)*ee,(.5+le+me)*z)),le=.2,ue=-.3,me=0,xe=le*pe,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*ee,(.5-le+me)*z,(1-.5+le+ue-.05)*ee,(.5-xe+me-.02)*z,(.5+xe+ue)*ee,(.5-le+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*ee,(.5+me)*z,(.5-xe+ue)*ee,(.5-le+me)*z,(.5-le+ue)*ee,(.5-xe+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*ee,(.5+le+me)*z,(.5-le+ue)*ee,(.5+xe+me)*z,(.5-xe+ue)*ee,(.5+le+me)*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,.6*z,(.5+xe+ue)*ee,(.5+le+me)*z,(.5+le+ue)*ee,(.5+xe+me)*z).close()),oe.setSpots(.06,.33,.93,.68),oe}),go.Shape.defineFigureGenerator("YinYang",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*.5,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,ee*.5,ee*.5,ee*.5,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,ee*.5,ee*.75,ee*.25,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,ee*.5,ee*.25,ee*.25,ee*.25));var le=.1,ue=.5,me=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ue+le)*ee,me*z)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ee*ue,z*me,le*ee,le*ee).close()),ie=new go.PathFigure(ee*.5,0,!1),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ee*.5,ee*.5,ee*.5,ee*.5)),me=.75,ie=new go.PathFigure((ue+le)*ee,me*z,!0),oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,ee*ue,z*me,le*ee,le*ee).close()),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Peace",function(de,ee,z){var oe=.8535533905932737,ie=.5*ee,le=.5*z;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,z)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,oe*ee,oe*z)))}),go.Shape.defineFigureGenerator("NotAllowed",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=.5,ue=.5,me=.5,xe=new go.PathFigure(ue*ee,(me-le)*z);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*ee,me*z,(ue-ie)*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+le)*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,me*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-le)*z,(ue+le)*ee,(me-ie)*z,(ue+ie)*ee,(me-le)*z)),le=.4,ie=pe*.4;var Ae=st(),De=st(),Fe=st(),je=st();Ge(ue,me-le,ue+ie,me-le,ue+le,me-ie,ue+le,me,.42,Ae,De,Fe,je,je);var Le=st(),Be=st(),Ue=st();Ge(ue,me-le,ue+ie,me-le,ue+le,me-ie,ue+le,me,.58,je,je,Ue,Le,Be);var Je=st(),He=st(),We=st();Ge(ue,me+le,ue-ie,me+le,ue-le,me+ie,ue-le,me,.42,Je,He,We,je,je);var at=st(),ft=st(),mt=st();return Ge(ue,me+le,ue-ie,me+le,ue-le,me+ie,ue-le,me,.58,je,je,mt,at,ft),xe.add(new go.PathSegment(go.PathSegment.Move,mt.x*ee,mt.y*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*ee,me*z,at.x*ee,at.y*z,ft.x*ee,ft.y*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*ee,Fe.y*z,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z)),xe.add(new go.PathSegment(go.PathSegment.Line,mt.x*ee,mt.y*z).close()),xe.add(new go.PathSegment(go.PathSegment.Move,We.x*ee,We.y*z)),xe.add(new go.PathSegment(go.PathSegment.Line,Ue.x*ee,Ue.y*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,me*z,Le.x*ee,Le.y*z,Be.x*ee,Be.y*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,We.x*ee,We.y*z,Je.x*ee,Je.y*z,He.x*ee,He.y*z).close()),Ft(Ae),Ft(De),Ft(Fe),Ft(je),Ft(Le),Ft(Be),Ft(Ue),Ft(Je),Ft(He),Ft(We),Ft(at),Ft(ft),Ft(mt),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("Fragile",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)).add(new go.PathSegment(go.PathSegment.Line,.2*ee,.15*z)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,.25*z)).add(new go.PathSegment(go.PathSegment.Line,.29*ee,.33*z)).add(new go.PathSegment(go.PathSegment.Line,.35*ee,.25*z)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,.15*z)).add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ee,.5*z,ee,.25*z,.75*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.55*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.45*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.45*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.5*z,0,.25*z).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(de,ee,z){var oe=de?de.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=30),oe>ee&&(oe=ee);var ie=(ee-oe)/2,le=ie+oe;return new go.Geometry().add(new go.PathFigure(le,.5*z).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z)).add(new go.PathSegment(go.PathSegment.Line,ie,.5*z)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,ee,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,.55*z).add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)).add(new go.PathSegment(go.PathSegment.Line,.3*ee,.45*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.45*z)).add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,.55*z).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(de,ee,z){var oe=new go.Geometry,ie=pe*.4,le=.4,ue=.5,me=.5,xe=st(),Ae=st(),De=st(),Fe=st(),je=new go.PathFigure((ue-le)*ee,me*z,!1);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z)),Ge(ue,me-le,ue+ie,me-le,ue+le,me-ie,ue+le,me,.44,De,Fe,Ae,xe,xe),je.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z,Fe.x*ee,Fe.y*z));var Le=ot(Ae.x,Ae.y);Ge(ue,me-le,ue+ie,me-le,ue+le,me-ie,ue+le,me,.56,xe,xe,Ae,De,Fe);var Be=ot(Ae.x,Ae.y);je.add(new go.PathSegment(go.PathSegment.Line,(Le.x*.1+.95*.9)*ee,Le.y*.1*z)),je.add(new go.PathSegment(go.PathSegment.Line,.85*ee,Le.y*.1*z)),je.add(new go.PathSegment(go.PathSegment.Line,.85*ee,0)),je.add(new go.PathSegment(go.PathSegment.Line,ee,0)),je.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),je.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*ee,.15*z)),je.add(new go.PathSegment(go.PathSegment.Line,(Be.x*.1+.9)*ee,(Be.y*.1+.05*.9)*z)),je.add(new go.PathSegment(go.PathSegment.Line,Be.x*ee,Be.y*z)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,me*z,De.x*ee,De.y*z,Fe.x*ee,Fe.y*z)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*ee,me*z,(ue-ie)*ee,(me+le)*z,(ue-le)*ee,(me+ie)*z)),le=.35,ie=pe*.35;var Ue=new go.PathFigure(ue*ee,(me-le)*z,!1);oe.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*ee,me*z,(ue-ie)*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+le)*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,me*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-le)*z,(ue+le)*ee,(me-ie)*z,(ue+ie)*ee,(me-le)*z));var Je=new go.PathFigure((ue-le)*ee,me*z,!1);return oe.add(Je),Ft(xe),Ft(Ae),Ft(De),Ft(Fe),Ft(Le),Ft(Be),oe.spot1=new go.Spot(.202,.257),oe.spot2=new go.Spot(.792,.739),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("GenderFemale",function(de,ee,z){var oe=new go.Geometry,ie=.375,le=0,ue=-.125,me=ie*pe,xe=new go.PathFigure((.525+le)*ee,(.5+ie+ue)*z,!1);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*ee,(.5+ue)*z,(.5+me+le)*ee,(.5+ie+ue)*z,(.5+ie+le)*ee,(.5+me+ue)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-ie+ue)*z,(1-.5+ie+le)*ee,(.5-me+ue)*z,(.5+me+le)*ee,(.5-ie+ue)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*ee,(.5+ue)*z,(.5-me+le)*ee,(.5-ie+ue)*z,(.5-ie+le)*ee,(.5-me+ue)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*ee,(.5+ie+ue)*z,(.5-ie+le)*ee,(.5+me+ue)*z,(.5-me+le)*ee,(.5+ie+ue)*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*ee,.85*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.85*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.9*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*ee,.9*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.475*ee,z)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*ee,z)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.9*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.9*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.85*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.85*z).close()),ie=.325,le=0,ue=-.125,me=ie*pe;var xe=new go.PathFigure((1-.5+ie+le)*ee,(.5+ue)*z,!1);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5+ie+ue)*z,(.5+ie+le)*ee,(.5+me+ue)*z,(.5+me+le)*ee,(.5+ie+ue)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*ee,(.5+ue)*z,(.5-me+le)*ee,(.5+ie+ue)*z,(.5-ie+le)*ee,(.5+me+ue)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*ee,(.5-ie+ue)*z,(.5-ie+le)*ee,(.5-me+ue)*z,(.5-me+le)*ee,(.5-ie+ue)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*ee,(.5+ue)*z,(.5+me+le)*ee,(.5-ie+ue)*z,(1-.5+ie+le)*ee,(.5-me+ue)*z));var xe=new go.PathFigure((.525+le)*ee,(.5+ie+ue)*z,!1);return oe.add(xe),oe.spot1=new go.Spot(.232,.136),oe.spot2=new go.Spot(.682,.611),oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicImplies",function(de,ee,z){var oe=de?de.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,z)).add(new go.PathSegment(go.PathSegment.Move,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(de,ee,z){var oe=de?de.parameter1:NaN;return isNaN(oe)&&(oe=.2),new go.Geometry().add(new go.PathFigure((1-oe)*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,(1-oe)*ee,z)).add(new go.PathSegment(go.PathSegment.Move,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Move,oe*ee,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,oe*ee,z))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)))}),go.Shape.defineFigureGenerator("LogicAnd",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,z,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Line,ee,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(de,ee,z){var oe=new go.Geometry().add(new go.PathFigure(.5*ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Move,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*ee,.5*z,.5*ee,.5*z)));return oe.defaultStretch=go.GraphObject.Uniform,oe}),go.Shape.defineFigureGenerator("LogicTruth",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,z,!1).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,0,.5*z)).add(new go.PathSegment(go.PathSegment.Move,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z)))}),go.Shape.defineFigureGenerator("LogicForAll",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Move,.25*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Line,.75*ee,.5*z))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)).add(new go.PathSegment(go.PathSegment.Move,0,z)).add(new go.PathSegment(go.PathSegment.Line,ee,z))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(de,ee,z){var oe=.5;return new go.Geometry().add(new go.PathFigure(0,z,!1).add(new go.PathSegment(go.PathSegment.Line,0,oe*z)).add(new go.PathSegment(go.PathSegment.Arc,180,180,oe*ee,oe*z,oe*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Line,ee,z))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(de,ee,z){var oe=.5;return new go.Geometry().add(new go.PathFigure(ee,0,!1).add(new go.PathSegment(go.PathSegment.Line,ee,oe*z)).add(new go.PathSegment(go.PathSegment.Arc,0,180,oe*ee,oe*z,oe*ee,oe*z)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Sn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Sn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=.3);var le=(1-oe)*ee,ue=(.5-ie/2)*z,me=(.5+ie/2)*z,xe=new go.Geometry,Ae=new go.PathFigure(0,ue,!0);xe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,le,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,me)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,me).close()),xe.spot1=new go.Spot(0,ue/z);var De=ae(0,me/z,1,me/z,le/ee,1,1,.5,st());return xe.spot2=new go.Spot(De.x,De.y),Ft(De),xe}),go.Shape.setFigureParameter("Arrow2",0,new Sn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Sn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=30),oe>ee&&(oe=ee);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,z/2);var le=ee-oe,ue=(z-ie)/2,me=ue+ie,xe=new go.Geometry,Ae=new go.PathFigure(0,ue,!0);xe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,le,ue)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,0)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,z)),Ae.add(new go.PathSegment(go.PathSegment.Line,le,me)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,me).close()),xe.spot1=new go.Spot(0,ue/z);var De=ae(0,me/z,1,me/z,le/ee,1,1,.5,st());return xe.spot2=new go.Spot(De.x,De.y),Ft(De),xe}),go.Shape.defineFigureGenerator("Chevron",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("DoubleArrow",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.214*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.786*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*z).close()),oe}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Sn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*z,le=(.5+oe/2)*z,ue=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,le)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),me.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ie)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ie)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close());var xe=ae(0,.5,.3,0,0,ie/z,.1,ie/z,st());return ue.spot1=new go.Spot(xe.x,xe.y),xe=ae(.7,1,1,.5,0,le/z,1,le/z,xe),ue.spot2=new go.Spot(xe.x,xe.y),Ft(xe),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Sn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Sn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(z-oe)/2,ue=le+oe,me=(z-ie)/2,xe=me+ie;(oe>z||ie>z)&&(ie>oe?(oe=oe*z/ie,le=(z-oe)/2,ue=le+oe,me=0,xe=z):(le=0,ue=z,me=0,xe=z));var Ae=new go.Geometry,De=new go.PathFigure(ee,.5*z,!0);Ae.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*ee,xe)),De.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ue)),De.add(new go.PathSegment(go.PathSegment.Line,.3*ee,ue)),De.add(new go.PathSegment(go.PathSegment.Line,.3*ee,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),De.add(new go.PathSegment(go.PathSegment.Line,.3*ee,me)),De.add(new go.PathSegment(go.PathSegment.Line,.3*ee,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*ee,me).close());var Fe=ae(0,.5,.3,me/z,0,le/z,1,le/z,st());return Ae.spot1=new go.Spot(Fe.x,Fe.y),Fe=ae(.7,xe/z,1,.5,0,ue/z,1,ue/z,Fe),Ae.spot2=new go.Spot(Fe.x,Fe.y),Ft(Fe),Ae}),go.Shape.setFigureParameter("IBeamArrow",0,new Sn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=(.5-oe/2)*z,le=(.5+oe/2)*z,ue=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,le)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,0,z)),me.add(new go.PathSegment(go.PathSegment.Line,0,0)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ie)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ie)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),ue.spot1=new go.Spot(0,ie/z);var xe=ae(.7,1,1,.5,0,le/z,1,le/z,st());return ue.spot2=new go.Spot(xe.x,xe.y),Ft(xe),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new Sn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Sn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=40);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(z-oe)/2,ue=le+oe,me=(z-ie)/2,xe=me+ie;(oe>z||ie>z)&&(ie>oe?(oe=oe*z/ie,le=(z-oe)/2,ue=le+oe,me=0,xe=z):(le=0,ue=z,me=0,xe=z));var Ae=new go.Geometry,De=new go.PathFigure(ee,.5*z,!0);Ae.add(De),De.add(new go.PathSegment(go.PathSegment.Line,.7*ee,xe)),De.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ue)),De.add(new go.PathSegment(go.PathSegment.Line,.2*ee,ue)),De.add(new go.PathSegment(go.PathSegment.Line,.2*ee,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,xe)),De.add(new go.PathSegment(go.PathSegment.Line,0,me)),De.add(new go.PathSegment(go.PathSegment.Line,.2*ee,me)),De.add(new go.PathSegment(go.PathSegment.Line,.2*ee,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),De.add(new go.PathSegment(go.PathSegment.Line,.7*ee,me).close()),Ae.spot1=new go.Spot(0,le/z);var Fe=ae(.7,xe/z,1,.5,0,ue/z,1,ue/z,st());return Ae.spot2=new go.Spot(Fe.x,Fe.y),Ft(Fe),Ae}),go.Shape.setFigureParameter("Pointer",0,new Sn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.1);var ie=new go.Geometry,le=new go.PathFigure(ee,.5*z,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,z)),le.add(new go.PathSegment(go.PathSegment.Line,oe*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(oe,.35);var ue=ae(.2,.65,1,.65,0,1,1,.5,st());return ie.spot2=new go.Spot(ue.x,ue.y),Ft(ue),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new Sn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.3);var ie=new go.Geometry,le=new go.PathFigure(ee,.5*z,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,z)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,oe*ee,.75*z,oe*ee,.25*z).close()),ie.spot1=new go.Spot(oe,.35);var ue=ae(0,.65,1,.65,0,1,1,.5,st());return ie.spot2=new go.Spot(ue.x,ue.y),Ft(ue),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new Sn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.4);var ie=(.5-oe/2)*z,le=(.5+oe/2)*z,ue=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),me.add(new go.PathSegment(go.PathSegment.Line,0,le)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,0,ie)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ie)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),ue.spot1=new go.Spot(.2,.3);var xe=ae(.7,1,1,.5,0,le/z,1,le/z,st());return ue.spot2=new go.Spot(xe.x,xe.y),Ft(xe),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Sn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=50);var ie=(z-oe)/2,le=ie+oe;oe>z&&(ie=0,le=z);var ue=new go.Geometry,me=new go.PathFigure(ee,.5*z,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,le)),me.add(new go.PathSegment(go.PathSegment.Line,0,le)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,0,ie)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,ie)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0).close()),ue.spot1=new go.Spot(.2,ie/z);var xe=ae(.7,1,1,.5,0,le/z,1,le/z,st());return ue.spot2=new go.Spot(xe.x,xe.y),Ft(xe),ue}),go.Shape.setFigureParameter("SquareArrow",0,new Sn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.7);var ie=new go.Geometry,le=new go.PathFigure(ee,.5*z,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,oe*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,oe*ee,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(oe,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=pe*.1,ue=new go.PathFigure(0,.9*z,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+le)*z,(.5+ie)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-ie)*ee,z,0,(.9+le)*z).close()),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.97),oe}),go.Shape.defineFigureGenerator("Cone2",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.9*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.9*z,(1-.85/.9)*ee,z,.85/.9*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*z).close());var le=new go.PathFigure(0,.9*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.9*z,(1-.85/.9)*ee,.8*z,.85/.9*ee,.8*z)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.82),oe}),go.Shape.defineFigureGenerator("Cube1",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*z).close());var le=new go.PathFigure(.5*ee,z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.3*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.15*z)),le.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.3*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.5,.85),oe}),go.Shape.defineFigureGenerator("Cube2",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.3*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0).close());var le=new go.PathFigure(0,.3*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.3*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Move,.7*ee,.3*z)),le.add(new go.PathSegment(go.PathSegment.Line,.7*ee,z)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(.7,1),oe}),go.Shape.defineFigureGenerator("Cylinder1",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,le=pe*.5,ue=new go.PathFigure(0,oe,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,pe*oe,(.5-le)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*ee,oe,(.5+le)*ee,0,1*ee,pe*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,1*z,1*ee,z-pe*oe,(.5+le)*ee,1*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,(.5-le)*ee,1*z,0,z-pe*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,0,oe));var me=new go.PathFigure(ee,oe,!1);return ie.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,2*oe,1*ee,2*oe-pe*oe,(.5+le)*ee,2*oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,oe,(.5-le)*ee,2*oe,0,2*oe-pe*oe)),ie.spot1=new go.Spot(0,0,0,2*oe),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,z/3);var ie=new go.Geometry,le=pe*.5,ue=new go.PathFigure(0,z-oe,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,pe*oe,(.5-le)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,(.5+le)*ee,0,ee,pe*oe)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,z-oe)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,z-pe*oe,(.5+le)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,z-oe,(.5-le)*ee,z,0,z-pe*oe));var me=new go.PathFigure(0,z-oe,!1);return ie.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z-2*oe,0,z-oe-pe*oe,(.5-le)*ee,z-2*oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee,z-oe,(.5+le)*ee,z-2*oe,ee,z-oe-pe*oe)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*oe),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,le=pe*.5,ue=new go.PathFigure(oe,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,ee-pe*oe,0,ee,(.5-le)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,(.5+le)*z,ee-pe*oe,z)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,pe*oe,z,0,(.5+le)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-le)*z,pe*oe,0));var me=new go.PathFigure(oe,0,!1);return ie.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,2*oe,.5*z,oe+pe*oe,0,2*oe,(.5-le)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,oe,z,2*oe,(.5+le)*z,oe+pe*oe,z)),ie.spot1=new go.Spot(0,0,2*oe,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=5),oe=Math.min(oe,ee/3);var ie=new go.Geometry,le=pe*.5,ue=new go.PathFigure(ee-oe,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,ee-pe*oe,0,ee,(.5-le)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee,(.5+le)*z,ee-pe*oe,z)),ue.add(new go.PathSegment(go.PathSegment.Line,oe,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,pe*oe,z,0,(.5+le)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,(.5-le)*z,pe*oe,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0));var me=new go.PathFigure(ee-oe,0,!1);return ie.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-2*oe,.5*z,ee-oe-pe*oe,0,ee-2*oe,(.5-le)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,z,ee-2*oe,(.5+le)*z,ee-oe-pe*oe,z)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*oe,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.25*ee,.25*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(.25*ee,.25*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),oe.spot1=new go.Spot(.408,.172),oe.spot2=new go.Spot(.833,.662),oe}),go.Shape.defineFigureGenerator("Prism2",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.25*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(0,z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),le.add(new go.PathSegment(go.PathSegment.Move,0,.25*z)),le.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.5*z)),oe.spot1=new go.Spot(.25,.5),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("Pyramid1",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*z).close());var le=new go.PathFigure(.5*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Pyramid2",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*z).close());var le=new go.PathFigure(.5*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.7*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.85*z)),le.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.7*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),oe.spot1=new go.Spot(.25,.367),oe.spot2=new go.Spot(.75,.875),oe}),go.Shape.defineFigureGenerator("Actor",function(de,ee,z){var oe=new go.Geometry,ie=.2,le=.1,ue=pe*ie,me=pe*le,xe=.5,Ae=.1,De=new go.PathFigure(xe*ee,(Ae+le)*z,!0);oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ie)*ee,Ae*z,(xe-ue)*ee,(Ae+le)*z,(xe-ie)*ee,(Ae+me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae-le)*z,(xe-ie)*ee,(Ae-me)*z,(xe-ue)*ee,(Ae-le)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ie)*ee,Ae*z,(xe+ue)*ee,(Ae-le)*z,(xe+ie)*ee,(Ae-me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae+le)*z,(xe+ie)*ee,(Ae+me)*z,(xe+ue)*ee,(Ae+le)*z));var Fe=.05,je=pe*Fe;xe=.05,Ae=.25;var Le=new go.PathFigure(.5*ee,.2*z,!0);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.95*ee,.2*z)),xe=.95,Ae=.25,Le.add(new go.PathSegment(go.PathSegment.Bezier,(xe+Fe)*ee,Ae*z,(xe+je)*ee,(Ae-Fe)*z,(xe+Fe)*ee,(Ae-je)*z)),Le.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),Le.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),Le.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.35*z)),Fe=.025,je=pe*Fe,xe=.825,Ae=.35,Le.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae-Fe)*z,(xe+Fe)*ee,(Ae-je)*z,(xe+je)*ee,(Ae-Fe)*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*ee,Ae*z,(xe-je)*ee,(Ae-Fe)*z,(xe-Fe)*ee,(Ae-je)*z)),Le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),Le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,z)),Le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.7*z)),Fe=.05,je=pe*Fe,xe=.5,Ae=.7,Le.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae-Fe)*z,(xe+Fe)*ee,(Ae-je)*z,(xe+je)*ee,(Ae-Fe)*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*ee,Ae*z,(xe-je)*ee,(Ae-Fe)*z,(xe-Fe)*ee,(Ae-je)*z)),Le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,z)),Le.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),Le.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.35*z)),Fe=.025,je=pe*Fe,xe=.175,Ae=.35,Le.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae-Fe)*z,(xe+Fe)*ee,(Ae-je)*z,(xe+je)*ee,(Ae-Fe)*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(xe-Fe)*ee,Ae*z,(xe-je)*ee,(Ae-Fe)*z,(xe-Fe)*ee,(Ae-je)*z)),Le.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z)),Le.add(new go.PathSegment(go.PathSegment.Line,0,.6*z)),Le.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),Fe=.05,je=pe*Fe,xe=.05,Ae=.25,Le.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae-Fe)*z,(xe-Fe)*ee,(Ae-je)*z,(xe-je)*ee,(Ae-Fe)*z)),Le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.2*z)),oe.spot1=new go.Spot(.2,.2),oe.spot2=new go.Spot(.8,.65),oe}),go.Shape.setFigureParameter("Card",0,new Sn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(de,ee,z){var oe=de?de.parameter1:NaN;isNaN(oe)&&(oe=.2);var ie=new go.Geometry,le=new go.PathFigure(ee,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,oe*z)),le.add(new go.PathSegment(go.PathSegment.Line,oe*ee,0).close()),ie.spot1=new go.Spot(0,oe),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,.5*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z));var le=new go.PathFigure(.5*ee,.5*z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,.25),oe}),go.Shape.defineFigureGenerator("CreateRequest",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ue=new go.PathFigure(0,ie*z,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,ie*z)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,(1-ie)*z)),oe}),go.Shape.defineFigureGenerator("Database",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=pe*.1,ue=new go.PathFigure(ee,.1*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+le)*z,(.5+ie)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-ie)*ee,z,0,(.9+le)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,(.1-le)*z,(.5-ie)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,(.5+ie)*ee,0,ee,(.1-le)*z));var me=new go.PathFigure(ee,.1*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,ee,(.1+le)*z,(.5+ie)*ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*z,(.5-ie)*ee,.2*z,0,(.1+le)*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.3*z,ee,(.2+le)*z,(.5+ie)*ee,.3*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*z,(.5-ie)*ee,.3*z,0,(.2+le)*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,.3*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.4*z,ee,(.3+le)*z,(.5+ie)*ee,.4*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*z,(.5-ie)*ee,.4*z,0,(.3+le)*z)),oe.spot1=new go.Spot(0,.4),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("DataStorage",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,ee,0,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.9*z,.25*ee,.1*z).close()),oe.spot1=new go.Spot(.226,0),oe.spot2=new go.Spot(.81,1),oe}),go.Shape.defineFigureGenerator("DiskStorage",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=pe*.1,ue=new go.PathFigure(ee,.1*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.9+le)*z,(.5+ie)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,(.5-ie)*ee,z,0,(.9+le)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,(.1-le)*z,(.5-ie)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,(.5+ie)*ee,0,ee,(.1-le)*z));var me=new go.PathFigure(ee,.1*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,ee,(.1+le)*z,(.5+ie)*ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*z,(.5-ie)*ee,.2*z,0,(.1+le)*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,.2*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.3*z,ee,(.2+le)*z,(.5+ie)*ee,.3*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*z,(.5-ie)*ee,.3*z,0,(.2+le)*z)),oe.spot1=new go.Spot(0,.3),oe.spot2=new go.Spot(1,.9),oe}),go.Shape.defineFigureGenerator("Display",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.25*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,z,ee,0,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close()),oe.spot1=new go.Spot(.25,0),oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("DividedEvent",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var le=pe*.2,ue=new go.PathFigure(0,.2*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,0,(.2-le)*z,(.2-le)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,.2*z,(.8+le)*ee,0,ee,(.2-le)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,z,ee,(.8+le)*z,(.8+le)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*z,(.2-le)*ee,z,0,(.8+le)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.2*z));var me=new go.PathFigure(0,ie*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,ie*z)),oe}),go.Shape.defineFigureGenerator("DividedProcess",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ue=new go.PathFigure(0,ie*z,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,ie*z)),oe}),go.Shape.defineFigureGenerator("Document",function(de,ee,z){var oe=new go.Geometry;z=z/.8;var ie=new go.PathFigure(0,.7*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.5*ee,.4*z,.5*ee,z).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("ExternalOrganization",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ue=new go.PathFigure(ie*ee,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie*z)),ue.add(new go.PathSegment(go.PathSegment.Move,ee,ie*z)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,(1-ie)*z)),oe}),go.Shape.defineFigureGenerator("ExternalProcess",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close());var le=new go.PathFigure(.1*ee,.4*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Move,.9*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Move,.6*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Move,.4*ee,.9*z)),le.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.9*z)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("File",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(.75*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.25*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Interrupt",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee,.5*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z));var le=new go.PathFigure(ee,.5*z,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,z));var ue=new go.PathFigure(ee,.5*z,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,0)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("InternalStorage",function(de,ee,z){var oe=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);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var me=new go.PathFigure(ie*ee,0,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),me.add(new go.PathSegment(go.PathSegment.Move,0,le*z)),me.add(new go.PathSegment(go.PathSegment.Line,ee,le*z)),oe}),go.Shape.defineFigureGenerator("Junction",function(de,ee,z){var oe=new go.Geometry,ie=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ue=pe*.5,me=.5,xe=new go.PathFigure(ee,me*z,!0);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,z,ee,(me+ue)*z,(me+ue)*ee,z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,me*z,(me-ue)*ee,z,0,(me+ue)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,0,0,(me-ue)*z,(me-ue)*ee,0)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ee,me*z,(me+ue)*ee,0,ee,(me-ue)*z));var Ae=new go.PathFigure((le+ie)*ee,(le+ie)*z,!1);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,le*ee,le*z)),Ae.add(new go.PathSegment(go.PathSegment.Move,le*ee,(le+ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,(le+ie)*ee,le*z)),oe}),go.Shape.defineFigureGenerator("LinedDocument",function(de,ee,z){var oe=new go.Geometry;z=z/.8;var ie=new go.PathFigure(0,.7*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.5*ee,.4*z,.5*ee,z).close());var le=new go.PathFigure(.1*ee,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.75*z)),oe.spot1=new go.Spot(.1,0),oe.spot2=new go.Spot(1,.6),oe}),go.Shape.defineFigureGenerator("LoopLimit",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MagneticTape",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=.5,ue=new go.PathFigure(.5*ee,z,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*z,(le-ie)*ee,z,0,(le+ie)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,0,0,(le-ie)*z,(le-ie)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,le*z,(le+ie)*ee,0,ee,(le-ie)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*ee,.9*z,ee,(le+ie)*z,(le+ie)*ee,.9*z)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),oe.spot1=new go.Spot(.15,.15),oe.spot2=new go.Spot(.85,.8),oe}),go.Shape.defineFigureGenerator("ManualInput",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*z).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("MessageFromUser",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.7);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("MicroformProcessing",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,ie*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,(1-ie)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("MicroformRecording",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("MultiDocument",function(de,ee,z){var oe=new go.Geometry;z=z/.8;var ie=new go.PathFigure(ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.44*z,.96*ee,.47*z,.93*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.54*z,.86*ee,.57*z,.83*ee,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.4*ee,.4*z,.4*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0).close());var le=new go.PathFigure(.1*ee,.2*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.54*z)),le.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.44*z)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.8,.77),oe}),go.Shape.defineFigureGenerator("MultiProcess",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.1*ee,.1*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z).close());var le=new go.PathFigure(.2*ee,.1*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.1*z)),le.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Move,.1*ee,.2*z)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.9*z)),oe.spot1=new go.Spot(0,.2),oe.spot2=new go.Spot(.8,1),oe}),go.Shape.defineFigureGenerator("OfflineStorage",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=1-ie,ue=new go.PathFigure(0,0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z).close());var me=new go.PathFigure(.5*ie*ee,ie*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*ee,ie*z)),oe}),go.Shape.defineFigureGenerator("OffPageConnector",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.75,1),oe}),go.Shape.defineFigureGenerator("Or",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=.5,ue=new go.PathFigure(ee,le*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,ee,(le+ie)*z,(le+ie)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*z,(le-ie)*ee,z,0,(le+ie)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,0,0,(le-ie)*z,(le-ie)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,le*z,(le+ie)*ee,0,ee,(le-ie)*z));var me=new go.PathFigure(ee,.5*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),me.add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),oe}),go.Shape.defineFigureGenerator("PaperTape",function(de,ee,z){var oe=new go.Geometry;z=z/.8;var ie=new go.PathFigure(0,.7*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.3*z,.5*ee,.6*z,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*z,.5*ee,.4*z,.5*ee,z).close()),oe.spot1=new go.Spot(0,.49),oe.spot2=new go.Spot(1,.75),oe}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(de,ee,z){var oe=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 oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*ee,.5*z)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(de,ee,z){var oe=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 oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("Procedure",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ue=new go.PathFigure((1-ie)*ee,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Move,ie*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),oe}),go.Shape.defineFigureGenerator("Process",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var ue=new go.PathFigure(ie*ee,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),oe.spot2=go.Spot.BottomRight,oe}),go.Shape.defineFigureGenerator("Sort",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z).close());var le=new go.PathFigure(0,.5*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),oe.spot1=new go.Spot(.25,.25),oe.spot2=new go.Spot(.75,.5),oe}),go.Shape.defineFigureGenerator("Start",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(ie*ee,0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ee,.5*z,.25*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ee,.5*z,.25*ee,.5*z));var ue=new go.PathFigure(ie*ee,0,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*ee,z)),oe.spot1=new go.Spot(ie,0),oe.spot2=new go.Spot(1-ie,1),oe}),go.Shape.defineFigureGenerator("Terminator",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.25*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ee,.5*z,.25*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ee,.5*z,.25*ee,.5*z)),oe.spot1=new go.Spot(.23,0),oe.spot2=new go.Spot(.77,1),oe}),go.Shape.defineFigureGenerator("TransmittalTape",function(de,ee,z){var oe=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.75*ee,(1-ie)*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*z).close()),oe.spot1=go.Spot.TopLeft,oe}),go.Shape.defineFigureGenerator("AndGate",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=new go.PathFigure(0,0,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(.5+ie)*ee,0,ee,(.5-ie)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,(.5+ie)*z,(.5+ie)*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=go.Spot.TopLeft,oe.spot2=new go.Spot(.55,1),oe}),go.Shape.defineFigureGenerator("Buffer",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Clock",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=.5,ue=new go.PathFigure(ee,le*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,z,ee,(le+ie)*z,(le+ie)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*z,(le-ie)*ee,z,0,(le+ie)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*ee,0,0,(le-ie)*z,(le-ie)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,le*z,(le+ie)*ee,0,ee,(le-ie)*z));var me=new go.PathFigure(ee,le*z,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,le*z));var xe=new go.PathFigure(.8*ee,.75*z,!1);return oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.25*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.25*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.75*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.75*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.25*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.25*z)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.75*z)),oe}),go.Shape.defineFigureGenerator("Ground",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z)),oe}),go.Shape.defineFigureGenerator("Inverter",function(de,ee,z){var oe=new go.Geometry,ie=pe*.1,le=.1,ue=.9,me=.5,xe=new go.PathFigure(.8*ee,.5*z,!0);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,0,z)),xe.add(new go.PathSegment(go.PathSegment.Line,0,0)),xe.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z));var Ae=new go.PathFigure((ue+le)*ee,me*z,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*ee,me*z,(ue-ie)*ee,(me+le)*z,(ue-le)*ee,(me+ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,me*z,(ue+ie)*ee,(me-le)*z,(ue+le)*ee,(me-ie)*z)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.4,.75),oe}),go.Shape.defineFigureGenerator("NandGate",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=pe*.4,ue=pe*.1,me=.1,xe=.9,Ae=.5,De=new go.PathFigure(.8*ee,.5*z,!0);oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,z,.8*ee,(.5+le)*z,(.4+ie)*ee,z)),De.add(new go.PathSegment(go.PathSegment.Line,0,z)),De.add(new go.PathSegment(go.PathSegment.Line,0,0)),De.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),De.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(.4+ie)*ee,0,.8*ee,(.5-le)*z));var Fe=new go.PathFigure((xe+me)*ee,Ae*z,!0);return oe.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae+me)*z,(xe+me)*ee,(Ae+ue)*z,(xe+ue)*ee,(Ae+me)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-me)*ee,Ae*z,(xe-ue)*ee,(Ae+me)*z,(xe-me)*ee,(Ae+ue)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae-me)*z,(xe-me)*ee,(Ae-ue)*z,(xe-ue)*ee,(Ae-me)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+me)*ee,Ae*z,(xe+ue)*ee,(Ae-me)*z,(xe+me)*ee,(Ae-ue)*z)),oe.spot1=new go.Spot(0,.05),oe.spot2=new go.Spot(.55,.95),oe}),go.Shape.defineFigureGenerator("NorGate",function(de,ee,z){var oe=new go.Geometry,ie=.5,le=pe*ie,ue=0,me=.5,xe=new go.PathFigure(.8*ee,.5*z,!0);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.7*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.75*z,.25*ee,.25*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(ue+le)*ee,(me-ie)*z,.7*ee,(me-le)*z)),ie=.1,le=pe*.1,ue=.9,me=.5;var Ae=new go.PathFigure((ue-ie)*ee,me*z,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*ee,me*z,(ue+le)*ee,(me-ie)*z,(ue+ie)*ee,(me-le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*ee,me*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z)),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.6,.75),oe}),go.Shape.defineFigureGenerator("OrGate",function(de,ee,z){var oe=new go.Geometry,ie=.5,le=pe*ie,ue=0,me=.5,xe=new go.PathFigure(0,0,!0);return oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(ue+le+le)*ee,(me-ie)*z,.8*ee,(me-le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.8*ee,(me+le)*z,(ue+le+le)*ee,(me+ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ee,.75*z,.25*ee,.25*z).close()),oe.spot1=new go.Spot(.2,.25),oe.spot2=new go.Spot(.75,.75),oe}),go.Shape.defineFigureGenerator("XnorGate",function(de,ee,z){var oe=new go.Geometry,ie=.5,le=pe*ie,ue=.2,me=.5,xe=new go.PathFigure(.1*ee,0,!1);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,z,.35*ee,.25*z,.35*ee,.75*z));var Ae=new go.PathFigure(.8*ee,.5*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,z,.7*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,.45*ee,.75*z,.45*ee,.25*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.5*z,(ue+le)*ee,(me-ie)*z,.7*ee,(me-le)*z)),ie=.1,le=pe*.1,ue=.9,me=.5;var De=new go.PathFigure((ue-ie)*ee,me*z,!0);return oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*ee,me*z,(ue+le)*ee,(me-ie)*z,(ue+ie)*ee,(me-le)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*ee,me*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z)),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.65,.75),oe}),go.Shape.defineFigureGenerator("XorGate",function(de,ee,z){var oe=new go.Geometry,ie=.5,le=pe*ie,ue=.2,me=.5,xe=new go.PathFigure(.1*ee,0,!1);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,z,.35*ee,.25*z,.35*ee,.75*z));var Ae=new go.PathFigure(.2*ee,0,!0);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,(ue+le)*ee,(me-ie)*z,.9*ee,(me-le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,z,.9*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.2*ee,0,.45*ee,.75*z,.45*ee,.25*z).close()),oe.spot1=new go.Spot(.4,.25),oe.spot2=new go.Spot(.8,.75),oe}),go.Shape.defineFigureGenerator("Capacitor",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("Resistor",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Inductor",function(de,ee,z){var oe=new go.Geometry,ie=pe*.1,le=.1,ue=.1,me=.5,xe=new go.PathFigure((ue-ie*.5)*ee,z,!1);return oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,0,(ue-ie)*ee,z,(ue-le)*ee,0)),ue=.3,xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,z,(ue+le)*ee,0,(ue+ie)*ee,z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,0,(ue-ie)*ee,z,(ue-le)*ee,0)),ue=.5,xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,z,(ue+le)*ee,0,(ue+ie)*ee,z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,0,(ue-ie)*ee,z,(ue-le)*ee,0)),ue=.7,xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,z,(ue+le)*ee,0,(ue+ie)*ee,z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,0,(ue-ie)*ee,z,(ue-le)*ee,0)),ue=.9,xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie*.5)*ee,z,(ue+le)*ee,0,(ue+ie)*ee,z)),oe}),go.Shape.defineFigureGenerator("ACvoltageSource",function(de,ee,z){var oe=new go.Geometry,ie=pe*.5,le=.5,ue=.5,me=.5,xe=new go.PathFigure((ue-le)*ee,me*z,!1);return oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,me*z,(ue+ie)*ee,(me-le)*z,(ue+le)*ee,(me-ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*ee,me*z,(ue-ie)*ee,(me+le)*z,(ue-le)*ee,(me+ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Move,(ue-le+.1)*ee,me*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le-.1)*ee,me*z,ue*ee,(me-le)*z,ue*ee,(me+le)*z)),oe}),go.Shape.defineFigureGenerator("DCvoltageSource",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("Diode",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe.spot1=new go.Spot(0,.25),oe.spot2=new go.Spot(.5,.75),oe}),go.Shape.defineFigureGenerator("Wifi",function(de,ee,z){var oe=new go.Geometry,ie=ee,le=z;ee=ee*.38,z=z*.6;var ue=pe*.8,me=.8,xe=0,Ae=.5,De=(ie-ee)/2,Fe=(le-z)/2,je=new go.PathFigure(xe*ee+De,(Ae+me)*z+Fe,!0);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,(xe-me)*ee+De,Ae*z+Fe,(xe-ue)*ee+De,(Ae+me)*z+Fe,(xe-me)*ee+De,(Ae+ue)*z+Fe)),je.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae-me)*z+Fe,(xe-me)*ee+De,(Ae-ue)*z+Fe,(xe-ue)*ee+De,(Ae-me)*z+Fe)),je.add(new go.PathSegment(go.PathSegment.Bezier,(xe-me+ue*.5)*ee+De,Ae*z+Fe,xe*ee+De,(Ae-me)*z+Fe,(xe-me+ue*.5)*ee+De,(Ae-ue)*z+Fe)),je.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae+me)*z+Fe,(xe-me+ue*.5)*ee+De,(Ae+ue)*z+Fe,xe*ee+De,(Ae+me)*z+Fe).close()),ue=pe*.4,me=.4,xe=.2,Ae=.5;var Le=new go.PathFigure(xe*ee+De,(Ae+me)*z+Fe,!0);oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(xe-me)*ee+De,Ae*z+Fe,(xe-ue)*ee+De,(Ae+me)*z+Fe,(xe-me)*ee+De,(Ae+ue)*z+Fe)),Le.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae-me)*z+Fe,(xe-me)*ee+De,(Ae-ue)*z+Fe,(xe-ue)*ee+De,(Ae-me)*z+Fe)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(xe-me+ue*.5)*ee+De,Ae*z+Fe,xe*ee+De,(Ae-me)*z+Fe,(xe-me+ue*.5)*ee+De,(Ae-ue)*z+Fe)),Le.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae+me)*z+Fe,(xe-me+ue*.5)*ee+De,(Ae+ue)*z+Fe,xe*ee+De,(Ae+me)*z+Fe).close()),ue=pe*.2,me=.2,xe=.5,Ae=.5;var Be=new go.PathFigure((xe-me)*ee+De,Ae*z+Fe,!0);oe.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae-me)*z+Fe,(xe-me)*ee+De,(Ae-ue)*z+Fe,(xe-ue)*ee+De,(Ae-me)*z+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe+me)*ee+De,Ae*z+Fe,(xe+ue)*ee+De,(Ae-me)*z+Fe,(xe+me)*ee+De,(Ae-ue)*z+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae+me)*z+Fe,(xe+me)*ee+De,(Ae+ue)*z+Fe,(xe+ue)*ee+De,(Ae+me)*z+Fe)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(xe-me)*ee+De,Ae*z+Fe,(xe-ue)*ee+De,(Ae+me)*z+Fe,(xe-me)*ee+De,(Ae+ue)*z+Fe)),ue=pe*.4,me=.4,xe=.8,Ae=.5;var Ue=new go.PathFigure(xe*ee+De,(Ae-me)*z+Fe,!0);oe.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Bezier,(xe+me)*ee+De,Ae*z+Fe,(xe+ue)*ee+De,(Ae-me)*z+Fe,(xe+me)*ee+De,(Ae-ue)*z+Fe)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae+me)*z+Fe,(xe+me)*ee+De,(Ae+ue)*z+Fe,(xe+ue)*ee+De,(Ae+me)*z+Fe)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,(xe+me-ue*.5)*ee+De,Ae*z+Fe,xe*ee+De,(Ae+me)*z+Fe,(xe+me-ue*.5)*ee+De,(Ae+ue)*z+Fe)),Ue.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae-me)*z+Fe,(xe+me-ue*.5)*ee+De,(Ae-ue)*z+Fe,xe*ee+De,(Ae-me)*z+Fe).close()),ue=pe*.8,me=.8,xe=1,Ae=.5;var Je=new go.PathFigure(xe*ee+De,(Ae-me)*z+Fe,!0);return oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(xe+me)*ee+De,Ae*z+Fe,(xe+ue)*ee+De,(Ae-me)*z+Fe,(xe+me)*ee+De,(Ae-ue)*z+Fe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae+me)*z+Fe,(xe+me)*ee+De,(Ae+ue)*z+Fe,(xe+ue)*ee+De,(Ae+me)*z+Fe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(xe+me-ue*.5)*ee+De,Ae*z+Fe,xe*ee+De,(Ae+me)*z+Fe,(xe+me-ue*.5)*ee+De,(Ae+ue)*z+Fe)),Je.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee+De,(Ae-me)*z+Fe,(xe+me-ue*.5)*ee+De,(Ae-ue)*z+Fe,xe*ee+De,(Ae-me)*z+Fe).close()),oe}),go.Shape.defineFigureGenerator("Email",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,z)),le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.54*z)),le.add(new go.PathSegment(go.PathSegment.Move,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.54*z)),oe}),go.Shape.defineFigureGenerator("Ethernet",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.35*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,0).close());var le=new go.PathFigure(.1*ee,z,!0,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z).close());var ue=new go.PathFigure(.6*ee,z,!0,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.6*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.6*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*ee,z).close());var me=new go.PathFigure(0,.5*z,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.4*z)),me.add(new go.PathSegment(go.PathSegment.Move,.75*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.6*z)),me.add(new go.PathSegment(go.PathSegment.Move,.25*ee,.5*z)),me.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.6*z)),oe}),go.Shape.defineFigureGenerator("Power",function(de,ee,z){var oe=new go.Geometry,ie=pe*.4,le=.4,ue=.5,me=.5,xe=st(),Ae=st(),De=st(),Fe=st();Ge(ue,me-le,ue+ie,me-le,ue+le,me-ie,ue+le,me,.5,xe,xe,Ae,De,Fe);var je=ot(Ae.x,Ae.y),Le=new go.PathFigure(Ae.x*ee,Ae.y*z,!0);oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,me*z,De.x*ee,De.y*z,Fe.x*ee,Fe.y*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*ee,me*z,(ue-ie)*ee,(me+le)*z,(ue-le)*ee,(me+ie)*z)),Ge(ue-le,me,ue-le,me-ie,ue-ie,me-le,ue,me-le,.5,De,Fe,Ae,xe,xe),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*ee,Ae.y*z,De.x*ee,De.y*z,Fe.x*ee,Fe.y*z)),ie=pe*.3,le=.3,Ge(ue-le,me,ue-le,me-ie,ue-ie,me-le,ue,me-le,.5,De,Fe,Ae,xe,xe),Le.add(new go.PathSegment(go.PathSegment.Line,Ae.x*ee,Ae.y*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*ee,me*z,Fe.x*ee,Fe.y*z,De.x*ee,De.y*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+le)*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*ee,me*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),Ge(ue,me-le,ue+ie,me-le,ue+le,me-ie,ue+le,me,.5,xe,xe,Ae,De,Fe),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ae.x*ee,Ae.y*z,Fe.x*ee,Fe.y*z,De.x*ee,De.y*z).close());var Le=new go.PathFigure(.45*ee,0,!0);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.5*z)),Le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.5*z)),Le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,0).close()),Ft(xe),Ft(Ae),Ft(De),Ft(Fe),Ft(je),oe.spot1=new go.Spot(.25,.45),oe.spot2=new go.Spot(.75,.8),oe}),go.Shape.defineFigureGenerator("Fallout",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z/2,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,ee/2,z/2,ee/2,z/2));function le(ue,me,xe){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+me)*ee,(.8+xe)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+me)*ee,(.5+xe)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+me)*ee,(.5+xe)*z)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+me)*ee,(.8+xe)*z).close())}return le(ie,0,0),le(ie,.4,0),le(ie,.2,-.3),oe}),go.Shape.defineFigureGenerator("IrritationHazard",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.2*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.3*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*z).close()),oe.spot1=new go.Spot(.3,.3),oe.spot2=new go.Spot(.7,.7),oe}),go.Shape.defineFigureGenerator("ElectricalHazard",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.37*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.11*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*ee,.04*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.49*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.37*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*ee,.86*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*ee,.91*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*ee,.78*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.56*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.68*z).close()),oe}),go.Shape.defineFigureGenerator("FireHazard",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.1*ee,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*ee,0,-.25*ee,.63*z,.45*ee,.44*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*ee,.42*z,.48*ee,.17*z,.54*ee,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*ee,.18*z,.59*ee,.29*z,.58*ee,.28*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*ee,.6*z,.8*ee,.34*z,.88*ee,.43*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*ee,.31*z,.87*ee,.48*z,.88*ee,.43*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,z,1.17*ee,.76*z,.82*ee,.8*z).close()),oe.spot1=new go.Spot(.07,.445),oe.spot2=new go.Spot(.884,.958),oe}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(de,ee,z){var oe=new go.Geometry,ie=.5,le=0,ue=0,me=ie*pe,xe=.4*Math.SQRT2/2+.5,Ae=.5-.5*Math.SQRT2/2,De=1,Fe=.5,je=.5,Le=0,Be=new go.PathFigure(xe*ee,(1-Ae)*z,!1);return oe.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,De*ee,Fe*z,De*ee,.7*z,De*ee,Fe*z)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(je+le)*ee,(Le+le)*z,(.5+ie+le)*ee,(.5-me+le)*z,(.5+me+le)*ee,(.5-ie+le)*z)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*ee,(.5+ue)*z,(.5-me+le)*ee,(.5-ie+ue)*z,(.5-ie+le)*ee,(.5-me+ue)*z)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*ee,.9*z,(.5-ie+le)*ee,(.5+me+ue)*z,(.5-me+le)*ee,.9*z)),Be.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*ee,.8*z)),Be.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*ee,.9*z)),Be.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*ee,.95*z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Move,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var le=new go.PathFigure(ee,z,!1);oe.add(le);var ue=new go.PathFigure(0,.5*z,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.5*z,.2*ee,.35*z,.3*ee,.35*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.7*ee,.65*z,.8*ee,.65*z)),oe}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z).close()),oe}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.2*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z).close());var ie=new go.PathFigure(0,.2*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),oe}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.7*ee,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,0,.6*ee,.5*z,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,z,.4*ee,.5*z,ee,.5*z).close());var le=new go.PathFigure(.45*ee,.73*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.73*z)),le.add(new go.PathSegment(go.PathSegment.Move,.38*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,.63*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Move,.31*ee,.27*z)),le.add(new go.PathSegment(go.PathSegment.Line,.56*ee,.27*z)),oe}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var le=new go.PathFigure(.335*ee,(1-.555)*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.335*ee,(1-.405)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.405)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.555)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,ee,.68*z,(1-.12)*ee,.46*z,(1-.02)*ee,.54*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.68*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.335*ee,(1-.555)*z,.02*ee,.54*z,.12*ee,.46*z)),le.add(new go.PathSegment(go.PathSegment.Line,.365*ee,(1-.595)*z));var ue=.5-.285,me=.5,xe=ue,Ae=Math.PI/4,De=4*(1-Math.cos(Ae))/(3*Math.sin(Ae)),Fe=De*.5,je=ue,Le=ue,Be=De*je,Ue=De*Le;le.add(new go.PathSegment(go.PathSegment.Bezier,(me-je)*ee,xe*z,(me-(Be+je)/2)*ee,(xe+(Le+Ue)/2)*z,(me-je)*ee,(xe+Ue)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,me*ee,(xe-Le)*z,(me-je)*ee,(xe-Ue)*z,(me-Be)*ee,(xe-Le)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,(me+je)*ee,xe*z,(me+Be)*ee,(xe-Le)*z,(me+je)*ee,(xe-Ue)*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ee,(1-.595)*z,(me+je)*ee,(xe+Ue)*z,(me+(Be+je)/2)*ee,(xe+(Le+Ue)/2)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ee,(1-.595)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.555)*z)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ee,(1-.405)*z)),le.add(new go.PathSegment(go.PathSegment.Line,.335*ee,(1-.405)*z));var Je=new go.PathFigure(.2*ee,z,!1);oe.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.8*z));var He=new go.PathFigure(.8*ee,z,!1);return oe.add(He),He.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.1*ee,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,z).close());var le=new go.PathFigure(.2*ee,.2*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),le.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventError",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie);var le=new go.PathFigure(ee,z,!1);oe.add(le);var ue=new go.PathFigure(.1*ee,z,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("Caution",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.05*ee,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,.8*z,0,z,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*ee,.1*z,.5*ee,0,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,z,ee,z,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*ee,z));var le=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-le)*ee,.875*z)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ee,.875*z,le*ee,le*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.325*z,.575*ee,.725*z,.625*ee,.375*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.75*z,.375*ee,.375*z,.425*ee,.725*z)),oe}),go.Shape.defineFigureGenerator("Recycle",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.45*ee,.95*z,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*ee,.85*z,.17*ee,.95*z,.15*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*ee,.625*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*ee,.575*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*ee,.95*z,0,.675*z,0,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.775*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*ee,.775*z));var le=new go.PathFigure(.475*ee,.2*z,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,.225*ee,.3*z)),le.add(new go.PathSegment(go.PathSegment.Line,.275*ee,.175*z)),le.add(new go.PathSegment(go.PathSegment.Line,.325*ee,.05*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,.05*z,.35*ee,0,.375*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.375*z)),le.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.475*z)),le.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.315*z)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.32*z)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.05*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.575*ee,0,.65*ee,.05*z,.625*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.38*ee,.0105*z));var ue=new go.PathFigure(.675*ee,.575*z,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.875*ee,.525*z)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.775*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.85*ee,.95*z,ee,.8*z,ee,.85*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.95*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.85*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.725*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.775*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.775*z)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.775*z)),ue.add(new go.PathSegment(go.PathSegment.Move,.675*ee,.575*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.775*ee,.775*z)),oe}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(de,ee,z){var oe=new go.Geometry,ie=.5,le=pe*.5,ue=new go.PathFigure(ee,ie*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*ee,z,ee,(ie+le)*z,(ie+le)*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*z,(ie-le)*ee,z,0,(ie+le)*z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*ee,0,0,(ie-le)*z,(ie-le)*ee,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee,ie*z,(ie+le)*ee,0,ee,(ie-le)*z));var me=new go.PathFigure(ie*ee,0,!1);return oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ie*ee,.15*z)),me.add(new go.PathSegment(go.PathSegment.Move,ie*ee,z)),me.add(new go.PathSegment(go.PathSegment.Line,ie*ee,.85*z)),me.add(new go.PathSegment(go.PathSegment.Move,0,ie*z)),me.add(new go.PathSegment(go.PathSegment.Line,.15*ee,ie*z)),me.add(new go.PathSegment(go.PathSegment.Move,ee,ie*z)),me.add(new go.PathSegment(go.PathSegment.Line,.85*ee,ie*z)),me.add(new go.PathSegment(go.PathSegment.Move,ie*ee,ie*z)),me.add(new go.PathSegment(go.PathSegment.Line,.58*ee,.1*z)),me.add(new go.PathSegment(go.PathSegment.Move,ie*ee,ie*z)),me.add(new go.PathSegment(go.PathSegment.Line,.78*ee,.54*z)),oe}),go.Shape.defineFigureGenerator("Package",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.15*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close());var le=new go.PathFigure(0,.15*z,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.15*z).close()),oe.spot1=new go.Spot(0,.1),oe.spot2=new go.Spot(1,1),oe}),go.Shape.defineFigureGenerator("Class",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*z,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z).close());var ue=new go.PathFigure(0,.5*z,!1);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z).close()),oe}),go.Shape.defineFigureGenerator("Component",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z).close());var le=new go.PathFigure(0,.2*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.2*z)),le.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*z).close());var ue=new go.PathFigure(0,.6*z,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.6*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.8*z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*z).close()),oe}),go.Shape.defineFigureGenerator("Boat Shipment",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.15*ee,.6*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.6*z));var le=new go.PathFigure(.15*ee,.6*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.6*z)),oe}),go.Shape.defineFigureGenerator("Customer/Supplier",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*ee,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe}),go.Shape.defineFigureGenerator("Workcell",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),oe}),go.Shape.defineFigureGenerator("Supermarket",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,.33*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.66*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*z)),ie.add(new go.PathSegment(go.PathSegment.Move,ee,.66*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),oe}),go.Shape.defineFigureGenerator("TruckShipment",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(ee,.8*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z).close());var ue=.1,me=pe*.1,xe=.2,Ae=.9,De=new go.PathFigure((xe-ue)*ee,Ae*z,!0);oe.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae-ue)*z,(xe-ue)*ee,(Ae-me)*z,(xe-me)*ee,(Ae-ue)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ue)*ee,Ae*z,(xe+me)*ee,(Ae-ue)*z,(xe+ue)*ee,(Ae-me)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae+ue)*z,(xe+ue)*ee,(Ae+me)*z,(xe+me)*ee,(Ae+ue)*z)),De.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ue)*ee,Ae*z,(xe-me)*ee,(Ae+ue)*z,(xe-ue)*ee,(Ae+me)*z).close()),ue=.1,me=pe*.1,xe=.8,Ae=.9;var Fe=new go.PathFigure((xe-ue)*ee,Ae*z,!0);return oe.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae-ue)*z,(xe-ue)*ee,(Ae-me)*z,(xe-me)*ee,(Ae-ue)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe+ue)*ee,Ae*z,(xe+me)*ee,(Ae-ue)*z,(xe+ue)*ee,(Ae-me)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,xe*ee,(Ae+ue)*z,(xe+ue)*ee,(Ae+me)*z,(xe+me)*ee,(Ae+ue)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(xe-ue)*ee,Ae*z,(xe-me)*ee,(Ae+ue)*z,(xe-ue)*ee,(Ae+me)*z).close()),oe}),go.Shape.defineFigureGenerator("KanbanPost",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.2*ee,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,z)),oe}),go.Shape.defineFigureGenerator("Forklift",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.8*z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var ue=new go.PathFigure(.5*ee,.8*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.1*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.1*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.8*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.8*z));var me=new go.PathFigure(.5*ee,.7*z,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee,.7*z));var xe=.1,Ae=pe*.1,De=.1,Fe=.9,je=new go.PathFigure((De-xe)*ee,Fe*z,!0);oe.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,De*ee,(Fe-xe)*z,(De-xe)*ee,(Fe-Ae)*z,(De-Ae)*ee,(Fe-xe)*z)),je.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*ee,Fe*z,(De+Ae)*ee,(Fe-xe)*z,(De+xe)*ee,(Fe-Ae)*z)),je.add(new go.PathSegment(go.PathSegment.Bezier,De*ee,(Fe+xe)*z,(De+xe)*ee,(Fe+Ae)*z,(De+Ae)*ee,(Fe+xe)*z)),je.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*ee,Fe*z,(De-Ae)*ee,(Fe+xe)*z,(De-xe)*ee,(Fe+Ae)*z)),xe=.1,Ae=pe*.1,De=.4,Fe=.9;var Le=new go.PathFigure((De-xe)*ee,Fe*z,!0);return oe.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,De*ee,(Fe-xe)*z,(De-xe)*ee,(Fe-Ae)*z,(De-Ae)*ee,(Fe-xe)*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(De+xe)*ee,Fe*z,(De+Ae)*ee,(Fe-xe)*z,(De+xe)*ee,(Fe-Ae)*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,De*ee,(Fe+xe)*z,(De+xe)*ee,(Fe+Ae)*z,(De+Ae)*ee,(Fe+xe)*z)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(De-xe)*ee,Fe*z,(De-Ae)*ee,(Fe+xe)*z,(De-xe)*ee,(Fe+Ae)*z)),oe}),go.Shape.defineFigureGenerator("RailShipment",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.1*ee,.4*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.9*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.4*z).close());var le=new go.PathFigure(.45*ee,.7*z,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.7*z));var ue=new go.PathFigure(.55*ee,.4*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.9*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.9*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*ee,.4*z).close());var De=.05,Fe=pe*.05,je=.175,Le=.95,me=new go.PathFigure((je-De)*ee,Le*z,!0);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,je*ee,(Le-De)*z,(je-De)*ee,(Le-Fe)*z,(je-Fe)*ee,(Le-De)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,(je+De)*ee,Le*z,(je+Fe)*ee,(Le-De)*z,(je+De)*ee,(Le-Fe)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,je*ee,(Le+De)*z,(je+De)*ee,(Le+Fe)*z,(je+Fe)*ee,(Le+De)*z)),me.add(new go.PathSegment(go.PathSegment.Bezier,(je-De)*ee,Le*z,(je-Fe)*ee,(Le+De)*z,(je-De)*ee,(Le+Fe)*z));var De=.05,Fe=pe*.05,je=.375,Le=.95,xe=new go.PathFigure((je-De)*ee,Le*z,!0);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,je*ee,(Le-De)*z,(je-De)*ee,(Le-Fe)*z,(je-Fe)*ee,(Le-De)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(je+De)*ee,Le*z,(je+Fe)*ee,(Le-De)*z,(je+De)*ee,(Le-Fe)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,je*ee,(Le+De)*z,(je+De)*ee,(Le+Fe)*z,(je+Fe)*ee,(Le+De)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(je-De)*ee,Le*z,(je-Fe)*ee,(Le+De)*z,(je-De)*ee,(Le+Fe)*z));var De=.05,Fe=pe*.05,je=.625,Le=.95,Ae=new go.PathFigure((je-De)*ee,Le*z,!0);oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,je*ee,(Le-De)*z,(je-De)*ee,(Le-Fe)*z,(je-Fe)*ee,(Le-De)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(je+De)*ee,Le*z,(je+Fe)*ee,(Le-De)*z,(je+De)*ee,(Le-Fe)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,je*ee,(Le+De)*z,(je+De)*ee,(Le+Fe)*z,(je+Fe)*ee,(Le+De)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(je-De)*ee,Le*z,(je-Fe)*ee,(Le+De)*z,(je-De)*ee,(Le+Fe)*z));var De=.05,Fe=pe*.05,je=.825,Le=.95,Be=new go.PathFigure((je-De)*ee,Le*z,!0);oe.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,je*ee,(Le-De)*z,(je-De)*ee,(Le-Fe)*z,(je-Fe)*ee,(Le-De)*z)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(je+De)*ee,Le*z,(je+Fe)*ee,(Le-De)*z,(je+De)*ee,(Le-Fe)*z)),Be.add(new go.PathSegment(go.PathSegment.Bezier,je*ee,(Le+De)*z,(je+De)*ee,(Le+Fe)*z,(je+Fe)*ee,(Le+De)*z)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(je-De)*ee,Le*z,(je-Fe)*ee,(Le+De)*z,(je-De)*ee,(Le+Fe)*z).close());var Ue=new go.PathFigure(0,z,!1);return oe.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Line,ee,z).close()),oe}),go.Shape.defineFigureGenerator("Warehouse",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*z,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z).close());var ue=new go.PathFigure(.15*ee,z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.5*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.5*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*ee,z)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*ee,z).close());var me=.05,xe=pe*.05,Ae=.35,De=.775,Fe=new go.PathFigure((Ae-me)*ee,De*z,!0);return oe.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De-me)*z,(Ae-me)*ee,(De-xe)*z,(Ae-xe)*ee,(De-me)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae+me)*ee,De*z,(Ae+xe)*ee,(De-me)*z,(Ae+me)*ee,(De-xe)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Ae*ee,(De+me)*z,(Ae+me)*ee,(De+xe)*z,(Ae+xe)*ee,(De+me)*z)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Ae-me)*ee,De*z,(Ae-xe)*ee,(De+me)*z,(Ae-me)*ee,(De+xe)*z).close()),oe}),go.Shape.defineFigureGenerator("ControlCenter",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z).close()),oe}),go.Shape.defineFigureGenerator("Bluetooth",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.75*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*z)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Bookmark",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Globe",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.5*z,.75*ee,0,ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,ee,.75*z,.75*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,.25*ee,z,0,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,0,.25*z,.25*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,z,.15*ee,.25*z,.15*ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.85*ee,.75*z,.85*ee,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*ee,.15*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ee,.15*z,.35*ee,.3*z,.65*ee,.3*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ee,.85*z,.35*ee,.7*z,.65*ee,.7*z)),oe}),go.Shape.defineFigureGenerator("Wave",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.25*z,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.25*z,.1*ee,0,.2*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,.25*z,.425*ee,.5*z,.575*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.25*z,.8*ee,0,.9*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.75*z,.1*ee,.5*z,.2*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*ee,.75*z,.425*ee,z,.575*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.75*z,.8*ee,.5*z,.9*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Operator",function(de,ee,z){var oe=new go.Geometry,ie=.3,le=pe*.3,ue=.5,me=.7,xe=new go.PathFigure((ue-ie)*ee,me*z,!0);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*ee,me*z,(ue+le)*ee,(me-ie)*z,(ue+ie)*ee,(me-le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*ee,me*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z));var Ae=new go.PathFigure(0,.7*z,!1);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ee,.7*z,0,0,ee,0)),oe}),go.Shape.defineFigureGenerator("TripleFanBlades",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.5*ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.65*ee,.3*z,.65*ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.35*ee,.5*z,.35*ee,.3*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,z,.3*ee,.6*z,.1*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.2*ee,z,.35*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,z,.7*ee,.6*z,.9*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.65*z,.8*ee,z,.65*ee,.95*z)),oe}),go.Shape.defineFigureGenerator("CentrifugalPump",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee,0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,0,.075*z,0,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*ee,z,0,z,.4*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.4*z,.8*ee,z,.85*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,0)),oe}),go.Shape.defineFigureGenerator("Battery",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.1*z));var le=new go.PathFigure(0,.6*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*z)),le.add(new go.PathSegment(go.PathSegment.Line,ee,.4*z)),oe}),go.Shape.defineFigureGenerator("Delete",function(de,ee,z){var oe=new go.Geometry,ie=.5,le=pe*.5,ue=.5,me=.5,xe=new go.PathFigure((ue-ie)*ee,me*z,!0);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*ee,me*z,(ue+le)*ee,(me-ie)*z,(ue+ie)*ee,(me-le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*ee,me*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z));var Ae=new go.PathFigure(.15*ee,.5*z,!1);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.5*z)),oe}),go.Shape.defineFigureGenerator("Flag",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.1*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.1*z,.15*ee,0,.35*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,ee,.1*z,.65*ee,.2*z,.85*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.5*z,.85*ee,.6*z,.65*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*z,.35*ee,.4*z,.15*ee,.4*z).close()),oe}),go.Shape.defineFigureGenerator("Help",function(de,ee,z){var oe=new go.Geometry,ie=.5,le=pe*.5,ue=.5,me=.5,xe=new go.PathFigure((ue-ie)*ee,me*z,!1);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*ee,me*z,(ue+le)*ee,(me-ie)*z,(ue+ie)*ee,(me-le)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*ee,me*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z).close()),ie=.05,le=pe*.05,ue=.5,me=.8;var Ae=new go.PathFigure((ue-ie)*ee,me*z,!1);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me-ie)*z,(ue-ie)*ee,(me-le)*z,(ue-le)*ee,(me-ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*ee,me*z,(ue+le)*ee,(me-ie)*z,(ue+ie)*ee,(me-le)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*ee,(me+ie)*z,(ue+ie)*ee,(me+le)*z,(ue+le)*ee,(me+ie)*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*ee,me*z,(ue-le)*ee,(me+ie)*z,(ue-ie)*ee,(me+le)*z).close()),Ae.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.7*z)),Ae.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.5*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,.2*z,.75*ee,.475*z,.75*ee,.225*z)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.35*z,.4*ee,.2*z,.3*ee,.25*z)),oe}),go.Shape.defineFigureGenerator("Location",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(.5*ee,z,!0).add(new go.PathSegment(go.PathSegment.Line,.75*ee,.5*z)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ee,0,.975*ee,.025*z,.5*ee,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*ee,.5*z,.5*ee,0,.025*ee,.025*z).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ee,.2*z)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*ee,.3*z,.1*ee,.1*z).close()))}),go.Shape.defineFigureGenerator("Lock",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var le=new go.PathFigure(.2*ee,.5*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.3*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.3*z,.25*ee,0,.75*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.3*z)),oe}),go.Shape.defineFigureGenerator("Unlocked",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.5*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*z));var le=new go.PathFigure(.2*ee,.5*z,!1);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*ee,.5*z)),le.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.3*z)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*ee,.3*z,.25*ee,0,.75*ee,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*ee,.35*z)),oe}),go.Shape.defineFigureGenerator("Gear",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(.9375*ee,.56246875*z,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*ee,.4375*z)).add(new go.PathSegment(go.PathSegment.Line,.80621875*ee,.4375*z)).add(new go.PathSegment(go.PathSegment.Bezier,.763*ee,.3316875*z,.79840625*ee,.39915625*z,.7834375*ee,.3635*z)).add(new go.PathSegment(go.PathSegment.Line,.8566875*ee,.23796875*z)).add(new go.PathSegment(go.PathSegment.Line,.76825*ee,.14959375*z)).add(new go.PathSegment(go.PathSegment.Line,.67596875*ee,.24184375*z)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*ee,.19378125*z,.64228125*ee,.2188125*z,.603875*ee,.2021875*z)).add(new go.PathSegment(go.PathSegment.Line,.5625*ee,.0625*z)).add(new go.PathSegment(go.PathSegment.Line,.4375*ee,.0625*z)).add(new go.PathSegment(go.PathSegment.Line,.4375*ee,.19378125*z)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*ee,.239375*z,.39759375*ee,.20190625*z,.36053125*ee,.2176875*z)).add(new go.PathSegment(go.PathSegment.Line,.2379375*ee,.14959375*z)).add(new go.PathSegment(go.PathSegment.Line,.14953125*ee,.2379375*z)).add(new go.PathSegment(go.PathSegment.Line,.23934375*ee,.3278125*z)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*ee,.4375*z,.21765625*ee,.36059375*z,.201875*ee,.397625*z)).add(new go.PathSegment(go.PathSegment.Line,.0625*ee,.4375*z)).add(new go.PathSegment(go.PathSegment.Line,.0625*ee,.5625*z)).add(new go.PathSegment(go.PathSegment.Line,.1938125*ee,.5625*z)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*ee,.67596875*z,.20221875*ee,.603875*z,.21884375*ee,.64228125*z)).add(new go.PathSegment(go.PathSegment.Line,.1495625*ee,.76825*z)).add(new go.PathSegment(go.PathSegment.Line,.238*ee,.8566875*z)).add(new go.PathSegment(go.PathSegment.Line,.3316875*ee,.76296875*z)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*ee,.80621875*z,.36353125*ee,.78340625*z,.3991875*ee,.79840625*z)).add(new go.PathSegment(go.PathSegment.Line,.43753125*ee,.9375*z)).add(new go.PathSegment(go.PathSegment.Line,.5625*ee,.9375*z)).add(new go.PathSegment(go.PathSegment.Line,.5625*ee,.80621875*z)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*ee,.760625*z,.602375*ee,.79809375*z,.63946875*ee,.78234375*z)).add(new go.PathSegment(go.PathSegment.Line,.76828125*ee,.8566875*z)).add(new go.PathSegment(go.PathSegment.Line,.85671875*ee,.76825*z)).add(new go.PathSegment(go.PathSegment.Line,.76065625*ee,.67221875*z)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*ee,.56246875*z,.78234375*ee,.63940625*z,.798125*ee,.602375*z)).add(new go.PathSegment(go.PathSegment.Line,.9375*ee,.56246875*z).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ee,.6*z)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*ee,.5*z,.1*ee,.1*z).close()))}),go.Shape.defineFigureGenerator("Hand",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.5*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*ee,.3*z,0,.375*z,.05*ee,.325*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*ee,.075*z,.3*ee,.225*z,.4*ee,.175*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*ee,.075*z,.46*ee,.05*z,.525*ee,.05*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*ee,.4*z,.525*ee,.275*z,.475*ee,.325*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.55*z,ee,.4*z,ee,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*ee,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*ee,.7*z,.675*ee,.55*z,.675*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*ee,.85*z,.65*ee,.7*z,.65*ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*ee,.85*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*ee,z,.61*ee,.85*z,.61*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*z,.435*ee,z,0,z).close()),oe}),go.Shape.defineFigureGenerator("Map",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,.2*z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*ee,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*ee,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*ee,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*ee,.8*z)),oe}),go.Shape.defineFigureGenerator("Eject",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.7).close());var le=new go.PathFigure(0,z*.6,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee,.6*z)),le.add(new go.PathSegment(go.PathSegment.Line,.5*ee,0).close()),oe}),go.Shape.defineFigureGenerator("Pencil",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*ee,.1*z)).add(new go.PathSegment(go.PathSegment.Line,ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.9*ee,z)).add(new go.PathSegment(go.PathSegment.Line,.1*ee,.2*z).close()))}),go.Shape.defineFigureGenerator("Building",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*1,z*1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*ee,z*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ee,z*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,ee,z*.85).close());var le=new go.PathFigure(.126*ee,.85*z,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*ee,.45*z)),le.add(new go.PathSegment(go.PathSegment.Line,.322*ee,.45*z)),le.add(new go.PathSegment(go.PathSegment.Line,.322*ee,.85*z).close());var ue=new go.PathFigure(.402*ee,.85*z,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.402*ee,.45*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*ee,.45*z)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*ee,.85*z).close());var me=new go.PathFigure(.678*ee,.85*z,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.678*ee,.45*z)),me.add(new go.PathSegment(go.PathSegment.Line,.874*ee,.45*z)),me.add(new go.PathSegment(go.PathSegment.Line,.874*ee,.85*z).close());var xe=new go.PathFigure(.5*ee,.1*z,!1);return oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ee,.3*z)),xe.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ee,.3*z).close()),oe}),go.Shape.defineFigureGenerator("Staircase",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z*1,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.15,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.15,z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*.95).close()),oe}),go.Shape.defineFigureGenerator("5Bars",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,z*1,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.184,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.184,z*(1-.184)).close());var le=new go.PathFigure(ee*.204,z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.204,z*(1-.184))),le.add(new go.PathSegment(go.PathSegment.Line,ee*.388,z*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,ee*.388,z*1).close());var ue=new go.PathFigure(ee*.408,z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.408,z*(1-.184*2))),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.592,z*(1-.184*3))),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.592,z*1).close());var me=new go.PathFigure(ee*.612,z,!0);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee*.612,z*(1-.184*3))),me.add(new go.PathSegment(go.PathSegment.Line,ee*.796,z*(1-.184*4))),me.add(new go.PathSegment(go.PathSegment.Line,ee*.796,z*1).close());var xe=new go.PathFigure(ee*.816,z,!0);return oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ee*.816,z*(1-.184*4))),xe.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-.184*5))),xe.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1).close()),oe}),go.Shape.defineFigureGenerator("PC",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,0).close());var le=new go.PathFigure(ee*.055,.07*z,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.07)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.1)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.055,z*.1).close());var ue=new go.PathFigure(ee*.055,.13*z,!0);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.13)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.16)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.055,z*.16).close());var me=new go.PathFigure(ee*.055,.18*z,!0);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.18)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.245,z*.21)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.055,z*.21).close());var xe=new go.PathFigure(ee*1,0,!0);return oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ee*.4,0)),xe.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.65)),xe.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.65).close()),oe}),go.Shape.defineFigureGenerator("Plane",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(.55*ee,z,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.7*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*ee,.475*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*ee,.525*z,0,.4*z,.225*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*ee,.475*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*ee,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*ee,.325*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.325*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*ee,.1*z)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*ee,.2*z,.975*ee,0,ee,.08*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*ee,.45*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*ee,.95*z)),ie.add(new go.PathSegment(go.PathSegment.Line,.55*ee,z).close()),oe}),go.Shape.defineFigureGenerator("Key",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*1,z*.5,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.9,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.4*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.15,.2*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*z)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.15,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,.8*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.65*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.6,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.65,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.7,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,.55*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,.6*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.85,.575*z)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.9,.6*z).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*ee,.425*z)),ie.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*ee,.5*z,.075*ee,.075*z).close()),oe}),go.Shape.defineFigureGenerator("FilmTape",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(0,0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,ee*0,ee*.3,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.08,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.08,z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*1),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*1),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*2),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*2),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*3),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*3),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*4),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*4),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*5),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*5),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*6),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*6),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*7),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*7),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*8),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*8),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*9),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*9),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*10),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*10),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*11),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*11),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*12),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*12),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*13),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*13),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*14),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*14),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*15),z*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(.08+.056*15),z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1));var le=new go.PathFigure(0,0,!1);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*0)),le.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ee*1,ee*.3,ee*.055)),le.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1));var ue=new go.PathFigure(ee*.11,z*.1,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*0),z*.1)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*0),z*.8)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.11,z*.8).close());var me=new go.PathFigure(ee*(.11+.24133333*1+.028*1),z*.1,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*1),z*.1)),me.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*1),z*.8)),me.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*1+.028*1),z*.8).close());var xe=new go.PathFigure(ee*(.11+.24133333*2+.028*2),z*.1,!1);return oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*3+.028*2),z*.1)),xe.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*3+.028*2),z*.8)),xe.add(new go.PathSegment(go.PathSegment.Line,ee*(.11+.24133333*2+.028*2),z*.8).close()),oe}),go.Shape.defineFigureGenerator("FloppyDisk",function(de,ee,z){var oe=new go.Geometry,ie=8,le=ie*pe,ue=new go.PathFigure(ie,0,!1);oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.86,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.14)),ue.add(new go.PathSegment(go.PathSegment.Line,ee,z-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee-ie,z,ee,z-le,ee-le,z)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,z-ie,le,z,0,z-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 me=new go.PathFigure(ee*.83,0,!1);oe.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee*.83,z*.3)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*.3)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*0).close());var xe=new go.PathFigure(ee*.83,z*1,!1);oe.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ee*.83,z*.5)),xe.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*.5)),xe.add(new go.PathSegment(go.PathSegment.Line,ee*.17,z*1).close());var Ae=new go.PathFigure(ee*.78,z*.05,!1);return oe.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.05)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.25)),Ae.add(new go.PathSegment(go.PathSegment.Line,ee*.78,z*.25).close()),oe}),go.Shape.defineFigureGenerator("SpeechBubble",function(de,ee,z){var oe=de?de.parameter1:NaN;(isNaN(oe)||oe<0)&&(oe=15),oe=Math.min(oe,ee/3),oe=Math.min(oe,z/3);var ie=oe*pe,le=z*.8,ue=new go.Geometry,me=new go.PathFigure(oe,0,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ee-oe,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee,oe,ee-ie,0,ee,ie)),me.add(new go.PathSegment(go.PathSegment.Line,ee,le-oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,ee-oe,le,ee,le-ie,ee-ie,le)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.7,le)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z)),me.add(new go.PathSegment(go.PathSegment.Line,ee*.55,le)),me.add(new go.PathSegment(go.PathSegment.Line,oe,le)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,le-oe,ie,le,0,le-ie)),me.add(new go.PathSegment(go.PathSegment.Line,0,oe)),me.add(new go.PathSegment(go.PathSegment.Bezier,oe,0,0,ie,ie,0).close()),ie>1?(ue.spot1=new go.Spot(0,0,ie,ie),ue.spot2=new go.Spot(1,.8,-ie,-ie)):(ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.8)),ue}),go.Shape.defineFigureGenerator("Repeat",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*0,z*.45,!0);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.2,z*.45).close());var le=new go.PathFigure(ee*1,z*.55,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*1)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.55)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*.55)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*.1)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.1)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*0)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*.55).close()),oe}),go.Shape.defineFigureGenerator("Windows",function(de,ee,z){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ee,0)).add(new go.PathSegment(go.PathSegment.Line,ee,z)).add(new go.PathSegment(go.PathSegment.Line,0,z).close()).add(new go.PathSegment(go.PathSegment.Move,.4*ee,.4*z)).add(new go.PathSegment(go.PathSegment.Line,.4*ee,.8*z)).add(new go.PathSegment(go.PathSegment.Line,.9*ee,.8*z)).add(new go.PathSegment(go.PathSegment.Line,.9*ee,.4*z).close()).add(new go.PathSegment(go.PathSegment.Move,.2*ee,.1*z)).add(new go.PathSegment(go.PathSegment.Line,.2*ee,.6*z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,.6*z)).add(new go.PathSegment(go.PathSegment.Line,.7*ee,.1*z).close()).add(new go.PathSegment(go.PathSegment.Move,.1*ee,.6*z)).add(new go.PathSegment(go.PathSegment.Line,.1*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,.9*z)).add(new go.PathSegment(go.PathSegment.Line,.5*ee,.6*z).close()))}),go.Shape.defineFigureGenerator("Terminal",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*0,z*.1,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*.9).close());var le=new go.PathFigure(ee*.1,z*.2,!0);oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.25)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.22,z*.285)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.32)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.1,z*.37)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.275,z*.32)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.275,z*.25).close());var ue=new go.PathFigure(ee*.28,z*.37,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.37)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.41)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.28,z*.41).close()),oe}),go.Shape.defineFigureGenerator("Beaker",function(de,ee,z){var oe=new go.Geometry,ie=15,le=ie*pe,ue=new go.PathFigure(ee*.62,z*.475,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee,z-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ee-ie,z,ee,z-le,ee-le,z)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,z)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,z-ie,le,z,0,z-le)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.38,z*.475)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.38,z*.03)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*0)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*0)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.62,z*.03).close()),le>1?(oe.spot1=new go.Spot(0,0,le,le),oe.spot2=new go.Spot(1,1,-le,-le)):(oe.spot1=go.Spot.TopLeft,oe.spot2=go.Spot.BottomRight),oe}),go.Shape.defineFigureGenerator("Download",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*0,z*1,!0);oe.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-le)).close());var ue=new go.PathFigure(ee*.4,z*0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.26,z*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.66)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.26),z*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*0).close()),oe}),go.Shape.defineFigureGenerator("Bin",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*0,z*1,!0);oe.add(ie);var le=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-le)).close()),oe}),go.Shape.defineFigureGenerator("Upload",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*0,z*1,!0);oe.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.8,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.66,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.755,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.93,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.64,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.61,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.39,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.36,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.07,z*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.755),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.66),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*(1-.8),z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*(1-le)).close());var ue=new go.PathFigure(ee*.5,z*0,!0);return oe.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.26,z*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.4,z*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.6,z*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,ee*.74,z*.25).close()),oe}),go.Shape.defineFigureGenerator("EmptyDrink",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*.15,z*0,!1);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.85,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1).close()),oe}),go.Shape.defineFigureGenerator("Drink",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*.15,z*0,!1);oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.85,z*0)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.7,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.3,z*1).close());var le=new go.PathFigure(ee*.235,z*.28,!0);return oe.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ee*.765,z*.28)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.655,z*.97)),le.add(new go.PathSegment(go.PathSegment.Line,ee*.345,z*.97).close()),oe}),go.Shape.defineFigureGenerator("4Arrows",function(de,ee,z){var oe=new go.Geometry,ie=new go.PathFigure(ee*.5,z*0,!0);return oe.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*1,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.75,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.55,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.65,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.5,z*1)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*0,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.25,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.45,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,ee*.35,z*.25).close()),oe}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Sn={},vn="5.0",ot={},st=null,Ft=!1,ae=!1,Ge=null,Re=!1,fe=null,pe=null,be=0;be<arguments.length;be++){var Ee=arguments[be];if(Ee!==null)switch(typeof Ee){case"number":vn=Ee.toFixed(1);break;case"string":Ee.match(new RegExp("^[0-9]\\.[0-9]+$"))?vn=Ee:Ge=Ee;break;case"object":typeof Ee.is3D!="undefined"?st=Ee:ot=Ee;break;case"boolean":Ft=Ee,ae=!0;break}}st===null&&(st={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ot.material_id!==void 0&&!ae&&(Ft=!0)),Ge!==null&&ot.id===void 0&&(ot.id=Ge);var we="",Te="",ve=!1,Pe=null,de=null,ee=null,z=!1,oe=null,ie=null,le=null,ue=null,me=null;ot.height!==void 0&&(ot.height=Math.round(ot.height)),ot.width!==void 0&&(ot.width=Math.round(ot.width));var xe=function(ht){return parseFloat(ht)>4?parseFloat(ht):5};Sn.setHTML5Codebase=function(ht,dt){pe=ht,lt(ht,dt)},Sn.setJavaCodebase=Sn.setJavaCodebaseVersion=Sn.isCompiledInstalled=Sn.setPreCompiledScriptPath=Sn.setPreCompiledResourcePath=function(){},Sn.setHTML5CodebaseVersion=function(ht,dt){var ut=parseFloat(ht);if(ut!==NaN&&ut<5){console.log("The GeoGebra HTML5 codebase version "+ut+" is deprecated. Using version latest instead.");return}fe=ht,et(ht,dt)},Sn.getHTML5CodebaseVersion=function(){return de},Sn.getParameters=function(){return ot},Sn.setFontsCSSURL=function(ht){ue=ht},Sn.setGiacJSURL=function(ht){},Sn.setJNLPFile=function(ht){we=ht},Sn.setJNLPBaseDir=function(ht){},Sn.inject=function(){function ht(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var dt="auto",ut=ot.id,Pt,yt=!1,gt=0;gt<arguments.length;gt++){var Tt=arguments[gt];typeof Tt=="string"?(Tt=Tt.toLowerCase(),Tt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?dt=Tt:ut=arguments[gt]):typeof Tt=="boolean"?yt=Tt:Tt instanceof HTMLElement&&(Pt=Tt)}ct();function ct(){if(!Re){setTimeout(ct,200);return}dt=Lt(dt);var Ye=Pt||document.getElementById(ut);if(!Ye){console.log("possibly bug on ajax loading? ");return}if(Sn.removeExistingApplet(Ye,!1),ot.width===void 0&&Ye.clientWidth&&(ot.width=Ye.clientWidth),ot.height===void 0&&Ye.clientHeight&&(ot.height=Ye.clientHeight),!(ot.width&&ot.height)&&dt==="html5"&&(delete ot.width,delete ot.height),Pe=dt,dt==="screenshot")He(Ye,ot);else{var Ze=!1;ot.hasOwnProperty("playButton")&&ot.playButton||ot.hasOwnProperty("clickToLoad")&&ot.clickToLoad?Ze=!0:ot.hasOwnProperty("playButtonAutoDecide")&&ot.playButtonAutoDecide&&(Ze=(!Ae()||ht())&&De()),Ze?(Pe="screenshot",at(Ye,ot,yt,dt)):Je(Ye,ot,yt)}}};function Ae(){try{return window.self!==window.top}catch(ht){return!0}}function De(){return ot.hasOwnProperty("screenshotGenerator")&&ot.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Sn.getViews=function(){return st},Sn.isJavaInstalled=function(){return!1};var Fe=function(ht){var dt=function(gt){var Tt=JSON.parse(gt),ct=function(Se){return Se.type=="G"||Se.type=="E"},Ye=Tt.elements?Tt.elements.filter(ct)[0]:Tt;if(!Ye||!Ye.url){ut();return}ot.fileName=Ye.url,je(Ye.settings||{}),st.is3D=!0;var Ze="https://www.geogebra.org/images/";Sn.setPreviewImage(oe||Ye.previewUrl,Ze+"GeoGebra_loading.png",Ze+"applet_play.png"),ht()},ut=function(){ot.onError&&ot.onError(),vt("Error: Fetching material (id "+ot.material_id+") failed.",ot)},Pt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",yt="/materials/"+ot.material_id+"?scope=basic";Le("https://"+Pt+"/api/proxy.php?path="+encodeURIComponent(yt),dt,ut)};function je(ht){var dt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ut){ht[ut]=!!ht[ut]}),dt.forEach(function(ut){ot[ut]===void 0&&ht[ut]!==void 0&&(ot[ut]=ht[ut])}),ot.showToolBarHelp===void 0&&(ot.showToolBarHelp=ot.showToolBar)}function Le(ht,dt,ut){var Pt=new XMLHttpRequest;Pt.open("GET",ht),Pt.onload=function(){dt(Pt.responseText)},Pt.onerror=ut,Pt.send()}Sn.isHTML5Installed=function(){return!0},Sn.getLoadedAppletType=function(){return Pe},Sn.setPreviewImage=function(ht,dt,ut){oe=ht,ie=dt,le=ut},Sn.removeExistingApplet=function(ht,dt){var ut;typeof ht=="string"&&(ht=document.getElementById(ht)),Pe=null;var Pt=null;for(ut=0;ut<ht.childNodes.length;ut++){var yt=ht.childNodes[ut],gt=yt.className;gt==="applet_screenshot"?dt?(yt.style.display="block",Pe="screenshot"):yt.style.display="none":gt!=="applet_scaler prerender"&&(ht.removeChild(yt),Pt=gt&>.indexOf("appletParameters")!=-1?yt.id:null,ut--)}var Tt=ot.id!==void 0?ot.id:Pt,ct=window[Tt];ct&&typeof ct.getBase64=="function"&&(ct.remove(),window[Tt]=null)},Sn.refreshHitPoints=function(){if(xe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var ht=Sn.getAppletObject();return ht&&typeof ht.recalculateEnvironments=="function"?(ht.recalculateEnvironments(),!0):!1},Sn.startAnimation=function(){var ht=Sn.getAppletObject();return ht&&typeof ht.startAnimation=="function"?(ht.startAnimation(),!0):!1},Sn.stopAnimation=function(){var ht=Sn.getAppletObject();return ht&&typeof ht.stopAnimation=="function"?(ht.stopAnimation(),!0):!1},Sn.getAppletObject=function(){var ht=ot.id!==void 0?ot.id:"ggbApplet";return window[ht]},Sn.resize=function(){};var Be=function(ht,dt,ut){var Pt=document.createElement("param");Pt.setAttribute("name",dt),Pt.setAttribute("value",ut),ht.appendChild(Pt)},Ue=function(ht){return ht&&ht!=="false"},Je=function(ht,dt,ut){xe(de)<=4.2&&(ut=!0);var Pt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==de||ggbHTML5LoadedCodebaseIsWebSimple&&!z)&&(Pt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var yt=document.createElement("div");yt.classList.add("appletParameters","notranslate");var gt=dt.width,Tt=dt.height;if(dt.disableAutoScale=dt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():dt.disableAutoScale,dt.width!==void 0)if(xe(de)<=4.4)Ue(dt.showToolBar)&&(dt.height-=7),Ue(dt.showAlgebraInput)&&(dt.height-=37),dt.width<605&&Ue(dt.showToolBar)&&(dt.width=605,gt=605);else{var ct=100;(Ue(dt.showToolBar)||Ue(dt.showMenuBar))&&(dt.hasOwnProperty("customToolBar")&&(dt.customToolbar=dt.customToolBar),ct=Ue(dt.showMenuBar)?245:155),gt<ct&&(dt.width=ct,gt=ct)}yt.style.border="none",yt.style.display="inline-block";for(var Ye in dt)dt.hasOwnProperty(Ye)&&Ye!=="appletOnLoad"&&yt.setAttribute("data-param-"+Ye,dt[Ye]);ue&&yt.setAttribute("data-param-fontscssurl",ue),Sn.resize=function(){GGBAppletUtils.responsiveResize(ht,dt)},window.addEventListener("resize",function(jt){Sn.resize()});var Ze=typeof dt.appletOnLoad=="function"?dt.appletOnLoad:function(){};if(!ut&&dt.width!==void 0){dt.hasOwnProperty("showSplash")||yt.setAttribute("data-param-showSplash","false");var Se=ht.querySelector(".applet_scaler.prerender"),Ne=Se!==null;if(Ne)var $e=Se.querySelector(".ggb_preview");else{var $e=mt(gt,Tt,dt.borderColor,!1);Se=document.createElement("div"),Se.className="applet_scaler",Se.style.position="relative",Se.style.display="block",Se.style.width=gt+"px",Se.style.height=Tt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Se,"66%"),xe(de)>=5?(dt.appletOnLoad=function(jt){var Kt=ht.querySelector(".ggb_preview");Kt&&Kt.parentNode.removeChild(Kt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Se),window.GGBT_wsf_view&&$(window).trigger("resize"),Ze(jt)},Ne||Se.appendChild($e)):yt.appendChild($e),Se.appendChild(yt),Ne||ht.appendChild(Se),setTimeout(function(){Sn.resize()},1)}else{var nt=document.createElement("div");nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.appendChild(yt),ht.appendChild(nt),dt.appletOnLoad=function(jt){Sn.resize(),Ze(jt)}}function Ie(jt,Kt){Kt&&typeof Kt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(jt,Kt.appletOnLoad):renderGGBElement(jt),vt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Kt)}function ze(jt,Kt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:jt,params:Kt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(an){Ie(an.article,an.params)}),html5AppletsToProcess=null)},xe(de)<5&&(jt.className+=" geogebraweb")):Ie(jt,Kt)}if(Pt){scriptLoadStarted=!0;for(var Ve=0;Ve<yt.childNodes.length;Ve++){var it=yt.childNodes[Ve].tagName;it==="TABLE"&&(yt.removeChild(yt.childNodes[Ve]),Ve--)}if(ggbHTML5LoadedScript!==null){var St=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');St!=null&&St.parentNode.removeChild(St)}var Ct=document.createElement("script"),It=function(){ze(yt,dt)};Ct.src=Te+ee,ggbHTML5LoadedCodebaseIsWebSimple=z,ggbHTML5LoadedCodebaseVersion=de,ggbHTML5LoadedScript=Ct.src,vt("GeoGebra HTML5 codebase loaded: '"+Te+"'.",dt),!pe&&(!fe||fe=="5.0")?(z?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),It()):Te.requirejs?__webpack_require__.e(12).then(function(){var jt=[__webpack_require__(12)];It.apply(null,jt)}.bind(this)).catch(__webpack_require__.oe):(Ct.onload=It,ht.appendChild(Ct))}else ze(yt,dt);dt.height=Tt,dt.width=gt},He=function(ht,dt,ut){var Pt=mt(dt.width,dt.height,dt.borderColor,ut),yt=document.createElement("div");yt.style.position="relative",yt.style.display="block",yt.style.width=dt.width+"px",yt.style.height=dt.height+"px",yt.className="applet_screenshot applet_scaler"+(ut?" applet_screenshot_play":""),yt.appendChild(Pt);var gt=GGBAppletUtils.getScale(dt,ht,ut);ut?(ht.appendChild(ft()),window.GGBT_wsf_view||(ht.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(yt,"66%"),ht.appendChild(yt),gt!==1&&!isNaN(gt)&&(GGBAppletUtils.scaleElement(yt,gt),yt.style.width=dt.width+"px",yt.style.height=dt.height+"px",yt.parentNode.style.width=dt.width*gt+"px",yt.parentNode.style.height=dt.height*gt+"px"),Sn.resize=function(){We(ht,Pt,yt,ut)},window.addEventListener("resize",function(Tt){Sn.resize()}),Sn.resize()};function We(ht,dt,ut,Pt){if(ht.contains(dt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ht.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(ht)}var yt=GGBAppletUtils.getScale(ot,ht,Pt);ut.parentNode!==null&&(!isNaN(yt)&&yt!==1?(GGBAppletUtils.scaleElement(ut,yt),ut.parentNode.style.width=ot.width*yt+"px",ut.parentNode.style.height=ot.height*yt+"px"):(GGBAppletUtils.scaleElement(ut,1),ut.parentNode.style.width=ot.width+"px",ut.parentNode.style.height=ot.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(ht),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Sn.onExitFullscreen=function(ht,dt){dt.appendChild(ht)};var at=function(ht,dt,ut,Pt){He(ht,dt,!0);for(var yt=function(){var ct=[];for(Tt=0;Tt<ht.childNodes.length;Tt++)ct.push(ht.childNodes[Tt]);if(window.GGBT_wsf_view){var Ye=window.GGBT_wsf_view.renderFullScreen(ht,dt.id),Ze=document.getElementById("fullscreencontainer"),Se=jQuery(ht).find(".fullscreencontent");Se.length>0?(Ye.remove(),Se.attr("id","fullscreencontent").show(),jQuery(Ze).append(Se),window.dispatchEvent(new Event("resize"))):Je(Ye,dt,!1),window.GGBT_wsf_view.launchFullScreen(Ze)}else Pe=Pt,Je(ht,dt,!1);if(!window.GGBT_wsf_view)for(Tt=0;Tt<ct.length;Tt++)ht.removeChild(ct[Tt])},gt=ht.getElementsByClassName("ggb_preview_play"),Tt=0;Tt<gt.length;Tt++)gt[Tt].addEventListener("click",yt,!1),gt[Tt].addEventListener("ontouchstart",yt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(ht),De()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ft=function(){var ht=document.createElement("div");if(ht.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var dt='.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");}',ut=document.createElement("style");ut.styleSheet?ut.styleSheet.cssText=dt:ut.appendChild(document.createTextNode(dt)),document.getElementsByTagName("head")[0].appendChild(ut)}return ht},mt=function(ht,dt,ut,Pt){var yt=document.createElement("div");yt.className="ggb_preview",yt.style.position="absolute",yt.style.zIndex="90",yt.style.width=ht-2+"px",yt.style.height=dt-2+"px",yt.style.top="0px",yt.style.left="0px",yt.style.overflow="hidden",yt.style.backgroundColor="white";var gt="lightgrey";ut!==void 0&&(ut==="none"?gt="transparent":gt=ut),yt.style.border="1px solid "+gt;var Tt=document.createElement("img");if(Tt.style.position="relative",Tt.style.zIndex="1000",Tt.style.top="-1px",Tt.style.left="-1px",oe!==null&&Tt.setAttribute("src",oe),Tt.style.opacity=.7,ie!==null){var ct,Ye,Ze;if(!Pt){ct=document.createElement("img"),ct.style.position="absolute",ct.style.zIndex="1001",ct.style.opacity=1,Tt.style.opacity=.3,Ye=360,Ye>ht/4*3&&(Ye=ht/4*3),Ze=Ye/5.8,ct.setAttribute("src",ie),ct.setAttribute("width",Ye),ct.setAttribute("height",Ze);var Se=(ht-Ye)/2,Ne=(dt-Ze)/2;ct.style.left=Se+"px",ct.style.top=Ne+"px",yt.appendChild(ct)}}return yt.appendChild(Tt),yt},Lt=function(ht){return ht=ht.toLowerCase(),ht==="html5"||ht==="screenshot"?ht:"html5"},Xe=["web","webSimple","web3d","tablet","tablet3d","phone"],et=function(ht,dt){if(de=ht,dt){lt(de,!0);return}var ut=!Ft;if(ut){var Pt=xe(de);!isNaN(Pt)&&Pt<4.4&&(ut=!1)}var yt,gt;window.location.protocol.substr(0,4)==="http"?yt=window.location.protocol:yt="http:";var Tt=de.indexOf("//");Tt>0?gt=de:Tt===0?gt=yt+de:gt="https://www.geogebra.org/apps/5.2.814.0/";for(var ct in Xe)if(de.slice(Xe[ct].length*-1)===Xe[ct]||de.slice((Xe[ct].length+1)*-1)===Xe[ct]+"/"){lt(gt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ut&&!st.is3D&&!st.AV&&!st.SV&&!st.CV&&!st.EV2&&!st.CP&&!st.PC&&!st.DA&&!st.FI&&!st.PV&&!Ue(ot.showToolBar)&&!Ue(ot.showMenuBar)&&!Ue(ot.showAlgebraInput)&&!Ue(ot.enableRightClick)&&(!ot.appName||ot.appName=="classic")?gt+="webSimple/":gt+="web3d/",lt(gt,!1)},lt=function(ht,dt){if(ht.requirejs){Te=ht;return}ht.slice(-1)!=="/"&&(ht+="/"),Te=ht,dt===null&&(dt=ht.indexOf("http")===-1),ve=dt,ee="web.nocache.js",z=!1;var ut=Te.split("/");ut.length>1&&(!dt&&ut[ut.length-2]==="webSimple"?(ee="webSimple.nocache.js",z=!0):Xe.indexOf(ut[ut.length-2])>=0&&(ee=ut[ut.length-2]+".nocache.js")),ut=ht.split("/"),de=ut[ut.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 Pt=parseFloat(de);Pt!==NaN&&Pt<5&&ht.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Pt+" is deprecated. Using version latest instead."),et("5.0",dt))},vt=function(ht,dt){window.console&&window.console.log&&(!dt||typeof dt.showLogging=="undefined"||dt.showLogging&&dt.showLogging!=="false")&&console.log(ht)};ot.material_id!==void 0?Fe(wt):wt();function wt(){var ht=vn;fe!==null?ht=fe:parseFloat(ht)<5&&(ht="5.0"),et(ht,!1),pe!==null&<(pe,ve),Re=!0}return Sn},GGBAppletUtils=function(){"use strict";function Sn(){return window.GGBT_wsf_edit!==void 0}function vn(Re,fe){fe!=1?(Re.style.transformOrigin="0% 0% 0px",Re.style.webkitTransformOrigin="0% 0% 0px",Re.style.transform="scale("+fe+","+fe+")",Re.style.webkitTransform="scale("+fe+","+fe+")",Re.style.maxWidth="initial",Re.querySelector(".ggb_preview")!==null&&(Re.querySelector(".ggb_preview").style.maxWidth="initial"),Re.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Re.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Re.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Re.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Re.style.transform="none",Re.style.webkitTransform="none")}function ot(Re,fe,pe,be,Ee,we){var Te=null;if(we!=null&&we!="")for(var ve=Re.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+we+" ")>-1){Te=ve;break}else ve=ve.parentNode;var Pe=0,de=0,ee=0,z=0,oe=0,ie=0,le=0;if(Te)Pe=Te.offsetWidth,de=Math.max(be?Te.offsetWidth:0,Te.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Pe=Math.min(window.innerWidth,document.documentElement.clientWidth),de=Math.min(window.innerHeight,document.documentElement.clientHeight),ee=Pe):(Pe=window.innerWidth,de=window.innerHeight,ee=window.innerWidth),Re){var ue=Re.getBoundingClientRect();ue.left>0&&ue.left<=Pe&&(Ee===void 0||!Ee)&&(document.dir==="rtl"?(oe=Pe-ue.width-ue.left,ie=ee<=480?10:30):(ie=ue.left,oe=ee<=480?10:30),z=ie+oe)}if(Re&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var me=Re.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(z=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(z=0,le=40)}}return Re&&((pe===void 0||!pe)&&fe>0&&fe+z<Pe?Pe=fe:Pe-=z,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(pe===void 0||!pe)&&(de-=le)),{width:Pe,height:de}}function st(Re,fe,pe,be,Ee){if(Re.isScreenshoGenerator)return 1;var we=be!==void 0&&be,Te=Re.noScaleMargin!=null&&Re.noScaleMargin,ve=function(me){return me&&me!=="false"},Pe=ve(Re.autoHeight),de=ot(fe,Re.width,pe,Pe,we&&window.GGBT_wsf_view||Te,Ee),ee=parseInt(de.width),z=Re.width,oe=Re.height;if(z===void 0){var ie=fe.querySelector(".appletParameters");ie&&(z=ie.offsetWidth,oe=ie.offsetHeight)}var le=ee/z,ue=we?1:de.height/oe;return pe!==void 0&&!pe&&(le=Math.min(1,le),ue=Math.min(1,ue)),Math.min(le,ue)}function Ft(Re,fe,pe){var be=1,Ee,we=!1;if(Re.hasOwnProperty("allowUpscale")&&(we=Re.allowUpscale),Re.hasOwnProperty("scale")&&(be=parseFloat(Re.scale),(isNaN(be)||be===null||be===0)&&(be=1),be>1&&(we=!0)),fe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(we=!0),!(Re.hasOwnProperty("disableAutoScale")&&Re.disableAutoScale))Ee=st(Re,fe,we,pe,Re.scaleContainerClass);else return be;return we&&(!Re.hasOwnProperty("scale")||be===1)?Ee:Math.min(be,Ee)}function ae(Re){var fe=Math.min(window.innerWidth,document.documentElement.clientWidth),pe=Math.min(window.innerHeight,document.documentElement.clientHeight),be=Re.getBoundingClientRect(),Ee=(fe-be.width)/2,we=(pe-be.height)/2;we<0&&(we=0),Re.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ee<40?Re.style.left="40px":Re.style.left=Ee+"px",Re.style.top=we+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(we<40?Re.style.top="40px":Re.style.top=we+"px",Re.style.left=Ee+"px")}function Ge(Re,fe){var pe=Re.querySelector(".appletParameters");if(pe){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(fe.id!==pe.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Re)}if(pe.parentElement&&/fullscreen/.test(pe.parentElement.className))return;var be=Ft(fe,Re);Sn()&&pe.setAttribute("data-param-scale",be);for(var Ee=null,we=0;we<Re.childNodes.length;we++)if(Re.childNodes[we].className!==void 0&&Re.childNodes[we].className.match(/^applet_scaler/)){Ee=Re.childNodes[we];break}if(Ee!==null&&Ee.querySelector(".noscale")!==null)return;var Te=fe.id!==void 0?fe.id:"ggbApplet",ve=window[Te];(ve==null||!ve.recalculateEnvironments)&&Ee!==null&&!Ee.className.match(/fullscreen/)&&(Ee.parentNode.style.transform="",!isNaN(be)&&be!==1?(Ee.parentNode.style.width=fe.width*be+"px",Ee.parentNode.style.height=fe.height*be+"px",vn(Ee,be)):(vn(Ee,1),Ee.parentNode.style.width=fe.width+"px",Ee.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&ae(Re),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(pe).parents(".content-added-content"))}}return{responsiveResize:Ge,isFlexibleWorksheetEditor:Sn,positionCenter:ae,getScale:Ft,scaleElement:vn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Sn=n.location.search;return Sn.indexOf(J)!=-1||Sn.indexOf(K)!=-1}function q(Sn,vn){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Sn){var vn=s[L].bindings;s[L].bindings=function(){for(var ot=vn?vn():{},st=Sn[webModule.__softPermutationId],Ft=O;Ft<st.length;Ft++){var ae=st[Ft];ot[ae[O]]=ae[P]}return ot}};var t;function u(){return v(),t}function v(){if(!t){var Sn=o.createElement(Q);if(Sn.id=L,Sn.style.cssText=R+S,Sn.tabIndex=-1,o.body.appendChild(Sn),t=Sn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var vn=document.compatMode==U?V:W;t.write(vn+X),t.close()}}}function w(Sn){function vn(st){function Ft(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var ae=Ft();if(ae){st();return}function Ge(){if(!ae){if(!Ft())return;ae=!0,st(),o.removeEventListener&&o.removeEventListener(Z,Ge,!1),Re&&clearInterval(Re)}}o.addEventListener&&o.addEventListener(Z,Ge,!1);var Re=setInterval(function(){Ge()},$)}function ot(st){var Ft=u(),ae=Ft.body,Ge=Ft.createElement(_);Ge.language=ab,Ge.crossOrigin=W,Ge.src=st,webModule.__errFn&&(Ge.onerror=function(){webModule.__errFn(L,new Error(bb+st))}),ae.appendChild(Ge)}vn(function(){ot(Sn)})}webModule.__startLoadingFragment=function(Sn){return C(Sn)},webModule.__installRunAsyncCode=function(Sn){var vn=u(),ot=vn.body,st=vn.createElement(_);st.language=ab,st.text=Sn,ot.appendChild(st),ot.removeChild(st)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Sn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Sn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Sn){var vn=c[Sn];return vn==null?null:vn},r=d,webModule.__errFn=e}function B(){function Sn(Re){var fe=Re.lastIndexOf(rb);fe==-1&&(fe=Re.length);var pe=Re.indexOf(sb);pe==-1&&(pe=Re.length);var be=Re.lastIndexOf(tb,Math.min(pe,fe));return be>=O?Re.substring(O,be+P):W}function vn(Re){if(!Re.match(/^\w+:\/\//)){var fe=o.createElement(ub);fe.src=Re+vb,Re=Sn(fe.src)}return Re}function ot(){var Re=__gwt_getMetaProperty(wb);return Re!=null?Re:W}function st(){for(var Re=o.getElementsByTagName(_),fe=O;fe<Re.length;++fe)if(Re[fe].src.indexOf(xb)!=-1)return Sn(Re[fe].src);return W}function Ft(){var Re=o.getElementsByTagName(yb);return Re.length>O?Re[Re.length-P].href:W}function ae(){var Re=o.location;return Re.href==Re.protocol+zb+Re.host+Re.pathname+Re.search+Re.hash}var Ge=ot();return Ge==W&&(Ge=st()),Ge==W&&(Ge=Ft()),Ge==W&&ae()&&(Ge=Sn(o.location.href)),Ge=vn(Ge),Ge}function C(Sn){return Sn.match(/^\//)||Sn.match(/^[a-zA-Z]+:\/\//)?Sn:webModule.__moduleBase+Sn}function D(){var Sn=[],vn=O,ot=[],st=[];function Ft(Re){var fe=st[Re](),pe=ot[Re];if(fe in pe)return fe;var be=[];for(var Ee in pe)be[pe[Ee]]=Ee;throw r&&r(Re,be,fe),null}if(__gwt_isKnownPropertyValue=function(Re,fe){return fe in ot[Re]},webModule.__getPropMap=function(){var Re={};for(var fe in ot)ot.hasOwnProperty(fe)&&(Re[fe]=Ft(fe));return Re},webModule.__computePropValue=Ft,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var ae;try{ae=Cb;var Ge=ae.indexOf(Db);Ge!=-1&&(vn=parseInt(ae.substring(Ge+P),$),ae=ae.substring(O,Ge))}catch(Re){}return webModule.__softPermutationId=vn,C(ae+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(Sn,vn,ot){"use strict";ot.d(vn,{Ax:function(){return Ge},Ds:function(){return Re},KI:function(){return pe},SI:function(){return ae},f1:function(){return Ft}});var st=ot(11320);function Ft(be){let Ee=!0;if(be.length>0){for(let we=0;we<be.length;we++)if(be[we].compile_success==0||!be[we].compile_success){Ee=!1;break}}else Ee=!1;return Ee}function ae(be,Ee=""){let we=[];for(let Te=0;Te<be.length;Te++){let ve=be[Te],Pe=Ee?`${Ee}/${ve.name}`:`${ve.name}`;we.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:Pe})}return we}function Ge(be,Ee,we){for(let Te=0;Te<be.length;Te++){let ve=be[Te];if(ve.key===Ee){ve.children=we;break}ve.children&&Ge(ve.children,Ee,we)}return be}function Re(be,Ee,we){let Te;return function(){let ve=this,Pe=arguments,de=function(){Te=null,we||be.apply(ve,Pe)},ee=we&&!Te;clearTimeout(Te),Te=setTimeout(de,Ee),ee&&be.apply(ve,Pe)}}const fe=!0,pe=st.Z.API_SERVER},63205:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return Te}});var st=ot(67294),Ft={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},ae=ot(94184),Ge=ot.n(ae),Re=ot(74330),fe=ot(15979),pe=ot(33170),be=ot(28706),Ee=(ve,Pe,de)=>new Promise((ee,z)=>{var oe=ue=>{try{le(de.next(ue))}catch(me){z(me)}},ie=ue=>{try{le(de.throw(ue))}catch(me){z(me)}},le=ue=>ue.done?ee(ue.value):Promise.resolve(ue.value).then(oe,ie);le((de=de.apply(ve,Pe)).next())}),Te=({data:ve,className:Pe,fullWidth:de,style:ee={},onClose:z,onOk:oe,showFullTools:ie,noAssociationId:le})=>{const ue=(0,st.useRef)(null),me=(0,st.useRef)(null),xe=(0,st.useRef)(null),Ae=(0,st.useRef)(null),[De,Fe]=(0,st.useState)(!1),[je,Le]=(0,st.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,st.useEffect)(()=>(xe.current||(xe.current=document.createElement("style"),document.head.appendChild(xe.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),xe.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&Be()):(document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null)),()=>{document.body.removeAttribute("data-custom"),xe.current&&(document.head.removeChild(xe.current),xe.current=null)}),[ve==null?void 0:ve.visible]);const Be=()=>Ee(void 0,null,function*(){Fe(!0),Le("\u6B63\u5728\u52A0\u8F7D\u4E2D");const We=yield(0,be.ZJ)(ve==null?void 0:ve.src);ue.current.src="",ue.current.src=We,ue.current.onload=function(){He()},Fe(!1),Le("")}),Ue=We=>Ee(void 0,null,function*(){Fe(!0),Le("\u6B63\u5728\u4FDD\u5B58\u4E2D");const at=yield(0,pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:We.dataUrl}});at!=null&&at.id&&!le?(yield(0,pe.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:at==null?void 0:at.id,settings:JSON.stringify(We.state)}})).status===0&&oe():at!=null&&at.id&&oe(at),Fe(!1),Le("")}),Je=()=>{const We=document.querySelector('a[href="https://markerjs.com/"]');We&&We.parentNode&&(We.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(ft=>{const mt=document.querySelector(ft.name);mt&&mt.setAttribute("title",ft.title)})},He=()=>{me.current=new fe.hP(ue.current),me.current.targetRoot=Ae.current,me.current.addEventListener("render",Ue),me.current.addEventListener("beforeclose",z),ie&&(me.current.availableMarkerTypes=me.current.ALL_MARKER_TYPES,me.current.uiStyleSettings.redoButtonVisible=!0,me.current.uiStyleSettings.notesButtonVisible=!0,me.current.uiStyleSettings.zoomButtonVisible=!0,me.current.uiStyleSettings.zoomOutButtonVisible=!0,me.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=me.current.uiStyleSettings,me.current.show(),ve!=null&&ve.snapshotData&&me.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Je()},300)};return st.createElement(st.Fragment,null,(ve==null?void 0:ve.visible)&&st.createElement(Re.Z,{spinning:De,tip:je,style:{position:"absolute",width:"100vw"}},st.createElement("div",{ref:Ae,className:Ge()(Ft.imageDimensions,Pe,de?Ft.fullWidth:""),style:ee},st.createElement("img",{className:Ft.img,ref:ue}))))}},36527:function(Sn,vn,ot){"use strict";var st=ot(67294),Ft=ot(71230),ae=ot(15746),Ge=ot(55238),Re=ot(85804),fe=ot(65226),pe=ot(71736),be=ot(84279),Ee=ot(67294);const we=(0,st.forwardRef)(({callback:Te,showSaveButton:ve,value:Pe=""},de)=>{const ee=(0,st.useRef)(),z=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],oe=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
y=b + r\\text{sin}\\theta \r
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\left\\{\\begin{matrix} \r
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
\\end{matrix}\\right. \r
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
a \\perp \\alpha \\ \r
|
|
b \\perp \\alpha \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
a \\perp m,a \\perp n \r
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
a^{2}+b^{2}=c^{2} \r
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
a,b \\in R^{+} \\ \r
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
a,b \\in R \\ \r
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
P \\left( S \\right) =1 \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
\\forall A \\in S \\\\ \r
|
|
P \\left( A \\right) \\ge 0 \r
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
P_{n}=n! \\\\ \r
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
\\end{array}`}]}]}],ie=me=>{ee.current.setValue(ee.current.getValue()+" "+me.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ee.createElement(Ft.Z,{className:pe.Z.lists,gutter:[10,10]},z.map((me,xe)=>Ee.createElement(ae.Z,{flex:"110px",className:pe.Z.item},Ee.createElement("div",null,Ee.createElement(fe.Z,{value:`$$${me.value}$$`}),me.name),Ee.createElement("div",{className:pe.Z.children},me.children.map((Ae,De)=>Ee.createElement("div",{key:De},Ee.createElement("h1",null,Ae.name),Ee.createElement(Ft.Z,{gutter:[10,10]},Ae.data.map((Fe,je)=>Ee.createElement(ae.Z,{key:je,onClick:()=>ie(Fe),className:pe.Z.diamond},Ee.createElement(fe.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ee.createElement(Ft.Z,{className:pe.Z.lists,gutter:[10,10]},oe.map((me,xe)=>Ee.createElement(ae.Z,{flex:"110px",className:pe.Z.item},Ee.createElement("div",null,Ee.createElement(fe.Z,{value:"`$$"+me.value+"$$`"}),me.name),Ee.createElement("div",{className:pe.Z.children},me.children.map((Ae,De)=>Ee.createElement("div",{key:De},Ae.name&&Ee.createElement("h1",null,Ae.name),Ee.createElement(Ft.Z,{gutter:[10,10]},Ae.data.map((Fe,je)=>Ee.createElement(ae.Z,{key:je,onClick:()=>ie(Fe),className:pe.Z.diamond},Ee.createElement(fe.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))}],ue=()=>{var me=document.createElement("div");me.innerHTML=ee.current.getValue();var xe=me.innerText;return Te&&Te(xe),xe};return(0,st.useImperativeHandle)(de,()=>({getData:ue})),Ee.createElement("div",{className:pe.Z.mathWrap},Ee.createElement(Ge.default,{defaultActiveKey:"1",items:le}),Ee.createElement("math-field",{locale:"zh_cn",className:pe.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ee,style:{width:800,marginTop:30,fontSize:18}},Pe||""),ve&&Ee.createElement("div",{className:pe.Z.button},Ee.createElement(Re.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});vn.Z=we},26194:function(Sn,vn,ot){"use strict";var st=ot(67294),Ft=ot(4977),ae=ot(85804),Ge=Object.defineProperty,Re=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,we=(de,ee,z)=>ee in de?Ge(de,ee,{enumerable:!0,configurable:!0,writable:!0,value:z}):de[ee]=z,Te=(de,ee)=>{for(var z in ee||(ee={}))be.call(ee,z)&&we(de,z,ee[z]);if(pe)for(var z of pe(ee))Ee.call(ee,z)&&we(de,z,ee[z]);return de},ve=(de,ee)=>Re(de,fe(ee));const Pe=({img:de,buttonProps:ee={},styles:z={},customText:oe,ButtonText:ie,ButtonClick:le,Buttonclass:ue,ButtonTwo:me,imgStyles:xe,loading:Ae=!1,className:De=""})=>st.createElement("section",{className:`tc animated fadeIn ${De}`,style:Te({color:"#999",margin:"100px auto",visibility:Ae?"hidden":"visible"},z)},st.createElement("img",{src:de||Ft,style:ve(Te({},xe),{pointerEvents:"none",userSelect:"none"})}),st.createElement("p",{className:"mt20 font14"},oe||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&st.createElement(ae.ZP,Te({className:ue,onClick:le},ee),ie),me&&me);vn.Z=Pe},20819:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return ue}});var st=ot(67294),Ft={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ae=ot(85804),Ge=ot(30153),Re=ot(36295),fe=ot(83062),pe=ot(28706),be=ot(15835),Ee=ot(26194),we=ot(11320),Te=ot(66540),ve=ot(67294),Pe=Object.defineProperty,de=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(me,xe,Ae)=>xe in me?Pe(me,xe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):me[xe]=Ae,ie=(me,xe)=>{for(var Ae in xe||(xe={}))ee.call(xe,Ae)&&oe(me,Ae,xe[Ae]);if(de)for(var Ae of de(xe))z.call(xe,Ae)&&oe(me,Ae,xe[Ae]);return me},le=(me,xe,Ae)=>new Promise((De,Fe)=>{var je=Ue=>{try{Be(Ae.next(Ue))}catch(Je){Fe(Je)}},Le=Ue=>{try{Be(Ae.throw(Ue))}catch(Je){Fe(Je)}},Be=Ue=>Ue.done?De(Ue.value):Promise.resolve(Ue.value).then(je,Le);Be((Ae=Ae.apply(me,xe)).next())}),ue=({editOffice:me="view",data:xe,issaver:Ae,onSaver:De,theme:Fe,type:je,filename:Le,monacoEditor:Be,className:Ue,style:Je,close:He,onClose:We,hasMask:at,disabledDownload:ft,onImgDimensions:mt,showNodata:Lt,recordInfo:Xe})=>{const[et,lt]=(0,st.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[vt,wt]=(0,st.useState)(""),[ht,dt]=(0,st.useState)(),ut=window.ENV==="build"?"/react/build":"",Pt=location.host.startsWith("localhost")?we.Z.PROXY_SERVER:we.Z.API_SERVER,gt=10*(1024*1024),Tt=(0,st.useRef)();xe!=null&&xe.startsWith("/api")&&je!=="txt"&&(xe=we.Z.API_SERVER+xe);const ct=$e=>$e.substring($e.lastIndexOf("/")+1).split(".").pop();Le&&Be&&(Be.filename=Le),(0,st.useEffect)(()=>{var $e,nt;const Ie=(nt=($e=document.cookie)==null?void 0:$e.replace(/\s/g,""))==null?void 0:nt.split(";");Ie==null||Ie.map(ze=>{let Ve=ze.split("=");Ve[0]==="_educoder_session"&&wt(Ve[1])})},[]),(0,st.useEffect)(()=>{je==="office"&&(xe.indexOf("bigfilescdn.")>-1||xe.indexOf("bigfiles1")>-1?dt({url:xe,fileType:ct(xe),model:xe.indexOf("model=edit")?"edit":"view"}):Ze())},[je,xe]);function Ye($e){return le(this,null,function*(){$e.data.type==="pdfdata"&&(De($e.data.data),window.removeEventListener("message",Ye,!1)),console.log("mess---:",$e.data)})}const Ze=()=>le(void 0,null,function*(){console.log("data:",xe);let $e=xe;xe.startsWith("http")||($e=location.origin+$e);let nt=new URL($e).pathname.split("/").pop();const Ie=yield(0,be.gJ)({attachment_id:nt});Ie.url=Pt+Ie.url,dt(Ie)}),Se=()=>{if(xe.startsWith("http")||xe.startsWith("blob:")){Ne();return}(0,pe.Sv)(Le||"educoder",xe,Le)},Ne=()=>{Xe&&(0,Te.fc)({id:Xe==null?void 0:Xe.id,watch_type:1,course_id:Xe==null?void 0:Xe.course_id}),(0,pe.Nd)(Le||"educoder",decodeURIComponent(xe))};return ve.createElement("div",{style:ie({},Je||{}),className:`${at&&Ft.bgBlack} ${je?Ft.wrp:"hide"}`},He&&ve.createElement("div",{className:Ft.close,ref:Tt},!!mt&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Tt.current},ve.createElement("span",{onClick:()=>{We(),mt()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!ft&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Tt.current},ve.createElement("span",{onClick:Ne},ve.createElement("i",{className:"icon-quxiaozhiding"}))),Ae&&ve.createElement(fe.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Tt.current},ve.createElement("span",{className:"",onClick:()=>{const $e=document.getElementById("pdfiframe");window.addEventListener("message",Ye,!1),setTimeout(()=>{$e.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(fe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Tt.current},ve.createElement("span",{className:"",onClick:()=>{We()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${Ft[Ue]} ${Ue} ${Ft.monaco} ${je==="txt"?"show":"hide"}`},je==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(Re.ZP,ie({},Be)))),je==="audio"&&ve.createElement("audio",{src:`${(xe==null?void 0:xe.indexOf("http://"))>-1||(xe==null?void 0:xe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${xe}`,autoPlay:!0}),je==="video"&&ve.createElement(ve.Fragment,null,(xe==null?void 0:xe.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${xe}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${xe}`,autoPlay:!0})),je==="office"&&ht&&ve.createElement("iframe",{src:`${ut}/office.html?key=${ht.key}&url=${btoa(ht.url)}&callbackUrl=${Pt+(ht.callbackUrl||"")}&fileType=${ht.fileType}&title=${ht.title||""}&model=${me}&officeServer=${we.Z.ONLYOFFICE}&disabledDownload=${!!ft}`}),je==="html"&&ve.createElement("iframe",{src:xe+"&disposition=inline"}),je==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${ut}/js/pdfview/index.html?filename=${Le||"educoder.pdf"}&url=${encodeURIComponent(xe)}&disabledDownload=${!!ft}&model=${me}`}),je==="image"&&ve.createElement("img",{src:`${(xe==null?void 0:xe.indexOf("http://"))>-1||(xe==null?void 0:xe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${xe}`}),(je==="other"||je==="download")&&ve.createElement(ve.Fragment,null,Lt?ve.createElement(Ee.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(ae.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Se,disabled:ft},"\u4E0B\u8F7D")}):ve.createElement(ae.ZP,{type:"primary",size:"middle",onClick:Se,disabled:ft},ve.createElement(Ge.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},65226:function(Sn,vn,ot){"use strict";ot.d(vn,{z:function(){return je},Z:function(){return Le}});var st=ot(67294),Ft=ot(81897),ae=ot(51161),Ge=ot(11771),Re=ot(67631),fe=ot.n(Re),pe=ot(11320),be=ot(28706),Ee=ot(20527),we=ot(25934),Te=ot(20819),ve=ot(67294),de=({html:Be})=>{const Ue=(0,st.useRef)(null),Je=(0,st.useRef)(null),He=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,st.useEffect)(()=>{const We=Ue.current.attachShadow({mode:"open"});Je.current=document.createElement("div"),Je.current.className="markdown-body",Je.current.innerHTML=Be,We.appendChild(Je.current);const at=document.createElement("style");return at.textContent=He,We.appendChild(at),()=>{We.innerHTML=""}},[]),(0,st.useEffect)(()=>{Je.current&&(Je.current.innerHTML=Be)},[Be]),ve.createElement("div",{ref:Ue})};function ee(Be){const Ue=["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"],Je=new RegExp(`\\b(${Ue.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Be.replace(Je,"").trim()}var z=Object.defineProperty,oe=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ue=(Be,Ue,Je)=>Ue in Be?z(Be,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Be[Ue]=Je,me=(Be,Ue)=>{for(var Je in Ue||(Ue={}))ie.call(Ue,Je)&&ue(Be,Je,Ue[Je]);if(oe)for(var Je of oe(Ue))le.call(Ue,Je)&&ue(Be,Je,Ue[Je]);return Be};const xe="@\u2581\u2581@",Ae="@\u2581@",De=/<pre[^>]*>/g;function Fe(Be){let Ue=document.createElement("div");return Ue.innerHTML=Be,Ue.childNodes.length===0?"":Ue.childNodes[0].nodeValue}const je=(Be,Ue)=>{Be=Be||"";const Je=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,He=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,We=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,at=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ue?Be.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Je,(ft,mt,Lt,Xe,et,lt,vt)=>{const wt=mt||Xe||lt,ht=Lt||et||vt||"?";return pe.Z.API_SERVER+"/api/attachments/"+wt+ht+"&t="+(0,be.Jn)(wt,Date.now())+(ft.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Be=Be.replace(at,(ft,mt,Lt,Xe,et,lt,vt)=>{const wt=mt||Xe||lt,ht=Lt||et||vt||"?";return pe.Z.API_SERVER+"/attachments/download/"+wt+ht+"&t="+(0,be.Jn)(wt,Date.now())+(ft.indexOf(")")>-1?")":"&")}).replace(Je,(ft,mt,Lt,Xe,et,lt,vt)=>{const wt=mt||Xe||lt,ht=Lt||et||vt||"?";return pe.Z.API_SERVER+"/api/attachments/"+wt+ht+"&t="+(0,be.Jn)(wt,Date.now())+(ft.indexOf(")")>-1?")":"&")}).replace(He,(ft,mt,Lt,Xe,et)=>{const lt=mt||Xe,vt=Lt||et||"";return'"'+pe.Z.API_SERVER+"/api/attachments/"+lt+vt+lt+vt+"&t="+(0,be.Jn)(lt,Date.now())}).replace(We,(ft,mt,Lt,Xe,et)=>{const lt=mt||Xe,vt=Lt||et||"";return"("+pe.Z.API_SERVER+"/files/uploads/"+lt+vt+lt+vt+"&t="+(0,be.Jn)(lt,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,`
|
|
`),Be)};var Le=({value:Be="",className:Ue,showTextOnly:Je,showLines:He,style:We={},stylesPrev:at={},highlightKeywords:ft,showProgramFill:mt,isProgramFill:Lt,disabledFill:Xe=!1,programFillValue:et,onFillChange:lt=ht=>{},onFillBlur:vt=()=>{},onFillFocus:wt=()=>{}})=>{let ht=ee(String(Be||""));const[dt,ut]=(0,st.useState)(""),[Pt,yt]=(0,st.useState)("office"),[gt,Tt]=(0,st.useState)([]),ct=(0,st.useRef)("a"+(0,we.Z)()),Ye={},Ze=jt=>/<style[\s\S]*?>/i.test(jt||""),Se=(jt,Kt,an)=>{const un=document.createElement(jt===Ae?"input":"textarea");un.style.width="100%",un.style.height=jt===Ae?"40px":"151px",un.rows=5,un.spellcheck=!1,un.name="edu-program-fill",un.placeholder="\u8BF7\u8F93\u5165",un.dataset.id=Kt;const hn=Object.keys(Ye).length;return Ye[hn]=un,`<span class="edu-program-fill-wrap ${jt===Ae?"":"show"}" style="width:${jt===Ae?"600px":"100%"}" title=${an||""}><span>${un.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ne(jt){return jt=jt.replace(/!\[.*?\]\(.*?\)/g,""),jt=jt.replace(/\[.*?\]\(.*?\)/g,""),jt=jt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),jt=jt.replace(/<embed.*?>/g,""),jt=jt.replace(/<img.*?>/g,""),jt=jt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),jt=jt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),jt=jt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),jt=jt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),jt}const $e=jt=>!Je&&Ze(ht)?jt:jt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Kt,an){let un=an.replace(/(\n|\r)/g,"").split("}"),hn=[];return un.map(qt=>{qt!=""&&hn.push(`.${ct.current} ${qt}`)}),`<style>${hn.join("}")}</style>`}),nt=(0,st.useMemo)(()=>{try{const un=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,hn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,qt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,On=/\(\/attachments\/download\//g;ht=ht.replace(On,"("+pe.Z.API_SERVER+"/attachments/download/").replace(un,"("+pe.Z.API_SERVER+"/api/attachments/").replace(hn,'"'+pe.Z.API_SERVER+"/api/attachments/").replace(qt,'"'+pe.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(un){}if(mt){let un=-1;return ht=ht.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(hn,qt,On){var fn;return++un,Se(hn,un,(fn=et==null?void 0:et[un])==null?void 0:fn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${$e(ht||"")}</pre>`}let jt=$e(ht);jt=(0,ae.ZP)(jt);const Kt=(0,ae.ez)();ht.match(/\[TOC\]/)&&(jt=jt.replace("<p>[TOC]</p>",(0,ae.Qv)()),(0,ae.Iy)()),jt=jt.replace(/(__special_katext_id_\d+__)/g,(un,hn)=>{const{type:qt,expression:On}=Kt[hn];return(0,Ee.renderToString)(Fe(On)||"",{displayMode:qt==="block",throwOnError:!1,output:"html"})}),jt=jt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ae.AL)();const an=document.createElement("div");if(an.innerHTML=jt,Je)return an.innerText;if(ft){const un=ft.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return it(an,un),an.innerHTML}return setTimeout(()=>It(),500),an.innerHTML},[ht,ft]);(0,st.useEffect)(()=>{St.current&&St.current.querySelectorAll(["input","textarea"]).forEach(Kt=>{Kt.oninput=Ie,Kt.onblur=ze,Kt.onfocus=Ve})},[gt]),(0,st.useEffect)(()=>{var jt,Kt,an,un,hn;if(et!=null&&et.length)try{const qt=St.current.querySelectorAll(".edu-program-fill-score"),On=St.current.querySelectorAll('[name="edu-program-fill"]');for(const[fn,Wt]of On.entries())Wt.value=((jt=et==null?void 0:et[fn])==null?void 0:jt.value)||"",((Kt=et==null?void 0:et[fn])==null?void 0:Kt.type)==="warning"?Wt.className="program-fill-warning":((an=et==null?void 0:et[fn])==null?void 0:an.type)==="success"?Wt.className="program-fill-success":Wt.className="";for(const[fn,Wt]of qt.entries())Wt.innerHTML=(un=et==null?void 0:et[fn])!=null&&un.score?`${(hn=et==null?void 0:et[fn])==null?void 0:hn.score}\u5206`:"";Tt(et)}catch(qt){console.log(qt,"error")}},[et]);const Ie=jt=>{gt[jt.target.dataset.id]=gt[jt.target.dataset.id]||{},gt[jt.target.dataset.id].value=jt.target.value,Tt([...gt]),lt(gt,jt.target.dataset.id)},ze=jt=>{gt[jt.target.dataset.id]=gt[jt.target.dataset.id]||{},gt[jt.target.dataset.id].value=jt.target.value,Tt([...gt]),vt(gt,jt.target.dataset.id)},Ve=jt=>{gt[jt.target.dataset.id]=gt[jt.target.dataset.id]||{},gt[jt.target.dataset.id].value=jt.target.value,Tt([...gt]),wt(gt,jt.target.dataset.id)};function it(jt,Kt){return jt.childNodes.forEach(an=>{var un;if(an.childNodes.length>0)it(an,Kt);else if(an.nodeName!=="IMG")if(an.innerHTML)an.innerHTML=(un=an.innerHTML)==null?void 0:un.replace(new RegExp(Kt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const hn=document.createElement("span");hn.innerHTML=an.textContent.replace(new RegExp(Kt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),an.replaceWith(hn)}})}const St=(0,st.useRef)();ae.jb.WebkitLineClamp=He,He&&(We=me(me({},We),ae.jb));function Ct(jt){let Kt=jt.target;if(Kt.tagName.toUpperCase()==="A"){let an=Kt.getAttribute("href");if(an.indexOf("office")>-1)jt.preventDefault(),ut(an),yt("office");else if(an.indexOf("application/pdf")>-1)jt.preventDefault(),ut(an),yt("pdf");else if(an.indexOf("text/html")>-1)jt.preventDefault(),ut(an),yt("html");else if(an.startsWith("#")){jt.preventDefault();let un=document.getElementById(an.replace("#",""));un&&un.scrollIntoView(!0)}}}const It=()=>{var jt;const Kt=(jt=St.current)==null?void 0:jt.querySelectorAll("video");Kt==null||Kt.forEach(an=>{if(an.oncontextmenu=()=>!1,an.src.indexOf(".m3u8")>-1&&!an.canPlayType("application/vnd.apple.mpegurl")){if(fe().isSupported()){var un=new(fe());un.loadSource(an.src),un.attachMedia(an)}}})};return(0,st.useEffect)(()=>{if(St.current&&nt&&nt.match(De)&&window.PR.prettyPrint(),St.current)return St.current.addEventListener("click",Ct),()=>{var jt;(jt=St.current)==null||jt.removeEventListener("click",Ct),(0,ae.AL)(),(0,ae.Iy)()}},[nt,St.current,Ct]),(0,st.useEffect)(()=>{var jt;const Kt=an=>{an.preventDefault(),an.clipboardData.setData("text",window.getSelection().toString())};return(jt=St.current)==null||jt.addEventListener("copy",Kt),()=>{var an;(an=St.current)==null||an.removeEventListener("copy",Kt)}},[St.current]),st.createElement(st.Fragment,null,Je&&st.createElement("div",{ref:St},nt),!Je&&!Ze(nt)&&st.createElement("div",{ref:St,style:me({},We),className:`${Ue||""} ${Xe?"disabled-fill":""} markdown-body ${ct.current}`,dangerouslySetInnerHTML:{__html:nt}}),!Je&&Ze(nt)&&st.createElement(de,{html:nt}),st.createElement(Te.Z,{close:!0,data:dt,type:dt!=null&&dt.length?Pt:"",style:me({},at),onClose:()=>ut("")}))}},60076:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return Ge}});var st=ot(67294),Ft=ot(33054),ae=ot(67294),Ge=({defaultX:Re="40%",leftChild:fe,rightChild:pe,className:be,hideResize:Ee=!1})=>{const[we,Te]=(0,st.useState)(Re),ve=(0,st.useRef)();function Pe(){ve.current=!0}(0,st.useEffect)(()=>{function z(ie){ve.current&&(Ft.Z.publish("resize-move-bar",ie),Te(ie.pageX))}function oe(){ve.current=!1}return window.addEventListener("mousemove",z),window.addEventListener("mouseup",oe),()=>{window.removeEventListener("mousemove",z),window.removeEventListener("mouseup",oe)}},[]);const de=typeof we=="number"&&we!==.01?`${we}px`:Re,ee=`calc(100% - ${Ee?"0px":"4px"} - ${de})`;return ae.createElement("div",{className:`split-panel-container ${be}`},ae.createElement("section",{style:{width:de,display:we===.01?"none":""}},fe),ae.createElement("section",{className:"resize-x-bar",onMouseDown:Pe},ae.createElement("a",{className:"btn-resize"},ae.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},ae.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"})))),ae.createElement("section",{style:{width:ee}},pe))}},59451:function(Sn,vn,ot){"use strict";ot.d(vn,{cT:function(){return je},pe:function(){return Ae}});var st=ot(67294),Ft=ot(35059),ae=ot(2453),Ge=ot(33170),Re=ot(81354),fe=ot.n(Re),pe=ot(25934),be=ot(35973),Ee=ot(56448),we=ot.n(Ee),Te=Object.defineProperty,ve=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(Be,Ue,Je)=>Ue in Be?Te(Be,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Be[Ue]=Je,ie=(Be,Ue)=>{for(var Je in Ue||(Ue={}))ee.call(Ue,Je)&&oe(Be,Je,Ue[Je]);if(de)for(var Je of de(Ue))z.call(Ue,Je)&&oe(Be,Je,Ue[Je]);return Be},le=(Be,Ue)=>ve(Be,Pe(Ue)),ue=(Be,Ue)=>{var Je={};for(var He in Be)ee.call(Be,He)&&Ue.indexOf(He)<0&&(Je[He]=Be[He]);if(Be!=null&&de)for(var He of de(Be))Ue.indexOf(He)<0&&z.call(Be,He)&&(Je[He]=Be[He]);return Je},me=(Be,Ue,Je)=>new Promise((He,We)=>{var at=Lt=>{try{mt(Je.next(Lt))}catch(Xe){We(Xe)}},ft=Lt=>{try{mt(Je.throw(Lt))}catch(Xe){We(Xe)}},mt=Lt=>Lt.done?He(Lt.value):Promise.resolve(Lt.value).then(at,ft);mt((Je=Je.apply(Be,Ue)).next())});const{Dragger:xe}=Ft.default,Ae=Be=>{const Ue="bf3c199c2470cb477d907b1e0917c17b",Je="5183666c72eec9e4";var He=fe().enc.Utf8.parse(Ue);let We=fe().enc.Utf8.parse(Je);var at=fe().AES.decrypt(Be,He,{iv:We,mode:fe().mode.CBC});return at.toString(fe().enc.Utf8)};let De;const Fe=Be=>me(void 0,[Be],function*({identifier:Ue,oldFilename:Je,newFilename:He}){var We,at,ft,mt,Lt,Xe;const et=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});et.data=JSON.parse(Ae(et.data));const lt=new OSS({endpoint:(We=et==null?void 0:et.data)==null?void 0:We.end_point,region:(at=et==null?void 0:et.data)==null?void 0:at.region,accessKeyId:(ft=et==null?void 0:et.data)==null?void 0:ft.access_key_id,accessKeySecret:(mt=et==null?void 0:et.data)==null?void 0:mt.access_key_secret,bucket:(Lt=et==null?void 0:et.data)==null?void 0:Lt.bucket,stsToken:(Xe=et==null?void 0:et.data)==null?void 0:Xe.security_token});return new Promise((vt,wt)=>{console.log(11111,`${Ue}/${Je}`,`${Ue}/${He}`,et.data),lt.copy(`/${Ue}/${Je}`,`/${Ue}/${He}`).then(ht=>{console.log("\u62F7\u8D1D\u6210\u529F",ht)}).catch(ht=>{console.log(ht)})})}),je=(Be,Ue,Je)=>me(void 0,null,function*(){var He,We,at,ft,mt,Lt;Ue.file_name=Be.name;const Xe=yield(0,Ge.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",Ae(Xe.data)),Xe.data=JSON.parse(Ae(Xe.data));const et=Be.name.split(".");et.pop();const lt=Ue.realFileName?et.join(""):(0,pe.Z)(),vt=new(we())({endpoint:(He=Xe==null?void 0:Xe.data)==null?void 0:He.end_point,region:(We=Xe==null?void 0:Xe.data)==null?void 0:We.region,accessKeyId:(at=Xe==null?void 0:Xe.data)==null?void 0:at.access_key_id,accessKeySecret:(ft=Xe==null?void 0:Xe.data)==null?void 0:ft.access_key_secret,bucket:(mt=Xe==null?void 0:Xe.data)==null?void 0:mt.bucket,stsToken:(Lt=Xe==null?void 0:Xe.data)==null?void 0:Lt.security_token});return new Promise((wt,ht)=>{var dt;vt.multipartUpload(`${lt}`,new Blob([Be],{type:Be.type}),le(ie({timeout:200*1e3,partSize:102400},Je),{callback:{url:(dt=Xe==null?void 0:Xe.data)==null?void 0:dt.callback_url,host:Xe==null?void 0:Xe.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ge.rz)(Ue)}})).then(function(ut){var Pt;Be.response=(Pt=ut.data)==null?void 0:Pt.data,wt(ut==null?void 0:ut.data)}).catch(function(ut){ht(ut),console.log("err:",ut)})})}),Le=Be=>{var Ue=Be,{user:Je,cancelUpload:He}=Ue,We=ue(Ue,["user","cancelUpload"]);const[at,ft]=(0,st.useState)([]);let[mt,Lt]=(0,st.useState)();const Xe={onRemove:lt=>{ft([...at.filter(vt=>vt.name!==lt.name)]),We.onChange(at.filter(vt=>vt.name!==lt.name))},disabled:We.disabled,multiple:!0,fileList:at==null?void 0:at.map(lt=>lt.file),customRequest:()=>{},beforeUpload:lt=>me(void 0,null,function*(){let vt=We.maxSize||1073741824;if(at.filter(wt=>wt.name===lt.name).length){ae.ZP.info(`${lt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(lt==null?void 0:lt.size)>vt?(ae.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${vt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(at.push({name:lt.name,file:lt}),ft([...at]),We.onChange(at),!1)})},et=(lt,vt)=>me(void 0,null,function*(){var wt,ht,dt,ut,Pt,yt;vt.file_name=lt.name;const gt=lt.name,Tt=yield(0,Ge.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(Tt.data=JSON.parse(Ae(Tt.data)),(Tt==null?void 0:Tt.status)!==0){at[at.findIndex(Ze=>Ze.name===gt)].status="error",at[at.findIndex(Ze=>Ze.name===gt)].file.status="error",We.onChange(at),ae.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}mt=new(we())({endpoint:(wt=Tt==null?void 0:Tt.data)==null?void 0:wt.end_point,region:(ht=Tt==null?void 0:Tt.data)==null?void 0:ht.region,accessKeyId:(dt=Tt==null?void 0:Tt.data)==null?void 0:dt.access_key_id,accessKeySecret:(ut=Tt==null?void 0:Tt.data)==null?void 0:ut.access_key_secret,bucket:(Pt=Tt==null?void 0:Tt.data)==null?void 0:Pt.bucket,stsToken:(yt=Tt==null?void 0:Tt.data)==null?void 0:yt.security_token}),console.log(lt,"file"),Lt(mt);const ct=lt.name.split(".");ct.pop();const Ye=gt.indexOf(".")>-1?vt.realFileName?ct.join("."):(0,pe.Z)():gt;return new Promise((Ze,Se)=>{var Ne;try{mt.multipartUpload(`${We.identifier}/${Ye}${gt.indexOf(".")>-1?"."+gt.split(".").pop():""}`,new Blob([lt.file],{type:lt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:($e,nt,Ie)=>{try{console.log("\u8FDB\u5EA6",$e,nt,Ie);const ze=at.findIndex(Ve=>Ve.name===gt);at[ze].file.percent=$e*100,at[ze].tempCheckpoint=nt,ft([...at])}catch(ze){}},checkpoint:at[at.findIndex($e=>$e.name===gt)].tempCheckpoint,callback:{customValue:{id:gt+""},url:(Ne=Tt==null?void 0:Tt.data)==null?void 0:Ne.callback_url,host:Tt==null?void 0:Tt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ge.rz)(vt)}}).then(function($e){var nt,Ie,ze;const Ve=at.findIndex(St=>St.name===gt);let it="done";if(((nt=$e.data)==null?void 0:nt.status)===0){lt.response=(Ie=$e.data)==null?void 0:Ie.data;const St=at.findIndex(Ct=>Ct.name===gt);at[St].status="done",at[St].file.status="done"}else ae.ZP.warning((ze=$e.data)==null?void 0:ze.message),it="error";at[Ve].status=it,at[Ve].file.status=it,We.onChange(at),Ze($e==null?void 0:$e.data)}).catch(function($e){at[at.findIndex(nt=>nt.name===gt)].status="error",at[at.findIndex(nt=>nt.name===gt)].file.status="error",ae.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),ft([...at]),We.onChange(at),Se($e),console.log("err:",$e)})}catch($e){}})});return(0,st.useEffect)(()=>{at.every(lt=>lt==="done"||lt==="error")&&We.onComplete(at)},[at]),(0,st.useEffect)(()=>{He&&(mt==null||mt.cancel())},[He]),(0,st.useEffect)(()=>{We.uploading&&at.map(lt=>me(void 0,null,function*(){var vt;if((!lt.status||lt.status==="error")&&!He){lt.status="uploading",lt.file.status="uploading";const wt=yield et(lt,{login:(vt=Je==null?void 0:Je.userInfo)==null?void 0:vt.login,container_type:We.container_type,container_id:We.container_id,description:We.description,realFileName:We.realFileName})}}))},[We.uploading]),st.createElement(xe,le(ie({},Xe),{height:We.height,className:We.className}),st.createElement("p",{className:"ant-upload-hint"},We.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};vn.ZP=(0,be.connect)(({loading:Be,globalSetting:Ue,user:Je})=>({globalSetting:Ue,loading:Be.models.competitions,user:Je}))(Le)},57444:function(Sn,vn,ot){"use strict";ot.d(vn,{h:function(){return me}});var st=ot(67294),Ft=ot(88044),ae=ot(91773),Ge=ot(85804),Re=ot(4631),fe=ot.n(Re),pe=ot(71749),be=ot(30483),Ee=Object.defineProperty,we=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,ee=(xe,Ae,De)=>Ae in xe?Ee(xe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:De}):xe[Ae]=De,z=(xe,Ae)=>{for(var De in Ae||(Ae={}))Pe.call(Ae,De)&&ee(xe,De,Ae[De]);if(ve)for(var De of ve(Ae))de.call(Ae,De)&&ee(xe,De,Ae[De]);return xe},oe=(xe,Ae)=>we(xe,Te(Ae));const ie=Ft.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"]};vn.Z=({callback:xe,onCancel:Ae})=>{const[De,Fe]=(0,st.useState)("python");function je(Be){Fe(ue[Be][1])}function Le(Be){xe(Be)}return st.createElement(ae.default,oe(z({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Le,style:{width:500}}),st.createElement(ae.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},st.createElement(Ft.default,{getPopupContainer:Be=>Be.parentNode,onChange:je},Object.keys(ue).map(Be=>st.createElement(ie,{key:Be,value:Be},ue[Be][0])))),st.createElement(ae.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},st.createElement(me,{mode:De})),st.createElement("div",{className:"flex-container flex-end"},st.createElement(Ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),st.createElement(Ge.ZP,{type:"ghost",onClick:Ae},"\u53D6\u6D88")))};function me({value:xe,onChange:Ae,mode:De,options:Fe={}}){const je=(0,st.useRef)(),[Le,Be]=(0,st.useState)();return(0,st.useEffect)(()=>{if(Le){let Ue=function(Je){const He=Je.getValue();Ae&&Ae(He)};return Le.on("change",Ue),()=>{Le.off("change",Ue)}}},[Le,Ae]),(0,st.useEffect)(()=>{Le&&Le.setOption("mode",De)},[Le,De]),(0,st.useEffect)(()=>{Le&&(xe!==Le.getValue()||xe==="")&&setTimeout(()=>{Le.setValue(xe||"")},300)},[Le,xe]),(0,st.useEffect)(()=>{if(je.current&&!Le){const Ue=fe().fromTextArea(je.current,z({mode:De,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Fe));Be(Ue)}},[je.current,Le]),st.createElement("div",{className:"my-codemirror-container"},st.createElement("textarea",{ref:je}))}},35567:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return Jr}});var st=ot(67294),Ft=ot(4631),ae=ot.n(Ft),Ge=ot(91033),Re=ot(71749),fe=ot(57341),pe=ot(82801),be=ot(88386),Ee=ot(49047),we=ot(80785),Te=ot(65226),ve=({value:nn="",className:ln,showTextOnly:Vt,showLines:cn,style:Qn={}})=>{const rr=(0,st.useMemo)(()=>"",[nn]);return st.createElement(st.Fragment,null,st.createElement("div",{dangerouslySetInnerHTML:{__html:rr}}))},Pe=Object.defineProperty,de=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,le=(nn,ln,Vt)=>ln in nn?Pe(nn,ln,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):nn[ln]=Vt,ue=(nn,ln)=>{for(var Vt in ln||(ln={}))oe.call(ln,Vt)&&le(nn,Vt,ln[Vt]);if(z)for(var Vt of z(ln))ie.call(ln,Vt)&&le(nn,Vt,ln[Vt]);return nn},me=(nn,ln)=>de(nn,ee(ln));let xe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ae({onActionCallback:nn,title:ln,icon:Vt,actionName:cn,className:Qn="",children:rr}){function or(){nn(cn)}return st.createElement("a",{title:ln,className:Qn,onClick:or},st.createElement("i",{className:`${Vt}`}),rr)}var De=({watch:nn,showNullButton:ln,showNullProgramButton:Vt,onActionCallback:cn,fullScreen:Qn,insertTemp:rr,hidetoolBar:or,extraUse:en})=>{const Tn=[...xe,{title:`${nn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${nn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return st.createElement("ul",{className:"markdown-toolbar-container"},!or&&Tn.map((Sr,Vr)=>st.createElement("li",{key:Vr},Sr.actionName?st.createElement(Ae,me(ue({},Sr),{onActionCallback:cn})):st.createElement("span",{className:"v-line"}))),ln?st.createElement("li",null,st.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:cn},st.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Vt?st.createElement(st.Fragment,null,st.createElement("li",null,st.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:cn},st.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),st.createElement("li",null,st.createElement(Ae,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:cn},st.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,rr&&st.createElement("li",null,st.createElement(Ae,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${rr}`,onActionCallback:cn},st.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),en&&st.createElement("li",null,en),st.createElement("li",{className:"btn-full-screen"},st.createElement(Ae,{icon:`${Qn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Qn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:cn})))},Fe=ot(76621),je=ot(91773),Le=ot(28802),Be=ot(85804),Ue=Object.defineProperty,Je=Object.defineProperties,He=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,mt=(nn,ln,Vt)=>ln in nn?Ue(nn,ln,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):nn[ln]=Vt,Lt=(nn,ln)=>{for(var Vt in ln||(ln={}))at.call(ln,Vt)&&mt(nn,Vt,ln[Vt]);if(We)for(var Vt of We(ln))ft.call(ln,Vt)&&mt(nn,Vt,ln[Vt]);return nn},Xe=(nn,ln)=>Je(nn,He(ln));const et={labelCol:{span:4},wrapperCol:{span:20}};var lt=({callback:nn,onCancel:ln})=>{function Vt(cn){nn(cn)}return st.createElement(je.default,Xe(Lt({},et),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Vt,style:{width:500}}),st.createElement(je.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},st.createElement(Le.default,null)),st.createElement(je.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},st.createElement(Le.default,null)),st.createElement("div",{className:"flex-container flex-end"},st.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),st.createElement(Be.ZP,{type:"ghost",onClick:ln},"\u53D6\u6D88")))},vt=ot(57444),wt=ot(70859),ht=ot(62844),dt=ot(71230),ut=ot(63205),Pt=ot(67294),yt=({callback:nn,onCancel:ln})=>{const Vt=document.createElement("canvas"),cn=Vt.getContext("2d");Vt.width=1e3,Vt.height=800,cn.fillStyle="#ffffff",cn.fillRect(0,0,Vt.width,Vt.height);const Qn=Vt.toDataURL("image/png");return Pt.createElement(ht.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Pt.createElement(dt.Z,{style:{height:"100vh"}},Pt.createElement(ut.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Qn,visible:!0,title:String(Date.now())},onOk:rr=>{nn({src:rr.url})},onClose:ln})))},gt=ot(23495);function Tt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Tt,go.CommandHandler),Tt.prototype.canAlignSelection=function(){var nn=this.diagram;return!(nn===null||nn.isReadOnly||nn.isModelReadOnly||nn.selection.count<2)},Tt.prototype.alignLeft=function(){var nn=this.diagram;nn.startTransaction("aligning left");var ln=1/0;nn.selection.each(function(Vt){Vt instanceof go.Link||(ln=Math.min(Vt.position.x,ln))}),nn.selection.each(function(Vt){Vt instanceof go.Link||Vt.move(new go.Point(ln,Vt.position.y))}),nn.commitTransaction("aligning left")},Tt.prototype.alignRight=function(){var nn=this.diagram;nn.startTransaction("aligning right");var ln=-1/0;nn.selection.each(function(Vt){if(!(Vt instanceof go.Link)){var cn=Vt.actualBounds.x+Vt.actualBounds.width;ln=Math.max(cn,ln)}}),nn.selection.each(function(Vt){Vt instanceof go.Link||Vt.move(new go.Point(ln-Vt.actualBounds.width,Vt.position.y))}),nn.commitTransaction("aligning right")},Tt.prototype.alignTop=function(){var nn=this.diagram;nn.startTransaction("alignTop");var ln=1/0;nn.selection.each(function(Vt){Vt instanceof go.Link||(ln=Math.min(Vt.position.y,ln))}),nn.selection.each(function(Vt){Vt instanceof go.Link||Vt.move(new go.Point(Vt.position.x,ln))}),nn.commitTransaction("alignTop")},Tt.prototype.alignBottom=function(){var nn=this.diagram;nn.startTransaction("aligning bottom");var ln=-1/0;nn.selection.each(function(Vt){if(!(Vt instanceof go.Link)){var cn=Vt.actualBounds.y+Vt.actualBounds.height;ln=Math.max(cn,ln)}}),nn.selection.each(function(Vt){Vt instanceof go.Link||Vt.move(new go.Point(Vt.actualBounds.x,ln-Vt.actualBounds.height))}),nn.commitTransaction("aligning bottom")},Tt.prototype.alignCenterX=function(){var nn=this.diagram,ln=nn.selection.first();if(ln){nn.startTransaction("aligning Center X");var Vt=ln.actualBounds.x+ln.actualBounds.width/2;nn.selection.each(function(cn){cn instanceof go.Link||cn.move(new go.Point(Vt-cn.actualBounds.width/2,cn.actualBounds.y))}),nn.commitTransaction("aligning Center X")}},Tt.prototype.alignCenterY=function(){var nn=this.diagram,ln=nn.selection.first();if(ln){nn.startTransaction("aligning Center Y");var Vt=ln.actualBounds.y+ln.actualBounds.height/2;nn.selection.each(function(cn){cn instanceof go.Link||cn.move(new go.Point(cn.actualBounds.x,Vt-cn.actualBounds.height/2))}),nn.commitTransaction("aligning Center Y")}},Tt.prototype.alignColumn=function(nn){var ln=this.diagram;ln.startTransaction("align Column"),nn===void 0&&(nn=0),nn=parseFloat(nn);var Vt=new Array;ln.selection.each(function(en){en instanceof go.Link||Vt.push(en)});for(var cn=0;cn<Vt.length-1;cn++){var Qn=Vt[cn],rr=Qn.actualBounds.y+Qn.actualBounds.height+nn,or=Vt[cn+1];or.move(new go.Point(Qn.actualBounds.x,rr))}ln.commitTransaction("align Column")},Tt.prototype.alignRow=function(nn){nn===void 0&&(nn=0),nn=parseFloat(nn);var ln=this.diagram;ln.startTransaction("align Row");var Vt=new Array;ln.selection.each(function(en){en instanceof go.Link||Vt.push(en)});for(var cn=0;cn<Vt.length-1;cn++){var Qn=Vt[cn],rr=Qn.actualBounds.x+Qn.actualBounds.width+nn,or=Vt[cn+1];or.move(new go.Point(rr,Qn.actualBounds.y))}ln.commitTransaction("align Row")},Tt.prototype.canRotate=function(nn){var ln=this.diagram;return!(ln===null||ln.isReadOnly||ln.isModelReadOnly||ln.selection.count<1)},Tt.prototype.rotate=function(nn){nn===void 0&&(nn=90);var ln=this.diagram;ln.startTransaction("rotate "+nn.toString());var ln=this.diagram;ln.selection.each(function(Vt){Vt instanceof go.Link||Vt instanceof go.Group||(Vt.angle+=nn)}),ln.commitTransaction("rotate "+nn.toString())},Tt.prototype.pullToFront=function(){var nn=this.diagram;nn.startTransaction("pullToFront");var ln=new go.Map;nn.selection.each(function(Vt){ln.set(Vt.layer,0)}),ln.iteratorKeys.each(function(Vt){var cn=0;Vt.parts.each(function(Qn){if(!Qn.isSelected){var rr=Qn.zOrder;isNaN(rr)?Qn.zOrder=0:cn=Math.max(cn,rr)}}),ln.set(Vt,cn)}),nn.selection.each(function(Vt){Tt._assignZOrder(Vt,ln.get(Vt.layer)+1)}),nn.commitTransaction("pullToFront")},Tt.prototype.pushToBack=function(){var nn=this.diagram;nn.startTransaction("pushToBack");var ln=new go.Map;nn.selection.each(function(Vt){ln.set(Vt.layer,0)}),ln.iteratorKeys.each(function(Vt){var cn=0;Vt.parts.each(function(Qn){if(!Qn.isSelected){var rr=Qn.zOrder;isNaN(rr)?Qn.zOrder=0:cn=Math.min(cn,rr)}}),ln.set(Vt,cn)}),nn.selection.each(function(Vt){Tt._assignZOrder(Vt,ln.get(Vt.layer)-1-Tt._findGroupDepth(Vt))}),nn.commitTransaction("pushToBack")},Tt._assignZOrder=function(nn,ln,Vt){Vt===void 0&&(Vt=nn),nn.layer===Vt.layer&&(nn.zOrder=ln),nn instanceof go.Group&&nn.memberParts.each(function(cn){Tt._assignZOrder(cn,ln+1,Vt)})},Tt._findGroupDepth=function(nn){if(nn instanceof go.Group){var ln=0;return nn.memberParts.each(function(Vt){ln=Math.max(ln,Tt._findGroupDepth(Vt))}),ln+1}else return 0},Tt.prototype.doKeyDown=function(){var nn=this.diagram;if(nn!==null){var ln=nn.lastInput;if(ln.key==="Up"||ln.key==="Down"||ln.key==="Left"||ln.key==="Right"){var Vt=this.arrowKeyBehavior;if(Vt==="none")return;if(Vt==="select"){this._arrowKeySelect();return}else if(Vt==="move"){this._arrowKeyMove();return}else if(Vt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Tt.prototype._getAllParts=function(){var nn=new Array;return this.diagram.nodes.each(function(ln){nn.push(ln)}),this.diagram.parts.each(function(ln){nn.push(ln)}),nn},Tt.prototype._arrowKeyMove=function(){var nn=this.diagram,ln=nn.lastInput,Vt=0,cn=0;if(ln.control||ln.meta)Vt=1,cn=1;else if(nn.grid!==null){var Qn=nn.grid.gridCellSize;cn=Qn.width,Vt=Qn.height}nn.startTransaction("arrowKeyMove"),nn.selection.each(function(rr){ln.key==="Up"?rr.move(new go.Point(rr.actualBounds.x,rr.actualBounds.y-Vt)):ln.key==="Down"?rr.move(new go.Point(rr.actualBounds.x,rr.actualBounds.y+Vt)):ln.key==="Left"?rr.move(new go.Point(rr.actualBounds.x-cn,rr.actualBounds.y)):ln.key==="Right"&&rr.move(new go.Point(rr.actualBounds.x+cn,rr.actualBounds.y))}),nn.commitTransaction("arrowKeyMove")},Tt.prototype._arrowKeySelect=function(){var nn=this.diagram,ln=nn.lastInput,Vt=null;ln.key==="Up"?Vt=this._findNearestPartTowards(270):ln.key==="Down"?Vt=this._findNearestPartTowards(90):ln.key==="Left"?Vt=this._findNearestPartTowards(180):ln.key==="Right"&&(Vt=this._findNearestPartTowards(0)),Vt!==null&&(ln.shift?Vt.isSelected=!0:ln.control||ln.meta?Vt.isSelected=!Vt.isSelected:nn.select(Vt))},Tt.prototype._findNearestPartTowards=function(nn){var ln=this.diagram.selection.first();if(ln===null)return null;for(var Vt=ln.actualBounds.center,cn=this._getAllParts(),Qn=1/0,rr=ln,or=0;or<cn.length;or++){var en=cn[or];if(en!==ln&&en.canSelect()){var Tn=en.actualBounds.center,Sr=Vt.directionPoint(Tn),Vr=this._angleCloseness(Sr,nn);if(Vr<=45){var Wn=Vt.distanceSquaredPoint(Tn);Wn*=1+Math.sin(Vr*Math.PI/180),Wn<Qn&&(Qn=Wn,rr=en)}}}return rr},Tt.prototype._angleCloseness=function(nn,ln){return Math.min(Math.abs(ln-nn),Math.min(Math.abs(ln+360-nn),Math.abs(ln-360-nn)))},Tt.prototype._arrowKeyTree=function(){var nn=this.diagram,ln=nn.selection.first();if(ln instanceof go.Node){var Vt=nn.lastInput;if(Vt.key==="Right"){if(!ln.isTreeLeaf)if(!ln.isTreeExpanded)nn.commandHandler.canExpandTree(ln)&&nn.commandHandler.expandTree(ln);else{var cn=this._sortTreeChildrenByY(ln).first();cn!==null&&nn.select(cn)}}else if(Vt.key==="Left")if(!ln.isTreeLeaf&&ln.isTreeExpanded)nn.commandHandler.canCollapseTree(ln)&&nn.commandHandler.collapseTree(ln);else{var Qn=ln.findTreeParentNode();Qn!==null&&nn.select(Qn)}else if(Vt.key==="Up"){var Qn=ln.findTreeParentNode();if(Qn!==null){var rr=this._sortTreeChildrenByY(Qn),or=rr.indexOf(ln);if(or>0){for(var en=rr.elt(or-1);en!==null&&en.isTreeExpanded&&!en.isTreeLeaf;){var Tn=this._sortTreeChildrenByY(en);en=Tn.last()}en!==null&&nn.select(en)}else nn.select(Qn)}}else if(Vt.key==="Down")if(ln.isTreeExpanded&&!ln.isTreeLeaf){var cn=this._sortTreeChildrenByY(ln).first();cn!==null&&nn.select(cn)}else for(;ln!==null;){var Qn=ln.findTreeParentNode();if(Qn===null)break;var rr=this._sortTreeChildrenByY(Qn),or=rr.indexOf(ln);if(or<rr.length-1){nn.select(rr.elt(or+1));break}else ln=Qn}var Sr=nn.selection.first();Sr!==null&&nn.scrollToRect(Sr.actualBounds)}},Tt.prototype._sortTreeChildrenByY=function(nn){var ln=new go.List().addAll(nn.findTreeChildrenNodes());return ln.sort(function(Vt,cn){var Qn=Vt.location,rr=cn.location;return Qn.y<rr.y?-1:Qn.y>rr.y?1:Qn.x<rr.x?-1:Qn.x>rr.x?1:0}),ln},Tt.prototype.copyToClipboard=function(nn){go.CommandHandler.prototype.copyToClipboard.call(this,nn),this._lastPasteOffset.set(this.pasteOffset)},Tt.prototype.pasteFromClipboard=function(){var nn=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(nn,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),nn},Object.defineProperty(Tt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(nn){if(nn!=="move"&&nn!=="select"&&nn!=="scroll"&&nn!=="tree"&&nn!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+nn);this._arrowKeyBehavior=nn}}),Object.defineProperty(Tt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(nn){if(!(nn instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+nn);this._pasteOffset.set(nn)}});var ct=Tt,Ye=ot(18023),Ze=ot(15746),Se=ot(33170),Ne={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},$e=ot(52262),nt=ot(67294),Ie=(nn,ln,Vt)=>new Promise((cn,Qn)=>{var rr=Tn=>{try{en(Vt.next(Tn))}catch(Sr){Qn(Sr)}},or=Tn=>{try{en(Vt.throw(Tn))}catch(Sr){Qn(Sr)}},en=Tn=>Tn.done?cn(Tn.value):Promise.resolve(Tn.value).then(rr,or);en((Vt=Vt.apply(nn,ln)).next())});function ze({onCancel:nn,callback:ln}){let Vt=(0,st.useRef)(),cn=(0,st.useRef)(),Qn=(0,st.useRef)(),rr=(0,st.useRef)(!1);const or=(0,st.useRef)(!1),[en,Tn]=(0,st.useState)(0);function Sr(){const Wn=gt.bx.make,$t={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"};Vt.current=new gt.S0(cn.current,{padding:20,grid:Wn(gt.s_,"Grid",Wn(gt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Wn(gt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:tn=>{var Xr=tn.diagram.commandHandler.addTopLevelParts(tn.diagram.selection,!0);Xr||tn.diagram.currentTool.doCancel()},commandHandler:Wn(ct),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:tn=>{var Xr=tn.subject;Xr.location=Xr.location.copy().snapToGridPoint(tn.diagram.grid.gridOrigin,tn.diagram.grid.gridCellSize),setTimeout(()=>{tn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:tn=>{var Xr=tn.subject;setTimeout(()=>{tn.diagram.commandHandler.editTextBlock()})},LinkRelinked:tn=>{var Xr=tn.parameter.part;Xr.invalidateConnectedLinks();var yi=tn.subject;tn.diagram.toolManager.linkingTool.isForwards?yi.toNode.invalidateConnectedLinks():yi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Vt.current.nodeTemplate=Wn(gt.NB,"Auto",{locationSpot:gt.z6.Center,locationObjectName:"SHAPE",desiredSize:new gt.$u(120,60),minSize:new gt.$u(40,40),resizable:!0,resizeCellSize:new gt.$u(10,10),rotatable:!0},new gt.KX("location","loc",gt.E9.parse).makeTwoWay(gt.E9.stringify),new gt.KX("desiredSize","size",gt.$u.parse).makeTwoWay(gt.$u.stringify),Wn(gt.bn,{name:"SHAPE",fill:$t.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:gt.z6.AllSides,toSpot:gt.z6.AllSides},new gt.KX("figure"),new gt.KX("fill"),new gt.KX("stroke","borderColor"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),Wn(gt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Wn(gt.al,{margin:1,textAlign:"center",overflow:gt.al.OverflowEllipsis,editable:!0},new gt.KX("text").makeTwoWay(),new gt.KX("stroke","color"))),Vt.current.nodeTemplate.toolTip=Wn("ToolTip",Wn(gt.s_,"Vertical",{maxSize:new gt.$u(200,NaN)},Wn(gt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new gt.KX("text")),Wn(gt.al,{font:"10pt sans-serif",textAlign:"center"},new gt.KX("text","details"))));function cr(tn,Xr){var yi=(xr,Po)=>{xr.handled=!0,xr.diagram.model.commit(Li=>{var Bi=Po.part.adornedPart,Mi=new gt.E9().setRectSpot(Bi.actualBounds,tn);Mi.subtract(Bi.location),Mi.scale(2,2),Mi.x+=Math.sign(Mi.x)*130,Mi.y+=Math.sign(Mi.y)*130,Mi.add(Bi.location),Mi.snapToGridPoint(xr.diagram.grid.gridOrigin,xr.diagram.grid.gridCellSize);var Pi=Li.copyNodeData(Bi.data);Li.setGroupKeyForNodeData(Pi,Li.getGroupKeyForNodeData(Bi.data)),Li.addNodeData(Pi);var Ji={from:Bi.key,to:Li.getKeyForNodeData(Pi)};Li.addLinkData(Ji);var kn=xr.diagram.findNodeForData(Pi);kn.location=Mi,xr.diagram.select(kn),setTimeout(()=>{xr.diagram.commandHandler.editTextBlock()},20)})};return Wn(gt.bn,{figure:Xr,alignment:tn,alignmentFocus:tn.opposite(),width:tn.equals(gt.z6.Top)||tn.equals(gt.z6.Bottom)?25:18,height:tn.equals(gt.z6.Top)||tn.equals(gt.z6.Bottom)?18:25,fill:"orange",stroke:$t.white,strokeWidth:4,mouseEnter:(xr,Po)=>Po.fill="dodgerblue",mouseLeave:(xr,Po)=>Po.fill="orange",isActionable:!0,click:yi,contextClick:yi})}function yr(tn){return Wn(gt.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:(Xr,yi)=>yi.fill="dodgerblue",mouseLeave:(Xr,yi)=>yi.fill="orange",click:(Xr,yi)=>{Xr.diagram.commandHandler.showContextMenu(yi.part.adornedPart)}},tn||{})}Vt.current.nodeTemplate.selectionAdornmentTemplate=Wn(gt.uz,"Spot",Wn(gt.Vm,{padding:10}),cr(gt.z6.Top,"TriangleUp"),cr(gt.z6.Left,"TriangleLeft"),cr(gt.z6.Right,"TriangleRight"),cr(gt.z6.Bottom,"TriangleDown"),yr({alignment:new gt.z6(.75,0)}));function Nr(tn,Xr){return(yi,xr)=>{yi.handled=!0,yi.diagram.model.commit(Po=>{Po.set(xr.part.adornedPart.data,tn,Xr)})}}function xn(tn,Xr){return Xr||(Xr="color"),Wn(gt.bn,{width:16,height:16,stroke:"lightgray",fill:tn,margin:1,background:"transparent",mouseEnter:(yi,xr)=>xr.stroke="dodgerblue",mouseLeave:(yi,xr)=>xr.stroke="lightgray",click:Nr(Xr,tn),contextClick:Nr(Xr,tn)})}function gr(){return[Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",xn($t.white,"fill"),xn($t.beige,"fill"),xn($t.extralightblue,"fill"),xn($t.extralightred,"fill"))),Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",xn($t.lightgray,"fill"),xn($t.lightgreen,"fill"),xn($t.lightblue,"fill"),xn($t.lightred,"fill")))]}function hi(){return[Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",xn($t.black),xn($t.green),xn($t.blue),xn($t.red))),Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",xn($t.white),xn($t.magenta),xn($t.purple),xn($t.orange)))]}function Wi(tn,Xr){return Xr||(Xr="thickness"),Wn(gt.bn,"LineH",{width:16,height:16,strokeWidth:tn,margin:1,background:"transparent",mouseEnter:(yi,xr)=>xr.background="dodgerblue",mouseLeave:(yi,xr)=>xr.background="transparent",click:Nr(Xr,tn),contextClick:Nr(Xr,tn)})}function zi(tn,Xr){return Xr||(Xr="dash"),Wn(gt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:tn,margin:1,background:"transparent",mouseEnter:(yi,xr)=>xr.background="dodgerblue",mouseLeave:(yi,xr)=>xr.background="transparent",click:Nr(Xr,tn),contextClick:Nr(Xr,tn)})}function sr(){return[Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",Wi(1),Wi(2),Wi(3),Wi(4))),Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",zi(null),zi([2,4]),zi([4,4])))]}function dr(tn,Xr){return Xr||(Xr="figure"),Wn(gt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:tn,margin:1,background:"transparent",mouseEnter:(yi,xr)=>xr.fill="dodgerblue",mouseLeave:(yi,xr)=>xr.fill="lightgray",click:Nr(Xr,tn),contextClick:Nr(Xr,tn)})}Vt.current.nodeTemplate.contextMenu=Wn("ContextMenu",Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",dr("Rectangle"),dr("RoundedRectangle"),dr("Ellipse"),dr("Diamond"))),Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",dr("Parallelogram2"),dr("ManualOperation"),dr("Procedure"),dr("Cylinder1"))),Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",dr("Terminator"),dr("CreateRequest"),dr("Document"),dr("TriangleDown"))),gr(),hi(),sr()),Vt.current.groupTemplate=Wn(gt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:gt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(tn,Xr)=>{var yi=Xr.addMembers(Xr.diagram.selection,!0);yi||Xr.diagram.currentTool.doCancel()},avoidable:!1},new gt.KX("location","loc",gt.E9.parse).makeTwoWay(gt.E9.stringify),Wn(gt.s_,"Auto",{name:"BODY"},Wn(gt.bn,{parameter1:10,fill:$t.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:gt.z6.AllSides,toSpot:gt.z6.AllSides},new gt.KX("fill"),new gt.KX("stroke","color"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),Wn(gt.Vm,{background:"transparent",margin:20})),Wn(gt.al,{alignment:gt.z6.Top,alignmentFocus:gt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new gt.KX("text"),new gt.KX("stroke","color"))),Vt.current.groupTemplate.selectionAdornmentTemplate=Wn(gt.uz,"Spot",Wn(gt.s_,"Auto",Wn(gt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Wn(gt.Vm,{margin:1.5})),yr({alignment:gt.z6.TopRight,alignmentFocus:gt.z6.BottomRight})),Vt.current.groupTemplate.contextMenu=Wn("ContextMenu",gr(),hi(),sr()),Vt.current.linkTemplate=Wn(gt.rU,{layerName:"Foreground",routing:gt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new gt.KX("fromSpot","fromSpot",gt.z6.parse),new gt.KX("toSpot","toSpot",gt.z6.parse),new gt.KX("fromShortLength","dir",tn=>tn>=1?10:0),new gt.KX("toShortLength","dir",tn=>tn>=1?10:0),new gt.KX("points").makeTwoWay(),Wn(gt.bn,{strokeWidth:2},new gt.KX("stroke","color"),new gt.KX("strokeWidth","thickness"),new gt.KX("strokeDashArray","dash")),Wn(gt.bn,{segmentIndex:0,segmentOffset:new gt.E9(15,0),segmentOrientation:gt.rU.OrientAlong,alignmentFocus:gt.z6.Right,figure:"circle",width:10,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",tn=>tn===1)),Wn(gt.bn,{segmentIndex:-1,segmentOffset:new gt.E9(-10,6),segmentOrientation:gt.rU.OrientPlus90,alignmentFocus:gt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",tn=>tn>=1),new gt.KX("width","thickness",tn=>7+3*tn),new gt.KX("height","thickness",tn=>7+3*tn),new gt.KX("segmentOffset","thickness",tn=>new gt.E9(-15,4+1.5*tn))),Wn(gt.bn,{segmentIndex:0,segmentOffset:new gt.E9(15,-6),segmentOrientation:gt.rU.OrientMinus90,alignmentFocus:gt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new gt.KX("fill","color"),new gt.KX("visible","dir",tn=>tn===2),new gt.KX("width","thickness",tn=>7+3*tn),new gt.KX("height","thickness",tn=>7+3*tn),new gt.KX("segmentOffset","thickness",tn=>new gt.E9(-15,4+1.5*tn))),Wn(gt.al,{alignmentFocus:new gt.z6(0,1,-4,0),editable:!0},new gt.KX("text").makeTwoWay(),new gt.KX("stroke","color"))),Vt.current.linkTemplate.selectionAdornmentTemplate=Wn(gt.uz,Wn(gt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ar(2)},new gt.KX("pathPattern","thickness",Ar)),yr({alignmentFocus:new gt.z6(0,0,-6,-4)}));function Ar(tn){return Wn(gt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(tn+4).toString()+" H3"})}function ii(tn){var Xr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return tn===0?Xr="M0 0 M16 16 M0 8 L16 8":tn===2&&(Xr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Wn(gt.bn,{geometryString:Xr,margin:2,background:"transparent",mouseEnter:(yi,xr)=>xr.background="dodgerblue",mouseLeave:(yi,xr)=>xr.background="transparent",click:Nr("dir",tn),contextClick:Nr("dir",tn)})}function Zr(tn){var Xr=(yi,xr)=>{yi.handled=!0,yi.diagram.model.commit(Po=>{var Li=xr.part.adornedPart;Po.set(Li.data,tn?"toSpot":"fromSpot",gt.z6.stringify(gt.z6.AllSides)),(tn?Li.toNode:Li.fromNode).invalidateConnectedLinks()})};return Wn(gt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(yi,xr)=>xr.background="dodgerblue",mouseLeave:(yi,xr)=>xr.background="transparent",click:Xr,contextClick:Xr})}function In(tn,Xr){var yi=0,xr=gt.z6.RightSide;tn.equals(gt.z6.Top)?(yi=270,xr=gt.z6.TopSide):tn.equals(gt.z6.Left)?(yi=180,xr=gt.z6.LeftSide):tn.equals(gt.z6.Bottom)&&(yi=90,xr=gt.z6.BottomSide),Xr||(yi-=180);var Po=(Li,Bi)=>{Li.handled=!0,Li.diagram.model.commit(Mi=>{var Pi=Bi.part.adornedPart;Mi.set(Pi.data,Xr?"toSpot":"fromSpot",gt.z6.stringify(xr)),(Xr?Pi.toNode:Pi.fromNode).invalidateConnectedLinks()})};return Wn(gt.bn,{alignment:tn,alignmentFocus:tn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:yi,background:"transparent",mouseEnter:(Li,Bi)=>Bi.background="dodgerblue",mouseLeave:(Li,Bi)=>Bi.background="transparent",click:Po,contextClick:Po})}Vt.current.linkTemplate.contextMenu=Wn("ContextMenu",hi(),sr(),Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",ii(0),ii(1),ii(2))),Wn("ContextMenuButton",Wn(gt.s_,"Horizontal",Wn(gt.s_,"Spot",Zr(!1),In(gt.z6.Top,!1),In(gt.z6.Left,!1),In(gt.z6.Right,!1),In(gt.z6.Bottom,!1)),Wn(gt.s_,"Spot",{margin:new gt.Zt(0,0,0,2)},Zr(!0),In(gt.z6.Top,!0),In(gt.z6.Left,!0),In(gt.z6.Right,!0),In(gt.z6.Bottom,!0)))));const Cr=`{ "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 la=["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 Ho(tn){return console.log("shapeName:",tn),la.indexOf(tn)>=0}var zo=new gt.YI(Qn.current,{maxSelectionCount:1,linkTemplate:Wn(gt.rU,{locationSpot:gt.z6.Center,selectionAdornmentTemplate:Wn(gt.uz,"Link",{locationSpot:gt.z6.Center},Wn(gt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Wn(gt.bn,{toArrow:"Standard",stroke:null}))},{routing:gt.rU.AvoidsNodes,curve:gt.rU.JumpOver,corner:5,toShortLength:4},new gt.KX("points"),Wn(gt.bn,{isPanelMain:!0,strokeWidth:2}),Wn(gt.bn,{toArrow:"Standard",stroke:null})),model:new gt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...gt.bn.getFigureGenerators().toArray().map(tn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:tn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Vt.current.addDiagramListener("TextEdited",function(tn){var Xr;const yi=tn.subject.part;var xr=(Xr=document.activeElement)==null?void 0:Xr.value;typeof xr=="string"&&xr.trim()===""&&Vt.current.model.commit(function(Po){Po.set(yi.data,"text","\u672A\u547D\u540D"),Vt.current.commandHandler.stopCommand()},"increment")}),zo.nodeTemplate=Wn(gt.NB,"Auto",{locationSpot:gt.z6.Center},new gt.KX("location","location",gt.E9.parse).makeTwoWay(gt.E9.stringify),Wn(gt.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 gt.KX("stroke").makeTwoWay(),new gt.KX("fill").makeTwoWay(),new gt.KX("figure")),Wn(gt.al,{margin:new gt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new gt.$u(16,16),maxSize:new gt.$u(10,NaN),textAlign:"center",editable:!0},new gt.KX("key").makeTwoWay())),setTimeout(()=>{Vt.current.grid=Wn(gt.s_,"Grid",Wn(gt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Wn(gt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Vt.current.grid.visible=!0,Vt.current.grid.gridCellStroke="darkgray",Vt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Vt.current,Vt.current}const Vr=()=>Ie(this,null,function*(){var Wn,$t=Vt.current.makeImage();const cr=yield(0,Se.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:$t.src,file_data:JSON.stringify({login:(Wn=(0,$e.eY)())==null?void 0:Wn.login,data:JSON.parse(Vt.current.model.toJson())})}});ln({src:cr.url})});return(0,st.useEffect)(()=>(setTimeout(()=>{Sr()},500),Tn(en+1),()=>{Vt.current=null}),[]),nt.createElement("div",{ref:or,className:"body-overflow-initial"},nt.createElement(ht.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!en,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:nt.createElement(dt.Z,null,nt.createElement(Ze.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),nt.createElement(Ze.Z,{onClick:()=>{var Wn,$t,cr=Vt.current.selection.first();if(rr.current=!rr.current,document.activeElement&&cr){let yr=($t=(Wn=document.activeElement)==null?void 0:Wn.value)==null?void 0:$t.trim();typeof yr=="string"&&Vt.current.model.commit(function(Nr){Nr.set(cr.data,"text",yr||"\u672A\u547D\u540D"),Vt.current.commandHandler.stopCommand()},"increment")}Tn(en+1)}},nt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:nn},nt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:rr.current?"none":"block"},className:Ne.flowChartWrp},nt.createElement("div",{style:{display:"flex",height:"100%"}},nt.createElement("div",{style:{width:"300px",height:"100%"}},nt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),nt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ne.myPaletteDiv,ref:Qn})),nt.createElement("div",{style:{flex:1,position:"relative"}},nt.createElement("div",{ref:cn,style:{height:"80vh"}}))),nt.createElement("div",{className:"tr"},nt.createElement(Be.ZP,{size:"large",onClick:Vr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Ve=ze,it=ot(98813),St=ot(37720);const Ct=it.ZP.Group,It={margin:"0 8px"};var jt=({callback:nn,onCancel:ln})=>{function Vt(cn){nn(cn)}return st.createElement(je.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Vt},st.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},st.createElement("span",{style:It},"\u5355\u5143\u683C\u6570\uFF1A"),st.createElement("span",{style:It},"\u884C\u6570"),st.createElement(je.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},st.createElement(St.Z,null)),st.createElement("span",{style:It},"\u5217\u6570"),st.createElement(je.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},st.createElement(St.Z,null))),st.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},st.createElement("span",{style:It},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),st.createElement(je.default.Item,{name:"align"},st.createElement(Ct,null,st.createElement(it.ZP,{value:"default"},st.createElement("i",{className:"fa fa-align-justify"})),st.createElement(it.ZP,{value:"left"},st.createElement("i",{className:"fa fa-align-left"})),st.createElement(it.ZP,{value:"center"},st.createElement("i",{className:"fa fa-align-center"})),st.createElement(it.ZP,{value:"right"},st.createElement("i",{className:"fa fa-align-right"}))))),st.createElement("div",{className:"flex-container flex-end"},st.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),st.createElement(Be.ZP,{type:"ghost",onClick:ln},"\u53D6\u6D88")))},Kt=ot(59637),an=ot(61016),un=ot.n(an),qt=(0,st.forwardRef)(({use3d:nn,width:ln,height:Vt,callback:cn,showSaveButton:Qn},rr)=>{const or=(0,st.useRef)(),en=(0,st.useRef)(),[Tn,Sr]=(0,st.useState)(!1),Vr=(0,st.useRef)({id:or,appName:"graphing",width:ln||1e3,height:Vt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,st.useEffect)(()=>{en.current=new(un())(Vr.current,!0),window.onload=function(){en.current.inject("applet_container")}},[]);const Wn=()=>{var $t=window.ggbApplet.getPNGBase64(1,!0,72);return cn&&cn($t),$t};return(0,st.useEffect)(()=>{Vr.current.appName=Tn?"3D":"graphing",en.current.inject("applet_container")},[Tn]),(0,st.useEffect)(()=>{Sr(nn)},[nn]),(0,st.useImperativeHandle)(rr,()=>({getImgData:Wn})),st.createElement(st.Fragment,null,st.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:or}),st.createElement(dt.Z,{align:"middle"},st.createElement(Ze.Z,{flex:1},st.createElement(Kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Tn,onChange:$t=>Sr($t)})),st.createElement(Ze.Z,null,st.createElement(Be.ZP,{size:"large",onClick:Wn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),On=ot(36527),fn=ot(2453);const Wt="link",Bn="upload-image",zn="add-flowchart",Yn="draw-image",fr="add-flowchart",Gr="code-block",lr="add-table",ni="------------",ri={default:ni,left:`:${ni}`,center:`:${ni}:`,right:`${ni}:`};var ki=ot(99914);function ji(){}let Vi=0;const Io=1e4,Mo="\u2581",ro="@\u2581\u2581@",Nn="@\u2581@",Qe=`
|
|
**\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`,Pn=["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 An(nn){return/^\d+$/.test(nn)?`${nn}px`:nn}const Dn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Zn={[Dn+"-B"]:"bold",[Dn+"-I"]:"italic"},nr={[Wt]:"\u6DFB\u52A0\u94FE\u63A5",[Gr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Bn]:"\u6DFB\u52A0\u56FE\u7247",[Yn]:"\u6DFB\u52A0\u753B\u56FE",[zn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[lr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Jr=({defaultValue:nn="",onChange:ln,width:Vt="100%",height:cn=400,miniToolbar:Qn=!1,isFocus:rr=!1,watch:or,insertTemp:en,mode:Tn="markdown",id:Sr="markdown-editor-id",showResizeBar:Vr=!1,noStorage:Wn=!1,showNullButton:$t=!1,showNullProgramButton:cr=!1,hidetoolBar:yr=!1,fullScreen:Nr=!1,onBlur:xn,onCMBeforeChange:gr,onFullScreen:hi,className:Wi="",disablePaste:zi=!1,disabled:sr=!1,disabledFill:dr=!1,placeholder:Ar="",values:ii="",extraUse:Zr})=>{const[In,Cr]=(0,st.useState)(null),[la,Ho]=(0,st.useState)(nn),[zo,tn]=(0,st.useState)(or),[Xr,yi]=(0,st.useState)(Nr),[xr,Po]=(0,st.useState)(""),[Li,Bi]=(0,st.useState)(0),[Mi,Pi]=(0,st.useState)(cn),[Ji,kn]=(0,st.useState)(!1),[To,bn]=(0,st.useState)(0),[Ni,ya]=(0,st.useState)(0),Zt=(0,st.useRef)(),Jt=(0,st.useRef)(),dn=(0,st.useRef)(),Fn=(0,st.useRef)();(0,st.useEffect)(()=>{const Mr=window.scrollY||window.pageYOffset;Ho(ii),In==null||In.setValue(ii),window.scrollTo(0,Mr)},[ii]),(0,st.useEffect)(()=>{hi==null||hi(Xr)},[Xr]),(0,st.useEffect)(()=>{if(Zt.current){let Mr=function(jr,pn){var Hr;if(zi){pn.preventDefault();return}const pi=pn.clipboardData;if(pi){const vo=pi.types.toString(),qi=pi.items;if(vo==="Files"||pi.types.indexOf("Files")>-1){if(pn.preventDefault(),Tn=="stex")return;try{let Ao=qi[1];((Hr=qi[0])==null?void 0:Hr.kind)==="file"&&(Ao=qi[0]);const $o=Ao.getAsFile(),Fa=$o.name.split(".").pop();(0,wt.I)($o,Sa=>{var Zs,Bs,on;Sa.id?((Zs=$o==null?void 0:$o.type)==null?void 0:Zs.indexOf("image"))>-1?Er.replaceSelection(`<img width="100%" src="/api/attachments/${Sa.id}?type=${Sa.content_type})" alt="" />`):((Bs=$o==null?void 0:$o.type)==null?void 0:Bs.indexOf("video"))>-1?Er.replaceSelection(`<video width="100%" controls src="/api/attachments/${Sa.id}"></video>`):((on=$o==null?void 0:$o.type)==null?void 0:on.indexOf("pdf"))>-1?Er.replaceSelection(`<a href="/api/attachments/${Sa.id}?type=${$o.type}&disposition=inline" target="_blank">${$o.name}</a>`):Pn.includes(Fa)?Er.replaceSelection(`<a href="/api/attachments/${Sa.id}?type=office&disposition=inline" target="_blank">${$o.name}</a>`):Er.replaceSelection(`[${$o.name}](/api/attachments/${Sa.id}?type=${Sa.content_type})`):(Sa==null?void 0:Sa.status)===401&&(document.location.href="/user/login")})}catch(Ao){fn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Er=ae().fromTextArea(Zt.current,{mode:Tn,lineNumbers:!Qn,lineWrapping:!0,value:nn,autoCloseTags:!0,autoCloseBrackets:!0});return Er.on("keyup",function(jr,pn){pn.keyCode===8&&(jr.getValue()==""?Er.setOption("placeholder",Ar):Er.setOption("placeholder",null))}),Er.on("keydown",function(jr,pn){if(pn.keyCode===8){var Hr=oi(jr);Hr&&pn.preventDefault()}}),rr&&Er.focus(),Er.on("paste",Mr),sr&&Er.on("beforeChange",function(jr,pn){(pn.origin==="paste"||pn.origin==="+input")&&pn.cancel()}),Cr(Er),()=>{Er.off("paste",Mr)}}},[]);const pr=(0,st.useCallback)(()=>{if(Jt.current)try{}catch(Mr){console.log(Mr,"---- to set md editor body height")}},[Mi,Jt,Xr]);(0,st.useEffect)(()=>{function Mr(){let Er=new Ge.Z(jr=>{for(let pn of jr)(pn.target.offsetHeight>0||pn.target.offsetWidth>0)&&(pr(),In.setSize("100%","100%"),In.refresh())});return Er.observe(Zt.current.parentElement),Er}if(In){const Er=Mr();return()=>{var jr,pn;(jr=Zt.current)!=null&&jr.parentElement&&Er.unobserve((pn=Zt.current)==null?void 0:pn.parentElement)}}},[In,pr]),(0,st.useEffect)(()=>{if(In){let Mr=[];for(const[Er,jr]of Object.entries(Zn)){let pn={[Er]:()=>{_r(jr)}};Mr.push(pn),In.addKeyMap(pn)}return()=>{for(let Er of Mr)In.removeKeyMap(Er)}}},[In]),(0,st.useEffect)(()=>{Nr!==Xr&&yi(Nr)},[Nr]),(0,ki.Z)(()=>{if(!Wn&&Li>0){let Mr=new Date().getTime(),Er=window.sessionStorage.getItem(Sr);Mr>=Li+Io&&(!Er||Er!==la)&&(window.sessionStorage.setItem(Sr,la),kn(!0))}},Io),(0,st.useEffect)(()=>{tn(or)},[In,or]),(0,st.useEffect)(()=>{In&&rr&&In.focus()},[In,rr]),(0,st.useEffect)(()=>{if(zo&&In){let Mr=function(jr){let pn=jr.target;if(Fn.current){let Hr=pn.scrollTop/pn.scrollHeight;Fn.current.scrollTop=Fn.current.scrollHeight*Hr}};const Er=In.getScrollerElement();return Er.addEventListener("scroll",Mr),()=>{Er.removeEventListener("scroll",Mr)}}},[In,zo]),(0,st.useEffect)(()=>{if(In&&gr){let Mr=function(Er,jr){gr(Er,jr)};return In.on("beforeChange",Mr),()=>{In.off("beforeChange",Mr)}}},[In,gr]),(0,st.useEffect)(()=>{if(In&&xn){let Mr=function(){xn(In.getValue())};return In.on("blur",Mr),()=>{In.off("blur",Mr)}}},[In,xn]);function oi(Mr,Er){var jr=Mr.getDoc(),pn=jr.getCursor(),Hr=jr.getLine(pn.line),pi=Hr.charAt(pn.ch-1),vo=Hr.lastIndexOf("@\u2581@",pn.ch),qi=Hr.lastIndexOf("@\u2581\u2581@",pn.ch),Ao=vo>qi?vo:qi,$o=vo>qi?3:4;if(ro.indexOf(pi)===-1)return null;if(console.log("change1:",Er,Mr,Hr,pn,Ao,vo,qi,pi),Ao>=0&&pn.ch-Ao<5){var Fa=Ao+$o;return jr.replaceRange("",{line:pn.line,ch:Ao},{line:pn.line,ch:Fa}),{line:pn.line,ch:Fa}}return null}(0,st.useEffect)(()=>{if(In){let Mr=function(Er,jr){const pn=Er.getValue();Ho(pn),Bi(new Date().getTime()),Er.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ln&&(cr?ln(pn,Ki(pn)):ln(pn))};return In.on("change",Mr),()=>{In.off("change",Mr)}}},[In,ln]),(0,st.useEffect)(()=>{if(In)if(nn==null)In.setValue(""),Ho("");else{const Mr=window.scrollY||window.pageYOffset;nn!==In.getValue()&&(In.setValue(nn),Ho(nn),In.setCursor(sr?1:In.lineCount(),0),window.scrollTo(0,Mr))}},[In,nn]);const _r=(0,st.useCallback)(Mr=>{const Er=In.getCursor(),jr=In.getSelection();let pn=jr.split(`
|
|
`);switch(Mr){case"bold":return In.replaceSelection("**"+jr+"**"),jr===""&&In.setCursor(Er.line,Er.ch+2),In.focus();case"italic":return In.replaceSelection("*"+jr+"*"),jr===""&&In.setCursor(Er.line,Er.ch+1),In.focus();case"code":return In.replaceSelection("`"+jr+"`"),jr===""&&In.setCursor(Er.line,Er.ch+1),In.focus();case"inline-latex":return Po("inline-latex"),In.focus();case"latex":return In.replaceSelection("```latex\n"+jr+"\n```"),In.setCursor(Er.line+1,jr.length+1),In.focus();case"line-break":return In.replaceSelection(`<br/>
|
|
`),In.focus();case"list-ul":return jr===""?In.replaceSelection("- "+jr):In.replaceSelection(pn.map(Hr=>Hr===""?"":`- ${Hr}`).join(`
|
|
`)),In.focus();case"list-ol":return jr===""?In.replaceSelection("1. "+jr):In.replaceSelection(pn.map((Hr,pi)=>Hr===""?"":`${pi+1}. ${Hr}`).join(`
|
|
`)),In.focus();case"add-null-ch":return jr===""&&In.setCursor(Er.line,Er.ch),In.replaceSelection(Mo),In.focus();case"add-signal":return jr===""&&In.setCursor(Er.line,Er.ch),In.replaceSelection(Nn),In.focus();case"add-multiple":return jr===""&&In.setCursor(Er.line,Er.ch),In.replaceSelection(ro),In.focus();case"inster-template-1":return jr===""&&In.setCursor(Er.line,Er.ch),In.replaceSelection(Qe),In.focus();case"eraser":return In.setValue(""),In.focus();case"trigger-watch":return tn(!zo),In.focus();case"trigger-full-screen":return yi(!Xr),In.focus();case Wt:Po(Wt);return;case Gr:Po(Gr);return;case Bn:Po(Bn);return;case Yn:Po(Yn);return;case"maths-latex":Po("maths-latex");return;case zn:Po(zn);return;case lr:Po(lr);return;default:throw new Error}},[In,zo,Xr]),Kn=(0,st.useCallback)((Mr,Er)=>{var jr,pn,Hr,pi,vo,qi;switch(Po(""),xr){case Wt:const{title:Zs,link:Bs}=Mr;return In.replaceSelection(`[${Zs}](${Bs})`),In.focus();case Gr:const{language:on,content:Da}=Mr;return In.replaceSelection(["```"+on,Da,"```"].join(`
|
|
`)),In.focus();case"maths-latex":for(var Ao=atob(Mr),$o=new Uint8Array(Ao.length),Fa=0;Fa<Ao.length;Fa++)$o[Fa]=Ao.charCodeAt(Fa);var Sa=new Blob([$o],{type:"image/png"});(0,wt.I)(Sa,mi=>{mi.id?In.replaceSelection(``):(mi==null?void 0:mi.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":In.replaceSelection("`$$"+Mr+"$$`");break;case Bn:case Yn:case fr:const{src:ts,alt:Bl}=Mr,yo=Er,ul=(Hr=(pn=(jr=yo==null?void 0:yo.name)==null?void 0:jr.split("."))==null?void 0:pn.pop)==null?void 0:Hr.call(pn);return((pi=yo==null?void 0:yo.type)==null?void 0:pi.indexOf("image"))>-1||!(yo!=null&&yo.type)?yo!=null&&yo.align||yo!=null&&yo.width?In.replaceSelection(`<p style="text-align:${yo.align||"initial"}"><img width="${yo.width?yo.width+"%":"initial"}" src="${ts}" alt="${Bl||""}" /></p>`):In.replaceSelection(`<img width="100%" src="${ts}" alt="${Bl||""}" />`):((vo=yo==null?void 0:yo.type)==null?void 0:vo.indexOf("video"))>-1?In.replaceSelection(`<video width="100%" controls src="${ts}"></video>`):((qi=yo==null?void 0:yo.type)==null?void 0:qi.indexOf("pdf"))>-1?In.replaceSelection(`<a href="${ts}?type=${yo.type}&disposition=inline" target="_blank">${yo.name}</a>`):Pn.includes(ul)?In.replaceSelection(`<a href="${ts}?type=office&disposition=inline" target="_blank">${yo.name}</a>`):In.replaceSelection(`[${yo.name}](${ts})`),In.focus();case lr:const{row:hl,col:bl,align:bo}=Mr;let ia=`
|
|
`;for(let mi=0;mi<hl;mi++){let Gi=[],Co=[];for(let Zo=0;Zo<bl;Zo++)mi===1&&Co.push(ri[bo]),Gi.push(" ");mi===1&&(ia+=`| ${Co.join(" | ")} |
|
|
`),ia+=`| ${Gi.join(bl===1?"":" | ")} |
|
|
`}return In.replaceSelection(ia+`
|
|
`),In.focus();default:throw new Error}},[In,xr]),Et=(0,st.useMemo)(()=>{switch(xr){case Wt:return st.createElement(lt,{callback:Kn,onCancel:io});case Gr:return st.createElement(vt.Z,{callback:Kn,onCancel:io});case Bn:return st.createElement(wt.Z,{callback:Kn,onCancel:io});case zn:return st.createElement(Ve,{callback:Kn,onCancel:io});case lr:return st.createElement(jt,{callback:Kn,onCancel:io});case"maths-latex":return st.createElement(qt,{showSaveButton:!0,callback:Kn});case"inline-latex":return st.createElement(On.Z,{showSaveButton:!0,callback:Kn});default:return null}},[xr]);function io(){Po("")}(0,st.useEffect)(()=>{if(dn.current){let Mr=function(vo){Hr=!0,pi=vo.pageY},Er=function(){Hr=!1},jr=function(vo){if(Hr){let qi=vo.pageY-pi;qi<0&&(qi=0),qi>300&&(qi=300);let Ao=cn+qi+"px";Pi(Ao)}},pn=dn.current,Hr=!1,pi=0;return pn.addEventListener("mousedown",Mr),document.addEventListener("mousemove",jr),document.addEventListener("mouseup",Er),()=>{pn.removeEventListener("mousedown",Mr),document.removeEventListener("mousemove",jr),document.removeEventListener("mouseup",Er)}}},[In,dn]),(0,st.useEffect)(()=>{Pi(cn)},[cn]);const Ir=An(Vt),gi=An(Mi),oo={width:Ir,height:gi},Yi=(0,st.useMemo)(()=>{if(Li){let Mr=new Date(Li),Er=Mr.getHours(),jr=Mr.getMinutes(),pn=Mr.getSeconds();return Er=Er<10?"0"+Er:Er,jr=jr<10?"0"+jr:jr,pn=pn<10?"0"+pn:pn,`${Er}:${jr}:${pn}`}return 0},[Li]),Ki=Mr=>{const Er=[];if(cr){let jr=-1;Mr=Mr.replace(/(@▁▁@|@▁@)/g,function(pn,Hr,pi){Er.push({multiLine:pn!==Nn})})}return Er};function Jo(){window.sessionStorage.removeItem(Sr),kn(!1),Bi(0)}function Vo(){kn(!1),Bi(0),In.setValue(window.sessionStorage.getItem(Sr))}(0,st.useEffect)(()=>{nr[xr]&&xr!==Yn&&xr!==zn&&setTimeout(()=>{const Mr=document.getElementsByClassName("markdown-popup-form")[0],Er=window.innerWidth/2-Mr.offsetWidth/2,jr=window.innerHeight/2-Mr.offsetHeight/2;bn(Er),ya(jr)},0)},[xr]);const Zi=Mr=>{Mr.preventDefault();const Er=Mr.clientX-To,jr=Mr.clientY-Ni;document.body.onmousemove=pn=>{let Hr=pn.clientX-Er,pi=pn.clientY-jr;const vo=document.getElementsByClassName("markdown-popup-form")[0],qi=window.innerWidth-vo.offsetWidth,Ao=window.innerHeight-vo.offsetHeight;Hr=Math.max(0,Math.min(Hr,qi)),pi=Math.max(0,Math.min(pi,Ao)),ao(pn.clientX,pn.clientY,Er,jr)&&(bn(Hr),ya(pi))},document.body.onmouseup=function(){document.body.onmousemove=null}},ao=(Mr,Er,jr,pn)=>{const Hr=document.body.clientHeight,pi=document.body.clientWidth;return Mr<20&&jr>Mr||Mr>pi-20&&jr<Mr||Er<20&&pn>Er||Er>Hr-20&&pn<Er?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return st.createElement(st.Fragment,null,st.createElement("div",{className:"markdown-editor-wrapper",ref:Jt},st.createElement("div",{className:`markdown-editor-container ${Wi} ${zo?"on-preview":""} ${Qn?"mini":""} ${Xr?"full-screen":""}`,style:oo},st.createElement(De,{insertTemp:en,watch:zo,fullScreen:Xr,showNullButton:$t,showNullProgramButton:cr,onActionCallback:_r,hidetoolBar:yr,extraUse:Zr}),st.createElement("div",{className:"markdown-editor-body"},st.createElement("div",{className:"codemirror-container"},st.createElement("textarea",{ref:Zt,placeholder:Ar})),zo?st.createElement("div",{ref:Fn,className:"preview-container"},Tn==="stex"&&st.createElement(ve,{value:la}),Tn!=="stex"&&st.createElement(Te.Z,{disabledFill:dr,showProgramFill:cr,value:la})):null))),Vr?st.createElement("a",{ref:dn,className:"editor-resize"}):null,xr===Yn&&st.createElement(yt,{callback:Kn,onCancel:io}),xr===zn&&st.createElement(Ve,{callback:Kn,onCancel:io}),st.createElement(Fe.Z,null,nr[xr]&&xr!==Yn&&xr!==zn?st.createElement(ht.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:To,top:Ni},title:st.createElement("div",{style:{cursor:"move"},onMouseDown:Zi},nr[xr]),open:!0,onCancel:io,footer:null,destroyOnClose:!0,width:xr===zn?"1200px":null,height:xr===zn?"80vh":null,className:"markdown-popup-form"},Et):null))}},70859:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return Ae},I:function(){return Fe}});var st=ot(91773),Ft=ot(2453),ae=ot(28802),Ge=ot(78957),Re=ot(37720),fe=ot(98813),pe=ot(85804),be=ot(15476),Ee=ot(67294),we=ot(67294),Te=Object.defineProperty,ve=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,oe=(je,Le,Be)=>Le in je?Te(je,Le,{enumerable:!0,configurable:!0,writable:!0,value:Be}):je[Le]=Be,ie=(je,Le)=>{for(var Be in Le||(Le={}))ee.call(Le,Be)&&oe(je,Be,Le[Be]);if(de)for(var Be of de(Le))z.call(Le,Be)&&oe(je,Be,Le[Be]);return je},le=(je,Le)=>ve(je,Pe(Le));const{useForm:ue}=st.default,me={width:280,marginRight:10},xe={labelCol:{span:5},wrapperCol:{span:19}};var Ae=({callback:je,onCancel:Le})=>{const[Be]=ue();let Ue=(0,Ee.useRef)();function Je(at){Ue.current.width=Be.getFieldValue("width"),Ue.current.align=Be.getFieldValue("align"),je(at,Ue.current)}function He(at,ft){if(at.status===-1){Ft.ZP.error(at.message);return}Be.setFieldsValue({src:`/api/attachments/${at.id}`,type:ft.type})}function We(at){let ft=at.target.files[0];Ue.current=ft,Fe(ft,He)}return we.createElement(st.default,le(ie({form:Be},xe),{className:"upload-image-panel",onFinish:Je,style:{width:470,overflow:"hidden"}}),we.createElement(st.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},we.createElement("div",{className:"flex-container"},we.createElement(st.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},we.createElement(ae.default,{style:me})),we.createElement(De,{onFileChange:We}))),we.createElement(st.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},we.createElement(ae.default,{style:{width:264}})),we.createElement(st.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},we.createElement(Ge.Z,null,we.createElement(st.default.Item,{name:"width",style:{margin:0}},we.createElement(Re.Z,{style:{width:264}})),we.createElement("span",{className:"ml8"},"%"))),we.createElement(st.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},we.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"}]})),we.createElement("aside",null,we.createElement(st.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},we.createElement(pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),we.createElement(pe.ZP,{type:"default",onClick:Le},"\u53D6\u6D88"))))};function De({onFileChange:je}){return we.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",we.createElement("input",{type:"file",onChange:je}))}function Fe(je,Le){if(!je)throw new String("\u6CA1\u6709\u6587\u4EF6");let Be=new FormData;Be.append("editormd-image-file",je),Be.append("file_param_name","editormd-image-file"),Be.append("byxhr","true");var Ue=new window.XMLHttpRequest;Ue.withCredentials=!0,Ue.addEventListener("load",function(Je){Le(JSON.parse(Je.target.responseText),je)},!1),Ue.addEventListener("error",function(Je){console.error(Je)},!1),Ue.open("POST",`${be.KI}/api/attachments.json`),Ue.send(Be)}},76621:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return ae}});var st=ot(67294),Ft=ot(73935);class ae extends st.Component{constructor(Re){super(Re);const fe=window.document;this.node=fe.createElement("div"),fe.body.appendChild(this.node)}render(){const{children:Re}=this.props;return(0,Ft.createPortal)(Re,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(Sn,vn,ot){"use strict";ot.d(vn,{SV:function(){return gt},ZP:function(){return yt}});var st=ot(67294),Ft=ot(91033);const ae={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},Ge={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},Re={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(`
|
|
`)}]},pe={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 be=ot(84204),Ee=ot.n(be),we=(Tt,ct,Ye)=>new Promise((Ze,Se)=>{var Ne=Ie=>{try{nt(Ye.next(Ie))}catch(ze){Se(ze)}},$e=Ie=>{try{nt(Ye.throw(Ie))}catch(ze){Se(ze)}},nt=Ie=>Ie.done?Ze(Ie.value):Promise.resolve(Ie.value).then(Ne,$e);nt((Ye=Ye.apply(Tt,ct)).next())});const Te={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},ve=(Tt,ct,Ye,Ze)=>{const Se=ct.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Ye.lineNumber,endColumn:Ye.column});return Array.from(new Set(Se.match(/\b\w{2,}\b/g)||[])).map($e=>({label:$e,kind:Tt.languages.CompletionItemKind.Text,insertText:$e,range:Ze}))},Pe=(Tt,ct,Ye,Ze)=>{Tt.languages.registerCompletionItemProvider(ct,{provideCompletionItems(Se,Ne){const $e=Se.getWordUntilPosition(Ne),nt={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Ie=Se.getLineContent(Ne.lineNumber).substring($e.startColumn-2,$e.endColumn);return{suggestions:[...ve(Tt,Se,Ne,nt),...Ye.map(Ve=>({label:Ve,kind:Tt.languages.CompletionItemKind.Keyword,documentation:Ve,insertText:Ve,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt})),...Ze.map(Ve=>({label:Ve.label,kind:Tt.languages.CompletionItemKind.Snippet,documentation:Ve.content,insertText:Ie.startsWith("#")?Ve.content.replace(/#/,""):Ve.content,insertTextRules:Tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nt}))]}}})};var de=Tt=>{Te.languages.forEach(ct=>{Tt.languages.registerDocumentFormattingEditProvider(ct,{provideDocumentFormattingEdits(Ye){return we(this,null,function*(){const Ze=Ee()(Ye.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:Ye.getFullModelRange(),text:Ze}]})}})}),Pe(Tt,"java",Ge.keywords,Ge.quickKey),Pe(Tt,"cpp",Re.keywords,Re.quickKey),Pe(Tt,"c",ae.keywords,[]),Pe(Tt,"python",fe.keywords,fe.quickKey),Pe(Tt,"scala",pe.keywords,pe.quickKey)};const ee="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var z=Object.defineProperty,oe=(Tt,ct,Ye)=>ct in Tt?z(Tt,ct,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Tt[ct]=Ye,ie=(Tt,ct,Ye)=>oe(Tt,typeof ct!="symbol"?ct+"":ct,Ye);const le=class mx{constructor(ct,Ye,Ze){this.placeholder=ct,this.editor=Ye,this.monaco=Ze,Ye.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};ie(le,"ID","editor.widget.placeholderHint");var me=le,xe=ot(84144),Ae=ot(2453),De=ot(83062),Fe=ot(96486),je=ot(33054),Le=ot(74855),Be=Object.defineProperty,Ue=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,ft=(Tt,ct,Ye)=>ct in Tt?Be(Tt,ct,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Tt[ct]=Ye,mt=(Tt,ct)=>{for(var Ye in ct||(ct={}))We.call(ct,Ye)&&ft(Tt,Ye,ct[Ye]);if(He)for(var Ye of He(ct))at.call(ct,Ye)&&ft(Tt,Ye,ct[Ye]);return Tt},Lt=(Tt,ct)=>Ue(Tt,Je(ct)),Xe=(Tt,ct)=>{var Ye={};for(var Ze in Tt)We.call(Tt,Ze)&&ct.indexOf(Ze)<0&&(Ye[Ze]=Tt[Ze]);if(Tt!=null&&He)for(var Ze of He(Tt))ct.indexOf(Ze)<0&&at.call(Tt,Ze)&&(Ye[Ze]=Tt[Ze]);return Ye},et=(Tt,ct,Ye)=>new Promise((Ze,Se)=>{var Ne=Ie=>{try{nt(Ye.next(Ie))}catch(ze){Se(ze)}},$e=Ie=>{try{nt(Ye.throw(Ie))}catch(ze){Se(ze)}},nt=Ie=>Ie.done?Ze(Ie.value):Promise.resolve(Ie.value).then(Ne,$e);nt((Ye=Ye.apply(Tt,ct)).next())});function lt(Tt){return/^\d+$/.test(Tt)?`${Tt}px`:Tt}function vt(){}let wt=!1;const ht={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function dt(Tt=[]){let ct=Tt;if(Array.isArray(Tt)){for(let Ye=0;Ye<Tt.length;Ye++){let Ze=ht[Tt[Ye]];if(Ze)return Ze}return ct[0]}return ht[ct]||ct}let ut=null;const Pt=()=>et(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Tt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Tt)}});var yt=Tt=>{var ct=Tt,{width:Ye="100%",height:Ze="100%",value:Se,language:Ne="javascript",style:$e={},options:nt={},overrideServices:Ie={},theme:ze="vs-dark",onEditBlur:Ve,isCopy:it=!1,onSave:St,autoHeight:Ct=!1,forbidCopy:It=!1,onChange:jt=vt,editorDidMount:Kt=vt,onFocus:an=vt,onBreakPoint:un=vt,breakPointValue:hn=[],filename:qt="educoder.txt",errorLine:On,errorContent:fn="",highlightLine:Wt,openBreakPoint:Bn=!1,placeholder:zn="",showMiniMap:Yn=!0}=ct,fr=Xe(ct,["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 Gr=(0,st.useRef)(),lr=(0,st.useRef)({}),ni=(0,st.useRef)(),ri=(0,st.useRef)(),ki=(0,st.useRef)([]),ji=(0,st.useRef)(!1),Vi=(0,st.useRef)(),Io=(0,st.useRef)(),Mo=(0,st.useRef)(!1),[ro,Nn]=(0,st.useState)(!1);function Qe(){let en;return Gr.current&&(en=new Ft.Z(Tn=>{for(let Sr of Tn)(Sr.target.offsetHeight>0||Sr.target.offsetWidth>0)&&lr.current.instance.layout()}),en.observe(Gr.current)),en}function Pn(){Ae.ZP.warning({content:decodeURIComponent(ee),key:"monaco-editor-tip"})}const An=()=>{let en=lr.current.instance;if(Se!=null&&en&&ro){const Tn=en.getModel();Tn&&Se!==Tn.getValue()&&(wt=!0,Tn.setValue(Se),en.layout(),wt=!1)}};(0,st.useEffect)(()=>{const en=je.Z.subscribe("formatDocument",Tn=>{var Sr;let Vr=lr.current.instance;(Sr=Vr==null?void 0:Vr.getAction)==null||Sr.call(Vr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Tn=>{jt(Tn)},en},[]),(0,st.useEffect)(()=>{var en;let Tn=lr.current.instance;ri.current&&clearTimeout(ri.current),ri.current=setTimeout(()=>{An()},500),Se&&(Se!=null&&Se.length)&&((en=Tn==null?void 0:Tn.updateOptions)==null||en.call(Tn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Se.split(/\r\n|\r|\n/g).length))+3,5)}))},[Se,ro,lr.current]),(0,st.useEffect)(()=>{if(On&&lr.current&&lr.current.instance){let Tn=lr.current.instance;Tn.changeViewZones(function(Sr){var Vr=document.createElement("div");Vr.style.padding="10px 20px",Vr.style.width="calc(100% - 20px)",Vr.className="my-error-line-wrp",Vr.innerHTML=fn,Sr.addZone({afterLineNumber:On||11,heightInLines:3,domNode:Vr})});var en={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}};Tn.addOverlayWidget(en),Tn.revealPositionInCenter({lineNumber:20,column:1})}},[On,lr.current,ro]);const Lr=(en="",Tn)=>{if(!en||en.trim()==="")return!0;const Vr=lr.current.instance.getModel().getLineTokens(Tn);let Wn=!1;for(let $t=0;$t<2;$t++)Vr.getStandardTokenType($t)===1&&(Wn=!0);return Wn};(0,st.useEffect)(()=>{var en;const Tn=(en=lr.current)==null?void 0:en.instance;if(Tn&&ro&&It){const Sr=Tn.onDidBlurEditorWidget(()=>{Mo.current=!1}),Vr=Tn.onDidFocusEditorText(()=>{Mo.current=!0});return()=>{Sr.dispose(),Vr.dispose()}}},[lr.current,ro,It]),(0,st.useEffect)(()=>{var en;if((en=lr.current)!=null&&en.instance&&ro&&Bn){let Tn=lr.current.instance,Sr=Tn.getModel();if(!Sr)return;(()=>{var sr;let dr=[],Ar=[];const ii=Sr.getAllDecorations();for(let In of ii)In.options.className==="highlighted-line"&&(dr.push((sr=In==null?void 0:In.range)==null?void 0:sr.startLineNumber),Ar.push(In==null?void 0:In.id));if(Wt===dr[0])return;Sr.deltaDecorations(Ar,[]);const Zr=Sr.getLineCount();Wt&&Wt<=Zr&&(Tn.deltaDecorations([],[{range:new ut.Range(Wt,1,Wt,Sr.getLineMaxColumn(Wt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Tn.revealLineInCenter(Wt))})();const Wn=(sr=!1)=>{var dr;let Ar=[],ii=[];const Zr=Sr.getAllDecorations();for(let In of Zr)In.options.linesDecorationsClassName==="breakpoints-select"&&(Ar.push((dr=In==null?void 0:In.range)==null?void 0:dr.startLineNumber),ii.push(In==null?void 0:In.id));if(sr)return{lines:Ar,ids:ii};un(Ar)},$t=sr=>et(void 0,null,function*(){let dr={range:new ut.Range(sr,1,sr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Sr.deltaDecorations([],[dr]),Wn()}),cr=sr=>et(void 0,null,function*(){let dr=[];const Ar=Tn.getLineDecorations(sr);for(let ii of Ar)ii.options.linesDecorationsClassName==="breakpoints-select"&&dr.push(ii.id);yield Sr.deltaDecorations(dr,[]),Wn()}),yr=sr=>{let dr=Tn.getLineDecorations(sr);for(let Ar of dr)if(Ar.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Fe.isEqual)(hn,Wn(!0).lines)){Sr.deltaDecorations(Wn(!0).ids,[]);const sr=hn.map(dr=>({range:new ut.Range(dr,1,dr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Sr.deltaDecorations([],sr)}const Nr=Tn.onDidChangeModelContent(sr=>{let dr=Tn.getPosition();if(dr){let Ar=dr.lineNumber;clearTimeout(Io.current),Io.current=setTimeout(()=>{Lr(Sr.getLineContent(Ar),Ar)?cr(Ar):yr(Ar)?(cr(Ar),$t(Ar)):Wn()},100)}}),xn=Tn.onMouseDown(sr=>{var dr,Ar,ii;if(sr.target.detail&&((ii=(Ar=(dr=sr.target)==null?void 0:dr.element)==null?void 0:Ar.className)!=null&&ii.includes("line-numbers"))){let Zr=sr.target.position.lineNumber;if(Lr(Sr.getLineContent(Zr),Zr))return;yr(Zr)?cr(Zr):$t(Zr)}}),gr=sr=>{let dr={range:new ut.Range(sr,1,sr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ki.current=Tn.deltaDecorations(ki.current,[dr])},hi=()=>{ki.current=Tn.deltaDecorations(ki.current,[])},Wi=Tn.onMouseMove(sr=>{var dr,Ar,ii;if(hi(),sr.target.detail&&((ii=(Ar=(dr=sr.target)==null?void 0:dr.element)==null?void 0:Ar.className)!=null&&ii.includes("line-numbers"))){let Zr=sr.target.position.lineNumber;if(Lr(Sr.getLineContent(Zr),Zr))return;gr(Zr)}}),zi=Tn.onMouseLeave(()=>{hi()});return()=>{Nr.dispose(),xn.dispose(),Wi.dispose(),zi.dispose()}}},[lr.current,ro,hn,Wt,Bn,Ne]),(0,st.useEffect)(()=>{var en;(en=lr.current)!=null&&en.instance&&Bn&&lr.current.instance.setPosition({lineNumber:0,column:0})},[Wt]);function Dn(){let en=lr.current.instance;if(en){const Tn=en.getSelection(),Sr=lr.current.pastePos||{},Vr=new ut.Range(Sr.startLineNumber||Tn.endLineNumber,Sr.startColumn||Tn.endColumn,Sr.endLineNumber||Tn.endLineNumber,Sr.endColumn||Tn.endColumn);setTimeout(()=>{en.executeEdits("",[{range:Vr,text:""}])},300)}}function Zn(en){(window.navigator.platform.match("Mac")?en.metaKey:en.ctrlKey)&&en.keyCode==83&&(en.preventDefault(),St())}const nr=()=>{if(Ct&&lr.current.instance){const en=lr.current.instance.getContentHeight();rr(en<Ze?Ze:en)}else rr(Ze)};function Jr(en){var Tn=document.createEvent("MouseEvents");Tn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),en.dispatchEvent(Tn)}const nn=en=>{if(!Mo.current)return;const{keyCode:Tn,ctrlKey:Sr,metaKey:Vr,target:Wn,type:$t}=en;return($t==="paste"||(Tn===67||Tn===86)&&(Vr||Sr))&&Wn.nodeName==="TEXTAREA"&&(Pn(),en.preventDefault()),!1};function ln(en,Tn){var Sr=window.URL||window.webkitURL||window,Vr=new Blob([Tn]),Wn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Wn.href=Sr.createObjectURL(Vr),Wn.download=en,Jr(Wn)}(0,st.useEffect)(()=>{nr()},[nr]),(0,st.useEffect)(()=>{Gr.current&&!ro&&Promise.all([ot.e(5552),ot.e(9651)]).then(ot.bind(ot,55826)).then(en=>{try{ut=en,lr.current.instance=ut.editor.create(Gr.current,{value:Se,language:dt(Ne),theme:ze,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Yn||!1}},Ie);const Tn=lr.current.instance;let Wn=[...xe.BH._menuItems].find(Nr=>Nr[0]._debugName=="EditorContext")[1],$t=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],cr=(Nr,xn)=>{var gr,hi;let Wi=Nr._first;do xn.includes((hi=(gr=Wi.element)==null?void 0:gr.command)==null?void 0:hi.id)&&Nr._remove(Wi);while(Wi=Wi.next)};if(Kt(Tn,ut),setTimeout(()=>{nr(),lr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{ln(qt||"educoder.txt",Tn.getValue())}})},500),lr.current.subscription=Tn.onDidChangeModelContent(Nr=>{ji.current?clearTimeout(Vi.current):(nr(),jt(Tn.getValue(),Nr)),Vi.current=setTimeout(()=>{ji.current=!1},500)}),window.Monaco||de(ut,dt(Ne)),It&&(cr(Wn,$t),Gr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",nn),window.removeEventListener("paste",nn),window.addEventListener("keydown",nn),window.addEventListener("paste",nn)),window.Monaco=ut,Ve&&Tn.onDidBlurEditorWidget(()=>{Ve(Tn.getValue())}),an&&Tn.onDidFocusEditorText(()=>{It&&Pt(),an(Tn.getValue())}),It){Pt();try{Tn.onDidPaste(Nr=>{const xn=Tn.getSelection(),gr=lr.current.pastePos||{},hi=new ut.Range(gr.startLineNumber||xn.endLineNumber,gr.startColumn||xn.endColumn,gr.endLineNumber||xn.endLineNumber,gr.endColumn||xn.endColumn);Tn.executeEdits("",[{range:Nr.range,text:""}])})}catch(Nr){}}let yr=Qe();return zn&&typeof zn=="string"&&new me(zn,Tn,ut),Nn(!0),()=>{const Nr=lr.current.instance;Nr.dispose();const xn=Nr.getModel();xn&&xn.dispose(),lr.current.subscription&&lr.current.subscription.dispose(),yr.unobserve(Gr.current)}}catch(Tn){}})},[]),(0,st.useEffect)(()=>{if(lr.current.instance&&ro)return document.addEventListener("keydown",Zn,!1),()=>{document.removeEventListener("keydown",Zn)}},[St,ro]),(0,st.useEffect)(()=>{let en=lr.current.instance;if(en&&ro){let Tn=dt(Ne);ut.editor.setModelLanguage(en.getModel(),Tn)}},[Ne,ro]),(0,st.useEffect)(()=>{lr.current.instance&&ro&&ut.editor.setTheme(ze)},[ze,ro]),(0,st.useEffect)(()=>{let en=lr.current.instance;ni.current=nt,en&&ro&&(en.updateOptions(mt({},nt)),setTimeout(()=>{en.getModel().updateOptions(mt({},nt))},200))},[JSON.stringify(nt),ro]),(0,st.useEffect)(()=>{let en=lr.current.instance;en&&ro&&en.layout()},[Ye,Ze,ro]);const[Vt,cn]=(0,st.useState)(lt(Ye)),[Qn,rr]=(0,st.useState)(lt(Ze)),or=Lt(mt({},$e),{width:Vt,height:Qn,position:"relative"});return st.createElement("div",{className:"my-monaco-editor",ref:Gr,style:or},it&&st.createElement(Le.CopyToClipboard,{text:Se,onCopy:()=>Ae.ZP.success("\u590D\u5236\u6210\u529F")},st.createElement(De.Z,{title:"\u590D\u5236\u4EE3\u7801"},st.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},st.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function gt({width:Tt="100%",height:ct="100%",original:Ye,modified:Ze,language:Se,options:Ne={}}){const $e=(0,st.useRef)(),[nt,Ie]=(0,st.useState)(null);function ze(Ct){let It;return $e.current&&(It=new Ft.Z(jt=>{for(let Kt of jt)(Kt.target.offsetHeight>0||Kt.target.offsetWidth>0)&&Ct.layout()}),It.observe($e.current)),It}(0,st.useEffect)(()=>($e.current&&Promise.all([ot.e(5552),ot.e(9404)]).then(ot.bind(ot,50048)).then(Ct=>{ut=Ct;const It=ut.editor.createDiffEditor($e.current,Lt(mt({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ne),{wordWrap:!0}));Ie(It);let jt=ze(It);return()=>{It.dispose();const Kt=It.getModel();Kt&&Kt.dispose(),jt.unobserve($e.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,st.useEffect)(()=>{nt&&nt.setModel({original:ut.editor.createModel(Ye,Se),modified:ut.editor.createModel(Ze,Se)})},[Ye,Ze,Se,nt]);const Ve=lt(Tt),it=lt(ct),St={width:Ve,height:it};return st.createElement("div",{className:"my-diff-editor",ref:$e,style:St})}},21434:function(Sn,vn,ot){"use strict";var st=ot(12867),Ft=ot(88044),ae=ot(59637),Ge=ot(67294);const Re=Ft.default.Option;vn.Z=({isTheoretical:fe,onFontSizeChange:pe,cmFontSize:be,cmCodeMode:Ee,autoFormat:we,onCodeModeChange:Te,onTabToSpace:ve,onAutoFormat:Pe,formatDocument:de,className:ee="",tabToSpace:z,children:oe,code_editor:ie,challenge:le,shixun_environment_id:ue,shixun_environments:me})=>{var xe;const Ae={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},De=(xe=me==null?void 0:me.find(Fe=>Fe.shixun_environment_id===ue))==null?void 0:xe.program_language;return console.log("----",De,me,ue,ie),Ge.createElement("div",{className:`tpi-code-setting ${ee}`},Ge.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Ge.createElement("section",null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Ge.createElement(Ft.default,{bordered:!1,size:"small",value:Ee,onChange:Te},Ge.createElement(Re,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Ge.createElement(Re,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!fe&&Ge.createElement(Ge.Fragment,null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Ge.createElement(Ft.default,{bordered:!1,size:"small",value:be,onChange:pe},Ge.createElement(Re,{value:12},"12px"),Ge.createElement(Re,{value:14},"14px"),Ge.createElement(Re,{value:16},"16px"),Ge.createElement(Re,{value:18},"18px"),Ge.createElement(Re,{value:20},"20px"),Ge.createElement(Re,{value:22},"22px"))),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"Tab\u8F6C\u6362"),Ge.createElement(ae.Z,{checked:z,onChange:ve})),Ge.createElement("div",{className:"file-item",onClick:de},Ge.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!fe&&Ge.createElement(Ge.Fragment,null,Ge.createElement("h3",null,"\u5FEB\u6377\u952E"),Ge.createElement("section",null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Ge.createElement("span",null,"Ctrl + S")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Ge.createElement("span",null,"F1 / Alt + F1")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Ge.createElement("span",null,"Ctrl + ]/[")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Ge.createElement("span",null,"Ctrl + Shift + \\")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Ge.createElement("span",null,"Home")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Ge.createElement("span",null,"End"))),oe),!fe&&Ge.createElement(Ge.Fragment,null,Ge.createElement("h3",null,"\u5FEB\u6377\u952E"),Ge.createElement("section",null,De&&Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),Ge.createElement("span",null,De)),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Ge.createElement("span",null,Ae[le==null?void 0:le.difficulty])),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Ge.createElement("span",null,ie==null?void 0:ie.name)),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Ge.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},99914:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return Ft}});var st=ot(67294);function Ft(ae,Ge){const Re=(0,st.useRef)();(0,st.useEffect)(()=>{Re.current=ae}),(0,st.useEffect)(()=>{function fe(){Re.current()}if(Ge!==null){let pe=setInterval(fe,Ge);return()=>clearInterval(pe)}},[Ge])}},7644:function(Sn,vn,ot){"use strict";ot.r(vn),ot.d(vn,{Types:function(){return Nn},default:function(){return An}});var st=ot(67294),Ft={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"},ae=ot(28802),Ge=ot(62844),Re=ot(69234),fe=ot(91773),pe=ot(2453),be=ot(71230),Ee=ot(15746),we=ot(74330),Te=ot(85804),ve=ot(57399),Pe=ot(88044),de=ot(37720),ee=ot(98813),z=ot(84567),oe=ot(78957),ie=ot(86738),le=ot(67294);const{Option:ue}=Pe.default;var me=(Dn=>(Dn[Dn.language=0]="language",Dn[Dn.difficulty=1]="difficulty",Dn[Dn.category=2]="category",Dn[Dn.openOrNot=3]="openOrNot",Dn))(me||{});const xe={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 Ae(Dn){return xe[Dn].map(Zn=>le.createElement(ue,{key:Zn.title,value:Zn.key}," ",Zn.title," "))}function De(Dn,Zn){Dn.map(nr=>{const{id:Jr,name:nn,sub_disciplines:ln}=nr;let Vt={value:Jr,label:nn};Zn.push(Vt),ln&&ln.length>0&&(Vt.children=[],De(ln,Vt.children))})}function Fe(Dn,Zn){var nr;let Jr=[];for(let nn=0;nn<Dn.length;nn++){const ln=Dn[nn];if(((nr=ln.sub_disciplines)==null?void 0:nr.length)>0){Jr[0]=ln.id;for(let Vt=0;Vt<ln.sub_disciplines.length;Vt++){const cn=ln.sub_disciplines[Vt];if(cn.id===Zn)return Jr[1]=cn.id,[Jr,cn.tag_disciplines||cn.sub_disciplines||[]]}}}return[Jr,[]]}var je=ot(35973),Le=ot(19575),Be=ot(32693),Ue=ot(97309),Je=ot(35567),He=ot(33170);function We(Dn){return(0,He.v_)("practices.json",Dn)}function at(){return(0,He.U2)("problems/new.json")}function ft(Dn){return(0,He.U2)(`practices/${Dn}/edit.json`)}function mt(Dn,Zn){return(0,He.gz)(`practices/${Dn}`,Zn)}function Lt(Dn,Zn){return post(`exercises/${Dn}/exercise_questions.json`,Zn)}function Xe(Dn,Zn){return put(`exercise_questions/${Dn}.json`,Zn)}var et=ot(60076),lt=ot(95012),vt=ot(36295),wt=ot(21434),ht=ot(76621),dt=ot(40471),ut={"code-panel-container":"code-panel-container___BZjjl","action-oj-bar":"action-oj-bar___xbXpK",active:"active___EMVKI"},Pt=Object.defineProperty,yt=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Ze=(Dn,Zn,nr)=>Zn in Dn?Pt(Dn,Zn,{enumerable:!0,configurable:!0,writable:!0,value:nr}):Dn[Zn]=nr,Se=(Dn,Zn)=>{for(var nr in Zn||(Zn={}))ct.call(Zn,nr)&&Ze(Dn,nr,Zn[nr]);if(Tt)for(var nr of Tt(Zn))Ye.call(Zn,nr)&&Ze(Dn,nr,Zn[nr]);return Dn},Ne=(Dn,Zn)=>yt(Dn,gt(Zn));const $e={theme:(0,dt.G)("cmCodeMode","vs-dark"),fontSize:(0,dt.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,dt.G)("cmTabToSpace",!0)};var nt=(Dn=>(Dn[Dn.set_font_size=0]="set_font_size",Dn[Dn.set_theme=1]="set_theme",Dn[Dn.on_tab_to_space=2]="on_tab_to_space",Dn[Dn.set_show_editor_setting=3]="set_show_editor_setting",Dn))(nt||{});function Ie(Dn,Zn){switch(Zn.type){case 3:return Ne(Se({},Dn),{showEditorSetting:Zn.payload});case 1:return Ne(Se({},Dn),{theme:Zn.payload});case 0:return Ne(Se({},Dn),{fontSize:Zn.payload});case 2:return Ne(Se({},Dn),{tabToSpace:Zn.payload});default:throw new Error}}var ze=({value:Dn,onChange:Zn,language:nr,onLanguage:Jr,languageItems:nn,ActionBarRender:ln=Vt=>st.createElement(Ve,{languageItems:nn,onLanguage:Jr,language:nr,onShowCodeSetting:Vt})})=>{const[Vt,cn]=(0,st.useReducer)(Ie,$e),{theme:Qn,fontSize:rr,showEditorSetting:or,tabToSpace:en}=Vt;console.log(Dn,nr,"value");const Tn={onFontSizeChange:$t=>{cn({type:0,payload:$t}),(0,dt.t)("cmFontSize",$t)},tabToSpace:en,cmFontSize:rr,className:"oj",cmCodeMode:Qn,onTabToSpace:$t=>{cn({type:2,payload:$t}),(0,dt.t)("cmTabToSpace",$t)},onCodeModeChange:$t=>{cn({type:1,payload:$t}),(0,dt.t)("cmCodeMode",$t)}};function Sr(){cn({type:3,payload:!1})}function Vr(){cn({type:3,payload:!0})}const Wn={value:Dn,language:nr,onChange:Zn,theme:Qn,height:"calc(100% - 56px)",options:{fontSize:rr,insertSpaces:en}};return st.createElement(st.Fragment,null,st.createElement("div",{className:ut["code-panel-container"]},ln(Vr),st.createElement(vt.ZP,Se({key:nr},Wn))),st.createElement(ht.Z,null,st.createElement(lt.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:or,onClose:Sr},st.createElement(wt.Z,Se({},Tn)))))};function Ve({languageItems:Dn,language:Zn,onShowCodeSetting:nr,onLanguage:Jr}){return st.createElement("div",{className:ut["action-oj-bar"]},Dn==null?void 0:Dn.map(nn=>st.createElement("div",{className:Zn===(nn==null?void 0:nn.language)?ut.active:"",onClick:()=>Jr(nn==null?void 0:nn.language),key:nn==null?void 0:nn.language},nn==null?void 0:nn.language)),st.createElement("a",{onClick:nr},st.createElement("i",{className:"iconfont icon-shezhi"})))}var it=ot(55238),St={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"},Ct=(Dn,Zn,nr)=>new Promise((Jr,nn)=>{var ln=Qn=>{try{cn(nr.next(Qn))}catch(rr){nn(rr)}},Vt=Qn=>{try{cn(nr.throw(Qn))}catch(rr){nn(rr)}},cn=Qn=>Qn.done?Jr(Qn.value):Promise.resolve(Qn.value).then(ln,Vt);cn((nr=nr.apply(Dn,Zn)).next())}),jt=({visible:Dn,onOK:Zn,onCancel:nr})=>{const[Jr,nn]=(0,st.useState)(!1),[ln,Vt]=(0,st.useState)(!1),[cn,Qn]=(0,st.useState)("1"),[rr,or]=(0,st.useState)(""),[en,Tn]=(0,st.useState)([]),Sr=()=>Ct(void 0,null,function*(){if(!rr){pe.ZP.warning(`\u9898\u76EE${yr}\u4E0D\u80FD\u4E3A\u7A7A`);return}Vt(!0);const Nr=yield(0,He.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:Dn,name:rr}});if((Nr==null?void 0:Nr.status)===0){Zn();return}Vt(!1)}),Vr=(Nr="")=>Ct(void 0,null,function*(){nn(!0);let xn=yield(0,He.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:Dn,search:Nr}});Tn(xn.tag_disciplines||[]),nn(!1)}),Wn=Nr=>{let xn=Nr.name;Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:st.createElement("div",null,st.createElement(ae.default,{defaultValue:xn,placeholder:`\u8BF7\u8F93\u5165${yr}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20,onChange:gr=>{xn=gr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Ct(void 0,null,function*(){if(!xn)return pe.ZP.warning(`\u9898\u76EE${yr}\u4E0D\u80FD\u4E3A\u7A7A`),Promise.reject();const gr=yield(0,He.ZP)(`/api/tag_disciplines/${Nr.id}/rename.json`,{method:"post",body:{id:Nr.id,name:xn}});(gr==null?void 0:gr.status)===0&&Vr()})})},$t=Nr=>{Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:Dn==="practice"?st.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",st.createElement("span",{className:"c-light-primary"},Nr.name),"\u201D\u5220\u9664\u5417\uFF1F",st.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):st.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",st.createElement("span",{className:"c-light-primary"},Nr.name),"\u201D\u5220\u9664\u5417\uFF1F",st.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:()=>Ct(void 0,null,function*(){const xn=yield(0,He.ZP)(`/api/tag_disciplines/${Nr.id}.json`,{method:"delete",body:{id:Nr.id}});(xn==null?void 0:xn.status)===0&&Vr()})})},cr=Nr=>{Vr(Nr)},yr=Dn==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return st.createElement(Ge.default,{afterClose:()=>{Vt(!1),nn(!1),or(""),Qn("1"),Tn([])},centered:!0,keyboard:!1,width:600,title:`${yr}\u7BA1\u7406`,open:!!Dn,className:St.customModal,footer:null,onCancel:nr},st.createElement("section",{className:St.wrap},st.createElement(it.default,{activeKey:cn,onChange:Nr=>{or(""),Qn(Nr),Vr()}},st.createElement(it.default.TabPane,{tab:`\u65B0\u589E${yr}`,key:"1"},st.createElement(ae.default,{value:rr,onChange:Nr=>or(Nr.target.value),className:St.in,placeholder:`\u8F93\u5165${yr}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20}),st.createElement("div",{className:St.btns},st.createElement(Te.ZP,{onClick:nr,className:"mr20"},"\u53D6\u6D88 "),st.createElement(Te.ZP,{loading:ln,onClick:Sr,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),st.createElement(it.default.TabPane,{tab:`\u5DF2\u6709${yr}`,key:"2"},st.createElement(ae.default.Search,{allowClear:!0,onSearch:cr,value:rr,onChange:Nr=>or(Nr.target.value),className:St.in,placeholder:`\u8F93\u5165${yr}\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2`}),st.createElement(ve.default,{dataSource:en,bordered:!1,loading:Jr,scroll:en.length>7?{y:300}:{},style:{padding:"0 0px 20px 0px"},columns:[{title:`${yr}\u540D\u79F0`,dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:(Nr,xn)=>st.createElement("span",null,st.createElement("span",{onClick:()=>Wn(xn),className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),st.createElement("span",{onClick:()=>$t(xn),className:"current c-grey-666"},"\u5220\u9664"))}],pagination:!1})))))},Kt=ot(11320),an=ot(32259),un=ot(94699),hn=ot.n(un),qt=ot(28706),On=ot(65226),fn=ot(52262),Wt=ot(67294),Bn=Object.defineProperty,zn=Object.defineProperties,Yn=Object.getOwnPropertyDescriptors,fr=Object.getOwnPropertySymbols,Gr=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,ni=(Dn,Zn,nr)=>Zn in Dn?Bn(Dn,Zn,{enumerable:!0,configurable:!0,writable:!0,value:nr}):Dn[Zn]=nr,ri=(Dn,Zn)=>{for(var nr in Zn||(Zn={}))Gr.call(Zn,nr)&&ni(Dn,nr,Zn[nr]);if(fr)for(var nr of fr(Zn))lr.call(Zn,nr)&&ni(Dn,nr,Zn[nr]);return Dn},ki=(Dn,Zn)=>zn(Dn,Yn(Zn)),ji=(Dn,Zn,nr)=>new Promise((Jr,nn)=>{var ln=Qn=>{try{cn(nr.next(Qn))}catch(rr){nn(rr)}},Vt=Qn=>{try{cn(nr.throw(Qn))}catch(rr){nn(rr)}},cn=Qn=>Qn.done?Jr(Qn.value):Promise.resolve(Qn.value).then(ln,Vt);cn((nr=nr.apply(Dn,Zn)).next())});const{TextArea:Vi}=ae.default,{confirm:Io}=Ge.default,{Panel:Mo}=Re.default,ro={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};var Nn=(Dn=>(Dn[Dn.SET_INITAL_DATA=0]="SET_INITAL_DATA",Dn[Dn.SET_LOADING=1]="SET_LOADING",Dn[Dn.SET_STATUS=2]="SET_STATUS",Dn))(Nn||{});const Qe="#### \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 Pn(Dn,Zn){switch(Zn.type){case 0:return ri(ri({},Dn),Zn.payload);case 1:return ki(ri({},Dn),{loading:Zn.payload});case 2:return ki(ri({},Dn),{status:Zn.payload});default:throw new Error}}var An=()=>{var Dn,Zn,nr;const Jr=(0,je.useLocation)(),{id:nn}=(0,je.useParams)(),[ln]=fe.default.useForm(),[Vt,cn]=(0,st.useState)(),[Qn,rr]=(0,st.useState)(!1),[or,en]=(0,st.useState)([]),[Tn,Sr]=(0,st.useState)([]),[Vr,Wn]=(0,st.useState)([]),[$t,cr]=(0,st.useState)([]),[yr,Nr]=(0,st.useState)([]),[xn,gr]=(0,st.useState)("C"),[hi,Wi]=(0,st.useReducer)(Pn,ro),{loading:zi,data:sr,user:dr,status:Ar}=hi,ii=sr==null?void 0:sr.hack_sets,Zr=(Dn=sr==null?void 0:sr.hack)==null?void 0:Dn.test_set_average,[In,Cr]=(0,st.useState)(!1),la=(0,st.useRef)([]),[Ho,zo]=(0,st.useState)(!1),[tn,Xr]=(0,st.useState)(!1),yi=(0,st.useRef)(!0),[xr,Po]=(0,st.useState)({});(0,st.useEffect)(()=>((0,je.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,st.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)});const Li=()=>ji(void 0,null,function*(){const Ir=yield(0,He.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}}),gi=yield(0,He.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});Sr(Ir.tag_disciplines||[]),Wn(gi.tag_disciplines||[])});var Bi=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}];const Mi=(0,st.useCallback)(()=>ji(void 0,null,function*(){if(Wi({type:1,payload:!0}),nn){const Ir=yield ft(nn),{user:gi,language:oo,practice_sets:Yi,practice_codes:Ki,description:Jo,difficulty:Vo,name:Zi,open_or_not:ao,time_limit:Mr,test_set_average:Er,test_set_score:jr,status:pn,tag_discipline_ids:Hr,source_discipline_ids:pi,item_banks_group_id:vo,is_file:qi=!1,hide_actual_output:Ao,review_privilege:$o,review_description:Fa,submit_rule:Sa}=Ir;Po({review_privilege:$o,status:pn,review_description:Fa,name:Zi}),Cr(Ao);const Bs=qi?[{input:"",output:"",score:100,position:1}]:Yi;qi?(en(Yi),ln.setFieldsValue({hack_sets:Bs})):en([]),Wi({type:0,payload:{loading:!0,user:gi,status:pn,data:{hack:{difficulty:Vo,name:Zi,description:Jo,open_or_not:ao,time_limit:Mr,test_set_average:Er,test_set_score:jr,tag_discipline_ids:Hr,source_discipline_ids:pi,is_file:qi,submit_rule:Sa},hack_sets:Bs}}}),cn({hack:{difficulty:Vo,name:Zi,description:Jo,open_or_not:ao,time_limit:Mr,test_set_average:Er,test_set_score:jr,tag_discipline_ids:Hr,source_discipline_ids:pi,is_file:qi}});const Da=Ki==null?void 0:Ki.map(ts=>ki(ri({},ts),{code:Le.Base64.decode(ts==null?void 0:ts.code)}));Nr(Da),la.current=Da}else{const{user:Ir}=yield at();Wi({type:0,payload:{loading:!0,status:0,user:Ir,data:{hack:{difficulty:"",time_limit:3,description:Qe,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}]}}}),cn({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),Nr(Bi),la.current=Bi}Wi({type:1,payload:!1})}),[nn]);(0,st.useEffect)(()=>{try{Mi(),Li()}catch(Ir){console.log(Ir,"----")}},[]);function Pi(Ir,gi){return ji(this,null,function*(){var oo;const{hack_sets:Yi,hack:Ki}=ri({},Ir);Ki.hide_actual_output=In;let Jo=[],Vo=[],Zi=0;const ao=Ki!=null&&Ki.is_file?or.map((jr,pn)=>ki(ri({},jr),{position:pn+1})):Yi.map(jr=>ki(ri({},jr),{is_file:!1}));for(let jr of ao)Zi+=jr.score,jr.id&&jr.id>=0?Jo.push(jr):Vo.push(jr);if(!(ao!=null&&ao.length)){pe.ZP.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A");return}if(Zi!==100&&!Ki.test_set_score){pe.ZP.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(ao!=null&&ao.some(jr=>!jr.output)){pe.ZP.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A");return}yi.current?zo(!0):Xr(!0);let Mr;const Er=yr==null?void 0:yr.map(jr=>ki(ri({},jr),{code:Le.Base64.encode(jr==null?void 0:jr.code)}));if(nn?Mr=yield mt(nn,{practice:Ki,practice_codes:Er,practice_sets:Vo,update_practice_sets:Jo}):Mr=yield We({practice:Ki,practice_codes:Er,practice_sets:ao,publish:!yi.current}),zo(!1),Xr(!1),(Mr==null?void 0:Mr.status)===0){if((oo=Mr==null?void 0:Mr.similar_practice)!=null&&oo.length){rr(!0),cr(Mr==null?void 0:Mr.similar_practice);return}if(nn){if(pe.ZP.success("\u4FDD\u5B58\u6210\u529F"),!yi.current){const jr=yield(0,He.ZP)(`/api/practices/${nn}/start`,{method:"get"});(jr==null?void 0:jr.status)===0&&je.history.push(`/problems/${jr==null?void 0:jr.identifier}/oj/${nn}`)}}else pe.ZP.success("\u65B0\u5EFA\u6210\u529F"),je.history.replace(`/problems/${Mr==null?void 0:Mr.identifier}/ojedit`)}})}function Ji(){je.history.replace("/problems")}const kn=Ir=>{const gi=Math.floor(100/Ir.length),oo=gi+100%Ir.length;Ir=Ir.map((Yi,Ki)=>Ki===Ir.length-1?ki(ri({},Yi),{score:oo}):ki(ri({},Yi),{score:gi})),en(Ir)};function To(Ir){Ir.target.value||kn(or),Wi({type:0,payload:{data:ki(ri({},sr),{hack:ki(ri({},sr.hack),{test_set_score:Ir.target.value})})}})}function bn(Ir){Wi({type:0,payload:{data:ki(ri({},sr),{hack:ki(ri({},sr.hack),{is_file:Ir.target.value})})}})}function Ni(Ir){Cr(Ir.target.checked)}function ya(Ir){const gi=Ir.target.value;gi&&kn(or),Wi({type:0,payload:{data:ki(ri({},sr),{hack:ki(ri({},sr.hack),{test_set_average:gi})})}})}function Zt(){let Ir=ln.getFieldValue("hack_sets");const gi=Ir.length+1,oo=Math.floor(100/gi),Yi=100%gi;Ir.map((Ki,Jo)=>(Zr&&(Ki.score=oo),Ki.position=Jo+1,Ki)),Ir.push({input:"",output:"",position:gi,score:Zr?oo+Yi:0}),ln.setFieldsValue({hack_sets:Ir}),Wi({type:0,payload:{data:ki(ri({},sr),{hack_sets:Ir})}})}(0,st.useEffect)(()=>{if(Zr){const Ir=ii==null?void 0:ii.length,gi=Math.floor(100/Ir),oo=100%Ir;ii==null||ii.map((Yi,Ki)=>(Yi.score=gi,Yi.position=Ki+1,Ki===Ir-1&&(Yi.score=gi+oo),Yi)),Wi({type:0,payload:{data:ki(ri({},sr),{hack_sets:ii})}}),ln.setFieldsValue({hack_sets:ii})}},[Zr]);function Jt(Ir){let gi=ln.getFieldValue("hack_sets");const oo=(gi==null?void 0:gi.length)-1,Yi=Math.ceil(100/oo),Ki=100%oo;gi.splice(Ir,1),gi==null||gi.map((Jo,Vo)=>(Zr&&(Jo.score=Yi,Vo===oo-1&&(Jo.score=Yi+Ki)),Jo.position=Vo+1,Jo)),Wi({type:0,payload:{data:ki(ri({},sr),{hack_sets:gi})}}),ln.setFieldsValue({hack_sets:gi})}function dn(Ir){gr(Ir)}const Fn=Ir=>{var gi;const oo=(gi=la.current)==null?void 0:gi.findIndex(Yi=>Yi.language===xn);la.current[oo].code=Ir,Nr(la.current)},pr=Ir=>{cn(ri({},ln.getFieldsValue()))},oi=Ir=>ji(void 0,null,function*(){const gi=yield(0,He.ZP)(`/api/practices/${Ir}/start`,{method:"get"});(gi==null?void 0:gi.status)===0&&(0,qt.xg)(`/problems/${gi==null?void 0:gi.identifier}/oj/${Ir}`)}),_r=()=>ji(void 0,null,function*(){const Ir=yield ft(nn),{name:gi,status:oo,review_privilege:Yi,review_description:Ki}=Ir;Po({review_privilege:Yi,status:oo,review_description:Ki,name:gi})}),Kn=()=>{let Ir="";Ge.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(Je.Z,{className:Ft.MdEditor,defaultValue:Ir,onChange:gi=>{Ir=gi}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ji(void 0,null,function*(){if(!Ir)return pe.ZP.warning("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const gi=yield(0,He.ZP)(`/api/practices/${nn}/review.json`,{method:"post",body:{op:"fail",description:Ir}});(gi==null?void 0:gi.status)===0&&(pe.ZP.success("\u63D0\u4EA4\u6210\u529F"),_r())})})},Et=()=>ji(void 0,null,function*(){Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:`\u786E\u8BA4\u5C06\u9898\u76EE\u300A${xr==null?void 0:xr.name}\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F`,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ji(void 0,null,function*(){const Ir=yield(0,He.ZP)(`/api/practices/${nn}/review.json`,{method:"post",body:{op:"pass"}});(Ir==null?void 0:Ir.status)===0&&(pe.ZP.success("\u63D0\u4EA4\u6210\u529F"),_r())})})}),io=()=>{const Ir=Ge.default.confirm({icon:null,width:700,className:`${Ft.cusModal} custom-modal-divider`,centered:!0,title:Wt.createElement(be.Z,null,Wt.createElement(Ee.Z,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Wt.createElement(Ee.Z,null,Wt.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:()=>Ir.destroy()}))),content:Wt.createElement("div",null,Wt.createElement(On.Z,{className:"mt20",value:(xr==null?void 0:xr.review_description)||""}))})};return Wt.createElement(we.Z,{spinning:zi,size:"large",className:Ft["oj-custom-large-spin"]},sr?Wt.createElement(st.Fragment,null,Wt.createElement("header",{className:Ft.header},Wt.createElement("div",null,Wt.createElement("img",{src:`${Kt.Z.IMG_SERVER}/images/${dr==null?void 0:dr.image_url}`,alt:"user",width:30}),Wt.createElement("span",null,dr==null?void 0:dr.name)),Wt.createElement("h2",null," ",(Zn=sr==null?void 0:sr.hack)==null?void 0:Zn.name," "),nn?Wt.createElement("a",{className:Ft.btn_back,onClick:Ji}," ",Wt.createElement(Be.Z,null),"\u9000\u51FA"):null),Wt.createElement(fe.default,{form:ln,initialValues:sr,layout:"vertical",className:Ft["oj-form-container"],onValuesChange:pr,onFinish:Pi},Wt.createElement(et.Z,{hideResize:!0,className:Ft["oj-problems"],leftChild:Wt.createElement(Lr,{formValue:Vt,onRemoveTestCase:Jt,onAddTestCase:Zt,hack:sr.hack,onChangeScore:To,onChangehide:Ni,onChangeAverage:ya,onChangeFile:bn,uploadData:or,setUploadData:en,handleUploadRatio:kn,ischecked:In,pointData:Tn,sourceData:Vr,getPointData:Li}),rightChild:Wt.createElement(ze,{value:(nr=yr==null?void 0:yr.find(Ir=>Ir.language===xn))==null?void 0:nr.code,onChange:Fn,onLanguage:dn,languageItems:yr,language:xn})}),Wt.createElement("div",{className:Ft.footer},!!nn&&Wt.createElement("div",{className:Ft.result},Wt.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),xr!=null&&xr.review_privilege?Wt.createElement(Wt.Fragment,null,Wt.createElement("div",{onClick:Et,className:Ft.pass},"\u901A\u8FC7"),Wt.createElement("div",{onClick:Kn,className:Ft.noPass},"\u4E0D\u901A\u8FC7")):Wt.createElement(Wt.Fragment,null,(xr==null?void 0:xr.status)===0&&Wt.createElement("div",{className:Ft.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(xr==null?void 0:xr.status)===1&&Wt.createElement("div",{className:Ft.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(xr==null?void 0:xr.status)===2&&Wt.createElement("div",{className:Ft.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(xr==null?void 0:xr.status)===3&&Wt.createElement("div",{className:Ft.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(xr==null?void 0:xr.status)===4&&Wt.createElement("div",{className:Ft.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(xr==null?void 0:xr.status)===5&&Wt.createElement("div",{className:Ft.noPassText},Wt.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Wt.createElement("span",{onClick:io},"\u67E5\u770B\u539F\u56E0")))),Wt.createElement(Te.ZP,{type:"primary",ghost:!0,onClick:Ji},"\u9000\u51FA\u7F16\u8F91"),Wt.createElement(Te.ZP,{disabled:tn,loading:Ho,type:"primary",onClick:()=>{yi.current=!0,ln.submit()}},"\u4FDD\u5B58 "),nn?Wt.createElement(Te.ZP,{disabled:Ho,loading:tn,style:{background:"#2FC25B",border:0},type:"primary",onClick:()=>{yi.current=!1,ln.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Wt.createElement(Te.ZP,{disabled:Ho,loading:tn,type:"primary",onClick:()=>{yi.current=!1,ln.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Wt.createElement(Ge.default,{centered:!0,destroyOnClose:!0,footer:null,open:Qn,onCancel:()=>rr(!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:$t,bordered:!1,scroll:$t.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:(Ir,gi)=>Wt.createElement("span",{onClick:()=>oi(gi==null?void 0:gi.identifier),style:{textDecorationLine:"underline"},className:"current c-light-primary"},Ir)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:Ir=>{var gi;return(gi=hn()(Ir))==null?void 0:gi.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Lr({ischecked:Dn,formValue:Zn,hack:nr,onChangeAverage:Jr,onChangeScore:nn,onChangehide:ln,onChangeFile:Vt,onAddTestCase:cn,onRemoveTestCase:Qn,uploadData:rr,setUploadData:or,handleUploadRatio:en,pointData:Tn,sourceData:Sr,getPointData:Vr}){var Wn,$t;const{test_set_average:cr,test_set_score:yr}=nr,[Nr,xn]=(0,st.useState)(!1),[gr,hi]=(0,st.useState)(!1),Wi=(Zr,In)=>{const Cr=[...rr];Cr.splice(In,1),cr?en(Cr):or(Cr)},zi=(Zr,In)=>{console.log(Zr,In);const Cr=rr.map((la,Ho)=>Ho===In?ki(ri({},la),{score:Zr.target.value?Number(Zr.target.value):0}):la);or(Cr)},sr=Zr=>{const In=rr.concat(Zr);nr.test_set_average?en(In):or(In)};function dr(Zr){Zr.stopPropagation()}function Ar(){if((0,fn.Ny)()){hi("practice");return}let Zr="";Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Wt.createElement("div",null,Wt.createElement(ae.default,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:In=>{Zr=In.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ji(this,null,function*(){const In=yield(0,He.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:Zr}});(In==null?void 0:In.status)===0&&Vr()})})}function ii(){if((0,fn.Ny)()){hi("practice_source");return}let Zr="";Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Wt.createElement("div",null,Wt.createElement(ae.default,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:In=>{Zr=In.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>ji(this,null,function*(){const In=yield(0,He.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:Zr}});(In==null?void 0:In.status)===0&&Vr()})})}return Wt.createElement("div",{className:Ft["oj-left-panel"]},Wt.createElement("div",{className:Ft["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:Ft.inputOne},Wt.createElement(ae.default,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Wt.createElement("span",null,(($t=(Wn=Zn==null?void 0:Zn.hack)==null?void 0:Wn.name)==null?void 0:$t.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(Je.Z,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Wt.createElement("div",{className:Ft.row},Wt.createElement("div",{className:Ft.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(Pe.default,null,Ae(me.difficulty)))),Wt.createElement("div",{className:Ft.b},Wt.createElement(fe.default.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Wt.createElement(Pe.default,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:Zr=>Zr.parentNode},Sr.map(Zr=>Wt.createElement(Pe.default.Option,{key:Zr.id,value:Zr.id},Zr.name)))),Wt.createElement(Te.ZP,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:()=>ii()},(0,fn.Ny)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Wt.createElement("div",{className:Ft.row},Wt.createElement("div",{className:Ft.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(Pe.default,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:Zr=>Zr.parentNode},Tn.map(Zr=>Wt.createElement(Pe.default.Option,{key:Zr.id,value:Zr.id},Zr.name)))),Wt.createElement(Te.ZP,{type:"primary",ghost:!0,onClick:()=>Ar()},(0,fn.Ny)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Wt.createElement("div",{className:Ft.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:Ft.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",!nr.is_file&&Wt.createElement(Te.ZP,{style:{height:40},type:"primary",ghost:!0,onClick:cn},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Wt.createElement(fe.default.Item,{name:["hack","test_set_score"]},Wt.createElement(ee.ZP.Group,{onChange:nn},Wt.createElement(ee.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(ee.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(z.default,{style:{marginBottom:"5px"},checked:Dn,onChange:ln},"\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:Ft.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Wt.createElement(ee.ZP.Group,{onChange:Vt},Wt.createElement(oe.Z,{direction:"horizontal"},Wt.createElement(ee.ZP,{value:!1},"\u6587\u672C"),Wt.createElement(ee.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(ee.ZP.Group,null,Wt.createElement(ee.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),Wt.createElement(ee.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),Wt.createElement(ee.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),!nr.test_set_score&&Wt.createElement(fe.default.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Wt.createElement(ee.ZP.Group,{onChange:Jr},Wt.createElement(ee.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Wt.createElement(ee.ZP,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),nr.is_file&&Wt.createElement("div",{className:Ft.upBtn},Wt.createElement(Te.ZP,{ghost:!0,type:"primary",className:"mb20",onClick:()=>xn(!0)},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Wt.createElement(an.Y2,{disabled:nr==null?void 0:nr.test_set_average,inputChange:zi,showScore:!nr.test_set_score,data:rr,onRemove:Wi})),!nr.is_file&&Wt.createElement(fe.default.List,{name:"hack_sets"},(Zr,{})=>Wt.createElement(Re.default,{accordion:!0},Zr.map((In,Cr)=>Wt.createElement(Mo,{key:`${In.key}--${Cr}`,header:Wt.createElement("a",{className:Ft["test-case-name"]},Wt.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Cr+1),yr?null:Wt.createElement(Wt.Fragment,null,Wt.createElement(fe.default.Item,{name:[In.name,"score"],fieldKey:[In.fieldKey,"score"],rules:[{required:!0,message:`\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6${Cr+1}\u8BC4\u5206`}]},Wt.createElement(de.Z,{onClick:dr,min:0,max:100,disabled:cr})),Wt.createElement("span",null,"%"))),extra:Cr>0?Wt.createElement("div",{onClick:dr},Wt.createElement(ie.Z,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Cr+1),onConfirm:()=>{Qn(Cr)}},Wt.createElement(Ue.Z,{className:Ft["btn-remove-case"]}))):null},Wt.createElement(fe.default.Item,{label:"\u8F93\u5165",name:[In.name,"input"],fieldKey:[In.fieldKey,"input"]},Wt.createElement(Vi,null)),Wt.createElement(fe.default.Item,{label:"\u8F93\u51FA",name:[In.name,"output"],fieldKey:[In.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Wt.createElement(Vi,null)))))))),Wt.createElement(an.ZP,{rootIdentifier:null,visible:Nr,onClose:()=>xn(!1),onOK:sr}),Wt.createElement(jt,{visible:gr,onCancel:()=>{hi(!1),Vr()},onOK:()=>{hi(!1),Vr()}}))}},32259:function(Sn,vn,ot){"use strict";ot.d(vn,{Y2:function(){return ft},ZP:function(){return mt}});var st=ot(67294),Ft=ot(35059),ae=ot(2453),Ge=ot(62844),Re=ot(71230),fe=ot(98813),pe=ot(85804),be=ot(84567),Ee=ot(83062),we=ot(28802),Te={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",Pe=ot(56448),de=ot.n(Pe),ee=ot(59451),z=ot(33170),oe=ot(25934),ie=ot(28706),le=ot(20819),ue=ot(67294),me=Object.defineProperty,xe=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Le=(Lt,Xe,et)=>Xe in Lt?me(Lt,Xe,{enumerable:!0,configurable:!0,writable:!0,value:et}):Lt[Xe]=et,Be=(Lt,Xe)=>{for(var et in Xe||(Xe={}))Fe.call(Xe,et)&&Le(Lt,et,Xe[et]);if(De)for(var et of De(Xe))je.call(Xe,et)&&Le(Lt,et,Xe[et]);return Lt},Ue=(Lt,Xe)=>xe(Lt,Ae(Xe)),Je=(Lt,Xe,et)=>new Promise((lt,vt)=>{var wt=ut=>{try{dt(et.next(ut))}catch(Pt){vt(Pt)}},ht=ut=>{try{dt(et.throw(ut))}catch(Pt){vt(Pt)}},dt=ut=>ut.done?lt(ut.value):Promise.resolve(ut.value).then(wt,ht);dt((et=et.apply(Lt,Xe)).next())});const{Dragger:He}=Ft.default,We=Lt=>{const Xe=Pt=>Pt&&Pt.substring(0,Pt.lastIndexOf("."));for(var et=[...Lt],lt=0,vt=[],wt=0;wt<et.length;wt++){for(var ht="",dt=0;dt<vt.length;dt++)if(Xe(vt[dt][0].name)==Xe(et[wt].name)){lt=1,ht=dt;break}if(lt==1)vt[ht].push(et[wt]),lt=0;else if(lt==0){let Pt=new Array;Pt.push(et[wt]),vt.push(Pt)}}return vt.map(Pt=>{if(Pt.forEach(yt=>{let gt=yt.name.split(/\.(?=[^\.]+$)/);yt.name=`${gt[0]}.${gt[1].toLowerCase()}`}),Pt[0].name.includes(".in"))return Pt.length===2?Pt:[Pt[0],{}];if(Pt[0].name.includes(".out"))return Pt.length===2?Pt.reverse():[{},Pt[0]]})},at=({onClose:Lt,onOK:Xe,visible:et,wrapClassName:lt,rootIdentifier:vt,multiple:wt=!1,defaultMultipleValue:ht=!0})=>{const[dt,ut]=(0,st.useState)([]),[Pt,yt]=(0,st.useState)({}),[gt,Tt]=(0,st.useState)(!1),[ct,Ye]=(0,st.useState)(!0),Ze=(0,st.useRef)([]),Se=(0,st.useRef)(0),Ne=()=>{Lt()};(0,st.useEffect)(()=>{$e()},[]),(0,st.useEffect)(()=>{et&&(Ze.current=[],Se.current=0,ut([]),Ye(ht))},[et]);const $e=()=>Je(void 0,null,function*(){try{const It=yield(0,z.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),jt=JSON.parse((0,ee.pe)(It.data));yt(jt)}catch(It){}}),nt=It=>It&&It.substring(0,It.lastIndexOf(".")),Ie=It=>{var jt,Kt;const an=nt((jt=It[0])==null?void 0:jt.name)||nt((Kt=It[1])==null?void 0:Kt.name),un=dt.filter(hn=>nt(hn.name)!==an);Ze.current=[...un],ut([...un])},ze=It=>{if(!ct){const qt=new FormData;qt.append("file",It.file),(0,z.ZP)("/api/attachments/get_file_content.json",{method:"post",body:qt},!0).then(fn=>{if(fn.status===0){Se.current=Se.current+1;const Wt=Ze.current.map(Bn=>{var zn;if(Bn.name===It.name){const Yn=Be({},Bn);return(zn=It==null?void 0:It.name)!=null&&zn.includes(".in")?Yn.input=fn==null?void 0:fn.content:Yn.output=fn==null?void 0:fn.content,Yn}return Bn});if(Ze.current=[...Wt],ut([...Wt]),Se.current>0&&Se.current===dt.length){Tt(!1);let Bn=We(Wt);Bn=Bn.filter(zn=>{var Yn,fr;return!!((Yn=zn[0])!=null&&Yn.name&&((fr=zn[1])!=null&&fr.name))}),Bn=Bn.map(zn=>Ue(Be(Be({},zn[0]),zn[1]),{is_file:!1})),Xe(Bn),Lt()}}else Tt(!1),Lt()});return}const jt=new(de())({endpoint:Pt.end_point,region:Pt.region,accessKeyId:Pt.access_key_id,accessKeySecret:Pt.access_key_secret,bucket:Pt.bucket,stsToken:Pt.security_token}),Kt=It.name,an={container_type:"TestSet",file_name:Kt},un=(0,oe.Z)();let hn=`testsets/${vt}/${un}${Kt.indexOf(".")>-1?"."+Kt.split(".").pop():""}`;vt===null&&(hn=`testsets/${un}${Kt.indexOf(".")>-1?"."+Kt.split(".").pop():""}`),jt.multipartUpload(hn,new Blob([It.file],{type:It.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Kt+""},url:Pt==null?void 0:Pt.callback_url,host:Pt==null?void 0:Pt.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,z.rz)(an)}}).then(function(qt){if(qt.data.status===0){Se.current=Se.current+1;const On=Ze.current.map(fn=>{var Wt,Bn,zn,Yn,fr,Gr,lr,ni,ri,ki,ji,Vi,Io,Mo,ro,Nn,Qe;if(fn.name===((Bn=(Wt=qt.data)==null?void 0:Wt.data)==null?void 0:Bn.file_name)){const Pn=Be({},fn);return(fr=(Yn=(zn=qt.data)==null?void 0:zn.data)==null?void 0:Yn.file_name)!=null&&fr.includes(".in")?(Pn.in_object_key=(lr=(Gr=qt.data)==null?void 0:Gr.data)==null?void 0:lr.object,Pn.in_object_size=(ri=(ni=qt.data)==null?void 0:ni.data)==null?void 0:ri.size,Pn.input=(ji=(ki=qt.data)==null?void 0:ki.data)==null?void 0:ji.file_name,Pn.in_file=It):(Pn.out_object_key=(Io=(Vi=qt.data)==null?void 0:Vi.data)==null?void 0:Io.object,Pn.out_object_size=(ro=(Mo=qt.data)==null?void 0:Mo.data)==null?void 0:ro.size,Pn.output=(Qe=(Nn=qt.data)==null?void 0:Nn.data)==null?void 0:Qe.file_name,Pn.out_file=It),Pn}return fn});if(Ze.current=[...On],ut([...On]),Se.current>0&&Se.current===dt.length){Tt(!1);let fn=We(On);fn=fn.filter(Wt=>{var Bn,zn;return!!((Bn=Wt[0])!=null&&Bn.name&&((zn=Wt[1])!=null&&zn.name))}),fn=fn.map(Wt=>Ue(Be(Be({},Wt[0]),Wt[1]),{is_file:!0})),Xe(fn),Lt()}}})},Ve=It=>new Promise((jt,Kt)=>{let an=0,un=[];for(let hn=0;hn<It.length;hn++)It[hn].file.slice(0,1).arrayBuffer().then(()=>{an++,an===It.length&&(un.length?(ae.ZP.warning(`${un.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Kt()):jt(It))}).catch(qt=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",qt),an++,un.push(It[hn].name),an===It.length&&(un.length?(ae.ZP.warning(`${un.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),Kt()):jt(It))})}),it=()=>Je(void 0,null,function*(){if(dt.length===0){ae.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield Ve(dt),Tt(!0),We(dt).some(jt=>{var Kt,an;return!((Kt=jt[0])!=null&&Kt.name&&((an=jt[1])!=null&&an.name))})){Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>Je(void 0,null,function*(){dt.map(jt=>Je(void 0,null,function*(){ze(jt)}))}),onCancel:()=>{Tt(!1)}});return}dt.map(jt=>Je(void 0,null,function*(){ze(jt)}))}),St={name:"file",fileList:dt,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:It=>{if(dt!=null&&dt.some(Kt=>Kt.name===It.name))return ae.ZP.info(`${It.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(It.size/1024/1024>100)return ae.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(It.name))return ae.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const jt={name:It.name,uid:It.uid,file:It,percent:0};return dt.push(jt),Ze.current=[...dt],ut([...dt]),!1}},Ct=We(dt);return console.log(dt,Ct,"fileList"),ue.createElement(Ge.default,{open:et,wrapClassName:lt,onOk:it,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:gt},onCancel:Ne,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:Te.wrap},dt.length?ue.createElement("div",null,ue.createElement(Re.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:wt?"visible":"hidden"}},ue.createElement("span",{className:Te.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(fe.ZP.Group,{className:`ml20 ${Te.testCaseRadio}`,optionType:"button",value:ct,onChange:It=>Ye(It.target.value)},ue.createElement(fe.ZP,{value:!1},"\u6587\u672C"),ue.createElement(fe.ZP,{value:!0},"\u6587\u4EF6"))),ue.createElement(Ft.default,Be({},St),ue.createElement(pe.ZP,{type:"primary",className:Te.btnS},ue.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ue.createElement(ft,{data:Ct,onRemove:Ie})):ue.createElement("div",{className:`${Te.noData} mb30`},ue.createElement(Ft.default.Dragger,Ue(Be({},St),{className:Te.dragger}),ue.createElement("img",{src:ve,alt:"",className:"mb20"}),ue.createElement("div",null,ue.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),ue.createElement("span",{className:Te.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ue.createElement("div",{className:Te.text},ue.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),ue.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",ue.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",ue.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",ue.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",ue.createElement("br",null))))},ft=({data:Lt=[],onRemove:Xe,width:et="auto",showScore:lt=!1,disabled:vt=!1,inputChange:wt,onEvaluatingChange:ht,onSelectAll:dt,checkAll1:ut,checkAll2:Pt,checkAll3:yt,checkAll4:gt,checkAll5:Tt,showEvaluatingSetting:ct=!1,className:Ye="",isProgramHomework:Ze=!1})=>{const Se={value:"",filename:"",dataUrl:""},[Ne,$e]=(0,st.useState)(Be({},Se)),nt=Ve=>{let it=document.createElement("a");document.body.appendChild(it);let St=URL.createObjectURL(Ve.file);it.href=St,it.download=Ve.name,it.click(),URL.revokeObjectURL(St),document.body.removeChild(it)},Ie=(Ve,it)=>{(0,ie.LR)(Ve,it)},ze=(Ve,it)=>{Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ue.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{Xe(Ve,it)},onCancel:()=>{}})};return Lt.length?ue.createElement("div",{className:Ye,style:{width:et}},ue.createElement("div",{className:`${Ze?Te.headProgram:Te.head}`},ct&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:ut,onChange:Ve=>{dt(Ve.target.checked,"hidden")}}),ue.createElement(Ee.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:Ze?"25%":"15%"}},"\u7528\u4F8B"),ue.createElement("div",{style:{width:lt?Ze?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:lt?Ze?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),lt&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),ct&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:gt,onChange:Ve=>{dt(Ve.target.checked,"input_visible")}}),ue.createElement(Ee.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"}))),ct&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:Pt,onChange:Ve=>{dt(Ve.target.checked,"is_invisible")}}),ue.createElement(Ee.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"}))),ct&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:Tt,onChange:Ve=>{dt(Ve.target.checked,"actual_output_visible")}}),ue.createElement(Ee.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"}))),ct&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(be.default,{checked:yt,onChange:Ve=>{dt(Ve.target.checked,"last_match_rule")}}),ue.createElement(Ee.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{className:Te.operation,style:Ze?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ue.createElement("div",{className:Te.listWrapper,style:{boxShadow:Ze?"0px 2px 4px 0px #EAEEF4":"unset"}},Lt.map((Ve,it)=>{var St,Ct,It,jt;return ue.createElement("div",{key:it,className:Te.list,style:Ze?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},ct&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(be.default,{checked:!!Ve.hidden,onChange:Kt=>{ht(Kt.target.checked,it,"hidden")}})),ue.createElement("div",{style:{width:Ze?"25%":"15%",paddingLeft:Ze?"5px":"0px",paddingRight:Ze?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",it+1),ue.createElement("div",{className:Te.info,style:{width:lt?Ze?"20%":"15%":"25%"}},ue.createElement("span",{title:Ve.input||((St=Ve[0])==null?void 0:St.name),onClick:()=>Je(void 0,null,function*(){let Kt;Ve.input?Ve.input_file_url?Kt=Ve.input_file_url:Kt=Ve.in_file:Kt=Ve[0];let an;typeof Kt=="string"?(an=yield fetch(Kt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),$e({value:yield an.text(),filename:"",dataUrl:Kt})):(an=yield(0,ie.db)(Kt.file),$e({value:an.text,filename:Kt.name,dataUrl:an.link}))})},Ve.input||((Ct=Ve[0])==null?void 0:Ct.name))),ue.createElement("div",{className:Te.info,style:{width:lt?Ze?"20%":"15%":"25%"}},ue.createElement("span",{title:Ve.output||((It=Ve[1])==null?void 0:It.name),onClick:()=>Je(void 0,null,function*(){let Kt;Ve.input?Ve.output_file_url?Kt=Ve.output_file_url:Kt=Ve.out_file:Kt=Ve[1];let an;typeof Kt=="string"?(an=yield fetch(Kt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),$e({value:yield an.text(),filename:"",dataUrl:Kt})):(an=yield(0,ie.db)(Kt.file),$e({value:an.text,filename:Kt.name,dataUrl:an.link}))})},Ve.output||((jt=Ve[1])==null?void 0:jt.name))),lt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(we.default,{size:"large",addonAfter:Ze?"%":null,disabled:vt,style:{width:"80%"},onChange:Kt=>wt(Kt,it),value:Ve.score}),!Ze&&ue.createElement("span",null,"\xA0%")),ct&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:Ve.input_visible||!1,onChange:Kt=>{ht(Kt.target.checked,it,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),ct&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:Ve.is_invisible||!1,onChange:Kt=>{ht(Kt.target.checked,it,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),ct&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:Ve.actual_output_visible||!1,onChange:Kt=>{ht(Kt.target.checked,it,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),ct&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(be.default,{checked:Ve.last_match_rule||!1,onChange:Kt=>{ht(Kt.target.checked,it,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ue.createElement("div",{onClick:()=>ze(Ve,it),style:Ze?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ue.createElement("span",{className:Te.del},"\u5220\u9664")))})),ue.createElement(le.Z,{close:!0,data:Ne.dataUrl,filename:Ne.filename,type:Ne.dataUrl.length?"txt":"",onClose:()=>$e(Be({},Se)),monacoEditor:{value:Ne.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var mt=at},51161:function(Sn,vn,ot){"use strict";ot.d(vn,{AL:function(){return me},Iy:function(){return Te},Qv:function(){return de},ez:function(){return ue},jb:function(){return ve}});var st=ot(47084),Ft=ot.n(st),ae=ot(90621),Ge=ot.n(ae);let Re=1;function fe(je,Le){const Be=je.match(/^(\s+)(?:```)/);if(Be===null)return Le;const Ue=Be[1];return Le.split(`
|
|
`).map(Je=>{const He=Je.match(/^\s+/);if(He===null)return Je;const[We]=He;return We.length>=Ue.length?Je.slice(Ue.length):Je}).join(`
|
|
`)}let pe=[],be=["<ul>"];const Ee=new(Ft()).Renderer,we=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Te(){pe.length=0,be=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Pe(je,Le,Be,Ue){if(Le>=je.length||je[Le].level<=Be)return Le;var Je=je[Le];Ue.push("<li><a href='#"+Re+Je.anchor+"'>"+Je.text+"</a>"),Le++;var He=[];return Le=Pe(je,Le,Je.level,He),He.length>0&&(Ue.push("<ul>"),He.forEach(function(We){Ue.push(We)}),Ue.push("</ul>")),Ue.push("</li>"),Le=Pe(je,Le,Be,Ue),Le}function de(){return Pe(pe,0,0,be),be.push("</ul>"),be.join("")}const ee={heading(je){const Le=we.exec(je);if(Re+=1,Le)return{type:"heading",raw:Le[0],depth:Le[1].length,text:Le[2]}},fences(je){const Le=this.rules.block.fences.exec(je);if(Le){const Be=Le[0];let Ue=fe(Be,Le[3]||"");const Je=Le[2]?Le[2].trim():Le[2];if(["latex","katex","math"].indexOf(Je)>=0){const He=ie(),We=Ue;Ue=He,le[He]={type:"block",expression:We}}return{type:"code",raw:Be,lang:Je,text:Ue}}}},z=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let oe=0;const ie=()=>`__special_katext_id_${oe++}__`;let le={};function ue(){return le}function me(){oe=0,le={}}function xe(je){return je=je.replace(z,(Le,Be)=>{const Ue=ie();return le[Ue]={type:"inline",expression:Be},Ue}),je}const Ae=Ee.listitem;Ee.listitem=function(je){return Ae(xe(je))};const De=Ee.paragraph;Ee.paragraph=function(je){return De(xe(je))};const Fe=Ee.tablecell;Ee.tablecell=function(je,Le){return Fe(xe(je),Le)},Ee.code=function(je,Le,Be){const Ue=(Le||"").match(/\S*/)[0];return Ue?["latex","katex","math"].indexOf(Ue)>=0?`<p class='editormd-tex'>${je}</p>`:`<pre class="prettyprint linenums"><code class="language-${Le}">${Be?je:(0,ae.escape)(je,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Be?je:(0,ae.escape)(je,!0))+"</code></pre>"},Ee.heading=function(je,Le,Be){let Ue=this.options.headerPrefix+Be.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return pe.push({anchor:Ue,level:Le,text:je}),"<h"+Le+' id="'+Re+Ue+'">'+je+"</h"+Le+">"},Ft().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ft().use({tokenizer:ee,renderer:Ee}),vn.ZP=Ft()},40471:function(Sn,vn,ot){"use strict";ot.d(vn,{G:function(){return Re},t:function(){return Ge}});var st=ot(58971),Ft=ot.n(st);const ae=null;function Ge(fe,pe){let be=Ft().get("__ec");be||(be={}),be[fe]=pe,Ft().set("__ec",be)}function Re(fe,pe){let be=Ft().get("__ec");return be?be[fe]===void 0?pe:be[fe]:pe}},56448:function(Sn){(function(vn){(function(ot){if(1)Sn.exports=ot();else var st})(function(){var ot,st,Ft;return function(){function ae(Ge,Re,fe){function pe(we,Te){if(!Re[we]){if(!Ge[we]){var ve=void 0;if(!Te&&ve)return require(we,!0);if(be)return be(we,!0);var Pe=new Error("Cannot find module '"+we+"'");throw Pe.code="MODULE_NOT_FOUND",Pe}var de=Re[we]={exports:{}};Ge[we][0].call(de.exports,function(ee){var z=Ge[we][1][ee];return pe(z||ee)},de,de.exports,ae,Ge,Re,fe)}return Re[we].exports}for(var be=void 0,Ee=0;Ee<fe.length;Ee++)pe(fe[Ee]);return pe}return ae}()({1:[function(ae,Ge,Re){"use strict";var fe=ae("./browser/client");fe.Buffer=ae("buffer").Buffer,fe.urllib=ae("../shims/xhr"),fe.version=ae("./browser/version").version,Ge.exports=fe},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.slice.js");var Ee=ae("assert"),we=ae("../common/utils/checkBucketName"),Te=we.checkBucketName,ve=Re;function Pe(ee){return Array.isArray?Array.isArray(ee):Object.prototype.toString.call(ee)==="[object Array]"}function de(ee){return ee?Pe(ee)?ee:[ee]:[]}ve.useBucket=function(z){return Te(z),this.options.bucket=z,this},ve.setBucket=function(z){return Te(z),this.options.bucket=z,this},ve.getBucket=function(){return this.options.bucket},ve.deleteBucket=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le){var ue,me;return pe.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"",le),Ae.next=3,this.request(ue);case 3:if(me=Ae.sent,!(me.status===200||me.status===204)){Ae.next=6;break}return Ae.abrupt("return",{res:me.res});case 6:return Ae.next=8,this.requestError(me);case 8:throw Ae.sent;case 9:case"end":return Ae.stop()}},oe,this)}));function z(oe,ie){return ee.apply(this,arguments)}return z}(),ve.putBucketACL=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le,ue){var me,xe;return pe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return me=this._bucketRequestParams("PUT",ie,"acl",ue),me.headers={"x-oss-acl":le},me.successStatuses=[200],De.next=5,this.request(me);case 5:return xe=De.sent,De.abrupt("return",{bucket:xe.headers.location&&xe.headers.location.substring(1)||null,res:xe.res});case 7:case"end":return De.stop()}},oe,this)}));function z(oe,ie,le){return ee.apply(this,arguments)}return z}(),ve.getBucketACL=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le){var ue,me;return pe.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ue=this._bucketRequestParams("GET",ie,"acl",le),ue.successStatuses=[200],ue.xmlResponse=!0,Ae.next=5,this.request(ue);case 5:return me=Ae.sent,Ae.abrupt("return",{acl:me.data.AccessControlList.Grant,owner:{id:me.data.Owner.ID,displayName:me.data.Owner.DisplayName},res:me.res});case 7:case"end":return Ae.stop()}},oe,this)}));function z(oe,ie){return ee.apply(this,arguments)}return z}(),ve.putBucketLogging=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le,ue){var me,xe,Ae;return pe.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return me=this._bucketRequestParams("PUT",ie,"logging",ue),xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<BucketLoggingStatus>
|
|
<LoggingEnabled>
|
|
<TargetBucket>`.concat(ie,`</TargetBucket>
|
|
`),le&&(xe+="<TargetPrefix>".concat(le,`</TargetPrefix>
|
|
`)),xe+=`</LoggingEnabled>
|
|
</BucketLoggingStatus>`,me.content=xe,me.mime="xml",me.successStatuses=[200],Fe.next=9,this.request(me);case 9:return Ae=Fe.sent,Fe.abrupt("return",{res:Ae.res});case 11:case"end":return Fe.stop()}},oe,this)}));function z(oe,ie,le){return ee.apply(this,arguments)}return z}(),ve.getBucketLogging=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le){var ue,me,xe;return pe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ue=this._bucketRequestParams("GET",ie,"logging",le),ue.successStatuses=[200],ue.xmlResponse=!0,De.next=5,this.request(ue);case 5:return me=De.sent,xe=me.data.LoggingEnabled,De.abrupt("return",{enable:!!xe,prefix:xe&&xe.TargetPrefix||null,res:me.res});case 8:case"end":return De.stop()}},oe,this)}));function z(oe,ie){return ee.apply(this,arguments)}return z}(),ve.deleteBucketLogging=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le){var ue,me;return pe.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"logging",le),ue.successStatuses=[204,200],Ae.next=4,this.request(ue);case 4:return me=Ae.sent,Ae.abrupt("return",{res:me.res});case 6:case"end":return Ae.stop()}},oe,this)}));function z(oe,ie){return ee.apply(this,arguments)}return z}(),ve.putBucketCORS=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le,ue){var me,xe,Ae,De,Fe,je,Le,Be,Ue,Je;return pe.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:for(le=le||[],Ee(le.length,"rules is required"),le.forEach(function(at){Ee(at.allowedOrigin,"allowedOrigin is required"),Ee(at.allowedMethod,"allowedMethod is required")}),me=this._bucketRequestParams("PUT",ie,"cors",ue),xe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CORSConfiguration>`,Ae=function(ft){xe+="<AllowedOrigin>".concat(ft,"</AllowedOrigin>")},De=function(ft){xe+="<AllowedMethod>".concat(ft,"</AllowedMethod>")},Fe=function(ft){xe+="<AllowedHeader>".concat(ft,"</AllowedHeader>")},je=function(ft){xe+="<ExposeHeader>".concat(ft,"</ExposeHeader>")},Le=0,Be=le.length;Le<Be;Le++)Ue=le[Le],xe+="<CORSRule>",de(Ue.allowedOrigin).forEach(Ae),de(Ue.allowedMethod).forEach(De),de(Ue.allowedHeader).forEach(Fe),de(Ue.exposeHeader).forEach(je),Ue.maxAgeSeconds&&(xe+="<MaxAgeSeconds>".concat(Ue.maxAgeSeconds,"</MaxAgeSeconds>")),xe+="</CORSRule>";return xe+="</CORSConfiguration>",me.content=xe,me.mime="xml",me.successStatuses=[200],We.next=16,this.request(me);case 16:return Je=We.sent,We.abrupt("return",{res:Je.res});case 18:case"end":return We.stop()}},oe,this)}));function z(oe,ie,le){return ee.apply(this,arguments)}return z}(),ve.getBucketCORS=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le){var ue,me,xe,Ae;return pe.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 me=Fe.sent,xe=[],me.data&&me.data.CORSRule&&(Ae=me.data.CORSRule,Pe(Ae)||(Ae=[Ae]),Ae.forEach(function(je){var Le={};Object.keys(je).forEach(function(Be){Le[Be.slice(0,1).toLowerCase()+Be.slice(1,Be.length)]=je[Be]}),xe.push(Le)})),Fe.abrupt("return",{rules:xe,res:me.res});case 9:case"end":return Fe.stop()}},oe,this)}));function z(oe,ie){return ee.apply(this,arguments)}return z}(),ve.deleteBucketCORS=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le){var ue,me;return pe.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"cors",le),ue.successStatuses=[204],Ae.next=4,this.request(ue);case 4:return me=Ae.sent,Ae.abrupt("return",{res:me.res});case 6:case"end":return Ae.stop()}},oe,this)}));function z(oe,ie){return ee.apply(this,arguments)}return z}(),ve.putBucketReferer=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le,ue,me){var xe,Ae,De,Fe;return pe.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(xe=this._bucketRequestParams("PUT",ie,"referer",me),Ae=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<RefererConfiguration>
|
|
`,Ae+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
|
|
`),ue&&ue.length>0){for(Ae+=` <RefererList>
|
|
`,De=0;De<ue.length;De++)Ae+=" <Referer>".concat(ue[De],`</Referer>
|
|
`);Ae+=` </RefererList>
|
|
`}else Ae+=` <RefererList />
|
|
`;return Ae+="</RefererConfiguration>",xe.content=Ae,xe.mime="xml",xe.successStatuses=[200],Le.next=10,this.request(xe);case 10:return Fe=Le.sent,Le.abrupt("return",{res:Fe.res});case 12:case"end":return Le.stop()}},oe,this)}));function z(oe,ie,le,ue){return ee.apply(this,arguments)}return z}(),ve.getBucketReferer=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le){var ue,me,xe;return pe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return ue=this._bucketRequestParams("GET",ie,"referer",le),ue.successStatuses=[200],ue.xmlResponse=!0,De.next=5,this.request(ue);case 5:return me=De.sent,xe=me.data.RefererList.Referer||null,xe&&(Pe(xe)||(xe=[xe])),De.abrupt("return",{allowEmpty:me.data.AllowEmptyReferer==="true",referers:xe,res:me.res});case 9:case"end":return De.stop()}},oe,this)}));function z(oe,ie){return ee.apply(this,arguments)}return z}(),ve.deleteBucketReferer=function(){var ee=(0,be.default)(pe.default.mark(function oe(ie,le){return pe.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.next=2,this.putBucketReferer(ie,!0,null,le);case 2:return me.abrupt("return",me.sent);case 3:case"end":return me.stop()}},oe,this)}));function z(oe,ie){return ee.apply(this,arguments)}return z}(),ve._bucketRequestParams=function(z,oe,ie,le){return{method:z,bucket:oe,subres:ie,timeout:le&&le.timeout,ctx:le&&le.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(ae,Ge,Re){(function(fe,pe){(function(){"use strict";var be=ae("@babel/runtime/helpers/interopRequireDefault"),Ee=be(ae("@babel/runtime/regenerator")),we=be(ae("@babel/runtime/helpers/asyncToGenerator"));ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.split.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.symbol.js"),ae("core-js/modules/es.symbol.description.js"),ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.regexp.to-string.js");var Te=ae("debug")("ali-oss"),ve=ae("xml2js"),Pe=ae("agentkeepalive"),de=ae("merge-descriptors"),ee=ae("platform"),z=ae("utility"),oe=ae("urllib"),ie=ae("./version"),le=ae("bowser"),ue=ae("../common/signUtils"),me=ae("../common/client/initOptions"),xe=ae("../common/utils/createRequest"),Ae=xe.createRequest,De=ae("../common/utils/encoder"),Fe=De.encoder,je=ae("../common/client/getReqUrl"),Le=je.getReqUrl,Be=ae("../common/utils/setSTSToken"),Ue=Be.setSTSToken,Je=ae("../common/utils/retry"),He=Je.retry,We=ae("../common/utils/isFunction"),at=We.isFunction,ft=new Pe;function mt(){var wt=ee.name,ht=ee.version;wt&&wt.toLowerCase&&wt.toLowerCase()==="ie"&&ht.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function Lt(){return location&&location.protocol==="https:"}function Xe(wt,ht){if(mt(),!(this instanceof Xe))return new Xe(wt,ht);wt&&wt.inited?this.options=wt:this.options=Xe.initOptions(wt),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=oe,this.agent=this.options.agent||ft),this.ctx=ht,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}Ge.exports=Xe,Xe.initOptions=function(ht){ht.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var dt=Object.assign({secure:Lt(),useFetch:!1},ht);return me(dt)};var et=Xe.prototype;et.debug=Te,de(et,ae("./object")),de(et,ae("./bucket")),de(et,ae("../common/bucket/getBucketWebsite")),de(et,ae("../common/bucket/putBucketWebsite")),de(et,ae("../common/bucket/deleteBucketWebsite")),de(et,ae("../common/bucket/getBucketLifecycle")),de(et,ae("../common/bucket/putBucketLifecycle")),de(et,ae("../common/bucket/deleteBucketLifecycle")),de(et,ae("../common/bucket/putBucketVersioning")),de(et,ae("../common/bucket/getBucketVersioning")),de(et,ae("../common/bucket/getBucketInventory")),de(et,ae("../common/bucket/deleteBucketInventory")),de(et,ae("../common/bucket/listBucketInventory")),de(et,ae("../common/bucket/putBucketInventory")),de(et,ae("../common/bucket/abortBucketWorm")),de(et,ae("../common/bucket/completeBucketWorm")),de(et,ae("../common/bucket/extendBucketWorm")),de(et,ae("../common/bucket/getBucketWorm")),de(et,ae("../common/bucket/initiateBucketWorm")),de(et,ae("./managed-upload")),de(et,ae("../common/multipart-copy")),de(et,ae("../common/multipart")),de(et,ae("../common/parallel")),et.signature=function(ht){return this.debug("authorization stringToSign: %s",ht,"info"),ue.computeSignature(this.options.accessKeySecret,ht,this.options.headerEncoding)},et._getReqUrl=Le,et.authorization=function(ht,dt,ut,Pt){var yt=ue.buildCanonicalString(ht.toUpperCase(),dt,{headers:Pt,parameters:ut});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,yt,this.options.headerEncoding)},et.request=function(){var wt=(0,we.default)(Ee.default.mark(function ht(dt){var ut=this;return Ee.default.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(!this.options.retryMax){yt.next=6;break}return yt.next=3,He(lt.bind(this),this.options.retryMax,{errorHandler:function(Tt){var ct=function(Ze){if(dt.stream)return!1;var Se=[-1,-2].includes(Ze.status),Ne=ut.options.requestErrorRetryHandle||function(){return!0};return Se&&Ne(Ze)};return!!ct(Tt)}})(dt);case 3:return yt.abrupt("return",yt.sent);case 6:return yt.abrupt("return",lt.call(this,dt));case 7:case"end":return yt.stop()}},ht,this)}));return function(ht){return wt.apply(this,arguments)}}();function lt(wt){return vt.apply(this,arguments)}function vt(){return vt=(0,we.default)(Ee.default.mark(function wt(ht){var dt,ut,Pt,yt,gt,Tt;return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!(this.options.stsToken&&at(this.options.refreshSTSToken))){Ye.next=3;break}return Ye.next=3,Ue.call(this);case 3:return dt=Ae.call(this,ht),this.options.useFetch||(dt.params.mode="disable-fetch"),yt=!!ht.stream,Ye.prev=6,Ye.next=9,this.urllib.request(dt.url,dt.params);case 9:ut=Ye.sent,this.debug("response %s %s, got %s, headers: %j",ht.method,dt.url,ut.status,ut.headers,"info"),Ye.next=16;break;case 13:Ye.prev=13,Ye.t0=Ye.catch(6),Pt=Ye.t0;case 16:if(!(ut&&ht.successStatuses&&ht.successStatuses.indexOf(ut.status)===-1)){Ye.next=28;break}return Ye.next=19,this.requestError(ut);case 19:if(gt=Ye.sent,!(gt.code==="RequestTimeTooSkewed"&&!yt)){Ye.next=25;break}return this.options.amendTimeSkewed=+new Date(gt.serverTime)-new Date,Ye.next=24,this.request(ht);case 24:return Ye.abrupt("return",Ye.sent);case 25:gt.params=ht,Ye.next=32;break;case 28:if(!Pt){Ye.next=32;break}return Ye.next=31,this.requestError(Pt);case 31:gt=Ye.sent;case 32:if(!gt){Ye.next=34;break}throw gt;case 34:if(!ht.xmlResponse){Ye.next=39;break}return Ye.next=37,this.parseXML(ut.data);case 37:Tt=Ye.sent,ut.data=Tt;case 39:return Ye.abrupt("return",ut);case 40:case"end":return Ye.stop()}},wt,this,[[6,13]])})),vt.apply(this,arguments)}et._getResource=function(ht){var dt="/";return ht.bucket&&(dt+="".concat(ht.bucket,"/")),ht.object&&(dt+=Fe(ht.object,this.options.headerEncoding)),dt},et._escape=function(ht){return z.encodeURIComponent(ht).replace(/%2F/g,"/")},et._getUserAgent=function(){var ht=pe&&pe.browser?"js":"nodejs",dt="aliyun-sdk-".concat(ht,"/").concat(ie.version),ut=ee.description;return!ut&&pe&&(ut="Node.js ".concat(pe.version.slice(1)," on ").concat(pe.platform," ").concat(pe.arch)),this._checkUserAgent("".concat(dt," ").concat(ut))},et._checkUserAgent=function(ht){var dt=ht.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return dt},et.checkBrowserAndVersion=function(ht,dt){return le.name===ht&&le.version.split(".")[0]===dt},et.parseXML=function(ht){return new Promise(function(dt,ut){fe.isBuffer(ht)&&(ht=ht.toString()),ve.parseString(ht,{explicitRoot:!1,explicitArray:!1},function(Pt,yt){Pt?ut(Pt):dt(yt)})})},et.requestError=function(){var wt=(0,we.default)(Ee.default.mark(function dt(ut){var Pt,yt,gt,Tt;return Ee.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(Pt=null,!(!ut.data||!ut.data.length)){Ye.next=5;break}ut.status===-1||ut.status===-2?(Pt=new Error(ut.message),Pt.name=ut.name,Pt.status=ut.status,Pt.code=ut.name):(ut.status===404?(Pt=new Error("Object not exists"),Pt.name="NoSuchKeyError",Pt.status=404,Pt.code="NoSuchKey"):ut.status===412?(Pt=new Error("Pre condition failed"),Pt.name="PreconditionFailedError",Pt.status=412,Pt.code="PreconditionFailed"):(Pt=new Error("Unknow error, status: ".concat(ut.status)),Pt.name="UnknownError",Pt.status=ut.status),Pt.requestId=ut.headers["x-oss-request-id"],Pt.host=""),Ye.next=32;break;case 5:return yt=String(ut.data),this.debug("request response error data: %s",yt,"error"),Ye.prev=7,Ye.next=10,this.parseXML(yt);case 10:if(Ye.t0=Ye.sent,Ye.t0){Ye.next=13;break}Ye.t0={};case 13:gt=Ye.t0,Ye.next=23;break;case 16:return Ye.prev=16,Ye.t1=Ye.catch(7),this.debug(yt,"error"),Ye.t1.message+=`
|
|
raw xml: `.concat(yt),Ye.t1.status=ut.status,Ye.t1.requestId=ut.headers["x-oss-request-id"],Ye.abrupt("return",Ye.t1);case 23:Tt=gt.Message||"unknow request error, status: ".concat(ut.status),gt.Condition&&(Tt+=" (condition: ".concat(gt.Condition,")")),Pt=new Error(Tt),Pt.name=gt.Code?"".concat(gt.Code,"Error"):"UnknownError",Pt.status=ut.status,Pt.code=gt.Code,Pt.requestId=gt.RequestId,Pt.hostId=gt.HostId,Pt.serverTime=gt.ServerTime;case 32:return this.debug("generate error %j",Pt,"error"),Ye.abrupt("return",Pt);case 34:case"end":return Ye.stop()}},dt,this,[[7,16]])}));function ht(dt){return wt.apply(this,arguments)}return ht}()}).call(this)}).call(this,{isBuffer:ae("../../node_modules/is-buffer/index.js")},ae("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=ae("@babel/runtime/helpers/interopRequireDefault"),be=pe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.array.from.js"),ae("core-js/modules/es.string.iterator.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.array.filter.js"),ae("core-js/modules/es.array.find.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.array.iterator.js"),ae("core-js/modules/es.array-buffer.slice.js"),ae("core-js/modules/es.typed-array.uint8-array.js"),ae("core-js/modules/es.typed-array.copy-within.js"),ae("core-js/modules/es.typed-array.every.js"),ae("core-js/modules/es.typed-array.fill.js"),ae("core-js/modules/es.typed-array.filter.js"),ae("core-js/modules/es.typed-array.find.js"),ae("core-js/modules/es.typed-array.find-index.js"),ae("core-js/modules/es.typed-array.for-each.js"),ae("core-js/modules/es.typed-array.includes.js"),ae("core-js/modules/es.typed-array.index-of.js"),ae("core-js/modules/es.typed-array.iterator.js"),ae("core-js/modules/es.typed-array.join.js"),ae("core-js/modules/es.typed-array.last-index-of.js"),ae("core-js/modules/es.typed-array.map.js"),ae("core-js/modules/es.typed-array.reduce.js"),ae("core-js/modules/es.typed-array.reduce-right.js"),ae("core-js/modules/es.typed-array.reverse.js"),ae("core-js/modules/es.typed-array.set.js"),ae("core-js/modules/es.typed-array.slice.js"),ae("core-js/modules/es.typed-array.some.js"),ae("core-js/modules/es.typed-array.sort.js"),ae("core-js/modules/es.typed-array.subarray.js"),ae("core-js/modules/es.typed-array.to-locale-string.js"),ae("core-js/modules/es.typed-array.to-string.js");var Ee=pe(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("util"),Te=ae("path"),ve=ae("mime"),Pe=ae("copy-to"),de=ae("../common/utils/isBlob"),ee=de.isBlob,z=ae("../common/utils/isFile"),oe=z.isFile,ie=ae("../common/utils/isBuffer"),le=ie.isBuffer,ue=Re;ue.multipartUpload=function(){var Fe=(0,Ee.default)(be.default.mark(function Le(Be,Ue){var Je,He,We,at,ft,mt,Lt,Xe,et,lt=arguments;return be.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(Je=lt.length>2&<[2]!==void 0?lt[2]:{},this.resetCancelFlag(),Je.disabledMD5=Je.disabledMD5===void 0?!0:!!Je.disabledMD5,!(Je.checkpoint&&Je.checkpoint.uploadId)){wt.next=8;break}return Ue&&oe(Ue)&&(Je.checkpoint.file=Ue),wt.next=7,this._resumeMultipart(Je.checkpoint,Je);case 7:return wt.abrupt("return",wt.sent);case 8:return He=102400,Je.mime||(oe(Ue)?Je.mime=ve.getType(Te.extname(Ue.name)):ee(Ue)?Je.mime=Ue.type:le(Ue)?Je.mime="":Je.mime=ve.getType(Te.extname(Ue))),Je.headers=Je.headers||{},this._convertMetaToHeaders(Je.meta,Je.headers),wt.next=14,this._getFileSize(Ue);case 14:if(We=wt.sent,!(We<He)){wt.next=26;break}return Je.contentLength=We,wt.next=19,this.put(Be,Ue,Je);case 19:if(at=wt.sent,!(Je&&Je.progress)){wt.next=23;break}return wt.next=23,Je.progress(1);case 23:return ft={res:at.res,bucket:this.options.bucket,name:Be,etag:at.res.headers.etag},(Je.headers&&Je.headers["x-oss-callback"]||Je.callback)&&(ft.data=at.data),wt.abrupt("return",ft);case 26:if(!(Je.partSize&&parseInt(Je.partSize,10)!==Je.partSize)){wt.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Je.partSize&&Je.partSize<He)){wt.next=30;break}throw new Error("partSize must not be smaller than ".concat(He));case 30:return wt.next=32,this.initMultipartUpload(Be,Je);case 32:if(mt=wt.sent,Lt=mt.uploadId,Xe=this._getPartSize(We,Je.partSize),et={file:Ue,name:Be,fileSize:We,partSize:Xe,uploadId:Lt,doneParts:[]},!(Je&&Je.progress)){wt.next=39;break}return wt.next=39,Je.progress(0,et,mt.res);case 39:return wt.next=41,this._resumeMultipart(et,Je);case 41:return wt.abrupt("return",wt.sent);case 42:case"end":return wt.stop()}},Le,this)}));function je(Le,Be){return Fe.apply(this,arguments)}return je}(),ue._resumeMultipart=function(){var Fe=(0,Ee.default)(be.default.mark(function Le(Be,Ue){var Je,He,We,at,ft,mt,Lt,Xe,et,lt,vt,wt,ht,dt,ut,Pt,yt,gt,Tt;return be.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(Je=this,!this.isCancel()){Ye.next=3;break}throw this._makeCancelEvent();case 3:return He=Be.file,We=Be.fileSize,at=Be.partSize,ft=Be.uploadId,mt=Be.doneParts,Lt=Be.name,Xe=[],mt.length>0&&Pe(mt).to(Xe),et=this._divideParts(We,at),lt=et.length,vt=!1,wt=function(Se,Ne){return new Promise(function(){var $e=(0,Ee.default)(be.default.mark(function nt(Ie,ze){var Ve,it,St,Ct,It;return be.default.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(Kt.prev=0,Se.isCancel()){Kt.next=29;break}return Ve=et[Ne-1],Kt.next=5,Se._createBuffer(He,Ve.start,Ve.end);case 5:return it=Kt.sent,St={content:it,size:Ve.end-Ve.start},Kt.prev=7,Kt.next=10,Se._uploadPart(Lt,ft,Ne,St,Ue);case 10:Ct=Kt.sent,Kt.next=18;break;case 13:if(Kt.prev=13,Kt.t0=Kt.catch(7),Kt.t0.status!==404){Kt.next=17;break}throw Se._makeAbortEvent();case 17:throw Kt.t0;case 18:if(!(!Se.isCancel()&&!vt)){Kt.next=26;break}if(Be.doneParts.push({number:Ne,etag:Ct.res.headers.etag}),!Ue.progress){Kt.next=23;break}return Kt.next=23,Ue.progress(mt.length/(lt+1),Be,Ct.res);case 23:Ie({number:Ne,etag:Ct.res.headers.etag}),Kt.next=27;break;case 26:Ie();case 27:Kt.next=30;break;case 29:Ie();case 30:Kt.next=41;break;case 32:Kt.prev=32,Kt.t1=Kt.catch(0),It=new Error,It.name=Kt.t1.name,It.message=Kt.t1.message,It.stack=Kt.t1.stack,It.partNum=Ne,Pe(Kt.t1).to(It),ze(It);case 41:case"end":return Kt.stop()}},nt,null,[[0,32],[7,13]])}));return function(nt,Ie){return $e.apply(this,arguments)}}())},ht=Array.from(new Array(lt),function(Ze,Se){return Se+1}),dt=Xe.map(function(Ze){return Ze.number}),ut=ht.filter(function(Ze){return dt.indexOf(Ze)<0}),Pt=5,yt=Ue.parallel||Pt,Ye.next=17,this._parallel(ut,yt,function(Ze){return new Promise(function(Se,Ne){wt(Je,Ze).then(function($e){$e&&Xe.push($e),Se()}).catch(function($e){Ne($e)})})});case 17:if(gt=Ye.sent,vt=!0,Tt=gt.find(function(Ze){return Ze.name==="abort"}),!Tt){Ye.next=22;break}throw Tt;case 22:if(!this.isCancel()){Ye.next=25;break}throw wt=null,this._makeCancelEvent();case 25:if(!(gt&>.length>0)){Ye.next=28;break}throw gt[0].message="Failed to upload some parts with error: ".concat(gt[0].toString()," part_num: ").concat(gt[0].partNum),gt[0];case 28:return Ye.next=30,this.completeMultipartUpload(Lt,ft,Xe,Ue);case 30:return Ye.abrupt("return",Ye.sent);case 31:case"end":return Ye.stop()}},Le,this)}));function je(Le,Be){return Fe.apply(this,arguments)}return je}(),ue._getFileSize=function(){var Fe=(0,Ee.default)(be.default.mark(function Le(Be){return be.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:if(!le(Be)){Je.next=4;break}return Je.abrupt("return",Be.length);case 4:if(!(ee(Be)||oe(Be))){Je.next=6;break}return Je.abrupt("return",Be.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Je.stop()}},Le)}));function je(Le){return Fe.apply(this,arguments)}return je}();var me=ae("stream"),xe=me.Readable;function Ae(Fe,je){if(!(this instanceof Ae))return new Ae(Fe,je);xe.call(this,je),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}we.inherits(Ae,xe),Ae.prototype.readFileAndPush=function(je){if(this.fileBuffer)for(var Le=!0;Le&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Be=this.start,Ue=Be+je;Ue=Ue>this.fileBuffer.length?this.fileBuffer.length:Ue,this.start=Ue,Le=this.push(this.fileBuffer.slice(Be,Ue))}},Ae.prototype._read=function(je){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 Le=16*1024;je=je||Le;var Be=this;this.reader.onload=function(Je){Be.fileBuffer=fe.from(new Uint8Array(Je.target.result)),Be.file=null,Be.readFileAndPush(je)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(je)};function De(Fe){return Fe.arrayBuffer?Fe.arrayBuffer():new Promise(function(je,Le){var Be=new FileReader;Be.onload=function(Ue){je(Ue.target.result)},Be.onerror=function(Ue){Le(Ue)},Be.readAsArrayBuffer(Fe)})}ue._createBuffer=function(){var Fe=(0,Ee.default)(be.default.mark(function Le(Be,Ue,Je){var He,We;return be.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(!(ee(Be)||oe(Be))){ft.next=8;break}return He=Be.slice(Ue,Je),ft.next=4,De(He);case 4:return We=ft.sent,ft.abrupt("return",fe.from(We));case 8:if(!le(Be)){ft.next=12;break}return ft.abrupt("return",Be.subarray(Ue,Je));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return ft.stop()}},Le)}));function je(Le,Be,Ue){return Fe.apply(this,arguments)}return je}(),ue._getPartSize=function(je,Le){var Be=1e4,Ue=1*1024*1024;Le||(Le=Ue);var Je=Math.ceil(je/Be);return Le<Je&&(Le=Je,console.warn("partSize has been set to ".concat(Le,", because the partSize you provided causes partNumber to be greater than 10,000"))),Le},ue._divideParts=function(je,Le){for(var Be=Math.ceil(je/Le),Ue=[],Je=0;Je<Be;Je++){var He=Le*Je,We=Math.min(He+Le,je);Ue.push({start:He,end:We})}return Ue}}).call(this)}).call(this,ae("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault");ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.number.constructor.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.promise.js");var pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("fs"),we=ae("copy-to"),Te=ae("path"),ve=ae("mime"),Pe=ae("../common/callback"),de=ae("merge-descriptors"),ee=ae("../common/utils/isBlob"),z=ee.isBlob,oe=ae("../common/utils/isFile"),ie=oe.isFile,le=ae("../common/utils/isBuffer"),ue=le.isBuffer,me=ae("../common/utils/obj2xml"),xe=me.obj2xml,Ae=Re;Ae.append=function(){var De=(0,be.default)(pe.default.mark(function je(Le,Be,Ue){var Je;return pe.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return Ue=Ue||{},Ue.position===void 0&&(Ue.position="0"),Ue.subres={append:"",position:Ue.position},Ue.method="POST",We.next=6,this.put(Le,Be,Ue);case 6:return Je=We.sent,Je.nextAppendPosition=Je.res.headers["x-oss-next-append-position"],We.abrupt("return",Je);case 9:case"end":return We.stop()}},je,this)}));function Fe(je,Le,Be){return De.apply(this,arguments)}return Fe}(),Ae.put=function(){var De=(0,be.default)(pe.default.mark(function je(Le,Be,Ue){var Je,He,We,at,ft;return pe.default.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:if(Ue=Ue||{},Ue.disabledMD5=Ue.disabledMD5===void 0?!0:!!Ue.disabledMD5,Ue.headers=Ue.headers||{},Le=this._objectName(Le),!ue(Be)){Lt.next=8;break}Je=Be,Lt.next=19;break;case 8:if(!(z(Be)||ie(Be))){Lt.next=18;break}return Ue.mime||(ie(Be)?Ue.mime=ve.getType(Te.extname(Be.name)):Ue.mime=Be.type),Lt.next=12,this._createBuffer(Be,0,Be.size);case 12:return Je=Lt.sent,Lt.next=15,this._getFileSize(Be);case 15:Ue.contentLength=Lt.sent,Lt.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(Ue.meta,Ue.headers),He=Ue.method||"PUT",We=this._objectRequestParams(He,Le,Ue),Pe.encodeCallback(We,Ue),We.mime=Ue.mime,We.disabledMD5=Ue.disabledMD5,We.content=Je,We.successStatuses=[200],Lt.next=29,this.request(We);case 29:return at=Lt.sent,ft={name:Le,url:this._objectUrl(Le),res:at.res},We.headers&&We.headers["x-oss-callback"]&&(ft.data=JSON.parse(at.data.toString())),Lt.abrupt("return",ft);case 33:case"end":return Lt.stop()}},je,this)}));function Fe(je,Le,Be){return De.apply(this,arguments)}return Fe}(),Ae.putStream=function(){var De=(0,be.default)(pe.default.mark(function je(Le,Be,Ue){var Je,He,We,at;return pe.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return Ue=Ue||{},Ue.headers=Ue.headers||{},Le=this._objectName(Le),Ue.contentLength?Ue.headers["Content-Length"]=Ue.contentLength:Ue.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ue.meta,Ue.headers),Je=Ue.method||"PUT",He=this._objectRequestParams(Je,Le,Ue),Pe.encodeCallback(He,Ue),He.mime=Ue.mime,He.stream=Be,He.successStatuses=[200],mt.next=13,this.request(He);case 13:return We=mt.sent,at={name:Le,url:this._objectUrl(Le),res:We.res},He.headers&&He.headers["x-oss-callback"]&&(at.data=JSON.parse(We.data.toString())),mt.abrupt("return",at);case 17:case"end":return mt.stop()}},je,this)}));function Fe(je,Le,Be){return De.apply(this,arguments)}return Fe}(),de(Ae,ae("../common/object/copyObject")),de(Ae,ae("../common/object/getObjectTagging")),de(Ae,ae("../common/object/putObjectTagging")),de(Ae,ae("../common/object/deleteObjectTagging")),de(Ae,ae("../common/image")),de(Ae,ae("../common/object/getBucketVersions")),de(Ae,ae("../common/object/getACL")),de(Ae,ae("../common/object/putACL")),de(Ae,ae("../common/object/head")),de(Ae,ae("../common/object/delete")),de(Ae,ae("../common/object/get")),de(Ae,ae("../common/object/putSymlink")),de(Ae,ae("../common/object/getSymlink")),de(Ae,ae("../common/object/deleteMulti")),de(Ae,ae("../common/object/getObjectMeta")),de(Ae,ae("../common/object/getObjectUrl")),de(Ae,ae("../common/object/generateObjectUrl")),de(Ae,ae("../common/object/signatureUrl")),de(Ae,ae("../common/object/asyncSignatureUrl")),Ae.putMeta=function(){var De=(0,be.default)(pe.default.mark(function je(Le,Be,Ue){var Je;return pe.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return We.next=2,this.copy(Le,Le,{meta:Be||{},timeout:Ue&&Ue.timeout,ctx:Ue&&Ue.ctx});case 2:return Je=We.sent,We.abrupt("return",Je);case 4:case"end":return We.stop()}},je,this)}));function Fe(je,Le,Be){return De.apply(this,arguments)}return Fe}(),Ae.list=function(){var De=(0,be.default)(pe.default.mark(function je(Le,Be){var Ue,Je,He,We,at;return pe.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:return Ue=this._objectRequestParams("GET","",Be),Ue.query=Le,Ue.xmlResponse=!0,Ue.successStatuses=[200],mt.next=6,this.request(Ue);case 6:return Je=mt.sent,He=Je.data.Contents||[],We=this,He&&(Array.isArray(He)||(He=[He]),He=He.map(function(Lt){return{name:Lt.Key,url:We._objectUrl(Lt.Key),lastModified:Lt.LastModified,etag:Lt.ETag,type:Lt.Type,size:Number(Lt.Size),storageClass:Lt.StorageClass,owner:{id:Lt.Owner.ID,displayName:Lt.Owner.DisplayName}}})),at=Je.data.CommonPrefixes||null,at&&(Array.isArray(at)||(at=[at]),at=at.map(function(Lt){return Lt.Prefix})),mt.abrupt("return",{res:Je.res,objects:He,prefixes:at,nextMarker:Je.data.NextMarker||null,isTruncated:Je.data.IsTruncated==="true"});case 13:case"end":return mt.stop()}},je,this)}));function Fe(je,Le){return De.apply(this,arguments)}return Fe}(),Ae.listV2=function(){var De=(0,be.default)(pe.default.mark(function je(Le){var Be,Ue,Je,He,We,at,ft,mt=arguments;return pe.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Be=mt.length>1&&mt[1]!==void 0?mt[1]:{},Ue=Le["continuation-token"]||Le.continuationToken,Ue&&(Be.subres=Object.assign({"continuation-token":Ue},Be.subres)),Je=this._objectRequestParams("GET","",Be),Je.query=Object.assign({"list-type":2},Le),delete Je.query["continuation-token"],delete Je.query.continuationToken,Je.xmlResponse=!0,Je.successStatuses=[200],Xe.next=11,this.request(Je);case 11:return He=Xe.sent,We=He.data.Contents||[],at=this,We&&(Array.isArray(We)||(We=[We]),We=We.map(function(et){var lt=null;return et.Owner&&(lt={id:et.Owner.ID,displayName:et.Owner.DisplayName}),{name:et.Key,url:at._objectUrl(et.Key),lastModified:et.LastModified,etag:et.ETag,type:et.Type,size:Number(et.Size),storageClass:et.StorageClass,owner:lt}})),ft=He.data.CommonPrefixes||null,ft&&(Array.isArray(ft)||(ft=[ft]),ft=ft.map(function(et){return et.Prefix})),Xe.abrupt("return",{res:He.res,objects:We,prefixes:ft,isTruncated:He.data.IsTruncated==="true",keyCount:+He.data.KeyCount,continuationToken:He.data.ContinuationToken||null,nextContinuationToken:He.data.NextContinuationToken||null});case 18:case"end":return Xe.stop()}},je,this)}));function Fe(je){return De.apply(this,arguments)}return Fe}(),Ae.restore=function(){var De=(0,be.default)(pe.default.mark(function je(Le){var Be,Ue,Je,He,We=arguments;return pe.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return Be=We.length>1&&We[1]!==void 0?We[1]:{type:"Archive"},Be=Be||{},Be.subres=Object.assign({restore:""},Be.subres),Be.versionId&&(Be.subres.versionId=Be.versionId),Ue=this._objectRequestParams("POST",Le,Be),Be.type==="ColdArchive"&&(Je={RestoreRequest:{Days:Be.Days?Be.Days:2,JobParameters:{Tier:Be.JobParameters?Be.JobParameters:"Standard"}}},Ue.content=xe(Je,{headers:!0}),Ue.mime="xml"),Ue.successStatuses=[202],ft.next=9,this.request(Ue);case 9:return He=ft.sent,ft.abrupt("return",{res:He.res});case 11:case"end":return ft.stop()}},je,this)}));function Fe(je){return De.apply(this,arguments)}return Fe}(),Ae._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},Ae._objectRequestParams=function(Fe,je,Le){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Le=Le||{},je=this._objectName(je);var Be={object:je,bucket:this.options.bucket,method:Fe,subres:Le&&Le.subres,timeout:Le&&Le.timeout,ctx:Le&&Le.ctx};return Le.headers&&(Be.headers={},we(Le.headers).to(Be.headers)),Be},Ae._objectName=function(Fe){return Fe.replace(/^\/+/,"")},Ae._convertMetaToHeaders=function(Fe,je){Fe&&Object.keys(Fe).forEach(function(Le){je["x-oss-meta-".concat(Le)]=Fe[Le]})},Ae._deleteFileSafe=function(Fe){var je=this;return new Promise(function(Le){Ee.exists(Fe,function(Be){Be?Ee.unlink(Fe,function(Ue){Ue&&je.debug("unlink %j error: %s",Fe,Ue,"error"),Le()}):Le()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(ae,Ge,Re){"use strict";Re.version="6.18.1"},{}],7:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.abortBucketWorm=void 0;var Ee=ae("../utils/checkBucketName");function we(ve,Pe){return Te.apply(this,arguments)}function Te(){return Te=(0,be.default)(pe.default.mark(function ve(Pe,de){var ee,z;return pe.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return Ee.checkBucketName(Pe),ee=this._bucketRequestParams("DELETE",Pe,"worm",de),ie.next=4,this.request(ee);case 4:return z=ie.sent,ie.abrupt("return",{res:z.res,status:z.status});case 6:case"end":return ie.stop()}},ve,this)})),Te.apply(this,arguments)}Re.abortBucketWorm=we},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.completeBucketWorm=void 0;var Ee=ae("../utils/checkBucketName");function we(ve,Pe,de){return Te.apply(this,arguments)}function Te(){return Te=(0,be.default)(pe.default.mark(function ve(Pe,de,ee){var z,oe;return pe.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ee.checkBucketName(Pe),z=this._bucketRequestParams("POST",Pe,{wormId:de},ee),le.next=4,this.request(z);case 4:return oe=le.sent,le.abrupt("return",{res:oe.res,status:oe.status});case 6:case"end":return le.stop()}},ve,this)})),Te.apply(this,arguments)}Re.completeBucketWorm=we},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.deleteBucketInventory=void 0;var Ee=ae("../utils/checkBucketName");function we(ve,Pe){return Te.apply(this,arguments)}function Te(){return Te=(0,be.default)(pe.default.mark(function ve(Pe,de){var ee,z,oe,ie,le=arguments;return pe.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return ee=le.length>2&&le[2]!==void 0?le[2]:{},z=Object.assign({inventory:"",inventoryId:de},ee.subres),Ee.checkBucketName(Pe),oe=this._bucketRequestParams("DELETE",Pe,z,ee),oe.successStatuses=[204],me.next=7,this.request(oe);case 7:return ie=me.sent,me.abrupt("return",{status:ie.status,res:ie.res});case 9:case"end":return me.stop()}},ve,this)})),Te.apply(this,arguments)}Re.deleteBucketInventory=we},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=Re;Te.deleteBucketLifecycle=function(){var ve=(0,be.default)(pe.default.mark(function de(ee,z){var oe,ie;return pe.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return we(ee),oe=this._bucketRequestParams("DELETE",ee,"lifecycle",z),oe.successStatuses=[204],ue.next=5,this.request(oe);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},de,this)}));function Pe(de,ee){return ve.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=Re;Te.deleteBucketWebsite=function(){var ve=(0,be.default)(pe.default.mark(function de(ee,z){var oe,ie;return pe.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return we(ee),oe=this._bucketRequestParams("DELETE",ee,"website",z),oe.successStatuses=[204],ue.next=5,this.request(oe);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},de,this)}));function Pe(de,ee){return ve.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.extendBucketWorm=void 0;var Ee=ae("../utils/checkBucketName"),we=ae("../utils/obj2xml");function Te(Pe,de,ee,z){return ve.apply(this,arguments)}function ve(){return ve=(0,be.default)(pe.default.mark(function Pe(de,ee,z,oe){var ie,le,ue;return pe.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return Ee.checkBucketName(de),ie=this._bucketRequestParams("POST",de,{wormExtend:"",wormId:ee},oe),le={ExtendWormConfiguration:{RetentionPeriodInDays:z}},ie.mime="xml",ie.content=we.obj2xml(le,{headers:!0}),ie.successStatuses=[200],xe.next=8,this.request(ie);case 8:return ue=xe.sent,xe.abrupt("return",{res:ue.res,status:ue.status});case 10:case"end":return xe.stop()}},Pe,this)})),ve.apply(this,arguments)}Re.extendBucketWorm=Te},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.getBucketInventory=void 0;var Ee=ae("../utils/checkBucketName"),we=ae("../utils/formatInventoryConfig");function Te(Pe,de){return ve.apply(this,arguments)}function ve(){return ve=(0,be.default)(pe.default.mark(function Pe(de,ee){var z,oe,ie,le,ue=arguments;return pe.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return z=ue.length>2&&ue[2]!==void 0?ue[2]:{},oe=Object.assign({inventory:"",inventoryId:ee},z.subres),Ee.checkBucketName(de),ie=this._bucketRequestParams("GET",de,oe,z),ie.successStatuses=[200],ie.xmlResponse=!0,xe.next=8,this.request(ie);case 8:return le=xe.sent,xe.abrupt("return",{status:le.status,res:le.res,inventory:we.formatInventoryConfig(le.data)});case 10:case"end":return xe.stop()}},Pe,this)})),ve.apply(this,arguments)}Re.getBucketInventory=Te},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.map.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=ae("../utils/isArray"),ve=Te.isArray,Pe=ae("../utils/formatObjKey"),de=Pe.formatObjKey,ee=Re;ee.getBucketLifecycle=function(){var z=(0,be.default)(pe.default.mark(function ie(le,ue){var me,xe,Ae;return pe.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return we(le),me=this._bucketRequestParams("GET",le,"lifecycle",ue),me.successStatuses=[200],me.xmlResponse=!0,Fe.next=6,this.request(me);case 6:return xe=Fe.sent,Ae=xe.data.Rule||null,Ae&&(ve(Ae)||(Ae=[Ae]),Ae=Ae.map(function(je){return je.ID&&(je.id=je.ID,delete je.ID),je.Tag&&!ve(je.Tag)&&(je.Tag=[je.Tag]),de(je,"firstLowerCase")})),Fe.abrupt("return",{rules:Ae,res:xe.res});case 10:case"end":return Fe.stop()}},ie,this)}));function oe(ie,le){return z.apply(this,arguments)}return oe}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=Re;Te.getBucketVersioning=function(){var ve=(0,be.default)(pe.default.mark(function de(ee,z){var oe,ie,le;return pe.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return we(ee),oe=this._bucketRequestParams("GET",ee,"versioning",z),oe.xmlResponse=!0,oe.successStatuses=[200],me.next=6,this.request(oe);case 6:return ie=me.sent,le=ie.data.Status,me.abrupt("return",{status:ie.status,versionStatus:le,res:ie.res});case 9:case"end":return me.stop()}},de,this)}));function Pe(de,ee){return ve.apply(this,arguments)}return Pe}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=ae("../utils/isObject"),ve=Te.isObject,Pe=Re;Pe.getBucketWebsite=function(){var de=(0,be.default)(pe.default.mark(function z(oe,ie){var le,ue,me;return pe.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return we(oe),le=this._bucketRequestParams("GET",oe,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,Ae.next=6,this.request(le);case 6:return ue=Ae.sent,me=[],ue.data.RoutingRules&&ue.data.RoutingRules.RoutingRule&&(ve(ue.data.RoutingRules.RoutingRule)?me=[ue.data.RoutingRules.RoutingRule]:me=ue.data.RoutingRules.RoutingRule),Ae.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:me,error:ue.data.ErrorDocument&&ue.data.ErrorDocument.Key||null,res:ue.res});case 10:case"end":return Ae.stop()}},z,this)}));function ee(z,oe){return de.apply(this,arguments)}return ee}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.getBucketWorm=void 0;var Ee=ae("../utils/checkBucketName"),we=ae("../utils/dataFix");function Te(Pe,de){return ve.apply(this,arguments)}function ve(){return ve=(0,be.default)(pe.default.mark(function Pe(de,ee){var z,oe;return pe.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ee.checkBucketName(de),z=this._bucketRequestParams("GET",de,"worm",ee),z.successStatuses=[200],z.xmlResponse=!0,le.next=6,this.request(z);case 6:return oe=le.sent,we.dataFix(oe.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),le.abrupt("return",Object.assign(Object.assign({},oe.data),{res:oe.res,status:oe.status}));case 9:case"end":return le.stop()}},Pe,this)})),ve.apply(this,arguments)}Re.getBucketWorm=Te},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.initiateBucketWorm=void 0;var Ee=ae("../utils/obj2xml"),we=ae("../utils/checkBucketName");function Te(Pe,de,ee){return ve.apply(this,arguments)}function ve(){return ve=(0,be.default)(pe.default.mark(function Pe(de,ee,z){var oe,ie,le;return pe.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return we.checkBucketName(de),oe=this._bucketRequestParams("POST",de,"worm",z),ie={InitiateWormConfiguration:{RetentionPeriodInDays:ee}},oe.mime="xml",oe.content=Ee.obj2xml(ie,{headers:!0}),oe.successStatuses=[200],me.next=8,this.request(oe);case 8:return le=me.sent,me.abrupt("return",{res:le.res,wormId:le.res.headers["x-oss-worm-id"],status:le.status});case 10:case"end":return me.stop()}},Pe,this)})),ve.apply(this,arguments)}Re.initiateBucketWorm=Te},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.listBucketInventory=void 0;var Ee=ae("../utils/checkBucketName"),we=ae("../utils/formatInventoryConfig");function Te(Pe){return ve.apply(this,arguments)}function ve(){return ve=(0,be.default)(pe.default.mark(function Pe(de){var ee,z,oe,ie,le,ue,me,xe,Ae=arguments;return pe.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ee=Ae.length>1&&Ae[1]!==void 0?Ae[1]:{},z=ee.continuationToken,oe=Object.assign({inventory:""},z&&{"continuation-token":z},ee.subres),Ee.checkBucketName(de),ie=this._bucketRequestParams("GET",de,oe,ee),ie.successStatuses=[200],ie.xmlResponse=!0,Fe.next=9,this.request(ie);case 9:return le=Fe.sent,ue=le.data,me=le.res,xe=le.status,Fe.abrupt("return",{isTruncated:ue.IsTruncated==="true",nextContinuationToken:ue.NextContinuationToken,inventoryList:we.formatInventoryConfig(ue.InventoryConfiguration,!0),status:xe,res:me});case 12:case"end":return Fe.stop()}},Pe,this)})),ve.apply(this,arguments)}Re.listBucketInventory=Te},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.concat.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.putBucketInventory=void 0;var Ee=ae("../utils/checkBucketName"),we=ae("../utils/obj2xml");function Te(Pe,de){return ve.apply(this,arguments)}function ve(){return ve=(0,be.default)(pe.default.mark(function Pe(de,ee){var z,oe,ie,le,ue,me,xe,Ae,De,Fe,je,Le=arguments;return pe.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return z=Le.length>2&&Le[2]!==void 0?Le[2]:{},oe=Object.assign({inventory:"",inventoryId:ee.id},z.subres),Ee.checkBucketName(de),ie=ee.OSSBucketDestination,le=ee.optionalFields,ue=ee.includedObjectVersions,me="acs:oss:::",xe="acs:ram::".concat(ie.accountId,":role/"),Ae={InventoryConfiguration:{Id:ee.id,IsEnabled:ee.isEnabled,Filter:{Prefix:ee.prefix||""},Destination:{OSSBucketDestination:{Format:ie.format,AccountId:ie.accountId,RoleArn:"".concat(xe).concat(ie.rolename),Bucket:"".concat(me).concat(ie.bucket),Prefix:ie.prefix||"",Encryption:ie.encryption||""}},Schedule:{Frequency:ee.frequency},IncludedObjectVersions:ue,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},De=we.obj2xml(Ae,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",de,oe,z),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=De,Ue.next=14,this.request(Fe);case 14:return je=Ue.sent,Ue.abrupt("return",{status:je.status,res:je.res});case 16:case"end":return Ue.stop()}},Pe,this)})),ve.apply(this,arguments)}Re.putBucketInventory=Te},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.array.includes.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=ae("../utils/isArray"),ve=Te.isArray,Pe=ae("../utils/deepCopy"),de=Pe.deepCopy,ee=ae("../utils/isObject"),z=ee.isObject,oe=ae("../utils/obj2xml"),ie=oe.obj2xml,le=ae("../utils/checkObjectTag"),ue=le.checkObjectTag,me=ae("../utils/getStrBytesCount"),xe=me.getStrBytesCount,Ae=Re;Ae.putBucketLifecycle=function(){var Be=(0,be.default)(pe.default.mark(function Je(He,We,at){var ft,mt,Lt,Xe,et;return pe.default.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(we(He),ve(We)){vt.next=3;break}throw new Error("rules must be Array");case 3:return ft=this._bucketRequestParams("PUT",He,"lifecycle",at),mt=[],Lt={LifecycleConfiguration:{Rule:mt}},We.forEach(function(wt){De(wt),Le(wt),wt.id&&(wt.ID=wt.id,delete wt.id),mt.push(wt)}),Xe=ie(Lt,{headers:!0,firstUpperCase:!0}),ft.content=Xe,ft.mime="xml",ft.successStatuses=[200],vt.next=13,this.request(ft);case 13:return et=vt.sent,vt.abrupt("return",{res:et.res});case 15:case"end":return vt.stop()}},Je,this)}));function Ue(Je,He,We){return Be.apply(this,arguments)}return Ue}();function De(Be){Be.days&&(Be.expiration={days:Be.days}),Be.date&&(Be.expiration={createdBeforeDate:Be.date})}function Fe(Be,Ue){var Je=Be.days,He=Be.createdBeforeDate;if(!Je&&!He)throw new Error("".concat(Ue," must includes days or createdBeforeDate"));if(Je&&!/^[1-9][0-9]*$/.test(Je))throw new Error("days must be a positive integer");if(He&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(He))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function je(Be){if(!ve(Be)&&!z(Be))throw new Error("tag must be Object or Array");Be=z(Be)?[Be]:Be;var Ue={},Je=de(Be);Je.forEach(function(He){Ue[He.key]=He.value}),ue(Ue)}function Le(Be){if(Be.id&&xe(Be.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Be.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Be.status))throw new Error("Status must be Enabled or Disabled");if(Be.transition){if(!["IA","Archive"].includes(Be.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(Be.transition,"Transition")}if(Be.expiration){if(!Be.expiration.expiredObjectDeleteMarker)Fe(Be.expiration,"Expiration");else if(Be.expiration.days||Be.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Be.abortMultipartUpload&&Fe(Be.abortMultipartUpload,"AbortMultipartUpload"),!Be.expiration&&!Be.abortMultipartUpload&&!Be.transition&&!Be.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Be.tag){if(Be.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");je(Be.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.includes.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=ae("../utils/obj2xml"),ve=Te.obj2xml,Pe=Re;Pe.putBucketVersioning=function(){var de=(0,be.default)(pe.default.mark(function z(oe,ie){var le,ue,me,xe,Ae=arguments;return pe.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=Ae.length>2&&Ae[2]!==void 0?Ae[2]:{},we(oe),["Enabled","Suspended"].includes(ie)){Fe.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ue=this._bucketRequestParams("PUT",oe,"versioning",le),me={VersioningConfiguration:{Status:ie}},ue.mime="xml",ue.content=ve(me,{headers:!0}),Fe.next=10,this.request(ue);case 10:return xe=Fe.sent,Fe.abrupt("return",{res:xe.res,status:xe.status});case 12:case"end":return Fe.stop()}},z,this)}));function ee(z,oe){return de.apply(this,arguments)}return ee}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=ae("../utils/obj2xml"),ve=Te.obj2xml,Pe=ae("../utils/isArray"),de=Pe.isArray,ee=Re;ee.putBucketWebsite=function(){var z=(0,be.default)(pe.default.mark(function ie(le){var ue,me,xe,Ae,De,Fe,je,Le=arguments;return pe.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(ue=Le.length>1&&Le[1]!==void 0?Le[1]:{},me=Le.length>2?Le[2]:void 0,we(le),xe=this._bucketRequestParams("PUT",le,"website",me),Ae={Suffix:ue.index||"index.html"},De={IndexDocument:Ae},Fe={WebsiteConfiguration:De},ue.supportSubDir&&(Ae.SupportSubDir=ue.supportSubDir),ue.type&&(Ae.Type=ue.type),ue.error&&(De.ErrorDocument={Key:ue.error}),ue.routingRules===void 0){Ue.next=14;break}if(de(ue.routingRules)){Ue.next=13;break}throw new Error("RoutingRules must be Array");case 13:De.RoutingRules={RoutingRule:ue.routingRules};case 14:return Fe=ve(Fe),xe.content=Fe,xe.mime="xml",xe.successStatuses=[200],Ue.next=20,this.request(xe);case 20:return je=Ue.sent,Ue.abrupt("return",{res:je.res});case 22:case"end":return Ue.stop()}},ie,this)}));function oe(ie){return z.apply(this,arguments)}return oe}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(ae,Ge,Re){(function(fe){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),Re.encodeCallback=function(be,Ee){if(be.headers=be.headers||{},!Object.prototype.hasOwnProperty.call(be.headers,"x-oss-callback")&&Ee.callback){var we={callbackUrl:encodeURI(Ee.callback.url),callbackBody:Ee.callback.body};Ee.callback.host&&(we.callbackHost=Ee.callback.host),Ee.callback.contentType&&(we.callbackBodyType=Ee.callback.contentType);var Te=fe.from(JSON.stringify(we)).toString("base64");if(be.headers["x-oss-callback"]=Te,Ee.callback.customValue){var ve={};Object.keys(Ee.callback.customValue).forEach(function(Pe){ve["x:".concat(Pe)]=Ee.callback.customValue[Pe].toString()}),be.headers["x-oss-callback-var"]=fe.from(JSON.stringify(ve)).toString("base64")}}}}).call(this)}).call(this,ae("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js");var fe=function(de){return de&&de.__esModule?de:{default:de}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.getReqUrl=void 0;var pe=fe(ae("copy-to")),be=fe(ae("url")),Ee=fe(ae("merge-descriptors")),we=fe(ae("is-type-of")),Te=ae("../utils/isIP"),ve=ae("../utils/checkConfigValid");function Pe(de){var ee={},z=this.options.cname;ve.checkConfigValid(this.options.endpoint,"endpoint"),pe.default(this.options.endpoint,!1).to(ee),de.bucket&&!z&&!Te.isIP(ee.hostname)&&!this.options.sldEnable&&(ee.host="".concat(de.bucket,".").concat(ee.host));var oe="/";de.bucket&&this.options.sldEnable&&(oe+="".concat(de.bucket,"/")),de.object&&(oe+=this._escape(de.object).replace(/\+/g,"%2B")),ee.pathname=oe;var ie={};if(de.query&&Ee.default(ie,de.query),de.subres){var le={};we.default.string(de.subres)?le[de.subres]="":we.default.array(de.subres)?de.subres.forEach(function(ue){le[ue]=""}):le=de.subres,Ee.default(ie,le)}return ee.query=ie,be.default.format(ee)}Re.getReqUrl=Pe},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.string.trim.js");var fe=ae("humanize-ms"),pe=ae("url"),be=ae("../utils/checkBucketName"),Ee=be.checkBucketName,we=ae("../utils/setRegion"),Te=we.setRegion,ve=ae("../utils/checkConfigValid"),Pe=ve.checkConfigValid;function de(ee,z){Pe(ee,"endpoint");var oe=pe.parse(ee);if(oe.protocol||(oe=pe.parse("http".concat(z?"s":"","://").concat(ee))),oe.protocol!=="http:"&&oe.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return oe}Ge.exports=function(ee){if(!ee||!ee.accessKeyId||!ee.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");ee.stsToken&&!ee.refreshSTSToken&&!ee.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),ee.bucket&&Ee(ee.bucket);var z=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},ee);if(z.accessKeyId=z.accessKeyId.trim(),z.accessKeySecret=z.accessKeySecret.trim(),z.timeout&&(z.timeout=fe(z.timeout)),z.endpoint)z.endpoint=de(z.endpoint,z.secure);else if(z.region)z.endpoint=Te(z.region,z.internal,z.secure);else throw new Error("require options.endpoint or options.region");return z.inited=!0,z}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(ae,Ge,Re){"use strict";var fe=ae("merge-descriptors"),pe=Re;fe(pe,ae("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.concat.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkBucketName"),we=Ee.checkBucketName,Te=ae("querystring"),ve=ae("js-base64"),Pe=ve.Base64.encode,de=Re;de.processObjectSave=function(){var z=(0,be.default)(pe.default.mark(function ie(le,ue,me,xe){var Ae,De,Fe,je;return pe.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ee(le,"sourceObject"),ee(ue,"targetObject"),ee(me,"process"),ue=this._objectName(ue),xe&&we(xe),Ae=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),De=xe?",b_".concat(Pe(xe)):"",ue=Pe(ue),Fe={"x-oss-process":"".concat(me,"|sys/saveas,o_").concat(ue).concat(De)},Ae.content=Te.stringify(Fe),Be.next=12,this.request(Ae);case 12:return je=Be.sent,Be.abrupt("return",{res:je.res,status:je.res.status});case 14:case"end":return Be.stop()}},ie,this)}));function oe(ie,le,ue,me){return z.apply(this,arguments)}return oe}();function ee(z,oe){if(!z)throw new Error("".concat(oe," is required"));if(typeof z!="string")throw new Error("".concat(oe," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.array.from.js"),ae("core-js/modules/es.string.iterator.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.array.filter.js"),ae("core-js/modules/es.array.find.js"),ae("core-js/modules/es.regexp.to-string.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("debug")("ali-oss:multipart-copy"),we=ae("copy-to"),Te=Re;Te.uploadPartCopy=function(){var ve=(0,be.default)(pe.default.mark(function de(ee,z,oe,ie,le){var ue,me,xe,Ae,De,Fe=arguments;return pe.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return ue=Fe.length>5&&Fe[5]!==void 0?Fe[5]:{},ue.headers=ue.headers||{},me=ue.versionId||ue.subres&&ue.subres.versionId||null,me?xe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(me):xe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),ue.headers["x-oss-copy-source"]=xe,ie&&(ue.headers["x-oss-copy-source-range"]="bytes=".concat(ie)),ue.subres={partNumber:oe,uploadId:z},Ae=this._objectRequestParams("PUT",ee,ue),Ae.mime=ue.mime,Ae.successStatuses=[200],Le.next=12,this.request(Ae);case 12:return De=Le.sent,Le.abrupt("return",{name:ee,etag:De.res.headers.etag,res:De.res});case 14:case"end":return Le.stop()}},de,this)}));function Pe(de,ee,z,oe,ie){return ve.apply(this,arguments)}return Pe}(),Te.multipartUploadCopy=function(){var ve=(0,be.default)(pe.default.mark(function de(ee,z){var oe,ie,le,ue,me,xe,Ae,De,Fe,je,Le,Be,Ue=arguments;return pe.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:return oe=Ue.length>2&&Ue[2]!==void 0?Ue[2]:{},this.resetCancelFlag(),ie=oe.versionId,le=ie===void 0?null:ie,ue={versionId:le},He.next=6,this._getObjectMeta(z.sourceBucketName,z.sourceKey,ue);case 6:if(me=He.sent,xe=me.res.headers["content-length"],z.startOffset=z.startOffset||0,z.endOffset=z.endOffset||xe,!(oe.checkpoint&&oe.checkpoint.uploadId)){He.next=14;break}return He.next=13,this._resumeMultipartCopy(oe.checkpoint,z,oe);case 13:return He.abrupt("return",He.sent);case 14:if(Ae=102400,De=z.endOffset-z.startOffset,!(De<Ae)){He.next=18;break}throw new Error("copySize must not be smaller than ".concat(Ae));case 18:if(!(oe.partSize&&oe.partSize<Ae)){He.next=20;break}throw new Error("partSize must not be smaller than ".concat(Ae));case 20:return He.next=22,this.initMultipartUpload(ee,oe);case 22:if(Fe=He.sent,je=Fe.uploadId,Le=this._getPartSize(De,oe.partSize),Be={name:ee,copySize:De,partSize:Le,uploadId:je,doneParts:[]},!(oe&&oe.progress)){He.next=29;break}return He.next=29,oe.progress(0,Be,Fe.res);case 29:return He.next=31,this._resumeMultipartCopy(Be,z,oe);case 31:return He.abrupt("return",He.sent);case 32:case"end":return He.stop()}},de,this)}));function Pe(de,ee){return ve.apply(this,arguments)}return Pe}(),Te._resumeMultipartCopy=function(){var ve=(0,be.default)(pe.default.mark(function de(ee,z,oe){var ie,le,ue,me,xe,Ae,De,Fe,je,Le,Be,Ue,Je,He,We,at,ft,mt,Lt,Xe,et;return pe.default.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:if(!this.isCancel()){vt.next=2;break}throw this._makeCancelEvent();case 2:if(ie=oe.versionId,le=ie===void 0?null:ie,ue={versionId:le},me=ee.copySize,xe=ee.partSize,Ae=ee.uploadId,De=ee.doneParts,Fe=ee.name,je=this._divideMultipartCopyParts(me,xe,z.startOffset),Le=je.length,Be={headers:{}},oe.copyheaders&&we(oe.copyheaders).to(Be.headers),le&&we(ue).to(Be),Ue=function(ht,dt,ut){return new Promise(function(){var Pt=(0,be.default)(pe.default.mark(function yt(gt,Tt){var ct,Ye,Ze;return pe.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(Ne.prev=0,ht.isCancel()){Ne.next=22;break}return ct=je[dt-1],Ye="".concat(ct.start,"-").concat(ct.end-1),Ne.prev=4,Ne.next=7,ht.uploadPartCopy(Fe,Ae,dt,Ye,ut,Be);case 7:Ze=Ne.sent,Ne.next=15;break;case 10:if(Ne.prev=10,Ne.t0=Ne.catch(4),Ne.t0.status!==404){Ne.next=14;break}throw ht._makeAbortEvent();case 14:throw Ne.t0;case 15:if(ht.isCancel()){Ne.next=22;break}if(Ee("content-range ".concat(Ze.res.headers["content-range"])),De.push({number:dt,etag:Ze.res.headers.etag}),ee.doneParts=De,!(oe&&oe.progress)){Ne.next=22;break}return Ne.next=22,oe.progress(De.length/Le,ee,Ze.res);case 22:gt(),Ne.next=29;break;case 25:Ne.prev=25,Ne.t1=Ne.catch(0),Ne.t1.partNum=dt,Tt(Ne.t1);case 29:case"end":return Ne.stop()}},yt,null,[[0,25],[4,10]])}));return function(yt,gt){return Pt.apply(this,arguments)}}())},Je=Array.from(new Array(Le),function(wt,ht){return ht+1}),He=De.map(function(wt){return wt.number}),We=Je.filter(function(wt){return He.indexOf(wt)<0}),at=5,ft=oe.parallel||at,!(this.checkBrowserAndVersion("Internet Explorer","10")||ft===1)){vt.next=28;break}mt=0;case 18:if(!(mt<We.length)){vt.next=26;break}if(!this.isCancel()){vt.next=21;break}throw this._makeCancelEvent();case 21:return vt.next=23,Ue(this,We[mt],z);case 23:mt++,vt.next=18;break;case 26:vt.next=40;break;case 28:return vt.next=30,this._parallelNode(We,ft,Ue,z);case 30:if(Lt=vt.sent,Xe=Lt.find(function(wt){return wt.name==="abort"}),!Xe){vt.next=34;break}throw Xe;case 34:if(!this.isCancel()){vt.next=36;break}throw this._makeCancelEvent();case 36:if(!(Lt&&Lt.length>0)){vt.next=40;break}throw et=Lt[0],et.message="Failed to copy some parts with error: ".concat(et.toString()," part_num: ").concat(et.partNum),et;case 40:return vt.next=42,this.completeMultipartUpload(Fe,Ae,De,oe);case 42:return vt.abrupt("return",vt.sent);case 43:case"end":return vt.stop()}},de,this)}));function Pe(de,ee,z){return ve.apply(this,arguments)}return Pe}(),Te._divideMultipartCopyParts=function(Pe,de,ee){for(var z=Math.ceil(Pe/de),oe=[],ie=0;ie<z;ie++){var le=de*ie+ee,ue=Math.min(le+de,Pe+ee);oe.push({start:le,end:ue})}return oe},Te._getObjectMeta=function(){var ve=(0,be.default)(pe.default.mark(function de(ee,z,oe){var ie,le;return pe.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return ie=this.getBucket(),this.setBucket(ee),me.next=4,this.head(z,oe);case 4:return le=me.sent,this.setBucket(ie),me.abrupt("return",le);case 7:case"end":return me.stop()}},de,this)}));function Pe(de,ee,z){return ve.apply(this,arguments)}return Pe}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=ae("@babel/runtime/helpers/interopRequireDefault"),be=pe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.array.filter.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.array.sort.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.to-string.js");var Ee=pe(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("copy-to"),Te=ae("./callback"),ve=ae("./utils/deepCopy"),Pe=ve.deepCopyWith,de=ae("./utils/isBuffer"),ee=de.isBuffer,z=ae("./utils/omit"),oe=z.omit,ie=Re;ie.listUploads=function(){var le=(0,Ee.default)(be.default.mark(function me(xe,Ae){var De,Fe,je,Le;return be.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ae=Ae||{},De={},we(Ae).to(De),De.subres="uploads",Fe=this._objectRequestParams("GET","",De),Fe.query=xe,Fe.xmlResponse=!0,Fe.successStatuses=[200],Ue.next=10,this.request(Fe);case 10:return je=Ue.sent,Le=je.data.Upload||[],Array.isArray(Le)||(Le=[Le]),Le=Le.map(function(Je){return{name:Je.Key,uploadId:Je.UploadId,initiated:Je.Initiated}}),Ue.abrupt("return",{res:je.res,uploads:Le,bucket:je.data.Bucket,nextKeyMarker:je.data.NextKeyMarker,nextUploadIdMarker:je.data.NextUploadIdMarker,isTruncated:je.data.IsTruncated==="true"});case 15:case"end":return Ue.stop()}},me,this)}));function ue(me,xe){return le.apply(this,arguments)}return ue}(),ie.listParts=function(){var le=(0,Ee.default)(be.default.mark(function me(xe,Ae,De,Fe){var je,Le,Be;return be.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Fe=Fe||{},je={},we(Fe).to(je),je.subres={uploadId:Ae},Le=this._objectRequestParams("GET",xe,je),Le.query=De,Le.xmlResponse=!0,Le.successStatuses=[200],Je.next=10,this.request(Le);case 10:return Be=Je.sent,Je.abrupt("return",{res:Be.res,uploadId:Be.data.UploadId,bucket:Be.data.Bucket,name:Be.data.Key,partNumberMarker:Be.data.PartNumberMarker,nextPartNumberMarker:Be.data.NextPartNumberMarker,maxParts:Be.data.MaxParts,isTruncated:Be.data.IsTruncated,parts:Be.data.Part||[]});case 12:case"end":return Je.stop()}},me,this)}));function ue(me,xe,Ae,De){return le.apply(this,arguments)}return ue}(),ie.abortMultipartUpload=function(){var le=(0,Ee.default)(be.default.mark(function me(xe,Ae,De){var Fe,je,Le;return be.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return this._stop(),De=De||{},Fe={},we(De).to(Fe),Fe.subres={uploadId:Ae},je=this._objectRequestParams("DELETE",xe,Fe),je.successStatuses=[204],Ue.next=9,this.request(je);case 9:return Le=Ue.sent,Ue.abrupt("return",{res:Le.res});case 11:case"end":return Ue.stop()}},me,this)}));function ue(me,xe,Ae){return le.apply(this,arguments)}return ue}(),ie.initMultipartUpload=function(){var le=(0,Ee.default)(be.default.mark(function me(xe,Ae){var De,Fe,je;return be.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return Ae=Ae||{},De={},we(Ae).to(De),De.headers=De.headers||{},this._convertMetaToHeaders(Ae.meta,De.headers),De.subres="uploads",Fe=this._objectRequestParams("POST",xe,De),Fe.mime=Ae.mime,Fe.xmlResponse=!0,Fe.successStatuses=[200],Be.next=12,this.request(Fe);case 12:return je=Be.sent,Be.abrupt("return",{res:je.res,bucket:je.data.Bucket,name:je.data.Key,uploadId:je.data.UploadId});case 14:case"end":return Be.stop()}},me,this)}));function ue(me,xe){return le.apply(this,arguments)}return ue}(),ie.uploadPart=function(){var le=(0,Ee.default)(be.default.mark(function me(xe,Ae,De,Fe,je,Le,Be){var Ue,Je;return be.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(Ue={size:Le-je},Je=fe&&fe.browser,!Je){We.next=8;break}return We.next=5,this._createBuffer(Fe,je,Le);case 5:Ue.content=We.sent,We.next=11;break;case 8:return We.next=10,this._createStream(Fe,je,Le);case 10:Ue.stream=We.sent;case 11:return We.next=13,this._uploadPart(xe,Ae,De,Ue,Be);case 13:return We.abrupt("return",We.sent);case 14:case"end":return We.stop()}},me,this)}));function ue(me,xe,Ae,De,Fe,je,Le){return le.apply(this,arguments)}return ue}(),ie.completeMultipartUpload=function(){var le=(0,Ee.default)(be.default.mark(function me(xe,Ae,De,Fe){var je,Le,Be,Ue,Je,He,We,at;return be.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:for(je=De.concat().sort(function(Lt,Xe){return Lt.number-Xe.number}).filter(function(Lt,Xe,et){return!Xe||Lt.number!==et[Xe-1].number}),Le=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,Be=0;Be<je.length;Be++)Ue=je[Be],Le+=`<Part>
|
|
`,Le+="<PartNumber>".concat(Ue.number,`</PartNumber>
|
|
`),Le+="<ETag>".concat(Ue.etag,`</ETag>
|
|
`),Le+=`</Part>
|
|
`;return Le+="</CompleteMultipartUpload>",Fe=Fe||{},Je={},Je=Pe(Fe,function(Lt){if(ee(Lt))return null}),Je.subres={uploadId:Ae},Je.headers=oe(Je.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),He=this._objectRequestParams("POST",xe,Je),Te.encodeCallback(He,Je),He.mime="xml",He.content=Le,He.headers&&He.headers["x-oss-callback"]||(He.xmlResponse=!0),He.successStatuses=[200],mt.next=17,this.request(He);case 17:if(We=mt.sent,!Fe.progress){mt.next=21;break}return mt.next=21,Fe.progress(1,null,We.res);case 21:return at={res:We.res,bucket:He.bucket,name:xe,etag:We.res.headers.etag},He.headers&&He.headers["x-oss-callback"]&&(at.data=JSON.parse(We.data.toString())),mt.abrupt("return",at);case 24:case"end":return mt.stop()}},me,this)}));function ue(me,xe,Ae,De){return le.apply(this,arguments)}return ue}(),ie._uploadPart=function(){var le=(0,Ee.default)(be.default.mark(function me(xe,Ae,De,Fe,je){var Le,Be,Ue,Je;return be.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return je=je||{},Le={},we(je).to(Le),Le.headers=Le.headers||{},Le.headers["Content-Length"]=Fe.size,Le.headers=oe(Le.headers,["x-oss-server-side-encryption"]),Le.subres={partNumber:De,uploadId:Ae},Be=this._objectRequestParams("PUT",xe,Le),Be.mime=Le.mime,Ue=fe&&fe.browser,Ue?Be.content=Fe.content:Be.stream=Fe.stream,Be.successStatuses=[200],Be.disabledMD5=je.disabledMD5,We.next=15,this.request(Be);case 15:if(Je=We.sent,Je.res.headers.etag){We.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,Be.stream=null),We.abrupt("return",{name:xe,etag:Je.res.headers.etag,res:Je.res});case 20:case"end":return We.stop()}},me,this)}));function ue(me,xe,Ae,De,Fe){return le.apply(this,arguments)}return ue}()}).call(this)}).call(this,ae("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator")),be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("url"),we=ae("utility"),Te=ae("copy-to"),ve=ae("../../common/signUtils"),Pe=ae("../utils/isIP"),de=Pe.isIP,ee=ae("../utils/setSTSToken"),z=ee.setSTSToken,oe=ae("../utils/isFunction"),ie=oe.isFunction,le=Re;le.asyncSignatureUrl=function(){var ue=(0,be.default)(pe.default.mark(function xe(Ae,De){var Fe,je,Le,Be,Ue;return pe.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:if(!de(this.options.endpoint.hostname)){He.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(De=De||{},Ae=this._objectName(Ae),De.method=De.method||"GET",Fe=we.timestamp()+(De.expires||1800),je={bucket:this.options.bucket,object:Ae},Le=this._getResource(je),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){He.next=11;break}return He.next=11,z.call(this);case 11:return this.options.stsToken&&(De["security-token"]=this.options.stsToken),Be=ve._signatureForURL(this.options.accessKeySecret,De,Le,Fe),Ue=Ee.parse(this._getReqUrl(je)),Ue.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Be.Signature},Te(Be.subResource).to(Ue.query),He.abrupt("return",Ue.format());case 17:case"end":return He.stop()}},xe,this)}));function me(xe,Ae){return ue.apply(this,arguments)}return me}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.find.js"),ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js");var be=fe(ae("@babel/runtime/helpers/typeof")),Ee=fe(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("../utils/checkBucketName"),Te=we.checkBucketName,ve=Re,Pe=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];ve.copy=function(){var de=(0,Ee.default)(pe.default.mark(function z(oe,ie,le,ue){var me,xe,Ae;return pe.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return(0,be.default)(le)==="object"&&(ue=le),ue=ue||{},ue.headers=ue.headers||{},Object.keys(ue.headers).forEach(function(je){ue.headers["x-oss-copy-source-".concat(je.toLowerCase())]=ue.headers[je]}),(ue.meta||Object.keys(ue.headers).find(function(je){return Pe.includes(je.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,me=this._objectRequestParams("PUT",oe,ue),me.xmlResponse=!0,me.successStatuses=[200,304],Fe.next=14,this.request(me);case 14:return xe=Fe.sent,Ae=xe.data,Ae&&(Ae={etag:Ae.ETag,lastModified:Ae.LastModified}),Fe.abrupt("return",{data:Ae,res:xe.res});case 18:case"end":return Fe.stop()}},z,this)}));function ee(z,oe,ie,le){return de.apply(this,arguments)}return ee}(),ve._getSourceName=function(ee,z){return typeof z=="string"?ee=this._objectName(ee):ee[0]!=="/"?z=this.options.bucket:(z=ee.replace(/\/(.+?)(\/.*)/,"$1"),ee=ee.replace(/(\/.+?\/)(.*)/,"$2")),Te(z),ee=encodeURIComponent(ee),ee="/".concat(z,"/").concat(ee),ee}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re;Ee.delete=function(){var we=(0,be.default)(pe.default.mark(function ve(Pe){var de,ee,z,oe=arguments;return pe.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=oe.length>1&&oe[1]!==void 0?oe[1]:{},de.subres=Object.assign({},de.subres),de.versionId&&(de.subres.versionId=de.versionId),ee=this._objectRequestParams("DELETE",Pe,de),ee.successStatuses=[204],le.next=7,this.request(ee);case 7:return z=le.sent,le.abrupt("return",{res:z.res});case 9:case"end":return le.stop()}},ve,this)}));function Te(ve){return we.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("utility"),we=ae("../utils/obj2xml"),Te=we.obj2xml,ve=Re;ve.deleteMulti=function(){var Pe=(0,be.default)(pe.default.mark(function ee(z){var oe,ie,le,ue,me,xe,Ae,De,Fe,je,Le,Be,Ue,Je=arguments;return pe.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(oe=Je.length>1&&Je[1]!==void 0?Je[1]:{},ie=[],!(!z||!z.length)){We.next=4;break}throw new Error("names is required");case 4:for(le=0;le<z.length;le++)ue={},typeof z[le]=="string"?ue.Key=Ee.escape(this._objectName(z[le])):(me=z[le],xe=me.key,Ae=me.versionId,ue.Key=Ee.escape(this._objectName(xe)),ue.VersionId=Ae),ie.push(ue);return De={Delete:{Quiet:!!oe.quiet,Object:ie}},Fe=Te(De,{headers:!0}),oe.subres=Object.assign({delete:""},oe.subres),oe.versionId&&(oe.subres.versionId=oe.versionId),je=this._objectRequestParams("POST","",oe),je.mime="xml",je.content=Fe,je.xmlResponse=!0,je.successStatuses=[200],We.next=16,this.request(je);case 16:return Le=We.sent,Be=Le.data,Ue=Be&&Be.Deleted||null,Ue&&(Array.isArray(Ue)||(Ue=[Ue])),We.abrupt("return",{res:Le.res,deleted:Ue||[]});case 21:case"end":return We.stop()}},ee,this)}));function de(ee){return Pe.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(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re;Ee.deleteObjectTagging=function(){var we=(0,be.default)(pe.default.mark(function ve(Pe){var de,ee,z,oe=arguments;return pe.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=oe.length>1&&oe[1]!==void 0?oe[1]:{},de.subres=Object.assign({tagging:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),Pe=this._objectName(Pe),ee=this._objectRequestParams("DELETE",Pe,de),ee.successStatuses=[204],le.next=8,this.request(ee);case 8:return z=le.sent,le.abrupt("return",{status:z.status,res:z.res});case 10:case"end":return le.stop()}},ve,this)}));function Te(ve){return we.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.concat.js");var fe=ae("url"),pe=ae("../utils/isIP"),be=pe.isIP,Ee=Re;Ee.generateObjectUrl=function(Te,ve){if(be(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 Pe=fe.parse(ve),de=this.options.bucket;Pe.hostname="".concat(de,".").concat(Pe.hostname),Pe.host="".concat(de,".").concat(Pe.host),ve=Pe.format()}return ve+this._escape(this._objectName(Te))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=ae("@babel/runtime/helpers/interopRequireDefault"),be=pe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var Ee=pe(ae("@babel/runtime/helpers/asyncToGenerator")),we=ae("fs"),Te=ae("is-type-of"),ve=Re;ve.get=function(){var Pe=(0,Ee.default)(be.default.mark(function ee(z,oe){var ie,le,ue,me,xe,Ae,De,Fe,je=arguments;return be.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ie=je.length>2&&je[2]!==void 0?je[2]:{},le=null,ue=!1,Te.writableStream(oe)?le=oe:Te.string(oe)?(le=we.createWriteStream(oe),ue=!0):ie=oe,ie=ie||{},me=fe&&fe.browser,xe=ie.responseCacheControl===null?"":"no-cache",Ae=me&&xe?{"response-cache-control":xe}:{},ie.subres=Object.assign(Ae,ie.subres),ie.versionId&&(ie.subres.versionId=ie.versionId),ie.process&&(ie.subres["x-oss-process"]=ie.process),Be.prev=11,Fe=this._objectRequestParams("GET",z,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],Be.next=17,this.request(Fe);case 17:De=Be.sent,ue&&le.destroy(),Be.next=28;break;case 21:if(Be.prev=21,Be.t0=Be.catch(11),!ue){Be.next=27;break}return le.destroy(),Be.next=27,this._deleteFileSafe(oe);case 27:throw Be.t0;case 28:return Be.abrupt("return",{res:De.res,content:De.data});case 29:case"end":return Be.stop()}},ee,this,[[11,21]])}));function de(ee,z){return Pe.apply(this,arguments)}return de}()}).call(this)}).call(this,ae("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re;Ee.getACL=function(){var we=(0,be.default)(pe.default.mark(function ve(Pe){var de,ee,z,oe=arguments;return pe.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=oe.length>1&&oe[1]!==void 0?oe[1]:{},de.subres=Object.assign({acl:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),Pe=this._objectName(Pe),ee=this._objectRequestParams("GET",Pe,de),ee.successStatuses=[200],ee.xmlResponse=!0,le.next=9,this.request(ee);case 9:return z=le.sent,le.abrupt("return",{acl:z.data.AccessControlList.Grant,owner:{id:z.data.Owner.ID,displayName:z.data.Owner.DisplayName},res:z.res});case 11:case"end":return le.stop()}},ve,this)}));function Te(ve){return we.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.number.constructor.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re,we=ae("../utils/isObject"),Te=we.isObject,ve=ae("../utils/isArray"),Pe=ve.isArray;Ee.getBucketVersions=de,Ee.listObjectVersions=de;function de(){return ee.apply(this,arguments)}function ee(){return ee=(0,be.default)(pe.default.mark(function ie(){var le,ue,me,xe,Ae,De,Fe,je,Le=arguments;return pe.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(le=Le.length>0&&Le[0]!==void 0?Le[0]:{},ue=Le.length>1&&Le[1]!==void 0?Le[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){Ue.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),me=this._objectRequestParams("GET","",ue),me.xmlResponse=!0,me.successStatuses=[200],me.query=oe(le),Ue.next=12,this.request(me);case 12:return xe=Ue.sent,Ae=xe.data.Version||[],De=xe.data.DeleteMarker||[],Fe=this,Ae&&(Array.isArray(Ae)||(Ae=[Ae]),Ae=Ae.map(function(Je){return{name:Je.Key,url:Fe._objectUrl(Je.Key),lastModified:Je.LastModified,isLatest:Je.IsLatest==="true",versionId:Je.VersionId,etag:Je.ETag,type:Je.Type,size:Number(Je.Size),storageClass:Je.StorageClass,owner:{id:Je.Owner.ID,displayName:Je.Owner.DisplayName}}})),De&&(Pe(De)||(De=[De]),De=De.map(function(Je){return{name:Je.Key,lastModified:Je.LastModified,versionId:Je.VersionId,owner:{id:Je.Owner.ID,displayName:Je.Owner.DisplayName}}})),je=xe.data.CommonPrefixes||null,je&&(Pe(je)||(je=[je]),je=je.map(function(Je){return Je.Prefix})),Ue.abrupt("return",{res:xe.res,objects:Ae,deleteMarker:De,prefixes:je,nextMarker:xe.data.NextKeyMarker||null,NextVersionIdMarker:xe.data.NextVersionIdMarker||null,nextKeyMarker:xe.data.NextKeyMarker||null,nextVersionIdMarker:xe.data.NextVersionIdMarker||null,isTruncated:xe.data.IsTruncated==="true"});case 21:case"end":return Ue.stop()}},ie,this)})),ee.apply(this,arguments)}function z(ie){return ie.replace(/([A-Z])/g,"-$1").toLowerCase()}function oe(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le={};return Te(ie)&&Object.keys(ie).forEach(function(ue){le[z(ue)]=ie[ue]}),le}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re;Ee.getObjectMeta=function(){var we=(0,be.default)(pe.default.mark(function ve(Pe,de){var ee,z;return pe.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return de=de||{},Pe=this._objectName(Pe),de.subres=Object.assign({objectMeta:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),ee=this._objectRequestParams("HEAD",Pe,de),ee.successStatuses=[200],ie.next=8,this.request(ee);case 8:return z=ie.sent,ie.abrupt("return",{status:z.status,res:z.res});case 10:case"end":return ie.stop()}},ve,this)}));function Te(ve,Pe){return we.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re,we=ae("../utils/isObject"),Te=we.isObject;Ee.getObjectTagging=function(){var ve=(0,be.default)(pe.default.mark(function de(ee){var z,oe,ie,le,ue,me,xe=arguments;return pe.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return z=xe.length>1&&xe[1]!==void 0?xe[1]:{},z.subres=Object.assign({tagging:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),ee=this._objectName(ee),oe=this._objectRequestParams("GET",ee,z),oe.successStatuses=[200],De.next=8,this.request(oe);case 8:return ie=De.sent,De.next=11,this.parseXML(ie.data);case 11:return le=De.sent,ue=le.TagSet.Tag,ue=ue&&Te(ue)?[ue]:ue||[],me={},ue.forEach(function(Fe){me[Fe.Key]=Fe.Value}),De.abrupt("return",{status:ie.status,res:ie.res,tag:me});case 17:case"end":return De.stop()}},de,this)}));function Pe(de){return ve.apply(this,arguments)}return Pe}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(ae,Ge,Re){"use strict";var fe=ae("../utils/isIP"),pe=fe.isIP,be=Re;be.getObjectUrl=function(we,Te){if(pe(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Te?Te[Te.length-1]!=="/"&&(Te+="/"):Te=this.options.endpoint.format(),Te+this._escape(this._objectName(we))}},{"../utils/isIP":69}],43:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re;Ee.getSymlink=function(){var we=(0,be.default)(pe.default.mark(function ve(Pe){var de,ee,z,oe,ie=arguments;return pe.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),Pe=this._objectName(Pe),ee=this._objectRequestParams("GET",Pe,de),ee.successStatuses=[200],ue.next=8,this.request(ee);case 8:return z=ue.sent,oe=z.res.headers["x-oss-symlink-target"],ue.abrupt("return",{targetName:decodeURIComponent(oe),res:z.res});case 11:case"end":return ue.stop()}},ve,this)}));function Te(ve){return we.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/checkEnv"),we=Ee.checkEnv,Te=Re;Te.head=function(){var ve=(0,be.default)(pe.default.mark(function de(ee){var z,oe,ie,le,ue=arguments;return pe.default.wrap(function(xe){for(;;)switch(xe.prev=xe.next){case 0:return z=ue.length>1&&ue[1]!==void 0?ue[1]:{},we("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),z.subres=Object.assign({},z.subres),z.versionId&&(z.subres.versionId=z.versionId),oe=this._objectRequestParams("HEAD",ee,z),oe.successStatuses=[200,304],xe.next=8,this.request(oe);case 8:return ie=xe.sent,le={meta:null,res:ie.res,status:ie.status},ie.status===200&&Object.keys(ie.headers).forEach(function(Ae){Ae.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[Ae.substring(11)]=ie.headers[Ae])}),xe.abrupt("return",le);case 12:case"end":return xe.stop()}},de,this)}));function Pe(de){return ve.apply(this,arguments)}return Pe}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re;Ee.putACL=function(){var we=(0,be.default)(pe.default.mark(function ve(Pe,de,ee){var z,oe;return pe.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return ee=ee||{},ee.subres=Object.assign({acl:""},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),ee.headers=ee.headers||{},ee.headers["x-oss-object-acl"]=de,Pe=this._objectName(Pe),z=this._objectRequestParams("PUT",Pe,ee),z.successStatuses=[200],le.next=10,this.request(z);case 10:return oe=le.sent,le.abrupt("return",{res:oe.res});case 12:case"end":return le.stop()}},ve,this)}));function Te(ve,Pe,de){return we.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.object.keys.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("../utils/obj2xml"),we=Ee.obj2xml,Te=ae("../utils/checkObjectTag"),ve=Te.checkObjectTag,Pe=Re;Pe.putObjectTagging=function(){var de=(0,be.default)(pe.default.mark(function z(oe,ie){var le,ue,me,xe,Ae=arguments;return pe.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=Ae.length>2&&Ae[2]!==void 0?Ae[2]:{},ve(ie),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),oe=this._objectName(oe),ue=this._objectRequestParams("PUT",oe,le),ue.successStatuses=[200],ie=Object.keys(ie).map(function(je){return{Key:je,Value:ie[je]}}),me={Tagging:{TagSet:{Tag:ie}}},ue.mime="xml",ue.content=we(me),Fe.next=13,this.request(ue);case 13:return xe=Fe.sent,Fe.abrupt("return",{res:xe.res,status:xe.status});case 15:case"end":return Fe.stop()}},z,this)}));function ee(z,oe){return de.apply(this,arguments)}return ee}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=Re;Ee.putSymlink=function(){var we=(0,be.default)(pe.default.mark(function ve(Pe,de,ee){var z,oe;return pe.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return ee=ee||{},ee.headers=ee.headers||{},de=this._escape(this._objectName(de)),this._convertMetaToHeaders(ee.meta,ee.headers),ee.headers["x-oss-symlink-target"]=de,ee.subres=Object.assign({symlink:""},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),ee.storageClass&&(ee.headers["x-oss-storage-class"]=ee.storageClass),Pe=this._objectName(Pe),z=this._objectRequestParams("PUT",Pe,ee),z.successStatuses=[200],le.next=13,this.request(z);case 13:return oe=le.sent,le.abrupt("return",{res:oe.res});case 15:case"end":return le.stop()}},ve,this)}));function Te(ve,Pe,de){return we.apply(this,arguments)}return Te}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(ae,Ge,Re){"use strict";var fe=ae("url"),pe=ae("utility"),be=ae("copy-to"),Ee=ae("../../common/signUtils"),we=ae("../utils/isIP"),Te=we.isIP,ve=Re;ve.signatureUrl=function(de,ee){if(Te(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");ee=ee||{},de=this._objectName(de),ee.method=ee.method||"GET";var z=pe.timestamp()+(ee.expires||1800),oe={bucket:this.options.bucket,object:de},ie=this._getResource(oe);this.options.stsToken&&(ee["security-token"]=this.options.stsToken);var le=Ee._signatureForURL(this.options.accessKeySecret,ee,ie,z),ue=fe.parse(this._getReqUrl(oe));return ue.query={OSSAccessKeyId:this.options.accessKeyId,Expires:z,Signature:le.Signature},be(le.subResource).to(ue.query),ue.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.array.iterator.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.string.iterator.js"),ae("core-js/modules/web.dom-collections.iterator.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.function.name.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator")),Ee=ae("./utils/isArray"),we=Ee.isArray,Te=Re;Te._parallelNode=function(){var ve=(0,be.default)(pe.default.mark(function de(ee,z,oe,ie){var le,ue,me,xe,Ae,De,Fe,je;return pe.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:le=this,ue=[],me=[],xe=ee.length/z,Ae=ee.length%z,De=Ae===0?xe:(ee.length-Ae)/z+1,Fe=1,je=0;case 8:if(!(je<ee.length)){Be.next=26;break}if(!le.isCancel()){Be.next=11;break}return Be.abrupt("break",26);case 11:if(ie?me.push(oe(le,ee[je],ie)):me.push(oe(le,ee[je])),!(me.length===z||Fe===De&&je===ee.length-1)){Be.next=23;break}return Be.prev=13,Fe+=1,Be.next=17,Promise.all(me);case 17:Be.next=22;break;case 19:Be.prev=19,Be.t0=Be.catch(13),ue.push(Be.t0);case 22:me=[];case 23:je++,Be.next=8;break;case 26:return Be.abrupt("return",ue);case 27:case"end":return Be.stop()}},de,this,[[13,19]])}));function Pe(de,ee,z,oe){return ve.apply(this,arguments)}return Pe}(),Te._parallel=function(Pe,de,ee){var z=this;return new Promise(function(oe){var ie=[];if(de<=0||!Pe){oe(ie);return}function le(Be){return function(){if(Be===null)throw new Error("Callback was already called.");var Ue=Be;Be=null;for(var Je=arguments.length,He=new Array(Je),We=0;We<Je;We++)He[We]=arguments[We];Ue.apply(this,He)}}function ue(Be){var Ue=-1,Je=Be.length;return function(){return++Ue<Je&&!z.isCancel()?{value:Be[Ue],key:Ue}:null}}var me=ue(Pe),xe=!1,Ae=0,De=!1;function Fe(Be){Ae-=1,Be?(xe=!0,ie.push(Be),oe(ie)):xe&&Ae<=0?(xe=!0,oe(ie)):De||(z.isCancel()?oe(ie):Le())}function je(Be,Ue){ee(Be).then(function(Je){Ue(null,Je)}).catch(function(Je){Ue(Je)})}function Le(){for(De=!0;Ae<de&&!xe&&!z.isCancel();){var Be=me();if(Be===null||ie.length>0){xe=!0,Ae<=0&&oe(ie);return}Ae+=1,je(Be.value,le(Fe))}De=!1}Le()})},Te.cancel=function(Pe){this.options.cancelFlag=!0,we(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(de){if(de.destroyed===!1){var ee={name:"cancel",message:"cancel"};de.destroy(ee)}}),this.multipartUploadStreams=[],Pe&&this.abortMultipartUpload(Pe.name,Pe.uploadId,Pe.options)},Te.isCancel=function(){return this.options.cancelFlag},Te.resetCancelFlag=function(){this.options.cancelFlag=!1},Te._stop=function(){this.options.cancelFlag=!0},Te._makeCancelEvent=function(){var Pe={status:0,name:"cancel"};return Pe},Te._makeAbortEvent=function(){var Pe={status:0,name:"abort",message:"upload task has been abort"};return Pe}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(ae,Ge,Re){(function(fe){(function(){"use strict";ae("core-js/modules/es.string.trim.js"),ae("core-js/modules/es.array.sort.js"),ae("core-js/modules/es.array.join.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.regexp.to-string.js");var pe=ae("./../../shims/crypto/crypto.js"),be=ae("is-type-of"),Ee=ae("./utils/lowercaseKeyHeader"),we=Ee.lowercaseKeyHeader;Re.buildCanonicalizedResource=function(ve,Pe){var de="".concat(ve),ee="?";if(be.string(Pe)&&Pe.trim()!=="")de+=ee+Pe;else if(be.array(Pe))Pe.sort(),de+=ee+Pe.join("&");else if(Pe){var z=function(le,ue){return le[0]>ue[0]?1:le[0]<ue[0]?-1:0},oe=function(le){de+=ee+le,(Pe[le]||Pe[le]===0)&&(de+="=".concat(Pe[le])),ee="&"};Object.keys(Pe).sort(z).forEach(oe)}return de},Re.buildCanonicalString=function(ve,Pe,de,ee){de=de||{};var z=we(de.headers),oe="x-oss-",ie=[],le={},ue=[ve.toUpperCase(),z["content-md5"]||"",z["content-type"],ee||z["x-oss-date"]];return Object.keys(z).forEach(function(me){var xe=me.toLowerCase();xe.indexOf(oe)===0&&(le[xe]=String(z[me]).trim())}),Object.keys(le).sort().forEach(function(me){ie.push("".concat(me,":").concat(le[me]))}),ue=ue.concat(ie),ue.push(this.buildCanonicalizedResource(Pe,de.parameters)),ue.join(`
|
|
`)},Re.computeSignature=function(ve,Pe){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",ee=pe.createHmac("sha1",ve);return ee.update(fe.from(Pe,de)).digest("base64")},Re.authorization=function(ve,Pe,de,ee){return"OSS ".concat(ve,":").concat(this.computeSignature(Pe,de,ee))},Re._signatureForURL=function(ve){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=arguments.length>2?arguments[2]:void 0,ee=arguments.length>3?arguments[3]:void 0,z=arguments.length>4?arguments[4]:void 0,oe={},ie=Pe.subResource,le=ie===void 0?{}:ie;if(Pe.process){var ue="x-oss-process";le[ue]=Pe.process}if(Pe.trafficLimit){var me="x-oss-traffic-limit";le[me]=Pe.trafficLimit}if(Pe.response&&Object.keys(Pe.response).forEach(function(Fe){var je="response-".concat(Fe.toLowerCase());le[je]=Pe.response[Fe]}),Object.keys(Pe).forEach(function(Fe){var je=Fe.toLowerCase(),Le=Pe[Fe];je.indexOf("x-oss-")===0?oe[je]=Le:(je.indexOf("content-md5")===0||je.indexOf("content-type")===0)&&(oe[Fe]=Le)}),Object.prototype.hasOwnProperty.call(Pe,"security-token")&&(le["security-token"]=Pe["security-token"]),Object.prototype.hasOwnProperty.call(Pe,"callback")){var xe={callbackUrl:encodeURI(Pe.callback.url),callbackBody:Pe.callback.body};if(Pe.callback.host&&(xe.callbackHost=Pe.callback.host),Pe.callback.contentType&&(xe.callbackBodyType=Pe.callback.contentType),le.callback=fe.from(JSON.stringify(xe)).toString("base64"),Pe.callback.customValue){var Ae={};Object.keys(Pe.callback.customValue).forEach(function(Fe){Ae["x:".concat(Fe)]=Pe.callback.customValue[Fe]}),le["callback-var"]=fe.from(JSON.stringify(Ae)).toString("base64")}}var De=this.buildCanonicalString(Pe.method,de,{headers:oe,parameters:le},ee.toString());return{Signature:this.computeSignature(ve,De,z),subResource:le}}}).call(this)}).call(this,ae("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkBucketName=void 0,Re.checkBucketName=function(fe){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,be=pe?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!be.test(fe))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkConfigValid=void 0;var fe={endpoint:pe,region:/^[a-zA-Z0-9\-_]+$/};function pe(be){return typeof be=="string"?/^[a-zA-Z0-9._:/-]+$/.test(be):be.host?/^[a-zA-Z0-9._:/-]+$/.test(be.host):!1}Re.checkConfigValid=function(be,Ee){if(fe[Ee]){var we=!0;if(fe[Ee]instanceof Function?we=fe[Ee](be):we=fe[Ee].test(be),!we)throw new Error("The ".concat(Ee," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(ae,Ge,Re){(function(fe){(function(){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkEnv=void 0;function pe(be){fe.browser&&console.warn(be)}Re.checkEnv=pe}).call(this)}).call(this,ae("_process"))},{_process:467}],54:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.object.entries.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkObjectTag=void 0;var fe=ae("./checkValid"),pe=fe.checkValid,be=ae("./isObject"),Ee=be.isObject,we=[{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 (/)"}],Te={key:[].concat(we,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(we,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function ve(Pe){if(!Ee(Pe))throw new Error("tag must be Object");var de=Object.entries(Pe);if(de.length>10)throw new Error("maximum of 10 tags for a object");var ee=["key","value"];de.forEach(function(z){z.forEach(function(oe,ie){pe(oe,Te[ee[ie]])})})}Re.checkObjectTag=ve},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkValid=void 0;function fe(pe,be){be.forEach(function(Ee){if(Ee.validator)Ee.validator(pe);else if(Ee.pattern&&!Ee.pattern.test(pe))throw new Error(Ee.msg)})}Re.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(ae,Ge,Re){(function(fe){(function(){"use strict";ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.string.includes.js"),ae("core-js/modules/es.object.assign.js"),ae("core-js/modules/es.array.concat.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.createRequest=void 0;var pe=ae("./../../../shims/crypto/crypto.js"),be=ae("debug")("ali-oss"),Ee=ae("mime"),we=ae("dateformat"),Te=ae("copy-to"),ve=ae("path"),Pe=ae("./encoder"),de=Pe.encoder,ee=ae("./isIP"),z=ee.isIP,oe=ae("./setRegion"),ie=oe.setRegion,le=ae("../client/getReqUrl"),ue=le.getReqUrl,me=ae("./isDingTalk"),xe=me.isDingTalk;function Ae(je,Le){return je[Le]||je[Le.toLowerCase()]}function De(je,Le){delete je[Le],delete je[Le.toLowerCase()]}function Fe(je){var Le=new Date;this.options.amendTimeSkewed&&(Le=+new Date+this.options.amendTimeSkewed);var Be={"x-oss-date":we(Le,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Be["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Be["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Be,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Be["x-oss-security-token"]=this.options.stsToken),Te(je.headers).to(Be),Ae(Be,"Content-Type")||(je.mime&&je.mime.indexOf("/")>0?Be["Content-Type"]=je.mime:xe()?Be["Content-Type"]="application/octet-stream":Be["Content-Type"]=Ee.getType(je.mime||ve.extname(je.object||""))),Ae(Be,"Content-Type")||De(Be,"Content-Type"),je.content&&(je.disabledMD5||(!je.headers||!je.headers["Content-MD5"]?Be["Content-MD5"]=pe.createHash("md5").update(fe.from(je.content,"utf8")).digest("base64"):Be["Content-MD5"]=je.headers["Content-MD5"]),Be["Content-Length"]||(Be["Content-Length"]=je.content.length));var Ue=Object.prototype.hasOwnProperty;for(var Je in Be)Be[Je]&&Ue.call(Be,Je)&&(Be[Je]=de(String(Be[Je]),this.options.headerEncoding));var He=this._getResource(je);if(Be.authorization=this.authorization(je.method,He,je.subres,Be,this.options.headerEncoding),z(this.options.endpoint.hostname)){var We=this.options,at=We.region,ft=We.internal,mt=We.secure,Lt=ie(at,ft,mt);Be.host="".concat(je.bucket,".").concat(Lt.host)}var Xe=ue.bind(this)(je);be("request %s %s, with headers %j, !!stream: %s",je.method,Xe,Be,!!je.stream);var et=je.timeout||this.options.timeout,lt={method:je.method,content:je.content,stream:je.stream,headers:Be,timeout:et,writeStream:je.writeStream,customResponse:je.customResponse,ctx:je.ctx||this.ctx};return this.agent&&(lt.agent=this.agent),this.httpsAgent&&(lt.httpsAgent=this.httpsAgent),lt.enableProxy=!!this.options.enableProxy,lt.proxy=this.options.proxy?this.options.proxy:null,{url:Xe,params:lt}}Re.createRequest=Fe}).call(this)}).call(this,ae("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.entries.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.object.keys.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.dataFix=void 0;var fe=ae("./isObject"),pe=["true","TRUE","1",1],be=["false","FALSE","0",0];function Ee(ve,Pe,de){if(fe.isObject(ve)){var ee=Pe.remove,z=ee===void 0?[]:ee,oe=Pe.rename,ie=oe===void 0?{}:oe,le=Pe.camel,ue=le===void 0?[]:le,me=Pe.bool,xe=me===void 0?[]:me,Ae=Pe.lowerFirst,De=Ae===void 0?!1:Ae;return z.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 je=Fe.replace(/^(.)/,function(Le){return Le.toLowerCase()}).replace(/-(\w)/g,function(Le,Be){return Be.toUpperCase()});ve[je]||(ve[je]=ve[Fe])}}),xe.forEach(function(Fe){ve[Fe]=we(ve[Fe])}),typeof de=="function"&&de(ve),Te(ve,De),Ee}}Re.dataFix=Ee;function we(ve){return ve?pe.includes(ve)?!0:be.includes(ve)?!1:ve:!1}function Te(ve,Pe){Pe&&Object.keys(ve).forEach(function(de){var ee=de.replace(/^\w/,function(z){return z.toLowerCase()});typeof ve[ee]=="undefined"&&(ve[ee]=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(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault");ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js");var pe=fe(ae("@babel/runtime/helpers/typeof"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.deepCopyWith=Re.deepCopy=void 0;var be=ae("./isBuffer");Re.deepCopy=function(Ee){if(Ee===null||(0,pe.default)(Ee)!=="object")return Ee;if(be.isBuffer(Ee))return Ee.slice();var we=Array.isArray(Ee)?[]:{};return Object.keys(Ee).forEach(function(Te){we[Te]=Re.deepCopy(Ee[Te])}),we},Re.deepCopyWith=function(Ee,we){function Te(ve,Pe,de){var ee=we(ve,Pe,de);if(ee!==void 0)return ee;if(ve===null||(0,pe.default)(ve)!=="object")return ve;if(be.isBuffer(ve))return ve.slice();var z=Array.isArray(ve)?[]:{};return Object.keys(ve).forEach(function(oe){z[oe]=Te(ve[oe],oe,ve)}),z}return we?Te(Ee,"",null):Re.deepCopy(Ee)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(ae,Ge,Re){(function(fe){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.encoder=void 0;function pe(be){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return Ee==="utf-8"?be:fe.from(be).toString("latin1")}Re.encoder=pe}).call(this)}).call(this,ae("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.formatInventoryConfig=void 0;var fe=ae("../utils/dataFix"),pe=ae("../utils/isObject"),be=ae("../utils/isArray"),Ee=ae("../utils/formatObjKey");function we(ve){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Pe&&pe.isObject(ve)&&(ve=[ve]),be.isArray(ve)?ve=ve.map(Te):ve=Te(ve),ve}Re.formatInventoryConfig=we;function Te(ve){return fe.dataFix(ve,{bool:["IsEnabled"]},function(Pe){var de,ee;Pe.prefix=Pe.Filter.Prefix,delete Pe.Filter,Pe.OSSBucketDestination=Pe.Destination.OSSBucketDestination,Pe.OSSBucketDestination.rolename=Pe.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete Pe.OSSBucketDestination.RoleArn,Pe.OSSBucketDestination.bucket=Pe.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete Pe.OSSBucketDestination.Bucket,delete Pe.Destination,Pe.frequency=Pe.Schedule.Frequency,delete Pe.Schedule.Frequency,!((de=Pe==null?void 0:Pe.OptionalFields)===null||de===void 0)&&de.Field&&!be.isArray((ee=Pe.OptionalFields)===null||ee===void 0?void 0:ee.Field)&&(Pe.OptionalFields.Field=[Pe.OptionalFields.Field])}),ve=Ee.formatObjKey(ve,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),ve}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault");ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.string.includes.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js");var pe=fe(ae("@babel/runtime/helpers/typeof"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.formatObjKey=void 0;function be(we,Te,ve){if(we===null||(0,pe.default)(we)!=="object")return we;var Pe;if(Array.isArray(we)){Pe=[];for(var de=0;de<we.length;de++)Pe.push(be(we[de],Te,ve))}else Pe={},Object.keys(we).forEach(function(ee){Pe[Ee(ee,Te,ve)]=be(we[ee],Te,ve)});return Pe}Re.formatObjKey=be;function Ee(we,Te,ve){return ve&&ve.exclude&&ve.exclude.includes(we)||(Te==="firstUpperCase"?we=we.replace(/^./,function(Pe){return Pe.toUpperCase()}):Te==="firstLowerCase"&&(we=we.replace(/^./,function(Pe){return Pe.toLowerCase()}))),we}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.getStrBytesCount=void 0;function fe(pe){for(var be=0,Ee=0;Ee<pe.length;Ee++){var we=pe.charAt(Ee);/^[\u00-\uff]$/.test(we)?be+=1:be+=2}return be}Re.getStrBytesCount=fe},{"core-js/modules/es.regexp.exec.js":300}],63:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.object.to-string.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.isArray=void 0,Re.isArray=function(fe){return Object.prototype.toString.call(fe)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(ae,Ge,Re){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isBlob=void 0;function fe(pe){return typeof Blob!="undefined"&&pe instanceof Blob}Re.isBlob=fe},{}],65:[function(ae,Ge,Re){(function(fe){(function(){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isBuffer=void 0;function pe(be){return fe.isBuffer(be)}Re.isBuffer=pe}).call(this)}).call(this,{isBuffer:ae("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(ae,Ge,Re){(function(fe){(function(){"use strict";ae("core-js/modules/es.array.includes.js"),ae("core-js/modules/es.string.includes.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.isDingTalk=void 0;function pe(){return!!(fe.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}Re.isDingTalk=pe}).call(this)}).call(this,ae("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(ae,Ge,Re){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isFile=void 0,Re.isFile=function(fe){return typeof File!="undefined"&&fe instanceof File}},{}],68:[function(ae,Ge,Re){"use strict";Object.defineProperty(Re,"__esModule",{value:!0}),Re.isFunction=void 0,Re.isFunction=function(fe){return typeof fe=="function"}},{}],69:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.regexp.exec.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.isIP=void 0,Re.isIP=function(fe){var pe=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,be=/^\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 pe.test(fe)||be.test(fe)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.object.to-string.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.isObject=void 0,Re.isObject=function(fe){return Object.prototype.toString.call(fe)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.lowercaseKeyHeader=void 0;var fe=ae("./isObject");function pe(be){var Ee={};return fe.isObject(be)&&Object.keys(be).forEach(function(we){Ee[we.toLowerCase()]=be[we]}),Ee}Re.lowercaseKeyHeader=pe},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.array.join.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.obj2xml=void 0;var fe=ae("./formatObjKey");function pe(Ee){return Object.prototype.toString.call(Ee).replace(/(.*? |])/g,"").toLowerCase()}function be(Ee,we){var Te="";return we&&we.headers&&(Te=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),we&&we.firstUpperCase&&(Ee=fe.formatObjKey(Ee,"firstUpperCase")),pe(Ee)==="object"?Object.keys(Ee).forEach(function(ve){pe(Ee[ve])!=="undefined"&&pe(Ee[ve])!=="null"&&(pe(Ee[ve])==="string"||pe(Ee[ve])==="number"?Te+="<".concat(ve,">").concat(Ee[ve],"</").concat(ve,">"):pe(Ee[ve])==="object"?Te+="<".concat(ve,">").concat(be(Ee[ve]),"</").concat(ve,">"):pe(Ee[ve])==="array"?Te+=Ee[ve].map(function(Pe){return"<".concat(ve,">").concat(be(Pe),"</").concat(ve,">")}).join(""):Te+="<".concat(ve,">").concat(Ee[ve].toString(),"</").concat(ve,">"))}):Te+=Ee.toString(),Te}Re.obj2xml=be},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.array.from.js"),ae("core-js/modules/es.string.iterator.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.symbol.js"),ae("core-js/modules/es.symbol.description.js"),ae("core-js/modules/es.symbol.iterator.js"),ae("core-js/modules/es.array.iterator.js"),ae("core-js/modules/web.dom-collections.iterator.js"),ae("core-js/modules/es.object.assign.js");function fe(we,Te){var ve=typeof Symbol!="undefined"&&we[Symbol.iterator]||we["@@iterator"];if(!ve){if(Array.isArray(we)||(ve=pe(we))||Te&&we&&typeof we.length=="number"){ve&&(we=ve);var Pe=0,de=function(){};return{s:de,n:function(){return Pe>=we.length?{done:!0}:{done:!1,value:we[Pe++]}},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 ee=!0,z=!1,oe;return{s:function(){ve=ve.call(we)},n:function(){var le=ve.next();return ee=le.done,le},e:function(le){z=!0,oe=le},f:function(){try{!ee&&ve.return!=null&&ve.return()}finally{if(z)throw oe}}}}function pe(we,Te){if(we){if(typeof we=="string")return be(we,Te);var ve=Object.prototype.toString.call(we).slice(8,-1);if(ve==="Object"&&we.constructor&&(ve=we.constructor.name),ve==="Map"||ve==="Set")return Array.from(we);if(ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve))return be(we,Te)}}function be(we,Te){(Te==null||Te>we.length)&&(Te=we.length);for(var ve=0,Pe=new Array(Te);ve<Te;ve++)Pe[ve]=we[ve];return Pe}Object.defineProperty(Re,"__esModule",{value:!0}),Re.omit=void 0;function Ee(we,Te){var ve=Object.assign({},we),Pe=fe(Te),de;try{for(Pe.s();!(de=Pe.n()).done;){var ee=de.value;delete ve[ee]}}catch(z){Pe.e(z)}finally{Pe.f()}return ve}Re.omit=Ee},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),Object.defineProperty(Re,"__esModule",{value:!0}),Re.retry=void 0;function fe(pe,be){var Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},we=0,Te=Ee.retryDelay,ve=Te===void 0?500:Te,Pe=Ee.errorHandler,de=Pe===void 0?function(){return!0}:Pe,ee=function z(){for(var oe=arguments.length,ie=new Array(oe),le=0;le<oe;le++)ie[le]=arguments[le];return new Promise(function(ue,me){pe.apply(void 0,ie).then(function(xe){we=0,ue(xe)}).catch(function(xe){we<be&&de(xe)?(we++,setTimeout(function(){ue(z.apply(void 0,ie))},ve)):(we=0,me(xe))})})};return ee}Re.retry=fe},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(ae,Ge,Re){"use strict";var fe=function(we){return we&&we.__esModule?we:{default:we}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.setRegion=void 0;var pe=fe(ae("url")),be=ae("./checkConfigValid");function Ee(we){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;be.checkConfigValid(we,"region");var Pe=ve?"https://":"http://",de=Te?"-internal.aliyuncs.com":".aliyuncs.com",ee="vpc100-oss-cn-";return we.substr(0,ee.length)===ee&&(de=".aliyuncs.com"),pe.default.parse(Pe+we+de)}Re.setRegion=Ee},{"./checkConfigValid":52,url:472}],76:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/regenerator"));ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.array.find.js"),ae("core-js/modules/es.object.assign.js");var be=fe(ae("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(Re,"__esModule",{value:!0}),Re.checkCredentials=Re.setSTSToken=void 0;var Ee=ae("./formatObjKey");function we(){return Te.apply(this,arguments)}function Te(){return Te=(0,be.default)(pe.default.mark(function Pe(){var de,ee;return pe.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(this.options||(this.options={}),de=new Date,!this.stsTokenFreshTime){oe.next=14;break}if(!(+de-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){oe.next=12;break}return this.stsTokenFreshTime=de,oe.next=7,this.options.refreshSTSToken();case 7:ee=oe.sent,ee=Ee.formatObjKey(ee,"firstLowerCase"),ee.securityToken&&(ee.stsToken=ee.securityToken),ve(ee),Object.assign(this.options,ee);case 12:oe.next=15;break;case 14:this.stsTokenFreshTime=de;case 15:return oe.abrupt("return",null);case 16:case"end":return oe.stop()}},Pe,this)})),Te.apply(this,arguments)}Re.setSTSToken=we;function ve(Pe){var de=["accessKeySecret","accessKeyId","stsToken"],ee=Object.keys(Pe);de.forEach(function(z){if(!ee.find(function(oe){return oe===z}))throw Error("refreshSTSToken must return contains ".concat(z))})}Re.checkCredentials=ve},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(ae,Ge,Re){function fe(be,Ee,we,Te,ve,Pe,de){try{var ee=be[Pe](de),z=ee.value}catch(oe){we(oe);return}ee.done?Ee(z):Promise.resolve(z).then(Te,ve)}function pe(be){return function(){var Ee=this,we=arguments;return new Promise(function(Te,ve){var Pe=be.apply(Ee,we);function de(z){fe(Pe,Te,ve,de,ee,"next",z)}function ee(z){fe(Pe,Te,ve,de,ee,"throw",z)}de(void 0)})}}Ge.exports=pe,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],78:[function(ae,Ge,Re){function fe(pe){return pe&&pe.__esModule?pe:{default:pe}}Ge.exports=fe,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],79:[function(ae,Ge,Re){function fe(pe){"@babel/helpers - typeof";return Ge.exports=fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports,fe(pe)}Ge.exports=fe,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],80:[function(ae,Ge,Re){Ge.exports=ae("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(ae,Ge,Re){Ge.exports=fe,Ge.exports.HttpsAgent=fe;function fe(){}},{}],82:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=ae("object-assign");function be(at,ft){if(at===ft)return 0;for(var mt=at.length,Lt=ft.length,Xe=0,et=Math.min(mt,Lt);Xe<et;++Xe)if(at[Xe]!==ft[Xe]){mt=at[Xe],Lt=ft[Xe];break}return mt<Lt?-1:Lt<mt?1:0}function Ee(at){return fe.Buffer&&typeof fe.Buffer.isBuffer=="function"?fe.Buffer.isBuffer(at):!!(at!=null&&at._isBuffer)}var we=ae("util/"),Te=Object.prototype.hasOwnProperty,ve=Array.prototype.slice,Pe=function(){return function(){}.name==="foo"}();function de(at){return Object.prototype.toString.call(at)}function ee(at){return Ee(at)||typeof fe.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(at):at?!!(at instanceof DataView||at.buffer&&at.buffer instanceof ArrayBuffer):!1}var z=Ge.exports=Ae,oe=/\s*function\s+([^\(\s]*)\s*/;function ie(at){if(we.isFunction(at)){if(Pe)return at.name;var ft=at.toString(),mt=ft.match(oe);return mt&&mt[1]}}z.AssertionError=function(ft){this.name="AssertionError",this.actual=ft.actual,this.expected=ft.expected,this.operator=ft.operator,ft.message?(this.message=ft.message,this.generatedMessage=!1):(this.message=me(this),this.generatedMessage=!0);var mt=ft.stackStartFunction||xe;if(Error.captureStackTrace)Error.captureStackTrace(this,mt);else{var Lt=new Error;if(Lt.stack){var Xe=Lt.stack,et=ie(mt),lt=Xe.indexOf(`
|
|
`+et);if(lt>=0){var vt=Xe.indexOf(`
|
|
`,lt+1);Xe=Xe.substring(vt+1)}this.stack=Xe}}},we.inherits(z.AssertionError,Error);function le(at,ft){return typeof at=="string"?at.length<ft?at:at.slice(0,ft):at}function ue(at){if(Pe||!we.isFunction(at))return we.inspect(at);var ft=ie(at),mt=ft?": "+ft:"";return"[Function"+mt+"]"}function me(at){return le(ue(at.actual),128)+" "+at.operator+" "+le(ue(at.expected),128)}function xe(at,ft,mt,Lt,Xe){throw new z.AssertionError({message:mt,actual:at,expected:ft,operator:Lt,stackStartFunction:Xe})}z.fail=xe;function Ae(at,ft){at||xe(at,!0,ft,"==",z.ok)}z.ok=Ae,z.equal=function(ft,mt,Lt){ft!=mt&&xe(ft,mt,Lt,"==",z.equal)},z.notEqual=function(ft,mt,Lt){ft==mt&&xe(ft,mt,Lt,"!=",z.notEqual)},z.deepEqual=function(ft,mt,Lt){De(ft,mt,!1)||xe(ft,mt,Lt,"deepEqual",z.deepEqual)},z.deepStrictEqual=function(ft,mt,Lt){De(ft,mt,!0)||xe(ft,mt,Lt,"deepStrictEqual",z.deepStrictEqual)};function De(at,ft,mt,Lt){if(at===ft)return!0;if(Ee(at)&&Ee(ft))return be(at,ft)===0;if(we.isDate(at)&&we.isDate(ft))return at.getTime()===ft.getTime();if(we.isRegExp(at)&&we.isRegExp(ft))return at.source===ft.source&&at.global===ft.global&&at.multiline===ft.multiline&&at.lastIndex===ft.lastIndex&&at.ignoreCase===ft.ignoreCase;if((at===null||typeof at!="object")&&(ft===null||typeof ft!="object"))return mt?at===ft:at==ft;if(ee(at)&&ee(ft)&&de(at)===de(ft)&&!(at instanceof Float32Array||at instanceof Float64Array))return be(new Uint8Array(at.buffer),new Uint8Array(ft.buffer))===0;if(Ee(at)!==Ee(ft))return!1;Lt=Lt||{actual:[],expected:[]};var Xe=Lt.actual.indexOf(at);return Xe!==-1&&Xe===Lt.expected.indexOf(ft)?!0:(Lt.actual.push(at),Lt.expected.push(ft),je(at,ft,mt,Lt))}function Fe(at){return Object.prototype.toString.call(at)=="[object Arguments]"}function je(at,ft,mt,Lt){if(at==null||ft===null||ft===void 0)return!1;if(we.isPrimitive(at)||we.isPrimitive(ft))return at===ft;if(mt&&Object.getPrototypeOf(at)!==Object.getPrototypeOf(ft))return!1;var Xe=Fe(at),et=Fe(ft);if(Xe&&!et||!Xe&&et)return!1;if(Xe)return at=ve.call(at),ft=ve.call(ft),De(at,ft,mt);var lt=We(at),vt=We(ft),wt,ht;if(lt.length!==vt.length)return!1;for(lt.sort(),vt.sort(),ht=lt.length-1;ht>=0;ht--)if(lt[ht]!==vt[ht])return!1;for(ht=lt.length-1;ht>=0;ht--)if(wt=lt[ht],!De(at[wt],ft[wt],mt,Lt))return!1;return!0}z.notDeepEqual=function(ft,mt,Lt){De(ft,mt,!1)&&xe(ft,mt,Lt,"notDeepEqual",z.notDeepEqual)},z.notDeepStrictEqual=Le;function Le(at,ft,mt){De(at,ft,!0)&&xe(at,ft,mt,"notDeepStrictEqual",Le)}z.strictEqual=function(ft,mt,Lt){ft!==mt&&xe(ft,mt,Lt,"===",z.strictEqual)},z.notStrictEqual=function(ft,mt,Lt){ft===mt&&xe(ft,mt,Lt,"!==",z.notStrictEqual)};function Be(at,ft){if(!at||!ft)return!1;if(Object.prototype.toString.call(ft)=="[object RegExp]")return ft.test(at);try{if(at instanceof ft)return!0}catch(mt){}return Error.isPrototypeOf(ft)?!1:ft.call({},at)===!0}function Ue(at){var ft;try{at()}catch(mt){ft=mt}return ft}function Je(at,ft,mt,Lt){var Xe;if(typeof ft!="function")throw new TypeError('"block" argument must be a function');typeof mt=="string"&&(Lt=mt,mt=null),Xe=Ue(ft),Lt=(mt&&mt.name?" ("+mt.name+").":".")+(Lt?" "+Lt:"."),at&&!Xe&&xe(Xe,mt,"Missing expected exception"+Lt);var et=typeof Lt=="string",lt=!at&&we.isError(Xe),vt=!at&&Xe&&!mt;if((lt&&et&&Be(Xe,mt)||vt)&&xe(Xe,mt,"Got unwanted exception"+Lt),at&&Xe&&mt&&!Be(Xe,mt)||!at&&Xe)throw Xe}z.throws=function(at,ft,mt){Je(!0,at,ft,mt)},z.doesNotThrow=function(at,ft,mt){Je(!1,at,ft,mt)},z.ifError=function(at){if(at)throw at};function He(at,ft){at||xe(at,!0,ft,"==",He)}z.strict=pe(He,z,{equal:z.strictEqual,deepEqual:z.deepStrictEqual,notEqual:z.notStrictEqual,notDeepEqual:z.notDeepStrictEqual}),z.strict.strict=z.strict;var We=Object.keys||function(at){var ft=[];for(var mt in at)Te.call(at,mt)&&ft.push(mt);return ft}}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(ae,Ge,Re){typeof Object.create=="function"?Ge.exports=function(pe,be){pe.super_=be,pe.prototype=Object.create(be.prototype,{constructor:{value:pe,enumerable:!1,writable:!0,configurable:!0}})}:Ge.exports=function(pe,be){pe.super_=be;var Ee=function(){};Ee.prototype=be.prototype,pe.prototype=new Ee,pe.prototype.constructor=pe}},{}],84:[function(ae,Ge,Re){Ge.exports=function(pe){return pe&&typeof pe=="object"&&typeof pe.copy=="function"&&typeof pe.fill=="function"&&typeof pe.readUInt8=="function"}},{}],85:[function(ae,Ge,Re){(function(fe,pe){(function(){var be=/%[sdj%]/g;Re.format=function(vt){if(!je(vt)){for(var wt=[],ht=0;ht<arguments.length;ht++)wt.push(Te(arguments[ht]));return wt.join(" ")}for(var ht=1,dt=arguments,ut=dt.length,Pt=String(vt).replace(be,function(gt){if(gt==="%%")return"%";if(ht>=ut)return gt;switch(gt){case"%s":return String(dt[ht++]);case"%d":return Number(dt[ht++]);case"%j":try{return JSON.stringify(dt[ht++])}catch(Tt){return"[Circular]"}default:return gt}}),yt=dt[ht];ht<ut;yt=dt[++ht])Ae(yt)||!Je(yt)?Pt+=" "+yt:Pt+=" "+Te(yt);return Pt},Re.deprecate=function(vt,wt){if(Be(pe.process))return function(){return Re.deprecate(vt,wt).apply(this,arguments)};if(fe.noDeprecation===!0)return vt;var ht=!1;function dt(){if(!ht){if(fe.throwDeprecation)throw new Error(wt);fe.traceDeprecation?console.trace(wt):console.error(wt),ht=!0}return vt.apply(this,arguments)}return dt};var Ee={},we;Re.debuglog=function(vt){if(Be(we)&&(we=fe.env.NODE_DEBUG||""),vt=vt.toUpperCase(),!Ee[vt])if(new RegExp("\\b"+vt+"\\b","i").test(we)){var wt=fe.pid;Ee[vt]=function(){var ht=Re.format.apply(Re,arguments);console.error("%s %d: %s",vt,wt,ht)}}else Ee[vt]=function(){};return Ee[vt]};function Te(vt,wt){var ht={seen:[],stylize:Pe};return arguments.length>=3&&(ht.depth=arguments[2]),arguments.length>=4&&(ht.colors=arguments[3]),xe(wt)?ht.showHidden=wt:wt&&Re._extend(ht,wt),Be(ht.showHidden)&&(ht.showHidden=!1),Be(ht.depth)&&(ht.depth=2),Be(ht.colors)&&(ht.colors=!1),Be(ht.customInspect)&&(ht.customInspect=!0),ht.colors&&(ht.stylize=ve),ee(ht,vt,ht.depth)}Re.inspect=Te,Te.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Te.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ve(vt,wt){var ht=Te.styles[wt];return ht?"\x1B["+Te.colors[ht][0]+"m"+vt+"\x1B["+Te.colors[ht][1]+"m":vt}function Pe(vt,wt){return vt}function de(vt){var wt={};return vt.forEach(function(ht,dt){wt[ht]=!0}),wt}function ee(vt,wt,ht){if(vt.customInspect&&wt&&at(wt.inspect)&&wt.inspect!==Re.inspect&&!(wt.constructor&&wt.constructor.prototype===wt)){var dt=wt.inspect(ht,vt);return je(dt)||(dt=ee(vt,dt,ht)),dt}var ut=z(vt,wt);if(ut)return ut;var Pt=Object.keys(wt),yt=de(Pt);if(vt.showHidden&&(Pt=Object.getOwnPropertyNames(wt)),We(wt)&&(Pt.indexOf("message")>=0||Pt.indexOf("description")>=0))return oe(wt);if(Pt.length===0){if(at(wt)){var gt=wt.name?": "+wt.name:"";return vt.stylize("[Function"+gt+"]","special")}if(Ue(wt))return vt.stylize(RegExp.prototype.toString.call(wt),"regexp");if(He(wt))return vt.stylize(Date.prototype.toString.call(wt),"date");if(We(wt))return oe(wt)}var Tt="",ct=!1,Ye=["{","}"];if(me(wt)&&(ct=!0,Ye=["[","]"]),at(wt)){var Ze=wt.name?": "+wt.name:"";Tt=" [Function"+Ze+"]"}if(Ue(wt)&&(Tt=" "+RegExp.prototype.toString.call(wt)),He(wt)&&(Tt=" "+Date.prototype.toUTCString.call(wt)),We(wt)&&(Tt=" "+oe(wt)),Pt.length===0&&(!ct||wt.length==0))return Ye[0]+Tt+Ye[1];if(ht<0)return Ue(wt)?vt.stylize(RegExp.prototype.toString.call(wt),"regexp"):vt.stylize("[Object]","special");vt.seen.push(wt);var Se;return ct?Se=ie(vt,wt,ht,yt,Pt):Se=Pt.map(function(Ne){return le(vt,wt,ht,yt,Ne,ct)}),vt.seen.pop(),ue(Se,Tt,Ye)}function z(vt,wt){if(Be(wt))return vt.stylize("undefined","undefined");if(je(wt)){var ht="'"+JSON.stringify(wt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return vt.stylize(ht,"string")}if(Fe(wt))return vt.stylize(""+wt,"number");if(xe(wt))return vt.stylize(""+wt,"boolean");if(Ae(wt))return vt.stylize("null","null")}function oe(vt){return"["+Error.prototype.toString.call(vt)+"]"}function ie(vt,wt,ht,dt,ut){for(var Pt=[],yt=0,gt=wt.length;yt<gt;++yt)lt(wt,String(yt))?Pt.push(le(vt,wt,ht,dt,String(yt),!0)):Pt.push("");return ut.forEach(function(Tt){Tt.match(/^\d+$/)||Pt.push(le(vt,wt,ht,dt,Tt,!0))}),Pt}function le(vt,wt,ht,dt,ut,Pt){var yt,gt,Tt;if(Tt=Object.getOwnPropertyDescriptor(wt,ut)||{value:wt[ut]},Tt.get?Tt.set?gt=vt.stylize("[Getter/Setter]","special"):gt=vt.stylize("[Getter]","special"):Tt.set&&(gt=vt.stylize("[Setter]","special")),lt(dt,ut)||(yt="["+ut+"]"),gt||(vt.seen.indexOf(Tt.value)<0?(Ae(ht)?gt=ee(vt,Tt.value,null):gt=ee(vt,Tt.value,ht-1),gt.indexOf(`
|
|
`)>-1&&(Pt?gt=gt.split(`
|
|
`).map(function(ct){return" "+ct}).join(`
|
|
`).substr(2):gt=`
|
|
`+gt.split(`
|
|
`).map(function(ct){return" "+ct}).join(`
|
|
`))):gt=vt.stylize("[Circular]","special")),Be(yt)){if(Pt&&ut.match(/^\d+$/))return gt;yt=JSON.stringify(""+ut),yt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(yt=yt.substr(1,yt.length-2),yt=vt.stylize(yt,"name")):(yt=yt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),yt=vt.stylize(yt,"string"))}return yt+": "+gt}function ue(vt,wt,ht){var dt=0,ut=vt.reduce(function(Pt,yt){return dt++,yt.indexOf(`
|
|
`)>=0&&dt++,Pt+yt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ut>60?ht[0]+(wt===""?"":wt+`
|
|
`)+" "+vt.join(`,
|
|
`)+" "+ht[1]:ht[0]+wt+" "+vt.join(", ")+" "+ht[1]}function me(vt){return Array.isArray(vt)}Re.isArray=me;function xe(vt){return typeof vt=="boolean"}Re.isBoolean=xe;function Ae(vt){return vt===null}Re.isNull=Ae;function De(vt){return vt==null}Re.isNullOrUndefined=De;function Fe(vt){return typeof vt=="number"}Re.isNumber=Fe;function je(vt){return typeof vt=="string"}Re.isString=je;function Le(vt){return typeof vt=="symbol"}Re.isSymbol=Le;function Be(vt){return vt===void 0}Re.isUndefined=Be;function Ue(vt){return Je(vt)&&mt(vt)==="[object RegExp]"}Re.isRegExp=Ue;function Je(vt){return typeof vt=="object"&&vt!==null}Re.isObject=Je;function He(vt){return Je(vt)&&mt(vt)==="[object Date]"}Re.isDate=He;function We(vt){return Je(vt)&&(mt(vt)==="[object Error]"||vt instanceof Error)}Re.isError=We;function at(vt){return typeof vt=="function"}Re.isFunction=at;function ft(vt){return vt===null||typeof vt=="boolean"||typeof vt=="number"||typeof vt=="string"||typeof vt=="symbol"||typeof vt=="undefined"}Re.isPrimitive=ft,Re.isBuffer=ae("./support/isBuffer");function mt(vt){return Object.prototype.toString.call(vt)}function Lt(vt){return vt<10?"0"+vt.toString(10):vt.toString(10)}var Xe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function et(){var vt=new Date,wt=[Lt(vt.getHours()),Lt(vt.getMinutes()),Lt(vt.getSeconds())].join(":");return[vt.getDate(),Xe[vt.getMonth()],wt].join(" ")}Re.log=function(){console.log("%s - %s",et(),Re.format.apply(Re,arguments))},Re.inherits=ae("inherits"),Re._extend=function(vt,wt){if(!wt||!Je(wt))return vt;for(var ht=Object.keys(wt),dt=ht.length;dt--;)vt[ht[dt]]=wt[ht[dt]];return vt};function lt(vt,wt){return Object.prototype.hasOwnProperty.call(vt,wt)}}).call(this)}).call(this,ae("_process"),typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],be=typeof globalThis=="undefined"?fe:globalThis;Ge.exports=function(){for(var we=[],Te=0;Te<pe.length;Te++)typeof be[pe[Te]]=="function"&&(we[we.length]=pe[Te]);return we}}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(ae,Ge,Re){"use strict";Re.byteLength=Pe,Re.toByteArray=ee,Re.fromByteArray=ie;for(var fe=[],pe=[],be=typeof Uint8Array!="undefined"?Uint8Array:Array,Ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",we=0,Te=Ee.length;we<Te;++we)fe[we]=Ee[we],pe[Ee.charCodeAt(we)]=we;pe[45]=62,pe[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 me=le.indexOf("=");me===-1&&(me=ue);var xe=me===ue?0:4-me%4;return[me,xe]}function Pe(le){var ue=ve(le),me=ue[0],xe=ue[1];return(me+xe)*3/4-xe}function de(le,ue,me){return(ue+me)*3/4-me}function ee(le){var ue,me=ve(le),xe=me[0],Ae=me[1],De=new be(de(le,xe,Ae)),Fe=0,je=Ae>0?xe-4:xe,Le;for(Le=0;Le<je;Le+=4)ue=pe[le.charCodeAt(Le)]<<18|pe[le.charCodeAt(Le+1)]<<12|pe[le.charCodeAt(Le+2)]<<6|pe[le.charCodeAt(Le+3)],De[Fe++]=ue>>16&255,De[Fe++]=ue>>8&255,De[Fe++]=ue&255;return Ae===2&&(ue=pe[le.charCodeAt(Le)]<<2|pe[le.charCodeAt(Le+1)]>>4,De[Fe++]=ue&255),Ae===1&&(ue=pe[le.charCodeAt(Le)]<<10|pe[le.charCodeAt(Le+1)]<<4|pe[le.charCodeAt(Le+2)]>>2,De[Fe++]=ue>>8&255,De[Fe++]=ue&255),De}function z(le){return fe[le>>18&63]+fe[le>>12&63]+fe[le>>6&63]+fe[le&63]}function oe(le,ue,me){for(var xe,Ae=[],De=ue;De<me;De+=3)xe=(le[De]<<16&16711680)+(le[De+1]<<8&65280)+(le[De+2]&255),Ae.push(z(xe));return Ae.join("")}function ie(le){for(var ue,me=le.length,xe=me%3,Ae=[],De=16383,Fe=0,je=me-xe;Fe<je;Fe+=De)Ae.push(oe(le,Fe,Fe+De>je?je:Fe+De));return xe===1?(ue=le[me-1],Ae.push(fe[ue>>2]+fe[ue<<4&63]+"==")):xe===2&&(ue=(le[me-2]<<8)+le[me-1],Ae.push(fe[ue>>10]+fe[ue>>4&63]+fe[ue<<2&63]+"=")),Ae.join("")}},{}],88:[function(ae,Ge,Re){(function(fe,pe,be){typeof Ge!="undefined"&&Ge.exports?Ge.exports=be():typeof ot=="function"&&ot.amd?ot(pe,be):fe[pe]=be()})(this,"bowser",function(){var fe=!0;function pe(de){function ee(wt){var ht=de.match(wt);return ht&&ht.length>1&&ht[1]||""}function z(wt){var ht=de.match(wt);return ht&&ht.length>1&&ht[2]||""}var oe=ee(/(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),me=!ue&&/nexus\s*[0-9]+/i.test(de),xe=/CrOS/.test(de),Ae=/silk/i.test(de),De=/sailfish/i.test(de),Fe=/tizen/i.test(de),je=/(web|hpw)(o|0)s/i.test(de),Le=/windows phone/i.test(de),Be=/SamsungBrowser/i.test(de),Ue=!Le&&/windows/i.test(de),Je=!oe&&!Ae&&/macintosh/i.test(de),He=!le&&!De&&!Fe&&!je&&/linux/i.test(de),We=z(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),at=ee(/version\/(\d+(\.\d+)?)/i),ft=/tablet/i.test(de)&&!/tablet pc/i.test(de),mt=!ft&&/[^-]mobi/i.test(de),Lt=/xbox/i.test(de),Xe;/opera/i.test(de)?Xe={name:"Opera",opera:fe,version:at||ee(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(de)?Xe={name:"Opera",opera:fe,version:ee(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||at}:/SamsungBrowser/i.test(de)?Xe={name:"Samsung Internet for Android",samsungBrowser:fe,version:at||ee(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(de)?Xe={name:"NAVER Whale browser",whale:fe,version:ee(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(de)?Xe={name:"MZ Browser",mzbrowser:fe,version:ee(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(de)?Xe={name:"Opera Coast",coast:fe,version:at||ee(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(de)?Xe={name:"Focus",focus:fe,version:ee(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(de)?Xe={name:"Yandex Browser",yandexbrowser:fe,version:at||ee(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(de)?Xe={name:"UC Browser",ucbrowser:fe,version:ee(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(de)?Xe={name:"Maxthon",maxthon:fe,version:ee(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(de)?Xe={name:"Epiphany",epiphany:fe,version:ee(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(de)?Xe={name:"Puffin",puffin:fe,version:ee(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(de)?Xe={name:"Sleipnir",sleipnir:fe,version:ee(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(de)?Xe={name:"K-Meleon",kMeleon:fe,version:ee(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Le?(Xe={name:"Windows Phone",osname:"Windows Phone",windowsphone:fe},We?(Xe.msedge=fe,Xe.version=We):(Xe.msie=fe,Xe.version=ee(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(de)?Xe={name:"Internet Explorer",msie:fe,version:ee(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:xe?Xe={name:"Chrome",osname:"Chrome OS",chromeos:fe,chromeBook:fe,chrome:fe,version:ee(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(de)?Xe={name:"Microsoft Edge",msedge:fe,version:We}:/vivaldi/i.test(de)?Xe={name:"Vivaldi",vivaldi:fe,version:ee(/vivaldi\/(\d+(\.\d+)?)/i)||at}:De?Xe={name:"Sailfish",osname:"Sailfish OS",sailfish:fe,version:ee(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(de)?Xe={name:"SeaMonkey",seamonkey:fe,version:ee(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(de)?(Xe={name:"Firefox",firefox:fe,version:ee(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(de)&&(Xe.firefoxos=fe,Xe.osname="Firefox OS")):Ae?Xe={name:"Amazon Silk",silk:fe,version:ee(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(de)?Xe={name:"PhantomJS",phantom:fe,version:ee(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(de)?Xe={name:"SlimerJS",slimer:fe,version:ee(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(de)||/rim\stablet/i.test(de)?Xe={name:"BlackBerry",osname:"BlackBerry OS",blackberry:fe,version:at||ee(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:je?(Xe={name:"WebOS",osname:"WebOS",webos:fe,version:at||ee(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(de)&&(Xe.touchpad=fe)):/bada/i.test(de)?Xe={name:"Bada",osname:"Bada",bada:fe,version:ee(/dolfin\/(\d+(\.\d+)?)/i)}:Fe?Xe={name:"Tizen",osname:"Tizen",tizen:fe,version:ee(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||at}:/qupzilla/i.test(de)?Xe={name:"QupZilla",qupzilla:fe,version:ee(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||at}:/chromium/i.test(de)?Xe={name:"Chromium",chromium:fe,version:ee(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||at}:/chrome|crios|crmo/i.test(de)?Xe={name:"Chrome",chrome:fe,version:ee(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?Xe={name:"Android",version:at}:/safari|applewebkit/i.test(de)?(Xe={name:"Safari",safari:fe},at&&(Xe.version=at)):oe?(Xe={name:oe=="iphone"?"iPhone":oe=="ipad"?"iPad":"iPod"},at&&(Xe.version=at)):/googlebot/i.test(de)?Xe={name:"Googlebot",googlebot:fe,version:ee(/googlebot\/(\d+(\.\d+))/i)||at}:Xe={name:ee(/^(.*)\/(.*) /),version:z(/^(.*)\/(.*) /)},!Xe.msedge&&/(apple)?webkit/i.test(de)?(/(apple)?webkit\/537\.36/i.test(de)?(Xe.name=Xe.name||"Blink",Xe.blink=fe):(Xe.name=Xe.name||"Webkit",Xe.webkit=fe),!Xe.version&&at&&(Xe.version=at)):!Xe.opera&&/gecko\//i.test(de)&&(Xe.name=Xe.name||"Gecko",Xe.gecko=fe,Xe.version=Xe.version||ee(/gecko\/(\d+(\.\d+)?)/i)),!Xe.windowsphone&&(le||Xe.silk)?(Xe.android=fe,Xe.osname="Android"):!Xe.windowsphone&&oe?(Xe[oe]=fe,Xe.ios=fe,Xe.osname="iOS"):Je?(Xe.mac=fe,Xe.osname="macOS"):Lt?(Xe.xbox=fe,Xe.osname="Xbox"):Ue?(Xe.windows=fe,Xe.osname="Windows"):He&&(Xe.linux=fe,Xe.osname="Linux");function et(wt){switch(wt){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var lt="";Xe.windows?lt=et(ee(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Xe.windowsphone?lt=ee(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Xe.mac?(lt=ee(/Mac OS X (\d+([_\.\s]\d+)*)/i),lt=lt.replace(/[_\s]/g,".")):oe?(lt=ee(/os (\d+([_\s]\d+)*) like mac os x/i),lt=lt.replace(/[_\s]/g,".")):le?lt=ee(/android[ \/-](\d+(\.\d+)*)/i):Xe.webos?lt=ee(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Xe.blackberry?lt=ee(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Xe.bada?lt=ee(/bada\/(\d+(\.\d+)*)/i):Xe.tizen&&(lt=ee(/tizen[\/\s](\d+(\.\d+)*)/i)),lt&&(Xe.osversion=lt);var vt=!Xe.windows&<.split(".")[0];return ft||me||oe=="ipad"||le&&(vt==3||vt>=4&&!mt)||Xe.silk?Xe.tablet=fe:(mt||oe=="iphone"||oe=="ipod"||le||ue||Xe.blackberry||Xe.webos||Xe.bada)&&(Xe.mobile=fe),Xe.msedge||Xe.msie&&Xe.version>=10||Xe.yandexbrowser&&Xe.version>=15||Xe.vivaldi&&Xe.version>=1||Xe.chrome&&Xe.version>=20||Xe.samsungBrowser&&Xe.version>=4||Xe.whale&&Te([Xe.version,"1.0"])===1||Xe.mzbrowser&&Te([Xe.version,"6.0"])===1||Xe.focus&&Te([Xe.version,"1.0"])===1||Xe.firefox&&Xe.version>=20||Xe.safari&&Xe.version>=6||Xe.opera&&Xe.version>=10||Xe.ios&&Xe.osversion&&Xe.osversion.split(".")[0]>=6||Xe.blackberry&&Xe.version>=10.1||Xe.chromium&&Xe.version>=20?Xe.a=fe:Xe.msie&&Xe.version<10||Xe.chrome&&Xe.version<20||Xe.firefox&&Xe.version<20||Xe.safari&&Xe.version<6||Xe.opera&&Xe.version<10||Xe.ios&&Xe.osversion&&Xe.osversion.split(".")[0]<6||Xe.chromium&&Xe.version<20?Xe.c=fe:Xe.x=fe,Xe}var be=pe(typeof navigator!="undefined"&&navigator.userAgent||"");be.test=function(de){for(var ee=0;ee<de.length;++ee){var z=de[ee];if(typeof z=="string"&&z in be)return!0}return!1};function Ee(de){return de.split(".").length}function we(de,ee){var z=[],oe;if(Array.prototype.map)return Array.prototype.map.call(de,ee);for(oe=0;oe<de.length;oe++)z.push(ee(de[oe]));return z}function Te(de){for(var ee=Math.max(Ee(de[0]),Ee(de[1])),z=we(de,function(oe){var ie=ee-Ee(oe);return oe=oe+new Array(ie+1).join(".0"),we(oe.split("."),function(le){return new Array(20-le.length).join("0")+le}).reverse()});--ee>=0;){if(z[0][ee]>z[1][ee])return 1;if(z[0][ee]===z[1][ee]){if(ee===0)return 0}else return-1}}function ve(de,ee,z){var oe=be;typeof ee=="string"&&(z=ee,ee=void 0),ee===void 0&&(ee=!1),z&&(oe=pe(z));var ie=""+oe.version;for(var le in de)if(de.hasOwnProperty(le)&&oe[le]){if(typeof de[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(de));return Te([ie,de[le]])<0}return ee}function Pe(de,ee,z){return!ve(de,ee,z)}return be.isUnsupportedBrowser=ve,be.compareVersions=Te,be.check=Pe,be._detect=pe,be.detect=pe,be})},{}],89:[function(ae,Ge,Re){},{}],90:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=ae("base64-js"),be=ae("ieee754");Re.Buffer=ve,Re.SlowBuffer=xe,Re.INSPECT_MAX_BYTES=50;var Ee=2147483647;Re.kMaxLength=Ee,ve.TYPED_ARRAY_SUPPORT=we(),!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 we(){try{var ze=new Uint8Array(1);return ze.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ze.foo()===42}catch(Ve){return!1}}Object.defineProperty(ve.prototype,"parent",{enumerable:!0,get:function(){if(ve.isBuffer(this))return this.buffer}}),Object.defineProperty(ve.prototype,"offset",{enumerable:!0,get:function(){if(ve.isBuffer(this))return this.byteOffset}});function Te(ze){if(ze>Ee)throw new RangeError('The value "'+ze+'" is invalid for option "size"');var Ve=new Uint8Array(ze);return Ve.__proto__=ve.prototype,Ve}function ve(ze,Ve,it){if(typeof ze=="number"){if(typeof Ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return z(ze)}return Pe(ze,Ve,it)}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 Pe(ze,Ve,it){if(typeof ze=="string")return oe(ze,Ve);if(ArrayBuffer.isView(ze))return ie(ze);if(ze==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ze);if(nt(ze,ArrayBuffer)||ze&&nt(ze.buffer,ArrayBuffer))return le(ze,Ve,it);if(typeof ze=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var St=ze.valueOf&&ze.valueOf();if(St!=null&&St!==ze)return ve.from(St,Ve,it);var Ct=ue(ze);if(Ct)return Ct;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof ze[Symbol.toPrimitive]=="function")return ve.from(ze[Symbol.toPrimitive]("string"),Ve,it);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ze)}ve.from=function(ze,Ve,it){return Pe(ze,Ve,it)},ve.prototype.__proto__=Uint8Array.prototype,ve.__proto__=Uint8Array;function de(ze){if(typeof ze!="number")throw new TypeError('"size" argument must be of type number');if(ze<0)throw new RangeError('The value "'+ze+'" is invalid for option "size"')}function ee(ze,Ve,it){return de(ze),ze<=0?Te(ze):Ve!==void 0?typeof it=="string"?Te(ze).fill(Ve,it):Te(ze).fill(Ve):Te(ze)}ve.alloc=function(ze,Ve,it){return ee(ze,Ve,it)};function z(ze){return de(ze),Te(ze<0?0:me(ze)|0)}ve.allocUnsafe=function(ze){return z(ze)},ve.allocUnsafeSlow=function(ze){return z(ze)};function oe(ze,Ve){if((typeof Ve!="string"||Ve==="")&&(Ve="utf8"),!ve.isEncoding(Ve))throw new TypeError("Unknown encoding: "+Ve);var it=Ae(ze,Ve)|0,St=Te(it),Ct=St.write(ze,Ve);return Ct!==it&&(St=St.slice(0,Ct)),St}function ie(ze){for(var Ve=ze.length<0?0:me(ze.length)|0,it=Te(Ve),St=0;St<Ve;St+=1)it[St]=ze[St]&255;return it}function le(ze,Ve,it){if(Ve<0||ze.byteLength<Ve)throw new RangeError('"offset" is outside of buffer bounds');if(ze.byteLength<Ve+(it||0))throw new RangeError('"length" is outside of buffer bounds');var St;return Ve===void 0&&it===void 0?St=new Uint8Array(ze):it===void 0?St=new Uint8Array(ze,Ve):St=new Uint8Array(ze,Ve,it),St.__proto__=ve.prototype,St}function ue(ze){if(ve.isBuffer(ze)){var Ve=me(ze.length)|0,it=Te(Ve);return it.length===0||ze.copy(it,0,0,Ve),it}if(ze.length!==void 0)return typeof ze.length!="number"||Ie(ze.length)?Te(0):ie(ze);if(ze.type==="Buffer"&&Array.isArray(ze.data))return ie(ze.data)}function me(ze){if(ze>=Ee)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ee.toString(16)+" bytes");return ze|0}function xe(ze){return+ze!=ze&&(ze=0),ve.alloc(+ze)}ve.isBuffer=function(Ve){return Ve!=null&&Ve._isBuffer===!0&&Ve!==ve.prototype},ve.compare=function(Ve,it){if(nt(Ve,Uint8Array)&&(Ve=ve.from(Ve,Ve.offset,Ve.byteLength)),nt(it,Uint8Array)&&(it=ve.from(it,it.offset,it.byteLength)),!ve.isBuffer(Ve)||!ve.isBuffer(it))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ve===it)return 0;for(var St=Ve.length,Ct=it.length,It=0,jt=Math.min(St,Ct);It<jt;++It)if(Ve[It]!==it[It]){St=Ve[It],Ct=it[It];break}return St<Ct?-1:Ct<St?1:0},ve.isEncoding=function(Ve){switch(String(Ve).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(Ve,it){if(!Array.isArray(Ve))throw new TypeError('"list" argument must be an Array of Buffers');if(Ve.length===0)return ve.alloc(0);var St;if(it===void 0)for(it=0,St=0;St<Ve.length;++St)it+=Ve[St].length;var Ct=ve.allocUnsafe(it),It=0;for(St=0;St<Ve.length;++St){var jt=Ve[St];if(nt(jt,Uint8Array)&&(jt=ve.from(jt)),!ve.isBuffer(jt))throw new TypeError('"list" argument must be an Array of Buffers');jt.copy(Ct,It),It+=jt.length}return Ct};function Ae(ze,Ve){if(ve.isBuffer(ze))return ze.length;if(ArrayBuffer.isView(ze)||nt(ze,ArrayBuffer))return ze.byteLength;if(typeof ze!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ze);var it=ze.length,St=arguments.length>2&&arguments[2]===!0;if(!St&&it===0)return 0;for(var Ct=!1;;)switch(Ve){case"ascii":case"latin1":case"binary":return it;case"utf8":case"utf-8":return Ye(ze).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return it*2;case"hex":return it>>>1;case"base64":return Ne(ze).length;default:if(Ct)return St?-1:Ye(ze).length;Ve=(""+Ve).toLowerCase(),Ct=!0}}ve.byteLength=Ae;function De(ze,Ve,it){var St=!1;if((Ve===void 0||Ve<0)&&(Ve=0),Ve>this.length||((it===void 0||it>this.length)&&(it=this.length),it<=0)||(it>>>=0,Ve>>>=0,it<=Ve))return"";for(ze||(ze="utf8");;)switch(ze){case"hex":return vt(this,Ve,it);case"utf8":case"utf-8":return mt(this,Ve,it);case"ascii":return et(this,Ve,it);case"latin1":case"binary":return lt(this,Ve,it);case"base64":return ft(this,Ve,it);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wt(this,Ve,it);default:if(St)throw new TypeError("Unknown encoding: "+ze);ze=(ze+"").toLowerCase(),St=!0}}ve.prototype._isBuffer=!0;function Fe(ze,Ve,it){var St=ze[Ve];ze[Ve]=ze[it],ze[it]=St}ve.prototype.swap16=function(){var Ve=this.length;if(Ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var it=0;it<Ve;it+=2)Fe(this,it,it+1);return this},ve.prototype.swap32=function(){var Ve=this.length;if(Ve%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var it=0;it<Ve;it+=4)Fe(this,it,it+3),Fe(this,it+1,it+2);return this},ve.prototype.swap64=function(){var Ve=this.length;if(Ve%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var it=0;it<Ve;it+=8)Fe(this,it,it+7),Fe(this,it+1,it+6),Fe(this,it+2,it+5),Fe(this,it+3,it+4);return this},ve.prototype.toString=function(){var Ve=this.length;return Ve===0?"":arguments.length===0?mt(this,0,Ve):De.apply(this,arguments)},ve.prototype.toLocaleString=ve.prototype.toString,ve.prototype.equals=function(Ve){if(!ve.isBuffer(Ve))throw new TypeError("Argument must be a Buffer");return this===Ve?!0:ve.compare(this,Ve)===0},ve.prototype.inspect=function(){var Ve="",it=Re.INSPECT_MAX_BYTES;return Ve=this.toString("hex",0,it).replace(/(.{2})/g,"$1 ").trim(),this.length>it&&(Ve+=" ... "),"<Buffer "+Ve+">"},ve.prototype.compare=function(Ve,it,St,Ct,It){if(nt(Ve,Uint8Array)&&(Ve=ve.from(Ve,Ve.offset,Ve.byteLength)),!ve.isBuffer(Ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ve);if(it===void 0&&(it=0),St===void 0&&(St=Ve?Ve.length:0),Ct===void 0&&(Ct=0),It===void 0&&(It=this.length),it<0||St>Ve.length||Ct<0||It>this.length)throw new RangeError("out of range index");if(Ct>=It&&it>=St)return 0;if(Ct>=It)return-1;if(it>=St)return 1;if(it>>>=0,St>>>=0,Ct>>>=0,It>>>=0,this===Ve)return 0;for(var jt=It-Ct,Kt=St-it,an=Math.min(jt,Kt),un=this.slice(Ct,It),hn=Ve.slice(it,St),qt=0;qt<an;++qt)if(un[qt]!==hn[qt]){jt=un[qt],Kt=hn[qt];break}return jt<Kt?-1:Kt<jt?1:0};function je(ze,Ve,it,St,Ct){if(ze.length===0)return-1;if(typeof it=="string"?(St=it,it=0):it>2147483647?it=2147483647:it<-2147483648&&(it=-2147483648),it=+it,Ie(it)&&(it=Ct?0:ze.length-1),it<0&&(it=ze.length+it),it>=ze.length){if(Ct)return-1;it=ze.length-1}else if(it<0)if(Ct)it=0;else return-1;if(typeof Ve=="string"&&(Ve=ve.from(Ve,St)),ve.isBuffer(Ve))return Ve.length===0?-1:Le(ze,Ve,it,St,Ct);if(typeof Ve=="number")return Ve=Ve&255,typeof Uint8Array.prototype.indexOf=="function"?Ct?Uint8Array.prototype.indexOf.call(ze,Ve,it):Uint8Array.prototype.lastIndexOf.call(ze,Ve,it):Le(ze,[Ve],it,St,Ct);throw new TypeError("val must be string, number or Buffer")}function Le(ze,Ve,it,St,Ct){var It=1,jt=ze.length,Kt=Ve.length;if(St!==void 0&&(St=String(St).toLowerCase(),St==="ucs2"||St==="ucs-2"||St==="utf16le"||St==="utf-16le")){if(ze.length<2||Ve.length<2)return-1;It=2,jt/=2,Kt/=2,it/=2}function an(fn,Wt){return It===1?fn[Wt]:fn.readUInt16BE(Wt*It)}var un;if(Ct){var hn=-1;for(un=it;un<jt;un++)if(an(ze,un)===an(Ve,hn===-1?0:un-hn)){if(hn===-1&&(hn=un),un-hn+1===Kt)return hn*It}else hn!==-1&&(un-=un-hn),hn=-1}else for(it+Kt>jt&&(it=jt-Kt),un=it;un>=0;un--){for(var qt=!0,On=0;On<Kt;On++)if(an(ze,un+On)!==an(Ve,On)){qt=!1;break}if(qt)return un}return-1}ve.prototype.includes=function(Ve,it,St){return this.indexOf(Ve,it,St)!==-1},ve.prototype.indexOf=function(Ve,it,St){return je(this,Ve,it,St,!0)},ve.prototype.lastIndexOf=function(Ve,it,St){return je(this,Ve,it,St,!1)};function Be(ze,Ve,it,St){it=Number(it)||0;var Ct=ze.length-it;St?(St=Number(St),St>Ct&&(St=Ct)):St=Ct;var It=Ve.length;St>It/2&&(St=It/2);for(var jt=0;jt<St;++jt){var Kt=parseInt(Ve.substr(jt*2,2),16);if(Ie(Kt))return jt;ze[it+jt]=Kt}return jt}function Ue(ze,Ve,it,St){return $e(Ye(Ve,ze.length-it),ze,it,St)}function Je(ze,Ve,it,St){return $e(Ze(Ve),ze,it,St)}function He(ze,Ve,it,St){return Je(ze,Ve,it,St)}function We(ze,Ve,it,St){return $e(Ne(Ve),ze,it,St)}function at(ze,Ve,it,St){return $e(Se(Ve,ze.length-it),ze,it,St)}ve.prototype.write=function(Ve,it,St,Ct){if(it===void 0)Ct="utf8",St=this.length,it=0;else if(St===void 0&&typeof it=="string")Ct=it,St=this.length,it=0;else if(isFinite(it))it=it>>>0,isFinite(St)?(St=St>>>0,Ct===void 0&&(Ct="utf8")):(Ct=St,St=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var It=this.length-it;if((St===void 0||St>It)&&(St=It),Ve.length>0&&(St<0||it<0)||it>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ct||(Ct="utf8");for(var jt=!1;;)switch(Ct){case"hex":return Be(this,Ve,it,St);case"utf8":case"utf-8":return Ue(this,Ve,it,St);case"ascii":return Je(this,Ve,it,St);case"latin1":case"binary":return He(this,Ve,it,St);case"base64":return We(this,Ve,it,St);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,Ve,it,St);default:if(jt)throw new TypeError("Unknown encoding: "+Ct);Ct=(""+Ct).toLowerCase(),jt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ft(ze,Ve,it){return Ve===0&&it===ze.length?pe.fromByteArray(ze):pe.fromByteArray(ze.slice(Ve,it))}function mt(ze,Ve,it){it=Math.min(ze.length,it);for(var St=[],Ct=Ve;Ct<it;){var It=ze[Ct],jt=null,Kt=It>239?4:It>223?3:It>191?2:1;if(Ct+Kt<=it){var an,un,hn,qt;switch(Kt){case 1:It<128&&(jt=It);break;case 2:an=ze[Ct+1],(an&192)===128&&(qt=(It&31)<<6|an&63,qt>127&&(jt=qt));break;case 3:an=ze[Ct+1],un=ze[Ct+2],(an&192)===128&&(un&192)===128&&(qt=(It&15)<<12|(an&63)<<6|un&63,qt>2047&&(qt<55296||qt>57343)&&(jt=qt));break;case 4:an=ze[Ct+1],un=ze[Ct+2],hn=ze[Ct+3],(an&192)===128&&(un&192)===128&&(hn&192)===128&&(qt=(It&15)<<18|(an&63)<<12|(un&63)<<6|hn&63,qt>65535&&qt<1114112&&(jt=qt))}}jt===null?(jt=65533,Kt=1):jt>65535&&(jt-=65536,St.push(jt>>>10&1023|55296),jt=56320|jt&1023),St.push(jt),Ct+=Kt}return Xe(St)}var Lt=4096;function Xe(ze){var Ve=ze.length;if(Ve<=Lt)return String.fromCharCode.apply(String,ze);for(var it="",St=0;St<Ve;)it+=String.fromCharCode.apply(String,ze.slice(St,St+=Lt));return it}function et(ze,Ve,it){var St="";it=Math.min(ze.length,it);for(var Ct=Ve;Ct<it;++Ct)St+=String.fromCharCode(ze[Ct]&127);return St}function lt(ze,Ve,it){var St="";it=Math.min(ze.length,it);for(var Ct=Ve;Ct<it;++Ct)St+=String.fromCharCode(ze[Ct]);return St}function vt(ze,Ve,it){var St=ze.length;(!Ve||Ve<0)&&(Ve=0),(!it||it<0||it>St)&&(it=St);for(var Ct="",It=Ve;It<it;++It)Ct+=ct(ze[It]);return Ct}function wt(ze,Ve,it){for(var St=ze.slice(Ve,it),Ct="",It=0;It<St.length;It+=2)Ct+=String.fromCharCode(St[It]+St[It+1]*256);return Ct}ve.prototype.slice=function(Ve,it){var St=this.length;Ve=~~Ve,it=it===void 0?St:~~it,Ve<0?(Ve+=St,Ve<0&&(Ve=0)):Ve>St&&(Ve=St),it<0?(it+=St,it<0&&(it=0)):it>St&&(it=St),it<Ve&&(it=Ve);var Ct=this.subarray(Ve,it);return Ct.__proto__=ve.prototype,Ct};function ht(ze,Ve,it){if(ze%1!==0||ze<0)throw new RangeError("offset is not uint");if(ze+Ve>it)throw new RangeError("Trying to access beyond buffer length")}ve.prototype.readUIntLE=function(Ve,it,St){Ve=Ve>>>0,it=it>>>0,St||ht(Ve,it,this.length);for(var Ct=this[Ve],It=1,jt=0;++jt<it&&(It*=256);)Ct+=this[Ve+jt]*It;return Ct},ve.prototype.readUIntBE=function(Ve,it,St){Ve=Ve>>>0,it=it>>>0,St||ht(Ve,it,this.length);for(var Ct=this[Ve+--it],It=1;it>0&&(It*=256);)Ct+=this[Ve+--it]*It;return Ct},ve.prototype.readUInt8=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,1,this.length),this[Ve]},ve.prototype.readUInt16LE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,2,this.length),this[Ve]|this[Ve+1]<<8},ve.prototype.readUInt16BE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,2,this.length),this[Ve]<<8|this[Ve+1]},ve.prototype.readUInt32LE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,4,this.length),(this[Ve]|this[Ve+1]<<8|this[Ve+2]<<16)+this[Ve+3]*16777216},ve.prototype.readUInt32BE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,4,this.length),this[Ve]*16777216+(this[Ve+1]<<16|this[Ve+2]<<8|this[Ve+3])},ve.prototype.readIntLE=function(Ve,it,St){Ve=Ve>>>0,it=it>>>0,St||ht(Ve,it,this.length);for(var Ct=this[Ve],It=1,jt=0;++jt<it&&(It*=256);)Ct+=this[Ve+jt]*It;return It*=128,Ct>=It&&(Ct-=Math.pow(2,8*it)),Ct},ve.prototype.readIntBE=function(Ve,it,St){Ve=Ve>>>0,it=it>>>0,St||ht(Ve,it,this.length);for(var Ct=it,It=1,jt=this[Ve+--Ct];Ct>0&&(It*=256);)jt+=this[Ve+--Ct]*It;return It*=128,jt>=It&&(jt-=Math.pow(2,8*it)),jt},ve.prototype.readInt8=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,1,this.length),this[Ve]&128?(255-this[Ve]+1)*-1:this[Ve]},ve.prototype.readInt16LE=function(Ve,it){Ve=Ve>>>0,it||ht(Ve,2,this.length);var St=this[Ve]|this[Ve+1]<<8;return St&32768?St|4294901760:St},ve.prototype.readInt16BE=function(Ve,it){Ve=Ve>>>0,it||ht(Ve,2,this.length);var St=this[Ve+1]|this[Ve]<<8;return St&32768?St|4294901760:St},ve.prototype.readInt32LE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,4,this.length),this[Ve]|this[Ve+1]<<8|this[Ve+2]<<16|this[Ve+3]<<24},ve.prototype.readInt32BE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,4,this.length),this[Ve]<<24|this[Ve+1]<<16|this[Ve+2]<<8|this[Ve+3]},ve.prototype.readFloatLE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,4,this.length),be.read(this,Ve,!0,23,4)},ve.prototype.readFloatBE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,4,this.length),be.read(this,Ve,!1,23,4)},ve.prototype.readDoubleLE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,8,this.length),be.read(this,Ve,!0,52,8)},ve.prototype.readDoubleBE=function(Ve,it){return Ve=Ve>>>0,it||ht(Ve,8,this.length),be.read(this,Ve,!1,52,8)};function dt(ze,Ve,it,St,Ct,It){if(!ve.isBuffer(ze))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ve>Ct||Ve<It)throw new RangeError('"value" argument is out of bounds');if(it+St>ze.length)throw new RangeError("Index out of range")}ve.prototype.writeUIntLE=function(Ve,it,St,Ct){if(Ve=+Ve,it=it>>>0,St=St>>>0,!Ct){var It=Math.pow(2,8*St)-1;dt(this,Ve,it,St,It,0)}var jt=1,Kt=0;for(this[it]=Ve&255;++Kt<St&&(jt*=256);)this[it+Kt]=Ve/jt&255;return it+St},ve.prototype.writeUIntBE=function(Ve,it,St,Ct){if(Ve=+Ve,it=it>>>0,St=St>>>0,!Ct){var It=Math.pow(2,8*St)-1;dt(this,Ve,it,St,It,0)}var jt=St-1,Kt=1;for(this[it+jt]=Ve&255;--jt>=0&&(Kt*=256);)this[it+jt]=Ve/Kt&255;return it+St},ve.prototype.writeUInt8=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,1,255,0),this[it]=Ve&255,it+1},ve.prototype.writeUInt16LE=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,2,65535,0),this[it]=Ve&255,this[it+1]=Ve>>>8,it+2},ve.prototype.writeUInt16BE=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,2,65535,0),this[it]=Ve>>>8,this[it+1]=Ve&255,it+2},ve.prototype.writeUInt32LE=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,4,4294967295,0),this[it+3]=Ve>>>24,this[it+2]=Ve>>>16,this[it+1]=Ve>>>8,this[it]=Ve&255,it+4},ve.prototype.writeUInt32BE=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,4,4294967295,0),this[it]=Ve>>>24,this[it+1]=Ve>>>16,this[it+2]=Ve>>>8,this[it+3]=Ve&255,it+4},ve.prototype.writeIntLE=function(Ve,it,St,Ct){if(Ve=+Ve,it=it>>>0,!Ct){var It=Math.pow(2,8*St-1);dt(this,Ve,it,St,It-1,-It)}var jt=0,Kt=1,an=0;for(this[it]=Ve&255;++jt<St&&(Kt*=256);)Ve<0&&an===0&&this[it+jt-1]!==0&&(an=1),this[it+jt]=(Ve/Kt>>0)-an&255;return it+St},ve.prototype.writeIntBE=function(Ve,it,St,Ct){if(Ve=+Ve,it=it>>>0,!Ct){var It=Math.pow(2,8*St-1);dt(this,Ve,it,St,It-1,-It)}var jt=St-1,Kt=1,an=0;for(this[it+jt]=Ve&255;--jt>=0&&(Kt*=256);)Ve<0&&an===0&&this[it+jt+1]!==0&&(an=1),this[it+jt]=(Ve/Kt>>0)-an&255;return it+St},ve.prototype.writeInt8=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,1,127,-128),Ve<0&&(Ve=255+Ve+1),this[it]=Ve&255,it+1},ve.prototype.writeInt16LE=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,2,32767,-32768),this[it]=Ve&255,this[it+1]=Ve>>>8,it+2},ve.prototype.writeInt16BE=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,2,32767,-32768),this[it]=Ve>>>8,this[it+1]=Ve&255,it+2},ve.prototype.writeInt32LE=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,4,2147483647,-2147483648),this[it]=Ve&255,this[it+1]=Ve>>>8,this[it+2]=Ve>>>16,this[it+3]=Ve>>>24,it+4},ve.prototype.writeInt32BE=function(Ve,it,St){return Ve=+Ve,it=it>>>0,St||dt(this,Ve,it,4,2147483647,-2147483648),Ve<0&&(Ve=4294967295+Ve+1),this[it]=Ve>>>24,this[it+1]=Ve>>>16,this[it+2]=Ve>>>8,this[it+3]=Ve&255,it+4};function ut(ze,Ve,it,St,Ct,It){if(it+St>ze.length)throw new RangeError("Index out of range");if(it<0)throw new RangeError("Index out of range")}function Pt(ze,Ve,it,St,Ct){return Ve=+Ve,it=it>>>0,Ct||ut(ze,Ve,it,4,34028234663852886e22,-34028234663852886e22),be.write(ze,Ve,it,St,23,4),it+4}ve.prototype.writeFloatLE=function(Ve,it,St){return Pt(this,Ve,it,!0,St)},ve.prototype.writeFloatBE=function(Ve,it,St){return Pt(this,Ve,it,!1,St)};function yt(ze,Ve,it,St,Ct){return Ve=+Ve,it=it>>>0,Ct||ut(ze,Ve,it,8,17976931348623157e292,-17976931348623157e292),be.write(ze,Ve,it,St,52,8),it+8}ve.prototype.writeDoubleLE=function(Ve,it,St){return yt(this,Ve,it,!0,St)},ve.prototype.writeDoubleBE=function(Ve,it,St){return yt(this,Ve,it,!1,St)},ve.prototype.copy=function(Ve,it,St,Ct){if(!ve.isBuffer(Ve))throw new TypeError("argument should be a Buffer");if(St||(St=0),!Ct&&Ct!==0&&(Ct=this.length),it>=Ve.length&&(it=Ve.length),it||(it=0),Ct>0&&Ct<St&&(Ct=St),Ct===St||Ve.length===0||this.length===0)return 0;if(it<0)throw new RangeError("targetStart out of bounds");if(St<0||St>=this.length)throw new RangeError("Index out of range");if(Ct<0)throw new RangeError("sourceEnd out of bounds");Ct>this.length&&(Ct=this.length),Ve.length-it<Ct-St&&(Ct=Ve.length-it+St);var It=Ct-St;if(this===Ve&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(it,St,Ct);else if(this===Ve&&St<it&&it<Ct)for(var jt=It-1;jt>=0;--jt)Ve[jt+it]=this[jt+St];else Uint8Array.prototype.set.call(Ve,this.subarray(St,Ct),it);return It},ve.prototype.fill=function(Ve,it,St,Ct){if(typeof Ve=="string"){if(typeof it=="string"?(Ct=it,it=0,St=this.length):typeof St=="string"&&(Ct=St,St=this.length),Ct!==void 0&&typeof Ct!="string")throw new TypeError("encoding must be a string");if(typeof Ct=="string"&&!ve.isEncoding(Ct))throw new TypeError("Unknown encoding: "+Ct);if(Ve.length===1){var It=Ve.charCodeAt(0);(Ct==="utf8"&&It<128||Ct==="latin1")&&(Ve=It)}}else typeof Ve=="number"&&(Ve=Ve&255);if(it<0||this.length<it||this.length<St)throw new RangeError("Out of range index");if(St<=it)return this;it=it>>>0,St=St===void 0?this.length:St>>>0,Ve||(Ve=0);var jt;if(typeof Ve=="number")for(jt=it;jt<St;++jt)this[jt]=Ve;else{var Kt=ve.isBuffer(Ve)?Ve:ve.from(Ve,Ct),an=Kt.length;if(an===0)throw new TypeError('The value "'+Ve+'" is invalid for argument "value"');for(jt=0;jt<St-it;++jt)this[jt+it]=Kt[jt%an]}return this};var gt=/[^+/0-9A-Za-z-_]/g;function Tt(ze){if(ze=ze.split("=")[0],ze=ze.trim().replace(gt,""),ze.length<2)return"";for(;ze.length%4!==0;)ze=ze+"=";return ze}function ct(ze){return ze<16?"0"+ze.toString(16):ze.toString(16)}function Ye(ze,Ve){Ve=Ve||1/0;for(var it,St=ze.length,Ct=null,It=[],jt=0;jt<St;++jt){if(it=ze.charCodeAt(jt),it>55295&&it<57344){if(!Ct){if(it>56319){(Ve-=3)>-1&&It.push(239,191,189);continue}else if(jt+1===St){(Ve-=3)>-1&&It.push(239,191,189);continue}Ct=it;continue}if(it<56320){(Ve-=3)>-1&&It.push(239,191,189),Ct=it;continue}it=(Ct-55296<<10|it-56320)+65536}else Ct&&(Ve-=3)>-1&&It.push(239,191,189);if(Ct=null,it<128){if((Ve-=1)<0)break;It.push(it)}else if(it<2048){if((Ve-=2)<0)break;It.push(it>>6|192,it&63|128)}else if(it<65536){if((Ve-=3)<0)break;It.push(it>>12|224,it>>6&63|128,it&63|128)}else if(it<1114112){if((Ve-=4)<0)break;It.push(it>>18|240,it>>12&63|128,it>>6&63|128,it&63|128)}else throw new Error("Invalid code point")}return It}function Ze(ze){for(var Ve=[],it=0;it<ze.length;++it)Ve.push(ze.charCodeAt(it)&255);return Ve}function Se(ze,Ve){for(var it,St,Ct,It=[],jt=0;jt<ze.length&&!((Ve-=2)<0);++jt)it=ze.charCodeAt(jt),St=it>>8,Ct=it%256,It.push(Ct),It.push(St);return It}function Ne(ze){return pe.toByteArray(Tt(ze))}function $e(ze,Ve,it,St){for(var Ct=0;Ct<St&&!(Ct+it>=Ve.length||Ct>=ze.length);++Ct)Ve[Ct+it]=ze[Ct];return Ct}function nt(ze,Ve){return ze instanceof Ve||ze!=null&&ze.constructor!=null&&ze.constructor.name!=null&&ze.constructor.name===Ve.name}function Ie(ze){return ze!==ze}}).call(this)}).call(this,ae("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(ae,Ge,Re){Ge.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(ae,Ge,Re){"use strict";var fe=ae("get-intrinsic"),pe=ae("./"),be=pe(fe("String.prototype.indexOf"));Ge.exports=function(we,Te){var ve=fe(we,!!Te);return typeof ve=="function"&&be(we,".prototype.")>-1?pe(ve):ve}},{"./":93,"get-intrinsic":348}],93:[function(ae,Ge,Re){"use strict";var fe=ae("function-bind"),pe=ae("get-intrinsic"),be=pe("%Function.prototype.apply%"),Ee=pe("%Function.prototype.call%"),we=pe("%Reflect.apply%",!0)||fe.call(Ee,be),Te=pe("%Object.getOwnPropertyDescriptor%",!0),ve=pe("%Object.defineProperty%",!0),Pe=pe("%Math.max%");if(ve)try{ve({},"a",{value:1})}catch(ee){ve=null}Ge.exports=function(z){var oe=we(fe,Ee,arguments);if(Te&&ve){var ie=Te(oe,"length");ie.configurable&&ve(oe,"length",{value:1+Pe(0,z.length-(arguments.length-1))})}return oe};var de=function(){return we(fe,be,arguments)};ve?ve(Ge.exports,"apply",{value:de}):Ge.exports.apply=de},{"function-bind":347,"get-intrinsic":348}],94:[function(ae,Ge,Re){"use strict";var fe=Array.prototype.slice;Ge.exports=pe;function pe(Ee,we){if(!(this instanceof pe))return new pe(Ee,we);this.src=Ee,this._withAccess=we}pe.prototype.withAccess=function(Ee){return this._withAccess=Ee!==!1,this},pe.prototype.pick=function(Ee){return Array.isArray(Ee)||(Ee=fe.call(arguments)),Ee.length&&(this.keys=Ee),this},pe.prototype.to=function(Ee){if(Ee=Ee||{},!this.src)return Ee;var we=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Te=0;Te<we.length;Te++)ve=we[Te],Ee[ve]===void 0&&(Ee[ve]=this.src[ve]);return Ee}for(var Te=0;Te<we.length;Te++){var ve=we[Te];if(be(Ee,ve)){var Pe=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);Pe&&Ee.__defineGetter__(ve,Pe),de&&Ee.__defineSetter__(ve,de),!Pe&&!de&&(Ee[ve]=this.src[ve])}}return Ee},pe.prototype.toCover=function(Ee){for(var we=this.keys||Object.keys(this.src),Te=0;Te<we.length;Te++){var ve=we[Te];delete Ee[ve];var Pe=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);Pe&&Ee.__defineGetter__(ve,Pe),de&&Ee.__defineSetter__(ve,de),!Pe&&!de&&(Ee[ve]=this.src[ve])}},pe.prototype.override=pe.prototype.toCover,pe.prototype.and=function(Ee){var we={};return this.to(we),this.src=Ee,this.to(we),this.src=we,this};function be(Ee,we){return Ee[we]===void 0&&Ee.__lookupGetter__(we)===void 0&&Ee.__lookupSetter__(we)===void 0}},{}],95:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-callable"),be=ae("../internals/try-to-string"),Ee=fe.TypeError;Ge.exports=function(we){if(pe(we))return we;throw Ee(be(we)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-constructor"),be=ae("../internals/try-to-string"),Ee=fe.TypeError;Ge.exports=function(we){if(pe(we))return we;throw Ee(be(we)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-callable"),be=fe.String,Ee=fe.TypeError;Ge.exports=function(we){if(typeof we=="object"||pe(we))return we;throw Ee("Can't set "+be(we)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(ae,Ge,Re){var fe=ae("../internals/well-known-symbol"),pe=ae("../internals/object-create"),be=ae("../internals/object-define-property"),Ee=fe("unscopables"),we=Array.prototype;we[Ee]==null&&be.f(we,Ee,{configurable:!0,value:pe(null)}),Ge.exports=function(Te){we[Ee][Te]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/string-multibyte").charAt;Ge.exports=function(pe,be,Ee){return be+(Ee?fe(pe,be).length:1)}},{"../internals/string-multibyte":239}],100:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/object-is-prototype-of"),be=fe.TypeError;Ge.exports=function(Ee,we){if(pe(we,Ee))return Ee;throw be("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-object"),be=fe.String,Ee=fe.TypeError;Ge.exports=function(we){if(pe(we))return we;throw Ee(be(we)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(ae,Ge,Re){Ge.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-native"),pe=ae("../internals/descriptors"),be=ae("../internals/global"),Ee=ae("../internals/is-callable"),we=ae("../internals/is-object"),Te=ae("../internals/has-own-property"),ve=ae("../internals/classof"),Pe=ae("../internals/try-to-string"),de=ae("../internals/create-non-enumerable-property"),ee=ae("../internals/redefine"),z=ae("../internals/object-define-property").f,oe=ae("../internals/object-is-prototype-of"),ie=ae("../internals/object-get-prototype-of"),le=ae("../internals/object-set-prototype-of"),ue=ae("../internals/well-known-symbol"),me=ae("../internals/uid"),xe=be.Int8Array,Ae=xe&&xe.prototype,De=be.Uint8ClampedArray,Fe=De&&De.prototype,je=xe&&ie(xe),Le=Ae&&ie(Ae),Be=Object.prototype,Ue=be.TypeError,Je=ue("toStringTag"),He=me("TYPED_ARRAY_TAG"),We=me("TYPED_ARRAY_CONSTRUCTOR"),at=fe&&!!le&&ve(be.opera)!=="Opera",ft=!1,mt,Lt,Xe,et={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},lt={BigInt64Array:8,BigUint64Array:8},vt=function(gt){if(!we(gt))return!1;var Tt=ve(gt);return Tt==="DataView"||Te(et,Tt)||Te(lt,Tt)},wt=function(yt){if(!we(yt))return!1;var gt=ve(yt);return Te(et,gt)||Te(lt,gt)},ht=function(yt){if(wt(yt))return yt;throw Ue("Target is not a typed array")},dt=function(yt){if(Ee(yt)&&(!le||oe(je,yt)))return yt;throw Ue(Pe(yt)+" is not a typed array constructor")},ut=function(yt,gt,Tt,ct){if(pe){if(Tt)for(var Ye in et){var Ze=be[Ye];if(Ze&&Te(Ze.prototype,yt))try{delete Ze.prototype[yt]}catch(Se){try{Ze.prototype[yt]=gt}catch(Ne){}}}(!Le[yt]||Tt)&&ee(Le,yt,Tt?gt:at&&Ae[yt]||gt,ct)}},Pt=function(yt,gt,Tt){var ct,Ye;if(pe){if(le){if(Tt){for(ct in et)if(Ye=be[ct],Ye&&Te(Ye,yt))try{delete Ye[yt]}catch(Ze){}}if(!je[yt]||Tt)try{return ee(je,yt,Tt?gt:at&&je[yt]||gt)}catch(Ze){}else return}for(ct in et)Ye=be[ct],Ye&&(!Ye[yt]||Tt)&&ee(Ye,yt,gt)}};for(mt in et)Lt=be[mt],Xe=Lt&&Lt.prototype,Xe?de(Xe,We,Lt):at=!1;for(mt in lt)Lt=be[mt],Xe=Lt&&Lt.prototype,Xe&&de(Xe,We,Lt);if((!at||!Ee(je)||je===Function.prototype)&&(je=function(){throw Ue("Incorrect invocation")},at))for(mt in et)be[mt]&&le(be[mt],je);if((!at||!Le||Le===Be)&&(Le=je.prototype,at))for(mt in et)be[mt]&&le(be[mt].prototype,Le);if(at&&ie(Fe)!==Le&&le(Fe,Le),pe&&!Te(Le,Je)){ft=!0,z(Le,Je,{get:function(){return we(this)?this[He]:void 0}});for(mt in et)be[mt]&&de(be[mt],He,mt)}Ge.exports={NATIVE_ARRAY_BUFFER_VIEWS:at,TYPED_ARRAY_CONSTRUCTOR:We,TYPED_ARRAY_TAG:ft&&He,aTypedArray:ht,aTypedArrayConstructor:dt,exportTypedArrayMethod:ut,exportTypedArrayStaticMethod:Pt,isView:vt,isTypedArray:wt,TypedArray:je,TypedArrayPrototype:Le}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/global"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/descriptors"),Ee=ae("../internals/array-buffer-native"),we=ae("../internals/function-name"),Te=ae("../internals/create-non-enumerable-property"),ve=ae("../internals/redefine-all"),Pe=ae("../internals/fails"),de=ae("../internals/an-instance"),ee=ae("../internals/to-integer-or-infinity"),z=ae("../internals/to-length"),oe=ae("../internals/to-index"),ie=ae("../internals/ieee754"),le=ae("../internals/object-get-prototype-of"),ue=ae("../internals/object-set-prototype-of"),me=ae("../internals/object-get-own-property-names").f,xe=ae("../internals/object-define-property").f,Ae=ae("../internals/array-fill"),De=ae("../internals/array-slice-simple"),Fe=ae("../internals/set-to-string-tag"),je=ae("../internals/internal-state"),Le=we.PROPER,Be=we.CONFIGURABLE,Ue=je.get,Je=je.set,He="ArrayBuffer",We="DataView",at="prototype",ft="Wrong length",mt="Wrong index",Lt=fe[He],Xe=Lt,et=Xe&&Xe[at],lt=fe[We],vt=lt&<[at],wt=Object.prototype,ht=fe.Array,dt=fe.RangeError,ut=pe(Ae),Pt=pe([].reverse),yt=ie.pack,gt=ie.unpack,Tt=function(jt){return[jt&255]},ct=function(jt){return[jt&255,jt>>8&255]},Ye=function(jt){return[jt&255,jt>>8&255,jt>>16&255,jt>>24&255]},Ze=function(jt){return jt[3]<<24|jt[2]<<16|jt[1]<<8|jt[0]},Se=function(jt){return yt(jt,23,4)},Ne=function(jt){return yt(jt,52,8)},$e=function(jt,Kt){xe(jt[at],Kt,{get:function(){return Ue(this)[Kt]}})},nt=function(jt,Kt,an,un){var hn=oe(an),qt=Ue(jt);if(hn+Kt>qt.byteLength)throw dt(mt);var On=Ue(qt.buffer).bytes,fn=hn+qt.byteOffset,Wt=De(On,fn,fn+Kt);return un?Wt:Pt(Wt)},Ie=function(jt,Kt,an,un,hn,qt){var On=oe(an),fn=Ue(jt);if(On+Kt>fn.byteLength)throw dt(mt);for(var Wt=Ue(fn.buffer).bytes,Bn=On+fn.byteOffset,zn=un(+hn),Yn=0;Yn<Kt;Yn++)Wt[Bn+Yn]=zn[qt?Yn:Kt-Yn-1]};if(!Ee)Xe=function(Kt){de(this,et);var an=oe(Kt);Je(this,{bytes:ut(ht(an),0),byteLength:an}),be||(this.byteLength=an)},et=Xe[at],lt=function(Kt,an,un){de(this,vt),de(Kt,et);var hn=Ue(Kt).byteLength,qt=ee(an);if(qt<0||qt>hn)throw dt("Wrong offset");if(un=un===void 0?hn-qt:z(un),qt+un>hn)throw dt(ft);Je(this,{buffer:Kt,byteLength:un,byteOffset:qt}),be||(this.buffer=Kt,this.byteLength=un,this.byteOffset=qt)},vt=lt[at],be&&($e(Xe,"byteLength"),$e(lt,"buffer"),$e(lt,"byteLength"),$e(lt,"byteOffset")),ve(vt,{getInt8:function(Kt){return nt(this,1,Kt)[0]<<24>>24},getUint8:function(Kt){return nt(this,1,Kt)[0]},getInt16:function(Kt){var an=nt(this,2,Kt,arguments.length>1?arguments[1]:void 0);return(an[1]<<8|an[0])<<16>>16},getUint16:function(Kt){var an=nt(this,2,Kt,arguments.length>1?arguments[1]:void 0);return an[1]<<8|an[0]},getInt32:function(Kt){return Ze(nt(this,4,Kt,arguments.length>1?arguments[1]:void 0))},getUint32:function(Kt){return Ze(nt(this,4,Kt,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Kt){return gt(nt(this,4,Kt,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Kt){return gt(nt(this,8,Kt,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Kt,an){Ie(this,1,Kt,Tt,an)},setUint8:function(Kt,an){Ie(this,1,Kt,Tt,an)},setInt16:function(Kt,an){Ie(this,2,Kt,ct,an,arguments.length>2?arguments[2]:void 0)},setUint16:function(Kt,an){Ie(this,2,Kt,ct,an,arguments.length>2?arguments[2]:void 0)},setInt32:function(Kt,an){Ie(this,4,Kt,Ye,an,arguments.length>2?arguments[2]:void 0)},setUint32:function(Kt,an){Ie(this,4,Kt,Ye,an,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Kt,an){Ie(this,4,Kt,Se,an,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Kt,an){Ie(this,8,Kt,Ne,an,arguments.length>2?arguments[2]:void 0)}});else{var ze=Le&&Lt.name!==He;if(!Pe(function(){Lt(1)})||!Pe(function(){new Lt(-1)})||Pe(function(){return new Lt,new Lt(1.5),new Lt(NaN),ze&&!Be})){Xe=function(Kt){return de(this,et),new Lt(oe(Kt))},Xe[at]=et;for(var Ve=me(Lt),it=0,St;Ve.length>it;)(St=Ve[it++])in Xe||Te(Xe,St,Lt[St]);et.constructor=Xe}else ze&&Be&&Te(Lt,"name",He);ue&&le(vt)!==wt&&ue(vt,wt);var Ct=new lt(new Xe(2)),It=pe(vt.setInt8);Ct.setInt8(0,2147483648),Ct.setInt8(1,2147483649),(Ct.getInt8(0)||!Ct.getInt8(1))&&ve(vt,{setInt8:function(Kt,an){It(this,Kt,an<<24>>24)},setUint8:function(Kt,an){It(this,Kt,an<<24>>24)}},{unsafe:!0})}Fe(Xe,He),Fe(lt,We),Ge.exports={ArrayBuffer:Xe,DataView:lt}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/to-object"),pe=ae("../internals/to-absolute-index"),be=ae("../internals/length-of-array-like"),Ee=Math.min;Ge.exports=[].copyWithin||function(Te,ve){var Pe=fe(this),de=be(Pe),ee=pe(Te,de),z=pe(ve,de),oe=arguments.length>2?arguments[2]:void 0,ie=Ee((oe===void 0?de:pe(oe,de))-z,de-ee),le=1;for(z<ee&&ee<z+ie&&(le=-1,z+=ie-1,ee+=ie-1);ie-- >0;)z in Pe?Pe[ee]=Pe[z]:delete Pe[ee],ee+=le,z+=le;return Pe}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/to-object"),pe=ae("../internals/to-absolute-index"),be=ae("../internals/length-of-array-like");Ge.exports=function(we){for(var Te=fe(this),ve=be(Te),Pe=arguments.length,de=pe(Pe>1?arguments[1]:void 0,ve),ee=Pe>2?arguments[2]:void 0,z=ee===void 0?ve:pe(ee,ve);z>de;)Te[de++]=we;return Te}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-iteration").forEach,pe=ae("../internals/array-method-is-strict"),be=pe("forEach");Ge.exports=be?[].forEach:function(we){return fe(this,we,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(ae,Ge,Re){var fe=ae("../internals/length-of-array-like");Ge.exports=function(pe,be){for(var Ee=0,we=fe(be),Te=new pe(we);we>Ee;)Te[Ee]=be[Ee++];return Te}},{"../internals/length-of-array-like":188}],109:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/global"),pe=ae("../internals/function-bind-context"),be=ae("../internals/function-call"),Ee=ae("../internals/to-object"),we=ae("../internals/call-with-safe-iteration-closing"),Te=ae("../internals/is-array-iterator-method"),ve=ae("../internals/is-constructor"),Pe=ae("../internals/length-of-array-like"),de=ae("../internals/create-property"),ee=ae("../internals/get-iterator"),z=ae("../internals/get-iterator-method"),oe=fe.Array;Ge.exports=function(le){var ue=Ee(le),me=ve(this),xe=arguments.length,Ae=xe>1?arguments[1]:void 0,De=Ae!==void 0;De&&(Ae=pe(Ae,xe>2?arguments[2]:void 0));var Fe=z(ue),je=0,Le,Be,Ue,Je,He,We;if(Fe&&!(this==oe&&Te(Fe)))for(Je=ee(ue,Fe),He=Je.next,Be=me?new this:[];!(Ue=be(He,Je)).done;je++)We=De?we(Je,Ae,[Ue.value,je],!0):Ue.value,de(Be,je,We);else for(Le=Pe(ue),Be=me?new this(Le):oe(Le);Le>je;je++)We=De?Ae(ue[je],je):ue[je],de(Be,je,We);return Be.length=je,Be}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(ae,Ge,Re){var fe=ae("../internals/to-indexed-object"),pe=ae("../internals/to-absolute-index"),be=ae("../internals/length-of-array-like"),Ee=function(we){return function(Te,ve,Pe){var de=fe(Te),ee=be(de),z=pe(Pe,ee),oe;if(we&&ve!=ve){for(;ee>z;)if(oe=de[z++],oe!=oe)return!0}else for(;ee>z;z++)if((we||z in de)&&de[z]===ve)return we||z||0;return!we&&-1}};Ge.exports={includes:Ee(!0),indexOf:Ee(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(ae,Ge,Re){var fe=ae("../internals/function-bind-context"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/indexed-object"),Ee=ae("../internals/to-object"),we=ae("../internals/length-of-array-like"),Te=ae("../internals/array-species-create"),ve=pe([].push),Pe=function(de){var ee=de==1,z=de==2,oe=de==3,ie=de==4,le=de==6,ue=de==7,me=de==5||le;return function(xe,Ae,De,Fe){for(var je=Ee(xe),Le=be(je),Be=fe(Ae,De),Ue=we(Le),Je=0,He=Fe||Te,We=ee?He(xe,Ue):z||ue?He(xe,0):void 0,at,ft;Ue>Je;Je++)if((me||Je in Le)&&(at=Le[Je],ft=Be(at,Je,je),de))if(ee)We[Je]=ft;else if(ft)switch(de){case 3:return!0;case 5:return at;case 6:return Je;case 2:ve(We,at)}else switch(de){case 4:return!1;case 7:ve(We,at)}return le?-1:oe||ie?ie:We}};Ge.exports={forEach:Pe(0),map:Pe(1),filter:Pe(2),some:Pe(3),every:Pe(4),find:Pe(5),findIndex:Pe(6),filterReject:Pe(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/function-apply"),pe=ae("../internals/to-indexed-object"),be=ae("../internals/to-integer-or-infinity"),Ee=ae("../internals/length-of-array-like"),we=ae("../internals/array-method-is-strict"),Te=Math.min,ve=[].lastIndexOf,Pe=!!ve&&1/[1].lastIndexOf(1,-0)<0,de=we("lastIndexOf"),ee=Pe||!de;Ge.exports=ee?function(oe){if(Pe)return fe(ve,this,arguments)||0;var ie=pe(this),le=Ee(ie),ue=le-1;for(arguments.length>1&&(ue=Te(ue,be(arguments[1]))),ue<0&&(ue=le+ue);ue>=0;ue--)if(ue in ie&&ie[ue]===oe)return ue||0;return-1}:ve},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(ae,Ge,Re){var fe=ae("../internals/fails"),pe=ae("../internals/well-known-symbol"),be=ae("../internals/engine-v8-version"),Ee=pe("species");Ge.exports=function(we){return be>=51||!fe(function(){var Te=[],ve=Te.constructor={};return ve[Ee]=function(){return{foo:1}},Te[we](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/fails");Ge.exports=function(pe,be){var Ee=[][pe];return!!Ee&&fe(function(){Ee.call(null,be||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/a-callable"),be=ae("../internals/to-object"),Ee=ae("../internals/indexed-object"),we=ae("../internals/length-of-array-like"),Te=fe.TypeError,ve=function(Pe){return function(de,ee,z,oe){pe(ee);var ie=be(de),le=Ee(ie),ue=we(ie),me=Pe?ue-1:0,xe=Pe?-1:1;if(z<2)for(;;){if(me in le){oe=le[me],me+=xe;break}if(me+=xe,Pe?me<0:ue<=me)throw Te("Reduce of empty array with no initial value")}for(;Pe?me>=0:ue>me;me+=xe)me in le&&(oe=ee(oe,le[me],me,ie));return oe}};Ge.exports={left:ve(!1),right:ve(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/to-absolute-index"),be=ae("../internals/length-of-array-like"),Ee=ae("../internals/create-property"),we=fe.Array,Te=Math.max;Ge.exports=function(ve,Pe,de){for(var ee=be(ve),z=pe(Pe,ee),oe=pe(de===void 0?ee:de,ee),ie=we(Te(oe-z,0)),le=0;z<oe;z++,le++)Ee(ie,le,ve[z]);return ie.length=le,ie}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this");Ge.exports=fe([].slice)},{"../internals/function-uncurry-this":157}],118:[function(ae,Ge,Re){var fe=ae("../internals/array-slice-simple"),pe=Math.floor,be=function(Te,ve){var Pe=Te.length,de=pe(Pe/2);return Pe<8?Ee(Te,ve):we(Te,be(fe(Te,0,de),ve),be(fe(Te,de),ve),ve)},Ee=function(Te,ve){for(var Pe=Te.length,de=1,ee,z;de<Pe;){for(z=de,ee=Te[de];z&&ve(Te[z-1],ee)>0;)Te[z]=Te[--z];z!==de++&&(Te[z]=ee)}return Te},we=function(Te,ve,Pe,de){for(var ee=ve.length,z=Pe.length,oe=0,ie=0;oe<ee||ie<z;)Te[oe+ie]=oe<ee&&ie<z?de(ve[oe],Pe[ie])<=0?ve[oe++]:Pe[ie++]:oe<ee?ve[oe++]:Pe[ie++];return Te};Ge.exports=be},{"../internals/array-slice-simple":116}],119:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-array"),be=ae("../internals/is-constructor"),Ee=ae("../internals/is-object"),we=ae("../internals/well-known-symbol"),Te=we("species"),ve=fe.Array;Ge.exports=function(Pe){var de;return pe(Pe)&&(de=Pe.constructor,be(de)&&(de===ve||pe(de.prototype))?de=void 0:Ee(de)&&(de=de[Te],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(ae,Ge,Re){var fe=ae("../internals/array-species-constructor");Ge.exports=function(pe,be){return new(fe(pe))(be===0?0:be)}},{"../internals/array-species-constructor":119}],121:[function(ae,Ge,Re){var fe=ae("../internals/an-object"),pe=ae("../internals/iterator-close");Ge.exports=function(be,Ee,we,Te){try{return Te?Ee(fe(we)[0],we[1]):Ee(we)}catch(ve){pe(be,"throw",ve)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(ae,Ge,Re){var fe=ae("../internals/well-known-symbol"),pe=fe("iterator"),be=!1;try{var Ee=0,we={next:function(){return{done:!!Ee++}},return:function(){be=!0}};we[pe]=function(){return this},Array.from(we,function(){throw 2})}catch(Te){}Ge.exports=function(Te,ve){if(!ve&&!be)return!1;var Pe=!1;try{var de={};de[pe]=function(){return{next:function(){return{done:Pe=!0}}}},Te(de)}catch(ee){}return Pe}},{"../internals/well-known-symbol":268}],123:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=fe({}.toString),be=fe("".slice);Ge.exports=function(Ee){return be(pe(Ee),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/to-string-tag-support"),be=ae("../internals/is-callable"),Ee=ae("../internals/classof-raw"),we=ae("../internals/well-known-symbol"),Te=we("toStringTag"),ve=fe.Object,Pe=Ee(function(){return arguments}())=="Arguments",de=function(ee,z){try{return ee[z]}catch(oe){}};Ge.exports=pe?Ee:function(ee){var z,oe,ie;return ee===void 0?"Undefined":ee===null?"Null":typeof(oe=de(z=ve(ee),Te))=="string"?oe:Pe?Ee(z):(ie=Ee(z))=="Object"&&be(z.callee)?"Arguments":ie}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(ae,Ge,Re){var fe=ae("../internals/has-own-property"),pe=ae("../internals/own-keys"),be=ae("../internals/object-get-own-property-descriptor"),Ee=ae("../internals/object-define-property");Ge.exports=function(we,Te,ve){for(var Pe=pe(Te),de=Ee.f,ee=be.f,z=0;z<Pe.length;z++){var oe=Pe[z];!fe(we,oe)&&!(ve&&fe(ve,oe))&&de(we,oe,ee(Te,oe))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(ae,Ge,Re){var fe=ae("../internals/well-known-symbol"),pe=fe("match");Ge.exports=function(be){var Ee=/./;try{"/./"[be](Ee)}catch(we){try{return Ee[pe]=!1,"/./"[be](Ee)}catch(Te){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(ae,Ge,Re){var fe=ae("../internals/fails");Ge.exports=!fe(function(){function pe(){}return pe.prototype.constructor=null,Object.getPrototypeOf(new pe)!==pe.prototype})},{"../internals/fails":150}],128:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/iterators-core").IteratorPrototype,pe=ae("../internals/object-create"),be=ae("../internals/create-property-descriptor"),Ee=ae("../internals/set-to-string-tag"),we=ae("../internals/iterators"),Te=function(){return this};Ge.exports=function(ve,Pe,de,ee){var z=Pe+" Iterator";return ve.prototype=pe(fe,{next:be(+!ee,de)}),Ee(ve,z,!1,!0),we[z]=Te,ve}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/object-define-property"),be=ae("../internals/create-property-descriptor");Ge.exports=fe?function(Ee,we,Te){return pe.f(Ee,we,be(1,Te))}:function(Ee,we,Te){return Ee[we]=Te,Ee}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(ae,Ge,Re){Ge.exports=function(fe,pe){return{enumerable:!(fe&1),configurable:!(fe&2),writable:!(fe&4),value:pe}}},{}],131:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/to-property-key"),pe=ae("../internals/object-define-property"),be=ae("../internals/create-property-descriptor");Ge.exports=function(Ee,we,Te){var ve=fe(we);ve in Ee?pe.f(Ee,ve,be(0,Te)):Ee[ve]=Te}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/function-call"),be=ae("../internals/is-pure"),Ee=ae("../internals/function-name"),we=ae("../internals/is-callable"),Te=ae("../internals/create-iterator-constructor"),ve=ae("../internals/object-get-prototype-of"),Pe=ae("../internals/object-set-prototype-of"),de=ae("../internals/set-to-string-tag"),ee=ae("../internals/create-non-enumerable-property"),z=ae("../internals/redefine"),oe=ae("../internals/well-known-symbol"),ie=ae("../internals/iterators"),le=ae("../internals/iterators-core"),ue=Ee.PROPER,me=Ee.CONFIGURABLE,xe=le.IteratorPrototype,Ae=le.BUGGY_SAFARI_ITERATORS,De=oe("iterator"),Fe="keys",je="values",Le="entries",Be=function(){return this};Ge.exports=function(Ue,Je,He,We,at,ft,mt){Te(He,Je,We);var Lt=function(yt){if(yt===at&&wt)return wt;if(!Ae&&yt in lt)return lt[yt];switch(yt){case Fe:return function(){return new He(this,yt)};case je:return function(){return new He(this,yt)};case Le:return function(){return new He(this,yt)}}return function(){return new He(this)}},Xe=Je+" Iterator",et=!1,lt=Ue.prototype,vt=lt[De]||lt["@@iterator"]||at&<[at],wt=!Ae&&vt||Lt(at),ht=Je=="Array"&<.entries||vt,dt,ut,Pt;if(ht&&(dt=ve(ht.call(new Ue)),dt!==Object.prototype&&dt.next&&(!be&&ve(dt)!==xe&&(Pe?Pe(dt,xe):we(dt[De])||z(dt,De,Be)),de(dt,Xe,!0,!0),be&&(ie[Xe]=Be))),ue&&at==je&&vt&&vt.name!==je&&(!be&&me?ee(lt,"name",je):(et=!0,wt=function(){return pe(vt,this)})),at)if(ut={values:Lt(je),keys:ft?wt:Lt(Fe),entries:Lt(Le)},mt)for(Pt in ut)(Ae||et||!(Pt in lt))&&z(lt,Pt,ut[Pt]);else fe({target:Je,proto:!0,forced:Ae||et},ut);return(!be||mt)&<[De]!==wt&&z(lt,De,wt,{name:at}),ie[Je]=wt,ut}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(ae,Ge,Re){var fe=ae("../internals/path"),pe=ae("../internals/has-own-property"),be=ae("../internals/well-known-symbol-wrapped"),Ee=ae("../internals/object-define-property").f;Ge.exports=function(we){var Te=fe.Symbol||(fe.Symbol={});pe(Te,we)||Ee(Te,we,{value:be.f(we)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(ae,Ge,Re){var fe=ae("../internals/fails");Ge.exports=!fe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-object"),be=fe.document,Ee=pe(be)&&pe(be.createElement);Ge.exports=function(we){return Ee?be.createElement(we):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(ae,Ge,Re){Ge.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(ae,Ge,Re){var fe=ae("../internals/document-create-element"),pe=fe("span").classList,be=pe&&pe.constructor&&pe.constructor.prototype;Ge.exports=be===Object.prototype?void 0:be},{"../internals/document-create-element":135}],138:[function(ae,Ge,Re){var fe=ae("../internals/engine-user-agent"),pe=fe.match(/firefox\/(\d+)/i);Ge.exports=!!pe&&+pe[1]},{"../internals/engine-user-agent":145}],139:[function(ae,Ge,Re){Ge.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(ae,Ge,Re){var fe=ae("../internals/engine-user-agent");Ge.exports=/MSIE|Trident/.test(fe)},{"../internals/engine-user-agent":145}],141:[function(ae,Ge,Re){var fe=ae("../internals/engine-user-agent"),pe=ae("../internals/global");Ge.exports=/ipad|iphone|ipod/i.test(fe)&&pe.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(ae,Ge,Re){var fe=ae("../internals/engine-user-agent");Ge.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(fe)},{"../internals/engine-user-agent":145}],143:[function(ae,Ge,Re){var fe=ae("../internals/classof-raw"),pe=ae("../internals/global");Ge.exports=fe(pe.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(ae,Ge,Re){var fe=ae("../internals/engine-user-agent");Ge.exports=/web0s(?!.*chrome)/i.test(fe)},{"../internals/engine-user-agent":145}],145:[function(ae,Ge,Re){var fe=ae("../internals/get-built-in");Ge.exports=fe("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/engine-user-agent"),be=fe.process,Ee=fe.Deno,we=be&&be.versions||Ee&&Ee.version,Te=we&&we.v8,ve,Pe;Te&&(ve=Te.split("."),Pe=ve[0]>0&&ve[0]<4?1:+(ve[0]+ve[1])),!Pe&&pe&&(ve=pe.match(/Edge\/(\d+)/),(!ve||ve[1]>=74)&&(ve=pe.match(/Chrome\/(\d+)/),ve&&(Pe=+ve[1]))),Ge.exports=Pe},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(ae,Ge,Re){var fe=ae("../internals/engine-user-agent"),pe=fe.match(/AppleWebKit\/(\d+)\./);Ge.exports=!!pe&&+pe[1]},{"../internals/engine-user-agent":145}],148:[function(ae,Ge,Re){Ge.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/object-get-own-property-descriptor").f,be=ae("../internals/create-non-enumerable-property"),Ee=ae("../internals/redefine"),we=ae("../internals/set-global"),Te=ae("../internals/copy-constructor-properties"),ve=ae("../internals/is-forced");Ge.exports=function(Pe,de){var ee=Pe.target,z=Pe.global,oe=Pe.stat,ie,le,ue,me,xe,Ae;if(z?le=fe:oe?le=fe[ee]||we(ee,{}):le=(fe[ee]||{}).prototype,le)for(ue in de){if(xe=de[ue],Pe.noTargetGet?(Ae=pe(le,ue),me=Ae&&Ae.value):me=le[ue],ie=ve(z?ue:ee+(oe?".":"#")+ue,Pe.forced),!ie&&me!==void 0){if(typeof xe==typeof me)continue;Te(xe,me)}(Pe.sham||me&&me.sham)&&be(xe,"sham",!0),Ee(le,ue,xe,Pe)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(ae,Ge,Re){Ge.exports=function(fe){try{return!!fe()}catch(pe){return!0}}},{}],151:[function(ae,Ge,Re){"use strict";ae("../modules/es.regexp.exec");var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/redefine"),be=ae("../internals/regexp-exec"),Ee=ae("../internals/fails"),we=ae("../internals/well-known-symbol"),Te=ae("../internals/create-non-enumerable-property"),ve=we("species"),Pe=RegExp.prototype;Ge.exports=function(de,ee,z,oe){var ie=we(de),le=!Ee(function(){var Ae={};return Ae[ie]=function(){return 7},""[de](Ae)!=7}),ue=le&&!Ee(function(){var Ae=!1,De=/a/;return de==="split"&&(De={},De.constructor={},De.constructor[ve]=function(){return De},De.flags="",De[ie]=/./[ie]),De.exec=function(){return Ae=!0,null},De[ie](""),!Ae});if(!le||!ue||z){var me=fe(/./[ie]),xe=ee(ie,""[de],function(Ae,De,Fe,je,Le){var Be=fe(Ae),Ue=De.exec;return Ue===be||Ue===Pe.exec?le&&!Le?{done:!0,value:me(De,Fe,je)}:{done:!0,value:Be(Fe,De,je)}:{done:!1}});pe(String.prototype,de,xe[0]),pe(Pe,ie,xe[1])}oe&&Te(Pe[ie],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(ae,Ge,Re){var fe=ae("../internals/function-bind-native"),pe=Function.prototype,be=pe.apply,Ee=pe.call;Ge.exports=typeof Reflect=="object"&&Reflect.apply||(fe?Ee.bind(be):function(){return Ee.apply(be,arguments)})},{"../internals/function-bind-native":154}],153:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/a-callable"),be=ae("../internals/function-bind-native"),Ee=fe(fe.bind);Ge.exports=function(we,Te){return pe(we),Te===void 0?we:be?Ee(we,Te):function(){return we.apply(Te,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(ae,Ge,Re){var fe=ae("../internals/fails");Ge.exports=!fe(function(){var pe=function(){}.bind();return typeof pe!="function"||pe.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(ae,Ge,Re){var fe=ae("../internals/function-bind-native"),pe=Function.prototype.call;Ge.exports=fe?pe.bind(pe):function(){return pe.apply(pe,arguments)}},{"../internals/function-bind-native":154}],156:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/has-own-property"),be=Function.prototype,Ee=fe&&Object.getOwnPropertyDescriptor,we=pe(be,"name"),Te=we&&function(){}.name==="something",ve=we&&(!fe||fe&&Ee(be,"name").configurable);Ge.exports={EXISTS:we,PROPER:Te,CONFIGURABLE:ve}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(ae,Ge,Re){var fe=ae("../internals/function-bind-native"),pe=Function.prototype,be=pe.bind,Ee=pe.call,we=fe&&be.bind(Ee,Ee);Ge.exports=fe?function(Te){return Te&&we(Te)}:function(Te){return Te&&function(){return Ee.apply(Te,arguments)}}},{"../internals/function-bind-native":154}],158:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-callable"),be=function(Ee){return pe(Ee)?Ee:void 0};Ge.exports=function(Ee,we){return arguments.length<2?be(fe[Ee]):fe[Ee]&&fe[Ee][we]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(ae,Ge,Re){var fe=ae("../internals/classof"),pe=ae("../internals/get-method"),be=ae("../internals/iterators"),Ee=ae("../internals/well-known-symbol"),we=Ee("iterator");Ge.exports=function(Te){if(Te!=null)return pe(Te,we)||pe(Te,"@@iterator")||be[fe(Te)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/function-call"),be=ae("../internals/a-callable"),Ee=ae("../internals/an-object"),we=ae("../internals/try-to-string"),Te=ae("../internals/get-iterator-method"),ve=fe.TypeError;Ge.exports=function(Pe,de){var ee=arguments.length<2?Te(Pe):de;if(be(ee))return Ee(pe(ee,Pe));throw ve(we(Pe)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(ae,Ge,Re){var fe=ae("../internals/a-callable");Ge.exports=function(pe,be){var Ee=pe[be];return Ee==null?void 0:fe(Ee)}},{"../internals/a-callable":95}],162:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/to-object"),be=Math.floor,Ee=fe("".charAt),we=fe("".replace),Te=fe("".slice),ve=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Pe=/\$([$&'`]|\d{1,2})/g;Ge.exports=function(de,ee,z,oe,ie,le){var ue=z+de.length,me=oe.length,xe=Pe;return ie!==void 0&&(ie=pe(ie),xe=ve),we(le,xe,function(Ae,De){var Fe;switch(Ee(De,0)){case"$":return"$";case"&":return de;case"`":return Te(ee,0,z);case"'":return Te(ee,ue);case"<":Fe=ie[Te(De,1,-1)];break;default:var je=+De;if(je===0)return Ae;if(je>me){var Le=be(je/10);return Le===0?Ae:Le<=me?oe[Le-1]===void 0?Ee(De,1):oe[Le-1]+Ee(De,1):Ae}Fe=oe[je-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(ae,Ge,Re){(function(fe){(function(){var pe=function(be){return be&&be.Math==Math&&be};Ge.exports=pe(typeof globalThis=="object"&&globalThis)||pe(typeof window=="object"&&window)||pe(typeof self=="object"&&self)||pe(typeof fe=="object"&&fe)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/to-object"),be=fe({}.hasOwnProperty);Ge.exports=Object.hasOwn||function(we,Te){return be(pe(we),Te)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(ae,Ge,Re){Ge.exports={}},{}],166:[function(ae,Ge,Re){var fe=ae("../internals/global");Ge.exports=function(pe,be){var Ee=fe.console;Ee&&Ee.error&&(arguments.length==1?Ee.error(pe):Ee.error(pe,be))}},{"../internals/global":163}],167:[function(ae,Ge,Re){var fe=ae("../internals/get-built-in");Ge.exports=fe("document","documentElement")},{"../internals/get-built-in":158}],168:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/fails"),be=ae("../internals/document-create-element");Ge.exports=!fe&&!pe(function(){return Object.defineProperty(be("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=fe.Array,be=Math.abs,Ee=Math.pow,we=Math.floor,Te=Math.log,ve=Math.LN2,Pe=function(ee,z,oe){var ie=pe(oe),le=oe*8-z-1,ue=(1<<le)-1,me=ue>>1,xe=z===23?Ee(2,-24)-Ee(2,-77):0,Ae=ee<0||ee===0&&1/ee<0?1:0,De=0,Fe,je,Le;for(ee=be(ee),ee!=ee||ee===1/0?(je=ee!=ee?1:0,Fe=ue):(Fe=we(Te(ee)/ve),Le=Ee(2,-Fe),ee*Le<1&&(Fe--,Le*=2),Fe+me>=1?ee+=xe/Le:ee+=xe*Ee(2,1-me),ee*Le>=2&&(Fe++,Le/=2),Fe+me>=ue?(je=0,Fe=ue):Fe+me>=1?(je=(ee*Le-1)*Ee(2,z),Fe=Fe+me):(je=ee*Ee(2,me-1)*Ee(2,z),Fe=0));z>=8;)ie[De++]=je&255,je/=256,z-=8;for(Fe=Fe<<z|je,le+=z;le>0;)ie[De++]=Fe&255,Fe/=256,le-=8;return ie[--De]|=Ae*128,ie},de=function(ee,z){var oe=ee.length,ie=oe*8-z-1,le=(1<<ie)-1,ue=le>>1,me=ie-7,xe=oe-1,Ae=ee[xe--],De=Ae&127,Fe;for(Ae>>=7;me>0;)De=De*256+ee[xe--],me-=8;for(Fe=De&(1<<-me)-1,De>>=-me,me+=z;me>0;)Fe=Fe*256+ee[xe--],me-=8;if(De===0)De=1-ue;else{if(De===le)return Fe?NaN:Ae?-1/0:1/0;Fe=Fe+Ee(2,z),De=De-ue}return(Ae?-1:1)*Fe*Ee(2,De-z)};Ge.exports={pack:Pe,unpack:de}},{"../internals/global":163}],170:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/fails"),Ee=ae("../internals/classof-raw"),we=fe.Object,Te=pe("".split);Ge.exports=be(function(){return!we("z").propertyIsEnumerable(0)})?function(ve){return Ee(ve)=="String"?Te(ve,""):we(ve)}:we},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(ae,Ge,Re){var fe=ae("../internals/is-callable"),pe=ae("../internals/is-object"),be=ae("../internals/object-set-prototype-of");Ge.exports=function(Ee,we,Te){var ve,Pe;return be&&fe(ve=we.constructor)&&ve!==Te&&pe(Pe=ve.prototype)&&Pe!==Te.prototype&&be(Ee,Pe),Ee}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/is-callable"),be=ae("../internals/shared-store"),Ee=fe(Function.toString);pe(be.inspectSource)||(be.inspectSource=function(we){return Ee(we)}),Ge.exports=be.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(ae,Ge,Re){var fe=ae("../internals/native-weak-map"),pe=ae("../internals/global"),be=ae("../internals/function-uncurry-this"),Ee=ae("../internals/is-object"),we=ae("../internals/create-non-enumerable-property"),Te=ae("../internals/has-own-property"),ve=ae("../internals/shared-store"),Pe=ae("../internals/shared-key"),de=ae("../internals/hidden-keys"),ee="Object already initialized",z=pe.TypeError,oe=pe.WeakMap,ie,le,ue,me=function(Be){return ue(Be)?le(Be):ie(Be,{})},xe=function(Be){return function(Ue){var Je;if(!Ee(Ue)||(Je=le(Ue)).type!==Be)throw z("Incompatible receiver, "+Be+" required");return Je}};if(fe||ve.state){var Ae=ve.state||(ve.state=new oe),De=be(Ae.get),Fe=be(Ae.has),je=be(Ae.set);ie=function(Be,Ue){if(Fe(Ae,Be))throw new z(ee);return Ue.facade=Be,je(Ae,Be,Ue),Ue},le=function(Be){return De(Ae,Be)||{}},ue=function(Be){return Fe(Ae,Be)}}else{var Le=Pe("state");de[Le]=!0,ie=function(Be,Ue){if(Te(Be,Le))throw new z(ee);return Ue.facade=Be,we(Be,Le,Ue),Ue},le=function(Be){return Te(Be,Le)?Be[Le]:{}},ue=function(Be){return Te(Be,Le)}}Ge.exports={set:ie,get:le,has:ue,enforce:me,getterFor:xe}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(ae,Ge,Re){var fe=ae("../internals/well-known-symbol"),pe=ae("../internals/iterators"),be=fe("iterator"),Ee=Array.prototype;Ge.exports=function(we){return we!==void 0&&(pe.Array===we||Ee[be]===we)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(ae,Ge,Re){var fe=ae("../internals/classof-raw");Ge.exports=Array.isArray||function(be){return fe(be)=="Array"}},{"../internals/classof-raw":123}],176:[function(ae,Ge,Re){Ge.exports=function(fe){return typeof fe=="function"}},{}],177:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/fails"),be=ae("../internals/is-callable"),Ee=ae("../internals/classof"),we=ae("../internals/get-built-in"),Te=ae("../internals/inspect-source"),ve=function(){},Pe=[],de=we("Reflect","construct"),ee=/^\s*(?:class|function)\b/,z=fe(ee.exec),oe=!ee.exec(ve),ie=function(me){if(!be(me))return!1;try{return de(ve,Pe,me),!0}catch(xe){return!1}},le=function(me){if(!be(me))return!1;switch(Ee(me)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return oe||!!z(ee,Te(me))}catch(xe){return!0}};le.sham=!0,Ge.exports=!de||pe(function(){var ue;return ie(ie.call)||!ie(Object)||!ie(function(){ue=!0})||ue})?le:ie},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(ae,Ge,Re){var fe=ae("../internals/fails"),pe=ae("../internals/is-callable"),be=/#|\.prototype\./,Ee=function(de,ee){var z=Te[we(de)];return z==Pe?!0:z==ve?!1:pe(ee)?fe(ee):!!ee},we=Ee.normalize=function(de){return String(de).replace(be,".").toLowerCase()},Te=Ee.data={},ve=Ee.NATIVE="N",Pe=Ee.POLYFILL="P";Ge.exports=Ee},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(ae,Ge,Re){var fe=ae("../internals/is-object"),pe=Math.floor;Ge.exports=Number.isInteger||function(Ee){return!fe(Ee)&&isFinite(Ee)&&pe(Ee)===Ee}},{"../internals/is-object":180}],180:[function(ae,Ge,Re){var fe=ae("../internals/is-callable");Ge.exports=function(pe){return typeof pe=="object"?pe!==null:fe(pe)}},{"../internals/is-callable":176}],181:[function(ae,Ge,Re){Ge.exports=!1},{}],182:[function(ae,Ge,Re){var fe=ae("../internals/is-object"),pe=ae("../internals/classof-raw"),be=ae("../internals/well-known-symbol"),Ee=be("match");Ge.exports=function(we){var Te;return fe(we)&&((Te=we[Ee])!==void 0?!!Te:pe(we)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/get-built-in"),be=ae("../internals/is-callable"),Ee=ae("../internals/object-is-prototype-of"),we=ae("../internals/use-symbol-as-uid"),Te=fe.Object;Ge.exports=we?function(ve){return typeof ve=="symbol"}:function(ve){var Pe=pe("Symbol");return be(Pe)&&Ee(Pe.prototype,Te(ve))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/function-bind-context"),be=ae("../internals/function-call"),Ee=ae("../internals/an-object"),we=ae("../internals/try-to-string"),Te=ae("../internals/is-array-iterator-method"),ve=ae("../internals/length-of-array-like"),Pe=ae("../internals/object-is-prototype-of"),de=ae("../internals/get-iterator"),ee=ae("../internals/get-iterator-method"),z=ae("../internals/iterator-close"),oe=fe.TypeError,ie=function(ue,me){this.stopped=ue,this.result=me},le=ie.prototype;Ge.exports=function(ue,me,xe){var Ae=xe&&xe.that,De=!!(xe&&xe.AS_ENTRIES),Fe=!!(xe&&xe.IS_ITERATOR),je=!!(xe&&xe.INTERRUPTED),Le=pe(me,Ae),Be,Ue,Je,He,We,at,ft,mt=function(Xe){return Be&&z(Be,"normal",Xe),new ie(!0,Xe)},Lt=function(Xe){return De?(Ee(Xe),je?Le(Xe[0],Xe[1],mt):Le(Xe[0],Xe[1])):je?Le(Xe,mt):Le(Xe)};if(Fe)Be=ue;else{if(Ue=ee(ue),!Ue)throw oe(we(ue)+" is not iterable");if(Te(Ue)){for(Je=0,He=ve(ue);He>Je;Je++)if(We=Lt(ue[Je]),We&&Pe(le,We))return We;return new ie(!1)}Be=de(ue,Ue)}for(at=Be.next;!(ft=be(at,Be)).done;){try{We=Lt(ft.value)}catch(Xe){z(Be,"throw",Xe)}if(typeof We=="object"&&We&&Pe(le,We))return We}return new ie(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(ae,Ge,Re){var fe=ae("../internals/function-call"),pe=ae("../internals/an-object"),be=ae("../internals/get-method");Ge.exports=function(Ee,we,Te){var ve,Pe;pe(Ee);try{if(ve=be(Ee,"return"),!ve){if(we==="throw")throw Te;return Te}ve=fe(ve,Ee)}catch(de){Pe=!0,ve=de}if(we==="throw")throw Te;if(Pe)throw ve;return pe(ve),Te}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/fails"),pe=ae("../internals/is-callable"),be=ae("../internals/object-create"),Ee=ae("../internals/object-get-prototype-of"),we=ae("../internals/redefine"),Te=ae("../internals/well-known-symbol"),ve=ae("../internals/is-pure"),Pe=Te("iterator"),de=!1,ee,z,oe;[].keys&&(oe=[].keys(),"next"in oe?(z=Ee(Ee(oe)),z!==Object.prototype&&(ee=z)):de=!0);var ie=ee==null||fe(function(){var le={};return ee[Pe].call(le)!==le});ie?ee={}:ve&&(ee=be(ee)),pe(ee[Pe])||we(ee,Pe,function(){return this}),Ge.exports={IteratorPrototype:ee,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(ae,Ge,Re){arguments[4][165][0].apply(Re,arguments)},{dup:165}],188:[function(ae,Ge,Re){var fe=ae("../internals/to-length");Ge.exports=function(pe){return fe(pe.length)}},{"../internals/to-length":249}],189:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/function-bind-context"),be=ae("../internals/object-get-own-property-descriptor").f,Ee=ae("../internals/task").set,we=ae("../internals/engine-is-ios"),Te=ae("../internals/engine-is-ios-pebble"),ve=ae("../internals/engine-is-webos-webkit"),Pe=ae("../internals/engine-is-node"),de=fe.MutationObserver||fe.WebKitMutationObserver,ee=fe.document,z=fe.process,oe=fe.Promise,ie=be(fe,"queueMicrotask"),le=ie&&ie.value,ue,me,xe,Ae,De,Fe,je,Le;le||(ue=function(){var Be,Ue;for(Pe&&(Be=z.domain)&&Be.exit();me;){Ue=me.fn,me=me.next;try{Ue()}catch(Je){throw me?Ae():xe=void 0,Je}}xe=void 0,Be&&Be.enter()},!we&&!Pe&&!ve&&de&&ee?(De=!0,Fe=ee.createTextNode(""),new de(ue).observe(Fe,{characterData:!0}),Ae=function(){Fe.data=De=!De}):!Te&&oe&&oe.resolve?(je=oe.resolve(void 0),je.constructor=oe,Le=pe(je.then,je),Ae=function(){Le(ue)}):Pe?Ae=function(){z.nextTick(ue)}:(Ee=pe(Ee,fe),Ae=function(){Ee(ue)})),Ge.exports=le||function(Be){var Ue={fn:Be,next:void 0};xe&&(xe.next=Ue),me||(me=Ue,Ae()),xe=Ue}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(ae,Ge,Re){var fe=ae("../internals/native-symbol");Ge.exports=fe&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(ae,Ge,Re){var fe=ae("../internals/engine-v8-version"),pe=ae("../internals/fails");Ge.exports=!!Object.getOwnPropertySymbols&&!pe(function(){var be=Symbol();return!String(be)||!(Object(be)instanceof Symbol)||!Symbol.sham&&fe&&fe<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-callable"),be=ae("../internals/inspect-source"),Ee=fe.WeakMap;Ge.exports=pe(Ee)&&/native code/.test(be(Ee))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/a-callable"),pe=function(be){var Ee,we;this.promise=new be(function(Te,ve){if(Ee!==void 0||we!==void 0)throw TypeError("Bad Promise constructor");Ee=Te,we=ve}),this.resolve=fe(Ee),this.reject=fe(we)};Ge.exports.f=function(be){return new pe(be)}},{"../internals/a-callable":95}],194:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-regexp"),be=fe.TypeError;Ge.exports=function(Ee){if(pe(Ee))throw be("The method doesn't accept regular expressions");return Ee}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/descriptors"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/function-call"),Ee=ae("../internals/fails"),we=ae("../internals/object-keys"),Te=ae("../internals/object-get-own-property-symbols"),ve=ae("../internals/object-property-is-enumerable"),Pe=ae("../internals/to-object"),de=ae("../internals/indexed-object"),ee=Object.assign,z=Object.defineProperty,oe=pe([].concat);Ge.exports=!ee||Ee(function(){if(fe&&ee({b:1},ee(z({},"a",{enumerable:!0,get:function(){z(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var ie={},le={},ue=Symbol(),me="abcdefghijklmnopqrst";return ie[ue]=7,me.split("").forEach(function(xe){le[xe]=xe}),ee({},ie)[ue]!=7||we(ee({},le)).join("")!=me})?function(le,ue){for(var me=Pe(le),xe=arguments.length,Ae=1,De=Te.f,Fe=ve.f;xe>Ae;)for(var je=de(arguments[Ae++]),Le=De?oe(we(je),De(je)):we(je),Be=Le.length,Ue=0,Je;Be>Ue;)Je=Le[Ue++],(!fe||be(Fe,je,Je))&&(me[Je]=je[Je]);return me}:ee},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(ae,Ge,Re){var fe=ae("../internals/an-object"),pe=ae("../internals/object-define-properties"),be=ae("../internals/enum-bug-keys"),Ee=ae("../internals/hidden-keys"),we=ae("../internals/html"),Te=ae("../internals/document-create-element"),ve=ae("../internals/shared-key"),Pe=">",de="<",ee="prototype",z="script",oe=ve("IE_PROTO"),ie=function(){},le=function(De){return de+z+Pe+De+de+"/"+z+Pe},ue=function(De){De.write(le("")),De.close();var Fe=De.parentWindow.Object;return De=null,Fe},me=function(){var De=Te("iframe"),Fe="java"+z+":",je;return De.style.display="none",we.appendChild(De),De.src=String(Fe),je=De.contentWindow.document,je.open(),je.write(le("document.F=Object")),je.close(),je.F},xe,Ae=function(){try{xe=new ActiveXObject("htmlfile")}catch(Fe){}Ae=typeof document!="undefined"?document.domain&&xe?ue(xe):me():ue(xe);for(var De=be.length;De--;)delete Ae[ee][be[De]];return Ae()};Ee[oe]=!0,Ge.exports=Object.create||function(Fe,je){var Le;return Fe!==null?(ie[ee]=fe(Fe),Le=new ie,ie[ee]=null,Le[oe]=Fe):Le=Ae(),je===void 0?Le:pe.f(Le,je)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/v8-prototype-define-bug"),be=ae("../internals/object-define-property"),Ee=ae("../internals/an-object"),we=ae("../internals/to-indexed-object"),Te=ae("../internals/object-keys");Re.f=fe&&!pe?Object.defineProperties:function(Pe,de){Ee(Pe);for(var ee=we(de),z=Te(de),oe=z.length,ie=0,le;oe>ie;)be.f(Pe,le=z[ie++],ee[le]);return Pe}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/descriptors"),be=ae("../internals/ie8-dom-define"),Ee=ae("../internals/v8-prototype-define-bug"),we=ae("../internals/an-object"),Te=ae("../internals/to-property-key"),ve=fe.TypeError,Pe=Object.defineProperty,de=Object.getOwnPropertyDescriptor,ee="enumerable",z="configurable",oe="writable";Re.f=pe?Ee?function(le,ue,me){if(we(le),ue=Te(ue),we(me),typeof le=="function"&&ue==="prototype"&&"value"in me&&oe in me&&!me[oe]){var xe=de(le,ue);xe&&xe[oe]&&(le[ue]=me.value,me={configurable:z in me?me[z]:xe[z],enumerable:ee in me?me[ee]:xe[ee],writable:!1})}return Pe(le,ue,me)}:Pe:function(le,ue,me){if(we(le),ue=Te(ue),we(me),be)try{return Pe(le,ue,me)}catch(xe){}if("get"in me||"set"in me)throw ve("Accessors not supported");return"value"in me&&(le[ue]=me.value),le}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/function-call"),be=ae("../internals/object-property-is-enumerable"),Ee=ae("../internals/create-property-descriptor"),we=ae("../internals/to-indexed-object"),Te=ae("../internals/to-property-key"),ve=ae("../internals/has-own-property"),Pe=ae("../internals/ie8-dom-define"),de=Object.getOwnPropertyDescriptor;Re.f=fe?de:function(z,oe){if(z=we(z),oe=Te(oe),Pe)try{return de(z,oe)}catch(ie){}if(ve(z,oe))return Ee(!pe(be.f,z,oe),z[oe])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(ae,Ge,Re){var fe=ae("../internals/classof-raw"),pe=ae("../internals/to-indexed-object"),be=ae("../internals/object-get-own-property-names").f,Ee=ae("../internals/array-slice-simple"),we=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Te=function(ve){try{return be(ve)}catch(Pe){return Ee(we)}};Ge.exports.f=function(Pe){return we&&fe(Pe)=="Window"?Te(Pe):be(pe(Pe))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(ae,Ge,Re){var fe=ae("../internals/object-keys-internal"),pe=ae("../internals/enum-bug-keys"),be=pe.concat("length","prototype");Re.f=Object.getOwnPropertyNames||function(we){return fe(we,be)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(ae,Ge,Re){Re.f=Object.getOwnPropertySymbols},{}],203:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/has-own-property"),be=ae("../internals/is-callable"),Ee=ae("../internals/to-object"),we=ae("../internals/shared-key"),Te=ae("../internals/correct-prototype-getter"),ve=we("IE_PROTO"),Pe=fe.Object,de=Pe.prototype;Ge.exports=Te?Pe.getPrototypeOf:function(ee){var z=Ee(ee);if(pe(z,ve))return z[ve];var oe=z.constructor;return be(oe)&&z instanceof oe?oe.prototype:z instanceof Pe?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(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this");Ge.exports=fe({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/has-own-property"),be=ae("../internals/to-indexed-object"),Ee=ae("../internals/array-includes").indexOf,we=ae("../internals/hidden-keys"),Te=fe([].push);Ge.exports=function(ve,Pe){var de=be(ve),ee=0,z=[],oe;for(oe in de)!pe(we,oe)&&pe(de,oe)&&Te(z,oe);for(;Pe.length>ee;)pe(de,oe=Pe[ee++])&&(~Ee(z,oe)||Te(z,oe));return z}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(ae,Ge,Re){var fe=ae("../internals/object-keys-internal"),pe=ae("../internals/enum-bug-keys");Ge.exports=Object.keys||function(Ee){return fe(Ee,pe)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(ae,Ge,Re){"use strict";var fe={}.propertyIsEnumerable,pe=Object.getOwnPropertyDescriptor,be=pe&&!fe.call({1:2},1);Re.f=be?function(we){var Te=pe(this,we);return!!Te&&Te.enumerable}:fe},{}],208:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/an-object"),be=ae("../internals/a-possible-prototype");Ge.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var Ee=!1,we={},Te;try{Te=fe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Te(we,[]),Ee=we instanceof Array}catch(ve){}return function(Pe,de){return pe(Pe),be(de),Ee?Te(Pe,de):Pe.__proto__=de,Pe}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/object-keys"),Ee=ae("../internals/to-indexed-object"),we=ae("../internals/object-property-is-enumerable").f,Te=pe(we),ve=pe([].push),Pe=function(de){return function(ee){for(var z=Ee(ee),oe=be(z),ie=oe.length,le=0,ue=[],me;ie>le;)me=oe[le++],(!fe||Te(z,me))&&ve(ue,de?[me,z[me]]:z[me]);return ue}};Ge.exports={entries:Pe(!0),values:Pe(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/to-string-tag-support"),pe=ae("../internals/classof");Ge.exports=fe?{}.toString:function(){return"[object "+pe(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/function-call"),be=ae("../internals/is-callable"),Ee=ae("../internals/is-object"),we=fe.TypeError;Ge.exports=function(Te,ve){var Pe,de;if(ve==="string"&&be(Pe=Te.toString)&&!Ee(de=pe(Pe,Te))||be(Pe=Te.valueOf)&&!Ee(de=pe(Pe,Te))||ve!=="string"&&be(Pe=Te.toString)&&!Ee(de=pe(Pe,Te)))return de;throw we("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(ae,Ge,Re){var fe=ae("../internals/get-built-in"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/object-get-own-property-names"),Ee=ae("../internals/object-get-own-property-symbols"),we=ae("../internals/an-object"),Te=pe([].concat);Ge.exports=fe("Reflect","ownKeys")||function(Pe){var de=be.f(we(Pe)),ee=Ee.f;return ee?Te(de,ee(Pe)):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(ae,Ge,Re){var fe=ae("../internals/global");Ge.exports=fe},{"../internals/global":163}],214:[function(ae,Ge,Re){Ge.exports=function(fe){try{return{error:!1,value:fe()}}catch(pe){return{error:!0,value:pe}}}},{}],215:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/promise-native-constructor"),be=ae("../internals/is-callable"),Ee=ae("../internals/is-forced"),we=ae("../internals/inspect-source"),Te=ae("../internals/well-known-symbol"),ve=ae("../internals/engine-is-browser"),Pe=ae("../internals/is-pure"),de=ae("../internals/engine-v8-version"),ee=pe&&pe.prototype,z=Te("species"),oe=!1,ie=be(fe.PromiseRejectionEvent),le=Ee("Promise",function(){var ue=we(pe),me=ue!==String(pe);if(!me&&de===66||Pe&&!(ee.catch&&ee.finally))return!0;if(de>=51&&/native code/.test(ue))return!1;var xe=new pe(function(Fe){Fe(1)}),Ae=function(Fe){Fe(function(){},function(){})},De=xe.constructor={};return De[z]=Ae,oe=xe.then(function(){})instanceof Ae,oe?!me&&ve&&!ie:!0});Ge.exports={CONSTRUCTOR:le,REJECTION_EVENT:ie,SUBCLASSING:oe}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(ae,Ge,Re){var fe=ae("../internals/global");Ge.exports=fe.Promise},{"../internals/global":163}],217:[function(ae,Ge,Re){var fe=ae("../internals/an-object"),pe=ae("../internals/is-object"),be=ae("../internals/new-promise-capability");Ge.exports=function(Ee,we){if(fe(Ee),pe(we)&&we.constructor===Ee)return we;var Te=be.f(Ee),ve=Te.resolve;return ve(we),Te.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(ae,Ge,Re){var fe=ae("../internals/promise-native-constructor"),pe=ae("../internals/check-correctness-of-iteration"),be=ae("../internals/promise-constructor-detection").CONSTRUCTOR;Ge.exports=be||!pe(function(Ee){fe.all(Ee).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(ae,Ge,Re){var fe=ae("../internals/object-define-property").f;Ge.exports=function(pe,be,Ee){Ee in pe||fe(pe,Ee,{configurable:!0,get:function(){return be[Ee]},set:function(we){be[Ee]=we}})}},{"../internals/object-define-property":198}],220:[function(ae,Ge,Re){var fe=function(){this.head=null,this.tail=null};fe.prototype={add:function(pe){var be={item:pe,next:null};this.head?this.tail.next=be:this.head=be,this.tail=be},get:function(){var pe=this.head;if(pe)return this.head=pe.next,this.tail===pe&&(this.tail=null),pe.item}},Ge.exports=fe},{}],221:[function(ae,Ge,Re){var fe=ae("../internals/redefine");Ge.exports=function(pe,be,Ee){for(var we in be)fe(pe,we,be[we],Ee);return pe}},{"../internals/redefine":222}],222:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/is-callable"),be=ae("../internals/has-own-property"),Ee=ae("../internals/create-non-enumerable-property"),we=ae("../internals/set-global"),Te=ae("../internals/inspect-source"),ve=ae("../internals/internal-state"),Pe=ae("../internals/function-name").CONFIGURABLE,de=ve.get,ee=ve.enforce,z=String(String).split("String");(Ge.exports=function(oe,ie,le,ue){var me=ue?!!ue.unsafe:!1,xe=ue?!!ue.enumerable:!1,Ae=ue?!!ue.noTargetGet:!1,De=ue&&ue.name!==void 0?ue.name:ie,Fe;if(pe(le)&&(String(De).slice(0,7)==="Symbol("&&(De="["+String(De).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!be(le,"name")||Pe&&le.name!==De)&&Ee(le,"name",De),Fe=ee(le),Fe.source||(Fe.source=z.join(typeof De=="string"?De:""))),oe===fe){xe?oe[ie]=le:we(ie,le);return}else me?!Ae&&oe[ie]&&(xe=!0):delete oe[ie];xe?oe[ie]=le:Ee(oe,ie,le)})(Function.prototype,"toString",function(){return pe(this)&&de(this).source||Te(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/function-call"),be=ae("../internals/an-object"),Ee=ae("../internals/is-callable"),we=ae("../internals/classof-raw"),Te=ae("../internals/regexp-exec"),ve=fe.TypeError;Ge.exports=function(Pe,de){var ee=Pe.exec;if(Ee(ee)){var z=pe(ee,Pe,de);return z!==null&&be(z),z}if(we(Pe)==="RegExp")return pe(Te,Pe,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(ae,Ge,Re){"use strict";var fe=ae("../internals/function-call"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/to-string"),Ee=ae("../internals/regexp-flags"),we=ae("../internals/regexp-sticky-helpers"),Te=ae("../internals/shared"),ve=ae("../internals/object-create"),Pe=ae("../internals/internal-state").get,de=ae("../internals/regexp-unsupported-dot-all"),ee=ae("../internals/regexp-unsupported-ncg"),z=Te("native-string-replace",String.prototype.replace),oe=RegExp.prototype.exec,ie=oe,le=pe("".charAt),ue=pe("".indexOf),me=pe("".replace),xe=pe("".slice),Ae=function(){var Le=/a/,Be=/b*/g;return fe(oe,Le,"a"),fe(oe,Be,"a"),Le.lastIndex!==0||Be.lastIndex!==0}(),De=we.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,je=Ae||Fe||De||de||ee;je&&(ie=function(Be){var Ue=this,Je=Pe(Ue),He=be(Be),We=Je.raw,at,ft,mt,Lt,Xe,et,lt;if(We)return We.lastIndex=Ue.lastIndex,at=fe(ie,We,He),Ue.lastIndex=We.lastIndex,at;var vt=Je.groups,wt=De&&Ue.sticky,ht=fe(Ee,Ue),dt=Ue.source,ut=0,Pt=He;if(wt&&(ht=me(ht,"y",""),ue(ht,"g")===-1&&(ht+="g"),Pt=xe(He,Ue.lastIndex),Ue.lastIndex>0&&(!Ue.multiline||Ue.multiline&&le(He,Ue.lastIndex-1)!==`
|
|
`)&&(dt="(?: "+dt+")",Pt=" "+Pt,ut++),ft=new RegExp("^(?:"+dt+")",ht)),Fe&&(ft=new RegExp("^"+dt+"$(?!\\s)",ht)),Ae&&(mt=Ue.lastIndex),Lt=fe(oe,wt?ft:Ue,Pt),wt?Lt?(Lt.input=xe(Lt.input,ut),Lt[0]=xe(Lt[0],ut),Lt.index=Ue.lastIndex,Ue.lastIndex+=Lt[0].length):Ue.lastIndex=0:Ae&&Lt&&(Ue.lastIndex=Ue.global?Lt.index+Lt[0].length:mt),Fe&&Lt&&Lt.length>1&&fe(z,Lt[0],ft,function(){for(Xe=1;Xe<arguments.length-2;Xe++)arguments[Xe]===void 0&&(Lt[Xe]=void 0)}),Lt&&vt)for(Lt.groups=et=ve(null),Xe=0;Xe<vt.length;Xe++)lt=vt[Xe],et[lt[0]]=Lt[lt[1]];return Lt}),Ge.exports=ie},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/an-object");Ge.exports=function(){var pe=fe(this),be="";return pe.hasIndices&&(be+="d"),pe.global&&(be+="g"),pe.ignoreCase&&(be+="i"),pe.multiline&&(be+="m"),pe.dotAll&&(be+="s"),pe.unicode&&(be+="u"),pe.sticky&&(be+="y"),be}},{"../internals/an-object":101}],226:[function(ae,Ge,Re){var fe=ae("../internals/function-call"),pe=ae("../internals/has-own-property"),be=ae("../internals/object-is-prototype-of"),Ee=ae("../internals/regexp-flags"),we=RegExp.prototype;Ge.exports=function(Te){var ve=Te.flags;return ve===void 0&&!("flags"in we)&&!pe(Te,"flags")&&be(we,Te)?fe(Ee,Te):ve}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(ae,Ge,Re){var fe=ae("../internals/fails"),pe=ae("../internals/global"),be=pe.RegExp,Ee=fe(function(){var ve=be("a","y");return ve.lastIndex=2,ve.exec("abcd")!=null}),we=Ee||fe(function(){return!be("a","y").sticky}),Te=Ee||fe(function(){var ve=be("^r","gy");return ve.lastIndex=2,ve.exec("str")!=null});Ge.exports={BROKEN_CARET:Te,MISSED_STICKY:we,UNSUPPORTED_Y:Ee}},{"../internals/fails":150,"../internals/global":163}],228:[function(ae,Ge,Re){var fe=ae("../internals/fails"),pe=ae("../internals/global"),be=pe.RegExp;Ge.exports=fe(function(){var Ee=be(".","s");return!(Ee.dotAll&&Ee.exec(`
|
|
`)&&Ee.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(ae,Ge,Re){var fe=ae("../internals/fails"),pe=ae("../internals/global"),be=pe.RegExp;Ge.exports=fe(function(){var Ee=be("(?<a>b)","g");return Ee.exec("b").groups.a!=="b"||"b".replace(Ee,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=fe.TypeError;Ge.exports=function(be){if(be==null)throw pe("Can't call method on "+be);return be}},{"../internals/global":163}],231:[function(ae,Ge,Re){Ge.exports=Object.is||function(pe,be){return pe===be?pe!==0||1/pe===1/be:pe!=pe&&be!=be}},{}],232:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=Object.defineProperty;Ge.exports=function(be,Ee){try{pe(fe,be,{value:Ee,configurable:!0,writable:!0})}catch(we){fe[be]=Ee}return Ee}},{"../internals/global":163}],233:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/get-built-in"),pe=ae("../internals/object-define-property"),be=ae("../internals/well-known-symbol"),Ee=ae("../internals/descriptors"),we=be("species");Ge.exports=function(Te){var ve=fe(Te),Pe=pe.f;Ee&&ve&&!ve[we]&&Pe(ve,we,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(ae,Ge,Re){var fe=ae("../internals/object-define-property").f,pe=ae("../internals/has-own-property"),be=ae("../internals/well-known-symbol"),Ee=be("toStringTag");Ge.exports=function(we,Te,ve){we&&!ve&&(we=we.prototype),we&&!pe(we,Ee)&&fe(we,Ee,{configurable:!0,value:Te})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(ae,Ge,Re){var fe=ae("../internals/shared"),pe=ae("../internals/uid"),be=fe("keys");Ge.exports=function(Ee){return be[Ee]||(be[Ee]=pe(Ee))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/set-global"),be="__core-js_shared__",Ee=fe[be]||pe(be,{});Ge.exports=Ee},{"../internals/global":163,"../internals/set-global":232}],237:[function(ae,Ge,Re){var fe=ae("../internals/is-pure"),pe=ae("../internals/shared-store");(Ge.exports=function(be,Ee){return pe[be]||(pe[be]=Ee!==void 0?Ee:{})})("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(ae,Ge,Re){var fe=ae("../internals/an-object"),pe=ae("../internals/a-constructor"),be=ae("../internals/well-known-symbol"),Ee=be("species");Ge.exports=function(we,Te){var ve=fe(we).constructor,Pe;return ve===void 0||(Pe=fe(ve)[Ee])==null?Te:pe(Pe)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/to-integer-or-infinity"),be=ae("../internals/to-string"),Ee=ae("../internals/require-object-coercible"),we=fe("".charAt),Te=fe("".charCodeAt),ve=fe("".slice),Pe=function(de){return function(ee,z){var oe=be(Ee(ee)),ie=pe(z),le=oe.length,ue,me;return ie<0||ie>=le?de?"":void 0:(ue=Te(oe,ie),ue<55296||ue>56319||ie+1===le||(me=Te(oe,ie+1))<56320||me>57343?de?we(oe,ie):ue:de?ve(oe,ie,ie+2):(ue-55296<<10)+(me-56320)+65536)}};Ge.exports={codeAt:Pe(!1),charAt:Pe(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(ae,Ge,Re){var fe=ae("../internals/function-name").PROPER,pe=ae("../internals/fails"),be=ae("../internals/whitespaces"),Ee="\u200B\x85\u180E";Ge.exports=function(we){return pe(function(){return!!be[we]()||Ee[we]()!==Ee||fe&&be[we].name!==we})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/require-object-coercible"),be=ae("../internals/to-string"),Ee=ae("../internals/whitespaces"),we=fe("".replace),Te="["+Ee+"]",ve=RegExp("^"+Te+Te+"*"),Pe=RegExp(Te+Te+"*$"),de=function(ee){return function(z){var oe=be(pe(z));return ee&1&&(oe=we(oe,ve,"")),ee&2&&(oe=we(oe,Pe,"")),oe}};Ge.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(ae,Ge,Re){var fe=ae("../internals/function-call"),pe=ae("../internals/get-built-in"),be=ae("../internals/well-known-symbol"),Ee=ae("../internals/redefine");Ge.exports=function(){var we=pe("Symbol"),Te=we&&we.prototype,ve=Te&&Te.valueOf,Pe=be("toPrimitive");Te&&!Te[Pe]&&Ee(Te,Pe,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(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/function-apply"),be=ae("../internals/function-bind-context"),Ee=ae("../internals/is-callable"),we=ae("../internals/has-own-property"),Te=ae("../internals/fails"),ve=ae("../internals/html"),Pe=ae("../internals/array-slice"),de=ae("../internals/document-create-element"),ee=ae("../internals/validate-arguments-length"),z=ae("../internals/engine-is-ios"),oe=ae("../internals/engine-is-node"),ie=fe.setImmediate,le=fe.clearImmediate,ue=fe.process,me=fe.Dispatch,xe=fe.Function,Ae=fe.MessageChannel,De=fe.String,Fe=0,je={},Le="onreadystatechange",Be,Ue,Je,He;try{Be=fe.location}catch(Lt){}var We=function(Lt){if(we(je,Lt)){var Xe=je[Lt];delete je[Lt],Xe()}},at=function(Lt){return function(){We(Lt)}},ft=function(Lt){We(Lt.data)},mt=function(Lt){fe.postMessage(De(Lt),Be.protocol+"//"+Be.host)};(!ie||!le)&&(ie=function(Xe){ee(arguments.length,1);var et=Ee(Xe)?Xe:xe(Xe),lt=Pe(arguments,1);return je[++Fe]=function(){pe(et,void 0,lt)},Ue(Fe),Fe},le=function(Xe){delete je[Xe]},oe?Ue=function(Lt){ue.nextTick(at(Lt))}:me&&me.now?Ue=function(Lt){me.now(at(Lt))}:Ae&&!z?(Je=new Ae,He=Je.port2,Je.port1.onmessage=ft,Ue=be(He.postMessage,He)):fe.addEventListener&&Ee(fe.postMessage)&&!fe.importScripts&&Be&&Be.protocol!=="file:"&&!Te(mt)?(Ue=mt,fe.addEventListener("message",ft,!1)):Le in de("script")?Ue=function(Lt){ve.appendChild(de("script"))[Le]=function(){ve.removeChild(this),We(Lt)}}:Ue=function(Lt){setTimeout(at(Lt),0)}),Ge.exports={set:ie,clear:le}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this");Ge.exports=fe(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(ae,Ge,Re){var fe=ae("../internals/to-integer-or-infinity"),pe=Math.max,be=Math.min;Ge.exports=function(Ee,we){var Te=fe(Ee);return Te<0?pe(Te+we,0):be(Te,we)}},{"../internals/to-integer-or-infinity":248}],246:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/to-integer-or-infinity"),be=ae("../internals/to-length"),Ee=fe.RangeError;Ge.exports=function(we){if(we===void 0)return 0;var Te=pe(we),ve=be(Te);if(Te!==ve)throw Ee("Wrong length or index");return ve}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(ae,Ge,Re){var fe=ae("../internals/indexed-object"),pe=ae("../internals/require-object-coercible");Ge.exports=function(be){return fe(pe(be))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(ae,Ge,Re){var fe=Math.ceil,pe=Math.floor;Ge.exports=function(be){var Ee=+be;return Ee!==Ee||Ee===0?0:(Ee>0?pe:fe)(Ee)}},{}],249:[function(ae,Ge,Re){var fe=ae("../internals/to-integer-or-infinity"),pe=Math.min;Ge.exports=function(be){return be>0?pe(fe(be),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/require-object-coercible"),be=fe.Object;Ge.exports=function(Ee){return be(pe(Ee))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/to-positive-integer"),be=fe.RangeError;Ge.exports=function(Ee,we){var Te=pe(Ee);if(Te%we)throw be("Wrong offset");return Te}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/to-integer-or-infinity"),be=fe.RangeError;Ge.exports=function(Ee){var we=pe(Ee);if(we<0)throw be("The argument can't be less than 0");return we}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/function-call"),be=ae("../internals/is-object"),Ee=ae("../internals/is-symbol"),we=ae("../internals/get-method"),Te=ae("../internals/ordinary-to-primitive"),ve=ae("../internals/well-known-symbol"),Pe=fe.TypeError,de=ve("toPrimitive");Ge.exports=function(ee,z){if(!be(ee)||Ee(ee))return ee;var oe=we(ee,de),ie;if(oe){if(z===void 0&&(z="default"),ie=pe(oe,ee,z),!be(ie)||Ee(ie))return ie;throw Pe("Can't convert object to primitive value")}return z===void 0&&(z="number"),Te(ee,z)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(ae,Ge,Re){var fe=ae("../internals/to-primitive"),pe=ae("../internals/is-symbol");Ge.exports=function(be){var Ee=fe(be,"string");return pe(Ee)?Ee:Ee+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(ae,Ge,Re){var fe=ae("../internals/well-known-symbol"),pe=fe("toStringTag"),be={};be[pe]="z",Ge.exports=String(be)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/classof"),be=fe.String;Ge.exports=function(Ee){if(pe(Ee)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return be(Ee)}},{"../internals/classof":124,"../internals/global":163}],257:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=fe.String;Ge.exports=function(be){try{return pe(be)}catch(Ee){return"Object"}}},{"../internals/global":163}],258:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/global"),be=ae("../internals/function-call"),Ee=ae("../internals/descriptors"),we=ae("../internals/typed-array-constructors-require-wrappers"),Te=ae("../internals/array-buffer-view-core"),ve=ae("../internals/array-buffer"),Pe=ae("../internals/an-instance"),de=ae("../internals/create-property-descriptor"),ee=ae("../internals/create-non-enumerable-property"),z=ae("../internals/is-integral-number"),oe=ae("../internals/to-length"),ie=ae("../internals/to-index"),le=ae("../internals/to-offset"),ue=ae("../internals/to-property-key"),me=ae("../internals/has-own-property"),xe=ae("../internals/classof"),Ae=ae("../internals/is-object"),De=ae("../internals/is-symbol"),Fe=ae("../internals/object-create"),je=ae("../internals/object-is-prototype-of"),Le=ae("../internals/object-set-prototype-of"),Be=ae("../internals/object-get-own-property-names").f,Ue=ae("../internals/typed-array-from"),Je=ae("../internals/array-iteration").forEach,He=ae("../internals/set-species"),We=ae("../internals/object-define-property"),at=ae("../internals/object-get-own-property-descriptor"),ft=ae("../internals/internal-state"),mt=ae("../internals/inherit-if-required"),Lt=ft.get,Xe=ft.set,et=We.f,lt=at.f,vt=Math.round,wt=pe.RangeError,ht=ve.ArrayBuffer,dt=ht.prototype,ut=ve.DataView,Pt=Te.NATIVE_ARRAY_BUFFER_VIEWS,yt=Te.TYPED_ARRAY_CONSTRUCTOR,gt=Te.TYPED_ARRAY_TAG,Tt=Te.TypedArray,ct=Te.TypedArrayPrototype,Ye=Te.aTypedArrayConstructor,Ze=Te.isTypedArray,Se="BYTES_PER_ELEMENT",Ne="Wrong length",$e=function(St,Ct){Ye(St);for(var It=0,jt=Ct.length,Kt=new St(jt);jt>It;)Kt[It]=Ct[It++];return Kt},nt=function(St,Ct){et(St,Ct,{get:function(){return Lt(this)[Ct]}})},Ie=function(St){var Ct;return je(dt,St)||(Ct=xe(St))=="ArrayBuffer"||Ct=="SharedArrayBuffer"},ze=function(St,Ct){return Ze(St)&&!De(Ct)&&Ct in St&&z(+Ct)&&Ct>=0},Ve=function(Ct,It){return It=ue(It),ze(Ct,It)?de(2,Ct[It]):lt(Ct,It)},it=function(Ct,It,jt){return It=ue(It),ze(Ct,It)&&Ae(jt)&&me(jt,"value")&&!me(jt,"get")&&!me(jt,"set")&&!jt.configurable&&(!me(jt,"writable")||jt.writable)&&(!me(jt,"enumerable")||jt.enumerable)?(Ct[It]=jt.value,Ct):et(Ct,It,jt)};Ee?(Pt||(at.f=Ve,We.f=it,nt(ct,"buffer"),nt(ct,"byteOffset"),nt(ct,"byteLength"),nt(ct,"length")),fe({target:"Object",stat:!0,forced:!Pt},{getOwnPropertyDescriptor:Ve,defineProperty:it}),Ge.exports=function(St,Ct,It){var jt=St.match(/\d+$/)[0]/8,Kt=St+(It?"Clamped":"")+"Array",an="get"+St,un="set"+St,hn=pe[Kt],qt=hn,On=qt&&qt.prototype,fn={},Wt=function(Yn,fr){var Gr=Lt(Yn);return Gr.view[an](fr*jt+Gr.byteOffset,!0)},Bn=function(Yn,fr,Gr){var lr=Lt(Yn);It&&(Gr=(Gr=vt(Gr))<0?0:Gr>255?255:Gr&255),lr.view[un](fr*jt+lr.byteOffset,Gr,!0)},zn=function(Yn,fr){et(Yn,fr,{get:function(){return Wt(this,fr)},set:function(Gr){return Bn(this,fr,Gr)},enumerable:!0})};Pt?we&&(qt=Ct(function(Yn,fr,Gr,lr){return Pe(Yn,On),mt(function(){return Ae(fr)?Ie(fr)?lr!==void 0?new hn(fr,le(Gr,jt),lr):Gr!==void 0?new hn(fr,le(Gr,jt)):new hn(fr):Ze(fr)?$e(qt,fr):be(Ue,qt,fr):new hn(ie(fr))}(),Yn,qt)}),Le&&Le(qt,Tt),Je(Be(hn),function(Yn){Yn in qt||ee(qt,Yn,hn[Yn])}),qt.prototype=On):(qt=Ct(function(Yn,fr,Gr,lr){Pe(Yn,On);var ni=0,ri=0,ki,ji,Vi;if(!Ae(fr))Vi=ie(fr),ji=Vi*jt,ki=new ht(ji);else if(Ie(fr)){ki=fr,ri=le(Gr,jt);var Io=fr.byteLength;if(lr===void 0){if(Io%jt||(ji=Io-ri,ji<0))throw wt(Ne)}else if(ji=oe(lr)*jt,ji+ri>Io)throw wt(Ne);Vi=ji/jt}else return Ze(fr)?$e(qt,fr):be(Ue,qt,fr);for(Xe(Yn,{buffer:ki,byteOffset:ri,byteLength:ji,length:Vi,view:new ut(ki)});ni<Vi;)zn(Yn,ni++)}),Le&&Le(qt,Tt),On=qt.prototype=Fe(ct)),On.constructor!==qt&&ee(On,"constructor",qt),ee(On,yt,qt),gt&&ee(On,gt,Kt),fn[Kt]=qt,fe({global:!0,forced:qt!=hn,sham:!Pt},fn),Se in qt||ee(qt,Se,jt),Se in On||ee(On,Se,jt),He(Kt)}):Ge.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/fails"),be=ae("../internals/check-correctness-of-iteration"),Ee=ae("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,we=fe.ArrayBuffer,Te=fe.Int8Array;Ge.exports=!Ee||!pe(function(){Te(1)})||!pe(function(){new Te(-1)})||!be(function(ve){new Te,new Te(null),new Te(1.5),new Te(ve)},!0)||pe(function(){return new Te(new we(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(ae,Ge,Re){var fe=ae("../internals/array-from-constructor-and-list"),pe=ae("../internals/typed-array-species-constructor");Ge.exports=function(be,Ee){return fe(pe(be),Ee)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(ae,Ge,Re){var fe=ae("../internals/function-bind-context"),pe=ae("../internals/function-call"),be=ae("../internals/a-constructor"),Ee=ae("../internals/to-object"),we=ae("../internals/length-of-array-like"),Te=ae("../internals/get-iterator"),ve=ae("../internals/get-iterator-method"),Pe=ae("../internals/is-array-iterator-method"),de=ae("../internals/array-buffer-view-core").aTypedArrayConstructor;Ge.exports=function(z){var oe=be(this),ie=Ee(z),le=arguments.length,ue=le>1?arguments[1]:void 0,me=ue!==void 0,xe=ve(ie),Ae,De,Fe,je,Le,Be;if(xe&&!Pe(xe))for(Le=Te(ie,xe),Be=Le.next,ie=[];!(je=pe(Be,Le)).done;)ie.push(je.value);for(me&&le>2&&(ue=fe(ue,arguments[2])),De=we(ie),Fe=new(de(oe))(De),Ae=0;De>Ae;Ae++)Fe[Ae]=me?ue(ie[Ae],Ae):ie[Ae];return Fe}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(ae,Ge,Re){var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/species-constructor"),be=fe.TYPED_ARRAY_CONSTRUCTOR,Ee=fe.aTypedArrayConstructor;Ge.exports=function(we){return Ee(pe(we,we[be]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(ae,Ge,Re){var fe=ae("../internals/function-uncurry-this"),pe=0,be=Math.random(),Ee=fe(1 .toString);Ge.exports=function(we){return"Symbol("+(we===void 0?"":we)+")_"+Ee(++pe+be,36)}},{"../internals/function-uncurry-this":157}],264:[function(ae,Ge,Re){var fe=ae("../internals/native-symbol");Ge.exports=fe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/fails");Ge.exports=fe&&pe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=fe.TypeError;Ge.exports=function(be,Ee){if(be<Ee)throw pe("Not enough arguments");return be}},{"../internals/global":163}],267:[function(ae,Ge,Re){var fe=ae("../internals/well-known-symbol");Re.f=fe},{"../internals/well-known-symbol":268}],268:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/shared"),be=ae("../internals/has-own-property"),Ee=ae("../internals/uid"),we=ae("../internals/native-symbol"),Te=ae("../internals/use-symbol-as-uid"),ve=pe("wks"),Pe=fe.Symbol,de=Pe&&Pe.for,ee=Te?Pe:Pe&&Pe.withoutSetter||Ee;Ge.exports=function(z){if(!be(ve,z)||!(we||typeof ve[z]=="string")){var oe="Symbol."+z;we&&be(Pe,z)?ve[z]=Pe[z]:Te&&de?ve[z]=de(oe):ve[z]=ee(oe)}return ve[z]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(ae,Ge,Re){Ge.exports=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/global"),be=ae("../internals/array-buffer"),Ee=ae("../internals/set-species"),we="ArrayBuffer",Te=be[we],ve=pe[we];fe({global:!0,forced:ve!==Te},{ArrayBuffer:Te}),Ee(we)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/fails"),Ee=ae("../internals/array-buffer"),we=ae("../internals/an-object"),Te=ae("../internals/to-absolute-index"),ve=ae("../internals/to-length"),Pe=ae("../internals/species-constructor"),de=Ee.ArrayBuffer,ee=Ee.DataView,z=ee.prototype,oe=pe(de.prototype.slice),ie=pe(z.getUint8),le=pe(z.setUint8),ue=be(function(){return!new de(2).slice(1,void 0).byteLength});fe({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ue},{slice:function(xe,Ae){if(oe&&Ae===void 0)return oe(we(this),xe);for(var De=we(this).byteLength,Fe=Te(xe,De),je=Te(Ae===void 0?De:Ae,De),Le=new(Pe(this,de))(ve(je-Fe)),Be=new ee(this),Ue=new ee(Le),Je=0;Fe<je;)le(Ue,Je++,ie(Be,Fe++));return Le}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/global"),be=ae("../internals/fails"),Ee=ae("../internals/is-array"),we=ae("../internals/is-object"),Te=ae("../internals/to-object"),ve=ae("../internals/length-of-array-like"),Pe=ae("../internals/create-property"),de=ae("../internals/array-species-create"),ee=ae("../internals/array-method-has-species-support"),z=ae("../internals/well-known-symbol"),oe=ae("../internals/engine-v8-version"),ie=z("isConcatSpreadable"),le=9007199254740991,ue="Maximum allowed index exceeded",me=pe.TypeError,xe=oe>=51||!be(function(){var je=[];return je[ie]=!1,je.concat()[0]!==je}),Ae=ee("concat"),De=function(je){if(!we(je))return!1;var Le=je[ie];return Le!==void 0?!!Le:Ee(je)},Fe=!xe||!Ae;fe({target:"Array",proto:!0,forced:Fe},{concat:function(Le){var Be=Te(this),Ue=de(Be,0),Je=0,He,We,at,ft,mt;for(He=-1,at=arguments.length;He<at;He++)if(mt=He===-1?Be:arguments[He],De(mt)){if(ft=ve(mt),Je+ft>le)throw me(ue);for(We=0;We<ft;We++,Je++)We in mt&&Pe(Ue,Je,mt[We])}else{if(Je>=le)throw me(ue);Pe(Ue,Je++,mt)}return Ue.length=Je,Ue}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/array-fill"),be=ae("../internals/add-to-unscopables");fe({target:"Array",proto:!0},{fill:pe}),be("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/array-iteration").filter,be=ae("../internals/array-method-has-species-support"),Ee=be("filter");fe({target:"Array",proto:!0,forced:!Ee},{filter:function(Te){return pe(this,Te,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/array-iteration").find,be=ae("../internals/add-to-unscopables"),Ee="find",we=!0;Ee in[]&&Array(1)[Ee](function(){we=!1}),fe({target:"Array",proto:!0,forced:we},{find:function(ve){return pe(this,ve,arguments.length>1?arguments[1]:void 0)}}),be(Ee)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/array-from"),be=ae("../internals/check-correctness-of-iteration"),Ee=!be(function(we){Array.from(we)});fe({target:"Array",stat:!0,forced:Ee},{from:pe})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/array-includes").includes,be=ae("../internals/add-to-unscopables");fe({target:"Array",proto:!0},{includes:function(we){return pe(this,we,arguments.length>1?arguments[1]:void 0)}}),be("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/to-indexed-object"),pe=ae("../internals/add-to-unscopables"),be=ae("../internals/iterators"),Ee=ae("../internals/internal-state"),we=ae("../internals/object-define-property").f,Te=ae("../internals/define-iterator"),ve=ae("../internals/is-pure"),Pe=ae("../internals/descriptors"),de="Array Iterator",ee=Ee.set,z=Ee.getterFor(de);Ge.exports=Te(Array,"Array",function(ie,le){ee(this,{type:de,target:fe(ie),index:0,kind:le})},function(){var ie=z(this),le=ie.target,ue=ie.kind,me=ie.index++;return!le||me>=le.length?(ie.target=void 0,{value:void 0,done:!0}):ue=="keys"?{value:me,done:!1}:ue=="values"?{value:le[me],done:!1}:{value:[me,le[me]],done:!1}},"values");var oe=be.Arguments=be.Array;if(pe("keys"),pe("values"),pe("entries"),!ve&&Pe&&oe.name!=="values")try{we(oe,"name",{value:"values"})}catch(ie){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/indexed-object"),Ee=ae("../internals/to-indexed-object"),we=ae("../internals/array-method-is-strict"),Te=pe([].join),ve=be!=Object,Pe=we("join",",");fe({target:"Array",proto:!0,forced:ve||!Pe},{join:function(ee){return Te(Ee(this),ee===void 0?",":ee)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/array-iteration").map,be=ae("../internals/array-method-has-species-support"),Ee=be("map");fe({target:"Array",proto:!0,forced:!Ee},{map:function(Te){return pe(this,Te,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/global"),be=ae("../internals/is-array"),Ee=ae("../internals/is-constructor"),we=ae("../internals/is-object"),Te=ae("../internals/to-absolute-index"),ve=ae("../internals/length-of-array-like"),Pe=ae("../internals/to-indexed-object"),de=ae("../internals/create-property"),ee=ae("../internals/well-known-symbol"),z=ae("../internals/array-method-has-species-support"),oe=ae("../internals/array-slice"),ie=z("slice"),le=ee("species"),ue=pe.Array,me=Math.max;fe({target:"Array",proto:!0,forced:!ie},{slice:function(Ae,De){var Fe=Pe(this),je=ve(Fe),Le=Te(Ae,je),Be=Te(De===void 0?je:De,je),Ue,Je,He;if(be(Fe)&&(Ue=Fe.constructor,Ee(Ue)&&(Ue===ue||be(Ue.prototype))?Ue=void 0:we(Ue)&&(Ue=Ue[le],Ue===null&&(Ue=void 0)),Ue===ue||Ue===void 0))return oe(Fe,Le,Be);for(Je=new(Ue===void 0?ue:Ue)(me(Be-Le,0)),He=0;Le<Be;Le++,He++)Le in Fe&&de(Je,He,Fe[Le]);return Je.length=He,Je}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/a-callable"),Ee=ae("../internals/to-object"),we=ae("../internals/length-of-array-like"),Te=ae("../internals/to-string"),ve=ae("../internals/fails"),Pe=ae("../internals/array-sort"),de=ae("../internals/array-method-is-strict"),ee=ae("../internals/engine-ff-version"),z=ae("../internals/engine-is-ie-or-edge"),oe=ae("../internals/engine-v8-version"),ie=ae("../internals/engine-webkit-version"),le=[],ue=pe(le.sort),me=pe(le.push),xe=ve(function(){le.sort(void 0)}),Ae=ve(function(){le.sort(null)}),De=de("sort"),Fe=!ve(function(){if(oe)return oe<70;if(!(ee&&ee>3)){if(z)return!0;if(ie)return ie<603;var Be="",Ue,Je,He,We;for(Ue=65;Ue<76;Ue++){switch(Je=String.fromCharCode(Ue),Ue){case 66:case 69:case 70:case 72:He=3;break;case 68:case 71:He=4;break;default:He=2}for(We=0;We<47;We++)le.push({k:Je+We,v:He})}for(le.sort(function(at,ft){return ft.v-at.v}),We=0;We<le.length;We++)Je=le[We].k.charAt(0),Be.charAt(Be.length-1)!==Je&&(Be+=Je);return Be!=="DGBEFHACIJK"}}),je=xe||!Ae||!De||!Fe,Le=function(Be){return function(Ue,Je){return Je===void 0?-1:Ue===void 0?1:Be!==void 0?+Be(Ue,Je)||0:Te(Ue)>Te(Je)?1:-1}};fe({target:"Array",proto:!0,forced:je},{sort:function(Ue){Ue!==void 0&&be(Ue);var Je=Ee(this);if(Fe)return Ue===void 0?ue(Je):ue(Je,Ue);var He=[],We=we(Je),at,ft;for(ft=0;ft<We;ft++)ft in Je&&me(He,Je[ft]);for(Pe(He,Le(Ue)),at=He.length,ft=0;ft<at;)Je[ft]=He[ft++];for(;ft<We;)delete Je[ft++];return Je}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/global"),be=ae("../internals/to-absolute-index"),Ee=ae("../internals/to-integer-or-infinity"),we=ae("../internals/length-of-array-like"),Te=ae("../internals/to-object"),ve=ae("../internals/array-species-create"),Pe=ae("../internals/create-property"),de=ae("../internals/array-method-has-species-support"),ee=de("splice"),z=pe.TypeError,oe=Math.max,ie=Math.min,le=9007199254740991,ue="Maximum allowed length exceeded";fe({target:"Array",proto:!0,forced:!ee},{splice:function(xe,Ae){var De=Te(this),Fe=we(De),je=be(xe,Fe),Le=arguments.length,Be,Ue,Je,He,We,at;if(Le===0?Be=Ue=0:Le===1?(Be=0,Ue=Fe-je):(Be=Le-2,Ue=ie(oe(Ee(Ae),0),Fe-je)),Fe+Be-Ue>le)throw z(ue);for(Je=ve(De,Ue),He=0;He<Ue;He++)We=je+He,We in De&&Pe(Je,He,De[We]);if(Je.length=Ue,Be<Ue){for(He=je;He<Fe-Ue;He++)We=He+Ue,at=He+Be,We in De?De[at]=De[We]:delete De[at];for(He=Fe;He>Fe-Ue+Be;He--)delete De[He-1]}else if(Be>Ue)for(He=Fe-Ue;He>je;He--)We=He+Ue-1,at=He+Be-1,We in De?De[at]=De[We]:delete De[at];for(He=0;He<Be;He++)De[He+je]=arguments[He+2];return De.length=Fe-Ue+Be,Je}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/function-name").EXISTS,be=ae("../internals/function-uncurry-this"),Ee=ae("../internals/object-define-property").f,we=Function.prototype,Te=be(we.toString),ve=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Pe=be(ve.exec),de="name";fe&&!pe&&Ee(we,de,{configurable:!0,get:function(){try{return Pe(ve,Te(this))[1]}catch(ee){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/get-built-in"),be=ae("../internals/function-apply"),Ee=ae("../internals/function-call"),we=ae("../internals/function-uncurry-this"),Te=ae("../internals/fails"),ve=ae("../internals/is-array"),Pe=ae("../internals/is-callable"),de=ae("../internals/is-object"),ee=ae("../internals/is-symbol"),z=ae("../internals/array-slice"),oe=ae("../internals/native-symbol"),ie=pe("JSON","stringify"),le=we(/./.exec),ue=we("".charAt),me=we("".charCodeAt),xe=we("".replace),Ae=we(1 .toString),De=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,je=/^[\uDC00-\uDFFF]$/,Le=!oe||Te(function(){var He=pe("Symbol")();return ie([He])!="[null]"||ie({a:He})!="{}"||ie(Object(He))!="{}"}),Be=Te(function(){return ie("\uDF06\uD834")!=='"\\udf06\\ud834"'||ie("\uDEAD")!=='"\\udead"'}),Ue=function(He,We){var at=z(arguments),ft=We;if(!(!de(We)&&He===void 0||ee(He)))return ve(We)||(We=function(mt,Lt){if(Pe(ft)&&(Lt=Ee(ft,this,mt,Lt)),!ee(Lt))return Lt}),at[1]=We,be(ie,null,at)},Je=function(He,We,at){var ft=ue(at,We-1),mt=ue(at,We+1);return le(Fe,He)&&!le(je,mt)||le(je,He)&&!le(Fe,ft)?"\\u"+Ae(me(He,0),16):He};ie&&fe({target:"JSON",stat:!0,forced:Le||Be},{stringify:function(We,at,ft){var mt=z(arguments),Lt=be(Le?Ue:ie,null,mt);return Be&&typeof Lt=="string"?xe(Lt,De,Je):Lt}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/descriptors"),pe=ae("../internals/global"),be=ae("../internals/function-uncurry-this"),Ee=ae("../internals/is-forced"),we=ae("../internals/redefine"),Te=ae("../internals/has-own-property"),ve=ae("../internals/inherit-if-required"),Pe=ae("../internals/object-is-prototype-of"),de=ae("../internals/is-symbol"),ee=ae("../internals/to-primitive"),z=ae("../internals/fails"),oe=ae("../internals/object-get-own-property-names").f,ie=ae("../internals/object-get-own-property-descriptor").f,le=ae("../internals/object-define-property").f,ue=ae("../internals/this-number-value"),me=ae("../internals/string-trim").trim,xe="Number",Ae=pe[xe],De=Ae.prototype,Fe=pe.TypeError,je=be("".slice),Le=be("".charCodeAt),Be=function(ft){var mt=ee(ft,"number");return typeof mt=="bigint"?mt:Ue(mt)},Ue=function(ft){var mt=ee(ft,"number"),Lt,Xe,et,lt,vt,wt,ht,dt;if(de(mt))throw Fe("Cannot convert a Symbol value to a number");if(typeof mt=="string"&&mt.length>2){if(mt=me(mt),Lt=Le(mt,0),Lt===43||Lt===45){if(Xe=Le(mt,2),Xe===88||Xe===120)return NaN}else if(Lt===48){switch(Le(mt,1)){case 66:case 98:et=2,lt=49;break;case 79:case 111:et=8,lt=55;break;default:return+mt}for(vt=je(mt,2),wt=vt.length,ht=0;ht<wt;ht++)if(dt=Le(vt,ht),dt<48||dt>lt)return NaN;return parseInt(vt,et)}}return+mt};if(Ee(xe,!Ae(" 0o1")||!Ae("0b1")||Ae("+0x1"))){for(var Je=function(mt){var Lt=arguments.length<1?0:Ae(Be(mt)),Xe=this;return Pe(De,Xe)&&z(function(){ue(Xe)})?ve(Object(Lt),Xe,Je):Lt},He=fe?oe(Ae):"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(","),We=0,at;He.length>We;We++)Te(Ae,at=He[We])&&!Te(Je,at)&&le(Je,at,ie(Ae,at));Je.prototype=De,De.constructor=Je,we(pe,xe,Je)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/object-assign");fe({target:"Object",stat:!0,forced:Object.assign!==pe},{assign:pe})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/object-to-array").entries;fe({target:"Object",stat:!0},{entries:function(Ee){return pe(Ee)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/native-symbol"),be=ae("../internals/fails"),Ee=ae("../internals/object-get-own-property-symbols"),we=ae("../internals/to-object"),Te=!pe||be(function(){Ee.f(1)});fe({target:"Object",stat:!0,forced:Te},{getOwnPropertySymbols:function(Pe){var de=Ee.f;return de?de(we(Pe)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/to-object"),be=ae("../internals/object-keys"),Ee=ae("../internals/fails"),we=Ee(function(){be(1)});fe({target:"Object",stat:!0,forced:we},{keys:function(ve){return be(pe(ve))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(ae,Ge,Re){var fe=ae("../internals/to-string-tag-support"),pe=ae("../internals/redefine"),be=ae("../internals/object-to-string");fe||pe(Object.prototype,"toString",be,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/function-call"),be=ae("../internals/a-callable"),Ee=ae("../internals/new-promise-capability"),we=ae("../internals/perform"),Te=ae("../internals/iterate"),ve=ae("../internals/promise-statics-incorrect-iteration");fe({target:"Promise",stat:!0,forced:ve},{all:function(de){var ee=this,z=Ee.f(ee),oe=z.resolve,ie=z.reject,le=we(function(){var ue=be(ee.resolve),me=[],xe=0,Ae=1;Te(de,function(De){var Fe=xe++,je=!1;Ae++,pe(ue,ee,De).then(function(Le){je||(je=!0,me[Fe]=Le,--Ae||oe(me))},ie)}),--Ae||oe(me)});return le.error&&ie(le.value),z.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/is-pure"),be=ae("../internals/promise-constructor-detection").CONSTRUCTOR,Ee=ae("../internals/promise-native-constructor"),we=ae("../internals/get-built-in"),Te=ae("../internals/is-callable"),ve=ae("../internals/redefine"),Pe=Ee&&Ee.prototype;if(fe({target:"Promise",proto:!0,forced:be,real:!0},{catch:function(ee){return this.then(void 0,ee)}}),!pe&&Te(Ee)){var de=we("Promise").prototype.catch;Pe.catch!==de&&ve(Pe,"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(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/is-pure"),be=ae("../internals/engine-is-node"),Ee=ae("../internals/global"),we=ae("../internals/function-call"),Te=ae("../internals/redefine"),ve=ae("../internals/redefine-all"),Pe=ae("../internals/object-set-prototype-of"),de=ae("../internals/set-to-string-tag"),ee=ae("../internals/set-species"),z=ae("../internals/a-callable"),oe=ae("../internals/is-callable"),ie=ae("../internals/is-object"),le=ae("../internals/an-instance"),ue=ae("../internals/species-constructor"),me=ae("../internals/task").set,xe=ae("../internals/microtask"),Ae=ae("../internals/host-report-errors"),De=ae("../internals/perform"),Fe=ae("../internals/queue"),je=ae("../internals/internal-state"),Le=ae("../internals/promise-native-constructor"),Be=ae("../internals/promise-constructor-detection"),Ue=ae("../internals/new-promise-capability"),Je="Promise",He=Be.CONSTRUCTOR,We=Be.REJECTION_EVENT,at=Be.SUBCLASSING,ft=je.getterFor(Je),mt=je.set,Lt=Le&&Le.prototype,Xe=Le,et=Lt,lt=Ee.TypeError,vt=Ee.document,wt=Ee.process,ht=Ue.f,dt=ht,ut=!!(vt&&vt.createEvent&&Ee.dispatchEvent),Pt="unhandledrejection",yt="rejectionhandled",gt=0,Tt=1,ct=2,Ye=1,Ze=2,Se,Ne,$e,nt,Ie=function(un){var hn;return ie(un)&&oe(hn=un.then)?hn:!1},ze=function(un,hn){var qt=hn.value,On=hn.state==Tt,fn=On?un.ok:un.fail,Wt=un.resolve,Bn=un.reject,zn=un.domain,Yn,fr,Gr;try{fn?(On||(hn.rejection===Ze&&It(hn),hn.rejection=Ye),fn===!0?Yn=qt:(zn&&zn.enter(),Yn=fn(qt),zn&&(zn.exit(),Gr=!0)),Yn===un.promise?Bn(lt("Promise-chain cycle")):(fr=Ie(Yn))?we(fr,Yn,Wt,Bn):Wt(Yn)):Bn(qt)}catch(lr){zn&&!Gr&&zn.exit(),Bn(lr)}},Ve=function(un,hn){un.notified||(un.notified=!0,xe(function(){for(var qt=un.reactions,On;On=qt.get();)ze(On,un);un.notified=!1,hn&&!un.rejection&&St(un)}))},it=function(un,hn,qt){var On,fn;ut?(On=vt.createEvent("Event"),On.promise=hn,On.reason=qt,On.initEvent(un,!1,!0),Ee.dispatchEvent(On)):On={promise:hn,reason:qt},!We&&(fn=Ee["on"+un])?fn(On):un===Pt&&Ae("Unhandled promise rejection",qt)},St=function(un){we(me,Ee,function(){var hn=un.facade,qt=un.value,On=Ct(un),fn;if(On&&(fn=De(function(){be?wt.emit("unhandledRejection",qt,hn):it(Pt,hn,qt)}),un.rejection=be||Ct(un)?Ze:Ye,fn.error))throw fn.value})},Ct=function(un){return un.rejection!==Ye&&!un.parent},It=function(un){we(me,Ee,function(){var hn=un.facade;be?wt.emit("rejectionHandled",hn):it(yt,hn,un.value)})},jt=function(un,hn,qt){return function(On){un(hn,On,qt)}},Kt=function(un,hn,qt){un.done||(un.done=!0,qt&&(un=qt),un.value=hn,un.state=ct,Ve(un,!0))},an=function(un,hn,qt){if(!un.done){un.done=!0,qt&&(un=qt);try{if(un.facade===hn)throw lt("Promise can't be resolved itself");var On=Ie(hn);On?xe(function(){var fn={done:!1};try{we(On,hn,jt(an,fn,un),jt(Kt,fn,un))}catch(Wt){Kt(fn,Wt,un)}}):(un.value=hn,un.state=Tt,Ve(un,!1))}catch(fn){Kt({done:!1},fn,un)}}};if(He&&(Xe=function(hn){le(this,et),z(hn),we(Se,this);var qt=ft(this);try{hn(jt(an,qt),jt(Kt,qt))}catch(On){Kt(qt,On)}},et=Xe.prototype,Se=function(hn){mt(this,{type:Je,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:gt,value:void 0})},Se.prototype=ve(et,{then:function(hn,qt){var On=ft(this),fn=ht(ue(this,Xe));return On.parent=!0,fn.ok=oe(hn)?hn:!0,fn.fail=oe(qt)&&qt,fn.domain=be?wt.domain:void 0,On.state==gt?On.reactions.add(fn):xe(function(){ze(fn,On)}),fn.promise}}),Ne=function(){var un=new Se,hn=ft(un);this.promise=un,this.resolve=jt(an,hn),this.reject=jt(Kt,hn)},Ue.f=ht=function(un){return un===Xe||un===$e?new Ne(un):dt(un)},!pe&&oe(Le)&&Lt!==Object.prototype)){nt=Lt.then,at||Te(Lt,"then",function(hn,qt){var On=this;return new Xe(function(fn,Wt){we(nt,On,fn,Wt)}).then(hn,qt)},{unsafe:!0});try{delete Lt.constructor}catch(un){}Pe&&Pe(Lt,et)}fe({global:!0,wrap:!0,forced:He},{Promise:Xe}),de(Xe,Je,!1,!0),ee(Je)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(ae,Ge,Re){ae("../modules/es.promise.constructor"),ae("../modules/es.promise.all"),ae("../modules/es.promise.catch"),ae("../modules/es.promise.race"),ae("../modules/es.promise.reject"),ae("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/function-call"),be=ae("../internals/a-callable"),Ee=ae("../internals/new-promise-capability"),we=ae("../internals/perform"),Te=ae("../internals/iterate"),ve=ae("../internals/promise-statics-incorrect-iteration");fe({target:"Promise",stat:!0,forced:ve},{race:function(de){var ee=this,z=Ee.f(ee),oe=z.reject,ie=we(function(){var le=be(ee.resolve);Te(de,function(ue){pe(le,ee,ue).then(z.resolve,oe)})});return ie.error&&oe(ie.value),z.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/function-call"),be=ae("../internals/new-promise-capability"),Ee=ae("../internals/promise-constructor-detection").CONSTRUCTOR;fe({target:"Promise",stat:!0,forced:Ee},{reject:function(Te){var ve=be.f(this);return pe(ve.reject,void 0,Te),ve.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/get-built-in"),be=ae("../internals/is-pure"),Ee=ae("../internals/promise-native-constructor"),we=ae("../internals/promise-constructor-detection").CONSTRUCTOR,Te=ae("../internals/promise-resolve"),ve=pe("Promise"),Pe=be&&!we;fe({target:"Promise",stat:!0,forced:be||we},{resolve:function(ee){return Te(Pe&&this===ve?Ee:this,ee)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(ae,Ge,Re){var fe=ae("../internals/descriptors"),pe=ae("../internals/global"),be=ae("../internals/function-uncurry-this"),Ee=ae("../internals/is-forced"),we=ae("../internals/inherit-if-required"),Te=ae("../internals/create-non-enumerable-property"),ve=ae("../internals/object-get-own-property-names").f,Pe=ae("../internals/object-is-prototype-of"),de=ae("../internals/is-regexp"),ee=ae("../internals/to-string"),z=ae("../internals/regexp-get-flags"),oe=ae("../internals/regexp-sticky-helpers"),ie=ae("../internals/proxy-accessor"),le=ae("../internals/redefine"),ue=ae("../internals/fails"),me=ae("../internals/has-own-property"),xe=ae("../internals/internal-state").enforce,Ae=ae("../internals/set-species"),De=ae("../internals/well-known-symbol"),Fe=ae("../internals/regexp-unsupported-dot-all"),je=ae("../internals/regexp-unsupported-ncg"),Le=De("match"),Be=pe.RegExp,Ue=Be.prototype,Je=pe.SyntaxError,He=be(Ue.exec),We=be("".charAt),at=be("".replace),ft=be("".indexOf),mt=be("".slice),Lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Xe=/a/g,et=/a/g,lt=new Be(Xe)!==Xe,vt=oe.MISSED_STICKY,wt=oe.UNSUPPORTED_Y,ht=fe&&(!lt||vt||Fe||je||ue(function(){return et[Le]=!1,Be(Xe)!=Xe||Be(et)==et||Be(Xe,"i")!="/a/i"})),dt=function(Tt){for(var ct=Tt.length,Ye=0,Ze="",Se=!1,Ne;Ye<=ct;Ye++){if(Ne=We(Tt,Ye),Ne==="\\"){Ze+=Ne+We(Tt,++Ye);continue}!Se&&Ne==="."?Ze+="[\\s\\S]":(Ne==="["?Se=!0:Ne==="]"&&(Se=!1),Ze+=Ne)}return Ze},ut=function(Tt){for(var ct=Tt.length,Ye=0,Ze="",Se=[],Ne={},$e=!1,nt=!1,Ie=0,ze="",Ve;Ye<=ct;Ye++){if(Ve=We(Tt,Ye),Ve==="\\")Ve=Ve+We(Tt,++Ye);else if(Ve==="]")$e=!1;else if(!$e)switch(!0){case Ve==="[":$e=!0;break;case Ve==="(":He(Lt,mt(Tt,Ye+1))&&(Ye+=2,nt=!0),Ze+=Ve,Ie++;continue;case(Ve===">"&&nt):if(ze===""||me(Ne,ze))throw new Je("Invalid capture group name");Ne[ze]=!0,Se[Se.length]=[ze,Ie],nt=!1,ze="";continue}nt?ze+=Ve:Ze+=Ve}return[Ze,Se]};if(Ee("RegExp",ht)){for(var Pt=function(ct,Ye){var Ze=Pe(Ue,this),Se=de(ct),Ne=Ye===void 0,$e=[],nt=ct,Ie,ze,Ve,it,St,Ct;if(!Ze&&Se&&Ne&&ct.constructor===Pt)return ct;if((Se||Pe(Ue,ct))&&(ct=ct.source,Ne&&(Ye=z(nt))),ct=ct===void 0?"":ee(ct),Ye=Ye===void 0?"":ee(Ye),nt=ct,Fe&&"dotAll"in Xe&&(ze=!!Ye&&ft(Ye,"s")>-1,ze&&(Ye=at(Ye,/s/g,""))),Ie=Ye,vt&&"sticky"in Xe&&(Ve=!!Ye&&ft(Ye,"y")>-1,Ve&&wt&&(Ye=at(Ye,/y/g,""))),je&&(it=ut(ct),ct=it[0],$e=it[1]),St=we(Be(ct,Ye),Ze?this:Ue,Pt),(ze||Ve||$e.length)&&(Ct=xe(St),ze&&(Ct.dotAll=!0,Ct.raw=Pt(dt(ct),Ie)),Ve&&(Ct.sticky=!0),$e.length&&(Ct.groups=$e)),ct!==nt)try{Te(St,"source",nt===""?"(?:)":nt)}catch(It){}return St},yt=ve(Be),gt=0;yt.length>gt;)ie(Pt,Be,yt[gt++]);Ue.constructor=Pt,Pt.prototype=Ue,le(pe,"RegExp",Pt)}Ae("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/regexp-exec");fe({target:"RegExp",proto:!0,forced:/./.exec!==pe},{exec:pe})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/function-name").PROPER,pe=ae("../internals/redefine"),be=ae("../internals/an-object"),Ee=ae("../internals/to-string"),we=ae("../internals/fails"),Te=ae("../internals/regexp-get-flags"),ve="toString",Pe=RegExp.prototype,de=Pe[ve],ee=we(function(){return de.call({source:"a",flags:"b"})!="/a/b"}),z=fe&&de.name!=ve;(ee||z)&&pe(RegExp.prototype,ve,function(){var ie=be(this),le=Ee(ie.source),ue=Ee(Te(ie));return"/"+le+"/"+ue},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/not-a-regexp"),Ee=ae("../internals/require-object-coercible"),we=ae("../internals/to-string"),Te=ae("../internals/correct-is-regexp-logic"),ve=pe("".indexOf);fe({target:"String",proto:!0,forced:!Te("includes")},{includes:function(de){return!!~ve(we(Ee(this)),we(be(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(ae,Ge,Re){"use strict";var fe=ae("../internals/string-multibyte").charAt,pe=ae("../internals/to-string"),be=ae("../internals/internal-state"),Ee=ae("../internals/define-iterator"),we="String Iterator",Te=be.set,ve=be.getterFor(we);Ee(String,"String",function(Pe){Te(this,{type:we,string:pe(Pe),index:0})},function(){var de=ve(this),ee=de.string,z=de.index,oe;return z>=ee.length?{value:void 0,done:!0}:(oe=fe(ee,z),de.index+=oe.length,{value:oe,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/function-call"),pe=ae("../internals/fix-regexp-well-known-symbol-logic"),be=ae("../internals/an-object"),Ee=ae("../internals/to-length"),we=ae("../internals/to-string"),Te=ae("../internals/require-object-coercible"),ve=ae("../internals/get-method"),Pe=ae("../internals/advance-string-index"),de=ae("../internals/regexp-exec-abstract");pe("match",function(ee,z,oe){return[function(le){var ue=Te(this),me=le==null?void 0:ve(le,ee);return me?fe(me,le,ue):new RegExp(le)[ee](we(ue))},function(ie){var le=be(this),ue=we(ie),me=oe(z,le,ue);if(me.done)return me.value;if(!le.global)return de(le,ue);var xe=le.unicode;le.lastIndex=0;for(var Ae=[],De=0,Fe;(Fe=de(le,ue))!==null;){var je=we(Fe[0]);Ae[De]=je,je===""&&(le.lastIndex=Pe(ue,Ee(le.lastIndex),xe)),De++}return De===0?null:Ae}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/function-apply"),pe=ae("../internals/function-call"),be=ae("../internals/function-uncurry-this"),Ee=ae("../internals/fix-regexp-well-known-symbol-logic"),we=ae("../internals/fails"),Te=ae("../internals/an-object"),ve=ae("../internals/is-callable"),Pe=ae("../internals/to-integer-or-infinity"),de=ae("../internals/to-length"),ee=ae("../internals/to-string"),z=ae("../internals/require-object-coercible"),oe=ae("../internals/advance-string-index"),ie=ae("../internals/get-method"),le=ae("../internals/get-substitution"),ue=ae("../internals/regexp-exec-abstract"),me=ae("../internals/well-known-symbol"),xe=me("replace"),Ae=Math.max,De=Math.min,Fe=be([].concat),je=be([].push),Le=be("".indexOf),Be=be("".slice),Ue=function(at){return at===void 0?at:String(at)},Je=function(){return"a".replace(/./,"$0")==="$0"}(),He=function(){return/./[xe]?/./[xe]("a","$0")==="":!1}(),We=!we(function(){var at=/./;return at.exec=function(){var ft=[];return ft.groups={a:"7"},ft},"".replace(at,"$<a>")!=="7"});Ee("replace",function(at,ft,mt){var Lt=He?"$":"$0";return[function(et,lt){var vt=z(this),wt=et==null?void 0:ie(et,xe);return wt?pe(wt,et,vt,lt):pe(ft,ee(vt),et,lt)},function(Xe,et){var lt=Te(this),vt=ee(Xe);if(typeof et=="string"&&Le(et,Lt)===-1&&Le(et,"$<")===-1){var wt=mt(ft,lt,vt,et);if(wt.done)return wt.value}var ht=ve(et);ht||(et=ee(et));var dt=lt.global;if(dt){var ut=lt.unicode;lt.lastIndex=0}for(var Pt=[];;){var yt=ue(lt,vt);if(yt===null||(je(Pt,yt),!dt))break;var gt=ee(yt[0]);gt===""&&(lt.lastIndex=oe(vt,de(lt.lastIndex),ut))}for(var Tt="",ct=0,Ye=0;Ye<Pt.length;Ye++){yt=Pt[Ye];for(var Ze=ee(yt[0]),Se=Ae(De(Pe(yt.index),vt.length),0),Ne=[],$e=1;$e<yt.length;$e++)je(Ne,Ue(yt[$e]));var nt=yt.groups;if(ht){var Ie=Fe([Ze],Ne,Se,vt);nt!==void 0&&je(Ie,nt);var ze=ee(fe(et,void 0,Ie))}else ze=le(Ze,vt,Se,Ne,nt,et);Se>=ct&&(Tt+=Be(vt,ct,Se)+ze,ct=Se+Ze.length)}return Tt+Be(vt,ct)}]},!We||!Je||He)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/function-call"),pe=ae("../internals/fix-regexp-well-known-symbol-logic"),be=ae("../internals/an-object"),Ee=ae("../internals/require-object-coercible"),we=ae("../internals/same-value"),Te=ae("../internals/to-string"),ve=ae("../internals/get-method"),Pe=ae("../internals/regexp-exec-abstract");pe("search",function(de,ee,z){return[function(ie){var le=Ee(this),ue=ie==null?void 0:ve(ie,de);return ue?fe(ue,ie,le):new RegExp(ie)[de](Te(le))},function(oe){var ie=be(this),le=Te(oe),ue=z(ee,ie,le);if(ue.done)return ue.value;var me=ie.lastIndex;we(me,0)||(ie.lastIndex=0);var xe=Pe(ie,le);return we(ie.lastIndex,me)||(ie.lastIndex=me),xe===null?-1:xe.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/function-apply"),pe=ae("../internals/function-call"),be=ae("../internals/function-uncurry-this"),Ee=ae("../internals/fix-regexp-well-known-symbol-logic"),we=ae("../internals/is-regexp"),Te=ae("../internals/an-object"),ve=ae("../internals/require-object-coercible"),Pe=ae("../internals/species-constructor"),de=ae("../internals/advance-string-index"),ee=ae("../internals/to-length"),z=ae("../internals/to-string"),oe=ae("../internals/get-method"),ie=ae("../internals/array-slice-simple"),le=ae("../internals/regexp-exec-abstract"),ue=ae("../internals/regexp-exec"),me=ae("../internals/regexp-sticky-helpers"),xe=ae("../internals/fails"),Ae=me.UNSUPPORTED_Y,De=4294967295,Fe=Math.min,je=[].push,Le=be(/./.exec),Be=be(je),Ue=be("".slice),Je=!xe(function(){var He=/(?:)/,We=He.exec;He.exec=function(){return We.apply(this,arguments)};var at="ab".split(He);return at.length!==2||at[0]!=="a"||at[1]!=="b"});Ee("split",function(He,We,at){var ft;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?ft=function(mt,Lt){var Xe=z(ve(this)),et=Lt===void 0?De:Lt>>>0;if(et===0)return[];if(mt===void 0)return[Xe];if(!we(mt))return pe(We,Xe,mt,et);for(var lt=[],vt=(mt.ignoreCase?"i":"")+(mt.multiline?"m":"")+(mt.unicode?"u":"")+(mt.sticky?"y":""),wt=0,ht=new RegExp(mt.source,vt+"g"),dt,ut,Pt;(dt=pe(ue,ht,Xe))&&(ut=ht.lastIndex,!(ut>wt&&(Be(lt,Ue(Xe,wt,dt.index)),dt.length>1&&dt.index<Xe.length&&fe(je,lt,ie(dt,1)),Pt=dt[0].length,wt=ut,lt.length>=et)));)ht.lastIndex===dt.index&&ht.lastIndex++;return wt===Xe.length?(Pt||!Le(ht,""))&&Be(lt,""):Be(lt,Ue(Xe,wt)),lt.length>et?ie(lt,0,et):lt}:"0".split(void 0,0).length?ft=function(mt,Lt){return mt===void 0&&Lt===0?[]:pe(We,this,mt,Lt)}:ft=We,[function(Lt,Xe){var et=ve(this),lt=Lt==null?void 0:oe(Lt,He);return lt?pe(lt,Lt,et,Xe):pe(ft,z(et),Lt,Xe)},function(mt,Lt){var Xe=Te(this),et=z(mt),lt=at(ft,Xe,et,Lt,ft!==We);if(lt.done)return lt.value;var vt=Pe(Xe,RegExp),wt=Xe.unicode,ht=(Xe.ignoreCase?"i":"")+(Xe.multiline?"m":"")+(Xe.unicode?"u":"")+(Ae?"g":"y"),dt=new vt(Ae?"^(?:"+Xe.source+")":Xe,ht),ut=Lt===void 0?De:Lt>>>0;if(ut===0)return[];if(et.length===0)return le(dt,et)===null?[et]:[];for(var Pt=0,yt=0,gt=[];yt<et.length;){dt.lastIndex=Ae?0:yt;var Tt=le(dt,Ae?Ue(et,yt):et),ct;if(Tt===null||(ct=Fe(ee(dt.lastIndex+(Ae?yt:0)),et.length))===Pt)yt=de(et,yt,wt);else{if(Be(gt,Ue(et,Pt,yt)),gt.length===ut)return gt;for(var Ye=1;Ye<=Tt.length-1;Ye++)if(Be(gt,Tt[Ye]),gt.length===ut)return gt;yt=Pt=ct}}return Be(gt,Ue(et,Pt)),gt}]},!Je,Ae)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/string-trim").trim,be=ae("../internals/string-trim-forced");fe({target:"String",proto:!0,forced:be("trim")},{trim:function(){return pe(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/global"),be=ae("../internals/function-call"),Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/is-pure"),Te=ae("../internals/descriptors"),ve=ae("../internals/native-symbol"),Pe=ae("../internals/fails"),de=ae("../internals/has-own-property"),ee=ae("../internals/object-is-prototype-of"),z=ae("../internals/an-object"),oe=ae("../internals/to-indexed-object"),ie=ae("../internals/to-property-key"),le=ae("../internals/to-string"),ue=ae("../internals/create-property-descriptor"),me=ae("../internals/object-create"),xe=ae("../internals/object-keys"),Ae=ae("../internals/object-get-own-property-names"),De=ae("../internals/object-get-own-property-names-external"),Fe=ae("../internals/object-get-own-property-symbols"),je=ae("../internals/object-get-own-property-descriptor"),Le=ae("../internals/object-define-property"),Be=ae("../internals/object-define-properties"),Ue=ae("../internals/object-property-is-enumerable"),Je=ae("../internals/redefine"),He=ae("../internals/shared"),We=ae("../internals/shared-key"),at=ae("../internals/hidden-keys"),ft=ae("../internals/uid"),mt=ae("../internals/well-known-symbol"),Lt=ae("../internals/well-known-symbol-wrapped"),Xe=ae("../internals/define-well-known-symbol"),et=ae("../internals/symbol-define-to-primitive"),lt=ae("../internals/set-to-string-tag"),vt=ae("../internals/internal-state"),wt=ae("../internals/array-iteration").forEach,ht=We("hidden"),dt="Symbol",ut="prototype",Pt=vt.set,yt=vt.getterFor(dt),gt=Object[ut],Tt=pe.Symbol,ct=Tt&&Tt[ut],Ye=pe.TypeError,Ze=pe.QObject,Se=je.f,Ne=Le.f,$e=De.f,nt=Ue.f,Ie=Ee([].push),ze=He("symbols"),Ve=He("op-symbols"),it=He("wks"),St=!Ze||!Ze[ut]||!Ze[ut].findChild,Ct=Te&&Pe(function(){return me(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a!=7})?function(fn,Wt,Bn){var zn=Se(gt,Wt);zn&&delete gt[Wt],Ne(fn,Wt,Bn),zn&&fn!==gt&&Ne(gt,Wt,zn)}:Ne,It=function(fn,Wt){var Bn=ze[fn]=me(ct);return Pt(Bn,{type:dt,tag:fn,description:Wt}),Te||(Bn.description=Wt),Bn},jt=function(Wt,Bn,zn){Wt===gt&&jt(Ve,Bn,zn),z(Wt);var Yn=ie(Bn);return z(zn),de(ze,Yn)?(zn.enumerable?(de(Wt,ht)&&Wt[ht][Yn]&&(Wt[ht][Yn]=!1),zn=me(zn,{enumerable:ue(0,!1)})):(de(Wt,ht)||Ne(Wt,ht,ue(1,{})),Wt[ht][Yn]=!0),Ct(Wt,Yn,zn)):Ne(Wt,Yn,zn)},Kt=function(Wt,Bn){z(Wt);var zn=oe(Bn),Yn=xe(zn).concat(On(zn));return wt(Yn,function(fr){(!Te||be(un,zn,fr))&&jt(Wt,fr,zn[fr])}),Wt},an=function(Wt,Bn){return Bn===void 0?me(Wt):Kt(me(Wt),Bn)},un=function(Wt){var Bn=ie(Wt),zn=be(nt,this,Bn);return this===gt&&de(ze,Bn)&&!de(Ve,Bn)?!1:zn||!de(this,Bn)||!de(ze,Bn)||de(this,ht)&&this[ht][Bn]?zn:!0},hn=function(Wt,Bn){var zn=oe(Wt),Yn=ie(Bn);if(!(zn===gt&&de(ze,Yn)&&!de(Ve,Yn))){var fr=Se(zn,Yn);return fr&&de(ze,Yn)&&!(de(zn,ht)&&zn[ht][Yn])&&(fr.enumerable=!0),fr}},qt=function(Wt){var Bn=$e(oe(Wt)),zn=[];return wt(Bn,function(Yn){!de(ze,Yn)&&!de(at,Yn)&&Ie(zn,Yn)}),zn},On=function(fn){var Wt=fn===gt,Bn=$e(Wt?Ve:oe(fn)),zn=[];return wt(Bn,function(Yn){de(ze,Yn)&&(!Wt||de(gt,Yn))&&Ie(zn,ze[Yn])}),zn};ve||(Tt=function(){if(ee(ct,this))throw Ye("Symbol is not a constructor");var Wt=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),Bn=ft(Wt),zn=function(Yn){this===gt&&be(zn,Ve,Yn),de(this,ht)&&de(this[ht],Bn)&&(this[ht][Bn]=!1),Ct(this,Bn,ue(1,Yn))};return Te&&St&&Ct(gt,Bn,{configurable:!0,set:zn}),It(Bn,Wt)},ct=Tt[ut],Je(ct,"toString",function(){return yt(this).tag}),Je(Tt,"withoutSetter",function(fn){return It(ft(fn),fn)}),Ue.f=un,Le.f=jt,Be.f=Kt,je.f=hn,Ae.f=De.f=qt,Fe.f=On,Lt.f=function(fn){return It(mt(fn),fn)},Te&&(Ne(ct,"description",{configurable:!0,get:function(){return yt(this).description}}),we||Je(gt,"propertyIsEnumerable",un,{unsafe:!0}))),fe({global:!0,wrap:!0,forced:!ve,sham:!ve},{Symbol:Tt}),wt(xe(it),function(fn){Xe(fn)}),fe({target:dt,stat:!0,forced:!ve},{useSetter:function(){St=!0},useSimple:function(){St=!1}}),fe({target:"Object",stat:!0,forced:!ve,sham:!Te},{create:an,defineProperty:jt,defineProperties:Kt,getOwnPropertyDescriptor:hn}),fe({target:"Object",stat:!0,forced:!ve},{getOwnPropertyNames:qt}),et(),lt(Tt,dt),at[ht]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/export"),pe=ae("../internals/descriptors"),be=ae("../internals/global"),Ee=ae("../internals/function-uncurry-this"),we=ae("../internals/has-own-property"),Te=ae("../internals/is-callable"),ve=ae("../internals/object-is-prototype-of"),Pe=ae("../internals/to-string"),de=ae("../internals/object-define-property").f,ee=ae("../internals/copy-constructor-properties"),z=be.Symbol,oe=z&&z.prototype;if(pe&&Te(z)&&(!("description"in oe)||z().description!==void 0)){var ie={},le=function(){var Le=arguments.length<1||arguments[0]===void 0?void 0:Pe(arguments[0]),Be=ve(oe,this)?new z(Le):Le===void 0?z():z(Le);return Le===""&&(ie[Be]=!0),Be};ee(le,z),le.prototype=oe,oe.constructor=le;var ue=String(z("test"))=="Symbol(test)",me=Ee(oe.toString),xe=Ee(oe.valueOf),Ae=/^Symbol\((.*)\)[^)]+$/,De=Ee("".replace),Fe=Ee("".slice);de(oe,"description",{configurable:!0,get:function(){var Le=xe(this),Be=me(Le);if(we(ie,Le))return"";var Ue=ue?Fe(Be,7,-1):De(Be,Ae,"$1");return Ue===""?void 0:Ue}}),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(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/get-built-in"),be=ae("../internals/has-own-property"),Ee=ae("../internals/to-string"),we=ae("../internals/shared"),Te=ae("../internals/native-symbol-registry"),ve=we("string-to-symbol-registry"),Pe=we("symbol-to-string-registry");fe({target:"Symbol",stat:!0,forced:!Te},{for:function(de){var ee=Ee(de);if(be(ve,ee))return ve[ee];var z=pe("Symbol")(ee);return ve[ee]=z,Pe[z]=ee,z}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(ae,Ge,Re){var fe=ae("../internals/define-well-known-symbol");fe("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(ae,Ge,Re){ae("../modules/es.symbol.constructor"),ae("../modules/es.symbol.for"),ae("../modules/es.symbol.key-for"),ae("../modules/es.json.stringify"),ae("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(ae,Ge,Re){var fe=ae("../internals/export"),pe=ae("../internals/has-own-property"),be=ae("../internals/is-symbol"),Ee=ae("../internals/try-to-string"),we=ae("../internals/shared"),Te=ae("../internals/native-symbol-registry"),ve=we("symbol-to-string-registry");fe({target:"Symbol",stat:!0,forced:!Te},{keyFor:function(de){if(!be(de))throw TypeError(Ee(de)+" is not a symbol");if(pe(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(ae,Ge,Re){"use strict";var fe=ae("../internals/function-uncurry-this"),pe=ae("../internals/array-buffer-view-core"),be=ae("../internals/array-copy-within"),Ee=fe(be),we=pe.aTypedArray,Te=pe.exportTypedArrayMethod;Te("copyWithin",function(Pe,de){return Ee(we(this),Pe,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(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-iteration").every,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("every",function(Te){return pe(be(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/function-call"),be=ae("../internals/array-fill"),Ee=fe.aTypedArray,we=fe.exportTypedArrayMethod;we("fill",function(ve){var Pe=arguments.length;return pe(be,Ee(this),ve,Pe>1?arguments[1]:void 0,Pe>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-iteration").filter,be=ae("../internals/typed-array-from-species-and-list"),Ee=fe.aTypedArray,we=fe.exportTypedArrayMethod;we("filter",function(ve){var Pe=pe(Ee(this),ve,arguments.length>1?arguments[1]:void 0);return be(this,Pe)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-iteration").findIndex,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("findIndex",function(Te){return pe(be(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-iteration").find,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("find",function(Te){return pe(be(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-iteration").forEach,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("forEach",function(Te){pe(be(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-includes").includes,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("includes",function(Te){return pe(be(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-includes").indexOf,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("indexOf",function(Te){return pe(be(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/global"),pe=ae("../internals/fails"),be=ae("../internals/function-uncurry-this"),Ee=ae("../internals/array-buffer-view-core"),we=ae("../modules/es.array.iterator"),Te=ae("../internals/well-known-symbol"),ve=Te("iterator"),Pe=fe.Uint8Array,de=be(we.values),ee=be(we.keys),z=be(we.entries),oe=Ee.aTypedArray,ie=Ee.exportTypedArrayMethod,le=Pe&&Pe.prototype,ue=!pe(function(){le[ve].call([1])}),me=!!le&&le.values&&le[ve]===le.values&&le.values.name==="values",xe=function(){return de(oe(this))};ie("entries",function(){return z(oe(this))},ue),ie("keys",function(){return ee(oe(this))},ue),ie("values",xe,ue||!me,{name:"values"}),ie(ve,xe,ue||!me,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/function-uncurry-this"),be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod,we=pe([].join);Ee("join",function(ve){return we(be(this),ve)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/function-apply"),be=ae("../internals/array-last-index-of"),Ee=fe.aTypedArray,we=fe.exportTypedArrayMethod;we("lastIndexOf",function(ve){var Pe=arguments.length;return pe(be,Ee(this),Pe>1?[ve,arguments[1]]:[ve])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-iteration").map,be=ae("../internals/typed-array-species-constructor"),Ee=fe.aTypedArray,we=fe.exportTypedArrayMethod;we("map",function(ve){return pe(Ee(this),ve,arguments.length>1?arguments[1]:void 0,function(Pe,de){return new(be(Pe))(de)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-reduce").right,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("reduceRight",function(Te){var ve=arguments.length;return pe(be(this),Te,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-reduce").left,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("reduce",function(Te){var ve=arguments.length;return pe(be(this),Te,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=fe.aTypedArray,be=fe.exportTypedArrayMethod,Ee=Math.floor;be("reverse",function(){for(var Te=this,ve=pe(Te).length,Pe=Ee(ve/2),de=0,ee;de<Pe;)ee=Te[de],Te[de++]=Te[--ve],Te[ve]=ee;return Te})},{"../internals/array-buffer-view-core":103}],331:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/global"),pe=ae("../internals/function-call"),be=ae("../internals/array-buffer-view-core"),Ee=ae("../internals/length-of-array-like"),we=ae("../internals/to-offset"),Te=ae("../internals/to-object"),ve=ae("../internals/fails"),Pe=fe.RangeError,de=fe.Int8Array,ee=de&&de.prototype,z=ee&&ee.set,oe=be.aTypedArray,ie=be.exportTypedArrayMethod,le=!ve(function(){var me=new Uint8ClampedArray(2);return pe(z,me,{length:1,0:3},1),me[1]!==3}),ue=le&&be.NATIVE_ARRAY_BUFFER_VIEWS&&ve(function(){var me=new de(2);return me.set(1),me.set("2",1),me[0]!==0||me[1]!==2});ie("set",function(xe){oe(this);var Ae=we(arguments.length>1?arguments[1]:void 0,1),De=Te(xe);if(le)return pe(z,this,De,Ae);var Fe=this.length,je=Ee(De),Le=0;if(je+Ae>Fe)throw Pe("Wrong length");for(;Le<je;)this[Ae+Le]=De[Le++]},!le||ue)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/typed-array-species-constructor"),be=ae("../internals/fails"),Ee=ae("../internals/array-slice"),we=fe.aTypedArray,Te=fe.exportTypedArrayMethod,ve=be(function(){new Int8Array(1).slice()});Te("slice",function(de,ee){for(var z=Ee(we(this),de,ee),oe=pe(this),ie=0,le=z.length,ue=new oe(le);le>ie;)ue[ie]=z[ie++];return ue},ve)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/array-iteration").some,be=fe.aTypedArray,Ee=fe.exportTypedArrayMethod;Ee("some",function(Te){return pe(be(this),Te,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/global"),pe=ae("../internals/function-uncurry-this"),be=ae("../internals/fails"),Ee=ae("../internals/a-callable"),we=ae("../internals/array-sort"),Te=ae("../internals/array-buffer-view-core"),ve=ae("../internals/engine-ff-version"),Pe=ae("../internals/engine-is-ie-or-edge"),de=ae("../internals/engine-v8-version"),ee=ae("../internals/engine-webkit-version"),z=Te.aTypedArray,oe=Te.exportTypedArrayMethod,ie=fe.Uint16Array,le=ie&&pe(ie.prototype.sort),ue=!!le&&!(be(function(){le(new ie(2),null)})&&be(function(){le(new ie(2),{})})),me=!!le&&!be(function(){if(de)return de<74;if(ve)return ve<67;if(Pe)return!0;if(ee)return ee<602;var Ae=new ie(516),De=Array(516),Fe,je;for(Fe=0;Fe<516;Fe++)je=Fe%4,Ae[Fe]=515-Fe,De[Fe]=Fe-2*je+3;for(le(Ae,function(Le,Be){return(Le/4|0)-(Be/4|0)}),Fe=0;Fe<516;Fe++)if(Ae[Fe]!==De[Fe])return!0}),xe=function(Ae){return function(De,Fe){return Ae!==void 0?+Ae(De,Fe)||0:Fe!==Fe?-1:De!==De?1:De===0&&Fe===0?1/De>0&&1/Fe<0?1:-1:De>Fe}};oe("sort",function(De){return De!==void 0&&Ee(De),me?le(this,De):we(z(this),xe(De))},!me||ue)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core"),pe=ae("../internals/to-length"),be=ae("../internals/to-absolute-index"),Ee=ae("../internals/typed-array-species-constructor"),we=fe.aTypedArray,Te=fe.exportTypedArrayMethod;Te("subarray",function(Pe,de){var ee=we(this),z=ee.length,oe=be(Pe,z),ie=Ee(ee);return new ie(ee.buffer,ee.byteOffset+oe*ee.BYTES_PER_ELEMENT,pe((de===void 0?z:be(de,z))-oe))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/global"),pe=ae("../internals/function-apply"),be=ae("../internals/array-buffer-view-core"),Ee=ae("../internals/fails"),we=ae("../internals/array-slice"),Te=fe.Int8Array,ve=be.aTypedArray,Pe=be.exportTypedArrayMethod,de=[].toLocaleString,ee=!!Te&&Ee(function(){de.call(new Te(1))}),z=Ee(function(){return[1,2].toLocaleString()!=new Te([1,2]).toLocaleString()})||!Ee(function(){Te.prototype.toLocaleString.call([1,2])});Pe("toLocaleString",function(){return pe(de,ee?we(ve(this)):ve(this),we(arguments))},z)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(ae,Ge,Re){"use strict";var fe=ae("../internals/array-buffer-view-core").exportTypedArrayMethod,pe=ae("../internals/fails"),be=ae("../internals/global"),Ee=ae("../internals/function-uncurry-this"),we=be.Uint8Array,Te=we&&we.prototype||{},ve=[].toString,Pe=Ee([].join);pe(function(){ve.call({})})&&(ve=function(){return Pe(this)});var de=Te.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(ae,Ge,Re){var fe=ae("../internals/typed-array-constructor");fe("Uint8",function(pe){return function(Ee,we,Te){return pe(this,Ee,we,Te)}})},{"../internals/typed-array-constructor":258}],339:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/dom-iterables"),be=ae("../internals/dom-token-list-prototype"),Ee=ae("../internals/array-for-each"),we=ae("../internals/create-non-enumerable-property"),Te=function(Pe){if(Pe&&Pe.forEach!==Ee)try{we(Pe,"forEach",Ee)}catch(de){Pe.forEach=Ee}};for(var ve in pe)pe[ve]&&Te(fe[ve]&&fe[ve].prototype);Te(be)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(ae,Ge,Re){var fe=ae("../internals/global"),pe=ae("../internals/dom-iterables"),be=ae("../internals/dom-token-list-prototype"),Ee=ae("../modules/es.array.iterator"),we=ae("../internals/create-non-enumerable-property"),Te=ae("../internals/well-known-symbol"),ve=Te("iterator"),Pe=Te("toStringTag"),de=Ee.values,ee=function(oe,ie){if(oe){if(oe[ve]!==de)try{we(oe,ve,de)}catch(ue){oe[ve]=de}if(oe[Pe]||we(oe,Pe,ie),pe[ie]){for(var le in Ee)if(oe[le]!==Ee[le])try{we(oe,le,Ee[le])}catch(ue){oe[le]=Ee[le]}}}};for(var z in pe)ee(fe[z]&&fe[z].prototype,z);ee(be,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(ae,Ge,Re){function fe(me){return Array.isArray?Array.isArray(me):ue(me)==="[object Array]"}Re.isArray=fe;function pe(me){return typeof me=="boolean"}Re.isBoolean=pe;function be(me){return me===null}Re.isNull=be;function Ee(me){return me==null}Re.isNullOrUndefined=Ee;function we(me){return typeof me=="number"}Re.isNumber=we;function Te(me){return typeof me=="string"}Re.isString=Te;function ve(me){return typeof me=="symbol"}Re.isSymbol=ve;function Pe(me){return me===void 0}Re.isUndefined=Pe;function de(me){return ue(me)==="[object RegExp]"}Re.isRegExp=de;function ee(me){return typeof me=="object"&&me!==null}Re.isObject=ee;function z(me){return ue(me)==="[object Date]"}Re.isDate=z;function oe(me){return ue(me)==="[object Error]"||me instanceof Error}Re.isError=oe;function ie(me){return typeof me=="function"}Re.isFunction=ie;function le(me){return me===null||typeof me=="boolean"||typeof me=="number"||typeof me=="string"||typeof me=="symbol"||typeof me=="undefined"}Re.isPrimitive=le,Re.isBuffer=ae("buffer").Buffer.isBuffer;function ue(me){return Object.prototype.toString.call(me)}},{buffer:90}],342:[function(ae,Ge,Re){(function(fe){"use strict";var pe=function(){var ve=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,Pe=/\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(ee,z,oe,ie){if(arguments.length===1&&Te(ee)==="string"&&!/\d/.test(ee)&&(z=ee,ee=void 0),ee=ee||new Date,ee instanceof Date||(ee=new Date(ee)),isNaN(ee))throw TypeError("Invalid date");z=String(pe.masks[z]||z||pe.masks.default);var le=z.slice(0,4);(le==="UTC:"||le==="GMT:")&&(z=z.slice(4),oe=!0,le==="GMT:"&&(ie=!0));var ue=oe?"getUTC":"get",me=ee[ue+"Date"](),xe=ee[ue+"Day"](),Ae=ee[ue+"Month"](),De=ee[ue+"FullYear"](),Fe=ee[ue+"Hours"](),je=ee[ue+"Minutes"](),Le=ee[ue+"Seconds"](),Be=ee[ue+"Milliseconds"](),Ue=oe?0:ee.getTimezoneOffset(),Je=Ee(ee),He=we(ee),We={d:me,dd:be(me),ddd:pe.i18n.dayNames[xe],dddd:pe.i18n.dayNames[xe+7],m:Ae+1,mm:be(Ae+1),mmm:pe.i18n.monthNames[Ae],mmmm:pe.i18n.monthNames[Ae+12],yy:String(De).slice(2),yyyy:De,h:Fe%12||12,hh:be(Fe%12||12),H:Fe,HH:be(Fe),M:je,MM:be(je),s:Le,ss:be(Le),l:be(Be,3),L:be(Math.round(Be/10)),t:Fe<12?"a":"p",tt:Fe<12?"am":"pm",T:Fe<12?"A":"P",TT:Fe<12?"AM":"PM",Z:ie?"GMT":oe?"UTC":(String(ee).match(Pe)||[""]).pop().replace(de,""),o:(Ue>0?"-":"+")+be(Math.floor(Math.abs(Ue)/60)*100+Math.abs(Ue)%60,4),S:["th","st","nd","rd"][me%10>3?0:(me%100-me%10!=10)*me%10],W:Je,N:He};return z.replace(ve,function(at){return at in We?We[at]:at.slice(1,at.length-1)})}}();pe.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"},pe.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 be(ve,Pe){for(ve=String(ve),Pe=Pe||2;ve.length<Pe;)ve="0"+ve;return ve}function Ee(ve){var Pe=new Date(ve.getFullYear(),ve.getMonth(),ve.getDate());Pe.setDate(Pe.getDate()-(Pe.getDay()+6)%7+3);var de=new Date(Pe.getFullYear(),0,4);de.setDate(de.getDate()-(de.getDay()+6)%7+3);var ee=Pe.getTimezoneOffset()-de.getTimezoneOffset();Pe.setHours(Pe.getHours()-ee);var z=(Pe-de)/(864e5*7);return 1+Math.floor(z)}function we(ve){var Pe=ve.getDay();return Pe===0&&(Pe=7),Pe}function Te(ve){return ve===null?"null":ve===void 0?"undefined":typeof ve!="object"?typeof ve:Array.isArray(ve)?"array":{}.toString.call(ve).slice(8,-1).toLowerCase()}typeof ot=="function"&&ot.amd?ot(function(){return pe}):typeof Re=="object"?Ge.exports=pe:fe.dateFormat=pe})(this)},{}],343:[function(ae,Ge,Re){"use strict";var fe=/["'&<>]/;Ge.exports=pe;function pe(be){var Ee=""+be,we=fe.exec(Ee);if(!we)return Ee;var Te,ve="",Pe=0,de=0;for(Pe=we.index;Pe<Ee.length;Pe++){switch(Ee.charCodeAt(Pe)){case 34:Te=""";break;case 38:Te="&";break;case 39:Te="'";break;case 60:Te="<";break;case 62:Te=">";break;default:continue}de!==Pe&&(ve+=Ee.substring(de,Pe)),de=Pe+1,ve+=Te}return de!==Pe?ve+Ee.substring(de,Pe):ve}},{}],344:[function(ae,Ge,Re){"use strict";var fe=typeof Reflect=="object"?Reflect:null,pe=fe&&typeof fe.apply=="function"?fe.apply:function(Le,Be,Ue){return Function.prototype.apply.call(Le,Be,Ue)},be;fe&&typeof fe.ownKeys=="function"?be=fe.ownKeys:Object.getOwnPropertySymbols?be=function(Le){return Object.getOwnPropertyNames(Le).concat(Object.getOwnPropertySymbols(Le))}:be=function(Le){return Object.getOwnPropertyNames(Le)};function Ee(je){console&&console.warn&&console.warn(je)}var we=Number.isNaN||function(Le){return Le!==Le};function Te(){Te.init.call(this)}Ge.exports=Te,Ge.exports.once=Ae,Te.EventEmitter=Te,Te.prototype._events=void 0,Te.prototype._eventsCount=0,Te.prototype._maxListeners=void 0;var ve=10;function Pe(je){if(typeof je!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof je)}Object.defineProperty(Te,"defaultMaxListeners",{enumerable:!0,get:function(){return ve},set:function(je){if(typeof je!="number"||je<0||we(je))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+je+".");ve=je}}),Te.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Te.prototype.setMaxListeners=function(Le){if(typeof Le!="number"||Le<0||we(Le))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Le+".");return this._maxListeners=Le,this};function de(je){return je._maxListeners===void 0?Te.defaultMaxListeners:je._maxListeners}Te.prototype.getMaxListeners=function(){return de(this)},Te.prototype.emit=function(Le){for(var Be=[],Ue=1;Ue<arguments.length;Ue++)Be.push(arguments[Ue]);var Je=Le==="error",He=this._events;if(He!==void 0)Je=Je&&He.error===void 0;else if(!Je)return!1;if(Je){var We;if(Be.length>0&&(We=Be[0]),We instanceof Error)throw We;var at=new Error("Unhandled error."+(We?" ("+We.message+")":""));throw at.context=We,at}var ft=He[Le];if(ft===void 0)return!1;if(typeof ft=="function")pe(ft,this,Be);else for(var mt=ft.length,Lt=ue(ft,mt),Ue=0;Ue<mt;++Ue)pe(Lt[Ue],this,Be);return!0};function ee(je,Le,Be,Ue){var Je,He,We;if(Pe(Be),He=je._events,He===void 0?(He=je._events=Object.create(null),je._eventsCount=0):(He.newListener!==void 0&&(je.emit("newListener",Le,Be.listener?Be.listener:Be),He=je._events),We=He[Le]),We===void 0)We=He[Le]=Be,++je._eventsCount;else if(typeof We=="function"?We=He[Le]=Ue?[Be,We]:[We,Be]:Ue?We.unshift(Be):We.push(Be),Je=de(je),Je>0&&We.length>Je&&!We.warned){We.warned=!0;var at=new Error("Possible EventEmitter memory leak detected. "+We.length+" "+String(Le)+" listeners added. Use emitter.setMaxListeners() to increase limit");at.name="MaxListenersExceededWarning",at.emitter=je,at.type=Le,at.count=We.length,Ee(at)}return je}Te.prototype.addListener=function(Le,Be){return ee(this,Le,Be,!1)},Te.prototype.on=Te.prototype.addListener,Te.prototype.prependListener=function(Le,Be){return ee(this,Le,Be,!0)};function z(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function oe(je,Le,Be){var Ue={fired:!1,wrapFn:void 0,target:je,type:Le,listener:Be},Je=z.bind(Ue);return Je.listener=Be,Ue.wrapFn=Je,Je}Te.prototype.once=function(Le,Be){return Pe(Be),this.on(Le,oe(this,Le,Be)),this},Te.prototype.prependOnceListener=function(Le,Be){return Pe(Be),this.prependListener(Le,oe(this,Le,Be)),this},Te.prototype.removeListener=function(Le,Be){var Ue,Je,He,We,at;if(Pe(Be),Je=this._events,Je===void 0)return this;if(Ue=Je[Le],Ue===void 0)return this;if(Ue===Be||Ue.listener===Be)--this._eventsCount===0?this._events=Object.create(null):(delete Je[Le],Je.removeListener&&this.emit("removeListener",Le,Ue.listener||Be));else if(typeof Ue!="function"){for(He=-1,We=Ue.length-1;We>=0;We--)if(Ue[We]===Be||Ue[We].listener===Be){at=Ue[We].listener,He=We;break}if(He<0)return this;He===0?Ue.shift():me(Ue,He),Ue.length===1&&(Je[Le]=Ue[0]),Je.removeListener!==void 0&&this.emit("removeListener",Le,at||Be)}return this},Te.prototype.off=Te.prototype.removeListener,Te.prototype.removeAllListeners=function(Le){var Be,Ue,Je;if(Ue=this._events,Ue===void 0)return this;if(Ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Ue[Le]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Ue[Le]),this;if(arguments.length===0){var He=Object.keys(Ue),We;for(Je=0;Je<He.length;++Je)We=He[Je],We!=="removeListener"&&this.removeAllListeners(We);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Be=Ue[Le],typeof Be=="function")this.removeListener(Le,Be);else if(Be!==void 0)for(Je=Be.length-1;Je>=0;Je--)this.removeListener(Le,Be[Je]);return this};function ie(je,Le,Be){var Ue=je._events;if(Ue===void 0)return[];var Je=Ue[Le];return Je===void 0?[]:typeof Je=="function"?Be?[Je.listener||Je]:[Je]:Be?xe(Je):ue(Je,Je.length)}Te.prototype.listeners=function(Le){return ie(this,Le,!0)},Te.prototype.rawListeners=function(Le){return ie(this,Le,!1)},Te.listenerCount=function(je,Le){return typeof je.listenerCount=="function"?je.listenerCount(Le):le.call(je,Le)},Te.prototype.listenerCount=le;function le(je){var Le=this._events;if(Le!==void 0){var Be=Le[je];if(typeof Be=="function")return 1;if(Be!==void 0)return Be.length}return 0}Te.prototype.eventNames=function(){return this._eventsCount>0?be(this._events):[]};function ue(je,Le){for(var Be=new Array(Le),Ue=0;Ue<Le;++Ue)Be[Ue]=je[Ue];return Be}function me(je,Le){for(;Le+1<je.length;Le++)je[Le]=je[Le+1];je.pop()}function xe(je){for(var Le=new Array(je.length),Be=0;Be<Le.length;++Be)Le[Be]=je[Be].listener||je[Be];return Le}function Ae(je,Le){return new Promise(function(Be,Ue){function Je(We){je.removeListener(Le,He),Ue(We)}function He(){typeof je.removeListener=="function"&&je.removeListener("error",Je),Be([].slice.call(arguments))}Fe(je,Le,He,{once:!0}),Le!=="error"&&De(je,Je,{once:!0})})}function De(je,Le,Be){typeof je.on=="function"&&Fe(je,"error",Le,Be)}function Fe(je,Le,Be,Ue){if(typeof je.on=="function")Ue.once?je.once(Le,Be):je.on(Le,Be);else if(typeof je.addEventListener=="function")je.addEventListener(Le,function Je(He){Ue.once&&je.removeEventListener(Le,Je),Be(He)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof je)}},{}],345:[function(ae,Ge,Re){"use strict";var fe=ae("is-callable"),pe=Object.prototype.toString,be=Object.prototype.hasOwnProperty,Ee=function(de,ee,z){for(var oe=0,ie=de.length;oe<ie;oe++)be.call(de,oe)&&(z==null?ee(de[oe],oe,de):ee.call(z,de[oe],oe,de))},we=function(de,ee,z){for(var oe=0,ie=de.length;oe<ie;oe++)z==null?ee(de.charAt(oe),oe,de):ee.call(z,de.charAt(oe),oe,de)},Te=function(de,ee,z){for(var oe in de)be.call(de,oe)&&(z==null?ee(de[oe],oe,de):ee.call(z,de[oe],oe,de))},ve=function(de,ee,z){if(!fe(ee))throw new TypeError("iterator must be a function");var oe;arguments.length>=3&&(oe=z),pe.call(de)==="[object Array]"?Ee(de,ee,oe):typeof de=="string"?we(de,ee,oe):Te(de,ee,oe)};Ge.exports=ve},{"is-callable":367}],346:[function(ae,Ge,Re){"use strict";var fe="Function.prototype.bind called on incompatible ",pe=Array.prototype.slice,be=Object.prototype.toString,Ee="[object Function]";Ge.exports=function(Te){var ve=this;if(typeof ve!="function"||be.call(ve)!==Ee)throw new TypeError(fe+ve);for(var Pe=pe.call(arguments,1),de,ee=function(){if(this instanceof de){var ue=ve.apply(this,Pe.concat(pe.call(arguments)));return Object(ue)===ue?ue:this}else return ve.apply(Te,Pe.concat(pe.call(arguments)))},z=Math.max(0,ve.length-Pe.length),oe=[],ie=0;ie<z;ie++)oe.push("$"+ie);if(de=Function("binder","return function ("+oe.join(",")+"){ return binder.apply(this,arguments); }")(ee),ve.prototype){var le=function(){};le.prototype=ve.prototype,de.prototype=new le,le.prototype=null}return de}},{}],347:[function(ae,Ge,Re){"use strict";var fe=ae("./implementation");Ge.exports=Function.prototype.bind||fe},{"./implementation":346}],348:[function(ae,Ge,Re){"use strict";var fe,pe=SyntaxError,be=Function,Ee=TypeError,we=function(ft){try{return be('"use strict"; return ('+ft+").constructor;")()}catch(mt){}},Te=Object.getOwnPropertyDescriptor;if(Te)try{Te({},"")}catch(ft){Te=null}var ve=function(){throw new Ee},Pe=Te?function(){try{return arguments.callee,ve}catch(ft){try{return Te(arguments,"callee").get}catch(mt){return ve}}}():ve,de=ae("has-symbols")(),ee=ae("has-proto")(),z=Object.getPrototypeOf||(ee?function(ft){return ft.__proto__}:null),oe={},ie=typeof Uint8Array=="undefined"||!z?fe:z(Uint8Array),le={"%AggregateError%":typeof AggregateError=="undefined"?fe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?fe:ArrayBuffer,"%ArrayIteratorPrototype%":de&&z?z([][Symbol.iterator]()):fe,"%AsyncFromSyncIteratorPrototype%":fe,"%AsyncFunction%":oe,"%AsyncGenerator%":oe,"%AsyncGeneratorFunction%":oe,"%AsyncIteratorPrototype%":oe,"%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%":be,"%GeneratorFunction%":oe,"%Int8Array%":typeof Int8Array=="undefined"?fe:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?fe:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?fe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":de&&z?z(z([][Symbol.iterator]())):fe,"%JSON%":typeof JSON=="object"?JSON:fe,"%Map%":typeof Map=="undefined"?fe:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!de||!z?fe:z(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||!z?fe:z(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?fe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":de&&z?z(""[Symbol.iterator]()):fe,"%Symbol%":de?Symbol:fe,"%SyntaxError%":pe,"%ThrowTypeError%":Pe,"%TypedArray%":ie,"%TypeError%":Ee,"%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(z)try{null.error}catch(ft){var ue=z(z(ft));le["%Error.prototype%"]=ue}var me=function ft(mt){var Lt;if(mt==="%AsyncFunction%")Lt=we("async function () {}");else if(mt==="%GeneratorFunction%")Lt=we("function* () {}");else if(mt==="%AsyncGeneratorFunction%")Lt=we("async function* () {}");else if(mt==="%AsyncGenerator%"){var Xe=ft("%AsyncGeneratorFunction%");Xe&&(Lt=Xe.prototype)}else if(mt==="%AsyncIteratorPrototype%"){var et=ft("%AsyncGenerator%");et&&z&&(Lt=z(et.prototype))}return le[mt]=Lt,Lt},xe={"%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"]},Ae=ae("function-bind"),De=ae("has"),Fe=Ae.call(Function.call,Array.prototype.concat),je=Ae.call(Function.apply,Array.prototype.splice),Le=Ae.call(Function.call,String.prototype.replace),Be=Ae.call(Function.call,String.prototype.slice),Ue=Ae.call(Function.call,RegExp.prototype.exec),Je=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,He=/\\(\\)?/g,We=function(mt){var Lt=Be(mt,0,1),Xe=Be(mt,-1);if(Lt==="%"&&Xe!=="%")throw new pe("invalid intrinsic syntax, expected closing `%`");if(Xe==="%"&&Lt!=="%")throw new pe("invalid intrinsic syntax, expected opening `%`");var et=[];return Le(mt,Je,function(lt,vt,wt,ht){et[et.length]=wt?Le(ht,He,"$1"):vt||lt}),et},at=function(mt,Lt){var Xe=mt,et;if(De(xe,Xe)&&(et=xe[Xe],Xe="%"+et[0]+"%"),De(le,Xe)){var lt=le[Xe];if(lt===oe&&(lt=me(Xe)),typeof lt=="undefined"&&!Lt)throw new Ee("intrinsic "+mt+" exists, but is not available. Please file an issue!");return{alias:et,name:Xe,value:lt}}throw new pe("intrinsic "+mt+" does not exist!")};Ge.exports=function(mt,Lt){if(typeof mt!="string"||mt.length===0)throw new Ee("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Lt!="boolean")throw new Ee('"allowMissing" argument must be a boolean');if(Ue(/^%?[^%]*%?$/,mt)===null)throw new pe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Xe=We(mt),et=Xe.length>0?Xe[0]:"",lt=at("%"+et+"%",Lt),vt=lt.name,wt=lt.value,ht=!1,dt=lt.alias;dt&&(et=dt[0],je(Xe,Fe([0,1],dt)));for(var ut=1,Pt=!0;ut<Xe.length;ut+=1){var yt=Xe[ut],gt=Be(yt,0,1),Tt=Be(yt,-1);if((gt==='"'||gt==="'"||gt==="`"||Tt==='"'||Tt==="'"||Tt==="`")&>!==Tt)throw new pe("property names with quotes must have matching quotes");if((yt==="constructor"||!Pt)&&(ht=!0),et+="."+yt,vt="%"+et+"%",De(le,vt))wt=le[vt];else if(wt!=null){if(!(yt in wt)){if(!Lt)throw new Ee("base intrinsic for "+mt+" exists, but the property is not available.");return}if(Te&&ut+1>=Xe.length){var ct=Te(wt,yt);Pt=!!ct,Pt&&"get"in ct&&!("originalValue"in ct.get)?wt=ct.get:wt=wt[yt]}else Pt=De(wt,yt),wt=wt[yt];Pt&&!ht&&(le[vt]=wt)}}return wt}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(ae,Ge,Re){"use strict";var fe=ae("get-intrinsic"),pe=fe("%Object.getOwnPropertyDescriptor%",!0);if(pe)try{pe([],"length")}catch(be){pe=null}Ge.exports=pe},{"get-intrinsic":348}],350:[function(ae,Ge,Re){"use strict";var fe={foo:{}},pe=Object;Ge.exports=function(){return{__proto__:fe}.foo===fe.foo&&!({__proto__:null}instanceof pe)}},{}],351:[function(ae,Ge,Re){"use strict";var fe=typeof Symbol!="undefined"&&Symbol,pe=ae("./shams");Ge.exports=function(){return typeof fe!="function"||typeof Symbol!="function"||typeof fe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:pe()}},{"./shams":352}],352:[function(ae,Ge,Re){"use strict";Ge.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var pe={},be=Symbol("test"),Ee=Object(be);if(typeof be=="string"||Object.prototype.toString.call(be)!=="[object Symbol]"||Object.prototype.toString.call(Ee)!=="[object Symbol]")return!1;var we=42;pe[be]=we;for(be in pe)return!1;if(typeof Object.keys=="function"&&Object.keys(pe).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(pe).length!==0)return!1;var Te=Object.getOwnPropertySymbols(pe);if(Te.length!==1||Te[0]!==be||!Object.prototype.propertyIsEnumerable.call(pe,be))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var ve=Object.getOwnPropertyDescriptor(pe,be);if(ve.value!==we||ve.enumerable!==!0)return!1}return!0}},{}],353:[function(ae,Ge,Re){"use strict";var fe=ae("has-symbols/shams");Ge.exports=function(){return fe()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(ae,Ge,Re){"use strict";var fe=ae("function-bind");Ge.exports=fe.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(ae,Ge,Re){var fe=ae("http"),pe=ae("url"),be=Ge.exports;for(var Ee in fe)fe.hasOwnProperty(Ee)&&(be[Ee]=fe[Ee]);be.request=function(Te,ve){return Te=we(Te),fe.request.call(this,Te,ve)},be.get=function(Te,ve){return Te=we(Te),fe.get.call(this,Te,ve)};function we(Te){if(typeof Te=="string"&&(Te=pe.parse(Te)),Te.protocol||(Te.protocol="https:"),Te.protocol!=="https:")throw new Error('Protocol "'+Te.protocol+'" not supported. Expected "https:"');return Te}},{http:468,url:472}],356:[function(ae,Ge,Re){"use strict";var fe=ae("util"),pe=ae("ms");Ge.exports=function(be){if(typeof be=="number")return be;var Ee=pe(be);if(Ee===void 0){var we=new Error(fe.format("humanize-ms(%j) result undefined",be));console.warn(we.stack)}return Ee}},{ms:376,util:419}],357:[function(ae,Ge,Re){Re.read=function(fe,pe,be,Ee,we){var Te,ve,Pe=we*8-Ee-1,de=(1<<Pe)-1,ee=de>>1,z=-7,oe=be?we-1:0,ie=be?-1:1,le=fe[pe+oe];for(oe+=ie,Te=le&(1<<-z)-1,le>>=-z,z+=Pe;z>0;Te=Te*256+fe[pe+oe],oe+=ie,z-=8);for(ve=Te&(1<<-z)-1,Te>>=-z,z+=Ee;z>0;ve=ve*256+fe[pe+oe],oe+=ie,z-=8);if(Te===0)Te=1-ee;else{if(Te===de)return ve?NaN:(le?-1:1)*(1/0);ve=ve+Math.pow(2,Ee),Te=Te-ee}return(le?-1:1)*ve*Math.pow(2,Te-Ee)},Re.write=function(fe,pe,be,Ee,we,Te){var ve,Pe,de,ee=Te*8-we-1,z=(1<<ee)-1,oe=z>>1,ie=we===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=Ee?0:Te-1,ue=Ee?1:-1,me=pe<0||pe===0&&1/pe<0?1:0;for(pe=Math.abs(pe),isNaN(pe)||pe===1/0?(Pe=isNaN(pe)?1:0,ve=z):(ve=Math.floor(Math.log(pe)/Math.LN2),pe*(de=Math.pow(2,-ve))<1&&(ve--,de*=2),ve+oe>=1?pe+=ie/de:pe+=ie*Math.pow(2,1-oe),pe*de>=2&&(ve++,de/=2),ve+oe>=z?(Pe=0,ve=z):ve+oe>=1?(Pe=(pe*de-1)*Math.pow(2,we),ve=ve+oe):(Pe=pe*Math.pow(2,oe-1)*Math.pow(2,we),ve=0));we>=8;fe[be+le]=Pe&255,le+=ue,Pe/=256,we-=8);for(ve=ve<<we|Pe,ee+=we;ee>0;fe[be+le]=ve&255,le+=ue,ve/=256,ee-=8);fe[be+le-ue]|=me*128}},{}],358:[function(ae,Ge,Re){"use strict";var fe=[ae("./nextTick"),ae("./queueMicrotask"),ae("./mutation.js"),ae("./messageChannel"),ae("./stateChange"),ae("./timeout")],pe,be,Ee=-1,we=[],Te=!1;function ve(){!pe||!be||(pe=!1,be.length?we=be.concat(we):Ee=-1,we.length&&Pe())}function Pe(){if(!pe){Te=!1,pe=!0;for(var le=we.length,ue=setTimeout(ve);le;){for(be=we,we=[];be&&++Ee<le;)be[Ee].run();Ee=-1,le=we.length}be=null,Ee=-1,pe=!1,clearTimeout(ue)}}for(var de,ee=-1,z=fe.length;++ee<z;)if(fe[ee]&&fe[ee].test&&fe[ee].test()){de=fe[ee].install(Pe);break}function oe(le,ue){this.fun=le,this.array=ue}oe.prototype.run=function(){var le=this.fun,ue=this.array;switch(ue.length){case 0:return le();case 1:return le(ue[0]);case 2:return le(ue[0],ue[1]);case 3:return le(ue[0],ue[1],ue[2]);default:return le.apply(null,ue)}},Ge.exports=ie;function ie(le){var ue=new Array(arguments.length-1);if(arguments.length>1)for(var me=1;me<arguments.length;me++)ue[me-1]=arguments[me];we.push(new oe(le,ue)),!Te&&!pe&&(Te=!0,de())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(ae,Ge,Re){(function(fe){(function(){"use strict";Re.test=function(){return fe.setImmediate?!1:typeof fe.MessageChannel!="undefined"},Re.install=function(pe){var be=new fe.MessageChannel;return be.port1.onmessage=pe,function(){be.port2.postMessage(0)}}}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=fe.MutationObserver||fe.WebKitMutationObserver;Re.test=function(){return pe},Re.install=function(be){var Ee=0,we=new pe(be),Te=fe.document.createTextNode("");return we.observe(Te,{characterData:!0}),function(){Te.data=Ee=++Ee%2}}}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(ae,Ge,Re){(function(fe){(function(){"use strict";Re.test=function(){return typeof fe.queueMicrotask=="function"},Re.install=function(pe){return function(){fe.queueMicrotask(pe)}}}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(ae,Ge,Re){(function(fe){(function(){"use strict";Re.test=function(){return"document"in fe&&"onreadystatechange"in fe.document.createElement("script")},Re.install=function(pe){return function(){var be=fe.document.createElement("script");return be.onreadystatechange=function(){pe(),be.onreadystatechange=null,be.parentNode.removeChild(be),be=null},fe.document.documentElement.appendChild(be),pe}}}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(ae,Ge,Re){"use strict";Re.test=function(){return!0},Re.install=function(fe){return function(){setTimeout(fe,0)}}},{}],364:[function(ae,Ge,Re){typeof Object.create=="function"?Ge.exports=function(pe,be){be&&(pe.super_=be,pe.prototype=Object.create(be.prototype,{constructor:{value:pe,enumerable:!1,writable:!0,configurable:!0}}))}:Ge.exports=function(pe,be){if(be){pe.super_=be;var Ee=function(){};Ee.prototype=be.prototype,pe.prototype=new Ee,pe.prototype.constructor=pe}}},{}],365:[function(ae,Ge,Re){"use strict";var fe=ae("has-tostringtag/shams")(),pe=ae("call-bind/callBound"),be=pe("Object.prototype.toString"),Ee=function(Pe){return fe&&Pe&&typeof Pe=="object"&&Symbol.toStringTag in Pe?!1:be(Pe)==="[object Arguments]"},we=function(Pe){return Ee(Pe)?!0:Pe!==null&&typeof Pe=="object"&&typeof Pe.length=="number"&&Pe.length>=0&&be(Pe)!=="[object Array]"&&be(Pe.callee)==="[object Function]"},Te=function(){return Ee(arguments)}();Ee.isLegacyArguments=we,Ge.exports=Te?Ee:we},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(ae,Ge,Re){Ge.exports=function(be){return be!=null&&(fe(be)||pe(be)||!!be._isBuffer)};function fe(be){return!!be.constructor&&typeof be.constructor.isBuffer=="function"&&be.constructor.isBuffer(be)}function pe(be){return typeof be.readFloatLE=="function"&&typeof be.slice=="function"&&fe(be.slice(0,0))}},{}],367:[function(ae,Ge,Re){"use strict";var fe=Function.prototype.toString,pe=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,be,Ee;if(typeof pe=="function"&&typeof Object.defineProperty=="function")try{be=Object.defineProperty({},"length",{get:function(){throw Ee}}),Ee={},pe(function(){throw 42},null,be)}catch(De){De!==Ee&&(pe=null)}else pe=null;var we=/^\s*class\b/,Te=function(Fe){try{var je=fe.call(Fe);return we.test(je)}catch(Le){return!1}},ve=function(Fe){try{return Te(Fe)?!1:(fe.call(Fe),!0)}catch(je){return!1}},Pe=Object.prototype.toString,de="[object Object]",ee="[object Function]",z="[object GeneratorFunction]",oe="[object HTMLAllCollection]",ie="[object HTML document.all class]",le="[object HTMLCollection]",ue=typeof Symbol=="function"&&!!Symbol.toStringTag,me=!(0 in[,]),xe=function(){return!1};if(typeof document=="object"){var Ae=document.all;Pe.call(Ae)===Pe.call(document.all)&&(xe=function(Fe){if((me||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var je=Pe.call(Fe);return(je===oe||je===ie||je===le||je===de)&&Fe("")==null}catch(Le){}return!1})}Ge.exports=pe?function(Fe){if(xe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;try{pe(Fe,null,be)}catch(je){if(je!==Ee)return!1}return!Te(Fe)&&ve(Fe)}:function(Fe){if(xe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;if(ue)return ve(Fe);if(Te(Fe))return!1;var je=Pe.call(Fe);return je!==ee&&je!==z&&!/^\[object HTML/.test(je)?!1:ve(Fe)}},{}],368:[function(ae,Ge,Re){"use strict";var fe=Object.prototype.toString,pe=Function.prototype.toString,be=/^\s*(?:function)?\*/,Ee=ae("has-tostringtag/shams")(),we=Object.getPrototypeOf,Te=function(){if(!Ee)return!1;try{return Function("return function*() {}")()}catch(Pe){}},ve;Ge.exports=function(de){if(typeof de!="function")return!1;if(be.test(pe.call(de)))return!0;if(!Ee){var ee=fe.call(de);return ee==="[object GeneratorFunction]"}if(!we)return!1;if(typeof ve=="undefined"){var z=Te();ve=z?we(z):!1}return we(de)===ve}},{"has-tostringtag/shams":353}],369:[function(ae,Ge,Re){"use strict";var fe=ae("which-typed-array");Ge.exports=function(be){return!!fe(be)}},{"which-typed-array":420}],370:[function(ae,Ge,Re){var fe={}.toString;Ge.exports=Array.isArray||function(pe){return fe.call(pe)=="[object Array]"}},{}],371:[function(ae,Ge,Re){(function(fe){(function(){(function(pe,be){typeof Re=="object"&&typeof Ge!="undefined"?Ge.exports=be(pe):typeof ot=="function"&&ot.amd?ot(be):be(pe)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof fe!="undefined"?fe:this,function(pe){"use strict";pe=pe||{};var be=pe.Base64,Ee="2.6.4",we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Te=function(mt){for(var Lt={},Xe=0,et=mt.length;Xe<et;Xe++)Lt[mt.charAt(Xe)]=Xe;return Lt}(we),ve=String.fromCharCode,Pe=function(mt){if(mt.length<2){var Lt=mt.charCodeAt(0);return Lt<128?mt:Lt<2048?ve(192|Lt>>>6)+ve(128|Lt&63):ve(224|Lt>>>12&15)+ve(128|Lt>>>6&63)+ve(128|Lt&63)}else{var Lt=65536+(mt.charCodeAt(0)-55296)*1024+(mt.charCodeAt(1)-56320);return ve(240|Lt>>>18&7)+ve(128|Lt>>>12&63)+ve(128|Lt>>>6&63)+ve(128|Lt&63)}},de=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ee=function(mt){return mt.replace(de,Pe)},z=function(mt){var Lt=[0,2,1][mt.length%3],Xe=mt.charCodeAt(0)<<16|(mt.length>1?mt.charCodeAt(1):0)<<8|(mt.length>2?mt.charCodeAt(2):0),et=[we.charAt(Xe>>>18),we.charAt(Xe>>>12&63),Lt>=2?"=":we.charAt(Xe>>>6&63),Lt>=1?"=":we.charAt(Xe&63)];return et.join("")},oe=pe.btoa&&typeof pe.btoa=="function"?function(mt){return pe.btoa(mt)}:function(mt){if(mt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return mt.replace(/[\s\S]{1,3}/g,z)},ie=function(mt){return oe(ee(String(mt)))},le=function(mt){return mt.replace(/[+\/]/g,function(Lt){return Lt=="+"?"-":"_"}).replace(/=/g,"")},ue=function(mt,Lt){return Lt?le(ie(mt)):ie(mt)},me=function(mt){return ue(mt,!0)},xe;pe.Uint8Array&&(xe=function(mt,Lt){for(var Xe="",et=0,lt=mt.length;et<lt;et+=3){var vt=mt[et],wt=mt[et+1],ht=mt[et+2],dt=vt<<16|wt<<8|ht;Xe+=we.charAt(dt>>>18)+we.charAt(dt>>>12&63)+(typeof wt!="undefined"?we.charAt(dt>>>6&63):"=")+(typeof ht!="undefined"?we.charAt(dt&63):"=")}return Lt?le(Xe):Xe});var Ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,De=function(mt){switch(mt.length){case 4:var Lt=(7&mt.charCodeAt(0))<<18|(63&mt.charCodeAt(1))<<12|(63&mt.charCodeAt(2))<<6|63&mt.charCodeAt(3),Xe=Lt-65536;return ve((Xe>>>10)+55296)+ve((Xe&1023)+56320);case 3:return ve((15&mt.charCodeAt(0))<<12|(63&mt.charCodeAt(1))<<6|63&mt.charCodeAt(2));default:return ve((31&mt.charCodeAt(0))<<6|63&mt.charCodeAt(1))}},Fe=function(mt){return mt.replace(Ae,De)},je=function(mt){var Lt=mt.length,Xe=Lt%4,et=(Lt>0?Te[mt.charAt(0)]<<18:0)|(Lt>1?Te[mt.charAt(1)]<<12:0)|(Lt>2?Te[mt.charAt(2)]<<6:0)|(Lt>3?Te[mt.charAt(3)]:0),lt=[ve(et>>>16),ve(et>>>8&255),ve(et&255)];return lt.length-=[0,0,2,1][Xe],lt.join("")},Le=pe.atob&&typeof pe.atob=="function"?function(mt){return pe.atob(mt)}:function(mt){return mt.replace(/\S{1,4}/g,je)},Be=function(mt){return Le(String(mt).replace(/[^A-Za-z0-9\+\/]/g,""))},Ue=function(mt){return Fe(Le(mt))},Je=function(mt){return String(mt).replace(/[-_]/g,function(Lt){return Lt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},He=function(mt){return Ue(Je(mt))},We;pe.Uint8Array&&(We=function(mt){return Uint8Array.from(Be(Je(mt)),function(Lt){return Lt.charCodeAt(0)})});var at=function(){var mt=pe.Base64;return pe.Base64=be,mt};if(pe.Base64={VERSION:Ee,atob:Be,btoa:oe,fromBase64:He,toBase64:ue,utob:ee,encode:ue,encodeURI:me,btou:Fe,decode:He,noConflict:at,fromUint8Array:xe,toUint8Array:We},typeof Object.defineProperty=="function"){var ft=function(mt){return{value:mt,enumerable:!1,writable:!0,configurable:!0}};pe.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ft(function(){return He(this)})),Object.defineProperty(String.prototype,"toBase64",ft(function(mt){return ue(this,mt)})),Object.defineProperty(String.prototype,"toBase64URI",ft(function(){return ue(this,!0)}))}}return pe.Meteor&&(Base64=pe.Base64),typeof Ge!="undefined"&&Ge.exports?Ge.exports.Base64=pe.Base64:typeof ot=="function"&&ot.amd&&ot([],function(){return pe.Base64}),{Base64:pe.Base64}})}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(ae,Ge,Re){"use strict";Ge.exports=pe;var fe=Object.prototype.hasOwnProperty;function pe(be,Ee,we){if(!be)throw new TypeError("argument dest is required");if(!Ee)throw new TypeError("argument src is required");return we===void 0&&(we=!0),Object.getOwnPropertyNames(Ee).forEach(function(ve){if(!(!we&&fe.call(be,ve))){var Pe=Object.getOwnPropertyDescriptor(Ee,ve);Object.defineProperty(be,ve,Pe)}}),be}},{}],373:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.regexp.constructor.js"),ae("core-js/modules/es.regexp.to-string.js");function fe(){this._types=Object.create(null),this._extensions=Object.create(null);for(var pe=0;pe<arguments.length;pe++)this.define(arguments[pe]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}fe.prototype.define=function(pe,be){for(var Ee in pe){var we=pe[Ee].map(function(de){return de.toLowerCase()});Ee=Ee.toLowerCase();for(var Te=0;Te<we.length;Te++){var ve=we[Te];if(ve[0]!=="*"){if(!be&&ve in this._types)throw new Error('Attempt to change mapping for "'+ve+'" extension from "'+this._types[ve]+'" to "'+Ee+'". Pass `force=true` to allow this, otherwise remove "'+ve+'" from the list of extensions for "'+Ee+'".');this._types[ve]=Ee}}if(be||!this._extensions[Ee]){var Pe=we[0];this._extensions[Ee]=Pe[0]!=="*"?Pe:Pe.substr(1)}}},fe.prototype.getType=function(pe){pe=String(pe);var be=pe.replace(/^.*[/\\]/,"").toLowerCase(),Ee=be.replace(/^.*\./,"").toLowerCase(),we=be.length<pe.length,Te=Ee.length<be.length-1;return(Te||!we)&&this._types[Ee]||null},fe.prototype.getExtension=function(pe){return pe=/^\s*([^;\s]*)/.test(pe)&&RegExp.$1,pe&&this._extensions[pe.toLowerCase()]||null},Ge.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(ae,Ge,Re){"use strict";var fe=ae("./Mime");Ge.exports=new fe(ae("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(ae,Ge,Re){"use strict";Ge.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(ae,Ge,Re){var fe=1e3,pe=fe*60,be=pe*60,Ee=be*24,we=Ee*7,Te=Ee*365.25;Ge.exports=function(z,oe){oe=oe||{};var ie=typeof z;if(ie==="string"&&z.length>0)return ve(z);if(ie==="number"&&isFinite(z))return oe.long?de(z):Pe(z);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(z))};function ve(z){if(z=String(z),!(z.length>100)){var oe=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(z);if(oe){var ie=parseFloat(oe[1]),le=(oe[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return ie*Te;case"weeks":case"week":case"w":return ie*we;case"days":case"day":case"d":return ie*Ee;case"hours":case"hour":case"hrs":case"hr":case"h":return ie*be;case"minutes":case"minute":case"mins":case"min":case"m":return ie*pe;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 Pe(z){var oe=Math.abs(z);return oe>=Ee?Math.round(z/Ee)+"d":oe>=be?Math.round(z/be)+"h":oe>=pe?Math.round(z/pe)+"m":oe>=fe?Math.round(z/fe)+"s":z+"ms"}function de(z){var oe=Math.abs(z);return oe>=Ee?ee(z,oe,Ee,"day"):oe>=be?ee(z,oe,be,"hour"):oe>=pe?ee(z,oe,pe,"minute"):oe>=fe?ee(z,oe,fe,"second"):z+" ms"}function ee(z,oe,ie,le){var ue=oe>=ie*1.5;return Math.round(z/ie)+" "+le+(ue?"s":"")}},{}],377:[function(ae,Ge,Re){"use strict";var fe=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;function Ee(Te){if(Te==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Te)}function we(){try{if(!Object.assign)return!1;var Te=new String("abc");if(Te[5]="de",Object.getOwnPropertyNames(Te)[0]==="5")return!1;for(var ve={},Pe=0;Pe<10;Pe++)ve["_"+String.fromCharCode(Pe)]=Pe;var de=Object.getOwnPropertyNames(ve).map(function(z){return ve[z]});if(de.join("")!=="0123456789")return!1;var ee={};return"abcdefghijklmnopqrst".split("").forEach(function(z){ee[z]=z}),Object.keys(Object.assign({},ee)).join("")==="abcdefghijklmnopqrst"}catch(z){return!1}}Ge.exports=we()?Object.assign:function(Te,ve){for(var Pe,de=Ee(Te),ee,z=1;z<arguments.length;z++){Pe=Object(arguments[z]);for(var oe in Pe)pe.call(Pe,oe)&&(de[oe]=Pe[oe]);if(fe){ee=fe(Pe);for(var ie=0;ie<ee.length;ie++)be.call(Pe,ee[ie])&&(de[ee[ie]]=Pe[ee[ie]])}}return de}},{}],378:[function(ae,Ge,Re){(function(fe){(function(){"use strict";function pe(Te){if(typeof Te!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Te))}function be(Te,ve){for(var Pe="",de=0,ee=-1,z=0,oe,ie=0;ie<=Te.length;++ie){if(ie<Te.length)oe=Te.charCodeAt(ie);else{if(oe===47)break;oe=47}if(oe===47){if(!(ee===ie-1||z===1))if(ee!==ie-1&&z===2){if(Pe.length<2||de!==2||Pe.charCodeAt(Pe.length-1)!==46||Pe.charCodeAt(Pe.length-2)!==46){if(Pe.length>2){var le=Pe.lastIndexOf("/");if(le!==Pe.length-1){le===-1?(Pe="",de=0):(Pe=Pe.slice(0,le),de=Pe.length-1-Pe.lastIndexOf("/")),ee=ie,z=0;continue}}else if(Pe.length===2||Pe.length===1){Pe="",de=0,ee=ie,z=0;continue}}ve&&(Pe.length>0?Pe+="/..":Pe="..",de=2)}else Pe.length>0?Pe+="/"+Te.slice(ee+1,ie):Pe=Te.slice(ee+1,ie),de=ie-ee-1;ee=ie,z=0}else oe===46&&z!==-1?++z:z=-1}return Pe}function Ee(Te,ve){var Pe=ve.dir||ve.root,de=ve.base||(ve.name||"")+(ve.ext||"");return Pe?Pe===ve.root?Pe+de:Pe+Te+de:de}var we={resolve:function(){for(var ve="",Pe=!1,de,ee=arguments.length-1;ee>=-1&&!Pe;ee--){var z;ee>=0?z=arguments[ee]:(de===void 0&&(de=fe.cwd()),z=de),pe(z),z.length!==0&&(ve=z+"/"+ve,Pe=z.charCodeAt(0)===47)}return ve=be(ve,!Pe),Pe?ve.length>0?"/"+ve:"/":ve.length>0?ve:"."},normalize:function(ve){if(pe(ve),ve.length===0)return".";var Pe=ve.charCodeAt(0)===47,de=ve.charCodeAt(ve.length-1)===47;return ve=be(ve,!Pe),ve.length===0&&!Pe&&(ve="."),ve.length>0&&de&&(ve+="/"),Pe?"/"+ve:ve},isAbsolute:function(ve){return pe(ve),ve.length>0&&ve.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var ve,Pe=0;Pe<arguments.length;++Pe){var de=arguments[Pe];pe(de),de.length>0&&(ve===void 0?ve=de:ve+="/"+de)}return ve===void 0?".":we.normalize(ve)},relative:function(ve,Pe){if(pe(ve),pe(Pe),ve===Pe||(ve=we.resolve(ve),Pe=we.resolve(Pe),ve===Pe))return"";for(var de=1;de<ve.length&&ve.charCodeAt(de)===47;++de);for(var ee=ve.length,z=ee-de,oe=1;oe<Pe.length&&Pe.charCodeAt(oe)===47;++oe);for(var ie=Pe.length,le=ie-oe,ue=z<le?z:le,me=-1,xe=0;xe<=ue;++xe){if(xe===ue){if(le>ue){if(Pe.charCodeAt(oe+xe)===47)return Pe.slice(oe+xe+1);if(xe===0)return Pe.slice(oe+xe)}else z>ue&&(ve.charCodeAt(de+xe)===47?me=xe:xe===0&&(me=0));break}var Ae=ve.charCodeAt(de+xe),De=Pe.charCodeAt(oe+xe);if(Ae!==De)break;Ae===47&&(me=xe)}var Fe="";for(xe=de+me+1;xe<=ee;++xe)(xe===ee||ve.charCodeAt(xe)===47)&&(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+Pe.slice(oe+me):(oe+=me,Pe.charCodeAt(oe)===47&&++oe,Pe.slice(oe))},_makeLong:function(ve){return ve},dirname:function(ve){if(pe(ve),ve.length===0)return".";for(var Pe=ve.charCodeAt(0),de=Pe===47,ee=-1,z=!0,oe=ve.length-1;oe>=1;--oe)if(Pe=ve.charCodeAt(oe),Pe===47){if(!z){ee=oe;break}}else z=!1;return ee===-1?de?"/":".":de&&ee===1?"//":ve.slice(0,ee)},basename:function(ve,Pe){if(Pe!==void 0&&typeof Pe!="string")throw new TypeError('"ext" argument must be a string');pe(ve);var de=0,ee=-1,z=!0,oe;if(Pe!==void 0&&Pe.length>0&&Pe.length<=ve.length){if(Pe.length===ve.length&&Pe===ve)return"";var ie=Pe.length-1,le=-1;for(oe=ve.length-1;oe>=0;--oe){var ue=ve.charCodeAt(oe);if(ue===47){if(!z){de=oe+1;break}}else le===-1&&(z=!1,le=oe+1),ie>=0&&(ue===Pe.charCodeAt(ie)?--ie===-1&&(ee=oe):(ie=-1,ee=le))}return de===ee?ee=le:ee===-1&&(ee=ve.length),ve.slice(de,ee)}else{for(oe=ve.length-1;oe>=0;--oe)if(ve.charCodeAt(oe)===47){if(!z){de=oe+1;break}}else ee===-1&&(z=!1,ee=oe+1);return ee===-1?"":ve.slice(de,ee)}},extname:function(ve){pe(ve);for(var Pe=-1,de=0,ee=-1,z=!0,oe=0,ie=ve.length-1;ie>=0;--ie){var le=ve.charCodeAt(ie);if(le===47){if(!z){de=ie+1;break}continue}ee===-1&&(z=!1,ee=ie+1),le===46?Pe===-1?Pe=ie:oe!==1&&(oe=1):Pe!==-1&&(oe=-1)}return Pe===-1||ee===-1||oe===0||oe===1&&Pe===ee-1&&Pe===de+1?"":ve.slice(Pe,ee)},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 Ee("/",ve)},parse:function(ve){pe(ve);var Pe={root:"",dir:"",base:"",ext:"",name:""};if(ve.length===0)return Pe;var de=ve.charCodeAt(0),ee=de===47,z;ee?(Pe.root="/",z=1):z=0;for(var oe=-1,ie=0,le=-1,ue=!0,me=ve.length-1,xe=0;me>=z;--me){if(de=ve.charCodeAt(me),de===47){if(!ue){ie=me+1;break}continue}le===-1&&(ue=!1,le=me+1),de===46?oe===-1?oe=me:xe!==1&&(xe=1):oe!==-1&&(xe=-1)}return oe===-1||le===-1||xe===0||xe===1&&oe===le-1&&oe===ie+1?le!==-1&&(ie===0&&ee?Pe.base=Pe.name=ve.slice(1,le):Pe.base=Pe.name=ve.slice(ie,le)):(ie===0&&ee?(Pe.name=ve.slice(1,oe),Pe.base=ve.slice(1,le)):(Pe.name=ve.slice(ie,oe),Pe.base=ve.slice(ie,le)),Pe.ext=ve.slice(oe,le)),ie>0?Pe.dir=ve.slice(0,ie-1):ee&&(Pe.dir="/"),Pe},sep:"/",delimiter:":",win32:null,posix:null};we.posix=we,Ge.exports=we}).call(this)}).call(this,ae("_process"))},{_process:467}],379:[function(ae,Ge,Re){(function(fe){(function(){(function(){"use strict";var pe={function:!0,object:!0},be=pe[typeof window]&&window||this,Ee=be,we=pe[typeof Re]&&Re,Te=pe[typeof Ge]&&Ge&&!Ge.nodeType&&Ge,ve=we&&Te&&typeof fe=="object"&&fe;ve&&(ve.global===ve||ve.window===ve||ve.self===ve)&&(be=ve);var Pe=Math.pow(2,53)-1,de=/\bOpera/,ee=this,z=Object.prototype,oe=z.hasOwnProperty,ie=z.toString;function le(He){return He=String(He),He.charAt(0).toUpperCase()+He.slice(1)}function ue(He,We,at){var ft={"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 We&&at&&/^Win/i.test(He)&&!/^Windows Phone /i.test(He)&&(ft=ft[/[\d.]+$/.exec(He)])&&(He="Windows "+ft),He=String(He),We&&at&&(He=He.replace(RegExp(We,"i"),at)),He=xe(He.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]),He}function me(He,We){var at=-1,ft=He?He.length:0;if(typeof ft=="number"&&ft>-1&&ft<=Pe)for(;++at<ft;)We(He[at],at,He);else Ae(He,We)}function xe(He){return He=Be(He),/^(?:webOS|i(?:OS|P))/.test(He)?He:le(He)}function Ae(He,We){for(var at in He)oe.call(He,at)&&We(He[at],at,He)}function De(He){return He==null?le(He):ie.call(He).slice(8,-1)}function Fe(He,We){var at=He!=null?typeof He[We]:"number";return!/^(?:boolean|number|string|undefined)$/.test(at)&&(at=="object"?!!He[We]:!0)}function je(He){return String(He).replace(/([ -])(?!$)/g,"$1?")}function Le(He,We){var at=null;return me(He,function(ft,mt){at=We(at,ft,mt,He)}),at}function Be(He){return String(He).replace(/^ +| +$/g,"")}function Ue(He){var We=be,at=He&&typeof He=="object"&&De(He)!="String";at&&(We=He,He=null);var ft=We.navigator||{},mt=ft.userAgent||"";He||(He=mt);var Lt=at||ee==Ee,Xe=at?!!ft.likeChrome:/\bChrome\b/.test(He)&&!/internal|\n/i.test(ie.toString()),et="Object",lt=at?et:"ScriptBridgingProxyObject",vt=at?et:"Environment",wt=at&&We.java?"JavaPackage":De(We.java),ht=at?et:"RuntimeObject",dt=/\bJava/.test(wt)&&We.java,ut=dt&&De(We.environment)==vt,Pt=dt?"a":"\u03B1",yt=dt?"b":"\u03B2",gt=We.document||{},Tt=We.operamini||We.opera,ct=de.test(ct=at&&Tt?Tt["[[Class]]"]:De(Tt))?ct:Tt=null,Ye,Ze=He,Se=[],Ne=null,$e=He==mt,nt=$e&&Tt&&typeof Tt.version=="function"&&Tt.version(),Ie,ze=It([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ve=Kt(["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"]),it=un([{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"]),St=jt({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),Ct=an(["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 It(fn){return Le(fn,function(Wt,Bn){return Wt||RegExp("\\b"+(Bn.pattern||je(Bn))+"\\b","i").exec(He)&&(Bn.label||Bn)})}function jt(fn){return Le(fn,function(Wt,Bn,zn){return Wt||(Bn[it]||Bn[/^[a-z]+(?: +[a-z]+\b)*/i.exec(it)]||RegExp("\\b"+je(zn)+"(?:\\b|\\w*\\d)","i").exec(He))&&zn})}function Kt(fn){return Le(fn,function(Wt,Bn){return Wt||RegExp("\\b"+(Bn.pattern||je(Bn))+"\\b","i").exec(He)&&(Bn.label||Bn)})}function an(fn){return Le(fn,function(Wt,Bn){var zn=Bn.pattern||je(Bn);return!Wt&&(Wt=RegExp("\\b"+zn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(He))&&(Wt=ue(Wt,zn,Bn.label||Bn)),Wt})}function un(fn){return Le(fn,function(Wt,Bn){var zn=Bn.pattern||je(Bn);return!Wt&&(Wt=RegExp("\\b"+zn+" *\\d+[.\\w_]*","i").exec(He)||RegExp("\\b"+zn+" *\\w+-[\\w]*","i").exec(He)||RegExp("\\b"+zn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(He))&&((Wt=String(Bn.label&&!RegExp(zn,"i").test(Bn.label)?Bn.label:Wt).split("/"))[1]&&!/[\d.]+/.test(Wt[0])&&(Wt[0]+=" "+Wt[1]),Bn=Bn.label||Bn,Wt=xe(Wt[0].replace(RegExp(zn,"i"),Bn).replace(RegExp("; *(?:"+Bn+"[_-])?","i")," ").replace(RegExp("("+Bn+")[-_.]?(\\w)","i"),"$1 $2"))),Wt})}function hn(fn){return Le(fn,function(Wt,Bn){return Wt||(RegExp(Bn+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(He)||0)[1]||null})}function qt(){return this.description||""}if(ze&&(ze=[ze]),/\bAndroid\b/.test(Ct)&&!it&&(Ye=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(He))&&(it=Be(Ye[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),St&&!it?it=un([St]):St&&it&&(it=it.replace(RegExp("^("+je(St)+")[-_.\\s]","i"),St+" ").replace(RegExp("^("+je(St)+")[-_.]?(\\w)","i"),St+" $2")),(Ye=/\bGoogle TV\b/.exec(it))&&(it=Ye[0]),/\bSimulator\b/i.test(He)&&(it=(it?it+" ":"")+"Simulator"),Ve=="Opera Mini"&&/\bOPiOS\b/.test(He)&&Se.push("running in Turbo/Uncompressed mode"),Ve=="IE"&&/\blike iPhone OS\b/.test(He)?(Ye=Ue(He.replace(/like iPhone OS/,"")),St=Ye.manufacturer,it=Ye.product):/^iP/.test(it)?(Ve||(Ve="Safari"),Ct="iOS"+((Ye=/ OS ([\d_]+)/i.exec(He))?" "+Ye[1].replace(/_/g,"."):"")):Ve=="Konqueror"&&/^Linux\b/i.test(Ct)?Ct="Kubuntu":St&&St!="Google"&&(/Chrome/.test(Ve)&&!/\bMobile Safari\b/i.test(He)||/\bVita\b/.test(it))||/\bAndroid\b/.test(Ct)&&/^Chrome/.test(Ve)&&/\bVersion\//i.test(He)?(Ve="Android Browser",Ct=/\bAndroid\b/.test(Ct)?Ct:"Android"):Ve=="Silk"?(/\bMobi/i.test(He)||(Ct="Android",Se.unshift("desktop mode")),/Accelerated *= *true/i.test(He)&&Se.unshift("accelerated")):Ve=="UC Browser"&&/\bUCWEB\b/.test(He)?Se.push("speed mode"):Ve=="PaleMoon"&&(Ye=/\bFirefox\/([\d.]+)\b/.exec(He))?Se.push("identifying as Firefox "+Ye[1]):Ve=="Firefox"&&(Ye=/\b(Mobile|Tablet|TV)\b/i.exec(He))?(Ct||(Ct="Firefox OS"),it||(it=Ye[1])):!Ve||(Ye=!/\bMinefield\b/i.test(He)&&/\b(?:Firefox|Safari)\b/.exec(Ve))?(Ve&&!it&&/[\/,]|^[^(]+?\)/.test(He.slice(He.indexOf(Ye+"/")+8))&&(Ve=null),(Ye=it||St||Ct)&&(it||St||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Ct))&&(Ve=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Ct)?Ct:Ye)+" Browser")):Ve=="Electron"&&(Ye=(/\bChrome\/([\d.]+)\b/.exec(He)||0)[1])&&Se.push("Chromium "+Ye),nt||(nt=hn(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",je(Ve),"(?:Firefox|Minefield|NetFront)"])),(Ye=ze=="iCab"&&parseFloat(nt)>3&&"WebKit"||/\bOpera\b/.test(Ve)&&(/\bOPR\b/.test(He)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(He)&&!/^(?:Trident|EdgeHTML)$/.test(ze)&&"WebKit"||!ze&&/\bMSIE\b/i.test(He)&&(Ct=="Mac OS"?"Tasman":"Trident")||ze=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ve)&&"NetFront")&&(ze=[Ye]),Ve=="IE"&&(Ye=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(He)||0)[1])?(Ve+=" Mobile",Ct="Windows Phone "+(/\+$/.test(Ye)?Ye:Ye+".x"),Se.unshift("desktop mode")):/\bWPDesktop\b/i.test(He)?(Ve="IE Mobile",Ct="Windows Phone 8.x",Se.unshift("desktop mode"),nt||(nt=(/\brv:([\d.]+)/.exec(He)||0)[1])):Ve!="IE"&&ze=="Trident"&&(Ye=/\brv:([\d.]+)/.exec(He))&&(Ve&&Se.push("identifying as "+Ve+(nt?" "+nt:"")),Ve="IE",nt=Ye[1]),$e){if(Fe(We,"global"))if(dt&&(Ye=dt.lang.System,Ze=Ye.getProperty("os.arch"),Ct=Ct||Ye.getProperty("os.name")+" "+Ye.getProperty("os.version")),ut){try{nt=We.require("ringo/engine").version.join("."),Ve="RingoJS"}catch(fn){(Ye=We.system)&&Ye.global.system==We.system&&(Ve="Narwhal",Ct||(Ct=Ye[0].os||null))}Ve||(Ve="Rhino")}else typeof We.process=="object"&&!We.process.browser&&(Ye=We.process)&&(typeof Ye.versions=="object"&&(typeof Ye.versions.electron=="string"?(Se.push("Node "+Ye.versions.node),Ve="Electron",nt=Ye.versions.electron):typeof Ye.versions.nw=="string"&&(Se.push("Chromium "+nt,"Node "+Ye.versions.node),Ve="NW.js",nt=Ye.versions.nw)),Ve||(Ve="Node.js",Ze=Ye.arch,Ct=Ye.platform,nt=/[\d.]+/.exec(Ye.version),nt=nt?nt[0]:null));else De(Ye=We.runtime)==lt?(Ve="Adobe AIR",Ct=Ye.flash.system.Capabilities.os):De(Ye=We.phantom)==ht?(Ve="PhantomJS",nt=(Ye=Ye.version||null)&&Ye.major+"."+Ye.minor+"."+Ye.patch):typeof gt.documentMode=="number"&&(Ye=/\bTrident\/(\d+)/i.exec(He))?(nt=[nt,gt.documentMode],(Ye=+Ye[1]+4)!=nt[1]&&(Se.push("IE "+nt[1]+" mode"),ze&&(ze[1]=""),nt[1]=Ye),nt=Ve=="IE"?String(nt[1].toFixed(1)):nt[0]):typeof gt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ve)&&(Se.push("masking as "+Ve+" "+nt),Ve="IE",nt="11.0",ze=["Trident"],Ct="Windows");Ct=Ct&&xe(Ct)}if(nt&&(Ye=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(nt)||/(?:alpha|beta)(?: ?\d)?/i.exec(He+";"+($e&&ft.appMinorVersion))||/\bMinefield\b/i.test(He)&&"a")&&(Ne=/b/i.test(Ye)?"beta":"alpha",nt=nt.replace(RegExp(Ye+"\\+?$"),"")+(Ne=="beta"?yt:Pt)+(/\d+\+?/.exec(Ye)||"")),Ve=="Fennec"||Ve=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(Ct))Ve="Firefox Mobile";else if(Ve=="Maxthon"&&nt)nt=nt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(it))it=="Xbox 360"&&(Ct=null),it=="Xbox 360"&&/\bIEMobile\b/.test(He)&&Se.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Ve)||Ve&&!it&&!/Browser|Mobi/.test(Ve))&&(Ct=="Windows CE"||/Mobi/i.test(He)))Ve+=" Mobile";else if(Ve=="IE"&&$e)try{We.external===null&&Se.unshift("platform preview")}catch(fn){Se.unshift("embedded")}else(/\bBlackBerry\b/.test(it)||/\bBB10\b/.test(He))&&(Ye=(RegExp(it.replace(/ +/g," *")+"/([.\\d]+)","i").exec(He)||0)[1]||nt)?(Ye=[Ye,/BB10/.test(He)],Ct=(Ye[1]?(it=null,St="BlackBerry"):"Device Software")+" "+Ye[0],nt=null):this!=Ae&&it!="Wii"&&($e&&Tt||/Opera/.test(Ve)&&/\b(?:MSIE|Firefox)\b/i.test(He)||Ve=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Ct)||Ve=="IE"&&(Ct&&!/^Win/.test(Ct)&&nt>5.5||/\bWindows XP\b/.test(Ct)&&nt>8||nt==8&&!/\bTrident\b/.test(He)))&&!de.test(Ye=Ue.call(Ae,He.replace(de,"")+";"))&&Ye.name&&(Ye="ing as "+Ye.name+((Ye=Ye.version)?" "+Ye:""),de.test(Ve)?(/\bIE\b/.test(Ye)&&Ct=="Mac OS"&&(Ct=null),Ye="identify"+Ye):(Ye="mask"+Ye,ct?Ve=xe(ct.replace(/([a-z])([A-Z])/g,"$1 $2")):Ve="Opera",/\bIE\b/.test(Ye)&&(Ct=null),$e||(nt=null)),ze=["Presto"],Se.push(Ye));(Ye=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(He)||0)[1])&&(Ye=[parseFloat(Ye.replace(/\.(\d)$/,".0$1")),Ye],Ve=="Safari"&&Ye[1].slice(-1)=="+"?(Ve="WebKit Nightly",Ne="alpha",nt=Ye[1].slice(0,-1)):(nt==Ye[1]||nt==(Ye[2]=(/\bSafari\/([\d.]+\+?)/i.exec(He)||0)[1]))&&(nt=null),Ye[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(He)||0)[1],Ye[0]==537.36&&Ye[2]==537.36&&parseFloat(Ye[1])>=28&&ze=="WebKit"&&(ze=["Blink"]),!$e||!Xe&&!Ye[1]?(ze&&(ze[1]="like Safari"),Ye=(Ye=Ye[0],Ye<400?1:Ye<500?2:Ye<526?3:Ye<533?4:Ye<534?"4+":Ye<535?5:Ye<537?6:Ye<538?7:Ye<601?8:Ye<602?9:Ye<604?10:Ye<606?11:Ye<608?12:"12")):(ze&&(ze[1]="like Chrome"),Ye=Ye[1]||(Ye=Ye[0],Ye<530?1:Ye<532?2:Ye<532.05?3:Ye<533?4:Ye<534.03?5:Ye<534.07?6:Ye<534.1?7:Ye<534.13?8:Ye<534.16?9:Ye<534.24?10:Ye<534.3?11:Ye<535.01?12:Ye<535.02?"13+":Ye<535.07?15:Ye<535.11?16:Ye<535.19?17:Ye<536.05?18:Ye<536.1?19:Ye<537.01?20:Ye<537.11?"21+":Ye<537.13?23:Ye<537.18?24:Ye<537.24?25:Ye<537.36?26:ze!="Blink"?"27":"28")),ze&&(ze[1]+=" "+(Ye+=typeof Ye=="number"?".x":/[.+]/.test(Ye)?"":"+")),Ve=="Safari"&&(!nt||parseInt(nt)>45)?nt=Ye:Ve=="Chrome"&&/\bHeadlessChrome/i.test(He)&&Se.unshift("headless")),Ve=="Opera"&&(Ye=/\bzbov|zvav$/.exec(Ct))?(Ve+=" ",Se.unshift("desktop mode"),Ye=="zvav"?(Ve+="Mini",nt=null):Ve+="Mobile",Ct=Ct.replace(RegExp(" *"+Ye+"$"),"")):Ve=="Safari"&&/\bChrome\b/.exec(ze&&ze[1])?(Se.unshift("desktop mode"),Ve="Chrome Mobile",nt=null,/\bOS X\b/.test(Ct)?(St="Apple",Ct="iOS 4.3+"):Ct=null):/\bSRWare Iron\b/.test(Ve)&&!nt&&(nt=hn("Chrome")),nt&&nt.indexOf(Ye=/[\d.]+$/.exec(Ct))==0&&He.indexOf("/"+Ye+"-")>-1&&(Ct=Be(Ct.replace(Ye,""))),Ct&&Ct.indexOf(Ve)!=-1&&!RegExp(Ve+" OS").test(Ct)&&(Ct=Ct.replace(RegExp(" *"+je(Ve)+" *"),"")),ze&&!/\b(?:Avant|Nook)\b/.test(Ve)&&(/Browser|Lunascape|Maxthon/.test(Ve)||Ve!="Safari"&&/^iOS/.test(Ct)&&/\bSafari\b/.test(ze[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(Ve)&&ze[1])&&(Ye=ze[ze.length-1])&&Se.push(Ye),Se.length&&(Se=["("+Se.join("; ")+")"]),St&&it&&it.indexOf(St)<0&&Se.push("on "+St),it&&Se.push((/^on /.test(Se[Se.length-1])?"":"on ")+it),Ct&&(Ye=/ ([\d.+]+)$/.exec(Ct),Ie=Ye&&Ct.charAt(Ct.length-Ye[0].length-1)=="/",Ct={architecture:32,family:Ye&&!Ie?Ct.replace(Ye[0],""):Ct,version:Ye?Ye[1]:null,toString:function(){var fn=this.version;return this.family+(fn&&!Ie?" "+fn:"")+(this.architecture==64?" 64-bit":"")}}),(Ye=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Ze))&&!/\bi686\b/i.test(Ze)?(Ct&&(Ct.architecture=64,Ct.family=Ct.family.replace(RegExp(" *"+Ye),"")),Ve&&(/\bWOW64\b/i.test(He)||$e&&/\w(?:86|32)$/.test(ft.cpuClass||ft.platform)&&!/\bWin64; x64\b/i.test(He))&&Se.unshift("32-bit")):Ct&&/^OS X/.test(Ct.family)&&Ve=="Chrome"&&parseFloat(nt)>=39&&(Ct.architecture=64),He||(He=null);var On={};return On.description=He,On.layout=ze&&ze[0],On.manufacturer=St,On.name=Ve,On.prerelease=Ne,On.product=it,On.ua=He,On.version=Ve&&nt,On.os=Ct||{architecture:null,family:null,version:null,toString:function(){return"null"}},On.parse=Ue,On.toString=qt,On.version&&Se.unshift(nt),On.name&&Se.unshift(Ve),Ct&&Ve&&!(Ct==String(Ct).split(" ")[0]&&(Ct==Ve.split(" ")[0]||it))&&Se.push(it?"("+Ct+")":"on "+Ct),Se.length&&(On.description=Se.join(" ")),On}var Je=Ue();typeof ot=="function"&&typeof ot.amd=="object"&&ot.amd?(be.platform=Je,ot(function(){return Je})):we&&Te?Ae(Je,function(He,We){we[We]=He}):be.platform=Je}).call(this)}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(ae,Ge,Re){(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?Ge.exports={nextTick:pe}:Ge.exports=fe;function pe(be,Ee,we,Te){if(typeof be!="function")throw new TypeError('"callback" argument must be a function');var ve=arguments.length,Pe,de;switch(ve){case 0:case 1:return fe.nextTick(be);case 2:return fe.nextTick(function(){be.call(null,Ee)});case 3:return fe.nextTick(function(){be.call(null,Ee,we)});case 4:return fe.nextTick(function(){be.call(null,Ee,we,Te)});default:for(Pe=new Array(ve-1),de=0;de<Pe.length;)Pe[de++]=arguments[de];return fe.nextTick(function(){be.apply(null,Pe)})}}}).call(this)}).call(this,ae("_process"))},{_process:467}],381:[function(ae,Ge,Re){var fe=Ge.exports={},pe,be;function Ee(){throw new Error("setTimeout has not been defined")}function we(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?pe=setTimeout:pe=Ee}catch(me){pe=Ee}try{typeof clearTimeout=="function"?be=clearTimeout:be=we}catch(me){be=we}})();function Te(me){if(pe===setTimeout)return setTimeout(me,0);if((pe===Ee||!pe)&&setTimeout)return pe=setTimeout,setTimeout(me,0);try{return pe(me,0)}catch(xe){try{return pe.call(null,me,0)}catch(Ae){return pe.call(this,me,0)}}}function ve(me){if(be===clearTimeout)return clearTimeout(me);if((be===we||!be)&&clearTimeout)return be=clearTimeout,clearTimeout(me);try{return be(me)}catch(xe){try{return be.call(null,me)}catch(Ae){return be.call(this,me)}}}var Pe=[],de=!1,ee,z=-1;function oe(){!de||!ee||(de=!1,ee.length?Pe=ee.concat(Pe):z=-1,Pe.length&&ie())}function ie(){if(!de){var me=Te(oe);de=!0;for(var xe=Pe.length;xe;){for(ee=Pe,Pe=[];++z<xe;)ee&&ee[z].run();z=-1,xe=Pe.length}ee=null,de=!1,ve(me)}}fe.nextTick=function(me){var xe=new Array(arguments.length-1);if(arguments.length>1)for(var Ae=1;Ae<arguments.length;Ae++)xe[Ae-1]=arguments[Ae];Pe.push(new le(me,xe)),Pe.length===1&&!de&&Te(ie)};function le(me,xe){this.fun=me,this.array=xe}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(me){return[]},fe.binding=function(me){throw new Error("process.binding is not supported")},fe.cwd=function(){return"/"},fe.chdir=function(me){throw new Error("process.chdir is not supported")},fe.umask=function(){return 0}},{}],382:[function(ae,Ge,Re){(function(fe){(function(){(function(pe){var be=typeof Re=="object"&&Re&&!Re.nodeType&&Re,Ee=typeof Ge=="object"&&Ge&&!Ge.nodeType&&Ge,we=typeof fe=="object"&&fe;(we.global===we||we.window===we||we.self===we)&&(pe=we);var Te,ve=2147483647,Pe=36,de=1,ee=26,z=38,oe=700,ie=72,le=128,ue="-",me=/^xn--/,xe=/[^\x20-\x7E]/,Ae=/[\x2E\u3002\uFF0E\uFF61]/g,De={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=Pe-de,je=Math.floor,Le=String.fromCharCode,Be;function Ue(wt){throw new RangeError(De[wt])}function Je(wt,ht){for(var dt=wt.length,ut=[];dt--;)ut[dt]=ht(wt[dt]);return ut}function He(wt,ht){var dt=wt.split("@"),ut="";dt.length>1&&(ut=dt[0]+"@",wt=dt[1]),wt=wt.replace(Ae,".");var Pt=wt.split("."),yt=Je(Pt,ht).join(".");return ut+yt}function We(wt){for(var ht=[],dt=0,ut=wt.length,Pt,yt;dt<ut;)Pt=wt.charCodeAt(dt++),Pt>=55296&&Pt<=56319&&dt<ut?(yt=wt.charCodeAt(dt++),(yt&64512)==56320?ht.push(((Pt&1023)<<10)+(yt&1023)+65536):(ht.push(Pt),dt--)):ht.push(Pt);return ht}function at(wt){return Je(wt,function(ht){var dt="";return ht>65535&&(ht-=65536,dt+=Le(ht>>>10&1023|55296),ht=56320|ht&1023),dt+=Le(ht),dt}).join("")}function ft(wt){return wt-48<10?wt-22:wt-65<26?wt-65:wt-97<26?wt-97:Pe}function mt(wt,ht){return wt+22+75*(wt<26)-((ht!=0)<<5)}function Lt(wt,ht,dt){var ut=0;for(wt=dt?je(wt/oe):wt>>1,wt+=je(wt/ht);wt>Fe*ee>>1;ut+=Pe)wt=je(wt/Fe);return je(ut+(Fe+1)*wt/(wt+z))}function Xe(wt){var ht=[],dt=wt.length,ut,Pt=0,yt=le,gt=ie,Tt,ct,Ye,Ze,Se,Ne,$e,nt,Ie;for(Tt=wt.lastIndexOf(ue),Tt<0&&(Tt=0),ct=0;ct<Tt;++ct)wt.charCodeAt(ct)>=128&&Ue("not-basic"),ht.push(wt.charCodeAt(ct));for(Ye=Tt>0?Tt+1:0;Ye<dt;){for(Ze=Pt,Se=1,Ne=Pe;Ye>=dt&&Ue("invalid-input"),$e=ft(wt.charCodeAt(Ye++)),($e>=Pe||$e>je((ve-Pt)/Se))&&Ue("overflow"),Pt+=$e*Se,nt=Ne<=gt?de:Ne>=gt+ee?ee:Ne-gt,!($e<nt);Ne+=Pe)Ie=Pe-nt,Se>je(ve/Ie)&&Ue("overflow"),Se*=Ie;ut=ht.length+1,gt=Lt(Pt-Ze,ut,Ze==0),je(Pt/ut)>ve-yt&&Ue("overflow"),yt+=je(Pt/ut),Pt%=ut,ht.splice(Pt++,0,yt)}return at(ht)}function et(wt){var ht,dt,ut,Pt,yt,gt,Tt,ct,Ye,Ze,Se,Ne=[],$e,nt,Ie,ze;for(wt=We(wt),$e=wt.length,ht=le,dt=0,yt=ie,gt=0;gt<$e;++gt)Se=wt[gt],Se<128&&Ne.push(Le(Se));for(ut=Pt=Ne.length,Pt&&Ne.push(ue);ut<$e;){for(Tt=ve,gt=0;gt<$e;++gt)Se=wt[gt],Se>=ht&&Se<Tt&&(Tt=Se);for(nt=ut+1,Tt-ht>je((ve-dt)/nt)&&Ue("overflow"),dt+=(Tt-ht)*nt,ht=Tt,gt=0;gt<$e;++gt)if(Se=wt[gt],Se<ht&&++dt>ve&&Ue("overflow"),Se==ht){for(ct=dt,Ye=Pe;Ze=Ye<=yt?de:Ye>=yt+ee?ee:Ye-yt,!(ct<Ze);Ye+=Pe)ze=ct-Ze,Ie=Pe-Ze,Ne.push(Le(mt(Ze+ze%Ie,0))),ct=je(ze/Ie);Ne.push(Le(mt(ct,0))),yt=Lt(dt,nt,ut==Pt),dt=0,++ut}++dt,++ht}return Ne.join("")}function lt(wt){return He(wt,function(ht){return me.test(ht)?Xe(ht.slice(4).toLowerCase()):ht})}function vt(wt){return He(wt,function(ht){return xe.test(ht)?"xn--"+et(ht):ht})}if(Te={version:"1.4.1",ucs2:{decode:We,encode:at},decode:Xe,encode:et,toASCII:vt,toUnicode:lt},typeof ot=="function"&&typeof ot.amd=="object"&&ot.amd)ot("punycode",function(){return Te});else if(be&&Ee)if(Ge.exports==be)Ee.exports=Te;else for(Be in Te)Te.hasOwnProperty(Be)&&(be[Be]=Te[Be]);else pe.punycode=Te})(this)}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(ae,Ge,Re){"use strict";function fe(be,Ee){return Object.prototype.hasOwnProperty.call(be,Ee)}Ge.exports=function(be,Ee,we,Te){Ee=Ee||"&",we=we||"=";var ve={};if(typeof be!="string"||be.length===0)return ve;var Pe=/\+/g;be=be.split(Ee);var de=1e3;Te&&typeof Te.maxKeys=="number"&&(de=Te.maxKeys);var ee=be.length;de>0&&ee>de&&(ee=de);for(var z=0;z<ee;++z){var oe=be[z].replace(Pe,"%20"),ie=oe.indexOf(we),le,ue,me,xe;ie>=0?(le=oe.substr(0,ie),ue=oe.substr(ie+1)):(le=oe,ue=""),me=decodeURIComponent(le),xe=decodeURIComponent(ue),fe(ve,me)?pe(ve[me])?ve[me].push(xe):ve[me]=[ve[me],xe]:ve[me]=xe}return ve};var pe=Array.isArray||function(be){return Object.prototype.toString.call(be)==="[object Array]"}},{}],384:[function(ae,Ge,Re){"use strict";var fe=function(we){switch(typeof we){case"string":return we;case"boolean":return we?"true":"false";case"number":return isFinite(we)?we:"";default:return""}};Ge.exports=function(we,Te,ve,Pe){return Te=Te||"&",ve=ve||"=",we===null&&(we=void 0),typeof we=="object"?be(Ee(we),function(de){var ee=encodeURIComponent(fe(de))+ve;return pe(we[de])?be(we[de],function(z){return ee+encodeURIComponent(fe(z))}).join(Te):ee+encodeURIComponent(fe(we[de]))}).join(Te):Pe?encodeURIComponent(fe(Pe))+ve+encodeURIComponent(fe(we)):""};var pe=Array.isArray||function(we){return Object.prototype.toString.call(we)==="[object Array]"};function be(we,Te){if(we.map)return we.map(Te);for(var ve=[],Pe=0;Pe<we.length;Pe++)ve.push(Te(we[Pe],Pe));return ve}var Ee=Object.keys||function(we){var Te=[];for(var ve in we)Object.prototype.hasOwnProperty.call(we,ve)&&Te.push(ve);return Te}},{}],385:[function(ae,Ge,Re){"use strict";Re.decode=Re.parse=ae("./decode"),Re.encode=Re.stringify=ae("./encode")},{"./decode":383,"./encode":384}],386:[function(ae,Ge,Re){"use strict";var fe=ae("process-nextick-args"),pe=Object.keys||function(oe){var ie=[];for(var le in oe)ie.push(le);return ie};Ge.exports=de;var be=Object.create(ae("core-util-is"));be.inherits=ae("inherits");var Ee=ae("./_stream_readable"),we=ae("./_stream_writable");be.inherits(de,Ee);for(var Te=pe(we.prototype),ve=0;ve<Te.length;ve++){var Pe=Te[ve];de.prototype[Pe]||(de.prototype[Pe]=we.prototype[Pe])}function de(oe){if(!(this instanceof de))return new de(oe);Ee.call(this,oe),we.call(this,oe),oe&&oe.readable===!1&&(this.readable=!1),oe&&oe.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,oe&&oe.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",ee)}Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ee(){this.allowHalfOpen||this._writableState.ended||fe.nextTick(z,this)}function z(oe){oe.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(oe){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=oe,this._writableState.destroyed=oe)}}),de.prototype._destroy=function(oe,ie){this.push(null),this.end(),fe.nextTick(ie,oe)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(ae,Ge,Re){"use strict";Ge.exports=be;var fe=ae("./_stream_transform"),pe=Object.create(ae("core-util-is"));pe.inherits=ae("inherits"),pe.inherits(be,fe);function be(Ee){if(!(this instanceof be))return new be(Ee);fe.call(this,Ee)}be.prototype._transform=function(Ee,we,Te){Te(null,Ee)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(ae,Ge,Re){(function(fe,pe){(function(){"use strict";var be=ae("process-nextick-args");Ge.exports=Le;var Ee=ae("isarray"),we;Le.ReadableState=je;var Te=ae("events").EventEmitter,ve=function(Se,Ne){return Se.listeners(Ne).length},Pe=ae("./internal/streams/stream"),de=ae("safe-buffer").Buffer,ee=pe.Uint8Array||function(){};function z(Se){return de.from(Se)}function oe(Se){return de.isBuffer(Se)||Se instanceof ee}var ie=Object.create(ae("core-util-is"));ie.inherits=ae("inherits");var le=ae("util"),ue=void 0;le&&le.debuglog?ue=le.debuglog("stream"):ue=function(){};var me=ae("./internal/streams/BufferList"),xe=ae("./internal/streams/destroy"),Ae;ie.inherits(Le,Pe);var De=["error","close","destroy","pause","resume"];function Fe(Se,Ne,$e){if(typeof Se.prependListener=="function")return Se.prependListener(Ne,$e);!Se._events||!Se._events[Ne]?Se.on(Ne,$e):Ee(Se._events[Ne])?Se._events[Ne].unshift($e):Se._events[Ne]=[$e,Se._events[Ne]]}function je(Se,Ne){we=we||ae("./_stream_duplex"),Se=Se||{};var $e=Ne instanceof we;this.objectMode=!!Se.objectMode,$e&&(this.objectMode=this.objectMode||!!Se.readableObjectMode);var nt=Se.highWaterMark,Ie=Se.readableHighWaterMark,ze=this.objectMode?16:16*1024;nt||nt===0?this.highWaterMark=nt:$e&&(Ie||Ie===0)?this.highWaterMark=Ie:this.highWaterMark=ze,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new me,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=Se.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Se.encoding&&(Ae||(Ae=ae("string_decoder/").StringDecoder),this.decoder=new Ae(Se.encoding),this.encoding=Se.encoding)}function Le(Se){if(we=we||ae("./_stream_duplex"),!(this instanceof Le))return new Le(Se);this._readableState=new je(Se,this),this.readable=!0,Se&&(typeof Se.read=="function"&&(this._read=Se.read),typeof Se.destroy=="function"&&(this._destroy=Se.destroy)),Pe.call(this)}Object.defineProperty(Le.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Se){this._readableState&&(this._readableState.destroyed=Se)}}),Le.prototype.destroy=xe.destroy,Le.prototype._undestroy=xe.undestroy,Le.prototype._destroy=function(Se,Ne){this.push(null),Ne(Se)},Le.prototype.push=function(Se,Ne){var $e=this._readableState,nt;return $e.objectMode?nt=!0:typeof Se=="string"&&(Ne=Ne||$e.defaultEncoding,Ne!==$e.encoding&&(Se=de.from(Se,Ne),Ne=""),nt=!0),Be(this,Se,Ne,!1,nt)},Le.prototype.unshift=function(Se){return Be(this,Se,null,!0,!1)};function Be(Se,Ne,$e,nt,Ie){var ze=Se._readableState;if(Ne===null)ze.reading=!1,mt(Se,ze);else{var Ve;Ie||(Ve=Je(ze,Ne)),Ve?Se.emit("error",Ve):ze.objectMode||Ne&&Ne.length>0?(typeof Ne!="string"&&!ze.objectMode&&Object.getPrototypeOf(Ne)!==de.prototype&&(Ne=z(Ne)),nt?ze.endEmitted?Se.emit("error",new Error("stream.unshift() after end event")):Ue(Se,ze,Ne,!0):ze.ended?Se.emit("error",new Error("stream.push() after EOF")):(ze.reading=!1,ze.decoder&&!$e?(Ne=ze.decoder.write(Ne),ze.objectMode||Ne.length!==0?Ue(Se,ze,Ne,!1):et(Se,ze)):Ue(Se,ze,Ne,!1))):nt||(ze.reading=!1)}return He(ze)}function Ue(Se,Ne,$e,nt){Ne.flowing&&Ne.length===0&&!Ne.sync?(Se.emit("data",$e),Se.read(0)):(Ne.length+=Ne.objectMode?1:$e.length,nt?Ne.buffer.unshift($e):Ne.buffer.push($e),Ne.needReadable&&Lt(Se)),et(Se,Ne)}function Je(Se,Ne){var $e;return!oe(Ne)&&typeof Ne!="string"&&Ne!==void 0&&!Se.objectMode&&($e=new TypeError("Invalid non-string/buffer chunk")),$e}function He(Se){return!Se.ended&&(Se.needReadable||Se.length<Se.highWaterMark||Se.length===0)}Le.prototype.isPaused=function(){return this._readableState.flowing===!1},Le.prototype.setEncoding=function(Se){return Ae||(Ae=ae("string_decoder/").StringDecoder),this._readableState.decoder=new Ae(Se),this._readableState.encoding=Se,this};var We=8388608;function at(Se){return Se>=We?Se=We:(Se--,Se|=Se>>>1,Se|=Se>>>2,Se|=Se>>>4,Se|=Se>>>8,Se|=Se>>>16,Se++),Se}function ft(Se,Ne){return Se<=0||Ne.length===0&&Ne.ended?0:Ne.objectMode?1:Se!==Se?Ne.flowing&&Ne.length?Ne.buffer.head.data.length:Ne.length:(Se>Ne.highWaterMark&&(Ne.highWaterMark=at(Se)),Se<=Ne.length?Se:Ne.ended?Ne.length:(Ne.needReadable=!0,0))}Le.prototype.read=function(Se){ue("read",Se),Se=parseInt(Se,10);var Ne=this._readableState,$e=Se;if(Se!==0&&(Ne.emittedReadable=!1),Se===0&&Ne.needReadable&&(Ne.length>=Ne.highWaterMark||Ne.ended))return ue("read: emitReadable",Ne.length,Ne.ended),Ne.length===0&&Ne.ended?ct(this):Lt(this),null;if(Se=ft(Se,Ne),Se===0&&Ne.ended)return Ne.length===0&&ct(this),null;var nt=Ne.needReadable;ue("need readable",nt),(Ne.length===0||Ne.length-Se<Ne.highWaterMark)&&(nt=!0,ue("length less than watermark",nt)),Ne.ended||Ne.reading?(nt=!1,ue("reading or ended",nt)):nt&&(ue("do read"),Ne.reading=!0,Ne.sync=!0,Ne.length===0&&(Ne.needReadable=!0),this._read(Ne.highWaterMark),Ne.sync=!1,Ne.reading||(Se=ft($e,Ne)));var Ie;return Se>0?Ie=Pt(Se,Ne):Ie=null,Ie===null?(Ne.needReadable=!0,Se=0):Ne.length-=Se,Ne.length===0&&(Ne.ended||(Ne.needReadable=!0),$e!==Se&&Ne.ended&&ct(this)),Ie!==null&&this.emit("data",Ie),Ie};function mt(Se,Ne){if(!Ne.ended){if(Ne.decoder){var $e=Ne.decoder.end();$e&&$e.length&&(Ne.buffer.push($e),Ne.length+=Ne.objectMode?1:$e.length)}Ne.ended=!0,Lt(Se)}}function Lt(Se){var Ne=Se._readableState;Ne.needReadable=!1,Ne.emittedReadable||(ue("emitReadable",Ne.flowing),Ne.emittedReadable=!0,Ne.sync?be.nextTick(Xe,Se):Xe(Se))}function Xe(Se){ue("emit readable"),Se.emit("readable"),ut(Se)}function et(Se,Ne){Ne.readingMore||(Ne.readingMore=!0,be.nextTick(lt,Se,Ne))}function lt(Se,Ne){for(var $e=Ne.length;!Ne.reading&&!Ne.flowing&&!Ne.ended&&Ne.length<Ne.highWaterMark&&(ue("maybeReadMore read 0"),Se.read(0),$e!==Ne.length);)$e=Ne.length;Ne.readingMore=!1}Le.prototype._read=function(Se){this.emit("error",new Error("_read() is not implemented"))},Le.prototype.pipe=function(Se,Ne){var $e=this,nt=this._readableState;switch(nt.pipesCount){case 0:nt.pipes=Se;break;case 1:nt.pipes=[nt.pipes,Se];break;default:nt.pipes.push(Se);break}nt.pipesCount+=1,ue("pipe count=%d opts=%j",nt.pipesCount,Ne);var Ie=(!Ne||Ne.end!==!1)&&Se!==fe.stdout&&Se!==fe.stderr,ze=Ie?it:qt;nt.endEmitted?be.nextTick(ze):$e.once("end",ze),Se.on("unpipe",Ve);function Ve(On,fn){ue("onunpipe"),On===$e&&fn&&fn.hasUnpiped===!1&&(fn.hasUnpiped=!0,It())}function it(){ue("onend"),Se.end()}var St=vt($e);Se.on("drain",St);var Ct=!1;function It(){ue("cleanup"),Se.removeListener("close",un),Se.removeListener("finish",hn),Se.removeListener("drain",St),Se.removeListener("error",an),Se.removeListener("unpipe",Ve),$e.removeListener("end",it),$e.removeListener("end",qt),$e.removeListener("data",Kt),Ct=!0,nt.awaitDrain&&(!Se._writableState||Se._writableState.needDrain)&&St()}var jt=!1;$e.on("data",Kt);function Kt(On){ue("ondata"),jt=!1;var fn=Se.write(On);fn===!1&&!jt&&((nt.pipesCount===1&&nt.pipes===Se||nt.pipesCount>1&&Ze(nt.pipes,Se)!==-1)&&!Ct&&(ue("false write response, pause",$e._readableState.awaitDrain),$e._readableState.awaitDrain++,jt=!0),$e.pause())}function an(On){ue("onerror",On),qt(),Se.removeListener("error",an),ve(Se,"error")===0&&Se.emit("error",On)}Fe(Se,"error",an);function un(){Se.removeListener("finish",hn),qt()}Se.once("close",un);function hn(){ue("onfinish"),Se.removeListener("close",un),qt()}Se.once("finish",hn);function qt(){ue("unpipe"),$e.unpipe(Se)}return Se.emit("pipe",$e),nt.flowing||(ue("pipe resume"),$e.resume()),Se};function vt(Se){return function(){var Ne=Se._readableState;ue("pipeOnDrain",Ne.awaitDrain),Ne.awaitDrain&&Ne.awaitDrain--,Ne.awaitDrain===0&&ve(Se,"data")&&(Ne.flowing=!0,ut(Se))}}Le.prototype.unpipe=function(Se){var Ne=this._readableState,$e={hasUnpiped:!1};if(Ne.pipesCount===0)return this;if(Ne.pipesCount===1)return Se&&Se!==Ne.pipes?this:(Se||(Se=Ne.pipes),Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1,Se&&Se.emit("unpipe",this,$e),this);if(!Se){var nt=Ne.pipes,Ie=Ne.pipesCount;Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1;for(var ze=0;ze<Ie;ze++)nt[ze].emit("unpipe",this,$e);return this}var Ve=Ze(Ne.pipes,Se);return Ve===-1?this:(Ne.pipes.splice(Ve,1),Ne.pipesCount-=1,Ne.pipesCount===1&&(Ne.pipes=Ne.pipes[0]),Se.emit("unpipe",this,$e),this)},Le.prototype.on=function(Se,Ne){var $e=Pe.prototype.on.call(this,Se,Ne);if(Se==="data")this._readableState.flowing!==!1&&this.resume();else if(Se==="readable"){var nt=this._readableState;!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.emittedReadable=!1,nt.reading?nt.length&&Lt(this):be.nextTick(wt,this))}return $e},Le.prototype.addListener=Le.prototype.on;function wt(Se){ue("readable nexttick read 0"),Se.read(0)}Le.prototype.resume=function(){var Se=this._readableState;return Se.flowing||(ue("resume"),Se.flowing=!0,ht(this,Se)),this};function ht(Se,Ne){Ne.resumeScheduled||(Ne.resumeScheduled=!0,be.nextTick(dt,Se,Ne))}function dt(Se,Ne){Ne.reading||(ue("resume read 0"),Se.read(0)),Ne.resumeScheduled=!1,Ne.awaitDrain=0,Se.emit("resume"),ut(Se),Ne.flowing&&!Ne.reading&&Se.read(0)}Le.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 ut(Se){var Ne=Se._readableState;for(ue("flow",Ne.flowing);Ne.flowing&&Se.read()!==null;);}Le.prototype.wrap=function(Se){var Ne=this,$e=this._readableState,nt=!1;Se.on("end",function(){if(ue("wrapped end"),$e.decoder&&!$e.ended){var Ve=$e.decoder.end();Ve&&Ve.length&&Ne.push(Ve)}Ne.push(null)}),Se.on("data",function(Ve){if(ue("wrapped data"),$e.decoder&&(Ve=$e.decoder.write(Ve)),!($e.objectMode&&Ve==null)&&!(!$e.objectMode&&(!Ve||!Ve.length))){var it=Ne.push(Ve);it||(nt=!0,Se.pause())}});for(var Ie in Se)this[Ie]===void 0&&typeof Se[Ie]=="function"&&(this[Ie]=function(Ve){return function(){return Se[Ve].apply(Se,arguments)}}(Ie));for(var ze=0;ze<De.length;ze++)Se.on(De[ze],this.emit.bind(this,De[ze]));return this._read=function(Ve){ue("wrapped _read",Ve),nt&&(nt=!1,Se.resume())},this},Object.defineProperty(Le.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Le._fromList=Pt;function Pt(Se,Ne){if(Ne.length===0)return null;var $e;return Ne.objectMode?$e=Ne.buffer.shift():!Se||Se>=Ne.length?(Ne.decoder?$e=Ne.buffer.join(""):Ne.buffer.length===1?$e=Ne.buffer.head.data:$e=Ne.buffer.concat(Ne.length),Ne.buffer.clear()):$e=yt(Se,Ne.buffer,Ne.decoder),$e}function yt(Se,Ne,$e){var nt;return Se<Ne.head.data.length?(nt=Ne.head.data.slice(0,Se),Ne.head.data=Ne.head.data.slice(Se)):Se===Ne.head.data.length?nt=Ne.shift():nt=$e?gt(Se,Ne):Tt(Se,Ne),nt}function gt(Se,Ne){var $e=Ne.head,nt=1,Ie=$e.data;for(Se-=Ie.length;$e=$e.next;){var ze=$e.data,Ve=Se>ze.length?ze.length:Se;if(Ve===ze.length?Ie+=ze:Ie+=ze.slice(0,Se),Se-=Ve,Se===0){Ve===ze.length?(++nt,$e.next?Ne.head=$e.next:Ne.head=Ne.tail=null):(Ne.head=$e,$e.data=ze.slice(Ve));break}++nt}return Ne.length-=nt,Ie}function Tt(Se,Ne){var $e=de.allocUnsafe(Se),nt=Ne.head,Ie=1;for(nt.data.copy($e),Se-=nt.data.length;nt=nt.next;){var ze=nt.data,Ve=Se>ze.length?ze.length:Se;if(ze.copy($e,$e.length-Se,0,Ve),Se-=Ve,Se===0){Ve===ze.length?(++Ie,nt.next?Ne.head=nt.next:Ne.head=Ne.tail=null):(Ne.head=nt,nt.data=ze.slice(Ve));break}++Ie}return Ne.length-=Ie,$e}function ct(Se){var Ne=Se._readableState;if(Ne.length>0)throw new Error('"endReadable()" called on non-empty stream');Ne.endEmitted||(Ne.ended=!0,be.nextTick(Ye,Ne,Se))}function Ye(Se,Ne){!Se.endEmitted&&Se.length===0&&(Se.endEmitted=!0,Ne.readable=!1,Ne.emit("end"))}function Ze(Se,Ne){for(var $e=0,nt=Se.length;$e<nt;$e++)if(Se[$e]===Ne)return $e;return-1}}).call(this)}).call(this,ae("_process"),typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(ae,Ge,Re){"use strict";Ge.exports=Ee;var fe=ae("./_stream_duplex"),pe=Object.create(ae("core-util-is"));pe.inherits=ae("inherits"),pe.inherits(Ee,fe);function be(ve,Pe){var de=this._transformState;de.transforming=!1;var ee=de.writecb;if(!ee)return this.emit("error",new Error("write callback called multiple times"));de.writechunk=null,de.writecb=null,Pe!=null&&this.push(Pe),ee(ve);var z=this._readableState;z.reading=!1,(z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}function Ee(ve){if(!(this instanceof Ee))return new Ee(ve);fe.call(this,ve),this._transformState={afterTransform:be.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",we)}function we(){var ve=this;typeof this._flush=="function"?this._flush(function(Pe,de){Te(ve,Pe,de)}):Te(this,null,null)}Ee.prototype.push=function(ve,Pe){return this._transformState.needTransform=!1,fe.prototype.push.call(this,ve,Pe)},Ee.prototype._transform=function(ve,Pe,de){throw new Error("_transform() is not implemented")},Ee.prototype._write=function(ve,Pe,de){var ee=this._transformState;if(ee.writecb=de,ee.writechunk=ve,ee.writeencoding=Pe,!ee.transforming){var z=this._readableState;(ee.needTransform||z.needReadable||z.length<z.highWaterMark)&&this._read(z.highWaterMark)}},Ee.prototype._read=function(ve){var Pe=this._transformState;Pe.writechunk!==null&&Pe.writecb&&!Pe.transforming?(Pe.transforming=!0,this._transform(Pe.writechunk,Pe.writeencoding,Pe.afterTransform)):Pe.needTransform=!0},Ee.prototype._destroy=function(ve,Pe){var de=this;fe.prototype._destroy.call(this,ve,function(ee){Pe(ee),de.emit("close")})};function Te(ve,Pe,de){if(Pe)return ve.emit("error",Pe);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(ae,Ge,Re){(function(fe,pe,be){(function(){"use strict";var Ee=ae("process-nextick-args");Ge.exports=Fe;function we(dt,ut,Pt){this.chunk=dt,this.encoding=ut,this.callback=Pt,this.next=null}function Te(dt){var ut=this;this.next=null,this.entry=null,this.finish=function(){ht(ut,dt)}}var ve=!fe.browser&&["v0.10","v0.9."].indexOf(fe.version.slice(0,5))>-1?be:Ee.nextTick,Pe;Fe.WritableState=Ae;var de=Object.create(ae("core-util-is"));de.inherits=ae("inherits");var ee={deprecate:ae("util-deprecate")},z=ae("./internal/streams/stream"),oe=ae("safe-buffer").Buffer,ie=pe.Uint8Array||function(){};function le(dt){return oe.from(dt)}function ue(dt){return oe.isBuffer(dt)||dt instanceof ie}var me=ae("./internal/streams/destroy");de.inherits(Fe,z);function xe(){}function Ae(dt,ut){Pe=Pe||ae("./_stream_duplex"),dt=dt||{};var Pt=ut instanceof Pe;this.objectMode=!!dt.objectMode,Pt&&(this.objectMode=this.objectMode||!!dt.writableObjectMode);var yt=dt.highWaterMark,gt=dt.writableHighWaterMark,Tt=this.objectMode?16:16*1024;yt||yt===0?this.highWaterMark=yt:Pt&&(gt||gt===0)?this.highWaterMark=gt:this.highWaterMark=Tt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ct=dt.decodeStrings===!1;this.decodeStrings=!ct,this.defaultEncoding=dt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ye){at(ut,Ye)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Te(this)}Ae.prototype.getBuffer=function(){for(var ut=this.bufferedRequest,Pt=[];ut;)Pt.push(ut),ut=ut.next;return Pt},function(){try{Object.defineProperty(Ae.prototype,"buffer",{get:ee.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(dt){}}();var De;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(De=Function.prototype[Symbol.hasInstance],Object.defineProperty(Fe,Symbol.hasInstance,{value:function(dt){return De.call(this,dt)?!0:this!==Fe?!1:dt&&dt._writableState instanceof Ae}})):De=function(dt){return dt instanceof this};function Fe(dt){if(Pe=Pe||ae("./_stream_duplex"),!De.call(Fe,this)&&!(this instanceof Pe))return new Fe(dt);this._writableState=new Ae(dt,this),this.writable=!0,dt&&(typeof dt.write=="function"&&(this._write=dt.write),typeof dt.writev=="function"&&(this._writev=dt.writev),typeof dt.destroy=="function"&&(this._destroy=dt.destroy),typeof dt.final=="function"&&(this._final=dt.final)),z.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function je(dt,ut){var Pt=new Error("write after end");dt.emit("error",Pt),Ee.nextTick(ut,Pt)}function Le(dt,ut,Pt,yt){var gt=!0,Tt=!1;return Pt===null?Tt=new TypeError("May not write null values to stream"):typeof Pt!="string"&&Pt!==void 0&&!ut.objectMode&&(Tt=new TypeError("Invalid non-string/buffer chunk")),Tt&&(dt.emit("error",Tt),Ee.nextTick(yt,Tt),gt=!1),gt}Fe.prototype.write=function(dt,ut,Pt){var yt=this._writableState,gt=!1,Tt=!yt.objectMode&&ue(dt);return Tt&&!oe.isBuffer(dt)&&(dt=le(dt)),typeof ut=="function"&&(Pt=ut,ut=null),Tt?ut="buffer":ut||(ut=yt.defaultEncoding),typeof Pt!="function"&&(Pt=xe),yt.ended?je(this,Pt):(Tt||Le(this,yt,dt,Pt))&&(yt.pendingcb++,gt=Ue(this,yt,Tt,dt,ut,Pt)),gt},Fe.prototype.cork=function(){var dt=this._writableState;dt.corked++},Fe.prototype.uncork=function(){var dt=this._writableState;dt.corked&&(dt.corked--,!dt.writing&&!dt.corked&&!dt.finished&&!dt.bufferProcessing&&dt.bufferedRequest&&Lt(this,dt))},Fe.prototype.setDefaultEncoding=function(ut){if(typeof ut=="string"&&(ut=ut.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ut+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ut);return this._writableState.defaultEncoding=ut,this};function Be(dt,ut,Pt){return!dt.objectMode&&dt.decodeStrings!==!1&&typeof ut=="string"&&(ut=oe.from(ut,Pt)),ut}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ue(dt,ut,Pt,yt,gt,Tt){if(!Pt){var ct=Be(ut,yt,gt);yt!==ct&&(Pt=!0,gt="buffer",yt=ct)}var Ye=ut.objectMode?1:yt.length;ut.length+=Ye;var Ze=ut.length<ut.highWaterMark;if(Ze||(ut.needDrain=!0),ut.writing||ut.corked){var Se=ut.lastBufferedRequest;ut.lastBufferedRequest={chunk:yt,encoding:gt,isBuf:Pt,callback:Tt,next:null},Se?Se.next=ut.lastBufferedRequest:ut.bufferedRequest=ut.lastBufferedRequest,ut.bufferedRequestCount+=1}else Je(dt,ut,!1,Ye,yt,gt,Tt);return Ze}function Je(dt,ut,Pt,yt,gt,Tt,ct){ut.writelen=yt,ut.writecb=ct,ut.writing=!0,ut.sync=!0,Pt?dt._writev(gt,ut.onwrite):dt._write(gt,Tt,ut.onwrite),ut.sync=!1}function He(dt,ut,Pt,yt,gt){--ut.pendingcb,Pt?(Ee.nextTick(gt,yt),Ee.nextTick(vt,dt,ut),dt._writableState.errorEmitted=!0,dt.emit("error",yt)):(gt(yt),dt._writableState.errorEmitted=!0,dt.emit("error",yt),vt(dt,ut))}function We(dt){dt.writing=!1,dt.writecb=null,dt.length-=dt.writelen,dt.writelen=0}function at(dt,ut){var Pt=dt._writableState,yt=Pt.sync,gt=Pt.writecb;if(We(Pt),ut)He(dt,Pt,yt,ut,gt);else{var Tt=Xe(Pt);!Tt&&!Pt.corked&&!Pt.bufferProcessing&&Pt.bufferedRequest&&Lt(dt,Pt),yt?ve(ft,dt,Pt,Tt,gt):ft(dt,Pt,Tt,gt)}}function ft(dt,ut,Pt,yt){Pt||mt(dt,ut),ut.pendingcb--,yt(),vt(dt,ut)}function mt(dt,ut){ut.length===0&&ut.needDrain&&(ut.needDrain=!1,dt.emit("drain"))}function Lt(dt,ut){ut.bufferProcessing=!0;var Pt=ut.bufferedRequest;if(dt._writev&&Pt&&Pt.next){var yt=ut.bufferedRequestCount,gt=new Array(yt),Tt=ut.corkedRequestsFree;Tt.entry=Pt;for(var ct=0,Ye=!0;Pt;)gt[ct]=Pt,Pt.isBuf||(Ye=!1),Pt=Pt.next,ct+=1;gt.allBuffers=Ye,Je(dt,ut,!0,ut.length,gt,"",Tt.finish),ut.pendingcb++,ut.lastBufferedRequest=null,Tt.next?(ut.corkedRequestsFree=Tt.next,Tt.next=null):ut.corkedRequestsFree=new Te(ut),ut.bufferedRequestCount=0}else{for(;Pt;){var Ze=Pt.chunk,Se=Pt.encoding,Ne=Pt.callback,$e=ut.objectMode?1:Ze.length;if(Je(dt,ut,!1,$e,Ze,Se,Ne),Pt=Pt.next,ut.bufferedRequestCount--,ut.writing)break}Pt===null&&(ut.lastBufferedRequest=null)}ut.bufferedRequest=Pt,ut.bufferProcessing=!1}Fe.prototype._write=function(dt,ut,Pt){Pt(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(dt,ut,Pt){var yt=this._writableState;typeof dt=="function"?(Pt=dt,dt=null,ut=null):typeof ut=="function"&&(Pt=ut,ut=null),dt!=null&&this.write(dt,ut),yt.corked&&(yt.corked=1,this.uncork()),!yt.ending&&!yt.finished&&wt(this,yt,Pt)};function Xe(dt){return dt.ending&&dt.length===0&&dt.bufferedRequest===null&&!dt.finished&&!dt.writing}function et(dt,ut){dt._final(function(Pt){ut.pendingcb--,Pt&&dt.emit("error",Pt),ut.prefinished=!0,dt.emit("prefinish"),vt(dt,ut)})}function lt(dt,ut){!ut.prefinished&&!ut.finalCalled&&(typeof dt._final=="function"?(ut.pendingcb++,ut.finalCalled=!0,Ee.nextTick(et,dt,ut)):(ut.prefinished=!0,dt.emit("prefinish")))}function vt(dt,ut){var Pt=Xe(ut);return Pt&&(lt(dt,ut),ut.pendingcb===0&&(ut.finished=!0,dt.emit("finish"))),Pt}function wt(dt,ut,Pt){ut.ending=!0,vt(dt,ut),Pt&&(ut.finished?Ee.nextTick(Pt):dt.once("finish",Pt)),ut.ended=!0,dt.writable=!1}function ht(dt,ut,Pt){var yt=dt.entry;for(dt.entry=null;yt;){var gt=yt.callback;ut.pendingcb--,gt(Pt),yt=yt.next}ut.corkedRequestsFree?ut.corkedRequestsFree.next=dt:ut.corkedRequestsFree=dt}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(dt){this._writableState&&(this._writableState.destroyed=dt)}}),Fe.prototype.destroy=me.destroy,Fe.prototype._undestroy=me.undestroy,Fe.prototype._destroy=function(dt,ut){this.end(),ut(dt)}}).call(this)}).call(this,ae("_process"),typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ae("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(ae,Ge,Re){"use strict";function fe(we,Te){if(!(we instanceof Te))throw new TypeError("Cannot call a class as a function")}var pe=ae("safe-buffer").Buffer,be=ae("util");function Ee(we,Te,ve){we.copy(Te,ve)}Ge.exports=function(){function we(){fe(this,we),this.head=null,this.tail=null,this.length=0}return we.prototype.push=function(ve){var Pe={data:ve,next:null};this.length>0?this.tail.next=Pe:this.head=Pe,this.tail=Pe,++this.length},we.prototype.unshift=function(ve){var Pe={data:ve,next:this.head};this.length===0&&(this.tail=Pe),this.head=Pe,++this.length},we.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}},we.prototype.clear=function(){this.head=this.tail=null,this.length=0},we.prototype.join=function(ve){if(this.length===0)return"";for(var Pe=this.head,de=""+Pe.data;Pe=Pe.next;)de+=ve+Pe.data;return de},we.prototype.concat=function(ve){if(this.length===0)return pe.alloc(0);if(this.length===1)return this.head.data;for(var Pe=pe.allocUnsafe(ve>>>0),de=this.head,ee=0;de;)Ee(de.data,Pe,ee),ee+=de.data.length,de=de.next;return Pe},we}(),be&&be.inspect&&be.inspect.custom&&(Ge.exports.prototype[be.inspect.custom]=function(){var we=be.inspect({length:this.length});return this.constructor.name+" "+we})},{"safe-buffer":396,util:89}],392:[function(ae,Ge,Re){"use strict";var fe=ae("process-nextick-args");function pe(we,Te){var ve=this,Pe=this._readableState&&this._readableState.destroyed,de=this._writableState&&this._writableState.destroyed;return Pe||de?(Te?Te(we):we&&(!this._writableState||!this._writableState.errorEmitted)&&fe.nextTick(Ee,this,we),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(we||null,function(ee){!Te&&ee?(fe.nextTick(Ee,ve,ee),ve._writableState&&(ve._writableState.errorEmitted=!0)):Te&&Te(ee)}),this)}function be(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ee(we,Te){we.emit("error",Te)}Ge.exports={destroy:pe,undestroy:be}},{"process-nextick-args":380}],393:[function(ae,Ge,Re){Ge.exports=ae("events").EventEmitter},{events:344}],394:[function(ae,Ge,Re){Re=Ge.exports=ae("./lib/_stream_readable.js"),Re.Stream=Re,Re.Readable=Re,Re.Writable=ae("./lib/_stream_writable.js"),Re.Duplex=ae("./lib/_stream_duplex.js"),Re.Transform=ae("./lib/_stream_transform.js"),Re.PassThrough=ae("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(ae,Ge,Re){var fe=function(pe){"use strict";var be=Object.prototype,Ee=be.hasOwnProperty,we,Te=typeof Symbol=="function"?Symbol:{},ve=Te.iterator||"@@iterator",Pe=Te.asyncIterator||"@@asyncIterator",de=Te.toStringTag||"@@toStringTag";function ee(lt,vt,wt){return Object.defineProperty(lt,vt,{value:wt,enumerable:!0,configurable:!0,writable:!0}),lt[vt]}try{ee({},"")}catch(lt){ee=function(vt,wt,ht){return vt[wt]=ht}}function z(lt,vt,wt,ht){var dt=vt&&vt.prototype instanceof Ae?vt:Ae,ut=Object.create(dt.prototype),Pt=new Lt(ht||[]);return ut._invoke=We(lt,wt,Pt),ut}pe.wrap=z;function oe(lt,vt,wt){try{return{type:"normal",arg:lt.call(vt,wt)}}catch(ht){return{type:"throw",arg:ht}}}var ie="suspendedStart",le="suspendedYield",ue="executing",me="completed",xe={};function Ae(){}function De(){}function Fe(){}var je={};ee(je,ve,function(){return this});var Le=Object.getPrototypeOf,Be=Le&&Le(Le(Xe([])));Be&&Be!==be&&Ee.call(Be,ve)&&(je=Be);var Ue=Fe.prototype=Ae.prototype=Object.create(je);De.prototype=Fe,ee(Ue,"constructor",Fe),ee(Fe,"constructor",De),De.displayName=ee(Fe,de,"GeneratorFunction");function Je(lt){["next","throw","return"].forEach(function(vt){ee(lt,vt,function(wt){return this._invoke(vt,wt)})})}pe.isGeneratorFunction=function(lt){var vt=typeof lt=="function"&<.constructor;return vt?vt===De||(vt.displayName||vt.name)==="GeneratorFunction":!1},pe.mark=function(lt){return Object.setPrototypeOf?Object.setPrototypeOf(lt,Fe):(lt.__proto__=Fe,ee(lt,de,"GeneratorFunction")),lt.prototype=Object.create(Ue),lt},pe.awrap=function(lt){return{__await:lt}};function He(lt,vt){function wt(ut,Pt,yt,gt){var Tt=oe(lt[ut],lt,Pt);if(Tt.type==="throw")gt(Tt.arg);else{var ct=Tt.arg,Ye=ct.value;return Ye&&typeof Ye=="object"&&Ee.call(Ye,"__await")?vt.resolve(Ye.__await).then(function(Ze){wt("next",Ze,yt,gt)},function(Ze){wt("throw",Ze,yt,gt)}):vt.resolve(Ye).then(function(Ze){ct.value=Ze,yt(ct)},function(Ze){return wt("throw",Ze,yt,gt)})}}var ht;function dt(ut,Pt){function yt(){return new vt(function(gt,Tt){wt(ut,Pt,gt,Tt)})}return ht=ht?ht.then(yt,yt):yt()}this._invoke=dt}Je(He.prototype),ee(He.prototype,Pe,function(){return this}),pe.AsyncIterator=He,pe.async=function(lt,vt,wt,ht,dt){dt===void 0&&(dt=Promise);var ut=new He(z(lt,vt,wt,ht),dt);return pe.isGeneratorFunction(vt)?ut:ut.next().then(function(Pt){return Pt.done?Pt.value:ut.next()})};function We(lt,vt,wt){var ht=ie;return function(ut,Pt){if(ht===ue)throw new Error("Generator is already running");if(ht===me){if(ut==="throw")throw Pt;return et()}for(wt.method=ut,wt.arg=Pt;;){var yt=wt.delegate;if(yt){var gt=at(yt,wt);if(gt){if(gt===xe)continue;return gt}}if(wt.method==="next")wt.sent=wt._sent=wt.arg;else if(wt.method==="throw"){if(ht===ie)throw ht=me,wt.arg;wt.dispatchException(wt.arg)}else wt.method==="return"&&wt.abrupt("return",wt.arg);ht=ue;var Tt=oe(lt,vt,wt);if(Tt.type==="normal"){if(ht=wt.done?me:le,Tt.arg===xe)continue;return{value:Tt.arg,done:wt.done}}else Tt.type==="throw"&&(ht=me,wt.method="throw",wt.arg=Tt.arg)}}}function at(lt,vt){var wt=lt.iterator[vt.method];if(wt===we){if(vt.delegate=null,vt.method==="throw"){if(lt.iterator.return&&(vt.method="return",vt.arg=we,at(lt,vt),vt.method==="throw"))return xe;vt.method="throw",vt.arg=new TypeError("The iterator does not provide a 'throw' method")}return xe}var ht=oe(wt,lt.iterator,vt.arg);if(ht.type==="throw")return vt.method="throw",vt.arg=ht.arg,vt.delegate=null,xe;var dt=ht.arg;if(!dt)return vt.method="throw",vt.arg=new TypeError("iterator result is not an object"),vt.delegate=null,xe;if(dt.done)vt[lt.resultName]=dt.value,vt.next=lt.nextLoc,vt.method!=="return"&&(vt.method="next",vt.arg=we);else return dt;return vt.delegate=null,xe}Je(Ue),ee(Ue,de,"Generator"),ee(Ue,ve,function(){return this}),ee(Ue,"toString",function(){return"[object Generator]"});function ft(lt){var vt={tryLoc:lt[0]};1 in lt&&(vt.catchLoc=lt[1]),2 in lt&&(vt.finallyLoc=lt[2],vt.afterLoc=lt[3]),this.tryEntries.push(vt)}function mt(lt){var vt=lt.completion||{};vt.type="normal",delete vt.arg,lt.completion=vt}function Lt(lt){this.tryEntries=[{tryLoc:"root"}],lt.forEach(ft,this),this.reset(!0)}pe.keys=function(lt){var vt=[];for(var wt in lt)vt.push(wt);return vt.reverse(),function ht(){for(;vt.length;){var dt=vt.pop();if(dt in lt)return ht.value=dt,ht.done=!1,ht}return ht.done=!0,ht}};function Xe(lt){if(lt){var vt=lt[ve];if(vt)return vt.call(lt);if(typeof lt.next=="function")return lt;if(!isNaN(lt.length)){var wt=-1,ht=function dt(){for(;++wt<lt.length;)if(Ee.call(lt,wt))return dt.value=lt[wt],dt.done=!1,dt;return dt.value=we,dt.done=!0,dt};return ht.next=ht}}return{next:et}}pe.values=Xe;function et(){return{value:we,done:!0}}return Lt.prototype={constructor:Lt,reset:function(lt){if(this.prev=0,this.next=0,this.sent=this._sent=we,this.done=!1,this.delegate=null,this.method="next",this.arg=we,this.tryEntries.forEach(mt),!lt)for(var vt in this)vt.charAt(0)==="t"&&Ee.call(this,vt)&&!isNaN(+vt.slice(1))&&(this[vt]=we)},stop:function(){this.done=!0;var lt=this.tryEntries[0],vt=lt.completion;if(vt.type==="throw")throw vt.arg;return this.rval},dispatchException:function(lt){if(this.done)throw lt;var vt=this;function wt(gt,Tt){return ut.type="throw",ut.arg=lt,vt.next=gt,Tt&&(vt.method="next",vt.arg=we),!!Tt}for(var ht=this.tryEntries.length-1;ht>=0;--ht){var dt=this.tryEntries[ht],ut=dt.completion;if(dt.tryLoc==="root")return wt("end");if(dt.tryLoc<=this.prev){var Pt=Ee.call(dt,"catchLoc"),yt=Ee.call(dt,"finallyLoc");if(Pt&&yt){if(this.prev<dt.catchLoc)return wt(dt.catchLoc,!0);if(this.prev<dt.finallyLoc)return wt(dt.finallyLoc)}else if(Pt){if(this.prev<dt.catchLoc)return wt(dt.catchLoc,!0)}else if(yt){if(this.prev<dt.finallyLoc)return wt(dt.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(lt,vt){for(var wt=this.tryEntries.length-1;wt>=0;--wt){var ht=this.tryEntries[wt];if(ht.tryLoc<=this.prev&&Ee.call(ht,"finallyLoc")&&this.prev<ht.finallyLoc){var dt=ht;break}}dt&&(lt==="break"||lt==="continue")&&dt.tryLoc<=vt&&vt<=dt.finallyLoc&&(dt=null);var ut=dt?dt.completion:{};return ut.type=lt,ut.arg=vt,dt?(this.method="next",this.next=dt.finallyLoc,xe):this.complete(ut)},complete:function(lt,vt){if(lt.type==="throw")throw lt.arg;return lt.type==="break"||lt.type==="continue"?this.next=lt.arg:lt.type==="return"?(this.rval=this.arg=lt.arg,this.method="return",this.next="end"):lt.type==="normal"&&vt&&(this.next=vt),xe},finish:function(lt){for(var vt=this.tryEntries.length-1;vt>=0;--vt){var wt=this.tryEntries[vt];if(wt.finallyLoc===lt)return this.complete(wt.completion,wt.afterLoc),mt(wt),xe}},catch:function(lt){for(var vt=this.tryEntries.length-1;vt>=0;--vt){var wt=this.tryEntries[vt];if(wt.tryLoc===lt){var ht=wt.completion;if(ht.type==="throw"){var dt=ht.arg;mt(wt)}return dt}}throw new Error("illegal catch attempt")},delegateYield:function(lt,vt,wt){return this.delegate={iterator:Xe(lt),resultName:vt,nextLoc:wt},this.method==="next"&&(this.arg=we),xe}},pe}(typeof Ge=="object"?Ge.exports:{});try{regeneratorRuntime=fe}catch(pe){typeof globalThis=="object"?globalThis.regeneratorRuntime=fe:Function("r","regeneratorRuntime = r")(fe)}},{}],396:[function(ae,Ge,Re){var fe=ae("buffer"),pe=fe.Buffer;function be(we,Te){for(var ve in we)Te[ve]=we[ve]}pe.from&&pe.alloc&&pe.allocUnsafe&&pe.allocUnsafeSlow?Ge.exports=fe:(be(fe,Re),Re.Buffer=Ee);function Ee(we,Te,ve){return pe(we,Te,ve)}be(pe,Ee),Ee.from=function(we,Te,ve){if(typeof we=="number")throw new TypeError("Argument must not be a number");return pe(we,Te,ve)},Ee.alloc=function(we,Te,ve){if(typeof we!="number")throw new TypeError("Argument must be a number");var Pe=pe(we);return Te!==void 0?typeof ve=="string"?Pe.fill(Te,ve):Pe.fill(Te):Pe.fill(0),Pe},Ee.allocUnsafe=function(we){if(typeof we!="number")throw new TypeError("Argument must be a number");return pe(we)},Ee.allocUnsafeSlow=function(we){if(typeof we!="number")throw new TypeError("Argument must be a number");return fe.SlowBuffer(we)}},{buffer:90}],397:[function(ae,Ge,Re){(function(fe){(function(){(function(pe){pe.parser=function(ct,Ye){return new Ee(ct,Ye)},pe.SAXParser=Ee,pe.SAXStream=z,pe.createStream=ee,pe.MAX_BUFFER_LENGTH=64*1024;var be=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];pe.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function Ee(ct,Ye){if(!(this instanceof Ee))return new Ee(ct,Ye);var Ze=this;Te(Ze),Ze.q=Ze.c="",Ze.bufferCheckPosition=pe.MAX_BUFFER_LENGTH,Ze.opt=Ye||{},Ze.opt.lowercase=Ze.opt.lowercase||Ze.opt.lowercasetags,Ze.looseCase=Ze.opt.lowercase?"toLowerCase":"toUpperCase",Ze.tags=[],Ze.closed=Ze.closedRoot=Ze.sawRoot=!1,Ze.tag=Ze.error=null,Ze.strict=!!ct,Ze.noscript=!!(ct||Ze.opt.noscript),Ze.state=He.BEGIN,Ze.strictEntities=Ze.opt.strictEntities,Ze.ENTITIES=Ze.strictEntities?Object.create(pe.XML_ENTITIES):Object.create(pe.ENTITIES),Ze.attribList=[],Ze.opt.xmlns&&(Ze.ns=Object.create(me)),Ze.trackPosition=Ze.opt.position!==!1,Ze.trackPosition&&(Ze.position=Ze.line=Ze.column=0),at(Ze,"onready")}Object.create||(Object.create=function(ct){function Ye(){}Ye.prototype=ct;var Ze=new Ye;return Ze}),Object.keys||(Object.keys=function(ct){var Ye=[];for(var Ze in ct)ct.hasOwnProperty(Ze)&&Ye.push(Ze);return Ye});function we(ct){for(var Ye=Math.max(pe.MAX_BUFFER_LENGTH,10),Ze=0,Se=0,Ne=be.length;Se<Ne;Se++){var $e=ct[be[Se]].length;if($e>Ye)switch(be[Se]){case"textNode":mt(ct);break;case"cdata":ft(ct,"oncdata",ct.cdata),ct.cdata="";break;case"script":ft(ct,"onscript",ct.script),ct.script="";break;default:Xe(ct,"Max buffer length exceeded: "+be[Se])}Ze=Math.max(Ze,$e)}var nt=pe.MAX_BUFFER_LENGTH-Ze;ct.bufferCheckPosition=nt+ct.position}function Te(ct){for(var Ye=0,Ze=be.length;Ye<Ze;Ye++)ct[be[Ye]]=""}function ve(ct){mt(ct),ct.cdata!==""&&(ft(ct,"oncdata",ct.cdata),ct.cdata=""),ct.script!==""&&(ft(ct,"onscript",ct.script),ct.script="")}Ee.prototype={end:function(){et(this)},write:Tt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){ve(this)}};var Pe;try{Pe=ae("stream").Stream}catch(ct){Pe=function(){}}var de=pe.EVENTS.filter(function(ct){return ct!=="error"&&ct!=="end"});function ee(ct,Ye){return new z(ct,Ye)}function z(ct,Ye){if(!(this instanceof z))return new z(ct,Ye);Pe.apply(this),this._parser=new Ee(ct,Ye),this.writable=!0,this.readable=!0;var Ze=this;this._parser.onend=function(){Ze.emit("end")},this._parser.onerror=function(Se){Ze.emit("error",Se),Ze._parser.error=null},this._decoder=null,de.forEach(function(Se){Object.defineProperty(Ze,"on"+Se,{get:function(){return Ze._parser["on"+Se]},set:function(Ne){if(!Ne)return Ze.removeAllListeners(Se),Ze._parser["on"+Se]=Ne,Ne;Ze.on(Se,Ne)},enumerable:!0,configurable:!1})})}z.prototype=Object.create(Pe.prototype,{constructor:{value:z}}),z.prototype.write=function(ct){if(typeof fe=="function"&&typeof fe.isBuffer=="function"&&fe.isBuffer(ct)){if(!this._decoder){var Ye=ae("string_decoder").StringDecoder;this._decoder=new Ye("utf8")}ct=this._decoder.write(ct)}return this._parser.write(ct.toString()),this.emit("data",ct),!0},z.prototype.end=function(ct){return ct&&ct.length&&this.write(ct),this._parser.end(),!0},z.prototype.on=function(ct,Ye){var Ze=this;return!Ze._parser["on"+ct]&&de.indexOf(ct)!==-1&&(Ze._parser["on"+ct]=function(){var Se=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Se.splice(0,0,ct),Ze.emit.apply(Ze,Se)}),Pe.prototype.on.call(Ze,ct,Ye)};var oe="[CDATA[",ie="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",me={xml:le,xmlns:ue},xe=/[:_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]/,Ae=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,De=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Fe=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function je(ct){return ct===" "||ct===`
|
|
`||ct==="\r"||ct===" "}function Le(ct){return ct==='"'||ct==="'"}function Be(ct){return ct===">"||je(ct)}function Ue(ct,Ye){return ct.test(Ye)}function Je(ct,Ye){return!Ue(ct,Ye)}var He=0;pe.STATE={BEGIN:He++,BEGIN_WHITESPACE:He++,TEXT:He++,TEXT_ENTITY:He++,OPEN_WAKA:He++,SGML_DECL:He++,SGML_DECL_QUOTED:He++,DOCTYPE:He++,DOCTYPE_QUOTED:He++,DOCTYPE_DTD:He++,DOCTYPE_DTD_QUOTED:He++,COMMENT_STARTING:He++,COMMENT:He++,COMMENT_ENDING:He++,COMMENT_ENDED:He++,CDATA:He++,CDATA_ENDING:He++,CDATA_ENDING_2:He++,PROC_INST:He++,PROC_INST_BODY:He++,PROC_INST_ENDING:He++,OPEN_TAG:He++,OPEN_TAG_SLASH:He++,ATTRIB:He++,ATTRIB_NAME:He++,ATTRIB_NAME_SAW_WHITE:He++,ATTRIB_VALUE:He++,ATTRIB_VALUE_QUOTED:He++,ATTRIB_VALUE_CLOSED:He++,ATTRIB_VALUE_UNQUOTED:He++,ATTRIB_VALUE_ENTITY_Q:He++,ATTRIB_VALUE_ENTITY_U:He++,CLOSE_TAG:He++,CLOSE_TAG_SAW_WHITE:He++,SCRIPT:He++,SCRIPT_ENDING:He++},pe.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},pe.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(pe.ENTITIES).forEach(function(ct){var Ye=pe.ENTITIES[ct],Ze=typeof Ye=="number"?String.fromCharCode(Ye):Ye;pe.ENTITIES[ct]=Ze});for(var We in pe.STATE)pe.STATE[pe.STATE[We]]=We;He=pe.STATE;function at(ct,Ye,Ze){ct[Ye]&&ct[Ye](Ze)}function ft(ct,Ye,Ze){ct.textNode&&mt(ct),at(ct,Ye,Ze)}function mt(ct){ct.textNode=Lt(ct.opt,ct.textNode),ct.textNode&&at(ct,"ontext",ct.textNode),ct.textNode=""}function Lt(ct,Ye){return ct.trim&&(Ye=Ye.trim()),ct.normalize&&(Ye=Ye.replace(/\s+/g," ")),Ye}function Xe(ct,Ye){return mt(ct),ct.trackPosition&&(Ye+=`
|
|
Line: `+ct.line+`
|
|
Column: `+ct.column+`
|
|
Char: `+ct.c),Ye=new Error(Ye),ct.error=Ye,at(ct,"onerror",Ye),ct}function et(ct){return ct.sawRoot&&!ct.closedRoot&<(ct,"Unclosed root tag"),ct.state!==He.BEGIN&&ct.state!==He.BEGIN_WHITESPACE&&ct.state!==He.TEXT&&Xe(ct,"Unexpected end"),mt(ct),ct.c="",ct.closed=!0,at(ct,"onend"),Ee.call(ct,ct.strict,ct.opt),ct}function lt(ct,Ye){if(typeof ct!="object"||!(ct instanceof Ee))throw new Error("bad call to strictFail");ct.strict&&Xe(ct,Ye)}function vt(ct){ct.strict||(ct.tagName=ct.tagName[ct.looseCase]());var Ye=ct.tags[ct.tags.length-1]||ct,Ze=ct.tag={name:ct.tagName,attributes:{}};ct.opt.xmlns&&(Ze.ns=Ye.ns),ct.attribList.length=0,ft(ct,"onopentagstart",Ze)}function wt(ct,Ye){var Ze=ct.indexOf(":"),Se=Ze<0?["",ct]:ct.split(":"),Ne=Se[0],$e=Se[1];return Ye&&ct==="xmlns"&&(Ne="xmlns",$e=""),{prefix:Ne,local:$e}}function ht(ct){if(ct.strict||(ct.attribName=ct.attribName[ct.looseCase]()),ct.attribList.indexOf(ct.attribName)!==-1||ct.tag.attributes.hasOwnProperty(ct.attribName)){ct.attribName=ct.attribValue="";return}if(ct.opt.xmlns){var Ye=wt(ct.attribName,!0),Ze=Ye.prefix,Se=Ye.local;if(Ze==="xmlns")if(Se==="xml"&&ct.attribValue!==le)lt(ct,"xml: prefix must be bound to "+le+`
|
|
Actual: `+ct.attribValue);else if(Se==="xmlns"&&ct.attribValue!==ue)lt(ct,"xmlns: prefix must be bound to "+ue+`
|
|
Actual: `+ct.attribValue);else{var Ne=ct.tag,$e=ct.tags[ct.tags.length-1]||ct;Ne.ns===$e.ns&&(Ne.ns=Object.create($e.ns)),Ne.ns[Se]=ct.attribValue}ct.attribList.push([ct.attribName,ct.attribValue])}else ct.tag.attributes[ct.attribName]=ct.attribValue,ft(ct,"onattribute",{name:ct.attribName,value:ct.attribValue});ct.attribName=ct.attribValue=""}function dt(ct,Ye){if(ct.opt.xmlns){var Ze=ct.tag,Se=wt(ct.tagName);Ze.prefix=Se.prefix,Ze.local=Se.local,Ze.uri=Ze.ns[Se.prefix]||"",Ze.prefix&&!Ze.uri&&(lt(ct,"Unbound namespace prefix: "+JSON.stringify(ct.tagName)),Ze.uri=Se.prefix);var Ne=ct.tags[ct.tags.length-1]||ct;Ze.ns&&Ne.ns!==Ze.ns&&Object.keys(Ze.ns).forEach(function(Kt){ft(ct,"onopennamespace",{prefix:Kt,uri:Ze.ns[Kt]})});for(var $e=0,nt=ct.attribList.length;$e<nt;$e++){var Ie=ct.attribList[$e],ze=Ie[0],Ve=Ie[1],it=wt(ze,!0),St=it.prefix,Ct=it.local,It=St===""?"":Ze.ns[St]||"",jt={name:ze,value:Ve,prefix:St,local:Ct,uri:It};St&&St!=="xmlns"&&!It&&(lt(ct,"Unbound namespace prefix: "+JSON.stringify(St)),jt.uri=St),ct.tag.attributes[ze]=jt,ft(ct,"onattribute",jt)}ct.attribList.length=0}ct.tag.isSelfClosing=!!Ye,ct.sawRoot=!0,ct.tags.push(ct.tag),ft(ct,"onopentag",ct.tag),Ye||(!ct.noscript&&ct.tagName.toLowerCase()==="script"?ct.state=He.SCRIPT:ct.state=He.TEXT,ct.tag=null,ct.tagName=""),ct.attribName=ct.attribValue="",ct.attribList.length=0}function ut(ct){if(!ct.tagName){lt(ct,"Weird empty close tag."),ct.textNode+="</>",ct.state=He.TEXT;return}if(ct.script){if(ct.tagName!=="script"){ct.script+="</"+ct.tagName+">",ct.tagName="",ct.state=He.SCRIPT;return}ft(ct,"onscript",ct.script),ct.script=""}var Ye=ct.tags.length,Ze=ct.tagName;ct.strict||(Ze=Ze[ct.looseCase]());for(var Se=Ze;Ye--;){var Ne=ct.tags[Ye];if(Ne.name!==Se)lt(ct,"Unexpected close tag");else break}if(Ye<0){lt(ct,"Unmatched closing tag: "+ct.tagName),ct.textNode+="</"+ct.tagName+">",ct.state=He.TEXT;return}ct.tagName=Ze;for(var $e=ct.tags.length;$e-- >Ye;){var nt=ct.tag=ct.tags.pop();ct.tagName=ct.tag.name,ft(ct,"onclosetag",ct.tagName);var Ie={};for(var ze in nt.ns)Ie[ze]=nt.ns[ze];var Ve=ct.tags[ct.tags.length-1]||ct;ct.opt.xmlns&&nt.ns!==Ve.ns&&Object.keys(nt.ns).forEach(function(it){var St=nt.ns[it];ft(ct,"onclosenamespace",{prefix:it,uri:St})})}Ye===0&&(ct.closedRoot=!0),ct.tagName=ct.attribValue=ct.attribName="",ct.attribList.length=0,ct.state=He.TEXT}function Pt(ct){var Ye=ct.entity,Ze=Ye.toLowerCase(),Se,Ne="";return ct.ENTITIES[Ye]?ct.ENTITIES[Ye]:ct.ENTITIES[Ze]?ct.ENTITIES[Ze]:(Ye=Ze,Ye.charAt(0)==="#"&&(Ye.charAt(1)==="x"?(Ye=Ye.slice(2),Se=parseInt(Ye,16),Ne=Se.toString(16)):(Ye=Ye.slice(1),Se=parseInt(Ye,10),Ne=Se.toString(10))),Ye=Ye.replace(/^0+/,""),isNaN(Se)||Ne.toLowerCase()!==Ye?(lt(ct,"Invalid character entity"),"&"+ct.entity+";"):String.fromCodePoint(Se))}function yt(ct,Ye){Ye==="<"?(ct.state=He.OPEN_WAKA,ct.startTagPosition=ct.position):je(Ye)||(lt(ct,"Non-whitespace before first tag."),ct.textNode=Ye,ct.state=He.TEXT)}function gt(ct,Ye){var Ze="";return Ye<ct.length&&(Ze=ct.charAt(Ye)),Ze}function Tt(ct){var Ye=this;if(this.error)throw this.error;if(Ye.closed)return Xe(Ye,"Cannot write after close. Assign an onready handler.");if(ct===null)return et(Ye);typeof ct=="object"&&(ct=ct.toString());for(var Ze=0,Se="";Se=gt(ct,Ze++),Ye.c=Se,!!Se;)switch(Ye.trackPosition&&(Ye.position++,Se===`
|
|
`?(Ye.line++,Ye.column=0):Ye.column++),Ye.state){case He.BEGIN:if(Ye.state=He.BEGIN_WHITESPACE,Se==="\uFEFF")continue;yt(Ye,Se);continue;case He.BEGIN_WHITESPACE:yt(Ye,Se);continue;case He.TEXT:if(Ye.sawRoot&&!Ye.closedRoot){for(var Ne=Ze-1;Se&&Se!=="<"&&Se!=="&";)Se=gt(ct,Ze++),Se&&Ye.trackPosition&&(Ye.position++,Se===`
|
|
`?(Ye.line++,Ye.column=0):Ye.column++);Ye.textNode+=ct.substring(Ne,Ze-1)}Se==="<"&&!(Ye.sawRoot&&Ye.closedRoot&&!Ye.strict)?(Ye.state=He.OPEN_WAKA,Ye.startTagPosition=Ye.position):(!je(Se)&&(!Ye.sawRoot||Ye.closedRoot)&<(Ye,"Text data outside of root node."),Se==="&"?Ye.state=He.TEXT_ENTITY:Ye.textNode+=Se);continue;case He.SCRIPT:Se==="<"?Ye.state=He.SCRIPT_ENDING:Ye.script+=Se;continue;case He.SCRIPT_ENDING:Se==="/"?Ye.state=He.CLOSE_TAG:(Ye.script+="<"+Se,Ye.state=He.SCRIPT);continue;case He.OPEN_WAKA:if(Se==="!")Ye.state=He.SGML_DECL,Ye.sgmlDecl="";else if(!je(Se))if(Ue(xe,Se))Ye.state=He.OPEN_TAG,Ye.tagName=Se;else if(Se==="/")Ye.state=He.CLOSE_TAG,Ye.tagName="";else if(Se==="?")Ye.state=He.PROC_INST,Ye.procInstName=Ye.procInstBody="";else{if(lt(Ye,"Unencoded <"),Ye.startTagPosition+1<Ye.position){var $e=Ye.position-Ye.startTagPosition;Se=new Array($e).join(" ")+Se}Ye.textNode+="<"+Se,Ye.state=He.TEXT}continue;case He.SGML_DECL:(Ye.sgmlDecl+Se).toUpperCase()===oe?(ft(Ye,"onopencdata"),Ye.state=He.CDATA,Ye.sgmlDecl="",Ye.cdata=""):Ye.sgmlDecl+Se==="--"?(Ye.state=He.COMMENT,Ye.comment="",Ye.sgmlDecl=""):(Ye.sgmlDecl+Se).toUpperCase()===ie?(Ye.state=He.DOCTYPE,(Ye.doctype||Ye.sawRoot)&<(Ye,"Inappropriately located doctype declaration"),Ye.doctype="",Ye.sgmlDecl=""):Se===">"?(ft(Ye,"onsgmldeclaration",Ye.sgmlDecl),Ye.sgmlDecl="",Ye.state=He.TEXT):(Le(Se)&&(Ye.state=He.SGML_DECL_QUOTED),Ye.sgmlDecl+=Se);continue;case He.SGML_DECL_QUOTED:Se===Ye.q&&(Ye.state=He.SGML_DECL,Ye.q=""),Ye.sgmlDecl+=Se;continue;case He.DOCTYPE:Se===">"?(Ye.state=He.TEXT,ft(Ye,"ondoctype",Ye.doctype),Ye.doctype=!0):(Ye.doctype+=Se,Se==="["?Ye.state=He.DOCTYPE_DTD:Le(Se)&&(Ye.state=He.DOCTYPE_QUOTED,Ye.q=Se));continue;case He.DOCTYPE_QUOTED:Ye.doctype+=Se,Se===Ye.q&&(Ye.q="",Ye.state=He.DOCTYPE);continue;case He.DOCTYPE_DTD:Ye.doctype+=Se,Se==="]"?Ye.state=He.DOCTYPE:Le(Se)&&(Ye.state=He.DOCTYPE_DTD_QUOTED,Ye.q=Se);continue;case He.DOCTYPE_DTD_QUOTED:Ye.doctype+=Se,Se===Ye.q&&(Ye.state=He.DOCTYPE_DTD,Ye.q="");continue;case He.COMMENT:Se==="-"?Ye.state=He.COMMENT_ENDING:Ye.comment+=Se;continue;case He.COMMENT_ENDING:Se==="-"?(Ye.state=He.COMMENT_ENDED,Ye.comment=Lt(Ye.opt,Ye.comment),Ye.comment&&ft(Ye,"oncomment",Ye.comment),Ye.comment=""):(Ye.comment+="-"+Se,Ye.state=He.COMMENT);continue;case He.COMMENT_ENDED:Se!==">"?(lt(Ye,"Malformed comment"),Ye.comment+="--"+Se,Ye.state=He.COMMENT):Ye.state=He.TEXT;continue;case He.CDATA:Se==="]"?Ye.state=He.CDATA_ENDING:Ye.cdata+=Se;continue;case He.CDATA_ENDING:Se==="]"?Ye.state=He.CDATA_ENDING_2:(Ye.cdata+="]"+Se,Ye.state=He.CDATA);continue;case He.CDATA_ENDING_2:Se===">"?(Ye.cdata&&ft(Ye,"oncdata",Ye.cdata),ft(Ye,"onclosecdata"),Ye.cdata="",Ye.state=He.TEXT):Se==="]"?Ye.cdata+="]":(Ye.cdata+="]]"+Se,Ye.state=He.CDATA);continue;case He.PROC_INST:Se==="?"?Ye.state=He.PROC_INST_ENDING:je(Se)?Ye.state=He.PROC_INST_BODY:Ye.procInstName+=Se;continue;case He.PROC_INST_BODY:if(!Ye.procInstBody&&je(Se))continue;Se==="?"?Ye.state=He.PROC_INST_ENDING:Ye.procInstBody+=Se;continue;case He.PROC_INST_ENDING:Se===">"?(ft(Ye,"onprocessinginstruction",{name:Ye.procInstName,body:Ye.procInstBody}),Ye.procInstName=Ye.procInstBody="",Ye.state=He.TEXT):(Ye.procInstBody+="?"+Se,Ye.state=He.PROC_INST_BODY);continue;case He.OPEN_TAG:Ue(Ae,Se)?Ye.tagName+=Se:(vt(Ye),Se===">"?dt(Ye):Se==="/"?Ye.state=He.OPEN_TAG_SLASH:(je(Se)||lt(Ye,"Invalid character in tag name"),Ye.state=He.ATTRIB));continue;case He.OPEN_TAG_SLASH:Se===">"?(dt(Ye,!0),ut(Ye)):(lt(Ye,"Forward-slash in opening tag not followed by >"),Ye.state=He.ATTRIB);continue;case He.ATTRIB:if(je(Se))continue;Se===">"?dt(Ye):Se==="/"?Ye.state=He.OPEN_TAG_SLASH:Ue(xe,Se)?(Ye.attribName=Se,Ye.attribValue="",Ye.state=He.ATTRIB_NAME):lt(Ye,"Invalid attribute name");continue;case He.ATTRIB_NAME:Se==="="?Ye.state=He.ATTRIB_VALUE:Se===">"?(lt(Ye,"Attribute without value"),Ye.attribValue=Ye.attribName,ht(Ye),dt(Ye)):je(Se)?Ye.state=He.ATTRIB_NAME_SAW_WHITE:Ue(Ae,Se)?Ye.attribName+=Se:lt(Ye,"Invalid attribute name");continue;case He.ATTRIB_NAME_SAW_WHITE:if(Se==="=")Ye.state=He.ATTRIB_VALUE;else{if(je(Se))continue;lt(Ye,"Attribute without value"),Ye.tag.attributes[Ye.attribName]="",Ye.attribValue="",ft(Ye,"onattribute",{name:Ye.attribName,value:""}),Ye.attribName="",Se===">"?dt(Ye):Ue(xe,Se)?(Ye.attribName=Se,Ye.state=He.ATTRIB_NAME):(lt(Ye,"Invalid attribute name"),Ye.state=He.ATTRIB)}continue;case He.ATTRIB_VALUE:if(je(Se))continue;Le(Se)?(Ye.q=Se,Ye.state=He.ATTRIB_VALUE_QUOTED):(lt(Ye,"Unquoted attribute value"),Ye.state=He.ATTRIB_VALUE_UNQUOTED,Ye.attribValue=Se);continue;case He.ATTRIB_VALUE_QUOTED:if(Se!==Ye.q){Se==="&"?Ye.state=He.ATTRIB_VALUE_ENTITY_Q:Ye.attribValue+=Se;continue}ht(Ye),Ye.q="",Ye.state=He.ATTRIB_VALUE_CLOSED;continue;case He.ATTRIB_VALUE_CLOSED:je(Se)?Ye.state=He.ATTRIB:Se===">"?dt(Ye):Se==="/"?Ye.state=He.OPEN_TAG_SLASH:Ue(xe,Se)?(lt(Ye,"No whitespace between attributes"),Ye.attribName=Se,Ye.attribValue="",Ye.state=He.ATTRIB_NAME):lt(Ye,"Invalid attribute name");continue;case He.ATTRIB_VALUE_UNQUOTED:if(!Be(Se)){Se==="&"?Ye.state=He.ATTRIB_VALUE_ENTITY_U:Ye.attribValue+=Se;continue}ht(Ye),Se===">"?dt(Ye):Ye.state=He.ATTRIB;continue;case He.CLOSE_TAG:if(Ye.tagName)Se===">"?ut(Ye):Ue(Ae,Se)?Ye.tagName+=Se:Ye.script?(Ye.script+="</"+Ye.tagName,Ye.tagName="",Ye.state=He.SCRIPT):(je(Se)||lt(Ye,"Invalid tagname in closing tag"),Ye.state=He.CLOSE_TAG_SAW_WHITE);else{if(je(Se))continue;Je(xe,Se)?Ye.script?(Ye.script+="</"+Se,Ye.state=He.SCRIPT):lt(Ye,"Invalid tagname in closing tag."):Ye.tagName=Se}continue;case He.CLOSE_TAG_SAW_WHITE:if(je(Se))continue;Se===">"?ut(Ye):lt(Ye,"Invalid characters in closing tag");continue;case He.TEXT_ENTITY:case He.ATTRIB_VALUE_ENTITY_Q:case He.ATTRIB_VALUE_ENTITY_U:var nt,Ie;switch(Ye.state){case He.TEXT_ENTITY:nt=He.TEXT,Ie="textNode";break;case He.ATTRIB_VALUE_ENTITY_Q:nt=He.ATTRIB_VALUE_QUOTED,Ie="attribValue";break;case He.ATTRIB_VALUE_ENTITY_U:nt=He.ATTRIB_VALUE_UNQUOTED,Ie="attribValue";break}Se===";"?(Ye[Ie]+=Pt(Ye),Ye.entity="",Ye.state=nt):Ue(Ye.entity.length?Fe:De,Se)?Ye.entity+=Se:(lt(Ye,"Invalid character in entity name"),Ye[Ie]+="&"+Ye.entity+Se,Ye.entity="",Ye.state=nt);continue;default:throw new Error(Ye,"Unknown state: "+Ye.state)}return Ye.position>=Ye.bufferCheckPosition&&we(Ye),Ye}String.fromCodePoint||function(){var ct=String.fromCharCode,Ye=Math.floor,Ze=function(){var Se=16384,Ne=[],$e,nt,Ie=-1,ze=arguments.length;if(!ze)return"";for(var Ve="";++Ie<ze;){var it=Number(arguments[Ie]);if(!isFinite(it)||it<0||it>1114111||Ye(it)!==it)throw RangeError("Invalid code point: "+it);it<=65535?Ne.push(it):(it-=65536,$e=(it>>10)+55296,nt=it%1024+56320,Ne.push($e,nt)),(Ie+1===ze||Ne.length>Se)&&(Ve+=ct.apply(null,Ne),Ne.length=0)}return Ve};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Ze,configurable:!0,writable:!0}):String.fromCodePoint=Ze}()})(typeof Re=="undefined"?this.sax={}:Re)}).call(this)}).call(this,ae("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(ae,Ge,Re){Ge.exports=be;var fe=ae("events").EventEmitter,pe=ae("inherits");pe(be,fe),be.Readable=ae("readable-stream/lib/_stream_readable.js"),be.Writable=ae("readable-stream/lib/_stream_writable.js"),be.Duplex=ae("readable-stream/lib/_stream_duplex.js"),be.Transform=ae("readable-stream/lib/_stream_transform.js"),be.PassThrough=ae("readable-stream/lib/_stream_passthrough.js"),be.finished=ae("readable-stream/lib/internal/streams/end-of-stream.js"),be.pipeline=ae("readable-stream/lib/internal/streams/pipeline.js"),be.Stream=be;function be(){fe.call(this)}be.prototype.pipe=function(Ee,we){var Te=this;function ve(le){Ee.writable&&Ee.write(le)===!1&&Te.pause&&Te.pause()}Te.on("data",ve);function Pe(){Te.readable&&Te.resume&&Te.resume()}Ee.on("drain",Pe),!Ee._isStdio&&(!we||we.end!==!1)&&(Te.on("end",ee),Te.on("close",z));var de=!1;function ee(){de||(de=!0,Ee.end())}function z(){de||(de=!0,typeof Ee.destroy=="function"&&Ee.destroy())}function oe(le){if(ie(),fe.listenerCount(this,"error")===0)throw le}Te.on("error",oe),Ee.on("error",oe);function ie(){Te.removeListener("data",ve),Ee.removeListener("drain",Pe),Te.removeListener("end",ee),Te.removeListener("close",z),Te.removeListener("error",oe),Ee.removeListener("error",oe),Te.removeListener("end",ie),Te.removeListener("close",ie),Ee.removeListener("close",ie)}return Te.on("end",ie),Te.on("close",ie),Ee.on("close",ie),Ee.emit("pipe",Te),Ee}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(ae,Ge,Re){"use strict";function fe(Pe,de){Pe.prototype=Object.create(de.prototype),Pe.prototype.constructor=Pe,Pe.__proto__=de}var pe={};function be(Pe,de,ee){ee||(ee=Error);function z(ie,le,ue){return typeof de=="string"?de:de(ie,le,ue)}var oe=function(ie){fe(le,ie);function le(ue,me,xe){return ie.call(this,z(ue,me,xe))||this}return le}(ee);oe.prototype.name=ee.name,oe.prototype.code=Pe,pe[Pe]=oe}function Ee(Pe,de){if(Array.isArray(Pe)){var ee=Pe.length;return Pe=Pe.map(function(z){return String(z)}),ee>2?"one of ".concat(de," ").concat(Pe.slice(0,ee-1).join(", "),", or ")+Pe[ee-1]:ee===2?"one of ".concat(de," ").concat(Pe[0]," or ").concat(Pe[1]):"of ".concat(de," ").concat(Pe[0])}else return"of ".concat(de," ").concat(String(Pe))}function we(Pe,de,ee){return Pe.substr(!ee||ee<0?0:+ee,de.length)===de}function Te(Pe,de,ee){return(ee===void 0||ee>Pe.length)&&(ee=Pe.length),Pe.substring(ee-de.length,ee)===de}function ve(Pe,de,ee){return typeof ee!="number"&&(ee=0),ee+de.length>Pe.length?!1:Pe.indexOf(de,ee)!==-1}be("ERR_INVALID_OPT_VALUE",function(Pe,de){return'The value "'+de+'" is invalid for option "'+Pe+'"'},TypeError),be("ERR_INVALID_ARG_TYPE",function(Pe,de,ee){var z;typeof de=="string"&&we(de,"not ")?(z="must not be",de=de.replace(/^not /,"")):z="must be";var oe;if(Te(Pe," argument"))oe="The ".concat(Pe," ").concat(z," ").concat(Ee(de,"type"));else{var ie=ve(Pe,".")?"property":"argument";oe='The "'.concat(Pe,'" ').concat(ie," ").concat(z," ").concat(Ee(de,"type"))}return oe+=". Received type ".concat(typeof ee),oe},TypeError),be("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),be("ERR_METHOD_NOT_IMPLEMENTED",function(Pe){return"The "+Pe+" method is not implemented"}),be("ERR_STREAM_PREMATURE_CLOSE","Premature close"),be("ERR_STREAM_DESTROYED",function(Pe){return"Cannot call "+Pe+" after a stream was destroyed"}),be("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),be("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),be("ERR_STREAM_WRITE_AFTER_END","write after end"),be("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),be("ERR_UNKNOWN_ENCODING",function(Pe){return"Unknown encoding: "+Pe},TypeError),be("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ge.exports.codes=pe},{}],400:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=Object.keys||function(z){var oe=[];for(var ie in z)oe.push(ie);return oe};Ge.exports=Pe;var be=ae("./_stream_readable"),Ee=ae("./_stream_writable");ae("inherits")(Pe,be);for(var we=pe(Ee.prototype),Te=0;Te<we.length;Te++){var ve=we[Te];Pe.prototype[ve]||(Pe.prototype[ve]=Ee.prototype[ve])}function Pe(z){if(!(this instanceof Pe))return new Pe(z);be.call(this,z),Ee.call(this,z),this.allowHalfOpen=!0,z&&(z.readable===!1&&(this.readable=!1),z.writable===!1&&(this.writable=!1),z.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",de)))}Object.defineProperty(Pe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Pe.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Pe.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function de(){this._writableState.ended||fe.nextTick(ee,this)}function ee(z){z.end()}Object.defineProperty(Pe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(oe){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=oe,this._writableState.destroyed=oe)}})}).call(this)}).call(this,ae("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(ae,Ge,Re){"use strict";Ge.exports=pe;var fe=ae("./_stream_transform");ae("inherits")(pe,fe);function pe(be){if(!(this instanceof pe))return new pe(be);fe.call(this,be)}pe.prototype._transform=function(be,Ee,we){we(null,be)}},{"./_stream_transform":403,inherits:364}],402:[function(ae,Ge,Re){(function(fe,pe){(function(){"use strict";Ge.exports=ft;var be;ft.ReadableState=at;var Ee=ae("events").EventEmitter,we=function(ze,Ve){return ze.listeners(Ve).length},Te=ae("./internal/streams/stream"),ve=ae("buffer").Buffer,Pe=(typeof pe!="undefined"?pe:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function de(Ie){return ve.from(Ie)}function ee(Ie){return ve.isBuffer(Ie)||Ie instanceof Pe}var z=ae("util"),oe;z&&z.debuglog?oe=z.debuglog("stream"):oe=function(){};var ie=ae("./internal/streams/buffer_list"),le=ae("./internal/streams/destroy"),ue=ae("./internal/streams/state"),me=ue.getHighWaterMark,xe=ae("../errors").codes,Ae=xe.ERR_INVALID_ARG_TYPE,De=xe.ERR_STREAM_PUSH_AFTER_EOF,Fe=xe.ERR_METHOD_NOT_IMPLEMENTED,je=xe.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Le,Be,Ue;ae("inherits")(ft,Te);var Je=le.errorOrDestroy,He=["error","close","destroy","pause","resume"];function We(Ie,ze,Ve){if(typeof Ie.prependListener=="function")return Ie.prependListener(ze,Ve);!Ie._events||!Ie._events[ze]?Ie.on(ze,Ve):Array.isArray(Ie._events[ze])?Ie._events[ze].unshift(Ve):Ie._events[ze]=[Ve,Ie._events[ze]]}function at(Ie,ze,Ve){be=be||ae("./_stream_duplex"),Ie=Ie||{},typeof Ve!="boolean"&&(Ve=ze instanceof be),this.objectMode=!!Ie.objectMode,Ve&&(this.objectMode=this.objectMode||!!Ie.readableObjectMode),this.highWaterMark=me(this,Ie,"readableHighWaterMark",Ve),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&&(Le||(Le=ae("string_decoder/").StringDecoder),this.decoder=new Le(Ie.encoding),this.encoding=Ie.encoding)}function ft(Ie){if(be=be||ae("./_stream_duplex"),!(this instanceof ft))return new ft(Ie);var ze=this instanceof be;this._readableState=new at(Ie,this,ze),this.readable=!0,Ie&&(typeof Ie.read=="function"&&(this._read=Ie.read),typeof Ie.destroy=="function"&&(this._destroy=Ie.destroy)),Te.call(this)}Object.defineProperty(ft.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ze){this._readableState&&(this._readableState.destroyed=ze)}}),ft.prototype.destroy=le.destroy,ft.prototype._undestroy=le.undestroy,ft.prototype._destroy=function(Ie,ze){ze(Ie)},ft.prototype.push=function(Ie,ze){var Ve=this._readableState,it;return Ve.objectMode?it=!0:typeof Ie=="string"&&(ze=ze||Ve.defaultEncoding,ze!==Ve.encoding&&(Ie=ve.from(Ie,ze),ze=""),it=!0),mt(this,Ie,ze,!1,it)},ft.prototype.unshift=function(Ie){return mt(this,Ie,null,!0,!1)};function mt(Ie,ze,Ve,it,St){oe("readableAddChunk",ze);var Ct=Ie._readableState;if(ze===null)Ct.reading=!1,wt(Ie,Ct);else{var It;if(St||(It=Xe(Ct,ze)),It)Je(Ie,It);else if(Ct.objectMode||ze&&ze.length>0)if(typeof ze!="string"&&!Ct.objectMode&&Object.getPrototypeOf(ze)!==ve.prototype&&(ze=de(ze)),it)Ct.endEmitted?Je(Ie,new je):Lt(Ie,Ct,ze,!0);else if(Ct.ended)Je(Ie,new De);else{if(Ct.destroyed)return!1;Ct.reading=!1,Ct.decoder&&!Ve?(ze=Ct.decoder.write(ze),Ct.objectMode||ze.length!==0?Lt(Ie,Ct,ze,!1):ut(Ie,Ct)):Lt(Ie,Ct,ze,!1)}else it||(Ct.reading=!1,ut(Ie,Ct))}return!Ct.ended&&(Ct.length<Ct.highWaterMark||Ct.length===0)}function Lt(Ie,ze,Ve,it){ze.flowing&&ze.length===0&&!ze.sync?(ze.awaitDrain=0,Ie.emit("data",Ve)):(ze.length+=ze.objectMode?1:Ve.length,it?ze.buffer.unshift(Ve):ze.buffer.push(Ve),ze.needReadable&&ht(Ie)),ut(Ie,ze)}function Xe(Ie,ze){var Ve;return!ee(ze)&&typeof ze!="string"&&ze!==void 0&&!Ie.objectMode&&(Ve=new Ae("chunk",["string","Buffer","Uint8Array"],ze)),Ve}ft.prototype.isPaused=function(){return this._readableState.flowing===!1},ft.prototype.setEncoding=function(Ie){Le||(Le=ae("string_decoder/").StringDecoder);var ze=new Le(Ie);this._readableState.decoder=ze,this._readableState.encoding=this._readableState.decoder.encoding;for(var Ve=this._readableState.buffer.head,it="";Ve!==null;)it+=ze.write(Ve.data),Ve=Ve.next;return this._readableState.buffer.clear(),it!==""&&this._readableState.buffer.push(it),this._readableState.length=it.length,this};var et=1073741824;function lt(Ie){return Ie>=et?Ie=et:(Ie--,Ie|=Ie>>>1,Ie|=Ie>>>2,Ie|=Ie>>>4,Ie|=Ie>>>8,Ie|=Ie>>>16,Ie++),Ie}function vt(Ie,ze){return Ie<=0||ze.length===0&&ze.ended?0:ze.objectMode?1:Ie!==Ie?ze.flowing&&ze.length?ze.buffer.head.data.length:ze.length:(Ie>ze.highWaterMark&&(ze.highWaterMark=lt(Ie)),Ie<=ze.length?Ie:ze.ended?ze.length:(ze.needReadable=!0,0))}ft.prototype.read=function(Ie){oe("read",Ie),Ie=parseInt(Ie,10);var ze=this._readableState,Ve=Ie;if(Ie!==0&&(ze.emittedReadable=!1),Ie===0&&ze.needReadable&&((ze.highWaterMark!==0?ze.length>=ze.highWaterMark:ze.length>0)||ze.ended))return oe("read: emitReadable",ze.length,ze.ended),ze.length===0&&ze.ended?Ne(this):ht(this),null;if(Ie=vt(Ie,ze),Ie===0&&ze.ended)return ze.length===0&&Ne(this),null;var it=ze.needReadable;oe("need readable",it),(ze.length===0||ze.length-Ie<ze.highWaterMark)&&(it=!0,oe("length less than watermark",it)),ze.ended||ze.reading?(it=!1,oe("reading or ended",it)):it&&(oe("do read"),ze.reading=!0,ze.sync=!0,ze.length===0&&(ze.needReadable=!0),this._read(ze.highWaterMark),ze.sync=!1,ze.reading||(Ie=vt(Ve,ze)));var St;return Ie>0?St=Se(Ie,ze):St=null,St===null?(ze.needReadable=ze.length<=ze.highWaterMark,Ie=0):(ze.length-=Ie,ze.awaitDrain=0),ze.length===0&&(ze.ended||(ze.needReadable=!0),Ve!==Ie&&ze.ended&&Ne(this)),St!==null&&this.emit("data",St),St};function wt(Ie,ze){if(oe("onEofChunk"),!ze.ended){if(ze.decoder){var Ve=ze.decoder.end();Ve&&Ve.length&&(ze.buffer.push(Ve),ze.length+=ze.objectMode?1:Ve.length)}ze.ended=!0,ze.sync?ht(Ie):(ze.needReadable=!1,ze.emittedReadable||(ze.emittedReadable=!0,dt(Ie)))}}function ht(Ie){var ze=Ie._readableState;oe("emitReadable",ze.needReadable,ze.emittedReadable),ze.needReadable=!1,ze.emittedReadable||(oe("emitReadable",ze.flowing),ze.emittedReadable=!0,fe.nextTick(dt,Ie))}function dt(Ie){var ze=Ie._readableState;oe("emitReadable_",ze.destroyed,ze.length,ze.ended),!ze.destroyed&&(ze.length||ze.ended)&&(Ie.emit("readable"),ze.emittedReadable=!1),ze.needReadable=!ze.flowing&&!ze.ended&&ze.length<=ze.highWaterMark,Ze(Ie)}function ut(Ie,ze){ze.readingMore||(ze.readingMore=!0,fe.nextTick(Pt,Ie,ze))}function Pt(Ie,ze){for(;!ze.reading&&!ze.ended&&(ze.length<ze.highWaterMark||ze.flowing&&ze.length===0);){var Ve=ze.length;if(oe("maybeReadMore read 0"),Ie.read(0),Ve===ze.length)break}ze.readingMore=!1}ft.prototype._read=function(Ie){Je(this,new Fe("_read()"))},ft.prototype.pipe=function(Ie,ze){var Ve=this,it=this._readableState;switch(it.pipesCount){case 0:it.pipes=Ie;break;case 1:it.pipes=[it.pipes,Ie];break;default:it.pipes.push(Ie);break}it.pipesCount+=1,oe("pipe count=%d opts=%j",it.pipesCount,ze);var St=(!ze||ze.end!==!1)&&Ie!==fe.stdout&&Ie!==fe.stderr,Ct=St?jt:Wt;it.endEmitted?fe.nextTick(Ct):Ve.once("end",Ct),Ie.on("unpipe",It);function It(Bn,zn){oe("onunpipe"),Bn===Ve&&zn&&zn.hasUnpiped===!1&&(zn.hasUnpiped=!0,un())}function jt(){oe("onend"),Ie.end()}var Kt=yt(Ve);Ie.on("drain",Kt);var an=!1;function un(){oe("cleanup"),Ie.removeListener("close",On),Ie.removeListener("finish",fn),Ie.removeListener("drain",Kt),Ie.removeListener("error",qt),Ie.removeListener("unpipe",It),Ve.removeListener("end",jt),Ve.removeListener("end",Wt),Ve.removeListener("data",hn),an=!0,it.awaitDrain&&(!Ie._writableState||Ie._writableState.needDrain)&&Kt()}Ve.on("data",hn);function hn(Bn){oe("ondata");var zn=Ie.write(Bn);oe("dest.write",zn),zn===!1&&((it.pipesCount===1&&it.pipes===Ie||it.pipesCount>1&&nt(it.pipes,Ie)!==-1)&&!an&&(oe("false write response, pause",it.awaitDrain),it.awaitDrain++),Ve.pause())}function qt(Bn){oe("onerror",Bn),Wt(),Ie.removeListener("error",qt),we(Ie,"error")===0&&Je(Ie,Bn)}We(Ie,"error",qt);function On(){Ie.removeListener("finish",fn),Wt()}Ie.once("close",On);function fn(){oe("onfinish"),Ie.removeListener("close",On),Wt()}Ie.once("finish",fn);function Wt(){oe("unpipe"),Ve.unpipe(Ie)}return Ie.emit("pipe",Ve),it.flowing||(oe("pipe resume"),Ve.resume()),Ie};function yt(Ie){return function(){var Ve=Ie._readableState;oe("pipeOnDrain",Ve.awaitDrain),Ve.awaitDrain&&Ve.awaitDrain--,Ve.awaitDrain===0&&we(Ie,"data")&&(Ve.flowing=!0,Ze(Ie))}}ft.prototype.unpipe=function(Ie){var ze=this._readableState,Ve={hasUnpiped:!1};if(ze.pipesCount===0)return this;if(ze.pipesCount===1)return Ie&&Ie!==ze.pipes?this:(Ie||(Ie=ze.pipes),ze.pipes=null,ze.pipesCount=0,ze.flowing=!1,Ie&&Ie.emit("unpipe",this,Ve),this);if(!Ie){var it=ze.pipes,St=ze.pipesCount;ze.pipes=null,ze.pipesCount=0,ze.flowing=!1;for(var Ct=0;Ct<St;Ct++)it[Ct].emit("unpipe",this,{hasUnpiped:!1});return this}var It=nt(ze.pipes,Ie);return It===-1?this:(ze.pipes.splice(It,1),ze.pipesCount-=1,ze.pipesCount===1&&(ze.pipes=ze.pipes[0]),Ie.emit("unpipe",this,Ve),this)},ft.prototype.on=function(Ie,ze){var Ve=Te.prototype.on.call(this,Ie,ze),it=this._readableState;return Ie==="data"?(it.readableListening=this.listenerCount("readable")>0,it.flowing!==!1&&this.resume()):Ie==="readable"&&!it.endEmitted&&!it.readableListening&&(it.readableListening=it.needReadable=!0,it.flowing=!1,it.emittedReadable=!1,oe("on readable",it.length,it.reading),it.length?ht(this):it.reading||fe.nextTick(Tt,this)),Ve},ft.prototype.addListener=ft.prototype.on,ft.prototype.removeListener=function(Ie,ze){var Ve=Te.prototype.removeListener.call(this,Ie,ze);return Ie==="readable"&&fe.nextTick(gt,this),Ve},ft.prototype.removeAllListeners=function(Ie){var ze=Te.prototype.removeAllListeners.apply(this,arguments);return(Ie==="readable"||Ie===void 0)&&fe.nextTick(gt,this),ze};function gt(Ie){var ze=Ie._readableState;ze.readableListening=Ie.listenerCount("readable")>0,ze.resumeScheduled&&!ze.paused?ze.flowing=!0:Ie.listenerCount("data")>0&&Ie.resume()}function Tt(Ie){oe("readable nexttick read 0"),Ie.read(0)}ft.prototype.resume=function(){var Ie=this._readableState;return Ie.flowing||(oe("resume"),Ie.flowing=!Ie.readableListening,ct(this,Ie)),Ie.paused=!1,this};function ct(Ie,ze){ze.resumeScheduled||(ze.resumeScheduled=!0,fe.nextTick(Ye,Ie,ze))}function Ye(Ie,ze){oe("resume",ze.reading),ze.reading||Ie.read(0),ze.resumeScheduled=!1,Ie.emit("resume"),Ze(Ie),ze.flowing&&!ze.reading&&Ie.read(0)}ft.prototype.pause=function(){return oe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(oe("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ze(Ie){var ze=Ie._readableState;for(oe("flow",ze.flowing);ze.flowing&&Ie.read()!==null;);}ft.prototype.wrap=function(Ie){var ze=this,Ve=this._readableState,it=!1;Ie.on("end",function(){if(oe("wrapped end"),Ve.decoder&&!Ve.ended){var It=Ve.decoder.end();It&&It.length&&ze.push(It)}ze.push(null)}),Ie.on("data",function(It){if(oe("wrapped data"),Ve.decoder&&(It=Ve.decoder.write(It)),!(Ve.objectMode&&It==null)&&!(!Ve.objectMode&&(!It||!It.length))){var jt=ze.push(It);jt||(it=!0,Ie.pause())}});for(var St in Ie)this[St]===void 0&&typeof Ie[St]=="function"&&(this[St]=function(jt){return function(){return Ie[jt].apply(Ie,arguments)}}(St));for(var Ct=0;Ct<He.length;Ct++)Ie.on(He[Ct],this.emit.bind(this,He[Ct]));return this._read=function(It){oe("wrapped _read",It),it&&(it=!1,Ie.resume())},this},typeof Symbol=="function"&&(ft.prototype[Symbol.asyncIterator]=function(){return Be===void 0&&(Be=ae("./internal/streams/async_iterator")),Be(this)}),Object.defineProperty(ft.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ft.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ft.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(ze){this._readableState&&(this._readableState.flowing=ze)}}),ft._fromList=Se,Object.defineProperty(ft.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Se(Ie,ze){if(ze.length===0)return null;var Ve;return ze.objectMode?Ve=ze.buffer.shift():!Ie||Ie>=ze.length?(ze.decoder?Ve=ze.buffer.join(""):ze.buffer.length===1?Ve=ze.buffer.first():Ve=ze.buffer.concat(ze.length),ze.buffer.clear()):Ve=ze.buffer.consume(Ie,ze.decoder),Ve}function Ne(Ie){var ze=Ie._readableState;oe("endReadable",ze.endEmitted),ze.endEmitted||(ze.ended=!0,fe.nextTick($e,ze,Ie))}function $e(Ie,ze){if(oe("endReadableNT",Ie.endEmitted,Ie.length),!Ie.endEmitted&&Ie.length===0&&(Ie.endEmitted=!0,ze.readable=!1,ze.emit("end"),Ie.autoDestroy)){var Ve=ze._writableState;(!Ve||Ve.autoDestroy&&Ve.finished)&&ze.destroy()}}typeof Symbol=="function"&&(ft.from=function(Ie,ze){return Ue===void 0&&(Ue=ae("./internal/streams/from")),Ue(ft,Ie,ze)});function nt(Ie,ze){for(var Ve=0,it=Ie.length;Ve<it;Ve++)if(Ie[Ve]===ze)return Ve;return-1}}).call(this)}).call(this,ae("_process"),typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(ae,Ge,Re){"use strict";Ge.exports=Pe;var fe=ae("../errors").codes,pe=fe.ERR_METHOD_NOT_IMPLEMENTED,be=fe.ERR_MULTIPLE_CALLBACK,Ee=fe.ERR_TRANSFORM_ALREADY_TRANSFORMING,we=fe.ERR_TRANSFORM_WITH_LENGTH_0,Te=ae("./_stream_duplex");ae("inherits")(Pe,Te);function ve(z,oe){var ie=this._transformState;ie.transforming=!1;var le=ie.writecb;if(le===null)return this.emit("error",new be);ie.writechunk=null,ie.writecb=null,oe!=null&&this.push(oe),le(z);var ue=this._readableState;ue.reading=!1,(ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}function Pe(z){if(!(this instanceof Pe))return new Pe(z);Te.call(this,z),this._transformState={afterTransform:ve.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,z&&(typeof z.transform=="function"&&(this._transform=z.transform),typeof z.flush=="function"&&(this._flush=z.flush)),this.on("prefinish",de)}function de(){var z=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(oe,ie){ee(z,oe,ie)}):ee(this,null,null)}Pe.prototype.push=function(z,oe){return this._transformState.needTransform=!1,Te.prototype.push.call(this,z,oe)},Pe.prototype._transform=function(z,oe,ie){ie(new pe("_transform()"))},Pe.prototype._write=function(z,oe,ie){var le=this._transformState;if(le.writecb=ie,le.writechunk=z,le.writeencoding=oe,!le.transforming){var ue=this._readableState;(le.needTransform||ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}},Pe.prototype._read=function(z){var oe=this._transformState;oe.writechunk!==null&&!oe.transforming?(oe.transforming=!0,this._transform(oe.writechunk,oe.writeencoding,oe.afterTransform)):oe.needTransform=!0},Pe.prototype._destroy=function(z,oe){Te.prototype._destroy.call(this,z,function(ie){oe(ie)})};function ee(z,oe,ie){if(oe)return z.emit("error",oe);if(ie!=null&&z.push(ie),z._writableState.length)throw new we;if(z._transformState.transforming)throw new Ee;return z.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(ae,Ge,Re){(function(fe,pe){(function(){"use strict";Ge.exports=at;function be(Ze,Se,Ne){this.chunk=Ze,this.encoding=Se,this.callback=Ne,this.next=null}function Ee(Ze){var Se=this;this.next=null,this.entry=null,this.finish=function(){Ye(Se,Ze)}}var we;at.WritableState=He;var Te={deprecate:ae("util-deprecate")},ve=ae("./internal/streams/stream"),Pe=ae("buffer").Buffer,de=(typeof pe!="undefined"?pe:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function ee(Ze){return Pe.from(Ze)}function z(Ze){return Pe.isBuffer(Ze)||Ze instanceof de}var oe=ae("./internal/streams/destroy"),ie=ae("./internal/streams/state"),le=ie.getHighWaterMark,ue=ae("../errors").codes,me=ue.ERR_INVALID_ARG_TYPE,xe=ue.ERR_METHOD_NOT_IMPLEMENTED,Ae=ue.ERR_MULTIPLE_CALLBACK,De=ue.ERR_STREAM_CANNOT_PIPE,Fe=ue.ERR_STREAM_DESTROYED,je=ue.ERR_STREAM_NULL_VALUES,Le=ue.ERR_STREAM_WRITE_AFTER_END,Be=ue.ERR_UNKNOWN_ENCODING,Ue=oe.errorOrDestroy;ae("inherits")(at,ve);function Je(){}function He(Ze,Se,Ne){we=we||ae("./_stream_duplex"),Ze=Ze||{},typeof Ne!="boolean"&&(Ne=Se instanceof we),this.objectMode=!!Ze.objectMode,Ne&&(this.objectMode=this.objectMode||!!Ze.writableObjectMode),this.highWaterMark=le(this,Ze,"writableHighWaterMark",Ne),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var $e=Ze.decodeStrings===!1;this.decodeStrings=!$e,this.defaultEncoding=Ze.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(nt){wt(Se,nt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Ze.emitClose!==!1,this.autoDestroy=!!Ze.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ee(this)}He.prototype.getBuffer=function(){for(var Se=this.bufferedRequest,Ne=[];Se;)Ne.push(Se),Se=Se.next;return Ne},function(){try{Object.defineProperty(He.prototype,"buffer",{get:Te.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Ze){}}();var We;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(We=Function.prototype[Symbol.hasInstance],Object.defineProperty(at,Symbol.hasInstance,{value:function(Se){return We.call(this,Se)?!0:this!==at?!1:Se&&Se._writableState instanceof He}})):We=function(Se){return Se instanceof this};function at(Ze){we=we||ae("./_stream_duplex");var Se=this instanceof we;if(!Se&&!We.call(at,this))return new at(Ze);this._writableState=new He(Ze,this,Se),this.writable=!0,Ze&&(typeof Ze.write=="function"&&(this._write=Ze.write),typeof Ze.writev=="function"&&(this._writev=Ze.writev),typeof Ze.destroy=="function"&&(this._destroy=Ze.destroy),typeof Ze.final=="function"&&(this._final=Ze.final)),ve.call(this)}at.prototype.pipe=function(){Ue(this,new De)};function ft(Ze,Se){var Ne=new Le;Ue(Ze,Ne),fe.nextTick(Se,Ne)}function mt(Ze,Se,Ne,$e){var nt;return Ne===null?nt=new je:typeof Ne!="string"&&!Se.objectMode&&(nt=new me("chunk",["string","Buffer"],Ne)),nt?(Ue(Ze,nt),fe.nextTick($e,nt),!1):!0}at.prototype.write=function(Ze,Se,Ne){var $e=this._writableState,nt=!1,Ie=!$e.objectMode&&z(Ze);return Ie&&!Pe.isBuffer(Ze)&&(Ze=ee(Ze)),typeof Se=="function"&&(Ne=Se,Se=null),Ie?Se="buffer":Se||(Se=$e.defaultEncoding),typeof Ne!="function"&&(Ne=Je),$e.ending?ft(this,Ne):(Ie||mt(this,$e,Ze,Ne))&&($e.pendingcb++,nt=Xe(this,$e,Ie,Ze,Se,Ne)),nt},at.prototype.cork=function(){this._writableState.corked++},at.prototype.uncork=function(){var Ze=this._writableState;Ze.corked&&(Ze.corked--,!Ze.writing&&!Ze.corked&&!Ze.bufferProcessing&&Ze.bufferedRequest&&ut(this,Ze))},at.prototype.setDefaultEncoding=function(Se){if(typeof Se=="string"&&(Se=Se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Se+"").toLowerCase())>-1))throw new Be(Se);return this._writableState.defaultEncoding=Se,this},Object.defineProperty(at.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Lt(Ze,Se,Ne){return!Ze.objectMode&&Ze.decodeStrings!==!1&&typeof Se=="string"&&(Se=Pe.from(Se,Ne)),Se}Object.defineProperty(at.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Xe(Ze,Se,Ne,$e,nt,Ie){if(!Ne){var ze=Lt(Se,$e,nt);$e!==ze&&(Ne=!0,nt="buffer",$e=ze)}var Ve=Se.objectMode?1:$e.length;Se.length+=Ve;var it=Se.length<Se.highWaterMark;if(it||(Se.needDrain=!0),Se.writing||Se.corked){var St=Se.lastBufferedRequest;Se.lastBufferedRequest={chunk:$e,encoding:nt,isBuf:Ne,callback:Ie,next:null},St?St.next=Se.lastBufferedRequest:Se.bufferedRequest=Se.lastBufferedRequest,Se.bufferedRequestCount+=1}else et(Ze,Se,!1,Ve,$e,nt,Ie);return it}function et(Ze,Se,Ne,$e,nt,Ie,ze){Se.writelen=$e,Se.writecb=ze,Se.writing=!0,Se.sync=!0,Se.destroyed?Se.onwrite(new Fe("write")):Ne?Ze._writev(nt,Se.onwrite):Ze._write(nt,Ie,Se.onwrite),Se.sync=!1}function lt(Ze,Se,Ne,$e,nt){--Se.pendingcb,Ne?(fe.nextTick(nt,$e),fe.nextTick(Tt,Ze,Se),Ze._writableState.errorEmitted=!0,Ue(Ze,$e)):(nt($e),Ze._writableState.errorEmitted=!0,Ue(Ze,$e),Tt(Ze,Se))}function vt(Ze){Ze.writing=!1,Ze.writecb=null,Ze.length-=Ze.writelen,Ze.writelen=0}function wt(Ze,Se){var Ne=Ze._writableState,$e=Ne.sync,nt=Ne.writecb;if(typeof nt!="function")throw new Ae;if(vt(Ne),Se)lt(Ze,Ne,$e,Se,nt);else{var Ie=Pt(Ne)||Ze.destroyed;!Ie&&!Ne.corked&&!Ne.bufferProcessing&&Ne.bufferedRequest&&ut(Ze,Ne),$e?fe.nextTick(ht,Ze,Ne,Ie,nt):ht(Ze,Ne,Ie,nt)}}function ht(Ze,Se,Ne,$e){Ne||dt(Ze,Se),Se.pendingcb--,$e(),Tt(Ze,Se)}function dt(Ze,Se){Se.length===0&&Se.needDrain&&(Se.needDrain=!1,Ze.emit("drain"))}function ut(Ze,Se){Se.bufferProcessing=!0;var Ne=Se.bufferedRequest;if(Ze._writev&&Ne&&Ne.next){var $e=Se.bufferedRequestCount,nt=new Array($e),Ie=Se.corkedRequestsFree;Ie.entry=Ne;for(var ze=0,Ve=!0;Ne;)nt[ze]=Ne,Ne.isBuf||(Ve=!1),Ne=Ne.next,ze+=1;nt.allBuffers=Ve,et(Ze,Se,!0,Se.length,nt,"",Ie.finish),Se.pendingcb++,Se.lastBufferedRequest=null,Ie.next?(Se.corkedRequestsFree=Ie.next,Ie.next=null):Se.corkedRequestsFree=new Ee(Se),Se.bufferedRequestCount=0}else{for(;Ne;){var it=Ne.chunk,St=Ne.encoding,Ct=Ne.callback,It=Se.objectMode?1:it.length;if(et(Ze,Se,!1,It,it,St,Ct),Ne=Ne.next,Se.bufferedRequestCount--,Se.writing)break}Ne===null&&(Se.lastBufferedRequest=null)}Se.bufferedRequest=Ne,Se.bufferProcessing=!1}at.prototype._write=function(Ze,Se,Ne){Ne(new xe("_write()"))},at.prototype._writev=null,at.prototype.end=function(Ze,Se,Ne){var $e=this._writableState;return typeof Ze=="function"?(Ne=Ze,Ze=null,Se=null):typeof Se=="function"&&(Ne=Se,Se=null),Ze!=null&&this.write(Ze,Se),$e.corked&&($e.corked=1,this.uncork()),$e.ending||ct(this,$e,Ne),this},Object.defineProperty(at.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Pt(Ze){return Ze.ending&&Ze.length===0&&Ze.bufferedRequest===null&&!Ze.finished&&!Ze.writing}function yt(Ze,Se){Ze._final(function(Ne){Se.pendingcb--,Ne&&Ue(Ze,Ne),Se.prefinished=!0,Ze.emit("prefinish"),Tt(Ze,Se)})}function gt(Ze,Se){!Se.prefinished&&!Se.finalCalled&&(typeof Ze._final=="function"&&!Se.destroyed?(Se.pendingcb++,Se.finalCalled=!0,fe.nextTick(yt,Ze,Se)):(Se.prefinished=!0,Ze.emit("prefinish")))}function Tt(Ze,Se){var Ne=Pt(Se);if(Ne&&(gt(Ze,Se),Se.pendingcb===0&&(Se.finished=!0,Ze.emit("finish"),Se.autoDestroy))){var $e=Ze._readableState;(!$e||$e.autoDestroy&&$e.endEmitted)&&Ze.destroy()}return Ne}function ct(Ze,Se,Ne){Se.ending=!0,Tt(Ze,Se),Ne&&(Se.finished?fe.nextTick(Ne):Ze.once("finish",Ne)),Se.ended=!0,Ze.writable=!1}function Ye(Ze,Se,Ne){var $e=Ze.entry;for(Ze.entry=null;$e;){var nt=$e.callback;Se.pendingcb--,nt(Ne),$e=$e.next}Se.corkedRequestsFree.next=Ze}Object.defineProperty(at.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Se){this._writableState&&(this._writableState.destroyed=Se)}}),at.prototype.destroy=oe.destroy,at.prototype._undestroy=oe.undestroy,at.prototype._destroy=function(Ze,Se){Se(Ze)}}).call(this)}).call(this,ae("_process"),typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe;function be(je,Le,Be){return Le=Ee(Le),Le in je?Object.defineProperty(je,Le,{value:Be,enumerable:!0,configurable:!0,writable:!0}):je[Le]=Be,je}function Ee(je){var Le=we(je,"string");return typeof Le=="symbol"?Le:String(Le)}function we(je,Le){if(typeof je!="object"||je===null)return je;var Be=je[Symbol.toPrimitive];if(Be!==void 0){var Ue=Be.call(je,Le||"default");if(typeof Ue!="object")return Ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Le==="string"?String:Number)(je)}var Te=ae("./end-of-stream"),ve=Symbol("lastResolve"),Pe=Symbol("lastReject"),de=Symbol("error"),ee=Symbol("ended"),z=Symbol("lastPromise"),oe=Symbol("handlePromise"),ie=Symbol("stream");function le(je,Le){return{value:je,done:Le}}function ue(je){var Le=je[ve];if(Le!==null){var Be=je[ie].read();Be!==null&&(je[z]=null,je[ve]=null,je[Pe]=null,Le(le(Be,!1)))}}function me(je){fe.nextTick(ue,je)}function xe(je,Le){return function(Be,Ue){je.then(function(){if(Le[ee]){Be(le(void 0,!0));return}Le[oe](Be,Ue)},Ue)}}var Ae=Object.getPrototypeOf(function(){}),De=Object.setPrototypeOf((pe={get stream(){return this[ie]},next:function(){var Le=this,Be=this[de];if(Be!==null)return Promise.reject(Be);if(this[ee])return Promise.resolve(le(void 0,!0));if(this[ie].destroyed)return new Promise(function(We,at){fe.nextTick(function(){Le[de]?at(Le[de]):We(le(void 0,!0))})});var Ue=this[z],Je;if(Ue)Je=new Promise(xe(Ue,this));else{var He=this[ie].read();if(He!==null)return Promise.resolve(le(He,!1));Je=new Promise(this[oe])}return this[z]=Je,Je}},be(pe,Symbol.asyncIterator,function(){return this}),be(pe,"return",function(){var Le=this;return new Promise(function(Be,Ue){Le[ie].destroy(null,function(Je){if(Je){Ue(Je);return}Be(le(void 0,!0))})})}),pe),Ae),Fe=function(Le){var Be,Ue=Object.create(De,(Be={},be(Be,ie,{value:Le,writable:!0}),be(Be,ve,{value:null,writable:!0}),be(Be,Pe,{value:null,writable:!0}),be(Be,de,{value:null,writable:!0}),be(Be,ee,{value:Le._readableState.endEmitted,writable:!0}),be(Be,oe,{value:function(He,We){var at=Ue[ie].read();at?(Ue[z]=null,Ue[ve]=null,Ue[Pe]=null,He(le(at,!1))):(Ue[ve]=He,Ue[Pe]=We)},writable:!0}),Be));return Ue[z]=null,Te(Le,function(Je){if(Je&&Je.code!=="ERR_STREAM_PREMATURE_CLOSE"){var He=Ue[Pe];He!==null&&(Ue[z]=null,Ue[ve]=null,Ue[Pe]=null,He(Je)),Ue[de]=Je;return}var We=Ue[ve];We!==null&&(Ue[z]=null,Ue[ve]=null,Ue[Pe]=null,We(le(void 0,!0))),Ue[ee]=!0}),Le.on("readable",me.bind(null,Ue)),Ue};Ge.exports=Fe}).call(this)}).call(this,ae("_process"))},{"./end-of-stream":408,_process:467}],406:[function(ae,Ge,Re){"use strict";function fe(ue,me){var xe=Object.keys(ue);if(Object.getOwnPropertySymbols){var Ae=Object.getOwnPropertySymbols(ue);me&&(Ae=Ae.filter(function(De){return Object.getOwnPropertyDescriptor(ue,De).enumerable})),xe.push.apply(xe,Ae)}return xe}function pe(ue){for(var me=1;me<arguments.length;me++){var xe=arguments[me]!=null?arguments[me]:{};me%2?fe(Object(xe),!0).forEach(function(Ae){be(ue,Ae,xe[Ae])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(xe)):fe(Object(xe)).forEach(function(Ae){Object.defineProperty(ue,Ae,Object.getOwnPropertyDescriptor(xe,Ae))})}return ue}function be(ue,me,xe){return me=ve(me),me in ue?Object.defineProperty(ue,me,{value:xe,enumerable:!0,configurable:!0,writable:!0}):ue[me]=xe,ue}function Ee(ue,me){if(!(ue instanceof me))throw new TypeError("Cannot call a class as a function")}function we(ue,me){for(var xe=0;xe<me.length;xe++){var Ae=me[xe];Ae.enumerable=Ae.enumerable||!1,Ae.configurable=!0,"value"in Ae&&(Ae.writable=!0),Object.defineProperty(ue,ve(Ae.key),Ae)}}function Te(ue,me,xe){return me&&we(ue.prototype,me),xe&&we(ue,xe),Object.defineProperty(ue,"prototype",{writable:!1}),ue}function ve(ue){var me=Pe(ue,"string");return typeof me=="symbol"?me:String(me)}function Pe(ue,me){if(typeof ue!="object"||ue===null)return ue;var xe=ue[Symbol.toPrimitive];if(xe!==void 0){var Ae=xe.call(ue,me||"default");if(typeof Ae!="object")return Ae;throw new TypeError("@@toPrimitive must return a primitive value.")}return(me==="string"?String:Number)(ue)}var de=ae("buffer"),ee=de.Buffer,z=ae("util"),oe=z.inspect,ie=oe&&oe.custom||"inspect";function le(ue,me,xe){ee.prototype.copy.call(ue,me,xe)}Ge.exports=function(){function ue(){Ee(this,ue),this.head=null,this.tail=null,this.length=0}return Te(ue,[{key:"push",value:function(xe){var Ae={data:xe,next:null};this.length>0?this.tail.next=Ae:this.head=Ae,this.tail=Ae,++this.length}},{key:"unshift",value:function(xe){var Ae={data:xe,next:this.head};this.length===0&&(this.tail=Ae),this.head=Ae,++this.length}},{key:"shift",value:function(){if(this.length!==0){var xe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,xe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(xe){if(this.length===0)return"";for(var Ae=this.head,De=""+Ae.data;Ae=Ae.next;)De+=xe+Ae.data;return De}},{key:"concat",value:function(xe){if(this.length===0)return ee.alloc(0);for(var Ae=ee.allocUnsafe(xe>>>0),De=this.head,Fe=0;De;)le(De.data,Ae,Fe),Fe+=De.data.length,De=De.next;return Ae}},{key:"consume",value:function(xe,Ae){var De;return xe<this.head.data.length?(De=this.head.data.slice(0,xe),this.head.data=this.head.data.slice(xe)):xe===this.head.data.length?De=this.shift():De=Ae?this._getString(xe):this._getBuffer(xe),De}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(xe){var Ae=this.head,De=1,Fe=Ae.data;for(xe-=Fe.length;Ae=Ae.next;){var je=Ae.data,Le=xe>je.length?je.length:xe;if(Le===je.length?Fe+=je:Fe+=je.slice(0,xe),xe-=Le,xe===0){Le===je.length?(++De,Ae.next?this.head=Ae.next:this.head=this.tail=null):(this.head=Ae,Ae.data=je.slice(Le));break}++De}return this.length-=De,Fe}},{key:"_getBuffer",value:function(xe){var Ae=ee.allocUnsafe(xe),De=this.head,Fe=1;for(De.data.copy(Ae),xe-=De.data.length;De=De.next;){var je=De.data,Le=xe>je.length?je.length:xe;if(je.copy(Ae,Ae.length-xe,0,Le),xe-=Le,xe===0){Le===je.length?(++Fe,De.next?this.head=De.next:this.head=this.tail=null):(this.head=De,De.data=je.slice(Le));break}++Fe}return this.length-=Fe,Ae}},{key:ie,value:function(xe,Ae){return oe(this,pe(pe({},Ae),{},{depth:0,customInspect:!1}))}}]),ue}()},{buffer:90,util:89}],407:[function(ae,Ge,Re){(function(fe){(function(){"use strict";function pe(Pe,de){var ee=this,z=this._readableState&&this._readableState.destroyed,oe=this._writableState&&this._writableState.destroyed;return z||oe?(de?de(Pe):Pe&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,fe.nextTick(Te,this,Pe)):fe.nextTick(Te,this,Pe)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Pe||null,function(ie){!de&&ie?ee._writableState?ee._writableState.errorEmitted?fe.nextTick(Ee,ee):(ee._writableState.errorEmitted=!0,fe.nextTick(be,ee,ie)):fe.nextTick(be,ee,ie):de?(fe.nextTick(Ee,ee),de(ie)):fe.nextTick(Ee,ee)}),this)}function be(Pe,de){Te(Pe,de),Ee(Pe)}function Ee(Pe){Pe._writableState&&!Pe._writableState.emitClose||Pe._readableState&&!Pe._readableState.emitClose||Pe.emit("close")}function we(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Te(Pe,de){Pe.emit("error",de)}function ve(Pe,de){var ee=Pe._readableState,z=Pe._writableState;ee&&ee.autoDestroy||z&&z.autoDestroy?Pe.destroy(de):Pe.emit("error",de)}Ge.exports={destroy:pe,undestroy:we,errorOrDestroy:ve}}).call(this)}).call(this,ae("_process"))},{_process:467}],408:[function(ae,Ge,Re){"use strict";var fe=ae("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function pe(Te){var ve=!1;return function(){if(!ve){ve=!0;for(var Pe=arguments.length,de=new Array(Pe),ee=0;ee<Pe;ee++)de[ee]=arguments[ee];Te.apply(this,de)}}}function be(){}function Ee(Te){return Te.setHeader&&typeof Te.abort=="function"}function we(Te,ve,Pe){if(typeof ve=="function")return we(Te,null,ve);ve||(ve={}),Pe=pe(Pe||be);var de=ve.readable||ve.readable!==!1&&Te.readable,ee=ve.writable||ve.writable!==!1&&Te.writable,z=function(){Te.writable||ie()},oe=Te._writableState&&Te._writableState.finished,ie=function(){ee=!1,oe=!0,de||Pe.call(Te)},le=Te._readableState&&Te._readableState.endEmitted,ue=function(){de=!1,le=!0,ee||Pe.call(Te)},me=function(Fe){Pe.call(Te,Fe)},xe=function(){var Fe;if(de&&!le)return(!Te._readableState||!Te._readableState.ended)&&(Fe=new fe),Pe.call(Te,Fe);if(ee&&!oe)return(!Te._writableState||!Te._writableState.ended)&&(Fe=new fe),Pe.call(Te,Fe)},Ae=function(){Te.req.on("finish",ie)};return Ee(Te)?(Te.on("complete",ie),Te.on("abort",xe),Te.req?Ae():Te.on("request",Ae)):ee&&!Te._writableState&&(Te.on("end",z),Te.on("close",z)),Te.on("end",ue),Te.on("finish",ie),ve.error!==!1&&Te.on("error",me),Te.on("close",xe),function(){Te.removeListener("complete",ie),Te.removeListener("abort",xe),Te.removeListener("request",Ae),Te.req&&Te.req.removeListener("finish",ie),Te.removeListener("end",z),Te.removeListener("close",z),Te.removeListener("finish",ie),Te.removeListener("end",ue),Te.removeListener("error",me),Te.removeListener("close",xe)}}Ge.exports=we},{"../../../errors":399}],409:[function(ae,Ge,Re){Ge.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(ae,Ge,Re){"use strict";var fe;function pe(ie){var le=!1;return function(){le||(le=!0,ie.apply(void 0,arguments))}}var be=ae("../../../errors").codes,Ee=be.ERR_MISSING_ARGS,we=be.ERR_STREAM_DESTROYED;function Te(ie){if(ie)throw ie}function ve(ie){return ie.setHeader&&typeof ie.abort=="function"}function Pe(ie,le,ue,me){me=pe(me);var xe=!1;ie.on("close",function(){xe=!0}),fe===void 0&&(fe=ae("./end-of-stream")),fe(ie,{readable:le,writable:ue},function(De){if(De)return me(De);xe=!0,me()});var Ae=!1;return function(De){if(!xe&&!Ae){if(Ae=!0,ve(ie))return ie.abort();if(typeof ie.destroy=="function")return ie.destroy();me(De||new we("pipe"))}}}function de(ie){ie()}function ee(ie,le){return ie.pipe(le)}function z(ie){return!ie.length||typeof ie[ie.length-1]!="function"?Te:ie.pop()}function oe(){for(var ie=arguments.length,le=new Array(ie),ue=0;ue<ie;ue++)le[ue]=arguments[ue];var me=z(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new Ee("streams");var xe,Ae=le.map(function(De,Fe){var je=Fe<le.length-1,Le=Fe>0;return Pe(De,je,Le,function(Be){xe||(xe=Be),Be&&Ae.forEach(de),!je&&(Ae.forEach(de),me(xe))})});return le.reduce(ee)}Ge.exports=oe},{"../../../errors":399,"./end-of-stream":408}],411:[function(ae,Ge,Re){"use strict";var fe=ae("../../../errors").codes.ERR_INVALID_OPT_VALUE;function pe(Ee,we,Te){return Ee.highWaterMark!=null?Ee.highWaterMark:we?Ee[Te]:null}function be(Ee,we,Te,ve){var Pe=pe(we,ve,Te);if(Pe!=null){if(!(isFinite(Pe)&&Math.floor(Pe)===Pe)||Pe<0){var de=ve?Te:"highWaterMark";throw new fe(de,Pe)}return Math.floor(Pe)}return Ee.objectMode?16:16*1024}Ge.exports={getHighWaterMark:be}},{"../../../errors":399}],412:[function(ae,Ge,Re){arguments[4][393][0].apply(Re,arguments)},{dup:393,events:344}],413:[function(ae,Ge,Re){"use strict";var fe=ae("safe-buffer").Buffer,pe=fe.isEncoding||function(Ae){switch(Ae=""+Ae,Ae&&Ae.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 be(Ae){if(!Ae)return"utf8";for(var De;;)switch(Ae){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 Ae;default:if(De)return;Ae=(""+Ae).toLowerCase(),De=!0}}function Ee(Ae){var De=be(Ae);if(typeof De!="string"&&(fe.isEncoding===pe||!pe(Ae)))throw new Error("Unknown encoding: "+Ae);return De||Ae}Re.StringDecoder=we;function we(Ae){this.encoding=Ee(Ae);var De;switch(this.encoding){case"utf16le":this.text=oe,this.end=ie,De=4;break;case"utf8":this.fillLast=de,De=4;break;case"base64":this.text=le,this.end=ue,De=3;break;default:this.write=me,this.end=xe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fe.allocUnsafe(De)}we.prototype.write=function(Ae){if(Ae.length===0)return"";var De,Fe;if(this.lastNeed){if(De=this.fillLast(Ae),De===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<Ae.length?De?De+this.text(Ae,Fe):this.text(Ae,Fe):De||""},we.prototype.end=z,we.prototype.text=ee,we.prototype.fillLast=function(Ae){if(this.lastNeed<=Ae.length)return Ae.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Ae.copy(this.lastChar,this.lastTotal-this.lastNeed,0,Ae.length),this.lastNeed-=Ae.length};function Te(Ae){return Ae<=127?0:Ae>>5===6?2:Ae>>4===14?3:Ae>>3===30?4:Ae>>6===2?-1:-2}function ve(Ae,De,Fe){var je=De.length-1;if(je<Fe)return 0;var Le=Te(De[je]);return Le>=0?(Le>0&&(Ae.lastNeed=Le-1),Le):--je<Fe||Le===-2?0:(Le=Te(De[je]),Le>=0?(Le>0&&(Ae.lastNeed=Le-2),Le):--je<Fe||Le===-2?0:(Le=Te(De[je]),Le>=0?(Le>0&&(Le===2?Le=0:Ae.lastNeed=Le-3),Le):0))}function Pe(Ae,De,Fe){if((De[0]&192)!==128)return Ae.lastNeed=0,"\uFFFD";if(Ae.lastNeed>1&&De.length>1){if((De[1]&192)!==128)return Ae.lastNeed=1,"\uFFFD";if(Ae.lastNeed>2&&De.length>2&&(De[2]&192)!==128)return Ae.lastNeed=2,"\uFFFD"}}function de(Ae){var De=this.lastTotal-this.lastNeed,Fe=Pe(this,Ae,De);if(Fe!==void 0)return Fe;if(this.lastNeed<=Ae.length)return Ae.copy(this.lastChar,De,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);Ae.copy(this.lastChar,De,0,Ae.length),this.lastNeed-=Ae.length}function ee(Ae,De){var Fe=ve(this,Ae,De);if(!this.lastNeed)return Ae.toString("utf8",De);this.lastTotal=Fe;var je=Ae.length-(Fe-this.lastNeed);return Ae.copy(this.lastChar,0,je),Ae.toString("utf8",De,je)}function z(Ae){var De=Ae&&Ae.length?this.write(Ae):"";return this.lastNeed?De+"\uFFFD":De}function oe(Ae,De){if((Ae.length-De)%2===0){var Fe=Ae.toString("utf16le",De);if(Fe){var je=Fe.charCodeAt(Fe.length-1);if(je>=55296&&je<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=Ae[Ae.length-2],this.lastChar[1]=Ae[Ae.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=Ae[Ae.length-1],Ae.toString("utf16le",De,Ae.length-1)}function ie(Ae){var De=Ae&&Ae.length?this.write(Ae):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return De+this.lastChar.toString("utf16le",0,Fe)}return De}function le(Ae,De){var Fe=(Ae.length-De)%3;return Fe===0?Ae.toString("base64",De):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=Ae[Ae.length-1]:(this.lastChar[0]=Ae[Ae.length-2],this.lastChar[1]=Ae[Ae.length-1]),Ae.toString("base64",De,Ae.length-Fe))}function ue(Ae){var De=Ae&&Ae.length?this.write(Ae):"";return this.lastNeed?De+this.lastChar.toString("base64",0,3-this.lastNeed):De}function me(Ae){return Ae.toString(this.encoding)}function xe(Ae){return Ae&&Ae.length?this.write(Ae):""}},{"safe-buffer":396}],414:[function(ae,Ge,Re){(function(fe,pe){(function(){var be=ae("process/browser.js").nextTick,Ee=Function.prototype.apply,we=Array.prototype.slice,Te={},ve=0;Re.setTimeout=function(){return new Pe(Ee.call(setTimeout,window,arguments),clearTimeout)},Re.setInterval=function(){return new Pe(Ee.call(setInterval,window,arguments),clearInterval)},Re.clearTimeout=Re.clearInterval=function(de){de.close()};function Pe(de,ee){this._id=de,this._clearFn=ee}Pe.prototype.unref=Pe.prototype.ref=function(){},Pe.prototype.close=function(){this._clearFn.call(window,this._id)},Re.enroll=function(de,ee){clearTimeout(de._idleTimeoutId),de._idleTimeout=ee},Re.unenroll=function(de){clearTimeout(de._idleTimeoutId),de._idleTimeout=-1},Re._unrefActive=Re.active=function(de){clearTimeout(de._idleTimeoutId);var ee=de._idleTimeout;ee>=0&&(de._idleTimeoutId=setTimeout(function(){de._onTimeout&&de._onTimeout()},ee))},Re.setImmediate=typeof fe=="function"?fe:function(de){var ee=ve++,z=arguments.length<2?!1:we.call(arguments,1);return Te[ee]=!0,be(function(){Te[ee]&&(z?de.apply(null,z):de.call(null),Re.clearImmediate(ee))}),ee},Re.clearImmediate=typeof pe=="function"?pe:function(de){delete Te[de]}}).call(this)}).call(this,ae("timers").setImmediate,ae("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(ae,Ge,Re){var fe=ae("buffer").Buffer;Ge.exports=function(pe){if(pe instanceof Uint8Array){if(pe.byteOffset===0&&pe.byteLength===pe.buffer.byteLength)return pe.buffer;if(typeof pe.buffer.slice=="function")return pe.buffer.slice(pe.byteOffset,pe.byteOffset+pe.byteLength)}if(fe.isBuffer(pe)){for(var be=new Uint8Array(pe.length),Ee=pe.length,we=0;we<Ee;we++)be[we]=pe[we];return be.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(ae,Ge,Re){(function(fe){(function(){Ge.exports=pe;function pe(Ee,we){if(be("noDeprecation"))return Ee;var Te=!1;function ve(){if(!Te){if(be("throwDeprecation"))throw new Error(we);be("traceDeprecation")?console.trace(we):console.warn(we),Te=!0}return Ee.apply(this,arguments)}return ve}function be(Ee){try{if(!fe.localStorage)return!1}catch(Te){return!1}var we=fe.localStorage[Ee];return we==null?!1:String(we).toLowerCase()==="true"}}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(ae,Ge,Re){arguments[4][84][0].apply(Re,arguments)},{dup:84}],418:[function(ae,Ge,Re){"use strict";var fe=ae("is-arguments"),pe=ae("is-generator-function"),be=ae("which-typed-array"),Ee=ae("is-typed-array");function we(St){return St.call.bind(St)}var Te=typeof BigInt!="undefined",ve=typeof Symbol!="undefined",Pe=we(Object.prototype.toString),de=we(Number.prototype.valueOf),ee=we(String.prototype.valueOf),z=we(Boolean.prototype.valueOf);if(Te)var oe=we(BigInt.prototype.valueOf);if(ve)var ie=we(Symbol.prototype.valueOf);function le(St,Ct){if(typeof St!="object")return!1;try{return Ct(St),!0}catch(It){return!1}}Re.isArgumentsObject=fe,Re.isGeneratorFunction=pe,Re.isTypedArray=Ee;function ue(St){return typeof Promise!="undefined"&&St instanceof Promise||St!==null&&typeof St=="object"&&typeof St.then=="function"&&typeof St.catch=="function"}Re.isPromise=ue;function me(St){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(St):Ee(St)||ut(St)}Re.isArrayBufferView=me;function xe(St){return be(St)==="Uint8Array"}Re.isUint8Array=xe;function Ae(St){return be(St)==="Uint8ClampedArray"}Re.isUint8ClampedArray=Ae;function De(St){return be(St)==="Uint16Array"}Re.isUint16Array=De;function Fe(St){return be(St)==="Uint32Array"}Re.isUint32Array=Fe;function je(St){return be(St)==="Int8Array"}Re.isInt8Array=je;function Le(St){return be(St)==="Int16Array"}Re.isInt16Array=Le;function Be(St){return be(St)==="Int32Array"}Re.isInt32Array=Be;function Ue(St){return be(St)==="Float32Array"}Re.isFloat32Array=Ue;function Je(St){return be(St)==="Float64Array"}Re.isFloat64Array=Je;function He(St){return be(St)==="BigInt64Array"}Re.isBigInt64Array=He;function We(St){return be(St)==="BigUint64Array"}Re.isBigUint64Array=We;function at(St){return Pe(St)==="[object Map]"}at.working=typeof Map!="undefined"&&at(new Map);function ft(St){return typeof Map=="undefined"?!1:at.working?at(St):St instanceof Map}Re.isMap=ft;function mt(St){return Pe(St)==="[object Set]"}mt.working=typeof Set!="undefined"&&mt(new Set);function Lt(St){return typeof Set=="undefined"?!1:mt.working?mt(St):St instanceof Set}Re.isSet=Lt;function Xe(St){return Pe(St)==="[object WeakMap]"}Xe.working=typeof WeakMap!="undefined"&&Xe(new WeakMap);function et(St){return typeof WeakMap=="undefined"?!1:Xe.working?Xe(St):St instanceof WeakMap}Re.isWeakMap=et;function lt(St){return Pe(St)==="[object WeakSet]"}lt.working=typeof WeakSet!="undefined"&<(new WeakSet);function vt(St){return lt(St)}Re.isWeakSet=vt;function wt(St){return Pe(St)==="[object ArrayBuffer]"}wt.working=typeof ArrayBuffer!="undefined"&&wt(new ArrayBuffer);function ht(St){return typeof ArrayBuffer=="undefined"?!1:wt.working?wt(St):St instanceof ArrayBuffer}Re.isArrayBuffer=ht;function dt(St){return Pe(St)==="[object DataView]"}dt.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&dt(new DataView(new ArrayBuffer(1),0,1));function ut(St){return typeof DataView=="undefined"?!1:dt.working?dt(St):St instanceof DataView}Re.isDataView=ut;var Pt=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function yt(St){return Pe(St)==="[object SharedArrayBuffer]"}function gt(St){return typeof Pt=="undefined"?!1:(typeof yt.working=="undefined"&&(yt.working=yt(new Pt)),yt.working?yt(St):St instanceof Pt)}Re.isSharedArrayBuffer=gt;function Tt(St){return Pe(St)==="[object AsyncFunction]"}Re.isAsyncFunction=Tt;function ct(St){return Pe(St)==="[object Map Iterator]"}Re.isMapIterator=ct;function Ye(St){return Pe(St)==="[object Set Iterator]"}Re.isSetIterator=Ye;function Ze(St){return Pe(St)==="[object Generator]"}Re.isGeneratorObject=Ze;function Se(St){return Pe(St)==="[object WebAssembly.Module]"}Re.isWebAssemblyCompiledModule=Se;function Ne(St){return le(St,de)}Re.isNumberObject=Ne;function $e(St){return le(St,ee)}Re.isStringObject=$e;function nt(St){return le(St,z)}Re.isBooleanObject=nt;function Ie(St){return Te&&le(St,oe)}Re.isBigIntObject=Ie;function ze(St){return ve&&le(St,ie)}Re.isSymbolObject=ze;function Ve(St){return Ne(St)||$e(St)||nt(St)||Ie(St)||ze(St)}Re.isBoxedPrimitive=Ve;function it(St){return typeof Uint8Array!="undefined"&&(ht(St)||gt(St))}Re.isAnyArrayBuffer=it,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(St){Object.defineProperty(Re,St,{enumerable:!1,value:function(){throw new Error(St+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(ae,Ge,Re){(function(fe){(function(){var pe=Object.getOwnPropertyDescriptors||function(Pt){for(var yt=Object.keys(Pt),gt={},Tt=0;Tt<yt.length;Tt++)gt[yt[Tt]]=Object.getOwnPropertyDescriptor(Pt,yt[Tt]);return gt},be=/%[sdj%]/g;Re.format=function(ut){if(!Le(ut)){for(var Pt=[],yt=0;yt<arguments.length;yt++)Pt.push(ve(arguments[yt]));return Pt.join(" ")}for(var yt=1,gt=arguments,Tt=gt.length,ct=String(ut).replace(be,function(Ze){if(Ze==="%%")return"%";if(yt>=Tt)return Ze;switch(Ze){case"%s":return String(gt[yt++]);case"%d":return Number(gt[yt++]);case"%j":try{return JSON.stringify(gt[yt++])}catch(Se){return"[Circular]"}default:return Ze}}),Ye=gt[yt];yt<Tt;Ye=gt[++yt])De(Ye)||!He(Ye)?ct+=" "+Ye:ct+=" "+ve(Ye);return ct},Re.deprecate=function(ut,Pt){if(typeof fe!="undefined"&&fe.noDeprecation===!0)return ut;if(typeof fe=="undefined")return function(){return Re.deprecate(ut,Pt).apply(this,arguments)};var yt=!1;function gt(){if(!yt){if(fe.throwDeprecation)throw new Error(Pt);fe.traceDeprecation?console.trace(Pt):console.error(Pt),yt=!0}return ut.apply(this,arguments)}return gt};var Ee={},we=/^$/;if(fe.env.NODE_DEBUG){var Te=fe.env.NODE_DEBUG;Te=Te.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),we=new RegExp("^"+Te+"$","i")}Re.debuglog=function(ut){if(ut=ut.toUpperCase(),!Ee[ut])if(we.test(ut)){var Pt=fe.pid;Ee[ut]=function(){var yt=Re.format.apply(Re,arguments);console.error("%s %d: %s",ut,Pt,yt)}}else Ee[ut]=function(){};return Ee[ut]};function ve(ut,Pt){var yt={seen:[],stylize:de};return arguments.length>=3&&(yt.depth=arguments[2]),arguments.length>=4&&(yt.colors=arguments[3]),Ae(Pt)?yt.showHidden=Pt:Pt&&Re._extend(yt,Pt),Ue(yt.showHidden)&&(yt.showHidden=!1),Ue(yt.depth)&&(yt.depth=2),Ue(yt.colors)&&(yt.colors=!1),Ue(yt.customInspect)&&(yt.customInspect=!0),yt.colors&&(yt.stylize=Pe),z(yt,ut,yt.depth)}Re.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 Pe(ut,Pt){var yt=ve.styles[Pt];return yt?"\x1B["+ve.colors[yt][0]+"m"+ut+"\x1B["+ve.colors[yt][1]+"m":ut}function de(ut,Pt){return ut}function ee(ut){var Pt={};return ut.forEach(function(yt,gt){Pt[yt]=!0}),Pt}function z(ut,Pt,yt){if(ut.customInspect&&Pt&&ft(Pt.inspect)&&Pt.inspect!==Re.inspect&&!(Pt.constructor&&Pt.constructor.prototype===Pt)){var gt=Pt.inspect(yt,ut);return Le(gt)||(gt=z(ut,gt,yt)),gt}var Tt=oe(ut,Pt);if(Tt)return Tt;var ct=Object.keys(Pt),Ye=ee(ct);if(ut.showHidden&&(ct=Object.getOwnPropertyNames(Pt)),at(Pt)&&(ct.indexOf("message")>=0||ct.indexOf("description")>=0))return ie(Pt);if(ct.length===0){if(ft(Pt)){var Ze=Pt.name?": "+Pt.name:"";return ut.stylize("[Function"+Ze+"]","special")}if(Je(Pt))return ut.stylize(RegExp.prototype.toString.call(Pt),"regexp");if(We(Pt))return ut.stylize(Date.prototype.toString.call(Pt),"date");if(at(Pt))return ie(Pt)}var Se="",Ne=!1,$e=["{","}"];if(xe(Pt)&&(Ne=!0,$e=["[","]"]),ft(Pt)){var nt=Pt.name?": "+Pt.name:"";Se=" [Function"+nt+"]"}if(Je(Pt)&&(Se=" "+RegExp.prototype.toString.call(Pt)),We(Pt)&&(Se=" "+Date.prototype.toUTCString.call(Pt)),at(Pt)&&(Se=" "+ie(Pt)),ct.length===0&&(!Ne||Pt.length==0))return $e[0]+Se+$e[1];if(yt<0)return Je(Pt)?ut.stylize(RegExp.prototype.toString.call(Pt),"regexp"):ut.stylize("[Object]","special");ut.seen.push(Pt);var Ie;return Ne?Ie=le(ut,Pt,yt,Ye,ct):Ie=ct.map(function(ze){return ue(ut,Pt,yt,Ye,ze,Ne)}),ut.seen.pop(),me(Ie,Se,$e)}function oe(ut,Pt){if(Ue(Pt))return ut.stylize("undefined","undefined");if(Le(Pt)){var yt="'"+JSON.stringify(Pt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ut.stylize(yt,"string")}if(je(Pt))return ut.stylize(""+Pt,"number");if(Ae(Pt))return ut.stylize(""+Pt,"boolean");if(De(Pt))return ut.stylize("null","null")}function ie(ut){return"["+Error.prototype.toString.call(ut)+"]"}function le(ut,Pt,yt,gt,Tt){for(var ct=[],Ye=0,Ze=Pt.length;Ye<Ze;++Ye)vt(Pt,String(Ye))?ct.push(ue(ut,Pt,yt,gt,String(Ye),!0)):ct.push("");return Tt.forEach(function(Se){Se.match(/^\d+$/)||ct.push(ue(ut,Pt,yt,gt,Se,!0))}),ct}function ue(ut,Pt,yt,gt,Tt,ct){var Ye,Ze,Se;if(Se=Object.getOwnPropertyDescriptor(Pt,Tt)||{value:Pt[Tt]},Se.get?Se.set?Ze=ut.stylize("[Getter/Setter]","special"):Ze=ut.stylize("[Getter]","special"):Se.set&&(Ze=ut.stylize("[Setter]","special")),vt(gt,Tt)||(Ye="["+Tt+"]"),Ze||(ut.seen.indexOf(Se.value)<0?(De(yt)?Ze=z(ut,Se.value,null):Ze=z(ut,Se.value,yt-1),Ze.indexOf(`
|
|
`)>-1&&(ct?Ze=Ze.split(`
|
|
`).map(function(Ne){return" "+Ne}).join(`
|
|
`).slice(2):Ze=`
|
|
`+Ze.split(`
|
|
`).map(function(Ne){return" "+Ne}).join(`
|
|
`))):Ze=ut.stylize("[Circular]","special")),Ue(Ye)){if(ct&&Tt.match(/^\d+$/))return Ze;Ye=JSON.stringify(""+Tt),Ye.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ye=Ye.slice(1,-1),Ye=ut.stylize(Ye,"name")):(Ye=Ye.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ye=ut.stylize(Ye,"string"))}return Ye+": "+Ze}function me(ut,Pt,yt){var gt=0,Tt=ut.reduce(function(ct,Ye){return gt++,Ye.indexOf(`
|
|
`)>=0&>++,ct+Ye.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Tt>60?yt[0]+(Pt===""?"":Pt+`
|
|
`)+" "+ut.join(`,
|
|
`)+" "+yt[1]:yt[0]+Pt+" "+ut.join(", ")+" "+yt[1]}Re.types=ae("./support/types");function xe(ut){return Array.isArray(ut)}Re.isArray=xe;function Ae(ut){return typeof ut=="boolean"}Re.isBoolean=Ae;function De(ut){return ut===null}Re.isNull=De;function Fe(ut){return ut==null}Re.isNullOrUndefined=Fe;function je(ut){return typeof ut=="number"}Re.isNumber=je;function Le(ut){return typeof ut=="string"}Re.isString=Le;function Be(ut){return typeof ut=="symbol"}Re.isSymbol=Be;function Ue(ut){return ut===void 0}Re.isUndefined=Ue;function Je(ut){return He(ut)&&Lt(ut)==="[object RegExp]"}Re.isRegExp=Je,Re.types.isRegExp=Je;function He(ut){return typeof ut=="object"&&ut!==null}Re.isObject=He;function We(ut){return He(ut)&&Lt(ut)==="[object Date]"}Re.isDate=We,Re.types.isDate=We;function at(ut){return He(ut)&&(Lt(ut)==="[object Error]"||ut instanceof Error)}Re.isError=at,Re.types.isNativeError=at;function ft(ut){return typeof ut=="function"}Re.isFunction=ft;function mt(ut){return ut===null||typeof ut=="boolean"||typeof ut=="number"||typeof ut=="string"||typeof ut=="symbol"||typeof ut=="undefined"}Re.isPrimitive=mt,Re.isBuffer=ae("./support/isBuffer");function Lt(ut){return Object.prototype.toString.call(ut)}function Xe(ut){return ut<10?"0"+ut.toString(10):ut.toString(10)}var et=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function lt(){var ut=new Date,Pt=[Xe(ut.getHours()),Xe(ut.getMinutes()),Xe(ut.getSeconds())].join(":");return[ut.getDate(),et[ut.getMonth()],Pt].join(" ")}Re.log=function(){console.log("%s - %s",lt(),Re.format.apply(Re,arguments))},Re.inherits=ae("inherits"),Re._extend=function(ut,Pt){if(!Pt||!He(Pt))return ut;for(var yt=Object.keys(Pt),gt=yt.length;gt--;)ut[yt[gt]]=Pt[yt[gt]];return ut};function vt(ut,Pt){return Object.prototype.hasOwnProperty.call(ut,Pt)}var wt=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;Re.promisify=function(Pt){if(typeof Pt!="function")throw new TypeError('The "original" argument must be of type Function');if(wt&&Pt[wt]){var yt=Pt[wt];if(typeof yt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(yt,wt,{value:yt,enumerable:!1,writable:!1,configurable:!0}),yt}function yt(){for(var gt,Tt,ct=new Promise(function(Se,Ne){gt=Se,Tt=Ne}),Ye=[],Ze=0;Ze<arguments.length;Ze++)Ye.push(arguments[Ze]);Ye.push(function(Se,Ne){Se?Tt(Se):gt(Ne)});try{Pt.apply(this,Ye)}catch(Se){Tt(Se)}return ct}return Object.setPrototypeOf(yt,Object.getPrototypeOf(Pt)),wt&&Object.defineProperty(yt,wt,{value:yt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(yt,pe(Pt))},Re.promisify.custom=wt;function ht(ut,Pt){if(!ut){var yt=new Error("Promise was rejected with a falsy value");yt.reason=ut,ut=yt}return Pt(ut)}function dt(ut){if(typeof ut!="function")throw new TypeError('The "original" argument must be of type Function');function Pt(){for(var yt=[],gt=0;gt<arguments.length;gt++)yt.push(arguments[gt]);var Tt=yt.pop();if(typeof Tt!="function")throw new TypeError("The last argument must be of type Function");var ct=this,Ye=function(){return Tt.apply(ct,arguments)};ut.apply(this,yt).then(function(Ze){fe.nextTick(Ye.bind(null,null,Ze))},function(Ze){fe.nextTick(ht.bind(null,Ze,Ye))})}return Object.setPrototypeOf(Pt,Object.getPrototypeOf(ut)),Object.defineProperties(Pt,pe(ut)),Pt}Re.callbackify=dt}).call(this)}).call(this,ae("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=ae("for-each"),be=ae("available-typed-arrays"),Ee=ae("call-bind"),we=ae("call-bind/callBound"),Te=ae("gopd"),ve=we("Object.prototype.toString"),Pe=ae("has-tostringtag/shams")(),de=typeof globalThis=="undefined"?fe:globalThis,ee=be(),z=we("String.prototype.slice"),oe=Object.getPrototypeOf,ie=we("Array.prototype.indexOf",!0)||function(Ae,De){for(var Fe=0;Fe<Ae.length;Fe+=1)if(Ae[Fe]===De)return Fe;return-1},le={__proto__:null};Pe&&Te&&oe?pe(ee,function(xe){var Ae=new de[xe];if(Symbol.toStringTag in Ae){var De=oe(Ae),Fe=Te(De,Symbol.toStringTag);if(!Fe){var je=oe(De);Fe=Te(je,Symbol.toStringTag)}le["$"+xe]=Ee(Fe.get)}}):pe(ee,function(xe){var Ae=new de[xe];le["$"+xe]=Ee(Ae.slice)});var ue=function(Ae){var De=!1;return pe(le,function(Fe,je){if(!De)try{"$"+Fe(Ae)===je&&(De=z(je,1))}catch(Le){}}),De},me=function(Ae){var De=!1;return pe(le,function(Fe,je){if(!De)try{Fe(Ae),De=z(je,1)}catch(Le){}}),De};Ge.exports=function(Ae){if(!Ae||typeof Ae!="object")return!1;if(!Pe){var De=z(ve(Ae),8,-1);return ie(ee,De)>-1?De:De!=="Object"?!1:me(Ae)}return Te?ue(Ae):null}}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(ae,Ge,Re){(function(){"use strict";Re.stripBOM=function(fe){return fe[0]==="\uFEFF"?fe.substring(1):fe}}).call(this)},{}],422:[function(ae,Ge,Re){(function(){"use strict";var fe,pe,be,Ee,we,Te={}.hasOwnProperty;fe=ae("xmlbuilder"),pe=ae("./defaults").defaults,Ee=function(ve){return typeof ve=="string"&&(ve.indexOf("&")>=0||ve.indexOf(">")>=0||ve.indexOf("<")>=0)},we=function(ve){return"<![CDATA["+be(ve)+"]]>"},be=function(ve){return ve.replace("]]>","]]]]><![CDATA[>")},Re.Builder=function(){function ve(Pe){var de,ee,z;this.options={},ee=pe["0.2"];for(de in ee)Te.call(ee,de)&&(z=ee[de],this.options[de]=z);for(de in Pe)Te.call(Pe,de)&&(z=Pe[de],this.options[de]=z)}return ve.prototype.buildObject=function(Pe){var de,ee,z,oe,ie;return de=this.options.attrkey,ee=this.options.charkey,Object.keys(Pe).length===1&&this.options.rootName===pe["0.2"].rootName?(ie=Object.keys(Pe)[0],Pe=Pe[ie]):ie=this.options.rootName,z=function(le){return function(ue,me){var xe,Ae,De,Fe,je,Le;if(typeof me!="object")le.options.cdata&&Ee(me)?ue.raw(we(me)):ue.txt(me);else if(Array.isArray(me)){for(Fe in me)if(Te.call(me,Fe)){Ae=me[Fe];for(je in Ae)De=Ae[je],ue=z(ue.ele(je),De).up()}}else for(je in me)if(Te.call(me,je))if(Ae=me[je],je===de){if(typeof Ae=="object")for(xe in Ae)Le=Ae[xe],ue=ue.att(xe,Le)}else if(je===ee)le.options.cdata&&Ee(Ae)?ue=ue.raw(we(Ae)):ue=ue.txt(Ae);else if(Array.isArray(Ae))for(Fe in Ae)Te.call(Ae,Fe)&&(De=Ae[Fe],typeof De=="string"?le.options.cdata&&Ee(De)?ue=ue.ele(je).raw(we(De)).up():ue=ue.ele(je,De).up():ue=z(ue.ele(je),De).up());else typeof Ae=="object"?ue=z(ue.ele(je),Ae).up():typeof Ae=="string"&&le.options.cdata&&Ee(Ae)?ue=ue.ele(je).raw(we(Ae)).up():(Ae==null&&(Ae=""),ue=ue.ele(je,Ae.toString()).up());return ue}}(this),oe=fe.create(ie,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),z(oe,Pe).end(this.options.renderOpts)},ve}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(ae,Ge,Re){(function(){Re.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(ae,Ge,Re){(function(){"use strict";var fe,pe,be,Ee,we,Te,ve,Pe,de,ee=function(ie,le){return function(){return ie.apply(le,arguments)}},z=function(ie,le){for(var ue in le)oe.call(le,ue)&&(ie[ue]=le[ue]);function me(){this.constructor=ie}return me.prototype=le.prototype,ie.prototype=new me,ie.__super__=le.prototype,ie},oe={}.hasOwnProperty;Pe=ae("sax"),Ee=ae("events"),fe=ae("./bom"),ve=ae("./processors"),de=ae("timers").setImmediate,pe=ae("./defaults").defaults,we=function(ie){return typeof ie=="object"&&ie!=null&&Object.keys(ie).length===0},Te=function(ie,le,ue){var me,xe,Ae;for(me=0,xe=ie.length;me<xe;me++)Ae=ie[me],le=Ae(le,ue);return le},be=function(ie,le,ue){var me;return me=Object.create(null),me.value=ue,me.writable=!0,me.enumerable=!0,me.configurable=!0,Object.defineProperty(ie,le,me)},Re.Parser=function(ie){z(le,ie);function le(ue){this.parseStringPromise=ee(this.parseStringPromise,this),this.parseString=ee(this.parseString,this),this.reset=ee(this.reset,this),this.assignOrPush=ee(this.assignOrPush,this),this.processAsync=ee(this.processAsync,this);var me,xe,Ae;if(!(this instanceof Re.Parser))return new Re.Parser(ue);this.options={},xe=pe["0.2"];for(me in xe)oe.call(xe,me)&&(Ae=xe[me],this.options[me]=Ae);for(me in ue)oe.call(ue,me)&&(Ae=ue[me],this.options[me]=Ae);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,me;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(xe){if(me=xe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(me)}},le.prototype.assignOrPush=function(ue,me,xe){return me in ue?(ue[me]instanceof Array||be(ue,me,[ue[me]]),ue[me].push(xe)):this.options.explicitArray?be(ue,me,[xe]):be(ue,me,xe)},le.prototype.reset=function(){var ue,me,xe,Ae;return this.removeAllListeners(),this.saxParser=Pe.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(De){return function(Fe){if(De.saxParser.resume(),!De.saxParser.errThrown)return De.saxParser.errThrown=!0,De.emit("error",Fe)}}(this),this.saxParser.onend=function(De){return function(){if(!De.saxParser.ended)return De.saxParser.ended=!0,De.emit("end",De.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,Ae=[],ue=this.options.attrkey,me=this.options.charkey,this.saxParser.onopentag=function(De){return function(Fe){var je,Le,Be,Ue,Je;if(Be={},Be[me]="",!De.options.ignoreAttrs){Je=Fe.attributes;for(je in Je)oe.call(Je,je)&&(!(ue in Be)&&!De.options.mergeAttrs&&(Be[ue]={}),Le=De.options.attrValueProcessors?Te(De.options.attrValueProcessors,Fe.attributes[je],je):Fe.attributes[je],Ue=De.options.attrNameProcessors?Te(De.options.attrNameProcessors,je):je,De.options.mergeAttrs?De.assignOrPush(Be,Ue,Le):be(Be[ue],Ue,Le))}return Be["#name"]=De.options.tagNameProcessors?Te(De.options.tagNameProcessors,Fe.name):Fe.name,De.options.xmlns&&(Be[De.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),Ae.push(Be)}}(this),this.saxParser.onclosetag=function(De){return function(){var Fe,je,Le,Be,Ue,Je,He,We,at,ft;if(Je=Ae.pop(),Ue=Je["#name"],(!De.options.explicitChildren||!De.options.preserveChildrenOrder)&&delete Je["#name"],Je.cdata===!0&&(Fe=Je.cdata,delete Je.cdata),at=Ae[Ae.length-1],Je[me].match(/^\s*$/)&&!Fe?(je=Je[me],delete Je[me]):(De.options.trim&&(Je[me]=Je[me].trim()),De.options.normalize&&(Je[me]=Je[me].replace(/\s{2,}/g," ").trim()),Je[me]=De.options.valueProcessors?Te(De.options.valueProcessors,Je[me],Ue):Je[me],Object.keys(Je).length===1&&me in Je&&!De.EXPLICIT_CHARKEY&&(Je=Je[me])),we(Je)&&(typeof De.options.emptyTag=="function"?Je=De.options.emptyTag():Je=De.options.emptyTag!==""?De.options.emptyTag:je),De.options.validator!=null&&(ft="/"+function(){var mt,Lt,Xe;for(Xe=[],mt=0,Lt=Ae.length;mt<Lt;mt++)Be=Ae[mt],Xe.push(Be["#name"]);return Xe}().concat(Ue).join("/"),function(){var mt;try{return Je=De.options.validator(ft,at&&at[Ue],Je)}catch(Lt){return mt=Lt,De.emit("error",mt)}}()),De.options.explicitChildren&&!De.options.mergeAttrs&&typeof Je=="object"){if(!De.options.preserveChildrenOrder)Be={},De.options.attrkey in Je&&(Be[De.options.attrkey]=Je[De.options.attrkey],delete Je[De.options.attrkey]),!De.options.charsAsChildren&&De.options.charkey in Je&&(Be[De.options.charkey]=Je[De.options.charkey],delete Je[De.options.charkey]),Object.getOwnPropertyNames(Je).length>0&&(Be[De.options.childkey]=Je),Je=Be;else if(at){at[De.options.childkey]=at[De.options.childkey]||[],He={};for(Le in Je)oe.call(Je,Le)&&be(He,Le,Je[Le]);at[De.options.childkey].push(He),delete Je["#name"],Object.keys(Je).length===1&&me in Je&&!De.EXPLICIT_CHARKEY&&(Je=Je[me])}}return Ae.length>0?De.assignOrPush(at,Ue,Je):(De.options.explicitRoot&&(We=Je,Je={},be(Je,Ue,We)),De.resultObject=Je,De.saxParser.ended=!0,De.emit("end",De.resultObject))}}(this),xe=function(De){return function(Fe){var je,Le;if(Le=Ae[Ae.length-1],Le)return Le[me]+=Fe,De.options.explicitChildren&&De.options.preserveChildrenOrder&&De.options.charsAsChildren&&(De.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Le[De.options.childkey]=Le[De.options.childkey]||[],je={"#name":"__text__"},je[me]=Fe,De.options.normalize&&(je[me]=je[me].replace(/\s{2,}/g," ").trim()),Le[De.options.childkey].push(je)),Le}}(this),this.saxParser.ontext=xe,this.saxParser.oncdata=function(De){return function(Fe){var je;if(je=xe(Fe),je)return je.cdata=!0}}(this)},le.prototype.parseString=function(ue,me){var xe;me!=null&&typeof me=="function"&&(this.on("end",function(Ae){return this.reset(),me(null,Ae)}),this.on("error",function(Ae){return this.reset(),me(Ae)}));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(Ae){if(xe=Ae,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw xe}else return this.emit("error",xe),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(ue){return new Promise(function(me){return function(xe,Ae){return me.parseString(ue,function(De,Fe){return De?Ae(De):xe(Fe)})}}(this))},le}(Ee),Re.parseString=function(ie,le,ue){var me,xe,Ae;return ue!=null?(typeof ue=="function"&&(me=ue),typeof le=="object"&&(xe=le)):(typeof le=="function"&&(me=le),xe={}),Ae=new Re.Parser(xe),Ae.parseString(ie,me)},Re.parseStringPromise=function(ie,le){var ue,me;return typeof le=="object"&&(ue=le),me=new Re.Parser(ue),me.parseStringPromise(ie)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(ae,Ge,Re){(function(){"use strict";var fe;fe=new RegExp(/(?!xmlns)^.*:/),Re.normalize=function(pe){return pe.toLowerCase()},Re.firstCharLowerCase=function(pe){return pe.charAt(0).toLowerCase()+pe.slice(1)},Re.stripPrefix=function(pe){return pe.replace(fe,"")},Re.parseNumbers=function(pe){return isNaN(pe)||(pe=pe%1===0?parseInt(pe,10):parseFloat(pe)),pe},Re.parseBooleans=function(pe){return/^(?:true|false)$/i.test(pe)&&(pe=pe.toLowerCase()==="true"),pe}}).call(this)},{}],426:[function(ae,Ge,Re){(function(){"use strict";var fe,pe,be,Ee,we=function(ve,Pe){for(var de in Pe)Te.call(Pe,de)&&(ve[de]=Pe[de]);function ee(){this.constructor=ve}return ee.prototype=Pe.prototype,ve.prototype=new ee,ve.__super__=Pe.prototype,ve},Te={}.hasOwnProperty;pe=ae("./defaults"),fe=ae("./builder"),be=ae("./parser"),Ee=ae("./processors"),Re.defaults=pe.defaults,Re.processors=Ee,Re.ValidationError=function(ve){we(Pe,ve);function Pe(de){this.message=de}return Pe}(Error),Re.Builder=fe.Builder,Re.Parser=be.Parser,Re.parseString=be.parseString,Re.parseStringPromise=be.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(ae,Ge,Re){(function(){Ge.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(ae,Ge,Re){(function(){Ge.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we,Te,ve,Pe=[].slice,de={}.hasOwnProperty;fe=function(){var ee,z,oe,ie,le,ue;if(ue=arguments[0],le=2<=arguments.length?Pe.call(arguments,1):[],we(Object.assign))Object.assign.apply(null,arguments);else for(ee=0,oe=le.length;ee<oe;ee++)if(ie=le[ee],ie!=null)for(z in ie)de.call(ie,z)&&(ue[z]=ie[z]);return ue},we=function(ee){return!!ee&&Object.prototype.toString.call(ee)==="[object Function]"},Te=function(ee){var z;return!!ee&&((z=typeof ee)=="function"||z==="object")},be=function(ee){return we(Array.isArray)?Array.isArray(ee):Object.prototype.toString.call(ee)==="[object Array]"},Ee=function(ee){var z;if(be(ee))return!ee.length;for(z in ee)if(de.call(ee,z))return!1;return!0},ve=function(ee){var z,oe;return Te(ee)&&(oe=Object.getPrototypeOf(ee))&&(z=oe.constructor)&&typeof z=="function"&&z instanceof z&&Function.prototype.toString.call(z)===Function.prototype.toString.call(Object)},pe=function(ee){return we(ee.valueOf)?ee.valueOf():ee},Ge.exports.assign=fe,Ge.exports.isFunction=we,Ge.exports.isObject=Te,Ge.exports.isArray=be,Ge.exports.isEmpty=Ee,Ge.exports.isPlainObject=ve,Ge.exports.getValue=pe}).call(this)},{}],430:[function(ae,Ge,Re){(function(){Ge.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(ae,Ge,Re){(function(){var fe,pe,be;fe=ae("./NodeType"),be=ae("./XMLNode"),Ge.exports=pe=function(){function Ee(we,Te,ve){if(this.parent=we,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Te==null)throw new Error("Missing attribute name. "+this.debugInfo(Te));this.name=this.stringify.name(Te),this.value=this.stringify.attValue(ve),this.type=fe.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(Ee.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ee.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(Ee.prototype,"textContent",{get:function(){return this.value},set:function(we){return this.value=we||""}}),Object.defineProperty(Ee.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(Ee.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(Ee.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(Ee.prototype,"specified",{get:function(){return!0}}),Ee.prototype.clone=function(){return Object.create(this)},Ee.prototype.toString=function(we){return this.options.writer.attribute(this,this.options.writer.filterOptions(we))},Ee.prototype.debugInfo=function(we){return we=we||this.name,we==null?"parent: <"+this.parent.name+">":"attribute: {"+we+"}, parent: <"+this.parent.name+">"},Ee.prototype.isEqualNode=function(we){return!(we.namespaceURI!==this.namespaceURI||we.prefix!==this.prefix||we.localName!==this.localName||we.value!==this.value)},Ee}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;fe=ae("./NodeType"),be=ae("./XMLCharacterData"),Ge.exports=pe=function(Te){Ee(ve,Te);function ve(Pe,de){if(ve.__super__.constructor.call(this,Pe),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(Pe){return this.options.writer.cdata(this,this.options.writer.filterOptions(Pe))},ve}(be)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(ae,Ge,Re){(function(){var fe,pe,be=function(we,Te){for(var ve in Te)Ee.call(Te,ve)&&(we[ve]=Te[ve]);function Pe(){this.constructor=we}return Pe.prototype=Te.prototype,we.prototype=new Pe,we.__super__=Te.prototype,we},Ee={}.hasOwnProperty;pe=ae("./XMLNode"),Ge.exports=fe=function(we){be(Te,we);function Te(ve){Te.__super__.constructor.call(this,ve),this.value=""}return Object.defineProperty(Te.prototype,"data",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Object.defineProperty(Te.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Te.prototype,"textContent",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Te.prototype.clone=function(){return Object.create(this)},Te.prototype.substringData=function(ve,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.appendData=function(ve){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.insertData=function(ve,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.deleteData=function(ve,Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.replaceData=function(ve,Pe,de){throw new Error("This DOM method is not implemented."+this.debugInfo())},Te.prototype.isEqualNode=function(ve){return!(!Te.__super__.isEqualNode.apply(this,arguments).isEqualNode(ve)||ve.data!==this.data)},Te}(pe)}).call(this)},{"./XMLNode":450}],434:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;fe=ae("./NodeType"),pe=ae("./XMLCharacterData"),Ge.exports=be=function(Te){Ee(ve,Te);function ve(Pe,de){if(ve.__super__.constructor.call(this,Pe),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(Pe){return this.options.writer.comment(this,this.options.writer.filterOptions(Pe))},ve}(pe)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(ae,Ge,Re){(function(){var fe,pe,be;pe=ae("./XMLDOMErrorHandler"),be=ae("./XMLDOMStringList"),Ge.exports=fe=function(){function Ee(){var we;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new pe,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=we=Object.create(this.defaultParams)}return Object.defineProperty(Ee.prototype,"parameterNames",{get:function(){return new be(Object.keys(this.defaultParams))}}),Ee.prototype.getParameter=function(we){return this.params.hasOwnProperty(we)?this.params[we]:null},Ee.prototype.canSetParameter=function(we,Te){return!0},Ee.prototype.setParameter=function(we,Te){return Te!=null?this.params[we]=Te:delete this.params[we]},Ee}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(ae,Ge,Re){(function(){var fe;Ge.exports=fe=function(){function pe(){}return pe.prototype.handleError=function(be){throw new Error(be)},pe}()}).call(this)},{}],437:[function(ae,Ge,Re){(function(){var fe;Ge.exports=fe=function(){function pe(){}return pe.prototype.hasFeature=function(be,Ee){return!0},pe.prototype.createDocumentType=function(be,Ee,we){throw new Error("This DOM method is not implemented.")},pe.prototype.createDocument=function(be,Ee,we){throw new Error("This DOM method is not implemented.")},pe.prototype.createHTMLDocument=function(be){throw new Error("This DOM method is not implemented.")},pe.prototype.getFeature=function(be,Ee){throw new Error("This DOM method is not implemented.")},pe}()}).call(this)},{}],438:[function(ae,Ge,Re){(function(){var fe;Ge.exports=fe=function(){function pe(be){this.arr=be||[]}return Object.defineProperty(pe.prototype,"length",{get:function(){return this.arr.length}}),pe.prototype.item=function(be){return this.arr[be]||null},pe.prototype.contains=function(be){return this.arr.indexOf(be)!==-1},pe}()}).call(this)},{}],439:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;be=ae("./XMLNode"),fe=ae("./NodeType"),Ge.exports=pe=function(Te){Ee(ve,Te);function ve(Pe,de,ee,z,oe,ie){if(ve.__super__.constructor.call(this,Pe),de==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(ee==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(de));if(!z)throw new Error("Missing DTD attribute type. "+this.debugInfo(de));if(!oe)throw new Error("Missing DTD attribute default. "+this.debugInfo(de));if(oe.indexOf("#")!==0&&(oe="#"+oe),!oe.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(de));if(ie&&!oe.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(ee),this.attributeType=this.stringify.dtdAttType(z),ie&&(this.defaultValue=this.stringify.dtdAttDefault(ie)),this.defaultValueType=oe}return ve.prototype.toString=function(Pe){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(Pe))},ve}(be)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;be=ae("./XMLNode"),fe=ae("./NodeType"),Ge.exports=pe=function(Te){Ee(ve,Te);function ve(Pe,de,ee){if(ve.__super__.constructor.call(this,Pe),de==null)throw new Error("Missing DTD element name. "+this.debugInfo());ee||(ee="(#PCDATA)"),Array.isArray(ee)&&(ee="("+ee.join(",")+")"),this.name=this.stringify.name(de),this.type=fe.ElementDeclaration,this.value=this.stringify.dtdElementValue(ee)}return ve.prototype.toString=function(Pe){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(Pe))},ve}(be)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we=function(ve,Pe){for(var de in Pe)Te.call(Pe,de)&&(ve[de]=Pe[de]);function ee(){this.constructor=ve}return ee.prototype=Pe.prototype,ve.prototype=new ee,ve.__super__=Pe.prototype,ve},Te={}.hasOwnProperty;Ee=ae("./Utility").isObject,be=ae("./XMLNode"),fe=ae("./NodeType"),Ge.exports=pe=function(ve){we(Pe,ve);function Pe(de,ee,z,oe){if(Pe.__super__.constructor.call(this,de),z==null)throw new Error("Missing DTD entity name. "+this.debugInfo(z));if(oe==null)throw new Error("Missing DTD entity value. "+this.debugInfo(z));if(this.pe=!!ee,this.name=this.stringify.name(z),this.type=fe.EntityDeclaration,!Ee(oe))this.value=this.stringify.dtdEntityValue(oe),this.internal=!0;else{if(!oe.pubID&&!oe.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(z));if(oe.pubID&&!oe.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(z));if(this.internal=!1,oe.pubID!=null&&(this.pubID=this.stringify.dtdPubID(oe.pubID)),oe.sysID!=null&&(this.sysID=this.stringify.dtdSysID(oe.sysID)),oe.nData!=null&&(this.nData=this.stringify.dtdNData(oe.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(z))}}return Object.defineProperty(Pe.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(Pe.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(Pe.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(Pe.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(Pe.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(Pe.prototype,"xmlVersion",{get:function(){return null}}),Pe.prototype.toString=function(de){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(de))},Pe}(be)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;be=ae("./XMLNode"),fe=ae("./NodeType"),Ge.exports=pe=function(Te){Ee(ve,Te);function ve(Pe,de,ee){if(ve.__super__.constructor.call(this,Pe),de==null)throw new Error("Missing DTD notation name. "+this.debugInfo(de));if(!ee.pubID&&!ee.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,ee.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ee.pubID)),ee.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ee.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(Pe){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(Pe))},ve}(be)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we=function(ve,Pe){for(var de in Pe)Te.call(Pe,de)&&(ve[de]=Pe[de]);function ee(){this.constructor=ve}return ee.prototype=Pe.prototype,ve.prototype=new ee,ve.__super__=Pe.prototype,ve},Te={}.hasOwnProperty;Ee=ae("./Utility").isObject,be=ae("./XMLNode"),fe=ae("./NodeType"),Ge.exports=pe=function(ve){we(Pe,ve);function Pe(de,ee,z,oe){var ie;Pe.__super__.constructor.call(this,de),Ee(ee)&&(ie=ee,ee=ie.version,z=ie.encoding,oe=ie.standalone),ee||(ee="1.0"),this.type=fe.Declaration,this.version=this.stringify.xmlVersion(ee),z!=null&&(this.encoding=this.stringify.xmlEncoding(z)),oe!=null&&(this.standalone=this.stringify.xmlStandalone(oe))}return Pe.prototype.toString=function(de){return this.options.writer.declaration(this,this.options.writer.filterOptions(de))},Pe}(be)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we,Te,ve,Pe,de,ee=function(oe,ie){for(var le in ie)z.call(ie,le)&&(oe[le]=ie[le]);function ue(){this.constructor=oe}return ue.prototype=ie.prototype,oe.prototype=new ue,oe.__super__=ie.prototype,oe},z={}.hasOwnProperty;de=ae("./Utility").isObject,Pe=ae("./XMLNode"),fe=ae("./NodeType"),pe=ae("./XMLDTDAttList"),Ee=ae("./XMLDTDEntity"),be=ae("./XMLDTDElement"),we=ae("./XMLDTDNotation"),ve=ae("./XMLNamedNodeMap"),Ge.exports=Te=function(oe){ee(ie,oe);function ie(le,ue,me){var xe,Ae,De,Fe,je,Le;if(ie.__super__.constructor.call(this,le),this.type=fe.DocType,le.children){for(Fe=le.children,Ae=0,De=Fe.length;Ae<De;Ae++)if(xe=Fe[Ae],xe.type===fe.Element){this.name=xe.name;break}}this.documentObject=le,de(ue)&&(je=ue,ue=je.pubID,me=je.sysID),me==null&&(Le=[ue,me],me=Le[0],ue=Le[1]),ue!=null&&(this.pubID=this.stringify.dtdPubID(ue)),me!=null&&(this.sysID=this.stringify.dtdSysID(me))}return Object.defineProperty(ie.prototype,"entities",{get:function(){var le,ue,me,xe,Ae;for(xe={},Ae=this.children,ue=0,me=Ae.length;ue<me;ue++)le=Ae[ue],le.type===fe.EntityDeclaration&&!le.pe&&(xe[le.name]=le);return new ve(xe)}}),Object.defineProperty(ie.prototype,"notations",{get:function(){var le,ue,me,xe,Ae;for(xe={},Ae=this.children,ue=0,me=Ae.length;ue<me;ue++)le=Ae[ue],le.type===fe.NotationDeclaration&&(xe[le.name]=le);return new ve(xe)}}),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 me;return me=new be(this,le,ue),this.children.push(me),this},ie.prototype.attList=function(le,ue,me,xe,Ae){var De;return De=new pe(this,le,ue,me,xe,Ae),this.children.push(De),this},ie.prototype.entity=function(le,ue){var me;return me=new Ee(this,!1,le,ue),this.children.push(me),this},ie.prototype.pEntity=function(le,ue){var me;return me=new Ee(this,!0,le,ue),this.children.push(me),this},ie.prototype.notation=function(le,ue){var me;return me=new we(this,le,ue),this.children.push(me),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,me,xe,Ae){return this.attList(le,ue,me,xe,Ae)},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}(Pe)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we,Te,ve,Pe,de=function(z,oe){for(var ie in oe)ee.call(oe,ie)&&(z[ie]=oe[ie]);function le(){this.constructor=z}return le.prototype=oe.prototype,z.prototype=new le,z.__super__=oe.prototype,z},ee={}.hasOwnProperty;Pe=ae("./Utility").isPlainObject,be=ae("./XMLDOMImplementation"),pe=ae("./XMLDOMConfiguration"),we=ae("./XMLNode"),fe=ae("./NodeType"),ve=ae("./XMLStringifier"),Te=ae("./XMLStringWriter"),Ge.exports=Ee=function(z){de(oe,z);function oe(ie){oe.__super__.constructor.call(this,null),this.name="#document",this.type=fe.Document,this.documentURI=null,this.domConfig=new pe,ie||(ie={}),ie.writer||(ie.writer=new Te),this.options=ie,this.stringify=new ve(ie)}return Object.defineProperty(oe.prototype,"implementation",{value:new be}),Object.defineProperty(oe.prototype,"doctype",{get:function(){var ie,le,ue,me;for(me=this.children,le=0,ue=me.length;le<ue;le++)if(ie=me[le],ie.type===fe.DocType)return ie;return null}}),Object.defineProperty(oe.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(oe.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(oe.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(oe.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].encoding:null}}),Object.defineProperty(oe.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(oe.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(oe.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(oe.prototype,"origin",{get:function(){return null}}),Object.defineProperty(oe.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(oe.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(oe.prototype,"contentType",{get:function(){return null}}),oe.prototype.end=function(ie){var le;return le={},ie?Pe(ie)&&(le=ie,ie=this.options.writer):ie=this.options.writer,ie.document(this,ie.filterOptions(le))},oe.prototype.toString=function(ie){return this.options.writer.document(this,this.options.writer.filterOptions(ie))},oe.prototype.createElement=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createTextNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createComment=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createCDATASection=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createProcessingInstruction=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createAttribute=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createEntityReference=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.getElementsByTagName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.importNode=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createElementNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createAttributeNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.getElementsByTagNameNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.getElementById=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.adoptNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.renameNode=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.getElementsByClassName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createEvent=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createNodeIterator=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe.prototype.createTreeWalker=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},oe}(we)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we,Te,ve,Pe,de,ee,z,oe,ie,le,ue,me,xe,Ae,De,Fe,je,Le,Be,Ue,Je={}.hasOwnProperty;Ue=ae("./Utility"),Le=Ue.isObject,je=Ue.isFunction,Be=Ue.isPlainObject,Fe=Ue.getValue,fe=ae("./NodeType"),oe=ae("./XMLDocument"),le=ae("./XMLElement"),Ee=ae("./XMLCData"),we=ae("./XMLComment"),me=ae("./XMLRaw"),De=ae("./XMLText"),ue=ae("./XMLProcessingInstruction"),ee=ae("./XMLDeclaration"),z=ae("./XMLDocType"),Te=ae("./XMLDTDAttList"),Pe=ae("./XMLDTDEntity"),ve=ae("./XMLDTDElement"),de=ae("./XMLDTDNotation"),be=ae("./XMLAttribute"),Ae=ae("./XMLStringifier"),xe=ae("./XMLStringWriter"),pe=ae("./WriterState"),Ge.exports=ie=function(){function He(We,at,ft){var mt;this.name="?xml",this.type=fe.Document,We||(We={}),mt={},We.writer?Be(We.writer)&&(mt=We.writer,We.writer=new xe):We.writer=new xe,this.options=We,this.writer=We.writer,this.writerOptions=this.writer.filterOptions(mt),this.stringify=new Ae(We),this.onDataCallback=at||function(){},this.onEndCallback=ft||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return He.prototype.createChildNode=function(We){var at,ft,mt,Lt,Xe,et,lt,vt;switch(We.type){case fe.CData:this.cdata(We.value);break;case fe.Comment:this.comment(We.value);break;case fe.Element:mt={},lt=We.attribs;for(ft in lt)Je.call(lt,ft)&&(at=lt[ft],mt[ft]=at.value);this.node(We.name,mt);break;case fe.Dummy:this.dummy();break;case fe.Raw:this.raw(We.value);break;case fe.Text:this.text(We.value);break;case fe.ProcessingInstruction:this.instruction(We.target,We.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+We.constructor.name)}for(vt=We.children,Xe=0,et=vt.length;Xe<et;Xe++)Lt=vt[Xe],this.createChildNode(Lt),Lt.type===fe.Element&&this.up();return this},He.prototype.dummy=function(){return this},He.prototype.node=function(We,at,ft){var mt;if(We==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(We));return this.openCurrent(),We=Fe(We),at==null&&(at={}),at=Fe(at),Le(at)||(mt=[at,ft],ft=mt[0],at=mt[1]),this.currentNode=new le(this,We,at),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,ft!=null&&this.text(ft),this},He.prototype.element=function(We,at,ft){var mt,Lt,Xe,et,lt,vt;if(this.currentNode&&this.currentNode.type===fe.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(We)||Le(We)||je(We))for(et=this.options.noValidation,this.options.noValidation=!0,vt=new oe(this.options).element("TEMP_ROOT"),vt.element(We),this.options.noValidation=et,lt=vt.children,Lt=0,Xe=lt.length;Lt<Xe;Lt++)mt=lt[Lt],this.createChildNode(mt),mt.type===fe.Element&&this.up();else this.node(We,at,ft);return this},He.prototype.attribute=function(We,at){var ft,mt;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(We));if(We!=null&&(We=Fe(We)),Le(We))for(ft in We)Je.call(We,ft)&&(mt=We[ft],this.attribute(ft,mt));else je(at)&&(at=at.apply()),this.options.keepNullAttributes&&at==null?this.currentNode.attribs[We]=new be(this,We,""):at!=null&&(this.currentNode.attribs[We]=new be(this,We,at));return this},He.prototype.text=function(We){var at;return this.openCurrent(),at=new De(this,We),this.onData(this.writer.text(at,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.cdata=function(We){var at;return this.openCurrent(),at=new Ee(this,We),this.onData(this.writer.cdata(at,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.comment=function(We){var at;return this.openCurrent(),at=new we(this,We),this.onData(this.writer.comment(at,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.raw=function(We){var at;return this.openCurrent(),at=new me(this,We),this.onData(this.writer.raw(at,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.instruction=function(We,at){var ft,mt,Lt,Xe,et;if(this.openCurrent(),We!=null&&(We=Fe(We)),at!=null&&(at=Fe(at)),Array.isArray(We))for(ft=0,Xe=We.length;ft<Xe;ft++)mt=We[ft],this.instruction(mt);else if(Le(We))for(mt in We)Je.call(We,mt)&&(Lt=We[mt],this.instruction(mt,Lt));else je(at)&&(at=at.apply()),et=new ue(this,We,at),this.onData(this.writer.processingInstruction(et,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},He.prototype.declaration=function(We,at,ft){var mt;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return mt=new ee(this,We,at,ft),this.onData(this.writer.declaration(mt,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.doctype=function(We,at,ft){if(this.openCurrent(),We==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 z(this,at,ft),this.currentNode.rootNodeName=We,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},He.prototype.dtdElement=function(We,at){var ft;return this.openCurrent(),ft=new ve(this,We,at),this.onData(this.writer.dtdElement(ft,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.attList=function(We,at,ft,mt,Lt){var Xe;return this.openCurrent(),Xe=new Te(this,We,at,ft,mt,Lt),this.onData(this.writer.dtdAttList(Xe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.entity=function(We,at){var ft;return this.openCurrent(),ft=new Pe(this,!1,We,at),this.onData(this.writer.dtdEntity(ft,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.pEntity=function(We,at){var ft;return this.openCurrent(),ft=new Pe(this,!0,We,at),this.onData(this.writer.dtdEntity(ft,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.prototype.notation=function(We,at){var ft;return this.openCurrent(),ft=new de(this,We,at),this.onData(this.writer.dtdNotation(ft,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},He.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},He.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},He.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},He.prototype.openNode=function(We){var at,ft,mt,Lt;if(!We.isOpen){if(!this.root&&this.currentLevel===0&&We.type===fe.Element&&(this.root=We),ft="",We.type===fe.Element){this.writerOptions.state=pe.OpenTag,ft=this.writer.indent(We,this.writerOptions,this.currentLevel)+"<"+We.name,Lt=We.attribs;for(mt in Lt)Je.call(Lt,mt)&&(at=Lt[mt],ft+=this.writer.attribute(at,this.writerOptions,this.currentLevel));ft+=(We.children?">":"/>")+this.writer.endline(We,this.writerOptions,this.currentLevel),this.writerOptions.state=pe.InsideTag}else this.writerOptions.state=pe.OpenTag,ft=this.writer.indent(We,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+We.rootNodeName,We.pubID&&We.sysID?ft+=' PUBLIC "'+We.pubID+'" "'+We.sysID+'"':We.sysID&&(ft+=' SYSTEM "'+We.sysID+'"'),We.children?(ft+=" [",this.writerOptions.state=pe.InsideTag):(this.writerOptions.state=pe.CloseTag,ft+=">"),ft+=this.writer.endline(We,this.writerOptions,this.currentLevel);return this.onData(ft,this.currentLevel),We.isOpen=!0}},He.prototype.closeNode=function(We){var at;if(!We.isClosed)return at="",this.writerOptions.state=pe.CloseTag,We.type===fe.Element?at=this.writer.indent(We,this.writerOptions,this.currentLevel)+"</"+We.name+">"+this.writer.endline(We,this.writerOptions,this.currentLevel):at=this.writer.indent(We,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(We,this.writerOptions,this.currentLevel),this.writerOptions.state=pe.None,this.onData(at,this.currentLevel),We.isClosed=!0},He.prototype.onData=function(We,at){return this.documentStarted=!0,this.onDataCallback(We,at+1)},He.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},He.prototype.debugInfo=function(We){return We==null?"":"node: <"+We+">"},He.prototype.ele=function(){return this.element.apply(this,arguments)},He.prototype.nod=function(We,at,ft){return this.node(We,at,ft)},He.prototype.txt=function(We){return this.text(We)},He.prototype.dat=function(We){return this.cdata(We)},He.prototype.com=function(We){return this.comment(We)},He.prototype.ins=function(We,at){return this.instruction(We,at)},He.prototype.dec=function(We,at,ft){return this.declaration(We,at,ft)},He.prototype.dtd=function(We,at,ft){return this.doctype(We,at,ft)},He.prototype.e=function(We,at,ft){return this.element(We,at,ft)},He.prototype.n=function(We,at,ft){return this.node(We,at,ft)},He.prototype.t=function(We){return this.text(We)},He.prototype.d=function(We){return this.cdata(We)},He.prototype.c=function(We){return this.comment(We)},He.prototype.r=function(We){return this.raw(We)},He.prototype.i=function(We,at){return this.instruction(We,at)},He.prototype.att=function(){return this.currentNode&&this.currentNode.type===fe.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},He.prototype.a=function(){return this.currentNode&&this.currentNode.type===fe.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},He.prototype.ent=function(We,at){return this.entity(We,at)},He.prototype.pent=function(We,at){return this.pEntity(We,at)},He.prototype.not=function(We,at){return this.notation(We,at)},He}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;be=ae("./XMLNode"),fe=ae("./NodeType"),Ge.exports=pe=function(Te){Ee(ve,Te);function ve(Pe){ve.__super__.constructor.call(this,Pe),this.type=fe.Dummy}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(Pe){return""},ve}(be)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we,Te,ve,Pe,de,ee=function(oe,ie){for(var le in ie)z.call(ie,le)&&(oe[le]=ie[le]);function ue(){this.constructor=oe}return ue.prototype=ie.prototype,oe.prototype=new ue,oe.__super__=ie.prototype,oe},z={}.hasOwnProperty;de=ae("./Utility"),Pe=de.isObject,ve=de.isFunction,Te=de.getValue,we=ae("./XMLNode"),fe=ae("./NodeType"),pe=ae("./XMLAttribute"),Ee=ae("./XMLNamedNodeMap"),Ge.exports=be=function(oe){ee(ie,oe);function ie(le,ue,me){var xe,Ae,De,Fe;if(ie.__super__.constructor.call(this,le),ue==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ue),this.type=fe.Element,this.attribs={},this.schemaTypeInfo=null,me!=null&&this.attribute(me),le.type===fe.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(Fe=le.children,Ae=0,De=Fe.length;Ae<De;Ae++)if(xe=Fe[Ae],xe.type===fe.DocType){xe.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 Ee(this.attribs)),this.attributeMap}}),ie.prototype.clone=function(){var le,ue,me,xe;me=Object.create(this),me.isRoot&&(me.documentObject=null),me.attribs={},xe=this.attribs;for(ue in xe)z.call(xe,ue)&&(le=xe[ue],me.attribs[ue]=le.clone());return me.children=[],this.children.forEach(function(Ae){var De;return De=Ae.clone(),De.parent=me,me.children.push(De)}),me},ie.prototype.attribute=function(le,ue){var me,xe;if(le!=null&&(le=Te(le)),Pe(le))for(me in le)z.call(le,me)&&(xe=le[me],this.attribute(me,xe));else ve(ue)&&(ue=ue.apply()),this.options.keepNullAttributes&&ue==null?this.attribs[le]=new pe(this,le,""):ue!=null&&(this.attribs[le]=new pe(this,le,ue));return this},ie.prototype.removeAttribute=function(le){var ue,me,xe;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=Te(le),Array.isArray(le))for(me=0,xe=le.length;me<xe;me++)ue=le[me],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,me){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,me){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,me,xe;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=me=0,xe=this.attribs.length-1;0<=xe?me<=xe:me>=xe;ue=0<=xe?++me:--me)if(!this.attribs[ue].isEqualNode(le.attribs[ue]))return!1;return!0},ie}(we)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(ae,Ge,Re){(function(){var fe;Ge.exports=fe=function(){function pe(be){this.nodes=be}return Object.defineProperty(pe.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),pe.prototype.clone=function(){return this.nodes=null},pe.prototype.getNamedItem=function(be){return this.nodes[be]},pe.prototype.setNamedItem=function(be){var Ee;return Ee=this.nodes[be.nodeName],this.nodes[be.nodeName]=be,Ee||null},pe.prototype.removeNamedItem=function(be){var Ee;return Ee=this.nodes[be],delete this.nodes[be],Ee||null},pe.prototype.item=function(be){return this.nodes[Object.keys(this.nodes)[be]]||null},pe.prototype.getNamedItemNS=function(be,Ee){throw new Error("This DOM method is not implemented.")},pe.prototype.setNamedItemNS=function(be){throw new Error("This DOM method is not implemented.")},pe.prototype.removeNamedItemNS=function(be,Ee){throw new Error("This DOM method is not implemented.")},pe}()}).call(this)},{}],450:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we,Te,ve,Pe,de,ee,z,oe,ie,le,ue,me,xe,Ae,De,Fe={}.hasOwnProperty;De=ae("./Utility"),Ae=De.isObject,xe=De.isFunction,me=De.isEmpty,ue=De.getValue,Pe=null,be=null,Ee=null,we=null,Te=null,ie=null,le=null,oe=null,ve=null,pe=null,z=null,de=null,fe=null,Ge.exports=ee=function(){function je(Le){this.parent=Le,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,Pe||(Pe=ae("./XMLElement"),be=ae("./XMLCData"),Ee=ae("./XMLComment"),we=ae("./XMLDeclaration"),Te=ae("./XMLDocType"),ie=ae("./XMLRaw"),le=ae("./XMLText"),oe=ae("./XMLProcessingInstruction"),ve=ae("./XMLDummy"),pe=ae("./NodeType"),z=ae("./XMLNodeList"),de=ae("./XMLNamedNodeMap"),fe=ae("./DocumentPosition"))}return Object.defineProperty(je.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(je.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(je.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(je.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(je.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new z(this.children)),this.childNodeList}}),Object.defineProperty(je.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(je.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(je.prototype,"previousSibling",{get:function(){var Le;return Le=this.parent.children.indexOf(this),this.parent.children[Le-1]||null}}),Object.defineProperty(je.prototype,"nextSibling",{get:function(){var Le;return Le=this.parent.children.indexOf(this),this.parent.children[Le+1]||null}}),Object.defineProperty(je.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(je.prototype,"textContent",{get:function(){var Le,Be,Ue,Je,He;if(this.nodeType===pe.Element||this.nodeType===pe.DocumentFragment){for(He="",Je=this.children,Be=0,Ue=Je.length;Be<Ue;Be++)Le=Je[Be],Le.textContent&&(He+=Le.textContent);return He}else return null},set:function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),je.prototype.setParent=function(Le){var Be,Ue,Je,He,We;for(this.parent=Le,Le&&(this.options=Le.options,this.stringify=Le.stringify),He=this.children,We=[],Ue=0,Je=He.length;Ue<Je;Ue++)Be=He[Ue],We.push(Be.setParent(this));return We},je.prototype.element=function(Le,Be,Ue){var Je,He,We,at,ft,mt,Lt,Xe,et,lt,vt;if(mt=null,Be===null&&Ue==null&&(et=[{},null],Be=et[0],Ue=et[1]),Be==null&&(Be={}),Be=ue(Be),Ae(Be)||(lt=[Be,Ue],Ue=lt[0],Be=lt[1]),Le!=null&&(Le=ue(Le)),Array.isArray(Le))for(We=0,Lt=Le.length;We<Lt;We++)He=Le[We],mt=this.element(He);else if(xe(Le))mt=this.element(Le.apply());else if(Ae(Le)){for(ft in Le)if(Fe.call(Le,ft))if(vt=Le[ft],xe(vt)&&(vt=vt.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&ft.indexOf(this.stringify.convertAttKey)===0)mt=this.attribute(ft.substr(this.stringify.convertAttKey.length),vt);else if(!this.options.separateArrayItems&&Array.isArray(vt)&&me(vt))mt=this.dummy();else if(Ae(vt)&&me(vt))mt=this.element(ft);else if(!this.options.keepNullNodes&&vt==null)mt=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(vt))for(at=0,Xe=vt.length;at<Xe;at++)He=vt[at],Je={},Je[ft]=He,mt=this.element(Je);else Ae(vt)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ft.indexOf(this.stringify.convertTextKey)===0?mt=this.element(vt):(mt=this.element(ft),mt.element(vt)):mt=this.element(ft,vt)}else!this.options.keepNullNodes&&Ue===null?mt=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Le.indexOf(this.stringify.convertTextKey)===0?mt=this.text(Ue):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Le.indexOf(this.stringify.convertCDataKey)===0?mt=this.cdata(Ue):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Le.indexOf(this.stringify.convertCommentKey)===0?mt=this.comment(Ue):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Le.indexOf(this.stringify.convertRawKey)===0?mt=this.raw(Ue):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Le.indexOf(this.stringify.convertPIKey)===0?mt=this.instruction(Le.substr(this.stringify.convertPIKey.length),Ue):mt=this.node(Le,Be,Ue);if(mt==null)throw new Error("Could not create any elements with: "+Le+". "+this.debugInfo());return mt},je.prototype.insertBefore=function(Le,Be,Ue){var Je,He,We,at,ft;if(Le!=null&&Le.type)return We=Le,at=Be,We.setParent(this),at?(He=children.indexOf(at),ft=children.splice(He),children.push(We),Array.prototype.push.apply(children,ft)):children.push(We),We;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Le));return He=this.parent.children.indexOf(this),ft=this.parent.children.splice(He),Je=this.parent.element(Le,Be,Ue),Array.prototype.push.apply(this.parent.children,ft),Je},je.prototype.insertAfter=function(Le,Be,Ue){var Je,He,We;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Le));return He=this.parent.children.indexOf(this),We=this.parent.children.splice(He+1),Je=this.parent.element(Le,Be,Ue),Array.prototype.push.apply(this.parent.children,We),Je},je.prototype.remove=function(){var Le,Be;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Le=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Le,Le-Le+1].concat(Be=[])),this.parent},je.prototype.node=function(Le,Be,Ue){var Je,He;return Le!=null&&(Le=ue(Le)),Be||(Be={}),Be=ue(Be),Ae(Be)||(He=[Be,Ue],Ue=He[0],Be=He[1]),Je=new Pe(this,Le,Be),Ue!=null&&Je.text(Ue),this.children.push(Je),Je},je.prototype.text=function(Le){var Be;return Ae(Le)&&this.element(Le),Be=new le(this,Le),this.children.push(Be),this},je.prototype.cdata=function(Le){var Be;return Be=new be(this,Le),this.children.push(Be),this},je.prototype.comment=function(Le){var Be;return Be=new Ee(this,Le),this.children.push(Be),this},je.prototype.commentBefore=function(Le){var Be,Ue,Je;return Ue=this.parent.children.indexOf(this),Je=this.parent.children.splice(Ue),Be=this.parent.comment(Le),Array.prototype.push.apply(this.parent.children,Je),this},je.prototype.commentAfter=function(Le){var Be,Ue,Je;return Ue=this.parent.children.indexOf(this),Je=this.parent.children.splice(Ue+1),Be=this.parent.comment(Le),Array.prototype.push.apply(this.parent.children,Je),this},je.prototype.raw=function(Le){var Be;return Be=new ie(this,Le),this.children.push(Be),this},je.prototype.dummy=function(){var Le;return Le=new ve(this),Le},je.prototype.instruction=function(Le,Be){var Ue,Je,He,We,at;if(Le!=null&&(Le=ue(Le)),Be!=null&&(Be=ue(Be)),Array.isArray(Le))for(We=0,at=Le.length;We<at;We++)Ue=Le[We],this.instruction(Ue);else if(Ae(Le))for(Ue in Le)Fe.call(Le,Ue)&&(Je=Le[Ue],this.instruction(Ue,Je));else xe(Be)&&(Be=Be.apply()),He=new oe(this,Le,Be),this.children.push(He);return this},je.prototype.instructionBefore=function(Le,Be){var Ue,Je,He;return Je=this.parent.children.indexOf(this),He=this.parent.children.splice(Je),Ue=this.parent.instruction(Le,Be),Array.prototype.push.apply(this.parent.children,He),this},je.prototype.instructionAfter=function(Le,Be){var Ue,Je,He;return Je=this.parent.children.indexOf(this),He=this.parent.children.splice(Je+1),Ue=this.parent.instruction(Le,Be),Array.prototype.push.apply(this.parent.children,He),this},je.prototype.declaration=function(Le,Be,Ue){var Je,He;return Je=this.document(),He=new we(Je,Le,Be,Ue),Je.children.length===0?Je.children.unshift(He):Je.children[0].type===pe.Declaration?Je.children[0]=He:Je.children.unshift(He),Je.root()||Je},je.prototype.dtd=function(Le,Be){var Ue,Je,He,We,at,ft,mt,Lt,Xe,et;for(Je=this.document(),He=new Te(Je,Le,Be),Xe=Je.children,We=at=0,mt=Xe.length;at<mt;We=++at)if(Ue=Xe[We],Ue.type===pe.DocType)return Je.children[We]=He,He;for(et=Je.children,We=ft=0,Lt=et.length;ft<Lt;We=++ft)if(Ue=et[We],Ue.isRoot)return Je.children.splice(We,0,He),He;return Je.children.push(He),He},je.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},je.prototype.root=function(){var Le;for(Le=this;Le;){if(Le.type===pe.Document)return Le.rootObject;if(Le.isRoot)return Le;Le=Le.parent}},je.prototype.document=function(){var Le;for(Le=this;Le;){if(Le.type===pe.Document)return Le;Le=Le.parent}},je.prototype.end=function(Le){return this.document().end(Le)},je.prototype.prev=function(){var Le;if(Le=this.parent.children.indexOf(this),Le<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Le-1]},je.prototype.next=function(){var Le;if(Le=this.parent.children.indexOf(this),Le===-1||Le===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Le+1]},je.prototype.importDocument=function(Le){var Be;return Be=Le.root().clone(),Be.parent=this,Be.isRoot=!1,this.children.push(Be),this},je.prototype.debugInfo=function(Le){var Be,Ue;return Le=Le||this.name,Le==null&&!((Be=this.parent)!=null&&Be.name)?"":Le==null?"parent: <"+this.parent.name+">":(Ue=this.parent)!=null&&Ue.name?"node: <"+Le+">, parent: <"+this.parent.name+">":"node: <"+Le+">"},je.prototype.ele=function(Le,Be,Ue){return this.element(Le,Be,Ue)},je.prototype.nod=function(Le,Be,Ue){return this.node(Le,Be,Ue)},je.prototype.txt=function(Le){return this.text(Le)},je.prototype.dat=function(Le){return this.cdata(Le)},je.prototype.com=function(Le){return this.comment(Le)},je.prototype.ins=function(Le,Be){return this.instruction(Le,Be)},je.prototype.doc=function(){return this.document()},je.prototype.dec=function(Le,Be,Ue){return this.declaration(Le,Be,Ue)},je.prototype.e=function(Le,Be,Ue){return this.element(Le,Be,Ue)},je.prototype.n=function(Le,Be,Ue){return this.node(Le,Be,Ue)},je.prototype.t=function(Le){return this.text(Le)},je.prototype.d=function(Le){return this.cdata(Le)},je.prototype.c=function(Le){return this.comment(Le)},je.prototype.r=function(Le){return this.raw(Le)},je.prototype.i=function(Le,Be){return this.instruction(Le,Be)},je.prototype.u=function(){return this.up()},je.prototype.importXMLBuilder=function(Le){return this.importDocument(Le)},je.prototype.replaceChild=function(Le,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.removeChild=function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.appendChild=function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.hasChildNodes=function(){return this.children.length!==0},je.prototype.cloneNode=function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.isSupported=function(Le,Be){return!0},je.prototype.hasAttributes=function(){return this.attribs.length!==0},je.prototype.compareDocumentPosition=function(Le){var Be,Ue;return Be=this,Be===Le?0:this.document()!==Le.document()?(Ue=fe.Disconnected|fe.ImplementationSpecific,Math.random()<.5?Ue|=fe.Preceding:Ue|=fe.Following,Ue):Be.isAncestor(Le)?fe.Contains|fe.Preceding:Be.isDescendant(Le)?fe.Contains|fe.Following:Be.isPreceding(Le)?fe.Preceding:fe.Following},je.prototype.isSameNode=function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.lookupPrefix=function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.isDefaultNamespace=function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.lookupNamespaceURI=function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.isEqualNode=function(Le){var Be,Ue,Je;if(Le.nodeType!==this.nodeType||Le.children.length!==this.children.length)return!1;for(Be=Ue=0,Je=this.children.length-1;0<=Je?Ue<=Je:Ue>=Je;Be=0<=Je?++Ue:--Ue)if(!this.children[Be].isEqualNode(Le.children[Be]))return!1;return!0},je.prototype.getFeature=function(Le,Be){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.setUserData=function(Le,Be,Ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.getUserData=function(Le){throw new Error("This DOM method is not implemented."+this.debugInfo())},je.prototype.contains=function(Le){return Le?Le===this||this.isDescendant(Le):!1},je.prototype.isDescendant=function(Le){var Be,Ue,Je,He,We;for(We=this.children,Je=0,He=We.length;Je<He;Je++)if(Be=We[Je],Le===Be||(Ue=Be.isDescendant(Le),Ue))return!0;return!1},je.prototype.isAncestor=function(Le){return Le.isDescendant(this)},je.prototype.isPreceding=function(Le){var Be,Ue;return Be=this.treePosition(Le),Ue=this.treePosition(this),Be===-1||Ue===-1?!1:Be<Ue},je.prototype.isFollowing=function(Le){var Be,Ue;return Be=this.treePosition(Le),Ue=this.treePosition(this),Be===-1||Ue===-1?!1:Be>Ue},je.prototype.treePosition=function(Le){var Be,Ue;return Ue=0,Be=!1,this.foreachTreeNode(this.document(),function(Je){if(Ue++,!Be&&Je===Le)return Be=!0}),Be?Ue:-1},je.prototype.foreachTreeNode=function(Le,Be){var Ue,Je,He,We,at;for(Le||(Le=this.document()),We=Le.children,Je=0,He=We.length;Je<He;Je++){if(Ue=We[Je],at=Be(Ue))return at;if(at=this.foreachTreeNode(Ue,Be),at)return at}},je}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(ae,Ge,Re){(function(){var fe;Ge.exports=fe=function(){function pe(be){this.nodes=be}return Object.defineProperty(pe.prototype,"length",{get:function(){return this.nodes.length||0}}),pe.prototype.clone=function(){return this.nodes=null},pe.prototype.item=function(be){return this.nodes[be]||null},pe}()}).call(this)},{}],452:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;fe=ae("./NodeType"),pe=ae("./XMLCharacterData"),Ge.exports=be=function(Te){Ee(ve,Te);function ve(Pe,de,ee){if(ve.__super__.constructor.call(this,Pe),de==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=fe.ProcessingInstruction,this.target=this.stringify.insTarget(de),this.name=this.target,ee&&(this.value=this.stringify.insValue(ee))}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(Pe){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(Pe))},ve.prototype.isEqualNode=function(Pe){return!(!ve.__super__.isEqualNode.apply(this,arguments).isEqualNode(Pe)||Pe.target!==this.target)},ve}(pe)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;fe=ae("./NodeType"),pe=ae("./XMLNode"),Ge.exports=be=function(Te){Ee(ve,Te);function ve(Pe,de){if(ve.__super__.constructor.call(this,Pe),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(Pe){return this.options.writer.raw(this,this.options.writer.filterOptions(Pe))},ve}(pe)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we=function(ve,Pe){for(var de in Pe)Te.call(Pe,de)&&(ve[de]=Pe[de]);function ee(){this.constructor=ve}return ee.prototype=Pe.prototype,ve.prototype=new ee,ve.__super__=Pe.prototype,ve},Te={}.hasOwnProperty;fe=ae("./NodeType"),Ee=ae("./XMLWriterBase"),pe=ae("./WriterState"),Ge.exports=be=function(ve){we(Pe,ve);function Pe(de,ee){this.stream=de,Pe.__super__.constructor.call(this,ee)}return Pe.prototype.endline=function(de,ee,z){return de.isLastRootNode&&ee.state===pe.CloseTag?"":Pe.__super__.endline.call(this,de,ee,z)},Pe.prototype.document=function(de,ee){var z,oe,ie,le,ue,me,xe,Ae,De;for(xe=de.children,oe=ie=0,ue=xe.length;ie<ue;oe=++ie)z=xe[oe],z.isLastRootNode=oe===de.children.length-1;for(ee=this.filterOptions(ee),Ae=de.children,De=[],le=0,me=Ae.length;le<me;le++)z=Ae[le],De.push(this.writeChildNode(z,ee,0));return De},Pe.prototype.attribute=function(de,ee,z){return this.stream.write(Pe.__super__.attribute.call(this,de,ee,z))},Pe.prototype.cdata=function(de,ee,z){return this.stream.write(Pe.__super__.cdata.call(this,de,ee,z))},Pe.prototype.comment=function(de,ee,z){return this.stream.write(Pe.__super__.comment.call(this,de,ee,z))},Pe.prototype.declaration=function(de,ee,z){return this.stream.write(Pe.__super__.declaration.call(this,de,ee,z))},Pe.prototype.docType=function(de,ee,z){var oe,ie,le,ue;if(z||(z=0),this.openNode(de,ee,z),ee.state=pe.OpenTag,this.stream.write(this.indent(de,ee,z)),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,ee,z)),ee.state=pe.InsideTag,ue=de.children,ie=0,le=ue.length;ie<le;ie++)oe=ue[ie],this.writeChildNode(oe,ee,z+1);ee.state=pe.CloseTag,this.stream.write("]")}return ee.state=pe.CloseTag,this.stream.write(ee.spaceBeforeSlash+">"),this.stream.write(this.endline(de,ee,z)),ee.state=pe.None,this.closeNode(de,ee,z)},Pe.prototype.element=function(de,ee,z){var oe,ie,le,ue,me,xe,Ae,De,Fe,je;z||(z=0),this.openNode(de,ee,z),ee.state=pe.OpenTag,this.stream.write(this.indent(de,ee,z)+"<"+de.name),Fe=de.attribs;for(Ae in Fe)Te.call(Fe,Ae)&&(oe=Fe[Ae],this.attribute(oe,ee,z));if(le=de.children.length,ue=le===0?null:de.children[0],le===0||de.children.every(function(Le){return(Le.type===fe.Text||Le.type===fe.Raw)&&Le.value===""}))ee.allowEmpty?(this.stream.write(">"),ee.state=pe.CloseTag,this.stream.write("</"+de.name+">")):(ee.state=pe.CloseTag,this.stream.write(ee.spaceBeforeSlash+"/>"));else if(ee.pretty&&le===1&&(ue.type===fe.Text||ue.type===fe.Raw)&&ue.value!=null)this.stream.write(">"),ee.state=pe.InsideTag,ee.suppressPrettyCount++,De=!0,this.writeChildNode(ue,ee,z+1),ee.suppressPrettyCount--,De=!1,ee.state=pe.CloseTag,this.stream.write("</"+de.name+">");else{for(this.stream.write(">"+this.endline(de,ee,z)),ee.state=pe.InsideTag,je=de.children,me=0,xe=je.length;me<xe;me++)ie=je[me],this.writeChildNode(ie,ee,z+1);ee.state=pe.CloseTag,this.stream.write(this.indent(de,ee,z)+"</"+de.name+">")}return this.stream.write(this.endline(de,ee,z)),ee.state=pe.None,this.closeNode(de,ee,z)},Pe.prototype.processingInstruction=function(de,ee,z){return this.stream.write(Pe.__super__.processingInstruction.call(this,de,ee,z))},Pe.prototype.raw=function(de,ee,z){return this.stream.write(Pe.__super__.raw.call(this,de,ee,z))},Pe.prototype.text=function(de,ee,z){return this.stream.write(Pe.__super__.text.call(this,de,ee,z))},Pe.prototype.dtdAttList=function(de,ee,z){return this.stream.write(Pe.__super__.dtdAttList.call(this,de,ee,z))},Pe.prototype.dtdElement=function(de,ee,z){return this.stream.write(Pe.__super__.dtdElement.call(this,de,ee,z))},Pe.prototype.dtdEntity=function(de,ee,z){return this.stream.write(Pe.__super__.dtdEntity.call(this,de,ee,z))},Pe.prototype.dtdNotation=function(de,ee,z){return this.stream.write(Pe.__super__.dtdNotation.call(this,de,ee,z))},Pe}(Ee)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(ae,Ge,Re){(function(){var fe,pe,be=function(we,Te){for(var ve in Te)Ee.call(Te,ve)&&(we[ve]=Te[ve]);function Pe(){this.constructor=we}return Pe.prototype=Te.prototype,we.prototype=new Pe,we.__super__=Te.prototype,we},Ee={}.hasOwnProperty;pe=ae("./XMLWriterBase"),Ge.exports=fe=function(we){be(Te,we);function Te(ve){Te.__super__.constructor.call(this,ve)}return Te.prototype.document=function(ve,Pe){var de,ee,z,oe,ie;for(Pe=this.filterOptions(Pe),oe="",ie=ve.children,ee=0,z=ie.length;ee<z;ee++)de=ie[ee],oe+=this.writeChildNode(de,Pe,0);return Pe.pretty&&oe.slice(-Pe.newline.length)===Pe.newline&&(oe=oe.slice(0,-Pe.newline.length)),oe},Te}(pe)}).call(this)},{"./XMLWriterBase":458}],456:[function(ae,Ge,Re){(function(){var fe,pe=function(Ee,we){return function(){return Ee.apply(we,arguments)}},be={}.hasOwnProperty;Ge.exports=fe=function(){function Ee(we){this.assertLegalName=pe(this.assertLegalName,this),this.assertLegalChar=pe(this.assertLegalChar,this);var Te,ve,Pe;we||(we={}),this.options=we,this.options.version||(this.options.version="1.0"),ve=we.stringify||{};for(Te in ve)be.call(ve,Te)&&(Pe=ve[Te],this[Te]=Pe)}return Ee.prototype.name=function(we){return this.options.noValidation?we:this.assertLegalName(""+we||"")},Ee.prototype.text=function(we){return this.options.noValidation?we:this.assertLegalChar(this.textEscape(""+we||""))},Ee.prototype.cdata=function(we){return this.options.noValidation?we:(we=""+we||"",we=we.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(we))},Ee.prototype.comment=function(we){if(this.options.noValidation)return we;if(we=""+we||"",we.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+we);return this.assertLegalChar(we)},Ee.prototype.raw=function(we){return this.options.noValidation?we:""+we||""},Ee.prototype.attValue=function(we){return this.options.noValidation?we:this.assertLegalChar(this.attEscape(we=""+we||""))},Ee.prototype.insTarget=function(we){return this.options.noValidation?we:this.assertLegalChar(""+we||"")},Ee.prototype.insValue=function(we){if(this.options.noValidation)return we;if(we=""+we||"",we.match(/\?>/))throw new Error("Invalid processing instruction value: "+we);return this.assertLegalChar(we)},Ee.prototype.xmlVersion=function(we){if(this.options.noValidation)return we;if(we=""+we||"",!we.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+we);return we},Ee.prototype.xmlEncoding=function(we){if(this.options.noValidation)return we;if(we=""+we||"",!we.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+we);return this.assertLegalChar(we)},Ee.prototype.xmlStandalone=function(we){return this.options.noValidation?we:we?"yes":"no"},Ee.prototype.dtdPubID=function(we){return this.options.noValidation?we:this.assertLegalChar(""+we||"")},Ee.prototype.dtdSysID=function(we){return this.options.noValidation?we:this.assertLegalChar(""+we||"")},Ee.prototype.dtdElementValue=function(we){return this.options.noValidation?we:this.assertLegalChar(""+we||"")},Ee.prototype.dtdAttType=function(we){return this.options.noValidation?we:this.assertLegalChar(""+we||"")},Ee.prototype.dtdAttDefault=function(we){return this.options.noValidation?we:this.assertLegalChar(""+we||"")},Ee.prototype.dtdEntityValue=function(we){return this.options.noValidation?we:this.assertLegalChar(""+we||"")},Ee.prototype.dtdNData=function(we){return this.options.noValidation?we:this.assertLegalChar(""+we||"")},Ee.prototype.convertAttKey="@",Ee.prototype.convertPIKey="?",Ee.prototype.convertTextKey="#text",Ee.prototype.convertCDataKey="#cdata",Ee.prototype.convertCommentKey="#comment",Ee.prototype.convertRawKey="#raw",Ee.prototype.assertLegalChar=function(we){var Te,ve;if(this.options.noValidation)return we;if(Te="",this.options.version==="1.0"){if(Te=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=we.match(Te))throw new Error("Invalid character in string: "+we+" at index "+ve.index)}else if(this.options.version==="1.1"&&(Te=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=we.match(Te)))throw new Error("Invalid character in string: "+we+" at index "+ve.index);return we},Ee.prototype.assertLegalName=function(we){var Te;if(this.options.noValidation)return we;if(this.assertLegalChar(we),Te=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!we.match(Te))throw new Error("Invalid character in name");return we},Ee.prototype.textEscape=function(we){var Te;return this.options.noValidation?we:(Te=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,we.replace(Te,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},Ee.prototype.attEscape=function(we){var Te;return this.options.noValidation?we:(Te=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,we.replace(Te,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},Ee}()}).call(this)},{}],457:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee=function(Te,ve){for(var Pe in ve)we.call(ve,Pe)&&(Te[Pe]=ve[Pe]);function de(){this.constructor=Te}return de.prototype=ve.prototype,Te.prototype=new de,Te.__super__=ve.prototype,Te},we={}.hasOwnProperty;fe=ae("./NodeType"),pe=ae("./XMLCharacterData"),Ge.exports=be=function(Te){Ee(ve,Te);function ve(Pe,de){if(ve.__super__.constructor.call(this,Pe),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 Pe,de,ee;for(ee="",de=this.previousSibling;de;)ee=de.data+ee,de=de.previousSibling;for(ee+=this.data,Pe=this.nextSibling;Pe;)ee=ee+Pe.data,Pe=Pe.nextSibling;return ee}}),ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(Pe){return this.options.writer.text(this,this.options.writer.filterOptions(Pe))},ve.prototype.splitText=function(Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve.prototype.replaceWholeText=function(Pe){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve}(pe)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we,Te,ve,Pe,de,ee,z,oe,ie,le,ue,me,xe,Ae={}.hasOwnProperty;xe=ae("./Utility").assign,fe=ae("./NodeType"),de=ae("./XMLDeclaration"),ee=ae("./XMLDocType"),be=ae("./XMLCData"),Ee=ae("./XMLComment"),oe=ae("./XMLElement"),le=ae("./XMLRaw"),ue=ae("./XMLText"),ie=ae("./XMLProcessingInstruction"),z=ae("./XMLDummy"),we=ae("./XMLDTDAttList"),Te=ae("./XMLDTDElement"),ve=ae("./XMLDTDEntity"),Pe=ae("./XMLDTDNotation"),pe=ae("./WriterState"),Ge.exports=me=function(){function De(Fe){var je,Le,Be;Fe||(Fe={}),this.options=Fe,Le=Fe.writer||{};for(je in Le)Ae.call(Le,je)&&(Be=Le[je],this["_"+je]=this[je],this[je]=Be)}return De.prototype.filterOptions=function(Fe){var je,Le,Be,Ue,Je,He,We,at;return Fe||(Fe={}),Fe=xe({},this.options,Fe),je={writer:this},je.pretty=Fe.pretty||!1,je.allowEmpty=Fe.allowEmpty||!1,je.indent=(Le=Fe.indent)!=null?Le:" ",je.newline=(Be=Fe.newline)!=null?Be:`
|
|
`,je.offset=(Ue=Fe.offset)!=null?Ue:0,je.dontPrettyTextNodes=(Je=(He=Fe.dontPrettyTextNodes)!=null?He:Fe.dontprettytextnodes)!=null?Je:0,je.spaceBeforeSlash=(We=(at=Fe.spaceBeforeSlash)!=null?at:Fe.spacebeforeslash)!=null?We:"",je.spaceBeforeSlash===!0&&(je.spaceBeforeSlash=" "),je.suppressPrettyCount=0,je.user={},je.state=pe.None,je},De.prototype.indent=function(Fe,je,Le){var Be;return!je.pretty||je.suppressPrettyCount?"":je.pretty&&(Be=(Le||0)+je.offset+1,Be>0)?new Array(Be).join(je.indent):""},De.prototype.endline=function(Fe,je,Le){return!je.pretty||je.suppressPrettyCount?"":je.newline},De.prototype.attribute=function(Fe,je,Le){var Be;return this.openAttribute(Fe,je,Le),Be=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,je,Le),Be},De.prototype.cdata=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le)+"<![CDATA[",je.state=pe.InsideTag,Be+=Fe.value,je.state=pe.CloseTag,Be+="]]>"+this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.comment=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le)+"<!-- ",je.state=pe.InsideTag,Be+=Fe.value,je.state=pe.CloseTag,Be+=" -->"+this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.declaration=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le)+"<?xml",je.state=pe.InsideTag,Be+=' version="'+Fe.version+'"',Fe.encoding!=null&&(Be+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(Be+=' standalone="'+Fe.standalone+'"'),je.state=pe.CloseTag,Be+=je.spaceBeforeSlash+"?>",Be+=this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.docType=function(Fe,je,Le){var Be,Ue,Je,He,We;if(Le||(Le=0),this.openNode(Fe,je,Le),je.state=pe.OpenTag,He=this.indent(Fe,je,Le),He+="<!DOCTYPE "+Fe.root().name,Fe.pubID&&Fe.sysID?He+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(He+=' SYSTEM "'+Fe.sysID+'"'),Fe.children.length>0){for(He+=" [",He+=this.endline(Fe,je,Le),je.state=pe.InsideTag,We=Fe.children,Ue=0,Je=We.length;Ue<Je;Ue++)Be=We[Ue],He+=this.writeChildNode(Be,je,Le+1);je.state=pe.CloseTag,He+="]"}return je.state=pe.CloseTag,He+=je.spaceBeforeSlash+">",He+=this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),He},De.prototype.element=function(Fe,je,Le){var Be,Ue,Je,He,We,at,ft,mt,Lt,Xe,et,lt,vt,wt;Le||(Le=0),Xe=!1,et="",this.openNode(Fe,je,Le),je.state=pe.OpenTag,et+=this.indent(Fe,je,Le)+"<"+Fe.name,lt=Fe.attribs;for(Lt in lt)Ae.call(lt,Lt)&&(Be=lt[Lt],et+=this.attribute(Be,je,Le));if(Je=Fe.children.length,He=Je===0?null:Fe.children[0],Je===0||Fe.children.every(function(ht){return(ht.type===fe.Text||ht.type===fe.Raw)&&ht.value===""}))je.allowEmpty?(et+=">",je.state=pe.CloseTag,et+="</"+Fe.name+">"+this.endline(Fe,je,Le)):(je.state=pe.CloseTag,et+=je.spaceBeforeSlash+"/>"+this.endline(Fe,je,Le));else if(je.pretty&&Je===1&&(He.type===fe.Text||He.type===fe.Raw)&&He.value!=null)et+=">",je.state=pe.InsideTag,je.suppressPrettyCount++,Xe=!0,et+=this.writeChildNode(He,je,Le+1),je.suppressPrettyCount--,Xe=!1,je.state=pe.CloseTag,et+="</"+Fe.name+">"+this.endline(Fe,je,Le);else{if(je.dontPrettyTextNodes){for(vt=Fe.children,We=0,ft=vt.length;We<ft;We++)if(Ue=vt[We],(Ue.type===fe.Text||Ue.type===fe.Raw)&&Ue.value!=null){je.suppressPrettyCount++,Xe=!0;break}}for(et+=">"+this.endline(Fe,je,Le),je.state=pe.InsideTag,wt=Fe.children,at=0,mt=wt.length;at<mt;at++)Ue=wt[at],et+=this.writeChildNode(Ue,je,Le+1);je.state=pe.CloseTag,et+=this.indent(Fe,je,Le)+"</"+Fe.name+">",Xe&&je.suppressPrettyCount--,et+=this.endline(Fe,je,Le),je.state=pe.None}return this.closeNode(Fe,je,Le),et},De.prototype.writeChildNode=function(Fe,je,Le){switch(Fe.type){case fe.CData:return this.cdata(Fe,je,Le);case fe.Comment:return this.comment(Fe,je,Le);case fe.Element:return this.element(Fe,je,Le);case fe.Raw:return this.raw(Fe,je,Le);case fe.Text:return this.text(Fe,je,Le);case fe.ProcessingInstruction:return this.processingInstruction(Fe,je,Le);case fe.Dummy:return"";case fe.Declaration:return this.declaration(Fe,je,Le);case fe.DocType:return this.docType(Fe,je,Le);case fe.AttributeDeclaration:return this.dtdAttList(Fe,je,Le);case fe.ElementDeclaration:return this.dtdElement(Fe,je,Le);case fe.EntityDeclaration:return this.dtdEntity(Fe,je,Le);case fe.NotationDeclaration:return this.dtdNotation(Fe,je,Le);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},De.prototype.processingInstruction=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le)+"<?",je.state=pe.InsideTag,Be+=Fe.target,Fe.value&&(Be+=" "+Fe.value),je.state=pe.CloseTag,Be+=je.spaceBeforeSlash+"?>",Be+=this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.raw=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le),je.state=pe.InsideTag,Be+=Fe.value,je.state=pe.CloseTag,Be+=this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.text=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le),je.state=pe.InsideTag,Be+=Fe.value,je.state=pe.CloseTag,Be+=this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.dtdAttList=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le)+"<!ATTLIST",je.state=pe.InsideTag,Be+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(Be+=" "+Fe.defaultValueType),Fe.defaultValue&&(Be+=' "'+Fe.defaultValue+'"'),je.state=pe.CloseTag,Be+=je.spaceBeforeSlash+">"+this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.dtdElement=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le)+"<!ELEMENT",je.state=pe.InsideTag,Be+=" "+Fe.name+" "+Fe.value,je.state=pe.CloseTag,Be+=je.spaceBeforeSlash+">"+this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.dtdEntity=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le)+"<!ENTITY",je.state=pe.InsideTag,Fe.pe&&(Be+=" %"),Be+=" "+Fe.name,Fe.value?Be+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?Be+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Be+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(Be+=" NDATA "+Fe.nData)),je.state=pe.CloseTag,Be+=je.spaceBeforeSlash+">"+this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.dtdNotation=function(Fe,je,Le){var Be;return this.openNode(Fe,je,Le),je.state=pe.OpenTag,Be=this.indent(Fe,je,Le)+"<!NOTATION",je.state=pe.InsideTag,Be+=" "+Fe.name,Fe.pubID&&Fe.sysID?Be+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?Be+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(Be+=' SYSTEM "'+Fe.sysID+'"'),je.state=pe.CloseTag,Be+=je.spaceBeforeSlash+">"+this.endline(Fe,je,Le),je.state=pe.None,this.closeNode(Fe,je,Le),Be},De.prototype.openNode=function(Fe,je,Le){},De.prototype.closeNode=function(Fe,je,Le){},De.prototype.openAttribute=function(Fe,je,Le){},De.prototype.closeAttribute=function(Fe,je,Le){},De}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(ae,Ge,Re){(function(){var fe,pe,be,Ee,we,Te,ve,Pe,de,ee;ee=ae("./Utility"),Pe=ee.assign,de=ee.isFunction,be=ae("./XMLDOMImplementation"),Ee=ae("./XMLDocument"),we=ae("./XMLDocumentCB"),ve=ae("./XMLStringWriter"),Te=ae("./XMLStreamWriter"),fe=ae("./NodeType"),pe=ae("./WriterState"),Ge.exports.create=function(z,oe,ie,le){var ue,me;if(z==null)throw new Error("Root element needs a name.");return le=Pe({},oe,ie,le),ue=new Ee(le),me=ue.element(z),le.headless||(ue.declaration(le),(le.pubID!=null||le.sysID!=null)&&ue.dtd(le)),me},Ge.exports.begin=function(z,oe,ie){var le;return de(z)&&(le=[z,oe],oe=le[0],ie=le[1],z={}),oe?new we(z,oe,ie):new Ee(z)},Ge.exports.stringWriter=function(z){return new ve(z)},Ge.exports.streamWriter=function(z,oe){return new Te(z,oe)},Ge.exports.implementation=new be,Ge.exports.nodeType=fe,Ge.exports.writerState=pe}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(ae,Ge,Re){Ge.exports=pe;var fe=Object.prototype.hasOwnProperty;function pe(){for(var be={},Ee=0;Ee<arguments.length;Ee++){var we=arguments[Ee];for(var Te in we)fe.call(we,Te)&&(be[Te]=we[Te])}return be}},{}],461:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.fill.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/es.array.join.js"),ae("core-js/modules/es.array.slice.js");var fe=ae("buffer").Buffer,pe=ae("./sha"),be=ae("./md5"),Ee={sha1:pe,md5:be},we=64,Te=fe.alloc(we);Te.fill(0);function ve(ee,z,oe){fe.isBuffer(z)||(z=fe.from(z)),fe.isBuffer(oe)||(oe=fe.from(oe)),z.length>we?z=ee(z):z.length<we&&(z=fe.concat([z,Te],we));for(var ie=fe.alloc(we),le=fe.alloc(we),ue=0;ue<we;ue++)ie[ue]=z[ue]^54,le[ue]=z[ue]^92;var me=ee(fe.concat([ie,oe]));return ee(fe.concat([le,me]))}function Pe(ee,z){ee=ee||"sha1";var oe=Ee[ee],ie=[],le=0;return oe||de("algorithm:",ee,"is not yet supported"),{update:function(me){return fe.isBuffer(me)||(me=fe.from(me)),ie.push(me),le+=me.length,this},digest:function(me){var xe=fe.concat(ie),Ae=z?ve(oe,z,xe):oe(xe);return ie=null,me?Ae.toString(me):Ae}}}function de(){var ee=[].slice.call(arguments).join(" ");throw new Error([ee,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
`))}Re.createHash=function(ee){return Pe(ee)},Re.createHmac=function(ee,z){return Pe(ee,z)},Re.createCredentials=function(){de("sorry,createCredentials is not implemented yet")},Re.createCipher=function(){de("sorry,createCipher is not implemented yet")},Re.createCipheriv=function(){de("sorry,createCipheriv is not implemented yet")},Re.createDecipher=function(){de("sorry,createDecipher is not implemented yet")},Re.createDecipheriv=function(){de("sorry,createDecipheriv is not implemented yet")},Re.createSign=function(){de("sorry,createSign is not implemented yet")},Re.createVerify=function(){de("sorry,createVerify is not implemented yet")},Re.createDiffieHellman=function(){de("sorry,createDiffieHellman is not implemented yet")},Re.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(ae,Ge,Re){"use strict";ae("core-js/modules/es.array.fill.js"),ae("core-js/modules/es.array.concat.js");var fe=ae("buffer").Buffer,pe=4,be=fe.alloc(pe);be.fill(0);var Ee=8;function we(Pe,de){if(Pe.length%pe!==0){var ee=Pe.length+(pe-Pe.length%pe);Pe=fe.concat([Pe,be],ee)}for(var z=[],oe=de?Pe.readInt32BE:Pe.readInt32LE,ie=0;ie<Pe.length;ie+=pe)z.push(oe.call(Pe,ie));return z}function Te(Pe,de,ee){for(var z=fe.alloc(de),oe=ee?z.writeInt32BE:z.writeInt32LE,ie=0;ie<Pe.length;ie++)oe.call(z,Pe[ie],ie*4,!0);return z}function ve(Pe,de,ee,z){fe.isBuffer(Pe)||(Pe=fe.from(Pe));var oe=de(we(Pe,z),Pe.length*Ee);return Te(oe,ee,z)}Ge.exports={hash:ve}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(ae,Ge,Re){"use strict";var fe=ae("./helpers");function pe(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function be(z,oe){z[oe>>5]|=128<<oe%32,z[(oe+64>>>9<<4)+14]=oe;for(var ie=1732584193,le=-271733879,ue=-1732584194,me=271733878,xe=0;xe<z.length;xe+=16){var Ae=ie,De=le,Fe=ue,je=me;ie=we(ie,le,ue,me,z[xe+0],7,-680876936),me=we(me,ie,le,ue,z[xe+1],12,-389564586),ue=we(ue,me,ie,le,z[xe+2],17,606105819),le=we(le,ue,me,ie,z[xe+3],22,-1044525330),ie=we(ie,le,ue,me,z[xe+4],7,-176418897),me=we(me,ie,le,ue,z[xe+5],12,1200080426),ue=we(ue,me,ie,le,z[xe+6],17,-1473231341),le=we(le,ue,me,ie,z[xe+7],22,-45705983),ie=we(ie,le,ue,me,z[xe+8],7,1770035416),me=we(me,ie,le,ue,z[xe+9],12,-1958414417),ue=we(ue,me,ie,le,z[xe+10],17,-42063),le=we(le,ue,me,ie,z[xe+11],22,-1990404162),ie=we(ie,le,ue,me,z[xe+12],7,1804603682),me=we(me,ie,le,ue,z[xe+13],12,-40341101),ue=we(ue,me,ie,le,z[xe+14],17,-1502002290),le=we(le,ue,me,ie,z[xe+15],22,1236535329),ie=Te(ie,le,ue,me,z[xe+1],5,-165796510),me=Te(me,ie,le,ue,z[xe+6],9,-1069501632),ue=Te(ue,me,ie,le,z[xe+11],14,643717713),le=Te(le,ue,me,ie,z[xe+0],20,-373897302),ie=Te(ie,le,ue,me,z[xe+5],5,-701558691),me=Te(me,ie,le,ue,z[xe+10],9,38016083),ue=Te(ue,me,ie,le,z[xe+15],14,-660478335),le=Te(le,ue,me,ie,z[xe+4],20,-405537848),ie=Te(ie,le,ue,me,z[xe+9],5,568446438),me=Te(me,ie,le,ue,z[xe+14],9,-1019803690),ue=Te(ue,me,ie,le,z[xe+3],14,-187363961),le=Te(le,ue,me,ie,z[xe+8],20,1163531501),ie=Te(ie,le,ue,me,z[xe+13],5,-1444681467),me=Te(me,ie,le,ue,z[xe+2],9,-51403784),ue=Te(ue,me,ie,le,z[xe+7],14,1735328473),le=Te(le,ue,me,ie,z[xe+12],20,-1926607734),ie=ve(ie,le,ue,me,z[xe+5],4,-378558),me=ve(me,ie,le,ue,z[xe+8],11,-2022574463),ue=ve(ue,me,ie,le,z[xe+11],16,1839030562),le=ve(le,ue,me,ie,z[xe+14],23,-35309556),ie=ve(ie,le,ue,me,z[xe+1],4,-1530992060),me=ve(me,ie,le,ue,z[xe+4],11,1272893353),ue=ve(ue,me,ie,le,z[xe+7],16,-155497632),le=ve(le,ue,me,ie,z[xe+10],23,-1094730640),ie=ve(ie,le,ue,me,z[xe+13],4,681279174),me=ve(me,ie,le,ue,z[xe+0],11,-358537222),ue=ve(ue,me,ie,le,z[xe+3],16,-722521979),le=ve(le,ue,me,ie,z[xe+6],23,76029189),ie=ve(ie,le,ue,me,z[xe+9],4,-640364487),me=ve(me,ie,le,ue,z[xe+12],11,-421815835),ue=ve(ue,me,ie,le,z[xe+15],16,530742520),le=ve(le,ue,me,ie,z[xe+2],23,-995338651),ie=Pe(ie,le,ue,me,z[xe+0],6,-198630844),me=Pe(me,ie,le,ue,z[xe+7],10,1126891415),ue=Pe(ue,me,ie,le,z[xe+14],15,-1416354905),le=Pe(le,ue,me,ie,z[xe+5],21,-57434055),ie=Pe(ie,le,ue,me,z[xe+12],6,1700485571),me=Pe(me,ie,le,ue,z[xe+3],10,-1894986606),ue=Pe(ue,me,ie,le,z[xe+10],15,-1051523),le=Pe(le,ue,me,ie,z[xe+1],21,-2054922799),ie=Pe(ie,le,ue,me,z[xe+8],6,1873313359),me=Pe(me,ie,le,ue,z[xe+15],10,-30611744),ue=Pe(ue,me,ie,le,z[xe+6],15,-1560198380),le=Pe(le,ue,me,ie,z[xe+13],21,1309151649),ie=Pe(ie,le,ue,me,z[xe+4],6,-145523070),me=Pe(me,ie,le,ue,z[xe+11],10,-1120210379),ue=Pe(ue,me,ie,le,z[xe+2],15,718787259),le=Pe(le,ue,me,ie,z[xe+9],21,-343485551),ie=de(ie,Ae),le=de(le,De),ue=de(ue,Fe),me=de(me,je)}return Array(ie,le,ue,me)}function Ee(z,oe,ie,le,ue,me){return de(ee(de(de(oe,z),de(le,me)),ue),ie)}function we(z,oe,ie,le,ue,me,xe){return Ee(oe&ie|~oe&le,z,oe,ue,me,xe)}function Te(z,oe,ie,le,ue,me,xe){return Ee(oe&le|ie&~le,z,oe,ue,me,xe)}function ve(z,oe,ie,le,ue,me,xe){return Ee(oe^ie^le,z,oe,ue,me,xe)}function Pe(z,oe,ie,le,ue,me,xe){return Ee(ie^(oe|~le),z,oe,ue,me,xe)}function de(z,oe){var ie=(z&65535)+(oe&65535),le=(z>>16)+(oe>>16)+(ie>>16);return le<<16|ie&65535}function ee(z,oe){return z<<oe|z>>>32-oe}Ge.exports=function(oe){return fe.hash(oe,be,16)}},{"./helpers":462}],464:[function(ae,Ge,Re){"use strict";var fe=ae("./helpers");function pe(ve,Pe){ve[Pe>>5]|=128<<24-Pe%32,ve[(Pe+64>>9<<4)+15]=Pe;for(var de=Array(80),ee=1732584193,z=-271733879,oe=-1732584194,ie=271733878,le=-1009589776,ue=0;ue<ve.length;ue+=16){for(var me=ee,xe=z,Ae=oe,De=ie,Fe=le,je=0;je<80;je++){je<16?de[je]=ve[ue+je]:de[je]=Te(de[je-3]^de[je-8]^de[je-14]^de[je-16],1);var Le=we(we(Te(ee,5),be(je,z,oe,ie)),we(we(le,de[je]),Ee(je)));le=ie,ie=oe,oe=Te(z,30),z=ee,ee=Le}ee=we(ee,me),z=we(z,xe),oe=we(oe,Ae),ie=we(ie,De),le=we(le,Fe)}return Array(ee,z,oe,ie,le)}function be(ve,Pe,de,ee){return ve<20?Pe&de|~Pe&ee:ve<40?Pe^de^ee:ve<60?Pe&de|Pe&ee|de&ee:Pe^de^ee}function Ee(ve){return ve<20?1518500249:ve<40?1859775393:ve<60?-1894007588:-899497514}function we(ve,Pe){var de=(ve&65535)+(Pe&65535),ee=(ve>>16)+(Pe>>16)+(de>>16);return ee<<16|de&65535}function Te(ve,Pe){return ve<<Pe|ve>>>32-Pe}Ge.exports=function(Pe){return fe.hash(Pe,pe,20,!0)}},{"./helpers":462}],465:[function(ae,Ge,Re){"use strict";Ge.exports=function(){return function(){}}},{}],466:[function(ae,Ge,Re){(function(fe){(function(){"use strict";var pe=ae("@babel/runtime/helpers/interopRequireDefault"),be=pe(ae("@babel/runtime/helpers/typeof")),Ee=ae("stream"),we=Ee.Stream,Te=ae("../lib/common/utils/isArray"),ve=Te.isArray;Ge.exports.string=function(ee){return typeof ee=="string"},Ge.exports.array=ve,Ge.exports.buffer=fe.isBuffer;function Pe(de){return de instanceof we}Ge.exports.writableStream=function(ee){return Pe(ee)&&typeof ee._write=="function"&&(0,be.default)(ee._writableState)==="object"}}).call(this)}).call(this,{isBuffer:ae("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(ae,Ge,Re){"use strict";var fe=ae("immediate"),pe=Ge.exports={};pe.nextTick=fe,pe.title="browser",pe.browser=!0,pe.env={},pe.argv=[],pe.version="",pe.versions={};function be(){}pe.on=be,pe.addListener=be,pe.once=be,pe.off=be,pe.removeListener=be,pe.removeAllListeners=be,pe.emit=be,pe.prependListener=be,pe.prependOnceListener=be,pe.listeners=function(Ee){return[]},pe.binding=function(Ee){throw new Error("process.binding is not supported")},pe.cwd=function(){return"/"},pe.chdir=function(Ee){throw new Error("process.chdir is not supported")},pe.umask=function(){return 0}},{immediate:358}],468:[function(ae,Ge,Re){(function(fe){(function(){"use strict";ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.search.js");var pe=ae("./lib/request"),be=ae("./lib/response"),Ee=ae("xtend"),we=ae("builtin-status-codes"),Te=ae("url"),ve=Re;ve.request=function(Pe,de){typeof Pe=="string"?Pe=Te.parse(Pe):Pe=Ee(Pe);var ee=fe.location.protocol.search(/^https?:$/)===-1?"http:":"",z=Pe.protocol||ee,oe=Pe.hostname||Pe.host,ie=Pe.port,le=Pe.path||"/";oe&&oe.indexOf(":")!==-1&&(oe="["+oe+"]"),Pe.url=(oe?z+"//"+oe:"")+(ie?":"+ie:"")+le,Pe.method=(Pe.method||"GET").toUpperCase(),Pe.headers=Pe.headers||{};var ue=new pe(Pe);return de&&ue.on("response",de),ue},ve.get=function(de,ee){var z=ve.request(de,ee);return z.end(),z},ve.ClientRequest=pe,ve.IncomingMessage=be.IncomingMessage,ve.Agent=function(){},ve.Agent.defaultMaxSockets=4,ve.globalAgent=new ve.Agent,ve.STATUS_CODES=we,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 vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(ae,Ge,Re){(function(fe){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.array-buffer.constructor.js"),ae("core-js/modules/es.array-buffer.slice.js"),ae("core-js/modules/es.array.slice.js"),Re.fetch=ve(fe.fetch)&&ve(fe.ReadableStream),Re.writableStream=ve(fe.WritableStream),Re.abortController=ve(fe.AbortController),Re.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),Re.blobConstructor=!0}catch(Pe){}var pe;function be(){if(pe!==void 0)return pe;if(fe.XMLHttpRequest){pe=new fe.XMLHttpRequest;try{pe.open("GET",fe.XDomainRequest?"/":"https://example.com")}catch(Pe){pe=null}}else pe=null;return pe}function Ee(Pe){var de=be();if(!de)return!1;try{return de.responseType=Pe,de.responseType===Pe}catch(ee){}return!1}var we=typeof fe.ArrayBuffer!="undefined",Te=we&&ve(fe.ArrayBuffer.prototype.slice);Re.arraybuffer=Re.fetch||we&&Ee("arraybuffer"),Re.msstream=!Re.fetch&&Te&&Ee("ms-stream"),Re.mozchunkedarraybuffer=!Re.fetch&&we&&Ee("moz-chunked-arraybuffer"),Re.overrideMimeType=Re.fetch||(be()?ve(be().overrideMimeType):!1),Re.vbArray=ve(fe.VBArray);function ve(Pe){return typeof Pe=="function"}pe=null}).call(this)}).call(this,typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(ae,Ge,Re){(function(fe,pe,be){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.regexp.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.array.map.js"),ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.split.js");var Ee=ae("./capability"),we=ae("inherits"),Te=ae("./response"),ve=ae("readable-stream"),Pe=ae("to-arraybuffer"),de=Te.IncomingMessage,ee=Te.readyStates;function z(ue,me){return Ee.fetch&&me?"fetch":Ee.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Ee.msstream?"ms-stream":Ee.arraybuffer&&ue?"arraybuffer":Ee.vbArray&&ue?"text:vbarray":"text"}var oe=Ge.exports=function(ue){var me=this;ve.Writable.call(me),me._opts=ue,me._body=[],me._headers={},ue.auth&&me.setHeader("Authorization","Basic "+new be(ue.auth).toString("base64")),Object.keys(ue.headers).forEach(function(De){me.setHeader(De,ue.headers[De])});var xe,Ae=!0;if(ue.mode==="disable-fetch"||"requestTimeout"in ue&&!Ee.abortController)Ae=!1,xe=!0;else if(ue.mode==="prefer-streaming")xe=!1;else if(ue.mode==="allow-wrong-content-type")xe=!Ee.overrideMimeType;else if(!ue.mode||ue.mode==="default"||ue.mode==="prefer-fast")xe=!0;else throw new Error("Invalid value for opts.mode");me._mode=z(xe,Ae),me._fetchTimer=null,me.on("finish",function(){me._onFinish()})};we(oe,ve.Writable),oe.prototype.setHeader=function(ue,me){var xe=this,Ae=ue.toLowerCase();le.indexOf(Ae)===-1&&(xe._headers[Ae]={name:ue,value:me})},oe.prototype.getHeader=function(ue){var me=this._headers[ue.toLowerCase()];return me?me.value:null},oe.prototype.removeHeader=function(ue){var me=this;delete me._headers[ue.toLowerCase()]},oe.prototype._onFinish=function(){var ue=this;if(!ue._destroyed){var me=ue._opts,xe=ue._headers,Ae=null;me.method!=="GET"&&me.method!=="HEAD"&&(Ee.arraybuffer?Ae=Pe(be.concat(ue._body)):Ee.blobConstructor?Ae=new pe.Blob(ue._body.map(function(Ue){return Pe(Ue)}),{type:(xe["content-type"]||{}).value||""}):Ae=be.concat(ue._body).toString());var De=[];if(Object.keys(xe).forEach(function(Ue){var Je=xe[Ue].name,He=xe[Ue].value;Array.isArray(He)?He.forEach(function(We){De.push([Je,We])}):De.push([Je,He])}),ue._mode==="fetch"){var Fe=null,je=null;if(Ee.abortController){var Le=new AbortController;Fe=Le.signal,ue._fetchAbortController=Le,"requestTimeout"in me&&me.requestTimeout!==0&&(ue._fetchTimer=pe.setTimeout(function(){ue.emit("requestTimeout"),ue._fetchAbortController&&ue._fetchAbortController.abort()},me.requestTimeout))}pe.fetch(ue._opts.url,{method:ue._opts.method,headers:De,body:Ae||void 0,mode:"cors",credentials:me.withCredentials?"include":"same-origin",signal:Fe}).then(function(Ue){ue._fetchResponse=Ue,ue._connect()},function(Ue){pe.clearTimeout(ue._fetchTimer),ue._destroyed||ue.emit("error",Ue)})}else{var Be=ue._xhr=new pe.XMLHttpRequest;try{Be.open(ue._opts.method,ue._opts.url,!0)}catch(Ue){fe.nextTick(function(){ue.emit("error",Ue)});return}"responseType"in Be&&(Be.responseType=ue._mode.split(":")[0]),"withCredentials"in Be&&(Be.withCredentials=!!me.withCredentials),ue._mode==="text"&&"overrideMimeType"in Be&&Be.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in me&&(Be.timeout=me.requestTimeout,Be.ontimeout=function(){ue.emit("requestTimeout")}),De.forEach(function(Ue){Be.setRequestHeader(Ue[0],Ue[1])}),ue._response=null,Be.onreadystatechange=function(){switch(Be.readyState){case ee.LOADING:case ee.DONE:ue._onXHRProgress();break}},ue._mode==="moz-chunked-arraybuffer"&&(Be.onprogress=function(){ue._onXHRProgress()}),Be.onerror=function(){ue._destroyed||ue.emit("error",new Error("XHR error"))};try{Be.send(Ae)}catch(Ue){fe.nextTick(function(){ue.emit("error",Ue)});return}}}};function ie(ue){try{var me=ue.status;return me!==null&&me!==0}catch(xe){return!1}}oe.prototype._onXHRProgress=function(){var ue=this;!ie(ue._xhr)||ue._destroyed||(ue._response||ue._connect(),ue._response._onXHRProgress())},oe.prototype._connect=function(){var ue=this;ue._destroyed||(ue._response=new de(ue._xhr,ue._fetchResponse,ue._mode,ue._fetchTimer),ue._response.on("error",function(me){ue.emit("error",me)}),ue.emit("response",ue._response))},oe.prototype._write=function(ue,me,xe){var Ae=this;Ae._body.push(ue),xe()},oe.prototype.abort=oe.prototype.destroy=function(){var ue=this;ue._destroyed=!0,pe.clearTimeout(ue._fetchTimer),ue._response&&(ue._response._destroyed=!0),ue._xhr?ue._xhr.abort():ue._fetchAbortController&&ue._fetchAbortController.abort()},oe.prototype.end=function(ue,me,xe){var Ae=this;typeof ue=="function"&&(xe=ue,ue=void 0),ve.Writable.prototype.end.call(Ae,ue,me,xe)},oe.prototype.flushHeaders=function(){},oe.prototype.setTimeout=function(){},oe.prototype.setNoDelay=function(){},oe.prototype.setSocketKeepAlive=function(){};var le=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,ae("_process"),typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ae("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(ae,Ge,Re){(function(fe,pe,be){(function(){"use strict";ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/web.dom-collections.for-each.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.split.js"),ae("core-js/modules/es.string.match.js"),ae("core-js/modules/es.array.iterator.js"),ae("core-js/modules/es.array-buffer.slice.js"),ae("core-js/modules/es.typed-array.uint8-array.js"),ae("core-js/modules/es.typed-array.copy-within.js"),ae("core-js/modules/es.typed-array.every.js"),ae("core-js/modules/es.typed-array.fill.js"),ae("core-js/modules/es.typed-array.filter.js"),ae("core-js/modules/es.typed-array.find.js"),ae("core-js/modules/es.typed-array.find-index.js"),ae("core-js/modules/es.typed-array.for-each.js"),ae("core-js/modules/es.typed-array.includes.js"),ae("core-js/modules/es.typed-array.index-of.js"),ae("core-js/modules/es.typed-array.iterator.js"),ae("core-js/modules/es.typed-array.join.js"),ae("core-js/modules/es.typed-array.last-index-of.js"),ae("core-js/modules/es.typed-array.map.js"),ae("core-js/modules/es.typed-array.reduce.js"),ae("core-js/modules/es.typed-array.reduce-right.js"),ae("core-js/modules/es.typed-array.reverse.js"),ae("core-js/modules/es.typed-array.set.js"),ae("core-js/modules/es.typed-array.slice.js"),ae("core-js/modules/es.typed-array.some.js"),ae("core-js/modules/es.typed-array.sort.js"),ae("core-js/modules/es.typed-array.subarray.js"),ae("core-js/modules/es.typed-array.to-locale-string.js"),ae("core-js/modules/es.typed-array.to-string.js"),ae("core-js/modules/es.array.slice.js");var Ee=ae("./capability"),we=ae("inherits"),Te=ae("readable-stream"),ve=Re.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},Pe=Re.IncomingMessage=function(de,ee,z,oe){var ie=this;if(Te.Readable.call(ie),ie._mode=z,ie.headers={},ie.rawHeaders=[],ie.trailers={},ie.rawTrailers=[],ie.on("end",function(){fe.nextTick(function(){ie.emit("close")})}),z==="fetch"){var le=function Fe(){me.read().then(function(je){if(!ie._destroyed){if(je.done){pe.clearTimeout(oe),ie.push(null);return}ie.push(new be(je.value)),Fe()}}).catch(function(je){pe.clearTimeout(oe),ie._destroyed||ie.emit("error",je)})};if(ie._fetchResponse=ee,ie.url=ee.url,ie.statusCode=ee.status,ie.statusMessage=ee.statusText,ee.headers.forEach(function(Fe,je){ie.headers[je.toLowerCase()]=Fe,ie.rawHeaders.push(je,Fe)}),Ee.writableStream){var ue=new WritableStream({write:function(je){return new Promise(function(Le,Be){ie._destroyed?Be():ie.push(new be(je))?Le():ie._resumeFetch=Le})},close:function(){pe.clearTimeout(oe),ie._destroyed||ie.push(null)},abort:function(je){ie._destroyed||ie.emit("error",je)}});try{ee.body.pipeTo(ue).catch(function(Fe){pe.clearTimeout(oe),ie._destroyed||ie.emit("error",Fe)});return}catch(Fe){}}var me=ee.body.getReader();le()}else{ie._xhr=de,ie._pos=0,ie.url=de.responseURL,ie.statusCode=de.status,ie.statusMessage=de.statusText;var xe=de.getAllResponseHeaders().split(/\r?\n/);if(xe.forEach(function(Fe){var je=Fe.match(/^([^:]+):\s*(.*)/);if(je){var Le=je[1].toLowerCase();Le==="set-cookie"?(ie.headers[Le]===void 0&&(ie.headers[Le]=[]),ie.headers[Le].push(je[2])):ie.headers[Le]!==void 0?ie.headers[Le]+=", "+je[2]:ie.headers[Le]=je[2],ie.rawHeaders.push(je[1],je[2])}}),ie._charset="x-user-defined",!Ee.overrideMimeType){var Ae=ie.rawHeaders["mime-type"];if(Ae){var De=Ae.match(/;\s*charset=([^;])(;|$)/);De&&(ie._charset=De[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};we(Pe,Te.Readable),Pe.prototype._read=function(){var de=this,ee=de._resumeFetch;ee&&(de._resumeFetch=null,ee())},Pe.prototype._onXHRProgress=function(){var de=this,ee=de._xhr,z=null;switch(de._mode){case"text:vbarray":if(ee.readyState!==ve.DONE)break;try{z=new pe.VBArray(ee.responseBody).toArray()}catch(me){}if(z!==null){de.push(new be(z));break}case"text":try{z=ee.responseText}catch(me){de._mode="text:vbarray";break}if(z.length>de._pos){var oe=z.substr(de._pos);if(de._charset==="x-user-defined"){for(var ie=new be(oe.length),le=0;le<oe.length;le++)ie[le]=oe.charCodeAt(le)&255;de.push(ie)}else de.push(oe,de._charset);de._pos=z.length}break;case"arraybuffer":if(ee.readyState!==ve.DONE||!ee.response)break;z=ee.response,de.push(new be(new Uint8Array(z)));break;case"moz-chunked-arraybuffer":if(z=ee.response,ee.readyState!==ve.LOADING||!z)break;de.push(new be(new Uint8Array(z)));break;case"ms-stream":if(z=ee.response,ee.readyState!==ve.LOADING)break;var ue=new pe.MSStreamReader;ue.onprogress=function(){ue.result.byteLength>de._pos&&(de.push(new be(new Uint8Array(ue.result.slice(de._pos)))),de._pos=ue.result.byteLength)},ue.onload=function(){de.push(null)},ue.readAsArrayBuffer(z);break}de._xhr.readyState===ve.DONE&&de._mode!=="ms-stream"&&de.push(null)}}).call(this)}).call(this,ae("_process"),typeof vn!="undefined"?vn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ae("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/helpers/typeof"));ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.search.js"),ae("core-js/modules/es.array.concat.js"),ae("core-js/modules/es.string.split.js"),ae("core-js/modules/es.string.replace.js"),ae("core-js/modules/es.array.join.js"),ae("core-js/modules/es.string.trim.js"),ae("core-js/modules/es.string.match.js"),ae("core-js/modules/es.array.slice.js"),ae("core-js/modules/es.object.keys.js"),ae("core-js/modules/es.array.splice.js");var be=ae("punycode"),Ee=ae("./util");Re.parse=je,Re.resolve=Be,Re.resolveObject=Ue,Re.format=Le,Re.Url=we;function we(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Te=/^([a-z0-9.+-]+:)/i,ve=/:[0-9]*$/,Pe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,de=["<",">",'"',"`"," ","\r",`
|
|
`," "],ee=["{","}","|","\\","^","`"].concat(de),z=["'"].concat(ee),oe=["%","/","?",";","#"].concat(z),ie=["/","?","#"],le=255,ue=/^[+a-z0-9A-Z_-]{0,63}$/,me=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,xe={javascript:!0,"javascript:":!0},Ae={javascript:!0,"javascript:":!0},De={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Fe=ae("querystring");function je(Je,He,We){if(Je&&Ee.isObject(Je)&&Je instanceof we)return Je;var at=new we;return at.parse(Je,He,We),at}we.prototype.parse=function(Je,He,We){if(!Ee.isString(Je))throw new TypeError("Parameter 'url' must be a string, not "+(0,pe.default)(Je));var at=Je.indexOf("?"),ft=at!==-1&&at<Je.indexOf("#")?"?":"#",mt=Je.split(ft),Lt=/\\/g;mt[0]=mt[0].replace(Lt,"/"),Je=mt.join(ft);var Xe=Je;if(Xe=Xe.trim(),!We&&Je.split("#").length===1){var et=Pe.exec(Xe);if(et)return this.path=Xe,this.href=Xe,this.pathname=et[1],et[2]?(this.search=et[2],He?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):He&&(this.search="",this.query={}),this}var lt=Te.exec(Xe);if(lt){lt=lt[0];var vt=lt.toLowerCase();this.protocol=vt,Xe=Xe.substr(lt.length)}if(We||lt||Xe.match(/^\/\/[^@\/]+@[^@\/]+/)){var wt=Xe.substr(0,2)==="//";wt&&!(lt&&Ae[lt])&&(Xe=Xe.substr(2),this.slashes=!0)}if(!Ae[lt]&&(wt||lt&&!De[lt])){for(var ht=-1,dt=0;dt<ie.length;dt++){var ut=Xe.indexOf(ie[dt]);ut!==-1&&(ht===-1||ut<ht)&&(ht=ut)}var Pt,yt;ht===-1?yt=Xe.lastIndexOf("@"):yt=Xe.lastIndexOf("@",ht),yt!==-1&&(Pt=Xe.slice(0,yt),Xe=Xe.slice(yt+1),this.auth=decodeURIComponent(Pt)),ht=-1;for(var dt=0;dt<oe.length;dt++){var ut=Xe.indexOf(oe[dt]);ut!==-1&&(ht===-1||ut<ht)&&(ht=ut)}ht===-1&&(ht=Xe.length),this.host=Xe.slice(0,ht),Xe=Xe.slice(ht),this.parseHost(),this.hostname=this.hostname||"";var gt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!gt)for(var Tt=this.hostname.split("."),dt=0,ct=Tt.length;dt<ct;dt++){var Ye=Tt[dt];if(Ye&&!Ye.match(ue)){for(var Ze="",Se=0,Ne=Ye.length;Se<Ne;Se++)Ye.charCodeAt(Se)>127?Ze+="x":Ze+=Ye[Se];if(!Ze.match(ue)){var $e=Tt.slice(0,dt),nt=Tt.slice(dt+1),Ie=Ye.match(me);Ie&&($e.push(Ie[1]),nt.unshift(Ie[2])),nt.length&&(Xe="/"+nt.join(".")+Xe),this.hostname=$e.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),gt||(this.hostname=be.toASCII(this.hostname));var ze=this.port?":"+this.port:"",Ve=this.hostname||"";this.host=Ve+ze,this.href+=this.host,gt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Xe[0]!=="/"&&(Xe="/"+Xe))}if(!xe[vt])for(var dt=0,ct=z.length;dt<ct;dt++){var it=z[dt];if(Xe.indexOf(it)!==-1){var St=encodeURIComponent(it);St===it&&(St=escape(it)),Xe=Xe.split(it).join(St)}}var Ct=Xe.indexOf("#");Ct!==-1&&(this.hash=Xe.substr(Ct),Xe=Xe.slice(0,Ct));var It=Xe.indexOf("?");if(It!==-1?(this.search=Xe.substr(It),this.query=Xe.substr(It+1),He&&(this.query=Fe.parse(this.query)),Xe=Xe.slice(0,It)):He&&(this.search="",this.query={}),Xe&&(this.pathname=Xe),De[vt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ze=this.pathname||"",jt=this.search||"";this.path=ze+jt}return this.href=this.format(),this};function Le(Je){return Ee.isString(Je)&&(Je=je(Je)),Je instanceof we?Je.format():we.prototype.format.call(Je)}we.prototype.format=function(){var Je=this.auth||"";Je&&(Je=encodeURIComponent(Je),Je=Je.replace(/%3A/i,":"),Je+="@");var He=this.protocol||"",We=this.pathname||"",at=this.hash||"",ft=!1,mt="";this.host?ft=Je+this.host:this.hostname&&(ft=Je+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ft+=":"+this.port)),this.query&&Ee.isObject(this.query)&&Object.keys(this.query).length&&(mt=Fe.stringify(this.query));var Lt=this.search||mt&&"?"+mt||"";return He&&He.substr(-1)!==":"&&(He+=":"),this.slashes||(!He||De[He])&&ft!==!1?(ft="//"+(ft||""),We&&We.charAt(0)!=="/"&&(We="/"+We)):ft||(ft=""),at&&at.charAt(0)!=="#"&&(at="#"+at),Lt&&Lt.charAt(0)!=="?"&&(Lt="?"+Lt),We=We.replace(/[?#]/g,function(Xe){return encodeURIComponent(Xe)}),Lt=Lt.replace("#","%23"),He+ft+We+Lt+at};function Be(Je,He){return je(Je,!1,!0).resolve(He)}we.prototype.resolve=function(Je){return this.resolveObject(je(Je,!1,!0)).format()};function Ue(Je,He){return Je?je(Je,!1,!0).resolveObject(He):He}we.prototype.resolveObject=function(Je){if(Ee.isString(Je)){var He=new we;He.parse(Je,!1,!0),Je=He}for(var We=new we,at=Object.keys(this),ft=0;ft<at.length;ft++){var mt=at[ft];We[mt]=this[mt]}if(We.hash=Je.hash,Je.href==="")return We.href=We.format(),We;if(Je.slashes&&!Je.protocol){for(var Lt=Object.keys(Je),Xe=0;Xe<Lt.length;Xe++){var et=Lt[Xe];et!=="protocol"&&(We[et]=Je[et])}return De[We.protocol]&&We.hostname&&!We.pathname&&(We.path=We.pathname="/"),We.href=We.format(),We}if(Je.protocol&&Je.protocol!==We.protocol){if(!De[Je.protocol]){for(var lt=Object.keys(Je),vt=0;vt<lt.length;vt++){var wt=lt[vt];We[wt]=Je[wt]}return We.href=We.format(),We}if(We.protocol=Je.protocol,!Je.host&&!Ae[Je.protocol]){for(var ct=(Je.pathname||"").split("/");ct.length&&!(Je.host=ct.shift()););Je.host||(Je.host=""),Je.hostname||(Je.hostname=""),ct[0]!==""&&ct.unshift(""),ct.length<2&&ct.unshift(""),We.pathname=ct.join("/")}else We.pathname=Je.pathname;if(We.search=Je.search,We.query=Je.query,We.host=Je.host||"",We.auth=Je.auth,We.hostname=Je.hostname||Je.host,We.port=Je.port,We.pathname||We.search){var ht=We.pathname||"",dt=We.search||"";We.path=ht+dt}return We.slashes=We.slashes||Je.slashes,We.href=We.format(),We}var ut=We.pathname&&We.pathname.charAt(0)==="/",Pt=Je.host||Je.pathname&&Je.pathname.charAt(0)==="/",yt=Pt||ut||We.host&&Je.pathname,gt=yt,Tt=We.pathname&&We.pathname.split("/")||[],ct=Je.pathname&&Je.pathname.split("/")||[],Ye=We.protocol&&!De[We.protocol];if(Ye&&(We.hostname="",We.port=null,We.host&&(Tt[0]===""?Tt[0]=We.host:Tt.unshift(We.host)),We.host="",Je.protocol&&(Je.hostname=null,Je.port=null,Je.host&&(ct[0]===""?ct[0]=Je.host:ct.unshift(Je.host)),Je.host=null),yt=yt&&(ct[0]===""||Tt[0]==="")),Pt)We.host=Je.host||Je.host===""?Je.host:We.host,We.hostname=Je.hostname||Je.hostname===""?Je.hostname:We.hostname,We.search=Je.search,We.query=Je.query,Tt=ct;else if(ct.length)Tt||(Tt=[]),Tt.pop(),Tt=Tt.concat(ct),We.search=Je.search,We.query=Je.query;else if(!Ee.isNullOrUndefined(Je.search)){if(Ye){We.hostname=We.host=Tt.shift();var Ze=We.host&&We.host.indexOf("@")>0?We.host.split("@"):!1;Ze&&(We.auth=Ze.shift(),We.host=We.hostname=Ze.shift())}return We.search=Je.search,We.query=Je.query,(!Ee.isNull(We.pathname)||!Ee.isNull(We.search))&&(We.path=(We.pathname?We.pathname:"")+(We.search?We.search:"")),We.href=We.format(),We}if(!Tt.length)return We.pathname=null,We.search?We.path="/"+We.search:We.path=null,We.href=We.format(),We;for(var Se=Tt.slice(-1)[0],Ne=(We.host||Je.host||Tt.length>1)&&(Se==="."||Se==="..")||Se==="",$e=0,nt=Tt.length;nt>=0;nt--)Se=Tt[nt],Se==="."?Tt.splice(nt,1):Se===".."?(Tt.splice(nt,1),$e++):$e&&(Tt.splice(nt,1),$e--);if(!yt&&!gt)for(;$e--;$e)Tt.unshift("..");yt&&Tt[0]!==""&&(!Tt[0]||Tt[0].charAt(0)!=="/")&&Tt.unshift(""),Ne&&Tt.join("/").substr(-1)!=="/"&&Tt.push("");var Ie=Tt[0]===""||Tt[0]&&Tt[0].charAt(0)==="/";if(Ye){We.hostname=We.host=Ie?"":Tt.length?Tt.shift():"";var Ze=We.host&&We.host.indexOf("@")>0?We.host.split("@"):!1;Ze&&(We.auth=Ze.shift(),We.host=We.hostname=Ze.shift())}return yt=yt||We.host&&Tt.length,yt&&!Ie&&Tt.unshift(""),Tt.length?We.pathname=Tt.join("/"):(We.pathname=null,We.path=null),(!Ee.isNull(We.pathname)||!Ee.isNull(We.search))&&(We.path=(We.pathname?We.pathname:"")+(We.search?We.search:"")),We.auth=Je.auth||We.auth,We.slashes=We.slashes||Je.slashes,We.href=We.format(),We},we.prototype.parseHost=function(){var Je=this.host,He=ve.exec(Je);He&&(He=He[0],He!==":"&&(this.port=He.substr(1)),Je=Je.substr(0,Je.length-He.length)),Je&&(this.hostname=Je)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(ae,Ge,Re){"use strict";var fe=ae("@babel/runtime/helpers/interopRequireDefault"),pe=fe(ae("@babel/runtime/helpers/typeof"));Ge.exports={isString:function(Ee){return typeof Ee=="string"},isObject:function(Ee){return(0,pe.default)(Ee)==="object"&&Ee!==null},isNull:function(Ee){return Ee===null},isNullOrUndefined:function(Ee){return Ee==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(ae,Ge,Re){"use strict";ae("core-js/modules/es.number.constructor.js"),Re.encodeURIComponent=function(fe){try{return encodeURIComponent(fe)}catch(pe){return fe}},Re.escape=ae("escape-html"),Re.timestamp=function(pe){if(pe){var be=pe;return typeof be=="string"&&(be=Number(be)),String(pe).length===10&&(be*=1e3),new Date(be)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(ae,Ge,Re){(function(fe,pe){(function(){"use strict";var be=ae("@babel/runtime/helpers/interopRequireDefault"),Ee=be(ae("@babel/runtime/helpers/typeof"));ae("core-js/modules/es.string.trim.js"),ae("core-js/modules/es.regexp.exec.js"),ae("core-js/modules/es.string.split.js"),ae("core-js/modules/es.object.to-string.js"),ae("core-js/modules/es.promise.js"),ae("core-js/modules/es.function.name.js"),ae("core-js/modules/es.array.concat.js");var we=ae("util"),Te=ae("url"),ve=ae("http"),Pe=ae("https"),de=ae("debug")("urllib"),ee=ae("humanize-ms"),z=0,oe=Math.pow(2,31)-10,ie=/^https?:\/\//i;function le(Ae,De){return Ae===void 0?De:Ae}function ue(Ae){return Ae?Ae.split(";")[0].trim().toLowerCase():""}function me(Ae,De){return function(Fe,je,Le){if(Fe)return De(Fe);Ae({data:je,status:Le.statusCode,headers:Le.headers,res:Le})}}Re.TIMEOUTS=[ee("300s"),ee("300s")];var xe=["json","text"];Re.request=function(De,Fe,je){return arguments.length===2&&typeof Fe=="function"&&(je=Fe,Fe=null),typeof je=="function"?Re.requestWithCallback(De,Fe,je):new Promise(function(Le,Be){Re.requestWithCallback(De,Fe,me(Le,Be))})},Re.requestWithCallback=function(De,Fe,je){if(!De||typeof De!="string"&&(0,Ee.default)(De)!=="object"){var Le=we.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(Le)}arguments.length===2&&typeof Fe=="function"&&(je=Fe,Fe=null),Fe=Fe||{},z>=oe&&(z=0);var Be=++z;Fe.requestUrls=Fe.requestUrls||[];var Ue={requestId:Be,url:De,args:Fe,ctx:Fe.ctx};Fe.emitter&&Fe.emitter.emit("request",Ue),Fe.timeout=Fe.timeout||Re.TIMEOUTS,Fe.maxRedirects=Fe.maxRedirects||10,Fe.streaming=Fe.streaming||Fe.customResponse;var Je=Date.now(),He;typeof De=="string"?(ie.test(De)||(De="https://"+De),He=Te.parse(De)):He=De;var We=(Fe.type||Fe.method||He.method||"GET").toUpperCase(),at=He.port||80,ft=ve,mt=le(Fe.agent,Re.agent),Lt=Fe.fixJSONCtlChars;He.protocol==="https:"&&(ft=Pe,mt=le(Fe.httpsAgent,Re.httpsAgent),He.port||(at=443));var Xe={host:He.hostname||He.host||"localhost",path:He.path||"/",method:We,port:at,agent:mt,headers:Fe.headers||{},lookup:Fe.lookup};Array.isArray(Fe.timeout)?Xe.requestTimeout=Fe.timeout[Fe.timeout.length-1]:typeof Fe.timeout!="undefined"&&(Xe.requestTimeout=Fe.timeout);var et=Fe.auth||He.auth;et&&(Xe.auth=et);var lt=Fe.content||Fe.data,vt=We==="GET"||We==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&<&&!(typeof lt=="string"||pe.isBuffer(lt)))if(vt)lt=Fe.nestedQuerystring?qs.stringify(lt):querystring.stringify(lt);else{var wt=Xe.headers["Content-Type"]||Xe.headers["content-type"];wt||(Fe.contentType==="json"?wt="application/json":wt="application/x-www-form-urlencoded",Xe.headers["Content-Type"]=wt),ue(wt)==="application/json"?lt=JSON.stringify(lt):lt=Fe.nestedQuerystring?qs.stringify(lt):querystring.stringify(lt)}vt&<&&(Xe.path+=(He.query?"&":"?")+lt,lt=null);var ht=0;if(lt){var dt=lt.length;pe.isBuffer(lt)||(dt=pe.byteLength(lt)),ht=Xe.headers["Content-Length"]=dt}Fe.dataType==="json"&&(Xe.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest(Xe);var ut=null,Pt=null,yt=null,gt=!1,Tt=!1,ct=0,Ye=-1,Ze=!1,Se="",Ne="",$e=null;Fe.timing&&($e={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function nt(){ut&&(clearTimeout(ut),ut=null)}function Ie(){Pt&&(clearTimeout(Pt),Pt=null)}function ze(qt,On,fn){if(Ie(),!je){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Be,fe.pid,Xe.method,De),qt&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),Be,fe.pid,qt.name,qt.message,qt.stack);return}var Wt=je;je=null;var Bn={};fn&&(Ye=fn.statusCode,Bn=fn.headers);var zn=Date.now()-Je;$e&&($e.contentDownload=zn),de("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",zn,ct,Ye,Xe.method,Xe.host,Xe.path,Tt,$e);var Yn={status:Ye,statusCode:Ye,headers:Bn,size:ct,aborted:Ze,rt:zn,keepAliveSocket:Tt,data:On,requestUrls:Fe.requestUrls,timing:$e,remoteAddress:Se,remotePort:Ne};if(qt){var fr="";mt&&typeof mt.getCurrentStatus=="function"&&(fr=", agent status: "+JSON.stringify(mt.getCurrentStatus())),qt.message+=", "+Xe.method+" "+De+" "+Ye+" (connected: "+gt+", keepalive socket: "+Tt+fr+`)
|
|
headers: `+JSON.stringify(Bn),qt.data=On,qt.path=Xe.path,qt.status=Ye,qt.headers=Bn,qt.res=Yn}Wt(qt,On,Fe.streaming?fn:Yn),Fe.emitter&&(Ue.url=De,Ue.socket=un&&un.connection,Ue.options=Xe,Ue.size=ht,Fe.emitter.emit("response",{requestId:Be,error:qt,ctx:Fe.ctx,req:Ue,res:Yn}))}function Ve(qt){var On=null;if(Fe.followRedirect&&statuses.redirect[qt.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var fn=qt.headers.location;if(!fn)On=new Error("Got statusCode "+qt.statusCode+" but cannot resolve next location from headers"),On.name="FollowRedirectError";else if(Fe._followRedirectCount>Fe.maxRedirects)On=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),On.name="MaxRedirectError";else{var Wt=Fe.formatRedirectUrl?Fe.formatRedirectUrl(De,fn):Te.resolve(De,fn);de("Request#%d %s: `redirected` from %s to %s",Be,Xe.path,De,Wt),Ie(),Fe.headers&&Fe.headers.Host&&ie.test(fn)&&(Fe.headers.Host=null);var Bn=je;return je=null,Re.requestWithCallback(Wt,Fe,Bn),{redirect:!0,error:null}}}return{redirect:!1,error:On}}Fe.gzip&&!Xe.headers["Accept-Encoding"]&&!Xe.headers["accept-encoding"]&&(Xe.headers["Accept-Encoding"]="gzip");function it(qt,On,fn){var Wt=qt.headers["content-encoding"];return fn(null,On,Wt)}var St=Fe.writeStream;de("Request#%d %s %s with headers %j, options.path: %s",Be,We,De,Xe.headers,Xe.path),Fe.requestUrls.push(De);function Ct(qt){if($e&&($e.waiting=Date.now()-Je),de("Request#%d %s `req response` event emit: status %d, headers: %j",Be,De,qt.statusCode,qt.headers),Fe.streaming){var On=Ve(qt);if(On.redirect){qt.resume();return}return On.error?(qt.resume(),ze(On.error,null,qt)):ze(null,null,qt)}if(qt.on("close",function(){de("Request#%d %s: `res close` event emit, total size %d",Be,De,ct)}),qt.on("error",function(){de("Request#%d %s: `res error` event emit, total size %d",Be,De,ct)}),qt.on("aborted",function(){Ze=!0,de("Request#%d %s: `res aborted` event emit, total size %d",Be,De,ct)}),St){var fn=Ve(qt);if(fn.redirect){qt.resume();return}return fn.error?(qt.resume(),St.end(),ze(fn.error,null,qt)):(Fe.consumeWriteStream===!1?qt.on("end",ze.bind(null,null,null,qt)):St.on("close",function(){de("Request#%d %s: writeStream close event emitted",Be,De),ze(yt||null,null,qt)}),qt.pipe(St))}var Wt=[];qt.on("data",function(Bn){de("Request#%d %s: `res data` event emit, size %d",Be,De,Bn.length),ct+=Bn.length,Wt.push(Bn)}),qt.on("end",function(){var Bn=pe.concat(Wt,ct);if(de("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Be,De,ct,qt._dumped),yt)return ze(yt,Bn,qt);var zn=Ve(qt);if(zn.error)return ze(zn.error,Bn,qt);zn.redirect||it(qt,Bn,function(Yn,fr,Gr){if(Yn)return ze(Yn,Bn,qt);if(!Gr&&xe.indexOf(Fe.dataType)>=0){try{fr=decodeBodyByCharset(fr,qt)}catch(ni){return de("decodeBodyByCharset error: %s",ni),ze(null,fr,qt)}if(Fe.dataType==="json")if(ct===0)fr=null;else{var lr=parseJSON(fr,Lt);lr.error?Yn=lr.error:fr=lr.data}}Ze&&de("Request#%d %s: Remote socket was terminated before `response.end()` was called",Be,De),ze(Yn,fr,qt)})})}var It,jt;Array.isArray(Fe.timeout)?(It=ee(Fe.timeout[0]),jt=ee(Fe.timeout[1])):It=jt=ee(Fe.timeout),de("ConnectTimeout: %d, ResponseTimeout: %d",It,jt);function Kt(){de("Connect timer ticking, timeout: %d",It),ut=setTimeout(function(){ut=null,Ye===-1&&(Ye=-2);var qt="Connect timeout for "+It+"ms",On="ConnectionTimeoutError";un.socket||(On="SocketAssignTimeoutError",qt+=", working sockets is full"),yt=new Error(qt),yt.name=On,yt.requestId=Be,de("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Be,De,yt.name,qt,gt),hn()},It)}function an(){de("Response timer ticking, timeout: %d",jt),Pt=setTimeout(function(){Pt=null;var qt="Response timeout for "+jt+"ms",On="ResponseTimeoutError";yt=new Error(qt),yt.name=On,yt.requestId=Be,de("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Be,De,yt.name,qt,gt),hn()},jt)}var un;Xe.mode=Fe.mode?Fe.mode:"";try{un=ft.request(Xe,Ct)}catch(qt){return ze(qt)}typeof window=="undefined"?Kt():un.on("requestTimeout",function(){Ye===-1&&(Ye=-2);var qt="Connect timeout for "+It+"ms",On="ConnectionTimeoutError";yt=new Error(qt),yt.name=On,yt.requestId=Be,hn()});function hn(){de("Request#%d %s abort, connected: %s",Be,De,gt),un.socket||(yt.noSocket=!0,ze(yt)),un.abort()}return $e&&un.on("finish",function(){$e.requestSent=Date.now()-Je}),un.once("socket",function(qt){$e&&($e.queuing=Date.now()-Je);var On=qt.readyState;if(On==="opening"){qt.once("lookup",function(fn,Wt,Bn){de("Request#%d %s lookup: %s, %s, %s",Be,De,fn,Wt,Bn),$e&&($e.dnslookup=Date.now()-Je),Wt&&(Se=Wt)}),qt.once("connect",function(){$e&&($e.connected=Date.now()-Je),nt(),an(),de("Request#%d %s new socket connected",Be,De),gt=!0,Se||(Se=qt.remoteAddress),Ne=qt.remotePort});return}de("Request#%d %s reuse socket connected, readyState: %s",Be,De,On),gt=!0,Tt=!0,Se||(Se=qt.remoteAddress),Ne=qt.remotePort,nt(),an()}),un.on("error",function(qt){(qt.name==="Error"||qt.name==="TypeError")&&(qt.name=gt?"ResponseError":"RequestError"),qt.message+=' (req "error")',de("Request#%d %s `req error` event emit, %s: %s",Be,De,qt.name,qt.message),ze(yt||qt)}),St&&St.once("error",function(qt){qt.message+=' (writeStream "error")',yt=qt,de("Request#%d %s `writeStream error` event emit, %s: %s",Be,De,qt.name,qt.message),hn()}),Fe.stream?(Fe.stream.pipe(un),Fe.stream.once("error",function(qt){qt.message+=' (stream "error")',yt=qt,de("Request#%d %s `readStream error` event emit, %s: %s",Be,De,qt.name,qt.message),hn()})):un.end(lt),un.requestId=Be,un}}).call(this)}).call(this,ae("_process"),ae("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},88386:function(Sn,vn,ot){(function(st){st(ot(4631))})(function(st){st.defineOption("placeholder","",function(be,Ee,we){var Te=we&&we!=st.Init;if(Ee&&!Te)be.on("blur",Re),be.on("change",fe),be.on("swapDoc",fe),st.on(be.getInputField(),"compositionupdate",be.state.placeholderCompose=function(){Ge(be)}),fe(be);else if(!Ee&&Te){be.off("blur",Re),be.off("change",fe),be.off("swapDoc",fe),st.off(be.getInputField(),"compositionupdate",be.state.placeholderCompose),Ft(be);var ve=be.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}Ee&&!be.hasFocus()&&Re(be)});function Ft(be){be.state.placeholder&&(be.state.placeholder.parentNode.removeChild(be.state.placeholder),be.state.placeholder=null)}function ae(be){Ft(be);var Ee=be.state.placeholder=document.createElement("pre");Ee.style.cssText="height: 0; overflow: visible",Ee.style.direction=be.getOption("direction"),Ee.className="CodeMirror-placeholder CodeMirror-line-like";var we=be.getOption("placeholder");typeof we=="string"&&(we=document.createTextNode(we)),Ee.appendChild(we),be.display.lineSpace.insertBefore(Ee,be.display.lineSpace.firstChild)}function Ge(be){setTimeout(function(){var Ee=!1,we=be.getInputField();we.nodeName=="TEXTAREA"?Ee=!we.value:be.lineCount()==1&&(Ee=!/[^\u200b]/.test(we.querySelector(".CodeMirror-line").textContent)),Ee?ae(be):Ft(be)},20)}function Re(be){pe(be)&&ae(be)}function fe(be){var Ee=be.getWrapperElement(),we=pe(be);Ee.className=Ee.className.replace(" CodeMirror-empty","")+(we?" CodeMirror-empty":""),we?ae(be):Ft(be)}function pe(be){return be.lineCount()===1&&be.getLine(0)===""}})},82801:function(Sn,vn,ot){(function(st){st(ot(4631))})(function(st){var Ft={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},ae=st.Pos;st.defineOption("autoCloseBrackets",!1,function(ee,z,oe){oe&&oe!=st.Init&&(ee.removeKeyMap(Re),ee.state.closeBrackets=null),z&&(fe(Ge(z,"pairs")),ee.state.closeBrackets=z,ee.addKeyMap(Re))});function Ge(ee,z){return z=="pairs"&&typeof ee=="string"?ee:typeof ee=="object"&&ee[z]!=null?ee[z]:Ft[z]}var Re={Backspace:Ee,Enter:we};function fe(ee){for(var z=0;z<ee.length;z++){var oe=ee.charAt(z),ie="'"+oe+"'";Re[ie]||(Re[ie]=pe(oe))}}fe(Ft.pairs+"`");function pe(ee){return function(z){return ve(z,ee)}}function be(ee){var z=ee.state.closeBrackets;if(!z||z.override)return z;var oe=ee.getModeAt(ee.getCursor());return oe.closeBrackets||z}function Ee(ee){var z=be(ee);if(!z||ee.getOption("disableInput"))return st.Pass;for(var oe=Ge(z,"pairs"),ie=ee.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return st.Pass;var ue=Pe(ee,ie[le].head);if(!ue||oe.indexOf(ue)%2!=0)return st.Pass}for(var le=ie.length-1;le>=0;le--){var me=ie[le].head;ee.replaceRange("",ae(me.line,me.ch-1),ae(me.line,me.ch+1),"+delete")}}function we(ee){var z=be(ee),oe=z&&Ge(z,"explode");if(!oe||ee.getOption("disableInput"))return st.Pass;for(var ie=ee.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return st.Pass;var ue=Pe(ee,ie[le].head);if(!ue||oe.indexOf(ue)%2!=0)return st.Pass}ee.operation(function(){var me=ee.lineSeparator()||`
|
|
`;ee.replaceSelection(me+me,null),ee.execCommand("goCharLeft"),ie=ee.listSelections();for(var xe=0;xe<ie.length;xe++){var Ae=ie[xe].head.line;ee.indentLine(Ae,null,!0),ee.indentLine(Ae+1,null,!0)}})}function Te(ee){var z=st.cmpPos(ee.anchor,ee.head)>0;return{anchor:new ae(ee.anchor.line,ee.anchor.ch+(z?-1:1)),head:new ae(ee.head.line,ee.head.ch+(z?1:-1))}}function ve(ee,z){var oe=be(ee);if(!oe||ee.getOption("disableInput"))return st.Pass;var ie=Ge(oe,"pairs"),le=ie.indexOf(z);if(le==-1)return st.Pass;for(var ue=Ge(oe,"closeBefore"),me=Ge(oe,"triples"),xe=ie.charAt(le+1)==z,Ae=ee.listSelections(),De=le%2==0,Fe,je=0;je<Ae.length;je++){var Le=Ae[je],Be=Le.head,Ue,Je=ee.getRange(Be,ae(Be.line,Be.ch+1));if(De&&!Le.empty())Ue="surround";else if((xe||!De)&&Je==z)xe&&de(ee,Be)?Ue="both":me.indexOf(z)>=0&&ee.getRange(Be,ae(Be.line,Be.ch+3))==z+z+z?Ue="skipThree":Ue="skip";else if(xe&&Be.ch>1&&me.indexOf(z)>=0&&ee.getRange(ae(Be.line,Be.ch-2),Be)==z+z){if(Be.ch>2&&/\bstring/.test(ee.getTokenTypeAt(ae(Be.line,Be.ch-2))))return st.Pass;Ue="addFour"}else if(xe){var He=Be.ch==0?" ":ee.getRange(ae(Be.line,Be.ch-1),Be);if(!st.isWordChar(Je)&&He!=z&&!st.isWordChar(He))Ue="both";else return st.Pass}else if(De&&(Je.length===0||/\s/.test(Je)||ue.indexOf(Je)>-1))Ue="both";else return st.Pass;if(!Fe)Fe=Ue;else if(Fe!=Ue)return st.Pass}var We=le%2?ie.charAt(le-1):z,at=le%2?z:ie.charAt(le+1);ee.operation(function(){if(Fe=="skip")ee.execCommand("goCharRight");else if(Fe=="skipThree")for(var ft=0;ft<3;ft++)ee.execCommand("goCharRight");else if(Fe=="surround"){for(var mt=ee.getSelections(),ft=0;ft<mt.length;ft++)mt[ft]=We+mt[ft]+at;ee.replaceSelections(mt,"around"),mt=ee.listSelections().slice();for(var ft=0;ft<mt.length;ft++)mt[ft]=Te(mt[ft]);ee.setSelections(mt)}else Fe=="both"?(ee.replaceSelection(We+at,null),ee.triggerElectric(We+at),ee.execCommand("goCharLeft")):Fe=="addFour"&&(ee.replaceSelection(We+We+We+We,"before"),ee.execCommand("goCharRight"))})}function Pe(ee,z){var oe=ee.getRange(ae(z.line,z.ch-1),ae(z.line,z.ch+1));return oe.length==2?oe:null}function de(ee,z){var oe=ee.getTokenAt(ae(z.line,z.ch+1));return/\bstring/.test(oe.type)&&oe.start==z.ch&&(z.ch==0||!/\bstring/.test(ee.getTokenTypeAt(z)))}})},57341:function(Sn,vn,ot){(function(st){st(ot(4631),ot(4786))})(function(st){st.defineOption("autoCloseTags",!1,function(Ee,we,Te){if(Te!=st.Init&&Te&&Ee.removeKeyMap("autoCloseTags"),!!we){var ve={name:"autoCloseTags"};(typeof we!="object"||we.whenClosing!==!1)&&(ve["'/'"]=function(Pe){return fe(Pe)}),(typeof we!="object"||we.whenOpening!==!1)&&(ve["'>'"]=function(Pe){return Ge(Pe)}),Ee.addKeyMap(ve)}});var Ft=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],ae=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Ge(Ee){if(Ee.getOption("disableInput"))return st.Pass;for(var we=Ee.listSelections(),Te=[],ve=Ee.getOption("autoCloseTags"),Pe=0;Pe<we.length;Pe++){if(!we[Pe].empty())return st.Pass;var de=we[Pe].head,ee=Ee.getTokenAt(de),z=st.innerMode(Ee.getMode(),ee.state),oe=z.state,ie=z.mode.xmlCurrentTag&&z.mode.xmlCurrentTag(oe),le=ie&&ie.name;if(!le)return st.Pass;var ue=z.mode.configuration=="html",me=typeof ve=="object"&&ve.dontCloseTags||ue&&Ft,xe=typeof ve=="object"&&ve.indentTags||ue&&ae;ee.end>de.ch&&(le=le.slice(0,le.length-ee.end+de.ch));var Ae=le.toLowerCase();if(!le||ee.type=="string"&&(ee.end!=de.ch||!/[\"\']/.test(ee.string.charAt(ee.string.length-1))||ee.string.length==1)||ee.type=="tag"&&ie.close||ee.string.indexOf("/")==de.ch-ee.start-1||me&&pe(me,Ae)>-1||be(Ee,z.mode.xmlCurrentContext&&z.mode.xmlCurrentContext(oe)||[],le,de,!0))return st.Pass;var De=typeof ve=="object"&&ve.emptyTags;if(De&&pe(De,le)>-1){Te[Pe]={text:"/>",newPos:st.Pos(de.line,de.ch+2)};continue}var Fe=xe&&pe(xe,Ae)>-1;Te[Pe]={indent:Fe,text:">"+(Fe?`
|
|
|
|
`:"")+"</"+le+">",newPos:Fe?st.Pos(de.line+1,0):st.Pos(de.line,de.ch+1)}}for(var je=typeof ve=="object"&&ve.dontIndentOnAutoClose,Pe=we.length-1;Pe>=0;Pe--){var Le=Te[Pe];Ee.replaceRange(Le.text,we[Pe].head,we[Pe].anchor,"+insert");var Be=Ee.listSelections().slice(0);Be[Pe]={head:Le.newPos,anchor:Le.newPos},Ee.setSelections(Be),!je&&Le.indent&&(Ee.indentLine(Le.newPos.line,null,!0),Ee.indentLine(Le.newPos.line+1,null,!0))}}function Re(Ee,we){for(var Te=Ee.listSelections(),ve=[],Pe=we?"/":"</",de=Ee.getOption("autoCloseTags"),ee=typeof de=="object"&&de.dontIndentOnSlash,z=0;z<Te.length;z++){if(!Te[z].empty())return st.Pass;var oe=Te[z].head,ie=Ee.getTokenAt(oe),le=st.innerMode(Ee.getMode(),ie.state),ue=le.state;if(we&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=oe.ch-1))return st.Pass;var me,xe=le.mode.name!="xml"&&Ee.getMode().name=="htmlmixed";if(xe&&le.mode.name=="javascript")me=Pe+"script";else if(xe&&le.mode.name=="css")me=Pe+"style";else{var Ae=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ue);if(!Ae||Ae.length&&be(Ee,Ae,Ae[Ae.length-1],oe))return st.Pass;me=Pe+Ae[Ae.length-1]}Ee.getLine(oe.line).charAt(ie.end)!=">"&&(me+=">"),ve[z]=me}if(Ee.replaceSelections(ve),Te=Ee.listSelections(),!ee)for(var z=0;z<Te.length;z++)(z==Te.length-1||Te[z].head.line<Te[z+1].head.line)&&Ee.indentLine(Te[z].head.line)}function fe(Ee){return Ee.getOption("disableInput")?st.Pass:Re(Ee,!0)}st.commands.closeTag=function(Ee){return Re(Ee)};function pe(Ee,we){if(Ee.indexOf)return Ee.indexOf(we);for(var Te=0,ve=Ee.length;Te<ve;++Te)if(Ee[Te]==we)return Te;return-1}function be(Ee,we,Te,ve,Pe){if(!st.scanForClosingTag)return!1;var de=Math.min(Ee.lastLine()+1,ve.line+500),ee=st.scanForClosingTag(Ee,ve,null,de);if(!ee||ee.tag!=Te)return!1;for(var z=Pe?1:0,oe=we.length-1;oe>=0&&we[oe]==Te;oe--)++z;ve=ee.to;for(var oe=1;oe<z;oe++){var ie=st.scanForClosingTag(Ee,ve,null,de);if(!ie||ie.tag!=Te)return!1;ve=ie.to}return!0}})},4786:function(Sn,vn,ot){(function(st){st(ot(4631))})(function(st){"use strict";var Ft=st.Pos;function ae(oe,ie){return oe.line-ie.line||oe.ch-ie.ch}var Ge="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Re=Ge+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",fe=new RegExp("<(/?)(["+Ge+"]["+Re+"]*)","g");function pe(oe,ie,le,ue){this.line=ie,this.ch=le,this.cm=oe,this.text=oe.getLine(ie),this.min=ue?Math.max(ue.from,oe.firstLine()):oe.firstLine(),this.max=ue?Math.min(ue.to-1,oe.lastLine()):oe.lastLine()}function be(oe,ie){var le=oe.cm.getTokenTypeAt(Ft(oe.line,ie));return le&&/\btag\b/.test(le)}function Ee(oe){if(!(oe.line>=oe.max))return oe.ch=0,oe.text=oe.cm.getLine(++oe.line),!0}function we(oe){if(!(oe.line<=oe.min))return oe.text=oe.cm.getLine(--oe.line),oe.ch=oe.text.length,!0}function Te(oe){for(;;){var ie=oe.text.indexOf(">",oe.ch);if(ie==-1){if(Ee(oe))continue;return}if(!be(oe,ie+1)){oe.ch=ie+1;continue}var le=oe.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(oe.text.slice(le+1,ie));return oe.ch=ie+1,ue?"selfClose":"regular"}}function ve(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf("<",oe.ch-1):-1;if(ie==-1){if(we(oe))continue;return}if(!be(oe,ie+1)){oe.ch=ie;continue}fe.lastIndex=ie,oe.ch=ie;var le=fe.exec(oe.text);if(le&&le.index==ie)return le}}function Pe(oe){for(;;){fe.lastIndex=oe.ch;var ie=fe.exec(oe.text);if(!ie){if(Ee(oe))continue;return}if(!be(oe,ie.index+1)){oe.ch=ie.index+1;continue}return oe.ch=ie.index+ie[0].length,ie}}function de(oe){for(;;){var ie=oe.ch?oe.text.lastIndexOf(">",oe.ch-1):-1;if(ie==-1){if(we(oe))continue;return}if(!be(oe,ie+1)){oe.ch=ie;continue}var le=oe.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(oe.text.slice(le+1,ie));return oe.ch=ie+1,ue?"selfClose":"regular"}}function ee(oe,ie){for(var le=[];;){var ue=Pe(oe),me,xe=oe.line,Ae=oe.ch-(ue?ue[0].length:0);if(!ue||!(me=Te(oe)))return;if(me!="selfClose")if(ue[1]){for(var De=le.length-1;De>=0;--De)if(le[De]==ue[2]){le.length=De;break}if(De<0&&(!ie||ie==ue[2]))return{tag:ue[2],from:Ft(xe,Ae),to:Ft(oe.line,oe.ch)}}else le.push(ue[2])}}function z(oe,ie){for(var le=[];;){var ue=de(oe);if(!ue)return;if(ue=="selfClose"){ve(oe);continue}var me=oe.line,xe=oe.ch,Ae=ve(oe);if(!Ae)return;if(Ae[1])le.push(Ae[2]);else{for(var De=le.length-1;De>=0;--De)if(le[De]==Ae[2]){le.length=De;break}if(De<0&&(!ie||ie==Ae[2]))return{tag:Ae[2],from:Ft(oe.line,oe.ch),to:Ft(me,xe)}}}}st.registerHelper("fold","xml",function(oe,ie){for(var le=new pe(oe,ie.line,0);;){var ue=Pe(le);if(!ue||le.line!=ie.line)return;var me=Te(le);if(!me)return;if(!ue[1]&&me!="selfClose"){var xe=Ft(le.line,le.ch),Ae=ee(le,ue[2]);return Ae&&ae(Ae.from,xe)>0?{from:xe,to:Ae.from}:null}}}),st.findMatchingTag=function(oe,ie,le){var ue=new pe(oe,ie.line,ie.ch,le);if(!(ue.text.indexOf(">")==-1&&ue.text.indexOf("<")==-1)){var me=Te(ue),xe=me&&Ft(ue.line,ue.ch),Ae=me&&ve(ue);if(!(!me||!Ae||ae(ue,ie)>0)){var De={from:Ft(ue.line,ue.ch),to:xe,tag:Ae[2]};return me=="selfClose"?{open:De,close:null,at:"open"}:Ae[1]?{open:z(ue,Ae[2]),close:De,at:"close"}:(ue=new pe(oe,xe.line,xe.ch,le),{open:De,close:ee(ue,Ae[2]),at:"open"})}}},st.findEnclosingTag=function(oe,ie,le,ue){for(var me=new pe(oe,ie.line,ie.ch,le);;){var xe=z(me,ue);if(!xe)break;var Ae=new pe(oe,ie.line,ie.ch,le),De=ee(Ae,xe.tag);if(De)return{open:xe,close:De}}},st.scanForClosingTag=function(oe,ie,le,ue){var me=new pe(oe,ie.line,ie.ch,ue?{from:0,to:ue}:null);return ee(me,le)}})},4631:function(Sn){(function(vn,ot){Sn.exports=ot()})(this,function(){"use strict";var vn=navigator.userAgent,ot=navigator.platform,st=/gecko\/\d/i.test(vn),Ft=/MSIE \d/.test(vn),ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(vn),Ge=/Edge\/(\d+)/.exec(vn),Re=Ft||ae||Ge,fe=Re&&(Ft?document.documentMode||6:+(Ge||ae)[1]),pe=!Ge&&/WebKit\//.test(vn),be=pe&&/Qt\/\d+\.\d+/.test(vn),Ee=!Ge&&/Chrome\//.test(vn),we=/Opera\//.test(vn),Te=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(vn),Pe=/PhantomJS/.test(vn),de=!Ge&&/AppleWebKit/.test(vn)&&/Mobile\/\w+/.test(vn),ee=/Android/.test(vn),z=de||ee||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(vn),oe=de||/Mac/.test(ot),ie=/\bCrOS\b/.test(vn),le=/win/i.test(ot),ue=we&&vn.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(we=!1,pe=!0);var me=oe&&(be||we&&(ue==null||ue<12.11)),xe=st||Re&&fe>=9;function Ae(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var De=function(re,ce){var ke=re.className,Ce=Ae(ce).exec(ke);if(Ce){var Oe=ke.slice(Ce.index+Ce[0].length);re.className=ke.slice(0,Ce.index)+(Oe?Ce[1]+Oe:"")}};function Fe(re){for(var ce=re.childNodes.length;ce>0;--ce)re.removeChild(re.firstChild);return re}function je(re,ce){return Fe(re).appendChild(ce)}function Le(re,ce,ke,Ce){var Oe=document.createElement(re);if(ke&&(Oe.className=ke),Ce&&(Oe.style.cssText=Ce),typeof ce=="string")Oe.appendChild(document.createTextNode(ce));else if(ce)for(var tt=0;tt<ce.length;++tt)Oe.appendChild(ce[tt]);return Oe}function Be(re,ce,ke,Ce){var Oe=Le(re,ce,ke,Ce);return Oe.setAttribute("role","presentation"),Oe}var Ue;document.createRange?Ue=function(re,ce,ke,Ce){var Oe=document.createRange();return Oe.setEnd(Ce||re,ke),Oe.setStart(re,ce),Oe}:Ue=function(re,ce,ke){var Ce=document.body.createTextRange();try{Ce.moveToElementText(re.parentNode)}catch(Oe){return Ce}return Ce.collapse(!0),Ce.moveEnd("character",ke),Ce.moveStart("character",ce),Ce};function Je(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 He(){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 We(re,ce){var ke=re.className;Ae(ce).test(ke)||(re.className+=(ke?" ":"")+ce)}function at(re,ce){for(var ke=re.split(" "),Ce=0;Ce<ke.length;Ce++)ke[Ce]&&!Ae(ke[Ce]).test(ce)&&(ce+=" "+ke[Ce]);return ce}var ft=function(re){re.select()};de?ft=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:Re&&(ft=function(re){try{re.select()}catch(ce){}});function mt(re){var ce=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,ce)}}function Lt(re,ce,ke){ce||(ce={});for(var Ce in re)re.hasOwnProperty(Ce)&&(ke!==!1||!ce.hasOwnProperty(Ce))&&(ce[Ce]=re[Ce]);return ce}function Xe(re,ce,ke,Ce,Oe){ce==null&&(ce=re.search(/[^\s\u00a0]/),ce==-1&&(ce=re.length));for(var tt=Ce||0,pt=Oe||0;;){var Nt=re.indexOf(" ",tt);if(Nt<0||Nt>=ce)return pt+(ce-tt);pt+=Nt-tt,pt+=ke-pt%ke,tt=Nt+1}}var et=function(){this.id=null,this.f=null,this.time=0,this.handler=mt(this.onTimeout,this)};et.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},et.prototype.set=function(re,ce){this.f=ce;var ke=+new Date+re;(!this.id||ke<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=ke)};function lt(re,ce){for(var ke=0;ke<re.length;++ke)if(re[ke]==ce)return ke;return-1}var vt=50,wt={toString:function(){return"CodeMirror.Pass"}},ht={scroll:!1},dt={origin:"*mouse"},ut={origin:"+move"};function Pt(re,ce,ke){for(var Ce=0,Oe=0;;){var tt=re.indexOf(" ",Ce);tt==-1&&(tt=re.length);var pt=tt-Ce;if(tt==re.length||Oe+pt>=ce)return Ce+Math.min(pt,ce-Oe);if(Oe+=tt-Ce,Oe+=ke-Oe%ke,Ce=tt+1,Oe>=ce)return Ce}}var yt=[""];function gt(re){for(;yt.length<=re;)yt.push(Tt(yt)+" ");return yt[re]}function Tt(re){return re[re.length-1]}function ct(re,ce){for(var ke=[],Ce=0;Ce<re.length;Ce++)ke[Ce]=ce(re[Ce],Ce);return ke}function Ye(re,ce,ke){for(var Ce=0,Oe=ke(ce);Ce<re.length&&ke(re[Ce])<=Oe;)Ce++;re.splice(Ce,0,ce)}function Ze(){}function Se(re,ce){var ke;return Object.create?ke=Object.create(re):(Ze.prototype=re,ke=new Ze),ce&&Lt(ce,ke),ke}var Ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function $e(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Ne.test(re))}function nt(re,ce){return ce?ce.source.indexOf("\\w")>-1&&$e(re)?!0:ce.test(re):$e(re)}function Ie(re){for(var ce in re)if(re.hasOwnProperty(ce)&&re[ce])return!1;return!0}var ze=/[\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 Ve(re){return re.charCodeAt(0)>=768&&ze.test(re)}function it(re,ce,ke){for(;(ke<0?ce>0:ce<re.length)&&Ve(re.charAt(ce));)ce+=ke;return ce}function St(re,ce,ke){for(var Ce=ce>ke?-1:1;;){if(ce==ke)return ce;var Oe=(ce+ke)/2,tt=Ce<0?Math.ceil(Oe):Math.floor(Oe);if(tt==ce)return re(tt)?ce:ke;re(tt)?ke=tt:ce=tt+Ce}}function Ct(re,ce,ke,Ce){if(!re)return Ce(ce,ke,"ltr",0);for(var Oe=!1,tt=0;tt<re.length;++tt){var pt=re[tt];(pt.from<ke&&pt.to>ce||ce==ke&&pt.to==ce)&&(Ce(Math.max(pt.from,ce),Math.min(pt.to,ke),pt.level==1?"rtl":"ltr",tt),Oe=!0)}Oe||Ce(ce,ke,"ltr")}var It=null;function jt(re,ce,ke){var Ce;It=null;for(var Oe=0;Oe<re.length;++Oe){var tt=re[Oe];if(tt.from<ce&&tt.to>ce)return Oe;tt.to==ce&&(tt.from!=tt.to&&ke=="before"?Ce=Oe:It=Oe),tt.from==ce&&(tt.from!=tt.to&&ke!="before"?Ce=Oe:It=Oe)}return Ce!=null?Ce:It}var Kt=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ke(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 Ce=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Oe=/[stwN]/,tt=/[LRr]/,pt=/[Lb1n]/,Nt=/[1n]/;function kt(Rt,rn,zt){this.level=Rt,this.from=rn,this.to=zt}return function(Rt,rn){var zt=rn=="ltr"?"L":"R";if(Rt.length==0||rn=="ltr"&&!Ce.test(Rt))return!1;for(var wn=Rt.length,yn=[],qn=0;qn<wn;++qn)yn.push(ke(Rt.charCodeAt(qn)));for(var ir=0,vr=zt;ir<wn;++ir){var Dr=yn[ir];Dr=="m"?yn[ir]=vr:vr=Dr}for(var ti=0,Kr=zt;ti<wn;++ti){var si=yn[ti];si=="1"&&Kr=="r"?yn[ti]="n":tt.test(si)&&(Kr=si,si=="r"&&(yn[ti]="R"))}for(var Hi=1,Ur=yn[0];Hi<wn-1;++Hi){var co=yn[Hi];co=="+"&&Ur=="1"&&yn[Hi+1]=="1"?yn[Hi]="1":co==","&&Ur==yn[Hi+1]&&(Ur=="1"||Ur=="n")&&(yn[Hi]=Ur),Ur=co}for(var ka=0;ka<wn;++ka){var ms=yn[ka];if(ms==",")yn[ka]="N";else if(ms=="%"){var Ia=void 0;for(Ia=ka+1;Ia<wn&&yn[Ia]=="%";++Ia);for(var Al=ka&&yn[ka-1]=="!"||Ia<wn&&yn[Ia]=="1"?"1":"N",rl=ka;rl<Ia;++rl)yn[rl]=Al;ka=Ia-1}}for(var as=0,Ul=zt;as<wn;++as){var Gs=yn[as];Ul=="L"&&Gs=="1"?yn[as]="L":tt.test(Gs)&&(Ul=Gs)}for(var ss=0;ss<wn;++ss)if(Oe.test(yn[ss])){var Ko=void 0;for(Ko=ss+1;Ko<wn&&Oe.test(yn[Ko]);++Ko);for(var Ga=(ss?yn[ss-1]:zt)=="L",ks=(Ko<wn?yn[Ko]:zt)=="L",Us=Ga==ks?Ga?"L":"R":zt,Du=ss;Du<Ko;++Du)yn[Du]=Us;ss=Ko-1}for(var _a=[],vu,Ka=0;Ka<wn;)if(pt.test(yn[Ka])){var xd=Ka;for(++Ka;Ka<wn&&pt.test(yn[Ka]);++Ka);_a.push(new kt(0,xd,Ka))}else{var ru=Ka,Hl=_a.length,jl=rn=="rtl"?1:0;for(++Ka;Ka<wn&&yn[Ka]!="L";++Ka);for(var ca=ru;ca<Ka;)if(Nt.test(yn[ca])){ru<ca&&(_a.splice(Hl,0,new kt(1,ru,ca)),Hl+=jl);var Ms=ca;for(++ca;ca<Ka&&Nt.test(yn[ca]);++ca);_a.splice(Hl,0,new kt(2,Ms,ca)),Hl+=jl,ru=ca}else++ca;ru<Ka&&_a.splice(Hl,0,new kt(1,ru,Ka))}return rn=="ltr"&&(_a[0].level==1&&(vu=Rt.match(/^\s+/))&&(_a[0].from=vu[0].length,_a.unshift(new kt(0,0,vu[0].length))),Tt(_a).level==1&&(vu=Rt.match(/\s+$/))&&(Tt(_a).to-=vu[0].length,_a.push(new kt(0,wn-vu[0].length,wn)))),rn=="rtl"?_a.reverse():_a}}();function an(re,ce){var ke=re.order;return ke==null&&(ke=re.order=Kt(re.text,ce)),ke}var un=[],hn=function(re,ce,ke){if(re.addEventListener)re.addEventListener(ce,ke,!1);else if(re.attachEvent)re.attachEvent("on"+ce,ke);else{var Ce=re._handlers||(re._handlers={});Ce[ce]=(Ce[ce]||un).concat(ke)}};function qt(re,ce){return re._handlers&&re._handlers[ce]||un}function On(re,ce,ke){if(re.removeEventListener)re.removeEventListener(ce,ke,!1);else if(re.detachEvent)re.detachEvent("on"+ce,ke);else{var Ce=re._handlers,Oe=Ce&&Ce[ce];if(Oe){var tt=lt(Oe,ke);tt>-1&&(Ce[ce]=Oe.slice(0,tt).concat(Oe.slice(tt+1)))}}}function fn(re,ce){var ke=qt(re,ce);if(ke.length)for(var Ce=Array.prototype.slice.call(arguments,2),Oe=0;Oe<ke.length;++Oe)ke[Oe].apply(null,Ce)}function Wt(re,ce,ke){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),fn(re,ke||ce.type,re,ce),lr(ce)||ce.codemirrorIgnore}function Bn(re){var ce=re._handlers&&re._handlers.cursorActivity;if(ce)for(var ke=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),Ce=0;Ce<ce.length;++Ce)lt(ke,ce[Ce])==-1&&ke.push(ce[Ce])}function zn(re,ce){return qt(re,ce).length>0}function Yn(re){re.prototype.on=function(ce,ke){hn(this,ce,ke)},re.prototype.off=function(ce,ke){On(this,ce,ke)}}function fr(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Gr(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function lr(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function ni(re){fr(re),Gr(re)}function ri(re){return re.target||re.srcElement}function ki(re){var ce=re.which;return ce==null&&(re.button&1?ce=1:re.button&2?ce=3:re.button&4&&(ce=2)),oe&&re.ctrlKey&&ce==1&&(ce=3),ce}var ji=function(){if(Re&&fe<9)return!1;var re=Le("div");return"draggable"in re||"dragDrop"in re}(),Vi;function Io(re){if(Vi==null){var ce=Le("span","\u200B");je(re,Le("span",[ce,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(Vi=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(Re&&fe<8))}var ke=Vi?Le("span","\u200B"):Le("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ke.setAttribute("cm-text",""),ke}var Mo;function ro(re){if(Mo!=null)return Mo;var ce=je(re,document.createTextNode("A\u062EA")),ke=Ue(ce,0,1).getBoundingClientRect(),Ce=Ue(ce,1,2).getBoundingClientRect();return Fe(re),!ke||ke.left==ke.right?!1:Mo=Ce.right-ke.right<3}var Nn=`
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var ce=0,ke=[],Ce=re.length;ce<=Ce;){var Oe=re.indexOf(`
|
|
`,ce);Oe==-1&&(Oe=re.length);var tt=re.slice(ce,re.charAt(Oe-1)=="\r"?Oe-1:Oe),pt=tt.indexOf("\r");pt!=-1?(ke.push(tt.slice(0,pt)),ce+=pt+1):(ke.push(tt),ce=Oe+1)}return ke}:function(re){return re.split(/\r\n?|\n/)},Qe=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(ce){return!1}}:function(re){var ce;try{ce=re.ownerDocument.selection.createRange()}catch(ke){}return!ce||ce.parentElement()!=re?!1:ce.compareEndPoints("StartToEnd",ce)!=0},Pn=function(){var re=Le("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),An=null;function Lr(re){if(An!=null)return An;var ce=je(re,Le("span","x")),ke=ce.getBoundingClientRect(),Ce=Ue(ce,0,1).getBoundingClientRect();return An=Math.abs(ke.left-Ce.left)>1}var Dn={},Zn={};function nr(re,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),Dn[re]=ce}function Jr(re,ce){Zn[re]=ce}function nn(re){if(typeof re=="string"&&Zn.hasOwnProperty(re))re=Zn[re];else if(re&&typeof re.name=="string"&&Zn.hasOwnProperty(re.name)){var ce=Zn[re.name];typeof ce=="string"&&(ce={name:ce}),re=Se(ce,re),re.name=ce.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return nn("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return nn("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function ln(re,ce){ce=nn(ce);var ke=Dn[ce.name];if(!ke)return ln(re,"text/plain");var Ce=ke(re,ce);if(Vt.hasOwnProperty(ce.name)){var Oe=Vt[ce.name];for(var tt in Oe)Oe.hasOwnProperty(tt)&&(Ce.hasOwnProperty(tt)&&(Ce["_"+tt]=Ce[tt]),Ce[tt]=Oe[tt])}if(Ce.name=ce.name,ce.helperType&&(Ce.helperType=ce.helperType),ce.modeProps)for(var pt in ce.modeProps)Ce[pt]=ce.modeProps[pt];return Ce}var Vt={};function cn(re,ce){var ke=Vt.hasOwnProperty(re)?Vt[re]:Vt[re]={};Lt(ce,ke)}function Qn(re,ce){if(ce===!0)return ce;if(re.copyState)return re.copyState(ce);var ke={};for(var Ce in ce){var Oe=ce[Ce];Oe instanceof Array&&(Oe=Oe.concat([])),ke[Ce]=Oe}return ke}function rr(re,ce){for(var ke;re.innerMode&&(ke=re.innerMode(ce),!(!ke||ke.mode==re));)ce=ke.state,re=ke.mode;return ke||{mode:re,state:ce}}function or(re,ce,ke){return re.startState?re.startState(ce,ke):!0}var en=function(re,ce,ke){this.pos=this.start=0,this.string=re,this.tabSize=ce||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ke};en.prototype.eol=function(){return this.pos>=this.string.length},en.prototype.sol=function(){return this.pos==this.lineStart},en.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},en.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},en.prototype.eat=function(re){var ce=this.string.charAt(this.pos),ke;if(typeof re=="string"?ke=ce==re:ke=ce&&(re.test?re.test(ce):re(ce)),ke)return++this.pos,ce},en.prototype.eatWhile=function(re){for(var ce=this.pos;this.eat(re););return this.pos>ce},en.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},en.prototype.skipToEnd=function(){this.pos=this.string.length},en.prototype.skipTo=function(re){var ce=this.string.indexOf(re,this.pos);if(ce>-1)return this.pos=ce,!0},en.prototype.backUp=function(re){this.pos-=re},en.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Xe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Xe(this.string,this.lineStart,this.tabSize):0)},en.prototype.indentation=function(){return Xe(this.string,null,this.tabSize)-(this.lineStart?Xe(this.string,this.lineStart,this.tabSize):0)},en.prototype.match=function(re,ce,ke){if(typeof re=="string"){var Ce=function(pt){return ke?pt.toLowerCase():pt},Oe=this.string.substr(this.pos,re.length);if(Ce(Oe)==Ce(re))return ce!==!1&&(this.pos+=re.length),!0}else{var tt=this.string.slice(this.pos).match(re);return tt&&tt.index>0?null:(tt&&ce!==!1&&(this.pos+=tt[0].length),tt)}},en.prototype.current=function(){return this.string.slice(this.start,this.pos)},en.prototype.hideFirstChars=function(re,ce){this.lineStart+=re;try{return ce()}finally{this.lineStart-=re}},en.prototype.lookAhead=function(re){var ce=this.lineOracle;return ce&&ce.lookAhead(re)},en.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function Tn(re,ce){if(ce-=re.first,ce<0||ce>=re.size)throw new Error("There is no line "+(ce+re.first)+" in the document.");for(var ke=re;!ke.lines;)for(var Ce=0;;++Ce){var Oe=ke.children[Ce],tt=Oe.chunkSize();if(ce<tt){ke=Oe;break}ce-=tt}return ke.lines[ce]}function Sr(re,ce,ke){var Ce=[],Oe=ce.line;return re.iter(ce.line,ke.line+1,function(tt){var pt=tt.text;Oe==ke.line&&(pt=pt.slice(0,ke.ch)),Oe==ce.line&&(pt=pt.slice(ce.ch)),Ce.push(pt),++Oe}),Ce}function Vr(re,ce,ke){var Ce=[];return re.iter(ce,ke,function(Oe){Ce.push(Oe.text)}),Ce}function Wn(re,ce){var ke=ce-re.height;if(ke)for(var Ce=re;Ce;Ce=Ce.parent)Ce.height+=ke}function $t(re){if(re.parent==null)return null;for(var ce=re.parent,ke=lt(ce.lines,re),Ce=ce.parent;Ce;ce=Ce,Ce=Ce.parent)for(var Oe=0;Ce.children[Oe]!=ce;++Oe)ke+=Ce.children[Oe].chunkSize();return ke+ce.first}function cr(re,ce){var ke=re.first;e:do{for(var Ce=0;Ce<re.children.length;++Ce){var Oe=re.children[Ce],tt=Oe.height;if(ce<tt){re=Oe;continue e}ce-=tt,ke+=Oe.chunkSize()}return ke}while(!re.lines);for(var pt=0;pt<re.lines.length;++pt){var Nt=re.lines[pt],kt=Nt.height;if(ce<kt)break;ce-=kt}return ke+pt}function yr(re,ce){return ce>=re.first&&ce<re.first+re.size}function Nr(re,ce){return String(re.lineNumberFormatter(ce+re.firstLineNumber))}function xn(re,ce,ke){if(ke===void 0&&(ke=null),!(this instanceof xn))return new xn(re,ce,ke);this.line=re,this.ch=ce,this.sticky=ke}function gr(re,ce){return re.line-ce.line||re.ch-ce.ch}function hi(re,ce){return re.sticky==ce.sticky&&gr(re,ce)==0}function Wi(re){return xn(re.line,re.ch)}function zi(re,ce){return gr(re,ce)<0?ce:re}function sr(re,ce){return gr(re,ce)<0?re:ce}function dr(re,ce){return Math.max(re.first,Math.min(ce,re.first+re.size-1))}function Ar(re,ce){if(ce.line<re.first)return xn(re.first,0);var ke=re.first+re.size-1;return ce.line>ke?xn(ke,Tn(re,ke).text.length):ii(ce,Tn(re,ce.line).text.length)}function ii(re,ce){var ke=re.ch;return ke==null||ke>ce?xn(re.line,ce):ke<0?xn(re.line,0):re}function Zr(re,ce){for(var ke=[],Ce=0;Ce<ce.length;Ce++)ke[Ce]=Ar(re,ce[Ce]);return ke}var In=function(re,ce){this.state=re,this.lookAhead=ce},Cr=function(re,ce,ke,Ce){this.state=ce,this.doc=re,this.line=ke,this.maxLookAhead=Ce||0,this.baseTokens=null,this.baseTokenPos=1};Cr.prototype.lookAhead=function(re){var ce=this.doc.getLine(this.line+re);return ce!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),ce},Cr.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}},Cr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Cr.fromSaved=function(re,ce,ke){return ce instanceof In?new Cr(re,Qn(re.mode,ce.state),ke,ce.lookAhead):new Cr(re,Qn(re.mode,ce),ke)},Cr.prototype.save=function(re){var ce=re!==!1?Qn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new In(ce,this.maxLookAhead):ce};function la(re,ce,ke,Ce){var Oe=[re.state.modeGen],tt={};Bi(re,ce.text,re.doc.mode,ke,function(Rt,rn){return Oe.push(Rt,rn)},tt,Ce);for(var pt=ke.state,Nt=function(Rt){ke.baseTokens=Oe;var rn=re.state.overlays[Rt],zt=1,wn=0;ke.state=!0,Bi(re,ce.text,rn.mode,ke,function(yn,qn){for(var ir=zt;wn<yn;){var vr=Oe[zt];vr>yn&&Oe.splice(zt,1,yn,Oe[zt+1],vr),zt+=2,wn=Math.min(yn,vr)}if(qn)if(rn.opaque)Oe.splice(ir,zt-ir,yn,"overlay "+qn),zt=ir+2;else for(;ir<zt;ir+=2){var Dr=Oe[ir+1];Oe[ir+1]=(Dr?Dr+" ":"")+"overlay "+qn}},tt),ke.state=pt,ke.baseTokens=null,ke.baseTokenPos=1},kt=0;kt<re.state.overlays.length;++kt)Nt(kt);return{styles:Oe,classes:tt.bgClass||tt.textClass?tt:null}}function Ho(re,ce,ke){if(!ce.styles||ce.styles[0]!=re.state.modeGen){var Ce=zo(re,$t(ce)),Oe=ce.text.length>re.options.maxHighlightLength&&Qn(re.doc.mode,Ce.state),tt=la(re,ce,Ce);Oe&&(Ce.state=Oe),ce.stateAfter=Ce.save(!Oe),ce.styles=tt.styles,tt.classes?ce.styleClasses=tt.classes:ce.styleClasses&&(ce.styleClasses=null),ke===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return ce.styles}function zo(re,ce,ke){var Ce=re.doc,Oe=re.display;if(!Ce.mode.startState)return new Cr(Ce,!0,ce);var tt=Mi(re,ce,ke),pt=tt>Ce.first&&Tn(Ce,tt-1).stateAfter,Nt=pt?Cr.fromSaved(Ce,pt,tt):new Cr(Ce,or(Ce.mode),tt);return Ce.iter(tt,ce,function(kt){tn(re,kt.text,Nt);var Rt=Nt.line;kt.stateAfter=Rt==ce-1||Rt%5==0||Rt>=Oe.viewFrom&&Rt<Oe.viewTo?Nt.save():null,Nt.nextLine()}),ke&&(Ce.modeFrontier=Nt.line),Nt}function tn(re,ce,ke,Ce){var Oe=re.doc.mode,tt=new en(ce,re.options.tabSize,ke);for(tt.start=tt.pos=Ce||0,ce==""&&Xr(Oe,ke.state);!tt.eol();)yi(Oe,tt,ke.state),tt.start=tt.pos}function Xr(re,ce){if(re.blankLine)return re.blankLine(ce);if(re.innerMode){var ke=rr(re,ce);if(ke.mode.blankLine)return ke.mode.blankLine(ke.state)}}function yi(re,ce,ke,Ce){for(var Oe=0;Oe<10;Oe++){Ce&&(Ce[0]=rr(re,ke).mode);var tt=re.token(ce,ke);if(ce.pos>ce.start)return tt}throw new Error("Mode "+re.name+" failed to advance stream.")}var xr=function(re,ce,ke){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=ce||null,this.state=ke};function Po(re,ce,ke,Ce){var Oe=re.doc,tt=Oe.mode,pt;ce=Ar(Oe,ce);var Nt=Tn(Oe,ce.line),kt=zo(re,ce.line,ke),Rt=new en(Nt.text,re.options.tabSize,kt),rn;for(Ce&&(rn=[]);(Ce||Rt.pos<ce.ch)&&!Rt.eol();)Rt.start=Rt.pos,pt=yi(tt,Rt,kt.state),Ce&&rn.push(new xr(Rt,pt,Qn(Oe.mode,kt.state)));return Ce?rn:new xr(Rt,pt,kt.state)}function Li(re,ce){if(re)for(;;){var ke=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ke)break;re=re.slice(0,ke.index)+re.slice(ke.index+ke[0].length);var Ce=ke[1]?"bgClass":"textClass";ce[Ce]==null?ce[Ce]=ke[2]:new RegExp("(?:^|\\s)"+ke[2]+"(?:$|\\s)").test(ce[Ce])||(ce[Ce]+=" "+ke[2])}return re}function Bi(re,ce,ke,Ce,Oe,tt,pt){var Nt=ke.flattenSpans;Nt==null&&(Nt=re.options.flattenSpans);var kt=0,Rt=null,rn=new en(ce,re.options.tabSize,Ce),zt,wn=re.options.addModeClass&&[null];for(ce==""&&Li(Xr(ke,Ce.state),tt);!rn.eol();){if(rn.pos>re.options.maxHighlightLength?(Nt=!1,pt&&tn(re,ce,Ce,rn.pos),rn.pos=ce.length,zt=null):zt=Li(yi(ke,rn,Ce.state,wn),tt),wn){var yn=wn[0].name;yn&&(zt="m-"+(zt?yn+" "+zt:yn))}if(!Nt||Rt!=zt){for(;kt<rn.start;)kt=Math.min(rn.start,kt+5e3),Oe(kt,Rt);Rt=zt}rn.start=rn.pos}for(;kt<rn.pos;){var qn=Math.min(rn.pos,kt+5e3);Oe(qn,Rt),kt=qn}}function Mi(re,ce,ke){for(var Ce,Oe,tt=re.doc,pt=ke?-1:ce-(re.doc.mode.innerMode?1e3:100),Nt=ce;Nt>pt;--Nt){if(Nt<=tt.first)return tt.first;var kt=Tn(tt,Nt-1),Rt=kt.stateAfter;if(Rt&&(!ke||Nt+(Rt instanceof In?Rt.lookAhead:0)<=tt.modeFrontier))return Nt;var rn=Xe(kt.text,null,re.options.tabSize);(Oe==null||Ce>rn)&&(Oe=Nt-1,Ce=rn)}return Oe}function Pi(re,ce){if(re.modeFrontier=Math.min(re.modeFrontier,ce),!(re.highlightFrontier<ce-10)){for(var ke=re.first,Ce=ce-1;Ce>ke;Ce--){var Oe=Tn(re,Ce).stateAfter;if(Oe&&(!(Oe instanceof In)||Ce+Oe.lookAhead<ce)){ke=Ce+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,ke)}}var Ji=!1,kn=!1;function To(){Ji=!0}function bn(){kn=!0}function Ni(re,ce,ke){this.marker=re,this.from=ce,this.to=ke}function ya(re,ce){if(re)for(var ke=0;ke<re.length;++ke){var Ce=re[ke];if(Ce.marker==ce)return Ce}}function Zt(re,ce){for(var ke,Ce=0;Ce<re.length;++Ce)re[Ce]!=ce&&(ke||(ke=[])).push(re[Ce]);return ke}function Jt(re,ce){re.markedSpans=re.markedSpans?re.markedSpans.concat([ce]):[ce],ce.marker.attachLine(re)}function dn(re,ce,ke){var Ce;if(re)for(var Oe=0;Oe<re.length;++Oe){var tt=re[Oe],pt=tt.marker,Nt=tt.from==null||(pt.inclusiveLeft?tt.from<=ce:tt.from<ce);if(Nt||tt.from==ce&&pt.type=="bookmark"&&(!ke||!tt.marker.insertLeft)){var kt=tt.to==null||(pt.inclusiveRight?tt.to>=ce:tt.to>ce);(Ce||(Ce=[])).push(new Ni(pt,tt.from,kt?null:tt.to))}}return Ce}function Fn(re,ce,ke){var Ce;if(re)for(var Oe=0;Oe<re.length;++Oe){var tt=re[Oe],pt=tt.marker,Nt=tt.to==null||(pt.inclusiveRight?tt.to>=ce:tt.to>ce);if(Nt||tt.from==ce&&pt.type=="bookmark"&&(!ke||tt.marker.insertLeft)){var kt=tt.from==null||(pt.inclusiveLeft?tt.from<=ce:tt.from<ce);(Ce||(Ce=[])).push(new Ni(pt,kt?null:tt.from-ce,tt.to==null?null:tt.to-ce))}}return Ce}function pr(re,ce){if(ce.full)return null;var ke=yr(re,ce.from.line)&&Tn(re,ce.from.line).markedSpans,Ce=yr(re,ce.to.line)&&Tn(re,ce.to.line).markedSpans;if(!ke&&!Ce)return null;var Oe=ce.from.ch,tt=ce.to.ch,pt=gr(ce.from,ce.to)==0,Nt=dn(ke,Oe,pt),kt=Fn(Ce,tt,pt),Rt=ce.text.length==1,rn=Tt(ce.text).length+(Rt?Oe:0);if(Nt)for(var zt=0;zt<Nt.length;++zt){var wn=Nt[zt];if(wn.to==null){var yn=ya(kt,wn.marker);yn?Rt&&(wn.to=yn.to==null?null:yn.to+rn):wn.to=Oe}}if(kt)for(var qn=0;qn<kt.length;++qn){var ir=kt[qn];if(ir.to!=null&&(ir.to+=rn),ir.from==null){var vr=ya(Nt,ir.marker);vr||(ir.from=rn,Rt&&(Nt||(Nt=[])).push(ir))}else ir.from+=rn,Rt&&(Nt||(Nt=[])).push(ir)}Nt&&(Nt=oi(Nt)),kt&&kt!=Nt&&(kt=oi(kt));var Dr=[Nt];if(!Rt){var ti=ce.text.length-2,Kr;if(ti>0&&Nt)for(var si=0;si<Nt.length;++si)Nt[si].to==null&&(Kr||(Kr=[])).push(new Ni(Nt[si].marker,null,null));for(var Hi=0;Hi<ti;++Hi)Dr.push(Kr);Dr.push(kt)}return Dr}function oi(re){for(var ce=0;ce<re.length;++ce){var ke=re[ce];ke.from!=null&&ke.from==ke.to&&ke.marker.clearWhenEmpty!==!1&&re.splice(ce--,1)}return re.length?re:null}function _r(re,ce,ke){var Ce=null;if(re.iter(ce.line,ke.line+1,function(yn){if(yn.markedSpans)for(var qn=0;qn<yn.markedSpans.length;++qn){var ir=yn.markedSpans[qn].marker;ir.readOnly&&(!Ce||lt(Ce,ir)==-1)&&(Ce||(Ce=[])).push(ir)}}),!Ce)return null;for(var Oe=[{from:ce,to:ke}],tt=0;tt<Ce.length;++tt)for(var pt=Ce[tt],Nt=pt.find(0),kt=0;kt<Oe.length;++kt){var Rt=Oe[kt];if(!(gr(Rt.to,Nt.from)<0||gr(Rt.from,Nt.to)>0)){var rn=[kt,1],zt=gr(Rt.from,Nt.from),wn=gr(Rt.to,Nt.to);(zt<0||!pt.inclusiveLeft&&!zt)&&rn.push({from:Rt.from,to:Nt.from}),(wn>0||!pt.inclusiveRight&&!wn)&&rn.push({from:Nt.to,to:Rt.to}),Oe.splice.apply(Oe,rn),kt+=rn.length-3}}return Oe}function Kn(re){var ce=re.markedSpans;if(ce){for(var ke=0;ke<ce.length;++ke)ce[ke].marker.detachLine(re);re.markedSpans=null}}function Et(re,ce){if(ce){for(var ke=0;ke<ce.length;++ke)ce[ke].marker.attachLine(re);re.markedSpans=ce}}function io(re){return re.inclusiveLeft?-1:0}function Ir(re){return re.inclusiveRight?1:0}function gi(re,ce){var ke=re.lines.length-ce.lines.length;if(ke!=0)return ke;var Ce=re.find(),Oe=ce.find(),tt=gr(Ce.from,Oe.from)||io(re)-io(ce);if(tt)return-tt;var pt=gr(Ce.to,Oe.to)||Ir(re)-Ir(ce);return pt||ce.id-re.id}function oo(re,ce){var ke=kn&&re.markedSpans,Ce;if(ke)for(var Oe=void 0,tt=0;tt<ke.length;++tt)Oe=ke[tt],Oe.marker.collapsed&&(ce?Oe.from:Oe.to)==null&&(!Ce||gi(Ce,Oe.marker)<0)&&(Ce=Oe.marker);return Ce}function Yi(re){return oo(re,!0)}function Ki(re){return oo(re,!1)}function Jo(re,ce){var ke=kn&&re.markedSpans,Ce;if(ke)for(var Oe=0;Oe<ke.length;++Oe){var tt=ke[Oe];tt.marker.collapsed&&(tt.from==null||tt.from<ce)&&(tt.to==null||tt.to>ce)&&(!Ce||gi(Ce,tt.marker)<0)&&(Ce=tt.marker)}return Ce}function Vo(re,ce,ke,Ce,Oe){var tt=Tn(re,ce),pt=kn&&tt.markedSpans;if(pt)for(var Nt=0;Nt<pt.length;++Nt){var kt=pt[Nt];if(kt.marker.collapsed){var Rt=kt.marker.find(0),rn=gr(Rt.from,ke)||io(kt.marker)-io(Oe),zt=gr(Rt.to,Ce)||Ir(kt.marker)-Ir(Oe);if(!(rn>=0&&zt<=0||rn<=0&&zt>=0)&&(rn<=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?gr(Rt.to,ke)>=0:gr(Rt.to,ke)>0)||rn>=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?gr(Rt.from,Ce)<=0:gr(Rt.from,Ce)<0)))return!0}}}function Zi(re){for(var ce;ce=Yi(re);)re=ce.find(-1,!0).line;return re}function ao(re){for(var ce;ce=Ki(re);)re=ce.find(1,!0).line;return re}function Mr(re){for(var ce,ke;ce=Ki(re);)re=ce.find(1,!0).line,(ke||(ke=[])).push(re);return ke}function Er(re,ce){var ke=Tn(re,ce),Ce=Zi(ke);return ke==Ce?ce:$t(Ce)}function jr(re,ce){if(ce>re.lastLine())return ce;var ke=Tn(re,ce),Ce;if(!pn(re,ke))return ce;for(;Ce=Ki(ke);)ke=Ce.find(1,!0).line;return $t(ke)+1}function pn(re,ce){var ke=kn&&ce.markedSpans;if(ke){for(var Ce=void 0,Oe=0;Oe<ke.length;++Oe)if(Ce=ke[Oe],!!Ce.marker.collapsed){if(Ce.from==null)return!0;if(!Ce.marker.widgetNode&&Ce.from==0&&Ce.marker.inclusiveLeft&&Hr(re,ce,Ce))return!0}}}function Hr(re,ce,ke){if(ke.to==null){var Ce=ke.marker.find(1,!0);return Hr(re,Ce.line,ya(Ce.line.markedSpans,ke.marker))}if(ke.marker.inclusiveRight&&ke.to==ce.text.length)return!0;for(var Oe=void 0,tt=0;tt<ce.markedSpans.length;++tt)if(Oe=ce.markedSpans[tt],Oe.marker.collapsed&&!Oe.marker.widgetNode&&Oe.from==ke.to&&(Oe.to==null||Oe.to!=ke.from)&&(Oe.marker.inclusiveLeft||ke.marker.inclusiveRight)&&Hr(re,ce,Oe))return!0}function pi(re){re=Zi(re);for(var ce=0,ke=re.parent,Ce=0;Ce<ke.lines.length;++Ce){var Oe=ke.lines[Ce];if(Oe==re)break;ce+=Oe.height}for(var tt=ke.parent;tt;ke=tt,tt=ke.parent)for(var pt=0;pt<tt.children.length;++pt){var Nt=tt.children[pt];if(Nt==ke)break;ce+=Nt.height}return ce}function vo(re){if(re.height==0)return 0;for(var ce=re.text.length,ke,Ce=re;ke=Yi(Ce);){var Oe=ke.find(0,!0);Ce=Oe.from.line,ce+=Oe.from.ch-Oe.to.ch}for(Ce=re;ke=Ki(Ce);){var tt=ke.find(0,!0);ce-=Ce.text.length-tt.from.ch,Ce=tt.to.line,ce+=Ce.text.length-tt.to.ch}return ce}function qi(re){var ce=re.display,ke=re.doc;ce.maxLine=Tn(ke,ke.first),ce.maxLineLength=vo(ce.maxLine),ce.maxLineChanged=!0,ke.iter(function(Ce){var Oe=vo(Ce);Oe>ce.maxLineLength&&(ce.maxLineLength=Oe,ce.maxLine=Ce)})}var Ao=function(re,ce,ke){this.text=re,Et(this,ce),this.height=ke?ke(this):1};Ao.prototype.lineNo=function(){return $t(this)},Yn(Ao);function $o(re,ce,ke,Ce){re.text=ce,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),Kn(re),Et(re,ke);var Oe=Ce?Ce(re):1;Oe!=re.height&&Wn(re,Oe)}function Fa(re){re.parent=null,Kn(re)}var Sa={},Zs={};function Bs(re,ce){if(!re||/^\s*$/.test(re))return null;var ke=ce.addModeClass?Zs:Sa;return ke[re]||(ke[re]=re.replace(/\S+/g,"cm-$&"))}function on(re,ce){var ke=Be("span",null,null,pe?"padding-right: .1px":null),Ce={pre:Be("pre",[ke],"CodeMirror-line"),content:ke,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 tt=Oe?ce.rest[Oe-1]:ce.line,pt=void 0;Ce.pos=0,Ce.addToken=ts,ro(re.display.measure)&&(pt=an(tt,re.doc.direction))&&(Ce.addToken=yo(Ce.addToken,pt)),Ce.map=[];var Nt=ce!=re.display.externalMeasured&&$t(tt);hl(tt,Ce,Ho(re,tt,Nt)),tt.styleClasses&&(tt.styleClasses.bgClass&&(Ce.bgClass=at(tt.styleClasses.bgClass,Ce.bgClass||"")),tt.styleClasses.textClass&&(Ce.textClass=at(tt.styleClasses.textClass,Ce.textClass||""))),Ce.map.length==0&&Ce.map.push(0,0,Ce.content.appendChild(Io(re.display.measure))),Oe==0?(ce.measure.map=Ce.map,ce.measure.cache={}):((ce.measure.maps||(ce.measure.maps=[])).push(Ce.map),(ce.measure.caches||(ce.measure.caches=[])).push({}))}if(pe){var kt=Ce.content.lastChild;(/\bcm-tab\b/.test(kt.className)||kt.querySelector&&kt.querySelector(".cm-tab"))&&(Ce.content.className="cm-tab-wrap-hack")}return fn(re,"renderLine",re,ce.line,Ce.pre),Ce.pre.className&&(Ce.textClass=at(Ce.pre.className,Ce.textClass||"")),Ce}function Da(re){var ce=Le("span","\u2022","cm-invalidchar");return ce.title="\\u"+re.charCodeAt(0).toString(16),ce.setAttribute("aria-label",ce.title),ce}function ts(re,ce,ke,Ce,Oe,tt,pt){if(ce){var Nt=re.splitSpaces?Bl(ce,re.trailingSpace):ce,kt=re.cm.state.specialChars,Rt=!1,rn;if(!kt.test(ce))re.col+=ce.length,rn=document.createTextNode(Nt),re.map.push(re.pos,re.pos+ce.length,rn),Re&&fe<9&&(Rt=!0),re.pos+=ce.length;else{rn=document.createDocumentFragment();for(var zt=0;;){kt.lastIndex=zt;var wn=kt.exec(ce),yn=wn?wn.index-zt:ce.length-zt;if(yn){var qn=document.createTextNode(Nt.slice(zt,zt+yn));Re&&fe<9?rn.appendChild(Le("span",[qn])):rn.appendChild(qn),re.map.push(re.pos,re.pos+yn,qn),re.col+=yn,re.pos+=yn}if(!wn)break;zt+=yn+1;var ir=void 0;if(wn[0]==" "){var vr=re.cm.options.tabSize,Dr=vr-re.col%vr;ir=rn.appendChild(Le("span",gt(Dr),"cm-tab")),ir.setAttribute("role","presentation"),ir.setAttribute("cm-text"," "),re.col+=Dr}else wn[0]=="\r"||wn[0]==`
|
|
`?(ir=rn.appendChild(Le("span",wn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ir.setAttribute("cm-text",wn[0]),re.col+=1):(ir=re.cm.options.specialCharPlaceholder(wn[0]),ir.setAttribute("cm-text",wn[0]),Re&&fe<9?rn.appendChild(Le("span",[ir])):rn.appendChild(ir),re.col+=1);re.map.push(re.pos,re.pos+1,ir),re.pos++}}if(re.trailingSpace=Nt.charCodeAt(ce.length-1)==32,ke||Ce||Oe||Rt||tt||pt){var ti=ke||"";Ce&&(ti+=Ce),Oe&&(ti+=Oe);var Kr=Le("span",[rn],ti,tt);if(pt)for(var si in pt)pt.hasOwnProperty(si)&&si!="style"&&si!="class"&&Kr.setAttribute(si,pt[si]);return re.content.appendChild(Kr)}re.content.appendChild(rn)}}function Bl(re,ce){if(re.length>1&&!/ /.test(re))return re;for(var ke=ce,Ce="",Oe=0;Oe<re.length;Oe++){var tt=re.charAt(Oe);tt==" "&&ke&&(Oe==re.length-1||re.charCodeAt(Oe+1)==32)&&(tt="\xA0"),Ce+=tt,ke=tt==" "}return Ce}function yo(re,ce){return function(ke,Ce,Oe,tt,pt,Nt,kt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var Rt=ke.pos,rn=Rt+Ce.length;;){for(var zt=void 0,wn=0;wn<ce.length&&(zt=ce[wn],!(zt.to>Rt&&zt.from<=Rt));wn++);if(zt.to>=rn)return re(ke,Ce,Oe,tt,pt,Nt,kt);re(ke,Ce.slice(0,zt.to-Rt),Oe,tt,null,Nt,kt),tt=null,Ce=Ce.slice(zt.to-Rt),Rt=zt.to}}}function ul(re,ce,ke,Ce){var Oe=!Ce&&ke.widgetNode;Oe&&re.map.push(re.pos,re.pos+ce,Oe),!Ce&&re.cm.display.input.needsContentAttribute&&(Oe||(Oe=re.content.appendChild(document.createElement("span"))),Oe.setAttribute("cm-marker",ke.id)),Oe&&(re.cm.display.input.setUneditable(Oe),re.content.appendChild(Oe)),re.pos+=ce,re.trailingSpace=!1}function hl(re,ce,ke){var Ce=re.markedSpans,Oe=re.text,tt=0;if(!Ce){for(var pt=1;pt<ke.length;pt+=2)ce.addToken(ce,Oe.slice(tt,tt=ke[pt]),Bs(ke[pt+1],ce.cm.options));return}for(var Nt=Oe.length,kt=0,Rt=1,rn="",zt,wn,yn=0,qn,ir,vr,Dr,ti;;){if(yn==kt){qn=ir=vr=wn="",ti=null,Dr=null,yn=1/0;for(var Kr=[],si=void 0,Hi=0;Hi<Ce.length;++Hi){var Ur=Ce[Hi],co=Ur.marker;if(co.type=="bookmark"&&Ur.from==kt&&co.widgetNode)Kr.push(co);else if(Ur.from<=kt&&(Ur.to==null||Ur.to>kt||co.collapsed&&Ur.to==kt&&Ur.from==kt)){if(Ur.to!=null&&Ur.to!=kt&&yn>Ur.to&&(yn=Ur.to,ir=""),co.className&&(qn+=" "+co.className),co.css&&(wn=(wn?wn+";":"")+co.css),co.startStyle&&Ur.from==kt&&(vr+=" "+co.startStyle),co.endStyle&&Ur.to==yn&&(si||(si=[])).push(co.endStyle,Ur.to),co.title&&((ti||(ti={})).title=co.title),co.attributes)for(var ka in co.attributes)(ti||(ti={}))[ka]=co.attributes[ka];co.collapsed&&(!Dr||gi(Dr.marker,co)<0)&&(Dr=Ur)}else Ur.from>kt&&yn>Ur.from&&(yn=Ur.from)}if(si)for(var ms=0;ms<si.length;ms+=2)si[ms+1]==yn&&(ir+=" "+si[ms]);if(!Dr||Dr.from==kt)for(var Ia=0;Ia<Kr.length;++Ia)ul(ce,0,Kr[Ia]);if(Dr&&(Dr.from||0)==kt){if(ul(ce,(Dr.to==null?Nt+1:Dr.to)-kt,Dr.marker,Dr.from==null),Dr.to==null)return;Dr.to==kt&&(Dr=!1)}}if(kt>=Nt)break;for(var Al=Math.min(Nt,yn);;){if(rn){var rl=kt+rn.length;if(!Dr){var as=rl>Al?rn.slice(0,Al-kt):rn;ce.addToken(ce,as,zt?zt+qn:qn,vr,kt+as.length==yn?ir:"",wn,ti)}if(rl>=Al){rn=rn.slice(Al-kt),kt=Al;break}kt=rl,vr=""}rn=Oe.slice(tt,tt=ke[Rt++]),zt=Bs(ke[Rt++],ce.cm.options)}}}function bl(re,ce,ke){this.line=ce,this.rest=Mr(ce),this.size=this.rest?$t(Tt(this.rest))-ke+1:1,this.node=this.text=null,this.hidden=pn(re,ce)}function bo(re,ce,ke){for(var Ce=[],Oe,tt=ce;tt<ke;tt=Oe){var pt=new bl(re.doc,Tn(re.doc,tt),tt);Oe=tt+pt.size,Ce.push(pt)}return Ce}var ia=null;function mi(re){ia?ia.ops.push(re):re.ownsGroup=ia={ops:[re],delayedCallbacks:[]}}function Gi(re){var ce=re.delayedCallbacks,ke=0;do{for(;ke<ce.length;ke++)ce[ke].call(null);for(var Ce=0;Ce<re.ops.length;Ce++){var Oe=re.ops[Ce];if(Oe.cursorActivityHandlers)for(;Oe.cursorActivityCalled<Oe.cursorActivityHandlers.length;)Oe.cursorActivityHandlers[Oe.cursorActivityCalled++].call(null,Oe.cm)}}while(ke<ce.length)}function Co(re,ce){var ke=re.ownsGroup;if(ke)try{Gi(ke)}finally{ia=null,ce(ke)}}var Zo=null;function wr(re,ce){var ke=qt(re,ce);if(ke.length){var Ce=Array.prototype.slice.call(arguments,2),Oe;ia?Oe=ia.delayedCallbacks:Zo?Oe=Zo:(Oe=Zo=[],setTimeout(Ku,0));for(var tt=function(Nt){Oe.push(function(){return ke[Nt].apply(null,Ce)})},pt=0;pt<ke.length;++pt)tt(pt)}}function Ku(){var re=Zo;Zo=null;for(var ce=0;ce<re.length;++ce)re[ce]()}function Xs(re,ce,ke,Ce){for(var Oe=0;Oe<ce.changes.length;Oe++){var tt=ce.changes[Oe];tt=="text"?ar(re,ce):tt=="gutter"?La(re,ce,ke,Ce):tt=="class"?ba(re,ce):tt=="widget"&&Cl(re,ce,Ce)}ce.changes=null}function xs(re){return re.node==re.text&&(re.node=Le("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),Re&&fe<8&&(re.node.style.zIndex=2)),re.node}function ic(re,ce){var ke=ce.bgClass?ce.bgClass+" "+(ce.line.bgClass||""):ce.line.bgClass;if(ke&&(ke+=" CodeMirror-linebackground"),ce.background)ke?ce.background.className=ke:(ce.background.parentNode.removeChild(ce.background),ce.background=null);else if(ke){var Ce=xs(ce);ce.background=Ce.insertBefore(Le("div",null,ke),Ce.firstChild),re.display.input.setUneditable(ce.background)}}function ku(re,ce){var ke=re.display.externalMeasured;return ke&&ke.line==ce.line?(re.display.externalMeasured=null,ce.measure=ke.measure,ke.built):on(re,ce)}function ar(re,ce){var ke=ce.text.className,Ce=ku(re,ce);ce.text==ce.node&&(ce.node=Ce.pre),ce.text.parentNode.replaceChild(Ce.pre,ce.text),ce.text=Ce.pre,Ce.bgClass!=ce.bgClass||Ce.textClass!=ce.textClass?(ce.bgClass=Ce.bgClass,ce.textClass=Ce.textClass,ba(re,ce)):ke&&(ce.text.className=ke)}function ba(re,ce){ic(re,ce),ce.line.wrapClass?xs(ce).className=ce.line.wrapClass:ce.node!=ce.text&&(ce.node.className="");var ke=ce.textClass?ce.textClass+" "+(ce.line.textClass||""):ce.line.textClass;ce.text.className=ke||""}function La(re,ce,ke,Ce){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=xs(ce);ce.gutterBackground=Le("div",null,"CodeMirror-gutter-background "+ce.line.gutterClass,"left: "+(re.options.fixedGutter?Ce.fixedPos:-Ce.gutterTotalWidth)+"px; width: "+Ce.gutterTotalWidth+"px"),re.display.input.setUneditable(ce.gutterBackground),Oe.insertBefore(ce.gutterBackground,ce.text)}var tt=ce.line.gutterMarkers;if(re.options.lineNumbers||tt){var pt=xs(ce),Nt=ce.gutter=Le("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?Ce.fixedPos:-Ce.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Nt),pt.insertBefore(Nt,ce.text),ce.line.gutterClass&&(Nt.className+=" "+ce.line.gutterClass),re.options.lineNumbers&&(!tt||!tt["CodeMirror-linenumbers"])&&(ce.lineNumber=Nt.appendChild(Le("div",Nr(re.options,ke),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Ce.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),tt)for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=re.display.gutterSpecs[kt].className,rn=tt.hasOwnProperty(Rt)&&tt[Rt];rn&&Nt.appendChild(Le("div",[rn],"CodeMirror-gutter-elt","left: "+Ce.gutterLeft[Rt]+"px; width: "+Ce.gutterWidth[Rt]+"px"))}}}function Cl(re,ce,ke){ce.alignable&&(ce.alignable=null);for(var Ce=Ae("CodeMirror-linewidget"),Oe=ce.node.firstChild,tt=void 0;Oe;Oe=tt)tt=Oe.nextSibling,Ce.test(Oe.className)&&ce.node.removeChild(Oe);Xa(re,ce,ke)}function Ca(re,ce,ke,Ce){var Oe=ku(re,ce);return ce.text=ce.node=Oe.pre,Oe.bgClass&&(ce.bgClass=Oe.bgClass),Oe.textClass&&(ce.textClass=Oe.textClass),ba(re,ce),La(re,ce,ke,Ce),Xa(re,ce,Ce),ce.node}function Xa(re,ce,ke){if(vi(re,ce.line,ce,ke,!0),ce.rest)for(var Ce=0;Ce<ce.rest.length;Ce++)vi(re,ce.rest[Ce],ce,ke,!1)}function vi(re,ce,ke,Ce,Oe){if(ce.widgets)for(var tt=xs(ke),pt=0,Nt=ce.widgets;pt<Nt.length;++pt){var kt=Nt[pt],Rt=Le("div",[kt.node],"CodeMirror-linewidget"+(kt.className?" "+kt.className:""));kt.handleMouseEvents||Rt.setAttribute("cm-ignore-events","true"),Il(kt,Rt,ke,Ce),re.display.input.setUneditable(Rt),Oe&&kt.above?tt.insertBefore(Rt,ke.gutter||ke.text):tt.appendChild(Rt),wr(kt,"redraw")}}function Il(re,ce,ke,Ce){if(re.noHScroll){(ke.alignable||(ke.alignable=[])).push(ce);var Oe=Ce.wrapperWidth;ce.style.left=Ce.fixedPos+"px",re.coverGutter||(Oe-=Ce.gutterTotalWidth,ce.style.paddingLeft=Ce.gutterTotalWidth+"px"),ce.style.width=Oe+"px"}re.coverGutter&&(ce.style.zIndex=5,ce.style.position="relative",re.noHScroll||(ce.style.marginLeft=-Ce.gutterTotalWidth+"px"))}function us(re){if(re.height!=null)return re.height;var ce=re.doc.cm;if(!ce)return 0;if(!Je(document.body,re.node)){var ke="position: relative;";re.coverGutter&&(ke+="margin-left: -"+ce.display.gutters.offsetWidth+"px;"),re.noHScroll&&(ke+="width: "+ce.display.wrapper.clientWidth+"px;"),je(ce.display.measure,Le("div",[re.node],null,ke))}return re.height=re.node.parentNode.offsetHeight}function hs(re,ce){for(var ke=ri(ce);ke!=re.wrapper;ke=ke.parentNode)if(!ke||ke.nodeType==1&&ke.getAttribute("cm-ignore-events")=="true"||ke.parentNode==re.sizer&&ke!=re.mover)return!0}function Ys(re){return re.lineSpace.offsetTop}function lh(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function oc(re){if(re.cachedPaddingH)return re.cachedPaddingH;var ce=je(re.measure,Le("pre","x","CodeMirror-line-like")),ke=window.getComputedStyle?window.getComputedStyle(ce):ce.currentStyle,Ce={left:parseInt(ke.paddingLeft),right:parseInt(ke.paddingRight)};return!isNaN(Ce.left)&&!isNaN(Ce.right)&&(re.cachedPaddingH=Ce),Ce}function Is(re){return vt-re.display.nativeBarWidth}function Jl(re){return re.display.scroller.clientWidth-Is(re)-re.display.barWidth}function Rc(re){return re.display.scroller.clientHeight-Is(re)-re.display.barHeight}function rd(re,ce,ke){var Ce=re.options.lineWrapping,Oe=Ce&&Jl(re);if(!ce.measure.heights||Ce&&ce.measure.width!=Oe){var tt=ce.measure.heights=[];if(Ce){ce.measure.width=Oe;for(var pt=ce.text.firstChild.getClientRects(),Nt=0;Nt<pt.length-1;Nt++){var kt=pt[Nt],Rt=pt[Nt+1];Math.abs(kt.bottom-Rt.bottom)>2&&tt.push((kt.bottom+Rt.top)/2-ke.top)}}tt.push(ke.bottom-ke.top)}}function Pf(re,ce,ke){if(re.line==ce)return{map:re.measure.map,cache:re.measure.cache};for(var Ce=0;Ce<re.rest.length;Ce++)if(re.rest[Ce]==ce)return{map:re.measure.maps[Ce],cache:re.measure.caches[Ce]};for(var Oe=0;Oe<re.rest.length;Oe++)if($t(re.rest[Oe])>ke)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function id(re,ce){ce=Zi(ce);var ke=$t(ce),Ce=re.display.externalMeasured=new bl(re.doc,ce,ke);Ce.lineN=ke;var Oe=Ce.built=on(re,Ce);return Ce.text=Oe.pre,je(re.display.lineMeasure,Oe.pre),Ce}function Bc(re,ce,ke,Ce){return cu(re,uh(re,ce),ke,Ce)}function Ah(re,ce){if(ce>=re.display.viewFrom&&ce<re.display.viewTo)return re.display.view[kl(re,ce)];var ke=re.display.externalMeasured;if(ke&&ce>=ke.lineN&&ce<ke.lineN+ke.size)return ke}function uh(re,ce){var ke=$t(ce),Ce=Ah(re,ke);Ce&&!Ce.text?Ce=null:Ce&&Ce.changes&&(Xs(re,Ce,ke,Hc(re)),re.curOp.forceUpdate=!0),Ce||(Ce=id(re,ce));var Oe=Pf(Ce,ce,ke);return{line:ce,view:Ce,rect:null,map:Oe.map,cache:Oe.cache,before:Oe.before,hasHeights:!1}}function cu(re,ce,ke,Ce,Oe){ce.before&&(ke=-1);var tt=ke+(Ce||""),pt;return ce.cache.hasOwnProperty(tt)?pt=ce.cache[tt]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(rd(re,ce.view,ce.rect),ce.hasHeights=!0),pt=za(re,ce,ke,Ce),pt.bogus||(ce.cache[tt]=pt)),{left:pt.left,right:pt.right,top:Oe?pt.rtop:pt.top,bottom:Oe?pt.rbottom:pt.bottom}}var Ic={left:0,right:0,top:0,bottom:0};function bf(re,ce,ke){for(var Ce,Oe,tt,pt,Nt,kt,Rt=0;Rt<re.length;Rt+=3)if(Nt=re[Rt],kt=re[Rt+1],ce<Nt?(Oe=0,tt=1,pt="left"):ce<kt?(Oe=ce-Nt,tt=Oe+1):(Rt==re.length-3||ce==kt&&re[Rt+3]>ce)&&(tt=kt-Nt,Oe=tt-1,ce>=kt&&(pt="right")),Oe!=null){if(Ce=re[Rt+2],Nt==kt&&ke==(Ce.insertLeft?"left":"right")&&(pt=ke),ke=="left"&&Oe==0)for(;Rt&&re[Rt-2]==re[Rt-3]&&re[Rt-1].insertLeft;)Ce=re[(Rt-=3)+2],pt="left";if(ke=="right"&&Oe==kt-Nt)for(;Rt<re.length-3&&re[Rt+3]==re[Rt+4]&&!re[Rt+5].insertLeft;)Ce=re[(Rt+=3)+2],pt="right";break}return{node:Ce,start:Oe,end:tt,collapse:pt,coverStart:Nt,coverEnd:kt}}function od(re,ce){var ke=Ic;if(ce=="left")for(var Ce=0;Ce<re.length&&(ke=re[Ce]).left==ke.right;Ce++);else for(var Oe=re.length-1;Oe>=0&&(ke=re[Oe]).left==ke.right;Oe--);return ke}function za(re,ce,ke,Ce){var Oe=bf(ce.map,ke,Ce),tt=Oe.node,pt=Oe.start,Nt=Oe.end,kt=Oe.collapse,Rt;if(tt.nodeType==3){for(var rn=0;rn<4;rn++){for(;pt&&Ve(ce.line.text.charAt(Oe.coverStart+pt));)--pt;for(;Oe.coverStart+Nt<Oe.coverEnd&&Ve(ce.line.text.charAt(Oe.coverStart+Nt));)++Nt;if(Re&&fe<9&&pt==0&&Nt==Oe.coverEnd-Oe.coverStart?Rt=tt.parentNode.getBoundingClientRect():Rt=od(Ue(tt,pt,Nt).getClientRects(),Ce),Rt.left||Rt.right||pt==0)break;Nt=pt,pt=pt-1,kt="right"}Re&&fe<11&&(Rt=Hp(re.display.measure,Rt))}else{pt>0&&(kt=Ce="right");var zt;re.options.lineWrapping&&(zt=tt.getClientRects()).length>1?Rt=zt[Ce=="right"?zt.length-1:0]:Rt=tt.getBoundingClientRect()}if(Re&&fe<9&&!pt&&(!Rt||!Rt.left&&!Rt.right)){var wn=tt.parentNode.getClientRects()[0];wn?Rt={left:wn.left,right:wn.left+Oh(re.display),top:wn.top,bottom:wn.bottom}:Rt=Ic}for(var yn=Rt.top-ce.rect.top,qn=Rt.bottom-ce.rect.top,ir=(yn+qn)/2,vr=ce.view.measure.heights,Dr=0;Dr<vr.length-1&&!(ir<vr[Dr]);Dr++);var ti=Dr?vr[Dr-1]:0,Kr=vr[Dr],si={left:(kt=="right"?Rt.right:Rt.left)-ce.rect.left,right:(kt=="left"?Rt.left:Rt.right)-ce.rect.left,top:ti,bottom:Kr};return!Rt.left&&!Rt.right&&(si.bogus=!0),re.options.singleCursorHeightPerLine||(si.rtop=yn,si.rbottom=qn),si}function Hp(re,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Lr(re))return ce;var ke=screen.logicalXDPI/screen.deviceXDPI,Ce=screen.logicalYDPI/screen.deviceYDPI;return{left:ce.left*ke,right:ce.right*ke,top:ce.top*Ce,bottom:ce.bottom*Ce}}function ad(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 _c(re){re.display.externalMeasure=null,Fe(re.display.lineMeasure);for(var ce=0;ce<re.display.view.length;ce++)ad(re.display.view[ce])}function jh(re){_c(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function ws(){return Ee&&ee?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ps(){return Ee&&ee?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Wa(re){var ce=0;if(re.widgets)for(var ke=0;ke<re.widgets.length;++ke)re.widgets[ke].above&&(ce+=us(re.widgets[ke]));return ce}function ns(re,ce,ke,Ce,Oe){if(!Oe){var tt=Wa(ce);ke.top+=tt,ke.bottom+=tt}if(Ce=="line")return ke;Ce||(Ce="local");var pt=pi(ce);if(Ce=="local"?pt+=Ys(re.display):pt-=re.display.viewOffset,Ce=="page"||Ce=="window"){var Nt=re.display.lineSpace.getBoundingClientRect();pt+=Nt.top+(Ce=="window"?0:Ps());var kt=Nt.left+(Ce=="window"?0:ws());ke.left+=kt,ke.right+=kt}return ke.top+=pt,ke.bottom+=pt,ke}function zc(re,ce,ke){if(ke=="div")return ce;var Ce=ce.left,Oe=ce.top;if(ke=="page")Ce-=ws(),Oe-=Ps();else if(ke=="local"||!ke){var tt=re.display.sizer.getBoundingClientRect();Ce+=tt.left,Oe+=tt.top}var pt=re.display.lineSpace.getBoundingClientRect();return{left:Ce-pt.left,top:Oe-pt.top}}function El(re,ce,ke,Ce,Oe){return Ce||(Ce=Tn(re.doc,ce.line)),ns(re,Ce,Bc(re,Ce,ce.ch,Oe),ke)}function Ea(re,ce,ke,Ce,Oe,tt){Ce=Ce||Tn(re.doc,ce.line),Oe||(Oe=uh(re,Ce));function pt(qn,ir){var vr=cu(re,Oe,qn,ir?"right":"left",tt);return ir?vr.left=vr.right:vr.right=vr.left,ns(re,Ce,vr,ke)}var Nt=an(Ce,re.doc.direction),kt=ce.ch,Rt=ce.sticky;if(kt>=Ce.text.length?(kt=Ce.text.length,Rt="before"):kt<=0&&(kt=0,Rt="after"),!Nt)return pt(Rt=="before"?kt-1:kt,Rt=="before");function rn(qn,ir,vr){var Dr=Nt[ir],ti=Dr.level==1;return pt(vr?qn-1:qn,ti!=vr)}var zt=jt(Nt,kt,Rt),wn=It,yn=rn(kt,zt,Rt=="before");return wn!=null&&(yn.other=rn(kt,wn,Rt!="before")),yn}function Gc(re,ce){var ke=0;ce=Ar(re.doc,ce),re.options.lineWrapping||(ke=Oh(re.display)*ce.ch);var Ce=Tn(re.doc,ce.line),Oe=pi(Ce)+Ys(re.display);return{left:ke,right:ke,top:Oe,bottom:Oe+Ce.height}}function Uc(re,ce,ke,Ce,Oe){var tt=xn(re,ce,ke);return tt.xRel=Oe,Ce&&(tt.outside=Ce),tt}function Cf(re,ce,ke){var Ce=re.doc;if(ke+=re.display.viewOffset,ke<0)return Uc(Ce.first,0,null,-1,-1);var Oe=cr(Ce,ke),tt=Ce.first+Ce.size-1;if(Oe>tt)return Uc(Ce.first+Ce.size-1,Tn(Ce,tt).text.length,null,1,1);ce<0&&(ce=0);for(var pt=Tn(Ce,Oe);;){var Nt=jn(re,pt,Oe,ce,ke),kt=Jo(pt,Nt.ch+(Nt.xRel>0||Nt.outside>0?1:0));if(!kt)return Nt;var Rt=kt.find(1);if(Rt.line==Oe)return Rt;pt=Tn(Ce,Oe=Rt.line)}}function Wr(re,ce,ke,Ce){Ce-=Wa(ce);var Oe=ce.text.length,tt=St(function(pt){return cu(re,ke,pt-1).bottom<=Ce},Oe,0);return Oe=St(function(pt){return cu(re,ke,pt).top>Ce},tt,Oe),{begin:tt,end:Oe}}function sd(re,ce,ke,Ce){ke||(ke=uh(re,ce));var Oe=ns(re,ce,cu(re,ke,Ce),"line").top;return Wr(re,ce,ke,Oe)}function Ht(re,ce,ke,Ce){return re.bottom<=ke?!1:re.top>ke?!0:(Ce?re.left:re.right)>ce}function jn(re,ce,ke,Ce,Oe){Oe-=pi(ce);var tt=uh(re,ce),pt=Wa(ce),Nt=0,kt=ce.text.length,Rt=!0,rn=an(ce,re.doc.direction);if(rn){var zt=(re.options.lineWrapping?ld:Hd)(re,ce,ke,tt,rn,Ce,Oe);Rt=zt.level!=1,Nt=Rt?zt.from:zt.to-1,kt=Rt?zt.to:zt.from-1}var wn=null,yn=null,qn=St(function(Hi){var Ur=cu(re,tt,Hi);return Ur.top+=pt,Ur.bottom+=pt,Ht(Ur,Ce,Oe,!1)?(Ur.top<=Oe&&Ur.left<=Ce&&(wn=Hi,yn=Ur),!0):!1},Nt,kt),ir,vr,Dr=!1;if(yn){var ti=Ce-yn.left<yn.right-Ce,Kr=ti==Rt;qn=wn+(Kr?0:1),vr=Kr?"after":"before",ir=ti?yn.left:yn.right}else{!Rt&&(qn==kt||qn==Nt)&&qn++,vr=qn==0?"after":qn==ce.text.length?"before":cu(re,tt,qn-(Rt?1:0)).bottom+pt<=Oe==Rt?"after":"before";var si=Ea(re,xn(ke,qn,vr),"line",ce,tt);ir=si.left,Dr=Oe<si.top?-1:Oe>=si.bottom?1:0}return qn=it(ce.text,qn,1),Uc(ke,qn,vr,Dr,Ce-ir)}function Hd(re,ce,ke,Ce,Oe,tt,pt){var Nt=St(function(zt){var wn=Oe[zt],yn=wn.level!=1;return Ht(Ea(re,xn(ke,yn?wn.to:wn.from,yn?"before":"after"),"line",ce,Ce),tt,pt,!0)},0,Oe.length-1),kt=Oe[Nt];if(Nt>0){var Rt=kt.level!=1,rn=Ea(re,xn(ke,Rt?kt.from:kt.to,Rt?"after":"before"),"line",ce,Ce);Ht(rn,tt,pt,!0)&&rn.top>pt&&(kt=Oe[Nt-1])}return kt}function ld(re,ce,ke,Ce,Oe,tt,pt){var Nt=Wr(re,ce,Ce,pt),kt=Nt.begin,Rt=Nt.end;/\s/.test(ce.text.charAt(Rt-1))&&Rt--;for(var rn=null,zt=null,wn=0;wn<Oe.length;wn++){var yn=Oe[wn];if(!(yn.from>=Rt||yn.to<=kt)){var qn=yn.level!=1,ir=cu(re,Ce,qn?Math.min(Rt,yn.to)-1:Math.max(kt,yn.from)).right,vr=ir<tt?tt-ir+1e9:ir-tt;(!rn||zt>vr)&&(rn=yn,zt=vr)}}return rn||(rn=Oe[Oe.length-1]),rn.from<kt&&(rn={from:kt,to:rn.to,level:rn.level}),rn.to>Rt&&(rn={from:rn.from,to:Rt,level:rn.level}),rn}var Vu;function Mu(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(Vu==null){Vu=Le("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)Vu.appendChild(document.createTextNode("x")),Vu.appendChild(Le("br"));Vu.appendChild(document.createTextNode("x"))}je(re.measure,Vu);var ke=Vu.offsetHeight/50;return ke>3&&(re.cachedTextHeight=ke),Fe(re.measure),ke||1}function Oh(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var ce=Le("span","xxxxxxxxxx"),ke=Le("pre",[ce],"CodeMirror-line-like");je(re.measure,ke);var Ce=ce.getBoundingClientRect(),Oe=(Ce.right-Ce.left)/10;return Oe>2&&(re.cachedCharWidth=Oe),Oe||10}function Hc(re){for(var ce=re.display,ke={},Ce={},Oe=ce.gutters.clientLeft,tt=ce.gutters.firstChild,pt=0;tt;tt=tt.nextSibling,++pt){var Nt=re.display.gutterSpecs[pt].className;ke[Nt]=tt.offsetLeft+tt.clientLeft+Oe,Ce[Nt]=tt.clientWidth}return{fixedPos:Fh(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:ke,gutterWidth:Ce,wrapperWidth:ce.wrapper.clientWidth}}function Fh(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function pa(re){var ce=Mu(re.display),ke=re.options.lineWrapping,Ce=ke&&Math.max(5,re.display.scroller.clientWidth/Oh(re.display)-3);return function(Oe){if(pn(re.doc,Oe))return 0;var tt=0;if(Oe.widgets)for(var pt=0;pt<Oe.widgets.length;pt++)Oe.widgets[pt].height&&(tt+=Oe.widgets[pt].height);return ke?tt+(Math.ceil(Oe.text.length/Ce)||1)*ce:tt+ce}}function ci(re){var ce=re.doc,ke=pa(re);ce.iter(function(Ce){var Oe=ke(Ce);Oe!=Ce.height&&Wn(Ce,Oe)})}function _s(re,ce,ke,Ce){var Oe=re.display;if(!ke&&ri(ce).getAttribute("cm-not-content")=="true")return null;var tt,pt,Nt=Oe.lineSpace.getBoundingClientRect();try{tt=ce.clientX-Nt.left,pt=ce.clientY-Nt.top}catch(zt){return null}var kt=Cf(re,tt,pt),Rt;if(Ce&&kt.xRel>0&&(Rt=Tn(re.doc,kt.line).text).length==kt.ch){var rn=Xe(Rt,Rt.length,re.options.tabSize)-Rt.length;kt=xn(kt.line,Math.max(0,Math.round((tt-oc(re.display).left)/Oh(re.display))-rn))}return kt}function kl(re,ce){if(ce>=re.display.viewTo||(ce-=re.display.viewFrom,ce<0))return null;for(var ke=re.display.view,Ce=0;Ce<ke.length;Ce++)if(ce-=ke[Ce].size,ce<0)return Ce}function ua(re,ce,ke,Ce){ce==null&&(ce=re.doc.first),ke==null&&(ke=re.doc.first+re.doc.size),Ce||(Ce=0);var Oe=re.display;if(Ce&&ke<Oe.viewTo&&(Oe.updateLineNumbers==null||Oe.updateLineNumbers>ce)&&(Oe.updateLineNumbers=ce),re.curOp.viewChanged=!0,ce>=Oe.viewTo)kn&&Er(re.doc,ce)<Oe.viewTo&&Ra(re);else if(ke<=Oe.viewFrom)kn&&jr(re.doc,ke+Ce)>Oe.viewFrom?Ra(re):(Oe.viewFrom+=Ce,Oe.viewTo+=Ce);else if(ce<=Oe.viewFrom&&ke>=Oe.viewTo)Ra(re);else if(ce<=Oe.viewFrom){var tt=$s(re,ke,ke+Ce,1);tt?(Oe.view=Oe.view.slice(tt.index),Oe.viewFrom=tt.lineN,Oe.viewTo+=Ce):Ra(re)}else if(ke>=Oe.viewTo){var pt=$s(re,ce,ce,-1);pt?(Oe.view=Oe.view.slice(0,pt.index),Oe.viewTo=pt.lineN):Ra(re)}else{var Nt=$s(re,ce,ce,-1),kt=$s(re,ke,ke+Ce,1);Nt&&kt?(Oe.view=Oe.view.slice(0,Nt.index).concat(bo(re,Nt.lineN,kt.lineN)).concat(Oe.view.slice(kt.index)),Oe.viewTo+=Ce):Ra(re)}var Rt=Oe.externalMeasured;Rt&&(ke<Rt.lineN?Rt.lineN+=Ce:ce<Rt.lineN+Rt.size&&(Oe.externalMeasured=null))}function eo(re,ce,ke){re.curOp.viewChanged=!0;var Ce=re.display,Oe=re.display.externalMeasured;if(Oe&&ce>=Oe.lineN&&ce<Oe.lineN+Oe.size&&(Ce.externalMeasured=null),!(ce<Ce.viewFrom||ce>=Ce.viewTo)){var tt=Ce.view[kl(re,ce)];if(tt.node!=null){var pt=tt.changes||(tt.changes=[]);lt(pt,ke)==-1&&pt.push(ke)}}}function Ra(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function $s(re,ce,ke,Ce){var Oe=kl(re,ce),tt,pt=re.display.view;if(!kn||ke==re.doc.first+re.doc.size)return{index:Oe,lineN:ke};for(var Nt=re.display.viewFrom,kt=0;kt<Oe;kt++)Nt+=pt[kt].size;if(Nt!=ce){if(Ce>0){if(Oe==pt.length-1)return null;tt=Nt+pt[Oe].size-ce,Oe++}else tt=Nt-ce;ce+=tt,ke+=tt}for(;Er(re.doc,ke)!=ke;){if(Oe==(Ce<0?0:pt.length-1))return null;ke+=Ce*pt[Oe-(Ce<0?1:0)].size,Oe+=Ce}return{index:Oe,lineN:ke}}function Qo(re,ce,ke){var Ce=re.display,Oe=Ce.view;Oe.length==0||ce>=Ce.viewTo||ke<=Ce.viewFrom?(Ce.view=bo(re,ce,ke),Ce.viewFrom=ce):(Ce.viewFrom>ce?Ce.view=bo(re,ce,Ce.viewFrom).concat(Ce.view):Ce.viewFrom<ce&&(Ce.view=Ce.view.slice(kl(re,ce))),Ce.viewFrom=ce,Ce.viewTo<ke?Ce.view=Ce.view.concat(bo(re,Ce.viewTo,ke)):Ce.viewTo>ke&&(Ce.view=Ce.view.slice(0,kl(re,ke)))),Ce.viewTo=ke}function cl(re){for(var ce=re.display.view,ke=0,Ce=0;Ce<ce.length;Ce++){var Oe=ce[Ce];!Oe.hidden&&(!Oe.node||Oe.changes)&&++ke}return ke}function Ya(re){re.display.input.showSelection(re.display.input.prepareSelection())}function Zu(re,ce){ce===void 0&&(ce=!0);for(var ke=re.doc,Ce={},Oe=Ce.cursors=document.createDocumentFragment(),tt=Ce.selection=document.createDocumentFragment(),pt=0;pt<ke.sel.ranges.length;pt++)if(!(!ce&&pt==ke.sel.primIndex)){var Nt=ke.sel.ranges[pt];if(!(Nt.from().line>=re.display.viewTo||Nt.to().line<re.display.viewFrom)){var kt=Nt.empty();(kt||re.options.showCursorWhenSelecting)&&Lo(re,Nt.head,Oe),kt||fo(re,Nt,tt)}}return Ce}function Lo(re,ce,ke){var Ce=Ea(re,ce,"div",null,null,!re.options.singleCursorHeightPerLine),Oe=ke.appendChild(Le("div","\xA0","CodeMirror-cursor"));if(Oe.style.left=Ce.left+"px",Oe.style.top=Ce.top+"px",Oe.style.height=Math.max(0,Ce.bottom-Ce.top)*re.options.cursorHeight+"px",Ce.other){var tt=ke.appendChild(Le("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));tt.style.display="",tt.style.left=Ce.other.left+"px",tt.style.top=Ce.other.top+"px",tt.style.height=(Ce.other.bottom-Ce.other.top)*.85+"px"}}function zs(re,ce){return re.top-ce.top||re.left-ce.left}function fo(re,ce,ke){var Ce=re.display,Oe=re.doc,tt=document.createDocumentFragment(),pt=oc(re.display),Nt=pt.left,kt=Math.max(Ce.sizerWidth,Jl(re)-Ce.sizer.offsetLeft)-pt.right,Rt=Oe.direction=="ltr";function rn(Kr,si,Hi,Ur){si<0&&(si=0),si=Math.round(si),Ur=Math.round(Ur),tt.appendChild(Le("div",null,"CodeMirror-selected","position: absolute; left: "+Kr+`px;
|
|
top: `+si+"px; width: "+(Hi==null?kt-Kr:Hi)+`px;
|
|
height: `+(Ur-si)+"px"))}function zt(Kr,si,Hi){var Ur=Tn(Oe,Kr),co=Ur.text.length,ka,ms;function Ia(as,Ul){return El(re,xn(Kr,as),"div",Ur,Ul)}function Al(as,Ul,Gs){var ss=sd(re,Ur,null,as),Ko=Ul=="ltr"==(Gs=="after")?"left":"right",Ga=Gs=="after"?ss.begin:ss.end-(/\s/.test(Ur.text.charAt(ss.end-1))?2:1);return Ia(Ga,Ko)[Ko]}var rl=an(Ur,Oe.direction);return Ct(rl,si||0,Hi==null?co:Hi,function(as,Ul,Gs,ss){var Ko=Gs=="ltr",Ga=Ia(as,Ko?"left":"right"),ks=Ia(Ul-1,Ko?"right":"left"),Us=si==null&&as==0,Du=Hi==null&&Ul==co,_a=ss==0,vu=!rl||ss==rl.length-1;if(ks.top-Ga.top<=3){var Ka=(Rt?Us:Du)&&_a,xd=(Rt?Du:Us)&&vu,ru=Ka?Nt:(Ko?Ga:ks).left,Hl=xd?kt:(Ko?ks:Ga).right;rn(ru,Ga.top,Hl-ru,Ga.bottom)}else{var jl,ca,Ms,vh;Ko?(jl=Rt&&Us&&_a?Nt:Ga.left,ca=Rt?kt:Al(as,Gs,"before"),Ms=Rt?Nt:Al(Ul,Gs,"after"),vh=Rt&&Du&&vu?kt:ks.right):(jl=Rt?Al(as,Gs,"before"):Nt,ca=!Rt&&Us&&_a?kt:Ga.right,Ms=!Rt&&Du&&vu?Nt:ks.left,vh=Rt?Al(Ul,Gs,"after"):kt),rn(jl,Ga.top,ca-jl,Ga.bottom),Ga.bottom<ks.top&&rn(Nt,Ga.bottom,null,ks.top),rn(Ms,ks.top,vh-Ms,ks.bottom)}(!ka||zs(Ga,ka)<0)&&(ka=Ga),zs(ks,ka)<0&&(ka=ks),(!ms||zs(Ga,ms)<0)&&(ms=Ga),zs(ks,ms)<0&&(ms=ks)}),{start:ka,end:ms}}var wn=ce.from(),yn=ce.to();if(wn.line==yn.line)zt(wn.line,wn.ch,yn.ch);else{var qn=Tn(Oe,wn.line),ir=Tn(Oe,yn.line),vr=Zi(qn)==Zi(ir),Dr=zt(wn.line,wn.ch,vr?qn.text.length+1:null).end,ti=zt(yn.line,vr?0:null,yn.ch).start;vr&&(Dr.top<ti.top-2?(rn(Dr.right,Dr.top,null,Dr.bottom),rn(Nt,ti.top,ti.left,ti.bottom)):rn(Dr.right,Dr.top,ti.left-Dr.right,Dr.bottom)),Dr.bottom<ti.top&&rn(Nt,Dr.bottom,null,ti.top)}ke.appendChild(tt)}function Xo(re){if(re.state.focused){var ce=re.display;clearInterval(ce.blinker);var ke=!0;ce.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?ce.blinker=setInterval(function(){re.hasFocus()||Dh(re),ce.cursorDiv.style.visibility=(ke=!ke)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(ce.cursorDiv.style.visibility="hidden")}}function oa(re){re.state.focused||(re.display.input.focus(),jo(re))}function xa(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Dh(re))},100)}function jo(re,ce){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(fn(re,"focus",re,ce),re.state.focused=!0,We(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),pe&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),Xo(re))}function Dh(re,ce){re.state.delayingBlurEvent||(re.state.focused&&(fn(re,"blur",re,ce),re.state.focused=!1,De(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function li(re){for(var ce=re.display,ke=ce.lineDiv.offsetTop,Ce=0;Ce<ce.view.length;Ce++){var Oe=ce.view[Ce],tt=re.options.lineWrapping,pt=void 0,Nt=0;if(!Oe.hidden){if(Re&&fe<8){var kt=Oe.node.offsetTop+Oe.node.offsetHeight;pt=kt-ke,ke=kt}else{var Rt=Oe.node.getBoundingClientRect();pt=Rt.bottom-Rt.top,!tt&&Oe.text.firstChild&&(Nt=Oe.text.firstChild.getBoundingClientRect().right-Rt.left-1)}var rn=Oe.line.height-pt;if((rn>.005||rn<-.005)&&(Wn(Oe.line,pt),Wd(Oe.line),Oe.rest))for(var zt=0;zt<Oe.rest.length;zt++)Wd(Oe.rest[zt]);if(Nt>re.display.sizerWidth){var wn=Math.ceil(Nt/Oh(re.display));wn>re.display.maxLineLength&&(re.display.maxLineLength=wn,re.display.maxLine=Oe.line,re.display.maxLineChanged=!0)}}}}function Wd(re){if(re.widgets)for(var ce=0;ce<re.widgets.length;++ce){var ke=re.widgets[ce],Ce=ke.node.parentNode;Ce&&(ke.height=Ce.offsetHeight)}}function po(re,ce,ke){var Ce=ke&&ke.top!=null?Math.max(0,ke.top):re.scroller.scrollTop;Ce=Math.floor(Ce-Ys(re));var Oe=ke&&ke.bottom!=null?ke.bottom:Ce+re.wrapper.clientHeight,tt=cr(ce,Ce),pt=cr(ce,Oe);if(ke&&ke.ensure){var Nt=ke.ensure.from.line,kt=ke.ensure.to.line;Nt<tt?(tt=Nt,pt=cr(ce,pi(Tn(ce,Nt))+re.wrapper.clientHeight)):Math.min(kt,ce.lastLine())>=pt&&(tt=cr(ce,pi(Tn(ce,kt))-re.wrapper.clientHeight),pt=kt)}return{from:tt,to:Math.max(pt,tt+1)}}function Kd(re,ce){if(!Wt(re,"scrollCursorIntoView")){var ke=re.display,Ce=ke.sizer.getBoundingClientRect(),Oe=null;if(ce.top+Ce.top<0?Oe=!0:ce.bottom+Ce.top>(window.innerHeight||document.documentElement.clientHeight)&&(Oe=!1),Oe!=null&&!Pe){var tt=Le("div","\u200B",null,`position: absolute;
|
|
top: `+(ce.top-ke.viewOffset-Ys(re.display))+`px;
|
|
height: `+(ce.bottom-ce.top+Is(re)+ke.barHeight)+`px;
|
|
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");re.display.lineSpace.appendChild(tt),tt.scrollIntoView(Oe),re.display.lineSpace.removeChild(tt)}}}function ac(re,ce,ke,Ce){Ce==null&&(Ce=0);var Oe;!re.options.lineWrapping&&ce==ke&&(ce=ce.ch?xn(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,ke=ce.sticky=="before"?xn(ce.line,ce.ch+1,"before"):ce);for(var tt=0;tt<5;tt++){var pt=!1,Nt=Ea(re,ce),kt=!ke||ke==ce?Nt:Ea(re,ke);Oe={left:Math.min(Nt.left,kt.left),top:Math.min(Nt.top,kt.top)-Ce,right:Math.max(Nt.left,kt.left),bottom:Math.max(Nt.bottom,kt.bottom)+Ce};var Rt=ud(re,Oe),rn=re.doc.scrollTop,zt=re.doc.scrollLeft;if(Rt.scrollTop!=null&&(Bt(re,Rt.scrollTop),Math.abs(re.doc.scrollTop-rn)>1&&(pt=!0)),Rt.scrollLeft!=null&&(Ut(re,Rt.scrollLeft),Math.abs(re.doc.scrollLeft-zt)>1&&(pt=!0)),!pt)break}return Oe}function Wc(re,ce){var ke=ud(re,ce);ke.scrollTop!=null&&Bt(re,ke.scrollTop),ke.scrollLeft!=null&&Ut(re,ke.scrollLeft)}function ud(re,ce){var ke=re.display,Ce=Mu(re.display);ce.top<0&&(ce.top=0);var Oe=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:ke.scroller.scrollTop,tt=Rc(re),pt={};ce.bottom-ce.top>tt&&(ce.bottom=ce.top+tt);var Nt=re.doc.height+lh(ke),kt=ce.top<Ce,Rt=ce.bottom>Nt-Ce;if(ce.top<Oe)pt.scrollTop=kt?0:ce.top;else if(ce.bottom>Oe+tt){var rn=Math.min(ce.top,(Rt?Nt:ce.bottom)-tt);rn!=Oe&&(pt.scrollTop=rn)}var zt=re.options.fixedGutter?0:ke.gutters.offsetWidth,wn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:ke.scroller.scrollLeft-zt,yn=Jl(re)-ke.gutters.offsetWidth,qn=ce.right-ce.left>yn;return qn&&(ce.right=ce.left+yn),ce.left<10?pt.scrollLeft=0:ce.left<wn?pt.scrollLeft=Math.max(0,ce.left+zt-(qn?0:10)):ce.right>yn+wn-3&&(pt.scrollLeft=ce.right+(qn?0:10)-yn),pt}function Ef(re,ce){ce!=null&&(Yu(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+ce)}function Xu(re){Yu(re);var ce=re.getCursor();re.curOp.scrollToPos={from:ce,to:ce,margin:re.options.cursorScrollMargin}}function hh(re,ce,ke){(ce!=null||ke!=null)&&Yu(re),ce!=null&&(re.curOp.scrollLeft=ce),ke!=null&&(re.curOp.scrollTop=ke)}function Oo(re,ce){Yu(re),re.curOp.scrollToPos=ce}function Yu(re){var ce=re.curOp.scrollToPos;if(ce){re.curOp.scrollToPos=null;var ke=Gc(re,ce.from),Ce=Gc(re,ce.to);bt(re,ke,Ce,ce.margin)}}function bt(re,ce,ke,Ce){var Oe=ud(re,{left:Math.min(ce.left,ke.left),top:Math.min(ce.top,ke.top)-Ce,right:Math.max(ce.right,ke.right),bottom:Math.max(ce.bottom,ke.bottom)+Ce});hh(re,Oe.scrollLeft,Oe.scrollTop)}function Bt(re,ce){Math.abs(re.doc.scrollTop-ce)<2||(st||ei(re,{top:ce}),Gt(re,ce,!0),st&&ei(re),Xi(re,100))}function Gt(re,ce,ke){ce=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,ce)),!(re.display.scroller.scrollTop==ce&&!ke)&&(re.doc.scrollTop=ce,re.display.scrollbars.setScrollTop(ce),re.display.scroller.scrollTop!=ce&&(re.display.scroller.scrollTop=ce))}function Ut(re,ce,ke,Ce){ce=Math.max(0,Math.min(ce,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((ke?ce==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-ce)<2)&&!Ce)&&(re.doc.scrollLeft=ce,So(re),re.display.scroller.scrollLeft!=ce&&(re.display.scroller.scrollLeft=ce),re.display.scrollbars.setScrollLeft(ce))}function Qt(re){var ce=re.display,ke=ce.gutters.offsetWidth,Ce=Math.round(re.doc.height+lh(re.display));return{clientHeight:ce.scroller.clientHeight,viewHeight:ce.wrapper.clientHeight,scrollWidth:ce.scroller.scrollWidth,clientWidth:ce.scroller.clientWidth,viewWidth:ce.wrapper.clientWidth,barLeft:re.options.fixedGutter?ke:0,docHeight:Ce,scrollHeight:Ce+Is(re)+ce.barHeight,nativeBarWidth:ce.nativeBarWidth,gutterWidth:ke}}var sn=function(re,ce,ke){this.cm=ke;var Ce=this.vert=Le("div",[Le("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Oe=this.horiz=Le("div",[Le("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Ce.tabIndex=Oe.tabIndex=-1,re(Ce),re(Oe),hn(Ce,"scroll",function(){Ce.clientHeight&&ce(Ce.scrollTop,"vertical")}),hn(Oe,"scroll",function(){Oe.clientWidth&&ce(Oe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Re&&fe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};sn.prototype.update=function(re){var ce=re.scrollWidth>re.clientWidth+1,ke=re.scrollHeight>re.clientHeight+1,Ce=re.nativeBarWidth;if(ke){this.vert.style.display="block",this.vert.style.bottom=ce?Ce+"px":"0";var Oe=re.viewHeight-(ce?Ce: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=ke?Ce+"px":"0",this.horiz.style.left=re.barLeft+"px";var tt=re.viewWidth-re.barLeft-(ke?Ce:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+tt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(Ce==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ke?Ce:0,bottom:ce?Ce:0}},sn.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},sn.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},sn.prototype.zeroWidthHack=function(){var re=oe&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new et,this.disableVert=new et},sn.prototype.enableZeroWidthBar=function(re,ce,ke){re.style.pointerEvents="auto";function Ce(){var Oe=re.getBoundingClientRect(),tt=ke=="vert"?document.elementFromPoint(Oe.right-1,(Oe.top+Oe.bottom)/2):document.elementFromPoint((Oe.right+Oe.left)/2,Oe.bottom-1);tt!=re?re.style.pointerEvents="none":ce.set(1e3,Ce)}ce.set(1e3,Ce)},sn.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var gn=function(){};gn.prototype.update=function(){return{bottom:0,right:0}},gn.prototype.setScrollLeft=function(){},gn.prototype.setScrollTop=function(){},gn.prototype.clear=function(){};function En(re,ce){ce||(ce=Qt(re));var ke=re.display.barWidth,Ce=re.display.barHeight;Hn(re,ce);for(var Oe=0;Oe<4&&ke!=re.display.barWidth||Ce!=re.display.barHeight;Oe++)ke!=re.display.barWidth&&re.options.lineWrapping&&li(re),Hn(re,Qt(re)),ke=re.display.barWidth,Ce=re.display.barHeight}function Hn(re,ce){var ke=re.display,Ce=ke.scrollbars.update(ce);ke.sizer.style.paddingRight=(ke.barWidth=Ce.right)+"px",ke.sizer.style.paddingBottom=(ke.barHeight=Ce.bottom)+"px",ke.heightForcer.style.borderBottom=Ce.bottom+"px solid transparent",Ce.right&&Ce.bottom?(ke.scrollbarFiller.style.display="block",ke.scrollbarFiller.style.height=Ce.bottom+"px",ke.scrollbarFiller.style.width=Ce.right+"px"):ke.scrollbarFiller.style.display="",Ce.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(ke.gutterFiller.style.display="block",ke.gutterFiller.style.height=Ce.bottom+"px",ke.gutterFiller.style.width=ce.gutterWidth+"px"):ke.gutterFiller.style.display=""}var Rn={native:sn,null:gn};function tr(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&De(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new Rn[re.options.scrollbarStyle](function(ce){re.display.wrapper.insertBefore(ce,re.display.scrollbarFiller),hn(ce,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),ce.setAttribute("cm-not-content","true")},function(ce,ke){ke=="horizontal"?Ut(re,ce):Bt(re,ce)},re),re.display.scrollbars.addClass&&We(re.display.wrapper,re.display.scrollbars.addClass)}var Gn=0;function $n(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:++Gn},mi(re.curOp)}function Vn(re){var ce=re.curOp;ce&&Co(ce,function(ke){for(var Ce=0;Ce<ke.ops.length;Ce++)ke.ops[Ce].cm.curOp=null;hr(ke)})}function hr(re){for(var ce=re.ops,ke=0;ke<ce.length;ke++)Tr(ce[ke]);for(var Ce=0;Ce<ce.length;Ce++)zr(ce[Ce]);for(var Oe=0;Oe<ce.length;Oe++)qr(ce[Oe]);for(var tt=0;tt<ce.length;tt++)mr(ce[tt]);for(var pt=0;pt<ce.length;pt++)Rr(ce[pt])}function Tr(re){var ce=re.cm,ke=ce.display;Wo(ce),re.updateMaxLine&&qi(ce),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<ke.viewFrom||re.scrollToPos.to.line>=ke.viewTo)||ke.maxLineChanged&&ce.options.lineWrapping,re.update=re.mustUpdate&&new so(ce,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function zr(re){re.updatedDisplay=re.mustUpdate&&Ei(re.cm,re.update)}function qr(re){var ce=re.cm,ke=ce.display;re.updatedDisplay&&li(ce),re.barMeasure=Qt(ce),ke.maxLineChanged&&!ce.options.lineWrapping&&(re.adjustWidthTo=Bc(ce,ke.maxLine,ke.maxLine.text.length).left+3,ce.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(ke.scroller.clientWidth,ke.sizer.offsetLeft+re.adjustWidthTo+Is(ce)+ce.display.barWidth),re.maxScrollLeft=Math.max(0,ke.sizer.offsetLeft+re.adjustWidthTo-Jl(ce))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=ke.input.prepareSelection())}function mr(re){var ce=re.cm;re.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<ce.doc.scrollLeft&&Ut(ce,Math.min(ce.display.scroller.scrollLeft,re.maxScrollLeft),!0),ce.display.maxLineChanged=!1);var ke=re.focus&&re.focus==He();re.preparedSelection&&ce.display.input.showSelection(re.preparedSelection,ke),(re.updatedDisplay||re.startHeight!=ce.doc.height)&&En(ce,re.barMeasure),re.updatedDisplay&&Fi(ce,re.barMeasure),re.selectionChanged&&Xo(ce),ce.state.focused&&re.updateInput&&ce.display.input.reset(re.typing),ke&&oa(re.cm)}function Rr(re){var ce=re.cm,ke=ce.display,Ce=ce.doc;if(re.updatedDisplay&&Pr(ce,re.update),ke.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(ke.wheelStartX=ke.wheelStartY=null),re.scrollTop!=null&&Gt(ce,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&Ut(ce,re.scrollLeft,!0,!0),re.scrollToPos){var Oe=ac(ce,Ar(Ce,re.scrollToPos.from),Ar(Ce,re.scrollToPos.to),re.scrollToPos.margin);Kd(ce,Oe)}var tt=re.maybeHiddenMarkers,pt=re.maybeUnhiddenMarkers;if(tt)for(var Nt=0;Nt<tt.length;++Nt)tt[Nt].lines.length||fn(tt[Nt],"hide");if(pt)for(var kt=0;kt<pt.length;++kt)pt[kt].lines.length&&fn(pt[kt],"unhide");ke.wrapper.offsetHeight&&(Ce.scrollTop=ce.display.scroller.scrollTop),re.changeObjs&&fn(ce,"changes",ce,re.changeObjs),re.update&&re.update.finish()}function kr(re,ce){if(re.curOp)return ce();$n(re);try{return ce()}finally{Vn(re)}}function Qr(re,ce){return function(){if(re.curOp)return ce.apply(re,arguments);$n(re);try{return ce.apply(re,arguments)}finally{Vn(re)}}}function bi(re){return function(){if(this.curOp)return re.apply(this,arguments);$n(this);try{return re.apply(this,arguments)}finally{Vn(this)}}}function Yr(re){return function(){var ce=this.cm;if(!ce||ce.curOp)return re.apply(this,arguments);$n(ce);try{return re.apply(this,arguments)}finally{Vn(ce)}}}function Xi(re,ce){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(ce,mt(Ci,re))}function Ci(re){var ce=re.doc;if(!(ce.highlightFrontier>=re.display.viewTo)){var ke=+new Date+re.options.workTime,Ce=zo(re,ce.highlightFrontier),Oe=[];ce.iter(Ce.line,Math.min(ce.first+ce.size,re.display.viewTo+500),function(tt){if(Ce.line>=re.display.viewFrom){var pt=tt.styles,Nt=tt.text.length>re.options.maxHighlightLength?Qn(ce.mode,Ce.state):null,kt=la(re,tt,Ce,!0);Nt&&(Ce.state=Nt),tt.styles=kt.styles;var Rt=tt.styleClasses,rn=kt.classes;rn?tt.styleClasses=rn:Rt&&(tt.styleClasses=null);for(var zt=!pt||pt.length!=tt.styles.length||Rt!=rn&&(!Rt||!rn||Rt.bgClass!=rn.bgClass||Rt.textClass!=rn.textClass),wn=0;!zt&&wn<pt.length;++wn)zt=pt[wn]!=tt.styles[wn];zt&&Oe.push(Ce.line),tt.stateAfter=Ce.save(),Ce.nextLine()}else tt.text.length<=re.options.maxHighlightLength&&tn(re,tt.text,Ce),tt.stateAfter=Ce.line%5==0?Ce.save():null,Ce.nextLine();if(+new Date>ke)return Xi(re,re.options.workDelay),!0}),ce.highlightFrontier=Ce.line,ce.modeFrontier=Math.max(ce.modeFrontier,Ce.line),Oe.length&&kr(re,function(){for(var tt=0;tt<Oe.length;tt++)eo(re,Oe[tt],"text")})}}var so=function(re,ce,ke){var Ce=re.display;this.viewport=ce,this.visible=po(Ce,re.doc,ce),this.editorIsHidden=!Ce.wrapper.offsetWidth,this.wrapperHeight=Ce.wrapper.clientHeight,this.wrapperWidth=Ce.wrapper.clientWidth,this.oldDisplayWidth=Jl(re),this.force=ke,this.dims=Hc(re),this.events=[]};so.prototype.signal=function(re,ce){zn(re,ce)&&this.events.push(arguments)},so.prototype.finish=function(){for(var re=0;re<this.events.length;re++)fn.apply(null,this.events[re])};function Wo(re){var ce=re.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=Is(re)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=Is(re)+"px",ce.scrollbarsClipped=!0)}function ho(re){if(re.hasFocus())return null;var ce=He();if(!ce||!Je(re.display.lineDiv,ce))return null;var ke={activeElt:ce};if(window.getSelection){var Ce=window.getSelection();Ce.anchorNode&&Ce.extend&&Je(re.display.lineDiv,Ce.anchorNode)&&(ke.anchorNode=Ce.anchorNode,ke.anchorOffset=Ce.anchorOffset,ke.focusNode=Ce.focusNode,ke.focusOffset=Ce.focusOffset)}return ke}function wi(re){if(!(!re||!re.activeElt||re.activeElt==He())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&Je(document.body,re.anchorNode)&&Je(document.body,re.focusNode))){var ce=window.getSelection(),ke=document.createRange();ke.setEnd(re.anchorNode,re.anchorOffset),ke.collapse(!1),ce.removeAllRanges(),ce.addRange(ke),ce.extend(re.focusNode,re.focusOffset)}}function Ei(re,ce){var ke=re.display,Ce=re.doc;if(ce.editorIsHidden)return Ra(re),!1;if(!ce.force&&ce.visible.from>=ke.viewFrom&&ce.visible.to<=ke.viewTo&&(ke.updateLineNumbers==null||ke.updateLineNumbers>=ke.viewTo)&&ke.renderedView==ke.view&&cl(re)==0)return!1;Ui(re)&&(Ra(re),ce.dims=Hc(re));var Oe=Ce.first+Ce.size,tt=Math.max(ce.visible.from-re.options.viewportMargin,Ce.first),pt=Math.min(Oe,ce.visible.to+re.options.viewportMargin);ke.viewFrom<tt&&tt-ke.viewFrom<20&&(tt=Math.max(Ce.first,ke.viewFrom)),ke.viewTo>pt&&ke.viewTo-pt<20&&(pt=Math.min(Oe,ke.viewTo)),kn&&(tt=Er(re.doc,tt),pt=jr(re.doc,pt));var Nt=tt!=ke.viewFrom||pt!=ke.viewTo||ke.lastWrapHeight!=ce.wrapperHeight||ke.lastWrapWidth!=ce.wrapperWidth;Qo(re,tt,pt),ke.viewOffset=pi(Tn(re.doc,ke.viewFrom)),re.display.mover.style.top=ke.viewOffset+"px";var kt=cl(re);if(!Nt&&kt==0&&!ce.force&&ke.renderedView==ke.view&&(ke.updateLineNumbers==null||ke.updateLineNumbers>=ke.viewTo))return!1;var Rt=ho(re);return kt>4&&(ke.lineDiv.style.display="none"),Ai(re,ke.updateLineNumbers,ce.dims),kt>4&&(ke.lineDiv.style.display=""),ke.renderedView=ke.view,wi(Rt),Fe(ke.cursorDiv),Fe(ke.selectionDiv),ke.gutters.style.height=ke.sizer.style.minHeight=0,Nt&&(ke.lastWrapHeight=ce.wrapperHeight,ke.lastWrapWidth=ce.wrapperWidth,Xi(re,400)),ke.updateLineNumbers=null,!0}function Pr(re,ce){for(var ke=ce.viewport,Ce=!0;;Ce=!1){if(!Ce||!re.options.lineWrapping||ce.oldDisplayWidth==Jl(re)){if(ke&&ke.top!=null&&(ke={top:Math.min(re.doc.height+lh(re.display)-Rc(re),ke.top)}),ce.visible=po(re.display,re.doc,ke),ce.visible.from>=re.display.viewFrom&&ce.visible.to<=re.display.viewTo)break}else Ce&&(ce.visible=po(re.display,re.doc,ke));if(!Ei(re,ce))break;li(re);var Oe=Qt(re);Ya(re),En(re,Oe),Fi(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 ei(re,ce){var ke=new so(re,ce);if(Ei(re,ke)){li(re),Pr(re,ke);var Ce=Qt(re);Ya(re),En(re,Ce),Fi(re,Ce),ke.finish()}}function Ai(re,ce,ke){var Ce=re.display,Oe=re.options.lineNumbers,tt=Ce.lineDiv,pt=tt.firstChild;function Nt(qn){var ir=qn.nextSibling;return pe&&oe&&re.display.currentWheelTarget==qn?qn.style.display="none":qn.parentNode.removeChild(qn),ir}for(var kt=Ce.view,Rt=Ce.viewFrom,rn=0;rn<kt.length;rn++){var zt=kt[rn];if(!zt.hidden)if(!zt.node||zt.node.parentNode!=tt){var wn=Ca(re,zt,Rt,ke);tt.insertBefore(wn,pt)}else{for(;pt!=zt.node;)pt=Nt(pt);var yn=Oe&&ce!=null&&ce<=Rt&&zt.lineNumber;zt.changes&&(lt(zt.changes,"gutter")>-1&&(yn=!1),Xs(re,zt,Rt,ke)),yn&&(Fe(zt.lineNumber),zt.lineNumber.appendChild(document.createTextNode(Nr(re.options,Rt)))),pt=zt.node.nextSibling}Rt+=zt.size}for(;pt;)pt=Nt(pt)}function Oi(re){var ce=re.gutters.offsetWidth;re.sizer.style.marginLeft=ce+"px"}function Fi(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+Is(re)+"px"}function So(re){var ce=re.display,ke=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!re.options.fixedGutter))){for(var Ce=Fh(ce)-ce.scroller.scrollLeft+re.doc.scrollLeft,Oe=ce.gutters.offsetWidth,tt=Ce+"px",pt=0;pt<ke.length;pt++)if(!ke[pt].hidden){re.options.fixedGutter&&(ke[pt].gutter&&(ke[pt].gutter.style.left=tt),ke[pt].gutterBackground&&(ke[pt].gutterBackground.style.left=tt));var Nt=ke[pt].alignable;if(Nt)for(var kt=0;kt<Nt.length;kt++)Nt[kt].style.left=tt}re.options.fixedGutter&&(ce.gutters.style.left=Ce+Oe+"px")}}function Ui(re){if(!re.options.lineNumbers)return!1;var ce=re.doc,ke=Nr(re.options,ce.first+ce.size-1),Ce=re.display;if(ke.length!=Ce.lineNumChars){var Oe=Ce.measure.appendChild(Le("div",[Le("div",ke)],"CodeMirror-linenumber CodeMirror-gutter-elt")),tt=Oe.firstChild.offsetWidth,pt=Oe.offsetWidth-tt;return Ce.lineGutter.style.width="",Ce.lineNumInnerWidth=Math.max(tt,Ce.lineGutter.offsetWidth-pt)+1,Ce.lineNumWidth=Ce.lineNumInnerWidth+pt,Ce.lineNumChars=Ce.lineNumInnerWidth?ke.length:-1,Ce.lineGutter.style.width=Ce.lineNumWidth+"px",Oi(re.display),!0}return!1}function Ro(re,ce){for(var ke=[],Ce=!1,Oe=0;Oe<re.length;Oe++){var tt=re[Oe],pt=null;if(typeof tt!="string"&&(pt=tt.style,tt=tt.className),tt=="CodeMirror-linenumbers")if(ce)Ce=!0;else continue;ke.push({className:tt,style:pt})}return ce&&!Ce&&ke.push({className:"CodeMirror-linenumbers",style:null}),ke}function Go(re){var ce=re.gutters,ke=re.gutterSpecs;Fe(ce),re.lineGutter=null;for(var Ce=0;Ce<ke.length;++Ce){var Oe=ke[Ce],tt=Oe.className,pt=Oe.style,Nt=ce.appendChild(Le("div",null,"CodeMirror-gutter "+tt));pt&&(Nt.style.cssText=pt),tt=="CodeMirror-linenumbers"&&(re.lineGutter=Nt,Nt.style.width=(re.lineNumWidth||1)+"px")}ce.style.display=ke.length?"":"none",Oi(re)}function aa(re){Go(re.display),ua(re),So(re)}function $a(re,ce,ke,Ce){var Oe=this;this.input=ke,Oe.scrollbarFiller=Le("div",null,"CodeMirror-scrollbar-filler"),Oe.scrollbarFiller.setAttribute("cm-not-content","true"),Oe.gutterFiller=Le("div",null,"CodeMirror-gutter-filler"),Oe.gutterFiller.setAttribute("cm-not-content","true"),Oe.lineDiv=Be("div",null,"CodeMirror-code"),Oe.selectionDiv=Le("div",null,null,"position: relative; z-index: 1"),Oe.cursorDiv=Le("div",null,"CodeMirror-cursors"),Oe.measure=Le("div",null,"CodeMirror-measure"),Oe.lineMeasure=Le("div",null,"CodeMirror-measure"),Oe.lineSpace=Be("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var tt=Be("div",[Oe.lineSpace],"CodeMirror-lines");Oe.mover=Le("div",[tt],null,"position: relative"),Oe.sizer=Le("div",[Oe.mover],"CodeMirror-sizer"),Oe.sizerWidth=null,Oe.heightForcer=Le("div",null,null,"position: absolute; height: "+vt+"px; width: 1px;"),Oe.gutters=Le("div",null,"CodeMirror-gutters"),Oe.lineGutter=null,Oe.scroller=Le("div",[Oe.sizer,Oe.heightForcer,Oe.gutters],"CodeMirror-scroll"),Oe.scroller.setAttribute("tabIndex","-1"),Oe.wrapper=Le("div",[Oe.scrollbarFiller,Oe.gutterFiller,Oe.scroller],"CodeMirror"),Re&&fe<8&&(Oe.gutters.style.zIndex=-1,Oe.scroller.style.paddingRight=0),!pe&&!(st&&z)&&(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=Ro(Ce.gutters,Ce.lineNumbers),Go(Oe),ke.init(Oe)}var wa=0,$i=null;Re?$i=-.53:st?$i=15:Ee?$i=-.7:Te&&($i=-1/3);function xo(re){var ce=re.wheelDeltaX,ke=re.wheelDeltaY;return ce==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(ce=re.detail),ke==null&&re.detail&&re.axis==re.VERTICAL_AXIS?ke=re.detail:ke==null&&(ke=re.wheelDelta),{x:ce,y:ke}}function No(re){var ce=xo(re);return ce.x*=$i,ce.y*=$i,ce}function Bo(re,ce){var ke=xo(ce),Ce=ke.x,Oe=ke.y,tt=re.display,pt=tt.scroller,Nt=pt.scrollWidth>pt.clientWidth,kt=pt.scrollHeight>pt.clientHeight;if(Ce&&Nt||Oe&&kt){if(Oe&&oe&&pe){e:for(var Rt=ce.target,rn=tt.view;Rt!=pt;Rt=Rt.parentNode)for(var zt=0;zt<rn.length;zt++)if(rn[zt].node==Rt){re.display.currentWheelTarget=Rt;break e}}if(Ce&&!st&&!we&&$i!=null){Oe&&kt&&Bt(re,Math.max(0,pt.scrollTop+Oe*$i)),Ut(re,Math.max(0,pt.scrollLeft+Ce*$i)),(!Oe||Oe&&kt)&&fr(ce),tt.wheelStartX=null;return}if(Oe&&$i!=null){var wn=Oe*$i,yn=re.doc.scrollTop,qn=yn+tt.wrapper.clientHeight;wn<0?yn=Math.max(0,yn+wn-50):qn=Math.min(re.doc.height,qn+wn+50),ei(re,{top:yn,bottom:qn})}wa<20&&(tt.wheelStartX==null?(tt.wheelStartX=pt.scrollLeft,tt.wheelStartY=pt.scrollTop,tt.wheelDX=Ce,tt.wheelDY=Oe,setTimeout(function(){if(tt.wheelStartX!=null){var ir=pt.scrollLeft-tt.wheelStartX,vr=pt.scrollTop-tt.wheelStartY,Dr=vr&&tt.wheelDY&&vr/tt.wheelDY||ir&&tt.wheelDX&&ir/tt.wheelDX;tt.wheelStartX=tt.wheelStartY=null,Dr&&($i=($i*wa+Dr)/(wa+1),++wa)}},200)):(tt.wheelDX+=Ce,tt.wheelDY+=Oe))}}var mo=function(re,ce){this.ranges=re,this.primIndex=ce};mo.prototype.primary=function(){return this.ranges[this.primIndex]},mo.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var ce=0;ce<this.ranges.length;ce++){var ke=this.ranges[ce],Ce=re.ranges[ce];if(!hi(ke.anchor,Ce.anchor)||!hi(ke.head,Ce.head))return!1}return!0},mo.prototype.deepCopy=function(){for(var re=[],ce=0;ce<this.ranges.length;ce++)re[ce]=new ui(Wi(this.ranges[ce].anchor),Wi(this.ranges[ce].head));return new mo(re,this.primIndex)},mo.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},mo.prototype.contains=function(re,ce){ce||(ce=re);for(var ke=0;ke<this.ranges.length;ke++){var Ce=this.ranges[ke];if(gr(ce,Ce.from())>=0&&gr(re,Ce.to())<=0)return ke}return-1};var ui=function(re,ce){this.anchor=re,this.head=ce};ui.prototype.from=function(){return sr(this.anchor,this.head)},ui.prototype.to=function(){return zi(this.anchor,this.head)},ui.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Eo(re,ce,ke){var Ce=re&&re.options.selectionsMayTouch,Oe=ce[ke];ce.sort(function(wn,yn){return gr(wn.from(),yn.from())}),ke=lt(ce,Oe);for(var tt=1;tt<ce.length;tt++){var pt=ce[tt],Nt=ce[tt-1],kt=gr(Nt.to(),pt.from());if(Ce&&!pt.empty()?kt>0:kt>=0){var Rt=sr(Nt.from(),pt.from()),rn=zi(Nt.to(),pt.to()),zt=Nt.empty()?pt.from()==pt.head:Nt.from()==Nt.head;tt<=ke&&--ke,ce.splice(--tt,2,new ui(zt?rn:Rt,zt?Rt:rn))}}return new mo(ce,ke)}function Na(re,ce){return new mo([new ui(re,ce||re)],0)}function bs(re){return re.text?xn(re.from.line+re.text.length-1,Tt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function cs(re,ce){if(gr(re,ce.from)<0)return re;if(gr(re,ce.to)<=0)return bs(ce);var ke=re.line+ce.text.length-(ce.to.line-ce.from.line)-1,Ce=re.ch;return re.line==ce.to.line&&(Ce+=bs(ce).ch-ce.to.ch),xn(ke,Ce)}function Js(re,ce){for(var ke=[],Ce=0;Ce<re.sel.ranges.length;Ce++){var Oe=re.sel.ranges[Ce];ke.push(new ui(cs(Oe.anchor,ce),cs(Oe.head,ce)))}return Eo(re.cm,ke,re.sel.primIndex)}function Qs(re,ce,ke){return re.line==ce.line?xn(ke.line,re.ch-ce.ch+ke.ch):xn(ke.line+(re.line-ce.line),re.ch)}function Ml(re,ce,ke){for(var Ce=[],Oe=xn(re.first,0),tt=Oe,pt=0;pt<ce.length;pt++){var Nt=ce[pt],kt=Qs(Nt.from,Oe,tt),Rt=Qs(bs(Nt),Oe,tt);if(Oe=Nt.to,tt=Rt,ke=="around"){var rn=re.sel.ranges[pt],zt=gr(rn.head,rn.anchor)<0;Ce[pt]=new ui(zt?Rt:kt,zt?kt:Rt)}else Ce[pt]=new ui(kt,kt)}return new mo(Ce,re.sel.primIndex)}function Ti(re){re.doc.mode=ln(re.options,re.doc.modeOption),el(re)}function el(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,Xi(re,100),re.state.modeGen++,re.curOp&&ua(re)}function _o(re,ce){return ce.from.ch==0&&ce.to.ch==0&&Tt(ce.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function Ja(re,ce,ke,Ce){function Oe(ti){return ke?ke[ti]:null}function tt(ti,Kr,si){$o(ti,Kr,si,Ce),wr(ti,"change",ti,ce)}function pt(ti,Kr){for(var si=[],Hi=ti;Hi<Kr;++Hi)si.push(new Ao(Rt[Hi],Oe(Hi),Ce));return si}var Nt=ce.from,kt=ce.to,Rt=ce.text,rn=Tn(re,Nt.line),zt=Tn(re,kt.line),wn=Tt(Rt),yn=Oe(Rt.length-1),qn=kt.line-Nt.line;if(ce.full)re.insert(0,pt(0,Rt.length)),re.remove(Rt.length,re.size-Rt.length);else if(_o(re,ce)){var ir=pt(0,Rt.length-1);tt(zt,zt.text,yn),qn&&re.remove(Nt.line,qn),ir.length&&re.insert(Nt.line,ir)}else if(rn==zt)if(Rt.length==1)tt(rn,rn.text.slice(0,Nt.ch)+wn+rn.text.slice(kt.ch),yn);else{var vr=pt(1,Rt.length-1);vr.push(new Ao(wn+rn.text.slice(kt.ch),yn,Ce)),tt(rn,rn.text.slice(0,Nt.ch)+Rt[0],Oe(0)),re.insert(Nt.line+1,vr)}else if(Rt.length==1)tt(rn,rn.text.slice(0,Nt.ch)+Rt[0]+zt.text.slice(kt.ch),Oe(0)),re.remove(Nt.line+1,qn);else{tt(rn,rn.text.slice(0,Nt.ch)+Rt[0],Oe(0)),tt(zt,wn+zt.text.slice(kt.ch),yn);var Dr=pt(1,Rt.length-1);qn>1&&re.remove(Nt.line+1,qn-1),re.insert(Nt.line+1,Dr)}wr(re,"change",re,ce)}function rs(re,ce,ke){function Ce(Oe,tt,pt){if(Oe.linked)for(var Nt=0;Nt<Oe.linked.length;++Nt){var kt=Oe.linked[Nt];if(kt.doc!=tt){var Rt=pt&&kt.sharedHist;ke&&!Rt||(ce(kt.doc,Rt),Ce(kt.doc,Oe,Rt))}}}Ce(re,null,!0)}function Ba(re,ce){if(ce.cm)throw new Error("This document is already in use.");re.doc=ce,ce.cm=re,ci(re),Ti(re),Tu(re),re.options.lineWrapping||qi(re),re.options.mode=ce.modeOption,ua(re)}function Tu(re){(re.doc.direction=="rtl"?We:De)(re.display.lineDiv,"CodeMirror-rtl")}function fl(re){kr(re,function(){Tu(re),ua(re)})}function _l(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 ga(re,ce){var ke={from:Wi(ce.from),to:bs(ce),text:Sr(re,ce.from,ce.to)};return Lu(re,ke,ce.from.line,ce.to.line+1),rs(re,function(Ce){return Lu(Ce,ke,ce.from.line,ce.to.line+1)},!0),ke}function Tl(re){for(;re.length;){var ce=Tt(re);if(ce.ranges)re.pop();else break}}function Ql(re,ce){if(ce)return Tl(re.done),Tt(re.done);if(re.done.length&&!Tt(re.done).ranges)return Tt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),Tt(re.done)}function ch(re,ce,ke,Ce){var Oe=re.history;Oe.undone.length=0;var tt=+new Date,pt,Nt;if((Oe.lastOp==Ce||Oe.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&Oe.lastModTime>tt-(re.cm?re.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(pt=Ql(Oe,Oe.lastOp==Ce)))Nt=Tt(pt.changes),gr(ce.from,ce.to)==0&&gr(ce.from,Nt.to)==0?Nt.to=bs(ce):pt.changes.push(ga(re,ce));else{var kt=Tt(Oe.done);for((!kt||!kt.ranges)&&fs(re.sel,Oe.done),pt={changes:[ga(re,ce)],generation:Oe.generation},Oe.done.push(pt);Oe.done.length>Oe.undoDepth;)Oe.done.shift(),Oe.done[0].ranges||Oe.done.shift()}Oe.done.push(ke),Oe.generation=++Oe.maxGeneration,Oe.lastModTime=Oe.lastSelTime=tt,Oe.lastOp=Oe.lastSelOp=Ce,Oe.lastOrigin=Oe.lastSelOrigin=ce.origin,Nt||fn(re,"historyAdded")}function sc(re,ce,ke,Ce){var Oe=ce.charAt(0);return Oe=="*"||Oe=="+"&&ke.ranges.length==Ce.ranges.length&&ke.somethingSelected()==Ce.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function fh(re,ce,ke,Ce){var Oe=re.history,tt=Ce&&Ce.origin;ke==Oe.lastSelOp||tt&&Oe.lastSelOrigin==tt&&(Oe.lastModTime==Oe.lastSelTime&&Oe.lastOrigin==tt||sc(re,tt,Tt(Oe.done),ce))?Oe.done[Oe.done.length-1]=ce:fs(ce,Oe.done),Oe.lastSelTime=+new Date,Oe.lastSelOrigin=tt,Oe.lastSelOp=ke,Ce&&Ce.clearRedo!==!1&&Tl(Oe.undone)}function fs(re,ce){var ke=Tt(ce);ke&&ke.ranges&&ke.equals(re)||ce.push(re)}function Lu(re,ce,ke,Ce){var Oe=ce["spans_"+re.id],tt=0;re.iter(Math.max(re.first,ke),Math.min(re.first+re.size,Ce),function(pt){pt.markedSpans&&((Oe||(Oe=ce["spans_"+re.id]={}))[tt]=pt.markedSpans),++tt})}function is(re){if(!re)return null;for(var ce,ke=0;ke<re.length;++ke)re[ke].marker.explicitlyCleared?ce||(ce=re.slice(0,ke)):ce&&ce.push(re[ke]);return ce?ce.length?ce:null:re}function zl(re,ce){var ke=ce["spans_"+re.id];if(!ke)return null;for(var Ce=[],Oe=0;Oe<ce.text.length;++Oe)Ce.push(is(ke[Oe]));return Ce}function Nu(re,ce){var ke=zl(re,ce),Ce=pr(re,ce);if(!ke)return Ce;if(!Ce)return ke;for(var Oe=0;Oe<ke.length;++Oe){var tt=ke[Oe],pt=Ce[Oe];if(tt&&pt)e:for(var Nt=0;Nt<pt.length;++Nt){for(var kt=pt[Nt],Rt=0;Rt<tt.length;++Rt)if(tt[Rt].marker==kt.marker)continue e;tt.push(kt)}else pt&&(ke[Oe]=pt)}return ke}function fu(re,ce,ke){for(var Ce=[],Oe=0;Oe<re.length;++Oe){var tt=re[Oe];if(tt.ranges){Ce.push(ke?mo.prototype.deepCopy.call(tt):tt);continue}var pt=tt.changes,Nt=[];Ce.push({changes:Nt});for(var kt=0;kt<pt.length;++kt){var Rt=pt[kt],rn=void 0;if(Nt.push({from:Rt.from,to:Rt.to,text:Rt.text}),ce)for(var zt in Rt)(rn=zt.match(/^spans_(\d+)$/))&<(ce,Number(rn[1]))>-1&&(Tt(Nt)[zt]=Rt[zt],delete Rt[zt])}}return Ce}function Rh(re,ce,ke,Ce){if(Ce){var Oe=re.anchor;if(ke){var tt=gr(ce,Oe)<0;tt!=gr(ke,Oe)<0?(Oe=ce,ce=ke):tt!=gr(ce,ke)<0&&(ce=ke)}return new ui(Oe,ce)}else return new ui(ke||ce,ce)}function dh(re,ce,ke,Ce,Oe){Oe==null&&(Oe=re.cm&&(re.cm.display.shift||re.extend)),sa(re,new mo([Rh(re.sel.primary(),ce,ke,Oe)],0),Ce)}function lc(re,ce,ke){for(var Ce=[],Oe=re.cm&&(re.cm.display.shift||re.extend),tt=0;tt<re.sel.ranges.length;tt++)Ce[tt]=Rh(re.sel.ranges[tt],ce[tt],null,Oe);var pt=Eo(re.cm,Ce,re.sel.primIndex);sa(re,pt,ke)}function Au(re,ce,ke,Ce){var Oe=re.sel.ranges.slice(0);Oe[ce]=ke,sa(re,Eo(re.cm,Oe,re.sel.primIndex),Ce)}function Gl(re,ce,ke,Ce){sa(re,Na(ce,ke),Ce)}function ph(re,ce,ke){var Ce={ranges:ce.ranges,update:function(Oe){this.ranges=[];for(var tt=0;tt<Oe.length;tt++)this.ranges[tt]=new ui(Ar(re,Oe[tt].anchor),Ar(re,Oe[tt].head))},origin:ke&&ke.origin};return fn(re,"beforeSelectionChange",re,Ce),re.cm&&fn(re.cm,"beforeSelectionChange",re.cm,Ce),Ce.ranges!=ce.ranges?Eo(re.cm,Ce.ranges,Ce.ranges.length-1):ce}function ju(re,ce,ke){var Ce=re.history.done,Oe=Tt(Ce);Oe&&Oe.ranges?(Ce[Ce.length-1]=ce,Cs(re,ce,ke)):sa(re,ce,ke)}function sa(re,ce,ke){Cs(re,ce,ke),fh(re,re.sel,re.cm?re.cm.curOp.id:NaN,ke)}function Cs(re,ce,ke){(zn(re,"beforeSelectionChange")||re.cm&&zn(re.cm,"beforeSelectionChange"))&&(ce=ph(re,ce,ke));var Ce=ke&&ke.bias||(gr(ce.primary().head,re.sel.primary().head)<0?-1:1);ql(re,dl(re,ce,Ce,!0)),!(ke&&ke.scroll===!1)&&re.cm&&Xu(re.cm)}function ql(re,ce){ce.equals(re.sel)||(re.sel=ce,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,Bn(re.cm)),wr(re,"cursorActivity",re))}function du(re){ql(re,dl(re,re.sel,null,!1))}function dl(re,ce,ke,Ce){for(var Oe,tt=0;tt<ce.ranges.length;tt++){var pt=ce.ranges[tt],Nt=ce.ranges.length==re.sel.ranges.length&&re.sel.ranges[tt],kt=Bh(re,pt.anchor,Nt&&Nt.anchor,ke,Ce),Rt=Bh(re,pt.head,Nt&&Nt.head,ke,Ce);(Oe||kt!=pt.anchor||Rt!=pt.head)&&(Oe||(Oe=ce.ranges.slice(0,tt)),Oe[tt]=new ui(kt,Rt))}return Oe?Eo(re.cm,Oe,ce.primIndex):ce}function ds(re,ce,ke,Ce,Oe){var tt=Tn(re,ce.line);if(tt.markedSpans)for(var pt=0;pt<tt.markedSpans.length;++pt){var Nt=tt.markedSpans[pt],kt=Nt.marker,Rt="selectLeft"in kt?!kt.selectLeft:kt.inclusiveLeft,rn="selectRight"in kt?!kt.selectRight:kt.inclusiveRight;if((Nt.from==null||(Rt?Nt.from<=ce.ch:Nt.from<ce.ch))&&(Nt.to==null||(rn?Nt.to>=ce.ch:Nt.to>ce.ch))){if(Oe&&(fn(kt,"beforeCursorEnter"),kt.explicitlyCleared))if(tt.markedSpans){--pt;continue}else break;if(!kt.atomic)continue;if(ke){var zt=kt.find(Ce<0?1:-1),wn=void 0;if((Ce<0?rn:Rt)&&(zt=Ih(re,zt,-Ce,zt&&zt.line==ce.line?tt:null)),zt&&zt.line==ce.line&&(wn=gr(zt,ke))&&(Ce<0?wn<0:wn>0))return ds(re,zt,ce,Ce,Oe)}var yn=kt.find(Ce<0?-1:1);return(Ce<0?Rt:rn)&&(yn=Ih(re,yn,Ce,yn.line==ce.line?tt:null)),yn?ds(re,yn,ce,Ce,Oe):null}}return ce}function Bh(re,ce,ke,Ce,Oe){var tt=Ce||1,pt=ds(re,ce,ke,tt,Oe)||!Oe&&ds(re,ce,ke,tt,!0)||ds(re,ce,ke,-tt,Oe)||!Oe&&ds(re,ce,ke,-tt,!0);return pt||(re.cantEdit=!0,xn(re.first,0))}function Ih(re,ce,ke,Ce){return ke<0&&ce.ch==0?ce.line>re.first?Ar(re,xn(ce.line-1)):null:ke>0&&ce.ch==(Ce||Tn(re,ce.line)).text.length?ce.line<re.first+re.size-1?xn(ce.line+1,0):null:new xn(ce.line,ce.ch+ke)}function Aa(re){re.setSelection(xn(re.firstLine(),0),xn(re.lastLine()),ht)}function _h(re,ce,ke){var Ce={canceled:!1,from:ce.from,to:ce.to,text:ce.text,origin:ce.origin,cancel:function(){return Ce.canceled=!0}};return ke&&(Ce.update=function(Oe,tt,pt,Nt){Oe&&(Ce.from=Ar(re,Oe)),tt&&(Ce.to=Ar(re,tt)),pt&&(Ce.text=pt),Nt!==void 0&&(Ce.origin=Nt)}),fn(re,"beforeChange",re,Ce),re.cm&&fn(re.cm,"beforeChange",re.cm,Ce),Ce.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:Ce.from,to:Ce.to,text:Ce.text,origin:Ce.origin}}function pu(re,ce,ke){if(re.cm){if(!re.cm.curOp)return Qr(re.cm,pu)(re,ce,ke);if(re.cm.state.suppressEdits)return}if(!((zn(re,"beforeChange")||re.cm&&zn(re.cm,"beforeChange"))&&(ce=_h(re,ce,!0),!ce))){var Ce=Ji&&!ke&&_r(re,ce.from,ce.to);if(Ce)for(var Oe=Ce.length-1;Oe>=0;--Oe)Qa(re,{from:Ce[Oe].from,to:Ce[Oe].to,text:Oe?[""]:ce.text,origin:ce.origin});else Qa(re,ce)}}function Qa(re,ce){if(!(ce.text.length==1&&ce.text[0]==""&&gr(ce.from,ce.to)==0)){var ke=Js(re,ce);ch(re,ce,ke,re.cm?re.cm.curOp.id:NaN),tu(re,ce,ke,pr(re,ce));var Ce=[];rs(re,function(Oe,tt){!tt&<(Ce,Oe.history)==-1&&(hc(Oe.history,ce),Ce.push(Oe.history)),tu(Oe,ce,null,pr(Oe,ce))})}}function eu(re,ce,ke){var Ce=re.cm&&re.cm.state.suppressEdits;if(!(Ce&&!ke)){for(var Oe=re.history,tt,pt=re.sel,Nt=ce=="undo"?Oe.done:Oe.undone,kt=ce=="undo"?Oe.undone:Oe.done,Rt=0;Rt<Nt.length&&(tt=Nt[Rt],!(ke?tt.ranges&&!tt.equals(re.sel):!tt.ranges));Rt++);if(Rt!=Nt.length){for(Oe.lastOrigin=Oe.lastSelOrigin=null;;)if(tt=Nt.pop(),tt.ranges){if(fs(tt,kt),ke&&!tt.equals(re.sel)){sa(re,tt,{clearRedo:!1});return}pt=tt}else if(Ce){Nt.push(tt);return}else break;var rn=[];fs(pt,kt),kt.push({changes:rn,generation:Oe.generation}),Oe.generation=tt.generation||++Oe.maxGeneration;for(var zt=zn(re,"beforeChange")||re.cm&&zn(re.cm,"beforeChange"),wn=function(ir){var vr=tt.changes[ir];if(vr.origin=ce,zt&&!_h(re,vr,!1))return Nt.length=0,{};rn.push(ga(re,vr));var Dr=ir?Js(re,vr):Tt(Nt);tu(re,vr,Dr,Nu(re,vr)),!ir&&re.cm&&re.cm.scrollIntoView({from:vr.from,to:bs(vr)});var ti=[];rs(re,function(Kr,si){!si&<(ti,Kr.history)==-1&&(hc(Kr.history,vr),ti.push(Kr.history)),tu(Kr,vr,null,Nu(Kr,vr))})},yn=tt.changes.length-1;yn>=0;--yn){var qn=wn(yn);if(qn)return qn.v}}}}function gh(re,ce){if(ce!=0&&(re.first+=ce,re.sel=new mo(ct(re.sel.ranges,function(Oe){return new ui(xn(Oe.anchor.line+ce,Oe.anchor.ch),xn(Oe.head.line+ce,Oe.head.ch))}),re.sel.primIndex),re.cm)){ua(re.cm,re.first,re.first-ce,ce);for(var ke=re.cm.display,Ce=ke.viewFrom;Ce<ke.viewTo;Ce++)eo(re.cm,Ce,"gutter")}}function tu(re,ce,ke,Ce){if(re.cm&&!re.cm.curOp)return Qr(re.cm,tu)(re,ce,ke,Ce);if(ce.to.line<re.first){gh(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);gh(re,Oe),ce={from:xn(re.first,0),to:xn(ce.to.line+Oe,ce.to.ch),text:[Tt(ce.text)],origin:ce.origin}}var tt=re.lastLine();ce.to.line>tt&&(ce={from:ce.from,to:xn(tt,Tn(re,tt).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=Sr(re,ce.from,ce.to),ke||(ke=Js(re,ce)),re.cm?uc(re.cm,ce,Ce):Ja(re,ce,Ce),Cs(re,ke,ht),re.cantEdit&&Bh(re,xn(re.firstLine(),0))&&(re.cantEdit=!1)}}function uc(re,ce,ke){var Ce=re.doc,Oe=re.display,tt=ce.from,pt=ce.to,Nt=!1,kt=tt.line;re.options.lineWrapping||(kt=$t(Zi(Tn(Ce,tt.line))),Ce.iter(kt,pt.line+1,function(yn){if(yn==Oe.maxLine)return Nt=!0,!0})),Ce.sel.contains(ce.from,ce.to)>-1&&Bn(re),Ja(Ce,ce,ke,pa(re)),re.options.lineWrapping||(Ce.iter(kt,tt.line+ce.text.length,function(yn){var qn=vo(yn);qn>Oe.maxLineLength&&(Oe.maxLine=yn,Oe.maxLineLength=qn,Oe.maxLineChanged=!0,Nt=!1)}),Nt&&(re.curOp.updateMaxLine=!0)),Pi(Ce,tt.line),Xi(re,400);var Rt=ce.text.length-(pt.line-tt.line)-1;ce.full?ua(re):tt.line==pt.line&&ce.text.length==1&&!_o(re.doc,ce)?eo(re,tt.line,"text"):ua(re,tt.line,pt.line+1,Rt);var rn=zn(re,"changes"),zt=zn(re,"change");if(zt||rn){var wn={from:tt,to:pt,text:ce.text,removed:ce.removed,origin:ce.origin};zt&&wr(re,"change",re,wn),rn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(wn)}re.display.selForContextMenu=null}function Ou(re,ce,ke,Ce,Oe){var tt;Ce||(Ce=ke),gr(Ce,ke)<0&&(tt=[Ce,ke],ke=tt[0],Ce=tt[1]),typeof ce=="string"&&(ce=re.splitLines(ce)),pu(re,{from:ke,to:Ce,text:ce,origin:Oe})}function pl(re,ce,ke,Ce){ke<re.line?re.line+=Ce:ce<re.line&&(re.line=ce,re.ch=0)}function $u(re,ce,ke,Ce){for(var Oe=0;Oe<re.length;++Oe){var tt=re[Oe],pt=!0;if(tt.ranges){tt.copied||(tt=re[Oe]=tt.deepCopy(),tt.copied=!0);for(var Nt=0;Nt<tt.ranges.length;Nt++)pl(tt.ranges[Nt].anchor,ce,ke,Ce),pl(tt.ranges[Nt].head,ce,ke,Ce);continue}for(var kt=0;kt<tt.changes.length;++kt){var Rt=tt.changes[kt];if(ke<Rt.from.line)Rt.from=xn(Rt.from.line+Ce,Rt.from.ch),Rt.to=xn(Rt.to.line+Ce,Rt.to.ch);else if(ce<=Rt.to.line){pt=!1;break}}pt||(re.splice(0,Oe+1),Oe=0)}}function hc(re,ce){var ke=ce.from.line,Ce=ce.to.line,Oe=ce.text.length-(Ce-ke)-1;$u(re.done,ke,Ce,Oe),$u(re.undone,ke,Ce,Oe)}function Di(re,ce,ke,Ce){var Oe=ce,tt=ce;return typeof ce=="number"?tt=Tn(re,dr(re,ce)):Oe=$t(ce),Oe==null?null:(Ce(tt,Oe)&&re.cm&&eo(re.cm,Oe,ke),tt)}function Si(re){this.lines=re,this.parent=null;for(var ce=0,ke=0;ke<re.length;++ke)re[ke].parent=this,ce+=re[ke].height;this.height=ce}Si.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,ce){for(var ke=re,Ce=re+ce;ke<Ce;++ke){var Oe=this.lines[ke];this.height-=Oe.height,Fa(Oe),wr(Oe,"delete")}this.lines.splice(re,ce)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,ce,ke){this.height+=ke,this.lines=this.lines.slice(0,re).concat(ce).concat(this.lines.slice(re));for(var Ce=0;Ce<ce.length;++Ce)ce[Ce].parent=this},iterN:function(re,ce,ke){for(var Ce=re+ce;re<Ce;++re)if(ke(this.lines[re]))return!0}};function fi(re){this.children=re;for(var ce=0,ke=0,Ce=0;Ce<re.length;++Ce){var Oe=re[Ce];ce+=Oe.chunkSize(),ke+=Oe.height,Oe.parent=this}this.size=ce,this.height=ke,this.parent=null}fi.prototype={chunkSize:function(){return this.size},removeInner:function(re,ce){this.size-=ce;for(var ke=0;ke<this.children.length;++ke){var Ce=this.children[ke],Oe=Ce.chunkSize();if(re<Oe){var tt=Math.min(ce,Oe-re),pt=Ce.height;if(Ce.removeInner(re,tt),this.height-=pt-Ce.height,Oe==tt&&(this.children.splice(ke--,1),Ce.parent=null),(ce-=tt)==0)break;re=0}else re-=Oe}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof Si))){var Nt=[];this.collapse(Nt),this.children=[new Si(Nt)],this.children[0].parent=this}},collapse:function(re){for(var ce=0;ce<this.children.length;++ce)this.children[ce].collapse(re)},insertInner:function(re,ce,ke){this.size+=ce.length,this.height+=ke;for(var Ce=0;Ce<this.children.length;++Ce){var Oe=this.children[Ce],tt=Oe.chunkSize();if(re<=tt){if(Oe.insertInner(re,ce,ke),Oe.lines&&Oe.lines.length>50){for(var pt=Oe.lines.length%25+25,Nt=pt;Nt<Oe.lines.length;){var kt=new Si(Oe.lines.slice(Nt,Nt+=25));Oe.height-=kt.height,this.children.splice(++Ce,0,kt),kt.parent=this}Oe.lines=Oe.lines.slice(0,pt),this.maybeSpill()}break}re-=tt}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var ce=re.children.splice(re.children.length-5,5),ke=new fi(ce);if(re.parent){re.size-=ke.size,re.height-=ke.height;var Oe=lt(re.parent.children,re);re.parent.children.splice(Oe+1,0,ke)}else{var Ce=new fi(re.children);Ce.parent=re,re.children=[Ce,ke],re=Ce}ke.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,ce,ke){for(var Ce=0;Ce<this.children.length;++Ce){var Oe=this.children[Ce],tt=Oe.chunkSize();if(re<tt){var pt=Math.min(ce,tt-re);if(Oe.iterN(re,pt,ke))return!0;if((ce-=pt)==0)break;re=0}else re-=tt}}};var qo=function(re,ce,ke){if(ke)for(var Ce in ke)ke.hasOwnProperty(Ce)&&(this[Ce]=ke[Ce]);this.doc=re,this.node=ce};qo.prototype.clear=function(){var re=this.doc.cm,ce=this.line.widgets,ke=this.line,Ce=$t(ke);if(!(Ce==null||!ce)){for(var Oe=0;Oe<ce.length;++Oe)ce[Oe]==this&&ce.splice(Oe--,1);ce.length||(ke.widgets=null);var tt=us(this);Wn(ke,Math.max(0,ke.height-tt)),re&&(kr(re,function(){qa(re,ke,-tt),eo(re,Ce,"widget")}),wr(re,"lineWidgetCleared",re,this,Ce))}},qo.prototype.changed=function(){var re=this,ce=this.height,ke=this.doc.cm,Ce=this.line;this.height=null;var Oe=us(this)-ce;Oe&&(pn(this.doc,Ce)||Wn(Ce,Ce.height+Oe),ke&&kr(ke,function(){ke.curOp.forceUpdate=!0,qa(ke,Ce,Oe),wr(ke,"lineWidgetChanged",ke,re,$t(Ce))}))},Yn(qo);function qa(re,ce,ke){pi(ce)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&Ef(re,ke)}function Ju(re,ce,ke,Ce){var Oe=new qo(re,ke,Ce),tt=re.cm;return tt&&Oe.noHScroll&&(tt.display.alignWidgets=!0),Di(re,ce,"widget",function(pt){var Nt=pt.widgets||(pt.widgets=[]);if(Oe.insertAt==null?Nt.push(Oe):Nt.splice(Math.min(Nt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=pt,tt&&!pn(re,pt)){var kt=pi(pt)<re.scrollTop;Wn(pt,pt.height+us(Oe)),kt&&Ef(tt,Oe.height),tt.curOp.forceUpdate=!0}return!0}),tt&&wr(tt,"lineWidgetAdded",tt,Oe,typeof ce=="number"?ce:$t(ce)),Oe}var gu=0,Xt=function(re,ce){this.lines=[],this.type=ce,this.doc=re,this.id=++gu};Xt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,ce=re&&!re.curOp;if(ce&&$n(re),zn(this,"clear")){var ke=this.find();ke&&wr(this,"clear",ke.from,ke.to)}for(var Ce=null,Oe=null,tt=0;tt<this.lines.length;++tt){var pt=this.lines[tt],Nt=ya(pt.markedSpans,this);re&&!this.collapsed?eo(re,$t(pt),"text"):re&&(Nt.to!=null&&(Oe=$t(pt)),Nt.from!=null&&(Ce=$t(pt))),pt.markedSpans=Zt(pt.markedSpans,Nt),Nt.from==null&&this.collapsed&&!pn(this.doc,pt)&&re&&Wn(pt,Mu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var kt=0;kt<this.lines.length;++kt){var Rt=Zi(this.lines[kt]),rn=vo(Rt);rn>re.display.maxLineLength&&(re.display.maxLine=Rt,re.display.maxLineLength=rn,re.display.maxLineChanged=!0)}Ce!=null&&re&&this.collapsed&&ua(re,Ce,Oe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&du(re.doc)),re&&wr(re,"markerCleared",re,this,Ce,Oe),ce&&Vn(re),this.parent&&this.parent.clear()}},Xt.prototype.find=function(re,ce){re==null&&this.type=="bookmark"&&(re=1);for(var ke,Ce,Oe=0;Oe<this.lines.length;++Oe){var tt=this.lines[Oe],pt=ya(tt.markedSpans,this);if(pt.from!=null&&(ke=xn(ce?tt:$t(tt),pt.from),re==-1))return ke;if(pt.to!=null&&(Ce=xn(ce?tt:$t(tt),pt.to),re==1))return Ce}return ke&&{from:ke,to:Ce}},Xt.prototype.changed=function(){var re=this,ce=this.find(-1,!0),ke=this,Ce=this.doc.cm;!ce||!Ce||kr(Ce,function(){var Oe=ce.line,tt=$t(ce.line),pt=Ah(Ce,tt);if(pt&&(ad(pt),Ce.curOp.selectionChanged=Ce.curOp.forceUpdate=!0),Ce.curOp.updateMaxLine=!0,!pn(ke.doc,Oe)&&ke.height!=null){var Nt=ke.height;ke.height=null;var kt=us(ke)-Nt;kt&&Wn(Oe,Oe.height+kt)}wr(Ce,"markerChanged",Ce,re)})},Xt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||lt(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Xt.prototype.detachLine=function(re){if(this.lines.splice(lt(this.lines,re),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Yn(Xt);function Fu(re,ce,ke,Ce,Oe){if(Ce&&Ce.shared)return zh(re,ce,ke,Ce,Oe);if(re.cm&&!re.cm.curOp)return Qr(re.cm,Fu)(re,ce,ke,Ce,Oe);var tt=new Xt(re,Oe),pt=gr(ce,ke);if(Ce&&Lt(Ce,tt,!1),pt>0||pt==0&&tt.clearWhenEmpty!==!1)return tt;if(tt.replacedWith&&(tt.collapsed=!0,tt.widgetNode=Be("span",[tt.replacedWith],"CodeMirror-widget"),Ce.handleMouseEvents||tt.widgetNode.setAttribute("cm-ignore-events","true"),Ce.insertLeft&&(tt.widgetNode.insertLeft=!0)),tt.collapsed){if(Vo(re,ce.line,ce,ke,tt)||ce.line!=ke.line&&Vo(re,ke.line,ce,ke,tt))throw new Error("Inserting collapsed marker partially overlapping an existing one");bn()}tt.addToHistory&&ch(re,{from:ce,to:ke,origin:"markText"},re.sel,NaN);var Nt=ce.line,kt=re.cm,Rt;if(re.iter(Nt,ke.line+1,function(zt){kt&&tt.collapsed&&!kt.options.lineWrapping&&Zi(zt)==kt.display.maxLine&&(Rt=!0),tt.collapsed&&Nt!=ce.line&&Wn(zt,0),Jt(zt,new Ni(tt,Nt==ce.line?ce.ch:null,Nt==ke.line?ke.ch:null)),++Nt}),tt.collapsed&&re.iter(ce.line,ke.line+1,function(zt){pn(re,zt)&&Wn(zt,0)}),tt.clearOnEnter&&hn(tt,"beforeCursorEnter",function(){return tt.clear()}),tt.readOnly&&(To(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),tt.collapsed&&(tt.id=++gu,tt.atomic=!0),kt){if(Rt&&(kt.curOp.updateMaxLine=!0),tt.collapsed)ua(kt,ce.line,ke.line+1);else if(tt.className||tt.startStyle||tt.endStyle||tt.css||tt.attributes||tt.title)for(var rn=ce.line;rn<=ke.line;rn++)eo(kt,rn,"text");tt.atomic&&du(kt.doc),wr(kt,"markerAdded",kt,tt)}return tt}var tl=function(re,ce){this.markers=re,this.primary=ce;for(var ke=0;ke<re.length;++ke)re[ke].parent=this};tl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();wr(this,"clear")}},tl.prototype.find=function(re,ce){return this.primary.find(re,ce)},Yn(tl);function zh(re,ce,ke,Ce,Oe){Ce=Lt(Ce),Ce.shared=!1;var tt=[Fu(re,ce,ke,Ce,Oe)],pt=tt[0],Nt=Ce.widgetNode;return rs(re,function(kt){Nt&&(Ce.widgetNode=Nt.cloneNode(!0)),tt.push(Fu(kt,Ar(kt,ce),Ar(kt,ke),Ce,Oe));for(var Rt=0;Rt<kt.linked.length;++Rt)if(kt.linked[Rt].isParent)return;pt=Tt(tt)}),new tl(tt,pt)}function hd(re){return re.findMarks(xn(re.first,0),re.clipPos(xn(re.lastLine())),function(ce){return ce.parent})}function cd(re,ce){for(var ke=0;ke<ce.length;ke++){var Ce=ce[ke],Oe=Ce.find(),tt=re.clipPos(Oe.from),pt=re.clipPos(Oe.to);if(gr(tt,pt)){var Nt=Fu(re,tt,pt,Ce.primary,Ce.primary.type);Ce.markers.push(Nt),Nt.parent=Ce}}}function kf(re){for(var ce=function(Ce){var Oe=re[Ce],tt=[Oe.primary.doc];rs(Oe.primary.doc,function(kt){return tt.push(kt)});for(var pt=0;pt<Oe.markers.length;pt++){var Nt=Oe.markers[pt];lt(tt,Nt.doc)==-1&&(Nt.parent=null,Oe.markers.splice(pt--,1))}},ke=0;ke<re.length;ke++)ce(ke)}var Wp=0,ps=function(re,ce,ke,Ce,Oe){if(!(this instanceof ps))return new ps(re,ce,ke,Ce,Oe);ke==null&&(ke=0),fi.call(this,[new Si([new Ao("",null)])]),this.first=ke,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ke;var tt=xn(ke,0);this.sel=Na(tt),this.history=new _l(null),this.id=++Wp,this.modeOption=ce,this.lineSep=Ce,this.direction=Oe=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),Ja(this,{from:tt,to:tt,text:re}),sa(this,Na(tt),ht)};ps.prototype=Se(fi.prototype,{constructor:ps,iter:function(re,ce,ke){ke?this.iterN(re-this.first,ce-re,ke):this.iterN(this.first,this.first+this.size,re)},insert:function(re,ce){for(var ke=0,Ce=0;Ce<ce.length;++Ce)ke+=ce[Ce].height;this.insertInner(re-this.first,ce,ke)},remove:function(re,ce){this.removeInner(re-this.first,ce)},getValue:function(re){var ce=Vr(this,this.first,this.first+this.size);return re===!1?ce:ce.join(re||this.lineSeparator())},setValue:Yr(function(re){var ce=xn(this.first,0),ke=this.first+this.size-1;pu(this,{from:ce,to:xn(ke,Tn(this,ke).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&hh(this.cm,0,0),sa(this,Na(ce),ht)}),replaceRange:function(re,ce,ke,Ce){ce=Ar(this,ce),ke=ke?Ar(this,ke):ce,Ou(this,re,ce,ke,Ce)},getRange:function(re,ce,ke){var Ce=Sr(this,Ar(this,re),Ar(this,ce));return ke===!1?Ce:Ce.join(ke||this.lineSeparator())},getLine:function(re){var ce=this.getLineHandle(re);return ce&&ce.text},getLineHandle:function(re){if(yr(this,re))return Tn(this,re)},getLineNumber:function(re){return $t(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=Tn(this,re)),Zi(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return Ar(this,re)},getCursor:function(re){var ce=this.sel.primary(),ke;return re==null||re=="head"?ke=ce.head:re=="anchor"?ke=ce.anchor:re=="end"||re=="to"||re===!1?ke=ce.to():ke=ce.from(),ke},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yr(function(re,ce,ke){Gl(this,Ar(this,typeof re=="number"?xn(re,ce||0):re),null,ke)}),setSelection:Yr(function(re,ce,ke){Gl(this,Ar(this,re),Ar(this,ce||re),ke)}),extendSelection:Yr(function(re,ce,ke){dh(this,Ar(this,re),ce&&Ar(this,ce),ke)}),extendSelections:Yr(function(re,ce){lc(this,Zr(this,re),ce)}),extendSelectionsBy:Yr(function(re,ce){var ke=ct(this.sel.ranges,re);lc(this,Zr(this,ke),ce)}),setSelections:Yr(function(re,ce,ke){if(re.length){for(var Ce=[],Oe=0;Oe<re.length;Oe++)Ce[Oe]=new ui(Ar(this,re[Oe].anchor),Ar(this,re[Oe].head));ce==null&&(ce=Math.min(re.length-1,this.sel.primIndex)),sa(this,Eo(this.cm,Ce,ce),ke)}}),addSelection:Yr(function(re,ce,ke){var Ce=this.sel.ranges.slice(0);Ce.push(new ui(Ar(this,re),Ar(this,ce||re))),sa(this,Eo(this.cm,Ce,Ce.length-1),ke)}),getSelection:function(re){for(var ce=this.sel.ranges,ke,Ce=0;Ce<ce.length;Ce++){var Oe=Sr(this,ce[Ce].from(),ce[Ce].to());ke=ke?ke.concat(Oe):Oe}return re===!1?ke:ke.join(re||this.lineSeparator())},getSelections:function(re){for(var ce=[],ke=this.sel.ranges,Ce=0;Ce<ke.length;Ce++){var Oe=Sr(this,ke[Ce].from(),ke[Ce].to());re!==!1&&(Oe=Oe.join(re||this.lineSeparator())),ce[Ce]=Oe}return ce},replaceSelection:function(re,ce,ke){for(var Ce=[],Oe=0;Oe<this.sel.ranges.length;Oe++)Ce[Oe]=re;this.replaceSelections(Ce,ce,ke||"+input")},replaceSelections:Yr(function(re,ce,ke){for(var Ce=[],Oe=this.sel,tt=0;tt<Oe.ranges.length;tt++){var pt=Oe.ranges[tt];Ce[tt]={from:pt.from(),to:pt.to(),text:this.splitLines(re[tt]),origin:ke}}for(var Nt=ce&&ce!="end"&&Ml(this,Ce,ce),kt=Ce.length-1;kt>=0;kt--)pu(this,Ce[kt]);Nt?ju(this,Nt):this.cm&&Xu(this.cm)}),undo:Yr(function(){eu(this,"undo")}),redo:Yr(function(){eu(this,"redo")}),undoSelection:Yr(function(){eu(this,"undo",!0)}),redoSelection:Yr(function(){eu(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,ce=0,ke=0,Ce=0;Ce<re.done.length;Ce++)re.done[Ce].ranges||++ce;for(var Oe=0;Oe<re.undone.length;Oe++)re.undone[Oe].ranges||++ke;return{undo:ce,redo:ke}},clearHistory:function(){var re=this;this.history=new _l(this.history.maxGeneration),rs(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:fu(this.history.done),undone:fu(this.history.undone)}},setHistory:function(re){var ce=this.history=new _l(this.history.maxGeneration);ce.done=fu(re.done.slice(0),null,!0),ce.undone=fu(re.undone.slice(0),null,!0)},setGutterMarker:Yr(function(re,ce,ke){return Di(this,re,"gutter",function(Ce){var Oe=Ce.gutterMarkers||(Ce.gutterMarkers={});return Oe[ce]=ke,!ke&&Ie(Oe)&&(Ce.gutterMarkers=null),!0})}),clearGutter:Yr(function(re){var ce=this;this.iter(function(ke){ke.gutterMarkers&&ke.gutterMarkers[re]&&Di(ce,ke,"gutter",function(){return ke.gutterMarkers[re]=null,Ie(ke.gutterMarkers)&&(ke.gutterMarkers=null),!0})})}),lineInfo:function(re){var ce;if(typeof re=="number"){if(!yr(this,re)||(ce=re,re=Tn(this,re),!re))return null}else if(ce=$t(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:Yr(function(re,ce,ke){return Di(this,re,ce=="gutter"?"gutter":"class",function(Ce){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass";if(!Ce[Oe])Ce[Oe]=ke;else{if(Ae(ke).test(Ce[Oe]))return!1;Ce[Oe]+=" "+ke}return!0})}),removeLineClass:Yr(function(re,ce,ke){return Di(this,re,ce=="gutter"?"gutter":"class",function(Ce){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass",tt=Ce[Oe];if(tt)if(ke==null)Ce[Oe]=null;else{var pt=tt.match(Ae(ke));if(!pt)return!1;var Nt=pt.index+pt[0].length;Ce[Oe]=tt.slice(0,pt.index)+(!pt.index||Nt==tt.length?"":" ")+tt.slice(Nt)||null}else return!1;return!0})}),addLineWidget:Yr(function(re,ce,ke){return Ju(this,re,ce,ke)}),removeLineWidget:function(re){re.clear()},markText:function(re,ce,ke){return Fu(this,Ar(this,re),Ar(this,ce),ke,ke&&ke.type||"range")},setBookmark:function(re,ce){var ke={replacedWith:ce&&(ce.nodeType==null?ce.widget:ce),insertLeft:ce&&ce.insertLeft,clearWhenEmpty:!1,shared:ce&&ce.shared,handleMouseEvents:ce&&ce.handleMouseEvents};return re=Ar(this,re),Fu(this,re,re,ke,"bookmark")},findMarksAt:function(re){re=Ar(this,re);var ce=[],ke=Tn(this,re.line).markedSpans;if(ke)for(var Ce=0;Ce<ke.length;++Ce){var Oe=ke[Ce];(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,ke){re=Ar(this,re),ce=Ar(this,ce);var Ce=[],Oe=re.line;return this.iter(re.line,ce.line+1,function(tt){var pt=tt.markedSpans;if(pt)for(var Nt=0;Nt<pt.length;Nt++){var kt=pt[Nt];!(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)&&(!ke||ke(kt.marker))&&Ce.push(kt.marker.parent||kt.marker)}++Oe}),Ce},getAllMarks:function(){var re=[];return this.iter(function(ce){var ke=ce.markedSpans;if(ke)for(var Ce=0;Ce<ke.length;++Ce)ke[Ce].from!=null&&re.push(ke[Ce].marker)}),re},posFromIndex:function(re){var ce,ke=this.first,Ce=this.lineSeparator().length;return this.iter(function(Oe){var tt=Oe.text.length+Ce;if(tt>re)return ce=re,!0;re-=tt,++ke}),Ar(this,xn(ke,ce))},indexFromPos:function(re){re=Ar(this,re);var ce=re.ch;if(re.line<this.first||re.ch<0)return 0;var ke=this.lineSeparator().length;return this.iter(this.first,re.line,function(Ce){ce+=Ce.text.length+ke}),ce},copy:function(re){var ce=new ps(Vr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ce.scrollTop=this.scrollTop,ce.scrollLeft=this.scrollLeft,ce.sel=this.sel,ce.extend=!1,re&&(ce.history.undoDepth=this.history.undoDepth,ce.setHistory(this.getHistory())),ce},linkedDoc:function(re){re||(re={});var ce=this.first,ke=this.first+this.size;re.from!=null&&re.from>ce&&(ce=re.from),re.to!=null&&re.to<ke&&(ke=re.to);var Ce=new ps(Vr(this,ce,ke),re.mode||this.modeOption,ce,this.lineSep,this.direction);return re.sharedHist&&(Ce.history=this.history),(this.linked||(this.linked=[])).push({doc:Ce,sharedHist:re.sharedHist}),Ce.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],cd(Ce,hd(this)),Ce},unlinkDoc:function(re){if(re instanceof Uo&&(re=re.doc),this.linked)for(var ce=0;ce<this.linked.length;++ce){var ke=this.linked[ce];if(ke.doc==re){this.linked.splice(ce,1),re.unlinkDoc(this),kf(hd(this));break}}if(re.history==this.history){var Ce=[re.id];rs(re,function(Oe){return Ce.push(Oe.id)},!0),re.history=new _l(null),re.history.done=fu(this.history.done,Ce),re.history.undone=fu(this.history.undone,Ce)}},iterLinkedDocs:function(re){rs(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Nn(re)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Yr(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(ce){return ce.order=null}),this.cm&&fl(this.cm))})}),ps.prototype.eachLine=ps.prototype.iter;var Kc=0;function Mf(re){var ce=this;if(Lf(ce),!(Wt(ce,re)||hs(ce.display,re))){fr(re),Re&&(Kc=+new Date);var ke=_s(ce,re,!0),Ce=re.dataTransfer.files;if(!(!ke||ce.isReadOnly()))if(Ce&&Ce.length&&window.FileReader&&window.File)for(var Oe=Ce.length,tt=Array(Oe),pt=0,Nt=function(){++pt==Oe&&Qr(ce,function(){ke=Ar(ce.doc,ke);var yn={from:ke,to:ke,text:ce.doc.splitLines(tt.filter(function(qn){return qn!=null}).join(ce.doc.lineSeparator())),origin:"paste"};pu(ce.doc,yn),ju(ce.doc,Na(Ar(ce.doc,ke),Ar(ce.doc,bs(yn))))})()},kt=function(yn,qn){if(ce.options.allowDropFileTypes&<(ce.options.allowDropFileTypes,yn.type)==-1){Nt();return}var ir=new FileReader;ir.onerror=function(){return Nt()},ir.onload=function(){var vr=ir.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(vr)){Nt();return}tt[qn]=vr,Nt()},ir.readAsText(yn)},Rt=0;Rt<Ce.length;Rt++)kt(Ce[Rt],Rt);else{if(ce.state.draggingText&&ce.doc.sel.contains(ke)>-1){ce.state.draggingText(re),setTimeout(function(){return ce.display.input.focus()},20);return}try{var rn=re.dataTransfer.getData("Text");if(rn){var zt;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(zt=ce.listSelections()),Cs(ce.doc,Na(ke,ke)),zt)for(var wn=0;wn<zt.length;++wn)Ou(ce.doc,"",zt[wn].anchor,zt[wn].head,"drag");ce.replaceSelection(rn,"around","paste"),ce.display.input.focus()}}catch(yn){}}}}function Vc(re,ce){if(Re&&(!re.state.draggingText||+new Date-Kc<100)){ni(ce);return}if(!(Wt(re,ce)||hs(re.display,ce))&&(ce.dataTransfer.setData("Text",re.getSelection()),ce.dataTransfer.effectAllowed="copyMove",ce.dataTransfer.setDragImage&&!Te)){var ke=Le("img",null,null,"position: fixed; left: 0; top: 0;");ke.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",we&&(ke.width=ke.height=1,re.display.wrapper.appendChild(ke),ke._top=ke.offsetTop),ce.dataTransfer.setDragImage(ke,0,0),we&&ke.parentNode.removeChild(ke)}}function Tf(re,ce){var ke=_s(re,ce);if(ke){var Ce=document.createDocumentFragment();Lo(re,ke,Ce),re.display.dragCursor||(re.display.dragCursor=Le("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),je(re.display.dragCursor,Ce)}}function Lf(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function fd(re){if(document.getElementsByClassName){for(var ce=document.getElementsByClassName("CodeMirror"),ke=[],Ce=0;Ce<ce.length;Ce++){var Oe=ce[Ce].CodeMirror;Oe&&ke.push(Oe)}ke.length&&ke[0].operation(function(){for(var tt=0;tt<ke.length;tt++)re(ke[tt])})}}var Nf=!1;function gl(){Nf||(Gh(),Nf=!0)}function Gh(){var re;hn(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,fd(dd)},100))}),hn(window,"blur",function(){return fd(Dh)})}function dd(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"},Uh=0;Uh<10;Uh++)mu[Uh+48]=mu[Uh+96]=String(Uh);for(var Zc=65;Zc<=90;Zc++)mu[Zc]=String.fromCharCode(Zc);for(var Hh=1;Hh<=12;Hh++)mu[Hh+111]=mu[Hh+63235]="F"+Hh;var nl={};nl.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"},nl.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"},nl.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"},nl.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"]},nl.default=oe?nl.macDefault:nl.pcDefault;function pd(re){var ce=re.split(/-(?!$)/);re=ce[ce.length-1];for(var ke,Ce,Oe,tt,pt=0;pt<ce.length-1;pt++){var Nt=ce[pt];if(/^(cmd|meta|m)$/i.test(Nt))tt=!0;else if(/^a(lt)?$/i.test(Nt))ke=!0;else if(/^(c|ctrl|control)$/i.test(Nt))Ce=!0;else if(/^s(hift)?$/i.test(Nt))Oe=!0;else throw new Error("Unrecognized modifier name: "+Nt)}return ke&&(re="Alt-"+re),Ce&&(re="Ctrl-"+re),tt&&(re="Cmd-"+re),Oe&&(re="Shift-"+re),re}function Fo(re){var ce={};for(var ke in re)if(re.hasOwnProperty(ke)){var Ce=re[ke];if(/^(name|fallthrough|(de|at)tach)$/.test(ke))continue;if(Ce=="..."){delete re[ke];continue}for(var Oe=ct(ke.split(" "),pd),tt=0;tt<Oe.length;tt++){var pt=void 0,Nt=void 0;tt==Oe.length-1?(Nt=Oe.join(" "),pt=Ce):(Nt=Oe.slice(0,tt+1).join(" "),pt="...");var kt=ce[Nt];if(!kt)ce[Nt]=pt;else if(kt!=pt)throw new Error("Inconsistent bindings for "+Nt)}delete re[ke]}for(var Rt in ce)re[Rt]=ce[Rt];return re}function lo(re,ce,ke,Ce){ce=nu(ce);var Oe=ce.call?ce.call(re,Ce):ce[re];if(Oe===!1)return"nothing";if(Oe==="...")return"multi";if(Oe!=null&&ke(Oe))return"handled";if(ce.fallthrough){if(Object.prototype.toString.call(ce.fallthrough)!="[object Array]")return lo(re,ce.fallthrough,ke,Ce);for(var tt=0;tt<ce.fallthrough.length;tt++){var pt=lo(re,ce.fallthrough[tt],ke,Ce);if(pt)return pt}}}function Va(re){var ce=typeof re=="string"?re:mu[re.keyCode];return ce=="Ctrl"||ce=="Alt"||ce=="Shift"||ce=="Mod"}function Ll(re,ce,ke){var Ce=re;return ce.altKey&&Ce!="Alt"&&(re="Alt-"+re),(me?ce.metaKey:ce.ctrlKey)&&Ce!="Ctrl"&&(re="Ctrl-"+re),(me?ce.ctrlKey:ce.metaKey)&&Ce!="Mod"&&(re="Cmd-"+re),!ke&&ce.shiftKey&&Ce!="Shift"&&(re="Shift-"+re),re}function Es(re,ce){if(we&&re.keyCode==34&&re.char)return!1;var ke=mu[re.keyCode];return ke==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(ke=re.code),Ll(ke,re,ce))}function nu(re){return typeof re=="string"?nl[re]:re}function es(re,ce){for(var ke=re.doc.sel.ranges,Ce=[],Oe=0;Oe<ke.length;Oe++){for(var tt=ce(ke[Oe]);Ce.length&&gr(tt.from,Tt(Ce).to)<=0;){var pt=Ce.pop();if(gr(pt.from,tt.from)<0){tt.from=pt.from;break}}Ce.push(tt)}kr(re,function(){for(var Nt=Ce.length-1;Nt>=0;Nt--)Ou(re.doc,"",Ce[Nt].from,Ce[Nt].to,"+delete");Xu(re)})}function Qu(re,ce,ke){var Ce=it(re.text,ce+ke,ke);return Ce<0||Ce>re.text.length?null:Ce}function Pa(re,ce,ke){var Ce=Qu(re,ce.ch,ke);return Ce==null?null:new xn(ce.line,Ce,ke<0?"after":"before")}function Wh(re,ce,ke,Ce,Oe){if(re){ce.doc.direction=="rtl"&&(Oe=-Oe);var tt=an(ke,ce.doc.direction);if(tt){var pt=Oe<0?Tt(tt):tt[0],Nt=Oe<0==(pt.level==1),kt=Nt?"after":"before",Rt;if(pt.level>0||ce.doc.direction=="rtl"){var rn=uh(ce,ke);Rt=Oe<0?ke.text.length-1:0;var zt=cu(ce,rn,Rt).top;Rt=St(function(wn){return cu(ce,rn,wn).top==zt},Oe<0==(pt.level==1)?pt.from:pt.to-1,Rt),kt=="before"&&(Rt=Qu(ke,Rt,1))}else Rt=Oe<0?pt.to:pt.from;return new xn(Ce,Rt,kt)}}return new xn(Ce,Oe<0?ke.text.length:0,Oe<0?"before":"after")}function Vd(re,ce,ke,Ce){var Oe=an(ce,re.doc.direction);if(!Oe)return Pa(ce,ke,Ce);ke.ch>=ce.text.length?(ke.ch=ce.text.length,ke.sticky="before"):ke.ch<=0&&(ke.ch=0,ke.sticky="after");var tt=jt(Oe,ke.ch,ke.sticky),pt=Oe[tt];if(re.doc.direction=="ltr"&&pt.level%2==0&&(Ce>0?pt.to>ke.ch:pt.from<ke.ch))return Pa(ce,ke,Ce);var Nt=function(Dr,ti){return Qu(ce,Dr instanceof xn?Dr.ch:Dr,ti)},kt,Rt=function(Dr){return re.options.lineWrapping?(kt=kt||uh(re,ce),sd(re,ce,kt,Dr)):{begin:0,end:ce.text.length}},rn=Rt(ke.sticky=="before"?Nt(ke,-1):ke.ch);if(re.doc.direction=="rtl"||pt.level==1){var zt=pt.level==1==Ce<0,wn=Nt(ke,zt?1:-1);if(wn!=null&&(zt?wn<=pt.to&&wn<=rn.end:wn>=pt.from&&wn>=rn.begin)){var yn=zt?"before":"after";return new xn(ke.line,wn,yn)}}var qn=function(Dr,ti,Kr){for(var si=function(ka,ms){return ms?new xn(ke.line,Nt(ka,1),"before"):new xn(ke.line,ka,"after")};Dr>=0&&Dr<Oe.length;Dr+=ti){var Hi=Oe[Dr],Ur=ti>0==(Hi.level!=1),co=Ur?Kr.begin:Nt(Kr.end,-1);if(Hi.from<=co&&co<Hi.to||(co=Ur?Hi.from:Nt(Hi.to,-1),Kr.begin<=co&&co<Kr.end))return si(co,Ur)}},ir=qn(tt+Ce,Ce,rn);if(ir)return ir;var vr=Ce>0?rn.end:Nt(rn.begin,-1);return vr!=null&&!(Ce>0&&vr==ce.text.length)&&(ir=qn(Ce>0?0:Oe.length-1,Ce,Rt(vr)),ir)?ir:null}var cc={selectAll:Aa,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),ht)},killLine:function(re){return es(re,function(ce){if(ce.empty()){var ke=Tn(re.doc,ce.head.line).text.length;return ce.head.ch==ke&&ce.head.line<re.lastLine()?{from:ce.head,to:xn(ce.head.line+1,0)}:{from:ce.head,to:xn(ce.head.line,ke)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(re){return es(re,function(ce){return{from:xn(ce.from().line,0),to:Ar(re.doc,xn(ce.to().line+1,0))}})},delLineLeft:function(re){return es(re,function(ce){return{from:xn(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(re){return es(re,function(ce){var ke=re.charCoords(ce.head,"div").top+5,Ce=re.coordsChar({left:0,top:ke},"div");return{from:Ce,to:ce.from()}})},delWrappedLineRight:function(re){return es(re,function(ce){var ke=re.charCoords(ce.head,"div").top+5,Ce=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:ke},"div");return{from:ce.from(),to:Ce}})},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(xn(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(xn(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(ce){return Af(re,ce.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(ce){return Kp(re,ce.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(ce){return jf(re,ce.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(ce){var ke=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:ke},"div")},ut)},goLineLeft:function(re){return re.extendSelectionsBy(function(ce){var ke=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:0,top:ke},"div")},ut)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(ce){var ke=re.cursorCoords(ce.head,"div").top+5,Ce=re.coordsChar({left:0,top:ke},"div");return Ce.ch<re.getLine(Ce.line).search(/\S/)?Kp(re,ce.head):Ce},ut)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var ce=[],ke=re.listSelections(),Ce=re.options.tabSize,Oe=0;Oe<ke.length;Oe++){var tt=ke[Oe].from(),pt=Xe(re.getLine(tt.line),tt.ch,Ce);ce.push(gt(Ce-pt%Ce))}re.replaceSelections(ce)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return kr(re,function(){for(var ce=re.listSelections(),ke=[],Ce=0;Ce<ce.length;Ce++)if(ce[Ce].empty()){var Oe=ce[Ce].head,tt=Tn(re.doc,Oe.line).text;if(tt){if(Oe.ch==tt.length&&(Oe=new xn(Oe.line,Oe.ch-1)),Oe.ch>0)Oe=new xn(Oe.line,Oe.ch+1),re.replaceRange(tt.charAt(Oe.ch-1)+tt.charAt(Oe.ch-2),xn(Oe.line,Oe.ch-2),Oe,"+transpose");else if(Oe.line>re.doc.first){var pt=Tn(re.doc,Oe.line-1).text;pt&&(Oe=new xn(Oe.line,1),re.replaceRange(tt.charAt(0)+re.doc.lineSeparator()+pt.charAt(pt.length-1),xn(Oe.line-1,pt.length-1),Oe,"+transpose"))}}ke.push(new ui(Oe,Oe))}re.setSelections(ke)})},newlineAndIndent:function(re){return kr(re,function(){for(var ce=re.listSelections(),ke=ce.length-1;ke>=0;ke--)re.replaceRange(re.doc.lineSeparator(),ce[ke].anchor,ce[ke].head,"+input");ce=re.listSelections();for(var Ce=0;Ce<ce.length;Ce++)re.indentLine(ce[Ce].from().line,null,!0);Xu(re)})},openLine:function(re){return re.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function Af(re,ce){var ke=Tn(re.doc,ce),Ce=Zi(ke);return Ce!=ke&&(ce=$t(Ce)),Wh(!0,re,Ce,ce,1)}function jf(re,ce){var ke=Tn(re.doc,ce),Ce=ao(ke);return Ce!=ke&&(ce=$t(Ce)),Wh(!0,re,ke,ce,-1)}function Kp(re,ce){var ke=Af(re,ce.line),Ce=Tn(re.doc,ke.line),Oe=an(Ce,re.doc.direction);if(!Oe||Oe[0].level==0){var tt=Math.max(ke.ch,Ce.text.search(/\S/)),pt=ce.line==ke.line&&ce.ch<=tt&&ce.ch;return xn(ke.line,pt?0:tt,ke.sticky)}return ke}function Of(re,ce,ke){if(typeof ce=="string"&&(ce=cc[ce],!ce))return!1;re.display.input.ensurePolled();var Ce=re.display.shift,Oe=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),ke&&(re.display.shift=!1),Oe=ce(re)!=wt}finally{re.display.shift=Ce,re.state.suppressEdits=!1}return Oe}function Vp(re,ce,ke){for(var Ce=0;Ce<re.state.keyMaps.length;Ce++){var Oe=lo(ce,re.state.keyMaps[Ce],ke,re);if(Oe)return Oe}return re.options.extraKeys&&lo(ce,re.options.extraKeys,ke,re)||lo(ce,re.options.keyMap,ke,re)}var mh=new et;function Xc(re,ce,ke,Ce){var Oe=re.state.keySeq;if(Oe){if(Va(ce))return"handled";if(/\'$/.test(ce)?re.state.keySeq=null:mh.set(50,function(){re.state.keySeq==Oe&&(re.state.keySeq=null,re.display.input.reset())}),Zd(re,Oe+" "+ce,ke,Ce))return!0}return Zd(re,ce,ke,Ce)}function Zd(re,ce,ke,Ce){var Oe=Vp(re,ce,Ce);return Oe=="multi"&&(re.state.keySeq=ce),Oe=="handled"&&wr(re,"keyHandled",re,ce,ke),(Oe=="handled"||Oe=="multi")&&(fr(ke),Xo(re)),!!Oe}function Xd(re,ce){var ke=Es(ce,!0);return ke?ce.shiftKey&&!re.state.keySeq?Xc(re,"Shift-"+ke,ce,function(Ce){return Of(re,Ce,!0)})||Xc(re,ke,ce,function(Ce){if(typeof Ce=="string"?/^go[A-Z]/.test(Ce):Ce.motion)return Of(re,Ce)}):Xc(re,ke,ce,function(Ce){return Of(re,Ce)}):!1}function Yd(re,ce,ke){return Xc(re,"'"+ke+"'",ce,function(Ce){return Of(re,Ce,!0)})}var Yc=null;function Zp(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&(ce.curOp.focus=He(),!Wt(ce,re))){Re&&fe<11&&re.keyCode==27&&(re.returnValue=!1);var ke=re.keyCode;ce.display.shift=ke==16||re.shiftKey;var Ce=Xd(ce,re);we&&(Yc=Ce?ke:null,!Ce&&ke==88&&!Pn&&(oe?re.metaKey:re.ctrlKey)&&ce.replaceSelection("",null,"cut")),st&&!oe&&!Ce&&ke==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),ke==18&&!/\bCodeMirror-crosshair\b/.test(ce.display.lineDiv.className)&&Xp(ce)}}function Xp(re){var ce=re.display.lineDiv;We(ce,"CodeMirror-crosshair");function ke(Ce){(Ce.keyCode==18||!Ce.altKey)&&(De(ce,"CodeMirror-crosshair"),On(document,"keyup",ke),On(document,"mouseover",ke))}hn(document,"keyup",ke),hn(document,"mouseover",ke)}function Yp(re){re.keyCode==16&&(this.doc.sel.shift=!1),Wt(this,re)}function qu(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&!(hs(ce.display,re)||Wt(ce,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var ke=re.keyCode,Ce=re.charCode;if(we&&ke==Yc){Yc=null,fr(re);return}if(!(we&&(!re.which||re.which<10)&&Xd(ce,re))){var Oe=String.fromCharCode(Ce==null?ke:Ce);Oe!="\b"&&(Yd(ce,re,Oe)||ce.display.input.onKeyPress(re))}}}var om=400,$p=function(re,ce,ke){this.time=re,this.pos=ce,this.button=ke};$p.prototype.compare=function(re,ce,ke){return this.time+om>re&&gr(ce,this.pos)==0&&ke==this.button};var Ff,$c;function Jp(re,ce){var ke=+new Date;return $c&&$c.compare(ke,re,ce)?(Ff=$c=null,"triple"):Ff&&Ff.compare(ke,re,ce)?($c=new $p(ke,re,ce),Ff=null,"double"):(Ff=new $p(ke,re,ce),$c=null,"single")}function eh(re){var ce=this,ke=ce.display;if(!(Wt(ce,re)||ke.activeTouch&&ke.input.supportsTouch())){if(ke.input.ensurePolled(),ke.shift=re.shiftKey,hs(ke,re)){pe||(ke.scroller.draggable=!1,setTimeout(function(){return ke.scroller.draggable=!0},100));return}if(!Qd(ce,re)){var Ce=_s(ce,re),Oe=ki(re),tt=Ce?Jp(Ce,Oe):"single";window.focus(),Oe==1&&ce.state.selectingText&&ce.state.selectingText(re),!(Ce&&Qp(ce,Oe,Ce,tt,re))&&(Oe==1?Ce?am(ce,Ce,tt,re):ri(re)==ke.scroller&&fr(re):Oe==2?(Ce&&dh(ce.doc,Ce),setTimeout(function(){return ke.input.focus()},20)):Oe==3&&(xe?ce.display.input.onContextMenu(re):xa(ce)))}}}function Qp(re,ce,ke,Ce,Oe){var tt="Click";return Ce=="double"?tt="Double"+tt:Ce=="triple"&&(tt="Triple"+tt),tt=(ce==1?"Left":ce==2?"Middle":"Right")+tt,Xc(re,Ll(tt,Oe),Oe,function(pt){if(typeof pt=="string"&&(pt=cc[pt]),!pt)return!1;var Nt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Nt=pt(re,ke)!=wt}finally{re.state.suppressEdits=!1}return Nt})}function $d(re,ce,ke){var Ce=re.getOption("configureMouse"),Oe=Ce?Ce(re,ce,ke):{};if(Oe.unit==null){var tt=ie?ke.shiftKey&&ke.metaKey:ke.altKey;Oe.unit=tt?"rectangle":ce=="single"?"char":ce=="double"?"word":"line"}return(Oe.extend==null||re.doc.extend)&&(Oe.extend=re.doc.extend||ke.shiftKey),Oe.addNew==null&&(Oe.addNew=oe?ke.metaKey:ke.ctrlKey),Oe.moveOnDrag==null&&(Oe.moveOnDrag=!(oe?ke.altKey:ke.ctrlKey)),Oe}function am(re,ce,ke,Ce){Re?setTimeout(mt(oa,re),0):re.curOp.focus=He();var Oe=$d(re,ke,Ce),tt=re.doc.sel,pt;re.options.dragDrop&&ji&&!re.isReadOnly()&&ke=="single"&&(pt=tt.contains(ce))>-1&&(gr((pt=tt.ranges[pt]).from(),ce)<0||ce.xRel>0)&&(gr(pt.to(),ce)>0||ce.xRel<0)?qp(re,Ce,ce,Oe):n0(re,Ce,ce,Oe)}function qp(re,ce,ke,Ce){var Oe=re.display,tt=!1,pt=Qr(re,function(Rt){pe&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,On(Oe.wrapper.ownerDocument,"mouseup",pt),On(Oe.wrapper.ownerDocument,"mousemove",Nt),On(Oe.scroller,"dragstart",kt),On(Oe.scroller,"drop",pt),tt||(fr(Rt),Ce.addNew||dh(re.doc,ke,null,null,Ce.extend),pe&&!Te||Re&&fe==9?setTimeout(function(){Oe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Oe.input.focus()},20):Oe.input.focus())}),Nt=function(Rt){tt=tt||Math.abs(ce.clientX-Rt.clientX)+Math.abs(ce.clientY-Rt.clientY)>=10},kt=function(){return tt=!0};pe&&(Oe.scroller.draggable=!0),re.state.draggingText=pt,pt.copy=!Ce.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),hn(Oe.wrapper.ownerDocument,"mouseup",pt),hn(Oe.wrapper.ownerDocument,"mousemove",Nt),hn(Oe.scroller,"dragstart",kt),hn(Oe.scroller,"drop",pt),xa(re),setTimeout(function(){return Oe.input.focus()},20)}function eg(re,ce,ke){if(ke=="char")return new ui(ce,ce);if(ke=="word")return re.findWordAt(ce);if(ke=="line")return new ui(xn(ce.line,0),Ar(re.doc,xn(ce.line+1,0)));var Ce=ke(re,ce);return new ui(Ce.from,Ce.to)}function n0(re,ce,ke,Ce){var Oe=re.display,tt=re.doc;fr(ce);var pt,Nt,kt=tt.sel,Rt=kt.ranges;if(Ce.addNew&&!Ce.extend?(Nt=tt.sel.contains(ke),Nt>-1?pt=Rt[Nt]:pt=new ui(ke,ke)):(pt=tt.sel.primary(),Nt=tt.sel.primIndex),Ce.unit=="rectangle")Ce.addNew||(pt=new ui(ke,ke)),ke=_s(re,ce,!0,!0),Nt=-1;else{var rn=eg(re,ke,Ce.unit);Ce.extend?pt=Rh(pt,rn.anchor,rn.head,Ce.extend):pt=rn}Ce.addNew?Nt==-1?(Nt=Rt.length,sa(tt,Eo(re,Rt.concat([pt]),Nt),{scroll:!1,origin:"*mouse"})):Rt.length>1&&Rt[Nt].empty()&&Ce.unit=="char"&&!Ce.extend?(sa(tt,Eo(re,Rt.slice(0,Nt).concat(Rt.slice(Nt+1)),0),{scroll:!1,origin:"*mouse"}),kt=tt.sel):Au(tt,Nt,pt,dt):(Nt=0,sa(tt,new mo([pt],0),dt),kt=tt.sel);var zt=ke;function wn(Kr){if(gr(zt,Kr)!=0)if(zt=Kr,Ce.unit=="rectangle"){for(var si=[],Hi=re.options.tabSize,Ur=Xe(Tn(tt,ke.line).text,ke.ch,Hi),co=Xe(Tn(tt,Kr.line).text,Kr.ch,Hi),ka=Math.min(Ur,co),ms=Math.max(Ur,co),Ia=Math.min(ke.line,Kr.line),Al=Math.min(re.lastLine(),Math.max(ke.line,Kr.line));Ia<=Al;Ia++){var rl=Tn(tt,Ia).text,as=Pt(rl,ka,Hi);ka==ms?si.push(new ui(xn(Ia,as),xn(Ia,as))):rl.length>as&&si.push(new ui(xn(Ia,as),xn(Ia,Pt(rl,ms,Hi))))}si.length||si.push(new ui(ke,ke)),sa(tt,Eo(re,kt.ranges.slice(0,Nt).concat(si),Nt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Kr)}else{var Ul=pt,Gs=eg(re,Kr,Ce.unit),ss=Ul.anchor,Ko;gr(Gs.anchor,ss)>0?(Ko=Gs.head,ss=sr(Ul.from(),Gs.anchor)):(Ko=Gs.anchor,ss=zi(Ul.to(),Gs.head));var Ga=kt.ranges.slice(0);Ga[Nt]=sm(re,new ui(Ar(tt,ss),Ko)),sa(tt,Eo(re,Ga,Nt),dt)}}var yn=Oe.wrapper.getBoundingClientRect(),qn=0;function ir(Kr){var si=++qn,Hi=_s(re,Kr,!0,Ce.unit=="rectangle");if(Hi)if(gr(Hi,zt)!=0){re.curOp.focus=He(),wn(Hi);var Ur=po(Oe,tt);(Hi.line>=Ur.to||Hi.line<Ur.from)&&setTimeout(Qr(re,function(){qn==si&&ir(Kr)}),150)}else{var co=Kr.clientY<yn.top?-20:Kr.clientY>yn.bottom?20:0;co&&setTimeout(Qr(re,function(){qn==si&&(Oe.scroller.scrollTop+=co,ir(Kr))}),50)}}function vr(Kr){re.state.selectingText=!1,qn=1/0,Kr&&(fr(Kr),Oe.input.focus()),On(Oe.wrapper.ownerDocument,"mousemove",Dr),On(Oe.wrapper.ownerDocument,"mouseup",ti),tt.history.lastSelOrigin=null}var Dr=Qr(re,function(Kr){Kr.buttons===0||!ki(Kr)?vr(Kr):ir(Kr)}),ti=Qr(re,vr);re.state.selectingText=ti,hn(Oe.wrapper.ownerDocument,"mousemove",Dr),hn(Oe.wrapper.ownerDocument,"mouseup",ti)}function sm(re,ce){var ke=ce.anchor,Ce=ce.head,Oe=Tn(re.doc,ke.line);if(gr(ke,Ce)==0&&ke.sticky==Ce.sticky)return ce;var tt=an(Oe);if(!tt)return ce;var pt=jt(tt,ke.ch,ke.sticky),Nt=tt[pt];if(Nt.from!=ke.ch&&Nt.to!=ke.ch)return ce;var kt=pt+(Nt.from==ke.ch==(Nt.level!=1)?0:1);if(kt==0||kt==tt.length)return ce;var Rt;if(Ce.line!=ke.line)Rt=(Ce.line-ke.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var rn=jt(tt,Ce.ch,Ce.sticky),zt=rn-pt||(Ce.ch-ke.ch)*(Nt.level==1?-1:1);rn==kt-1||rn==kt?Rt=zt<0:Rt=zt>0}var wn=tt[kt+(Rt?-1:0)],yn=Rt==(wn.level==1),qn=yn?wn.from:wn.to,ir=yn?"after":"before";return ke.ch==qn&&ke.sticky==ir?ce:new ui(new xn(ke.line,qn,ir),Ce)}function Jd(re,ce,ke,Ce){var Oe,tt;if(ce.touches)Oe=ce.touches[0].clientX,tt=ce.touches[0].clientY;else try{Oe=ce.clientX,tt=ce.clientY}catch(wn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Ce&&fr(ce);var pt=re.display,Nt=pt.lineDiv.getBoundingClientRect();if(tt>Nt.bottom||!zn(re,ke))return lr(ce);tt-=Nt.top-pt.viewOffset;for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=pt.gutters.childNodes[kt];if(Rt&&Rt.getBoundingClientRect().right>=Oe){var rn=cr(re.doc,tt),zt=re.display.gutterSpecs[kt];return fn(re,ke,re,rn,zt.className,ce),lr(ce)}}}function Qd(re,ce){return Jd(re,ce,"gutterClick",!0)}function qd(re,ce){hs(re.display,ce)||lm(re,ce)||Wt(re,ce,"contextmenu")||xe||re.display.input.onContextMenu(ce)}function lm(re,ce){return zn(re,"gutterContextMenu")?Jd(re,ce,"gutterContextMenu",!1):!1}function ep(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jh(re)}var fc={toString:function(){return"CodeMirror.Init"}},tg={},gd={};function um(re){var ce=re.optionHandlers;function ke(Ce,Oe,tt,pt){re.defaults[Ce]=Oe,tt&&(ce[Ce]=pt?function(Nt,kt,Rt){Rt!=fc&&tt(Nt,kt,Rt)}:tt)}re.defineOption=ke,re.Init=fc,ke("value","",function(Ce,Oe){return Ce.setValue(Oe)},!0),ke("mode",null,function(Ce,Oe){Ce.doc.modeOption=Oe,Ti(Ce)},!0),ke("indentUnit",2,Ti,!0),ke("indentWithTabs",!1),ke("smartIndent",!0),ke("tabSize",4,function(Ce){el(Ce),jh(Ce),ua(Ce)},!0),ke("lineSeparator",null,function(Ce,Oe){if(Ce.doc.lineSep=Oe,!!Oe){var tt=[],pt=Ce.doc.first;Ce.doc.iter(function(kt){for(var Rt=0;;){var rn=kt.text.indexOf(Oe,Rt);if(rn==-1)break;Rt=rn+Oe.length,tt.push(xn(pt,rn))}pt++});for(var Nt=tt.length-1;Nt>=0;Nt--)Ou(Ce.doc,Oe,tt[Nt],xn(tt[Nt].line,tt[Nt].ch+Oe.length))}}),ke("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Ce,Oe,tt){Ce.state.specialChars=new RegExp(Oe.source+(Oe.test(" ")?"":"| "),"g"),tt!=fc&&Ce.refresh()}),ke("specialCharPlaceholder",Da,function(Ce){return Ce.refresh()},!0),ke("electricChars",!0),ke("inputStyle",z?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ke("spellcheck",!1,function(Ce,Oe){return Ce.getInputField().spellcheck=Oe},!0),ke("autocorrect",!1,function(Ce,Oe){return Ce.getInputField().autocorrect=Oe},!0),ke("autocapitalize",!1,function(Ce,Oe){return Ce.getInputField().autocapitalize=Oe},!0),ke("rtlMoveVisually",!le),ke("wholeLineUpdateBefore",!0),ke("theme","default",function(Ce){ep(Ce),aa(Ce)},!0),ke("keyMap","default",function(Ce,Oe,tt){var pt=nu(Oe),Nt=tt!=fc&&nu(tt);Nt&&Nt.detach&&Nt.detach(Ce,pt),pt.attach&&pt.attach(Ce,Nt||null)}),ke("extraKeys",null),ke("configureMouse",null),ke("lineWrapping",!1,hm,!0),ke("gutters",[],function(Ce,Oe){Ce.display.gutterSpecs=Ro(Oe,Ce.options.lineNumbers),aa(Ce)},!0),ke("fixedGutter",!0,function(Ce,Oe){Ce.display.gutters.style.left=Oe?Fh(Ce.display)+"px":"0",Ce.refresh()},!0),ke("coverGutterNextToScrollbar",!1,function(Ce){return En(Ce)},!0),ke("scrollbarStyle","native",function(Ce){tr(Ce),En(Ce),Ce.display.scrollbars.setScrollTop(Ce.doc.scrollTop),Ce.display.scrollbars.setScrollLeft(Ce.doc.scrollLeft)},!0),ke("lineNumbers",!1,function(Ce,Oe){Ce.display.gutterSpecs=Ro(Ce.options.gutters,Oe),aa(Ce)},!0),ke("firstLineNumber",1,aa,!0),ke("lineNumberFormatter",function(Ce){return Ce},aa,!0),ke("showCursorWhenSelecting",!1,Ya,!0),ke("resetSelectionOnContextMenu",!0),ke("lineWiseCopyCut",!0),ke("pasteLinesPerSelection",!0),ke("selectionsMayTouch",!1),ke("readOnly",!1,function(Ce,Oe){Oe=="nocursor"&&(Dh(Ce),Ce.display.input.blur()),Ce.display.input.readOnlyChanged(Oe)}),ke("screenReaderLabel",null,function(Ce,Oe){Oe=Oe===""?null:Oe,Ce.display.input.screenReaderLabelChanged(Oe)}),ke("disableInput",!1,function(Ce,Oe){Oe||Ce.display.input.reset()},!0),ke("dragDrop",!0,tp),ke("allowDropFileTypes",null),ke("cursorBlinkRate",530),ke("cursorScrollMargin",0),ke("cursorHeight",1,Ya,!0),ke("singleCursorHeightPerLine",!0,Ya,!0),ke("workTime",100),ke("workDelay",100),ke("flattenSpans",!0,el,!0),ke("addModeClass",!1,el,!0),ke("pollInterval",100),ke("undoDepth",200,function(Ce,Oe){return Ce.doc.history.undoDepth=Oe}),ke("historyEventDelay",1250),ke("viewportMargin",10,function(Ce){return Ce.refresh()},!0),ke("maxHighlightLength",1e4,el,!0),ke("moveInputWithCursor",!0,function(Ce,Oe){Oe||Ce.display.input.resetPosition()}),ke("tabindex",null,function(Ce,Oe){return Ce.display.input.getField().tabIndex=Oe||""}),ke("autofocus",null),ke("direction","ltr",function(Ce,Oe){return Ce.doc.setDirection(Oe)},!0),ke("phrases",null)}function tp(re,ce,ke){var Ce=ke&&ke!=fc;if(!ce!=!Ce){var Oe=re.display.dragFunctions,tt=ce?hn:On;tt(re.display.scroller,"dragstart",Oe.start),tt(re.display.scroller,"dragenter",Oe.enter),tt(re.display.scroller,"dragover",Oe.over),tt(re.display.scroller,"dragleave",Oe.leave),tt(re.display.scroller,"drop",Oe.drop)}}function hm(re){re.options.lineWrapping?(We(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(De(re.display.wrapper,"CodeMirror-wrap"),qi(re)),ci(re),ua(re),jh(re),setTimeout(function(){return En(re)},100)}function Uo(re,ce){var ke=this;if(!(this instanceof Uo))return new Uo(re,ce);this.options=ce=ce?Lt(ce):{},Lt(tg,ce,!1);var Ce=ce.value;typeof Ce=="string"?Ce=new ps(Ce,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(Ce.modeOption=ce.mode),this.doc=Ce;var Oe=new Uo.inputStyles[ce.inputStyle](this),tt=this.display=new $a(re,Ce,Oe,ce);tt.wrapper.CodeMirror=this,ep(this),ce.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),tr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new et,keySeq:null,specialChars:null},ce.autofocus&&!z&&tt.input.focus(),Re&&fe<11&&setTimeout(function(){return ke.display.input.reset(!0)},20),Df(this),gl(),$n(this),this.curOp.forceUpdate=!0,Ba(this,Ce),ce.autofocus&&!z||this.hasFocus()?setTimeout(function(){ke.hasFocus()&&!ke.state.focused&&jo(ke)},20):Dh(this);for(var pt in gd)gd.hasOwnProperty(pt)&&gd[pt](this,ce[pt],fc);Ui(this),ce.finishInit&&ce.finishInit(this);for(var Nt=0;Nt<Jc.length;++Nt)Jc[Nt](this);Vn(this),pe&&ce.lineWrapping&&getComputedStyle(tt.lineDiv).textRendering=="optimizelegibility"&&(tt.lineDiv.style.textRendering="auto")}Uo.defaults=tg,Uo.optionHandlers=gd;function Df(re){var ce=re.display;hn(ce.scroller,"mousedown",Qr(re,eh)),Re&&fe<11?hn(ce.scroller,"dblclick",Qr(re,function(kt){if(!Wt(re,kt)){var Rt=_s(re,kt);if(!(!Rt||Qd(re,kt)||hs(re.display,kt))){fr(kt);var rn=re.findWordAt(Rt);dh(re.doc,rn.anchor,rn.head)}}})):hn(ce.scroller,"dblclick",function(kt){return Wt(re,kt)||fr(kt)}),hn(ce.scroller,"contextmenu",function(kt){return qd(re,kt)}),hn(ce.input.getField(),"contextmenu",function(kt){ce.scroller.contains(kt.target)||qd(re,kt)});var ke,Ce={end:0};function Oe(){ce.activeTouch&&(ke=setTimeout(function(){return ce.activeTouch=null},1e3),Ce=ce.activeTouch,Ce.end=+new Date)}function tt(kt){if(kt.touches.length!=1)return!1;var Rt=kt.touches[0];return Rt.radiusX<=1&&Rt.radiusY<=1}function pt(kt,Rt){if(Rt.left==null)return!0;var rn=Rt.left-kt.left,zt=Rt.top-kt.top;return rn*rn+zt*zt>20*20}hn(ce.scroller,"touchstart",function(kt){if(!Wt(re,kt)&&!tt(kt)&&!Qd(re,kt)){ce.input.ensurePolled(),clearTimeout(ke);var Rt=+new Date;ce.activeTouch={start:Rt,moved:!1,prev:Rt-Ce.end<=300?Ce:null},kt.touches.length==1&&(ce.activeTouch.left=kt.touches[0].pageX,ce.activeTouch.top=kt.touches[0].pageY)}}),hn(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),hn(ce.scroller,"touchend",function(kt){var Rt=ce.activeTouch;if(Rt&&!hs(ce,kt)&&Rt.left!=null&&!Rt.moved&&new Date-Rt.start<300){var rn=re.coordsChar(ce.activeTouch,"page"),zt;!Rt.prev||pt(Rt,Rt.prev)?zt=new ui(rn,rn):!Rt.prev.prev||pt(Rt,Rt.prev.prev)?zt=re.findWordAt(rn):zt=new ui(xn(rn.line,0),Ar(re.doc,xn(rn.line+1,0))),re.setSelection(zt.anchor,zt.head),re.focus(),fr(kt)}Oe()}),hn(ce.scroller,"touchcancel",Oe),hn(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(Bt(re,ce.scroller.scrollTop),Ut(re,ce.scroller.scrollLeft,!0),fn(re,"scroll",re))}),hn(ce.scroller,"mousewheel",function(kt){return Bo(re,kt)}),hn(ce.scroller,"DOMMouseScroll",function(kt){return Bo(re,kt)}),hn(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(kt){Wt(re,kt)||ni(kt)},over:function(kt){Wt(re,kt)||(Tf(re,kt),ni(kt))},start:function(kt){return Vc(re,kt)},drop:Qr(re,Mf),leave:function(kt){Wt(re,kt)||Lf(re)}};var Nt=ce.input.getField();hn(Nt,"keyup",function(kt){return Yp.call(re,kt)}),hn(Nt,"keydown",Qr(re,Zp)),hn(Nt,"keypress",Qr(re,qu)),hn(Nt,"focus",function(kt){return jo(re,kt)}),hn(Nt,"blur",function(kt){return Dh(re,kt)})}var Jc=[];Uo.defineInitHook=function(re){return Jc.push(re)};function gs(re,ce,ke,Ce){var Oe=re.doc,tt;ke==null&&(ke="add"),ke=="smart"&&(Oe.mode.indent?tt=zo(re,ce).state:ke="prev");var pt=re.options.tabSize,Nt=Tn(Oe,ce),kt=Xe(Nt.text,null,pt);Nt.stateAfter&&(Nt.stateAfter=null);var Rt=Nt.text.match(/^\s*/)[0],rn;if(!Ce&&!/\S/.test(Nt.text))rn=0,ke="not";else if(ke=="smart"&&(rn=Oe.mode.indent(tt,Nt.text.slice(Rt.length),Nt.text),rn==wt||rn>150)){if(!Ce)return;ke="prev"}ke=="prev"?ce>Oe.first?rn=Xe(Tn(Oe,ce-1).text,null,pt):rn=0:ke=="add"?rn=kt+re.options.indentUnit:ke=="subtract"?rn=kt-re.options.indentUnit:typeof ke=="number"&&(rn=kt+ke),rn=Math.max(0,rn);var zt="",wn=0;if(re.options.indentWithTabs)for(var yn=Math.floor(rn/pt);yn;--yn)wn+=pt,zt+=" ";if(wn<rn&&(zt+=gt(rn-wn)),zt!=Rt)return Ou(Oe,zt,xn(ce,0),xn(ce,Rt.length),"+input"),Nt.stateAfter=null,!0;for(var qn=0;qn<Oe.sel.ranges.length;qn++){var ir=Oe.sel.ranges[qn];if(ir.head.line==ce&&ir.head.ch<Rt.length){var vr=xn(ce,Rt.length);Au(Oe,qn,new ui(vr,vr));break}}}var Nl=null;function Qc(re){Nl=re}function md(re,ce,ke,Ce,Oe){var tt=re.doc;re.display.shift=!1,Ce||(Ce=tt.sel);var pt=+new Date-200,Nt=Oe=="paste"||re.state.pasteIncoming>pt,kt=Nn(ce),Rt=null;if(Nt&&Ce.ranges.length>1)if(Nl&&Nl.text.join(`
|
|
`)==ce){if(Ce.ranges.length%Nl.text.length==0){Rt=[];for(var rn=0;rn<Nl.text.length;rn++)Rt.push(tt.splitLines(Nl.text[rn]))}}else kt.length==Ce.ranges.length&&re.options.pasteLinesPerSelection&&(Rt=ct(kt,function(Dr){return[Dr]}));for(var zt=re.curOp.updateInput,wn=Ce.ranges.length-1;wn>=0;wn--){var yn=Ce.ranges[wn],qn=yn.from(),ir=yn.to();yn.empty()&&(ke&&ke>0?qn=xn(qn.line,qn.ch-ke):re.state.overwrite&&!Nt?ir=xn(ir.line,Math.min(Tn(tt,ir.line).text.length,ir.ch+Tt(kt).length)):Nt&&Nl&&Nl.lineWise&&Nl.text.join(`
|
|
`)==kt.join(`
|
|
`)&&(qn=ir=xn(qn.line,0)));var vr={from:qn,to:ir,text:Rt?Rt[wn%Rt.length]:kt,origin:Oe||(Nt?"paste":re.state.cutIncoming>pt?"cut":"+input")};pu(re.doc,vr),wr(re,"inputRead",re,vr)}ce&&!Nt&&rg(re,ce),Xu(re),re.curOp.updateInput<2&&(re.curOp.updateInput=zt),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function ng(re,ce){var ke=re.clipboardData&&re.clipboardData.getData("Text");if(ke)return re.preventDefault(),!ce.isReadOnly()&&!ce.options.disableInput&&kr(ce,function(){return md(ce,ke,0,null,"paste")}),!0}function rg(re,ce){if(!(!re.options.electricChars||!re.options.smartIndent))for(var ke=re.doc.sel,Ce=ke.ranges.length-1;Ce>=0;Ce--){var Oe=ke.ranges[Ce];if(!(Oe.head.ch>100||Ce&&ke.ranges[Ce-1].head.line==Oe.head.line)){var tt=re.getModeAt(Oe.head),pt=!1;if(tt.electricChars){for(var Nt=0;Nt<tt.electricChars.length;Nt++)if(ce.indexOf(tt.electricChars.charAt(Nt))>-1){pt=gs(re,Oe.head.line,"smart");break}}else tt.electricInput&&tt.electricInput.test(Tn(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(pt=gs(re,Oe.head.line,"smart"));pt&&wr(re,"electricInput",re,Oe.head.line)}}}function ig(re){for(var ce=[],ke=[],Ce=0;Ce<re.doc.sel.ranges.length;Ce++){var Oe=re.doc.sel.ranges[Ce].head.line,tt={anchor:xn(Oe,0),head:xn(Oe+1,0)};ke.push(tt),ce.push(re.getRange(tt.anchor,tt.head))}return{text:ce,ranges:ke}}function og(re,ce,ke,Ce){re.setAttribute("autocorrect",ke?"":"off"),re.setAttribute("autocapitalize",Ce?"":"off"),re.setAttribute("spellcheck",!!ce)}function ag(){var re=Le("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ce=Le("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return pe?re.style.width="1000px":re.setAttribute("wrap","off"),de&&(re.style.border="1px solid black"),og(re),ce}function dc(re){var ce=re.optionHandlers,ke=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(Ce,Oe){var tt=this.options,pt=tt[Ce];tt[Ce]==Oe&&Ce!="mode"||(tt[Ce]=Oe,ce.hasOwnProperty(Ce)&&Qr(this,ce[Ce])(this,Oe,pt),fn(this,"optionChange",this,Ce))},getOption:function(Ce){return this.options[Ce]},getDoc:function(){return this.doc},addKeyMap:function(Ce,Oe){this.state.keyMaps[Oe?"push":"unshift"](nu(Ce))},removeKeyMap:function(Ce){for(var Oe=this.state.keyMaps,tt=0;tt<Oe.length;++tt)if(Oe[tt]==Ce||Oe[tt].name==Ce)return Oe.splice(tt,1),!0},addOverlay:bi(function(Ce,Oe){var tt=Ce.token?Ce:re.getMode(this.options,Ce);if(tt.startState)throw new Error("Overlays may not be stateful.");Ye(this.state.overlays,{mode:tt,modeSpec:Ce,opaque:Oe&&Oe.opaque,priority:Oe&&Oe.priority||0},function(pt){return pt.priority}),this.state.modeGen++,ua(this)}),removeOverlay:bi(function(Ce){for(var Oe=this.state.overlays,tt=0;tt<Oe.length;++tt){var pt=Oe[tt].modeSpec;if(pt==Ce||typeof Ce=="string"&&pt.name==Ce){Oe.splice(tt,1),this.state.modeGen++,ua(this);return}}}),indentLine:bi(function(Ce,Oe,tt){typeof Oe!="string"&&typeof Oe!="number"&&(Oe==null?Oe=this.options.smartIndent?"smart":"prev":Oe=Oe?"add":"subtract"),yr(this.doc,Ce)&&gs(this,Ce,Oe,tt)}),indentSelection:bi(function(Ce){for(var Oe=this.doc.sel.ranges,tt=-1,pt=0;pt<Oe.length;pt++){var Nt=Oe[pt];if(Nt.empty())Nt.head.line>tt&&(gs(this,Nt.head.line,Ce,!0),tt=Nt.head.line,pt==this.doc.sel.primIndex&&Xu(this));else{var kt=Nt.from(),Rt=Nt.to(),rn=Math.max(tt,kt.line);tt=Math.min(this.lastLine(),Rt.line-(Rt.ch?0:1))+1;for(var zt=rn;zt<tt;++zt)gs(this,zt,Ce);var wn=this.doc.sel.ranges;kt.ch==0&&Oe.length==wn.length&&wn[pt].from().ch>0&&Au(this.doc,pt,new ui(kt,wn[pt].to()),ht)}}}),getTokenAt:function(Ce,Oe){return Po(this,Ce,Oe)},getLineTokens:function(Ce,Oe){return Po(this,xn(Ce),Oe,!0)},getTokenTypeAt:function(Ce){Ce=Ar(this.doc,Ce);var Oe=Ho(this,Tn(this.doc,Ce.line)),tt=0,pt=(Oe.length-1)/2,Nt=Ce.ch,kt;if(Nt==0)kt=Oe[2];else for(;;){var Rt=tt+pt>>1;if((Rt?Oe[Rt*2-1]:0)>=Nt)pt=Rt;else if(Oe[Rt*2+1]<Nt)tt=Rt+1;else{kt=Oe[Rt*2+2];break}}var rn=kt?kt.indexOf("overlay "):-1;return rn<0?kt:rn==0?null:kt.slice(0,rn-1)},getModeAt:function(Ce){var Oe=this.doc.mode;return Oe.innerMode?re.innerMode(Oe,this.getTokenAt(Ce).state).mode:Oe},getHelper:function(Ce,Oe){return this.getHelpers(Ce,Oe)[0]},getHelpers:function(Ce,Oe){var tt=[];if(!ke.hasOwnProperty(Oe))return tt;var pt=ke[Oe],Nt=this.getModeAt(Ce);if(typeof Nt[Oe]=="string")pt[Nt[Oe]]&&tt.push(pt[Nt[Oe]]);else if(Nt[Oe])for(var kt=0;kt<Nt[Oe].length;kt++){var Rt=pt[Nt[Oe][kt]];Rt&&tt.push(Rt)}else Nt.helperType&&pt[Nt.helperType]?tt.push(pt[Nt.helperType]):pt[Nt.name]&&tt.push(pt[Nt.name]);for(var rn=0;rn<pt._global.length;rn++){var zt=pt._global[rn];zt.pred(Nt,this)&<(tt,zt.val)==-1&&tt.push(zt.val)}return tt},getStateAfter:function(Ce,Oe){var tt=this.doc;return Ce=dr(tt,Ce==null?tt.first+tt.size-1:Ce),zo(this,Ce+1,Oe).state},cursorCoords:function(Ce,Oe){var tt,pt=this.doc.sel.primary();return Ce==null?tt=pt.head:typeof Ce=="object"?tt=Ar(this.doc,Ce):tt=Ce?pt.from():pt.to(),Ea(this,tt,Oe||"page")},charCoords:function(Ce,Oe){return El(this,Ar(this.doc,Ce),Oe||"page")},coordsChar:function(Ce,Oe){return Ce=zc(this,Ce,Oe||"page"),Cf(this,Ce.left,Ce.top)},lineAtHeight:function(Ce,Oe){return Ce=zc(this,{top:Ce,left:0},Oe||"page").top,cr(this.doc,Ce+this.display.viewOffset)},heightAtLine:function(Ce,Oe,tt){var pt=!1,Nt;if(typeof Ce=="number"){var kt=this.doc.first+this.doc.size-1;Ce<this.doc.first?Ce=this.doc.first:Ce>kt&&(Ce=kt,pt=!0),Nt=Tn(this.doc,Ce)}else Nt=Ce;return ns(this,Nt,{top:0,left:0},Oe||"page",tt||pt).top+(pt?this.doc.height-pi(Nt):0)},defaultTextHeight:function(){return Mu(this.display)},defaultCharWidth:function(){return Oh(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(Ce,Oe,tt,pt,Nt){var kt=this.display;Ce=Ea(this,Ar(this.doc,Ce));var Rt=Ce.bottom,rn=Ce.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),kt.sizer.appendChild(Oe),pt=="over")Rt=Ce.top;else if(pt=="above"||pt=="near"){var zt=Math.max(kt.wrapper.clientHeight,this.doc.height),wn=Math.max(kt.sizer.clientWidth,kt.lineSpace.clientWidth);(pt=="above"||Ce.bottom+Oe.offsetHeight>zt)&&Ce.top>Oe.offsetHeight?Rt=Ce.top-Oe.offsetHeight:Ce.bottom+Oe.offsetHeight<=zt&&(Rt=Ce.bottom),rn+Oe.offsetWidth>wn&&(rn=wn-Oe.offsetWidth)}Oe.style.top=Rt+"px",Oe.style.left=Oe.style.right="",Nt=="right"?(rn=kt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Nt=="left"?rn=0:Nt=="middle"&&(rn=(kt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=rn+"px"),tt&&Wc(this,{left:rn,top:Rt,right:rn+Oe.offsetWidth,bottom:Rt+Oe.offsetHeight})},triggerOnKeyDown:bi(Zp),triggerOnKeyPress:bi(qu),triggerOnKeyUp:Yp,triggerOnMouseDown:bi(eh),execCommand:function(Ce){if(cc.hasOwnProperty(Ce))return cc[Ce].call(null,this)},triggerElectric:bi(function(Ce){rg(this,Ce)}),findPosH:function(Ce,Oe,tt,pt){var Nt=1;Oe<0&&(Nt=-1,Oe=-Oe);for(var kt=Ar(this.doc,Ce),Rt=0;Rt<Oe&&(kt=vd(this.doc,kt,Nt,tt,pt),!kt.hitSide);++Rt);return kt},moveH:bi(function(Ce,Oe){var tt=this;this.extendSelectionsBy(function(pt){return tt.display.shift||tt.doc.extend||pt.empty()?vd(tt.doc,pt.head,Ce,Oe,tt.options.rtlMoveVisually):Ce<0?pt.from():pt.to()},ut)}),deleteH:bi(function(Ce,Oe){var tt=this.doc.sel,pt=this.doc;tt.somethingSelected()?pt.replaceSelection("",null,"+delete"):es(this,function(Nt){var kt=vd(pt,Nt.head,Ce,Oe,!1);return Ce<0?{from:kt,to:Nt.head}:{from:Nt.head,to:kt}})}),findPosV:function(Ce,Oe,tt,pt){var Nt=1,kt=pt;Oe<0&&(Nt=-1,Oe=-Oe);for(var Rt=Ar(this.doc,Ce),rn=0;rn<Oe;++rn){var zt=Ea(this,Rt,"div");if(kt==null?kt=zt.left:zt.left=kt,Rt=pc(this,zt,Nt,tt),Rt.hitSide)break}return Rt},moveV:bi(function(Ce,Oe){var tt=this,pt=this.doc,Nt=[],kt=!this.display.shift&&!pt.extend&&pt.sel.somethingSelected();if(pt.extendSelectionsBy(function(rn){if(kt)return Ce<0?rn.from():rn.to();var zt=Ea(tt,rn.head,"div");rn.goalColumn!=null&&(zt.left=rn.goalColumn),Nt.push(zt.left);var wn=pc(tt,zt,Ce,Oe);return Oe=="page"&&rn==pt.sel.primary()&&Ef(tt,El(tt,wn,"div").top-zt.top),wn},ut),Nt.length)for(var Rt=0;Rt<pt.sel.ranges.length;Rt++)pt.sel.ranges[Rt].goalColumn=Nt[Rt]}),findWordAt:function(Ce){var Oe=this.doc,tt=Tn(Oe,Ce.line).text,pt=Ce.ch,Nt=Ce.ch;if(tt){var kt=this.getHelper(Ce,"wordChars");(Ce.sticky=="before"||Nt==tt.length)&&pt?--pt:++Nt;for(var Rt=tt.charAt(pt),rn=nt(Rt,kt)?function(zt){return nt(zt,kt)}:/\s/.test(Rt)?function(zt){return/\s/.test(zt)}:function(zt){return!/\s/.test(zt)&&!nt(zt)};pt>0&&rn(tt.charAt(pt-1));)--pt;for(;Nt<tt.length&&rn(tt.charAt(Nt));)++Nt}return new ui(xn(Ce.line,pt),xn(Ce.line,Nt))},toggleOverwrite:function(Ce){Ce!=null&&Ce==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?We(this.display.cursorDiv,"CodeMirror-overwrite"):De(this.display.cursorDiv,"CodeMirror-overwrite"),fn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==He()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:bi(function(Ce,Oe){hh(this,Ce,Oe)}),getScrollInfo:function(){var Ce=this.display.scroller;return{left:Ce.scrollLeft,top:Ce.scrollTop,height:Ce.scrollHeight-Is(this)-this.display.barHeight,width:Ce.scrollWidth-Is(this)-this.display.barWidth,clientHeight:Rc(this),clientWidth:Jl(this)}},scrollIntoView:bi(function(Ce,Oe){Ce==null?(Ce={from:this.doc.sel.primary().head,to:null},Oe==null&&(Oe=this.options.cursorScrollMargin)):typeof Ce=="number"?Ce={from:xn(Ce,0),to:null}:Ce.from==null&&(Ce={from:Ce,to:null}),Ce.to||(Ce.to=Ce.from),Ce.margin=Oe||0,Ce.from.line!=null?Oo(this,Ce):bt(this,Ce.from,Ce.to,Ce.margin)}),setSize:bi(function(Ce,Oe){var tt=this,pt=function(kt){return typeof kt=="number"||/^\d+$/.test(String(kt))?kt+"px":kt};Ce!=null&&(this.display.wrapper.style.width=pt(Ce)),Oe!=null&&(this.display.wrapper.style.height=pt(Oe)),this.options.lineWrapping&&_c(this);var Nt=this.display.viewFrom;this.doc.iter(Nt,this.display.viewTo,function(kt){if(kt.widgets){for(var Rt=0;Rt<kt.widgets.length;Rt++)if(kt.widgets[Rt].noHScroll){eo(tt,Nt,"widget");break}}++Nt}),this.curOp.forceUpdate=!0,fn(this,"refresh",this)}),operation:function(Ce){return kr(this,Ce)},startOperation:function(){return $n(this)},endOperation:function(){return Vn(this)},refresh:bi(function(){var Ce=this.display.cachedTextHeight;ua(this),this.curOp.forceUpdate=!0,jh(this),hh(this,this.doc.scrollLeft,this.doc.scrollTop),Oi(this.display),(Ce==null||Math.abs(Ce-Mu(this.display))>.5||this.options.lineWrapping)&&ci(this),fn(this,"refresh",this)}),swapDoc:bi(function(Ce){var Oe=this.doc;return Oe.cm=null,this.state.selectingText&&this.state.selectingText(),Ba(this,Ce),jh(this),this.display.input.reset(),hh(this,Ce.scrollLeft,Ce.scrollTop),this.curOp.forceScroll=!0,wr(this,"swapDoc",this,Oe),Oe}),phrase:function(Ce){var Oe=this.options.phrases;return Oe&&Object.prototype.hasOwnProperty.call(Oe,Ce)?Oe[Ce]:Ce},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Yn(re),re.registerHelper=function(Ce,Oe,tt){ke.hasOwnProperty(Ce)||(ke[Ce]=re[Ce]={_global:[]}),ke[Ce][Oe]=tt},re.registerGlobalHelper=function(Ce,Oe,tt,pt){re.registerHelper(Ce,Oe,pt),ke[Ce]._global.push({pred:tt,val:pt})}}function vd(re,ce,ke,Ce,Oe){var tt=ce,pt=ke,Nt=Tn(re,ce.line),kt=Oe&&re.direction=="rtl"?-ke:ke;function Rt(){var ti=ce.line+kt;return ti<re.first||ti>=re.first+re.size?!1:(ce=new xn(ti,ce.ch,ce.sticky),Nt=Tn(re,ti))}function rn(ti){var Kr;if(Ce=="codepoint"){var si=Nt.text.charCodeAt(ce.ch+(Ce>0?0:-1));isNaN(si)?Kr=null:Kr=new xn(ce.line,Math.max(0,Math.min(Nt.text.length,ce.ch+ke*(si>=55296&&si<56320?2:1))),-ke)}else Oe?Kr=Vd(re.cm,Nt,ce,ke):Kr=Pa(Nt,ce,ke);if(Kr==null)if(!ti&&Rt())ce=Wh(Oe,re.cm,Nt,ce.line,kt);else return!1;else ce=Kr;return!0}if(Ce=="char"||Ce=="codepoint")rn();else if(Ce=="column")rn(!0);else if(Ce=="word"||Ce=="group")for(var zt=null,wn=Ce=="group",yn=re.cm&&re.cm.getHelper(ce,"wordChars"),qn=!0;!(ke<0&&!rn(!qn));qn=!1){var ir=Nt.text.charAt(ce.ch)||`
|
|
`,vr=nt(ir,yn)?"w":wn&&ir==`
|
|
`?"n":!wn||/\s/.test(ir)?null:"p";if(wn&&!qn&&!vr&&(vr="s"),zt&&zt!=vr){ke<0&&(ke=1,rn(),ce.sticky="after");break}if(vr&&(zt=vr),ke>0&&!rn(!qn))break}var Dr=Bh(re,ce,tt,pt,!0);return hi(tt,Dr)&&(Dr.hitSide=!0),Dr}function pc(re,ce,ke,Ce){var Oe=re.doc,tt=ce.left,pt;if(Ce=="page"){var Nt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),kt=Math.max(Nt-.5*Mu(re.display),3);pt=(ke>0?ce.bottom:ce.top)+ke*kt}else Ce=="line"&&(pt=ke>0?ce.bottom+3:ce.top-3);for(var Rt;Rt=Cf(re,tt,pt),!!Rt.outside;){if(ke<0?pt<=0:pt>=Oe.height){Rt.hitSide=!0;break}pt+=ke*5}return Rt}var ha=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new et,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ha.prototype.init=function(re){var ce=this,ke=this,Ce=ke.cm,Oe=ke.div=re.lineDiv;og(Oe,Ce.options.spellcheck,Ce.options.autocorrect,Ce.options.autocapitalize);function tt(Nt){for(var kt=Nt.target;kt;kt=kt.parentNode){if(kt==Oe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(kt.className))break}return!1}hn(Oe,"paste",function(Nt){!tt(Nt)||Wt(Ce,Nt)||ng(Nt,Ce)||fe<=11&&setTimeout(Qr(Ce,function(){return ce.updateFromDOM()}),20)}),hn(Oe,"compositionstart",function(Nt){ce.composing={data:Nt.data,done:!1}}),hn(Oe,"compositionupdate",function(Nt){ce.composing||(ce.composing={data:Nt.data,done:!1})}),hn(Oe,"compositionend",function(Nt){ce.composing&&(Nt.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),hn(Oe,"touchstart",function(){return ke.forceCompositionEnd()}),hn(Oe,"input",function(){ce.composing||ce.readFromDOMSoon()});function pt(Nt){if(!(!tt(Nt)||Wt(Ce,Nt))){if(Ce.somethingSelected())Qc({lineWise:!1,text:Ce.getSelections()}),Nt.type=="cut"&&Ce.replaceSelection("",null,"cut");else if(Ce.options.lineWiseCopyCut){var kt=ig(Ce);Qc({lineWise:!0,text:kt.text}),Nt.type=="cut"&&Ce.operation(function(){Ce.setSelections(kt.ranges,0,ht),Ce.replaceSelection("",null,"cut")})}else return;if(Nt.clipboardData){Nt.clipboardData.clearData();var Rt=Nl.text.join(`
|
|
`);if(Nt.clipboardData.setData("Text",Rt),Nt.clipboardData.getData("Text")==Rt){Nt.preventDefault();return}}var rn=ag(),zt=rn.firstChild;Ce.display.lineSpace.insertBefore(rn,Ce.display.lineSpace.firstChild),zt.value=Nl.text.join(`
|
|
`);var wn=document.activeElement;ft(zt),setTimeout(function(){Ce.display.lineSpace.removeChild(rn),wn.focus(),wn==Oe&&ke.showPrimarySelection()},50)}}hn(Oe,"copy",pt),hn(Oe,"cut",pt)},ha.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},ha.prototype.prepareSelection=function(){var re=Zu(this.cm,!1);return re.focus=document.activeElement==this.div,re},ha.prototype.showSelection=function(re,ce){!re||!this.cm.display.view.length||((re.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(re))},ha.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ha.prototype.showPrimarySelection=function(){var re=this.getSelection(),ce=this.cm,ke=ce.doc.sel.primary(),Ce=ke.from(),Oe=ke.to();if(ce.display.viewTo==ce.display.viewFrom||Ce.line>=ce.display.viewTo||Oe.line<ce.display.viewFrom){re.removeAllRanges();return}var tt=yd(ce,re.anchorNode,re.anchorOffset),pt=yd(ce,re.focusNode,re.focusOffset);if(!(tt&&!tt.bad&&pt&&!pt.bad&&gr(sr(tt,pt),Ce)==0&&gr(zi(tt,pt),Oe)==0)){var Nt=ce.display.view,kt=Ce.line>=ce.display.viewFrom&&np(ce,Ce)||{node:Nt[0].measure.map[2],offset:0},Rt=Oe.line<ce.display.viewTo&&np(ce,Oe);if(!Rt){var rn=Nt[Nt.length-1].measure,zt=rn.maps?rn.maps[rn.maps.length-1]:rn.map;Rt={node:zt[zt.length-1],offset:zt[zt.length-2]-zt[zt.length-3]}}if(!kt||!Rt){re.removeAllRanges();return}var wn=re.rangeCount&&re.getRangeAt(0),yn;try{yn=Ue(kt.node,kt.offset,Rt.offset,Rt.node)}catch(qn){}yn&&(!st&&ce.state.focused?(re.collapse(kt.node,kt.offset),yn.collapsed||(re.removeAllRanges(),re.addRange(yn))):(re.removeAllRanges(),re.addRange(yn)),wn&&re.anchorNode==null?re.addRange(wn):st&&this.startGracePeriod()),this.rememberSelection()}},ha.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)},ha.prototype.showMultipleSelections=function(re){je(this.cm.display.cursorDiv,re.cursors),je(this.cm.display.selectionDiv,re.selection)},ha.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},ha.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var ce=re.getRangeAt(0).commonAncestorContainer;return Je(this.div,ce)},ha.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ha.prototype.blur=function(){this.div.blur()},ha.prototype.getField=function(){return this.div},ha.prototype.supportsTouch=function(){return!0},ha.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():kr(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)},ha.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},ha.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),ce=this.cm;if(ee&&Ee&&this.cm.display.gutterSpecs.length&&sg(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ke=yd(ce,re.anchorNode,re.anchorOffset),Ce=yd(ce,re.focusNode,re.focusOffset);ke&&Ce&&kr(ce,function(){sa(ce.doc,Na(ke,Ce),ht),(ke.bad||Ce.bad)&&(ce.curOp.selectionChanged=!0)})}}},ha.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,ce=re.display,ke=re.doc.sel.primary(),Ce=ke.from(),Oe=ke.to();if(Ce.ch==0&&Ce.line>re.firstLine()&&(Ce=xn(Ce.line-1,Tn(re.doc,Ce.line-1).length)),Oe.ch==Tn(re.doc,Oe.line).text.length&&Oe.line<re.lastLine()&&(Oe=xn(Oe.line+1,0)),Ce.line<ce.viewFrom||Oe.line>ce.viewTo-1)return!1;var tt,pt,Nt;Ce.line==ce.viewFrom||(tt=kl(re,Ce.line))==0?(pt=$t(ce.view[0].line),Nt=ce.view[0].node):(pt=$t(ce.view[tt].line),Nt=ce.view[tt-1].node.nextSibling);var kt=kl(re,Oe.line),Rt,rn;if(kt==ce.view.length-1?(Rt=ce.viewTo-1,rn=ce.lineDiv.lastChild):(Rt=$t(ce.view[kt+1].line)-1,rn=ce.view[kt+1].node.previousSibling),!Nt)return!1;for(var zt=re.doc.splitLines(Bf(re,Nt,rn,pt,Rt)),wn=Sr(re.doc,xn(pt,0),xn(Rt,Tn(re.doc,Rt).text.length));zt.length>1&&wn.length>1;)if(Tt(zt)==Tt(wn))zt.pop(),wn.pop(),Rt--;else if(zt[0]==wn[0])zt.shift(),wn.shift(),pt++;else break;for(var yn=0,qn=0,ir=zt[0],vr=wn[0],Dr=Math.min(ir.length,vr.length);yn<Dr&&ir.charCodeAt(yn)==vr.charCodeAt(yn);)++yn;for(var ti=Tt(zt),Kr=Tt(wn),si=Math.min(ti.length-(zt.length==1?yn:0),Kr.length-(wn.length==1?yn:0));qn<si&&ti.charCodeAt(ti.length-qn-1)==Kr.charCodeAt(Kr.length-qn-1);)++qn;if(zt.length==1&&wn.length==1&&pt==Ce.line)for(;yn&&yn>Ce.ch&&ti.charCodeAt(ti.length-qn-1)==Kr.charCodeAt(Kr.length-qn-1);)yn--,qn++;zt[zt.length-1]=ti.slice(0,ti.length-qn).replace(/^\u200b+/,""),zt[0]=zt[0].slice(yn).replace(/\u200b+$/,"");var Hi=xn(pt,yn),Ur=xn(Rt,wn.length?Tt(wn).length-qn:0);if(zt.length>1||zt[0]||gr(Hi,Ur))return Ou(re.doc,zt,Hi,Ur,"+input"),!0},ha.prototype.ensurePolled=function(){this.forceCompositionEnd()},ha.prototype.reset=function(){this.forceCompositionEnd()},ha.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ha.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))},ha.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&kr(this.cm,function(){return ua(re.cm)})},ha.prototype.setUneditable=function(re){re.contentEditable="false"},ha.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Qr(this.cm,md)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},ha.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},ha.prototype.onContextMenu=function(){},ha.prototype.resetPosition=function(){},ha.prototype.needsContentAttribute=!0;function np(re,ce){var ke=Ah(re,ce.line);if(!ke||ke.hidden)return null;var Ce=Tn(re.doc,ce.line),Oe=Pf(ke,Ce,ce.line),tt=an(Ce,re.doc.direction),pt="left";if(tt){var Nt=jt(tt,ce.ch);pt=Nt%2?"right":"left"}var kt=bf(Oe.map,ce.ch,pt);return kt.offset=kt.collapse=="right"?kt.end:kt.start,kt}function sg(re){for(var ce=re;ce;ce=ce.parentNode)if(/CodeMirror-gutter-wrapper/.test(ce.className))return!0;return!1}function Rf(re,ce){return ce&&(re.bad=!0),re}function Bf(re,ce,ke,Ce,Oe){var tt="",pt=!1,Nt=re.doc.lineSeparator(),kt=!1;function Rt(yn){return function(qn){return qn.id==yn}}function rn(){pt&&(tt+=Nt,kt&&(tt+=Nt),pt=kt=!1)}function zt(yn){yn&&(rn(),tt+=yn)}function wn(yn){if(yn.nodeType==1){var qn=yn.getAttribute("cm-text");if(qn){zt(qn);return}var ir=yn.getAttribute("cm-marker"),vr;if(ir){var Dr=re.findMarks(xn(Ce,0),xn(Oe+1,0),Rt(+ir));Dr.length&&(vr=Dr[0].find(0))&&zt(Sr(re.doc,vr.from,vr.to).join(Nt));return}if(yn.getAttribute("contenteditable")=="false")return;var ti=/^(pre|div|p|li|table|br)$/i.test(yn.nodeName);if(!/^br$/i.test(yn.nodeName)&&yn.textContent.length==0)return;ti&&rn();for(var Kr=0;Kr<yn.childNodes.length;Kr++)wn(yn.childNodes[Kr]);/^(pre|p)$/i.test(yn.nodeName)&&(kt=!0),ti&&(pt=!0)}else yn.nodeType==3&&zt(yn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;wn(ce),ce!=ke;)ce=ce.nextSibling,kt=!1;return tt}function yd(re,ce,ke){var Ce;if(ce==re.display.lineDiv){if(Ce=re.display.lineDiv.childNodes[ke],!Ce)return Rf(re.clipPos(xn(re.display.viewTo-1)),!0);ce=null,ke=0}else for(Ce=ce;;Ce=Ce.parentNode){if(!Ce||Ce==re.display.lineDiv)return null;if(Ce.parentNode&&Ce.parentNode==re.display.lineDiv)break}for(var Oe=0;Oe<re.display.view.length;Oe++){var tt=re.display.view[Oe];if(tt.node==Ce)return cm(tt,ce,ke)}}function cm(re,ce,ke){var Ce=re.text.firstChild,Oe=!1;if(!ce||!Je(Ce,ce))return Rf(xn($t(re.line),0),!0);if(ce==Ce&&(Oe=!0,ce=Ce.childNodes[ke],ke=0,!ce)){var tt=re.rest?Tt(re.rest):re.line;return Rf(xn($t(tt),tt.text.length),Oe)}var pt=ce.nodeType==3?ce:null,Nt=ce;for(!pt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(pt=ce.firstChild,ke&&(ke=pt.nodeValue.length));Nt.parentNode!=Ce;)Nt=Nt.parentNode;var kt=re.measure,Rt=kt.maps;function rn(vr,Dr,ti){for(var Kr=-1;Kr<(Rt?Rt.length:0);Kr++)for(var si=Kr<0?kt.map:Rt[Kr],Hi=0;Hi<si.length;Hi+=3){var Ur=si[Hi+2];if(Ur==vr||Ur==Dr){var co=$t(Kr<0?re.line:re.rest[Kr]),ka=si[Hi]+ti;return(ti<0||Ur!=vr)&&(ka=si[Hi+(ti?1:0)]),xn(co,ka)}}}var zt=rn(pt,Nt,ke);if(zt)return Rf(zt,Oe);for(var wn=Nt.nextSibling,yn=pt?pt.nodeValue.length-ke:0;wn;wn=wn.nextSibling){if(zt=rn(wn,wn.firstChild,0),zt)return Rf(xn(zt.line,zt.ch-yn),Oe);yn+=wn.textContent.length}for(var qn=Nt.previousSibling,ir=ke;qn;qn=qn.previousSibling){if(zt=rn(qn,qn.firstChild,-1),zt)return Rf(xn(zt.line,zt.ch+ir),Oe);ir+=qn.textContent.length}}var os=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new et,this.hasSelection=!1,this.composing=null};os.prototype.init=function(re){var ce=this,ke=this,Ce=this.cm;this.createField(re);var Oe=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),de&&(Oe.style.width="0px"),hn(Oe,"input",function(){Re&&fe>=9&&ce.hasSelection&&(ce.hasSelection=null),ke.poll()}),hn(Oe,"paste",function(pt){Wt(Ce,pt)||ng(pt,Ce)||(Ce.state.pasteIncoming=+new Date,ke.fastPoll())});function tt(pt){if(!Wt(Ce,pt)){if(Ce.somethingSelected())Qc({lineWise:!1,text:Ce.getSelections()});else if(Ce.options.lineWiseCopyCut){var Nt=ig(Ce);Qc({lineWise:!0,text:Nt.text}),pt.type=="cut"?Ce.setSelections(Nt.ranges,null,ht):(ke.prevInput="",Oe.value=Nt.text.join(`
|
|
`),ft(Oe))}else return;pt.type=="cut"&&(Ce.state.cutIncoming=+new Date)}}hn(Oe,"cut",tt),hn(Oe,"copy",tt),hn(re.scroller,"paste",function(pt){if(!(hs(re,pt)||Wt(Ce,pt))){if(!Oe.dispatchEvent){Ce.state.pasteIncoming=+new Date,ke.focus();return}var Nt=new Event("paste");Nt.clipboardData=pt.clipboardData,Oe.dispatchEvent(Nt)}}),hn(re.lineSpace,"selectstart",function(pt){hs(re,pt)||fr(pt)}),hn(Oe,"compositionstart",function(){var pt=Ce.getCursor("from");ke.composing&&ke.composing.range.clear(),ke.composing={start:pt,range:Ce.markText(pt,Ce.getCursor("to"),{className:"CodeMirror-composing"})}}),hn(Oe,"compositionend",function(){ke.composing&&(ke.poll(),ke.composing.range.clear(),ke.composing=null)})},os.prototype.createField=function(re){this.wrapper=ag(),this.textarea=this.wrapper.firstChild},os.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},os.prototype.prepareSelection=function(){var re=this.cm,ce=re.display,ke=re.doc,Ce=Zu(re);if(re.options.moveInputWithCursor){var Oe=Ea(re,ke.sel.primary().head,"div"),tt=ce.wrapper.getBoundingClientRect(),pt=ce.lineDiv.getBoundingClientRect();Ce.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Oe.top+pt.top-tt.top)),Ce.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Oe.left+pt.left-tt.left))}return Ce},os.prototype.showSelection=function(re){var ce=this.cm,ke=ce.display;je(ke.cursorDiv,re.cursors),je(ke.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},os.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var ce=this.cm;if(ce.somethingSelected()){this.prevInput="";var ke=ce.getSelection();this.textarea.value=ke,ce.state.focused&&ft(this.textarea),Re&&fe>=9&&(this.hasSelection=ke)}else re||(this.prevInput=this.textarea.value="",Re&&fe>=9&&(this.hasSelection=null))}},os.prototype.getField=function(){return this.textarea},os.prototype.supportsTouch=function(){return!1},os.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||He()!=this.textarea))try{this.textarea.focus()}catch(re){}},os.prototype.blur=function(){this.textarea.blur()},os.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},os.prototype.receivedFocus=function(){this.slowPoll()},os.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},os.prototype.fastPoll=function(){var re=!1,ce=this;ce.pollingFast=!0;function ke(){var Ce=ce.poll();!Ce&&!re?(re=!0,ce.polling.set(60,ke)):(ce.pollingFast=!1,ce.slowPoll())}ce.polling.set(20,ke)},os.prototype.poll=function(){var re=this,ce=this.cm,ke=this.textarea,Ce=this.prevInput;if(this.contextMenuPending||!ce.state.focused||Qe(ke)&&!Ce&&!this.composing||ce.isReadOnly()||ce.options.disableInput||ce.state.keySeq)return!1;var Oe=ke.value;if(Oe==Ce&&!ce.somethingSelected())return!1;if(Re&&fe>=9&&this.hasSelection===Oe||oe&&/[\uf700-\uf7ff]/.test(Oe))return ce.display.input.reset(),!1;if(ce.doc.sel==ce.display.selForContextMenu){var tt=Oe.charCodeAt(0);if(tt==8203&&!Ce&&(Ce="\u200B"),tt==8666)return this.reset(),this.cm.execCommand("undo")}for(var pt=0,Nt=Math.min(Ce.length,Oe.length);pt<Nt&&Ce.charCodeAt(pt)==Oe.charCodeAt(pt);)++pt;return kr(ce,function(){md(ce,Oe.slice(pt),Ce.length-pt,null,re.composing?"*compose":null),Oe.length>1e3||Oe.indexOf(`
|
|
`)>-1?ke.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},os.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},os.prototype.onKeyPress=function(){Re&&fe>=9&&(this.hasSelection=null),this.fastPoll()},os.prototype.onContextMenu=function(re){var ce=this,ke=ce.cm,Ce=ke.display,Oe=ce.textarea;ce.contextMenuPending&&ce.contextMenuPending();var tt=_s(ke,re),pt=Ce.scroller.scrollTop;if(!tt||we)return;var Nt=ke.options.resetSelectionOnContextMenu;Nt&&ke.doc.sel.contains(tt)==-1&&Qr(ke,sa)(ke.doc,Na(tt),ht);var kt=Oe.style.cssText,Rt=ce.wrapper.style.cssText,rn=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(re.clientY-rn.top-5)+"px; left: "+(re.clientX-rn.left-5)+`px;
|
|
z-index: 1000; background: `+(Re?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var zt;pe&&(zt=window.scrollY),Ce.input.focus(),pe&&window.scrollTo(null,zt),Ce.input.reset(),ke.somethingSelected()||(Oe.value=ce.prevInput=" "),ce.contextMenuPending=yn,Ce.selForContextMenu=ke.doc.sel,clearTimeout(Ce.detectingSelectAll);function wn(){if(Oe.selectionStart!=null){var ir=ke.somethingSelected(),vr="\u200B"+(ir?Oe.value:"");Oe.value="\u21DA",Oe.value=vr,ce.prevInput=ir?"":"\u200B",Oe.selectionStart=1,Oe.selectionEnd=vr.length,Ce.selForContextMenu=ke.doc.sel}}function yn(){if(ce.contextMenuPending==yn&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=Rt,Oe.style.cssText=kt,Re&&fe<9&&Ce.scrollbars.setScrollTop(Ce.scroller.scrollTop=pt),Oe.selectionStart!=null)){(!Re||Re&&fe<9)&&wn();var ir=0,vr=function(){Ce.selForContextMenu==ke.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&ce.prevInput=="\u200B"?Qr(ke,Aa)(ke):ir++<10?Ce.detectingSelectAll=setTimeout(vr,500):(Ce.selForContextMenu=null,Ce.input.reset())};Ce.detectingSelectAll=setTimeout(vr,200)}}if(Re&&fe>=9&&wn(),xe){ni(re);var qn=function(){On(window,"mouseup",qn),setTimeout(yn,20)};hn(window,"mouseup",qn)}else setTimeout(yn,50)},os.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},os.prototype.setUneditable=function(){},os.prototype.needsContentAttribute=!1;function fm(re,ce){if(ce=ce?Lt(ce):{},ce.value=re.value,!ce.tabindex&&re.tabIndex&&(ce.tabindex=re.tabIndex),!ce.placeholder&&re.placeholder&&(ce.placeholder=re.placeholder),ce.autofocus==null){var ke=He();ce.autofocus=ke==re||re.getAttribute("autofocus")!=null&&ke==document.body}function Ce(){re.value=Nt.getValue()}var Oe;if(re.form&&(hn(re.form,"submit",Ce),!ce.leaveSubmitMethodAlone)){var tt=re.form;Oe=tt.submit;try{var pt=tt.submit=function(){Ce(),tt.submit=Oe,tt.submit(),tt.submit=pt}}catch(kt){}}ce.finishInit=function(kt){kt.save=Ce,kt.getTextArea=function(){return re},kt.toTextArea=function(){kt.toTextArea=isNaN,Ce(),re.parentNode.removeChild(kt.getWrapperElement()),re.style.display="",re.form&&(On(re.form,"submit",Ce),!ce.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Oe))}},re.style.display="none";var Nt=Uo(function(kt){return re.parentNode.insertBefore(kt,re.nextSibling)},ce);return Nt}function If(re){re.off=On,re.on=hn,re.wheelEventPixels=No,re.Doc=ps,re.splitLines=Nn,re.countColumn=Xe,re.findColumn=Pt,re.isWordChar=$e,re.Pass=wt,re.signal=fn,re.Line=Ao,re.changeEnd=bs,re.scrollbarModel=Rn,re.Pos=xn,re.cmpPos=gr,re.modes=Dn,re.mimeModes=Zn,re.resolveMode=nn,re.getMode=ln,re.modeExtensions=Vt,re.extendMode=cn,re.copyState=Qn,re.startState=or,re.innerMode=rr,re.commands=cc,re.keyMap=nl,re.keyName=Es,re.isModifierKey=Va,re.lookupKey=lo,re.normalizeKeyMap=Fo,re.StringStream=en,re.SharedTextMarker=tl,re.TextMarker=Xt,re.LineWidget=qo,re.e_preventDefault=fr,re.e_stopPropagation=Gr,re.e_stop=ni,re.addClass=We,re.contains=Je,re.rmClass=De,re.keyNames=mu}um(Uo),dc(Uo);var Kh="iter insert remove copy getEditor constructor".split(" ");for(var Sd in ps.prototype)ps.prototype.hasOwnProperty(Sd)&<(Kh,Sd)<0&&(Uo.prototype[Sd]=function(re){return function(){return re.apply(this.doc,arguments)}}(ps.prototype[Sd]));return Yn(ps),Uo.inputStyles={textarea:os,contenteditable:ha},Uo.defineMode=function(re){!Uo.defaults.mode&&re!="null"&&(Uo.defaults.mode=re),nr.apply(this,arguments)},Uo.defineMIME=Jr,Uo.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),Uo.defineMIME("text/plain","null"),Uo.defineExtension=function(re,ce){Uo.prototype[re]=ce},Uo.defineDocExtension=function(re,ce){ps.prototype[re]=ce},Uo.fromTextArea=fm,If(Uo),Uo.version="5.58.2",Uo})},49047:function(Sn,vn,ot){(function(st){st(ot(4631),ot(29589),ot(52539))})(function(st){"use strict";st.defineMode("markdown",function(Ft,ae){var Ge=st.getMode(Ft,"text/html"),Re=Ge.name=="null";function fe(Xe){if(st.findModeByName){var et=st.findModeByName(Xe);et&&(Xe=et.mime||et.mimes[0])}var lt=st.getMode(Ft,Xe);return lt.name=="null"?null:lt}ae.highlightFormatting===void 0&&(ae.highlightFormatting=!1),ae.maxBlockquoteDepth===void 0&&(ae.maxBlockquoteDepth=0),ae.taskLists===void 0&&(ae.taskLists=!1),ae.strikethrough===void 0&&(ae.strikethrough=!1),ae.emoji===void 0&&(ae.emoji=!1),ae.fencedCodeBlockHighlighting===void 0&&(ae.fencedCodeBlockHighlighting=!0),ae.fencedCodeBlockDefaultMode===void 0&&(ae.fencedCodeBlockDefaultMode="text/plain"),ae.xml===void 0&&(ae.xml=!0),ae.tokenTypeOverrides===void 0&&(ae.tokenTypeOverrides={});var pe={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 be in pe)pe.hasOwnProperty(be)&&ae.tokenTypeOverrides[be]&&(pe[be]=ae.tokenTypeOverrides[be]);var Ee=/^([*\-_])(?:\s*\1){2,}\s*$/,we=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Te=/^\[(x| )\](?=\s)/i,ve=ae.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Pe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,de=/^[^#!\[\]*_\\<>` "'(~:]+/,ee=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,z=/^\s*\[[^\]]+?\]:.*$/,oe=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,ie=" ";function le(Xe,et,lt){return et.f=et.inline=lt,lt(Xe,et)}function ue(Xe,et,lt){return et.f=et.block=lt,lt(Xe,et)}function me(Xe){return!Xe||!/\S/.test(Xe.string)}function xe(Xe){if(Xe.linkTitle=!1,Xe.linkHref=!1,Xe.linkText=!1,Xe.em=!1,Xe.strong=!1,Xe.strikethrough=!1,Xe.quote=0,Xe.indentedCode=!1,Xe.f==De){var et=Re;if(!et){var lt=st.innerMode(Ge,Xe.htmlState);et=lt.mode.name=="xml"&<.state.tagStart===null&&!lt.state.context&<.state.tokenize.isInText}et&&(Xe.f=Be,Xe.block=Ae,Xe.htmlState=null)}return Xe.trailingSpace=0,Xe.trailingSpaceNewLine=!1,Xe.prevLine=Xe.thisLine,Xe.thisLine={stream:null},null}function Ae(Xe,et){var lt=Xe.column()===et.indentation,vt=me(et.prevLine.stream),wt=et.indentedCode,ht=et.prevLine.hr,dt=et.list!==!1,ut=(et.listStack[et.listStack.length-1]||0)+3;et.indentedCode=!1;var Pt=et.indentation;if(et.indentationDiff===null&&(et.indentationDiff=et.indentation,dt)){for(et.list=null;Pt<et.listStack[et.listStack.length-1];)et.listStack.pop(),et.listStack.length?et.indentation=et.listStack[et.listStack.length-1]:et.list=!1;et.list!==!1&&(et.indentationDiff=Pt-et.listStack[et.listStack.length-1])}var yt=!vt&&!ht&&!et.prevLine.header&&(!dt||!wt)&&!et.prevLine.fencedCodeEnd,gt=(et.list===!1||ht||vt)&&et.indentation<=ut&&Xe.match(Ee),Tt=null;if(et.indentationDiff>=4&&(wt||et.prevLine.fencedCodeEnd||et.prevLine.header||vt))return Xe.skipToEnd(),et.indentedCode=!0,pe.code;if(Xe.eatSpace())return null;if(lt&&et.indentation<=ut&&(Tt=Xe.match(ve))&&Tt[1].length<=6)return et.quote=0,et.header=Tt[1].length,et.thisLine.header=!0,ae.highlightFormatting&&(et.formatting="header"),et.f=et.inline,je(et);if(et.indentation<=ut&&Xe.eat(">"))return et.quote=lt?1:et.quote+1,ae.highlightFormatting&&(et.formatting="quote"),Xe.eatSpace(),je(et);if(!gt&&!et.setext&<&&et.indentation<=ut&&(Tt=Xe.match(we))){var ct=Tt[1]?"ol":"ul";return et.indentation=Pt+Xe.current().length,et.list=!0,et.quote=0,et.listStack.push(et.indentation),et.em=!1,et.strong=!1,et.code=!1,et.strikethrough=!1,ae.taskLists&&Xe.match(Te,!1)&&(et.taskList=!0),et.f=et.inline,ae.highlightFormatting&&(et.formatting=["list","list-"+ct]),je(et)}else{if(lt&&et.indentation<=ut&&(Tt=Xe.match(ee,!0)))return et.quote=0,et.fencedEndRE=new RegExp(Tt[1]+"+ *$"),et.localMode=ae.fencedCodeBlockHighlighting&&fe(Tt[2]||ae.fencedCodeBlockDefaultMode),et.localMode&&(et.localState=st.startState(et.localMode)),et.f=et.block=Fe,ae.highlightFormatting&&(et.formatting="code-block"),et.code=-1,je(et);if(et.setext||(!yt||!dt)&&!et.quote&&et.list===!1&&!et.code&&!gt&&!z.test(Xe.string)&&(Tt=Xe.lookAhead(1))&&(Tt=Tt.match(Pe)))return et.setext?(et.header=et.setext,et.setext=0,Xe.skipToEnd(),ae.highlightFormatting&&(et.formatting="header")):(et.header=Tt[0].charAt(0)=="="?1:2,et.setext=et.header),et.thisLine.header=!0,et.f=et.inline,je(et);if(gt)return Xe.skipToEnd(),et.hr=!0,et.thisLine.hr=!0,pe.hr;if(Xe.peek()==="[")return le(Xe,et,at)}return le(Xe,et,et.inline)}function De(Xe,et){var lt=Ge.token(Xe,et.htmlState);if(!Re){var vt=st.innerMode(Ge,et.htmlState);(vt.mode.name=="xml"&&vt.state.tagStart===null&&!vt.state.context&&vt.state.tokenize.isInText||et.md_inside&&Xe.current().indexOf(">")>-1)&&(et.f=Be,et.block=Ae,et.htmlState=null)}return lt}function Fe(Xe,et){var lt=et.listStack[et.listStack.length-1]||0,vt=et.indentation<lt,wt=lt+3;if(et.fencedEndRE&&et.indentation<=wt&&(vt||Xe.match(et.fencedEndRE))){ae.highlightFormatting&&(et.formatting="code-block");var ht;return vt||(ht=je(et)),et.localMode=et.localState=null,et.block=Ae,et.f=Be,et.fencedEndRE=null,et.code=0,et.thisLine.fencedCodeEnd=!0,vt?ue(Xe,et,et.block):ht}else return et.localMode?et.localMode.token(Xe,et.localState):(Xe.skipToEnd(),pe.code)}function je(Xe){var et=[];if(Xe.formatting){et.push(pe.formatting),typeof Xe.formatting=="string"&&(Xe.formatting=[Xe.formatting]);for(var lt=0;lt<Xe.formatting.length;lt++)et.push(pe.formatting+"-"+Xe.formatting[lt]),Xe.formatting[lt]==="header"&&et.push(pe.formatting+"-"+Xe.formatting[lt]+"-"+Xe.header),Xe.formatting[lt]==="quote"&&(!ae.maxBlockquoteDepth||ae.maxBlockquoteDepth>=Xe.quote?et.push(pe.formatting+"-"+Xe.formatting[lt]+"-"+Xe.quote):et.push("error"))}if(Xe.taskOpen)return et.push("meta"),et.length?et.join(" "):null;if(Xe.taskClosed)return et.push("property"),et.length?et.join(" "):null;if(Xe.linkHref?et.push(pe.linkHref,"url"):(Xe.strong&&et.push(pe.strong),Xe.em&&et.push(pe.em),Xe.strikethrough&&et.push(pe.strikethrough),Xe.emoji&&et.push(pe.emoji),Xe.linkText&&et.push(pe.linkText),Xe.code&&et.push(pe.code),Xe.image&&et.push(pe.image),Xe.imageAltText&&et.push(pe.imageAltText,"link"),Xe.imageMarker&&et.push(pe.imageMarker)),Xe.header&&et.push(pe.header,pe.header+"-"+Xe.header),Xe.quote&&(et.push(pe.quote),!ae.maxBlockquoteDepth||ae.maxBlockquoteDepth>=Xe.quote?et.push(pe.quote+"-"+Xe.quote):et.push(pe.quote+"-"+ae.maxBlockquoteDepth)),Xe.list!==!1){var vt=(Xe.listStack.length-1)%3;vt?vt===1?et.push(pe.list2):et.push(pe.list3):et.push(pe.list1)}return Xe.trailingSpaceNewLine?et.push("trailing-space-new-line"):Xe.trailingSpace&&et.push("trailing-space-"+(Xe.trailingSpace%2?"a":"b")),et.length?et.join(" "):null}function Le(Xe,et){if(Xe.match(de,!0))return je(et)}function Be(Xe,et){var lt=et.text(Xe,et);if(typeof lt!="undefined")return lt;if(et.list)return et.list=null,je(et);if(et.taskList){var vt=Xe.match(Te,!0)[1]===" ";return vt?et.taskOpen=!0:et.taskClosed=!0,ae.highlightFormatting&&(et.formatting="task"),et.taskList=!1,je(et)}if(et.taskOpen=!1,et.taskClosed=!1,et.header&&Xe.match(/^#+$/,!0))return ae.highlightFormatting&&(et.formatting="header"),je(et);var wt=Xe.next();if(et.linkTitle){et.linkTitle=!1;var ht=wt;wt==="("&&(ht=")"),ht=(ht+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var dt="^\\s*(?:[^"+ht+"\\\\]+|\\\\\\\\|\\\\.)"+ht;if(Xe.match(new RegExp(dt),!0))return pe.linkHref}if(wt==="`"){var ut=et.formatting;ae.highlightFormatting&&(et.formatting="code"),Xe.eatWhile("`");var Pt=Xe.current().length;if(et.code==0&&(!et.quote||Pt==1))return et.code=Pt,je(et);if(Pt==et.code){var yt=je(et);return et.code=0,yt}else return et.formatting=ut,je(et)}else if(et.code)return je(et);if(wt==="\\"&&(Xe.next(),ae.highlightFormatting)){var gt=je(et),Tt=pe.formatting+"-escape";return gt?gt+" "+Tt:Tt}if(wt==="!"&&Xe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return et.imageMarker=!0,et.image=!0,ae.highlightFormatting&&(et.formatting="image"),je(et);if(wt==="["&&et.imageMarker&&Xe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return et.imageMarker=!1,et.imageAltText=!0,ae.highlightFormatting&&(et.formatting="image"),je(et);if(wt==="]"&&et.imageAltText){ae.highlightFormatting&&(et.formatting="image");var gt=je(et);return et.imageAltText=!1,et.image=!1,et.inline=et.f=Je,gt}if(wt==="["&&!et.image)return et.linkText&&Xe.match(/^.*?\]/)||(et.linkText=!0,ae.highlightFormatting&&(et.formatting="link")),je(et);if(wt==="]"&&et.linkText){ae.highlightFormatting&&(et.formatting="link");var gt=je(et);return et.linkText=!1,et.inline=et.f=Xe.match(/\(.*?\)| ?\[.*?\]/,!1)?Je:Be,gt}if(wt==="<"&&Xe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){et.f=et.inline=Ue,ae.highlightFormatting&&(et.formatting="link");var gt=je(et);return gt?gt+=" ":gt="",gt+pe.linkInline}if(wt==="<"&&Xe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){et.f=et.inline=Ue,ae.highlightFormatting&&(et.formatting="link");var gt=je(et);return gt?gt+=" ":gt="",gt+pe.linkEmail}if(ae.xml&&wt==="<"&&Xe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ct=Xe.string.indexOf(">",Xe.pos);if(ct!=-1){var Ye=Xe.string.substring(Xe.start,ct);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ye)&&(et.md_inside=!0)}return Xe.backUp(1),et.htmlState=st.startState(Ge),ue(Xe,et,De)}if(ae.xml&&wt==="<"&&Xe.match(/^\/\w*?>/))return et.md_inside=!1,"tag";if(wt==="*"||wt==="_"){for(var Ze=1,Se=Xe.pos==1?" ":Xe.string.charAt(Xe.pos-2);Ze<3&&Xe.eat(wt);)Ze++;var Ne=Xe.peek()||" ",$e=!/\s/.test(Ne)&&(!oe.test(Ne)||/\s/.test(Se)||oe.test(Se)),nt=!/\s/.test(Se)&&(!oe.test(Se)||/\s/.test(Ne)||oe.test(Ne)),Ie=null,ze=null;if(Ze%2&&(!et.em&&$e&&(wt==="*"||!nt||oe.test(Se))?Ie=!0:et.em==wt&&nt&&(wt==="*"||!$e||oe.test(Ne))&&(Ie=!1)),Ze>1&&(!et.strong&&$e&&(wt==="*"||!nt||oe.test(Se))?ze=!0:et.strong==wt&&nt&&(wt==="*"||!$e||oe.test(Ne))&&(ze=!1)),ze!=null||Ie!=null){ae.highlightFormatting&&(et.formatting=Ie==null?"strong":ze==null?"em":"strong em"),Ie===!0&&(et.em=wt),ze===!0&&(et.strong=wt);var yt=je(et);return Ie===!1&&(et.em=!1),ze===!1&&(et.strong=!1),yt}}else if(wt===" "&&(Xe.eat("*")||Xe.eat("_"))){if(Xe.peek()===" ")return je(et);Xe.backUp(1)}if(ae.strikethrough){if(wt==="~"&&Xe.eatWhile(wt)){if(et.strikethrough){ae.highlightFormatting&&(et.formatting="strikethrough");var yt=je(et);return et.strikethrough=!1,yt}else if(Xe.match(/^[^\s]/,!1))return et.strikethrough=!0,ae.highlightFormatting&&(et.formatting="strikethrough"),je(et)}else if(wt===" "&&Xe.match(/^~~/,!0)){if(Xe.peek()===" ")return je(et);Xe.backUp(2)}}if(ae.emoji&&wt===":"&&Xe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){et.emoji=!0,ae.highlightFormatting&&(et.formatting="emoji");var Ve=je(et);return et.emoji=!1,Ve}return wt===" "&&(Xe.match(/^ +$/,!1)?et.trailingSpace++:et.trailingSpace&&(et.trailingSpaceNewLine=!0)),je(et)}function Ue(Xe,et){var lt=Xe.next();if(lt===">"){et.f=et.inline=Be,ae.highlightFormatting&&(et.formatting="link");var vt=je(et);return vt?vt+=" ":vt="",vt+pe.linkInline}return Xe.match(/^[^>]+/,!0),pe.linkInline}function Je(Xe,et){if(Xe.eatSpace())return null;var lt=Xe.next();return lt==="("||lt==="["?(et.f=et.inline=We(lt==="("?")":"]"),ae.highlightFormatting&&(et.formatting="link-string"),et.linkHref=!0,je(et)):"error"}var He={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function We(Xe){return function(et,lt){var vt=et.next();if(vt===Xe){lt.f=lt.inline=Be,ae.highlightFormatting&&(lt.formatting="link-string");var wt=je(lt);return lt.linkHref=!1,wt}return et.match(He[Xe]),lt.linkHref=!0,je(lt)}}function at(Xe,et){return Xe.match(/^([^\]\\]|\\.)*\]:/,!1)?(et.f=ft,Xe.next(),ae.highlightFormatting&&(et.formatting="link"),et.linkText=!0,je(et)):le(Xe,et,Be)}function ft(Xe,et){if(Xe.match(/^\]:/,!0)){et.f=et.inline=mt,ae.highlightFormatting&&(et.formatting="link");var lt=je(et);return et.linkText=!1,lt}return Xe.match(/^([^\]\\]|\\.)+/,!0),pe.linkText}function mt(Xe,et){return Xe.eatSpace()?null:(Xe.match(/^[^\s]+/,!0),Xe.peek()===void 0?et.linkTitle=!0:Xe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),et.f=et.inline=Be,pe.linkHref+" url")}var Lt={startState:function(){return{f:Ae,prevLine:{stream:null},thisLine:{stream:null},block:Ae,htmlState:null,indentation:0,inline:Be,text:Le,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(Xe){return{f:Xe.f,prevLine:Xe.prevLine,thisLine:Xe.thisLine,block:Xe.block,htmlState:Xe.htmlState&&st.copyState(Ge,Xe.htmlState),indentation:Xe.indentation,localMode:Xe.localMode,localState:Xe.localMode?st.copyState(Xe.localMode,Xe.localState):null,inline:Xe.inline,text:Xe.text,formatting:!1,linkText:Xe.linkText,linkTitle:Xe.linkTitle,linkHref:Xe.linkHref,code:Xe.code,em:Xe.em,strong:Xe.strong,strikethrough:Xe.strikethrough,emoji:Xe.emoji,header:Xe.header,setext:Xe.setext,hr:Xe.hr,taskList:Xe.taskList,list:Xe.list,listStack:Xe.listStack.slice(0),quote:Xe.quote,indentedCode:Xe.indentedCode,trailingSpace:Xe.trailingSpace,trailingSpaceNewLine:Xe.trailingSpaceNewLine,md_inside:Xe.md_inside,fencedEndRE:Xe.fencedEndRE}},token:function(Xe,et){if(et.formatting=!1,Xe!=et.thisLine.stream){if(et.header=0,et.hr=!1,Xe.match(/^\s*$/,!0))return xe(et),null;if(et.prevLine=et.thisLine,et.thisLine={stream:Xe},et.taskList=!1,et.trailingSpace=0,et.trailingSpaceNewLine=!1,!et.localState&&(et.f=et.block,et.f!=De)){var lt=Xe.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(et.indentation=lt,et.indentationDiff=null,lt>0)return null}}return et.f(Xe,et)},innerMode:function(Xe){return Xe.block==De?{state:Xe.htmlState,mode:Ge}:Xe.localState?{state:Xe.localState,mode:Xe.localMode}:{state:Xe,mode:Lt}},indent:function(Xe,et,lt){return Xe.block==De&&Ge.indent?Ge.indent(Xe.htmlState,et,lt):Xe.localState&&Xe.localMode.indent?Xe.localMode.indent(Xe.localState,et,lt):st.Pass},blankLine:xe,getType:je,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Lt},"xml"),st.defineMIME("text/markdown","markdown"),st.defineMIME("text/x-markdown","markdown")})},52539:function(Sn,vn,ot){(function(st){st(ot(4631))})(function(st){"use strict";st.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Ft=0;Ft<st.modeInfo.length;Ft++){var ae=st.modeInfo[Ft];ae.mimes&&(ae.mime=ae.mimes[0])}st.findModeByMIME=function(Ge){Ge=Ge.toLowerCase();for(var Re=0;Re<st.modeInfo.length;Re++){var fe=st.modeInfo[Re];if(fe.mime==Ge)return fe;if(fe.mimes){for(var pe=0;pe<fe.mimes.length;pe++)if(fe.mimes[pe]==Ge)return fe}}if(/\+xml$/.test(Ge))return st.findModeByMIME("application/xml");if(/\+json$/.test(Ge))return st.findModeByMIME("application/json")},st.findModeByExtension=function(Ge){Ge=Ge.toLowerCase();for(var Re=0;Re<st.modeInfo.length;Re++){var fe=st.modeInfo[Re];if(fe.ext){for(var pe=0;pe<fe.ext.length;pe++)if(fe.ext[pe]==Ge)return fe}}},st.findModeByFileName=function(Ge){for(var Re=0;Re<st.modeInfo.length;Re++){var fe=st.modeInfo[Re];if(fe.file&&fe.file.test(Ge))return fe}var pe=Ge.lastIndexOf("."),be=pe>-1&&Ge.substring(pe+1,Ge.length);if(be)return st.findModeByExtension(be)},st.findModeByName=function(Ge){Ge=Ge.toLowerCase();for(var Re=0;Re<st.modeInfo.length;Re++){var fe=st.modeInfo[Re];if(fe.name.toLowerCase()==Ge)return fe;if(fe.alias){for(var pe=0;pe<fe.alias.length;pe++)if(fe.alias[pe].toLowerCase()==Ge)return fe}}}})},80785:function(Sn,vn,ot){(function(st){st(ot(4631))})(function(st){"use strict";st.defineMode("stex",function(Ft,ae){"use strict";function Ge(de,ee){de.cmdState.push(ee)}function Re(de){return de.cmdState.length>0?de.cmdState[de.cmdState.length-1]:null}function fe(de){var ee=de.cmdState.pop();ee&&ee.closeBracket()}function pe(de){for(var ee=de.cmdState,z=ee.length-1;z>=0;z--){var oe=ee[z];if(oe.name!="DEFAULT")return oe}return{styleIdentifier:function(){return null}}}function be(de,ee,z){return function(){this.name=de,this.bracketNo=0,this.style=ee,this.styles=z,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ee={};Ee.importmodule=be("importmodule","tag",["string","builtin"]),Ee.documentclass=be("documentclass","tag",["","atom"]),Ee.usepackage=be("usepackage","tag",["atom"]),Ee.begin=be("begin","tag",["atom"]),Ee.end=be("end","tag",["atom"]),Ee.label=be("label","tag",["atom"]),Ee.ref=be("ref","tag",["atom"]),Ee.eqref=be("eqref","tag",["atom"]),Ee.cite=be("cite","tag",["atom"]),Ee.bibitem=be("bibitem","tag",["atom"]),Ee.Bibitem=be("Bibitem","tag",["atom"]),Ee.RBibitem=be("RBibitem","tag",["atom"]),Ee.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function we(de,ee){de.f=ee}function Te(de,ee){var z;if(de.match(/^\\[a-zA-Z@]+/)){var oe=de.current().slice(1);return z=Ee.hasOwnProperty(oe)?Ee[oe]:Ee.DEFAULT,z=new z,Ge(ee,z),we(ee,Pe),z.style}if(de.match(/^\\[$&%#{}_]/)||de.match(/^\\[,;!\/\\]/))return"tag";if(de.match("\\["))return we(ee,function(le,ue){return ve(le,ue,"\\]")}),"keyword";if(de.match("\\("))return we(ee,function(le,ue){return ve(le,ue,"\\)")}),"keyword";if(de.match("$$"))return we(ee,function(le,ue){return ve(le,ue,"$$")}),"keyword";if(de.match("$"))return we(ee,function(le,ue){return ve(le,ue,"$")}),"keyword";var ie=de.next();if(ie=="%")return de.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(z=Re(ee),z)z.closeBracket(ie),we(ee,Pe);else return"error";return"bracket"}else return ie=="{"||ie=="["?(z=Ee.DEFAULT,z=new z,Ge(ee,z),"bracket"):/\d/.test(ie)?(de.eatWhile(/[\w.%]/),"atom"):(de.eatWhile(/[\w\-_]/),z=pe(ee),z.name=="begin"&&(z.argument=de.current()),z.styleIdentifier())}function ve(de,ee,z){if(de.eatSpace())return null;if(z&&de.match(z))return we(ee,Te),"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 oe=de.next();return oe=="{"||oe=="}"||oe=="["||oe=="]"||oe=="("||oe==")"?"bracket":oe=="%"?(de.skipToEnd(),"comment"):"error"}function Pe(de,ee){var z=de.peek(),oe;return z=="{"||z=="["?(oe=Re(ee),oe.openBracket(z),de.eat(z),we(ee,Te),"bracket"):/[ \t\r]/.test(z)?(de.eat(z),null):(we(ee,Te),fe(ee),Te(de,ee))}return{startState:function(){var de=ae.inMathMode?function(ee,z){return ve(ee,z)}:Te;return{cmdState:[],f:de}},copyState:function(de){return{cmdState:de.cmdState.slice(),f:de.f}},token:function(de,ee){return ee.f(de,ee)},blankLine:function(de){de.f=Te,de.cmdState.length=0},lineComment:"%"}}),st.defineMIME("text/x-stex","stex"),st.defineMIME("text/x-latex","stex")})},29589:function(Sn,vn,ot){(function(st){st(ot(4631))})(function(st){"use strict";var Ft={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},ae={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};st.defineMode("xml",function(Ge,Re){var fe=Ge.indentUnit,pe={},be=Re.htmlMode?Ft:ae;for(var Ee in be)pe[Ee]=be[Ee];for(var Ee in Re)pe[Ee]=Re[Ee];var we,Te;function ve(Ue,Je){function He(ft){return Je.tokenize=ft,ft(Ue,Je)}var We=Ue.next();if(We=="<")return Ue.eat("!")?Ue.eat("[")?Ue.match("CDATA[")?He(ee("atom","]]>")):null:Ue.match("--")?He(ee("comment","-->")):Ue.match("DOCTYPE",!0,!0)?(Ue.eatWhile(/[\w\._\-]/),He(z(1))):null:Ue.eat("?")?(Ue.eatWhile(/[\w\._\-]/),Je.tokenize=ee("meta","?>"),"meta"):(we=Ue.eat("/")?"closeTag":"openTag",Je.tokenize=Pe,"tag bracket");if(We=="&"){var at;return Ue.eat("#")?Ue.eat("x")?at=Ue.eatWhile(/[a-fA-F\d]/)&&Ue.eat(";"):at=Ue.eatWhile(/[\d]/)&&Ue.eat(";"):at=Ue.eatWhile(/[\w\.\-:]/)&&Ue.eat(";"),at?"atom":"error"}else return Ue.eatWhile(/[^&<]/),null}ve.isInText=!0;function Pe(Ue,Je){var He=Ue.next();if(He==">"||He=="/"&&Ue.eat(">"))return Je.tokenize=ve,we=He==">"?"endTag":"selfcloseTag","tag bracket";if(He=="=")return we="equals",null;if(He=="<"){Je.tokenize=ve,Je.state=ue,Je.tagName=Je.tagStart=null;var We=Je.tokenize(Ue,Je);return We?We+" tag error":"tag error"}else return/[\'\"]/.test(He)?(Je.tokenize=de(He),Je.stringStartCol=Ue.column(),Je.tokenize(Ue,Je)):(Ue.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function de(Ue){var Je=function(He,We){for(;!He.eol();)if(He.next()==Ue){We.tokenize=Pe;break}return"string"};return Je.isInAttribute=!0,Je}function ee(Ue,Je){return function(He,We){for(;!He.eol();){if(He.match(Je)){We.tokenize=ve;break}He.next()}return Ue}}function z(Ue){return function(Je,He){for(var We;(We=Je.next())!=null;){if(We=="<")return He.tokenize=z(Ue+1),He.tokenize(Je,He);if(We==">")if(Ue==1){He.tokenize=ve;break}else return He.tokenize=z(Ue-1),He.tokenize(Je,He)}return"meta"}}function oe(Ue,Je,He){this.prev=Ue.context,this.tagName=Je,this.indent=Ue.indented,this.startOfLine=He,(pe.doNotIndent.hasOwnProperty(Je)||Ue.context&&Ue.context.noIndent)&&(this.noIndent=!0)}function ie(Ue){Ue.context&&(Ue.context=Ue.context.prev)}function le(Ue,Je){for(var He;;){if(!Ue.context||(He=Ue.context.tagName,!pe.contextGrabbers.hasOwnProperty(He)||!pe.contextGrabbers[He].hasOwnProperty(Je)))return;ie(Ue)}}function ue(Ue,Je,He){return Ue=="openTag"?(He.tagStart=Je.column(),me):Ue=="closeTag"?xe:ue}function me(Ue,Je,He){return Ue=="word"?(He.tagName=Je.current(),Te="tag",Fe):pe.allowMissingTagName&&Ue=="endTag"?(Te="tag bracket",Fe(Ue,Je,He)):(Te="error",me)}function xe(Ue,Je,He){if(Ue=="word"){var We=Je.current();return He.context&&He.context.tagName!=We&&pe.implicitlyClosed.hasOwnProperty(He.context.tagName)&&ie(He),He.context&&He.context.tagName==We||pe.matchClosing===!1?(Te="tag",Ae):(Te="tag error",De)}else return pe.allowMissingTagName&&Ue=="endTag"?(Te="tag bracket",Ae(Ue,Je,He)):(Te="error",De)}function Ae(Ue,Je,He){return Ue!="endTag"?(Te="error",Ae):(ie(He),ue)}function De(Ue,Je,He){return Te="error",Ae(Ue,Je,He)}function Fe(Ue,Je,He){if(Ue=="word")return Te="attribute",je;if(Ue=="endTag"||Ue=="selfcloseTag"){var We=He.tagName,at=He.tagStart;return He.tagName=He.tagStart=null,Ue=="selfcloseTag"||pe.autoSelfClosers.hasOwnProperty(We)?le(He,We):(le(He,We),He.context=new oe(He,We,at==He.indented)),ue}return Te="error",Fe}function je(Ue,Je,He){return Ue=="equals"?Le:(pe.allowMissing||(Te="error"),Fe(Ue,Je,He))}function Le(Ue,Je,He){return Ue=="string"?Be:Ue=="word"&&pe.allowUnquoted?(Te="string",Fe):(Te="error",Fe(Ue,Je,He))}function Be(Ue,Je,He){return Ue=="string"?Be:Fe(Ue,Je,He)}return{startState:function(Ue){var Je={tokenize:ve,state:ue,indented:Ue||0,tagName:null,tagStart:null,context:null};return Ue!=null&&(Je.baseIndent=Ue),Je},token:function(Ue,Je){if(!Je.tagName&&Ue.sol()&&(Je.indented=Ue.indentation()),Ue.eatSpace())return null;we=null;var He=Je.tokenize(Ue,Je);return(He||we)&&He!="comment"&&(Te=null,Je.state=Je.state(we||He,Ue,Je),Te&&(He=Te=="error"?He+" error":Te)),He},indent:function(Ue,Je,He){var We=Ue.context;if(Ue.tokenize.isInAttribute)return Ue.tagStart==Ue.indented?Ue.stringStartCol+1:Ue.indented+fe;if(We&&We.noIndent)return st.Pass;if(Ue.tokenize!=Pe&&Ue.tokenize!=ve)return He?He.match(/^(\s*)/)[0].length:0;if(Ue.tagName)return pe.multilineTagIndentPastTag!==!1?Ue.tagStart+Ue.tagName.length+2:Ue.tagStart+fe*(pe.multilineTagIndentFactor||1);if(pe.alignCDATA&&/<!\[CDATA\[/.test(Je))return 0;var at=Je&&/^<(\/)?([\w_:\.-]*)/.exec(Je);if(at&&at[1])for(;We;)if(We.tagName==at[2]){We=We.prev;break}else if(pe.implicitlyClosed.hasOwnProperty(We.tagName))We=We.prev;else break;else if(at)for(;We;){var ft=pe.contextGrabbers[We.tagName];if(ft&&ft.hasOwnProperty(at[2]))We=We.prev;else break}for(;We&&We.prev&&!We.startOfLine;)We=We.prev;return We?We.indent+fe:Ue.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:pe.htmlMode?"html":"xml",helperType:pe.htmlMode?"html":"xml",skipAttribute:function(Ue){Ue.state==Le&&(Ue.state=Fe)},xmlCurrentTag:function(Ue){return Ue.tagName?{name:Ue.tagName,close:Ue.type=="closeTag"}:null},xmlCurrentContext:function(Ue){for(var Je=[],He=Ue.context;He;He=He.prev)He.tagName&&Je.push(He.tagName);return Je.reverse()}}}),st.defineMIME("text/xml","xml"),st.defineMIME("application/xml","xml"),st.mimeModes.hasOwnProperty("text/html")||st.defineMIME("text/html",{name:"xml",htmlMode:!0})})},23495:function(Sn,vn,ot){"use strict";ot.d(vn,{$u:function(){return Ee},BD:function(){return Ze},E9:function(){return be},FF:function(){return Vi},FJ:function(){return ue},Hn:function(){return le},KX:function(){return xe},NB:function(){return Ct},S0:function(){return Tt},UL:function(){return we},Vk:function(){return ie},Vm:function(){return jt},YI:function(){return ct},ZA:function(){return ae},Zt:function(){return Te},al:function(){return Ie},bn:function(){return nt},bx:function(){return Se},g2:function(){return Ye},h1:function(){return Le},hD:function(){return Yn},l4:function(){return fe},rU:function(){return It},s_:function(){return Ne},uz:function(){return St},z6:function(){return ve}}),Sn=ot.hmd(Sn),function(){var Qe;function Pn(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function An(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Pn(a)}}function Lr(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Dn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Zn;if(typeof Object.setPrototypeOf=="function")Zn=Object.setPrototypeOf;else{var nr;e:{var Jr={a:!0},nn={};try{nn.__proto__=Jr,nr=nn.a;break e}catch(a){}nr=!1}Zn=nr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var ln=Zn;function Vt(a,y){if(a.prototype=Dn(y.prototype),a.prototype.constructor=a,ln)ln(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 cn=typeof ot.g!="undefined"&&ot.g!=null?ot.g:self,Qn=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},rr=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function or(a,y){if(y){var x=cn;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&&rr(x,a,{writable:!0,value:y})}}or("Object.assign",function(a){return a||Qn}),or("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 en=typeof globalThis=="object"&&globalThis||typeof ot.g=="object"&&ot.g.global===ot.g&&ot.g||typeof self=="object"&&self.self===self&&self||{};en.requestAnimationFrame===void 0&&(en.setImmediate===void 0?en.requestAnimationFrame=function(a){en.setTimeout(a,0)}:en.requestAnimationFrame=en.setImmediate);function Tn(){}function Sr(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&en.clearTimeout(x),x=Vr(function(){x=-1,a.apply(b,E)},y)}}function Vr(a,y){return en.setTimeout(a,y)}function Wn(a){return en.document.createElement(a)}function $t(a){throw Error(a)}function cr(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),$t(a)}function yr(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),$t(x+" is not in the range "+y+": "+a)}function Nr(a){en.console&&en.console.log(a)}function xn(a){return typeof a=="object"&&a!==null}function gr(a){return Array.isArray(a)||en.NodeList&&a instanceof en.NodeList||en.HTMLCollection&&a instanceof en.HTMLCollection}function hi(a){return Array.prototype.slice.call(a)}function Wi(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):$t("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function zi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):$t("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function sr(){var a=zo.pop();return a===void 0?[]:a}function dr(a){a.length=0,zo.push(a)}function Ar(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(xn(a)&&a.constructor)return Ar(a.constructor);return typeof a}function ii(a){var y=a;return xn(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 Zr(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 In(a,y,x){Object.defineProperty(po.prototype,a,{get:y,set:x})}function Cr(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 la=en.navigator!==void 0&&0<en.navigator.userAgent.indexOf("Trident/7"),Ho=en.navigator!==void 0&&en.navigator.platform!==void 0&&en.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,zo=[];Object.freeze([]),Tn.className="Util",Tn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Tn.adym="gojs.net",Tn.vfo="28e645fdb266",Tn.className="Util";function tn(a,y,x){Ni(this),this.j=a,this.xa=y,this.o=x}tn.prototype.toString=function(){return"EnumValue."+this.xa};function Xr(a,y){return y==null||y===""?null:a[y]}cn.Object.defineProperties(tn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),tn.className="EnumValue";function yi(){this.ew=[]}yi.prototype.toString=function(){return this.ew.join("")},yi.prototype.add=function(a){a!==""&&this.ew.push(a)},yi.className="StringBuilder";function xr(){}xr.className="PropertyCollection";var Po={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){en.console&&en.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 Li(){}Li.prototype.reset=function(){},Li.prototype.next=function(){return!1},Li.prototype.Ad=function(){return!1},Li.prototype.first=function(){return null},Li.prototype.any=function(){return!1},Li.prototype.all=function(){return!0},Li.prototype.each=function(){return this},Li.prototype.map=function(){return this},Li.prototype.filter=function(){return this},Li.prototype.de=function(){},Li.prototype.toString=function(){return"EmptyIterator"},cn.Object.defineProperties(Li.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Li.prototype.first=Li.prototype.first,Li.prototype.hasNext=Li.prototype.Ad,Li.prototype.next=Li.prototype.next,Li.prototype.reset=Li.prototype.reset;var Bi=null;Li.className="EmptyIterator",Bi=new Li;function Mi(a){this.key=-1,this.value=a}Mi.prototype.reset=function(){this.key=-1},Mi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Mi.prototype.Ad=function(){return this.next()},Mi.prototype.first=function(){return this.key=0,this.value},Mi.prototype.any=function(a){return this.key=-1,a(this.value)},Mi.prototype.all=function(a){return this.key=-1,a(this.value)},Mi.prototype.each=function(a){return this.key=-1,a(this.value),this},Mi.prototype.map=function(a){return new Mi(a(this.value))},Mi.prototype.filter=function(a){return a(this.value)?new Mi(this.value):Bi},Mi.prototype.de=function(){this.value=null},Mi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},cn.Object.defineProperties(Mi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Mi.prototype.first=Mi.prototype.first,Mi.prototype.hasNext=Mi.prototype.Ad,Mi.prototype.next=Mi.prototype.next,Mi.prototype.reset=Mi.prototype.reset,Mi.className="SingletonIterator";function Pi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Pi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Pi.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},Pi.prototype.Ad=function(){return this.next()},Pi.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},Pi.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},Pi.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},Pi.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},Pi.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 kn,a.s=x,a.xb(),a.iterator},Pi.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 kn,a.s=x,a.xb(),a.iterator},Pi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Pi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},cn.Object.defineProperties(Pi.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}}}),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="ListIterator";function Ji(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Ji.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Ji.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)},Ji.prototype.Ad=function(){return this.next()},Ji.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},Ji.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},Ji.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},Ji.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},Ji.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 kn,a.s=x,a.xb(),a.iterator},Ji.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 kn,a.s=x,a.xb(),a.iterator},Ji.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Ji.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},cn.Object.defineProperties(Ji.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Ji.prototype.first=Ji.prototype.first,Ji.prototype.hasNext=Ji.prototype.Ad,Ji.prototype.next=Ji.prototype.next,Ji.prototype.reset=Ji.prototype.reset,Ji.className="ListIteratorBackwards";function kn(a){Ni(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=kn.prototype,Qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.toString=function(){return"List()#"+Zt(this)},Qe.add=function(a){return a===null?this:(this._isFrozen&&cr(this,a),this.s.push(a),this.xb(),this)},Qe.push=function(a){this.add(a)},Qe.addAll=function(a){if(a===null)return this;this._isFrozen&&cr(this);var y=this.s;if(gr(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},Qe.clear=function(){this._isFrozen&&cr(this),this.s.length=0,this.xb()},Qe.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Qe.has=function(a){return this.contains(a)},Qe.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Qe.M=function(a){var y=this.s;return(0>a||a>=y.length)&&yr(a,"0 <= i < length",kn,"elt:i"),y[a]},Qe.get=function(a){return this.M(a)},Qe.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&yr(a,"0 <= i < length",kn,"setElt:i"),this._isFrozen&&cr(this,a),x[a]=y},Qe.set=function(a,y){this.cd(a,y)},Qe.first=function(){var a=this.s;return a.length===0?null:a[0]},Qe.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Qe.pop=function(){this._isFrozen&&cr(this);var a=this.s;return 0<a.length?a.pop():null},kn.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},kn.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},kn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},kn.prototype.map=function(a){for(var y=new kn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},kn.prototype.filter=function(a){for(var y=new kn,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},Qe=kn.prototype,Qe.Gb=function(a,y){0>a&&yr(a,">= 0",kn,"insertAt:i"),this._isFrozen&&cr(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Qe.remove=function(a){if(a===null)return!1;this._isFrozen&&cr(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)},Qe.delete=function(a){return this.remove(a)},Qe.mb=function(a){var y=this.s;(0>a||a>=y.length)&&yr(a,"0 <= i < length",kn,"removeAt:i"),this._isFrozen&&cr(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Qe.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&&cr(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},kn.prototype.copy=function(){var a=new kn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Qe=kn.prototype,Qe.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Qe.Iv=function(){for(var a=new bn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Qe.sort=function(a){return this._isFrozen&&cr(this),this.s.sort(a),this.xb(),this},Qe.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&cr(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&yr(y,"0 <= from < length",kn,"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},Qe.reverse=function(){return this._isFrozen&&cr(this),this.s.reverse(),this.xb(),this},cn.Object.defineProperties(kn.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 Bi;var a=this.Sa;return a!==null?(a.reset(),a):new Pi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Bi;var a=this.Hg;return a!==null?(a.reset(),a):new Ji(this)}}}),kn.prototype.reverse=kn.prototype.reverse,kn.prototype.sortRange=kn.prototype.zi,kn.prototype.sort=kn.prototype.sort,kn.prototype.toSet=kn.prototype.Iv,kn.prototype.toArray=kn.prototype.Fa,kn.prototype.removeRange=kn.prototype.removeRange,kn.prototype.removeAt=kn.prototype.mb,kn.prototype.delete=kn.prototype.delete,kn.prototype.remove=kn.prototype.remove,kn.prototype.insertAt=kn.prototype.Gb,kn.prototype.pop=kn.prototype.pop,kn.prototype.last=kn.prototype.jc,kn.prototype.first=kn.prototype.first,kn.prototype.set=kn.prototype.set,kn.prototype.setElt=kn.prototype.cd,kn.prototype.get=kn.prototype.get,kn.prototype.elt=kn.prototype.M,kn.prototype.indexOf=kn.prototype.indexOf,kn.prototype.has=kn.prototype.has,kn.prototype.contains=kn.prototype.contains,kn.prototype.clear=kn.prototype.clear,kn.prototype.addAll=kn.prototype.addAll,kn.prototype.push=kn.prototype.push,kn.prototype.add=kn.prototype.add,kn.prototype.thaw=kn.prototype.ka,kn.prototype.freeze=kn.prototype.freeze,kn.className="List";function To(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}To.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},To.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)},To.prototype.Ad=function(){return this.next()},To.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},To.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},To.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},To.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},To.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new kn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},To.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new kn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},To.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},To.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},cn.Object.defineProperties(To.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),To.prototype.first=To.prototype.first,To.prototype.hasNext=To.prototype.Ad,To.prototype.next=To.prototype.next,To.prototype.reset=To.prototype.reset,To.className="SetIterator";function bn(a){Ni(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=bn.prototype,Qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.toString=function(){return"Set()#"+Zt(this)},Qe.add=function(a){if(a===null)return this;this._isFrozen&&cr(this,a);var y=a;return xn(a)&&(y=ya(a)),this.Tb[y]===void 0&&(this.Sb++,a=new oi(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},Qe.addAll=function(a){if(a===null)return this;if(this._isFrozen&&cr(this),gr(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},Qe.contains=function(a){if(a===null)return!1;var y=a;return xn(a)&&(y=Zt(a),y===void 0)?!1:this.Tb[y]!==void 0},Qe.has=function(a){return this.contains(a)},Qe.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Qe.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Qe.first=function(){var a=this.ea;return a===null?null:a.value},bn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},bn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},bn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},bn.prototype.map=function(a){for(var y=new bn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},bn.prototype.filter=function(a){for(var y=new bn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Qe=bn.prototype,Qe.remove=function(a){if(a===null)return!1;this._isFrozen&&cr(this,a);var y=a;if(xn(a)&&(y=Zt(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},Qe.delete=function(a){return this.remove(a)},Qe.hp=function(a){if(a===null)return this;if(this._isFrozen&&cr(this),gr(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},Qe.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&cr(this);var y=new bn;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},Qe.clear=function(){this._isFrozen&&cr(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},bn.prototype.copy=function(){var a=new bn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},bn.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},bn.prototype.Hv=function(){var a=new kn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Ni(a){a.__gohashid=Jt++}function ya(a){var y=a.__gohashid;return y===void 0&&(y=Jt++,a.__gohashid=y),y}function Zt(a){return a.__gohashid}cn.Object.defineProperties(bn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Bi;var a=this.Sa;return a!==null?(a.reset(),a):new To(this)}}}),bn.prototype.toList=bn.prototype.Hv,bn.prototype.toArray=bn.prototype.Fa,bn.prototype.clear=bn.prototype.clear,bn.prototype.retainAll=bn.prototype.pA,bn.prototype.removeAll=bn.prototype.hp,bn.prototype.delete=bn.prototype.delete,bn.prototype.remove=bn.prototype.remove,bn.prototype.first=bn.prototype.first,bn.prototype.containsAny=bn.prototype.Ty,bn.prototype.containsAll=bn.prototype.Sy,bn.prototype.has=bn.prototype.has,bn.prototype.contains=bn.prototype.contains,bn.prototype.addAll=bn.prototype.addAll,bn.prototype.add=bn.prototype.add,bn.prototype.thaw=bn.prototype.ka,bn.prototype.freeze=bn.prototype.freeze;var Jt=1;bn.className="Set",bn.uniqueHash=Ni,bn.hashIdUnique=ya,bn.hashId=Zt;function dn(a){this.ma=a,this.qa=a.Ja,this.sa=null}dn.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},dn.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)},dn.prototype.Ad=function(){return this.next()},dn.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},dn.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},dn.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},dn.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},dn.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new kn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},dn.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new kn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},dn.prototype.de=function(){this.value=this.key=null,this.qa=-1},dn.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},cn.Object.defineProperties(dn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),dn.prototype.first=dn.prototype.first,dn.prototype.hasNext=dn.prototype.Ad,dn.prototype.next=dn.prototype.next,dn.prototype.reset=dn.prototype.reset,dn.className="MapKeySetIterator";function Fn(a){bn.call(this),Ni(this),this._isFrozen=!0,this.ma=a}Vt(Fn,bn),Qe=Fn.prototype,Qe.freeze=function(){return this},Qe.ka=function(){return this},Qe.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Qe.add=function(){$t("This Set is read-only: "+this.toString())},Qe.contains=function(a){return this.ma.contains(a)},Qe.has=function(a){return this.contains(a)},Qe.remove=function(){$t("This Set is read-only: "+this.toString())},Qe.delete=function(a){return this.remove(a)},Qe.clear=function(){$t("This Set is read-only: "+this.toString())},Qe.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Fn.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Fn.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Fn.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Fn.prototype.map=function(a){for(var y=new bn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Fn.prototype.filter=function(a){for(var y=new bn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Fn.prototype.copy=function(){return new Fn(this.ma)},Fn.prototype.Iv=function(){var a=new bn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Fn.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},Fn.prototype.Hv=function(){var a=new kn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},cn.Object.defineProperties(Fn.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Bi:new dn(this.ma)}}}),Fn.prototype.toList=Fn.prototype.Hv,Fn.prototype.toArray=Fn.prototype.Fa,Fn.prototype.toSet=Fn.prototype.Iv,Fn.prototype.first=Fn.prototype.first,Fn.prototype.clear=Fn.prototype.clear,Fn.prototype.delete=Fn.prototype.delete,Fn.prototype.remove=Fn.prototype.remove,Fn.prototype.has=Fn.prototype.has,Fn.prototype.contains=Fn.prototype.contains,Fn.prototype.add=Fn.prototype.add,Fn.prototype.thaw=Fn.prototype.ka,Fn.prototype.freeze=Fn.prototype.freeze,Fn.className="MapKeySet";function pr(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}pr.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},pr.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},pr.prototype.Ad=function(){return this.next()},pr.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},pr.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},pr.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},pr.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},pr.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new kn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},pr.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new kn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},pr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},pr.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},cn.Object.defineProperties(pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),pr.prototype.first=pr.prototype.first,pr.prototype.hasNext=pr.prototype.Ad,pr.prototype.next=pr.prototype.next,pr.prototype.reset=pr.prototype.reset,pr.className="MapValueSetIterator";function oi(a,y){this.key=a,this.value=y,this.ll=this.va=null}oi.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},oi.className="KeyValuePair";function _r(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}_r.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},_r.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)},_r.prototype.Ad=function(){return this.next()},_r.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},_r.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},_r.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},_r.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},_r.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new kn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},_r.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new kn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},_r.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},_r.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},cn.Object.defineProperties(_r.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),_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="MapIterator";function Kn(a){Ni(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"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Qe=Kn.prototype,Qe.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.toString=function(){return"Map()#"+Zt(this)},Qe.add=function(a,y){this._isFrozen&&cr(this,a);var x=a;xn(a)&&(x=ya(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new oi(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},Qe.set=function(a,y){return this.add(a,y)},Qe.addAll=function(a){if(a===null)return this;if(gr(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 Kn)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},Qe.first=function(){return this.ea},Kn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Kn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Kn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Kn.prototype.map=function(a){for(var y=new Kn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Kn.prototype.filter=function(a){for(var y=new Kn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Qe=Kn.prototype,Qe.contains=function(a){var y=a;return xn(a)&&(y=Zt(a),y===void 0)?!1:this.Tb[y]!==void 0},Qe.has=function(a){return this.contains(a)},Qe.I=function(a){var y=a;return xn(a)&&(y=Zt(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Qe.get=function(a){return this.I(a)},Qe.remove=function(a){if(a===null)return!1;this._isFrozen&&cr(this,a);var y=a;if(xn(a)&&(y=Zt(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},Qe.delete=function(a){return this.remove(a)},Qe.clear=function(){this._isFrozen&&cr(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()},Kn.prototype.copy=function(){var a=new Kn,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Kn.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 oi(E.key,E.value),x++}return y},Kn.prototype.Lf=function(){return new Fn(this)},cn.Object.defineProperties(Kn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Bi;var a=this.Sa;return a!==null?(a.reset(),a):new _r(this)}},iteratorKeys:{get:function(){return 0>=this.count?Bi:new dn(this)}},iteratorValues:{get:function(){if(0>=this.count)return Bi;var a=this.jf;return a!==null?(a.reset(),a):new pr(this)}}}),Kn.prototype.toKeySet=Kn.prototype.Lf,Kn.prototype.toArray=Kn.prototype.Fa,Kn.prototype.clear=Kn.prototype.clear,Kn.prototype.delete=Kn.prototype.delete,Kn.prototype.remove=Kn.prototype.remove,Kn.prototype.get=Kn.prototype.get,Kn.prototype.getValue=Kn.prototype.I,Kn.prototype.has=Kn.prototype.has,Kn.prototype.contains=Kn.prototype.contains,Kn.prototype.first=Kn.prototype.first,Kn.prototype.addAll=Kn.prototype.addAll,Kn.prototype.set=Kn.prototype.set,Kn.prototype.add=Kn.prototype.add,Kn.prototype.thaw=Kn.prototype.ka,Kn.prototype.freeze=Kn.prototype.freeze,Kn.className="Map";function Et(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):$t("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var io,Ir,gi,oo,Yi;Et.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Et.prototype.h=function(a,y){return this.x=a,this.y=y,this},Et.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Et.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Et.prototype.copy=function(){var a=new Et;return a.x=this.x,a.y=this.y,a},Qe=Et.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ki(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 Et(x,E)}return new Et}function Jo(a){return a.x.toString()+" "+a.y.toString()}Qe.toString=function(){return"Point("+this.x+","+this.y+")"},Qe.D=function(a){return a instanceof Et?this.x===a.x&&this.y===a.y:!1},Qe.hi=function(a,y){return this.x===a&&this.y===y},Qe.Xa=function(a){return Ht.B(this.x,a.x)&&Ht.B(this.y,a.y)},Qe.add=function(a){return this.x+=a.x,this.y+=a.y,this},Qe.re=function(a){return this.x-=a.x,this.y-=a.y,this},Qe.offset=function(a,y){return this.x+=a,this.y+=y,this},Et.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},Qe=Et.prototype,Qe.scale=function(a,y){return this.x*=a,this.y*=y,this},Qe.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Qe.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Qe.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},Qe.ab=function(a){return Vo(a.x-this.x,a.y-this.y)},Qe.direction=function(a,y){return Vo(a-this.x,y-this.y)};function Vo(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}Qe.Ry=function(a,y){return Ht.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Qe.fA=function(a,y,x,b){return Ht.qh(a,y,x,b,this.x,this.y,this),this},Qe.gA=function(a,y){return Ht.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Qe.uA=function(a,y,x,b){return Ht.No(this.x,this.y,a,y,x,b,this),this},Qe.vA=function(a,y){return Ht.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Qe.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},Qe.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},Qe.transform=function(a){return a.Ga(this),this};function Zi(a,y){return y.Cd(a),a}function ao(a,y,x,b,E,te){var ne=E-x,se=te-b,he=ne*ne+se*se;x-=a,b-=y;var ge=-x*ne-b*se;return 0>=ge||ge>=he?(ne=E-a,se=te-y,Math.min(x*x+b*b,ne*ne+se*se)):(a=ne*b-se*x,a*a/he)}function Mr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function Er(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)}Qe.w=function(){return isFinite(this.x)&&isFinite(this.y)},Et.alloc=function(){var a=jr.pop();return a===void 0?new Et:a},Et.allocAt=function(a,y){var x=jr.pop();return x===void 0?new Et(a,y):(x.x=a,x.y=y,x)},Et.free=function(a){jr.push(a)},Et.prototype.isReal=Et.prototype.w,Et.prototype.setSpot=Et.prototype.yi,Et.prototype.setRectSpot=Et.prototype.xi,Et.prototype.snapToGridPoint=Et.prototype.vA,Et.prototype.snapToGrid=Et.prototype.uA,Et.prototype.projectOntoLineSegmentPoint=Et.prototype.gA,Et.prototype.projectOntoLineSegment=Et.prototype.fA,Et.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return Ht.Rl(a,y,x,b,E,te,ne,se)},Et.prototype.compareWithLineSegmentPoint=Et.prototype.Ry,Et.compareWithLineSegment=function(a,y,x,b,E,te){return Ht.Fl(a,y,x,b,E,te)},Et.prototype.direction=Et.prototype.direction,Et.prototype.directionPoint=Et.prototype.ab,Et.prototype.normalize=Et.prototype.normalize,Et.prototype.distanceSquared=Et.prototype.zd,Et.prototype.distanceSquaredPoint=Et.prototype.Bf,Et.prototype.scale=Et.prototype.scale,Et.prototype.rotate=Et.prototype.rotate,Et.prototype.offset=Et.prototype.offset,Et.prototype.subtract=Et.prototype.re,Et.prototype.add=Et.prototype.add,Et.prototype.equalsApprox=Et.prototype.Xa,Et.prototype.equalTo=Et.prototype.hi,Et.prototype.equals=Et.prototype.D,Et.prototype.set=Et.prototype.set,Et.prototype.setTo=Et.prototype.sg;var jr=[];Et.className="Point",Et.parse=Ki,Et.stringify=Jo,Et.distanceLineSegmentSquared=ao,Et.distanceSquared=Mr,Et.direction=Er,Et.Origin=io=new Et(0,0).ja(),Et.InfiniteTopLeft=Ir=new Et(-1/0,-1/0).ja(),Et.InfiniteBottomRight=gi=new Et(1/0,1/0).ja(),Et.SixPoint=oo=new Et(6,6).ja(),Et.NoPoint=Yi=new Et(NaN,NaN).ja(),Et.parse=Ki,Et.stringify=Jo,Et.distanceLineSegmentSquared=ao,Et.distanceSquared=Mr,Et.direction=Er;function pn(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):$t("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Hr,pi,vo,qi,Ao,$o,Fa;pn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},pn.prototype.h=function(a,y){return this.width=a,this.height=y,this},pn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},pn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},pn.prototype.copy=function(){var a=new pn;return a.width=this.width,a.height=this.height,a},Qe=pn.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Sa(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 pn(x,E)}return new pn}function Zs(a){return a.width.toString()+" "+a.height.toString()}Qe.toString=function(){return"Size("+this.width+","+this.height+")"},Qe.D=function(a){return a instanceof pn?this.width===a.width&&this.height===a.height:!1},Qe.hi=function(a,y){return this.width===a&&this.height===y},Qe.Xa=function(a){return Ht.B(this.width,a.width)&&Ht.B(this.height,a.height)},Qe.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},Qe.w=function(){return isFinite(this.width)&&isFinite(this.height)},pn.alloc=function(){var a=Bs.pop();return a===void 0?new pn:a},pn.free=function(a){Bs.push(a)},pn.prototype.isReal=pn.prototype.w,pn.prototype.inflate=pn.prototype.Bc,pn.prototype.equalsApprox=pn.prototype.Xa,pn.prototype.equalTo=pn.prototype.hi,pn.prototype.equals=pn.prototype.D,pn.prototype.set=pn.prototype.set,pn.prototype.setTo=pn.prototype.sg;var Bs=[];pn.className="Size",pn.parse=Sa,pn.stringify=Zs,pn.ZeroSize=Hr=new pn(0,0).ja(),pn.OneSize=pi=new pn(1,1).ja(),pn.SixSize=vo=new pn(6,6).ja(),pn.EightSize=qi=new pn(8,8).ja(),pn.TenSize=Ao=new pn(10,10).ja(),pn.InfiniteSize=$o=new pn(1/0,1/0).ja(),pn.NoSize=Fa=new pn(NaN,NaN).ja(),pn.parse=Sa,pn.stringify=Zs;function on(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 Et?(x=a.x,a=a.y,y instanceof Et?(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 pn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):$t("Incorrect second argument supplied to Rect constructor "+y)):$t("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Qe=on.prototype,Qe.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Qe.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Da(a,y,x){a.width=y,a.height=x}Qe.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Qe.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Qe.dd=function(a){return this.x=a.x,this.y=a.y,this},Qe.tA=function(a){return this.width=a.width,this.height=a.height,this},on.prototype.copy=function(){var a=new on;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Qe=on.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function ts(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 on(x,E,te,ne)}return new on}function Bl(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Qe.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Qe.D=function(a){return a instanceof on?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Qe.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Qe.Xa=function(a){return Ht.B(this.x,a.x)&&Ht.B(this.y,a.y)&&Ht.B(this.width,a.width)&&Ht.B(this.height,a.height)};function yo(a,y){return Ht.$(a.x,y.x)&&Ht.$(a.y,y.y)&&Ht.$(a.width,y.width)&&Ht.$(a.height,y.height)}Qe.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Qe.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},Qe.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},Qe.offset=function(a,y){return this.x+=a,this.y+=y,this},Qe.Bc=function(a,y){return ul(this,y,a,y,a)},Qe.Co=function(a){return ul(this,a.top,a.right,a.bottom,a.left)},Qe.Fv=function(a){return ul(this,-a.top,-a.right,-a.bottom,-a.left)},Qe.Hz=function(a,y,x,b){return ul(this,a,y,x,b)};function ul(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}Qe.Ex=function(a){return hl(this,a.x,a.y,a.width,a.height)},Qe.Uu=function(a,y,x,b){return hl(this,a,y,x,b)};function hl(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}Qe.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Qe.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 bl(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))}Qe.Ye=function(a){return bo(this,a.x,a.y,0,0)},Qe.ed=function(a){return bo(this,a.x,a.y,a.width,a.height)},Qe.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),bo(this,a,y,x,b)};function bo(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}Qe.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 ia(a,y,x,b,E,te,ne,se){return ne===void 0&&(ne=0),se===void 0&&(se=0),a<=E&&E+ne<=a+x&&y<=te&&te+se<=y+b}function mi(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}Qe.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Qe.Mz=function(){return this.width===0&&this.height===0},on.alloc=function(){var a=Zo.pop();return a===void 0?new on:a},on.allocAt=function(a,y,x,b){var E=Zo.pop();return E===void 0?new on(a,y,x,b):E.h(a,y,x,b)},on.free=function(a){Zo.push(a)},cn.Object.defineProperties(on.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 Et(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new pn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Et(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}}}),on.prototype.isEmpty=on.prototype.Mz,on.prototype.isReal=on.prototype.w,on.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Ht.Fx(a,y,x,b,E,te,ne,se)},on.prototype.setSpot=on.prototype.yi,on.prototype.union=on.prototype.Kv,on.prototype.unionRect=on.prototype.ed,on.prototype.unionPoint=on.prototype.Ye,on.prototype.intersects=on.prototype.Vu,on.prototype.intersectsRect=on.prototype.Yc,on.prototype.intersect=on.prototype.Uu,on.prototype.intersectRect=on.prototype.Ex,on.prototype.grow=on.prototype.Hz,on.prototype.subtractMargin=on.prototype.Fv,on.prototype.addMargin=on.prototype.Co,on.prototype.inflate=on.prototype.Bc,on.prototype.offset=on.prototype.offset,on.prototype.contains=on.prototype.contains,on.prototype.containsRect=on.prototype.Re,on.prototype.containsPoint=on.prototype.ca,on.prototype.equalsApprox=on.prototype.Xa,on.prototype.equalTo=on.prototype.hi,on.prototype.equals=on.prototype.D,on.prototype.setSize=on.prototype.tA,on.prototype.setPoint=on.prototype.dd,on.prototype.set=on.prototype.set,on.prototype.setTo=on.prototype.sg;var Gi=null,Co=null,Zo=[];on.className="Rect",on.parse=ts,on.stringify=Bl,on.contains=ia,on.intersects=mi,on.ZeroRect=Gi=new on(0,0,0,0).ja(),on.NoRect=Co=new on(NaN,NaN,NaN,NaN).ja(),on.parse=ts,on.stringify=Bl,on.contains=ia,on.intersects=mi;function wr(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):$t("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}wr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},wr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},wr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},wr.prototype.copy=function(){var a=new wr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Qe=wr.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ku(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 wr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new wr(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new wr(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new wr(x,E):new wr(x,E,te,ne)}return new wr}function Xs(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Qe.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Qe.D=function(a){return a instanceof wr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Qe.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Qe.Xa=function(a){return Ht.B(this.top,a.top)&&Ht.B(this.right,a.right)&&Ht.B(this.bottom,a.bottom)&&Ht.B(this.left,a.left)},Qe.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},wr.alloc=function(){var a=ku.pop();return a===void 0?new wr:a},wr.free=function(a){ku.push(a)},wr.prototype.isReal=wr.prototype.w,wr.prototype.equalsApprox=wr.prototype.Xa,wr.prototype.equalTo=wr.prototype.hi,wr.prototype.equals=wr.prototype.D,wr.prototype.set=wr.prototype.set,wr.prototype.setTo=wr.prototype.sg;var xs=null,ic=null,ku=[];wr.className="Margin",wr.parse=Ku,wr.stringify=Xs,wr.ZeroMargin=xs=new wr(0,0,0,0).ja(),wr.TwoMargin=ic=new wr(2,2,2,2).ja(),wr.parse=Ku,wr.stringify=Xs;function ar(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var ba,La,Cl,Ca,Xa,vi,Il,us,hs,Ys,lh,oc,Is,Jl,Rc,rd,Pf,id,Bc,Ah,uh,cu,Ic,bf,od,za,Hp,ad,_c,jh,ws,Ps,Wa,ns,zc,El;ar.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ar.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},ar.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ar.prototype.copy=function(){var a=new ar;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Qe=ar.prototype,Qe.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Qe.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ea(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Gc(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ba;if(a==="TopLeft")return La;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Cl;if(a==="TopRight")return Ca;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Xa;if(a==="Center")return vi;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Il;if(a==="BottomLeft")return us;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return hs;if(a==="BottomRight")return Ys;if(a==="TopSide")return lh;if(a==="LeftSide")return oc;if(a==="RightSide")return Is;if(a==="BottomSide")return Jl;if(a==="TopBottomSides")return Rc;if(a==="LeftRightSides")return rd;if(a==="TopLeftSides")return Pf;if(a==="TopRightSides")return id;if(a==="BottomLeftSides")return Bc;if(a==="BottomRightSides")return Ah;if(a==="NotTopSide")return uh;if(a==="NotLeftSide")return cu;if(a==="NotRightSide")return Ic;if(a==="NotBottomSide")return bf;if(a==="AllSides")return od;if(a==="Default")return za;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 ar(x,E,te,ne)}return new ar}function Uc(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Qe.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(ba)?"None":this.D(La)?"TopLeft":this.D(Cl)?"Top":this.D(Ca)?"TopRight":this.D(Xa)?"Left":this.D(vi)?"Center":this.D(Il)?"Right":this.D(us)?"BottomLeft":this.D(hs)?"Bottom":this.D(Ys)?"BottomRight":this.D(lh)?"TopSide":this.D(oc)?"LeftSide":this.D(Is)?"RightSide":this.D(Jl)?"BottomSide":this.D(Rc)?"TopBottomSides":this.D(rd)?"LeftRightSides":this.D(Pf)?"TopLeftSides":this.D(id)?"TopRightSides":this.D(Bc)?"BottomLeftSides":this.D(Ah)?"BottomRightSides":this.D(uh)?"NotTopSide":this.D(cu)?"NotLeftSide":this.D(Ic)?"NotRightSide":this.D(bf)?"NotBottomSide":this.D(od)?"AllSides":this.D(za)?"Default":"None"},Qe.D=function(a){return a instanceof ar?(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},Qe.gv=function(){return new ar(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Qe.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Hp))a=oc;else if(a.D(ad))a=Is;else if(a.D(_c))a=lh;else if(a.D(jh))a=Jl;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Qe.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Qe.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Qe.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Qe.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Qe.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},ar.alloc=function(){var a=Cf.pop();return a===void 0?new ar:a},ar.free=function(a){Cf.push(a)},ar.prototype.isDefault=ar.prototype.Xb,ar.prototype.isNone=ar.prototype.ys,ar.prototype.isSide=ar.prototype.$c,ar.prototype.isNoSpot=ar.prototype.Mc,ar.prototype.isSpot=ar.prototype.sb,ar.prototype.includesSide=ar.prototype.Hf,ar.prototype.opposite=ar.prototype.gv,ar.prototype.equals=ar.prototype.D,ar.prototype.set=ar.prototype.set,ar.prototype.setTo=ar.prototype.sg;var Cf=[];ar.className="Spot",ar.parse=Gc,ar.stringify=Uc,ar.None=ba=Ea(new ar(0,0,0,0),0).ja(),ar.Default=za=Ea(new ar(0,0,-1,0),-1).ja(),ar.TopLeft=La=new ar(0,0,0,0).ja(),ar.TopCenter=Cl=new ar(.5,0,0,0).ja(),ar.TopRight=Ca=new ar(1,0,0,0).ja(),ar.LeftCenter=Xa=new ar(0,.5,0,0).ja(),ar.Center=vi=new ar(.5,.5,0,0).ja(),ar.RightCenter=Il=new ar(1,.5,0,0).ja(),ar.BottomLeft=us=new ar(0,1,0,0).ja(),ar.BottomCenter=hs=new ar(.5,1,0,0).ja(),ar.BottomRight=Ys=new ar(1,1,0,0).ja(),ar.MiddleTop=ws=Cl,ar.MiddleLeft=Ps=Xa,ar.MiddleRight=Wa=Il,ar.MiddleBottom=ns=hs,ar.Top=_c=Cl,ar.Left=Hp=Xa,ar.Right=ad=Il,ar.Bottom=jh=hs,ar.TopSide=lh=Ea(new ar(0,0,1,1),1).ja(),ar.LeftSide=oc=Ea(new ar(0,0,1,2),1).ja(),ar.RightSide=Is=Ea(new ar(0,0,1,4),1).ja(),ar.BottomSide=Jl=Ea(new ar(0,0,1,8),1).ja(),ar.TopBottomSides=Rc=Ea(new ar(0,0,1,9),1).ja(),ar.LeftRightSides=rd=Ea(new ar(0,0,1,6),1).ja(),ar.TopLeftSides=Pf=Ea(new ar(0,0,1,3),1).ja(),ar.TopRightSides=id=Ea(new ar(0,0,1,5),1).ja(),ar.BottomLeftSides=Bc=Ea(new ar(0,0,1,10),1).ja(),ar.BottomRightSides=Ah=Ea(new ar(0,0,1,12),1).ja(),ar.NotTopSide=uh=Ea(new ar(0,0,1,14),1).ja(),ar.NotLeftSide=cu=Ea(new ar(0,0,1,13),1).ja(),ar.NotRightSide=Ic=Ea(new ar(0,0,1,11),1).ja(),ar.NotBottomSide=bf=Ea(new ar(0,0,1,7),1).ja(),ar.AllSides=od=Ea(new ar(0,0,1,15),1).ja(),zc=new ar(.156,.156).ja(),El=new ar(.844,.844).ja(),ar.parse=Gc,ar.stringify=Uc;function Wr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Wr.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},Wr.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},Wr.prototype.copy=function(){var a=new Wr;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},Wr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Wr.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},Wr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Wr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Wr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Wr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,te=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Wr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),te=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},Wr.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},Qe=Wr.prototype,Qe.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Qe.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Qe.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)},Qe.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))},Qe.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))},Qe.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,se=this.m21,he=this.m22,ge=this.dx,ye=this.dy,Me=y*te+x*se+ge,_e=y*ne+x*he+ye,Ke=b*te+x*se+ge,qe=b*ne+x*he+ye;return x=y*te+E*se+ge,y=y*ne+E*he+ye,te=b*te+E*se+ge,b=b*ne+E*he+ye,E=Math.min(Me,Ke),Me=Math.max(Me,Ke),Ke=Math.min(_e,qe),_e=Math.max(_e,qe),E=Math.min(E,x),Me=Math.max(Me,x),Ke=Math.min(Ke,y),_e=Math.max(_e,y),E=Math.min(E,te),Me=Math.max(Me,te),Ke=Math.min(Ke,b),_e=Math.max(_e,b),a.h(E,Ke,Me-E,_e-Ke),a},Wr.alloc=function(){var a=sd.pop();return a===void 0?new Wr:a},Wr.free=function(a){sd.push(a)},Wr.prototype.transformRect=Wr.prototype.pp,Wr.prototype.transformPoint=Wr.prototype.Ga,Wr.prototype.scale=Wr.prototype.scale,Wr.prototype.translate=Wr.prototype.translate,Wr.prototype.rotate=Wr.prototype.rotate,Wr.prototype.invert=Wr.prototype.Vj,Wr.prototype.multiplyInverted=Wr.prototype.bv,Wr.prototype.multiply=Wr.prototype.multiply,Wr.prototype.reset=Wr.prototype.reset,Wr.prototype.isIdentity=Wr.prototype.ws,Wr.prototype.equals=Wr.prototype.D,Wr.prototype.setTransform=Wr.prototype.setTransform,Wr.prototype.set=Wr.prototype.set;var sd=[];Wr.className="Transform",Wr.xF="54a702f3e53909c447824c6706603faf4c";var Ht={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Ht.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Ht.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var se=a,he=x;else se=x,he=a;if(y<b)var ge=y,ye=b;else ge=b,ye=y;if(a===x)return ge<=ne&&ne<=ye&&a-E<=te&&te<=a+E;if(y===b)return se<=te&&te<=he&&y-E<=ne&&ne<=y+E;if(he+=E,se-=E,se<=te&&te<=he&&(ye+=E,ge-=E,ge<=ne&&ne<=ye))if(he-se>ye-ge)if(a-x>E||x-a>E){if(te=(b-y)/(x-a)*(te-a)+y,te-E<=ne&&ne<=te+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=te&&te<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,te,ne,se,he,ge,ye,Me){if(Ht.Yb(a,y,ne,se,Me,x,b)&&Ht.Yb(a,y,ne,se,Me,E,te))return Ht.Yb(a,y,ne,se,Me,ge,ye);var _e=(a+x)/2,Ke=(y+b)/2,qe=(x+E)/2,rt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(_e+qe)/2,x=(Ke+rt)/2,qe=(qe+E)/2,rt=(rt+te)/2;var Mt=(b+qe)/2,xt=(x+rt)/2;return Ht.cs(a,y,_e,Ke,b,x,Mt,xt,he,ge,ye,Me)||Ht.cs(Mt,xt,qe,rt,E,te,ne,se,he,ge,ye,Me)},ax:function(a,y,x,b,E,te,ne,se,he){var ge=(x+E)/2,ye=(b+te)/2;return he.h((((a+x)/2+ge)/2+(ge+(E+ne)/2)/2)/2,(((y+b)/2+ye)/2+(ye+(te+se)/2)/2)/2),he},My:function(a,y,x,b,E,te,ne,se){var he=(x+E)/2,ge=(b+te)/2;return Er(((a+x)/2+he)/2,((y+b)/2+ge)/2,(he+(E+ne)/2)/2,(ge+(te+se)/2)/2)},Dl:function(a,y,x,b,E,te,ne,se,he,ge){if(Ht.Yb(a,y,ne,se,he,x,b)&&Ht.Yb(a,y,ne,se,he,E,te))bo(ge,a,y,0,0),bo(ge,ne,se,0,0);else{var ye=(a+x)/2,Me=(y+b)/2,_e=(x+E)/2,Ke=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+_e)/2,x=(Me+Ke)/2,_e=(_e+E)/2,Ke=(Ke+te)/2;var qe=(b+_e)/2,rt=(x+Ke)/2;Ht.Dl(a,y,ye,Me,b,x,qe,rt,he,ge),Ht.Dl(qe,rt,_e,Ke,E,te,ne,se,he,ge)}return ge},Qe:function(a,y,x,b,E,te,ne,se,he,ge){if(Ht.Yb(a,y,ne,se,he,x,b)&&Ht.Yb(a,y,ne,se,he,E,te))ge.length===0&&(ge.push(a),ge.push(y)),ge.push(ne),ge.push(se);else{var ye=(a+x)/2,Me=(y+b)/2,_e=(x+E)/2,Ke=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+_e)/2,x=(Me+Ke)/2,_e=(_e+E)/2,Ke=(Ke+te)/2;var qe=(b+_e)/2,rt=(x+Ke)/2;Ht.Qe(a,y,ye,Me,b,x,qe,rt,he,ge),Ht.Qe(qe,rt,_e,Ke,E,te,ne,se,he,ge)}return ge},jv:function(a,y,x,b,E,te,ne,se,he,ge){if(Ht.Yb(a,y,E,te,ge,x,b))return Ht.Yb(a,y,E,te,ge,se,he);var ye=(a+x)/2,Me=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var _e=(ye+x)/2,Ke=(Me+b)/2;return Ht.jv(a,y,ye,Me,_e,Ke,ne,se,he,ge)||Ht.jv(_e,Ke,x,b,E,te,ne,se,he,ge)},OA:function(a,y,x,b,E,te,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+te)/2)/2),ne},iv:function(a,y,x,b,E,te,ne,se){if(Ht.Yb(a,y,E,te,ne,x,b))bo(se,a,y,0,0),bo(se,E,te,0,0);else{var he=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Me=(ge+b)/2;Ht.iv(a,y,he,ge,ye,Me,ne,se),Ht.iv(ye,Me,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(Ht.Yb(a,y,E,te,ne,x,b))se.length===0&&(se.push(a),se.push(y)),se.push(E),se.push(te);else{var he=(a+x)/2,ge=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Me=(ge+b)/2;Ht.ep(a,y,he,ge,ye,Me,ne,se),Ht.ep(ye,Me,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,ge,ye,Me,_e,Ke){if(Ht.Yb(a,y,ne,se,_e,x,b)&&Ht.Yb(a,y,ne,se,_e,E,te))return!Ht.Rl(a,y,ne,se,he,ge,ye,Me)||(_e=(a-ne)*(ge-Me)-(y-se)*(he-ye),_e===0)?!1:(Ke.h(((a*se-y*ne)*(he-ye)-(a-ne)*(he*Me-ge*ye))/_e,((a*se-y*ne)*(ge-Me)-(y-se)*(he*Me-ge*ye))/_e),!0);var qe=(a+x)/2,rt=(y+b)/2,Mt=(x+E)/2,xt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(qe+Mt)/2,x=(rt+xt)/2,Mt=(Mt+E)/2,xt=(xt+te)/2;var At=(b+Mt)/2,Ot=(x+xt)/2,Dt=1/0,_t=!1,Yt=0,_n=0;return Ht.Eo(a,y,qe,rt,b,x,At,Ot,he,ge,ye,Me,_e,Ke)&&(a=(Ke.x-he)*(Ke.x-he)+(Ke.y-ge)*(Ke.y-ge),a<Dt&&(Dt=a,_t=!0,Yt=Ke.x,_n=Ke.y)),Ht.Eo(At,Ot,Mt,xt,E,te,ne,se,he,ge,ye,Me,_e,Ke)&&(Ke.x-he)*(Ke.x-he)+(Ke.y-ge)*(Ke.y-ge)<Dt&&(_t=!0,Yt=Ke.x,_n=Ke.y),_t&&(Ke.x=Yt,Ke.y=_n),_t},Fo:function(a,y,x,b,E,te,ne,se,he,ge,ye,Me,_e){var Ke=0;if(Ht.Yb(a,y,ne,se,_e,x,b)&&Ht.Yb(a,y,ne,se,_e,E,te)){if(_e=(a-ne)*(ge-Me)-(y-se)*(he-ye),_e===0)return Ke;var qe=((a*se-y*ne)*(he-ye)-(a-ne)*(he*Me-ge*ye))/_e,rt=((a*se-y*ne)*(ge-Me)-(y-se)*(he*Me-ge*ye))/_e;if(qe>=ye)return Ke;if((he>ye?he-ye:ye-he)<(ge>Me?ge-Me:Me-ge)){if(y<se?(he=y,a=se):(he=se,a=y),rt<he||rt>a)return Ke}else if(a<ne?(he=a,a=ne):he=ne,qe<he||qe>a)return Ke;0<_e?Ke++:0>_e&&Ke--}else{qe=(a+x)/2,rt=(y+b)/2;var Mt=(x+E)/2,xt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(qe+Mt)/2,x=(rt+xt)/2,Mt=(Mt+E)/2,xt=(xt+te)/2;var At=(b+Mt)/2,Ot=(x+xt)/2;Ke+=Ht.Fo(a,y,qe,rt,b,x,At,Ot,he,ge,ye,Me,_e),Ke+=Ht.Fo(At,Ot,Mt,xt,E,te,ne,se,he,ge,ye,Me,_e)}return Ke},qh:function(a,y,x,b,E,te,ne){return Ht.$(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)):Ht.$(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 Ht.B(a,x)&&Ht.B(y,b)?(he.h(a,y),!1):Ht.$(E,ne)?Ht.$(a,x)?(Ht.qh(a,y,x,b,E,te,he),!1):Ht.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),Ht.$(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),Ht.$(se,ne)?(Ht.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),Ht.$(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)):Ht.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return Ht.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,se,he,ge){function ye(Mt,xt){var At=(Mt-a)*(Mt-a)+(xt-y)*(xt-y);At<Me&&(Me=At,he.h(Mt,xt))}var Me=1/0;ye(he.x,he.y);var _e=0,Ke=0,qe=0,rt=0;if(E<ne?(_e=E,Ke=ne):(_e=ne,Ke=E),te<se?(qe=E,rt=ne):(qe=ne,rt=E),_e=(Ke-_e)/2+ge,ge=(rt-qe)/2+ge,E=(E+ne)/2,te=(te+se)/2,_e===0||ge===0)return he;if(.5>(x>a?x-a:a-x)){if(_e=1-(x-E)*(x-E)/(_e*_e),0>_e)return he;_e=Math.sqrt(_e),b=-ge*_e+te,ye(x,ge*_e+te),ye(x,b)}else{if(x=(b-y)/(x-a),b=1/(_e*_e)+x*x/(ge*ge),se=2*x*(y-x*a)/(ge*ge)-2*x*te/(ge*ge)-2*E/(_e*_e),_e=se*se-4*b*(2*x*a*te/(ge*ge)-2*y*te/(ge*ge)+te*te/(ge*ge)+E*E/(_e*_e)-1+(y-x*a)*(y-x*a)/(ge*ge)),0>_e)return he;_e=Math.sqrt(_e),ge=(-se+_e)/(2*b),ye(ge,x*ge-x*a+y),_e=(-se-_e)/(2*b),ye(_e,x*_e-x*a+y)}return he},Ff:function(a,y,x,b,E,te,ne,se,he){var ge=1e21,ye=a,Me=y;if(Ht.Ve(a,y,a,b,E,te,ne,se,he)){var _e=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te);_e<ge&&(ge=_e,ye=he.x,Me=he.y)}return Ht.Ve(x,y,x,b,E,te,ne,se,he)&&(_e=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),_e<ge&&(ge=_e,ye=he.x,Me=he.y)),Ht.Ve(a,y,x,y,E,te,ne,se,he)&&(y=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),y<ge&&(ge=y,ye=he.x,Me=he.y)),Ht.Ve(a,b,x,b,E,te,ne,se,he)&&(a=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),a<ge&&(ge=a,ye=he.x,Me=he.y)),he.h(ye,Me),1e21>ge},us:function(a,y,x){return Ht.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,se){var he=a+x,ge=y+b;return E===ne?(te<se?(ne=te,te=se):ne=se,a<=E&&E<=he&&ne<=ge&&te>=y):te===se?(E<ne?(se=E,E=ne):se=ne,y<=te&&te<=ge&&se<=he&&E>=a):!!(ia(a,y,x,b,E,te)||ia(a,y,x,b,ne,se)||Ht.Rl(a,y,he,y,E,te,ne,se)||Ht.Rl(he,y,he,ge,E,te,ne,se)||Ht.Rl(he,ge,a,ge,E,te,ne,se)||Ht.Rl(a,ge,a,y,E,te,ne,se))},Rl:function(a,y,x,b,E,te,ne,se){return a===x&&y===b&&E===ne&&te===se?a===E&&y===te:0>=Ht.Fl(a,y,x,b,E,te)*Ht.Fl(a,y,x,b,ne,se)&&0>=Ht.Fl(E,te,ne,se,a,y)*Ht.Fl(E,te,ne,se,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var se=b>E?-1:1;te=[];var he=ne/2,ge=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return he=ge+se*Math.min(b,he),se=a+x*Math.cos(ge),ge=y+x*Math.sin(ge),a+=x*Math.cos(he),y+=x*Math.sin(he),x=(se+a)/2,he=(ge+y)/2,te.push([se,ge,x,he,x,he,a,y]),te;for(;1e-5<b;)E=ge+se*Math.min(b,he),te.push(Ht.Vy(x,ge,E,a,y)),b-=Math.abs(E-ge),ge=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),se=a*Math.sin(te),he=-se,ge=ne*ne+he*he,ye=ge+ne*ne+he*se;return ge=4/3*(Math.sqrt(2*ge*ye)-ye)/(ne*se-he*ne),se=ne-ge*he,ne=he+ge*ne,he=-ne,ge=te+y,te=Math.cos(ge),ge=Math.sin(ge),[b+a*Math.cos(y),E+a*Math.sin(y),b+se*te-ne*ge,E+se*ge+ne*te,b+se*te-he*ge,E+se*ge+he*te,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,te,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/te)*te+b;var se=x;return x+E-a<E/2&&(se=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(se,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,te=0>b;if(a<y)var ne=1,se=0;else ne=0,se=1;var he=ne===0?a:y,ge=ne===0?x:b;return(ne===0?E:te)&&(ge=-ge),ne=se,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),Ht.az(he,ne===0?a:y,ge,x,0,0)},az:function(a,y,x,b,E,te){if(0<b)if(0<x){E=a*a,te=y*y,a*=x;var ne=y*b,se=-te+ne,he=-te+Math.sqrt(a*a+ne*ne);y=se;for(var ge=0;9999999999>ge&&(y=.5*(se+he),!(y===se||y===he));++ge){var ye=a/(y+E),Me=ne/(y+te);if(ye=ye*ye+Me*Me-1,0<ye)se=y;else if(0>ye)he=y;else break}x=E*x/(y+E)-x,b=te*b/(y+te)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,te=a*x,te<b?(b=te/b,te=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+te*te)):x=Math.abs(x-a);return x},Ze:new xr,um:new xr,Mf:new xr,Nf:0,vm:100};Ht.za=Ht.AA;function jn(a){Ni(this),this.l=2,a===void 0&&(a=jn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===jn.o?this.ee=new kn:(jn.V===null&&(jn.V=new kn().freeze()),this.ee=jn.V),this.aq=this.ee.Ja,this.Ip=new on().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=La,this.gg=Ys,this.Rk=this.Sk=NaN,this.Uf=wn}jn.prototype.copy=function(){var a=new jn;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===jn.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},jn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},jn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==jn.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},jn.prototype.ka=function(){if(Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==jn.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},jn.prototype.Xa=function(a){if(!(a instanceof jn))return!1;if(this.type!==a.type)return this.type===jn.j&&a.type===jn.o?Hd(this,a):a.type===jn.j&&this.type===jn.o?Hd(a,this):!1;if(this.type===jn.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 Ht.B(this.startX,a.startX)&&Ht.B(this.startY,a.startY)&&Ht.B(this.endX,a.endX)&&Ht.B(this.endY,a.endY)};function Hd(a,y){return a.type!==jn.j||y.type!==jn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Ht.B(a.startX,y.startX)&&Ht.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===eo&&Ht.B(a.endX,y.endX)&&Ht.B(a.endY,y.endY))))}jn.ia=function(a){return a.toString()},jn.prototype.qb=function(a){a.classType===jn&&(this.type=a)},jn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case jn.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 jn.u:var y=new on(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 jn.F:if(y=new on(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 jn.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()}},jn.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},jn.parse=function(a,y){function x(){return rt>=Dt-1?!0:ge[rt+1].match(_t)!==null}function b(){return rt++,ge[rt]}function E(Or){var br=parseFloat(b()),xi=parseFloat(b());Mt===Mt.toLowerCase()&&(br=Ot.x+br,xi=Ot.y+xi),Or.h(br,xi)}function te(){return E(Ot),Ot}function ne(){return E(At),At}function se(){var Or=xt.toLowerCase();return Or!=="c"&&Or!=="s"&&Or!=="q"&&Or!=="t"?Ot:new Et(2*Ot.x-At.x,2*Ot.y-At.y)}y===void 0&&(y=!1);var he=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(he,"$1 $2"),a=a.replace(he,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var ge=a.split(" ");for(a=0;a<ge.length;a++){var ye=ge[a];if(ye.match(/(\.[0-9]*)(\.)/gm)!==null){he=sr();for(var Me="",_e=!1,Ke=0;Ke<ye.length;Ke++){var qe=ye[Ke];qe!=="."||_e?qe==="."?(he.push(Me),Me="."):Me+=qe:(_e=!0,Me+=qe)}for(he.push(Me),ge.splice(a,1),ye=0;ye<he.length;ye++)ge.splice(a+ye,0,he[ye]);a+=he.length-1,dr(he)}}var rt=-1,Mt="",xt="";he=new Et(0,0);var At=new Et(0,0),Ot=new Et(0,0),Dt=ge.length;a=A1(null),_e=Me=ye=!1,Ke=!0,qe=null;for(var _t=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(rt>=Dt-1);)if(xt=Mt,Mt=b(),Mt!=="")switch(Mt.toUpperCase()){case"X":Ke=!0,Me=ye=!1;break;case"M":for(qe=te(),a.mc===null||Ke===!0?(mp(a,qe.x,qe.y,ye,!Me,_e),Ke=!1):a.moveTo(qe.x,qe.y),he.assign(Ot);!x();)qe=te(),a.lineTo(qe.x,qe.y);break;case"L":for(;!x();)qe=te(),a.lineTo(qe.x,qe.y);break;case"H":for(;!x();)Ot=new Et((Mt===Mt.toLowerCase()?Ot.x:0)+parseFloat(b()),Ot.y),a.lineTo(Ot.x,Ot.y);break;case"V":for(;!x();)Ot=new Et(Ot.x,(Mt===Mt.toLowerCase()?Ot.y:0)+parseFloat(b())),a.lineTo(Ot.x,Ot.y);break;case"C":for(;!x();){qe=new Et,E(qe);var Yt=ne(),_n=te();yc(a,qe.x,qe.y,Yt.x,Yt.y,_n.x,_n.y)}break;case"S":for(;!x();)qe=se(),Yt=ne(),_n=te(),yc(a,qe.x,qe.y,Yt.x,Yt.y,_n.x,_n.y);break;case"Q":for(;!x();)qe=ne(),Yt=te(),Um(a,qe.x,qe.y,Yt.x,Yt.y);break;case"T":for(;!x();)At=qe=se(),Yt=te(),Um(a,qe.x,qe.y,Yt.x,Yt.y);break;case"B":for(;!x();){qe=parseFloat(b()),Yt=parseFloat(b()),_n=parseFloat(b());var Jn=parseFloat(b()),Xn=parseFloat(b()),Mn=Xn,mn=!1;x()||(Mn=parseFloat(b()),x()||(mn=parseFloat(b())!==0)),Mt===Mt.toLowerCase()&&(_n+=Ot.x,Jn+=Ot.y),a.arcTo(qe,Yt,_n,Jn,Xn,Mn,mn)}break;case"A":for(;!x();)qe=Math.abs(parseFloat(b())),Yt=Math.abs(parseFloat(b())),_n=parseFloat(b()),Xn=Jn=!1,mn=Mn=0,Mn=b(),Mn.length===1?(Jn=!!parseFloat(Mn),Xn=!!parseFloat(b()),Mn=parseFloat(b())):Mn.length===2?(Jn=!!parseFloat(Mn[0]),Xn=!!parseFloat(Mn[1]),Mn=parseFloat(b())):(Jn=!!parseFloat(Mn[0]),Xn=!!parseFloat(Mn[1]),Mn=parseFloat(Mn.slice(2))),mn=parseFloat(b()),Mt===Mt.toLowerCase()&&(Mn=Ot.x+Mn,mn=Ot.y+mn),Ot.h(Mn,mn),bx(a,qe,Yt,_n,Jn,Xn,Mn,mn);break;case"Z":Px(a),Ot.assign(he);break;case"F":for(qe="",Yt=1;ge[rt+Yt];)if(ge[rt+Yt]==="0")_e=!0,Yt++;else if(ge[rt+Yt].match(/[Uu]/)!==null)Yt++;else if(ge[rt+Yt].match(_t)===null)Yt++;else{qe=ge[rt+Yt];break}qe.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(qe="",Yt=1;ge[rt+Yt];)if(ge[rt+Yt].match(/[Ff]/)!==null)Yt++;else if(ge[rt+Yt].match(_t)===null)Yt++;else{qe=ge[rt+Yt];break}qe.match(/[Mm]/)?Me=!0:a.mc.isShadowed=!1}if(he=a.os,Hm=a,y)for(y=he.figures.iterator;y.next();)y.value.isFilled=!0;return he},jn.Ha=function(a,y){for(var x=a.length,b=Et.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}Et.free(b)},jn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===jn.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},jn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===jn.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),ld(this,a,!1),bo(a,0,0,0,0),a.freeze()},jn.prototype.ix=function(){var a=new on;return ld(this,a,!0),a};function ld(a,y,x){switch(a.type){case jn.j:case jn.u:case jn.F:x?y.h(a.od,a.pd,0,0):bo(y,a.od,a.pd,0,0),bo(y,a.Dc,a.Ec,0,0);break;case jn.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):bo(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,se=ne.length,he=te.startX,ge=te.startY,ye=0;ye<se;ye++){var Me=ne[ye];switch(Me.type){case eo:case ua:he=Me.endX,ge=Me.endY,bo(y,he,ge,0,0);break;case Ra:Ht.Dl(he,ge,Me.point1X,Me.point1Y,Me.point2X,Me.point2Y,Me.endX,Me.endY,.5,y),he=Me.endX,ge=Me.endY;break;case $s:Ht.iv(he,ge,Me.point1X,Me.point1Y,Me.endX,Me.endY,.5,y),he=Me.endX,ge=Me.endY;break;case Qo:case cl:var _e=Me.type===Qo?_s(Me,te):kl(Me,te,he,ge),Ke=_e.length;if(Ke===0){he=Me.type===Qo?Me.centerX:Me.endX,ge=Me.type===Qo?Me.centerY:Me.endY,bo(y,he,ge,0,0);break}Me=null;for(var qe=0;qe<Ke;qe++)Me=_e[qe],Ht.Dl(Me[0],Me[1],Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.5,y);Me!==null&&(he=Me[6],ge=Me[7]);break;default:$t("Unknown Segment type: "+Me.type)}}}break;default:$t("Unknown Geometry type: "+a.type)}}jn.prototype.normalize=function(){this._isFrozen&&cr(this);var a=this.ix();return this.offset(-a.x,-a.y),new Et(-a.x,-a.y)},jn.prototype.offset=function(a,y){return this._isFrozen&&cr(this),this.transform(1,0,0,1,a,y),this},jn.prototype.scale=function(a,y){return this._isFrozen&&cr(this),this.transform(a,0,0,y,0,0),this},jn.prototype.rotate=function(a,y,x){this._isFrozen&&cr(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Wr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Wr.free(b),this},Qe=jn.prototype,Qe.transform=function(a,y,x,b,E,te){switch(this.type){case jn.j:case jn.u:case jn.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 jn.o:for(var he=this.figures.s,ge=he.length,ye=0;ye<ge;ye++){var Me=he[ye];ne=Me.startX,se=Me.startY,Me.startX=ne*a+se*x+E,Me.startY=ne*y+se*b+te,Me=Me.segments.s;for(var _e=Me.length,Ke=0;Ke<_e;Ke++){var qe=Me[Ke];switch(qe.type){case eo:case ua:ne=qe.endX,se=qe.endY,qe.endX=ne*a+se*x+E,qe.endY=ne*y+se*b+te;break;case Ra:ne=qe.point1X,se=qe.point1Y,qe.point1X=ne*a+se*x+E,qe.point1Y=ne*y+se*b+te,ne=qe.point2X,se=qe.point2Y,qe.point2X=ne*a+se*x+E,qe.point2Y=ne*y+se*b+te,ne=qe.endX,se=qe.endY,qe.endX=ne*a+se*x+E,qe.endY=ne*y+se*b+te;break;case $s:ne=qe.point1X,se=qe.point1Y,qe.point1X=ne*a+se*x+E,qe.point1Y=ne*y+se*b+te,ne=qe.endX,se=qe.endY,qe.endX=ne*a+se*x+E,qe.endY=ne*y+se*b+te;break;case Qo:ne=qe.centerX,se=qe.centerY,qe.centerX=ne*a+se*x+E,qe.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),qe.startAngle+=ne),0>a&&(qe.startAngle=180-qe.startAngle,qe.sweepAngle=-qe.sweepAngle),0>b&&(qe.startAngle=-qe.startAngle,qe.sweepAngle=-qe.sweepAngle),qe.radiusX*=Math.sqrt(a*a+x*x),qe.radiusY!==void 0&&(qe.radiusY*=Math.sqrt(y*y+b*b));break;case cl:if(ne=qe.endX,se=qe.endY,qe.endX=ne*a+se*x+E,qe.endY=ne*y+se*b+te,qe.radiusX===0||qe.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),qe.xAxisRotation+=ne),0>a&&(qe.xAxisRotation=180-qe.xAxisRotation,qe.isClockwiseArc=!qe.isClockwiseArc),0>b&&(qe.xAxisRotation=-qe.xAxisRotation,qe.isClockwiseArc=!qe.isClockwiseArc),qe.radiusX*=Math.sqrt(a*a+x*x),qe.radiusY*=Math.sqrt(y*y+b*b);break;default:$t("Unknown Segment type: "+qe.type)}}}}return this._isInvalidBounds=!0,this},Qe.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 jn.j:return Ht.Yb(x,b,E,te,y,a.x,a.y);case jn.u:var ne=on.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),on.free(ne),a;case jn.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 jn.o:return Vu(this,a,y,!0,!1);default:return!1}};function Vu(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,se=0,he,ge,ye,Me,_e=a.figures.s,Ke=_e.length,qe=0;qe<Ke;qe++){var rt=_e[qe],Mt=!rt.isEvenOdd;if(rt.isFilled){if(b&&rt.ca(te,y,x))return!0;var xt=rt.segments;he=rt.startX,ge=rt.startY;for(var At=he,Ot=ge,Dt=xt.s,_t=0;_t<=xt.length;_t++){var Yt=void 0;if(_t!==xt.length){Yt=Dt[_t];var _n=Yt.type;a=Yt.endX,Me=Yt.endY}else _n=eo,a=At,Me=Ot;switch(_n){case ua:if(At=Mu(te,y,ne,y,he,ge,At,Ot),isNaN(At))return!0;se+=At,At=a,Ot=Me;break;case eo:if(he=Mu(te,y,ne,y,he,ge,a,Me),isNaN(he))return!0;se+=he;break;case Ra:ye=Ht.Fo(he,ge,Yt.point1X,Yt.point1Y,Yt.point2X,Yt.point2Y,a,Me,ne,y,te,y,.5),se+=ye;break;case $s:ye=Ht.Fo(he,ge,(he+2*Yt.point1X)/3,(ge+2*Yt.point1Y)/3,(2*Yt.point1X+a)/3,(2*Yt.point1Y+Me)/3,a,Me,ne,y,te,y,.5),se+=ye;break;case Qo:case cl:_n=Yt.type===Qo?_s(Yt,rt):kl(Yt,rt,he,ge);var Jn=_n.length;if(Jn===0){if(he=Mu(te,y,ne,y,he,ge,Yt.type===Qo?Yt.centerX:Yt.endX,Yt.type===Qo?Yt.centerY:Yt.endY),isNaN(he))return!0;se+=he;break}Yt=null;for(var Xn=0;Xn<Jn;Xn++){if(Yt=_n[Xn],Xn===0){if(ye=Mu(te,y,ne,y,he,ge,Yt[0],Yt[1]),isNaN(ye))return!0;se+=ye}ye=Ht.Fo(Yt[0],Yt[1],Yt[2],Yt[3],Yt[4],Yt[5],Yt[6],Yt[7],ne,y,te,y,.5),se+=ye}Yt!==null&&(a=Yt[6],Me=Yt[7]);break;default:$t("Unknown Segment type: "+Yt.type)}he=a,ge=Me}if(Mt){if(se!==0)return!0}else if(se%2!==0)return!0;se=0}else if(rt.ca(te,y,E?x:x+2))return!0}return!1}function Mu(a,y,x,b,E,te,ne,se){if(Ht.Yb(E,te,ne,se,.05,a,y))return NaN;var he=(a-x)*(te-se);if(he===0)return 0;var ge=((a*b-y*x)*(E-ne)-(a-x)*(E*se-te*ne))/he;if(y=(a*b-y*x)*(te-se)/he,ge>=a)return 0;if((E>ne?E-ne:ne-E)<(te>se?te-se:se-te)){if(te<se){if(y<te||y>se)return 0}else if(y<se||y>te)return 0}else if(E<ne){if(ge<E||ge>ne)return 0}else if(ge<ne||ge>E)return 0;return 0<he?1:-1}function Oh(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}Qe.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Et),this.type===jn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],ge=he.length;for(a=0;a<ge;a++){var ye=he[a];if(ne+ye>=te)return b=te-ne,b=ye===0?0:b/ye,x=x[se],se=x[2*a],E=x[2*a+1],y.h(se+(x[2*a+2]-se)*b,E+(x[2*a+3]-E)*b),y;ne+=ye}}return y},Qe.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===jn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,te=0,ne=0;ne<b;ne++){var se=x[ne],he=se.length;for(a=0;a<he;a++){var ge=se[a];if(te+ge>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;te+=ge}}return NaN},Qe.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===jn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],ge=he.length;for(a=0;a<ge;a++){var ye=he[a];if(ne+ye>=te)return b=te-ne,b=ye===0?0:b/ye,ye=x[se],x=ye[2*a],se=ye[2*a+1],E=ye[2*a+2],a=ye[2*a+3],y[0]=x+(E-x)*b,y[1]=se+(a-se)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-se)?0:1>Math.abs(E-x)?0<=a-se?90:270:1>Math.abs(a-se)?0<=E-x?0:180:180*Math.atan2(a-se,E-x)/Math.PI,y;ne+=ye}}return y},Qe.xx=function(a){if(this.type===jn.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=Et.alloc();return Ht.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,Et.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===jn.u){ne=this.startX,se=this.startY;var he=this.endX;if(E=this.endY,ne!==he||se!==E){y=he-ne,x=E-se,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),he),a=Math.min(Math.max(a,se),E),ne=Math.abs(b-ne),he=Math.abs(b-he),se=Math.abs(a-se),E=Math.abs(a-E);var ge=Math.min(ne,he,se,E);if(ge===se)return b/te;if(ge===he)return(y+a)/te;if(ge===E)return(2*y+x-b)/te;if(ge===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=Et.alloc(),E=1/0,se=ne=0,he=y.length;for(var ye=ge=0,Me=0;Me<he;Me++)for(var _e=y[Me],Ke=x[Me],qe=_e.length,rt=0;rt<qe;rt+=2){var Mt=_e[rt],xt=_e[rt+1];if(rt!==0){Ht.qh(ge,ye,Mt,xt,a.x,a.y,b);var At=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);At<E&&(E=At,ne=se,ne+=Math.sqrt((b.x-ge)*(b.x-ge)+(b.y-ye)*(b.y-ye))),se+=Ke[(rt-2)/2]}ge=Mt,ye=xt}return Et.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function Hc(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===jn.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===jn.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===jn.F){var te=new pa;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new ci(Qo);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=_s(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];Ht.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(Fh(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,te=E.startY,se=ne,he=te;for(var ge=E.segments.s,ye=ge.length,Me=0;Me<ye;Me++){var _e=ge[Me];switch(_e.type){case ua:4<=b.length&&(y.push(b),x.push(Fh(b))),b=[],b.push(_e.endX),b.push(_e.endY),ne=_e.endX,te=_e.endY,se=ne,he=te;break;case eo:b.push(_e.endX),b.push(_e.endY),ne=_e.endX,te=_e.endY;break;case Ra:Ht.Qe(ne,te,_e.point1X,_e.point1Y,_e.point2X,_e.point2Y,_e.endX,_e.endY,.5,b),ne=_e.endX,te=_e.endY;break;case $s:Ht.ep(ne,te,_e.point1X,_e.point1Y,_e.endX,_e.endY,.5,b),ne=_e.endX,te=_e.endY;break;case Qo:var Ke=_s(_e,E),qe=Ke.length;if(qe===0){b.push(_e.centerX),b.push(_e.centerY),ne=_e.centerX,te=_e.centerY;break}for(var rt=0;rt<qe;rt++){var Mt=Ke[rt];Ht.Qe(ne,te,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],te=Mt[7]}break;case cl:if(Ke=kl(_e,E,ne,te),qe=Ke.length,rt=_e.endX,Mt=_e.endY,qe===0){b.push(rt),b.push(Mt),ne=rt,te=Mt;break}for(rt=0;rt<qe;rt++)Mt=Ke[rt],Ht.Qe(ne,te,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],te=Mt[7];break;default:$t("Segment not of valid type: "+_e.type)}_e.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(Fh(b)))}}}function Fh(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(Mr(x,b,ne,se))),x=ne,b=se}return y}Qe.add=function(a){return this.ee.add(a),this},Qe.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&cr(this),this.fg=new ar(a,y,E,te).freeze(),this.gg=new ar(x,b,ne,se).freeze(),this},cn.Object.defineProperties(jn.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 Hc(this),this.tk}},flattenedLengths:{get:function(){return Hc(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===jn.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===jn.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&&cr(this,a),this.na=a,a===jn.o?this.ee=new kn:(jn.V===null&&(jn.V=new kn().freeze()),this.ee=jn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&cr(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&cr(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&cr(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&cr(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&cr(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&cr(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&cr(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&cr(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),jn.prototype.setSpots=jn.prototype.pm,jn.prototype.add=jn.prototype.add,jn.prototype.getFractionForPoint=jn.prototype.xx,jn.prototype.getPointAndAngleAlongPath=jn.prototype.Qu,jn.prototype.getAngleAlongPath=jn.prototype.wx,jn.prototype.getPointAlongPath=jn.prototype.Pu,jn.prototype.containsPoint=jn.prototype.ca,jn.prototype.transform=jn.prototype.transform,jn.prototype.rotate=jn.prototype.rotate,jn.prototype.scale=jn.prototype.scale,jn.prototype.offset=jn.prototype.offset,jn.prototype.normalize=jn.prototype.normalize,jn.prototype.computeBoundsWithoutOrigin=jn.prototype.ix,jn.prototype.equalsApprox=jn.prototype.Xa,jn.className="Geometry",jn.j=new tn(jn,"Line",0),jn.u=new tn(jn,"Rectangle",1),jn.F=new tn(jn,"Ellipse",2),jn.o=new tn(jn,"Path",3),jn.V=null,jn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",jn.className="Geometry",jn.stringify=jn.ia,jn.fillPath=jn.nb,jn.parse=jn.parse,jn.Line=jn.j,jn.Rectangle=jn.u,jn.Ellipse=jn.F,jn.Path=jn.o;function pa(a,y,x,b,E){Ni(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 kn,this.sr=this.pl.Ja,this.fw=null}pa.prototype.copy=function(){var a=new pa;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},Qe=pa.prototype,Qe.Xa=function(a){if(!(a instanceof pa&&Ht.B(this.startX,a.startX)&&Ht.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},Qe.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},Qe.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},Qe.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},Qe.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},Qe.add=function(a){return this.pl.add(a),this},Qe.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,se=this.segments.s,he=se.length,ge=0;ge<he;ge++){var ye=se[ge];switch(ye.type){case ua:te=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case eo:if(Ht.Yb(b,E,ye.endX,ye.endY,x,a,y))return!0;b=ye.endX,E=ye.endY;break;case Ra:if(Ht.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 $s:if(Ht.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 Qo:case cl:var Me=ye.type===Qo?_s(ye,this):kl(ye,this,b,E),_e=Me.length,Ke=ye.type===Qo?ye.centerX:ye.endX,qe=ye.type===Qo?ye.centerY:ye.endY;if(_e===0){if(Ht.Yb(b,E,Ke,qe,x,a,y))return!0;b=Ke,E=qe;break}for(Ke=null,qe=0;qe<_e;qe++)if(Ke=Me[qe],qe===0&&Ht.Yb(b,E,Ke[0],Ke[1],x,a,y)||Ht.cs(Ke[0],Ke[1],Ke[2],Ke[3],Ke[4],Ke[5],Ke[6],Ke[7],.5,a,y,x))return!0;Ke!==null&&(b=Ke[6],E=Ke[7]);break;default:$t("Unknown Segment type: "+ye.type)}if(ye.isClosed&&(b!==te||E!==ne)&&Ht.Yb(b,E,te,ne,x,a,y))return!0}return!1},cn.Object.defineProperties(pa.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&cr(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&cr(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&cr(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&cr(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&cr(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&cr(this,a),this.pl=a,this._isInvalidBounds=!0}}}),pa.prototype.add=pa.prototype.add,pa.prototype.equalsApprox=pa.prototype.Xa,pa.className="PathFigure";function ci(a,y,x,b,E,te,ne,se){Ni(this),a===void 0&&(a=eo),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===cl?(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===Qo&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===Qo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}ci.prototype.copy=function(){var a=new ci;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},Qe=ci.prototype,Qe.Xa=function(a){if(!(a instanceof ci)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ua:case eo:return Ht.B(this.endX,a.endX)&&Ht.B(this.endY,a.endY);case Ra:return Ht.B(this.endX,a.endX)&&Ht.B(this.endY,a.endY)&&Ht.B(this.point1X,a.point1X)&&Ht.B(this.point1Y,a.point1Y)&&Ht.B(this.point2X,a.point2X)&&Ht.B(this.point2Y,a.point2Y);case $s:return Ht.B(this.endX,a.endX)&&Ht.B(this.endY,a.endY)&&Ht.B(this.point1X,a.point1X)&&Ht.B(this.point1Y,a.point1Y);case Qo:return Ht.B(this.startAngle,a.startAngle)&&Ht.B(this.sweepAngle,a.sweepAngle)&&Ht.B(this.centerX,a.centerX)&&Ht.B(this.centerY,a.centerY)&&Ht.B(this.radiusX,a.radiusX)&&Ht.B(this.radiusY,a.radiusY);case cl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Ht.B(this.xAxisRotation,a.xAxisRotation)&&Ht.B(this.endX,a.endX)&&Ht.B(this.endY,a.endY)&&Ht.B(this.radiusX,a.radiusX)&&Ht.B(this.radiusY,a.radiusY);default:return!1}},Qe.qb=function(a){a.classType===ci&&(this.type=a)},Qe.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ua:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case eo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ra: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 $s: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 Qo: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 cl: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":"")},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.close=function(){return this.isClosed=!0,this};function _s(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=Ht.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=Wr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),jn.Ha(te,ne),Wr.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function kl(a,y,x,b){function E(rt,Mt,xt,At){return(rt*At<Mt*xt?-1:1)*Math.acos((rt*xt+Mt*At)/(Math.sqrt(rt*rt+Mt*Mt)*Math.sqrt(xt*xt+At*At)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var te=a.Pg;y===0&&(y=1e-4),te===0&&(te=1e-4);var ne=Math.PI/180*a.Ne,se=a.isLargeArc,he=a.isClockwiseArc,ge=a.Dc,ye=a.Ec,Me=Math.cos(ne),_e=Math.sin(ne),Ke=Me*(x-ge)/2+_e*(b-ye)/2;ne=-_e*(x-ge)/2+Me*(b-ye)/2;var qe=Ke*Ke/(y*y)+ne*ne/(te*te);return 1<qe&&(y*=Math.sqrt(qe),te*=Math.sqrt(qe)),qe=(se===he?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Ke*Ke)/(y*y*ne*ne+te*te*Ke*Ke)),isNaN(qe)&&(qe=0),se=qe*y*ne/te,qe=qe*-te*Ke/y,isNaN(se)&&(se=0),isNaN(qe)&&(qe=0),x=(x+ge)/2+Me*se-_e*qe,b=(b+ye)/2+_e*se+Me*qe,ye=E(1,0,(Ke-se)/y,(ne-qe)/te),Me=(Ke-se)/y,ge=(ne-qe)/te,Ke=(-Ke-se)/y,se=(-ne-qe)/te,ne=E(Me,ge,Ke,se),Ke=(Me*Ke+ge*se)/(Math.sqrt(Me*Me+ge*ge)*Math.sqrt(Ke*Ke+se*se)),-1>=Ke?ne=Math.PI:1<=Ke&&(ne=0),!he&&0<ne&&(ne-=2*Math.PI),he&&0>ne&&(ne+=2*Math.PI),he=y>te?1:y/te,Ke=y>te?te/y:1,y=Ht.jx(0,0,y>te?y:te,ye,ye+ne,!0),te=Wr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Ke),jn.Ha(y,te),Wr.free(te),a.ae=y,a.ae}cn.Object.defineProperties(ci.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&&cr(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&cr(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&cr(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&cr(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&cr(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&cr(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&cr(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&cr(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&cr(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&yr(a,">= zero",ci,"radiusX"),this._isFrozen&&cr(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&yr(a,">= zero",ci,"radiusY"),this._isFrozen&&cr(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&cr(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&&cr(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&&cr(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&&cr(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&&cr(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),ci.prototype.equalsApprox=ci.prototype.Xa;var ua=new tn(ci,"Move",0),eo=new tn(ci,"Line",1),Ra=new tn(ci,"Bezier",2),$s=new tn(ci,"QuadraticBezier",3),Qo=new tn(ci,"Arc",4),cl=new tn(ci,"SvgArc",4);ci.className="PathSegment",ci.Move=ua,ci.Line=eo,ci.Bezier=Ra,ci.QuadraticBezier=$s,ci.Arc=Qo,ci.SvgArc=cl;function Ya(){this.H=null,this.xu=new Et(0,0).freeze(),this.mt=new Et(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}Ya.prototype.copy=function(){var a=new Ya;return this.clone(a)},Ya.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},Ya.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},Ya.prototype.So=function(a,y){var x=this.diagram;return x===null||Ll(x,a,y),y},Ya.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Ll(x,a,y),y.assign(x.Ps(y))),y},cn.Object.defineProperties(Ya.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}}}),Ya.prototype.getMultiTouchDocumentPoint=Ya.prototype.Bz,Ya.prototype.getMultiTouchViewPoint=Ya.prototype.So,Ya.className="InputEvent";function Zu(){this.H=null,this.xa="",this.ar=this.Lr=null}Zu.prototype.copy=function(){var a=new Zu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Zu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},cn.Object.defineProperties(Zu.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}}}),Zu.className="DiagramEvent";function Lo(){this.Fm=fo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Lo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Lo.prototype.copy=function(){var a=new Lo;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=xn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=xn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=xn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=xn(y)&&typeof y.J=="function"?y.J():y,a},Lo.prototype.qb=function(a){a.classType===Lo&&(this.change=a)},Lo.prototype.toString=function(){var a="";return a=this.change===zs?a+"* ":this.change===fo?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===zs?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=ii(this.object)),this.oldValue!==null&&(a+=" old: "+ii(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+ii(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Lo.prototype.I=function(a){return a?this.oldValue:this.newValue},Lo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Lo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Lo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Lo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Lo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},cn.Object.defineProperties(Lo.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===zs&&(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}}}),Lo.prototype.redo=Lo.prototype.redo,Lo.prototype.canRedo=Lo.prototype.canRedo,Lo.prototype.undo=Lo.prototype.undo,Lo.prototype.canUndo=Lo.prototype.canUndo,Lo.prototype.getParam=Lo.prototype.Dz,Lo.prototype.getValue=Lo.prototype.I,Lo.prototype.clear=Lo.prototype.clear;var zs=new tn(Lo,"Transaction",-1),fo=new tn(Lo,"Property",0),Xo=new tn(Lo,"Insert",1),oa=new tn(Lo,"Remove",2);Lo.className="ChangedEvent",Lo.Transaction=zs,Lo.Property=fo,Lo.Insert=Xo,Lo.Remove=oa;function xa(){this.o=new kn().freeze(),this.xa="",this.j=!1}xa.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},xa.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()},xa.prototype.canUndo=function(){return this.isComplete},xa.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()}},xa.prototype.canRedo=function(){return this.isComplete},xa.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()}},xa.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Kn,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===fo&&b.object){var E=y.get(b.object);E||(E=new Kn,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()}},cn.Object.defineProperties(xa.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}}}),xa.prototype.optimize=xa.prototype.ak,xa.prototype.redo=xa.prototype.redo,xa.prototype.canRedo=xa.prototype.canRedo,xa.prototype.undo=xa.prototype.undo,xa.prototype.canUndo=xa.prototype.canUndo,xa.prototype.clear=xa.prototype.clear,xa.className="Transaction";function jo(){this.Pt=new bn,this.Jd=!1,this.u=new kn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new kn().freeze(),this.hl=new kn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}jo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
|
|
`+this.history.M(b).toString(a-1);return y},jo.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},jo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Qe=jo.prototype,Qe.Xw=function(a){this.Pt.add(a)},Qe.Rx=function(a){this.Pt.remove(a)},Qe.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},Qe.eb=function(a){return a===void 0&&(a=""),Dh(this,!0,a)},Qe.Kf=function(){return Dh(this,!1,"")};function Dh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Nr("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}Qe.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},jo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},jo.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){Nr("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},jo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},jo.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){Nr("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},jo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Lo;for(b.change=zs,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},jo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new xa);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||Nr("Change not within a transaction: "+x.toString()))}},jo.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},cn.Object.defineProperties(jo.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),jo.prototype.handleChanged=jo.prototype.Tu,jo.prototype.redo=jo.prototype.redo,jo.prototype.undo=jo.prototype.undo,jo.prototype.canUndo=jo.prototype.canUndo,jo.prototype.discardHistoryAfterIndex=jo.prototype.lx,jo.prototype.rollbackTransaction=jo.prototype.Kf,jo.prototype.commitTransaction=jo.prototype.eb,jo.prototype.startTransaction=jo.prototype.Ea,jo.prototype.removeModel=jo.prototype.Rx,jo.prototype.addModel=jo.prototype.Xw,jo.prototype.clear=jo.prototype.clear,jo.className="UndoManager";function li(){Ni(this),this.H=tl,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ya,this.Zr=-1}li.prototype.toString=function(){return this.name!==""?this.name+" Tool":Ar(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,Et.allocAt(NaN,NaN)),b=y.So(1,Et.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}Et.free(x),Et.free(b)},li.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Et.allocAt(NaN,NaN)),b=y.So(1,Et.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 Et((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}Et.free(x),Et.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(Ho?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||(Ho?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,Wd(a,b,x),b.handled};function Wd(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===Wc&&!y.shift||E===ac&&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===Wc&&y.shift||E===ac&&!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=Vr(function(){x.doWaitAfter(b)},a)},li.prototype.cancelWaitAfter=function(){this.Zr!==-1&&en.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},cn.Object.defineProperties(li.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Xt&&(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 po(){li.call(this),this.name="ToolManager",this.hb=new kn,this.ob=new kn,this.Hb=new kn,this.F=this.V=850,this.o=new pn(2,2).ja(),this.Ha=5e3,this.ia=ac,this.u=Ef,this.Mp=this.j=null,this.zj=-1}Vt(po,li),po.prototype.initializeStandardTools=function(){},po.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()}},po.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Xu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===hh){y.bubbles=!0;return}if(this.gestureBehavior===Xu)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===ac?this.mouseWheelBehavior=Wc:this.mouseWheelBehavior===Wc&&(this.mouseWheelBehavior=ac)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},po.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===hh){y.bubbles=!0;return}if(this.gestureBehavior===Xu)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}}Kd(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Kd(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}po.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof di&&(y===a||y.rg(a))||this.hideToolTip()},po.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()))},po.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)},po.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()},po.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 xo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(en.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Vr(function(){E.hideToolTip()},a)}},po.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}},po.prototype.hideToolTip=function(){this.zj!==-1&&(en.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 xo&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},po.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()},po.prototype.doMouseWheel=function(){this.standardMouseWheel()},po.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},po.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},po.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},po.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},po.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)},cn.Object.defineProperties(po.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}}}),po.prototype.replaceStandardTool=po.prototype.gb;var ac=new tn(po,"WheelScroll",0),Wc=new tn(po,"WheelZoom",1),ud=new tn(po,"WheelNone",2),Ef=new tn(po,"GestureZoom",3),Xu=new tn(po,"GestureCancel",4),hh=new tn(po,"GestureNone",5);po.className="ToolManager",po.WheelScroll=ac,po.WheelZoom=Wc,po.WheelNone=ud,po.GestureZoom=Ef,po.GestureCancel=Xu,po.GestureNone=hh;function Oo(){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 Et(NaN,NaN),this.Fr=new Et,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new bn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Yu;Vt(Oo,li),Oo.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},Oo.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},Oo.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,(Ho?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Oo.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),mr=null,this.isActive=!0,this.tl.set(a.position),bt(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&&ps(a),Yd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,mr=this,Rr=this.diagram,this.doSimulatedDragOut()))};function bt(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Ln?(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 wi,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Oo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Oo.prototype.Pd=function(a){return a===void 0?new Kh(io):this.isGridSnapEnabled?new Kh(new Et(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Kh(a.copy())},Oo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Bt(this),Yc(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Yu.count){for(var y=Yu,x=y.length,b=0;b<x;b++){var E=y.M(b);sn(E),Qt(E),Bt(E),E.diagram.ug()}y.clear()}sn(this),this.tl.h(NaN,NaN),Rr!==null&&(Rr.currentCursor=""),mr=Rr=null,Qt(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Kc(a,!0)},Oo.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 Bt(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Rn(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Gt(){var a=mr;Qt(a),En(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Oo.prototype.doCancel=function(){Qt(this),En(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Oo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Oo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Ut(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")):En(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 Kn,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 Ln&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,bt(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,wc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Qt(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 Ln&&(x.value.point=new Et(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function sn(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 gn(a,y,x){var b=a.diagram,E=a.startPoint,te=Et.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),Et.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(ps(b),b.hk())}Oo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Xc(b,a,y,this.dragOptions,x)};function En(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 Ln&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),wc(b,-E.x,-E.y)}y.bd()}}function Hn(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),$n(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=Rn(a,E,b),!a.isActive&&mr===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof Fr)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&mr===null||(a.doDragOver(y,b),!a.isActive&&mr===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)}Oo.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})},Oo.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 Rn(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&&mr===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=tr(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 tr(a){var y=a.panel;return y!==null?y:a instanceof ur&&!(a instanceof Fr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Gn(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(ge){return b.findValidLinkablePort(ge,x)});a=Et.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(vi,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return Et.free(a),ne}function $n(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=Gn(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=Gn(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)):Ei(E,ne,te,he,se):Ei(E,null,null,null,null)}}}}Oo.prototype.doDragOver=function(){};function Vn(a,y){var x=a.diagram;a.dragsLink&&$n(a,!0),Bt(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;hr(a,E,te),te=tr(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||mr!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof Un&&te.linksConnected.each(function(se){se.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||mr!==null){for(a=on.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Un&&Tr(x,b,a);on.free(a)}}}function hr(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Fr||(x=a.mouseDrop,x!==null&&x(y))}function Tr(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 Ln},!0,function(E){return E instanceof Ln},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Oo.prototype.doDropOnto=function(){},Oo.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()?(Ut(this,!1),Yd(a,this.copiedParts),gn(this,this.copiedParts,!1),Yc(a,this.copiedParts)):this.mayMove()?(Qt(this),gn(this,this.draggedParts,!0)):this.mayDragOut()?(Ut(this,!1),gn(this,this.copiedParts,!1)):Qt(this),Hn(this,a.lastInput.documentPoint))}},Oo.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?(Qt(this),Ut(this,!0),Yd(a,this.copiedParts),gn(this,this.copiedParts,!1),Yc(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,Qt(this),this.mayMove()&&(gn(this,this.draggedParts,!0),Hn(this,a.lastInput.documentPoint))),this.Ym=!0,Vn(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&zr(this),a.Ya(),Yc(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Oo.prototype.simulatedMouseMove=function(a,y,x){if(mr===null)return!1;var b=mr.diagram;x instanceof Xt||(x=null);var E=Rr;return x!==E&&(E!==null&&E!==b&&(E.ug(),mr.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Rr=x,x!==null&&x!==b&&(Gt(),E=x.toolManager.findTool("Dragging"),E!==null&&(Yu.contains(E)||Yu.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)},Oo.prototype.simulatedMouseUp=function(a,y,x){if(mr===null)return!1;var b=Rr,E=mr.diagram;if(x===null)return mr.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),mr.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;Rr=x,b=x.toolManager.findTool("Dragging"),b!==null&&(Gt(),Yu.contains(b)||Yu.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 Et),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=mr,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function zr(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Un&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Oo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Ho?!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())},Oo.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())},Oo.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())},Oo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Oo.prototype.Az=function(){return mr},Oo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=mr;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Oo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),es(a),a.animationManager.Cc(),a=mr,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Oo.prototype.doSimulatedDragLeave=function(){var a=mr;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Oo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=mr;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;qr(this,y.draggedParts.Lf(),!1,a.firstInput),gn(this,this.copiedParts,!1),Hn(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Oo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=mr;if(y!==null){var x=y.diagram;if(y.Ym=!0,Qt(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),qr(this,y.draggedParts.Lf(),!0,a.lastInput),gn(this,this.copiedParts,!1);var b=new bn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Vn(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 qr(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=on.alloc();E=b=1/0;for(var ne=-1/0,se=-1/0,he=y.iterator;he.next();){var ge=he.value;if(ge.isVisible()){var ye=ge.location;ge=ye.x,ye=ye.y,isNaN(ge)||isNaN(ye)||(ge<b&&(b=ge),ye<E&&(E=ye),ge>ne&&(ne=ge),ye>se&&(se=ye))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,se-E),b=te.x+te.width/2,E=te.y+te.height/2,on.free(te),te=a.Fr,ne=new Kn,se=Et.alloc(),he=y.iterator;he.next();)ge=he.value,ge instanceof Ln&&ge.canCopy()&&(ye=x.I(ge),ye!==null&&(ye.points=ge.points,wc(ye,te.x-b,te.y-E),ye.suspendsRouting=!0,ne.add(ye,a.Pd())));for(y=y.iterator;y.next();)ge=y.value,ge.Zc()&&ge.canCopy()&&(he=x.I(ge),he!==null&&(ge=ge.location,se.h(te.x-(b-ge.x),te.y-(E-ge.y)),he.location=se,he.Va(),ne.add(he,a.Pd(se))));Et.free(se),a.copiedParts=ne,bt(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,wc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Oo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Oo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new Et},cn.Object.defineProperties(Oo.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}}}),Oo.prototype.getDraggingSource=Oo.prototype.Az;var mr=null,Rr=null;Oo.className="DraggingTool",Yu=new kn,In("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),po.prototype.doCancel=function(){mr!==null&&mr.doCancel(),li.prototype.doCancel.call(this)};function kr(){li.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Ln,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 Un,y=new Br,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=pi,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Un,y=new Br,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=pi,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 Kn,this.Of=this.gj=this.Pf=null}Vt(kr,li),kr.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},kr.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=pn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,pn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=vi,te=Et.alloc(),x.location=y.ga(vi,te),Et.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},kr.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=pi,y.fromSpot=ba,y.toSpot=ba),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},kr.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},kr.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Un){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)}},kr.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Un))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Un)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},kr.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,te=y.og(x,b,function(Me){return E.findValidLinkablePort(Me,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,se=ne.part;if(se instanceof Un){var he=ne.ga(vi,Et.alloc()),ge=x.x-he.x,ye=x.y-he.y;Et.free(he),he=ge*ge+ye*ye,he<b&&(ge=this.validPortsCache.I(ne),ge!==null?ge&&(y=ne,b=he):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,se,ne)||!a&&this.isValidLink(se,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=he):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof Un&&(x.layer===null||x.layer.allowLink))?y:null},kr.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},kr.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},kr.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},kr.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Un))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Un))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},kr.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)},kr.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 bn;return b.add(a),Qr(this,x,y,b)};function Qr(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Qr(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Qr(a,y.labeledLink,x,b))))}kr.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!==md){if(b===og){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!bi(this,a,y,x,!0)}if(b===ag){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!bi(this,a,y,x,!0)}if(b===ng)return a===y?a=!0:(b=new bn,b.add(y),a=Yr(this,b,a,y,x)),!a;if(b===rg)return!bi(this,a,y,x,!1);if(b===ig)return a===y?a=!0:(b=new bn,b.add(y),a=Xi(this,b,a,y,x)),!a}return!0};function bi(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&&bi(a,ne,x,b,E)))return!0}return!1}function Yr(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&&Yr(a,y,ne,b,E)))return!0}return!1}function Xi(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&&Xi(a,y,se,b,E))return!0}}return!1}cn.Object.defineProperties(kr.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}}}),kr.className="LinkingBaseTool";function Ci(){kr.call(this),this.name="Linking",this.V={},this.F=null,this.K=so,this.Xd=null}Vt(Ci,kr),Ci.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},Ci.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 Un)))return null;var x=this.direction;if(x===so||x===Wo){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===so||x===ho)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Ci.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 Un&&(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 Un&&(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)},Ci.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()},Ci.prototype.doStop=function(){kr.prototype.doStop.call(this),this.startObject=null},Ci.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 Un&&(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)}}},Ci.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Ln)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)},Ci.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Ci.prototype.doNoLink=function(){},cn.Object.defineProperties(Ci.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 so=new tn(Ci,"Either",0),Wo=new tn(Ci,"ForwardsOnly",0),ho=new tn(Ci,"BackwardsOnly",0);Ci.className="LinkingTool",Ci.Either=so,Ci.ForwardsOnly=Wo,Ci.BackwardsOnly=ho;function wi(){kr.call(this),this.name="Relinking";var a=new Br;a.figure="Diamond",a.desiredSize=qi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Br,a.figure="Diamond",a.desiredSize=qi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new on}Vt(wi,kr),wi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Ln){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)}},wi.prototype.makeAdornment=function(a,y){var x=new di;return x.type=Cn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},wi.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},wi.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 Ln))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=Hr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Hr),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},wi.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Sp||x===Pc)&&(x=Ns),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}},wi.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()},wi.prototype.doStop=function(){kr.prototype.doStop.call(this),this.handle=null},wi.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 Un&&(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()}}},wi.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},wi.prototype.doNoRelink=function(){};function Ei(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)}cn.Object.defineProperties(wi.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}}}),wi.className="RelinkingTool",In("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),In("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Pr(){li.call(this),this.name="LinkReshaping";var a=new Br;a.figure="Rectangle",a.desiredSize=vo,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Br,a.figure="Diamond",a.desiredSize=qi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Et,this.Yq=new kn}Vt(Pr,li),Pr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Ai},Pr.prototype.om=function(a,y){a.reshapingBehavior=y},Pr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Ln){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)}},Pr.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=Cn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Fl)for(var se=x+ne;se<te-ne;se++){var he=this.makeResegmentHandle(a,se);he!==null&&(he.segmentIndex=se,he.segmentFraction=.5,he.fromMaxLinks=999,E.add(he))}for(ne=x+1;ne<te;ne++)if(se=this.makeHandle(a,ne),se!==null){if(se.segmentIndex=ne,ne!==x)if(ne===x+1&&b){he=y.i(x);var ge=y.i(x+1);Ht.B(he.x,ge.x)&&Ht.B(he.y,ge.y)&&(ge=y.i(x-1)),Ht.B(he.x,ge.x)?(this.om(se,Fi),se.cursor="n-resize"):Ht.B(he.y,ge.y)&&(this.om(se,Oi),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),ge=y.i(te),Ht.B(he.x,ge.x)&&Ht.B(he.y,ge.y)&&(he=y.i(te+1)),Ht.B(he.x,ge.x)?(this.om(se,Fi),se.cursor="n-resize"):Ht.B(he.y,ge.y)&&(this.om(se,Oi),se.cursor="w-resize")):ne!==te&&(this.om(se,So),se.cursor="move");E.add(se)}E.adornedObject=a}return E},Pr.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Pr.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Pr.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},Pr.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 Ln){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}}},Pr.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Pr.prototype.stopTransaction=function(){var a=this.diagram,y=li.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Pr.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Pr.prototype.getResegmentingPoint=function(){return this.handle.ga(vi)},Pr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Pr.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&&(ei(this,ne,b,E,te,!0)||ei(this,ne,b,E,te,!1))){var se=y.points.copy();ei(this,ne,b,E,te,!0)?(se.cd(x-2,new Et(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new Et(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new Et((te.x+ne.x)/2,ne.y)),se.cd(x+1,new Et((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&&(ei(this,b,E,te,ne,!0)||ei(this,b,E,te,ne,!1))&&(se=y.points.copy(),ei(this,b,E,te,ne,!0)?(se.cd(x-1,new Et(b.x,(b.y+ne.y)/2)),se.cd(x+2,new Et(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new Et((b.x+ne.x)/2,b.y)),se.cd(x+2,new Et((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=Et.alloc(),Ht.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()),Et.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function ei(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}Pr.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===Fi?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Oi&&(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===Fi?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Oi&&(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);Ht.B(te.x,E.x)&&Ht.B(E.y,ne.y)?(Ht.B(te.x,y.i(b-2).x)&&!Ht.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),Ht.B(ne.y,y.i(b+2).y)&&!Ht.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Ht.B(te.y,E.y)&&Ht.B(E.x,ne.x)?(Ht.B(te.y,y.i(b-2).y)&&!Ht.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),Ht.B(ne.x,y.i(b+2).x)&&!Ht.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Ht.B(te.x,E.x)&&Ht.B(E.x,ne.x)?(Ht.B(te.x,y.i(b-2).x)&&!Ht.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),Ht.B(ne.x,y.i(b+2).x)&&!Ht.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Ht.B(te.y,E.y)&&Ht.B(E.y,ne.y)&&(Ht.B(te.y,y.i(b-2).y)&&!Ht.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),Ht.B(ne.y,y.i(b+2).y)&&!Ht.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(vi,Et.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,Et.alloc()),y.L(0,b.x,b.y),Et.free(te),Et.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(vi,Et.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,Et.alloc()),y.L(y.pointsCount-1,a.x,a.y),Et.free(x),Et.free(a));y.zf()},Pr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case So:return a;case Fi:return new Et(y.i(x).x,a.y);case Oi:return new Et(a.x,y.i(x).y);default:case Ai:return y.i(x)}},cn.Object.defineProperties(Pr.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}}}),Pr.prototype.setReshapingBehavior=Pr.prototype.om,Pr.prototype.getReshapingBehavior=Pr.prototype.Ru;var Ai=new tn(Pr,"None",0),Oi=new tn(Pr,"Horizontal",1),Fi=new tn(Pr,"Vertical",2),So=new tn(Pr,"All",3);Pr.className="LinkReshapingTool",Pr.None=Ai,Pr.Horizontal=Oi,Pr.Vertical=Fi,Pr.All=So,In("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Ui(){li.call(this),this.name="Resizing",this.o=new pn(1,1).freeze(),this.j=new pn(9999,9999).freeze(),this.yg=new pn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Br;a.alignmentFocus=vi,a.figure="Rectangle",a.desiredSize=vo,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Et,this.Dw=new pn,this.Tn=new Et,this.rt=new pn(0,0),this.qt=new pn(1/0,1/0),this.pt=new pn(1,1)}Vt(Ui,li),Ui.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Ln)){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(),tf(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Ui.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new di,y.type=Cn.Spot,y.locationSpot=vi;var x=new Ls;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,La)),y.add(this.makeHandle(a,Ca)),y.add(this.makeHandle(a,Ys)),y.add(this.makeHandle(a,us)),y.add(this.makeHandle(a,ws)),y.add(this.makeHandle(a,Wa)),y.add(this.makeHandle(a,ns)),y.add(this.makeHandle(a,Ps))}else if(ou(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ui.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Ui.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=vi),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 Cn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ui.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},Ui.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))},Ui.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ui.prototype.stopTransaction=function(){var a=this.diagram,y=li.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ui.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ui.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,Et.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),Et.free(E)}},Ui.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,Et.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),Et.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ui.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 Fr){var b=new kn;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()}},Ui.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=vi);var ne=this.adornedObject.naturalBounds,se=ne.x,he=ne.y,ge=ne.x+ne.width,ye=ne.y+ne.height,Me=1;if(!te){Me=ne.width;var _e=ne.height;0>=Me&&(Me=1),0>=_e&&(_e=1),Me=_e/Me}return _e=Et.alloc(),Ht.No(a.x,a.y,se,he,E.width,E.height,_e),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(_e.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.y=Math.max(_e.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width),a.x=ge-a.width,a.y=ye-a.height)):1<=y.y?(a.x=Math.max(_e.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=Math.max(ge-a.x,x.width),a.height=Math.max(Math.min(_e.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width),a.x=ge-a.width)):(a.x=Math.max(_e.x,ge-b.width),a.x=Math.min(a.x,ge-x.width),a.width=ge-a.x,te||(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me,a.y=he+.5*(ye-he-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(_e.x-se,b.width),x.width),a.y=Math.max(_e.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width),a.y=ye-a.height)):1<=y.y?(a.width=Math.max(Math.min(_e.x-se,b.width),x.width),a.height=Math.max(Math.min(_e.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me):(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width))):(a.width=Math.max(Math.min(_e.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Me*a.width,b.height),x.height),a.width=a.height/Me,a.y=he+.5*(ye-he-a.height))):0>=y.y?(a.y=Math.max(_e.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=ye-a.y,te||(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width,a.x=se+.5*(ge-se-a.width))):1<=y.y&&(a.height=Math.max(Math.min(_e.y-he,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Me,b.width),x.width),a.height=Me*a.width,a.x=se+.5*(ge-se-a.width))),Et.free(_e),a},Ui.prototype.computeReshape=function(){var a=yn;return this.adornedObject instanceof Br&&(a=E0(this.adornedObject)),!(a===qn||this.diagram.lastInput.shift)},Ui.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},Ui.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},Ui.prototype.computeCellSize=function(){var a=new pn(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},cn.Object.defineProperties(Ui.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}}}),Ui.className="ResizingTool",In("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ro(){li.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Et,this.ue=null;var a=new Br;a.figure="Ellipse",a.desiredSize=qi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Et(NaN,NaN),this.u=0,this.F=50}Vt(Ro,li),Ro.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)}},Ro.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new di,y.type=Cn.Position,y.locationSpot=vi;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(ou(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ro.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},Ro.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)},Ro.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(vi)},Ro.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)},Ro.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Et(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ro.prototype.stopTransaction=function(){var a=this.diagram,y=li.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ro.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ro.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ro.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()},Ro.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()}},Ro.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},cn.Object.defineProperties(Ro.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}}}),Ro.className="RotatingTool",In("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Go(){li.call(this),this.name="ClickSelecting"}Vt(Go,li),Go.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Go.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Go.className="ClickSelectingTool";function aa(){li.call(this),this.name="Action",this.pk=null}Vt(aa,li),aa.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},aa.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()},aa.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))}},aa.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()},aa.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())},aa.prototype.doStop=function(){this.pk=null},aa.className="ActionTool";function $a(){li.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Et(0,0)}Vt($a,li),$a.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)},$a.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},$a.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 ur)x.Zc()&&(ou(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);xn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=Et.allocAt(a.x,a.y);this.isGridSnapEnabled&&Xd(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),Et.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},cn.Object.defineProperties($a.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}}}),$a.className="ClickCreatingTool";function wa(){li.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new ur;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}Vt(wa,li),wa.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))},wa.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},wa.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},wa.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=pn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),pn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},wa.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()},wa.prototype.computeBoxBounds=function(){var a=this.diagram;return new on(a.firstInput.documentPoint,a.lastInput.documentPoint)},wa.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Ho?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 kn,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)}},cn.Object.defineProperties(wa.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}}}),wa.className="DragSelectingTool";function $i(){li.call(this),this.name="Panning",this.Xt=new Et,this.xy=new Et,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(en.document,"scroll",a.Kw,!1),a.stopTool()}}Vt($i,li),$i.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())},$i.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(en.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},$i.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},$i.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},$i.prototype.doMouseMove=function(){this.move()},$i.prototype.doMouseUp=function(){this.move(),this.stopTool()},$i.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)}},cn.Object.defineProperties($i.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),$i.className="PanningTool",In("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),In("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),In("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),In("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),In("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function xo(){this.F=this.u=this.j=this.o=null}cn.Object.defineProperties(xo.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}}}),xo.className="HTMLInfo";function No(a,y,x){this.text=a,this.hx=y,this.visible=x}No.className="ContextMenuButtonInfo";function Bo(){li.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Et,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Vt(Bo,li);function mo(a){var y=new xo;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},cs=y,a.tu=function(){a.stopTool()},y=Wn("div");var x=Wn("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=Wn("style");en.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",ui,!1),b.addEventListener(y,"selectstart",ui,!1),b.addEventListener(x,"contextmenu",ui,!1)),y.className="goCXforeground",x.className="goCXbackground",en.document.body&&(en.document.body.appendChild(y),en.document.body.appendChild(x)),Ml=y,Qs=x,Js=!0}function ui(a){return a.preventDefault(),!1}Bo.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)},Bo.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Bo.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Bo.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Xt||(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},Bo.prototype.doActivate=function(){},Bo.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)&&Eo(this)},Bo.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())}Eo(this)};function Eo(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof xo||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Na(a,!0),a.isActive||a.stopTool())}Bo.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Na(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=cs,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()}}Bo.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Bo.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 xo&&a.show(y,x,this);this.currentContextMenu=a},Bo.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}},Bo.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 xo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function bs(a){var y=new kn;return y.add(new No("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new No("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new No("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new No("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new No("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new No("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new No("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new No("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new No("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new No("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new No("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new No("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new No("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Bo.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=bs(this)),Ml.innerHTML="",Qs.addEventListener("pointerdown",this.tu,!1);var y=this,x=Wn("ul");x.className="goCXul",Ml.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=Wn("li"),te.className="goCXli";var ne=Wn("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)}}Ml.style.display="block",Qs.style.display="block"},Bo.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===cs){Ml.style.display="none",Qs.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Qs,"pointerdown",this.tu,!1),this.currentContextMenu=null}},cn.Object.defineProperties(Bo.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 Js===!1&&cs===null&&Uo&&mo(this),cs},set:function(a){a===null&&(Js=!0),cs=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var cs=null,Js=!1,Qs=null,Ml=null;Bo.className="ContextMenuTool",In("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Ti(){li.call(this),this.name="TextEditing",this.Zh=new to,this.ia=null,this.V=_l,this.vj=null,this.qa=Tl,this.u=1,this.F=!0,this.o=null,this.j=new xo,this.kt=null,el(this,this.j)}Vt(Ti,li);function el(a,y){if(Uo){var x=Wn("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(Tu)):E==="Tab"?(a.acceptText(Ba),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Tl){var b=a.kt;a.qa===Ql&&(a.qa=ch),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Tl){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 to&&te instanceof Ti)if(te.state===fh)x.style.border="3px solid red",x.focus();else{var ne=b.ga(vi),se=E.position,he=E.scale,ge=b.Df()*he;ge<te.minimumEditorScale&&(ge=te.minimumEditorScale);var ye=b.naturalBounds.width*ge+6,Me=b.naturalBounds.height*ge+2,_e=(ne.x-se.x)*he;ne=(ne.y-se.y)*he,se=b.verticalAlignment,he=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*ge,Me=se.y*Me-se.y*he+se.offsetY-(.5*Me-.5*he)-he/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*ge+"%",x.style.lineHeight="normal",x.style.width=ye+"px",x.style.left=(_e-ye/2|0)-1+"px",x.style.top=(ne+Me|0)-1+"px",x.style.textAlign=b.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=b.lineCount,x.wA=ge,x.className="goTXarea",E.div.appendChild(x),x.focus(),te.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}Ti.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Lu&&Lu!==this&&(Lu.acceptText(rs),Lu&&Lu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof to&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===_l&&!y.isSelected||this.starting===ga&&2>a.lastInput.clickCount)):!1},Ti.prototype.doStart=function(){Lu=this,this.textBlock!==null&&this.doActivate()},Ti.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 to&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Ql;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new on(this.textBlock.ga(La),this.textBlock.ga(Ys));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Ti.prototype.doCancel=function(){this.stopTool()},Ti.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Ti.prototype.doMouseDown=function(){this.isActive&&this.acceptText(rs)},Ti.prototype.acceptText=function(a){switch(a){case rs:this.qa===fs?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Ql||this.qa===fh||this.qa===ch)&&(this.qa=sc,_o(this));break;case Ja:case Tu:case Ba:(Tu!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Ql||this.qa===fh||this.qa===ch)&&(this.qa=sc,_o(this))}};function _o(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=fs,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=fh,a.doError(E,te))}}Ti.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)},Ti.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Ti.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Tl,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Ti.prototype.doStop=function(){Lu=null},Ti.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)))},Ti.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},cn.Object.defineProperties(Ti.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)}}}),Ti.prototype.measureTemporaryTextBlock=Ti.prototype.Lx;var Ja=new tn(Ti,"LostFocus",0),rs=new tn(Ti,"MouseDown",1),Ba=new tn(Ti,"Tab",2),Tu=new tn(Ti,"Enter",3),fl=new tn(Ti,"SingleClick",0),_l=new tn(Ti,"SingleClickSelected",1),ga=new tn(Ti,"DoubleClick",2),Tl=new tn(Ti,"StateNone",0),Ql=new tn(Ti,"StateActive",1),ch=new tn(Ti,"StateEditing",2),sc=new tn(Ti,"StateValidating",3),fh=new tn(Ti,"StateInvalid",4),fs=new tn(Ti,"StateValidated",5),Lu=null;Ti.className="TextEditingTool",Ti.LostFocus=Ja,Ti.MouseDown=rs,Ti.Tab=Ba,Ti.Enter=Tu,Ti.SingleClick=fl,Ti.SingleClickSelected=_l,Ti.DoubleClick=ga,Ti.StateNone=Tl,Ti.StateActive=Ql,Ti.StateEditing=ch,Ti.StateValidating=sc,Ti.StateInvalid=fh,Ti.StateValidated=fs,In("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function is(a){dl||(ql(),dl=!0),this.H=tl,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=ds,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new bn,this.ce=new Aa,this.ce.Yd=this,this.Ei=new bn,this.pu=new bn,this.Sr=new bn,this.pr=new bn,a&&Object.assign(this,a)}is.prototype.Xe=function(a){this.H=a},is.prototype.canStart=function(){return!0};function zl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Pa(a.H),a.zb=!0)}function Nu(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===ds?(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===Ih&&y.vc.clear(),a.Qw=!!(a.Pk===Bh&&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(),_h(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==gs&&b!==null&&(delete b.start.scale,delete b.end.scale),en.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&ps(x),Mf(x),a.zb=!1,y.start(),y.bc&&(Au(a),x.Ya(),gh(y,0),es(x,!0),Gl(a),x.R("AnimationStarting",a)))}))}}function fu(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Rh(a,y,x,b){a.isTicking||fu(a)||y instanceof Ln&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Qe=is.prototype,Qe.fv=function(a){return this.ce.fv(a)},Qe.Xu=function(a){return this.ce.Xu(a)};function dh(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 Xt){se=!0;break e}}se=!1}se?eu(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(Au(E),es(E.H),Gl(E)),en.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),en.requestAnimationFrame(function(){x()}))}function lc(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Au(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 Gl(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Qe.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(),_h(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),_h(y,this.H)},Qe.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))},Qe.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),sa(this,a))},Qe.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),pu(this.ce,y,"position",y.position,y.position),sa(this,a))};function ph(a,y,x){!a.zb||y.D(x)||fu(a)||(a.H.pi||(y=x.copy()),pu(a.ce,a.H,"position",y,x))}function ju(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function sa(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Cs(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],se=a[2];a=a[3];var he=y[0],ge=y[1],ye=y[2];return y=y[3],se===0||se===100?(te=he,ne=ge):(ye===0||ye===100)&&(he=te,ge=ne),180<Math.abs(he-te)&&(he>te?te+=360:he+=360),te=E(x,te,he-te,b)%360,ne=E(x,ne,ge-ne,b),se=E(x,se,ye-se,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+se+"%, "+x+")"}function ql(){function a(x,b,E,te,ne,se){x.position=new Et(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new Kn;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 Et(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 Et(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 Et(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,se){var he=x.actualBounds,ge=E.actualBounds;E=ge.x+ge.width/2-he.width/2,he=ge.y+ge.height/2-he.height/2,ne<se?x.mm(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se),!1):x.position=new Et(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 on(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=Cs(b,E,ne,se,te)}),y.add("stroke",function(x,b,E,te,ne,se){x.stroke=Cs(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=Cs(b,E,ne,se,te)}),y.add("areaBackground",function(x,b,E,te,ne,se){x.areaBackground=Cs(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)}),du=y}cn.Object.defineProperties(is.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&&yr(a,">= 1",is,"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}}}),is.prototype.stopAnimation=is.prototype.Cc;var du=null,dl=!1,ds=new tn(is,"Default",1),Bh=new tn(is,"AnimateLocations",2),Ih=new tn(is,"None",3);is.className="AnimationManager",is.defineAnimationEffect=function(a,y){dl||(ql(),dl=!0),du.add(a,y)},is.Default=ds,is.AnimateLocations=Bh,is.None=Ih;function Aa(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=tu,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=io,this.vc=new Kn,this.Tt=new Kn,this.yl=new bn,this.Ut=new bn,this.dw=dc,a&&Object.assign(this,a)}Aa.prototype.suspend=function(){this.Xk=!0},Aa.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,eu(this,!0),Au(this.Yd),es(this.H),Gl(this.Yd),this.H.redraw()};function _h(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}Qe=Aa.prototype,Qe.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 Xt?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===ds&&this===y.defaultAnimation&&(this.Lp=uc,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=vd),Au(y),this.yl.each(function(b){b.data=null,a.add(b)}),Gl(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,dh(y,this),this)},Qe.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Qe.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Xt?this.H=a:a instanceof zt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof ur){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return pu(this,a,y,x,b,E),this};function pu(a,y,x,b,E,te){var ne=a.vc;if(y instanceof Xt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Zh(b),s0(),b=[Ol.j,Ol.u,Ol.o,Ol.F],Zh(E),s0(),E=[Ol.j,Ol.u,Ol.o,Ol.F]),ne.contains(y)){var se=ne.I(y),he=se.start,ge=se.end;he[x]===void 0&&(he[x]=Qa(b)),ge[x]=Qa(E)}else he={},ge={},he[x]=Qa(b),ge[x]=Qa(E),se=he.position,y instanceof zt&&se instanceof Et&&!se.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&se.assign(ge.position),se=new Ou(he,ge,te),ne.add(y,se);ne=he[x],ne instanceof Et&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof ur?se.Ku.location=Qa(y.location):te&&(se.Ku[x]=Qa(b))}function Qa(a){return a instanceof Et||a instanceof pn?a.copy():a}Qe.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Qe.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function eu(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),Au(x),gh(a,E),es(a.H,!0),Gl(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 gh(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=du,ge;for(ge in ne)ge==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||he.get(ge)===null||he.get(ge)(te,se[ge],ne[ge],a.Lp,y,x,a)}}}Qe.stop=function(){return this.bc?(this.Ml(!0),this):this},Qe.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,Au(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=du;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,ge=E?se.start:se.end,ye=se.Ku,Me;for(Me in ge)if(te.get(Me)!==null){var _e=Me;!se.Hu||_e!=="position:nodeCollapse"&&_e!=="position:placeholder"||(_e="position"),te.get(_e)(ne,he[Me],ye[Me]!==void 0?ye[Me]:se.Hu?he[Me]:ge[Me],this.Lp,this.Gd,this.Gd,this)}se.Hu&&ye.location!==void 0&&ne instanceof ur&&(ne.location=ye.location),se.nv&&ne instanceof ur&&ne.Zb(!1)}if(y.As.clear(),Kc(y,!1),y.Ya(),y.N(),es(y,!0),x.defaultAnimation===this){for(Me=x.pr.iterator;Me.next();)E=Me.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}es(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Gl(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),_h(this,null),x.Ml(this),y.$b())}},Qe.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof Fr&&(b=y.placeholder),b!==null?(x=b.ga(La),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Et(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Fr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Un&&this.Cj(b,y)},Qe.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Fr&&(x=y.placeholder),x!==null){var b=x.ga(La);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 Fr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Un&&this.Aj(b,y)}},Qe.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},cn.Object.defineProperties(Aa.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&yr(a,">= 1",Aa,"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:$t("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}}}),Aa.prototype.getTemporaryState=Aa.prototype.Ez,Aa.prototype.stop=Aa.prototype.stop,Aa.prototype.add=Aa.prototype.add,Aa.prototype.addTemporaryPart=Aa.prototype.Iy;function tu(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function uc(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Aa.className="Animation",Aa.EaseLinear=function(a,y,x,b){return x*a/b+y},Aa.EaseInOutQuad=tu,Aa.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Aa.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Aa.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Aa.EaseOutExpo=uc;function Ou(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ou.className="AnimationState";function pl(a,y,x){this.xd=null,this.rf=a,this.so=x||hc,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Di))}pl.prototype.copy=function(){var a=new pl(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function $u(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))}cn.Object.defineProperties(pl.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var hc=new tn(pl,"Default",1),Di=new tn(pl,"Immediate",2),Si=new tn(pl,"Bundled",3);pl.className="AnimationTrigger",pl.Default=hc,pl.Immediate=Di,pl.Bundled=Si;function fi(a){Ni(this),this.H=null,this.Pa=new kn,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)}Qe=fi.prototype,Qe.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ss(x)}a.clear(),this.Zq.length=0},Qe.Xe=function(a){this.H=a},Qe.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 Fr?E++:he instanceof Un?b++:he instanceof Ln?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&&Zt(b)&&(se+=" #"+Zt(b)),x instanceof Un?se+=" "+ii(b):x instanceof Ln&&(se+=" "+ii(x.fromNode)+" "+ii(x.toNode));return y+" "+this.Pa.count+": "+se},Qe.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=Et.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||tf(se)!==!1)&&se.isVisible()&&(E.assign(a),Zi(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return Et.free(E),se}return Et.free(E),null},Qe.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof kn||b instanceof bn||(b=new bn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=Et.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||tf(he)!==!1)&&he.isVisible()){te.assign(a),Zi(te,he.oe);var ge=he;he.ji(te,y,x,b)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||b.add(ge))}}return Et.free(te),b},Qe.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 kn||E instanceof bn||(E=new bn),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||tf(he)!==!1)&&he.isVisible()){var ge=he;he.Cf(a,y,x,b,E)&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||E.add(ge))}}return E},Qe.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var se=this.Pa.s,he=se.length;he--;){var ge=se[he];if((ne!==!0||tf(ge)!==!1)&&te(ge)&&ge.isVisible()){var ye=ge;ge.Cf(a,y,x,b,E)&&(y!==null&&(ye=y(ye)),ye===null||x!==null&&!x(ye)||E.add(ye))}}return E},Qe.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 kn||E instanceof bn)&&(te=E),E=!0),te instanceof kn||te instanceof bn||(te=new bn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var se=Et.alloc(),he=Et.alloc(),ge=this.Pa.s,ye=ge.length;ye--;){var Me=ge[ye];if((ne!==!0||tf(Me)!==!1)&&Me.isVisible()){se.assign(a),Zi(se,Me.oe),he.h(a.x+y,a.y),Zi(he,Me.oe);var _e=Me;Me.og(se,he,x,b,E,te)&&(x!==null&&(_e=x(_e)),_e===null||b!==null&&!b(_e)||te.add(_e))}}return Et.free(se),Et.free(he),te},Qe.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=sr();for(var E=sr(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Ln){if(ne.fd===!1)continue}else if(ne instanceof di&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&bl(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],R0(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++)R0(E[y]);dr(a),dr(E)}}};function qo(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Qe.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=qo(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=on.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(on.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function qa(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=qo(a,y),se=a.Zq;se.length=0;for(var he=x.scale,ge=on.alloc(),ye=0;ye<te;ye++){var Me=E[ye];b.contains(Me)&&a.Oj(y,Me,x,se,he,ge,!1)}on.free(ge),y.globalAlpha=ne}}}Qe.Oj=function(a,y,x,b,E,te,ne){if(ne&&!tf(y))a.Hs(y);else{if(b!==null&&y instanceof Ln&&(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 ml?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&&(Ko(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(Ko(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),Ko(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))}},Qe.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(fo,a,this,y,x,b,E)},Qe.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&ss(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)),Ju(this,a,y),a},Qe.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,ss(y),a};function Ju(a,y,x){if(y=gu(a,y,x),x instanceof Fr&&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&&Ju(a,-1,y)}x.svg!==null&&x.svg.remove()}function gu(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}cn.Object.defineProperties(fi.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===""&&$t("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&$t("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)&&yr(a,"0 <= value <= 1",fi,"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))}}}),fi.prototype.findObjectsNear=fi.prototype.og,fi.prototype.findObjectsIn=fi.prototype.Cf,fi.prototype.findObjectsAt=fi.prototype.ji,fi.prototype.findObjectAt=fi.prototype.ic,fi.className="Layer";function Xt(a,y){if(cm||(os(),cm=!0),Ni(this),tl=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Uo){var x=this,b=function(){x.removeEventListener(en.document,"DOMContentLoaded",b,!1),x.setRTL()};en.document.body!==null?this.setRTL():x.addEventListener(en.document,"DOMContentLoaded",b,!1)}this.ol=null,tp.add("Model",Ii);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===fo&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,zh(this),this.model=cy(),this.Wg=!0,Vc(this),this.layout=new ko,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new fm,a!==void 0&&(typeof a=="string"||en.Element&&a instanceof Element?kf(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Fu,tl;function zh(a){a.Yd=new is,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new kn,a.pj=new Kn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Et(NaN,NaN).freeze(),a.du=new Et(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Et(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Wr,a.zu=new Et(NaN,NaN).freeze(),a.ut=new on(NaN,NaN,NaN,NaN).freeze(),a.rj=new wr(0,0,0,0).freeze(),a.sj=dc,a.nu=!1,a.Zt=null,a.fu=null,a.yh=gs,a.zk=za,a.Fg=gs,a.pq=za,a.yt=La,a.Bt=La,a.Fc=!0,a.pn=!1,a.De=new bn,a.Eh=new Kn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new wr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ya,a.bq.diagram=a,a.Qg=new Ya,a.Qg.diagram=a,a.cj=new Ya,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,n0(a),a.ai=new bn,a.Ht=!0,a.uu=pc,a.pw=!1,a.wu=md,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 Kn,a.Xn=new kn,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new wr(5).freeze(),a.Hw=new bn().freeze(),a.Nt=999999999,a.nw=new bn().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 bn,a.ow=new bn,a.Xh=null,a.aw=new pn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Et,bounds:new on,Py:new pn,bA:new pn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new on(NaN,NaN,NaN,NaN).freeze(),a.wo=new pn(NaN,NaN).freeze(),a.Sp=new on(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Kn;var y=new Un,x=new to;x.bind(new ta("text","",ii)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Un,x=new to,x.stroke="brown",x.bind(new ta("text","",ii)),y.add(x),a.Lg.add("Comment",y),y=new Un,y.selectable=!1,y.avoidable=!1,x=new Br,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new pn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Kn,y=new Fr,y.selectionObjectName="GROUPPANEL",y.type=Cn.Vertical,x=new to,x.font="bold 12pt sans-serif",x.bind(new ta("text","",ii)),y.add(x),x=new Cn(Cn.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 Ls,b.padding=new wr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Kn,y=new Ln,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 Ln,x=new Br,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new di,y.type=Cn.Auto,x=new Br,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ls,x.margin=new wr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new di,y.type=Cn.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 Ii,a.toolManager=new po,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=cd(),a.eq=null,a.fq=Yi,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 Et,a.zy=500,a.wp=new Et,a.wq=!1}Xt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Df=null,Jc="",hd(this,!1),this.Xn.clear(),pp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function hd(a,y){a.animationManager.Cc(!0),a.Hw=new bn().freeze(),a.nw=new bn().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(),pp(),a.Og.clear(),zo=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function cd(){return null}Xt.prototype.reset=function(){this.clear(),this.vb=!0,zh(this),eh(this),this.Wg=!0,Vc(this),this.layout=new ko,this.Wg=!1,this.model=cy(),this.model.undoManager=new jo,this.vb=this.rn=!1,this.N()},Xt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=en.document.body);var y=Wn("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},Xt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=en.document.body);var y=0;if(Uo){var x=hm;y=Fu,x===null&&(x=hm=Wn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Fu=Wn("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||Ho||(y=11)}this.Db=y,this.Gw=!0},Xt.prototype.qb=function(a){a.classType===Xt&&(this.autoScale=a)},Xt.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 kf(a,y){if(Uo){if(y!=null||$t("Diagram setup requires an argument DIV."),a.Ka!==null&&$t("Diagram has already completed setup."),typeof y=="string"?a.Ka=en.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:$t("No DIV or DIV id supplied: "+y),a.Ka===null&&$t("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&$t("Invalid div id; div already has a Diagram associated with it."),!a.ol&&en.ResizeObserver){var x=Sr(function(){a.$b()},250);a.ol=new en.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}en.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=en.go;var E=new iu(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",en.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),Kp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new iu(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Uo){E=Wn("div");var te=Wn("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=Lf,E.addEventListener("pointerdown",fd),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=Sr(function(){a.Yh=null,a.N()},300),a.Ov=Sr(function(){Mf(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=nl(a,ne,!0);se.bubbles=!0;var he=0,ge=0;se.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(he=0<ne.deltaX?1:-1),ne.deltaY!==0&&(ge=0<ne.deltaY?1:-1),se.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-he:-ge):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(he=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(ge=0<ne.wheelDeltaY?-1:1),se.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-he:-ge):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(se.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),lo(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,nl(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.Yt;se[ne.pointerId]===void 0&&(se[ne.pointerId]=ne),se=a.oj;var he=!1;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType)if(se[1]!==null&&se[1].pointerId===ne.pointerId)se[1]=ne,he=!0;else if(se[0]===null)se[0]=ne;else if(se[1]===null)se[1]=ne,he=!0;else{ne.preventDefault();return}else se[0]=ne;(se=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var ge=he;he=Fo(a,ne,!0,!1,!0,ge),Va(a,ne,he),he.targetDiagram=pd(ne,ne.target),he.targetObject=null,ge||he.clone(a.bq),ge=a.uw,se=se?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(ge.x-ne.screenX)>se||Math.abs(ge.y-ne.screenY)>se)?a.yq++:a.yq=1,he.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():lo(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=Fo(a,ne,!1,!1,!1,se[1]!==null);var he=en.document.elementFromPoint(ne.clientX,ne.clientY)||null;he!==null&&he.shadowRoot!==void 0&&he.shadowRoot!==null&&(he=he.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var ge=a,ye=ne;he&&he.H&&(ye=ne,ge=he.H),se.targetDiagram=ge,Va(a,ye,se),se.targetObject=null,a.doMouseMove(),lo(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=Fo(a,ne,!1,!0,!0,!1);var ge=en.document.elementFromPoint(ne.clientX,ne.clientY)||null;ge!==null&&ge.shadowRoot!==void 0&&ge.shadowRoot!==null&&(ge=ge.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),ge!==null&&ge.H instanceof Xt&&ge.H!==a&&Va(ge.H,ne,he),ge===null&&(ge=ne.target),Va(a,ne,he),he.clickCount=a.yq,he.targetDiagram=pd(ne,ge),he.targetObject=null,a.doMouseUp(),lo(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"+Sd[1]+Sd[2]+"wI"+Bf.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,yd,y,y),b.Vc(!0),Wp(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Xt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Xt.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Wp(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(en,"resize",a.Ov,!1)}function ps(a){30<a.Sq&&(a.Yh=1)}function Kc(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Po&&Po.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Xt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:en.devicePixelRatio||1},Xt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Xt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Xt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Xt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Xt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Xt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Xt.prototype.doFocus=function(){this.focus()},Xt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=en.scrollX||en.pageXOffset,y=en.scrollY||en.pageYOffset;this.ta.focus(),en.scrollTo(a,y)}},Xt.prototype.Oy=function(){this.H.R("GainedFocus")},Xt.prototype.Ny=function(){this.H.R("LostFocus")};function Mf(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===gs&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Vc(a){var y=new fi;y.name="Background",a.Al(y),y=new fi,y.name="",a.Al(y),y=new fi,y.name="Foreground",a.Al(y),y=new fi,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new fi,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new fi,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Tf(a){var y=new Cn(Cn.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 ur,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 Lf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Of(this.H)}function fd(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Of(this.H)}Xt.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,te=this.rj,ne=b.x-te.left,se=b.y-te.top,he=b.width+te.left+te.right,ge=b.height+te.top+te.bottom,ye=b.right+te.right;te=b.bottom+te.bottom;var Me=E.x;b=E.y;var _e=E.width,Ke=E.height,qe=E.right,rt=E.bottom;E=this.scale;var Mt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Mt=Mt+a.scrollWidth-a.clientWidth;break;case"reverse":Mt=a.scrollWidth-Mt-a.clientWidth}var xt=Mt;_e<he||Ke<ge?(Mt=Et.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==xt&&(Mt.x=xt/E+ne,this.ju=xt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Mt.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Mt,Et.free(Mt),this.Ee=this.qr=!1):(Mt=Et.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Me&&(this.position=Mt.h(xt+ne,this.position.y)),ye>qe&&(this.position=Mt.h(-(y.scrollWidth-this.Aa)+xt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Mt.h(this.position.x,a.scrollTop+se)),te>rt&&(this.position=Mt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),Et.free(Mt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ye=b.right,qe=E.right,te=b.bottom,rt=E.bottom,ne=b.x,Me=E.x,se=b.y,b=E.y,_e>=he&&ne>=Me&&ye<=qe&&(x.style.width="1px"),Ke>=ge&&se>=b&&te<=rt&&(x.style.height="1px"))}},Xt.prototype.computeBounds=function(a){return a===void 0&&(a=new on),Pa(this),Nf(this,a)};function Nf(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var se=ne.length,he=0;he<se;he++){var ge=ne[he];ge.isInDocumentBounds&&ge.isVisible()&&(ge=ge.actualBounds,ge.w()&&(x?(x=!1,y.assign(ge)):y.ed(ge)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Xt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(gr(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Ln||(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 Ln||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new on(NaN,NaN,0,0):x};function gl(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=Et.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=on.allocAt(0,0,b.width,b.height);var E=Et.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,on.free(b),Et.free(E),Et.free(x)}x=a.yh,y&&a.Fg!==gs&&(x=a.Fg);var te=x!==gs?Gh(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()?vi:he),dd(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,Ht.B(te.x,x)&&Ht.B(te.y,b)&&Ht.B(te.width,E)&&Ht.B(te.height,ne)||a.onViewportBoundsChanged(new on(x,b,E,ne),te,y,!1)}}function Gh(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===Nl?(y=Math.min(he,se),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Qc?(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}Xt.prototype.zoomToFit=function(){var a=this.sj;this.sj=dc,this.scale=Gh(this,Nl),a!==dc&&(gl(this,!1),dd(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Qe=Xt.prototype,Qe.BA=function(a,y){y===void 0&&(y=Nl);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Nl||y===Qc)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===Qc?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 Et(a.x,a.y)}},Qe.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new Et(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))},Qe.zz=function(a){if(a instanceof zt){this.eq=a;var y=Et.alloc();this.fq=this.op(a.ga(La,y)),Et.free(y)}else this.eq=null,this.fq=Yi};function dd(a,y,x,b,E,te){var ne=Et.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var ge=Et.alloc();ge=a.eq.ga(La,ge),se=ge.x-a.fq.x/a.scale,he=ge.y-a.fq.y/a.scale,E=ba,Et.free(ge)}(te||a.scrollMode===dc)&&(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),ph(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),eh(a),Et.free(ne)}Qe.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 ur)return a}else if(a=mu(this,a,function(x){return x.part}),a instanceof ur)return a;return null},Qe.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Pa(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),Pa(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}Qe.lz=function(a,y,x){return y===void 0&&(y=!0),Uh(this,a,function(b){return b.part},y?function(b){return b instanceof ur&&b.canSelect()}:null,x)};function Uh(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof kn||E instanceof bn||(E=new bn),Pa(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}Qe.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof kn||b instanceof bn||(b=new bn),Pa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},Qe.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Zc(this,a,function(E){return E instanceof ur&&(!x||E.canSelect())},y,b)},Qe.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof kn||E instanceof bn||(E=new bn),Pa(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},Qe.Nu=function(a,y,x,b,E,te){var ne=new bn;Pa(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 Zc(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 kn||E instanceof bn||(E=new bn),Pa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}Qe.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Hh(this,a,y,function(te){return te instanceof ur&&(!b||te.canSelect())},x,E)},Qe.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 kn||E instanceof bn)&&(te=E),E=!0),te instanceof kn||te instanceof bn||(te=new bn),Pa(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 Hh(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 kn||E instanceof bn)&&(te=E),E=!0),te instanceof kn||te instanceof bn||(te=new bn),Pa(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}Xt.prototype.acceptEvent=function(a){return nl(this,a,a instanceof MouseEvent)};function nl(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Va(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),Ho&&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=pd(y,y.target),b.targetObject=null,b}function pd(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 Fo(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,Ho&&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 lo(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Xt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=nl(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(),lo(x,a)},Xt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=nl(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(),lo(x,a)},Xt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=nl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),lo(x,a)},Xt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=nl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),lo(x,a)},Xt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Et(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?Zi(new Et(y,a),this.Ab):new Et(y,a)};function Va(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=Et.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),Et.free(y)):x.documentPoint.h(ne,se)}function Ll(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))}}Xt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Es(a){a.ld||Pa(a),a.Va()}Xt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Qe=Xt.prototype,Qe.Pz=function(){return this.kg},Qe.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,es(this),this.hf=!1,this.du=new Et(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Vr(function(){b.ld=!1,zl(y,"Model"),a(b)},1)},Qe.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;en.requestAnimationFrame(function(){y.kg&&y.bd()})}},Qe.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),es(this))};function nu(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Of(a)||(y&&Pa(a),x&&gl(a,!1))}function es(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];ca(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||Mf(a),nu(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(qu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Pa(a),te=!1,(!a.hf||a.xh)&&(a.hf?qp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),qp(a,!1)),te=!0),a.Jk=!1,Pa(a),a.ou||Es(a),nu(a,!0,!1),ne=!1,te?(x=on.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Qu(a)),a.R("LayoutCompleted"),nu(a,!0,!1),on.free(x)):x.Ok&&x.Qw&&(a.Fg!==gs?a.scale=Gh(a,a.Fg):a.yh!==gs?a.scale=Gh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),gl(a,!0)),te&&ne&&a.eb("Initial Layout"),Pa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Qu(a){if(a.Fg!==gs)a.scale=Gh(a,a.Fg);else if(a.yh!==gs)a.scale=Gh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}gl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),qu(a)}function Pa(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 bn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof Fr&&b.U&65536&&(b.U=b.U^65536)})}}Qe.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Fr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Fr&&x.isVisible()&&Wh(this,x);for(a.reset();a.next();)x=a.value,x instanceof Ln&&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 Wh(a,y){for(var x=sr(),b=sr(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof Fr?(jl(te)||Ms(te)||ef(te))&&Wh(a,te):te instanceof Ln?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(dr(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();dr(b)}Qe.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Qe.gc=function(a){if(this.Ka!==null){if(this.ta===null&&$t("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){jf(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),cc(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?If(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Wr.prototype.Cd=Wr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,jf(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!te.isAnimating)break e;te=this.Ab,te.reset(),ne=this.Mb,se=this.pa;var he=this.Ca,ge=Math.round(se.x*he)/he,ye=Math.round(se.y*he)/he;for(he!==1&&te.scale(he),se.x===0&&se.y===0||te.translate(-ge,-ye),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),cc(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?If(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Wr.prototype.Cd=Wr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=Po&&Po.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 Vd(a,y,x,b,E,te,ne,se,he,ge){if(a.Ka!==null){a.ta===null&&$t("No canvas specified"),ne===void 0&&(ne=null),se===void 0&&(se=null),he===void 0&&(he=!1),ge===void 0&&(ge=!1),jf(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ye=a.Ca;a.Ca=E;var Me=a.Wa.s,_e=Me.length;try{var Ke=new on(te.x,te.y,b.width/E,b.height/E),qe=Ke.copy();qe.Co(x),qu(a,qe),Pa(a),a.Fd(Me,_e,a,Ke),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 rt=a.Mb;y.scale(rt,rt);var Mt=Wr.alloc();Mt.reset(),Mt.translate(x.left,x.top),Mt.scale(E),te.x===0&&te.y===0||Mt.translate(-te.x,-te.y),y.setTransform(Mt.m11,Mt.m12,Mt.m21,Mt.m22,Mt.dx,Mt.dy),y.yc(),y instanceof ml&&Yy(y,Mt.m11,Mt.m12,Mt.m21,Mt.m22,Mt.dx,Mt.dy),Wr.free(Mt),cc(a,y),y.globalAlpha=a.pb;var xt=a.Qj("Grid");if(ne){var At=new bn,Ot=ne.iterator;for(Ot.reset();Ot.next();){var Dt=Ot.value;Dt instanceof ur&&(ge||Dt.layer!==xt)&&(Dt.Gj(),At.add(Dt))}for(ge=0;ge<_e;ge++)qa(Me[ge],y,a,At,he);At.each(function(Yt){return Yt.Gj()})}else for(At=0;At<_e;At++){var _t=Me[At];_t===xt?ge&&_t.gc(y,a,!0):_t.gc(y,a,he)}a.$i=!1,a.Yf&&If(a.Yf,a)&&a.Vp()}finally{a.Ca=ye,a.ib.Vc(!0),a.vd=!0,a.Fd(Me,_e,a,a.viewportBounds),qu(a),a.ib instanceof ml&&(a.ib.Nj.PA(),a.redraw())}}}Qe.Gf=function(a){return this.Rg[a]},Qe.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Qe.Tx=function(){this.Rg=new xr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Ho||la),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function cc(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Qe.Ql=function(a){return this.on[a]},Qe.sA=function(a,y){this.on[a]=y},Qe.Sx=function(){this.on=new xr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Qe.set=function(a){return Object.assign(this,a),this},Qe.Du=function(a){return this.nm(a)},Qe.nm=function(a){return Af(this,a),this};function Af(a,y){var x=a instanceof Cn,b=a instanceof Xt,E;for(E in y){E===""&&$t("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])),xn(te)?ne=E.substr(se+1):$t("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Zr(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Zr(a.toolManager,ne))te=a.toolManager;else if(b&&sm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof er&&ne==="Changed"){a.Pe(y[ne]);continue}else $t('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof zt&&te.Vw(ne)}}Qe.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Kn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Qe.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")},Xt.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!==vd&&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=on.alloc(),Qp(this,this.computeBounds(b)),on.free(b)),b=this.ta,b===null||b instanceof th)))){var ne=this.Mb;E=this.Aa*ne;var se=this.ya*ne,he=this.scale*ne;te=Math.round(Math.round(y.x*he)-Math.round(a.x*he)),y=Math.round(Math.round(y.y*he)-Math.round(a.y*he)),he=this.jw,a=this.oy,he.width!==E&&(he.width=E),he.height!==se&&(he.height=se),a.clearRect(0,0,E,se),he=190*ne;var ge=70*ne,ye=Math.max(te,0),Me=Math.max(y,0),_e=Math.floor(E-ye),Ke=Math.floor(se-Me);a.drawImage(b.Oa,ye,Me,_e,Ke,0,0,_e,Ke),If(this.Yf,this)&&a.clearRect(0,0,he,ge),b=sr(),a=sr(),Ke=Math.abs(te),_e=Math.abs(y);var qe=ye===0?0:E-Ke;ye=Et.allocAt(qe,0),Ke=Et.allocAt(Ke+qe,se),a.push(new on(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y)));var rt=this.Ab;if(rt.reset(),rt.scale(ne,ne),this.Ca!==1&&rt.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&rt.translate(-ne.x,-ne.y),Zi(ye,rt),Zi(Ke,rt),b.push(new on(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y))),qe=Me===0?0:se-_e,ye.h(0,qe),Ke.h(E,_e+qe),a.push(new on(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y))),Zi(ye,rt),Zi(Ke,rt),b.push(new on(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y))),If(this.Yf,this)&&(E=0<te?0:-te,se=0<y?0:-y,ye.h(E,se),Ke.h(he+E,ge+se),a.push(new on(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y))),Zi(ye,rt),Zi(Ke,rt),b.push(new on(Math.min(ye.x,Ke.x),Math.min(ye.y,Ke.y),Math.abs(ye.x-Ke.x),Math.abs(ye.y-Ke.y)))),Et.free(ye),Et.free(Ke),nu(this,!1,!0),this.Ka===null&&$t("No div specified"),this.ta===null&&$t("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(jf(this),se=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*se,this.ya*se),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,he=Math.round(te.x*ne)/ne,ge=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-he,-ge),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)he=a[ne],he.width!==0&&he.height!==0&&E.rect(Math.floor(he.x),Math.floor(he.y),Math.ceil(he.width),Math.ceil(he.height));for(E.clip(),E.setTransform(se,0,0,se,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,te=y.length,this.Fd(y,te,this,this.viewportBounds),cc(this,E),E.globalAlpha=this.pb,se=0;se<te;se++)if(ne=y[se],he=b,ne.visible&&ne.pb!==0){ge=qo(ne,E),Me=ne.Zq,Me.length=0,ye=this.scale,_e=on.alloc(),Ke=ne.Pa.s,rt=Ke.length,qe=he.length;for(var Mt=0;Mt<rt;Mt++){var xt=Ke[Mt],At=Kf(xt,xt.actualBounds);e:{for(var Ot=2/ye,Dt=4/ye,_t=0;_t<qe;_t++){var Yt=he[_t];if(Yt.width!==0&&Yt.height!==0&&At.Vu(Yt.x-Ot,Yt.y-Ot,Yt.width+Dt,Yt.height+Dt)){At=!0;break e}}At=!1}At&&ne.Oj(E,xt,this,Me,ye,_e,!0)}on.free(_e),E.globalAlpha=ge}E.restore(),E.Vc(!0),this.Yf&&If(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}dr(b),dr(a),this.ld=!1}}else this.bd();x&&(ps(this),this.bd(),Kc(this,!0))}else x?(ps(this),this.bd(),Kc(this,!0)):this.bd()}};function jf(a){a.pn!==!1&&(a.pn=!1,Kp(a,a.Aa,a.ya))}function Kp(a,y,x){eh(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Of(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,te=!1,ne=a.gf?a.Db:0,se=a.Be?a.Db:0,he=E.clientWidth||x+ne,ge=E.clientHeight||b+se,ye=a.viewportBounds;E=ye.x;var Me=ye.y,_e=ye.width,Ke=ye.height;if((he!==x+ne||ge!==b+se)&&(a.gf=!1,a.Be=!1,se=ne=0,a.Aa=he,a.ya=ge,te=a.pn=!0,eh(a)),!a.hf||!a.viewportBounds.w())return!0;var qe=a.ku,rt=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Mt=a.documentBounds,xt=0,At=0,Ot=0,Dt=0,_t=ye.width,Yt=ye.height,_n=a.rj;a.contentAlignment.sb()?(Mt.width>_t&&(xt=_n.left,At=_n.right),Mt.height>Yt&&(Ot=_n.top,Dt=_n.bottom)):(xt=_n.left,At=_n.right,Ot=_n.top,Dt=_n.bottom);var Jn=Mt.width+xt+At,Xn=Mt.height+Ot+Dt;_n=a.scale;var Mn=Jn>he/_n,mn=Xn>ge/_n;if(!(te||a.gf||a.Be||Mn||mn))return!0;xt=Mt.x-xt,he=ye.x,At=Mt.right+At,ge=ye.right+ne,Ot=Mt.y-Ot;var Or=ye.y;Mt=Mt.bottom+Dt,ye=ye.bottom+se;var br="1px";if(Dt="1px",a.scrollMode===dc&&(Mn||mn)&&(Mn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Mn=1,xt+1<he&&(Mn=Math.max((he-xt)*_n+a.Aa,Mn)),At>ge+1&&(Mn=Math.max((At-ge)*_n+a.Aa,Mn)),_t+ne+1<Jn&&(Mn=Math.max((Jn-_t)*_n+a.Aa,Mn)),br=Mn.toString()+"px"),mn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Mn=1,Ot+1<Or&&(Mn=Math.max((Or-Ot)*_n+a.ya,Mn)),Mt>ye+1&&(Mn=Math.max((Mt-ye)*_n+a.ya,Mn)),Yt+se+1<Xn&&(Mn=Math.max((Xn-Yt)*_n+a.ya,Mn)),Dt=Mn.toString()+"px")),Mn=br!=="1px",mn=Dt!=="1px",Mn&&mn||!Mn&&!mn||(mn&&(ge-=a.Db),Mn&&(ye-=a.Db),Jn<_t+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,xt+1<he&&(ne=Math.max((he-xt)*_n+a.Aa,ne)),At>ge+1&&(ne=Math.max((At-ge)*_n+a.Aa,ne)),_t+1<Jn&&(ne=Math.max((Jn-_t)*_n+a.Aa,ne)),br=ne.toString()+"px"),Mn=br!=="1px",ne=a.ya,Mn!==a.Be&&(ne=Mn?a.ya-a.Db:a.ya+a.Db),Xn<Yt+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,Ot+1<Or&&(se=Math.max((Or-Ot)*_n+ne,se)),Mt>ye+1&&(se=Math.max((Mt-ye)*_n+ne,se)),Yt+1<Xn&&(se=Math.max((Xn-Yt)*_n+ne,se)),Dt=se.toString()+"px"),mn=Dt!=="1px"),a.qr&&Mn===a.Be&&mn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Mn!==a.Be&&(br==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Mn,rt.style.width=br,mn!==a.gf&&(Dt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=Et.alloc(),mn?(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)),Et.free(se))),te&&eh(a),a.gf=mn,rt.style.height=Dt,a.gu=!0,te&&(a.pn=!0),y=qe.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(_t+1<Jn?y=(a.position.x-xt)*_n:xt+1<he?y=qe.scrollWidth-qe.clientWidth:At>ge+1&&(y=a.position.x*_n)),a.tn)switch(a.bu){case"negative":y=-(qe.scrollWidth-y-qe.clientWidth);break;case"reverse":y=qe.scrollWidth-y-qe.clientWidth}return qe.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Yt+1<Xn?qe.scrollTop=(a.position.y-Ot)*_n:Ot+1<Or?qe.scrollTop=qe.scrollHeight-qe.clientHeight:Mt>ye+1&&(qe.scrollTop=a.position.y*_n)),he=a.Aa,ge=a.ya,qe.style.width=he+(a.gf?a.Db:0)+"px",qe.style.height=ge+(a.Be?a.Db:0)+"px",x!==he||b!==ge||a.animationManager.zb?(x=on.allocAt(E,Me,_e,Ke),a.onViewportBoundsChanged(x,a.viewportBounds,_n,te),on.free(x),!1):!0}Qe=Xt.prototype,Qe.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&$t("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&&$t('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(Xo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Qe.oi=function(a){this.partManager.oi(a);var y=this;Uf(a,function(x){Ff(y,x)}),(a instanceof di||a instanceof Fr&&a.placeholder!==null)&&a.v(),a.data!==null&&Uf(a,function(x){ly(y.partManager,x)}),Ms(a)!==!0&&ef(a)!==!0||this.De.add(a),I1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(Kf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Kf(a,a.actualBounds)),this.$b()},Qe.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Uf(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(Kf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Kf(a,a.actualBounds)),this.$b()},Qe.remove=function(a){Vp(this,a,!0)};function Vp(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(oa,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Qe.Is=function(a,y){if(y===void 0&&(y=!1),gr(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 bn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Qe.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Xt.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Zd(this)),this.toolManager!==null){var E=new Kn;if(a!==null)if(gr(a))for(var te=0;te<a.length;te++)mh(this,E,a[te],x,b);else for(a=a.iterator;a.next();)mh(this,E,a.value,x,b);else{for(a=this.parts;a.next();)mh(this,E,a.value,x,b);for(a=this.nodes;a.next();)mh(this,E,a.value,x,b);for(a=this.links;a.next();)mh(this,E,a.value,x,b)}Xc(this,E,y,b,x)}};function mh(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=Zd(a)),x instanceof Un){if(y.add(x,a.Pd(E,x,x.location)),x instanceof Fr&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)mh(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)&&mh(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)mh(a,y,x.value,b,E)}else if(x instanceof Ln)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)mh(a,y,x.value,b,E);else x instanceof di||y.add(x,a.Pd(E,x,x.location))}function Xc(a,y,x,b,E){if(y!==null&&y.count!==0){var te=Et.alloc(),ne=Et.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||Yd(a,y);for(var se=sr(),he=sr(),ge=y.iterator,ye=Et.alloc();ge.next();){var Me=ge.key,_e=ge.value;if(Me.Zc()){var Ke=Zp(a,Me,y);Ke!==null?se.push(new re(Me,_e,Ke)):(!E||Me.canMove())&&(Ke=_e.point,te.assign(Ke),a.computeMove(Me,te.add(ne),b,ye),Me.location=ye,_e.shifted===void 0&&(_e.shifted=new Et),_e.shifted.assign(ye.re(Ke)))}else ge.key instanceof Ln&&he.push(ge.sa)}for(Et.free(ye),E=se.length,ge=0;ge<E;ge++)Me=se[ge],te.assign(Me.info.point),Me.Su.shifted===void 0&&(Me.Su.shifted=new Et),Me.node.location=te.add(Me.Su.shifted);for(E=Et.alloc(),ge=Et.alloc(),Me=he.length,_e=0;_e<Me;_e++){var qe=he[_e];if(Ke=qe.key,Ke instanceof Ln)if(Ke.suspendsRouting){Ke.Tg=null,ye=Ke.fromNode;var rt=Ke.toNode;if(a.draggedLink!==null&&b.dragsLink)if(rt=qe.value.point,Ke.dragComputation===null)y.add(Ke,a.Pd(b,Ke,ne)),wc(Ke,ne.x-rt.x,ne.y-rt.y);else{qe=Et.allocAt(0,0),(ye=Ke.i(0))&&ye.w()&&qe.assign(ye);var Mt=ye=Et.alloc().assign(qe).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Mt=Et.alloc(),Xd(a,Ke,ye,Mt,b)),ye.assign(Ke.dragComputation(Ke,ye,Mt)).re(qe),y.add(Ke,a.Pd(b,Ke,ye)),wc(Ke,ye.x-rt.x,ye.y-rt.y),Et.free(qe),Et.free(ye),Mt!==ye&&Et.free(Mt)}else ye!==null&&(E.assign(ye.location),Mt=y.I(ye),Mt!==null&&E.re(Mt.point)),rt!==null&&(ge.assign(rt.location),Mt=y.I(rt),Mt!==null&&ge.re(Mt.point)),ye!==null&&rt!==null?E.Xa(ge)?(ye=qe.value.point,rt=te,rt.assign(E),rt.re(ye),y.add(Ke,a.Pd(b,Ke,E)),wc(Ke,rt.x,rt.y)):(Ke.suspendsRouting=!1,Ke.bb()):(qe=qe.value.point,ye=ye!==null?E:rt!==null?ge:ne,y.add(Ke,a.Pd(b,Ke,ye)),wc(Ke,ye.x-qe.x,ye.y-qe.y))}else(Ke.fromNode===null||Ke.toNode===null)&&(ye=qe.value.point,y.add(Ke,a.Pd(b,Ke,ne)),wc(Ke,ne.x-ye.x,ne.y-ye.y))}Et.free(te),Et.free(ne),Et.free(E),Et.free(ge),dr(se),dr(he),x||(Pa(a),Yc(a,y))}}Xt.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new Et),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=Et.alloc(),Xd(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,se=ne.x;isNaN(se)&&(se=te?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=te?Math.round(1e3*a.location.y)/1e3:a.location.y);var he=a.maxLocation,ge=he.x;return isNaN(ge)&&(ge=te?Math.round(1e3*a.location.x)/1e3:a.location.x),he=he.y,isNaN(he)&&(he=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(se,Math.min(x.x,ge)),Math.max(ne,Math.min(x.y,he))),E!==y&&Et.free(E),b};function Zd(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Xd(a,y,x,b,E){if(E===void 0&&(E=Zd(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=Et.allocAt(0,0),te.yi(0,0,a,y,E),Ht.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),Et.free(te)}}function Yd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Ln&&(y.suspendsRouting=!0)}function Yc(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Ln&&(x.suspendsRouting=!1,X0(x)&&x.bb())}a.Mr=!1}}function Zp(a,y,x){return y=y.containingGroup,y!==null&&(a=Zp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Qe=Xt.prototype,Qe.Pd=function(a,y,x){if(x===void 0)return new Kh(io);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Kh(new Et(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Kh(x.copy())};function Xp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&$t("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&$t("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&$t("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&$t("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&&$t("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Qe.Al=function(a){Xp(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(Xo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Qe.Ww=function(a,y){Xp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(oa,"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(Xo,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},Qe.Cy=function(a,y){Xp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(oa,"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(Xo,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},Qe.kA=function(a){if(a.diagram!==this&&$t("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(oa,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Qe.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Qe.Yw=function(a){return this.pf===null&&(this.pf=new kn),this.pf.add(a),this.model.Pe(a),this},Qe.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Qe.Pe=function(a){return this.zg===null&&(this.zg=new kn),this.zg.add(a),this},Qe.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Qe.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==zs&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},Qe.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var se=new Lo;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)},Qe.g=function(a,y,x,b,E){this.cb(fo,a,this,y,x,b,E)},Xt.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===fo){var E=a.object;if(wo(E,a.propertyName,a.I(y)),E instanceof zt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===Xo){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof Cn)if(typeof se=="number"&&he instanceof zt){y?ne.pc(se):ne.Gb(se,he);var ge=ne.part;ge!==null&&ge.Wb()}else typeof se=="number"&&he instanceof fa&&(he.isRow?c1(ne,se,y?void 0:he):f1(ne,se,y?void 0:he));else if(ne instanceof fi){var ye=a.oldParam===!0;typeof se=="number"&&he instanceof ur&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(ye?se:-1,he,ye)):ne.oi(se,he,ye))}else ne instanceof Xt?typeof se=="number"&&he instanceof fi&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):$t("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===oa){var Me=a.object,_e=a.oldParam,Ke=a.oldValue;if(Me instanceof Cn)typeof _e=="number"&&Ke instanceof zt?y?Me.Gb(_e,Ke):Me.pc(_e):typeof _e=="number"&&Ke instanceof fa&&(Ke.isRow?c1(Me,_e,y?Ke:void 0):f1(Me,_e,y?Ke:void 0));else if(Me instanceof fi){var qe=a.newParam===!0;typeof _e=="number"&&Ke instanceof ur&&(y?0>Me.Pa.indexOf(Ke)&&Me.oi(_e,Ke,qe):(Ke.isSelected=!1,Ke.isHighlighted=!1,Ke.Wb(),Me.pc(qe?_e:-1,Ke,qe)))}else Me instanceof Xt?typeof _e=="number"&&Ke instanceof fi&&(y?(Ke.Xe(this),this.Wa.Gb(_e,Ke)):this.Wa.mb(_e)):$t("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==zs&&$t("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Xt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Xt.prototype.eb=function(a){return this.undoManager.eb(a)},Xt.prototype.Kf=function(){return this.undoManager.Kf()},Xt.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}},Xt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Xt.prototype.rp=function(){this.partManager.rp()};function Yp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,eh(a),a.N(),a.Ee=!0,b.zb&&(fu(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,eh(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,se=a.zoomPoint.x,he=a.zoomPoint.y,ge=a.contentAlignment;isNaN(se)&&(ge.$c()?ge.Hf(oc)?se=0:ge.Hf(Is)&&(se=te-1):se=ge.sb()?ge.x*(te-1):te/2),isNaN(he)&&(ge.$c()?ge.Hf(lh)?he=0:ge.Hf(Jl)&&(he=ne-1):he=ge.sb()?ge.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),te=Et.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,Et.free(te),a.Ca=x,eh(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),gl(a,!1),b.zb&&(fu(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Xt.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!==gs||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof po&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Kd(E,this)),this.vb||this.invalidateViewport(a,y),qu(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 qu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=pn.alloc(),E=1,te=1,ne=x.O.s,se=ne.length,he=0;he<se;he++){var ge=ne[he],ye=Math.abs(ge.interval);2>ye||(m0(ge.figure)?te=te*ye/Ht.vx(te,ye):E=E*ye/Ht.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=on.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){on.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,on.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=Et.alloc(),Ht.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),pn.free(b),x.part.location=y,Et.free(y)}}Xt.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)}},Xt.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))},Xt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),gr(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof ur||$t("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 ur||$t("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Xt.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()}},Qe=Xt.prototype,Qe.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Qe.Jz=function(a){a=new bn().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 ur||$t("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Qe.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=Et.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)),Et.free(te);return}$t("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):$t("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Et.free(te)},Qe.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)},Qe.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Qe.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)},Qe.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,se=y.m12,he=y.m21,ge=y.m22,ye=y.dx,Me=y.dy,_e=x*ne+b*he+ye;y=x*se+b*ge+Me;var Ke=E*ne+b*he+ye;return a=E*se+b*ge+Me,b=x*ne+te*he+ye,x=x*se+te*ge+Me,ne=E*ne+te*he+ye,E=E*se+te*ge+Me,te=Math.min(_e,Ke),_e=Math.max(_e,Ke),Ke=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),_e=Math.max(_e,b),Ke=Math.min(Ke,x),y=Math.max(y,x),te=Math.min(te,ne),_e=Math.max(_e,ne),Ke=Math.min(Ke,E),y=Math.max(y,E),new on(te,Ke,_e-te,y-Ke)},Qe.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),Zi(a.copy(),this.Ab)};function om(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function $p(a){return a=tp.get(a),a!==null?new a:new Ii}Xt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===zs&&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===zs){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Pa(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Nu(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&&(om(this),this.As.clear(),lc(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;Vr(function(){se.currentTool.standardMouseOver(),se.Rt=!1},10)}}}finally{this.aa=!0}}}};function Ff(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)$c(a,y[b])}function $c(a,y){if(y instanceof Ws){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof bn&&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 Jp(a,y){if(y instanceof Ws){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 bn&&x.Bg.remove(a),pp(b));break}}}}}Xt.prototype.Wd=function(){this.partManager.Wd()},Xt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Xt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Xt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Xt.prototype.Vb=function(a){return this.partManager.Vb(a)},Xt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Qe=Xt.prototype,Qe.Lc=function(a){return this.partManager.Lc(a)},Qe.ii=function(a){return this.partManager.ii(a)},Qe.Kc=function(a){return this.partManager.Kc(a)},Qe.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:Lr(An(y)))},Qe.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:Lr(An(y)))};function eh(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 Qp(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),gl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Qe.Va=function(){if(this.Zi){var a=on.alloc();Qp(this,this.computeBounds(a)),on.free(a)}},Qe.rz=function(){for(var a=new bn,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},Qe.qz=function(){return this.ai.iterator},Qe.Uz=function(a){Pa(this),a&&$d(this,!0),this.ld?qp(this,!1):(this.Jk=!0,es(this))};function $d(a,y){for(var x=a.ai.iterator;x.next();)am(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function am(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)am(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function qp(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||zl(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)eg(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),Pa(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||Nu(te),a.aa=x}}}function eg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)eg(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),Wh(a,y),E.isValidLayout=!0):a.xh=!0)}}Qe.yz=function(){for(var a=new kn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function n0(a){function y(E){var te=E.toLowerCase(),ne=new kn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new Kn,b=new Kn;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function sm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Jd(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;$t("Unknown DiagramEvent name: "+y)}Qe.Bj=function(a,y){return a=Jd(this,a),a!==null&&a.add(y),this},Qe.am=function(a,y){a=Jd(this,a),a!==null&&a.remove(y)},Qe.R=function(a,y,x){var b=Jd(this,a),E=new Zu;if(E.diagram=this,a=sm(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function Qd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Qe.Yj=function(a,y){return qd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Xt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Nf(this,a):a.assign(this.documentBounds)};function qd(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=lm(a,x)),x===null){y=on.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&&ep(a,ne,b,y)}on.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=on.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof Un&&ep(a,ne,b,y);on.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function lm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?lm(a,y.containingGroup):null}function ep(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(xp(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(bc,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=bc}else if(y instanceof Fr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Un&&ep(a,E,x,b)}}function fc(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Xt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():tg(this)};function tg(a){a.vk===-1&&(a.vk=Vr(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=on.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),on.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}Xt.prototype.ug=function(){this.vk!==-1&&(en.clearTimeout(this.vk),this.vk=-1)},Xt.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=on.allocAt(0,0,b.width*E,b.height*E);var te=Et.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(io)||(y=new Et(y.x+te.x/E,y.y+te.y/E)),on.free(b),Et.free(te),y},Qe=Xt.prototype,Qe.Cs=function(){return null},Qe.av=function(){return null},Qe.bs=function(a,y){this.pj.add(a,y)},Qe.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Fr&&(y.$p=null)})};function gd(a,y,x){function b(){var ye=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||ye-ge>he?y(x,E,se):en.requestAnimationFrame(b)}for(var E=x.callback,te=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){te=!1;break}if(typeof E!="function"||te)return y(x,E,a);var se=a,he=x.callbackTimeout||300,ge=+new Date;return en.requestAnimationFrame(function(){b()}),null}Qe.Wz=function(a){return Uo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Qe.Jx=function(a){return a===void 0&&(a={}),gd(this,this.Xz,a)},Qe.Xz=function(a,y,x){var b=um(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case Bf+"data":E=b.getImageData(0,0,x.width,x.height);break;case Bf:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&$t('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function um(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&$t("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 pn(1/0,1/0):new pn(2e3,2e3));var se=y.position||null,he=y.parts||null,ge=y.padding===void 0?1:y.padding,ye=y.background||null,Me=y.omitTemporary;Me===void 0&&(Me=!0);var _e=y.document||document,Ke=y.elementFinished||null,qe=y.showTemporary;qe===void 0&&(qe=!Me),y=y.showGrid,y===void 0&&(y=qe),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof ge=="number"?ge=new wr(ge):ge instanceof wr||$t("MakeImage padding must be a Margin or a number."),ge.left=Math.max(ge.left,0),ge.right=Math.max(ge.right,0),ge.top=Math.max(ge.top,0),ge.bottom=Math.max(ge.bottom,0),a.ib.Vc(!0),Me=new iu(null,_e,void 0,!0);var rt=Me.context;if(!(E||te||he||se))return Me.width=a.Aa+Math.ceil(ge.left+ge.right),Me.height=a.ya+Math.ceil(ge.top+ge.bottom),x==="SVG"?b===null?null:(b.resize(Me.width,Me.height,Me.width,Me.height),b.ownerDocument=_e,b.hs=Ke,Vd(a,b.context,ge,new pn(Me.width,Me.height),a.Ca,a.pa,he,ye,qe,y),b.context):(a.Xm=!1,Vd(a,rt,ge,new pn(Me.width,Me.height),a.Ca,a.pa,he,ye,qe,y),a.Xm=!0,Me.context);var Mt=a.Pp,xt=a.documentBounds.copy();if(xt.Fv(a.yb),qe)for(var At=a.Wa.s,Ot=At.length,Dt=0;Dt<Ot;Dt++){var _t=At[Dt];if(_t.visible&&_t.isTemporary){_t=_t.Pa.s;for(var Yt=_t.length,_n=0;_n<Yt;_n++){var Jn=_t[_n];Jn.isInDocumentBounds&&Jn.isVisible()&&(Jn=Jn.actualBounds,Jn.w()&&xt.ed(Jn))}}}if(At=new Et(xt.x,xt.y),he!==null){for(Ot=new on(0,0,0,0),Dt=!0,_t=he.iterator,_t.reset();_t.next();)Yt=_t.value,Yt instanceof ur&&(_n=Yt.layer,_n!==null&&!_n.visible||_n!==null&&!qe&&_n.isTemporary||!Yt.isVisible()||(Yt=Yt.actualBounds,Yt.w()&&(Dt?(Dt=!1,Ot.assign(Yt)):Ot.ed(Yt))));xt.width=Ot.width,xt.height=Ot.height,At.x=Ot.x,At.y=Ot.y}return se!==null&&se.w()&&(At=se,te||(te=Mt)),Ot=se=0,ge!==null&&(se=ge.left+ge.right,Ot=ge.top+ge.bottom),Dt=_t=0,E!==null&&(_t=E.width,Dt=E.height,isFinite(_t)&&(_t=Math.max(0,_t-se)),isFinite(Dt)&&(Dt=Math.max(0,Dt-Ot))),E!==null&&te!==null?(te==="NaN"&&(te=Mt),E.w()?(E=_t,xt=Dt):isNaN(Dt)?(E=_t,xt=xt.height*te):(E=xt.width*te,xt=Dt)):E!==null?E.w()?(te=Math.min(_t/xt.width,Dt/xt.height),E=_t,xt=Dt):isNaN(Dt)?(te=_t/xt.width,E=_t,xt=xt.height*te):(te=Dt/xt.height,E=xt.width*te,xt=Dt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/xt.width,(ne.height-Ot)/xt.height),te>Mt?(te=Mt,E=xt.width,xt=xt.height):(E=ne.width,xt=ne.height)):(E=xt.width*te,xt=xt.height*te):(te=Mt,E=xt.width,xt=xt.height),ge!==null?(E+=se,xt+=Ot):ge=new wr(0),ne!==null&&(Mt=ne.width,ne=ne.height,isNaN(Mt)&&(Mt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Mt)&&(E=Math.min(E,Mt)),isFinite(ne)&&(xt=Math.min(xt,ne))),Me.width=Math.ceil(E),Me.height=Math.ceil(xt),x==="SVG"?b===null?null:(b.resize(Me.width,Me.height,Me.width,Me.height),b.ownerDocument=_e,b.hs=Ke,Vd(a,b.context,ge,new pn(Math.ceil(E),Math.ceil(xt)),te,At,he,ye,qe,y),b.context):(a.Xm=!1,Vd(a,rt,ge,new pn(Math.ceil(E),Math.ceil(xt)),te,At,he,ye,qe,y),a.Xm=!0,Me.context)}cn.Object.defineProperties(Xt.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 th(this,en.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 th(this,en.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(en,"resize",this.Ov,!1),this.removeEventListener(en,"wheel",this.$j,!0),tl===this&&(tl=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),kf(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)&&yr(a,"0 <= value <= 1",Xt,"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),gl(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),gl(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),gl(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),gl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&yr(a,">= 0",Xt,"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&&yr(a,">= 0",Xt,"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 yr(a,">= 0",Xt,"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||om(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&&$t("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=hd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,zl(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=$p(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(en,"pointermove",this.dk,!0),this.addEventListener(en,"pointerdown",this.ui,!0),this.addEventListener(en,"pointerup",this.fk,!0),this.addEventListener(en,"pointerout",this.ek,!0),this.addEventListener(en,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(en,"wheel",this.$j,!0),this.addEventListener(en,"selectstart",this.preventDefault,!1)):(this.removeEventListener(en,"pointermove",this.dk,!0),this.removeEventListener(en,"pointerdown",this.ui,!0),this.removeEventListener(en,"pointerup",this.fk,!0),this.removeEventListener(en,"pointerout",this.ek,!0),this.removeEventListener(en,"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(en,"wheel",this.$j,!0),this.removeEventListener(en,"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=Et.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),ph(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?eh(this):(this.vb=!0,a=this.scale,dd(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)}Et.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=Tf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Tf(this)),a.type!==Cn.Grid&&$t("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),qu(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),eh(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||$t("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===dc&&gl(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,gl(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,Yp(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&&Yp(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!==gs&&gl(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()||$t("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()||$t("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)):yr(a,"> 0",Xt,"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)):yr(a,"> 0",Xt,"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),gl(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&$t("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();)Sg(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==pc&&a!==ha&&a!==np&&$t("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 pn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),cn.Object.defineProperties(Xt,{licenseKey:{get:function(){return sg.jc()},set:function(a){sg.add(a.replace(/\s/g,""))}},version:{get:function(){return Rf}}}),Xt.prototype.makeImageData=Xt.prototype.Jx,Xt.prototype.makeImage=Xt.prototype.Wz,Xt.prototype.cacheGroupExternalLinks=Xt.prototype.Fu,Xt.prototype.addRenderer=Xt.prototype.bs,Xt.prototype.makeSVG=Xt.prototype.av,Xt.prototype.makeSvg=Xt.prototype.Cs,Xt.prototype.stopAutoScroll=Xt.prototype.ug,Xt.prototype.doAutoScroll=Xt.prototype.gs,Xt.prototype.isUnoccupied=Xt.prototype.Yj,Xt.prototype.raiseDiagramEvent=Xt.prototype.R,Xt.prototype.removeDiagramListener=Xt.prototype.am,Xt.prototype.addDiagramListener=Xt.prototype.Bj,Xt.prototype.findTreeRoots=Xt.prototype.yz,Xt.prototype.layoutDiagram=Xt.prototype.Uz,Xt.prototype.findTopLevelGroups=Xt.prototype.qz,Xt.prototype.findTopLevelNodesAndLinks=Xt.prototype.rz,Xt.prototype.ensureBounds=Xt.prototype.Va,Xt.prototype.findLinksByExample=Xt.prototype.ls,Xt.prototype.findNodesByExample=Xt.prototype.ms,Xt.prototype.findLinkForData=Xt.prototype.Kc,Xt.prototype.findNodeForData=Xt.prototype.ii,Xt.prototype.findPartForData=Xt.prototype.Lc,Xt.prototype.findLinkForKey=Xt.prototype.findLinkForKey,Xt.prototype.findNodeForKey=Xt.prototype.Vb,Xt.prototype.findPartForKey=Xt.prototype.findPartForKey,Xt.prototype.rebuildParts=Xt.prototype.Wd,Xt.prototype.transformViewToDoc=Xt.prototype.Ps,Xt.prototype.transformRectDocToView=Xt.prototype.zA,Xt.prototype.transformDocToView=Xt.prototype.op,Xt.prototype.centerRect=Xt.prototype.es,Xt.prototype.scrollToRect=Xt.prototype.tv,Xt.prototype.scroll=Xt.prototype.scroll,Xt.prototype.highlightCollection=Xt.prototype.Jz,Xt.prototype.highlight=Xt.prototype.Iz,Xt.prototype.selectCollection=Xt.prototype.rA,Xt.prototype.select=Xt.prototype.select,Xt.prototype.updateAllRelationshipsFromData=Xt.prototype.rp,Xt.prototype.updateAllTargetBindings=Xt.prototype.updateAllTargetBindings,Xt.prototype.commit=Xt.prototype.commit,Xt.prototype.rollbackTransaction=Xt.prototype.Kf,Xt.prototype.commitTransaction=Xt.prototype.eb,Xt.prototype.startTransaction=Xt.prototype.Ea,Xt.prototype.raiseChanged=Xt.prototype.g,Xt.prototype.raiseChangedEvent=Xt.prototype.cb,Xt.prototype.removeChangedListener=Xt.prototype.ik,Xt.prototype.addChangedListener=Xt.prototype.Pe,Xt.prototype.removeModelChangedListener=Xt.prototype.mA,Xt.prototype.addModelChangedListener=Xt.prototype.Yw,Xt.prototype.findLayer=Xt.prototype.Qj,Xt.prototype.removeLayer=Xt.prototype.kA,Xt.prototype.addLayerAfter=Xt.prototype.Cy,Xt.prototype.addLayerBefore=Xt.prototype.Ww,Xt.prototype.addLayer=Xt.prototype.Al,Xt.prototype.moveParts=Xt.prototype.moveParts,Xt.prototype.copyParts=Xt.prototype.Kj,Xt.prototype.removeParts=Xt.prototype.Is,Xt.prototype.remove=Xt.prototype.remove,Xt.prototype.add=Xt.prototype.add,Xt.prototype.clearDelayedGeometries=Xt.prototype.bx,Xt.prototype.setProperties=Xt.prototype.nm,Xt.prototype.attach=Xt.prototype.Du,Xt.prototype.set=Xt.prototype.set,Xt.prototype.resetInputOptions=Xt.prototype.Sx,Xt.prototype.setInputOption=Xt.prototype.sA,Xt.prototype.getInputOption=Xt.prototype.Ql,Xt.prototype.resetRenderingHints=Xt.prototype.Tx,Xt.prototype.setRenderingHint=Xt.prototype.Xx,Xt.prototype.getRenderingHint=Xt.prototype.Gf,Xt.prototype.maybeUpdate=Xt.prototype.bd,Xt.prototype.requestUpdate=Xt.prototype.$b,Xt.prototype.delayInitialization=Xt.prototype.Xy,Xt.prototype.isUpdateRequested=Xt.prototype.Pz,Xt.prototype.invalidateDocumentBounds=Xt.prototype.Ya,Xt.prototype.findObjectsNear=Xt.prototype.og,Xt.prototype.findPartsNear=Xt.prototype.mz,Xt.prototype.findObjectsIn=Xt.prototype.Cf,Xt.prototype.findPartsIn=Xt.prototype.ux,Xt.prototype.findObjectsAt=Xt.prototype.ji,Xt.prototype.findPartsAt=Xt.prototype.lz,Xt.prototype.findObjectAt=Xt.prototype.ic,Xt.prototype.findPartAt=Xt.prototype.Ol,Xt.prototype.focusObject=Xt.prototype.zz,Xt.prototype.alignDocument=Xt.prototype.Jy,Xt.prototype.zoomToRect=Xt.prototype.BA,Xt.prototype.zoomToFit=Xt.prototype.zoomToFit,Xt.prototype.diagramScroll=Xt.prototype.kx,Xt.prototype.focus=Xt.prototype.focus;var tp=new Kn,hm=null,Uo=en.document!==void 0,Df=null,Jc="",gs=new tn(Xt,"None",0),Nl=new tn(Xt,"Uniform",1),Qc=new tn(Xt,"UniformToFill",2),md=new tn(Xt,"CycleAll",10),ng=new tn(Xt,"CycleNotDirected",11),rg=new tn(Xt,"CycleNotDirectedFast",12),ig=new tn(Xt,"CycleNotUndirected",13),og=new tn(Xt,"CycleDestinationTree",14),ag=new tn(Xt,"CycleSourceTree",15),dc=new tn(Xt,"DocumentScroll",1),vd=new tn(Xt,"InfiniteScroll",2),pc=new tn(Xt,"TreeParentCollapsed",21),ha=new tn(Xt,"AllParentsCollapsed",22),np=new tn(Xt,"AnyParentsCollapsed",23),sg=new kn,Rf="2.3.10",Bf="image",yd=null,cm=!1;function os(){if(Uo){var a=en.document.createElement("canvas"),y=a.getContext("2d"),x=Cr("7ca11abfd022028846");y[x]=Cr("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",Tn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Wr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ht.za],E=1;5>E;E++)y[Cr("7ca11abfd7330390")](Cr(b[E-1]),10,15*E);for(y[x]=Cr("39f046ebb36e4b"),x=1;5>x;x++)y[Cr("7ca11abfd7330390")](Cr(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Wr.prototype.Cd=Wr.prototype.Eu),yd=a}}Xt.className="Diagram",Xt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=en.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Xt?y.H:null},Xt.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},Xt.useDOM=function(a){Uo=a?en.document!==void 0:!1},Xt.isUsingDOM=function(){return Uo},Xt.None=gs,Xt.Uniform=Nl,Xt.UniformToFill=Qc,Xt.CycleAll=md,Xt.CycleNotDirected=ng,Xt.CycleNotDirectedFast=rg,Xt.CycleNotUndirected=ig,Xt.CycleDestinationTree=og,Xt.CycleSourceTree=ag,Xt.DocumentScroll=dc,Xt.InfiniteScroll=vd,Xt.TreeParentCollapsed=pc,Xt.AllParentsCollapsed=ha,Xt.AnyParentsCollapsed=np;function fm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function If(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=en[Cr("76a715b2f73f148a")][Cr("72ba13b5")]||"";if(a.Rc=!0,Uo){var b=Xt[Cr("76a115b6ed251eaf4692")];if(b)for(var E=sg.iterator;E.next()&&(b=E.value,b=Cr(b).split(Cr("39e9")),!(6>b.length));){var te=Cr(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=Cr(Tn[Cr("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=en[Cr("74a900bae4370f8b51")][Cr("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[Cr("73a612b6fb191d")](Cr("3aad1ab6e022098b4dc4")),te=Cr(b[2]),-1<ne&&(se=se[Cr("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[Cr("76ad18b4f73e")],se=x[Cr("73a612b6fb191d")](Cr("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[Cr("73a612b6fb191d")](te),0>ne&&te!==Cr("7da71ca0ad381e90")&&(ne=y[Cr("73a612b6fb191d")](Cr("76a715b2ef3e149757"))),0>ne&&(ne=y[Cr("73a612b6fb191d")](Cr("76a715b2ef3e149757"))),0>ne&&(ne=y[Cr("73a612b6fb191d")](Cr("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Cr("73a612b6fb191d")](Cr("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Cr("73a612b6fb191d")](Cr("35"))||y[Cr("73a612b6fb191d")](Cr("35"))===-1),!a.Rc||x[Cr("73a612b6fb191d")](Cr("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Cr("73a612b6fb191d")](te)),!a.Rc)||(ne=en[Cr("76a715b2f73f148a")][Cr("69ad17a1e03e")],se=ne[Cr("73a612b6fb191d")](Cr("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[Cr("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=en.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[Cr("79a417a0f0181a8946")]=b,en.document[Cr("78a712aa")]){en.document[Cr("78a712aa")][Cr("7bb806b6ed32388c4a875b")](ne),he=en.getComputedStyle(ne).getPropertyValue(Cr("78a704b7e62456904c9b12701b6532a8"));var ge=en.getComputedStyle(ne).getPropertyValue(Cr("75b817b0ea2202"));if(en.document[Cr("78a712aa")][Cr("68ad1bbcf533388c4a875b")](ne),he){if(ne=en[Cr("77a902b0eb1b1e804a8a")],ge==="0."+parseInt(se,10)%100||he.indexOf(parseInt(te[1]+te[2],16))!==-1&&he.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(Cr("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[Cr("76ad18b4f73e")],E=x[Cr("73a612b6fb191d")](Cr("35e7"))+2;E<ye;E++)y+=x[E];x=y[Cr("73a612b6fb191d")](Cr("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Cr("73a612b6fb191d")](Cr("35")))}}}return 0<a.Rc&&a!==a.wy}fm.className="DiagramHelper";function Kh(a){this.j=a===void 0?new Et:a,this.o=new Et}cn.Object.defineProperties(Kh.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 Sd="DraggingInfo";Kh.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 pn(NaN,NaN).freeze(),this.gridSnapCellSpot=La,this.gridSnapOrigin=new Et(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ce.className="DraggingOptions";function ke(a,y){if(typeof a=="string"||en.Element&&a instanceof Element)var x=Xt.call(this,a)||this;else x=Xt.call(this)||this,y=a;return Ce(x),y&&x.nm(y),x}Vt(ke,Xt);function Ce(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Cl,a.layout=new Ua}ke.prototype.reset=function(){Xt.prototype.reset.call(this),Ce(this)},ke.className="Palette";function Oe(a,y){if(typeof a=="string"||en.Element&&a instanceof Element)var x=Xt.call(this,a)||this;else x=Xt.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 ur;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 wr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Nt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new Et(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),pt(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&&pt(b)},x.autoScale=Nl,x.vb=!1,y&&Object.assign(x,y),x}Vt(Oe,Xt),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(jf(this),this.ql===null){var x=new iu(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),tt(this)}finally{this.ta=a,this.ib=y}}}Xt.prototype.redraw.call(this)},Oe.prototype.gc=function(){if(this.Ka===null&&$t("No div specified"),this.ta===null&&$t("No canvas specified"),!(this.ta instanceof th)&&(R0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){jf(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?tt(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function tt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=on.alloc().assign(a.viewportBounds).ed(y.viewportBounds),qu(y,E),on.free(E),Pa(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var se=y[ne],he=a;if(se.visible&&se.opacity!==0){var ge=se.diagram.grid.part;if(!x&&se.isTemporary)b&&ge.layer===se&&(se=qo(se,E),ge.gc(E,he),E.globalAlpha=se);else{for(var ye=qo(se,E),Me=he.scale,_e=on.alloc(),Ke=se.Pa.s,qe=Ke.length,rt=0;rt<qe;rt++){var Mt=Ke[rt];(b||Mt!==ge)&&se.Oj(E,Mt,he,null,Me,_e,!1)}on.free(_e),E.globalAlpha=ye}}}}}function pt(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=pn.alloc();E.h(x.width,x.height),b.desiredSize=E,pn.free(E),a=2/a.scale,b instanceof Br&&(b.strokeWidth=a),y.location=new Et(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Oe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Gi;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(),pt(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))},cn.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&$t("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),pt(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),pt(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 Nt(){Oo.call(this),this.j=null}Vt(Nt,Oo),Nt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new Et(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Et(a.x-this.j.x,a.y-this.j.y)),!0)},Nt.prototype.doActivate=function(){this.j=null,Oo.prototype.doActivate.call(this)},Nt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Nt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new Et(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new Et(a.x-this.j.x,a.y-this.j.y)}}},Nt.className="OverviewDraggingTool";function kt(){Ni(this),this.H=tl,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=Gi,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=Ho?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 po&&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 bn,x=a.selection.iterator;x.next();)nf(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 bn;for(a=a.selection.iterator;a.next();)nf(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)Df=null,Jc="";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 kn,x.addAll(te),Df=x,Jc=y.model.dataFormat}}y.R("ClipboardChanged",x)},kt.prototype.pasteFromClipboard=function(){var a=new bn,y=Df;if(y===null)return a;var x=this.diagram;if(Jc!==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);Xc(y,te,new Et(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||Df===null||Df.count===0||Jc!==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===gs&&(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!==gs?!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===gs&&(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!==gs?!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;zl(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=Gi):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Nu(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;zl(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 Un&&he.isTreeExpanded&&(!(he instanceof Fr)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof ur&&y.tv(he.actualBounds),he instanceof Un&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof Fr&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof ur&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Vr(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 Ln){var b=y.fromNode;b!==null&&Rt(a,b,x),y=y.toNode,y!==null&&Rt(a,y,x)}else y instanceof Un&&(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 ur)?!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"),zl(y.animationManager,"Collapse Tree");var x=new kn;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 Un&&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 Un&&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 Un&&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"),zl(y.animationManager,"Expand Tree");var x=new kn;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 Un&&!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 Un)||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 Un&&!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 kn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new kn,he=E.iterator;he.next();){var ge=he.value;te=!1;for(var ye=E.iterator;ye.next();)if(ge.Td(ye.value)){te=!0;break}te||se.add(ge)}if(0<se.count){var Me=se.first().containingGroup;if(Me!==null)for(;Me!==null;){E=!1;for(var _e=se.iterator;_e.next();)if(!_e.value.Td(Me)){E=!0;break}if(E)Me=Me.containingGroup;else break}if(x instanceof Fr)ou(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ke=y.copyNodeData(x);xn(Ke)&&(y.xf(Ke),b=a.ii(Ke))}if(b!==null){Me!==null&&this.isValidMember(Me,b)&&(b.containingGroup=Me);for(var qe=se.iterator;qe.next();){var rt=qe.value;this.isValidMember(b,rt)&&(rt.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},kt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function rn(a){var y=sr();for(a=a.iterator;a.next();){var x=a.value;x instanceof Ln||y.push(x)}a=new bn,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 dr(y),a}kt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Ln)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 kn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof Fr&&te.canUngroup()&&b.add(te)}var ne=new kn;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var ge=he.containingGroup,ye=ge!==null&&ge.data!==null?x.wa(ge.data):void 0;ne.addAll(he.memberParts);for(var Me=ne.iterator;Me.next();){var _e=Me.value;if(_e.isSelected=!0,!(_e instanceof Ln)){var Ke=_e.data;Ke!==null?x.mp(Ke,ye):_e.containingGroup=ge}}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 Fr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Fr&&y.canUngroup())return!0;return!1},kt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=rn(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},kt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),zl(y.animationManager,"Collapse SubGraph");var x=new kn;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 Fr&&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 Fr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Fr&&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"),zl(y.animationManager,"Expand SubGraph");var x=new kn;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 Fr&&!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 Fr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Fr&&!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 to&&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 to))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 to&&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(vi):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new Et(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,Na(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 Kn,a===null)return b;for(var te=a.iterator;te.next();)mh(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 Ln&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},cn.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||$t("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",cd=function(){return new kt};function zt(){Ni(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Et(NaN,NaN).freeze(),this.jd=Fa,this.Ab=new Wr,this.wh=new Wr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=xs,this.uc=new on(NaN,NaN,NaN,NaN).freeze(),this.Ib=new on(NaN,NaN,NaN,NaN).freeze(),this.dc=new on(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=za,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 wn,yn,qn,ir,vr,Dr,ti,Kr,si,Hi;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=hi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},zt.prototype.Vw=function(a){var y=this.Dh;if(gr(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()},Qe=zt.prototype,Qe.qb=function(a){a.classType===Ln?a.name.indexOf("Orient")===0?this.segmentOrientation=a:$t("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===zt&&(this.stretch=a)},Qe.toString=function(){return Ar(this.constructor)+"#"+Zt(this)},Qe.th=function(){this.A!==null&&(this.A.nc=!0)};function Ur(a){a.A===null?a.A=new wd:a.A.nc&&(a.A=a.A.copy())}Qe.Xc=function(){if(this.ba===null){var a=new lg;a.Xi=ba,a.yj=ba,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Qe.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===fo&&Ka(this)&&co(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 Kn),ne=te.undoManager.transactionLevel===0,a.startCondition===Di?ne=!0:a.startCondition===Si&&(ne=!1),ne?(te=new Aa,$u(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()):(zl(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Cn&&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 Cn&&Uf(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function co(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var te=E.value,ne=null;if(te.sourceName!==null){if(ne=MS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var se=y.diagram;se===null||se.skipsModelSourceBindings||te.sp(a,se.model.modelData,x,b)}else{if(se=b.data,se===null)continue;var he=y.diagram;he===null||he.skipsModelSourceBindings||te.sp(a,se,x,b)}ne===a&&(se=b.ks(te.Ai),se!==null&&te.Mv(se,ne,x))}}Qe.ks=function(a){return this.bindingId===a?this:null},Qe.g=function(a,y,x){this.cb(fo,a,this,y,x)},Qe.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Wr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function ka(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}Qe.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?ao(a.x,a.y,0,0,0,b.height)<=y||ao(a.x,a.y,0,b.height,b.width,b.height)<=y||ao(a.x,a.y,b.width,b.height,b.width,0)<=y||ao(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},Qe.se=function(){return!0},Qe.ca=function(a){var y=Et.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Et.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=ia(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),Et.free(y),a}return E=!1,(this instanceof di||this instanceof Br?ia(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)),Et.free(y),E},Qe.gh=function(a){var y=this.naturalBounds;return ia(0,0,y.width,y.height,a.x,a.y)},Qe.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=on.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=Et.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)))),Et.free(E),on.free(y),b},Qe.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=Et.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)))),Et.free(E),b},Qe.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=Et.allocAt(0,0),E=Et.allocAt(0,x.height),te=Et.allocAt(x.width,x.height),ne=Et.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=on.allocAt(0,0,x.width,x.height);var he=Et.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)))),Et.free(he),on.free(x),!se&&(Ht.us(a,b,E)||Ht.us(a,E,te)||Ht.us(a,te,ne)||Ht.us(a,ne,b))&&(se=!0)}return Et.free(b),Et.free(E),Et.free(te),Et.free(ne),se},Qe.ga=function(a,y){if(y===void 0&&(y=new Et),a instanceof ar){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},Qe.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe,b=Et.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),bo(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),bo(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),bo(a,b.x,b.y,0,0),Et.free(b),a},Qe.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},Qe.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Qe.qs=function(a,y){return y===void 0&&(y=new Et),y.assign(a),this.oe.Cd(y),y},Qe.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Qe.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,ge=-te.m21*ne,ye=te.m11*ne,Me=ne*(te.m21*te.dy-te.m22*te.dx),_e=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,Ht.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*ge+Me,a=a*he+y*ye+_e,y=x*se+b*ge+Me,x=x*he+b*ye+_e,E.h(0,0),b=this.naturalBounds,x=Ht.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(jl(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 Cn;switch(Us(this,!0)){case yn:ne=E=0,se&&(y=a=1/0);break;case wn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case ir: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()||$t("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),ca(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=on.alloc();te.assign(this.Ib),this.Ib.ka(),Ms(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&&vc(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 to&&(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()||$t("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),vh(this,!1),on.free(te)},Qe=zt.prototype,Qe.eh=function(){};function ms(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=Us(a,!0),x===b&&te===E&&(y=yn),y){case yn:(x>b||te>E)&&(ca(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case wn:ca(a,!0),a.measure(b,E,0,0);break;case ir:ca(a,!0),a.measure(b,te,0,0);break;case vr:ca(a,!0),a.measure(x,E,0,0)}}}Qe.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_0(x,!0),this.N(),yo(a,y)||(x.oh(),this.Pn(x)))},Qe.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Un&&W1(a,this))},Qe.gc=function(a,y){if(!Ul(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 Cn&&vc(this),ne=this.Ib;if(te){var se=this.Ib,he=this.dc,ge=this.areaBackground,ye=this.Ma;ge===null&&ye===null||a.yc(),ge!==null&&(Ko(this,a,ge,!0,!0,he,se),ge instanceof Ri&&ge.type===Kl?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(ge)):a.fillRect(se.x,se.y,se.width,se.height)),ye!==null&&(Ko(this,a,ye,!0,!1,he,se),ye instanceof Ri&&ye.type===Kl?(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&&Ga(this),ge=this.part,he=!1;var Me=0;ge&&y.Gf("drawShadows")&&(he=ge.isShadowed)&&(ye=ge.shadowOffset,Me=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var _e;if(!(_e=y.$i||!ye)){var Ke=this.naturalBounds;_e=this.wh;var qe=_e.m11,rt=_e.m21,Mt=_e.dx,xt=_e.m12,At=_e.m22,Ot=_e.dy,Dt,_t=Dt=0;_e=Dt*qe+_t*rt+Mt;var Yt=Dt*xt+_t*At+Ot;Dt=Ke.width+Me,_t=0;var _n=Dt*qe+_t*rt+Mt;Dt=Dt*xt+_t*At+Ot,_t=Math.min(_e,_n);var Jn=Math.min(Yt,Dt),Xn=Math.max(_e+0,_n)-_t,Mn=Math.max(Yt+0,Dt)-Jn;_e=_t,Yt=Jn,Dt=Ke.width+Me,_t=Ke.height+Me,_n=Dt*qe+_t*rt+Mt,Dt=Dt*xt+_t*At+Ot,_t=Math.min(_e,_n),Jn=Math.min(Yt,Dt),Xn=Math.max(_e+Xn,_n)-_t,Mn=Math.max(Yt+Mn,Dt)-Jn,_e=_t,Yt=Jn,Dt=0,_t=Ke.height+Me,_n=Dt*qe+_t*rt+Mt,Dt=Dt*xt+_t*At+Ot,_t=Math.min(_e,_n),Jn=Math.min(Yt,Dt),Xn=Math.max(_e+Xn,_n)-_t,Mn=Math.max(Yt+Mn,Dt)-Jn,_e=_t,Yt=Jn,Me=y.viewportBounds,Ke=Me.x,qe=Me.y,_e=!(_e>Me.width+Ke||Ke>Xn+_e||Yt>Me.height+qe||qe>Mn+Yt)}if(_e){if(_e=(this.l&256)!==0,a.clipInsteadOfFill&&(_e=!1),this instanceof to&&(a.font=this.font),_e){if(Yt=se.se()?se.naturalBounds:se.actualBounds,Xn=Math.max(ne.x,Yt.x),Mn=Math.max(ne.y,Yt.y),Me=Math.min(ne.right,Yt.right)-Xn,Ke=Math.min(ne.bottom,Yt.bottom)-Mn,qe=this.tb,qe!==null&&(Xn=qe.x,Mn=qe.y,Me=qe.width,Ke=qe.height),Xn>ne.width+ne.x||ne.x>Yt.width+Yt.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Xn,Mn,Me,Ke),a.clip()}if(ye){if(!ge.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(Yt=ge.shadowOffset,a.Ev(Yt.x*y.scale*this.scale*y.Mb,Yt.y*y.scale*this.scale*y.Mb,ge.shadowBlur),Vh(a),a.shadowColor=ge.shadowColor)}he&&this.shadowVisible===!0?Vh(a):he&&this.shadowVisible===!1&&yh(a),ge=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Al(this,a,ge,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&Ia(this,se)&&this.shadowVisible===null&&yh(a),this.Ma!==null&&(a.yc(),rl(this,a,ge,ne)),he&&(this.Ma!==null||this.areaBackground!==null||Ia(this,se))?(vu(this,!0),this.shadowVisible===null&&yh(a)):vu(this,!1),this.hh(a,y),he&&this.l&512&&Vh(a),ye&&he&&yh(a),_e&&(a.restore(),a.Vc(this instanceof Cn)),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:(vc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Cn.Auto||y.type===Cn.Spot)&&y.Pb()!==a)}Qe.Dv=function(){};function Al(a,y,x,b){Ko(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Ri&&a.areaBackground.type===Kl?(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 rl(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,se=x.width+E,he=x.height+E;Ko(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Ri&&a.Ma.type===Kl?(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 as(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===Cn.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 Ul(a,y,x){if(!(y instanceof ml))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&&as(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),Vh(y),y.shadowColor=a.shadowColor}a instanceof to&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Cn;var se=a instanceof Cn?vc(a):!1;a.l&4096&&Ga(a);var he=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&se?(ug(y,1,0,0,1,0,0),a.svg=y.ad):te?(ug(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):ug(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var ge=ne.copy().Vj();y.rb.ha=[ge.m11,ge.m12,ge.m21,ge.m22,ge.dx,ge.dy],Al(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]),rl(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],rl(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&&Vh(y),se&&a.shadowVisible===!0?Vh(y):se&&a.shadowVisible===!1&&yh(y),E=a.panel,se&&Ia(a,E)&&a.shadowVisible===null&&yh(y),y.Il&&(ge=x.computePixelRatio(),ge="drop-shadow("+y.shadowOffsetX/ge+"px "+y.shadowOffsetY/ge+"px "+y.shadowBlur/ge/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",ge),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",ge)),se&&(a.Ma!==null||a.areaBackground!==null||Ia(a,E))?(vu(a,!0),a.shadowVisible===null&&yh(y)):vu(a,!1),E=se,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,se=te?a.svg:y.yd,ge=a.svg,!te&&ge!==null&&se!==ge&&ge.parentNode===a.panel.svg?(a.svg.replaceWith(se),a.svg=se,se!==null&&a.$o(y,b,he,se),Gs(y,ge),!0):(a.svg=se,ne!==null&&se===null&&(pm(y),y.nh.pop()),se===null||(a.$o(y,b,he,se),y.Il&&(x=x.computePixelRatio(),a.Dv(se,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Vh(y),a.Dd()&&yh(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&&as(a,b,se),ne!==null&&ne(a,se)),!0)}Qe.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var se=null;te!==null&&(se=a.svg.getElementById(te.split("#")[1].slice(0,-1))),se===null?(te="CLIP"+Jt++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Cn&&(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"),Gs(a,b)};function Gs(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function ss(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=An(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()}}Qe.hh=function(){},Qe.lv=function(){this.Uc=!0},Qe.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 Cn?vc(this):!1;if(!(this instanceof Cn&&E))if(this instanceof Ws){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 Cn)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],Al(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),te&&gm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Cn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),rl(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),te&&gm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},Qe.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 Ko(a,y,x,b,E,te,ne){if(x!==null){var se=1,he=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===mc)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ge=a.kq();if(se=te.width,he=te.height,E?(se=ne.width,he=ne.height):b||(se+=ge,he+=ge),(te=y instanceof Gf)&&x.xe&&(x.type===up||x.yk===se&&x.ft===he))var ye=x.xe;else{var Me=0,_e=0,Ke=0,qe=0,rt=0,Mt=0;if(Mt=rt=0,E?(rt=ne.x,Mt=ne.y):b||(rt-=ge/2,Mt-=ge/2),Me=x.start.x*se+x.start.offsetX,_e=x.start.y*he+x.start.offsetY,Ke=x.end.x*se+x.end.offsetX,qe=x.end.y*he+x.end.offsetY,Me+=rt,Ke+=rt,_e+=Mt,qe+=Mt,x.type===Xh)ye=y.createLinearGradient(Me,_e,Ke,qe);else if(x.type===Kl)Mt=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(rt=0,Mt=Math.max(se,he)/2):rt=x.startRadius,ye=y.createRadialGradient(Me,_e,rt,Ke,qe,Mt);else if(x.type===up)try{ye=y.createPattern(x.pattern,"repeat")}catch(At){ye=null}if(x.type!==up&&(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===up&&x.yk!==-1)){x.yk=-1;var xt=a.diagram;xt!==null&&x.yk===-1&&Vr(function(){xt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}Qe.rg=function(a){if(a instanceof Cn)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},Qe.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Qe.If=function(){for(var a=this instanceof Cn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ga(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){ru(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)}ru(a,!1),Hl(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Hl(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,Hl(a,!1)))}Qe.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Et.alloc();te.yi(y,x,b,E,vi),a.rotate(this.Kb,te.x,te.y),Et.free(te)}},Qe.v=function(a){if(!jl(this)){a===void 0&&(a=!1),ca(this,!0),vh(this,!0);var y=this.panel;y===null||a||y.v()}},Qe.Uj=function(){jl(this)||(ca(this,!0),vh(this,!0))};function ks(a){if(!Ms(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Un&&a.Bd(),y.$b())),vh(a,!0)}}Qe.Uk=function(){!(this.l&2048)&&(ru(this,!0),Hl(this,!0))},Qe.Wu=function(){Hl(this,!0)},Qe.N=function(){var a=this.part;a!==null&&a.N()};function Us(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Cn.Table?Du(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Cn.Auto&&b.Pb()===a?_a(a,wn,y):x===Dr?b!==null?b.type===Cn.Spot&&b.Pb()===a?_a(a,wn,y):(x=b.defaultStretch,x===Dr?_a(a,yn,y):_a(a,x,y)):_a(a,yn,y):_a(a,x,y)}function Du(a,y,x,b){var E=a.stretch;if(E!==Dr)return _a(a,E,b);var te=E=null;switch(y.stretch){case vr:te=!0;break;case wn:te=!0}switch(x.stretch){case ir:E=!0;break;case wn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===ir||y===wn),te===null&&(te=y===vr||y===wn),E===!0&&te===!0?_a(a,wn,b):E===!0?_a(a,ir,b):te===!0?_a(a,vr,b):_a(a,yn,b)}function _a(a,y,x){if(x)return y;if(y===yn||(x=a.desiredSize,x.w()))return yn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===ir)return yn;if(y===wn)return vr}else{if(y===vr)return yn;if(y===wn)return ir}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===vr)return yn;if(y===wn)return ir}else{if(y===ir)return yn;if(y===wn)return vr}return y}function vu(a,y){a.l=y?a.l|512:a.l&-513}function Ka(a){return(a.l&1024)!==0}function xd(a,y){a.l=y?a.l|1024:a.l&-1025}function ru(a,y){a.l=y?a.l|2048:a.l&-2049}function Hl(a,y){a.l=y?a.l|4096:a.l&-4097}function jl(a){return(a.l&8192)!==0}function ca(a,y){a.l=y?a.l|8192:a.l&-8193}function Ms(a){return(a.l&16384)!==0}function vh(a,y){a.l=y?a.l|16384:a.l&-16385}Qe.Gj=function(){this.svg=null},Qe.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Qe.Av=function(){},Qe.zv=function(a){return this.pa=a,ks(this),!0},Qe.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Qe.kq=function(){return 0};function _f(a){var y=a.part;if(y instanceof Un&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function Xy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Cn?a instanceof Un?a.Bd():a.qm(a,function(x){_f(x)}):_f(a))}Qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ta(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&$t("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new kn),this.localBindings.add(E),this},Qe.set=function(a){return Object.assign(this,a),this},Qe.Du=function(a){return r0(this,a),this},Qe.apply=function(a){return a(this),this},Qe.nm=function(a){return Af(this,a),this},Qe.pz=function(){return this.ih()},Qe.ih=function(){for(var a=this instanceof Cn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Qe.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Kn),this.animationTriggers.add(a.propertyName,a),this};function Wl(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=rp.I(a);typeof te=="function"?(x=hi(arguments),b=te(x),xn(b)||$t('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=en.go[a]}if(b===null&&(E!=null&&E.constructor||$t("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 Xt&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(kf(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?$t("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):r0(b,te);return b}function r0(a,y){if(typeof y=="string")if(a instanceof to)a.text=y;else if(a instanceof Br)a.figure=y;else if(a instanceof Ws)a.source=y;else if(a instanceof Cn)y=yu.I(y),y!==null&&(a.type=y);else if(a instanceof Ri){var x=Xr(Ri,y);x!==null?a.type=x:$t("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof jn?(y=Xr(jn,y),y!==null&&(a.type=y)):a instanceof ci&&(y=Xr(ci,y),y!==null&&(a.type=y));else if(y instanceof zt)a instanceof Cn||$t("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof fa){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 fa?Am(b,y):$t("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof tn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ma)a.type=y;else if(y instanceof ta)a instanceof zt||a instanceof fa?a.bind(y):$t("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof pl)a instanceof zt?a.Jv(y):$t("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof pa)a instanceof jn&&a.type===jn.o?a.figures.add(y):$t("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof ci)a instanceof pa?a.segments.add(y):$t("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ko)a instanceof Xt||a instanceof Fr?a.layout=y:$t("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)r0(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ri){x=new xr;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Af(a,x)}else if(a instanceof fa){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&$t("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)&&$t("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new xr;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Af(a,E)}else Af(a,y);else $t('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function gc(a,y){rp.add(a,y)}function dm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}cn.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 wd),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 wd),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 wd),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Ur(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&&(Ur(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Ns},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new qc),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Ns&&(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 qc),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 qc),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:io},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new qc),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Dr},set:function(a){var y=this.stretch;y!==a&&(Ur(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&&(Ur(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)&&yr(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(Kf(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(Kf(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&&bd(a,"GraphObject.areaBackground"),a instanceof Ri&&a.freeze(),Ur(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&&bd(a,"GraphObject.background"),a instanceof Ri&&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 ur)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 Et(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&&$t("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),Ka(this)&&(a=this.part,a!==null&&(co(this,a,"width"),co(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 pn(a,this.jd.height).freeze(),this.v(),this instanceof Br&&this.qc(),this.g("desiredSize",y,a),Ka(this)&&(a=this.part,a!==null&&co(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 pn(this.jd.width,a).freeze(),this.v(),this instanceof Br&&this.qc(),this.g("desiredSize",y,a),Ka(this)&&(a=this.part,a!==null&&co(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Hr},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(),Ur(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:$o},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(),Ur(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&Ga(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ga(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Ur(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:yn},set:function(a){this.reshapingBehavior!==a&&(Ur(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()&&$t("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),ks(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&&yr(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&&yr(a,">= 1",zt,"columnSpan"),Ur(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&&yr(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&&yr(a,">= 1",zt,"rowSpan"),Ur(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&&(Ur(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 Un||$t("Cannot set portID on a Link: "+a),y!==null&&x!==null&&H0(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:ba},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),_f(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&yr(a,">= 0",zt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),_f(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),_f(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&&yr(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:ba},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),_f(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&yr(a,">= 0",zt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),_f(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),_f(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&&yr(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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&&(Ur(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 rp=null;zt.className="GraphObject",rp=new Kn,gc("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=Wl(Cn,Cn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Cn){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"},Wl(Br,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new ar(0,0,2.76142374915397,2.761423749153969),spot2:new ar(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 Cn&&(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 Cn&&(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 Cn&&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 Cn&&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 Cn&&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 Cn&&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}),gc("TreeExpanderButton",function(){var a=Wl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Wl(Br,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:qi},new ta("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new ta("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 Un){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}),gc("SubGraphExpanderButton",function(){var a=Wl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Wl(Br,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:qi},new ta("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 Fr){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}),gc("ToolTip",function(){return Wl(di,Cn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Et(0,3),shadowBlur:5},Wl(Br,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new ar(0,0,4,6),spot2:new ar(1,1,-4,-4)}))}),gc("ContextMenu",function(){return Wl(di,Cn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Et(0,3),shadowBlur:5},new ta("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),gc("ContextMenuButton",function(){var a=Wl("Button");a.stretch=ir;var y=a.fb("ButtonBorder");return y instanceof Br&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new ar(0,0,2,3),y.spot2=new ar(1,1,-2,-2)),a}),gc("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=Wl("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},Wl(Br,{name:"ButtonIcon",strokeWidth:2},new ta("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}),gc("CheckBoxButton",function(a){var y=dm(a);return a=Wl("Button",{desiredSize:new pn(14,14)},Wl(Br,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:wn,geometryStretch:qn,visible:!1},y!==""?new ta("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Cn){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}),gc("CheckBox",function(a){a=dm(a),a=Wl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new wr(0,1,0,0)});var y=Wl(Cn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new wr(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),zt.None=yn=new tn(zt,"None",0),zt.Default=Dr=new tn(zt,"Default",0),zt.Vertical=vr=new tn(zt,"Vertical",4),zt.Horizontal=ir=new tn(zt,"Horizontal",5),zt.Fill=wn=new tn(zt,"Fill",3),zt.Uniform=qn=new tn(zt,"Uniform",1),zt.UniformToFill=ti=new tn(zt,"UniformToFill",2),zt.FlipVertical=Kr=new tn(zt,"FlipVertical",1),zt.FlipHorizontal=si=new tn(zt,"FlipHorizontal",2),zt.FlipBoth=Hi=new tn(zt,"FlipBoth",3),zt.make=Wl,zt.getBuilders=function(){var a=new Kn,y;for(y in rp)if(y!==y.toLowerCase()){var x=rp.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},zt.defineBuilder=gc,zt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=rp.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof zt))return y&&b.set(y),b;$t('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},zt.takeBuilderArgument=dm;function wd(){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=Hr,this.o=$o,this.hg=Dr,this.ob=this.Bi=1,this.Pf=yn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}wd.prototype.copy=function(){var a=new wd;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 qc(){this.u=-1/0,this.o=0,this.F=io,this.rr=Ns,this.j=this.V="None"}qc.prototype.copy=function(){var a=new qc;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},qc.className="LinkElementSettings";function lg(){this.yj=this.Xi=za,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}lg.prototype.copy=function(){var a=new lg;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},lg.className="LinkSettings";function zf(){this.ha=[1,0,0,1,0,0]}zf.prototype.copy=function(){var a=new zf;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},zf.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},zf.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},zf.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)}},zf.className="STransform";function Pd(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Pd.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Pd.className="SGradient";function th(a,y,x){this.ownerDocument=a=y===void 0?en.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 ml(this,x)}th.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},th.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),xn(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},th.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},th.prototype.focus=function(){this.Oa.focus()},th.prototype.mx=function(){this.ownerDocument=null},cn.Object.defineProperties(th.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}}}),th.className="SVGSurface";function ml(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 zf,this.j=pm(this),this.Nj=pm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Jt++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yy(a,y,x,b,E,te,ne){a.Nj===void 0?ug(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}Qe=ml.prototype,Qe.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,ge=he-1e-6,ye=x*Math.cos(b),Me=x*Math.sin(b),_e=a+ye,Ke=y+Me,qe=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-_e)||1e-6<Math.abs(se-Ke))&&this.path.push(["L",_e,+Ke]),0>b&&(b=b%he+he),b>ge?(this.path.push(["A",x,x,0,1,qe,a-ye,y-Me]),this.path.push(["A",x,x,0,1,qe,_e,Ke])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),qe,a+x*Math.cos(E),y+x*Math.sin(E)])},Qe.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Qe.Se=function(a){this.addPath(this.path,this.rb,a||0)},Qe.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},Qe.clearRect=function(){},Qe.clip=function(){this.Yl.clipPath=!0},Qe.closePath=function(){this.path.push(["z"])},Qe.createLinearGradient=function(a,y,x,b){var E=new Pd("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Qe.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+Jt++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Bf,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Qe.createRadialGradient=function(a,y,x,b,E,te){var ne=new Pd("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)}Qe.drawImage=function(a,y,x,b,E,te,ne,se,he){var ge="";a instanceof HTMLCanvasElement&&(ge=a.toDataURL()),a instanceof HTMLImageElement&&(ge=a.getAttribute("src"));var ye=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,se=b=ye,he=E=a),b=b||0,E=E||0,se=se||0,he=he||0,$y(this,y,x,b,E,te||0,ne||0,se,he),te={x:0,y:0,width:ye||b,height:a||E,href:ge},Ht.$(b,se)&&Ht.$(E,he)?ge.toLowerCase().indexOf(".svg")===-1&&ge.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==ye||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),ip(this,Bf,te,this.rb),this.addElement(Bf,te)},Qe.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),i0(this,this.Yl)},Qe.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Qe.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},ip(this,"fill",a,this.rb),this.addElement("rect",a)},Qe.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},ip(this,"fill",a,this.rb),i0(this,a),this.svg.prepend(this.Ud("rect",a))},Qe.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},ip(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Qe.lineTo=function(a,y){this.path.push(["L",a,y])},Qe.moveTo=function(a,y){this.path.push(["M",a,y])},Qe.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Qe.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"])},Qe.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},Qe.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())},Qe.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||ug(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]+")"}Qe.scale=function(a,y){this.rb.scale(a,y)},Qe.translate=function(a,y){this.rb.translate(a,y)},Qe.transform=function(){},Qe.yc=function(){},Qe.stroke=function(){qy(this,this.Yl)},Qe.jk=function(){this.clipInsteadOfFill||this.stroke()},Qe.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Qe.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 ip(a,y,x,b){y==="fill"?i0(a,x):y==="stroke"&&qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function i0(a,y){a.fillStyle instanceof Pd?y.fill=o0(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Pd?y.setAttributeNS(null,"fill",o0(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Pd)y.stroke=o0(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function o0(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+Jt++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var te=[],ne=0;ne<y;ne++){var se=E[ne],he=se.color;se={offset:se.offset,"stop-color":he},/^rgba\(/.test(he)&&(he=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(he),se["stop-color"]="rgb("+he[1]+","+he[2]+","+he[3]+")",se["stop-opacity"]=he[4]),te.push(se)}for(te.sort(function(ge,ye){return ge.offset>ye.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}Qe.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=hi(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,ip(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 ug(a,y,x,b,E,te,ne){var se=new zf;se.ha=[y,x,b,E,te,ne],y={},ip(a,"g",y,se),se=a.addElement("g",y),a.nh.push(se)}function pm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Qe.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function yh(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Vh(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Qe.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Qe.fs=function(){this.Ct=!1},Qe.Vc=function(){},Qe.Wx=function(){},ml.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},ml.prototype.getImageData=function(){return null},ml.prototype.measureText=function(){return null};function gm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}ml.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},ml.className="SVGContext",Xt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new th(this,en.document));var y=new th(this,en.document,!0);a===void 0&&(a=new xr);var x=this;return gd(this,function(b,E){return b=um(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Xt.prototype.makeSvg=Xt.prototype.Cs,Xt.prototype.av=function(a){return this.Cs(a)},Xt.prototype.makeSVG=Xt.prototype.av;function iu(a,y,x,b){this.ownerDocument=y=y===void 0?en.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Gf(y,x,b),y.H=a}iu.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},iu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},iu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},iu.prototype.focus=function(){this.Oa.focus()},iu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},cn.Object.defineProperties(iu.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}}}),iu.className="CanvasSurface";function Gf(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&$t("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new Wr,this.isTemporary=!!x}Qe=Gf.prototype,Qe.Wx=function(a){this.Z.imageSmoothingEnabled=a},Qe.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},Qe.beginPath=function(){this.Z.beginPath()},Qe.Se=function(){},Qe.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},Qe.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Qe.clip=function(){this.Z.clip()},Qe.closePath=function(){this.Z.closePath()},Qe.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Qe.createPattern=function(a,y){return this.Z.createPattern(a,y)},Qe.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},Qe.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)},Qe.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Qe.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Qe.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Qe.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Qe.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Qe.lineTo=function(a,y){this.Z.lineTo(a,y)},Qe.measureText=function(a){return this.Z.measureText(a)},Qe.moveTo=function(a,y){this.Z.moveTo(a,y)},Qe.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Qe.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Qe.restore=function(){this.Z.restore()},Qe.save=function(){this.yc(),this.Z.save()},Gf.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Qe=Gf.prototype,Qe.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},Qe.scale=function(a,y){this.El.scale(a,y)},Qe.translate=function(a,y){this.El.translate(a,y)},Qe.stroke=function(){this.Z.stroke()},Qe.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}},Qe.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Qe.ng=function(a,y){if(a instanceof Ri&&a.type===Kl){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)},Qe.jk=function(){this.Hm||this.stroke()},Qe.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Qe.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Qe.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},Qe.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Qe.Hs=function(){},cn.Object.defineProperties(Gf.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([]);Gf.className="CanvasSurfaceContext";function hg(){this.F=this.o=this.u=this.j=0}hg.className="ColorNumbers";function Ri(a,y){lp||(c0(),lp=!0),Ni(this),this._isFrozen=!1,a===void 0?(this.na=mc,this.xk="black"):typeof a=="string"?(this.na=mc,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Xh?(this.Qd=Cl,this.Lk=hs):this.Lk=a===Kl?this.Qd=vi:this.Qd=ba,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ri.prototype.copy=function(){var a=new Ri;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},Qe=Ri.prototype,Qe.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Qe.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Qe.qb=function(a){a.classType===Ri&&(this.type=a)},Qe.toString=function(){var a="Brush(";if(this.type===mc)a+=this.color;else if(a=this.type===Xh?a+"Linear ":this.type===Kl?a+"Radial ":this.type===up?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+")"},Qe.addColorStop=function(a,y){return this._isFrozen&&cr(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&yr(a,"0 <= loc <= 1",Ri,"addColorStop:loc"),this.we===null&&(this.we=new Kn),this.we.add(a,y),this.na===mc&&(this.type=Xh),this.xe=null,this},Qe.Vz=function(a,y){if(this._isFrozen&&cr(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?hp:y,this.type===mc)Zh(this.color),this.color=ap(a,y);else if((this.type===Xh||this.type===Kl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Zh(x.value),this.addColorStop(x.key,ap(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?hp:x,Zh(a),ap(y,x)}Qe.Wy=function(a,y){if(this._isFrozen&&cr(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?hp:y,this.type===mc)Zh(this.color),this.color=ap(-a,y);else if((this.type===Xh||this.type===Kl)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Zh(x.value),this.addColorStop(x.key,ap(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?hp:x,Zh(a),ap(-y,x)}function a0(a,y,x){Zh(a),a=uo.j;var b=uo.u,E=uo.o,te=uo.F;return Zh(y),x===void 0&&(x=.5),"rgba("+Math.round((uo.j-a)*x+a)+", "+Math.round((uo.u-b)*x+b)+", "+Math.round((uo.o-E)*x+E)+", "+Math.round((uo.F-te)*x+te)+")"}Qe.Gx=function(){if(this.type===mc)return op(this.color);if((this.type===Xh||this.type===Kl)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Kl)return op(a.first().value);if(a.get(.5)!==null)return op(a.get(.5));if(a.count===2)return a=a.Fa(),op(a0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,te=1;y.next();){var ne=y.key,se=Math.abs(.5-y.key);E>te&&se<E?(x=ne,E=se):te>=E&&se<te&&(b=ne,te=se)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,op(a0(a.get(x),a.get(b),1-te/E))}return!1};function op(a){return a?a instanceof Ri?a.Gx():(Zh(a),128>(299*uo.j+587*uo.u+114*uo.o)/1e3):!1}function ap(a,y){switch(y){case hp:y=100*l0(uo.j);var x=100*l0(uo.u),b=100*l0(uo.o);return Ts.j=.4124564*y+.3575761*x+.1804375*b,Ts.u=.2126729*y+.7151522*x+.072175*b,Ts.o=.0193339*y+.119192*x+.9503041*b,Ts.F=uo.F,y=h0(Ts.j/sp[0]),x=h0(Ts.u/sp[1]),b=h0(Ts.o/sp[2]),Sh.j=116*x-16,Sh.u=500*(y-x),Sh.o=200*(x-b),Sh.F=Ts.F,Sh.j=Math.min(100,Math.max(0,Sh.j+100*a)),a=(Sh.j+16)/116,y=a-Sh.o/200,Ts.j=sp[0]*n1(Sh.u/500+a),Ts.u=sp[1]*(Sh.j>mm*f0?Math.pow(a,3):Sh.j/mm),Ts.o=sp[2]*n1(y),Ts.F=Sh.F,a=-.969266*Ts.j+1.8760108*Ts.u+.041556*Ts.o,y=.0556434*Ts.j+-.2040259*Ts.u+1.0572252*Ts.o,uo.j=255*u0((3.2404542*Ts.j+-1.5371385*Ts.u+-.4985314*Ts.o)/100),uo.u=255*u0(a/100),uo.o=255*u0(y/100),uo.F=Ts.F,uo.j=Math.round(uo.j),255<uo.j?uo.j=255:0>uo.j&&(uo.j=0),uo.u=Math.round(uo.u),255<uo.u?uo.u=255:0>uo.u&&(uo.u=0),uo.o=Math.round(uo.o),255<uo.o?uo.o=255:0>uo.o&&(uo.o=0),"rgba("+uo.j+", "+uo.u+", "+uo.o+", "+uo.F+")";case r1:return s0(),Ol.o=Math.min(100,Math.max(0,Ol.o+100*a)),"hsla("+Ol.j+", "+Ol.u+"%, "+Ol.o+"%, "+Ol.F+")";default:$t("Unknown color space: "+y)}}function Zh(a){lp||(c0(),lp=!0);var y=d0;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,uo.j=a[0],uo.u=a[1],uo.o=a[2],uo.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,uo.j=0,uo.u=0,uo.o=0,uo.F=1)}}function s0(){var a=uo.j/255,y=uo.u/255,x=uo.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))}Ol.j=Math.round(ne),Ol.u=Math.round(100*a),Ol.o=Math.round(100*E),Ol.F=uo.F}function l0(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function u0(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function h0(a){return a>f0?Math.pow(a,1/3):(mm*a+16)/116}function n1(a){var y=a*a*a;return y>f0?y:(116*a-16)/mm}function bd(a,y){typeof a!="string"&&(a instanceof Ri||$t("Value for "+y+" must be a color string or a Brush, not "+a))}function c0(){d0=Uo?new iu(null,void 0,{willReadFrequently:!0}).context:null}cn.Object.defineProperties(Ri.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&cr(this,a),this.na=a,this.start.Mc()&&(a===Xh?this.start=Cl:a===Kl&&(this.start=vi)),this.end.Mc()&&(a===Xh?this.end=hs:a===Kl&&(this.end=vi)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&cr(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&cr(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&cr(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&cr(this,a),0>a&&yr(a,">= zero",Ri,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&cr(this,a),0>a&&yr(a,">= zero",Ri,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&cr(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&cr(this,a),this.cr=a,this.xe=null}}}),Ri.prototype.isDark=Ri.prototype.Gx,Ri.prototype.darkenBy=Ri.prototype.Wy,Ri.prototype.lightenBy=Ri.prototype.Vz,Ri.prototype.addColorStop=Ri.prototype.addColorStop;var f0=216/24389,mm=24389/27,sp=[95.047,100,108.883],d0=null,uo=new hg,Ol=new hg,Ts=new hg,Sh=new hg,lp=!1;Ri.className="Brush";var mc;Ri.Solid=mc=new tn(Ri,"Solid",0);var Xh;Ri.Linear=Xh=new tn(Ri,"Linear",1);var Kl;Ri.Radial=Kl=new tn(Ri,"Radial",2);var up;Ri.Pattern=up=new tn(Ri,"Pattern",4);var hp;Ri.Lab=hp=new tn(Ri,"Lab",5);var r1;Ri.HSL=r1=new tn(Ri,"HSL",6),Ri.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},Ri.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;lp||(c0(),lp=!0);var y=d0;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},Ri.lighten=function(a){return e1(a)},Ri.lightenBy=e1,Ri.darken=function(a){return t1(a)},Ri.darkenBy=t1,Ri.mix=a0,Ri.isDark=op;function ma(){this.xa="Base"}ma.prototype.measure=function(){},ma.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},ma.prototype.arrange=function(){},ma.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},ma.prototype.iA=function(a){a.Uj()},ma.prototype.gc=function(){},cn.Object.defineProperties(ma.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Cn}}}),ma.prototype.remeasureObject=ma.prototype.iA,ma.prototype.arrangeElement=ma.prototype.Ly,ma.prototype.measureElement=ma.prototype.Yz,ma.className="PanelLayout";function vm(){this.xa="Base"}Vt(vm,ma),vm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;a=Yh(a);for(var he=0;he<se;he++){var ge=b[he];if(ge.visible||ge===a){var ye=ge.margin,Me=ye.right+ye.left;ye=ye.top+ye.bottom,ge.measure(y,x,te,ne);var _e=ge.measuredBounds;Me=Math.max(_e.width+Me,0),ye=Math.max(_e.height+ye,0),_e=ge.position.x;var Ke=ge.position.y;isFinite(_e)||(_e=0),isFinite(Ke)||(Ke=0),ge instanceof Br&&ge.isGeometryPositioned&&(ge=ge.strokeWidth/2,_e-=ge,Ke-=ge),bo(E,_e,Ke,Me,ye)}}},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var te=y[E],ne=te.measuredBounds,se=te.margin,he=te.position.x,ge=te.position.y;if(he=isNaN(he)?-a:he-a,ge=isNaN(ge)?-x:ge-x,te instanceof Br&&te.isGeometryPositioned){var ye=te.strokeWidth/2;he-=ye,ge-=ye}te.visible&&te.arrange(he+se.left,ge+se.top,ne.width,ne.height)}};function ym(){this.xa="Base"}Vt(ym,ma),ym.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=sr(),te=Yh(a);for(var he=0;he<se;he++){var ge=b[he];if(ge.visible||ge===te){var ye=Us(ge,!1);if(ye!==yn&&ye!==ir)y.push(ge);else{ge.measure(1/0,x,0,ne),ye=ge.margin,ge=ge.measuredBounds;var Me=Math.max(ge.height+ye.top+ye.bottom,0);E.width+=Math.max(ge.width+ye.right+ye.left,0),E.height=Math.max(E.height,Me)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)he=y[a],(he.visible||he===te)&&(ye=he.margin,se=ye.right+ye.left,ye=ye.top+ye.bottom,he.measure(1/0,x,0,ne),he=he.measuredBounds,ye=Math.max(he.height+ye,0),E.width+=Math.max(he.width+se,0),E.height=Math.max(E.height,ye));dr(y)},ym.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,se=ne?x.width:E.left,he=0;he<b;he++){var ge=te,ye=y[he];if(ye.visible){var Me=ye.measuredBounds,_e=ye.margin,Ke=_e.top+_e.bottom,qe=te+E.bottom,rt=Me.height,Mt=Us(ye,!1);(isNaN(ye.desiredSize.height)&&Mt===wn||Mt===vr)&&(rt=Math.max(x.height-Ke-qe,0)),Ke=rt+Ke+qe,qe=ye.alignment,qe.Xb()&&(qe=a.defaultAlignment),qe.sb()||(qe=vi),ne&&(se-=Me.width+_e.left+_e.right),ye.arrange(se+qe.offsetX+_e.left,ge+qe.offsetY+_e.top+(x.height*qe.y-Ke*qe.y),Me.width,rt),ne||(se+=Me.width+_e.left+_e.right)}}};function Sm(){this.xa="Base"}Vt(Sm,ma),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=sr();for(var se=Yh(a),he=0;he<ne;he++){var ge=b[he];if(ge.visible||ge===se){var ye=Us(ge,!1);if(ye!==yn&&ye!==vr)x.push(ge);else{var Me=ge.margin;ye=Me.right+Me.left,Me=Me.top+Me.bottom,ge.measure(y,1/0,te,0),ge=ge.measuredBounds,Da(E,Math.max(E.width,Math.max(ge.width+ye,0)),E.height+Math.max(ge.height+Me,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)he=x[a],(he.visible||he===se)&&(ge=he.margin,ne=ge.right+ge.left,ge=ge.top+ge.bottom,he.measure(y,1/0,te,0),he=he.measuredBounds,ge=Math.max(he.height+ge,0),E.width=Math.max(E.width,Math.max(he.width+ne,0)),E.height+=ge);dr(x)}},Sm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,se=ne?x.height:E.top,he=0;he<b;he++){var ge=te,ye=y[he];if(ye.visible){var Me=ye.measuredBounds,_e=ye.margin,Ke=_e.left+_e.right,qe=te+E.right,rt=Me.width,Mt=Us(ye,!1);(isNaN(ye.desiredSize.width)&&Mt===wn||Mt===ir)&&(rt=Math.max(x.width-Ke-qe,0)),Ke=rt+Ke+qe,qe=ye.alignment,qe.Xb()&&(qe=a.defaultAlignment),qe.sb()||(qe=vi),ne&&(se-=Me.height+_e.bottom+_e.top),ye.arrange(ge+qe.offsetX+_e.left+(x.width*qe.x-Ke*qe.x),se+qe.offsetY+_e.top,rt,Me.height),ne||(se+=Me.height+_e.bottom+_e.top)}}};function xm(){this.xa="Base"}Vt(xm,ma),xm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),ge=he.margin,ye=ge.right+ge.left,Me=ge.top+ge.bottom;he.measure(y,x,te,ne);var _e=he.measuredBounds;te=_e.width,ne=_e.height;var Ke=Math.max(te+ye,0),qe=Math.max(ne+Me,0),rt=a.isClipping,Mt=on.allocAt(-ge.left,-ge.top,Ke,qe),xt=on.allocAt(0,0,te,ne);p0(he,xt,!0),te=xt.width,ne=xt.height;for(var At=!0,Ot=Yh(a),Dt=0;Dt<se;Dt++){var _t=b[Dt];_e=y;var Yt=x;if(_t!==he&&(_t.visible||_t===Ot)){ge=_t.margin;var _n=ge.left,Jn=ge.top;switch(Ke=ge.right+ge.left,qe=ge.top+ge.bottom,ge=Us(_t,!1),ge){case wn:_e=te,Yt=ne,Jn=_n=qe=Ke=0;break;case ir:_e=te,_n=Ke=0;break;case vr:Yt=ne,Jn=qe=0}_t.measure(_e,Yt,0,0),_e=_t.measuredBounds,Ke=Math.max(_e.width+Ke,0),qe=Math.max(_e.height+qe,0),ge=_t.alignment,ge.Xb()&&(ge=a.defaultAlignment),ge.sb()||(ge=vi);var Xn=_t.alignmentFocus;if(Xn.Xb()&&(Xn=vi),Yt=null,_t instanceof Cn&&_t.$e!==""&&(Yt=_t.fb(_t.$e),Yt===_t&&(Yt=null)),_n=xt.x-_n,Jn=xt.y-Jn,Yt!==null){for(_t.arrange(0,0,_e.width,_e.height),_e=Yt.actualBounds,_e=Et.allocAt(_e.x+(Xn.x*_e.width-Xn.offsetX),_e.y+(Xn.y*_e.height-Xn.offsetY)),Yt=Yt.panel;Yt!==_t;)Yt.transform.Ga(_e),Yt=Yt.panel;_n+=ge.x*te+ge.offsetX-_e.x,Jn+=ge.y*ne+ge.offsetY-_e.y,Et.free(_e)}else _n+=ge.x*te+ge.offsetX-(Xn.x*_e.width+Xn.offsetX),Jn+=ge.y*ne+ge.offsetY-(Xn.y*_e.height+Xn.offsetY);At?(At=!1,E.h(_n,Jn,Ke,qe)):bo(E,_n,Jn,Ke,qe)}}switch(At?E.assign(Mt):rt?E.Uu(xt.x,xt.y,xt.width,xt.height):bo(E,Mt.x,Mt.y,Mt.width,Mt.height),on.free(Mt),on.free(xt),ge=he.stretch,ge===Dr&&(ge=Us(he,!1)),ge){case yn:return;case wn:if(!isFinite(y)&&!isFinite(x))return;break;case ir:if(!isFinite(y))return;break;case vr:if(!isFinite(x))return}for(_e=he.measuredBounds,te=_e.width,ne=_e.height,Ke=Math.max(te+ye,0),qe=Math.max(ne+Me,0),ge=he.margin,xt=on.allocAt(-ge.left,-ge.top,Ke,qe),p0(he,xt,!0),te=xt.width,ne=xt.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==Ot||(ge=x.margin,Ke=ge.right+ge.left,qe=ge.top+ge.bottom,_e=x.measuredBounds,Ke=Math.max(_e.width+Ke,0),qe=Math.max(_e.height+qe,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=vi),x=x.alignmentFocus,x.Xb()&&(x=vi),At?(At=!1,E.h(ye.x*te+ye.offsetX-(x.x*_e.width+x.offsetX)-ge.left,ye.y*ne+ye.offsetY-(x.y*_e.height+x.offsetY)-ge.top,Ke,qe)):bo(E,ye.x*te+ye.offsetX-(x.x*_e.width+x.offsetX)-ge.left,ye.y*ne+ye.offsetY-(x.y*_e.height+x.offsetY)-ge.top,Ke,qe));At?E.assign(Mt):rt?E.Uu(xt.x,xt.y,xt.width,xt.height):bo(E,Mt.x,Mt.y,Mt.width,Mt.height),on.free(xt)},xm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,se=te.height,he=a.padding;te=he.left,he=he.top;var ge=te-x.x,ye=he-x.y;for(E.arrange(ge,ye,ne,se),ne=on.allocAt(0,0,ne,se),p0(E,ne,!1),se=0;se<b;se++){var Me=y[se];if(Me!==E){ge=Me.measuredBounds;var _e=ge.width,Ke=ge.height;ye=Me.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=vi);var qe=Me.alignmentFocus;if(qe.Xb()&&(qe=vi),ge=null,Me instanceof Cn&&Me.$e!==""&&(ge=Me.fb(Me.$e),ge===Me&&(ge=null)),ge!==null){var rt=ge.actualBounds;for(qe=Et.allocAt(rt.x+(qe.x*rt.width-qe.offsetX),rt.y+(qe.y*rt.height-qe.offsetY)),ge=ge.panel;ge!==Me;)ge.transform.Ga(qe),ge=ge.panel;ge=ye.x*ne.width+ye.offsetX-qe.x,ye=ye.y*ne.height+ye.offsetY-qe.y,Et.free(qe)}else ge=ye.x*ne.width+ye.offsetX-(qe.x*_e+qe.offsetX),ye=ye.y*ne.height+ye.offsetY-(qe.y*Ke+qe.offsetY);ge+=ne.x-x.x,ye+=ne.y-x.y,Me.visible&&Me.arrange(te+ge,he+ye,_e,Ke)}}on.free(ne)};function p0(a,y,x){var b=null;if(a instanceof Cn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function wm(){this.xa="Base"}Vt(wm,ma),wm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),ge=he.margin,ye=y,Me=x,_e=ge.right+ge.left,Ke=ge.top+ge.bottom;he.measure(y,x,te,ne),ge=he.measuredBounds;var qe=0,rt=null;he instanceof Br&&(rt=he,qe=rt.strokeWidth*rt.scale);var Mt=Math.max(ge.width+_e,0);ge=Math.max(ge.height+Ke,0);var xt=y0(he),At=xt.x*Mt+xt.offsetX;xt=xt.y*ge+xt.offsetY;var Ot=S0(he),Dt=Ot.x*Mt+Ot.offsetX;for(Ot=Ot.y*ge+Ot.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(At-Dt)-qe,0)),isFinite(x)&&(Me=Math.max(Math.abs(xt-Ot)-qe,0)),qe=pn.alloc(),qe.h(0,0),a=Yh(a),Ot=0;Ot<se;Ot++)xt=b[Ot],xt===he||!xt.visible&&xt!==a||(ge=xt.margin,Mt=ge.right+ge.left,At=ge.top+ge.bottom,xt.measure(ye,Me,0,0),ge=xt.measuredBounds,Mt=Math.max(ge.width+Mt,0),ge=Math.max(ge.height+At,0),qe.h(Math.max(Mt,qe.width),Math.max(ge,qe.height)));if(se===1)E.width=Mt,E.height=ge,pn.free(qe);else{switch(xt=y0(he),Ot=S0(he),se=b=0,Ot.x!==xt.x&&Ot.y!==xt.y&&(b=qe.width/Math.abs(Ot.x-xt.x),se=qe.height/Math.abs(Ot.y-xt.y)),pn.free(qe),qe=0,rt!==null&&(qe=rt.strokeWidth*rt.scale,E0(rt)===qn&&(b=se=Math.max(b,se))),b+=Math.abs(xt.offsetX)+Math.abs(Ot.offsetX)+qe,se+=Math.abs(xt.offsetY)+Math.abs(Ot.offsetY)+qe,rt=he.stretch,rt===Dr&&(rt=Us(he,!1)),rt){case yn:ne=te=0;break;case wn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case ir: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+_e,E.height=he.measuredBounds.height+Ke}},wm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=on.alloc();te.h(0,0,1,1);var ne=b.margin,se=ne.left;ne=ne.top;var he=a.padding,ge=he.left;he=he.top,b.arrange(ge+se,he+ne,E.width,E.height);var ye=y0(b),Me=S0(b),_e=ye.y*E.height+ye.offsetY,Ke=Me.x*E.width+Me.offsetX;for(Me=Me.y*E.height+Me.offsetY,te.x=ye.x*E.width+ye.offsetX,te.y=_e,bo(te,Ke,Me,0,0),te.x+=se+ge,te.y+=ne+he,E=0;E<x;E++)se=y[E],se!==b&&(ge=se.measuredBounds,ne=se.margin,he=Math.max(ge.width+ne.right+ne.left,0),ye=Math.max(ge.height+ne.top+ne.bottom,0),_e=se.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=vi),he=te.width*_e.x+_e.offsetX-he*_e.x+ne.left+te.x,ne=te.height*_e.y+_e.offsetY-ye*_e.y+ne.top+te.y,se.visible&&(ia(te.x,te.y,te.width,te.height,he,ne,ge.width,ge.height)?se.arrange(he,ne,ge.width,ge.height):se.arrange(he,ne,ge.width,ge.height,new on(te.x,te.y,te.width,te.height))));on.free(te)};function Pm(){this.xa="Base",this.name="Table"}Vt(Pm,ma),Pm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=sr(),se=sr(),he=0;he<te;he++){var ge=b[he],ye=ge instanceof Cn?ge:null;if(ye!==null&&vc(ye)&&ge.visible){se.push(ye);for(var Me=ye.O.s,_e=Me.length,Ke=0;Ke<_e;Ke++){var qe=Me[Ke];ye.type===Cn.TableRow?qe.row=ge.row:ye.type===Cn.TableColumn&&(qe.column=ge.column),ne.push(qe)}}else ne.push(ge)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var rt=[],Mt=0;Mt<te;Mt++){var xt=ne[Mt];xt.visible&&(ca(xt,!0),vh(xt,!0),rt[xt.row]||(rt[xt.row]=[]),rt[xt.row][xt.column]||(rt[xt.row][xt.column]=[]),rt[xt.row][xt.column].push(xt))}dr(ne);var At=sr(),Ot=sr(),Dt=sr(),_t={count:0},Yt={count:0},_n=y,Jn=x,Xn=a.rowDefs,Mn=a.colDefs,mn=null;te=Xn.length;for(var Or=0;Or<te;Or++)mn=Xn[Or],mn!==void 0&&(mn.actual=0);te=Mn.length;for(var br=0;br<te;br++)mn=Mn[br],mn!==void 0&&(mn.actual=0);for(var xi=rt.length,Qi=0,Ma=0;Ma<xi;Ma++)rt[Ma]&&(Qi=Math.max(Qi,rt[Ma].length));var Oa=Math.min(a.topIndex,xi-1),vs=Math.min(a.leftIndex,Qi-1),Ta=0;xi=rt.length;for(var Mc=Yh(a),na=0;na<xi;na++)if(rt[na]){Qi=rt[na].length;var zu=a.Fb(na);zu.actual=0;for(var ys=zu.oc=0;ys<Qi;ys++)if(rt[na][ys]){var Tc=a.Eb(ys);At[ys]===void 0&&(Tc.actual=0,Tc.oc=0,At[ys]=!0);for(var Rl=rt[na][ys],lu=Rl.length,Sl=0;Sl<lu;Sl++){var ol=Rl[Sl];if(ol.visible||ol===Mc){var pf=1<ol.rowSpan||1<ol.columnSpan;pf&&(na<Oa||ys<vs||Ot.push(ol));var Gu=ol.margin,Op=Gu.right+Gu.left,xl=Gu.top+Gu.bottom,Ss=Du(ol,zu,Tc,!1),Jg=ol.desiredSize,Dd=!isNaN(Jg.height),ih=!isNaN(Jg.width)&&Dd;if(pf||Ss===yn||ih||na<Oa||ys<vs||(_t[ys]!==void 0||Ss!==wn&&Ss!==ir||(_t[ys]=-1,_t.count++),Yt[na]!==void 0||Ss!==wn&&Ss!==vr||(Yt[na]=-1,Yt.count++),Dt.push(ol)),ol.measure(1/0,1/0,0,0),!(na<Oa||ys<vs)){var al=ol.measuredBounds,$f=Math.max(al.width+Op,0),wl=Math.max(al.height+xl,0);if(ol.rowSpan===1&&(Ss===yn||Ss===ir)){mn=a.Fb(na);var gf=mn.Wc();Ta=Math.max(wl-mn.actual,0),Ta+gf>Jn&&(Ta=Math.max(Jn-gf,0));var Kv=mn.oa===0;mn.oc=mn.oc+Ta,mn.actual=mn.oa+Ta,Jn=Math.max(Jn-(Ta+(Kv?gf:0)),0)}if(ol.columnSpan===1&&(Ss===yn||Ss===vr)){mn=a.Eb(ys);var Qg=mn.Wc();Ta=Math.max($f-mn.actual,0),Ta+Qg>_n&&(Ta=Math.max(_n-Qg,0));var Gy=mn.oa===0;mn.oc=mn.oc+Ta,mn.actual=mn.oa+Ta,_n=Math.max(_n-(Ta+(Gy?Qg:0)),0)}pf&&ol.Uj()}}}}}dr(At);var Th=0,Qh=0;te=a.columnCount;for(var Rd=0;Rd<te;Rd++){var mf=Mn[Rd];mf!==void 0&&(Th+=isNaN(mf.Hc)?mf.oc:mf.Hc,mf.oc!==0&&(Th+=mf.Wc()))}te=a.rowCount;for(var Fp=0;Fp<te;Fp++){var vf=Xn[Fp];vf!==void 0&&(Qh+=isNaN(vf.Hc)?vf.oc:vf.Hc,vf.oc!==0&&(Qh+=vf.Wc()))}_n=Math.max(y-Th,0);var Lh=Jn=Math.max(x-Qh,0),Lc=_n;te=Dt.length;for(var sl=0;sl<te;sl++){var oh=Dt[sl],Vv=a.Fb(oh.row),qh=a.Eb(oh.column),Dp=oh.measuredBounds,Uu=oh.margin,Jf=Uu.right+Uu.left,ah=Uu.top+Uu.bottom;_t[oh.column]=qh.oc===0&&_t[oh.column]!==void 0?Math.max(Dp.width+Jf,_t[oh.column]):null,Yt[oh.row]=Vv.oc===0&&Yt[oh.row]!==void 0?Math.max(Dp.height+ah,Yt[oh.row]):null}var Bd=0,Rp=0,Cu;for(Cu in Yt)Cu!=="count"&&(Bd+=Yt[Cu]);for(Cu in _t)Cu!=="count"&&(Rp+=_t[Cu]);for(var Ha=pn.alloc(),qg=0;qg<te;qg++){var Ds=Dt[qg];if(Ds.visible||Ds===Mc){var ra=a.Fb(Ds.row),Rs=a.Eb(Ds.column),ec=0;isFinite(Rs.width)?ec=Rs.width:(isFinite(_n)&&_t[Ds.column]!==null?Rp===0?ec=Rs.actual+_n:ec=_t[Ds.column]/Rp*Lc:_t[Ds.column]!==null?ec=_n:ec=Rs.actual||_n,ec=Math.max(0,ec-Rs.Wc()));var Nc=0;switch(isFinite(ra.height)?Nc=ra.height:(isFinite(Jn)&&Yt[Ds.row]!==null?Bd===0?Nc=ra.actual+Jn:Nc=Yt[Ds.row]/Bd*Lh:Yt[Ds.row]!==null?Nc=Jn:Nc=ra.actual||Jn,Nc=Math.max(0,Nc-ra.Wc())),Ha.h(Math.max(Rs.minimum,Math.min(ec,Rs.maximum)),Math.max(ra.minimum,Math.min(Nc,ra.maximum))),Ss=Du(Ds,ra,Rs,!1),Ss){case ir:Ha.height=Math.max(Ha.height,ra.actual+Jn);break;case vr:Ha.width=Math.max(Ha.width,Rs.actual+_n)}var Qf=Ds.margin,Uy=Qf.right+Qf.left,Zv=Qf.top+Qf.bottom;Ds.Uj(),Ds.measure(Ha.width,Ha.height,Rs.minimum,ra.minimum);var Bp=Ds.measuredBounds,qf=Math.max(Bp.width+Uy,0),Id=Math.max(Bp.height+Zv,0);isFinite(_n)&&(qf=Math.min(qf,Ha.width)),isFinite(Jn)&&(Id=Math.min(Id,Ha.height));var ll=0;ll=ra.actual,ra.actual=Math.max(ra.actual,Id),ra.oc=Math.max(ra.oc,Id),Ta=ra.actual-ll,Jn=Math.max(Jn-Ta,0),Yt[Ds.row]===null&&(Lh=Math.max(Lh-Ta,0)),ll=Rs.actual,Rs.actual=Math.max(Rs.actual,qf),Rs.oc=Math.max(Rs.oc,qf),Ta=Rs.actual-ll,_n=Math.max(_n-Ta,0),_t[Ds.column]===null&&(Lc=Math.max(Lc-Ta,0))}}dr(Dt);var tc=pn.alloc(),Hu=sr(),$l=sr();if(te=Ot.length,te!==0){for(var yf=0;yf<xi;yf++)if(rt[yf]){Qi=rt[yf].length;var Ip=a.Fb(yf);Hu[yf]=Ip.actual;for(var Sf=0;Sf<Qi;Sf++)if(rt[yf][Sf]){var Xv=a.Eb(Sf);$l[Sf]=Xv.actual}}}for(var _p=0;_p<te;_p++){var Yo=Ot[_p];if(Yo.visible||Yo===Mc){var Eu=a.Fb(Yo.row),uu=a.Eb(Yo.column);switch(Ha.h(Math.max(uu.minimum,Math.min(y,uu.maximum)),Math.max(Eu.minimum,Math.min(x,Eu.maximum))),Ss=Du(Yo,Eu,uu,!1),Ss){case wn:$l[uu.index]!==0&&(Ha.width=Math.min(Ha.width,$l[uu.index])),Hu[Eu.index]!==0&&(Ha.height=Math.min(Ha.height,Hu[Eu.index]));break;case ir:$l[uu.index]!==0&&(Ha.width=Math.min(Ha.width,$l[uu.index]));break;case vr:Hu[Eu.index]!==0&&(Ha.height=Math.min(Ha.height,Hu[Eu.index]))}isFinite(uu.width)&&(Ha.width=uu.width),isFinite(Eu.height)&&(Ha.height=Eu.height),tc.h(0,0);for(var Yv=uu.minimum,Pl=Eu.minimum,Ac=1;Ac<Yo.rowSpan&&!(Yo.row+Ac>=a.rowCount);Ac++)mn=a.Fb(Yo.row+Ac),Ta=0,Ta=Ss===wn||Ss===vr?Math.max(mn.minimum,Hu[Yo.row+Ac]===0?mn.maximum:Math.min(Hu[Yo.row+Ac],mn.maximum)):Math.max(mn.minimum,isNaN(mn.Hc)?mn.maximum:Math.min(mn.Hc,mn.maximum)),tc.height+=Ta,Pl+=mn.minimum;for(var hu=1;hu<Yo.columnSpan&&!(Yo.column+hu>=a.columnCount);hu++)mn=a.Eb(Yo.column+hu),Ta=0,Ta=Ss===wn||Ss===ir?Math.max(mn.minimum,$l[Yo.column+hu]===0?mn.maximum:Math.min($l[Yo.column+hu],mn.maximum)):Math.max(mn.minimum,isNaN(mn.Hc)?mn.maximum:Math.min(mn.Hc,mn.maximum)),tc.width+=Ta,Yv+=mn.minimum;Ha.width+=tc.width,Ha.height+=tc.height;var zp=Yo.margin,xf=zp.right+zp.left,em=zp.top+zp.bottom;Yo.measure(Ha.width,Ha.height,Yv,Pl);for(var Gp=Yo.measuredBounds,sh=Math.max(Gp.width+xf,0),ed=Math.max(Gp.height+em,0),wf=0,Up=0;Up<Yo.rowSpan&&!(Yo.row+Up>=a.rowCount);Up++)mn=a.Fb(Yo.row+Up),wf+=mn.total||0;if(wf<ed){var jc=ed-wf,Nh=ed-wf;if(Yo.spanAllocation!==null)for(var Oc=Yo.spanAllocation,nc=0;nc<Yo.rowSpan&&!(0>=jc)&&!(Yo.row+nc>=a.rowCount);nc++){mn=a.Fb(Yo.row+nc);var Fc=mn.oa||0,td=Oc(Yo,mn,Nh);mn.actual=Math.min(mn.maximum,Fc+td),mn.oa!==Fc&&(jc-=mn.oa-Fc)}for(;0<jc;){var Wu=mn.oa||0;if(isNaN(mn.height)&&mn.maximum>Wu&&(mn.actual=Math.min(mn.maximum,Wu+jc),mn.oa!==Wu&&(jc-=mn.oa-Wu)),mn.index===0)break;mn=a.Fb(mn.index-1)}}for(var _d=0,Dc=0;Dc<Yo.columnSpan&&!(Yo.column+Dc>=a.columnCount);Dc++)mn=a.Eb(Yo.column+Dc),_d+=mn.total||0;if(_d<sh){var zd=sh-_d,Hy=sh-_d;if(Yo.spanAllocation!==null)for(var rc=Yo.spanAllocation,nd=0;nd<Yo.columnSpan&&!(0>=zd)&&!(Yo.column+nd>=a.columnCount);nd++){mn=a.Eb(Yo.column+nd);var tm=mn.oa||0,Wy=rc(Yo,mn,Hy);mn.actual=Math.min(mn.maximum,tm+Wy),mn.oa!==tm&&(zd-=mn.oa-tm)}for(;0<zd;){var $v=mn.oa||0;if(isNaN(mn.width)&&mn.maximum>$v&&(mn.actual=Math.min(mn.maximum,$v+zd),mn.oa!==$v&&(zd-=mn.oa-$v)),mn.index===0)break;mn=a.Eb(mn.index-1)}}}}dr(Ot),pn.free(tc),pn.free(Ha),Hu!==void 0&&dr(Hu),$l!==void 0&&dr($l);var Gd=0,Ud=0,Jv=a.desiredSize,gx=a.maxSize;Ss=Us(a,!0);var nm=Qh=Th=0,rm=0;te=a.columnCount;for(var Qv=0;Qv<te;Qv++)Mn[Qv]!==void 0&&(mn=a.Eb(Qv),isFinite(mn.width)?(nm+=mn.width,nm+=mn.Wc()):jm(mn)===pg?(nm+=mn.oa,nm+=mn.Wc()):mn.oa!==0&&(Th+=mn.oa,Th+=mn.Wc()));isFinite(Jv.width)?Gd=Math.min(Jv.width,gx.width):Gd=Ss!==yn&&isFinite(y)?y:Th,Gd=Math.max(Gd,a.minSize.width),Gd=Math.max(Gd-nm,0);for(var Qx=Th===0?1:Math.max(Gd/Th,1),qv=0;qv<te;qv++)Mn[qv]!==void 0&&(mn=a.Eb(qv),isFinite(mn.width)||jm(mn)===pg||(mn.actual=mn.oa*Qx),mn.position=E.width,mn.oa!==0&&(E.width+=mn.oa,E.width+=mn.Wc()));te=a.rowCount;for(var e0=0;e0<te;e0++)Xn[e0]!==void 0&&(mn=a.Fb(e0),isFinite(mn.height)?(rm+=mn.height,rm+=mn.Wc()):jm(mn)===pg?(rm+=mn.oa,rm+=mn.Wc()):mn.oa!==0&&(Qh+=mn.oa,Qh+=mn.Wc()));isFinite(Jv.height)?Ud=Math.min(Jv.height,gx.height):Ud=Ss!==yn&&isFinite(x)?x:Qh,Ud=Math.max(Ud,a.minSize.height),Ud=Math.max(Ud-rm,0);for(var qx=Qh===0?1:Math.max(Ud/Qh,1),t0=0;t0<te;t0++)Xn[t0]!==void 0&&(mn=a.Fb(t0),isFinite(mn.height)||jm(mn)===pg||(mn.actual=mn.oa*qx),mn.position=E.height,mn.oa!==0&&(E.height+=mn.oa,E.height+=mn.Wc()));te=se.length;for(var Ky=0;Ky<te;Ky++){var im=se[Ky],Vy=0,Zy=0;im.type===Cn.TableRow?(Vy=E.width,mn=a.Fb(im.row),Zy=mn.actual):(mn=a.Eb(im.column),Vy=mn.actual,Zy=E.height),im.measuredBounds.h(0,0,Vy,Zy),ca(im,!1)}dr(se),a.inRowsCols=rt},Pm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,te=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var se,he,ge=ne.length,ye=0,Me=0;Me<ge;Me++)ne[Me]&&(ye=Math.max(ye,ne[Me].length));he=a.rowDefs,se=a.colDefs;var _e=Me=0,Ke=Math.min(a.topIndex,ge-1);if(0<he.length){for(;Ke!==ge&&(he[Ke]===void 0||he[Ke].oa===0);)Ke++;Ke=Math.max(Math.min(Ke,ge-1),0),Me=-he[Ke].position}var qe=Math.min(a.leftIndex,ye-1);if(0<se.length){for(;qe!==ye&&(se[qe]===void 0||se[qe].oa===0);)qe++;qe=Math.max(Math.min(qe,ye-1),0),_e=-se[qe].position}for(var rt=0,Mt=0;rt!==ge&&he[rt]===void 0;)rt++;for(;Mt!==ge&&se[Mt]===void 0;)Mt++;ye=a.part,a.Fb(rt),a.Eb(Mt);for(var xt=0;xt<y.length;xt++){var At=y[xt];if(At instanceof Cn&&At.visible&&vc(At)){if(At.type===Cn.TableRow){se=a.Fb(At.row);var Ot=a.Eb(Mt)}else se=a.Fb(rt),Ot=a.Eb(At.column);he=se.position+Me+E,se.oa!==0&&(he+=se.Io(Math.max(rt,Ke))),se=Ot.position+_e+te,Ot.oa!==0&&(se+=Ot.Io(Math.max(Mt,qe))),Ot=At.measuredBounds,At.Uk(),At.actualBounds.ka();var Dt=At.actualBounds,_t=on.allocAt(Dt.x,Dt.y,Dt.width,Dt.height);Dt.x=At.type===Cn.TableRow?te:se,Dt.y=At.type===Cn.TableColumn?E:he,Dt.width=Ot.width,Dt.height=Ot.height,At.actualBounds.freeze(),vh(At,!1),yo(_t,Dt)||ye===null||(ye.oh(),At.Pn(ye)),on.free(_t)}}for(xt=pn.alloc(),At=0;At<ge;At++)if(ne[At]){for(ye=ne[At].length,Ot=a.Fb(At),he=Ot.position+Me+E,Ot.oa!==0&&(he+=Ot.Io(Math.max(rt,Ke))),Dt=0;Dt<ye;Dt++)if(ne[At][Dt]){_t=a.Eb(Dt),se=_t.position+_e+te,_t.oa!==0&&(se+=_t.Io(Math.max(Mt,qe)));for(var Yt=ne[At][Dt],_n=Yt.length,Jn=0;Jn<_n;Jn++){var Xn=Yt[Jn],Mn=Xn.measuredBounds;xt.h(0,0);for(var mn=1;mn<Xn.rowSpan&&!(At+mn>=a.rowCount);mn++){var Or=a.Fb(At+mn);Or.oa!==0&&(xt.height+=Or.total)}for(mn=1;mn<Xn.columnSpan&&!(Dt+mn>=a.columnCount);mn++)Or=a.Eb(Dt+mn),Or.oa!==0&&(xt.width+=Or.total);var br=_t.oa+xt.width,xi=Ot.oa+xt.height;mn=se,Or=he;var Qi=br,Ma=xi,Oa=se,vs=he,Ta=br,Mc=xi;se+br>x.width&&(Ta=Math.max(x.width-se,0)),he+xi>x.height&&(Mc=Math.max(x.height-he,0));var na=Xn.alignment;if(na.Xb()){na=a.defaultAlignment,na.sb()||(na=vi);var zu=na.x,ys=na.y,Tc=na.offsetX;na=na.offsetY;var Rl=_t.alignment,lu=Ot.alignment;Rl.sb()&&(zu=Rl.x,Tc=Rl.offsetX),lu.sb()&&(ys=lu.y,na=lu.offsetY)}else zu=na.x,ys=na.y,Tc=na.offsetX,na=na.offsetY;(isNaN(zu)||isNaN(ys))&&(ys=zu=.5,na=Tc=0),Rl=Mn.width,lu=Mn.height;var Sl=Xn.margin,ol=Sl.left+Sl.right,pf=Sl.top+Sl.bottom,Gu=Du(Xn,Ot,_t,!1);!isNaN(Xn.desiredSize.width)||Gu!==wn&&Gu!==ir||(Rl=Math.max(br-ol,0)),!isNaN(Xn.desiredSize.height)||Gu!==wn&&Gu!==vr||(lu=Math.max(xi-pf,0)),br=Xn.maxSize,xi=Xn.minSize,Rl=Math.min(br.width,Rl),lu=Math.min(br.height,lu),Rl=Math.max(xi.width,Rl),lu=Math.max(xi.height,lu),br=lu+pf,mn+=Qi*zu-(Rl+ol)*zu+Tc+Sl.left,Or+=Ma*ys-br*ys+na+Sl.top,Xn.visible&&(ia(Oa,vs,Ta,Mc,mn,Or,Mn.width,Mn.height)?Xn.arrange(mn,Or,Rl,lu):Xn.arrange(mn,Or,Rl,lu,new on(Oa,vs,Ta,Mc)))}}}for(pn.free(xt),a=0;a<b;a++)x=y[a],te=x instanceof Cn?x:null,te!==null&&vc(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function bm(){this.xa="Base"}Vt(bm,ma),bm.prototype.measure=function(){},bm.prototype.arrange=function(){};function Cm(){this.xa="Base"}Vt(Cm,ma),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Em(){this.xa="Base"}Vt(Em,ma),Em.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&$t("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,te,ne);var se=b.measuredBounds,he=b.margin,ge=he.right+he.left;if(he=he.top+he.bottom,isFinite(y)||isFinite(x)){var ye=b.scale,Me=se.width;se=se.height;var _e=Math.max(y-ge,0),Ke=Math.max(x-he,0),qe=1;a.viewboxStretch===qn?Me!==0&&se!==0&&(qe=Math.min(_e/Me,Ke/se)):Me!==0&&se!==0&&(qe=Math.max(_e/Me,Ke/se)),qe===0&&(qe=1e-4),b.Ca*=qe,ye!==b.scale&&(ca(b,!0),b.measure(1/0,1/0,te,ne))}se=b.measuredBounds,E.width=isFinite(y)?y:Math.max(se.width+ge,0),E.height=isFinite(x)?x:Math.max(se.height+he,0)},Em.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,te=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=vi),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 cg(){this.xa="Base"}Vt(cg,ma),cg.prototype.measure=function(){},cg.prototype.arrange=function(){},cg.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var te=a.naturalBounds,ne=a.actualBounds,se=te.width,he=te.height,ge=Math.ceil(se/E),ye=Math.ceil(he/b),Me=a.gridOrigin,_e=Me.x;Me=Me.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Ke=[],qe=a.O.s,rt=qe.length,Mt=0;Mt<rt;Mt++){var xt=qe[Mt],At=[];if(Ke.push(At),xt.visible){var Ot=xt.interval;if(!(0>Ot)){xt=m0(xt.figure);for(var Dt=0;Dt<rt;Dt++)if(Dt!==Mt){var _t=qe[Dt];_t.visible&&m0(_t.figure)===xt&&(_t=_t.interval,_t>Ot&&At.push(_t))}}}}for(qe=a.O.s,rt=qe.length,Mt=0;Mt<rt;Mt++){var Yt=qe[Mt];if(Yt.visible&&(At=Yt.interval||1,xt=Math.abs(At),!(2>E*xt*x))){if(Ot=Yt.segmentIndex,(!isFinite(Ot)||isNaN(Ot))&&(Ot=0),0>Ot&&(Ot=xt-Math.min(-Ot,xt)),Ot=Math.round(Ot%xt),xt=Yt.opacity,Dt=1,xt!==1){if(xt===0)continue;Dt=y.globalAlpha,y.globalAlpha=Dt*xt}_t=Ke[Mt];var _n=!1,Jn=Yt.strokeDashArray;if(Jn!==null&&(_n=!0,y.js(Jn,Yt.strokeDashOffset)),Yt.figure==="LineV"&&Yt.stroke!==null&&0<Yt.strokeWidth){for(y.lineWidth=Yt.strokeWidth,Ko(a,y,Yt.stroke,!1,!1,te,ne),y.beginPath(),Jn=Yt=Math.floor((_e-E)/E);Jn<=Yt+ge;Jn++){var Xn=Jn*E+_e;0<=Xn&&Xn<=se&&km(Jn,At,Ot,_t)&&(y.moveTo(Xn,0),y.lineTo(Xn,he))}y.stroke(),y.Se()}else if(Yt.figure==="LineH"&&Yt.stroke!==null&&0<Yt.strokeWidth){for(y.lineWidth=Yt.strokeWidth,Ko(a,y,Yt.stroke,!1,!1,te,ne),y.beginPath(),Jn=Yt=Math.floor((Me-b)/b);Jn<=Yt+ye;Jn++)Xn=Jn*b+Me,0<=Xn&&Xn<=he&&km(Jn,At,Ot,_t)&&(y.moveTo(0,Xn),y.lineTo(se,Xn));y.stroke(),y.Se()}else if(Yt.figure==="BarV"&&Yt.fill!==null)for(Ko(a,y,Yt.fill,!0,!1,te,ne),Yt=Yt.width,isNaN(Yt)&&(Yt=E),Xn=Jn=Math.floor((_e-E)/E);Xn<=Jn+ge;Xn++){var Mn=Xn*E+_e;0<=Mn+Yt&&Mn<=se&&km(Xn,At,Ot,_t)&&y.fillRect(Mn,0,Yt,he)}else if(Yt.figure==="BarH"&&Yt.fill!==null)for(Ko(a,y,Yt.fill,!0,!1,te,ne),Yt=Yt.height,isNaN(Yt)&&(Yt=b),Xn=Jn=Math.floor((Me-b)/b);Xn<=Jn+ye;Xn++)Mn=Xn*b+Me,0<=Mn+Yt&&Mn<=he&&km(Xn,At,Ot,_t)&&y.fillRect(0,Mn,se,Yt);_n&&y.fs(),xt!==1&&(y.globalAlpha=Dt)}}y.restore(),y.Vc(!1)};function km(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Mm(){this.xa="Base"}Vt(Mm,ma),Mm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof di||a instanceof Ln){var ne=null,se=null;if(a instanceof Ln&&(ne=a),a instanceof di&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof Ln){var he=ne;if(te===0)Da(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ge=a instanceof di?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=he.points,Me=ne.pointsCount;se!==null?se.Ul(!1):ne!==null&&ne.Ul(!1),se=y.width;var _e=y.height,Ke=a.j;if(Ke.length=0,ge!==null){i1(a,se,_e,ge);var qe=ge.measuredBounds;x.ed(qe),Ke.push(qe)}qe=Wr.alloc();for(var rt=Et.alloc(),Mt=Et.alloc(),xt=0;xt<te;xt++){var At=b[xt];if(At!==ge)if(At.isPanelMain&&At instanceof Br){i1(a,se,_e,At);var Ot=At.measuredBounds;x.ed(Ot),Ke.push(Ot)}else if(2>Me)At.measure(1/0,1/0,0,0),Ot=At.measuredBounds,x.ed(Ot),Ke.push(Ot);else{var Dt=At.segmentIndex,_t=At.segmentFraction,Yt=At.alignmentFocus;Yt.Mc()&&(Yt=vi);var _n=At.segmentOrientation,Jn=At.segmentOffset;if(isNaN(Dt)){var Xn=he.ua;Ot=sr(),Xn.Qu(_t,Ot);var Mn=Et.allocAt(Ot[0],Ot[1]);if(Mn.add(he.i(0)),Xn.type===jn.j?Mn.offset(-Xn.startX,-Xn.startY):(Xn=Xn.figures.first(),Xn!==null&&Mn.offset(-Xn.startX,-Xn.startY)),Xn=Ot[2],_n!==Ns){var mn=he.computeAngle(At,_n,Xn);At.Kb=mn}mn=Mn.x-y.x;var Or=Mn.y-y.y;Et.free(Mn),dr(Ot)}else if(Dt<-Me||Dt>=Me)Ot=Et.alloc(),he.vg(),he.computeMidPoint(Ot),Xn=he.midAngle,_n!==Ns&&(mn=he.computeAngle(At,_n,Xn),At.Kb=mn),mn=Ot.x-y.x,Or=Ot.y-y.y,Et.free(Ot);else{if(mn=0,0<=Dt?(Or=ye.M(Dt),Ot=Dt<Me-1?ye.M(Dt+1):Or):(mn=Me+Dt,Or=ye.M(mn),Ot=0<mn?ye.M(mn-1):Or),Or.Xa(Ot)){0<=Dt?(Xn=0<Dt?ye.M(Dt-1):Or,mn=Dt<Me-2?ye.M(Dt+2):Ot):(Xn=mn<Me-1?ye.M(mn+1):Or,mn=1<mn?ye.M(mn-2):Ot),Mn=Xn.Bf(Or);var br=Ot.Bf(mn);Xn=Mn>br+10?0<=Dt?Xn.ab(Or):Or.ab(Xn):br>Mn+10?0<=Dt?Ot.ab(mn):mn.ab(Ot):0<=Dt?Xn.ab(mn):mn.ab(Xn)}else Xn=0<=Dt?Or.ab(Ot):Ot.ab(Or);_n!==Ns&&(mn=he.computeAngle(At,_n,Xn),At.Kb=mn),mn=Or.x+(Ot.x-Or.x)*_t-y.x,Or=Or.y+(Ot.y-Or.y)*_t-y.y}At.measure(1/0,1/0,0,0),Ot=At.measuredBounds,Mn=At.naturalBounds;var xi=0;At instanceof Br&&(xi=At.strokeWidth),br=Mn.width+xi;var Qi=Mn.height+xi;qe.reset(),qe.translate(-Ot.x,-Ot.y),qe.scale(At.scale,At.scale),qe.rotate(_n===Ns?At.angle:Xn,br/2,Qi/2),_n!==Cg&&_n!==kg||qe.rotate(90,br/2,Qi/2),_n!==Eg&&_n!==Mg||qe.rotate(-90,br/2,Qi/2),_n===rv&&(45<Xn&&135>Xn||225<Xn&&315>Xn)&&qe.rotate(-Xn,br/2,Qi/2),Mn=new on(0,0,br,Qi),rt.xi(Mn,Yt),qe.Ga(rt),Yt=-rt.x+xi/2*At.scale,At=-rt.y+xi/2*At.scale,Mt.assign(Jn),xi=isNaN(Jn.x);var Ma=isNaN(Jn.y);if(xi||Ma){br=br/2+3,Qi=Qi/2+3;var Oa=45<=Xn&&135>=Xn,vs=225<=Xn&&315>=Xn;_n===Ns&&(Oa||vs)?(Mt.x=Ma?br:Jn.y,Mt.y=xi?Qi:Jn.x,Oa?0<=Dt||isNaN(Dt)&&.5>_t||!xi||(Mt.y=-Qi):vs&&((0<=Dt||isNaN(Dt)&&.5>_t)&&xi&&(Mt.y=-Qi),Ma&&(Mt.x=-br))):(xi&&(Mt.x=0<=Dt||isNaN(Dt)&&.5>_t?br:-br),Ma&&(Mt.y=-Qi),Mt.rotate(Xn))}else Mt.rotate(Xn);mn+=Mt.x,Or+=Mt.y,Mn.set(Ot),Mn.h(mn+Yt,Or+At,Ot.width,Ot.height),Ke.push(Mn),x.ed(Mn)}}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),Da(E,x.width||0,x.height||0),Wr.free(qe),Et.free(rt),Et.free(Mt)}}}},Mm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof di||a instanceof Ln){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 ge=y[he];if(ge!==te&&se<ne.length){var ye=ne[se];se++,ge.arrange(ye.x-a.jg.x,ye.y-a.jg.y,ye.width,ye.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Ln)for(te=a.labelNodes;te.next();){var Me=a;ne=te.value,se=ne.segmentIndex,he=ne.segmentFraction;var _e=ne.alignmentFocus;if(ge=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(se)){var Ke=Me.ua,qe=sr();Ke.Qu(he,qe);var rt=Et.allocAt(qe[0],qe[1]);rt.add(Me.i(0)),Ke.type===jn.j||(Ke=Ke.figures.first()),rt.offset(-Ke.startX,-Ke.startY),Ke=qe[2],ge!==Ns&&(Me=Me.computeAngle(ne,ge,Ke),ne.angle=Me),Me=rt.x;var Mt=rt.y;Et.free(rt),dr(qe)}else if(se<-x||se>=x)qe=Et.alloc(),Ke=Me,Mt=qe,Ke.vg(),Ke.computeMidPoint(Mt),Ke=Me.midAngle,ge!==Ns&&(Me=Me.computeAngle(ne,ge,Ke),ne.angle=Me),Me=qe.x,Mt=qe.y,Et.free(qe);else{if(rt=0,0<=se?(qe=y.s[se],Mt=se<x-1?y.s[se+1]:qe):(rt=x+se,qe=y.s[rt],Mt=0<rt?y.s[rt-1]:qe),qe.Xa(Mt)){0<=se?(Ke=0<se?y.s[se-1]:qe,rt=se<x-2?y.s[se+2]:Mt):(Ke=rt<x-1?y.s[rt+1]:qe,rt=1<rt?y.s[rt-2]:Mt);var xt=Ke.Bf(qe),At=Mt.Bf(rt);Ke=xt>At+10?0<=se?Ke.ab(qe):qe.ab(Ke):At>xt+10?0<=se?Mt.ab(rt):rt.ab(Mt):0<=se?Ke.ab(rt):rt.ab(Ke)}else Ke=0<=se?qe.ab(Mt):Mt.ab(qe);ge!==Ns&&(Me=Me.computeAngle(ne,ge,Ke),ne.angle=Me),Me=qe.x+(Mt.x-qe.x)*he,Mt=qe.y+(Mt.y-qe.y)*he}if(_e.ys())ne.location=new Et(Me,Mt);else{_e.Mc()&&(_e=vi),qe=Wr.alloc(),qe.reset(),qe.scale(ne.scale,ne.scale),qe.rotate(ne.angle,0,0);var Ot=ne.naturalBounds;rt=on.allocAt(0,0,Ot.width,Ot.height),xt=Et.alloc(),xt.xi(rt,_e),qe.Ga(xt),_e=-xt.x,At=-xt.y;var Dt=Ot.width,_t=Ot.height;Ot=Et.alloc(),Ot.assign(ye);var Yt=isNaN(ye.x),_n=isNaN(ye.y);if(Yt||_n){Dt=Dt/2+3,_t=_t/2+3;var Jn=45<=Ke&&135>=Ke,Xn=225<=Ke&&315>=Ke;ge===Ns&&(Jn||Xn)?(Ot.x=_n?Dt:ye.y,Ot.y=Yt?_t:ye.x,Jn?0<=se||isNaN(se)&&.5>he||!Yt||(Ot.y=-_t):Xn&&((0<=se||isNaN(se)&&.5>he)&&Yt&&(Ot.y=-_t),_n&&(Ot.x=-Dt))):(Yt&&(Ot.x=0<=se||isNaN(se)&&.5>he?Dt:-Dt),_n&&(Ot.y=-_t),Ot.rotate(Ke))}else Ot.rotate(Ke);Me+=Ot.x,Mt+=Ot.y,qe.pp(rt),_e+=rt.x,At+=rt.y,se=Et.allocAt(Me+_e,Mt+At),ne.move(se),Et.free(se),Et.free(Ot),Et.free(xt),on.free(rt),Wr.free(qe)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),Et.free(b)}};function i1(a,y,x,b){if(jl(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof di&&a.type===Cn.Link&&a.adornedObject instanceof Br&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Ln&&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),ca(b,!1)}}function fg(){this.xa="Base"}Vt(fg,ma),fg.prototype.measure=function(a,y,x,b,E,te,ne){var se=a.Pb();a.graduatedBounds=[];var he=se.margin,ge=he.right+he.left,ye=he.top+he.bottom;se.measure(y,x,te,ne);var Me=se.measuredBounds,_e=new on(-he.left,-he.top,Math.max(Me.width+ge,0),Math.max(Me.height+ye,0));a.graduatedBounds.push(_e),E.assign(_e);for(var Ke=se.geometry,qe=se.strokeWidth,rt=Ke.flattenedSegments,Mt=Ke.flattenedLengths,xt=Ke.flattenedTotalLength,At=rt.length,Ot=0,Dt=0,_t=sr(),Yt=0;Yt<At;Yt++){var _n=rt[Yt],Jn=[];Dt=Ot=0;for(var Xn=_n.length,Mn=0;Mn<Xn;Mn+=2){var mn=_n[Mn],Or=_n[Mn+1];if(Mn!==0){var br=180*Math.atan2(Or-Dt,mn-Ot)/Math.PI;0>br&&(br+=360),Jn.push(br)}Ot=mn,Dt=Or}_t.push(Jn)}if(a.graduatedIntervals===null){for(var xi=[],Qi=a.O.s,Ma=Qi.length,Oa=0;Oa<Ma;Oa++){var vs=Qi[Oa],Ta=[];if(xi.push(Ta),vs.visible){var Mc=vs.interval;if(!(0>Mc)){for(var na=0;na<Ma;na++)if(na!==Oa){var zu=Qi[na];if(zu.visible&&vs.constructor===zu.constructor){var ys=zu.interval;ys>Mc&&Ta.push(ys)}}}}}a.graduatedIntervals=xi}var Tc=a.graduatedIntervals,Rl=a.O.s,lu=Rl.length,Sl=0,ol=0,pf=xt;a.graduatedMarks=[];for(var Gu,Op=0;Op<lu;Op++){var xl=Rl[Op];if(Gu=[],xl.visible&&xl!==se){var Ss=Math.abs(xl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Ss*xt/a.graduatedRange&&xl.graduatedSkip===null)){var Dd=Mt[0][0],ih=0,al=0;ol=xt*xl.graduatedStart-1e-4,pf=xt*xl.graduatedEnd+1e-4;var $f=Jg*Ss,wl=a.graduatedTickBase;if(wl<a.graduatedMin){var gf=(a.graduatedMin-wl)/$f;gf=gf%1===0?gf:Math.floor(gf+1),wl+=gf*$f}else wl>a.graduatedMin+$f&&(wl-=Math.floor((wl-a.graduatedMin)/$f)*$f);for(var Kv=Tc[Op],Qg=wl,Gy=1e-6*a.graduatedMax,Th=1;wl<=a.graduatedMax+Gy;Th++){e:{for(var Qh=Kv.length,Rd=0;Rd<Qh;Rd++){var mf=(wl-a.graduatedTickBase)%(Kv[Rd]*a.graduatedTickUnit),Fp=1e-6*a.graduatedTickUnit;if(mf<Fp&&mf>-Fp){var vf=!1;break e}}vf=!0}if(vf&&(wl>a.graduatedMax&&(wl=a.graduatedMax),xl.graduatedSkip===null||xl instanceof to&&!xl.graduatedSkip(wl,xl)||xl instanceof Br&&!xl.graduatedSkip(wl,xl))&&(Sl=(wl-a.graduatedMin)*xt/a.graduatedRange,Sl>xt&&(Sl=xt),ol<=Sl&&Sl<=pf)){for(var Lh=_t[ih][al],Lc=Mt[ih][al];ih<Mt.length;){for(;Sl>Dd&&al<Mt[ih].length-1;)al++,Lh=_t[ih][al],Lc=Mt[ih][al],Dd+=Lc;if(Sl<=Dd)break;ih++,al=0,Lh=_t[ih][al],Lc=Mt[ih][al],Dd+=Lc}var sl=rt[ih],oh=sl[2*al],Vv=sl[2*al+1],qh=(Sl-(Dd-Lc))/Lc,Dp=new Et(oh+(sl[2*al+2]-oh)*qh+qe/2-Ke.bounds.x,Vv+(sl[2*al+3]-Vv)*qh+qe/2-Ke.bounds.y);Dp.scale(se.scale,se.scale);e:{var Uu=Lh,Jf=_t[ih];if(!(.5005>qh&&.4995<qh)){var ah=Uu;if(.5>qh?0<al?ah=Jf[al-1]:Ht.$(sl[0],sl[sl.length-2])&&Ht.$(sl[1],sl[sl.length-1])&&(ah=Jf[Jf.length-1]):.5<qh&&(al+1<Jf.length?ah=Jf[al+1]:Ht.$(sl[0],sl[sl.length-2])&&Ht.$(sl[1],sl[sl.length-1])&&(ah=Jf[0])),Uu!==ah){var Bd=Math.abs(Uu-ah);if(180<Bd&&(Uu<ah?Uu+=360:ah+=360,Bd=Math.abs(Uu-ah)),5e-4>qh||.9995<qh){Lh=(Uu+ah)/2%360;break e}if(10>Bd){var Rp=1-Math.abs(.5-qh);Lh=(Uu*Rp+ah*(1-Rp))%360;break e}}}Lh=Uu}if(xl instanceof to){var Cu="";xl.graduatedFunction!==null?(Cu=xl.graduatedFunction(wl,xl),Cu=Cu!=null?Cu.toString():""):Cu=(+wl.toFixed(2)).toString(),Cu!==""&&Gu.push({$l:Dp,angle:Lh,text:Cu})}else Gu.push({$l:Dp,angle:Lh})}wl=Qg+Th*$f}}}a.graduatedMarks.push(Gu)}dr(_t);var Ha=a.graduatedMarks;if(Ha!==null)for(var qg=b.length,Ds=0;Ds<qg;Ds++){var ra=b[Ds],Rs=Ha[Ds];if(ra.visible&&ra!==se&&Rs.length!==0){if(ra instanceof Br){var ec=a,Nc=E,Qf=ra.alignmentFocus;Qf.Mc()&&(Qf=Cl);var Uy=ra.angle;ra.Kb=0,ra.measure(1/0,1/0,0,0),ra.Kb=Uy;var Zv=ra.measuredBounds,Bp=Zv.width,qf=Zv.height,Id=on.allocAt(0,0,Bp,qf),ll=Et.alloc();ll.xi(Id,Qf),on.free(Id);for(var tc=-ll.x,Hu=-ll.y,$l=new on,yf=Rs.length,Ip=0;Ip<yf;Ip++)for(var Sf=Rs[Ip],Xv=Sf.$l.x,_p=Sf.$l.y,Yo=Sf.angle,Eu=0;4>Eu;Eu++){switch(Eu){case 0:ll.h(tc,Hu);break;case 1:ll.h(tc+Bp,Hu);break;case 2:ll.h(tc,Hu+qf);break;case 3:ll.h(tc+Bp,Hu+qf)}ll.rotate(Yo+ra.angle),ll.offset(Xv,_p),Ip===0&&Eu===0?$l.h(ll.x,ll.y,0,0):$l.Ye(ll),ll.offset(-Xv,-_p),ll.rotate(-Yo-ra.angle)}Et.free(ll),ec.graduatedBounds!==null&&ec.graduatedBounds.push($l),bo(Nc,$l.x,$l.y,$l.width,$l.height)}else if(ra instanceof to){var uu=a,Yv=E;uu.temporaryTextBlock===null&&(uu.temporaryTextBlock=new to);var Pl=uu.temporaryTextBlock;S1(Pl,ra);var Ac=ra.alignmentFocus;Ac.Mc()&&(Ac=Cl);for(var hu=ra.segmentOrientation,zp=ra.segmentOffset,xf=new on,em=0,Gp=0,sh=0,ed=0,wf=0,Up=Rs.length,jc=0;jc<Up;jc++){var Nh=Rs[jc];em=Nh.$l.x,Gp=Nh.$l.y,sh=Nh.angle,wf=ed=ra.angle,hu!==Ns&&(wf=hu===bg||hu===nv?sh+ra.angle:sh,ed=Ln.computeAngle(hu,wf)),Pl.Kb=ed,Pl.text=Nh.text||"",Pl.measure(1/0,1/0,0,0);var Oc=Pl.measuredBounds,nc=Pl.naturalBounds,Fc=nc.width,td=nc.height,Wu=Wr.alloc();Wu.reset(),Wu.translate(-Oc.x,-Oc.y),Wu.scale(Pl.scale,Pl.scale),Wu.rotate(wf,Fc/2,td/2),hu!==Cg&&hu!==kg||Wu.rotate(90,Fc/2,td/2),hu!==Eg&&hu!==Mg||Wu.rotate(-90,Fc/2,td/2),hu===rv&&(45<sh&&135>sh||225<sh&&315>sh)&&Wu.rotate(-sh,Fc/2,td/2);var _d=on.allocAt(0,0,Fc,td),Dc=Et.alloc();Dc.xi(_d,Ac),Wu.Ga(Dc);var zd=-Dc.x,Hy=-Dc.y,rc=Et.alloc();rc.assign(zp),isNaN(rc.x)&&(rc.x=Fc/2+3),isNaN(rc.y)&&(rc.y=-(td/2+3)),rc.rotate(sh),em+=rc.x+zd,Gp+=rc.y+Hy;var nd=new on(em,Gp,Oc.width,Oc.height),tm=new on(Oc.x,Oc.y,Oc.width,Oc.height),Wy=new on(nc.x,nc.y,nc.width,nc.height);Nh.Sz=ed,Nh.lineCount=Pl.lineCount,Nh.lines=[Pl.Cb,Pl.Ih,Pl.df,Pl.Le,Pl.Qc,Pl.Qb,Pl.ze],Nh.actualBounds=nd,Nh.measuredBounds=tm,Nh.naturalBounds=Wy,jc===0?xf.assign(nd):xf.ed(nd),Et.free(rc),Et.free(Dc),on.free(_d),Wr.free(Wu)}uu.graduatedBounds!==null&&uu.graduatedBounds.push(xf),bo(Yv,xf.x,xf.y,xf.width,xf.height)}ca(ra,!1)}}},fg.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var te=a.graduatedBounds,ne=0,se=te[ne];ne++,b!==null&&b.arrange(se.x-x.x,se.y-x.y,se.width,se.height);for(var he=y.length,ge=0;ge<he;ge++){var ye=y[ge];se=E[ge],ye.visible&&ye!==b&&se.length!==0&&(se=te[ne],ne++,ye.arrange(se.x-x.x,se.y-x.y,se.width,se.height))}a.graduatedBounds=null}}},fg.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 ml,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var se=te.actualBounds,he=a.O.s,ge=a.graduatedMarks,ye=he.length,Me=0;Me<ye;Me++){var _e=he[Me],Ke=ge[Me],qe=Ke.length;if(_e.visible&&_e!==te&&Ke.length!==0){if(_e instanceof Br){if(!(2>a.graduatedTickUnit*_e.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&_e.graduatedSkip===null)){var rt=_e.measuredBounds,Mt=_e.strokeWidth*_e.scale,xt=_e.alignmentFocus;xt.Mc()&&(xt=Cl);for(var At=0;At<qe;At++){var Ot=Ke[At].$l,Dt=Ke[At].angle,_t=xt,Yt=_e.Ab;Yt.reset(),Yt.translate(Ot.x+se.x,Ot.y+se.y),Yt.rotate(Dt+_e.angle,0,0),Yt.translate(-rt.width*_t.x+_t.offsetX+Mt/2,-rt.height*_t.y+_t.offsetY+Mt/2),Yt.scale(_e.scale,_e.scale),ru(_e,!1),_e.wh.set(_e.Ab),_e.Kk=_e.scale,Hl(_e,!1),_e.gc(y,x),E&&(a.svg.appendChild(_e.svg),_e.svg=null),_e.Ab.reset()}}}else if(_e instanceof to)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new to),rt=a.temporaryTextBlock,S1(rt,_e),Mt=0;Mt<qe;Mt++)xt=Ke[Mt],xt.actualBounds&&xt.measuredBounds&&xt.naturalBounds&&(rt.ec=xt.text||"",rt.Kb=xt.Sz||0,rt.Gc=xt.lineCount||0,At=xt.lines,At!==void 0&&(rt.Cb=At[0],rt.Ih=At[1],rt.df=At[2],rt.Le=At[3],rt.Qc=At[4],rt.Qb=At[5],rt.ze=At[6]),xt.naturalBounds&&(rt.dc=xt.naturalBounds),xt.actualBounds&&(At=xt.actualBounds,rt.arrange(At.x,At.y,At.width,At.height)),At=xt.actualBounds,rt.arrange(At.x,At.y,At.width,At.height),Ot=xt.measuredBounds,xt=xt.naturalBounds,Dt=rt.Ab,Dt.reset(),Dt.translate(At.x+se.x,At.y+se.y),Dt.translate(-Ot.x,-Ot.y),rt.no(Dt,xt.x,xt.y,xt.width,xt.height),ru(rt,!1),rt.wh.set(rt.Ab),rt.Kk=rt.scale,Hl(rt,!1),rt.Ng=_e.part,rt.Me=_e.panel,rt.gc(y,x),rt.Me=null,rt.Ng=null,E&&(a.svg.appendChild(rt.svg),rt.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Cn(a,y){if(zt.call(this),this.na=null,a===void 0)this.na=Cn.Position;else if(typeof a=="string"){var x=yu.I(a);x!==null&&(this.na=x)}else a instanceof ma?this.na=a:a&&(this.na=Cn.Position,y=a);this.na===null&&$t("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Cn.Grid?1048576:0),this.O=new kn,this.yb=xs,this.Tm=za,this.Uf=Dr,this.$g=null,this.$e="",this.jg=new on(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=qn,this.jn=Ao,this.kn=io,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Vt(Cn,zt),Cn.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},Cn.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},Cn.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 Un&&(te.Te=!0);var se=a.diagram;se!==null&&se.undoManager.isUndoingRedoing||te.cb(Xo,"elements",a,null,E,null,ne)}}return a}return null},Qe=Cn.prototype,Qe.toString=function(){return"Panel("+this.type.name+")#"+Zt(this)},Qe.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)},Qe.hh=function(a,y){if(this.na===Cn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Cn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Cn.Table)if(a.yc(),a instanceof ml){var x=a.yd;a.yd=pm(a,"gojs-ts"),g0(this,a),a.nh.pop(),a.yd=x}else g0(this,a);(x=this.isClipping&&this.na===Cn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x&&se===b&&(a.clipInsteadOfFill=!0),se.gc(a,y),x&&se===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function g0(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Tm(a,y,!0,x,!0),b!==null&&Tm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Tm(a,y,!0,x,!1),b!==null&&Tm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,se=!0,he=0;he<E;he++){var ge=b[he];if(ge!==void 0&&ge.actual!==0)if(se)se=!1;else{if(x){if(ge.position>ne.height)continue}else if(ge.position>ne.width)continue;var ye=ge.separatorStrokeWidth;isNaN(ye)&&(ye=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Me=ge.separatorStroke;if(Me===null&&(Me=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Me!==null){Ko(a,y,Me,!1,!1,ne,te),Me=!1;var _e=ge.separatorDashArray;_e===null&&(_e=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),_e!==null&&(Me=!0,y.js(_e,0)),y.beginPath(),_e=ge.position+ye,x?_e>ne.height&&(ye-=_e-ne.height):_e>ne.width&&(ye-=_e-ne.width),ge=ge.position+ye/2,y.lineWidth=ye,ye=a.yb,x?(ge+=ye.top,_e=ne.width-ye.right,y.moveTo(ye.left,ge),y.lineTo(_e,ge)):(ge+=ye.left,_e=ne.height-ye.bottom,y.moveTo(ge,ye.top),y.lineTo(ge,_e)),y.stroke(),y.Se(),Me&&y.fs()}}}}function Tm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,se=a.naturalBounds,he=a1(a,!0),ge=a1(a,!1),ye=0;ye<te;ye++){var Me=b[ye];if(Me!==void 0&&Me.background!==null&&Me.coversSeparators!==E&&Me.actual!==0){var _e=x?ne.height:ne.width;if(!(Me.position>_e)){var Ke=Me.Wc(),qe=Me.separatorStrokeWidth;isNaN(qe)&&(qe=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var rt=Me.separatorStroke;rt===null&&(rt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(rt===null||Me.index===(x?he:ge))&&(qe=0),Ke-=qe,qe=Me.position+qe,Ke+=Me.actual,qe+Ke>_e&&(Ke=_e-qe),0>=Ke||(_e=a.yb,Ko(a,y,Me.background,!0,!1,se,ne),x?y.fillRect(_e.left,qe+_e.top,ne.width-(_e.left+_e.right),Ke):y.fillRect(qe+_e.left,_e.top,Ke,ne.height-(_e.top+_e.bottom)))}}}}function a1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function m0(a){return a==="LineV"||a==="BarV"}Qe.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Qe.kk=function(a,y,x){if(!zt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Cn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,g0(this,a),a.yd=null;else if(this.na===Cn.Grid||this.na===Cn.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},Qe.nk=function(){return!0},Qe.$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)},Qe.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,se=1/(ne.m11*ne.m22-ne.m12*ne.m21),he=ne.m22*se,ge=-ne.m12*se,ye=-ne.m21*se,Me=ne.m11*se,_e=se*(ne.m21*ne.dy-ne.m22*ne.dx),Ke=se*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Ht.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*he+y*ye+_e,se=a*ge+y*Me+Ke,a=x*he+b*ye+_e,he=x*ge+b*Me+Ke,E.h(0,0),x=this.naturalBounds,te=Ht.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,ye=ge=0,Me=1,Ke=_e=0),se=a*he+y*ye+_e,a=a*ge+y*Me+Ke,he=x*he+b*ye+_e,x=x*ge+b*Me+Ke,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),ge=!1,Me=this.O.s,Ke=Me.length,ye=Et.alloc(),_e=null,y=1/0;var qe=null,rt=this.isClipping&&this.na===Cn.Spot;rt&&(qe=Et.alloc(),_e=this.Pb(),(ge=_e.Sj(se,a,he,x,qe))&&(y=(se-qe.x)*(se-qe.x)+(a-qe.y)*(a-qe.y)));for(var Mt=0;Mt<Ke;Mt++){var xt=Me[Mt];xt.visible&&xt!==_e&&xt.Sj(se,a,he,x,ye)&&(ge=!0,xt=(se-ye.x)*(se-ye.x)+(a-ye.y)*(a-ye.y),xt<b&&(b=xt,E.set(ye)))}return rt&&(y>b&&E.set(qe),Et.free(qe)),Et.free(ye),te&&E.transform(ne),ge},Qe.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();zt.prototype.Gj.call(this)},Qe.v=function(a){if(!jl(this)){zt.prototype.v.call(this,a),a=null,(this.na===Cn.Auto||this.na===Cn.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=Us(E,!1);(E instanceof Ls||E instanceof Cn||E instanceof to||te!==yn)&&E.v(!0)}}}},Qe.Uj=function(){if(!jl(this)){ca(this,!0),vh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Qe.Uk=function(){if(!(this.l&2048)){ru(this,!0),Hl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Qe.Wu=function(){Hl(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Qe.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var se=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,se.width)),isNaN(te.height)||(y=Math.min(te.height,se.height)),a=Math.max(x,a),y=Math.max(b,y);var he=this.yb;a=Math.max(a-he.left-he.right,0),y=Math.max(y-he.top-he.bottom,0);var ge=this.O.s;ge.length!==0&&this.na.measure(this,a,y,ge,E,x,b),a=E.width+he.left+he.right,he=E.height+he.top+he.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(he=te.height),a=Math.min(se.width,a),he=Math.min(se.height,he),a=Math.max(ne.width,a),he=Math.max(ne.height,he),a=Math.max(x,a),he=Math.max(b,he),Da(E,a,he),Da(this.naturalBounds,a,he),this.Ge(0,0,a,he)},Qe.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 Yh(a){return a.part!==null?a.part.locationObject:null}Qe.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=Us(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=yn),a){case yn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case wn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case ir: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)}},Qe.gh=function(a){var y=this.naturalBounds,x=Yh(this);if(ia(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=Et.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(Zi(E.set(a),te.transform),te.ca(E)))return Et.free(E),!0}return Et.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Qe.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},Qe.qm=function(a,y){if(y(this,a),a instanceof Cn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Uf(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 Cn&&s1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Cn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}Qe.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Cn){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}Qe.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=dg(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Cn){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 Cn?x=Math.max(x,h1(E)):E instanceof Br&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Qe.se=function(){return!(this.type===Cn.TableRow||this.type===Cn.TableColumn)};function vc(a){return a.type===Cn.TableRow||a.type===Cn.TableColumn}Qe.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Ms(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:Zi(Et.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,ge=5;if(se!==null&&(he=se.Ql("extraTouchArea"),ge=he/2),ia(-(ge*E),-(ge*E),b.width+he*E,b.height+he*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var ye=E.length;if(se=Et.alloc(),ge=(he=this.isClipping&&this.na===Cn.Spot)?this.Pb():null,he&&(ge.se()?Zi(se.set(a),ge.transform):se.set(a),!ge.ca(se)))return Et.free(se),te||Et.free(ne),null;for(var Me=Yh(this);ye--;){var _e=E[ye];if((_e.visible||_e===Me)&&(_e.se()?Zi(se.set(a),_e.transform):se.set(a),!he||_e!==ge)){var Ke=null;if(_e instanceof Cn?Ke=_e.ic(se,y,x):_e.pickable===!0&&_e.ca(se)&&(Ke=_e),Ke!==null&&(y!==null&&(Ke=y(Ke)),Ke!==null&&(x===null||x(Ke))))return Et.free(se),te||Et.free(ne),Ke}}Et.free(se)}return this.background===null&&this.areaBackground===null?(te||Et.free(ne),null):(a=ia(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||Et.free(ne),a)}return te||Et.free(ne),null},Qe.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:Zi(Et.allocAt(a.x,a.y),this.transform);if(E=ia(0,0,E.width,E.height,ne.x,ne.y),vc(this)||E){if(!this.isAtomic){for(var se=this.O.s,he=se.length,ge=Et.alloc(),ye=Yh(this);he--;){var Me=se[he];if(Me.visible||Me===ye){Me.se()?Zi(ge.set(a),Me.transform):ge.set(a);var _e=Me;Me=Me instanceof Cn?Me:null,(Me!==null?Me.ji(ge,y,x,b):_e.ca(ge))&&_e.pickable!==!1&&(y!==null&&(_e=y(_e)),_e===null||x!==null&&!x(_e)||b.add(_e))}}Et.free(ge)}return te||Et.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||Et.free(ne),!1},Qe.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Wr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),te===void 0&&Wr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var se=Yh(this),he=this.O.s,ge=he.length;ge--;){var ye=he[ge];if(ye.visible||ye===se){var Me=ye.actualBounds,_e=this.naturalBounds;Me.x>_e.width||Me.y>_e.height||0>Me.x+Me.width||0>Me.y+Me.height||(Me=ye,ye=ye instanceof Cn?ye:null,_e=Wr.alloc(),_e.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,_e):ka(Me,a,b,_e))&&(y!==null&&(Me=y(Me)),Me===null||x!==null&&!x(Me)||E.add(Me)),Wr.free(_e))}}return te===void 0&&Wr.free(ne),b}return te===void 0&&Wr.free(ne),!1};function v0(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var se=ne.actualBounds,he=a.naturalBounds;se.x>he.width||se.y>he.height||0>se.x+se.width||0>se.y+se.height||(ne instanceof Cn&&v0(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}Qe.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:Zi(Et.allocAt(a.x,a.y),this.transform),ge=se?y:Zi(Et.allocAt(y.x,y.y),this.transform),ye=he.Bf(ge),Me=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||ao(he.x,he.y,0,0,0,ne.height)<=ye||ao(he.x,he.y,0,ne.height,ne.width,ne.height)<=ye||ao(he.x,he.y,ne.width,ne.height,ne.width,0)<=ye||ao(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||(Et.free(he),Et.free(ge)),Me){if(!this.isAtomic){he=Et.alloc(),ge=Et.alloc(),ye=Yh(this);for(var _e=this.O.s,Ke=_e.length;Ke--;){var qe=_e[Ke];if(qe.visible||qe===ye){var rt=qe.actualBounds,Mt=this.naturalBounds;(!se||!(rt.x>Mt.width||rt.y>Mt.height||0>rt.x+rt.width||0>rt.y+rt.height))&&(qe.se()?(rt=qe.transform,Zi(he.set(a),rt),Zi(ge.set(y),rt)):(he.set(a),ge.set(y)),rt=qe,qe=qe instanceof Cn?qe:null,(qe!==null?qe.og(he,ge,x,b,E,te):rt.tx(he,ge,E))&&(x!==null&&(rt=x(rt)),rt===null||b!==null&&!b(rt)||te.add(rt)))}}Et.free(he),Et.free(ge)}return E?Me:ne}return!1};function y0(a){var y=null;return a instanceof Br&&(y=a.spot1,y===za&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=La),y}function S0(a){var y=null;return a instanceof Br&&(y=a.spot2,y===za&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ys),y}Qe.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},Qe.M=function(a){return this.O.M(a)},Qe.Gb=function(a,y){y instanceof ur&&$t("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&$t("Cannot make a Panel contain itself: "+this.toString()),$t("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&$t("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!==Cn.Grid||y instanceof Br||$t("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Cn.Graduated||y instanceof Br||y instanceof to||$t("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 Kn),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 $t("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),jl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Cn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Nm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Un&&(x.Te=!0),x.Te&&x instanceof Un&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(oa,"elements",this,y,null,b,null),x.cb(Xo,"elements",this,null,y,null,a)))};function x0(a,y){a.l=y?a.l|16777216:a.l&-16777217}Qe.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)},Qe.mb=function(a){0<=a&&this.pc(a,!0)},Qe.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),ca(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 Un&&(b instanceof Cn?b.qm(b,function(ne,se){H0(te,se,y)}):H0(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(oa,"elements",this,b,null,a,null))},Qe.Fb=function(a){0>a&&yr(a,">= 0",Cn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new fa;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Xo,"rowdefs",this,null,x,null,a)}return y[a]},Qe.oA=function(a){if(0>a&&yr(a,">= 0",Cn,"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(oa,"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 fa?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Qe.Eb=function(a){0>a&&yr(a,">= 0",Cn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new fa;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Xo,"coldefs",this,null,x,null,a)}return y[a]},Qe.jA=function(a){if(0>a&&yr(a,">= 0",Cn,"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(oa,"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 fa?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Qe.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Am(y,a),this},Qe.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new fa(y)),this},Qe.By=function(a,y){return(a=this.Eb(a))&&Am(a,new fa(y)),this},Qe.nz=function(a){if(0>a||this.type!==Cn.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},Qe.fz=function(a){if(0>a||this.type!==Cn.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},Qe.Fz=function(a,y){if(y===void 0&&(y=new Et(NaN,NaN)),this.type!==Cn.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)},Qe.Gz=function(a){if(this.type!==Cn.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 ou(a){var y=a.allBindings;if(y===null)a.data!==null&&$t("Template cannot have .data be non-null: "+a),a.allBindings=y=new kn;else if(y._isFrozen)return;var x=new kn;x0(a,!1),a.qm(a,function(ge,ye){ye.th();var Me=ye.localBindings;if(Me!==null)for(xd(ye,!1),Me=Me.iterator;Me.next();){var _e=Me.value;_e.mode===Dg&&xd(ye,!0);var Ke=_e.sourceName;Ke!==null&&(Ke==="/"&&x0(ge,!0),Ke=MS(_e,ge,ye),Ke!==null&&(x.add(Ke),Ke.srcBindings===null&&(Ke.srcBindings=new kn),Ke.srcBindings.add(_e))),y.add(_e)}if(ye instanceof Cn&&ye.type===Cn.Table){if(0<ye.rowCount){for(ge=ye.rowDefs,Me=ge.length,_e=0;_e<Me;_e++)if(Ke=ge[_e],Ke!==void 0&&Ke.be!==null)for(var qe=Ke.be.iterator;qe.next();){var rt=qe.value;rt.xd=Ke,rt.to=2,rt.wl=Ke.index,y.add(rt)}}if(0<ye.columnCount){for(ye=ye.colDefs,ge=ye.length,Me=0;Me<ge;Me++)if(_e=ye[Me],_e!==void 0&&_e.be!==null)for(Ke=_e.be.iterator;Ke.next();)qe=Ke.value,qe.xd=_e,qe.to=1,qe.wl=_e.index,y.add(qe)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){xd(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new kn),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 Cn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):Nr('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof fa?(ne=Zt(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof zt?(ne=Zt(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):$t("Unknown type of binding target: "+te)}y.freeze(),a instanceof ur&&a.Zc()&&a.Va()}Qe.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Cn&&(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&&ou(y),y},Qe.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 Cn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},Qe.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 Cn&&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 Cn)||te.data!==y[ne])return!0;E++,ne++}return!1}function dg(a){if(a.type===Cn.Spot||a.type===Cn.Auto)return Math.min(a.O.length,1);if(a.type===Cn.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===Cn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Cn&&vc(a))?1:0}Qe.mv=function(){for(var a=dg(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=dg(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)Lm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var te=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof Cn){if(ne.data!==te){var se=P0(a,ne.data),he=P0(a,te),ge=he!==se;ge||(se=b0(a,se),ge=b0(a,he)!==se),ge?(a.pc(b,!1),Lm(a,te,E,!1)):ne.data=te}}else Lm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,w0(a,x,0),jl(a)||a.v(),a.graduatedIntervals=null,a.If()||Nm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Un&&(y.Te=!0),y.Te&&y instanceof Un&&(y.wc=null))}}function Lm(a,y,x,b){if(!(y==null||0>x)){var E=P0(a,y);if(E=b0(a,E),E!==null){if(ou(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&x0(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Kn),a.ge.add(y,E)),te=x+dg(a),a.Gb(te,E),b&&(E.ub=y,w0(a,te,x),E.ub=null),E.data=y}}}function w0(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Cn){var E=y,te=x;b.type===Cn.TableRow?b.row=E:b.type===Cn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function P0(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=ea(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;$t("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function b0(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,Nr('No item template Panel found for category "'+y+'" on '+a),Nr(" Using default item template."),a=new Cn,y=new to,y.bind(new ta("text","",ii)),a.add(y),m1=a),b=m1)),b}function Nm(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Cn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Cn&&!te.isEnabled||Nm(a,te,x)}}}function nh(a,y){y.name=a,yu.add(a,y)}cn.Object.defineProperties(Cn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Cn.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&&yr(a,">= 0",Cn,"padding"),a=new wr(a)):(0>a.left&&yr(a.left,">= 0",Cn,"padding:value.left"),0>a.right&&yr(a.right,">= 0",Cn,"padding:value.right"),0>a.top&&yr(a.top,">= 0",Cn,"padding:value.top"),0>a.bottom&&yr(a.bottom,">= 0",Cn,"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:xs},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Vl),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 Ri)&&(a instanceof Ri&&a.freeze(),this.T===null&&(this.T=new Vl),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 Vl),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)||$t("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 Vl),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 Ri)&&(a instanceof Ri&&a.freeze(),this.T===null&&(this.T=new Vl),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 Vl),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)||$t("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 Vl),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 Vl),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||$t("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&qu(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()||$t("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&qu(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 $h),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Ka(this)&&(a=this.part,a!==null&&co(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 $h),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ka(this)&&(a=this.part,a!==null&&co(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 $h),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 $h),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 $h,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 $h,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 $h,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 $h,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 Vl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Vl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Om},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Vl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Om},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Vl),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)&&$t("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Vl),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)&&$t("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Vl),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 ur&&!(this instanceof di);ou(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Ln?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof ur&&(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 wd),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 Kn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ur||a.isPanelMain)&&$t("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(););Ur(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&&(Ur(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 Fr&&(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&&Nm(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))}}}),cn.Object.defineProperties(Cn,{Position:{get:function(){return yu.I("Position")}},Horizontal:{get:function(){return yu.I("Horizontal")}},Vertical:{get:function(){return yu.I("Vertical")}},Spot:{get:function(){return yu.I("Spot")}},Auto:{get:function(){return yu.I("Auto")}},Table:{get:function(){return yu.I("Table")}},Viewbox:{get:function(){return yu.I("Viewbox")}},TableRow:{get:function(){return yu.I("TableRow")}},TableColumn:{get:function(){return yu.I("TableColumn")}},Link:{get:function(){return yu.I("Link")}},Grid:{get:function(){return yu.I("Grid")}},Graduated:{get:function(){return yu.I("Graduated")}}}),Cn.prototype.rebuildItemElements=Cn.prototype.mv,Cn.prototype.findItemPanelForData=Cn.prototype.sx,Cn.prototype.updateTargetBindings=Cn.prototype.La,Cn.prototype.copyTemplate=Cn.prototype.Uy,Cn.prototype.graduatedValueForPoint=Cn.prototype.Gz,Cn.prototype.graduatedPointForValue=Cn.prototype.Fz,Cn.prototype.findColumnForLocalX=Cn.prototype.fz,Cn.prototype.findRowForLocalY=Cn.prototype.nz,Cn.prototype.addColumnDefinition=Cn.prototype.By,Cn.prototype.addRowDefinition=Cn.prototype.Hy,Cn.prototype.addRowColumnDefinition=Cn.prototype.Gy,Cn.prototype.removeColumnDefinition=Cn.prototype.jA,Cn.prototype.getColumnDefinition=Cn.prototype.Eb,Cn.prototype.removeRowDefinition=Cn.prototype.oA,Cn.prototype.getRowDefinition=Cn.prototype.Fb,Cn.prototype.removeAt=Cn.prototype.mb,Cn.prototype.remove=Cn.prototype.remove,Cn.prototype.insertAt=Cn.prototype.Gb,Cn.prototype.elt=Cn.prototype.M,Cn.prototype.add=Cn.prototype.add,Cn.prototype.findObject=Cn.prototype.fb,Cn.prototype.findInVisualTree=Cn.prototype.Nl,Cn.prototype.walkVisualTreeFrom=Cn.prototype.qm,Cn.prototype.findMainElement=Cn.prototype.Pb;var g1=!1,m1=null,yu=new Kn;Cn.className="Panel",Cn.definePanelLayout=nh,nh("Position",new vm),nh("Vertical",new Sm),nh("Auto",new wm),nh("Link",new Mm);function $h(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}$h.prototype.copy=function(){var a=new $h;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},$h.className="GradPanelSettings";function Vl(){this.Pc=[],this.Oc=[],this.j=this.ob=Om,this.hb=this.Hb=0,this.Qp=xs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Vl.prototype.copy=function(a){for(var y=new Vl,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},Vl.className="TablePanelSettings";function fa(a){Ni(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=za,this.pa=this.oc=this.oa=0,this.be=null,this.oo=C0,this.hg=Dr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}fa.prototype.copy=function(){var a=new fa;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=hi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Am(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=hi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Qe=fa.prototype,Qe.qb=function(a){a.classType===fa&&(this.sizing=a)},Qe.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Zt(this)},Qe.wi=function(a){this.Me=a},Qe.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)},Qe.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Cn.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)},Qe.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(fo,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 jm(a){if(a.sizing===C0){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Qe.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ta(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&$t("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new kn),this.be.add(E),this},cn.Object.defineProperties(fa.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&&yr(a,">= 0",fa,"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&&yr(a,">= 0",fa,"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))&&yr(a,">= 0",fa,"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&&yr(a,">= 0",fa,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&bd(a,"RowColumnDefinition.separatorStroke"),a instanceof Ri&&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)||$t("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&&bd(a,"RowColumnDefinition.background"),a instanceof Ri&&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}}}),fa.prototype.computeEffectiveSpacing=fa.prototype.Wc,fa.prototype.computeEffectiveSpacingTop=fa.prototype.Io;var C0=new tn(fa,"Default",0),pg=new tn(fa,"None",1),Om=new tn(fa,"ProportionalExtra",2);fa.className="RowColumnDefinition",fa.Default=C0,fa.None=pg,fa.ProportionalExtra=Om;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)}Vt(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=hi(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 Hf(a){a.Na===null?a.Na=new M0:a.Na.nc&&(a.Na=a.Na.copy())}Qe=Br.prototype,Qe.th=function(){zt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Qe.qb=function(a){a===yn||a===qn||a===ti||a===Dr?this.geometryStretch=a:zt.prototype.qb.call(this,a)},Qe.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Zt(this)};function cp(a,y,x,b){var E=x.length;if(!(4>E)){var te=b.measuredBounds,ne=Math.max(1,te.width);te=te.height;for(var se=x[0],he=x[1],ge,ye,Me,_e,Ke,qe,rt=0,Mt=sr(),xt=2;xt<E;xt+=2)ge=x[xt],ye=x[xt+1],Me=ge-se,se=ye-he,Me===0&&(Me=.001),_e=se/Me,Ke=Math.atan2(se,Me),qe=Math.sqrt(Me*Me+se*se),Mt.push([Me,Ke,_e,qe]),rt+=qe,se=ge,he=ye;se=x[0],he=x[1],Me=b.measuredBounds.width,b instanceof Br&&(Me-=b.strokeWidth),1>Me&&(Me=1),E=x=Me,ge=ne/2,ye=ge!==0,xt=0,qe=Mt[xt],Me=qe[0],Ke=qe[1],_e=qe[2],qe=qe[3];for(var At=0;.1<=rt;){if(At===0&&(ye?(E=x,E-=ge,rt-=ge,ye=!1):E=x,E===0&&(E=1)),E>rt){dr(Mt);return}E>qe?(At=E-qe,E=qe):At=0;var Ot=Math.sqrt(E*E/(1+_e*_e));if(0>Me&&(Ot=-Ot),se+=Ot,he+=_e*Ot,a.translate(se,he),a.rotate(Ke),a.translate(-(ne/2),-(te/2)),At===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Ke),a.translate(-se,-he),rt-=E,qe-=E,At!==0){if(xt++,xt===Mt.length){dr(Mt);return}qe=Mt[xt],Me=qe[0],Ke=qe[1],_e=qe[2],qe=qe[3],E=At}}dr(Mt)}}Qe.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&&Ko(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===Cn.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&&(Ko(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===jn.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===jn.u){var ge=E.startX;he=E.startY;var ye=E.endX,Me=E.endY;E=Math.min(ge,ye);var _e=Math.min(he,Me);ge=Math.abs(ye-ge),he=Math.abs(Me-he),a.beginPath(),a.rect(E,_e,ge,he),b!==null&&a.ng(b),x!==null&&(se&&te&&yh(a),a.jk(),se&&te&&Vh(a)),a.Se()}else if(E.type===jn.F)ge=E.startX,he=E.startY,ye=E.endX,Me=E.endY,E=Math.abs(ye-ge)/2,_e=Math.abs(Me-he)/2,ge=Math.min(ge,ye)+E,he=Math.min(he,Me)+_e,a.beginPath(),a.moveTo(ge,he-_e),a.bezierCurveTo(ge+Ht.wg*E,he-_e,ge+E,he-Ht.wg*_e,ge+E,he),a.bezierCurveTo(ge+E,he+Ht.wg*_e,ge+Ht.wg*E,he+_e,ge,he+_e),a.bezierCurveTo(ge-Ht.wg*E,he+_e,ge-E,he+Ht.wg*_e,ge-E,he),a.bezierCurveTo(ge-E,he-Ht.wg*_e,ge-Ht.wg*E,he-_e,ge,he-_e),a.closePath(),b!==null&&a.ng(b),x!==null&&(se&&te&&yh(a),a.jk(),se&&te&&Vh(a)),a.Se();else if(E.type===jn.o)for(E=E.figures,he=E.length,_e=0;_e<he;_e++){ge=E.s[_e],a.beginPath(),a.moveTo(ge.startX,ge.startY),ye=ge.segments.s,Me=ye.length;for(var Ke=null,qe=0;qe<Me;qe++){var rt=ye[qe];switch(rt.type){case ua:a.moveTo(rt.endX,rt.endY);break;case eo:a.lineTo(rt.endX,rt.endY);break;case Ra:a.bezierCurveTo(rt.point1X,rt.point1Y,rt.point2X,rt.point2Y,rt.endX,rt.endY);break;case $s:a.quadraticCurveTo(rt.point1X,rt.point1Y,rt.endX,rt.endY);break;case Qo:if(rt.radiusX===rt.radiusY){var Mt=Math.PI/180;a.arc(rt.point1X,rt.point1Y,rt.radiusX,rt.startAngle*Mt,(rt.startAngle+rt.sweepAngle)*Mt,0>rt.sweepAngle,Ke!==null?Ke.endX:ge.startX,Ke!==null?Ke.endY:ge.startY)}else if(Ke=_s(rt,ge),Mt=Ke.length,Mt===0)a.lineTo(rt.centerX,rt.centerY);else for(var xt=0;xt<Mt;xt++){var At=Ke[xt];xt===0&&a.lineTo(At[0],At[1]),a.bezierCurveTo(At[2],At[3],At[4],At[5],At[6],At[7])}break;case cl:if(xt=Mt=0,Ke!==null&&Ke.type===Qo){if(Ke=_s(Ke,ge),At=Ke.length,At===0){a.lineTo(rt.endX,rt.endY);break}Ke=Ke[At-1]||null,Ke!==null&&(Mt=Ke[6],xt=Ke[7])}else Mt=Ke!==null?Ke.endX:ge.startX,xt=Ke!==null?Ke.endY:ge.startY;if(Ke=kl(rt,ge,Mt,xt),Mt=Ke.length,Mt===0){a.lineTo(rt.endX,rt.endY);break}for(xt=0;xt<Mt;xt++)At=Ke[xt],a.bezierCurveTo(At[2],At[3],At[4],At[5],At[6],At[7]);break;default:$t("Segment not of valid type: "+rt.type)}rt.isClosed&&a.closePath(),Ke=rt}ye=ge.isFilled,te?ge.isShadowed?(ye===!0&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&(ye&&se&&yh(a),a.jk(),ye&&se&&Vh(a))):(yh(a),ye&&b!=="transparent"&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk(),Vh(a)):(ye&&b!==null&&a.ng(b,ge.isEvenOdd),x!==null&&a.jk()),a.Se(_e)}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=sr(),te.type===jn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),cp(a,y,b,x);else if(te.type===jn.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,_e=E,ge=se.segments.s,ye=ge.length,Me=0;Me<ye;Me++){switch(qe=ge[Me],qe.type){case ua:cp(a,y,b,x),b.length=0,b.push(qe.endX),b.push(qe.endY),ne=qe.endX,E=qe.endY,he=ne,_e=E;break;case eo:b.push(qe.endX),b.push(qe.endY),ne=qe.endX,E=qe.endY;break;case Ra:Ht.Qe(ne,E,qe.point1X,qe.point1Y,qe.point2X,qe.point2Y,qe.endX,qe.endY,.5,b),ne=qe.endX,E=qe.endY;break;case $s:Ht.ep(ne,E,qe.point1X,qe.point1Y,qe.endX,qe.endY,.5,b),ne=qe.endX,E=qe.endY;break;case Qo:if(rt=_s(qe,se),Ke=rt.length,Ke===0){b.push(qe.centerX),b.push(qe.centerY),ne=qe.centerX,E=qe.centerY;break}for(Mt=0;Mt<Ke;Mt++)xt=rt[Mt],Ht.Qe(ne,E,xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,b),ne=xt[6],E=xt[7];break;case cl:if(rt=kl(qe,se,ne,E),Ke=rt.length,Ke===0){b.push(qe.endX),b.push(qe.endY),ne=qe.endX,E=qe.endY;break}for(Mt=0;Mt<Ke;Mt++)xt=rt[Mt],Ht.Qe(ne,E,xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,b),ne=xt[6],E=xt[7];break;default:$t("Segment not of valid type: "+qe.type)}qe.isClosed&&(b.push(he),b.push(_e),cp(a,y,b,x))}cp(a,y,b,x)}else if(te.type===jn.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),cp(a,y,b,x);else if(te.type===jn.F){if(E=new pa,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new ci(Qo),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=_s(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++)_e=te[he],Ht.Qe(ne,E,_e[2],_e[3],_e[4],_e[5],_e[6],_e[7],.5,b),ne=_e[6],E=_e[7];cp(a,y,b,x)}dr(b),a.restore(),a.Vc(!1)}}}},Qe.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)},Qe.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:zt.prototype.nk.call(this,a)},Qe.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)}},Qe.ga=function(a,y){if(y===void 0&&(y=new Et),a instanceof ar){a.Mc()&&$t("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},Qe.mi=function(a){a===void 0&&(a=new on);var y=this.naturalBounds,x=this.oe;y=on.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=Et.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),bo(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),bo(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),bo(a,b.x,b.y,0,0),on.free(y),Et.free(b),a},Qe.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!==jn.j||y||(E+=2);var te=on.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return on.free(te),!1;if(b=E+1e-4,x.type===jn.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:(on.free(te),Ht.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===jn.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 on.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),on.free(te),a}if(x.type===jn.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 on.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),on.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===jn.o)return on.free(te),this.fill===null?Oh(x,a.x,a.y,E):Vu(x,a,E,1<this.strokeWidth,y);$t("Unknown Geometry type: "+x.type)},Qe.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var se=this.figure,he=k0[se];if(he===void 0){var ge=Ht.Ze[se];typeof ge=="string"&&(ge=Ht.Ze[ge]),typeof ge=="function"?(he=ge(null,100,100),k0[se]=he):$t("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,ge=ne.width;var ye=ne.height;switch(Us(this,!0)){case yn:b=x=0;break;case wn:ge=Math.max(a-te,0),ye=Math.max(y-te,0);break;case ir:ge=Math.max(a-te,0),b=0;break;case vr:x=0,ye=Math.max(y-te,0)}isFinite(E.width)&&(ge=E.width),isFinite(E.height)&&(ye=E.height);var Me=this.maxSize,_e=this.minSize;switch(x=Math.max(x-te,_e.width),b=Math.max(b-te,_e.height),ge=Math.min(Me.width,ge),ye=Math.min(Me.height,ye),ge=isFinite(ge)?Math.max(x,ge):Math.max(se,x),ye=isFinite(ye)?Math.max(b,ye):Math.max(he,b),x=E0(this),x){case yn:break;case wn:se=ge,he=ye;break;case qn:x=Math.min(ge/se,ye/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:$t(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&&Ht.$(this.ua.Sk,a-te)&&Ht.$(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),ge+te,ye+te),E.w()?(ge=E.width,ye=E.height,ge=Math.min(Me.width,ge),ye=Math.min(Me.height,ye),ge=Math.max(_e.width,ge),ye=Math.max(_e.height,ye),this.dc.h(0,0,ge,ye)):this.dc.assign(ne)};function E0(a){var y=a.geometryStretch;return a.Rd!==null?y===Dr?wn:y:y===Dr?k0[a.figure].defaultStretch:y}Qe.eh=function(a,y,x,b){ms(this,a,y,x,b)},Qe.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Qe.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,ge=-te.m21*ne,ye=te.m11*ne,Me=ne*(te.m21*te.dy-te.m22*te.dx),_e=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*ge+Me,ne=a*he+y*ye+_e,se=x*se+b*ge+Me,he=x*he+b*ye+_e,Me=this.ig/2,ge=this.ua,ge===null&&(this.measure(1/0,1/0),ge=this.ua);var Ke=ge.bounds;if(ye=!1,ge.type===jn.j)if(1.5>=this.strokeWidth)ye=Ht.Ve(ge.startX,ge.startY,ge.endX,ge.endY,te,ne,se,he,E);else{if(ge.startX===ge.endX?(b=Me,ye=0):(y=(ge.endY-ge.startY)/(ge.endX-ge.startX),ye=Me/Math.sqrt(1+y*y),b=ye*y),y=sr(),a=new Et,Ht.Ve(ge.startX+b,ge.startY+ye,ge.endX+b,ge.endY+ye,te,ne,se,he,a)&&y.push(a),a=new Et,Ht.Ve(ge.startX-b,ge.startY-ye,ge.endX-b,ge.endY-ye,te,ne,se,he,a)&&y.push(a),a=new Et,Ht.Ve(ge.startX+b,ge.startY+ye,ge.startX-b,ge.startY-ye,te,ne,se,he,a)&&y.push(a),a=new Et,Ht.Ve(ge.endX+b,ge.endY+ye,ge.endX-b,ge.endY-ye,te,ne,se,he,a)&&y.push(a),se=y.length,se===0)return dr(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);dr(y)}else if(ge.type===jn.u)ye=Ht.Ff(Ke.x-Me,Ke.y-Me,Ke.x+Ke.width+Me,Ke.y+Ke.height+Me,te,ne,se,he,E);else if(ge.type===jn.F){y=on.allocAt(Ke.x,Ke.y,Ke.width,Ke.height).Bc(Me,Me);e:if(y.width===0)ye=Ht.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)ye=Ht.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,se,he,E);else{if(a=y.width/2,ge=y.height/2,b=y.x+a,ye=y.y+ge,x=9999,te!==se&&(x=(ne-he)/(te-se)),9999>Math.abs(x)){if(he=ne-ye-x*(te-b),0>a*a*x*x+ge*ge-he*he){E.x=NaN,E.y=NaN,ye=!1;break e}Me=Math.sqrt(a*a*x*x+ge*ge-he*he),se=(-(a*a*x*he)+a*ge*Me)/(ge*ge+a*a*x*x)+b,a=(-(a*a*x*he)-a*ge*Me)/(ge*ge+a*a*x*x)+b,ge=x*(se-b)+he+ye,he=x*(a-b)+he+ye,Math.abs((te-se)*(te-se))+Math.abs((ne-ge)*(ne-ge))<Math.abs((te-a)*(te-a))+Math.abs((ne-he)*(ne-he))?(E.x=se,E.y=ge):(E.x=a,E.y=he)}else{if(se=ge*ge,he=te-b,se-=se/(a*a)*he*he,0>se){E.x=NaN,E.y=NaN,ye=!1;break e}he=Math.sqrt(se),se=ye+he,he=ye-he,Math.abs(se-ne)<Math.abs(he-ne)?(E.x=te,E.y=se):(E.x=te,E.y=he)}ye=!0}on.free(y)}else if(ge.type===jn.o){_e=Et.alloc();var qe=se-te,rt=he-ne,Mt=qe*qe+rt*rt,xt=te,At=ne;if(0<Mt&&Ke.contains(xt,At)&&(_e.x=xt,_e.y=At,this.ca(_e)))for(qe!==0&&.5>Math.abs(qe)?(rt*=.5/qe,qe=.5):rt!==0&&.5>Math.abs(rt)&&(qe*=.5/rt,rt=.5),xt-=qe,At-=rt;Ke.contains(xt,At);)xt-=qe,At-=rt;for(E.x=se,E.y=he,rt=0;rt<ge.figures.count;rt++){var Ot=ge.figures.s[rt],Dt=Ot.isFilled?xt:te,_t=Ot.isFilled?At:ne,Yt=Ot.segments;Ke=Ot.startX,qe=Ot.startY;for(var _n=Ke,Jn=qe,Xn=0;Xn<Yt.count;Xn++){var Mn=Yt.s[Xn],mn=Mn.type,Or=Mn.endX,br=Mn.endY,xi=!1;switch(mn){case ua:_n=Or,Jn=br;break;case eo:xi=Dm(Ke,qe,Or,br,Dt,_t,se,he,_e);break;case Ra:xi=Ht.Eo(Ke,qe,Mn.point1X,Mn.point1Y,Mn.point2X,Mn.point2Y,Or,br,Dt,_t,se,he,.6,_e);break;case $s:xi=Ht.Eo(Ke,qe,Ke+2/3*(Mn.point1X-Ke),qe+2/3*(Mn.point1Y-qe),Or+2/3*(Mn.point1X-Or),br+2/3*(Mn.point1Y-br),Or,br,Dt,_t,se,he,.6,_e);break;case Qo:case cl:mn=Mn.type===Qo?_s(Mn,Ot):kl(Mn,Ot,Ke,qe);var Qi=mn.length;if(Qi===0){xi=Dm(Ke,qe,Mn.type===Qo?Mn.centerX:Mn.endX,Mn.type===Qo?Mn.centerY:Mn.endY,Dt,_t,se,he,_e);break}for(br=null,Or=0;Or<Qi;Or++){if(br=mn[Or],Or===0&&Dm(Ke,qe,br[0],br[1],Dt,_t,se,he,_e)){var Ma=Fm(Dt,_t,_e,Mt,E);Ma<Mt&&(Mt=Ma,ye=!0)}Ht.Eo(br[0],br[1],br[2],br[3],br[4],br[5],br[6],br[7],Dt,_t,se,he,.6,_e)&&(Ma=Fm(Dt,_t,_e,Mt,E),Ma<Mt&&(Mt=Ma,ye=!0))}Or=br[6],br=br[7];break;default:$t("Unknown Segment type: "+mn)}Ke=Or,qe=br,xi&&(xi=Fm(Dt,_t,_e,Mt,E),xi<Mt&&(Mt=xi,ye=!0)),Mn.isClosed&&(Or=_n,br=Jn,Dm(Ke,qe,Or,br,Dt,_t,se,he,_e)&&(Mn=Fm(Dt,_t,_e,Mt,E),Mn<Mt&&(Mt=Mn,ye=!0)))}}te=x-a,ne=b-y,se=Math.sqrt(te*te+ne*ne),se!==0&&(te/=se,ne/=se),E.x-=te*Me,E.y-=ne*Me,Et.free(_e)}else $t("Unknown Geometry type: "+ge.type);return ye?(this.transform.Ga(E),!0):!1};function Fm(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Dm(a,y,x,b,E,te,ne,se,he){if(Ht.$(a,x)&&Ht.$(y,b)||Ht.$(E,ne)&&Ht.$(te,se))return!1;var ge=!1,ye=(E-ne)*(y-b)-(te-se)*(a-x);return ye===0?!1:(he.x=((E*se-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/ye,he.y=((E*se-te*ne)*(y-b)-(te-se)*(a*b-y*x))/ye,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(he.y>a||Ht.$(he.y,a))&&(he.y<y||Ht.$(he.y,y))&&(ge=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||Ht.$(he.x,y))&&(he.x<a||Ht.$(he.x,a))&&(ge=!0)),ge)}Qe.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=Et.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)))),Et.free(te),E},Qe.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Wr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=Et.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 Et.free(ne),!0;var se=Et.alloc(),he=Et.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,Wf(this,ne,se,he)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),Wf(this,ne,se,he)?y=!0:(se.x=b,se.y=a,se.transform(x),Wf(this,ne,se,he)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),Wf(this,ne,se,he)&&(y=!0)))),Et.free(ne),Wr.free(x),Et.free(se),Et.free(he),y};function Wf(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)}Qe.tx=function(a,y,x){function b(Mt,xt){for(var At=Mt.length,Ot=0;Ot<At;Ot+=2)if(xt.zd(Mt[Ot],Mt[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,ge=ne.x+ne.width;if(ne=ne.y+ne.height,Mr(a.x,a.y,se,he)<=E&&Mr(a.x,a.y,ge,he)<=E&&Mr(a.x,a.y,se,ne)<=E&&Mr(a.x,a.y,ge,ne)<=E)return!0}if(se=y.startX,he=y.startY,ge=y.endX,ne=y.endY,y.type===jn.j){if(x=(se-ge)*(a.x-ge)+(he-ne)*(a.y-ne),ao(a.x,a.y,se,he,ge,ne)<=(0<=(ge-se)*(a.x-se)+(ne-he)*(a.y-he)&&0<=x?E:te))return!0}else{if(y.type===jn.u)return y=!1,x&&(y=ao(a.x,a.y,se,he,se,ne)<=E||ao(a.x,a.y,se,he,ge,he)<=E||ao(a.x,a.y,ge,he,ge,ne)<=E||ao(a.x,a.y,se,ne,ge,ne)<=E),y;if(y.type===jn.F){y=a.x-(se+ge)/2,te=a.y-(he+ne)/2;var ye=Math.abs(ge-se)/2,Me=Math.abs(ne-he)/2;if(ye===0||Me===0)return ao(a.x,a.y,se,he,ge,ne)<=E;if(x){if(a=Ht.$y(ye,Me,y,te),a*a<=E)return!0}else return!(Mr(y,te,-ye,0)>=E||Mr(y,te,0,-Me)>=E||Mr(y,te,0,Me)>=E||Mr(y,te,ye,0)>=E)}else if(y.type===jn.o){if(ge=y.bounds,te=ge.x,se=ge.y,he=ge.x+ge.width,ge=ge.y+ge.height,a.x>he&&a.x<te&&a.y>ge&&a.y<se&&ao(a.x,a.y,te,se,te,ge)>E&&ao(a.x,a.y,te,se,he,se)>E&&ao(a.x,a.y,he,ge,te,ge)>E&&ao(a.x,a.y,he,ge,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?Oh(y,a.x,a.y,te):Vu(y,a,te,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(te=x.s[y],ne=te.startX,ye=te.startY,a.zd(ne,ye)>E)return!1;for(se=te.segments.s,he=se.length,ge=0;ge<he;ge++)switch(Me=se[ge],Me.type){case ua:case eo:if(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E)return!1;break;case Ra:var _e=sr();if(Ht.Qe(ne,ye,Me.point1X,Me.point1Y,Me.point2X,Me.point2Y,Me.endX,Me.endY,.8,_e),ne=b(_e,a),dr(_e),ne||(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E))return!1;break;case $s:if(_e=sr(),Ht.ep(ne,ye,Me.point1X,Me.point1Y,Me.endX,Me.endY,.8,_e),ne=b(_e,a),dr(_e),ne||(ne=Me.endX,ye=Me.endY,a.zd(ne,ye)>E))return!1;break;case Qo:case cl:_e=Me.type===Qo?_s(Me,te):kl(Me,te,ne,ye);var Ke=_e.length;if(Ke===0){if(ne=Me.type===Qo?Me.centerX:Me.endX,ye=Me.type===Qo?Me.centerY:Me.endY,a.zd(ne,ye)>E)return!1;break}Me=null;for(var qe=sr(),rt=0;rt<Ke;rt++)if(Me=_e[rt],qe.length=0,Ht.Qe(Me[0],Me[1],Me[2],Me[3],Me[4],Me[5],Me[6],Me[7],.8,qe),b(qe,a))return dr(qe),!1;dr(qe),Me!==null&&(ne=Me[6],ye=Me[7]);break;default:$t("Unknown Segment type: "+Me.type)}}return!0}}}return!1},Qe.qc=function(){this.ua=null},Qe.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=bg,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Wa):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new ar(1-Wa.x,Wa.y)))}Br.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=xh[a.toArrow];else a.fromArrow!=="None"?b=xh[a.fromArrow]:(b=Ht.Ze[a.figure],typeof b=="string"&&(b=Ht.Ze[b]),b===void 0&&$t("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Ht.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=xh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=xh[x],y===void 0){var b=null,E;for(E in Ht.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=jn.parse(Ht.um[b],!1),xh[b]=a,x!==b&&(xh[x]=b),b}}return typeof y=="string"?y:y instanceof jn?a:null}cn.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),Ka(this)&&(a=this.part,a!==null&&co(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=jn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Et.allocAt(-y.x,-y.y),Et.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&&bd(a,"Shape.fill"),a instanceof Ri&&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&&bd(a,"Shape.stroke"),a instanceof Ri&&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 yr(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"?yr(a,'"butt", "round", or "square"',Br,"strokeCap"):(Hf(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"?yr(a,'"miter", "bevel", or "round"',Br,"strokeJoin"):(Hf(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){Hf(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)||$t("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&&(Hf(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=Ht.Ze[a];typeof x=="function"?x=a:(x=Ht.Ze[a.toLowerCase()])||$t("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?$t("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new qc),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?$t("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new qc),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:za},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Hf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:za},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Hf(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&&(Hf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Dr},set:function(a){var y=this.geometryStretch;y!==a&&(Hf(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 wh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&qu(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 wh),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 wh),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 wh),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 xh=new xr,k0=new xr;Br.className="Shape",Br.getFigureGenerators=function(){var a=new Kn,y;for(y in Ht.Ze)y!==y.toLowerCase()&&a.add(y,Ht.Ze[y]);return a.freeze(),a},Br.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Ht.Ze;b[a]=y,b[x]=a},Br.getArrowheadGeometries=function(){var a=new Kn;for(b in Ht.um)if(xh[b]===void 0){var y=jn.parse(Ht.um[b],!1);xh[b]=y,y=b.toLowerCase(),y!==b&&(xh[y]=b)}for(var x in xh)if(x!==x.toLowerCase()){var b=xh[x];b instanceof jn&&a.add(x,b)}return a.freeze(),a},Br.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=jn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||$t("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=xh;b[a]=x,b[y]=a};function M0(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Dr,this.gg=this.fg=za}M0.prototype.copy=function(){var a=new M0;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function to(a,y){return zt.call(this),zm||(Hs=Uo?new iu(null).context:null,zm=!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}Vt(to,zt),to.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 rh(a){a.da===null?a.da=new F0:a.da.nc&&(a.da=a.da.copy())}Qe=to.prototype,Qe.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}Qe.qb=function(a){a.classType===to?this.wrap=a:zt.prototype.qb.call(this,a)},Qe.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Qe.v=function(){zt.prototype.v.call(this)},Qe.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=mg(this),se=a.textAlign=this.textAlign,he=y.tn;se==="start"?se=he?"right":"left":se==="end"&&(se=he?"left":"right"),he=this.isUnderline;var ge=this.isStrikethrough;Ko(this,a,this.xc,!0,!1,x,b),(he||ge)&&Ko(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ye=this.oe,Me=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var _e=y.scale;switch(8>(Me*Me+ye*ye)*_e*_e&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof ml&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Me=this.spacingBelow,this.flip){case si:a.translate(E,0),a.scale(-1,1);break;case Kr:a.translate(0,te),a.scale(1,-1);break;case Hi:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),ye=this.Gc,_e=(y+ne+Me)*ye,te>_e&&(b=this.verticalAlignment,b=b.y*te-b.y*_e+b.offsetY),ye===1&&this.ze!==null)Me=this.Cb,Me>E&&(Me=E),this.Oj(this.ze,a,0,b+y,E,ne,Me,x,se,he,ge);else if(this.Qc!==null&&this.Qb!==null)for(_e=0;_e<ye;_e++){var Ke=this.Qc[_e];Ke>E&&(Ke=E),b+=y,this.Oj(this.Qb[_e],a,0,b,E,ne,Ke,x,se,he,ge),b+=ne+Me}switch(this.flip){case si:a.scale(-1,1),a.translate(-E,0);break;case Kr:a.scale(1,-1),a.translate(0,-te);break;case Hi:a.scale(-1,-1),a.translate(-E,-te)}}},Qe.Oj=function(a,y,x,b,E,te,ne,se,he,ge,ye){var Me=0;if(se)he==="left"?Me=0:he==="right"?Me=E-ne:he==="center"&&(Me=(E-ne)/2),y.fillRect(x+Me,b+.25*te,ne,1);else{if(he==="left"?Me=0:he==="right"?Me=E:he==="center"&&(Me=E/2),E=Rm!==null?Rm(this,te):.75*te,y.fillText(a,x+Me,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Me-=ne:he==="center"&&(Me-=ne/2),ge){se=Bm!==null?Bm(this,te):.8*te,he=x+Me,ge=b+se,E=x+Me+ne,se=b+se;var _e=a;y.beginPath(),y.lineWidth=_e,y.moveTo(he,ge),y.lineTo(E,se),y.stroke(),y.Se(),y instanceof ml&&y.ad.classList.add("gojs-td")}ye&&(ye=b+te-te/2.2|0,a%2!==0&&(ye+=.5),b=x+Me,te=ye,x=x+Me+ne,ne=ye,Me=a,y.beginPath(),y.lineWidth=Me,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof ml&&y.ad.classList.add("gojs-td"))}},Qe.kk=function(a,y,x){if(!zt.prototype.kk.call(this,a,y,x))return!1;if(Ko(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},Qe.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:zt.prototype.nk.call(this,a)},Qe.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)}},Qe.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;Hs!==null&&k1!==te&&(k1=Hs.font=te),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(te=this.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),te.length===0)te=8;else if(this.isMultiline){for(var se=ne=0,he=!1;!he;){var ge=te.indexOf(`
|
|
`,se);ge===-1&&(ge=te.length,he=!0),se=te.substr(se,ge-se),this.formatting===vg&&(se=se.trim()),ne=Math.max(ne,Su(se)),se=ge+1}te=ne}else ne=te.indexOf(`
|
|
`,0),0<=ne&&(te=te.substr(0,ne)),te=Su(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===Im&&(y=this.Ae,y=this.overflow===Im?x1(y):0,ge=this.spacingAbove+this.spacingBelow,ge=Math.max(0,mg(this)+ge),he=Math.min(this.maxLines-1,Math.max(Math.floor(he/ge+.01)-1,0)),!(he+1>=this.Qb.length))){for(this.l|=16777216,ge=this.Qb[he],y=Math.max(1,a-y);Su(ge)>y&&1<ge.length;)ge=ge.substr(0,ge.length-1);ge+=yg,y=Su(ge),this.Qb[he]=ge,this.Qb=this.Qb.slice(0,he+1),this.Qc[he]=y,this.Qc=this.Qc.slice(0,he+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===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),Da(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Qe.eh=function(a,y,x,b){ms(this,a,y,x,b)};function gg(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function T0(a,y,x,b){var E=a.formatting===vg;E&&(y=y.trim());var te=0,ne=a.Ae,se=a.spacingAbove+a.spacingBelow;se=Math.max(0,mg(a)+se);var he=a.overflow===Im?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,se);else if(ne=y,a.wrap===L0){a.Le=1;var ge=Su(y);if(he===0||ge<=x)a.Cb=Math.max(a.Cb,ge),gg(a,y,a.Cb),b!==null&&b.h(ge,se);else{for(te=fp(a,ne),ne=ne.substr(te.length),y=fp(a,ne),ge=Su(te+y);0<y.length&&ge<=x;)te+=y,ne=ne.substr(y.length),y=fp(a,ne),ge=te+y,E&&(ge=ge.trim()),ge=Su(ge);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);Su(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=yg;var ye=Su(te);a.Cb=ye,gg(a,te,ye),b!==null&&b.h(ye,se)}}else{for(he=0,ne.length===0&&(he=1,gg(a,ne,0));0<ne.length;){for(y=fp(a,ne),ne=ne.substr(y.length);Su(y)>x;){var Me=1;for(ge=Su(y.substr(0,Me)),ye=0;ge<=x;)Me++,ye=ge,ge=Su(y.substr(0,Me));if(Me===1){var _e=ge;te=Math.max(te,ge)}else _e=ye,te=Math.max(te,ye);if(Me--,1>Me&&(Me=1),gg(a,y.substr(0,Me),_e),he++,y=y.substr(Me),a.Gc+he>a.maxLines)break}for(ye=fp(a,ne),ge=Su(y+ye);0<ye.length&&ge<=x;)y+=ye,ne=ne.substr(ye.length),ye=fp(a,ne),ge=y+ye,E&&(ge=ge.trim()),ge=Su(ge);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ye.length===0?(Me=ge,te=Math.max(te,ge)):(Me=ye=Su(y),te=Math.max(te,ye)),gg(a,y,Me),he++,a.Gc+he>a.maxLines))break}a.Le=Math.min(a.maxLines,he),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,se*a.Le)}}function fp(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 Su(a){return Hs===null?8*a.length:Hs.measureText(a).width}function mg(a){if(a.df!==null)return a.df;var y=a.Ae;if(Hs===null){var x=16;return a.df=x}return j0[y]!==void 0&&5e3>E1?x=j0[y]:(x=1.3*Hs.measureText("M").width,j0[y]=x,E1++),a.df=x}function x1(a){if(Hs===null)return 6;if(_m[a]!==void 0&&5e3>O0)var y=_m[a];else y=Hs.measureText(yg).width,_m[a]=y,O0++;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,mg(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
|
|
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var te=a.Gc=0,ne,se=!1;!se;){if(ne=x.indexOf(`
|
|
`,te),ne===-1&&(ne=x.length,se=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==L0){a.Le=0;var he=pn.alloc();T0(a,te,y,he),E+=he.height,pn.free(he),a.Gc+=a.Le}else T0(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(se=!0)}te=ne+1}return a.Lq=E}cn.Object.defineProperties(to.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"||(rh(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:yn},set:function(a){var y=this.flip;y!==a&&(rh(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:_c},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),rh(this),this.da.Yr=a,ks(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=pn.alloc();T0(this,this.ec,999999,a);var y=a.width;pn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Da(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:N0},set:function(a){var y=this.wrap;y!==a&&(rh(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:A0},set:function(a){var y=this.overflow;y!==a&&(rh(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&&bd(a,"TextBlock.stroke"),a instanceof Ri&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return mg(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&&(rh(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&&(rh(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 wh),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 wh),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 wh),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 wh),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 wh),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&&(rh(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&&(rh(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&&(rh(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&&(rh(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:vg},set:function(a){var y=this.formatting;y!==a&&(rh(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&&yr(a,"> 0",to,"maxLines"),rh(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 Rm=null,Bm=null,L0=new tn(to,"None",0),P1=new tn(to,"WrapFit",1),N0=new tn(to,"WrapDesiredSize",2),b1=new tn(to,"WrapBreakAll",3),A0=new tn(to,"OverflowClip",0),Im=new tn(to,"OverflowEllipsis",1),vg=new tn(to,"FormatTrim",0),C1=new tn(to,"FormatNone",0),xx=/[ \u200b\u00ad]/,j0=new xr,E1=0,_m=new xr,O0=0,yg="...",k1="",Hs=null,zm=!1;to.className="TextBlock";function F0(){this.nc=!1,this.Hd=null,this.Xf=yn,this.gq=vg,this.Jq=1/0,this.$q=A0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=_c,this.$r=N0}F0.prototype.copy=function(){var a=new F0;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},to.getEllipsis=function(){return yg},to.setEllipsis=function(a){yg=a,_m=new xr,O0=0},to.getBaseline=function(){return Rm},to.setBaseline=function(a){Rm=a},to.getUnderline=function(){return Bm},to.setUnderline=function(a){Bm=a},to.isValidFont=function(a){if(zm||(Hs=Uo?new iu(null).context:null,zm=!0),Hs===null)return!0;var y=Hs.font;if(a===y||a==="10px sans-serif")return!0;Hs.font="10px sans-serif",Hs.font=a;var x=Hs.font;if(x!=="10px sans-serif")return Hs.font=y,!0;Hs.font="19px serif";var b=Hs.font;return Hs.font=a,x=Hs.font,Hs.font=y,x!==b},to.FormatNone=C1,to.FormatTrim=vg,to.None=L0,to.OverflowClip=A0,to.OverflowEllipsis=Im,to.WrapBreakAll=b1,to.WrapDesiredSize=N0,to.WrapFit=P1;function wh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}wh.prototype.copy=function(){var a=new wh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},wh.className="GradElementSettings";function Ws(a,y){zt.call(this),this.Eg=null,this.qo="",this.Xg=Co,this.Nk=wn,this.Zg=this.Hd=null,this.Mk=vi,this.Xf=yn,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 dp;Vt(Ws,zt),Ws.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},Ws.prototype.qb=function(a){a===yn||a===qn||a===ti?this.imageStretch=a:zt.prototype.qb.call(this,a)},Ws.prototype.toString=function(){return"Picture("+this.source+")#"+Zt(this)};function pp(a){a===void 0&&(a=""),a!==""?dp[a]&&(delete dp[a],Gm--):(dp=new xr,Gm=0)}function M1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null)for(var se=ne.length,he=0;he<se;he++)te=ne[he],E.Xn.add(te),te.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),te.Zg!==null&&te.Zg(te,x))}y.Bg.clear()}a.desiredSize.w()||(ca(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=sr();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);dr(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Ws.prototype.hA=function(){if(this.source!==""){pp(this.source);var a=this.source;this.source="",this.source=a}},Ws.prototype.redraw=function(){this.N(),this.Uc=!0},Ws.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 Gf)){var E=a instanceof ml;b=this.naturalBounds;var te=0,ne=0,se=this.qn,he=se?+x.width:x.naturalWidth;if(se=se?+x.height:x.naturalHeight,he===void 0&&x.videoWidth&&(he=x.videoWidth),se===void 0&&x.videoHeight&&(se=x.videoHeight),he=he||b.width,se=se||b.height,he!==0&&se!==0){var ge=he,ye=se;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,he=this.Xg.width,se=this.Xg.height);var Me=he,_e=se,Ke=this.Nk,qe=this.Mk;switch(Ke){case yn:if(this.sourceRect.w())break;Me>=b.width&&(te=te+qe.offsetX+(Me*qe.x-b.width*qe.x)),_e>=b.height&&(ne=ne+qe.offsetY+(_e*qe.y-b.height*qe.y)),he=Math.min(b.width,Me),se=Math.min(b.height,_e);break;case wn:Me=b.width,_e=b.height;break;case qn:case ti:Ke===qn?(Ke=Math.min(b.height/_e,b.width/Me),Me*=Ke,_e*=Ke):Ke===ti&&(Ke=Math.max(b.height/_e,b.width/Me),Me*=Ke,_e*=Ke,Me>=b.width&&(te=(te+qe.offsetX+(Me*qe.x-b.width*qe.x)/Me)*he),_e>=b.height&&(ne=(ne+qe.offsetY+(_e*qe.y-b.height*qe.y)/_e)*se),he*=1/(Me/b.width),se*=1/(_e/b.height),Me=b.width,_e=b.height)}Ke=this.Df()*y.scale;var rt=Me*Ke*_e*Ke,Mt=he*se/rt,xt=x.__goCache;Ke=null;var At=wx;if(!E){if(x.sq&&xt!==void 0&&4<rt&&Mt>At*At)for(xt.gi===null&&(L1(xt,4,ge,ye,x),L1(xt,16,ge,ye,x)),E=xt.gi,ge=E.length,ye=0;ye<ge&&E[ye].ratio*E[ye].ratio<Mt;ye++)Ke=E[ye];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new iu(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=Me<b.width?qe.offsetX+(b.width*qe.x-Me*qe.x):0,qe=_e<b.height?qe.offsetY+(b.height*qe.y-_e*qe.y):0,this.flip){case si:a.translate(Math.min(b.width,Me),0),a.scale(-1,1);break;case Kr:a.translate(0,Math.min(b.height,_e)),a.scale(1,-1);break;case Hi:a.translate(Math.min(b.width,Me),Math.min(b.height,_e)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&xt!==void 0&&Ke!==null&&Ke.ratio!==1){a.save(),y=Ke.ratio;try{a.drawImage(Ke.source,te/y,ne/y,Math.min(Ke.source.width,he/y),Math.min(Ke.source.height,se/y),E,qe,Math.min(b.width,Me),Math.min(b.height,_e)),a instanceof ml&&(this.bt=[te/y,ne/y,Math.min(Ke.source.width,he/y),Math.min(Ke.source.height,se/y),E,qe,Math.min(b.width,Me),Math.min(b.height,_e)])}catch(Ot){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,qe,Math.min(b.width,Me),Math.min(b.height,_e)),a instanceof ml&&(this.bt=[te,ne,he,se,E,qe,Math.min(b.width,Me),Math.min(b.height,_e)])}catch(Ot){this.en=!1}switch(this.flip){case si:a.scale(-1,1),a.translate(-Math.min(b.width,Me),0);break;case Kr:a.scale(1,-1),a.translate(0,-Math.min(b.height,_e));break;case Hi:a.scale(-1,-1),a.translate(-Math.min(b.width,Me),-Math.min(b.height,_e))}}}}},Ws.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=Us(this,!0),ne=this.Eg,se=this.qn,he=0,ge=0;(se||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(he=se?+ne.width:ne.naturalWidth,ge=se?+ne.height:ne.naturalHeight),isFinite(E.width)||te===wn||te===ir?(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===wn||te===vr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=ge)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ge),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,te=this.minSize,x=Math.max(x||0,te.width),b=Math.max(b||0,te.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Da(this.dc,a,y),this.Ge(0,0,a,y)},Ws.prototype.eh=function(a,y,x,b){ms(this,a,y,x,b)},cn.Object.defineProperties(Ws.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||$t("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Jp(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new bn),b!==null&&x&&$c(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()||(ca(this,!1),this.v())):x&&M1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=dp;if(Uo){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Gm&&(pp(),x=dp),b=Wn("img"),b.hn=!0,M1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Gm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new T1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),Ws.prototype.redraw=Ws.prototype.redraw,Ws.prototype.reloadSource=Ws.prototype.hA;var Gm=0,wx=4;Ws.className="Picture",dp=new xr,Ws.clearCache=pp;function T1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new iu(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))}T1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function gp(){this.os=new jn,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new jn,this.mc=null};function mp(a,y,x,b,E,te){a.mc=new pa,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=te||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}gp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new ci(ua);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},gp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new ci(eo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function yc(a,y,x,b,E,te,ne){var se;se===void 0&&(se=!1);var he=new ci(Ra);he.point1X=y,he.point1Y=x,he.point2X=b,he.point2Y=E,he.endX=te,he.endY=ne,se&&he.close(),a.mc.segments.add(he)}function Um(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new ci($s);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}gp.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var se=new ci(Qo);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 ci(cl,ne,se,y,x,b,E,te),he&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Hm;return y!==null?(Hm=null,y.reset(a),y):(y=new gp,y.reset(a),y)}var Hm=null;gp.className="StreamGeometryContext";function ls(a,y){var x=a.toLowerCase(),b=Ht.Ze;b[a]=y,b[x]=a}ls("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Ht.Mf[a];return b!==void 0||(b=new jn(jn.u),b.endX=y,b.endY=x,Ht.Nf<Ht.vm&&(Ht.Mf[a]=b,Ht.Nf++)),b}),ls("Square",function(a,y,x){a="s"+y+","+x;var b=Ht.Mf[a];return b!==void 0||(b=new jn(jn.u),b.endX=y,b.endY=x,b.defaultStretch=qn,Ht.Nf<Ht.vm&&(Ht.Mf[a]=b,Ht.Nf++)),b}),ls("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=Ht.Mf[b];if(E!==void 0)return E;var te=a*Ht.wg;return E=new jn().add(new pa(a,0,!0).add(new ci(eo,y-a,0)).add(new ci(Ra,y,a,y-te,0,y,te)).add(new ci(eo,y,x-a)).add(new ci(Ra,y-a,x,y,x-te,y-te,x)).add(new ci(eo,a,x)).add(new ci(Ra,0,x-a,te,x,0,x-te)).add(new ci(eo,0,a)).add(new ci(Ra,a,0,0,te,te,0).close())),1<te&&(E.spot1=new ar(0,0,te,te),E.spot2=new ar(1,1,-te,-te)),Ht.Nf<Ht.vm&&(Ht.Mf[b]=E,Ht.Nf++),E}),ls("Border","RoundedRectangle"),ls("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Ht.Mf[a];return b!==void 0||(b=new jn(jn.F),b.endX=y,b.endY=x,b.spot1=zc,b.spot2=El,Ht.Nf<Ht.vm&&(Ht.Mf[a]=b,Ht.Nf++)),b}),ls("Circle",function(a,y,x){a="c"+y+","+x;var b=Ht.Mf[a];return b!==void 0||(b=new jn(jn.F),b.endX=y,b.endY=x,b.spot1=zc,b.spot2=El,b.defaultStretch=qn,Ht.Nf<Ht.vm&&(Ht.Mf[a]=b,Ht.Nf++)),b}),ls("TriangleRight",function(a,y,x){return new jn().add(new pa(0,0).add(new ci(eo,y,.5*x)).add(new ci(eo,0,x).close())).pm(0,.25,.5,.75)}),ls("TriangleDown",function(a,y,x){return new jn().add(new pa(0,0).add(new ci(eo,y,0)).add(new ci(eo,.5*y,x).close())).pm(.25,0,.75,.5)}),ls("TriangleLeft",function(a,y,x){return new jn().add(new pa(y,x).add(new ci(eo,0,.5*x)).add(new ci(eo,y,0).close())).pm(.5,.25,1,.75)}),ls("TriangleUp",function(a,y,x){return new jn().add(new pa(y,x).add(new ci(eo,0,x)).add(new ci(eo,.5*y,0).close())).pm(.25,.5,.75,1)}),ls("Triangle","TriangleUp"),ls("Diamond",function(a,y,x){return new jn().add(new pa(.5*y,0).add(new ci(eo,0,.5*x)).add(new ci(eo,.5*y,x)).add(new ci(eo,y,.5*x).close())).pm(.25,.25,.75,.75)}),ls("LineH",function(a,y,x){return a=new jn(jn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ls("LineV",function(a,y,x){return a=new jn(jn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ls("None","Rectangle"),ls("BarH","Rectangle"),ls("BarV","Rectangle"),ls("MinusLine","LineH"),ls("PlusLine",function(a,y,x){return new jn().add(new pa(0,x/2,!1).add(new ci(eo,y,x/2)).add(new ci(ua,y/2,0)).add(new ci(eo,y/2,x)))}),ls("XLine",function(a,y,x){return new jn().add(new pa(0,x,!1).add(new ci(eo,y,0)).add(new ci(ua,0,0)).add(new ci(eo,y,x)))}),ls("LineRight",function(a,y,x){return new jn().add(new pa(.25*y,0,!1).add(new ci(eo,.75*y,.5*x)).add(new ci(eo,.25*y,x)))}),ls("LineDown",function(a,y,x){return new jn().add(new pa(0,.25*x,!1).add(new ci(eo,.5*y,.75*x)).add(new ci(eo,y,.25*x)))}),ls("LineLeft",function(a,y,x){return new jn().add(new pa(.75*y,0,!1).add(new ci(eo,.25*y,.5*x)).add(new ci(eo,.75*y,x)))}),ls("LineUp",function(a,y,x){return new jn().add(new pa(0,.75*x,!1).add(new ci(eo,.5*y,.25*x)).add(new ci(eo,y,.75*x)))}),Ht.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function D0(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Fa,this.ir=null,this.jr="",this.lr=za,this.Gq="",this.Hq=La,this.Pq=Ir,this.Kq=gi,this.Up=null,this.Cq=127,this.zr=oo,this.yr="gray",this.Vg=4}D0.prototype.copy=function(){var a=new D0;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function ur(a,y){a===void 0||a instanceof ma||typeof a=="string"?Cn.call(this,a):(Cn.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 Et(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new on,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Vt(ur,Cn),ur.prototype.cloneProtected=function(a){Cn.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},Qe=ur.prototype,Qe.Af=function(a){Cn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Qe.toString=function(){var a=Ar(this.constructor)+"#"+Zt(this);return this.data!==null&&(a+="("+ii(this.data)+")"),a};function Ks(a){a.P===null?a.P=new D0:a.P.nc&&(a.P=a.P.copy())}Qe.th=function(){Cn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Qe.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===Xo&&y==="elements"?E instanceof Cn?Uf(E,function(he){ly(se.partManager,he),Ff(se,he)}):$c(se,E):a===oa&&y==="elements"&&(E instanceof Cn?Uf(E,function(he){uy(se.partManager,he,se)}):Jp(se,E)),se.cb(a,y,x,b,E,te,ne))},Qe.La=function(a){if(Cn.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 Cn&&Uf(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},ur.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},ur.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},ur.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 Kn),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)))}}},ur.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)}},ur.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=sr();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);dr(y)}},ur.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 Fr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof di))break e;ou(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Cn.Link),x.adornedObject=y)}if(x!==null){x.type===Cn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},ur.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function R0(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 Wm(a){if(ef(a)===!1){I0(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function j1(a){if(a.G|=2097152,ef(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=on.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),on.free(b),I0(a,!1)}}ur.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new Wr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},ur.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=vi;this.locationSpot.sb()&&(te=this.locationSpot);var ne=Et.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),Et.free(ne)}},ur.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},ur.prototype.moveTo=function(a,y,x){a=Et.allocAt(a,y),this.move(a,x),Et.free(a)},ur.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())},ur.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())},ur.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Kn),y.I(a)!==null)return y.I(a);var x=Cn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Sc(a,y,x,b){b===void 0&&(b=new Et),x=x.Mc()?vi: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}ur.prototype.mi=function(a){return a===void 0&&(a=new on),a.assign(this.actualBounds)},ur.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=Et.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 Kf(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}ur.prototype.arrange=function(){if(Ms(this)===!1)j1(this);else{vh(this,!1);var a=this.Ib,y=on.alloc();y.assign(a);var x=tf(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()||Ht.B(y.width,a.width)&&Ht.B(y.height,a.height)||0<=this.vw&&this.C(16),on.free(y),I0(this,!1)}},Qe=ur.prototype,Qe.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=on.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),on.free(E)}!(this.G&65536)&&a.D(y)||I1(this,b,x),x.N(),!a.w()&&!y.w()||yo(a,y)||(this instanceof Un&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Qe.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 Et(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),ef(this)===!1&&Ms(this)===!1&&(Wm(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof di||(y=y.animationManager,y.zb&&Rh(y,a,new Et(b,E),x))}Qe.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;ef(this)||Ms(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)}Wm(this)},Qe.Av=function(){this.G&=-2097153,Wm(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?R1(a,y,x,E,b):B1(a,y,x,E,b):te?R1(a,y,x,E,b):ne&&B1(a,y,x,E,b),a.G|=2097152,Et.free(b),a.Uk()}function R1(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||Rh(x,a,new Et(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new Et(te,ne),y.copy()))}function B1(a,y,x,b,E){var te=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(te)||b===null||a.g("location",te,x.copy())}function I1(a,y,x){_0(a,!1),a instanceof Un&&fc(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?tf(a)?(bl(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Qe.si=function(){return!0},Qe.Zc=function(){return!0},Qe.ph=function(){return!1},Qe.Dd=function(){return!0};function B0(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,Nr('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Nr(" Old class: "+Ar(a.constructor)+", new class: "+Ar(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,se=!0,he=!0,ge=!1;a instanceof Un&&(se=a.isTreeLeaf,he=a.isTreeExpanded,ge=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=te?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof Un&&(a.U=se?a.U|4:a.U&-5,a.U=he?a.U|1:a.U&-2,a.U=ge?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}ur.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},ur.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},ur.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},ur.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},ur.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},ur.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},ur.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},ur.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},ur.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 ef(a){return(a.G&32768)!==0}function I0(a,y){a.G=y?a.G|32768:a.G&-32769}function _0(a,y){a.G=y?a.G|65536:a.G&-65537}function tf(a){return(a.G&131072)!==0}Qe=ur.prototype,Qe.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Km(a,y){a.G=y?a.G|1048576:a.G&-1048577}Qe.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Qe.N=function(){var a=this.diagram;a!==null&&!Ms(this)&&!ef(this)&&this.isVisible()&&this.Ib.w()&&a.N(Kf(this,this.Ib))},Qe.v=function(){Cn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Un&&this.labeledLink!==null&&ks(this.labeledLink),a.$b(!0))},Qe.Vo=function(a){a||(a=this.Ah,a!==null&&K0(a,this))},Qe.Wo=function(a){a||(a=this.Ah,a!==null&&V0(a,this))},Qe.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Qe.oz=function(){return z0(this,this)};function z0(a,y){var x=y.containingGroup;return x!==null?1+z0(a,x):y instanceof Un&&(y=y.labeledLink,y!==null)?z0(a,y):0}Qe.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Un&&(x=y.labeledLink,x!==null)?_1(a,x):y}Qe.Td=function(a){return a instanceof Fr?G0(this,this,a):!1};function G0(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!G0(a,b,x)?y instanceof Un&&(y=y.labeledLink,y!==null)?G0(a,y,x):!1:!0}Qe.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Fr&&Km(y,!0),y instanceof Un){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 Un&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Fr&&Km(y,!1),y instanceof Un&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},ur.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Un&&this.isLinkLabel)},ur.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 Un&&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 nf(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 Un){if(x&&y instanceof Fr)for(var ne=y.memberParts;ne.next();)nf(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var se=ne.value;if(!a.contains(se)){var he=se.fromNode,ge=se.toNode;he=he===null||a.contains(he),ge=ge===null||a.contains(ge),(E?he&&ge:he||ge)&&nf(a,se,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)nf(a,y.value,x,b-1,E,te)}else if(y instanceof Ln)for(y=y.labelNodes;y.next();)nf(a,y.value,x,b,E,te)}}cn.Object.defineProperties(ur.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Bi: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(oa,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(Xo,"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&&(Ks(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&&Ju(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!==Cn.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:Ir},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Ks(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:gi},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Ks(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&&(Ks(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:La},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Ks(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,Ms(this)===!1&&(Wm(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&&(ou(x),x=x.copy(),x!==null&&B0(this,x,y,a))):(te!==null&&te.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(ou(x),x=x.copy(),x===null||x instanceof Ln||(b=this.location.copy(),B0(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){B0(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(Ks(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&&(Ks(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&&(Ks(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 Ln?(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&&(Ks(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&&(Ks(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&&(Ks(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:Fa},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Ks(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&&(Ks(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&&(Ks(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:za},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Ks(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&&$t("Cannot make a Group a member of itself: "+this.toString()),$t("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?V0(y,this):this instanceof Fr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?K0(a,this):this instanceof Fr&&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 Fr){for(x=new bn,nf(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Un)for(b=b.linksConnected;b.next();)vp(b.value)}if(this instanceof Un){for(x=this.linksConnected;x.next();)vp(x.value);x=this.labeledLink,x!==null&&vp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Ju(y,-1,a))}}else $t("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&&(Ks(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Un&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Ks(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&&(Ks(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:oo},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Ks(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&&(Ks(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&&(Ks(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),ur.prototype.invalidateLayout=ur.prototype.C,ur.prototype.findCommonContainingGroup=ur.prototype.px,ur.prototype.isMemberOf=ur.prototype.Td,ur.prototype.findTopLevelPart=ur.prototype.sz,ur.prototype.findSubGraphLevel=ur.prototype.oz,ur.prototype.ensureBounds=ur.prototype.Va,ur.prototype.getDocumentBounds=ur.prototype.mi,ur.prototype.findObject=ur.prototype.fb,ur.prototype.moveTo=ur.prototype.moveTo,ur.prototype.invalidateAdornments=ur.prototype.Wb,ur.prototype.clearAdornments=ur.prototype.Ej,ur.prototype.removeAdornment=ur.prototype.Jf,ur.prototype.addAdornment=ur.prototype.bh,ur.prototype.findAdornment=ur.prototype.Pj,ur.prototype.updateTargetBindings=ur.prototype.La;var G1=!1;ur.className="Part",ur.LayoutNone=0,ur.LayoutAdded=1,ur.LayoutRemoved=2,ur.LayoutShown=4,ur.LayoutHidden=8,ur.LayoutNodeSized=16,ur.LayoutGroupLayout=32,ur.LayoutNodeReplaced=64,ur.LayoutStandard=127,ur.LayoutAll=16777215;function di(a,y){a===void 0||a instanceof ma||typeof a=="string"?ur.call(this,a):(ur.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)}Vt(di,ur),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 Ln&&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||!Ms(a))},di.prototype.Zc=function(){return!1},di.prototype.gk=function(a,y,x,b,E,te,ne){if(a===Xo&&y==="elements"){if(E instanceof Ls)this.$a===null&&(this.$a=E);else if(E instanceof Cn){var se=E.Nl(function(he){return he instanceof Ls});se instanceof Ls&&this.$a===null&&(this.$a=se)}}else a===oa&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Cn&&this.$a.rg(b)&&(this.$a=null));ur.prototype.gk.call(this,a,y,x,b,E,te,ne)},di.prototype.updateAdornments=function(){},di.prototype.Lj=function(){},cn.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 U0(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=ic,this.er=Xm,this.Kr=this.ij=this.Nq=this.Mq=null}U0.prototype.copy=function(){var a=new U0;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function Un(a,y){a===void 0||a instanceof ma||typeof a=="string"?ur.call(this,a):(ur.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new kn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Vt(Un,ur),Un.prototype.cloneProtected=function(a){ur.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Qe=Un.prototype,Qe.Af=function(a){ur.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function xc(a){a.Ba===null?a.Ba=new U0:a.Ba.nc&&(a.Ba=a.Ba.copy())}Qe.th=function(){ur.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new bn),a.af.add(y))}function H1(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}Qe.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},Qe.gk=function(a,y,x,b,E,te,ne){a===Xo&&y==="elements"?this.wc=null:a===oa&&y==="elements"&&(this.wc=null),ur.prototype.gk.call(this,a,y,x,b,E,te,ne)},Qe.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(vl(x.fromPort),vl(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(vl(x.fromPort),vl(x.toPort),x.bb())}}function vl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||vl(y.port)}}Qe.si=function(){return!0},Un.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Un.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Un.prototype.isVisible=function(){if(!ur.prototype.isVisible.call(this))return!1;var a=!0,y=pc,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===pc){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===ha){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===np&&(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},Un.prototype.Zb=function(a){ur.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)}},Un.prototype.qx=function(){var a=new bn,y=new bn;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)})}}Un.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Pi(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Qe=Un.prototype,Qe.Mo=function(a){a===void 0&&(a=null);var y=new Pi(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},Qe.Sd=function(a){a===void 0&&(a=null);var y=new Pi(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},Qe.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 bn,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 bn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Mi(x):Bi},Qe.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 bn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Mi(x):Bi},Qe.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 bn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Mi(x):Bi},Qe.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Pi(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},Qe.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Pi(this.jb),E=this;return b.predicate=function(te){return!(te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)},b};function Vm(a,y,x){vl(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 Zm(a,y,x){vl(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)):Sg(y)))}function Sg(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}}}Un.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Qe=Un.prototype,Qe.Vo=function(a){ur.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},Qe.Wo=function(a){ur.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Qe.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,ur.prototype.Lj.call(this)},Qe.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 Kn: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 H0(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=sr()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);dr(x)}}}Qe.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},Qe.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}},Qe.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Km(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)Km(y,!1),y=y.pg();return x},Qe.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},Qe.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Un)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},Qe.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 bn;return a(this,y),y},Qe.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}Qe.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Pi(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},Qe.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 kn,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 kn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Mi(x):Bi},Qe.wz=function(a){a===void 0&&(a=1/0);var y=new bn;return nf(y,this,!1,a,!0),y},Un.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 bn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===pc),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 ge=se.value;if(ge.isTreeLink&&(ge=ge.To(a),ge!==null&&ge!==a)){var ye=y.contains(ge);if(ye||y.add(ge),ne){var Me=x?ge.Oo():ge.Po();he.uv=a,Me.all(function(_e){return function(Ke){return Ke===_e.uv||!Ke.isTreeExpanded}}(he))&&b.Aj(ge,E),ge.oh(),ge.Zb(!1)}ge.isTreeExpanded&&(ge.wasTreeExpanded=ge.isTreeExpanded,ye||$1(ge,y,x,b,E,te))}he={uv:he.uv}}a.isTreeExpanded=!1}Un.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 bn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===pc),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(),ge={};he.next();){var ye=he.value;if(ye.isTreeLink&&(se||ye.fd||ye.bb(),ye=ye.To(a),ye!==null&&ye!==a&&!y.contains(ye))){if(y.add(ye),!se){ye.Zb(!0),ye.oh();var Me=x?ye.Oo():ye.Po();ge.vv=a,Me.all(function(_e){return function(Ke){return Ke===_e.vv||!Ke.isTreeExpanded}}(ge))&&E.Cj(ye,te)}(2<b||ye.wasTreeExpanded)&&(ye.wasTreeExpanded=!1,J1(ye,y,x,b-1,E,te,ne))}ge={vv:ge.vv}}a.isTreeExpanded=!0}cn.Object.defineProperties(Un.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Xm},set:function(a){var y=this.portSpreading;y!==a&&(xc(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&fc(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:ic},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),xc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&fc(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(xc(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(xc(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(xc(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,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),ks(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&&(xc(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),Un.prototype.expandTree=Un.prototype.expandTree,Un.prototype.collapseTree=Un.prototype.collapseTree,Un.prototype.findTreeParts=Un.prototype.wz,Un.prototype.findTreeChildrenNodes=Un.prototype.Ou,Un.prototype.findTreeChildrenLinks=Un.prototype.Qo,Un.prototype.findTreeLevel=Un.prototype.uz,Un.prototype.findTreeParentChain=Un.prototype.vz,Un.prototype.findTreeParentNode=Un.prototype.pg,Un.prototype.findTreeParentLink=Un.prototype.kh,Un.prototype.findCommonTreeParent=Un.prototype.gz,Un.prototype.findTreeRoot=Un.prototype.xz,Un.prototype.isInTreeOf=Un.prototype.Nz,Un.prototype.findPort=Un.prototype.ns,Un.prototype.findLinksTo=Un.prototype.kz,Un.prototype.findLinksBetween=Un.prototype.jz,Un.prototype.findNodesInto=Un.prototype.Oo,Un.prototype.findNodesOutOf=Un.prototype.Po,Un.prototype.findNodesConnected=Un.prototype.Mu,Un.prototype.findLinksInto=Un.prototype.Sd,Un.prototype.findLinksOutOf=Un.prototype.Mo,Un.prototype.findExternalTreeLinksConnected=Un.prototype.qx,Un.prototype.invalidateConnectedLinks=Un.prototype.Bd,Un.prototype.invalidateLinkBundle=Un.prototype.Lz;var Ex=new tn(Un,"SpreadingNone",10),Xm=new tn(Un,"SpreadingEvenly",11),W0=new tn(Un,"SpreadingPacked",12);Un.className="Node",Un.SpreadingNone=Ex,Un.SpreadingEvenly=Xm,Un.SpreadingPacked=W0;function Fr(a,y){a===void 0||a instanceof ma||typeof a=="string"?Un.call(this,a):(Un.call(this),a&&(y=a)),this.U|=4608,this.Gn=new bn,this.$a=null,this.Sc=new ko,this.Sc.group=this,this.gl=new bn,this.tb=this.$p=null,y&&Object.assign(this,y)}Vt(Fr,Un),Fr.prototype.cloneProtected=function(a){Un.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ls});y instanceof Ls?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())},Qe=Fr.prototype,Qe.Af=function(a){Un.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 Un)x.Bd(y);else if(x instanceof Ln)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Qe.gk=function(a,y,x,b,E,te,ne){if(a===Xo&&y==="elements"){if(E instanceof Ls)this.$a===null?this.$a=E:this.$a!==E&&$t("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Cn){var se=E.Nl(function(he){return he instanceof Ls});se instanceof Ls&&(this.$a===null?this.$a=se:this.$a!==se&&$t("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===oa&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Cn&&this.$a.rg(b)&&(this.$a=null));Un.prototype.gk.call(this,a,y,x,b,E,te,ne)},Qe.Xl=function(a,y){Un.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Cn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Cn&&(a=a.Pb()),this.tb===null&&(this.tb=new on),a.mi(this.tb),a instanceof Br&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Qe.eh=function(a,y,x,b){this.nf=this.$a,Un.prototype.eh.call(this,a,y,x,b)},Qe.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Ln||y.Va()}),Un.prototype.Va.call(this)},Qe.si=function(){if(!Un.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Un){if(y.isVisible()&&Ms(y))return!1}else if(y instanceof Ln&&y.isVisible()&&Ms(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function K0(a,y){if(a.Gn.add(y)){y instanceof Fr&&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 Ln&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function V0(a,y){if(a.Gn.remove(y)){y instanceof Fr&&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 Ln&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Qe.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)}Un.prototype.Lj.call(this)},Fr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=rn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Fr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=rn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},Fr.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))},Qe=Fr.prototype,Qe.Bd=function(a){var y=(this.U&65536)!==0;if(Un.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()?(vl(x.fromPort),vl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(vl(x.fromPort),vl(x.toPort),x.bb()))}}},Qe.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 bn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Un)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},Qe.iz=function(){var a=this.Rj();a.add(this);for(var y=new bn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Un)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},Qe.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new bn;return a(this,y),y},Qe.Rj=function(){var a=new bn;return nf(a,this,!0,0,!0),a.remove(this),a},Qe.Zb=function(a){Un.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Fr.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 Fr&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof Un)te.Bd(y),x.Aj(te,b);else if(te instanceof Ln)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}Fr.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 Fr&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof Un)te.Bd(y),x.Cj(te,b);else if(te instanceof Ln)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}Fr.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=Et.alloc(),Un.prototype.move.call(this,a,y),a=new bn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Ln&&(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 Un&&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 Ln&&(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(),X0(E)&&E.bb());Et.free(te)}},cn.Object.defineProperties(Fr.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&&$t("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(xc(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(xc(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(xc(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var 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&&(xc(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),Fr.prototype.expandSubGraph=Fr.prototype.expandSubGraph,Fr.prototype.collapseSubGraph=Fr.prototype.collapseSubGraph,Fr.prototype.findSubGraphParts=Fr.prototype.Rj,Fr.prototype.findContainingGroupChain=Fr.prototype.hz,Fr.prototype.findExternalNodesConnected=Fr.prototype.iz,Fr.prototype.findExternalLinksConnected=Fr.prototype.Lu,Fr.prototype.ensureBounds=Fr.prototype.Va,Fr.className="Group";function Ls(a){zt.call(this),this.yb=xs,this.ko=new on(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Vt(Ls,zt),Ls.prototype.cloneProtected=function(a){zt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ls.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return ia(0,0,y.width,y.height,a.x,a.y)},Ls.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Fr||a instanceof di)||$t("Placeholder is not inside a Group or Adornment."),a instanceof Fr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Da(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=Et.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Et.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,ge=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==Cn.Link&&(se=te.ga(a.category==="Selection"?La:a.locationSpot,Et.alloc()),a.location=se,Et.free(se)),isNaN(ge)||isNaN(ne)?(a=te.ga(La,Et.alloc()),ge=on.allocAt(a.x,a.y,0,0),ge.Ye(te.ga(Ys,a)),ge.Ye(te.ga(Ca,a)),ge.Ye(te.ga(us,a)),Da(y,ge.width+b||0,ge.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Et.free(a),on.free(ge)):(Da(y,ge+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ls.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Ls.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Fr&&!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=on.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof Fr&&!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)),on.free(x),b&&y instanceof Fr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ls.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Fr))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 Ln&&(!y.computesBoundsIncludingLinks||jl(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},cn.Object.defineProperties(Ls.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ls.className="Placeholder";function Ln(a){ur.call(this,Cn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Ns,this.Om=0,this.Qm=Ns,this.Rm=NaN,this.qj=J0,this.po=.5,this.wd=null,this.Nb=new kn().freeze(),this.Tg=this.Mg=null,this.ml=new on,this.ua=new jn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Et,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Vt(Ln,ur),Ln.prototype.cloneProtected=function(a){ur.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())},Qe=Ln.prototype,Qe.Af=function(a){ur.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&&vl(y),a=a.toPort,a!==null&&vl(a)},Qe.qb=function(a){a.classType===Ln?(a.value&2)===2?this.routing=a:a===Fl||a===Pc||a===Sp?this.curve=a:a===Pg||a===ev||a===tv?this.adjusting=a:a!==J0&&a!==Ns&&$t("Unknown Link enum value for a Link property: "+a):ur.prototype.qb.call(this,a)},Qe.Xc=function(){this.ba===null&&(this.ba=new lg)},Qe.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ms(a)||ef(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ms(a)||ef(a)))},Qe.zv=function(){return!1},Qe.Av=function(){},Qe.Zc=function(){return!1},Ln.prototype.computeAngle=function(a,y,x){return Ln.computeAngle(y,x)},Ln.computeAngle=function(a,y){switch(a){default:case Ns:a=0;break;case bg:a=y;break;case Cg:a=y+90;break;case Eg:a=y-90;break;case Q0:a=y+180;break;case nv:a=Ht.bp(y),90<a&&270>a&&(a-=180);break;case kg:a=Ht.bp(y+90),90<a&&270>a&&(a-=180);break;case Mg:a=Ht.bp(y-90),90<a&&270>a&&(a-=180);break;case rv:if(a=Ht.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Ht.bp(a)};function vp(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&V0(x,a),a.Ah=y,y!==null&&K0(y,a);var E=a.containingGroupChanged;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=te)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}Qe=Ln.prototype,Qe.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&ur.prototype.oh.call(this)},Qe.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Qe.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new bn),a.wd.add(y),a.v()}Qe.Vo=function(a){if(ur.prototype.Vo.call(this,a),Vf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Vm(x,this,b)}xg(this)}},Qe.Wo=function(a){if(ur.prototype.Wo.call(this,a),Vf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Zm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Zm(x,this,b)}wg(this)}},Qe.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))},Ln.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Ln.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?ur.prototype.move.call(this,a,!1):(a=Et.allocAt(x.x+b,x.y+E),ur.prototype.move.call(this,a,!1),Et.free(a)),wc(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Ln.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},Ln.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},Ln.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Yi),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()===Fl))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()===Fl){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Ht.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),Ht.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},Ln.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()===Fl))return this.ua.wx(.5);if(this.computeCurve()===Fl&&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),Ht.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)},Qe=Ln.prototype,Qe.i=function(a){return this.Nb.s[a]},Qe.dd=function(a,y){this.Nb.cd(a,y)},Qe.L=function(a,y,x){this.Nb.cd(a,new Et(y,x))},Qe.Kz=function(a,y){this.Nb.Gb(a,y)},Qe.m=function(a,y,x){this.Nb.Gb(a,new Et(y,x))},Qe.ne=function(a){this.Nb.add(a)},Qe.yf=function(a,y){this.Nb.add(new Et(a,y))},Qe.pv=function(a){this.Nb.mb(a)},Qe.Fj=function(){this.Nb.clear()};function wc(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 kn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new Et(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),ks(a)),b?Ym(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ju(ne.animationManager,a,E),a.g("points",te,E)}}Qe.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Qe.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x=Math.min(se.x,x),b=Math.min(se.y,b)}se=ne=1/0;for(var he=y.s,ge=he.length,ye=0;ye<ge;ye++){var Me=he[ye];ne=Math.min(Me.x,ne),se=Math.min(Me.y,se),Me.freeze()}if(y.freeze(),ge===te){for(te=0;te<ge;te++)if(ye=E[te],Me=he[te],ye.x-x!==Me.x-ne||ye.y-b!==Me.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ju(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},Qe.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Ym(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),qm(a,!1))}Qe.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())}},Qe.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()}}},Ln.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kd||(kd=new Un,kd.desiredSize=Hr,kd.Va()),this.defaultFromPoint&&(kd.location=this.defaultFromPoint,kd.Va(),y=a=kd)):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?(Md||(Md=new Un,Md.desiredSize=Hr,Md.Va()),this.defaultToPoint&&(Md.location=this.defaultToPoint,Md.Va(),E=b=Md)):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=yp(ne),he=yp(x),ge=y===E&&y!==null,ye=this.isOrthogonal,Me=this.curve===Fl;this.Wf=ge&&!ye?Me=!0:!1;var _e=this.computeAdjusting()===Ns||ge;if(!ye&&!ge&&se&&he){if(se=!1,!_e&&3<=te&&(_e=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),se=this.adjustPoints(0,_e,te-1,he))&&(_e=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,_e,te-1,he)),!se)if(this.Fj(),Me){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),_e=this.getLinkPoint(b,E,x,!1,!1,a,y),se=_e.x-te.x,he=_e.y-te.y,ge=this.computeCurviness(),Me=ye=0;var Ke=te.x+se/3,qe=te.y+he/3,rt=Ke,Mt=qe;Ht.B(he,0)?Mt=0<se?Mt-ge:Mt+ge:(ye=-se/he,Me=Math.sqrt(ge*ge/(ye*ye+1)),0>ge&&(Me=-Me),rt=(0>he?-1:1)*Me+Ke,Mt=ye*(rt-Ke)+qe),Ke=te.x+2*se/3,qe=te.y+2*he/3;var xt=Ke,At=qe;Ht.B(he,0)?At=0<se?At-ge:At+ge:(xt=(0>he?-1:1)*Me+Ke,At=ye*(xt-Ke)+qe),this.Fj(),this.ne(te),this.yf(rt,Mt),this.yf(xt,At),this.ne(_e),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,_e=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,_e),E=this.getLinkPoint(te,_e,x,!1,!1,a,y),this.hasCurviness()?(_e=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+_e/2,y=b.y+x/2,te=a,se=y,Ht.B(x,0)?se=0<_e?se-ne:se+ne:(_e=-_e/x,te=Math.sqrt(ne*ne/(_e*_e+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,se=_e*(te-a)+y),this.ne(b),this.yf(te,se),this.ne(E)):(this.ne(b),this.ne(E),se=on.alloc(),y.mi(se),he=se.ca(E),_e.mi(se),ge=se.ca(b),(he||ge)&&(ne=y.ga(Jm(ne),new Et),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=_e.ga(Jm(x),new Et),this.dd(1,this.getLinkPointFromPoint(te,_e,x,b,!1,x))),on.free(se))}else{Me=this.isAvoiding,_e&&(ye&&Me||ge)&&this.Fj();var Ot=ge?this.computeCurviness():0;Me=this.getLinkPoint(a,y,ne,!0,ye,b,E),Ke=rt=qe=0,(ye||!se||ge)&&(Mt=this.computeEndSegmentLength(a,y,ne,!0),Ke=this.getLinkDirection(a,y,Me,ne,!0,ye,b,E),ge&&(se||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ke-=ye?90:30,0>Ot&&(Ke-=180)),0>Ke?Ke+=360:360<=Ke&&(Ke-=360),ge&&(Mt+=Math.abs(Ot)*(ye?1:2)),Ke===0?qe=Mt:Ke===90?rt=Mt:Ke===180?qe=-Mt:Ke===270?rt=-Mt:(qe=Mt*Math.cos(Ke*Math.PI/180),rt=Mt*Math.sin(Ke*Math.PI/180)),ne.Mc()&&ge&&(Mt=y.ga(vi,Et.alloc()),xt=Et.allocAt(Mt.x+1e3*qe,Mt.y+1e3*rt),this.getLinkPointFromPoint(a,y,Mt,xt,!0,Me),Et.free(Mt),Et.free(xt))),Mt=this.getLinkPoint(b,E,x,!1,ye,a,y);var Dt=At=xt=0;if(ye||!he||ge){var _t=this.computeEndSegmentLength(b,E,x,!1);Dt=this.getLinkDirection(b,E,Mt,x,!1,ye,a,y),ge&&(he||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Dt+=ye?0:30,0>Ot&&(Dt+=180)),0>Dt?Dt+=360:360<=Dt&&(Dt-=360),ge&&(_t+=Math.abs(Ot)*(ye?1:2)),Dt===0?xt=_t:Dt===90?At=_t:Dt===180?xt=-_t:Dt===270?At=-_t:(xt=_t*Math.cos(Dt*Math.PI/180),At=_t*Math.sin(Dt*Math.PI/180)),x.Mc()&&ge&&(x=E.ga(vi,Et.alloc()),ne=Et.allocAt(x.x+1e3*xt,x.y+1e3*At),this.getLinkPointFromPoint(b,E,x,ne,!1,Mt),Et.free(x),Et.free(ne))}x=Me,(ye||!se||ge)&&(x=new Et(Me.x+qe,Me.y+rt)),ne=Mt,(ye||!he||ge)&&(ne=new Et(Mt.x+xt,Mt.y+At)),!_e&&!ye&&se&&3<te&&this.adjustPoints(0,Me,te-2,ne)?this.dd(te-1,Mt):!_e&&!ye&&he&&3<te&&this.adjustPoints(1,x,te-1,Mt)?this.dd(0,Me):!_e&&(ye?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Me),this.dd(te-1,Mt)):(this.Fj(),this.ne(Me),(ye||!se||ge)&&this.ne(x),ye&&this.addOrthoPoints(x,Ke,ne,Dt,a,b),(ye||!he||ge)&&this.ne(ne),this.ne(Mt))}return!0};function Z0(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}Ln.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new Et),a===null||y===null)return te.assign(x),te;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var se=-a.m12*E,he=-a.m21*E,ge=a.m11*E,ye=E*(a.m21*a.dy-a.m22*a.dx),Me=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+ye,b=b.x*se+b.y*ge+Me,ne=x.x*ne+x.y*he+ye,x=x.x*se+x.y*ge+Me}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function $m(a,y){var x=y.Zn;return x===null&&(x=new Td,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Ln.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,se){if(se===void 0&&(se=new Et),x.sb()&&!yp(x))return y.ga(x,se),se;if(x.$c()){var he=$m(this,y);if(he!==null){if(se.assign(he.Zo),E&&this.routing===nS){var ge=$m(this,ne);if(ge!==null&&he.Gl<ge.Gl){he=Et.alloc(),ge=Et.alloc();var ye=new on(y.ga(La,he),y.ga(Ys,ge)),Me=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Me,!b,E,a,y,ge),(x.Hf(oc)||x.Hf(Is))&&a.y>=ye.y&&a.y<=ye.y+ye.height?se.y=a.y:(x.Hf(lh)||x.Hf(Jl))&&a.x>=ye.x&&a.x<=ye.x+ye.width&&(se.x=a.x),Et.free(he),Et.free(ge)}}return se}}return x=y.ga(Jm(x),Et.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Z0(x,ne.copy()))):(he=this.computeSpot(!b,ne),te=Et.alloc(),ne=ne.ga(Jm(he),te),E&&(ne=Z0(x,ne)),Et.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),Et.free(x),se},Ln.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=$m(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(vi,Et.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?Z0(he,se.copy()):x):(x=Et.alloc(),se=se.ga(vi,x),Et.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,Et.free(he),he=x}return b.Mc()&&ne.Td(a)&&(he+=180,360<=he&&(he-=360)),yp(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},Ln.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=$m(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)},Ln.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=vi:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===za?ba:y)):(a=y||this.toPort,a===null?a=vi:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===za?ba:y)),a};function yp(a){return a===ba||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:vi}Ln.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ns&&4<this.pointsCount?this.computeMidPoint(new Et):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(vi))},Ln.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},Ln.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Wr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return v0(this,y,x,E),te===void 0&&Wr.free(ne),!0;if(this.Yc(a,ne)){var se=!1;if(!this.isAtomic)for(var he=this.O.s,ge=he.length;ge--;){var ye=he[ge];if(ye.visible||ye===this.locationObject){var Me=ye.actualBounds,_e=this.naturalBounds;if(!(Me.x>_e.width||Me.y>_e.height||0>Me.x+Me.width||0>Me.y+Me.height)){if(Me=Wr.alloc(),Me.set(ne),ye instanceof Cn)se=ye.Cf(a,y,x,b,E,Me);else if(this.path===ye){if(ye instanceof Br)if(se=a,_e=b,ye.pickable===!1)se=!1;else if(Me.multiply(ye.transform),_e)e:{var Ke=se,qe=Me;if(ye.fh(Ke,qe))se=!0;else{if(qe===void 0&&(qe=ye.transform,Ke.Re(ye.actualBounds))){se=!0;break e}se=Ke.left,_e=Ke.right;var rt=Ke.top;Ke=Ke.bottom;var Mt=Et.alloc(),xt=Et.alloc(),At=Et.alloc(),Ot=Wr.alloc();Ot.set(qe),Ot.bv(ye.transform),Ot.Vj(),xt.x=_e,xt.y=rt,xt.transform(Ot),Mt.x=se,Mt.y=rt,Mt.transform(Ot),qe=!1,Wf(ye,Mt,xt,At)?qe=!0:(Mt.x=_e,Mt.y=Ke,Mt.transform(Ot),Wf(ye,Mt,xt,At)?qe=!0:(xt.x=se,xt.y=Ke,xt.transform(Ot),Wf(ye,Mt,xt,At)?qe=!0:(Mt.x=se,Mt.y=rt,Mt.transform(Ot),Wf(ye,Mt,xt,At)&&(qe=!0)))),Wr.free(Ot),Et.free(Mt),Et.free(xt),Et.free(At),se=qe}}else se=ye.fh(se,Me)}else se=ka(ye,a,b,Me);se&&(_e=ye,y!==null&&(_e=y(ye)),_e&&(x===null||x(_e))&&E.add(_e)),Wr.free(Me)}}}return te===void 0&&Wr.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&Wr.free(ne),!1},Ln.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?Fl:this.curve},Ln.prototype.computeCorner=function(){if(this.curve===Fl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Ln.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},Ln.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===bg||b===nv||b===Q0?a=Math.max(a,E):b===Eg||b===Mg||b===Cg||b===kg?a=Math.max(a,ne):(y=y.ga(vi).ab(x.ga(vi))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Fl&&(a*=1.333)}}return a},Ln.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Ns&&x.bb()}},Ln.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=sr(),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),dr(x)}}return a},Ln.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Ln.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Ln.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===ev)return!1;E===tv&&(E=Pg)}switch(E){case ev:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var se=ne.x-E,he=ne.y-te,ge=Math.sqrt(se*se+he*he);if(!Ht.$(ge,0)){if(Ht.$(se,0))var ye=0>he?-Math.PI/2:Math.PI/2;else ye=Math.atan(he/Math.abs(se)),0>se&&(ye=Math.PI-ye);ne=y.x;var Me=y.y;se=b.x-ne;var _e=b.y-Me;for(he=Math.sqrt(se*se+_e*_e),Ht.$(se,0)?_e=0>_e?-Math.PI/2:Math.PI/2:(_e=Math.atan(_e/Math.abs(se)),0>se&&(_e=Math.PI-_e)),ge=he/ge,ye=_e-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),Ht.$(y,0)||(Ht.$(se,0)?he=0>he?-Math.PI/2:Math.PI/2:(he=Math.atan(he/Math.abs(se)),0>se&&(he=Math.PI-he)),se=he+ye,y*=ge,this.L(a,ne+y*Math.cos(se),Me+y*Math.sin(se)));this.dd(x,b)}}return!0;case tv:if(te=this.i(a),Me=this.i(x),!te.Xa(y)||!Me.Xa(b)){E=te.x,te=te.y,ne=Me.x,Me=Me.y,ge=(ne-E)*(ne-E)+(Me-te)*(Me-te),se=y.x,ye=y.y,he=b.x,_e=b.y;var Ke=1;if(he-se!==0){var qe=(_e-ye)/(he-se);Ke=Math.sqrt(1+1/(qe*qe))}else qe=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var rt=y.x,Mt=y.y,xt=.5;ge!==0&&(xt=((E-rt)*(E-ne)+(te-Mt)*(te-Me))/ge);var At=E+xt*(ne-E),Ot=te+xt*(Me-te);y=Math.sqrt((rt-At)*(rt-At)+(Mt-Ot)*(Mt-Ot)),Mt<qe*(rt-At)+Ot&&(y=-y),0<qe&&(y=-y),rt=se+xt*(he-se),xt=ye+xt*(_e-ye),qe!==0?(y=rt+y/Ke,this.L(a,y,xt-(y-rt)/qe)):this.L(a,rt,xt+y)}this.dd(x,b)}return!0;case Pg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),se=te.x,ye=te.y,Me=se,ge=ye,Ht.B(E.y,te.y)?Ht.B(te.x,ne.x)?ye=y.y:Ht.B(te.y,ne.y)&&(se=y.x):Ht.B(E.x,te.x)&&(Ht.B(te.y,ne.y)?se=y.x:Ht.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,_e=ye,Ht.B(E.y,te.y)?Ht.B(te.x,ne.x)?ye=b.y:Ht.B(te.y,ne.y)&&(se=b.x):Ht.B(E.x,te.x)&&(Ht.B(te.y,ne.y)?se=b.x:Ht.B(te.x,ne.x)&&(ye=b.y)),this.L(x-1,se,ye),X0(this))){this.L(a+1,Me,ge),this.L(x-1,he,_e),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Ln.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(Tg,Tg),he.Bc(Tg,Tg),se.Ye(a),he.Ye(x);var ge=Et.alloc(),ye=Et.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&he.right>a.x||b===90&&x.y>a.y&&he.right>a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===180?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x<he.left?this.computeMidOrthoPosition(a.x,a.y,he.left,x.y,!1):a.x<he.right&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.right,ye.x=ge.x,ye.y=x.y):b===0&&a.x<he.left&&a.y>he.top&&a.y<he.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===180&&(he.ca(a)||se.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?ge.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===180||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>se.top&&ge.y<se.bottom&&(x.x>=se.left&&x.x<=a.x||a.x<=he.right&&a.x>=x.x?(b===90||b===270)&&(ge.h(Math.max((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===0?se.bottom:Math.max(se.bottom,he.bottom)),ye.x=x.x,ye.y=ge.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&he.left<a.x||b===90&&x.y>a.y&&he.left<a.x?(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===0?(ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=ge.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(ge.x=a.x>he.right?this.computeMidOrthoPosition(a.x,a.y,he.right,x.y,!1):a.x>he.left&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.left,ye.x=ge.x,ye.y=x.y):b===180&&a.x>he.right&&a.y>he.top&&a.y<he.bottom&&(ge.x=a.x,ge.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=ge.y)):(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===0&&(he.ca(a)||se.ca(x))?ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?ge.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===0||b===270)&&(ge.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=ge.y),ge.y>se.top&&ge.y<se.bottom&&(x.x<=se.right&&x.x>=a.x||a.x>=he.left&&a.x<=x.x?(b===90||b===270)&&(ge.h(Math.min((a.x+x.x)/2,a.x),a.y),ye.h(ge.x,x.y)):(ge.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===180?se.bottom:Math.max(se.bottom,he.bottom)),ye.x=x.x,ye.y=ge.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&he.bottom>a.y||b===0&&x.x>a.x&&he.bottom>a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===270?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(ge.y=a.y<he.top?this.computeMidOrthoPosition(a.x,a.y,x.x,he.top,!0):a.y<he.bottom&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.bottom,ye.x=x.x,ye.y=ge.y):b===90&&a.y<he.top&&a.x>he.left&&a.x<he.right&&(ge.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===270&&(he.ca(a)||se.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?ge.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(ge.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>se.left&&ge.x<se.right&&(x.y>=se.top&&x.y<=a.y||a.y<=he.bottom&&a.y>=x.y?(b===0||b===180)&&(ge.h(a.x,Math.max((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===90?se.right:Math.max(se.right,he.right)),ye.x=ge.x,ye.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&he.top<a.y||b===0&&x.x>a.x&&he.top<a.y?(ge.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===90?(ge.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=ge.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(ge.y=a.y>he.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,he.bottom,!0):a.y>he.top&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.top,ye.x=x.x,ye.y=ge.y):b===270&&a.y>he.bottom&&a.x>he.left&&a.x<he.right&&(ge.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),ge.y=a.y,ye.x=ge.x)):(ge.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===90&&(he.ca(a)||se.ca(x))?ge.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?ge.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(ge.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=ge.x,ye.y=x.y),ge.x>se.left&&ge.x<se.right&&(x.y<=se.bottom&&x.y>=a.y||a.y>=he.top&&a.y<=x.y?(b===0||b===180)&&(ge.h(a.x,Math.min((a.y+x.y)/2,a.y)),ye.h(x.x,ge.y)):(ge.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===270?se.right:Math.max(se.right,he.right)),ye.x=ge.x,ye.y=x.y)));var Me=x;if(this.isAvoiding){var _e=this.diagram;if(_e===null||E===te||this.layer.isTemporary||!Qd(_e)||se.ca(Me)&&!te.Td(E)||he.ca(a)&&!E.Td(te))y=!1;else{var Ke=qd(_e,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ke.Yj(Math.min(a.x,ge.x),Math.min(a.y,ge.y),Math.abs(a.x-ge.x),Math.abs(a.y-ge.y))&&Ke.Yj(Math.min(ge.x,ye.x),Math.min(ge.y,ye.y),Math.abs(ge.x-ye.x),Math.abs(ge.y-ye.y))&&Ke.Yj(Math.min(ye.x,Me.x),Math.min(ye.y,Me.y),Math.abs(ye.x-Me.x),Math.abs(ye.y-Me.y)))y=!1;else{E=a,te=Me;var qe=x=null;if(_e.isVirtualized){_e=Ke.bounds.copy(),_e.Bc(-Ke.Ho,-Ke.Go);var rt=Et.alloc();xp(Ke,a.x,a.y)||(Ht.Ff(_e.x,_e.y,_e.x+_e.width,_e.y+_e.height,a.x,a.y,ge.x,ge.y,rt)?(x=a=rt.copy(),y=rt.ab(ge)):Ht.Ff(_e.x,_e.y,_e.x+_e.width,_e.y+_e.height,ge.x,ge.y,ye.x,ye.y,rt)?(x=a=rt.copy(),y=rt.ab(ye)):Ht.Ff(_e.x,_e.y,_e.x+_e.width,_e.y+_e.height,ye.x,ye.y,Me.x,Me.y,rt)&&(x=a=rt.copy(),y=rt.ab(Me))),xp(Ke,Me.x,Me.y)||(Ht.Ff(_e.x,_e.y,_e.x+_e.width,_e.y+_e.height,Me.x,Me.y,ye.x,ye.y,rt)?(qe=Me=rt.copy(),b=ye.ab(rt)):Ht.Ff(_e.x,_e.y,_e.x+_e.width,_e.y+_e.height,ye.x,ye.y,ge.x,ge.y,rt)?(qe=Me=rt.copy(),b=ge.ab(rt)):Ht.Ff(_e.x,_e.y,_e.x+_e.width,_e.y+_e.height,ge.x,ge.y,a.x,a.y,rt)&&(qe=Me=rt.copy(),b=a.ab(rt))),Et.free(rt)}se=se.copy().ed(he),se.Bc(Ke.Ho*Ke.Os,Ke.Go*Ke.Os),aS(Ke,a,y,Me,b,se,!0),he=Ph(Ke,Me.x,Me.y),!Ke.abort&&he>=wp&&(oS(Ke),se.Bc(Ke.Ho*Ke.Hx,Ke.Go*Ke.Ix),aS(Ke,a,y,Me,b,se,!1),he=Ph(Ke,Me.x,Me.y)),!Ke.abort&&he<wp&&Ph(Ke,Me.x,Me.y)!==bc?(Y0(this,Ke,Me.x,Me.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Me.y):(se.x=Me.x,se.y=a.y),this.L(2,se.x,se.y),this.m(3,se.x,se.y)):(ne=this.i(3),y===0||y===180?Ht.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)):Ht.B(se.y,ne.y)?(Math.abs(a.y-se.y)<=Ke.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)&&(Ht.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)):Ht.B(se.x,ne.x)?(Math.abs(a.x-se.x)<=Ke.Ho/2&&(this.L(2,a.x,se.y),this.L(3,a.x,ne.y)),this.m(2,a.x,se.y)):this.L(2,se.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),qe!==null&&(b===0||b===180?this.yf(te.x,qe.y):this.yf(qe.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ge.copy()),this.ne(ye.copy())),Et.free(ge),Et.free(ye)}},Ln.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 X0(a){if(a.diagram===null||!a.isAvoiding||!Qd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=qd(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 Y0(a,y,x,b,E,te,ne){var se=y.Ho,he=y.Go,ge=Ph(y,x,b),ye=x,Me=b;for(E===0?ye+=se:E===90?Me+=he:E===180?ye-=se:Me-=he,E!==ne&&ge>Zf&&Ph(y,ye,Me)!==ge-1&&(Ph(y,x-se,b)===ge-1?(E=180,ye=x-se,Me=b):Ph(y,x+se,b)===ge-1?(E=0,ye=x+se,Me=b):Ph(y,x,b-he)===ge-1?(E=270,ye=x,Me=b-he):Ph(y,x,b+he)===ge-1&&(E=90,ye=x,Me=b+he));ge>Zf&&Ph(y,ye,Me)===ge-1;)x=ye,b=Me,E===0?ye+=se:E===90?Me+=he:E===180?ye-=se:Me-=he,--ge;te?ge>Zf&&(E===180||E===0?x=Math.floor(x/se)*se+se/2:(E===90||E===270)&&(b=Math.floor(b/he)*he+he/2)):(x=Math.floor(x/se)*se+se/2,b=Math.floor(b/he)*he+he/2),ge>Zf&&(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),Ph(y,ne,ye)===ge-1?Y0(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),Ph(y,ne,ye)===ge-1&&Y0(a,y,ne,ye,te,!1,te))),a.yf(x,b)}Ln.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=ao(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=ao(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},Ln.prototype.qc=function(){this.lk=!1,this.v()},Ln.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)}}},Ln.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Vf(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===Fl&&3<=y&&!Ht.$(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||Vf(this)){if(a.type=jn.o,se=A1(a),this.computeShortLength(!0)!==0&&(E=Cd(this,E,!0,te)),mp(se,E.x,E.y,!1),ne===Fl&&3<=y&&!Ht.$(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=Cd(this,E,!1,te)),yc(se,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=Et.allocAt(b,he),x=Et.alloc(),x.assign(this.i(1)),te=Et.allocAt(b,he),E=Et.allocAt(b,he),ne=this.i(0);for(var ge,ye=this.smoothness/3,Me=1;Me<this.pointsCount-1;Me++){ge=this.i(Me);var _e=ne,Ke=ge,qe=this.i($0(this,ge,Me,!1));if((!Ht.$(_e.x,Ke.x)||!Ht.$(Ke.x,qe.x))&&(!Ht.$(_e.y,Ke.y)||!Ht.$(Ke.y,qe.y))){var rt=ye;isNaN(rt)&&(rt=this.smoothness/3);var Mt=_e.x;_e=_e.y;var xt=Ke.x;Ke=Ke.y;var At=qe.x;qe=qe.y;var Ot=rt*Qm(Mt,_e,xt,Ke);rt*=Qm(xt,Ke,At,qe),Ht.$(_e,Ke)&&Ht.$(xt,At)&&(xt>Mt?qe>Ke?(te.x=xt-Ot,te.y=Ke-Ot,E.x=xt+rt,E.y=Ke+rt):(te.x=xt-Ot,te.y=Ke+Ot,E.x=xt+rt,E.y=Ke-rt):qe>Ke?(te.x=xt+Ot,te.y=Ke-Ot,E.x=xt-rt,E.y=Ke+rt):(te.x=xt+Ot,te.y=Ke+Ot,E.x=xt-rt,E.y=Ke-rt)),Ht.$(Mt,xt)&&Ht.$(Ke,qe)&&(Ke>_e?(At>xt?(te.x=xt-Ot,te.y=Ke-Ot,E.x=xt+rt):(te.x=xt+Ot,te.y=Ke-Ot,E.x=xt-rt),E.y=Ke+rt):(At>xt?(te.x=xt-Ot,te.y=Ke+Ot,E.x=xt+rt):(te.x=xt+Ot,te.y=Ke+Ot,E.x=xt-rt),E.y=Ke-rt)),(Ht.$(Mt,xt)&&Ht.$(xt,At)||Ht.$(_e,Ke)&&Ht.$(Ke,qe))&&(Mt=.5*(Mt+At),_e=.5*(_e+qe),te.x=Mt,te.y=_e,E.x=Mt,E.y=_e),(Me===1||Me===2&&Ht.$(ne.x,this.i(0).x)&&Ht.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+ge.x),x.y=.5*(ne.y+ge.y)),yc(se,x.x-b,x.y-he,te.x-b,te.y-he,ge.x-b,ge.y-he),y.set(te),x.set(E),ne=ge}}ge=ne.x,ne=ne.y,ye=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ye=Cd(this,ye.copy(),!1,io)),ge=.5*(ge+ye.x),ne=.5*(ne+ye.y),yc(se,E.x-b,E.y-he,ge-b,ne-he,ye.x-b,ye.y-he),Et.free(y),Et.free(x),Et.free(te),Et.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=Cd(this,ne.copy(),!1,io)),yc(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=Et.alloc(),te.assign(this.i(0)),E=Et.alloc(),E.assign(te),ne=this.computeCorner(),Me=1,ge=0;Me<y;){if(Me=$0(this,te,Me,1<Me),ye=this.i(Me),Me>=y-1){if(!te.D(ye))this.computeShortLength(!1)!==0&&(ye=Cd(this,ye.copy(),!1,io)),Ed(this,se,-b,-he,te,ye,x);else if(ge===0)for(Me=1;Me<y;)E.assign(te),ye=this.i(Me++),Ed(this,se,-b,-he,te,ye,x),te.assign(ye);break}if(ge=$0(this,ye,Me+1,Me<y-3),Me=-b,Mt=-he,_e=ye,xt=this.i(ge),rt=x,Ht.B(te.y,_e.y)&&Ht.B(_e.x,xt.x))if(qe=Math.min(ne,Math.abs(_e.x-E.x)/2),qe=Ot=Math.min(qe,Math.abs(xt.y-_e.y)/2),Ht.B(qe,0))Ed(this,se,Me,Mt,te,_e,rt),te.assign(_e);else{var Dt=_e.x,_t=_e.y;Ke=Dt,At=_t,_e.x>te.x?Dt=_e.x-qe:Dt=_e.x+qe,xt.y>_e.y?At=_e.y+Ot:At=_e.y-Ot,xt=Et.allocAt(Dt,_t),Ed(this,se,Me,Mt,te,xt,rt),Et.free(xt),Um(se,_e.x+Me,_e.y+Mt,Ke+Me,At+Mt),te.h(Ke,At)}else Ht.B(te.x,_e.x)&&Ht.B(_e.y,xt.y)?(qe=Math.min(ne,Math.abs(_e.y-E.y)/2),qe=Ot=Math.min(qe,Math.abs(xt.x-_e.x)/2),Ht.B(Ot,0)?(Ed(this,se,Me,Mt,te,_e,rt),te.assign(_e)):(Dt=_e.x,_t=_e.y,Ke=Dt,At=_t,_e.y>te.y?_t=_e.y-qe:_t=_e.y+qe,xt.x>_e.x?Ke=_e.x+Ot:Ke=_e.x-Ot,xt=Et.allocAt(Dt,_t),Ed(this,se,Me,Mt,te,xt,rt),Et.free(xt),Um(se,_e.x+Me,_e.y+Mt,Ke+Me,At+Mt),te.h(Ke,At))):(Ed(this,se,Me,Mt,te,_e,rt),te.assign(_e));E.assign(ye),Me=ge}Et.free(te)}Hm=se}else se=this.i(1).copy(),se.x-=b,se.y-=he,this.computeShortLength(!0)!==0&&(E=Cd(this,E,!0,te)),this.computeShortLength(!1)!==0&&(se=Cd(this,se,!1,te)),a.type=jn.j,a.startX=E.x,a.startY=E.y,a.endX=se.x,a.endY=se.y;return this.lk=!0,a};function Qm(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),Ht.$(a,0)?y:Ht.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Cd(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=Qm(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=Qm(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 $0(a,y,x,b){for(var E=a.pointsCount,te=y;Ht.$(y.x,te.x)&&Ht.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!Ht.$(y.x,te.x)&&!Ht.$(y.y,te.y))return x-1;for(var ne=te;Ht.$(y.x,te.x)&&Ht.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||Ht.$(y.y,te.y)&&Ht.$(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}Ln.prototype.computeJumpLength=function(){return 10};function Ed(a,y,x,b,E,te,ne){if(!ne&&Vf(a)){ne=a.computeJumpLength();var se=ne/2,he=[],ge=0;if(a.isVisible()&&(ge=kx(a,E,te,he)),0<ge){if(Ht.B(E.y,te.y))if(E.x<te.x)for(var ye=0;ye<ge;){var Me=Math.max(E.x,Math.min(he[ye++]-se,te.x-ne));y.lineTo(Me+x,te.y+b);for(var _e=Me+x,Ke=Math.min(Me+ne,te.x);ye<ge&&(Me=he[ye],Me<Ke+ne);)ye++,Ke=Math.min(Me+se,te.x);Me=te.y-ne+b,Ke+=x;var qe=te.y+b;a.curve===Pc?mp(y,Ke,qe,!1):yc(y,_e,Me,Ke,Me,Ke,qe)}else for(--ge;0<=ge;){for(ye=Math.min(E.x,Math.max(he[ge--]+se,te.x+ne)),y.lineTo(ye+x,te.y+b),_e=ye+x,Me=Math.max(ye-ne,te.x);0<=ge&&(ye=he[ge],ye>Me-ne);)ge--,Me=Math.max(ye-se,te.x);ye=te.y-ne+b,Me+=x,Ke=te.y+b,a.curve===Pc?mp(y,Me,Ke,!1):yc(y,_e,ye,Me,ye,Me,Ke)}else if(Ht.B(E.x,te.x))if(E.y<te.y)for(ye=0;ye<ge;){for(Me=Math.max(E.y,Math.min(he[ye++]-se,te.y-ne)),y.lineTo(te.x+x,Me+b),_e=Me+b,Me=Math.min(Me+ne,te.y);ye<ge&&(Ke=he[ye],Ke<Me+ne);)ye++,Me=Math.min(Ke+se,te.y);Ke=te.x-ne+x,qe=te.x+x,Me+=b,a.curve===Pc?mp(y,qe,Me,!1):yc(y,Ke,_e,Ke,Me,qe,Me)}else for(--ge;0<=ge;){for(ye=Math.min(E.y,Math.max(he[ge--]+se,te.y+ne)),y.lineTo(te.x+x,ye+b),_e=ye+b,ye=Math.max(ye-ne,te.y);0<=ge&&(Me=he[ge],Me>ye-ne);)ge--,ye=Math.max(Me-se,te.y);Me=te.x-ne+x,Ke=te.x+x,ye+=b,a.curve===Pc?mp(y,Ke,ye,!1):yc(y,Me,_e,Me,ye,Ke,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 Ln){if(he===a)return 0<b.length&&b.sort(function(ye,Me){return ye-Me}),b.length;if(he.isVisible()&&Vf(he)){var ge=he.routeBounds;ge.w()&&a.routeBounds.Yc(ge)&&!a.usesSamePort(he)&&(ge=he.path,ge!==null&&ge.Ed()&&Mx(y,x,b,he))}}}}}return 0<b.length&&b.sort(function(ye,Me){return ye-Me}),b.length}function Mx(a,y,x,b){for(var E=Ht.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=Et.alloc(),he=1;he<te;he++){var ge=b.i(he);if(he<te-1){var ye=b.i(he+1);if(ne.y===ge.y&&ge.y===ye.y){if(ge.x>ne.x&&ye.x>=ge.x||ge.x<ne.x&&ye.x<=ge.x)continue}else if(ne.x===ge.x&&ge.x===ye.x&&(ge.y>ne.y&&ye.y>=ge.y||ge.y<ne.y&&ye.y<=ge.y))continue}e:{ye=a.x;var Me=a.y,_e=y.x,Ke=y.y,qe=ne.x;ne=ne.y;var rt=ge.x,Mt=ge.y;if(Ht.B(ye,_e)){if(!Ht.B(Me,Ke)&&Ht.B(ne,Mt)&&Math.min(Me,Ke)<ne&&Math.max(Me,Ke)>ne&&Math.min(qe,rt)<ye&&Math.max(qe,rt)>ye&&!Ht.B(qe,rt)){se.x=ye,se.y=ne,ye=!0;break e}}else if(Ht.B(Me,Ke)&&Ht.B(qe,rt)&&Math.min(ye,_e)<qe&&Math.max(ye,_e)>qe&&Math.min(ne,Mt)<Me&&Math.max(ne,Mt)>Me&&!Ht.B(ne,Mt)){se.x=qe,se.y=Me,ye=!0;break e}se.x=0,se.y=0,ye=!1}ye&&(E?x.push(se.x):x.push(se.y)),ne=ge}Et.free(se)}function Vf(a){return a=a.curve,a===Sp||a===Pc}function qm(a,y){(y||Vf(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()))}Ln.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 Ln&&(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 Ln&&tS(this,se,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Vf(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Ln.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},Ln.prototype.isVisible=function(){if(!ur.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},Ln.prototype.Zb=function(a){if(ur.prototype.Zb.call(this,a),a&&qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Ln.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?Pg:this.qk};function xg(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,te=a=null,ne=y.jb.s,se=ne.length,he=0;he<se;he++){var ge=ne[he];(ge.ef===y&&ge.ff===b&&ge.uf===x&&ge.vf===E||ge.ef===x&&ge.ff===E&&ge.uf===y&&ge.vf===b)&&(te===null?te=ge:(a===null&&(a=[],a.push(te)),a.push(ge)))}if(a!==null){for(te=H1(y,x,b,E),te===null&&(te=new iv(y,b,x,E),U1(y,te),U1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function wg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(zi(y.links,a),y.Sl()))}Ln.prototype.ph=function(){return!0},cn.Object.defineProperties(Ln.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&&Zm(y,this,x),wg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Vm(a,this,E),xg(this),this.C(1)),this.g("fromNode",y,a),vp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&vl(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&vl(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))),xg(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&&Zm(y,this,x),wg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,te=this.toPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Vm(a,this,E),xg(this),this.C(1)),this.g("toNode",y,a),vp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&vl(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&vl(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))),xg(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:za},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&&vl(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&&yr(a,">= 0",Ln,"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:za},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&&vl(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&&yr(a,">= 0",Ln,"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?Bi: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&&Sg(this.fromNode),this.toNode!==null&&Sg(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()===Fl&&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),Ht.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);Ht.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 Et)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Ym(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);Ht.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Ht.$(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 kn,b=0;b<a.length/2;b++)E=new Et(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(!xn(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new kn,b=0;b<a.length;b++)E=a[b],x.add(new Et(E.x,E.y).freeze())}}else if(a instanceof kn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else $t("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Ym(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ju(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||!yp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!yp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),qm(this,y===Pc||y===Sp||a===Pc||a===Sp),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),qm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Ln.prototype.invalidateOtherJumpOvers=Ln.prototype.Xo,Ln.prototype.findClosestSegment=Ln.prototype.ez,Ln.prototype.updateRoute=Ln.prototype.vg,Ln.prototype.invalidateRoute=Ln.prototype.bb,Ln.prototype.rollbackRoute=Ln.prototype.rv,Ln.prototype.commitRoute=Ln.prototype.zf,Ln.prototype.startRoute=Ln.prototype.uh,Ln.prototype.clearPoints=Ln.prototype.Fj,Ln.prototype.removePoint=Ln.prototype.pv,Ln.prototype.addPointAt=Ln.prototype.yf,Ln.prototype.addPoint=Ln.prototype.ne,Ln.prototype.insertPointAt=Ln.prototype.m,Ln.prototype.insertPoint=Ln.prototype.Kz,Ln.prototype.setPointAt=Ln.prototype.L,Ln.prototype.setPoint=Ln.prototype.dd,Ln.prototype.getPoint=Ln.prototype.i,Ln.prototype.getOtherPort=Ln.prototype.Cz,Ln.prototype.getOtherNode=Ln.prototype.To;var kd=null,Md=null,J0=new tn(Ln,"Normal",1),Tx=new tn(Ln,"Orthogonal",2),Lx=new tn(Ln,"AvoidsNodes",6),nS=new tn(Ln,"AvoidsNodesStraight",7),Ns=new tn(Ln,"None",0),Fl=new tn(Ln,"Bezier",9),Pc=new tn(Ln,"JumpGap",10),Sp=new tn(Ln,"JumpOver",11),Pg=new tn(Ln,"End",17),ev=new tn(Ln,"Scale",18),tv=new tn(Ln,"Stretch",19),bg=new tn(Ln,"OrientAlong",21),Cg=new tn(Ln,"OrientPlus90",22),Eg=new tn(Ln,"OrientMinus90",23),Q0=new tn(Ln,"OrientOpposite",24),nv=new tn(Ln,"OrientUpright",25),kg=new tn(Ln,"OrientPlus90Upright",26),Mg=new tn(Ln,"OrientMinus90Upright",27),rv=new tn(Ln,"OrientUpright45",28),rS=16,iS=14,Tg=8;Ln.className="Link",Ln.Normal=J0,Ln.Orthogonal=Tx,Ln.AvoidsNodes=Lx,Ln.AvoidsNodesStraight=nS,Ln.None=Ns,Ln.Bezier=Fl,Ln.JumpGap=Pc,Ln.JumpOver=Sp,Ln.End=Pg,Ln.Scale=ev,Ln.Stretch=tv,Ln.OrientAlong=bg,Ln.OrientPlus90=Cg,Ln.OrientMinus90=Eg,Ln.OrientOpposite=Q0,Ln.OrientUpright=nv,Ln.OrientPlus90Upright=kg,Ln.OrientMinus90Upright=Mg,Ln.OrientUpright45=rv,Ln.EndSegmentStep=8,Ln.CurvinessStart=rS,Ln.SpacingMin=iS,Ln.OrthoShortCut=Tg;function iv(a,y,x,b){Ni(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}iv.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},iv.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},iv.className="LinkBundle";function Lg(a){Ni(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=q0,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function xp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Ph(a,y,x){return xp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):q0}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=Zf&&(x[b]=q0)}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]===bc)return!1}return!0};function bh(a,y,x,b,E,te,ne,se,he){if(!(y<te||y>ne||x<se||x>he)){var ge=y|0,ye=x|0,Me=a.ac[ge][ye];if(Me>=Zf&&Me<wp)for(E?ye+=b:ge+=b,Me+=1;te<=ge&&ge<=ne&&se<=ye&&ye<=he&&!(Me>=a.ac[ge][ye]);)a.ac[ge][ye]=Me,Me+=1,E?ye+=b:ge+=b;if(ge=E?ye:ge,E)if(0<b)for(x+=b;x<ge;x+=b)bh(a,y,x,1,!E,te,ne,se,he),bh(a,y,x,-1,!E,te,ne,se,he);else for(x+=b;x>ge;x+=b)bh(a,y,x,1,!E,te,ne,se,he),bh(a,y,x,-1,!E,te,ne,se,he);else if(0<b)for(y+=b;y<ge;y+=b)bh(a,y,x,1,!E,te,ne,se,he),bh(a,y,x,-1,!E,te,ne,se,he);else for(y+=b;y>ge;y+=b)bh(a,y,x,1,!E,te,ne,se,he),bh(a,y,x,-1,!E,te,ne,se,he)}}function ov(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var ge=bc,ye=Zf;for(a.ac[y][x]=ye;ge===bc&&y>te&&y<ne&&x>se&&x<he;)ye+=1,a.ac[y][x]=ye,E?x+=b:y+=b,ge=a.ac[y][x]}function av(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var ge=bc,ye=wp;for(a.ac[y][x]=ye;ge===bc&&y>te&&y<ne&&x>se&&x<he;)a.ac[y][x]=ye,E?x+=b:y+=b,ge=a.ac[y][x]}function aS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var se=y.x,he=y.y;if(xp(a,se,he)){se-=a.Nd,se/=a.rc,he-=a.Od,he/=a.sc;var ge=b.x,ye=b.y;if(xp(a,ge,ye))if(ge-=a.Nd,ge/=a.rc,ye-=a.Od,ye/=a.sc,1>=Math.abs(se-ge)&&1>=Math.abs(he-ye))a.abort=!0;else{var Me=te.x;b=te.y,y=te.x+te.width;var _e=te.y+te.height;Me-=a.Nd,Me/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,_e-=a.Od,_e/=a.sc,te=Math.max(0,Math.min(a.di,Me|0)),y=Math.min(a.di,Math.max(0,y|0)),Me=Math.max(0,Math.min(a.ei,b|0)),_e=Math.min(a.ei,Math.max(0,_e|0)),b=a.ac,se|=0,he|=0,ge|=0,ye|=0;var Ke=x===0||x===90?1:-1;if(x=x===90||x===270,b[se][he]===bc?(ov(a,se,he,Ke,x,te,y,Me,_e),ov(a,se,he,1,!x,te,y,Me,_e),ov(a,se,he,-1,!x,te,y,Me,_e)):ov(a,se,he,Ke,x,se,he,se,he),b[ge][ye]===bc?(av(a,ge,ye,E===0||E===90?1:-1,E===90||E===270,te,y,Me,_e),av(a,ge,ye,1,!(E===90||E===270),te,y,Me,_e),av(a,ge,ye,-1,!(E===90||E===270),te,y,Me,_e)):av(a,ge,ye,Ke,x,ge,ye,ge,ye),x=sr(),ne&&sS(a,ge,ye,E,se,he,x))for((x[0]!==ge||x[1]!==ye)&&(x.unshift(ye),x.unshift(ge)),(x[x.length-2]!==se||x[x.length-1]!==he)&&(x.push(se),x.push(he)),a=Zf,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,te=x.length-4;0<=te;te-=2)for(E=x[te+2],ne=x[te+3],y=x[te],ge=x[te+1];y>E?E++:y<E?E--:ge>ne?ne++:ge<ne&&ne--,b[E][ne]=a++,E!==y||ne!==ge;);else bh(a,se,he,1,!1,te,y,Me,_e),bh(a,se,he,-1,!1,te,y,Me,_e),bh(a,se,he,1,!0,te,y,Me,_e),bh(a,se,he,-1,!0,te,y,Me,_e);dr(x)}}}}function sS(a,y,x,b,E,te,ne){for(var se=a.ac,he=y,ge=x;;){if(he===E&&ge===te)return!0;var ye=he,Me=ge;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Me<te)Me++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Me>te)Me--;else break;var _e=se[ye][Me];if(_e===0||_e===ey)break;he=ye,ge=Me}for(;;){if(ye=b,Me=he,_e=ge,b===0?_e<te?(ye=90,_e++):_e>te&&(ye=270,_e--):b===90?Me<E?(ye=0,Me++):Me>E&&(ye=180,Me--):b===180?_e<te?(ye=90,_e++):_e>te&&(ye=270,_e--):Me<E?(ye=0,Me++):Me>E&&(ye=180,Me--),Me=se[Me][_e],ye!==b&&Me!==0&&Me!==ey){if(ne.push(he),ne.push(ge),sS(a,he,ge,ye,E,te,ne))return!0;ne.pop(),ne.pop()}if(se[he][ge]=ey,b===0){if(he===y)return!1;he--}else if(b===90){if(ge===x)return!1;ge--}else if(b===180){if(he===y)return!1;he++}else{if(ge===x)return!1;ge++}}}cn.Object.defineProperties(Lg.prototype,{bounds:{get:function(){return new on(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 bc=0,Zf=1,wp=999999,q0=wp+1,ey=wp+2;Lg.className="PositionArray";function Td(){Ni(this),this.port=this.node=null,this.pe=[],this.ap=!1}Td.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}Td.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 Fr?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(La,Et.alloc()),he=a.port.ga(Ys,Et.alloc());for(E=on.allocAt(se.x,se.y,0,0),E.Ye(he),Et.free(se),Et.free(he),se=Et.allocAt(E.x+E.width/2,E.y+E.height/2),he=a.port.li(),ne=ne.iterator;ne.next();){var ge=ne.value;if(ge.isVisible()&&ge.fromPort!==ge.toPort){var ye=ge.fromPort===a.port||ge.fromNode!==null&&ge.fromNode.Td(b),Me=ge.computeSpot(ye,a.port);if(Me.$c()&&(ye=ye?ge.toPort:ge.fromPort,ye!==null)){var _e=ye.part;if(_e!==null){var Ke=_e.findVisibleNode();Ke!==null&&Ke!==_e&&(_e=Ke,ye=_e.port),ye=ge.computeOtherPoint(_e,ye),_e=se.ab(ye),_e-=he,0>_e?_e+=360:360<=_e&&(_e-=360),Me=Nx(E,Me,_e,ge.isOrthogonal),Me===0?(Me=4,180<_e&&(_e-=360)):Me===90?(Me=8,270<_e&&(_e-=360)):Me===180?Me=2:(Me=1,90>_e&&(_e+=360)),Ke=a.pe[te],Ke===void 0?(Ke=new ty(ge,_e,Me),a.pe[te]=Ke):(Ke.link=ge,Ke.angle=_e,Ke.Nc=Me),Ke.hv.set(ye),te++}}}}for(Et.free(se),a.pe.sort(Td.prototype.j),he=a.pe.length,b=-1,te=se=0;te<he;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,se=0),ne.Uo=se,se++);for(b=-1,se=0,te=he-1;0<=te;te--)he=a.pe[te],he!==void 0&&(he.Nc!==b&&(b=he.Nc,se=he.Uo+1),he.Gl=se);if(te=a.pe,Me=a.port,b=a.node.portSpreading,se=Et.alloc(),he=Et.alloc(),ne=Et.alloc(),ge=Et.alloc(),Me.ga(La,se),Me.ga(Ca,he),Me.ga(Ys,ne),Me.ga(us,ge),Ke=_e=ye=Me=0,b===W0)for(var qe=0;qe<te.length;qe++){var rt=te[qe];if(rt!==null){var Mt=rt.link.computeThickness();switch(rt.Nc){case 8:_e+=Mt;break;case 2:Ke+=Mt;break;case 1:Me+=Mt;break;default:case 4:ye+=Mt}}}var xt=qe=0,At=1,Ot=rt=0;for(Mt=0;Mt<te.length;Mt++){var Dt=te[Mt];if(Dt!==null){if(qe!==Dt.Nc){switch(qe=Dt.Nc,qe){case 8:var _t=ne;xt=ge;break;case 2:_t=ge,xt=se;break;case 1:_t=se,xt=he;break;default:case 4:_t=he,xt=ne}switch(rt=xt.x-_t.x,Ot=xt.y-_t.y,qe){case 8:_e>Math.abs(rt)?(At=Math.abs(rt)/_e,_e=Math.abs(rt)):At=1;break;case 2:Ke>Math.abs(Ot)?(At=Math.abs(Ot)/Ke,Ke=Math.abs(Ot)):At=1;break;case 1:Me>Math.abs(rt)?(At=Math.abs(rt)/Me,Me=Math.abs(rt)):At=1;break;default:case 4:ye>Math.abs(Ot)?(At=Math.abs(Ot)/ye,ye=Math.abs(Ot)):At=1}xt=0}var Yt=Dt.Zo;if(b===W0){switch(Dt=Dt.link.computeThickness(),Dt*=At,Yt.set(_t),qe){case 8:Yt.x=_t.x+rt/2+_e/2-xt-Dt/2;break;case 2:Yt.y=_t.y+Ot/2+Ke/2-xt-Dt/2;break;case 1:Yt.x=_t.x+rt/2-Me/2+xt+Dt/2;break;default:case 4:Yt.y=_t.y+Ot/2-ye/2+xt+Dt/2}xt+=Dt}else{var _n=.5;b===Xm&&(_n=(Dt.Uo+1)/(Dt.Gl+1)),Yt.x=_t.x+rt*_n,Yt.y=_t.y+Ot*_n}}}for(Et.free(se),Et.free(he),Et.free(ne),Et.free(ge),_t=a.pe,te=0;te<_t.length;te++)b=_t[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,on.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}Td.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},Td.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ba,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},Td.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Et,this.Gl=this.Uo=0,this.Zo=new Et,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 ko(a){Ni(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Et(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}ko.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},ko.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ko.prototype.qb=function(){},ko.prototype.toString=function(){var a=Ar(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},ko.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())}}},ko.prototype.createNetwork=function(){return new no(this)},ko.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Xt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Fr?y.lg(a.memberParts):y.lg(a.iterator),y},ko.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")}},ko.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()}},ko.prototype.doLayout=function(a){var y=new bn;a instanceof Xt?(rf(this,y,a.nodes,!0,this.rh,!0,!1,!0),rf(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Fr?rf(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},ko.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,te=0,ne=0;for(a=a.iterator;a.next();){var se=a.value;Ng(se);var he=se.measuredBounds,ge=he.width;he=he.height,se.moveTo(b,E),se instanceof Fr&&(se.rh=!1),b+=Math.max(ge,50)+20,ne=Math.max(ne,Math.max(he,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},ko.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 Ln)&&(Ng(se),this.rh(se))){var he=se.measuredBounds,ge=he.width;he=he.height,se.moveTo(x,b),se instanceof Fr&&(se.rh=!1),x+=Math.max(ge,50)+20,te=Math.max(te,Math.max(he,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},ko.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Fr&&a.rh)};function rf(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 Un?he.isLinkLabel||(he instanceof Fr&&he.layout===null?rf(a,y,he.memberParts,!1,E,te,ne,se):(Ng(he),y.add(he))):ne&&he instanceof Ln?y.add(he):!se||!he.Zc()||he instanceof Un||(Ng(he),y.add(he)))}}function Ng(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}ko.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new on),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},ko.prototype.ex=function(a){var y=new bn;return a instanceof Xt?(rf(this,y,a.nodes,!0,null,!0,!0,!0),rf(this,y,a.links,!0,null,!0,!0,!0),rf(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Fr?rf(this,y,a.memberParts,!1,null,!0,!0,!0):rf(this,y,a.iterator,!1,null,!0,!0,!0),y},ko.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(La),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},cn.Object.defineProperties(ko.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())}}}),ko.prototype.collectParts=ko.prototype.ex,ko.prototype.getLayoutBounds=ko.prototype.ni,ko.prototype.invalidateLayout=ko.prototype.C,ko.className="Layout";function no(a){Ni(this),this.Sc=a,this.wf=new bn,this.ye=new bn,this.Es=new Kn,this.zs=new Kn}no.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 bn,this.ye=new bn,this.Es=new Kn,this.zs=new Kn},no.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},no.prototype.createVertex=function(){return new va(this)},no.prototype.createEdge=function(){return new yl(this)},no.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 Un)return!ne.isLinkLabel;if(ne instanceof Ln){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 Un&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof Fr&&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 Ln&&(!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))}}},no.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},Qe=no.prototype,Qe.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Qe.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},Qe.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}Qe.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Qe.ki=function(a){return a===null?null:this.Es.I(a)},Qe.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}}Qe.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},Qe.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))}Qe.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Qe.Lo=function(a){return a===null?null:this.zs.I(a)},Qe.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},Qe.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))}},Qe.Ko=function(){for(var a=sr(),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]);dr(a)},no.prototype.deleteArtificialVertexes=function(){for(var a=sr(),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=sr(),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]);dr(a),dr(y)};function Ax(a){for(var y=sr(),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]);dr(y)}no.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new kn;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))}}no.prototype.dz=function(){for(var a=new bn,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},cn.Object.defineProperties(no.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}}}),no.prototype.findAllParts=no.prototype.dz,no.prototype.splitIntoSubNetworks=no.prototype.Zx,no.prototype.deleteSelfEdges=no.prototype.Ko,no.prototype.reverseEdge=no.prototype.gm,no.prototype.linkVertexes=no.prototype.Zj,no.prototype.findEdge=no.prototype.Lo,no.prototype.deleteLink=no.prototype.Yy,no.prototype.deleteEdge=no.prototype.Mj,no.prototype.addLink=no.prototype.Dy,no.prototype.addEdge=no.prototype.Bo,no.prototype.findVertex=no.prototype.ki,no.prototype.deleteNode=no.prototype.Zy,no.prototype.deleteVertex=no.prototype.Iu,no.prototype.addNode=no.prototype.Bl,no.prototype.addVertex=no.prototype.dh,no.prototype.addParts=no.prototype.lg,no.className="LayoutNetwork";function va(a){Ni(this),this.ob=a,this.j=new on(0,0,10,10).freeze(),this.o=new Et(5,5).freeze(),this.Sh=this.ub=null,this.tg=new kn,this.mg=new kn}va.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new kn,this.mg=new kn},va.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Zt(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},va.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;xn(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 Fr)){x=on.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(vi);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),on.free(x);return}on.free(x)}a.moveTo(y.x,y.y)}},va.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},va.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},va.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},va.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}cn.Object.defineProperties(va.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=on.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),on.free(x),!(a instanceof Fr)&&(a=a.locationObject.ga(vi),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 bn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new bn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new bn,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 kn,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}}}),va.prototype.deleteDestinationEdge=va.prototype.Jl,va.prototype.addDestinationEdge=va.prototype.zl,va.prototype.deleteSourceEdge=va.prototype.Kl,va.prototype.addSourceEdge=va.prototype.Cl,va.className="LayoutVertex",va.standardComparer=oy,va.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 yl(a){Ni(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}yl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},yl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Zt(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},yl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},yl.prototype.commit=function(){},yl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},cn.Object.defineProperties(yl.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)}}}),yl.prototype.getOtherVertex=yl.prototype.Ax,yl.className="LayoutEdge";function Ua(a){ko.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new pn(NaN,NaN).freeze(),this.tf=new pn(10,10).freeze(),this.Jb=Ag,this.Rb=lv,this.nd=jg,this.hd=hS,a&&Object.assign(this,a)}Vt(Ua,ko),Ua.prototype.cloneProtected=function(a){ko.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},Ua.prototype.qb=function(a){a.classType===Ua?a===jg||a===hv||a===ay||a===uv?this.sorting=a:a===lv||a===Ru?this.arrangement=a:a===Ag||a===sv?this.alignment=a:$t("Unknown enum value: "+a):ko.prototype.qb.call(this,a)},Ua.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 Fr)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case uv:E.reverse();break;case jg:E.sort(this.comparer);break;case hv:E.sort(this.comparer),E.reverse()}var te=this.wrappingColumn;isNaN(te)&&(te=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=te&&0>=ne&&(te=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case sv:var se=y,he=x,ge=on.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Me=ye=0;Me<E.length;Me++){var _e=this.ni(E[Me],ge);ye=Math.max(ye,_e.width)}if(ye=Math.max(ye+se,1),Me=Math.max(this.cellSize.height,1),!isFinite(Me))for(_e=Me=0;_e<E.length;_e++){var Ke=this.ni(E[_e],ge);Me=Math.max(Me,Ke.height)}Me=Math.max(Me+he,1),_e=this.arrangement;for(var qe=Ke=this.arrangementOrigin.x,rt=this.arrangementOrigin.y,Mt=0,xt=0,At=0;At<E.length;At++){var Ot=E[At],Dt=this.ni(Ot,ge),_t=Math.ceil((Dt.width+se)/ye)*ye,Yt=Math.ceil((Dt.height+he)/Me)*Me;switch(_e){case Ru:var _n=Math.abs(qe-Dt.width);break;default:_n=qe+Dt.width}switch((0<te&&Mt>te-1||0<ne&&0<Mt&&_n-Ke>ne)&&(b.push(new on(0,rt,ne+se,xt)),Mt=0,qe=Ke,rt+=xt,xt=0),xt=Math.max(xt,Yt),_e){case Ru:Dt=-Dt.width;break;default:Dt=0}switch(Ot.moveTo(qe+Dt,rt),_e){case Ru:qe-=_t;break;default:qe+=_t}Mt++}b.push(new on(0,rt,ne+se,xt)),on.free(ge);break;case Ag:for(he=ne,ye=te,Me=y,_e=x,ne=on.alloc(),Ke=Math.max(this.cellSize.width,1),te=rt=ge=0,se=Et.alloc(),qe=0;qe<E.length;qe++)xt=E[qe],Mt=this.ni(xt,ne),xt=Sc(xt,xt.locationObject,xt.locationSpot,se),ge=Math.max(ge,xt.x),rt=Math.max(rt,Mt.width-xt.x),te=Math.max(te,xt.y);switch(qe=this.arrangement,qe){case Ru:ge+=Me;break;default:rt+=Me}Ke=isFinite(Ke)?Math.max(Ke+Me,1):Math.max(ge+rt,1);var Jn=xt=this.arrangementOrigin.x;for(At=this.arrangementOrigin.y,rt=0,he>=ge&&(he-=ge),ge=Ot=0,_t=Math.max(this.cellSize.height,1),Dt=te=0,Yt=!0,Mt=Et.alloc(),_n=0;_n<E.length;_n++){var Xn=E[_n],Mn=this.ni(Xn,ne),mn=Sc(Xn,Xn.locationObject,Xn.locationSpot,se);if(0<rt)switch(qe){case Ru:Jn=(Jn-xt-(Mn.width-mn.x))/Ke,Jn=Ht.$(Math.round(Jn),Jn)?Math.round(Jn):Math.floor(Jn),Jn=Jn*Ke+xt;break;default:Jn=(Jn-xt+mn.x)/Ke,Jn=Ht.$(Math.round(Jn),Jn)?Math.round(Jn):Math.ceil(Jn),Jn=Jn*Ke+xt}else switch(qe){case Ru:Ot=Jn+mn.x+Mn.width;break;default:Ot=Jn-mn.x}switch(qe){case Ru:var Or=-(Jn+mn.x)+Ot;break;default:Or=Jn+Mn.width-mn.x-Ot}if(0<ye&&rt>ye-1||0<he&&0<rt&&Or>he){for(b.push(new on(0,Yt?At-te:At,he+Me,Dt+te+_e)),Jn=0;Jn<rt&&_n!==rt;Jn++){Or=E[_n-rt+Jn];var br=Sc(Or,Or.locationObject,Or.locationSpot,Mt);Or.moveTo(Or.position.x,Or.position.y+te-br.y)}Dt+=_e,At=Yt?At+Dt:At+(Dt+te),rt=Dt=te=0,Jn=xt,Yt=!1}switch(Jn===xt&&(ge=qe===Ru?Math.max(ge,Mn.width-mn.x):Math.min(ge,-mn.x)),te=Math.max(te,mn.y),Dt=Math.max(Dt,Mn.height-mn.y),isFinite(_t)&&(Dt=Math.max(Dt,Math.max(Mn.height,_t)-mn.y)),Yt?Xn.moveTo(Jn-mn.x,At-mn.y):Xn.moveTo(Jn-mn.x,At),qe){case Ru:Jn-=mn.x+Me;break;default:Jn+=Mn.width-mn.x+Me}rt++}if(b.push(new on(0,At,he+Me,(Yt?Dt:Dt+te)+_e)),E.length!==rt)for(he=0;he<rt;he++)ye=E[E.length-rt+he],Me=Sc(ye,ye.locationObject,ye.locationSpot,se),ye.moveTo(ye.position.x,ye.position.y+te-Me.y);if(Et.free(se),Et.free(Mt),qe===Ru)for(E=0;E<b.length;E++)te=b[E],te.width+=ge,te.x-=ge;else for(E=0;E<b.length;E++)te=b[E],te.x>ge&&(te.width+=te.x-ge,te.x=ge);on.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===Ru?this.commitLayers(b,new Et(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new Et(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ua.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}cn.Object.defineProperties(Ua.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!==Ag&&a!==sv||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==lv&&a!==Ru||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==uv&&a!==jg&&a!==hv||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var sv=new tn(Ua,"Position",0),Ag=new tn(Ua,"Location",1),lv=new tn(Ua,"LeftToRight",2),Ru=new tn(Ua,"RightToLeft",3),ay=new tn(Ua,"Forward",4),uv=new tn(Ua,"Reverse",5),jg=new tn(Ua,"Ascending",6),hv=new tn(Ua,"Descending",7);Ua.className="GridLayout",Ua.standardComparer=hS,Ua.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},Ua.Position=sv,Ua.Location=Ag,Ua.LeftToRight=lv,Ua.RightToLeft=Ru,Ua.Forward=ay,Ua.Reverse=uv,Ua.Ascending=jg,Ua.Descending=hv;function Ii(){this.On=new bn,this.Dn=new bn,this.Pa=new bn,this.cf=new Kn,this.bf=new Kn,this.aj=new Kn,this.H=null,this.tp=!1}Qe=Ii.prototype,Qe.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Qe.Xe=function(a){this.H=a},Qe.oi=function(a){if(a instanceof Un){if(this.On.add(a),a instanceof Fr){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 Ln?this.Dn.add(a):a instanceof di||this.Pa.add(a);y=a.data,y===null||a instanceof di||(a instanceof Ln?this.bf.add(y,a):this.cf.add(y,a))},Qe.pc=function(a){if(a.Ej(),a instanceof Un){if(this.On.remove(a),a instanceof Fr){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 Ln?this.Dn.remove(a):a instanceof di||this.Pa.remove(a);y=a.data,y===null||a instanceof di||(a instanceof Ln?this.bf.remove(y):this.cf.remove(y))},Qe.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 Fr)&&$t('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 Fr||$t('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 Ln||$t('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=sr(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=sr(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=sr(),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]);dr(y),dr(x),dr(a)}},Ii.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Ii.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&&$d(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&&(ou(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)}}Ii.prototype.insertLink=function(){return null},Ii.prototype.resolveReferencesForData=function(){},Ii.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,Nr('No Group template found for category "'+x+'"'),Nr(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,Nr('No Node template found for category "'+x+'"'),Nr(" Using default node template")),y=a.ny))),y}Ii.prototype.getLinkCategoryForData=function(){return""},Ii.prototype.setLinkCategoryForData=function(){},Ii.prototype.setFromNodeForLink=function(){},Ii.prototype.setToNodeForLink=function(){},Ii.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,Nr('No Link template found for category "'+a+'"'),Nr(" Using default link template")),x=y.my)),x},Ii.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Ii.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Ii.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Vp(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Ii.prototype.unresolveReferencesForPart=function(){},Ii.prototype.removeDataForLink=function(){},Ii.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Ii.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Un?a:null)},Ii.prototype.findLinkForKey=function(){return null},Qe=Ii.prototype,Qe.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Qe.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Un?a:null)},Qe.Kc=function(a){return a===null?null:this.bf.I(a)},Qe.ms=function(a){for(var y=0;y<arguments.length;++y);y=new bn;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(xn(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},Qe.ls=function(a){for(var y=0;y<arguments.length;++y);y=new bn;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(xn(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(gr(te)){if(!gr(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(xn(y)&&xn(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}Ii.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===fo){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===Xo){var ne=a.newValue;b==="nodeDataArray"&&xn(ne)&&cS(this,ne),y.isModified=!0}else if(x===oa){var se=a.oldValue;b==="nodeDataArray"&&xn(se)&&this.ip(se),y.isModified=!0}else x===zs&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===fo){var he=a.propertyName,ge=a.object;ge===y.model?(he==="nodeKeyProperty"||he==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ge,he),y.isModified=!0}else if(x===Xo||x===oa){var ye=a.change===Xo,Me=ye?a.newParam:a.oldParam,_e=ye?a.newValue:a.oldValue,Ke=this.aj.I(a.object);if(Array.isArray(Ke))for(a=0;a<Ke.length;a++){var qe=Ke[a];if(ye)Lm(qe,_e,Me,!0);else if(!(0>Me)){var rt=Me+dg(qe);qe.pc(rt,!0),w0(qe,rt,Me)}}y.isModified=!0}}finally{y.aa=!0}}}}},Ii.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)},Ii.prototype.rp=function(){for(var a=this.H.model,y=new bn,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()},Ii.prototype.refreshDataBoundLinks=function(){},Ii.prototype.updateRelationshipsFromData=function(){},Ii.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=sr()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);dr(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(gr(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){Uf(y,function(ne){ne=ne.O.s;for(var se=ne.length,he=0;he<se;he++)Jp(x,ne[he])});var b=y.Hh;if(gr(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}}}}Ii.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Kn;if(gr(a))for(var E=0;E<a.length;E++)cv(this,a[E],y,b,x);else for(a=a.iterator;a.next();)cv(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new bn;for(var te=new Kn,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof Ln)a||se.fromNode!==null&&se.toNode!==null||E.add(se);else if(se instanceof Un&&se.data!==null&&x.Tl()){var he=se;se=ne.key;var ge=se.pg();ge!==null&&(ge=b.I(ge),ge!==null?(x.qe(he.data,x.wa(ge.data)),he=y.Kc(he.data),se=se.kh(),se!==null&&he!==null&&te.add(se,he)):x.qe(he.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<te.count)for(x=te.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ye=new Kn;b.each(function(Me){Me.key.data!==null&&ye.add(Me.key.data,Me.value.data)}),x(ye,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function cv(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var te=a.copyPartData(y,x);if(!(te instanceof ur))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof Un){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 Fr&&te instanceof Fr)for(y=y.memberParts;y.next();)ne=cv(a,y.value,x,b,E),ne instanceof Ln||ne===null||(ne.containingGroup=te)}else if(y instanceof Ln&&te instanceof Ln)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.toNode=ne)),y=y.labelNodes;y.next();)ne=cv(a,y.value,x,b,E),ne!==null&&ne instanceof Un&&(ne.labeledLink=te);return te}Ii.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Ln||(b=E.copyNodeData(b),xn(b)&&(E.xf(b),x=y.Lc(b)))}else ou(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 Ln||(E=y.copyNodeData(b)),xn(E)&&(x.data=E)));return x},cn.Object.defineProperties(Ii.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}}}),Ii.prototype.updateAllRelationshipsFromData=Ii.prototype.rp,Ii.prototype.findLinksByExample=Ii.prototype.ls,Ii.prototype.findNodesByExample=Ii.prototype.ms,Ii.prototype.findLinkForData=Ii.prototype.Kc,Ii.prototype.findNodeForData=Ii.prototype.ii,Ii.prototype.findPartForData=Ii.prototype.Lc,Ii.prototype.findNodeForKey=Ii.prototype.Vb,Ii.prototype.removeModeledPart=Ii.prototype.ip,Ii.prototype.removeModeledParts=Ii.prototype.Gs,Ii.prototype.rebuildParts=Ii.prototype.Wd;var pS=!1,gS=!1,mS=!1;Ii.className="PartManager";function ja(a){Ii.apply(this,arguments)}Vt(ja,Ii),ja.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ja.prototype.addModeledParts=function(a){for(Ii.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)vp(a.value);$d(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),$d(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){ou(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var te=gv(x,y,!0);te!==""&&(E.fromPortId=te),te=Dl(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof Un&&(E.fromNode=te)),te=gv(x,y,!1),te!==""&&(E.toPortId=te),te=Dl(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof Un&&(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}}}}ja.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)})}ja.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ja.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ja.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ja.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ja.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ja.prototype.findPartForKey=function(a){var y=Ii.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ja.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ja.prototype.doModelChanged=function(a){var y=this;if(Ii.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===fo){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var se=this.Kc(a.object);if(se!==null){var he=this.Vb(a.newValue);se.toNode=he}}else if(E==="linkFromPortId"){var ge=this.Kc(a.object);if(ge!==null){var ye=a.newValue;typeof ye=="string"&&(ge.fromPortId=ye)}}else if(E==="linkToPortId"){var Me=this.Kc(a.object);if(Me!==null){var _e=a.newValue;typeof _e=="string"&&(Me.toPortId=_e)}}else if(E==="nodeGroupKey"){var Ke=this.Lc(a.object);if(Ke!==null){var qe=a.newValue;if(qe!==void 0){var rt=this.Vb(qe);rt instanceof Fr?Ke.containingGroup=rt:Ke.containingGroup=null}else Ke.containingGroup=null}}else if(E==="linkLabelKeys"){var Mt=this.Kc(a.object);if(Mt!==null){var xt=a.oldValue,At=a.newValue;Array.isArray(xt)&&xt.forEach(function(mn){0<=At.indexOf(mn)||(mn=y.Vb(mn),mn!==null&&(mn.labeledLink=null))}),Array.isArray(At)&&At.forEach(function(mn){mn=y.Vb(mn),mn!==null&&(mn.labeledLink=Mt)})}}else if(E==="linkCategory"){var Ot=this.Kc(a.object),Dt=a.newValue;Ot!==null&&typeof Dt=="string"&&(Ot.category=Dt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===Xo){var _t=a.newValue;if(E==="linkDataArray"&&typeof _t=="object"&&_t!==null)yS(this,_t);else if(E==="linkLabelKeys"&&af(_t)){var Yt=this.Kc(a.object),_n=this.Vb(_t);Yt!==null&&_n!==null&&(_n.labeledLink=Yt)}x.isModified=!0}else if(b===oa){var Jn=a.oldValue;if(E==="linkDataArray"&&typeof Jn=="object"&&Jn!==null)this.ip(Jn);else if(E==="linkLabelKeys"&&af(Jn)){var Xn=this.Vb(Jn);Xn!==null&&(Xn.labeledLink=null)}x.isModified=!0}}else if(b===fo){var Mn=a.propertyName;a.object!==x.model||Mn!=="linkFromKeyProperty"&&Mn!=="linkToKeyProperty"&&Mn!=="linkFromPortIdProperty"&&Mn!=="linkToPortIdProperty"&&Mn!=="linkLabelKeysProperty"&&Mn!=="nodeIsGroupProperty"&&Mn!=="nodeGroupKeyProperty"&&Mn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ja.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new bn,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)})},ja.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 Ln){var E=Dl(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Dl(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 bn().addAll(y);var ne=new bn;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 Fr)&&(a.containingGroup=y)}}},ja.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(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 Fr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof Un&&(Dl(y,ne,!0)===x&&(te.link.fromNode=E),Dl(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}}Iu(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Fr&&(E.containingGroup=a))}},ja.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Un){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Bu(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Bu(y,x,b.data)),a instanceof Fr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Bu(y,x,b)}}},ja.prototype.copyPartData=function(a,y){var x=Ii.prototype.copyPartData.call(this,a,y);if(a instanceof Ln)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},ja.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 Ln){if(ou(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 Un&&(ou(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&&bp(te,b,te.wa(a.data),!0),Cp(te,b,se,!0),x!==null&&bp(te,b,te.wa(x.data),!1),Cp(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof Un||(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},ja.prototype.findLinkForKey=ja.prototype.findLinkForKey,ja.prototype.findPartForKey=ja.prototype.findPartForKey,ja.prototype.removeAllModeledParts=ja.prototype.removeAllModeledParts,ja.prototype.addModeledParts=ja.prototype.addModeledParts,ja.prototype.addAllModeledParts=ja.prototype.addAllModeledParts,ja.className="GraphLinksPartManager";function Zl(){Ii.apply(this,arguments),this.Sg=null}Vt(Zl,Ii);function fv(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,te=x;if(a.diagram.isTreePathToChildren||(E=x,te=y),(b===null||!bi(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(ou(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}}}Zl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Zl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Zl.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}},Zl.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))},Zl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Zl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Zl.prototype.doModelChanged=function(a){if(Ii.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===fo){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var se=ne.kh();se!==null?te===null?y.remove(se):y.isTreePathToChildren?se.fromNode=te:se.toNode=te:fv(this,te,ne)}}else if(b==="parentLinkCategory"){var he=this.ii(a.object),ge=a.newValue;if(he!==null&&typeof ge=="string"){var ye=he.kh();ye!==null&&(ye.category=ge)}}y.isModified=!0}}else if(x===fo){var Me=a.propertyName;a.object===y.model&&Me==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Zl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Un&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:fv(this,y,a):b!==null&&Vp(x,b,!1)))}}},Zl.prototype.updateDataBindings=function(a,y){Ii.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Zl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(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 Un&&y.mh(te)===x&&fv(this,E,this.ii(te))}Iu(y,x)}a=y.mh(a),a!==void 0&&E instanceof Un&&(a=this.Vb(a),fv(this,a,E))}},Zl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Un){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(oa,"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)&&Bu(y,x,E)}},Zl.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},Zl.prototype.findLinkForKey=Zl.prototype.findLinkForKey,Zl.className="TreePartManager";function er(a,y){this.kl=new bn,this.il=new bn,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,Ni(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Kn,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 Kn,this.Lt=new kn,this.Wg=!1,this.o=null,this.undoManager=new jo,a!==void 0&&(gr(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}er.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},er.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},er.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},er.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)+":"+ii(E)}}return y},er.prototype.xA=function(a){a.change!==zs&&$t("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof xa?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},er.prototype.Qv=function(a,y){var x=this,b=!1,E=new bn,te=new bn,ne=new bn,se=this.vh;a.changes.each(function(Me){Me.model===x&&(Me.modelChange==="nodeDataArray"?Me.change===Xo?E.add(Me.newValue):Me.change===oa&&ne.add(Me.oldValue):x.lb(Me.object)?te.add(Me.object):Me.change!==fo||x.modelData!==Me.object&&Me.propertyName!=="modelData"?Me.object!==null&&(se&&se.contains(Me.object)?se.get(Me.object).each(function(_e){x.lb(_e)&&te.add(_e)}):Me.object instanceof er||x.ri()&&x.Jc(Me.object)||PS(x,Me.object).each(function(_e){te.add(_e)})):b=!0)});var he=this.il;he.clear(),E.each(function(Me){he.add(x.wa(Me)),y||te.add(Me)});var ge=this.kl;ge.clear(),ne.each(function(Me){ge.add(x.wa(Me)),y&&te.add(Me)}),a=x.cloneDeep(te.Fa());var ye=null;return b&&(ye===null&&(ye={}),ye.modelData=this.cloneDeep(this.modelData)),0<he.count&&(ye===null&&(ye={}),y?ye.removedNodeKeys=he.Fa():ye.insertedNodeKeys=he.Fa()),0<a.length&&(ye===null&&(ye={}),ye.modifiedNodeData=a),0<ge.count&&(ye===null&&(ye={}),y?ye.insertedNodeKeys=ge.Fa():ye.removedNodeKeys=ge.Fa()),ge.clear(),he.clear(),ye},er.prototype.cloneDeep=function(a){return Pp(this,a,!0)};function Pp(a,y,x,b,E,te){function ne(Me,_e){se?(Me.__gohashid===void 0&&te.push(Me),b.set(Me,_e)):(Me=Jt++,b.set(Me,_e),E.set(Me,y))}if(!xn(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new Kn),se){var he=b.get(y);if(he)return he}else for(E||(E=new Kn),he=E.iterator;he.next();){var ge=he.key;if(he.value===y&&(ge=b.get(ge)))return ge}if(Array.isArray(y)){he=[],ne(y,he);for(var ye=0;ye<y.length;ye++)he.push(Pp(a,y[ye],!1,b,E,te))}else if(y instanceof Et||y instanceof pn||y instanceof on||y instanceof wr||y instanceof ar)he=y.copy(),ne(y,he);else{if(y instanceof Ri||y instanceof jn||y instanceof tn)return y;if(y instanceof kn)he=new kn().addAll(Pp(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof bn)he=new bn().addAll(Pp(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Kn)he=new Kn().addAll(Pp(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]=Pp(a,y[ye],!1,b,E,te))}return x&&te.forEach(function(Me){delete Me.__gohashid}),he}Qe=er.prototype,Qe.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Qe.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},Qe.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,xn(y)&&(a.dm(y),a.modelData=y)}Qe.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": `+of(this,this.nodeDataArray,!0)},Qe.kv=function(a){xS(this,a),a=a.nodeDataArray,gr(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 bn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new Kn,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===fo?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===Xo||te===oa)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function PS(a,y){for(var x=new bn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];dv(a,y,E,E,x)}return x}function dv(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(dv(a,y,ne,b,E))return!0}else if(xn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(dv(a,y,ne,b,E))return!0}return!1}Qe.Pv=function(a,y){var x=this,b=!1,E=new bn,te=new bn,ne=new bn,se=this.vh;a.changes.each(function(ye){ye.model===x&&(ye.modelChange==="nodeDataArray"?ye.change===Xo?E.add(ye.newValue):ye.change===oa&&ne.add(ye.oldValue):x.lb(ye.object)?te.add(ye.object):ye.change!==fo||x.modelData!==ye.object&&ye.propertyName!=="modelData"?ye.object!==null&&(se&&se.contains(ye.object)?se.get(ye.object).each(function(Me){x.lb(Me)&&te.add(Me)}):ye.object instanceof er||x.ri()&&x.Jc(ye.object)||PS(x,ye.object).each(function(Me){te.add(Me)})):b=!0)});var he=this.il;he.clear(),E.each(function(ye){he.add(x.wa(ye)),y||te.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(x.wa(ye)),y&&te.add(ye)}),a="",b&&(a+=`,
|
|
"modelData": `+hy(this,this.modelData)),0<he.count&&(a+=(y?this.Yv:this.Wv)+of(this,he.Fa(),!0)),0<te.count&&(a+=this.jy+of(this,te.Fa(),!0)),0<ge.count&&(a+=(y?this.Wv:this.Yv)+of(this,ge.Fa(),!0)),ge.clear(),he.clear(),a},Qe.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)&&$t("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Kn;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)},Qe.$x=function(a,y){a.change!==zs&&$t("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof xa?(y===void 0&&(y=Fg(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 }'},Qe.yA=function(a,y){return this.$x(a,y)},Qe.np=function(a){return a===void 0&&(a=Fg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Qe.toJSON=function(a){return this.np(a)},Qe.Zw=function(a){var y=null;if(typeof a=="string")try{y=en.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:$t("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&$t("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Qe.Ky=function(a){return this.Zw(a)},er.constructGraphLinksModel=function(){return new er},Qe=er.prototype,Qe.dm=function(a){if(gr(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(xn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:$t("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(xn(a)){for(y in a)if(x=a[y],xn(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 kn,b=0;b<x.length/2;b++)E.add(new Et(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},Qe.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()):gr(a)?of(this,a):xn(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function of(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new yi;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 As(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof Et)y={class:"go.Point",x:As(x.x),y:As(x.y)};else if(x instanceof pn)y={class:"go.Size",width:As(x.width),height:As(x.height)};else if(x instanceof on)y={class:"go.Rect",x:As(x.x),y:As(x.y),width:As(x.width),height:As(x.height)};else if(x instanceof wr)y={class:"go.Margin",top:As(x.top),right:As(x.right),bottom:As(x.bottom),left:As(x.left)};else if(x instanceof ar)x.sb()?y={class:"go.Spot",x:As(x.x),y:As(x.y),offsetX:As(x.offsetX),offsetY:As(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ri){if(y={class:"go.Brush",type:x.type.name},x.type===mc?y.color=x.color:(x.type===Xh||x.type===Kl)&&(y.start=x.start,y.end=x.end,x.type===Kl&&(x.startRadius!==0&&(y.startRadius=As(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=As(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 jn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=As(x.startX)),x.startY!==0&&(y.startY=As(x.startY)),x.endX!==0&&(y.endX=As(x.endX)),x.endY!==0&&(y.endY=As(x.endY)),x.spot1.D(La)||(y.spot1=x.spot1),x.spot2.D(Ys)||(y.spot2=x.spot2),x.type===jn.o&&(y.path=jn.ia(x))):x instanceof tn&&(y={class:"go.EnumValue",classType:Fg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=ea(y,E);if(!bS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof kn){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 js(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 Et(js(a.x),js(a.y));else if(y==="Size")x=new pn(js(a.width),js(a.height));else if(y==="Rect")x=new on(js(a.x),js(a.y),js(a.width),js(a.height));else if(y==="Margin")x=new wr(js(a.top),js(a.right),js(a.bottom),js(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Gc(a.enum):x=new ar(js(a.x),js(a.y),js(a.offsetX),js(a.offsetY));else if(y==="Brush"){if(x=new Ri,x.type=Xr(Ri,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof ar&&(x.start=a.start),a.end instanceof ar&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=js(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=js(a.endRadius)),a=a.colorStops,xn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=jn.parse(a.path):x=new jn,x.type=Xr(jn,a.type),typeof a.startX=="number"&&(x.startX=js(a.startX)),typeof a.startY=="number"&&(x.startY=js(a.startY)),typeof a.endX=="number"&&(x.endX=js(a.endX)),typeof a.endY=="number"&&(x.endY=js(a.endY)),a.spot1 instanceof ar&&(x.spot1=a.spot1),a.spot2 instanceof ar&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Xr(b,a.name)));return x}Qe.Pe=function(a){return this.Lt.add(a),this},Qe.ik=function(a){this.Lt.remove(a)},Qe.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)},Qe.cb=function(a,y,x,b,E,te,ne){da(this,"",a,y,x,b,E,te,ne)},Qe.g=function(a,y,x,b,E){da(this,"",fo,a,this,y,x,b,E)},Qe.Fs=function(a,y,x,b,E,te){da(this,"",fo,y,a,x,b,E,te)};function da(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var ge=new Lo;ge.model=a,ge.change=x,ge.modelChange=y,ge.propertyName=b,ge.object=E,ge.oldValue=te,ge.oldParam=se,ge.newValue=ne,ge.newParam=he,a.ds(ge)}er.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===fo){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)),wo(x,b,E)}else a.change===Xo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,xn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&zi(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Wi(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!gr(b)&&a.propertyName&&(b=ea(a.object,a.propertyName)),gr(b)&&typeof x=="number"&&(a=a.newValue,y?zi(b,x):Wi(b,x,a))):$t("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===oa?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,xn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Wi(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&zi(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!gr(b)&&a.propertyName&&(b=ea(a.object,a.propertyName)),gr(b)&&typeof x=="number"&&(a=a.oldValue,y?Wi(b,x,a):zi(b,x))):$t("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==zs&&$t("unknown ChangedEvent: "+a.toString())},er.prototype.Ea=function(a){return this.undoManager.Ea(a)},er.prototype.eb=function(a){return this.undoManager.eb(a)},er.prototype.Kf=function(){return this.undoManager.Kf()},er.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}},Qe=er.prototype,Qe.La=function(a,y){y===void 0&&(y=""),da(this,"SourceChanged",zs,y,a,null,null)},Qe.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=ea(a,y),y!==void 0)){if(af(y))return y;$t("Key value for node data "+a+" is not a number or a string: "+y)}}},Qe.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=ea(a,x);b!==y&&this.hc(y)===null&&(wo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),da(this,"nodeKey",fo,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else wo(a,x,y)}};function af(a){return typeof a=="number"||typeof a=="string"}Qe.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Qe.hc=function(a){return a===null&&$t("Model.findNodeDataForKey:key must not be null"),a!==void 0&&af(a)?this.kb.I(a):null},Qe.$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))){wo(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;wo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;wo(a,y,x)}}}}},Qe.xf=function(a){a!==null&&(ya(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&&$t("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Wi(a.Tc,b,y)),da(a,"nodeDataArray",Xo,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Qe.Fy=function(a){if(gr(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)},Qe.cm=function(a){a!==null&&ES(this,a,!0)};function ES(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;zi(a.Tc,b)}da(a,"nodeDataArray",oa,"nodeDataArray",a,y,null,b,null),a.qp(y)}Qe.nA=function(a){if(gr(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)},Qe.$z=function(a){if(a!==this.nodeDataArray&&gr(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()}},Qe.jp=function(a,y){y!==void 0&&(a=Og(this,a),a instanceof bn&&this.Vf.add(y,a))},Qe.Lv=function(){},Qe.fm=function(){},Qe.em=function(){},Qe.qp=function(){};function Bu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new bn,a.Vf.add(y,b)),b.add(x)}}function Iu(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof bn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function Og(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof bn?a:null)}Qe.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},er.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):pv(this,a,!0),xn(a)&&Ni(a),a};function pv(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=pv(a,y[x],a.copiesArrayObjects);b.push(E)}return Ni(b),b}if(x&&xn(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=ea(y,b),ne=Fg(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof er||te instanceof jo||te instanceof xa||te instanceof Lo||(te=pv(a,te,!1)),wo(x,b,te)}return Ni(x),x}return y instanceof Et||y instanceof pn||y instanceof on||y instanceof ar||y instanceof wr?y.copy():y}er.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,Nr('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Nr(" Is that really your intent?"));var b=ea(a,y);b!==x&&(wo(a,y,x),this.Fs(a,y,b,x))},Qe=er.prototype,Qe.set=function(a,y,x){this.setDataProperty(a,y,x)},Qe.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])}},Qe.Ay=function(a,y){this.ts(a,-1,y)},Qe.ts=function(a,y,x){0>y&&(y=a.length),Wi(a,y,x),da(this,"",Xo,"",a,null,x,null,y)},Qe.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&$t("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];zi(a,y),da(this,"",oa,"",a,x,null,y,null)},Qe.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=ea(a,y),y===void 0))return"";if(typeof y=="string")return y;$t("getCategoryForNodeData found a non-string category for "+a+": "+y)},Qe.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=ea(a,x);b===void 0&&(b=""),b!==y&&(wo(a,x,y),da(this,"nodeCategory",fo,x,a,b,y))}else wo(a,x,y)}},Qe.lm=function(a,y){this.jm(y,this.Ro(a))},Qe.Tl=function(){return!1},Qe.Wj=function(){return!1},Qe.ri=function(){return!1},Qe.xs=function(){return!1},Qe.Xj=function(){return!1};function cy(){return new er}function Fg(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 Fg(a,y.constructor);return typeof y}function fy(a){return xu[a]?xu[a]:en.go!==void 0&&en.go[a]?en.go[a]:null}function ea(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 wo(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){}}cn.Object.defineProperties(er.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===""&&$t("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&$t("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];xn(E)||$t("Model.nodeDataArray must only contain Objects, not: "+E),ya(E)}for(this.Tc=a,b=new kn,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(da(this,"nodeDataArray",fo,"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"}}}),er.prototype.setCategoryForNodeData=er.prototype.jm,er.prototype.getCategoryForNodeData=er.prototype.Ro,er.prototype.removeArrayItem=er.prototype.ov,er.prototype.insertArrayItem=er.prototype.ts,er.prototype.addArrayItem=er.prototype.Ay,er.prototype.assignAllDataProperties=er.prototype.Do,er.prototype.set=er.prototype.set,er.prototype.clearUnresolvedReferences=er.prototype.Qy,er.prototype.mergeNodeDataArray=er.prototype.$z,er.prototype.removeNodeDataCollection=er.prototype.nA,er.prototype.removeNodeData=er.prototype.cm,er.prototype.addNodeDataCollection=er.prototype.Fy,er.prototype.addNodeData=er.prototype.xf,er.prototype.makeNodeDataKeyUnique=er.prototype.$u,er.prototype.findNodeDataForKey=er.prototype.hc,er.prototype.containsNodeData=er.prototype.lb,er.prototype.setKeyForNodeData=er.prototype.km,er.prototype.getKeyForNodeData=er.prototype.wa,er.prototype.updateTargetBindings=er.prototype.La,er.prototype.commit=er.prototype.commit,er.prototype.rollbackTransaction=er.prototype.Kf,er.prototype.commitTransaction=er.prototype.eb,er.prototype.startTransaction=er.prototype.Ea,er.prototype.raiseDataChanged=er.prototype.Fs,er.prototype.raiseChanged=er.prototype.g,er.prototype.raiseChangedEvent=er.prototype.cb,er.prototype.removeChangedListener=er.prototype.ik,er.prototype.addChangedListener=er.prototype.Pe,er.prototype.writeJsonValue=er.prototype.sm,er.prototype.replaceJsonObjects=er.prototype.dm,er.prototype.applyIncrementalJSON=er.prototype.Ky,er.prototype.applyIncrementalJson=er.prototype.Zw,er.prototype.toJSON=er.prototype.toJSON,er.prototype.toJson=er.prototype.np,er.prototype.toIncrementalJSON=er.prototype.yA,er.prototype.toIncrementalJson=er.prototype.$x,er.prototype.toIncrementalData=er.prototype.xA,er.prototype.clear=er.prototype.clear;var kS=!1,xu={};er.className="Model",er.fromJSON=er.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=en.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:$t("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=en[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof er?y=a:$t("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=er.constructGraphLinksModel()),y.gp(x),y.kv(x),y},er.safePropertyValue=ea,er.safePropertySet=wo,xu.Brush=Ri,xu.ChangedEvent=Lo,xu.Geometry=jn,xu.Margin=wr,xu.Panel=Cn,xu.Point=Et,xu.Rect=on,xu.Size=pn,xu.Spot=ar,xu.Transaction=xa,xu.UndoManager=jo;function ta(a,y,x,b){Ni(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=TS,this.wk=null):(this.el=Dg,this.wk=b),this.st=new bn}ta.prototype.copy=function(){var a=new ta;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},Qe=ta.prototype,Qe.qb=function(a){a.classType===ta&&(this.mode=a)},Qe.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Qe.freeze=function(){return this._isFrozen=!0,this},Qe.ka=function(){return this._isFrozen=!1,this},Qe.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},Qe.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Qe.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function MS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Qe.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==="")Nr("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=ea(y,b)),te!==void 0)if(E===null)x!==""&&wo(a,x,te);else try{if(x!==""){var ne=E(te,a);wo(a,x,ne)}else E(te,a)}catch(se){}}}},Qe.sp=function(a,y,x,b){if(this.el===Dg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=ea(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):wo(y,x,ne);else if(he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var ge=b.itemIndex,ye=b.panel.itemArray;he.ov(ye,ge),he.ts(ye,ge,ne)}}else try{if(x!==""){var Me=te(ne,y,he);he!==null?he.setDataProperty(y,x,Me):wo(y,x,Me)}else{var _e=te(ne,y,he);if(_e!==void 0&&he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ke=b.itemIndex,qe=b.panel.itemArray;he.ov(qe,Ke),he.ts(qe,Ke,_e)}}}catch(rt){}}finally{this.st.remove(a)}}}},cn.Object.defineProperties(ta.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&cr(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&cr(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&cr(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&cr(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&cr(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&cr(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&cr(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&cr(this),this.el=a}}}),ta.prototype.updateSource=ta.prototype.sp,ta.prototype.updateTarget=ta.prototype.Mv,ta.prototype.ofModel=ta.prototype.dA,ta.prototype.ofObject=ta.prototype.cp,ta.prototype.makeTwoWay=ta.prototype.Kx;var Ox="Binding",TS=new tn(ta,"OneWay",1),Dg=new tn(ta,"TwoWay",2);ta.className="Binding",ta.parseEnum=function(a,y){return function(x){return x=Xr(a,x),x===null?y:x}},ta.toString=ii,ta.OneWay=TS,ta.TwoWay=Dg;function ai(a,y,x){er.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new bn,this.wb=new Kn,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&&(gr(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Vt(ai,er),ai.constructGraphLinksModel=er.constructGraphLinksModel,ai.prototype.cloneProtected=function(a){er.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},Qe=ai.prototype,Qe.clear=function(){er.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Qe.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)+":"+ii(E)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Dl(this,E,!0)+"-->"+Dl(this,E,!1)}return y},Qe.Qv=function(a,y){this.linkKeyProperty===""&&$t("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=er.prototype.Qv.call(this,a,y),b=this,E=new bn,te=new bn,ne=new bn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===Xo?E.add(ye.newValue):ye.change===oa&&ne.add(ye.oldValue):b.Jc(ye.object)?te.add(ye.object):ye.object!==null&&(ye.object!==null&&se&&se.contains(ye.object)?se.get(ye.object).each(function(Me){b.Jc(Me)&&te.add(Me)}):ye.object instanceof er||b.lb(ye.object)||LS(b,ye.object).each(function(Me){te.add(Me)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&te.add(ye)}),a=b.cloneDeep(te.Fa()),0<he.count&&(x===null&&(x={}),y?x.removedLinkKeys=he.Fa():x.insertedLinkKeys=he.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ge.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ge.Fa():x.removedLinkKeys=ge.Fa()),ge.clear(),he.clear(),x},Qe.rm=function(){var a=er.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},Qe.gp=function(a){er.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)},Qe.Rv=function(){var a=er.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+of(this,this.linkDataArray,!0);return a+y},Qe.kv=function(a){er.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 bn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];dv(a,y,E,E,x)}return x}Qe.Pv=function(a,y){this.linkKeyProperty===""&&$t("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=er.prototype.Pv.call(this,a,y),b=this,E=new bn,te=new bn,ne=new bn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===Xo?E.add(ye.newValue):ye.change===oa&&ne.add(ye.oldValue):b.Jc(ye.object)?te.add(ye.object):ye.object!==null&&(ye.object!==null&&se&&se.contains(ye.object)?se.get(ye.object).each(function(Me){b.Jc(Me)&&te.add(Me)}):ye.object instanceof er||b.lb(ye.object)||LS(b,ye.object).each(function(Me){te.add(Me)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var ge=this.kl;return ge.clear(),ne.each(function(ye){ge.add(b.Ac(ye)),y&&te.add(ye)}),a=x,0<he.count&&(a+=(y?this.Xv:this.Vv)+of(this,he.Fa(),!0)),0<te.count&&(a+=this.iy+of(this,te.Fa(),!0)),0<ge.count&&(a+=(y?this.Vv:this.Xv)+of(this,ge.Fa(),!0)),ge.clear(),he.clear(),a},Qe.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)&&$t("applyIncrementalJson cannot change Model properties"),er.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)},ai.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===fo){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),wo(x,b,E);return}}else if(a.change===Xo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,xn(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===oa){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,xn(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}}er.prototype.changeState.call(this,a,y)}},Qe=ai.prototype,Qe.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),wo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Qe.yx=function(a){return Dl(this,a,!0)},Qe.wv=function(a,y){bp(this,a,y,!0)},Qe.Bx=function(a){return Dl(this,a,!1)},Qe.Bv=function(a,y){bp(this,a,y,!1)};function Dl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=ea(y,a),a!==void 0))){if(af(a))return a;$t((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function bp(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=ea(y,E);te!==x&&(Iu(a,te,y),wo(y,E,x),a.hc(x)===null&&Bu(a,x,y),da(a,b?"linkFromKey":"linkToKey",fo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else wo(y,E,x)}}Qe.zx=function(a){return gv(this,a,!0)},Qe.xv=function(a,y){Cp(this,a,y,!0)},Qe.Cx=function(a){return gv(this,a,!1)},Qe.Cv=function(a,y){Cp(this,a,y,!1)};function gv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=ea(y,a),y===void 0?"":y)}function Cp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=ea(y,E);te===void 0&&(te=""),te!==x&&(wo(y,E,x),da(a,b?"linkFromPortId":"linkToPortId",fo,E,y,te,x),typeof E=="string"&&a.La(y,E))}else wo(y,E,x)}}Qe.Ef=function(a){if(a===null)return mv;var y=this.je;return y===""?mv:(a=ea(a,y),a===void 0?mv:a)},Qe.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=ea(a,x);if(b===void 0&&(b=mv),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)Iu(this,b[te],a);for(wo(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Bu(this,ne,a)}da(this,"linkLabelKeys",fo,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else wo(a,x,y)}},Qe.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=ea(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&&Bu(this,y,a),da(this,"linkLabelKeys",Xo,x,a,null,y,null,E)))}else $t(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Qe.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=ea(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Iu(this,y,a),da(this,"linkLabelKeys",oa,x,a,y,null,E,null)))}else b!==void 0&&$t(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Qe.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=ea(a,y),y!==void 0)){if(af(y))return y;$t("Key value for link data "+a+" is not a number or a string: "+y)}}},Qe.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=ea(a,x);b!==y&&this.jh(y)===null&&(wo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),da(this,"linkKey",fo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else wo(a,x,y)}},Qe.jh=function(a){return a===null&&$t("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&af(a)?this.wb.I(a):null},Qe.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))){wo(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;wo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;wo(a,y,x)}}}}},Qe.Jc=function(a){return a===null?!1:this.$f.contains(a)},Qe.fi=function(a){a!==null&&(ya(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&&$t("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)),da(a,"linkDataArray",Xo,"linkDataArray",a,null,y,null,b),dy(a,y)}Qe.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)},Qe.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(da(a,"linkDataArray",oa,"linkDataArray",a,y,null,b,null),x=Dl(a,y,!0),Iu(a,x,y),x=Dl(a,y,!1),Iu(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],Iu(a,x,y)}Qe.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)},Qe.Zz=function(a){if(this.linkKeyProperty===""&&$t("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&gr(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=Dl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Bu(a,x,y),x=Dl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Bu(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&&Bu(a,x,y)}Qe.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):pv(this,a,!0),xn(a)&&(Ni(a),this.lf!==""&&wo(a,this.lf,void 0),this.mf!==""&&wo(a,this.mf,void 0),this.je!==""&&wo(a,this.je,[])),a},Qe.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!ea(a,y)},Qe.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=ea(a,y),y!==void 0)){if(af(y))return y;$t("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Qe.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=ea(a,x);b!==y&&(Iu(this,b,a),wo(a,x,y),this.hc(y)===null&&Bu(this,y,a),da(this,"nodeGroupKey",fo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else wo(a,x,y)}},ai.prototype.copyNodeData=function(a){return a===null?null:(a=er.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||ea(a,this.Je)===void 0||wo(a,this.Je,void 0),a)},ai.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){bp(this,a,x,!0);return}if(y===this.linkToKeyProperty){bp(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Cp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Cp(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=ea(a,y);b!==x&&(wo(a,y,x),this.Fs(a,y,b,x))},Qe=ai.prototype,Qe.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&&ea(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Qe.jp=function(a,y){er.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(Dl(this,b,!0)===E){var ne=this.lf;wo(b,ne,te),da(this,"linkFromKey",fo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(Dl(this,b,!1)===E&&(ne=this.mf,wo(b,ne,te),da(this,"linkToKey",fo,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var se=ne.length,he=this.je,ge=0;ge<se;ge++)ne[ge]===E&&(ne[ge]=te,da(this,"linkLabelKeys",Xo,he,b,E,te,ge,ge))}},Qe.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;wo(a,b,x),da(this,"nodeGroupKey",fo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Qe.Lv=function(){er.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},Qe.fm=function(a){er.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=sr();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;da(this,"nodeGroupKey",fo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Dl(this,b,!0)===a&&(E=this.lf,da(this,"linkFromKey",fo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Dl(this,b,!1)===a&&(E=this.mf,da(this,"linkToKey",fo,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&&(da(this,"linkLabelKeys",Xo,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)Iu(this,a,x[y]);dr(x)}},Qe.em=function(a){er.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Bu(this,y,a)},Qe.qp=function(a){er.prototype.qp.call(this,a);var y=this.lh(a);Iu(this,y,a)},Qe.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=ea(a,y),y===void 0))return"";if(typeof y=="string")return y;$t("getCategoryForLinkData found a non-string category for "+a+": "+y)},ai.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ai.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=ea(a,x);b===void 0&&(b=""),b!==y&&(wo(a,x,y),da(this,"linkCategory",fo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else wo(a,x,y)}},ai.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Qe=ai.prototype,Qe.lm=function(a,y){er.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))}Qe.Wj=function(){return!0},Qe.ri=function(){return!0},Qe.xs=function(){return!0},Qe.Xj=function(){return!0},cn.Object.defineProperties(ai.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];xn(E)||$t("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),ya(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new kn,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 bn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,da(this,"linkDataArray",fo,"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"}}}),ai.prototype.setCategoryForLinkData=ai.prototype.lp,ai.prototype.getCategoryForLinkData=ai.prototype.ps,ai.prototype.assignAllDataProperties=ai.prototype.Do,ai.prototype.setGroupKeyForNodeData=ai.prototype.mp,ai.prototype.getGroupKeyForNodeData=ai.prototype.lh,ai.prototype.isGroupForNodeData=ai.prototype.Yu,ai.prototype.copyLinkData=ai.prototype.Jo,ai.prototype.mergeLinkDataArray=ai.prototype.Zz,ai.prototype.removeLinkDataCollection=ai.prototype.lA,ai.prototype.removeLinkData=ai.prototype.bm,ai.prototype.addLinkDataCollection=ai.prototype.Ey,ai.prototype.addLinkData=ai.prototype.fi,ai.prototype.containsLinkData=ai.prototype.Jc,ai.prototype.makeLinkDataKeyUnique=ai.prototype.Bs,ai.prototype.findLinkDataForKey=ai.prototype.jh,ai.prototype.setKeyForLinkData=ai.prototype.Ks,ai.prototype.getKeyForLinkData=ai.prototype.Ac,ai.prototype.removeLabelKeyForLinkData=ai.prototype.Qx,ai.prototype.addLabelKeyForLinkData=ai.prototype.Bu,ai.prototype.setLabelKeysForLinkData=ai.prototype.Ls,ai.prototype.getLabelKeysForLinkData=ai.prototype.Ef,ai.prototype.setToPortIdForLinkData=ai.prototype.Cv,ai.prototype.getToPortIdForLinkData=ai.prototype.Cx,ai.prototype.setFromPortIdForLinkData=ai.prototype.xv,ai.prototype.getFromPortIdForLinkData=ai.prototype.zx,ai.prototype.setToKeyForLinkData=ai.prototype.Bv,ai.prototype.getToKeyForLinkData=ai.prototype.Bx,ai.prototype.setFromKeyForLinkData=ai.prototype.wv,ai.prototype.getFromKeyForLinkData=ai.prototype.yx,ai.prototype.clear=ai.prototype.clear;var mv=Object.freeze([]);ai.className="GraphLinksModel",xu.GraphLinksModel=ai,er.constructGraphLinksModel=er.constructGraphLinksModel=function(){return new ai},er.initDiagramModel=cy=function(){return new ai};function Os(a,y){er.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(gr(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Vt(Os,er),Os.constructGraphLinksModel=er.constructGraphLinksModel,Os.prototype.cloneProtected=function(a){er.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Qe=Os.prototype,Qe.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)+":"+ii(E)}}return y},Qe.rm=function(){var a=er.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Qe.gp=function(a){er.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Qe.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&$t("applyIncrementalJson cannot change Model properties"),er.prototype.fp.call(this,a)},Qe.Vl=function(a){return a},Qe.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=ea(a,y),y!==void 0)){if(af(y))return y;$t("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Qe.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=ea(a,x);b!==y&&(Iu(this,b,a),wo(a,x,y),this.hc(y)===null&&Bu(this,y,a),da(this,"nodeParentKey",fo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else wo(a,x,y)}},Qe.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=ea(a,y),y===void 0)?"":typeof y=="string"?y:($t("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Os.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Os.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=ea(a,x);b===void 0&&(b=""),b!==y&&(wo(a,x,y),da(this,"parentLinkCategory",fo,x,a,b,y),typeof x=="string"&&this.La(a,x))}else wo(a,x,y)}},Os.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Os.prototype.copyNodeData=function(a){return a===null?null:(a=er.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||ea(a,this.Ke)===void 0||wo(a,this.Ke,void 0),a)},Os.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=ea(a,y);b!==x&&(wo(a,y,x),this.Fs(a,y,b,x))},Qe=Os.prototype,Qe.jp=function(a,y){er.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Qe.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;wo(a,b,x),da(this,"nodeParentKey",fo,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Qe.fm=function(a){er.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=sr();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;da(this,"nodeParentKey",fo,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Iu(this,a,x[y]);dr(x)}},Qe.em=function(a){er.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Bu(this,y,a)},Qe.qp=function(a){er.prototype.qp.call(this,a);var y=this.mh(a);Iu(this,y,a)},Qe.lm=function(a,y){er.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Qe.Tl=function(){return!0},Qe.xs=function(){return!0},cn.Object.defineProperties(Os.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"}}}),Os.prototype.setParentLinkCategoryForNodeData=Os.prototype.Ms,Os.prototype.getParentLinkCategoryForNodeData=Os.prototype.ss,Os.prototype.setParentKeyForNodeData=Os.prototype.qe,Os.prototype.getParentKeyForNodeData=Os.prototype.mh,Os.className="TreeModel",xu.TreeModel=Os;function Do(a){ko.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=wu,this.Ti=0,this.Zv=new Et,this.Jp=this.me=0,this.Xr=new _g,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=wu,this.K=Fs,this.nd=kp,this.hd=oy,this.tf=6,this.Nn=bv,a&&Object.assign(this,a)}Vt(Do,ko),Do.prototype.cloneProtected=function(a){ko.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},Do.prototype.qb=function(a){a.classType===Do?a===wv||a===Pv||a===Sv||a===xv||a===kp?this.sorting=a:a===Xf||a===Ep||a===Fs||a===lf?this.direction=a:a===Cc||a===sf||a===wu||a===Pu?this.arrangement=a:(a===Ld||a===bv)&&(this.nodeDiameterFormula=a):ko.prototype.qb.call(this,a)},Do.prototype.createNetwork=function(){return new Mp(this)},Do.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 kn;y.addAll(a.iterator),a=new kn;var x=new kn,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,ge=this.radius;(!isFinite(ge)||0>=ge)&&(ge=NaN);var ye=this.aspectRatio;(!isFinite(ye)||0>=ye)&&(ye=1);var Me=this.startAngle;isFinite(Me)||(Me=0);var _e=this.sweepAngle;if((!isFinite(_e)||360<_e||1>_e)&&(_e=360),y=this.spacing,isFinite(y)||(y=NaN),se===Pu&&he===Ld?se=wu:se===Pu&&he!==Ld&&(se=this.arrangement),(this.direction===Xf||this.direction===Ep)&&this.sorting!==kp){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===Xf?(this.arrangement===Pu&&a.reverse(),b=new kn,b.addAll(a),b.addAll(x)):(this.arrangement===Pu&&x.reverse(),b=new kn,b.addAll(x),b.addAll(a))}he=b.length;for(var Ke=te=E=0;Ke<b.length;Ke++){var qe=Me+_e*te*(this.direction===Fs?1:-1)/he,rt=b.M(Ke).diameter;isNaN(rt)&&(rt=uf(b.M(Ke),qe)),360>_e&&(Ke===0||Ke===b.length-1)&&(rt/=2),E+=rt,te++}if(isNaN(ge)||se===Pu){if(isNaN(y)&&(y=6),se!==wu&&se!==Pu){for(te=-1/0,ne=0;ne<he;ne++)Ke=b.M(ne),E=b.M(ne===he-1?0:ne+1),isNaN(Ke.diameter)&&uf(Ke,0),isNaN(E.diameter)&&uf(E,0),te=Math.max(te,(Ke.diameter+E.diameter)/2);ne=te+y,se===Cc?ge=(te+y)/(2*Math.PI/he):ge=vv(this,ne*(360<=_e?he:he-1),ye,Me*Math.PI/180,_e*Math.PI/180)}else ge=vv(this,E+(360<=_e?he:he-1)*(se!==Pu?y:1.6*y),ye,Me*Math.PI/180,_e*Math.PI/180);te=ge*ye}else if(te=ge*ye,Ke=py(this,ge,te,Me*Math.PI/180,_e*Math.PI/180),isNaN(y))(se===wu||se===Pu)&&(y=(Ke-E)/(360<=_e?he:he-1));else if(se===wu||se===Pu)Ke=(Ke-E)/(360<=_e?he:he-1),Ke<y?(ge=vv(this,E+y*(360<=_e?he:he-1),ye,Me*Math.PI/180,_e*Math.PI/180),te=ge*ye):y=Ke;else{for(ne=-1/0,E=0;E<he;E++)qe=b.M(E),rt=b.M(E===he-1?0:E+1),isNaN(qe.diameter)&&uf(qe,0),isNaN(rt.diameter)&&uf(rt,0),ne=Math.max(ne,(qe.diameter+rt.diameter)/2);ne+=y,E=vv(this,ne*(360<=_e?he:he-1),ye,Me*Math.PI/180,_e*Math.PI/180),E>ge?(ge=E,te=ge*ye):ne=Ke/(360<=_e?he:he-1)}if(this.kw=se,this.lc=ge,this.Zm=ye,this.lw=Me,this.Wp=_e,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,se=this.lc,ge=this.lw,ye=this.Wp,Me=this.Ti,_e=this.me,he=this.Jp,this.direction!==Xf&&this.direction!==Ep||b!==Pu)if(this.direction===Xf||this.direction===Ep){switch(ne=0,b){case sf:ne=180*yv(this,se,_e,ge,he)/Math.PI;break;case wu:he=y=0,ne=a.first(),ne!==null&&(y=uf(ne,Math.PI/2)),ne=x.first(),ne!==null&&(he=uf(ne,Math.PI/2)),ne=180*yv(this,se,_e,ge,Me+(y+he)/2)/Math.PI;break;case Cc:ne=ye/y.length}if(this.direction===Xf){switch(b){case sf:Ig(this,a,ge,lf);break;case wu:Bg(this,a,ge,lf);break;case Cc:Rg(this,a,ye/2,ge,lf)}switch(b){case sf:Ig(this,x,ge+ne,Fs);break;case wu:Bg(this,x,ge+ne,Fs);break;case Cc:Rg(this,x,ye/2,ge+ne,Fs)}}else{switch(b){case sf:Ig(this,x,ge,lf);break;case wu:Bg(this,x,ge,lf);break;case Cc:Rg(this,x,ye/2,ge,lf)}switch(b){case sf:Ig(this,a,ge+ne,Fs);break;case wu:Bg(this,a,ge+ne,Fs);break;case Cc:Rg(this,a,ye/2,ge+ne,Fs)}}}else switch(b){case sf:Ig(this,y,ge,this.direction);break;case wu:Bg(this,y,ge,this.direction);break;case Cc:Rg(this,y,ye,ge,this.direction);break;case Pu:OS(this,y,ye,ge,this.direction)}else OS(this,y,ye,ge-ye/2,Fs)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Rg(a,y,x,b,E){var te=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var ge=b+(E===Fs?he*x/(360<=te?se:se-1):-(he*x)/se),ye=y.M(he),Me=ne*Math.tan(ge)/a;Me=Math.sqrt((ne*ne+a*a*Me*Me)/(1+Me*Me)),ye.centerX=Me*Math.cos(ge),ye.centerY=Me*Math.sin(ge),ye.actualAngle=180*ge/Math.PI}}function Bg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Ti;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var ge=y.M(he),ye=y.M(he===se-1?0:he+1),Me=te*Math.sin(x);ge.centerX=E*Math.cos(x),ge.centerY=Me,ge.actualAngle=180*x/Math.PI,isNaN(ge.diameter)&&uf(ge,0),isNaN(ye.diameter)&&uf(ye,0),ge=yv(a,E,te,b===Fs?x:-x,(ge.diameter+ye.diameter)/2+ne),x+=b===Fs?ge:-ge}}function Ig(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var ge=y.M(he);ge.centerX=E*Math.cos(x),ge.centerY=te*Math.sin(x),ge.actualAngle=180*x/Math.PI,ge=yv(a,E,te,b===Fs?x:-x,ne),x+=b===Fs?ge:-ge}}function OS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new _g,360>x){for(te=b+(E===Fs?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,DS(a,y,x,b,E)}else FS(a,y,x,b,E);a.Xr.commit(y)}function FS(a,y,x,b,E){var te=a.lc,ne=a.Ti,se=a.Zm,he=te*Math.cos(b*Math.PI/180),ge=a.me*Math.sin(b*Math.PI/180),ye=y.Fa();if(ye.length===3)ye[0].centerX=te,ye[0].centerY=0,ye[1].centerX=ye[0].centerX-ye[0].width/2-ye[1].width/2-ne,ye[1].y=ye[0].y,ye[2].centerX=(ye[0].centerX+ye[1].centerX)/2,ye[2].y=ye[0].y-ye[2].height-ne;else if(ye.length===4)ye[0].centerX=te,ye[0].centerY=0,ye[2].centerX=-ye[0].centerX,ye[2].centerY=ye[0].centerY,ye[1].centerX=0,ye[1].y=Math.min(ye[0].y,ye[2].y)-ye[1].height-ne,ye[3].centerX=0,ye[3].y=Math.max(ye[0].y+ye[0].height+ne,ye[2].y+ye[2].height+ne);else{te=Et.alloc();for(var Me=0;Me<ye.length&&(ye[Me].centerX=he,ye[Me].centerY=ge,!(Me>=ye.length-1));Me++)RS(a,he,ge,ye,Me,E,te)||BS(a,he,ge,ye,Me,E,te),he=te.x,ge=te.y;if(Et.free(te),a.mj++,!(23<a.mj)){he=ye[0].centerX,ge=ye[0].centerY,te=ye[ye.length-1].centerX,Me=ye[ye.length-1].centerY;var _e=Math.abs(he-te)-((ye[0].width+ye[ye.length-1].width)/2+ne),Ke=Math.abs(ge-Me)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(Ke)?Math.abs(he-te)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<Ke?Ke:1>Math.abs(_e)?0:_e,he=Math.abs(te)>Math.abs(Me)?0<te!=ge>Me:0<Me!=he<te,(he=E===Fs?he:!he)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ye[ye.length-1].width),ne=Math.min(ne,-ye[ye.length-1].height)),a.Xr.compare(ne,ye),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ye.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*se,FS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var te=a.lc,ne=a.me,se=a.Zm,he=te*Math.cos(b*Math.PI/180),ge=ne*Math.sin(b*Math.PI/180),ye=Et.alloc(),Me=y.Fa(),_e=0;_e<Me.length&&(Me[_e].centerX=he,Me[_e].centerY=ge,!(_e>=Me.length-1));_e++)RS(a,he,ge,Me,_e,E,ye)||BS(a,he,ge,Me,_e,E,ye),he=ye.x,ge=ye.y;if(Et.free(ye),a.mj++,!(23<a.mj)){if(he=Math.atan2(ge,he),he=E===Fs?a.gt-he:he-a.gt,he=Math.abs(he)<Math.abs(he-2*Math.PI)?he:he-2*Math.PI,te=he*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],he=0;he<Me.length;he++)ne.mk[he]=Me[he].bounds.x,ne.tm[he]=Me[he].bounds.y;1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):a.lc-(0<te?1.7:-2.3),a.me=a.lc*se,DS(a,y,x,b,E))}}function RS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,ge=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ye=!1;if(0<=x!=(te===Fs)){if(te=y+a,te>se){if(te=y-a,te<-se)return ne.x=te,ne.y=ge,!1;ye=!0}}else if(te=y-a,te<-se){if(te=y+a,te>se)return ne.x=te,ne.y=ge,!1;ye=!0}return ge=Math.sqrt(1-Math.min(1,te*te/(se*se)))*he,0>x!==ye&&(ge=-ge),Math.abs(x-ge)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=ge,!1):(ne.x=te,ne.y=ge,!0)}function BS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,ge=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===Fs)){if(te=x-a,te<-he){if(te=x+a,te>he){ne.x=ge,ne.y=te;return}b=!0}}else if(te=x+a,te>he){if(te=x-a,te<-he){ne.x=ge,ne.y=te;return}b=!0}ge=Math.sqrt(1-Math.min(1,te*te/(he*he)))*se,0>y!==b&&(ge=-ge),ne.x=ge,ne.y=te}Do.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Do.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 Et(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))},Do.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var te=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,se=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),he=0,ge=0;ge<=te;ge++){b!==void 0&&E!==void 0?he=b+ge*E/te:he=ge*Math.PI/(2*te);var ye=Math.sin(he);ne+=Math.sqrt(1-a*a*ye*ye)*se}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function vv(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function yv(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var te=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var se=0;;se++){var he=Math.sin(b+se*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*he*he)*a,ne>=E)return se*a}}Do.prototype.sort=function(a){switch(this.sorting){case Sv:break;case xv:a.reverse();break;case wv:a.sort(this.comparer);break;case Pv:a.sort(this.comparer),a.reverse();break;case kp:return this.ak(Fx(a));default:$t("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new kn;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}Do.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 kn;for(var he=0,ge=0;ge<y.length;ge++){var ye=y[ge].length;if(ye===1)b.push(ge);else if(ye===0)E.add(a.M(ge));else{if(he===0)x.push(ge);else{for(var Me=ye=1/0,_e=-1,Ke=[],qe=0;qe<x.length;qe++)0>y[x[qe]].indexOf(x[qe===x.length-1?0:qe+1])&&Ke.push(qe===x.length-1?0:qe+1);if(Ke.length===0)for(qe=0;qe<x.length;qe++)Ke.push(qe);for(qe=0;qe<Ke.length;qe++){for(var rt=Ke[qe],Mt=y[ge],xt=0,At=0;At<ne.length;At++){var Ot=te[ne[At]],Dt=te[se[At]];if(Ot<Dt){var _t=Ot;Ot=Dt}else _t=Dt;if(_t<rt&&rt<=Ot)for(Dt=0;Dt<Mt.length;Dt++){var Yt=Mt[Dt];0>x.indexOf(Yt)||_t<te[Yt]&&te[Yt]<Ot||_t===te[Yt]||Ot===te[Yt]||xt++}else for(Dt=0;Dt<Mt.length;Dt++)Yt=Mt[Dt],0>x.indexOf(Yt)||_t<te[Yt]&&te[Yt]<Ot&&_t!==te[Yt]&&Ot!==te[Yt]&&xt++}for(Mt=xt,At=xt=0;At<y[ge].length;At++)_t=x.indexOf(y[ge][At]),0<=_t&&(_t=Math.abs(rt-(_t>=rt?_t+1:_t)),xt+=_t<x.length+1-_t?_t:x.length+1-_t);for(At=0;At<ne.length;At++)_t=te[ne[At]],Ot=te[se[At]],_t>=rt&&_t++,Ot>=rt&&Ot++,_t>Ot&&(Dt=Ot,Ot=_t,_t=Dt),Ot-_t<(x.length+2)/2==(_t<rt&&rt<=Ot)&&xt++;(Mt<ye||Mt===ye&&xt<Me)&&(ye=Mt,Me=xt,_e=rt)}for(x.splice(_e,0,ge),ye=0;ye<x.length;ye++)te[x[ye]]=ye;for(ye=0;ye<y[ge].length;ye++)Me=y[ge][ye],0<=x.indexOf(Me)&&(ne.push(ge),se.push(Me))}he++}}for(ne=x.length;;){for(te=!0,se=0;se<b.length;se++)if(he=b[se],ge=y[he][0],ye=x.indexOf(ge),0<=ye){for(_e=Me=0;_e<y[ge].length;_e++)Ke=x.indexOf(y[ge][_e]),0>Ke||Ke===ye||(qe=Ke>ye?Ke-ye:ye-Ke,Me+=Ke<ye!=qe>ne-qe?1:-1);x.splice(0>Me?ye:ye+1,0,he),b.splice(se,1),se--}else te=!1;if(te)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},cn.Object.defineProperties(Do.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!==Pu&&a!==wu&&a!==sf&&a!==Cc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Fs&&a!==lf&&a!==Xf&&a!==Ep||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==Sv&&a!==xv&&a!==wv&&!Pv&&a!==kp||(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!==bv&&a!==Ld||(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 wu=new tn(Do,"ConstantSpacing",0),sf=new tn(Do,"ConstantDistance",1),Cc=new tn(Do,"ConstantAngle",2),Pu=new tn(Do,"Packed",3),Fs=new tn(Do,"Clockwise",4),lf=new tn(Do,"Counterclockwise",5),Xf=new tn(Do,"BidirectionalLeft",6),Ep=new tn(Do,"BidirectionalRight",7),Sv=new tn(Do,"Forwards",8),xv=new tn(Do,"Reverse",9),wv=new tn(Do,"Ascending",10),Pv=new tn(Do,"Descending",11),kp=new tn(Do,"Optimized",12),bv=new tn(Do,"Pythagorean",13),Ld=new tn(Do,"Circular",14);Do.className="CircularLayout",Do.ConstantSpacing=wu,Do.ConstantDistance=sf,Do.ConstantAngle=Cc,Do.Packed=Pu,Do.Clockwise=Fs,Do.Counterclockwise=lf,Do.BidirectionalLeft=Xf,Do.BidirectionalRight=Ep,Do.Forwards=Sv,Do.Reverse=xv,Do.Ascending=wv,Do.Descending=Pv,Do.Optimized=kp,Do.Pythagorean=bv,Do.Circular=Ld;function _g(){this.Pl=-1/0,this.tm=this.mk=null}_g.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},_g.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]}},_g.className="VertexArrangement";function Mp(a){no.call(this,a)}Vt(Mp,no),Mp.prototype.createVertex=function(){return new zg(this)},Mp.prototype.createEdge=function(){return new Cv(this)},Mp.className="CircularNetwork";function zg(a){va.call(this,a),this.u=this.Si=NaN}Vt(zg,va);function uf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Pu)if(x.nodeDiameterFormula===Ld)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===Ld?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}cn.Object.defineProperties(zg.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),zg.className="CircularVertex";function Cv(a){yl.call(this,a)}Vt(Cv,yl),Cv.className="CircularEdge";function Za(a){ko.call(this),this.ah=null,this.An=0,this.$d=new pn(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)}Vt(Za,ko),Za.prototype.cloneProtected=function(a){ko.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},Za.prototype.createNetwork=function(){return new Nd(this)},Za.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}IS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var se=ne.count,he=!0;te=E=0;for(var ge=sr(),ye=0;ye<se+y.vertexes.count+2;ye++)ge[ye]=null;se=0,ne.reset();for(var Me=on.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Me),he)he=!1,E=Me.x+Me.width/2,te=Me.y+Me.height/2,ge[0]=new Et(Me.x+Me.width+b.width,Me.y),ge[1]=new Et(Me.x,Me.y+Me.height+b.height),se=2;else{var _e=_S(ge,se,E,te,Me.width,Me.height,b),Ke=ge[_e],qe=new Et(Ke.x+Me.width+b.width,Ke.y),rt=new Et(Ke.x,Ke.y+Me.height+b.height);for(_e+1<se&&ge.splice(_e+1,0,null),ge[_e]=qe,ge[_e+1]=rt,se++,_e=Ke.x-Me.x,Ke=Ke.y-Me.y,ye=ye.vertexes.iterator;ye.next();)qe=ye.value,qe.centerX+=_e,qe.centerY+=Ke}for(on.free(Me),ye=y.vertexes.iterator;ye.next();)ne=ye.value,_e=ne.bounds,2>se?(E=_e.x+_e.width/2,te=_e.y+_e.height/2,ge[0]=new Et(_e.x+_e.width+b.width,_e.y),ge[1]=new Et(_e.x,_e.y+_e.height+b.height),se=2):(he=_S(ge,se,E,te,_e.width,_e.height,b),Me=ge[he],Ke=new Et(Me.x+_e.width+b.width,Me.y),_e=new Et(Me.x,Me.y+_e.height+b.height),he+1<se&&ge.splice(he+1,0,null),ge[he]=Ke,ge[he+1]=_e,se++,ne.centerX=Me.x+ne.width/2,ne.centerY=Me.y+ne.height/2);for(dr(ge),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}GS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Za.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},Za.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 IS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Rx(a,y),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,IS(a,y+1,x),GS(a,te),Bx(a,E),y=E.vertexes.Fa(),y.sort(function(ne,se){return ne===null||se===null||ne===se?0:se.Vd-ne.Vd}),x=0;x<y.length;x++)Ix(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 Rx(a,y){for(var x=a.network,b=new Nd(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 kn),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 kn,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new kn,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,Ht.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var he=E.Hj;if(he!==null&&0<he.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var ge=se=0,ye=he.count-ne;ye<he.count;ye++){var Me=he.M(ye),_e=null;for(te=Me.edges.iterator;te.next();){var Ke=te.value;if(Ke.Ax(Me)===E){_e=Ke;break}}_e!==null&&(ge+=_e.length,se+=Me.width*Me.height)}te=E.centerX,he=E.centerY,ye=E.width,Me=E.height,_e=E.focus,Ke=ye*Me,1>Ke&&(Ke=1),se=Ht.sqrt((se+Ke+ge*ge*4/(ne*ne))/Ke),ne=(se-1)*ye/2,se=(se-1)*Me/2,E.bounds=new on(te-_e.x-ne,he-_e.y-se,ye+2*ne,Me+2*se),E.focus=new Et(_e.x+ne,_e.y+se)}}return a.network=b,x}function Bx(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var te=E.Sv,ne=E.Tv;b.bounds=new on(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new Et(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Ix(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var 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=Ht.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,ge=0,ye=y.vertexes.iterator;ye.next();){var Me=ye.value;1>=Me.Vd?he++:(se=!0,ge++,ne+=Math.atan2(y.centerY-Me.centerY,y.centerX-Me.centerX))}if(he!==0){for(0<ge&&(ne/=ge),ge=y=0,y=se?2*Math.PI/(he+1):2*Math.PI/he,he%2===0&&(ge=y/2),1<x.count&&x.sort(function(Ke,qe){return Ke===null||qe===null||Ke===qe?0:qe.width*qe.height-Ke.width*Ke.height}),se=he%2===0?0:1,x=x.iterator;x.next();)if(he=x.value,!(1<he.Vd||a.isFixed(he))){for(ye=null,Me=he.edges.iterator;Me.next();){ye=Me.value;break}Me=he.width;var _e=he.height;Me=Ht.sqrt(Me*Me+_e*_e)/2,ye=te+ye.length+Me,Me=ne+(y*(se/2>>1)+ge)*(se%2===0?1:-1),he.centerX=b+ye*Math.cos(Me),he.centerY=E+ye*Math.sin(Me),se++}}}}function _S(a,y,x,b,E,te,ne){var se=9e19,he=-1,ge=0;e:for(;ge<y;ge++){var ye=a[ge],Me=ye.x-x,_e=ye.y-b;if(Me=Me*Me+_e*_e,Me<se){for(_e=ge-1;0<=_e;_e--)if(a[_e].y>ye.y&&a[_e].x-ye.x<E+ne.width)continue e;for(_e=ge+1;_e<y;_e++)if(a[_e].x>ye.x&&a[_e].y-ye.y<te+ne.height)continue e;he=ge,se=Me}}return he}Za.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Za.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,Ht.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Ht.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,Ht.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,Ht.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(rt,Mt){return rt===null||Mt===null||rt===Mt?0:rt.centerX-Mt.centerX}):y.sort(function(rt,Mt){return rt===null||Mt===null||rt===Mt?0:rt.centerY-Mt.centerY}),x=a.Zf;var ge=b=se=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,se=ne.focus,he=b.x+se.x;var ye=b.y+se.y;b=ne.charge*a.electricalFieldX(he,ye),ge=ne.charge*a.electricalFieldY(he,ye),b+=ne.mass*a.gravitationalFieldX(he,ye),ge+=ne.mass*a.gravitationalFieldY(he,ye),ne.forceX+=b,ne.forceY+=ge;for(var Me=te+1;Me<y.length;Me++){var _e=y[Me];if(_e!==ne){b=_e.bounds,se=_e.focus,ge=b.x+se.x;var Ke=b.y+se.y;if(he-ge>x||ge-he>x){if(E)break}else if(ye-Ke>x||Ke-ye>x){if(!E)break}else{var qe=zS(ne,_e);1>qe?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new Ev),qe=b.random(),se=b.random(),he>ge?(b=Math.abs(_e.bounds.right-ne.bounds.x),b=(1+b)*qe):he<ge?(b=Math.abs(_e.bounds.x-ne.bounds.right),b=-(1+b)*qe):(b=Math.max(_e.width,ne.width),b=(1+b)*qe-b/2),ye>Ke?(ge=Math.abs(_e.bounds.bottom-ne.bounds.y),ge=(1+ge)*se):he<ge?(ge=Math.abs(_e.bounds.y-ne.bounds.bottom),ge=-(1+ge)*se):(ge=Math.max(_e.height,ne.height),ge=(1+ge)*se-ge/2)):(se=-(ne.charge*_e.charge)/(qe*qe),b=(ge-he)/qe*se,ge=(Ke-ye)/qe*se),ne.forceX+=b,ne.forceY+=ge,_e.forceX-=b,_e.forceY-=ge}}}}for(E=a.network.edges.iterator;E.next();)se=E.value,x=se.fromVertex,te=se.toVertex,ne=x.bounds,he=x.focus,b=ne.x+he.x,ne=ne.y+he.y,ye=te.bounds,Me=te.focus,he=ye.x+Me.x,ye=ye.y+Me.y,Me=zS(x,te),1>Me?(Me=a.randomNumberGenerator,Me===null&&(a.randomNumberGenerator=Me=new Ev),se=Me.random(),Me=Me.random(),b=(b>he?1:-1)*(1+(te.width>x.width?te.width:x.width))*se,ge=(ne>ye?1:-1)*(1+(te.height>x.height?te.height:x.height))*Me):(se=se.stiffness*(Me-se.length),b=(he-b)/Me*se,ge=(ye-ne)/Me*se),x.forceX+=b,x.forceY+=ge,te.forceX-=b,te.forceY-=ge;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}Za.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},Za.prototype.moveFixedVertex=function(){},Za.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Za.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=za,y.toSpot=za)}},Za.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=on.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,on.free(x)}x=on.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()}on.free(x)},Za.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Za.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Za.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Za.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Za.prototype.electricalFieldX=function(){return 0},Za.prototype.electricalFieldY=function(){return 0},Za.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Za.prototype.gravitationalFieldX=function(){return 0},Za.prototype.gravitationalFieldY=function(){return 0},Za.prototype.isFixed=function(a){return a.isFixed},cn.Object.defineProperties(Za.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"&&$t('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())}}}),Za.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Nd(a){no.call(this,a)}Vt(Nd,no),Nd.prototype.createVertex=function(){return new Gg(this)},Nd.prototype.createEdge=function(){return new Ug(this)},Nd.className="ForceDirectedNetwork";function Gg(a){va.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}Vt(Gg,va),cn.Object.defineProperties(Gg.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)}}}),Gg.className="ForceDirectedVertex";function Ug(a){yl.call(this,a),this.j=this.o=NaN}Vt(Ug,yl),cn.Object.defineProperties(Ug.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)}}}),Ug.className="ForceDirectedEdge";function Ev(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}Ev.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},Ev.className="RandomNumberGenerator";function _i(a){ko.call(this),this.kc=this.ie=25,this.K=0,this.Dk=Nv,this.Zk=Av,this.Qk=jv,this.bj=4,this.rk=Ov,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 Et,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Vt(_i,ko),_i.prototype.cloneProtected=function(a){ko.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},_i.prototype.qb=function(a){a.classType===_i?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:$t("Unknown enum value: "+a):ko.prototype.qb.call(this,a)},_i.prototype.createNetwork=function(){return new Lp(this)},_i.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!==Wg&&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===Wg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,te=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||te.node===null&&te.data===null)&&E.layer===te.layer)){var ne=0,se=0,he=0,ge=0;if(b.link!==null){if(se=b.link,se===null)continue;var ye=E.node;if(ne=te.node,ye===null||ne===null)continue;var Me=se.fromNode;he=se.toNode;for(var _e=se.fromPort;_e!==null&&!_e.Ed();)_e=_e.panel;for(se=se.toPort;se!==null&&!se.Ed();)se=se.panel;if(b.rev){ge=Me;var Ke=_e;Me=he,_e=se,he=ge,se=Ke}var qe=E.focus;ge=te.focus;var rt=b.rev?te.bounds:E.bounds;Ke=Et.alloc(),ye!==Me?rt.w()&&Me.isVisible()?Me.actualBounds.w()?(Sc(Me,_e,vi,Ke),Ke.x+=Me.actualBounds.x-rt.x,Ke.y+=Me.actualBounds.y-rt.y):(Sc(Me,_e,vi,Ke),Ke.w()||Ke.assign(qe)):Ke.assign(qe):rt.w()?(Sc(Me,_e,vi,Ke),Ke.w()||Ke.assign(qe)):Ke.assign(qe),Me=b.rev?E.bounds:te.bounds,ye=Et.alloc(),ne!==he?Me.w()&&he.isVisible()?he.actualBounds.w()?(Sc(he,se,vi,ye),ye.x+=he.actualBounds.x-Me.x,ye.y+=he.actualBounds.y-Me.y):(Sc(he,se,vi,ye),ye.w()||ye.assign(ge)):ye.assign(ge):Me.w()?(Sc(he,se,vi,ye),ye.w()||ye.assign(ge)):ye.assign(ge),this.K===90||this.K===270?(ne=Math.round((Ke.x-qe.x)/this.kc),he=Ke.x,se=Math.round((ye.x-ge.x)/this.kc),ge=ye.x):(ne=Math.round((Ke.y-qe.y)/this.kc),he=Ke.y,se=Math.round((ye.y-ge.y)/this.kc),ge=ye.y),Et.free(Ke),Et.free(ye),b.portFromColOffset=ne,b.portFromPos=he,b.portToColOffset=se,b.portToPos=ge}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ke=E.layer,ye=te.layer,Me=0,rt=b.link,rt!==null){var Mt=rt.fromPort,xt=rt.toPort;if(Mt!==null&&xt!==null){var At=rt.fromNode;if(_e=rt.toNode,At!==null&&_e!==null){var Ot=Lv(this,!0),Dt=Lv(this,!1),_t=this.setsPortSpots?Ot:rt.computeSpot(!0,Mt);qe=this.setsPortSpots?Dt:rt.computeSpot(!1,xt);var Yt=rt.isOrthogonal;_t.$c()&&_t.Hf(Dt)&&qe.$c()&&qe.Hf(Ot)?Me=0:(Ot=rt.getLinkPoint(At,Mt,_t,!0,Yt,_e,xt,Et.alloc()),Dt=rt.getLinkDirection(At,Mt,Ot,_t,!0,Yt,_e,xt),Et.free(Ot),_t.ys()||Dt!==JS(this,b,!0)?this.setsPortSpots&&At!==null&&At.ports.count===1&&b.rev&&(Me+=1):Me+=1,_t=rt.getLinkPoint(_e,xt,qe,!1,Yt,At,Mt,Et.alloc()),rt=rt.getLinkDirection(_e,xt,_t,qe,!1,Yt,At,Mt),Et.free(_t),qe.ys()||rt!==JS(this,b,!1)?this.setsPortSpots&&_e!==null&&_e.ports.count===1&&b.rev&&(Me+=2):Me+=2)}}}if(_e=Me,Me=_e===1||_e===3,(_e=_e===2||_e===3)&&(qe=a.createVertex(),qe.node=null,qe.Dj=1,qe.layer=Ke,qe.near=E,a.dh(qe),E=a.Zj(E,qe,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=qe),rt=1,Me&&rt--,Ke-ye>rt&&0<Ke){for(b.valid=!1,qe=a.createVertex(),qe.node=null,qe.Dj=2,qe.layer=Ke-1,a.dh(qe),E=a.Zj(E,qe,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=_e?0:ne,E.portToColOffset=0,E.portFromPos=_e?0:he,E.portToPos=0,E=qe,Ke--;Ke-ye>rt&&0<Ke;)qe=a.createVertex(),qe.node=null,qe.Dj=3,qe.layer=Ke-1,a.dh(qe),E=a.Zj(E,qe,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=qe,Ke--;E=a.Zj(qe,te,b.link),E.valid=!Me,Me&&(qe.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=se,E.portFromPos=0,E.portToPos=ge}else b.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=hf(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),cf(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},_i.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}_i.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},_i.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 Vs(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 Xl(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 HS(a,y,x){var b=hf(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var te=a.Jn,ne=0;ne<E;ne++){var se=0,he=b[ne],ge=he.near;if(ge!==null&&ge.layer===he.layer)if(he=ge.index,he>ne)for(var ye=ne+1;ye<he;ye++){var Me=b[ye];Me.near===ge&&Me.Dj===ge.Dj||se++}else for(ye=ne-1;ye>he;ye--)Me=b[ye],Me.near===ge&&Me.Dj===ge.Dj||se++;var _e;if(0<=x)for(he=b[ne].sourceEdgesArrayAccess,ge=0;ge<he.length;ge++){var Ke=he[ge];if(Ke.valid&&Ke.fromVertex.layer!==y)for(Me=Ke.fromVertex.index,ye=Ke.portToPos,Ke=Ke.portFromPos,_e=ge+1;_e<he.length;_e++){var qe=he[_e];if(qe.valid&&qe.fromVertex.layer!==y){var rt=qe.fromVertex.index,Mt=qe.portToPos;qe=qe.portFromPos,ye<Mt&&(Me>rt||Me===rt&&Ke>qe)&&se++,Mt<ye&&(rt>Me||rt===Me&&qe>Ke)&&se++}}}if(0>=x){for(he=b[ne].destinationEdgesArrayAccess,ge=0;ge<he.length;ge++)if(Ke=he[ge],Ke.valid&&Ke.toVertex.layer!==y)for(Me=Ke.toVertex.index,ye=Ke.portToPos,Ke=Ke.portFromPos,_e=ge+1;_e<he.length;_e++)qe=he[_e],qe.valid&&qe.toVertex.layer!==y&&(rt=qe.toVertex.index,Mt=qe.portToPos,qe=qe.portFromPos,Ke<qe&&(Me>rt||Me===rt&&ye>Mt)&&se++,qe<Ke&&(rt>Me||rt===Me&&Mt>ye)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var xt=0,At=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var Ot=b[he].sourceEdgesArrayAccess;for(ge=0;ge<se.length;ge++)if(Ke=se[ge],Ke.valid&&Ke.fromVertex.layer!==y)for(Me=Ke.fromVertex.index,Ke=Ke.portFromPos,_e=0;_e<Ot.length;_e++)qe=Ot[_e],qe.valid&&qe.fromVertex.layer!==y&&(rt=qe.fromVertex.index,qe=qe.portFromPos,(Me<rt||Me===rt&&Ke<qe)&&At++,(rt<Me||rt===Me&&qe<Ke)&&xt++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,Ot=b[he].destinationEdgesArrayAccess,ge=0;ge<se.length;ge++)if(Ke=se[ge],Ke.valid&&Ke.toVertex.layer!==y)for(Me=Ke.toVertex.index,ye=Ke.portToPos,_e=0;_e<Ot.length;_e++)qe=Ot[_e],qe.valid&&qe.toVertex.layer!==y&&(rt=qe.toVertex.index,Mt=qe.portToPos,(Me<rt||Me===rt&&ye<Mt)&&At++,(rt<Me||rt===Me&&Mt<ye)&&xt++)}te[ne*E+he]=xt,te[he*E+ne]=At}}return cf(a,y,b),te}_i.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var te=E;te<b;te++)a+=x[E*b+te];return a};function kv(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=hf(b,E),ne=b.tc[E],se=0,he=0;he<ne;he++){var ge=te[he].destinationEdgesArrayAccess;if(ge!==null)for(var ye=0;ye<ge.length;ye++){var Me=ge[ye];if(Me.valid&&Me.toVertex.layer!==E){var _e=Me.fromVertex.column+Me.portFromColOffset,Ke=Me.toVertex.column+Me.portToColOffset;se+=(Math.abs(_e-Ke)+1)*gy(Me)}}}cf(b,E,te),y+=se}return y}_i.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=hf(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=se.destinationEdgesArrayAccess);var ye=0,Me=0,_e=se.near;if(_e!==null&&_e.layer===se.layer&&(ye+=_e.column-1,Me++),he!==null)for(_e=0;_e<he.length;_e++){se=he[_e];var Ke=se.fromVertex;se.valid&&!se.rev&&Ke.layer!==y&&(ye+=Ke.column,Me++)}if(ge!==null)for(he=0;he<ge.length;he++)se=ge[he],_e=se.toVertex,se.valid&&!se.rev&&_e.layer!==y&&(ye+=_e.column,Me++);te[ne]=Me===0?-1:ye/Me}return cf(a,y,b),te}function WS(a,y,x){for(var b=hf(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var ge=null;0<=x&&(ge=se.destinationEdgesArrayAccess);var ye=0,Me=[],_e=se.near;if(_e!==null&&_e.layer===se.layer&&(Me[ye]=_e.column-1,ye++),se=void 0,he!==null)for(_e=0;_e<he.length;_e++){se=he[_e];var Ke=se.fromVertex;se.valid&&!se.rev&&Ke.layer!==y&&(Me[ye]=Ke.column+se.portFromColOffset,ye++)}if(ge!==null)for(he=0;he<ge.length;he++)se=ge[he],_e=se.toVertex,se.valid&&!se.rev&&_e.layer!==y&&(Me[ye]=_e.column+se.portToColOffset,ye++);ye===0?te[ne]=-1:(Me.sort(function(qe,rt){return qe-rt}),ge=ye>>1,te[ne]=ye&1?Me[ge]:Me[ge-1]+Me[ge]>>1)}return cf(a,y,b),te}function Hg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var se=ne.value,he=se.toVertex,ge=y.layer-he.layer;se=a.linkMinLength(se),ge===se&&Hg(a,he,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)se=ne.value,he=se.fromVertex,ge=he.layer-y.layer,se=a.linkMinLength(se),ge===se&&Hg(a,he,x,b,E,te)}}function vy(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,te);if(te)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,te)}}_i.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,ge=se.destinationEdges;ge.next();)ge.value.toVertex.valid&&he++;ge=0;for(var ye=se.sourceEdges;ye.next();)ye.value.fromVertex.valid&&ge++;(E===null||te<he-ge)&&(E=se,te=he-ge)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case Nv: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 Wg: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++}_i.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 Av: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&&Hg(a,se,0,-1,!0,!1)}for(Hg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,se=0,he=null,ne=a.network.vertexes.iterator;ne.next();){var ge=ne.value;if(ge.component===1){var ye=0,Me=!1,_e=ge.sourceEdgesArrayAccess;E=_e.length;for(var Ke=0;Ke<E;Ke++){var qe=_e[Ke],rt=qe.fromVertex;ye+=1,rt.component!==1&&(te+=1,rt=rt.layer-ge.layer,qe=a.linkMinLength(qe),b=Math.min(b,rt-qe))}for(_e=ge.destinationEdgesArrayAccess,E=_e.length,Ke=0;Ke<E;Ke++)qe=_e[Ke].toVertex,--ye,qe.component!==1?--te:Me=!0;(he===null||ye<se)&&!Me&&(he=ge,se=ye)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else he.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Hg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,se=null,he=a.network.vertexes.iterator;he.next();)if(ne=he.value,ne.component===1){for(ge=0,ye=!1,_e=ne.sourceEdgesArrayAccess,Me=_e.length,Ke=0;Ke<Me;Ke++)qe=_e[Ke].fromVertex,ge+=1,qe.component!==1?b+=1:ye=!0;for(_e=ne.destinationEdgesArrayAccess,Me=_e.length,Ke=0;Ke<Me;Ke++)qe=_e[Ke],rt=qe.toVertex,--ge,rt.component!==1&&(--b,rt=ne.layer-rt.layer,qe=a.linkMinLength(qe),E=Math.min(E,rt-qe));(se===null||ge>te)&&!ye&&(se=ne,te=ge)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else se.component=0}}}function 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}_i.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 jv: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))}_i.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Vs(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)Mv(this,b,1),au(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=Vs(this)),b=this.Ia;0<=b;b--)Mv(this,b,-1),au(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=Vs(this))}for(Xl(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)Mv(this,b,0),au(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=Vs(this)),b=this.Ia;0<=b;b--)Mv(this,b,0),au(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=Vs(this))}Xl(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=au(this,b,-1)||te;for(E=this.countCrossings(),E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=au(this,b,1)||te;for(E=this.countCrossings(),E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=au(this,b,1)||te;for(E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=au(this,b,-1)||te;for(E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=au(this,b,0)||te;for(E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=au(this,b,0)||te;E>=a?Xl(this,y):(a=E,y=Vs(this))}break;default:case Ov: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=au(this,b,-1)||te;for(E=this.countCrossings(),E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=au(this,b,1)||te;for(E=this.countCrossings(),E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=au(this,b,1)||te;for(E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=au(this,b,-1)||te;for(E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=au(this,b,0)||te;for(E>=a?Xl(this,y):(a=E,y=Vs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=au(this,b,0)||te;E>=a?Xl(this,y):(a=E,y=Vs(this))}}Xl(this,y)};function Mv(a,y,x){var b=hf(a,y),E=a.tc[y],te=WS(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);cf(a,y,b)}function au(a,y,x){var b=hf(a,y),E=a.tc[y];x=HS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var se=[];for(te=0;te<E;te++)se[te]=-1;for(var he=!1,ge=!0;ge;)for(ge=!1,te=0;te<E-1;te++){var ye=x[b[te].index*E+b[te+1].index],Me=x[b[te+1].index*E+b[te].index],_e=0,Ke=0,qe=b[te].column,rt=b[te+1].column,Mt=a.nodeMinColumnSpace(b[te],!0),xt=a.nodeMinColumnSpace(b[te],!1),At=a.nodeMinColumnSpace(b[te+1],!0),Ot=a.nodeMinColumnSpace(b[te+1],!1);Mt=qe-Mt+At,xt=rt-xt+Ot;var Dt=b[te].sourceEdges.iterator;for(Dt.reset();Dt.next();)if(At=Dt.value,Ot=At.fromVertex,At.valid&&Ot.layer===y){for(At=0;b[At]!==Ot;)At++;At<te&&(_e+=2*(te-At),Ke+=2*(te+1-At)),At===te+1&&(_e+=1),At>te+1&&(_e+=4*(At-te),Ke+=4*(At-(te+1)))}for(Dt=b[te].destinationEdges.iterator,Dt.reset();Dt.next();)if(At=Dt.value,Ot=At.toVertex,At.valid&&Ot.layer===y){for(At=0;b[At]!==Ot;)At++;At===te+1&&(Ke+=1)}for(Dt=b[te+1].sourceEdges.iterator,Dt.reset();Dt.next();)if(At=Dt.value,Ot=At.fromVertex,At.valid&&Ot.layer===y){for(At=0;b[At]!==Ot;)At++;At<te&&(_e+=2*(te+1-At),Ke+=2*(te-At)),At===te&&(Ke+=1),At>te+1&&(_e+=4*(At-(te+1)),Ke+=4*(At-te))}for(Dt=b[te+1].destinationEdges.iterator,Dt.reset();Dt.next();)if(At=Dt.value,Ot=At.toVertex,At.valid&&Ot.layer===y){for(At=0;b[At]!==Ot;)At++;At===te&&(_e+=1)}At=Ot=0,Dt=ne[b[te].index];var _t=se[b[te].index],Yt=ne[b[te+1].index],_n=se[b[te+1].index];Dt!==-1&&(Ot+=Math.abs(Dt-qe),At+=Math.abs(Dt-xt)),_t!==-1&&(Ot+=Math.abs(_t-qe),At+=Math.abs(_t-xt)),Yt!==-1&&(Ot+=Math.abs(Yt-rt),At+=Math.abs(Yt-Mt)),_n!==-1&&(Ot+=Math.abs(_n-rt),At+=Math.abs(_n-Mt)),(Ke<_e-.5||Ke===_e&&Me<ye-.5||Ke===_e&&Me===ye&&At<Ot-.5)&&(ge=he=!0,b[te].column=xt,b[te+1].column=Mt,ye=b[te],b[te]=b[te+1],b[te+1]=ye)}for(te=0;te<E;te++)b[te].index=te;return cf(a,y,b),he}_i.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=Tp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Tp(this,y,-1)||x;x=Tp(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=Tp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Tp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Tp(this,y,0)||x}}else Wx(this)};function Tp(a,y,x){for(var b=!1;Gx(a,y,x);)b=!0;return b}function Gx(a,y,x){var b,E=hf(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var se=my(a,y,1);if(0>x)for(b=0;b<te;b++)se[b]=-1;for(var he=!1,ge=!0;ge;)for(ge=!1,b=0;b<te;b++){var ye=E[b].column,Me=a.nodeMinColumnSpace(E[b],!0),_e=a.nodeMinColumnSpace(E[b],!1),Ke=0;0>b-1||ye-E[b-1].column-1>Me+a.nodeMinColumnSpace(E[b-1],!1)?Ke=ye-1:Ke=ye,Me=b+1>=te||E[b+1].column-ye-1>_e+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var qe=_e=0,rt=0;if(0>=x)for(var Mt=E[b].sourceEdges.iterator;Mt.next();){var xt=Mt.value,At=xt.fromVertex;if(xt.valid&&At.layer!==y){var Ot=gy(xt),Dt=xt.portFromColOffset;xt=xt.portToColOffset,At=At.column,_e+=(Math.abs(ye+xt-(At+Dt))+1)*Ot,qe+=(Math.abs(Ke+xt-(At+Dt))+1)*Ot,rt+=(Math.abs(Me+xt-(At+Dt))+1)*Ot}}if(0<=x)for(Mt=E[b].destinationEdges.iterator;Mt.next();)xt=Mt.value,At=xt.toVertex,xt.valid&&At.layer!==y&&(Ot=gy(xt),Dt=xt.portFromColOffset,xt=xt.portToColOffset,At=At.column,_e+=(Math.abs(ye+Dt-(At+xt))+1)*Ot,qe+=(Math.abs(Ke+Dt-(At+xt))+1)*Ot,rt+=(Math.abs(Me+Dt-(At+xt))+1)*Ot);xt=Dt=Ot=0,Mt=ne[E[b].index],At=se[E[b].index],Mt!==-1&&(Ot+=Math.abs(Mt-ye),Dt+=Math.abs(Mt-Ke),xt+=Math.abs(Mt-Me)),At!==-1&&(Ot+=Math.abs(At-ye),Dt+=Math.abs(At-Ke),xt+=Math.abs(At-Me)),qe<_e||qe===_e&&Dt<Ot?(ge=he=!0,E[b].column=Ke):(rt<_e||rt===_e&&xt<Ot)&&(ge=he=!0,E[b].column=Me)}return cf(a,y,E),a.normalize(),he}function Sy(a,y,x){var b=hf(a,y),E=a.tc[y],te=WS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=te[x];for(te=!0;te;)for(te=!1,x=0;x<E;x++){var se=b[x].column,he=a.nodeMinColumnSpace(b[x],!0),ge=a.nodeMinColumnSpace(b[x],!1),ye=0;if(ne[x]===-1)if(x===0&&x===E-1)ye=se;else if(x===0){var Me=b[x+1].column;Me-se===ge+a.nodeMinColumnSpace(b[x+1],!0)?ye=se-1:ye=se}else x===E-1?(Me=b[x-1].column,ye=se-Me===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Me=b[x-1].column,he=Me+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Me=b[x+1].column,ge=Me-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=(he+ge)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Me=b[x+1].column,ge=Me-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,ye=Math.min(ne[x],ge)):x===E-1?(Me=b[x-1].column,he=Me+a.nodeMinColumnSpace(b[x-1],!1)+he+1,ye=Math.max(ne[x],he)):(Me=b[x-1].column,he=Me+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Me=b[x+1].column,ge=Me-a.nodeMinColumnSpace(b[x+1],!0)-ge-1,he<ne[x]&&ne[x]<ge?ye=ne[x]:he>=ne[x]?ye=he:ge<=ne[x]&&(ye=ge));ye!==se&&(te=!0,b[x].column=ye)}cf(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 Hx(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(;Hx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=Vs(a),te=kv(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=kv(a);ne>te?Xl(a,E):ne<te&&(te=ne,E=Vs(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=Vs(a),te=kv(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=kv(a),ne>te?Xl(a,E):ne<te&&(te=ne,E=Vs(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 Wx(a){for(var y=sr(),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 bn,Kx(y,x);var te=null,ne=null,se=null,he=null,ge=(a.ve&1)!==0,ye=(a.ve&2)!==0,Me=(a.ve&4)!==0,_e=(a.ve&8)!==0;for(ge&&(a.verticalAlignment(y,x,!0),te=Tv(a,y,!0,!1)),y.reverse(),Me&&(a.verticalAlignment(y,x,!1),se=Tv(a,y,!1,!1)),b=An(y),E=b.next();!E.done;E=b.next())E.value.reverse();_e&&(a.verticalAlignment(y,x,!1),he=Tv(a,y,!1,!0)),y.reverse(),ye&&(a.verticalAlignment(y,x,!0),ne=Tv(a,y,!0,!0)),dr(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Ke){var qe=sr();ge&&qe.push(te.get(Ke)),ye&&qe.push(ne.get(Ke)),Me&&qe.push(se.get(Ke)),_e&&qe.push(he.get(Ke)),qe.sort(function(Mt,xt){return Mt-xt});var rt=qe.length;rt=(qe[Math.floor((rt-1)/2)]+qe[Math.ceil((rt-1)/2)])/2,dr(qe),Ke.zc=rt})}function Kx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],se=a[b+1],he=0;te<se.length;he++){var ge=se[he];e:{if(ge.node===null){var ye=My(ge);if(0<ye.length){ye=ye[0].node===null;break e}}ye=!1}var Me=ye;if(he===se.length-1||Me){for(ye=ne.length-1,Me&&(ye=My(ge)[0].index);te<=he;){if(ge=se[te],!ge.bo){Me=[];for(var _e=An(ge.sourceEdgesArrayAccess),Ke=_e.next();!Ke.done;Ke=_e.next())Ke=Ke.value,Ke.valid&&Me.push(Ke);ge.bo=Me}for(ge=An(ge.bo),Me=ge.next();!Me.done;Me=ge.next())Me=Me.value,_e=Me.fromVertex.index,(_e<E||_e>ye)&&y.add(Me);te++}E=ye}}}_i.prototype.verticalAlignment=function(a,y,x){Vx(a),a=An(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=An(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?My(te):Yx(te),se=ne.length;if(0<se){ne.sort(function(Me,_e){return Me.vi-_e.vi});var he=(se-1)/2;for(se=Math.floor(he),he=Math.ceil(he);se<=he;se++)if(te.align===te){var ge=ne[se],ye=void 0;ye=x?Fv(ge,te):Fv(te,ge),!y.contains(ye)&&E<ge.vi&&(ge.align=te,te.root=ge.root,te.align=ge.root,E=ge.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function Tv(a,y,x,b){for(var E=a.K===90||a.K===270,te=An(y),ne=te.next();!ne.done;ne=te.next()){var se=An(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=An(y),se=te.next();!se.done;se=te.next()){se=An(se.value);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.root===he){for(var ge=0,ye=he;ye.align!==he;){var Me=ye.align,_e=ne?ye.width:ye.height,Ke=ne?Me.width:Me.height;if(x){var qe=Fv(ye,Me),rt=qe.portFromPos,Mt=qe.portToPos;qe.link!==null&&(ye.node&&ye.node!==qe.link.fromNode&&(rt=ne?ye.focusX:ye.focusY),Me.node&&Me.node!==qe.link.toNode&&(Mt=ne?Me.focusX:Me.focusY))}else qe=Fv(Me,ye),rt=qe.portToPos,Mt=qe.portFromPos,qe.link!==null&&(ye.node&&ye.node!==qe.link.toNode&&(rt=ne?ye.focusX:ye.focusY),Me.node&&Me.node!==qe.link.fromNode&&(Mt=ne?Me.focusX:Me.focusY));_e=b?ye.qg+(_e-rt)-(Ke-Mt):ye.qg+rt-Mt,Me.qg=_e,ge=Math.min(ge,_e),ye=ye.align}ye=he;do ye.qg=ye.qg-ge,ye=ye.align;while(ye!==he)}}for(x=An(y),ne=x.next();!ne.done;ne=x.next())for(te=An(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 Kn,y=An(y),ne=y.next();!ne.done;ne=y.next())for(x=An(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&&$t("Could not determine previous vertex in layer"),y[x][a-1]}_i.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=sr(),E=sr(),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(ge){ge.value+=he.delta}}(te)));dr(b),dr(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}_i.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Lv(this,!0),y=Lv(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function Lv(a,y){return a.K===270?y?ws:ns:a.K===90?y?ns:ws:a.K===180?y?Ps:Wa:y?Wa:Ps}_i.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var te=1/0,ne=E=1/0,se=-1/0;a.next();){var he=a.value,ge=he.layer,ye=he.column|0;b?(ne=y.x+this.kc*ye,ge=this.Kd[ge]):(ne=this.Kd[ge],ge=y.y+this.kc*ye),he.centerX=ne,he.centerY=ge,x&&isFinite(he.zc)&&(b?he.node?he.x=y.x+he.zc:he.centerX=y.x+he.zc:he.node?he.y=y.y+he.zc:he.centerY=y.y+he.zc),te=Math.min(he.x,te),E=Math.min(he.y,E),b?(ne=te,se=Math.max(se,he.bounds.right)):(ne=E,se=Math.max(se,he.bounds.bottom))}for(this.xw=se-ne,te=y.x-te,y=y.y-E,this.Rf=new Et(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},_i.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 on(0,0,x,Math.abs(this.Ta[0]))):y.push(new on(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new on(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new on(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new on(0,0,Math.abs(this.Ta[0]),x)):y.push(new on(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new on(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new on(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},_i.prototype.commitLayers=function(){},_i.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var b=y,E=b.fromNode,te=b.toNode,ne=b.fromPort,se=b.toPort;if(E!==null){var he=E.findVisibleNode();he!==null&&he!==E&&(E=he,ne=he.port)}te!==null&&(he=te.findVisibleNode(),he!==null&&he!==te&&(te=he,se=he.port));var ge=y.computeSpot(!0,ne);he=y.computeSpot(!1,se);var ye=x.fromVertex,Me=x.toVertex;if(x.valid)y.curve===Fl&&y.pointsCount===4&&(ye.column===Me.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,ge,!0,!1,te,se),se=y.getLinkPoint(te,se,he,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),se.w()||se.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+se.x)/3,(2*x.y+se.y)/3),y.yf((x.x+2*se.x)/3,(x.y+2*se.y)/3),y.yf(se.x,se.y)):(x=b=!1,ne!==null&&ge===ba&&(b=!0),se!==null&&he===ba&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(vi),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(vi),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),he&&(te=y.i(2),y.L(1,(2*he.x+te.x)/3,(2*he.y+te.y)/3)),E&&(te=y.i(1),y.L(2,(2*E.x+te.x)/3,(2*E.y+te.y)/3))))),y.zf();else if(ye.layer===Me.layer)y.zf();else{var _e=!1,Ke=!1,qe=this.ie,rt=y.firstPickIndex+1;if(y.isOrthogonal){Ke=!0;var Mt=y.pointsCount;4<Mt&&y.points.removeRange(2,Mt-3)}else if(y.curve===Fl)_e=!0,Mt=y.pointsCount,4<Mt&&y.points.removeRange(2,Mt-3),Mt===4&&(rt=2);else{Mt=y.pointsCount;var xt=ge===ba,At=he===ba;2<Mt&&xt&&At?y.points.removeRange(1,Mt-2):3<Mt&&xt&&!At?y.points.removeRange(1,Mt-3):3<Mt&&!xt&&At?y.points.removeRange(2,Mt-2):4<Mt&&!xt&&!At&&y.points.removeRange(2,Mt-3)}if(x.rev){for(;Me!==null&&ye!==Me;){var Ot=Mt=null;for(xt=Me.sourceEdges.iterator;xt.next()&&(At=xt.value,At.link!==x.link||(Mt=At.fromVertex,Ot=At.toVertex,Mt.node!==null)););if(Mt===null)break;if(Mt!==ye){xt=y.i(rt-1).x,At=y.i(rt-1).y;var Dt=Mt.centerX,_t=Mt.centerY;if(Ke)this.K===180||this.K===0?rt===y.firstPickIndex+1?(y.m(rt++,xt,At),y.m(rt++,xt,_t)):(Ot!==null?Ot.centerY:At)!==_t&&(Ot=this.Ta[Mt.layer-1]+this.Rf.x,y.m(rt++,Ot,At),y.m(rt++,Ot,_t)):rt===y.firstPickIndex+1?(y.m(rt++,xt,At),y.m(rt++,Dt,At)):(Ot!==null?Ot.centerX:xt)!==Dt&&(Ot=this.Ta[Mt.layer-1]+this.Rf.y,y.m(rt++,xt,Ot),y.m(rt++,Dt,Ot));else if(rt===y.firstPickIndex+1){Ot=Math.max(10,this.he[Me.layer]);var Yt=Math.max(10,this.Ld[Me.layer]);if(_e)this.K===180?Dt<=Me.bounds.x?(Me=Me.bounds.x,y.m(rt++,Me-Ot,_t),y.m(rt++,Me,_t),y.m(rt++,Me+Yt,_t)):(y.m(rt++,Dt-Ot,_t),y.m(rt++,Dt,_t),y.m(rt++,Dt+Yt,_t)):this.K===90?_t>=Me.bounds.bottom?(Me=Me.bounds.y+Me.bounds.height,y.m(rt++,Dt,Me+Yt),y.m(rt++,Dt,Me),y.m(rt++,Dt,Me-Ot)):(y.m(rt++,Dt,_t+Yt),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t-Ot)):this.K===270?_t<=Me.bounds.y?(Me=Me.bounds.y,y.m(rt++,Dt,Me-Ot),y.m(rt++,Dt,Me),y.m(rt++,Dt,Me+Yt)):(y.m(rt++,Dt,_t-Ot),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t+Yt)):this.K===0&&(Dt>=Me.bounds.right?(Me=Me.bounds.x+Me.bounds.width,y.m(rt++,Me+Yt,_t),y.m(rt++,Me,_t),y.m(rt++,Me-Ot,_t)):(y.m(rt++,Dt+Yt,_t),y.m(rt++,Dt,_t),y.m(rt++,Dt-Ot,_t)));else{y.m(rt++,xt,At);var _n=0;this.K===180||this.K===0?((this.K===180?Dt>=Me.bounds.right:Dt<=Me.bounds.x)&&(_n=(this.K===0?-Ot:Yt)/2),y.m(rt++,xt+_n,_t)):((this.K===270?_t>=Me.bounds.bottom:_t<=Me.bounds.y)&&(_n=(this.K===90?-Ot:Yt)/2),y.m(rt++,Dt,At+_n)),y.m(rt++,Dt,_t)}}else Ot=Math.max(10,this.he[Mt.layer]),Yt=Math.max(10,this.Ld[Mt.layer]),_e?this.K===180?(y.m(rt++,Dt-Ot-qe,_t),y.m(rt++,Math.min(Dt-Ot+qe/2,Dt),_t),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t),y.m(rt++,Math.max(Dt+Yt-qe/2,Dt),_t),y.m(rt++,Dt+Yt+qe,_t)):this.K===90?(y.m(rt++,Dt,_t+Yt+qe),y.m(rt++,Dt,Math.max(_t+Yt-qe/2,_t)),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t),y.m(rt++,Dt,Math.min(_t-Ot+qe/2,_t)),y.m(rt++,Dt,_t-Ot-qe)):this.K===270?(y.m(rt++,Dt,_t-Ot-qe),y.m(rt++,Dt,Math.min(_t-Ot+qe/2,_t)),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t),y.m(rt++,Dt,Math.max(_t+Yt-qe/2,_t)),y.m(rt++,Dt,_t+Yt+qe)):(y.m(rt++,Dt+Yt+qe,_t),y.m(rt++,Math.max(Dt+Yt-qe/2,Dt),_t),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t),y.m(rt++,Math.min(Dt-Ot+qe/2,Dt),_t),y.m(rt++,Dt-Ot-qe,_t)):y.m(rt++,Dt,_t)}Me=Mt}(se===null||ge!==ba||Ke)&&(xt=y.i(rt-1).x,At=y.i(rt-1).y,Dt=y.i(rt).x,_t=y.i(rt).y,Ke?(qe=this.Ld[ye.layer],this.K===180||this.K===0?(Ke=At,Ke>=ye.bounds.y&&Ke<=ye.bounds.bottom&&(this.K===180?Dt>=ye.bounds.x:Dt<=ye.bounds.right)&&(Me=ye.centerX+(this.K===180?-qe:qe),Ke<ye.bounds.y+ye.bounds.height/2?Ke=ye.bounds.y-this.kc/2:Ke=ye.bounds.bottom+this.kc/2,y.m(rt++,Me,At),y.m(rt++,Me,Ke)),y.m(rt++,Dt,Ke)):(Ke=xt,Ke>=ye.bounds.x&&Ke<=ye.bounds.right&&(this.K===270?_t>=ye.bounds.y:_t<=ye.bounds.bottom)&&(Me=ye.centerY+(this.K===270?-qe:qe),Ke<ye.bounds.x+ye.bounds.width/2?Ke=ye.bounds.x-this.kc/2:Ke=ye.bounds.right+this.kc/2,y.m(rt++,xt,Me),y.m(rt++,Ke,Me)),y.m(rt++,Ke,_t)),y.m(rt++,Dt,_t)):_e?(Ot=Math.max(10,this.he[ye.layer]),Yt=Math.max(10,this.Ld[ye.layer]),this.K===180&&Dt>=ye.bounds.x?(Me=ye.bounds.x+ye.bounds.width,y.L(rt-2,Me,At),y.L(rt-1,Me+Yt,At)):this.K===90&&_t<=ye.bounds.bottom?(Me=ye.bounds.y,y.L(rt-2,xt,Me),y.L(rt-1,xt,Me-Ot)):this.K===270&&_t>=ye.bounds.y?(Me=ye.bounds.y+ye.bounds.height,y.L(rt-2,xt,Me),y.L(rt-1,xt,Me+Yt)):this.K===0&&Dt<=ye.bounds.right&&(Me=ye.bounds.x,y.L(rt-2,Me,At),y.L(rt-1,Me-Ot,At))):(Ot=Math.max(10,this.he[ye.layer]),Yt=Math.max(10,this.Ld[ye.layer]),Ke=0,this.K===180||this.K===0?((this.K===180?Dt<=ye.bounds.x:Dt>=ye.bounds.right)&&(Ke=(this.K===0?Yt:-Ot)/2),y.m(rt++,Dt+Ke,At)):((this.K===270?_t<=ye.bounds.y:_t>=ye.bounds.bottom)&&(Ke=(this.K===90?Yt:-Ot)/2),y.m(rt++,xt,_t+Ke)),y.m(rt++,Dt,_t)))}else{for(;ye!==null&&ye!==Me;){for(Ot=Mt=null,ye=ye.destinationEdges.iterator;ye.next()&&(xt=ye.value,xt.link!==x.link||(Mt=xt.toVertex,Ot=xt.fromVertex,Ot.node!==null&&(Ot=null),Mt.node!==null)););if(Mt===null)break;Mt!==Me&&(xt=y.i(rt-1).x,At=y.i(rt-1).y,Dt=Mt.centerX,_t=Mt.centerY,Ke?this.K===180||this.K===0?(Ot!==null?Ot.centerY:At)!==_t&&(Ot=this.Ta[Mt.layer]+this.Rf.x,rt===y.firstPickIndex+1&&(Ot=this.K===0?Math.max(Ot,xt):Math.min(Ot,xt)),y.m(rt++,Ot,At),y.m(rt++,Ot,_t)):(Ot!==null?Ot.centerX:xt)!==Dt&&(Ot=this.Ta[Mt.layer]+this.Rf.y,rt===y.firstPickIndex+1&&(Ot=this.K===90?Math.max(Ot,At):Math.min(Ot,At)),y.m(rt++,xt,Ot),y.m(rt++,Dt,Ot)):(Ot=Math.max(10,this.he[Mt.layer]),Yt=Math.max(10,this.Ld[Mt.layer]),_e?this.K===180?(y.m(rt++,Dt+Yt+qe,_t),y.m(rt++,Math.max(Dt+Yt-qe/2,Dt),_t),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t),y.m(rt++,Math.min(Dt-Ot+qe/2,Dt),_t),y.m(rt++,Dt-Ot-qe,_t)):this.K===90?(y.m(rt++,Dt,_t-Ot-qe),y.m(rt++,Dt,Math.min(_t-Ot+qe/2,_t)),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t),y.m(rt++,Dt,Math.max(_t+Yt-qe/2,_t)),y.m(rt++,Dt,_t+Yt+qe)):this.K===270?(y.m(rt++,Dt,_t+Yt+qe),y.m(rt++,Dt,Math.max(_t+Yt-qe/2,_t)),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t),y.m(rt++,Dt,Math.min(_t-Ot+qe/2,_t)),y.m(rt++,Dt,_t-Ot-qe)):(y.m(rt++,Dt-Ot-qe,_t),y.m(rt++,Math.min(Dt-Ot+qe/2,Dt),_t),y.m(rt++,Dt,_t),y.m(rt++,Dt,_t),y.m(rt++,Math.max(Dt+Yt-qe/2,Dt),_t),y.m(rt++,Dt+Yt+qe,_t)):this.K===180?(y.m(rt++,Dt+Yt,_t),y.m(rt++,Dt-Ot,_t)):this.K===90?(y.m(rt++,Dt,_t-Ot),y.m(rt++,Dt,_t+Yt)):this.K===270?(y.m(rt++,Dt,_t+Yt),y.m(rt++,Dt,_t-Ot)):(y.m(rt++,Dt-Ot,_t),y.m(rt++,Dt+Yt,_t)))),ye=Mt}Ke&&(xt=y.i(rt-1).x,At=y.i(rt-1).y,Dt=y.i(rt).x,_t=y.i(rt).y,this.K===180||this.K===0?At!==_t&&(Ot=this.K===0?Math.min(Math.max((Dt+xt)/2,this.Ta[Me.layer]+this.Rf.x),Dt):Math.max(Math.min((Dt+xt)/2,this.Ta[Me.layer]+this.Rf.x),Dt),y.m(rt++,Ot,At),y.m(rt++,Ot,_t)):xt!==Dt&&(Ot=this.K===90?Math.min(Math.max((_t+At)/2,this.Ta[Me.layer]+this.Rf.y),_t):Math.max(Math.min((_t+At)/2,this.Ta[Me.layer]+this.Rf.y),_t),y.m(rt++,xt,Ot),y.m(rt++,Dt,Ot)))}b!==null&&_e&&4<=y.pointsCount&&(ne!==null&&(ne=ge===ba?y.getLinkPointFromPoint(E,ne,ne.ga(vi),y.i(3),!0):y.i(0),ge===ba&&(ge=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+ge.x)/2,ge.y),y.L(2,b.x,(ge.y+b.y)/2)):(y.L(1,ge.x,(ne.y+ge.y)/2),y.L(2,(ge.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),se!==null&&(E=he===ba?y.getLinkPointFromPoint(te,se,se.ga(vi),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===ba&&(se=y.i(y.pointsCount-3),he=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+se.x)/2,se.y),y.L(y.pointsCount-2,he.x,(se.y+he.y)/2)):(y.L(y.pointsCount-2,se.x,(E.y+se.y)/2),y.L(y.pointsCount-3,(se.x+he.x)/2,he.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},_i.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new kn,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 ff;se.layer=Math.floor(te.y/2);var he=b.i(0),ge=b.i(b.pointsCount-1);if(se.first=he.x*he.x+he.y,se.jc=ge.x*ge.x+ge.y,se.rd=Math.min(te.x,ne.x),se.Ic=Math.max(te.x,ne.x),se.index=E,se.link=b,E+2<b.pointsCount){he=b.i(E-1),ge=b.i(E+2);var ye=0;he.y<te.y?ye=ge.y<te.y?3:te.x<ne.x?2:1:he.y>te.y&&(ye=ge.y>te.y?0:ne.x<te.x?2:1),se.j=ye}x.push(se)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),ye=1,se=x[te].jc,he=te;he<E;he++)ge=x[he],ge.jc!==se&&(ye++,se=ge.jc);this.zi(x,this.Ux,te,te+ne);var Me=1;for(se=x[te].first,he=te;he<E;he++)ge=x[he],ge.first!==se&&(Me++,se=ge.first);for(he=!0,ge=Me,ye<Me?(he=!1,ge=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Me=te;Me<E;Me++){var _e=x[Me];(he?_e.first:_e.jc)!==se&&(ye++,se=he?_e.first:_e.jc);var Ke=_e.link;te=Ke.i(_e.index),ne=Ke.i(_e.index+1);var qe=this.linkSpacing*(ye-(ge-1)/2);y++,Ke.uh(),Ke.L(_e.index,te.x,te.y+qe),Ke.L(_e.index+1,ne.x,ne.y+qe),Ke.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 ff,se.layer=Math.floor(te.x/2),he=b.i(0),ge=b.i(b.pointsCount-1),se.first=he.x+he.y*he.y,se.jc=ge.x+ge.y*ge.y,se.rd=Math.min(te.y,ne.y),se.Ic=Math.max(te.y,ne.y),se.index=E,se.link=b,E+2<b.pointsCount&&(he=b.i(E-1),ge=b.i(E+2),ye=0,he.x<te.x?ye=ge.x<te.x?3:te.y<ne.y?2:1:he.x>te.x&&(ye=ge.x>te.x?0:ne.y<te.y?2:1),se.j=ye),x.push(se));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),ye=1,se=x[te].jc,he=te;he<E;he++)ge=x[he],ge.jc!==se&&(ye++,se=ge.jc);for(this.zi(x,this.Ux,te,te+ne),Me=1,se=x[te].first,he=te;he<E;he++)ge=x[he],ge.first!==se&&(Me++,se=ge.first);for(he=!0,ge=Me,ye<Me?(he=!1,ge=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Me=te;Me<E;Me++)_e=x[Me],(he?_e.first:_e.jc)!==se&&(ye++,se=he?_e.first:_e.jc),Ke=_e.link,te=Ke.i(_e.index),ne=Ke.i(_e.index+1),qe=this.linkSpacing*(ye-(ge-1)/2),y++,Ke.uh(),Ke.L(_e.index,te.x+qe,te.y),Ke.L(_e.index+1,ne.x+qe,ne.y),Ke.zf()}te=E}a=b}}}},Qe=_i.prototype,Qe.Vx=function(a,y){return a instanceof ff&&y instanceof ff&&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},Qe.Ux=function(a,y){return a instanceof ff&&y instanceof ff&&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},Qe.Js=function(a,y){return a instanceof ff&&y instanceof ff&&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},Qe.B=function(a,y){return a-=y,-1<a&&1>a},Qe.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&$t("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 hf(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 cf(a,y,x){a.He[a.tc[y]]=x}cn.Object.defineProperties(_i.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()):$t("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==Nv&&a!==Wg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Av&&a!==wy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==jv&&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!==Ov&&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 Nv=new tn(_i,"CycleDepthFirst",0),xy=new tn(_i,"CycleGreedy",1),Wg=new tn(_i,"CycleFromLayers",2),Av=new tn(_i,"LayerOptimalLinkLength",0),wy=new tn(_i,"LayerLongestPathSink",1),Py=new tn(_i,"LayerLongestPathSource",2),jv=new tn(_i,"InitDepthFirstOut",0),by=new tn(_i,"InitDepthFirstIn",1),Cy=new tn(_i,"InitNaive",2),Ey=new tn(_i,"AggressiveNone",0),Ov=new tn(_i,"AggressiveLess",1),ky=new tn(_i,"AggressiveMore",2),Xx=8;_i.className="LayeredDigraphLayout",_i.CycleDepthFirst=Nv,_i.CycleGreedy=xy,_i.CycleFromLayers=Wg,_i.LayerOptimalLinkLength=Av,_i.LayerLongestPathSink=wy,_i.LayerLongestPathSource=Py,_i.InitDepthFirstOut=jv,_i.InitDepthFirstIn=by,_i.InitNaive=Cy,_i.AggressiveNone=Ey,_i.AggressiveLess=Ov,_i.AggressiveMore=ky,_i.PackNone=0,_i.PackExpand=1,_i.PackStraighten=2,_i.PackMedian=4,_i.PackAll=15,_i.AlignNone=0,_i.AlignUpperLeft=1,_i.AlignUpperRight=2,_i.AlignLowerLeft=4,_i.AlignLowerRight=8,_i.AlignAll=15;function ff(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}ff.className="SegInfo";function Lp(a){no.call(this,a)}Vt(Lp,no),Lp.prototype.createVertex=function(){return new Yl(this)},Lp.prototype.createEdge=function(){return new Kg(this)},Lp.className="LayeredDigraphNetwork";function Yl(a){va.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}Vt(Yl,va);function ix(a,y){return a.index-y.index}function Fv(a,y){if(!a.$n){for(var x=[],b=An(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=An(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;$t("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=An(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=An(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}Yl.prototype.Cl=function(a){va.prototype.Cl.call(this,a),this.bo=this.co=null},Yl.prototype.Kl=function(a){va.prototype.Kl.call(this,a),this.bo=this.co=null},Yl.prototype.zl=function(a){va.prototype.zl.call(this,a),this.$n=this.ao=null},Yl.prototype.Jl=function(a){va.prototype.Jl.call(this,a),this.$n=this.ao=null},cn.Object.defineProperties(Yl.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)}}}),Yl.prototype.deleteDestinationEdge=Yl.prototype.Jl,Yl.prototype.addDestinationEdge=Yl.prototype.zl,Yl.prototype.deleteSourceEdge=Yl.prototype.Kl,Yl.prototype.addSourceEdge=Yl.prototype.Cl,Yl.className="LayeredDigraphVertex";function Kg(a){yl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Vt(Kg,yl),cn.Object.defineProperties(Kg.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)}}}),Kg.className="LayeredDigraphEdge";function $r(a){ko.call(this),this.Ub=new bn,this.Wn=Iv,this.ud=Ch,this.vo=zv,this.Bq=Iy,this.$v=[],this.td=!0,this.Rb=Gv,this.$d=new pn(10,10).freeze();var y=new Fd(this);this.W=new su(y),this.Y=new su(y),this.ru=[],a&&Object.assign(this,a)}Vt($r,ko),$r.prototype.cloneProtected=function(a){ko.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)},$r.prototype.qb=function(a){a.classType===$r?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:$t("Unknown enum value: "+a):ko.prototype.qb.call(this,a)},$r.prototype.createNetwork=function(){return new Fd(this)},$r.prototype.makeNetwork=function(a){function y(b){if(b instanceof Un)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Ln){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 Xt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Fr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},$r.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Xt&&(y=a),this.path===Iv&&y!==null?this.ud=y.isTreePathToChildren?Ch:jd:this.ud=this.path===Iv?Ch: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 bn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Un?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof su&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,Ty(this,y));for(y=this.network.vertexes,a=null;a=$x(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ty(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof su&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof su&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof su&&ux(this,y);if(this.Cu(),this.layerStyle===Hv){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 su&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new bn,this.isValidLayout=!0};function $x(a){var y=new bn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}$r.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Ch:x.sourceEdges.count===0&&this.Ub.add(x);break;case jd:x.destinationEdges.count===0&&this.Ub.add(x);break;default:$t("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 Ch:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case jd:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:$t("Unhandled path value "+a.ud.toString())}}return b}function Ty(a,y){if(y!==null){switch(a.ud){case Ch:if(0<y.destinationEdges.count){for(var x=new kn,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 jd:if(0<y.sourceEdges.count){for(x=new kn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:$t("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var te=x[E];te.initialized=!0,te.level=y.level+1,te.parent=y,a.Ub.remove(te)}for(y=0;y<b;y++)Ty(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}$r.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===Mh&&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 zv:return y.parent!==null?y.parent:a.W;case Ry: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}}$r.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===Mh){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])}}$r.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Mh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}$r.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Np:break;case Zg:a.children.reverse();break;case Xg:a.children.sort(a.comparer);break;case Yg:a.children.sort(a.comparer),a.children.reverse();break;default:$t("Unhandled sorting value "+a.sorting.toString())}},$r.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},$r.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=df(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,se=0,he=a.commentSpacing;if(a.node!==null)for(var ge=a.node.Mu();ge.next();){var ye=ge.value;ye.category==="Comment"&&ye.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ye),ye.Va(),ye=ye.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,ye.width),ne+=ye.height+Math.abs(se)):(te+=ye.width+Math.abs(se),ne=Math.max(ne,ye.height)),se=he)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(te+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),te=Math.max(0,te-a.width)),E=on.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,on.free(E))};function df(a){return a===Ec||a===Mh||a===kc||a===Jh}function Vg(a){return a===Ec||a===Mh}function Ly(a){var y=a.parent;if(y!==null){var x=y.alignment;if(df(x)){if(Vg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===kc)return!0}}return!1}$r.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=df(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,se=Ly(a),he=0,ge=a.comments,ye=ge.length,Me=Et.alloc(),_e=0;_e<ye;_e++){var Ke=ge[_e],qe=Ke.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Me.h(a.bounds.x-a.commentMargin-qe.width,a.bounds.y+he),Ke.move(Me),Ke=Ke.Sd();Ke.next();){var rt=Ke.value;rt.fromSpot=Ps,rt.toSpot=Wa}else for(Me.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Ke.move(Me),Ke=Ke.Sd();Ke.next();)rt=Ke.value,rt.fromSpot=Wa,rt.toSpot=Ps;else if(0<=a.commentMargin)for(Me.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Ke.move(Me),Ke=Ke.Sd();Ke.next();)rt=Ke.value,rt.fromSpot=Wa,rt.toSpot=Ps;else for(Me.h(a.bounds.x+a.commentMargin-qe.width,a.bounds.y+he),Ke.move(Me),Ke=Ke.Sd();Ke.next();)rt=Ke.value,rt.fromSpot=Ps,rt.toSpot=Wa;he=0<=a.commentSpacing?he+(qe.height+a.commentSpacing):he+(a.commentSpacing-qe.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Me.h(a.bounds.x+he,a.bounds.y-a.commentMargin-qe.height),Ke.move(Me),Ke=Ke.Sd();Ke.next();)rt=Ke.value,rt.fromSpot=ws,rt.toSpot=ns;else for(Me.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Ke.move(Me),Ke=Ke.Sd();Ke.next();)rt=Ke.value,rt.fromSpot=ns,rt.toSpot=ws;else if(0<=a.commentMargin)for(Me.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Ke.move(Me),Ke=Ke.Sd();Ke.next();)rt=Ke.value,rt.fromSpot=ns,rt.toSpot=ws;else for(Me.h(a.bounds.x+he,a.bounds.y+a.commentMargin-qe.height),Ke.move(Me),Ke=Ke.Sd();Ke.next();)rt=Ke.value,rt.fromSpot=ws,rt.toSpot=ns;he=0<=a.commentSpacing?he+(qe.width+a.commentSpacing):he+(a.commentSpacing-qe.width)}}if(Et.free(Me),y=he-a.commentSpacing-(b?y.height:y.width),this.ud===Ch)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)}},$r.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case _v:hx(this,a);break;case $g:if(a.alignment===Mh)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=df(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=bu(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===Eh;var ge=he===kh,ye=df(he),Me=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var _e=a.nodeSpacing,Ke=this.computeNodeIndent(a),qe=a.rowSpacing,rt=0;(b||ge||a.hm||a.im&&a.maxGenerationCount===1)&&(rt=Math.max(0,a.rowIndent)),b=a.width;var Mt=a.height,xt=0,At=0,Ot=0,Dt=null,_t=null,Yt=0,_n=0,Jn=0,Xn=0,Mn=0,mn=0,Or=0,br=0;if(ye&&!Vg(he)&&135<E&&ne.reverse(),Vg(he))if(1<se)for(var xi=0;xi<se;xi++)xi%2===0&&xi!==se-1&&(br=Math.max(br,y?ne[xi].Da.width:ne[xi].Da.height));else se===1&&(br=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(he){case Ec:At=135>E?cx(this,a,ne,br,xt,At):fx(this,a,ne,br,xt,At),br=At.x,xt=At.width,At=At.height;break;case kc:for(Dt=0;Dt<se;Dt++)_t=ne[Dt],Me=_t.Da,Ot=mn===0?0:qe,y?(_t.S.h(te-Me.width,Xn+Ot),xt=Math.max(xt,Me.width),At=Math.max(At,Xn+Ot+Me.height),Xn+=Ot+Me.height):(_t.S.h(Jn+Ot,te-Me.height),xt=Math.max(xt,Jn+Ot+Me.width),At=Math.max(At,Me.height),Jn+=Ot+Me.width),mn++;break;case Jh:for(Dt=0;Dt<se;Dt++)_t=ne[Dt],te=_t.Da,Me=mn===0?0:qe,y?(_t.S.h(_e/2+a.focus.x,Xn+Me),xt=Math.max(xt,te.width),At=Math.max(At,Xn+Me+te.height),Xn+=Me+te.height):(_t.S.h(Jn+Me,_e/2+a.focus.y),xt=Math.max(xt,Jn+Me+te.width),At=Math.max(At,te.height),Jn+=Me+te.width),mn++}Dt=il(this,2),_t=il(this,2),y?(Dt[0].h(0,0),Dt[1].h(0,At),_t[0].h(xt,0)):(Dt[0].h(0,0),Dt[1].h(xt,0),_t[0].h(0,At)),_t[1].h(xt,At)}else for(xi=0;xi<se;xi++){var Qi=ne[xi],Ma=Qi.Da;if(y){0<Me&&0<mn&&Jn+_e+Ma.width>Me&&(Jn<te&&Yf(a,he,te-Jn,0,Or,xi-1),Mn++,mn=0,Or=xi,Ot=At,Jn=0,Xn=135<E?-At-qe:At+qe),Rv(this,Qi,0,Xn);var Oa=0;if(mn===0)Dt=Qi.Yo,_t=Qi.kp,Yt=Ma.width,_n=Ma.height,(Dt===null||_t===null||E!==bu(Qi))&&(Dt=il(this,2),_t=il(this,2),Dt[0].h(0,0),Dt[1].h(0,_n),_t[0].h(Yt,0),_t[1].h(Yt,_n));else{var vs=sr();_n=dx(this,a,Qi,Dt,_t,Yt,_n,vs),Oa=_n.x,Dt=vs[0],_t=vs[1],Yt=_n.width,_n=_n.height,dr(vs),Jn<Ma.width&&0>Oa&&(Ad(a,-Oa,0,Or,xi-1),Bv(Dt,-Oa,0),Bv(_t,-Oa,0),Oa=0)}Qi.S.h(Oa,Xn),xt=Math.max(xt,Yt),At=Math.max(At,Ot+(Mn===0?0:qe)+Ma.height),Jn=Yt}else 0<Me&&0<mn&&Xn+_e+Ma.height>Me&&(Xn<te&&Yf(a,he,0,te-Xn,Or,xi-1),Mn++,mn=0,Or=xi,Ot=xt,Xn=0,Jn=135<E?-xt-qe:xt+qe),Rv(this,Qi,Jn,0),Oa=0,mn===0?(Dt=Qi.Yo,_t=Qi.kp,Yt=Ma.width,_n=Ma.height,(Dt===null||_t===null||E!==bu(Qi))&&(Dt=il(this,2),_t=il(this,2),Dt[0].h(0,0),Dt[1].h(Yt,0),_t[0].h(0,_n),_t[1].h(Yt,_n))):(vs=sr(),_n=dx(this,a,Qi,Dt,_t,Yt,_n,vs),Oa=_n.x,Dt=vs[0],_t=vs[1],Yt=_n.width,_n=_n.height,dr(vs),Xn<Ma.height&&0>Oa&&(Ad(a,0,-Oa,Or,xi-1),Bv(Dt,0,-Oa),Bv(_t,0,-Oa),Oa=0)),Qi.S.h(Jn,Oa),At=Math.max(At,_n),xt=Math.max(xt,Ot+(Mn===0?0:qe)+Ma.width),Xn=_n;mn++}switch(0<Mn&&(y?(At+=Math.max(0,x),Jn<xt&&Yf(a,he,xt-Jn,0,Or,se-1),0<rt&&(ge||Ad(a,rt,0,0,se-1),xt+=rt)):(xt+=Math.max(0,x),Xn<At&&Yf(a,he,0,At-Xn,Or,se-1),0<rt&&(ge||Ad(a,0,rt,0,se-1),At+=rt))),rt=ge=0,he){case Ap:y?ge+=xt/2-a.focus.x-Ke/2:rt+=At/2-a.focus.y-Ke/2;break;case Od:0<Mn?y?ge+=xt/2-a.focus.x-Ke/2:rt+=At/2-a.focus.y-Ke/2:y?(br=ne[0].S.x+ne[0].la.x,ge+=br+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-br)/2-a.focus.x-Ke/2):(br=ne[0].S.y+ne[0].la.y,rt+=br+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-br)/2-a.focus.y-Ke/2);break;case Eh:y?(ge-=Ke,xt+=Ke):(rt-=Ke,At+=Ke);break;case kh:y?(ge+=xt-a.width+Ke,xt+=Ke):(rt+=At-a.height+Ke,At+=Ke);break;case Ec:y?1<se?ge+=br+_e/2-a.focus.x:ge+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?rt+=br+_e/2-a.focus.y:rt+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case kc:y?ge+=xt+_e/2-a.focus.x:rt+=At+_e/2-a.focus.y;break;case Jh:break;default:At=this.customAlignment(a,ge,rt,xt,At),ge=At[0],rt=At[1],xt=At[2],At=At[3]}for(Ke=0;Ke<se;Ke++)br=ne[Ke],y?br.S.h(br.S.x+br.la.x-ge,br.S.y+(135<E?(ye?-At:-br.Da.height)+br.la.y-x:Mt+x+br.la.y)):br.S.h(br.S.x+(135<E?(ye?-xt:-br.Da.width)+br.la.x-x:b+x+br.la.x),br.S.y+br.la.y-rt);if(se=ne=0,ye?y?(xt=Ny(a,xt,ge),0>ge&&(ge=0),135<E&&(rt+=At+x),At+=Mt+x,he===Jh&&(ne+=_e/2+a.focus.x),se+=Mt+x):(135<E&&(ge+=xt+x),xt+=b+x,At=Ay(a,At,rt),0>rt&&(rt=0),he===Jh&&(se+=_e/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>xt&&(xt=jy(he,b-xt,0),ne=xt.x,se=xt.y,xt=b,ge=0):xt=Ny(a,xt,ge),0>ge&&(ne-=ge,ge=0),135<E&&(rt+=At+x),At=Math.max(Math.max(At,Mt),At+Mt+x),se+=Mt+x):(135<E&&(ge+=xt+x),xt=Math.max(Math.max(xt,b),xt+b+x),a.comments===null?Mt>At&&(At=jy(he,0,Mt-At),ne=At.x,se=At.y,At=Mt,rt=0):At=Ay(a,At,rt),0>rt&&(se-=rt,rt=0),ne+=b+x),0<Mn)E=il(this,4),Mn=il(this,4),y?(E[2].h(0,Mt+x),E[3].h(E[2].x,At),Mn[2].h(xt,E[2].y),Mn[3].h(Mn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(xt,E[2].y),Mn[2].h(E[2].x,At),Mn[3].h(E[3].x,Mn[2].y));else{for(E=il(this,Dt.length+2),Mn=il(this,_t.length+2),he=0;he<Dt.length;he++)ye=Dt[he],E[he+2].h(ye.x+ne,ye.y+se);for(he=0;he<_t.length;he++)ye=_t[he],Mn[he+2].h(ye.x+ne,ye.y+se)}y?(E[0].h(ge,0),E[1].h(E[0].x,Mt),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])),Mn[0].h(ge+b,0),Mn[1].h(Mn[0].x,Mt),Mn[2].y<Mn[1].y&&(Mn[2].x<Mn[0].x?Mn[2].assign(Mn[1]):Mn[1].assign(Mn[2])),Mn[3].y<Mn[2].y&&(Mn[3].x<Mn[0].x?Mn[3].assign(Mn[2]):Mn[2].assign(Mn[3])),E[2].y-=x/2,Mn[2].y-=x/2):(E[0].h(0,rt),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])),Mn[0].h(0,rt+Mt),Mn[1].h(b,Mn[0].y),Mn[2].x<Mn[1].x&&(Mn[2].y<Mn[0].y?Mn[2].assign(Mn[1]):Mn[1].assign(Mn[2])),Mn[3].x<Mn[2].x&&(Mn[3].y<Mn[0].y?Mn[3].assign(Mn[2]):Mn[2].assign(Mn[3])),E[2].x-=x/2,Mn[2].x-=x/2),_u(this,Dt),_u(this,_t),a.Yo=E,a.kp=Mn,a.la.h(ge,rt),a.Da.h(xt,At)}break;default:$t("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=df(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=bu(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];te=Math.max(te,x?he.Da.width:he.Da.height)}var ge=y.alignment,ye=ge===Eh,Me=ge===kh;se=df(ge);var _e=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Ke=y.nodeSpacing,qe=a.computeNodeIndent(y),rt=ye||Me?0:qe/2,Mt=y.rowSpacing,xt=0;(ye||Me||y.hm||y.im&&y.maxGenerationCount===1)&&(xt=Math.max(0,y.rowIndent)),ye=y.width;var At=y.height,Ot=0,Dt=0,_t=0,Yt=0,_n=0,Jn=0,Xn=0,Mn=0,mn=0,Or=0;if(se&&!Vg(ge)&&135<b&&E.reverse(),Vg(ge))if(1<ne)for(var br=0;br<ne;br++){var xi=E[br],Qi=xi.Da;br%2===0&&br!==ne-1?mn=Math.max(mn,(x?Qi.width:Qi.height)+a.computeBusNodeSpacing(xi)-Ke):br%2!==0&&(Or=Math.max(Or,(x?Qi.width:Qi.height)+a.computeBusNodeSpacing(xi)-Ke))}else ne===1&&(mn=x?E[0].Da.width:E[0].Da.height);if(se)switch(ge){case Ec:case Mh:Dt=135>b?cx(a,y,E,mn,Ot,Dt):fx(a,y,E,mn,Ot,Dt),mn=Dt.x,Ot=Dt.width,Dt=Dt.height;break;case kc:for(_e=0;_e<ne;_e++)rt=E[_e],_t=rt.Da,Or=Xn===0?0:Mt,x?(rt.S.h(te-_t.width,_n+Or),Ot=Math.max(Ot,_t.width),Dt=Math.max(Dt,_n+Or+_t.height),_n+=Or+_t.height):(rt.S.h(Yt+Or,te-_t.height),Ot=Math.max(Ot,Yt+Or+_t.width),Dt=Math.max(Dt,_t.height),Yt+=Or+_t.width),Xn++;break;case Jh:for(te=0;te<ne;te++)_e=E[te],rt=_e.Da,_t=Xn===0?0:Mt,x?(_e.S.h(Ke/2+y.focus.x,_n+_t),Ot=Math.max(Ot,rt.width),Dt=Math.max(Dt,_n+_t+rt.height),_n+=_t+rt.height):(_e.S.h(Yt+_t,Ke/2+y.focus.y),Ot=Math.max(Ot,Yt+_t+rt.width),Dt=Math.max(Dt,rt.height),Yt+=_t+rt.width),Xn++}else for(Or=0;Or<ne;Or++)br=E[Or],xi=br.Da,x?(0<_e&&0<Xn&&Yt+Ke+xi.width>_e&&(Yt<te&&Yf(y,ge,te-Yt,0,Mn,Or-1),Jn++,Xn=0,Mn=Or,_t=Dt,Yt=0,_n=135<b?-Dt-Mt:Dt+Mt),Qi=Xn===0?rt:Ke,Rv(a,br,0,_n),br.S.h(Yt+Qi,_n),Ot=Math.max(Ot,Yt+Qi+xi.width),Dt=Math.max(Dt,_t+(Jn===0?0:Mt)+xi.height),Yt+=Qi+xi.width):(0<_e&&0<Xn&&_n+Ke+xi.height>_e&&(_n<te&&Yf(y,ge,0,te-_n,Mn,Or-1),Jn++,Xn=0,Mn=Or,_t=Ot,_n=0,Yt=135<b?-Ot-Mt:Ot+Mt),Qi=Xn===0?rt:Ke,Rv(a,br,Yt,0),br.S.h(Yt,_n+Qi),Dt=Math.max(Dt,_n+Qi+xi.height),Ot=Math.max(Ot,_t+(Jn===0?0:Mt)+xi.width),_n+=Qi+xi.height),Xn++;switch(0<Jn&&(x?(Dt+=Math.max(0,he),Yt<Ot&&Yf(y,ge,Ot-Yt,0,Mn,ne-1),0<xt&&(Me||Ad(y,xt,0,0,ne-1),Ot+=xt)):(Ot+=Math.max(0,he),_n<Dt&&Yf(y,ge,0,Dt-_n,Mn,ne-1),0<xt&&(Me||Ad(y,0,xt,0,ne-1),Dt+=xt))),xt=Me=0,ge){case Ap:x?Me+=Ot/2-y.focus.x-qe/2:xt+=Dt/2-y.focus.y-qe/2;break;case Od:0<Jn?x?Me+=Ot/2-y.focus.x-qe/2:xt+=Dt/2-y.focus.y-qe/2:x?(a=E[0].S.x+E[0].la.x,Me+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-qe/2):(a=E[0].S.y+E[0].la.y,xt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-qe/2);break;case Eh:x?(Me-=qe,Ot+=qe):(xt-=qe,Dt+=qe);break;case kh:x?(Me+=Ot-y.width+qe,Ot+=qe):(xt+=Dt-y.height+qe,Dt+=qe);break;case Ec:case Mh:x?1<ne?Me+=mn+Ke/2-y.focus.x:Me+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?xt+=mn+Ke/2-y.focus.y:xt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case kc:x?Me+=Ot+Ke/2-y.focus.x:xt+=Dt+Ke/2-y.focus.y;break;case Jh:break;default:a=a.customAlignment(y,Me,xt,Ot,Dt),Me=a[0],xt=a[1],Ot=a[2],Dt=a[3]}for(a=0;a<ne;a++)qe=E[a],x?qe.S.h(qe.S.x+qe.la.x-Me,qe.S.y+(135<b?(se?-Dt:-qe.Da.height)+qe.la.y-he:At+he+qe.la.y)):qe.S.h(qe.S.x+(135<b?(se?-Ot:-qe.Da.width)+qe.la.x-he:ye+he+qe.la.x),qe.S.y+qe.la.y-xt);x?(Ot=Ny(y,Ot,Me),0>Me&&(Me=0),135<b&&(xt+=Dt+he),Dt=Math.max(Math.max(Dt,At),Dt+At+he)):(135<b&&(Me+=Ot+he),Ot=Math.max(Math.max(Ot,ye),Ot+ye+he),Dt=Ay(y,Dt,xt),0>xt&&(xt=0)),y.la.h(Me,xt),y.Da.h(Ot,Dt)}}$r.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 on(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new on(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,ge=bu(y)===90,ye=0,Me=0,_e=0,Ke=0;Ke<ne;Ke++)if(!(Ke%2!==0||1<ne&&Ke===ne-1)){var qe=x[Ke],rt=qe.Da,Mt=ye===0?0:he;if(ge){var xt=a.computeBusNodeSpacing(qe)-se;qe.S.h(b-(rt.width+xt),_e+Mt),E=Math.max(E,rt.width+xt),te=Math.max(te,_e+Mt+rt.height),_e+=Mt+rt.height}else xt=a.computeBusNodeSpacing(qe)-se,qe.S.h(Me+Mt,b-(rt.height+xt)),te=Math.max(te,rt.height+xt),E=Math.max(E,Me+Mt+rt.width),Me+=Mt+rt.width;ye++}for(ye=0,qe=Me,Ke=_e,ge?(Me=b+se,_e=0):(Me=0,_e=b+se),rt=0;rt<ne;rt++)if(rt%2!==0){Mt=x[rt],xt=Mt.Da;var At=ye===0?0:he;if(ge){var Ot=a.computeBusNodeSpacing(Mt)-se;Mt.S.h(Me+Ot,_e+At),E=Math.max(E,Me+xt.width+Ot),te=Math.max(te,_e+At+xt.height),_e+=At+xt.height}else Ot=a.computeBusNodeSpacing(Mt)-se,Mt.S.h(Me+At,_e+Ot),E=Math.max(E,Me+At+xt.width),te=Math.max(te,_e+xt.height+Ot),Me+=At+xt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ge?Math.max(Math.abs(Ke),Math.abs(_e)):Math.max(Math.abs(qe),Math.abs(Me))),ge?(x.S.h(b+se/2-x.focus.x-x.la.x,te+a),ge=b+se/2-x.focus.x-x.la.x,E=Math.max(E,ge+ne.width),0>ge&&(E-=ge),te=Math.max(te,Math.max(Ke,_e)+a+ne.height),0>x.S.x&&(b=Dv(y,x.S.x,!1,b,se))):(x.S.h(E+a,b+se/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(qe,Me)+a+ne.width),_e=b+se/2-x.focus.y-x.la.y,te=Math.max(te,_e+ne.height),0>_e&&(te-=_e),0>x.S.y&&(b=Dv(y,x.S.y,!0,b,se)))),new on(b,0,E,te)}function fx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new on(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new on(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,ge=bu(y)===270,ye=0,Me=0,_e=0,Ke=0;Ke<ne;Ke++)if(!(Ke%2!==0||1<ne&&Ke===ne-1)){var qe=x[Ke],rt=qe.Da,Mt=ye===0?0:he;if(ge){var xt=a.computeBusNodeSpacing(qe)-se;_e-=Mt+rt.height,qe.S.h(b-(rt.width+xt),_e),E=Math.max(E,rt.width+xt),te=Math.max(te,Math.abs(_e))}else xt=a.computeBusNodeSpacing(qe)-se,Me-=Mt+rt.width,qe.S.h(Me,b-(rt.height+xt)),te=Math.max(te,rt.height+xt),E=Math.max(E,Math.abs(Me));ye++}for(ye=0,qe=Me,Ke=_e,ge?(Me=b+se,_e=0):(Me=0,_e=b+se),rt=0;rt<ne;rt++)if(rt%2!==0){Mt=x[rt],xt=Mt.Da;var At=ye===0?0:he;if(ge){var Ot=a.computeBusNodeSpacing(Mt)-se;_e-=At+xt.height,Mt.S.h(Me+Ot,_e),E=Math.max(E,Me+xt.width+Ot),te=Math.max(te,Math.abs(_e))}else Ot=a.computeBusNodeSpacing(Mt)-se,Me-=At+xt.width,Mt.S.h(Me,_e+Ot),te=Math.max(te,_e+xt.height+Ot),E=Math.max(E,Math.abs(Me));ye++}for(1<ne&&ne%2===1&&(he=x[ne-1],ye=he.Da,a=a.computeBusLastRowSpacing(he,ge?Math.max(Math.abs(Ke),Math.abs(_e)):Math.max(Math.abs(qe),Math.abs(Me))),ge?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-ye.height-a),Me=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Me+ye.width),0>Me&&(E-=Me),te=Math.max(te,Math.abs(Math.min(Ke,_e))+a+ye.height),0>he.S.x&&(b=Dv(y,he.S.x,!1,b,se))):(he.S.h(-E-ye.width-a,b+se/2-he.focus.y-he.la.y),E=Math.max(E,Math.abs(Math.min(qe,Me))+a+ye.width),_e=b+se/2-he.focus.y-he.la.y,te=Math.max(te,_e+ye.height),0>_e&&(te-=_e),0>he.S.y&&(b=Dv(y,he.S.y,!0,b,se)))),y=0;y<ne;y++)se=x[y],ge?se.S.h(se.S.x,se.S.y+te):se.S.h(se.S.x+E,se.S.y);return new on(b,0,E,te)}$r.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},$r.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Dv(a,y,x,b,E){a=a.children;for(var te=a.length,ne=0;ne<te;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[te-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ny(a,y,x){switch(a.alignment){case Od:case Ap:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Eh:return a.width>y?a.width:y;case kh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Ec:case Mh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case kc:return a.width-a.focus.x+a.nodeSpacing/2+y;case Jh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case Od:case Ap:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Eh:return a.height>y?a.height:y;case kh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Ec:case Mh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case kc:return a.height-a.focus.y+a.nodeSpacing/2+y;case Jh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case Ap:y/=2,x/=2;break;case Od:y/=2,x/=2;break;case Eh:x=y=0;break;case kh:break;default:$t("Unhandled alignment value "+a.toString())}return new Et(y,x)}function Yf(a,y,x,b,E,te){y=jy(y,x,b),Ad(a,y.x,y.y,E,te)}function Ad(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 Rv(a,y,x,b){var E=y.parent;switch(a.ud){case Ch:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case jd:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:$t("Unhandled path value "+a.ud.toString())}}function Bv(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function dx(a,y,x,b,E,te,ne,se){var he=bu(y),ge=he===90||he===270,ye=y.nodeSpacing;y=b;var Me=E;b=te;var _e=ne,Ke=x.Yo,qe=x.kp;ne=x.Da;var rt=ge?Math.max(_e,ne.height):Math.max(b,ne.width);if((Ke===null||he!==bu(x))&&(Ke=il(a,2),qe=il(a,2),ge?(Ke[0].h(0,0),Ke[1].h(0,ne.height),qe[0].h(ne.width,0),qe[1].h(qe[0].x,Ke[1].y)):(Ke[0].h(0,0),Ke[1].h(ne.width,0),qe[0].h(0,ne.height),qe[1].h(Ke[1].x,qe[0].y))),ge){if(_e=9999999,!(Me===null||2>Me.length||Ke===null||2>Ke.length))for(E=x=0;x<Me.length&&E<Ke.length;){te=Me[x];var Mt=Ke[E];he=Mt.x,ge=Mt.y,he+=b;var xt=te;x+1<Me.length&&(xt=Me[x+1]);var At=Mt;Mt=At.x,At=At.y,E+1<Ke.length&&(At=Ke[E+1],Mt=At.x,At=At.y,Mt+=b);var Ot=_e;te.y===ge?Ot=he-te.x:te.y>ge&&te.y<At?Ot=he+(te.y-ge)/(At-ge)*(Mt-he)-te.x:ge>te.y&&ge<xt.y&&(Ot=he-(te.x+(ge-te.y)/(xt.y-te.y)*(xt.x-te.x))),Ot<_e&&(_e=Ot),xt.y<=te.y?x++:At<=ge?E++:(xt.y<=At&&x++,At<=xt.y&&E++)}if(_e=b-_e,_e+=ye,x=Ke,E=_e,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=il(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].y<y[0].y;)ge=x[te++],ye[b++].h(ge.x+E,ge.y);for(;he<y.length;)ge=y[he++],ye[b++].h(ge.x,ge.y);for(he=y[y.length-1].y;te<x.length&&x[te].y<=he;)te++;for(;te<x.length&&x[te].y>he;)ge=x[te++],ye[b++].h(ge.x+E,ge.y);for(x=il(a,b),he=0;he<b;he++)x[he].assign(ye[he]);_u(a,ye),b=x}if(te=qe,he=_e,Me===null||2>Me.length||te===null||2>te.length)E=null;else{for(ye=il(a,Me.length+te.length),E=ge=x=0;x<Me.length&&Me[x].y<te[0].y;)xt=Me[x++],ye[E++].h(xt.x,xt.y);for(;ge<te.length;)xt=te[ge++],ye[E++].h(xt.x+he,xt.y);for(te=te[te.length-1].y;x<Me.length&&Me[x].y<=te;)x++;for(;x<Me.length&&Me[x].y>te;)he=Me[x++],ye[E++].h(he.x,he.y);for(te=il(a,E),x=0;x<E;x++)te[x].assign(ye[x]);_u(a,ye),E=te}return te=Math.max(0,_e)+ne.width,ne=rt,_u(a,y),_u(a,Ke),_u(a,Me),_u(a,qe),se[0]=b,se[1]=E,new on(_e,0,te,ne)}if(b=9999999,!(Me===null||2>Me.length||Ke===null||2>Ke.length))for(E=x=0;x<Me.length&&E<Ke.length;)te=Me[x],Mt=Ke[E],he=Mt.x,ge=Mt.y,ge+=_e,xt=te,x+1<Me.length&&(xt=Me[x+1]),At=Mt,Mt=At.x,At=At.y,E+1<Ke.length&&(At=Ke[E+1],Mt=At.x,At=At.y,At+=_e),Ot=b,te.x===he?Ot=ge-te.y:te.x>he&&te.x<Mt?Ot=ge+(te.x-he)/(Mt-he)*(At-ge)-te.y:he>te.x&&he<xt.x&&(Ot=ge-(te.y+(he-te.x)/(xt.x-te.x)*(xt.y-te.y))),Ot<b&&(b=Ot),xt.x<=te.x?x++:Mt<=he?E++:(xt.x<=Mt&&x++,Mt<=xt.x&&E++);if(_e-=b,_e+=ye,x=Ke,E=_e,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=il(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].x<y[0].x;)ge=x[te++],ye[b++].h(ge.x,ge.y+E);for(;he<y.length;)ge=y[he++],ye[b++].h(ge.x,ge.y);for(he=y[y.length-1].x;te<x.length&&x[te].x<=he;)te++;for(;te<x.length&&x[te].x>he;)ge=x[te++],ye[b++].h(ge.x,ge.y+E);for(x=il(a,b),he=0;he<b;he++)x[he].assign(ye[he]);_u(a,ye),b=x}if(te=qe,he=_e,Me===null||2>Me.length||te===null||2>te.length)E=null;else{for(ye=il(a,Me.length+te.length),E=ge=x=0;x<Me.length&&Me[x].x<te[0].x;)xt=Me[x++],ye[E++].h(xt.x,xt.y);for(;ge<te.length;)xt=te[ge++],ye[E++].h(xt.x,xt.y+he);for(te=te[te.length-1].x;x<Me.length&&Me[x].x<=te;)x++;for(;x<Me.length&&Me[x].x>te;)he=Me[x++],ye[E++].h(he.x,he.y);for(te=il(a,E),x=0;x<E;x++)te[x].assign(ye[x]);_u(a,ye),E=te}return te=rt,ne=Math.max(0,_e)+ne.height,_u(a,y),_u(a,Ke),_u(a,Me),_u(a,qe),se[0]=b,se[1]=E,new on(_e,0,te,ne)}function il(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 Et;return a}function _u(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}$r.prototype.arrangeTrees=function(){if(this.Rb===Uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof su){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 su&&a.push(x);switch(this.sorting){case Np:break;case Zg:a.reverse();break;case Xg:a.sort(this.comparer);break;case Yg:a.sort(this.comparer),a.reverse();break;default:$t("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 Gv:x+=E.Da.height+this.$d.height;break;case By:y+=E.Da.width+this.$d.width;break;default:$t("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)}}}$r.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},$r.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},$r.prototype.Gu=function(){if(this.layerStyle===Hv){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 Et(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new Et(-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 on(0,te,x,se))):this.angle===90?(E.push(new on(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new on(te,0,se,x))):(E.push(new on(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},$r.prototype.commitLayers=function(){},$r.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},$r.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof su&&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])}}$r.prototype.setPortSpots=function(a){var y=a.alignment;if(df(y)){var x=this.ud===Ch,b=bu(a);switch(b){case 0:var E=Wa;break;case 90:E=ns;break;case 180:E=Ps;break;default:E=ws}var te=a.children,ne=te.length;switch(y){case Ec:case Mh: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?Ps:ws;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=Ps;break;case 90:he=ws;break;case 180:he=Wa;break;default:he=ns}else y%2===0&&(he=b===90||b===270?Wa:ns);x?(a.setsPortSpot&&(se.fromSpot=E),a.setsChildPortSpot&&(se.toSpot=he)):(a.setsPortSpot&&(se.fromSpot=he),a.setsChildPortSpot&&(se.toSpot=E))}}break;case kc:for(b=b===90||b===270?Wa:ns,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 Jh:for(b=b===90||b===270?Ps:ws,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=bu(a),this.ud===Ch){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=Wa;break;case 90:b.fromSpot=ns;break;case 180:b.fromSpot=Ps;break;default:b.fromSpot=ws}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Ps;break;case 90:b.toSpot=ws;break;case 180:b.toSpot=Wa;break;default:b.toSpot=ns}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=Wa;break;case 90:b.toSpot=ns;break;case 180:b.toSpot=Ps;break;default:b.toSpot=ws}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Ps;break;case 90:b.fromSpot=ws;break;case 180:b.fromSpot=Wa;break;default:b.fromSpot=ns}else b.fromSpot=a.childPortSpot}};function bu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}$r.prototype.computeLayerSpacing=function(a){var y=bu(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},$r.prototype.computeNodeIndent=function(a){var y=bu(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)},cn.Object.defineProperties($r.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!==zv&&a!==Dy&&a!==Fy&&a!==Ry||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Iy&&a!==_y&&a!==Hv||(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!==Gv&&a!==By&&a!==Uv||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Np&&a!==Zg&&a!==Xg&&!Yg||(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()):$t("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==_v&&a!==$g||(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!==Np&&a!==Zg&&a!==Xg&&!Yg||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==_v&&a!==$g||(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 Iv=new tn($r,"PathDefault",-1),Ch=new tn($r,"PathDestination",0),jd=new tn($r,"PathSource",1),Np=new tn($r,"SortingForwards",10),Zg=new tn($r,"SortingReverse",11),Xg=new tn($r,"SortingAscending",12),Yg=new tn($r,"SortingDescending",13),Ap=new tn($r,"AlignmentCenterSubtrees",20),Od=new tn($r,"AlignmentCenterChildren",21),Eh=new tn($r,"AlignmentStart",22),kh=new tn($r,"AlignmentEnd",23),Ec=new tn($r,"AlignmentBus",24),Mh=new tn($r,"AlignmentBusBranching",25),kc=new tn($r,"AlignmentTopLeftBus",26),Jh=new tn($r,"AlignmentBottomRightBus",27),_v=new tn($r,"CompactionNone",30),$g=new tn($r,"CompactionBlock",31),zv=new tn($r,"StyleLayered",40),Fy=new tn($r,"StyleLastParents",41),Dy=new tn($r,"StyleAlternating",42),Ry=new tn($r,"StyleRootOnly",43),Gv=new tn($r,"ArrangementVertical",50),By=new tn($r,"ArrangementHorizontal",51),Uv=new tn($r,"ArrangementFixedRoots",52),Iy=new tn($r,"LayerIndividual",60),_y=new tn($r,"LayerSiblings",61),Hv=new tn($r,"LayerUniform",62);$r.className="TreeLayout",$r.PathDefault=Iv,$r.PathDestination=Ch,$r.PathSource=jd,$r.SortingForwards=Np,$r.SortingReverse=Zg,$r.SortingAscending=Xg,$r.SortingDescending=Yg,$r.AlignmentCenterSubtrees=Ap,$r.AlignmentCenterChildren=Od,$r.AlignmentStart=Eh,$r.AlignmentEnd=kh,$r.AlignmentBus=Ec,$r.AlignmentBusBranching=Mh,$r.AlignmentTopLeftBus=kc,$r.AlignmentBottomRightBus=Jh,$r.CompactionNone=_v,$r.CompactionBlock=$g,$r.StyleLayered=zv,$r.StyleLastParents=Fy,$r.StyleAlternating=Dy,$r.StyleRootOnly=Ry,$r.ArrangementVertical=Gv,$r.ArrangementHorizontal=By,$r.ArrangementFixedRoots=Uv,$r.LayerIndividual=Iy,$r.LayerSiblings=_y,$r.LayerUniform=Hv;function Fd(a){no.call(this,a)}Vt(Fd,no),Fd.prototype.createVertex=function(){return new su(this)},Fd.prototype.createEdge=function(){return new jp(this)},Fd.className="TreeNetwork";function su(a){va.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 Et(0,0),this.Da=new pn(0,0),this.la=new Et(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Np,this.hd=oy,this.Kb=0,this.Jb=Od,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=$g,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=za,this.wr=!0,this.Dp=za}Vt(su,va),su.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)},cn.Object.defineProperties(su.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)}}}),su.className="TreeVertex";function jp(a){yl.call(this,a),this.$t=new Et(0,0)}Vt(jp,yl),jp.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 Ch:x=this.fromVertex,b=this.toVertex;break;case jd:x=this.toVertex,b=this.fromVertex;break;default:$t("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=bu(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===Fl,ge=a.isOrthogonal,ye;if(a.uh(),ge||he){for(ye=2;4<a.pointsCount;)a.pv(2);var Me=a.i(1),_e=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Me=a.i(0),_e=a.i(a.pointsCount-1)}var Ke=a.i(a.pointsCount-1);te===0?(x.alignment===kh?(te=b.bottom+E.y,E.y===0&&Me.y>Ke.y+x.rowIndent&&(te=Math.min(te,Math.max(Me.y,te-y.computeNodeIndent(x))))):x.alignment===Eh?(te=b.top+E.y,E.y===0&&Me.y<Ke.y-x.rowIndent&&(te=Math.max(te,Math.min(Me.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(ye,Me.x,te),ye++,a.m(ye,b.right+ne,te),ye++,a.m(ye,b.right+ne+(E.x-se)/3,te),ye++,a.m(ye,b.right+ne+2*(E.x-se)/3,te),ye++,a.m(ye,b.right+ne+(E.x-se),te),ye++,a.m(ye,_e.x,te)):(ge&&(a.m(ye,b.right+ne/2,Me.y),ye++),a.m(ye,b.right+ne/2,te),ye++,a.m(ye,b.right+ne+E.x-(ge?se/2:se),te),ye++,ge&&a.m(ye,a.i(ye-1).x,_e.y))):te===90?(x.alignment===kh?(te=b.right+E.x,E.x===0&&Me.x>Ke.x+x.rowIndent&&(te=Math.min(te,Math.max(Me.x,te-y.computeNodeIndent(x))))):x.alignment===Eh?(te=b.left+E.x,E.x===0&&Me.x<Ke.x-x.rowIndent&&(te=Math.max(te,Math.min(Me.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(ye,te,Me.y),ye++,a.m(ye,te,b.bottom+ne),ye++,a.m(ye,te,b.bottom+ne+(E.y-se)/3),ye++,a.m(ye,te,b.bottom+ne+2*(E.y-se)/3),ye++,a.m(ye,te,b.bottom+ne+(E.y-se)),ye++,a.m(ye,te,_e.y)):(ge&&(a.m(ye,Me.x,b.bottom+ne/2),ye++),a.m(ye,te,b.bottom+ne/2),ye++,a.m(ye,te,b.bottom+ne+E.y-(ge?se/2:se)),ye++,ge&&a.m(ye,_e.x,a.i(ye-1).y))):te===180?(x.alignment===kh?(te=b.bottom+E.y,E.y===0&&Me.y>Ke.y+x.rowIndent&&(te=Math.min(te,Math.max(Me.y,te-y.computeNodeIndent(x))))):x.alignment===Eh?(te=b.top+E.y,E.y===0&&Me.y<Ke.y-x.rowIndent&&(te=Math.max(te,Math.min(Me.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(ye,Me.x,te),ye++,a.m(ye,b.left-ne,te),ye++,a.m(ye,b.left-ne+(E.x+se)/3,te),ye++,a.m(ye,b.left-ne+2*(E.x+se)/3,te),ye++,a.m(ye,b.left-ne+(E.x+se),te),ye++,a.m(ye,_e.x,te)):(ge&&(a.m(ye,b.left-ne/2,Me.y),ye++),a.m(ye,b.left-ne/2,te),ye++,a.m(ye,b.left-ne+E.x+(ge?se/2:se),te),ye++,ge&&a.m(ye,a.i(ye-1).x,_e.y))):te===270?(x.alignment===kh?(te=b.right+E.x,E.x===0&&Me.x>Ke.x+x.rowIndent&&(te=Math.min(te,Math.max(Me.x,te-y.computeNodeIndent(x))))):x.alignment===Eh?(te=b.left+E.x,E.x===0&&Me.x<Ke.x-x.rowIndent&&(te=Math.max(te,Math.min(Me.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(ye,te,Me.y),ye++,a.m(ye,te,b.top-ne),ye++,a.m(ye,te,b.top-ne+(E.y+se)/3),ye++,a.m(ye,te,b.top-ne+2*(E.y+se)/3),ye++,a.m(ye,te,b.top-ne+(E.y+se)),ye++,a.m(ye,te,_e.y)):(ge&&(a.m(ye,Me.x,b.top-ne/2),ye++),a.m(ye,te,b.top-ne/2),ye++,a.m(ye,te,b.top-ne+E.y+(ge?se/2:se)),ye++,ge&&a.m(ye,_e.x,a.i(ye-1).y))):$t("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=bu(x),y!==bu(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===Fl,E=a.isOrthogonal,b=df(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()))}}},cn.Object.defineProperties(jp.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)}}}),jp.className="TreeEdge",po.prototype.initializeStandardTools=function(){this.gb("Action",new aa,this.mouseDownTools),this.gb("Relinking",new wi,this.mouseDownTools),this.gb("LinkReshaping",new Pr,this.mouseDownTools),this.gb("Rotating",new Ro,this.mouseDownTools),this.gb("Resizing",new Ui,this.mouseDownTools),this.gb("Linking",new Ci,this.mouseMoveTools),this.gb("Dragging",new Oo,this.mouseMoveTools),this.gb("DragSelecting",new wa,this.mouseMoveTools),this.gb("Panning",new $i,this.mouseMoveTools),this.gb("ContextMenu",new Bo,this.mouseUpTools),this.gb("TextEditing",new Ti,this.mouseUpTools),this.gb("ClickCreating",new $a,this.mouseUpTools),this.gb("ClickSelecting",new Go,this.mouseUpTools)},nh("Horizontal",new ym),nh("Spot",new xm),nh("Table",new Pm),nh("Viewbox",new Em),nh("TableRow",new bm),nh("TableColumn",new Cm),nh("Graduated",new fg),nh("Grid",new cg),tp.add("GraphLinksModel",ja),tp.add("TreeModel",Zl);var Wv=en.go,zy={get licenseKey(){return Xt.licenseKey},set licenseKey(a){Xt.licenseKey=a},get version(){return Xt.version},Group:Fr,EnumValue:tn,List:kn,Set:bn,Map:Kn,Point:Et,Size:pn,Rect:on,Margin:wr,Spot:ar,Geometry:jn,PathFigure:pa,PathSegment:ci,InputEvent:Ya,DiagramEvent:Zu,ChangedEvent:Lo,Model:er,GraphLinksModel:ai,TreeModel:Os,Binding:ta,Transaction:xa,UndoManager:jo,CommandHandler:kt,Tool:li,DraggingTool:Oo,DraggingInfo:Kh,DraggingOptions:ce,LinkingBaseTool:kr,LinkingTool:Ci,RelinkingTool:wi,LinkReshapingTool:Pr,ResizingTool:Ui,RotatingTool:Ro,ClickSelectingTool:Go,ActionTool:aa,ClickCreatingTool:$a,HTMLInfo:xo,ContextMenuTool:Bo,DragSelectingTool:wa,PanningTool:$i,TextEditingTool:Ti,ToolManager:po,Animation:Aa,AnimationManager:is,AnimationTrigger:pl,Layer:fi,Diagram:Xt,Palette:ke,Overview:Oe,Brush:Ri,GraphObject:zt,Panel:Cn,RowColumnDefinition:fa,Shape:Br,TextBlock:to,Picture:Ws,Part:ur,Adornment:di,Node:Un,Link:Ln,Placeholder:Ls,Layout:ko,LayoutNetwork:no,LayoutVertex:va,LayoutEdge:yl,GridLayout:Ua,PanelLayout:ma,CircularLayout:Do,CircularNetwork:Mp,CircularVertex:zg,CircularEdge:Cv,ForceDirectedLayout:Za,ForceDirectedNetwork:Nd,ForceDirectedVertex:Gg,ForceDirectedEdge:Ug,LayeredDigraphLayout:_i,LayeredDigraphNetwork:Lp,LayeredDigraphVertex:Yl,LayeredDigraphEdge:Kg,TreeLayout:$r,TreeNetwork:Fd,TreeVertex:su,TreeEdge:jp};typeof Wv=="object"&&Wv.version&&Nr("WARNING: a `go` object on the root object is already defined. "+("Debug"in Wv?"debug ":"")+"version: "+Wv.version+", replaced with version: "+zy.version),Xt.prototype.go=zy,en.go=zy,typeof Sn.exports=="object"&&(Sn.exports=typeof ot.g!="undefined"?ot.g.go:self.go)}();var st=typeof ot.g!="undefined"?ot.g.go:self.go;const Ft=typeof ot.g!="undefined"?ot.g.go:self.go,ae=Ft.Group,Ge=Ft.EnumValue,Re=Ft.List,fe=Ft.Set,pe=Ft.Map,be=Ft.Point,Ee=Ft.Size,we=Ft.Rect,Te=Ft.Margin,ve=Ft.Spot,Pe=Ft.Geometry,de=Ft.PathFigure,ee=Ft.PathSegment,z=Ft.InputEvent,oe=Ft.DiagramEvent,ie=Ft.ChangedEvent,le=Ft.Model,ue=Ft.GraphLinksModel,me=Ft.TreeModel,xe=Ft.Binding,Ae=Ft.Transaction,De=Ft.UndoManager,Fe=Ft.CommandHandler,je=Ft.Tool,Le=Ft.DraggingTool,Be=Ft.DraggingInfo,Ue=Ft.LinkingBaseTool,Je=Ft.LinkingTool,He=Ft.RelinkingTool,We=Ft.LinkReshapingTool,at=Ft.ResizingTool,ft=Ft.RotatingTool,mt=Ft.ClickSelectingTool,Lt=Ft.ActionTool,Xe=Ft.ClickCreatingTool,et=Ft.HTMLInfo,lt=Ft.ContextMenuTool,vt=Ft.DragSelectingTool,wt=Ft.PanningTool,ht=Ft.TextEditingTool,dt=Ft.ToolManager,ut=Ft.Animation,Pt=Ft.AnimationManager,yt=Ft.AnimationTrigger,gt=Ft.Layer,Tt=Ft.Diagram,ct=Ft.Palette,Ye=Ft.Overview,Ze=Ft.Brush,Se=Ft.GraphObject,Ne=Ft.Panel,$e=Ft.RowColumnDefinition,nt=Ft.Shape,Ie=Ft.TextBlock,ze=Ft.TextBlockMetrics,Ve=Ft.Picture,it=Ft.Part,St=Ft.Adornment,Ct=Ft.Node,It=Ft.Link,jt=Ft.Placeholder,Kt=Ft.Layout,an=Ft.LayoutNetwork,un=Ft.LayoutVertex,hn=Ft.LayoutEdge,qt=Ft.GridLayout,On=Ft.PanelLayout,fn=Ft.CircularLayout,Wt=Ft.CircularNetwork,Bn=Ft.CircularVertex,zn=Ft.CircularEdge,Yn=Ft.ForceDirectedLayout,fr=Ft.ForceDirectedNetwork,Gr=Ft.ForceDirectedVertex,lr=Ft.ForceDirectedEdge,ni=Ft.LayeredDigraphLayout,ri=Ft.LayeredDigraphNetwork,ki=Ft.LayeredDigraphVertex,ji=Ft.LayeredDigraphEdge,Vi=Ft.TreeLayout,Io=Ft.TreeNetwork,Mo=Ft.TreeVertex,ro=Ft.TreeEdge,Nn=Ft.version},19575:function(Sn,vn,ot){var st,Ft;(function(ae,Ge){Sn.exports=Ge(ae)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ot.g!="undefined"?ot.g:this,function(ae){"use strict";ae=ae||{};var Ge=ae.Base64,Re="2.6.4",fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pe=function(He){for(var We={},at=0,ft=He.length;at<ft;at++)We[He.charAt(at)]=at;return We}(fe),be=String.fromCharCode,Ee=function(He){if(He.length<2){var We=He.charCodeAt(0);return We<128?He:We<2048?be(192|We>>>6)+be(128|We&63):be(224|We>>>12&15)+be(128|We>>>6&63)+be(128|We&63)}else{var We=65536+(He.charCodeAt(0)-55296)*1024+(He.charCodeAt(1)-56320);return be(240|We>>>18&7)+be(128|We>>>12&63)+be(128|We>>>6&63)+be(128|We&63)}},we=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Te=function(He){return He.replace(we,Ee)},ve=function(He){var We=[0,2,1][He.length%3],at=He.charCodeAt(0)<<16|(He.length>1?He.charCodeAt(1):0)<<8|(He.length>2?He.charCodeAt(2):0),ft=[fe.charAt(at>>>18),fe.charAt(at>>>12&63),We>=2?"=":fe.charAt(at>>>6&63),We>=1?"=":fe.charAt(at&63)];return ft.join("")},Pe=ae.btoa&&typeof ae.btoa=="function"?function(He){return ae.btoa(He)}:function(He){if(He.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return He.replace(/[\s\S]{1,3}/g,ve)},de=function(He){return Pe(Te(String(He)))},ee=function(He){return He.replace(/[+\/]/g,function(We){return We=="+"?"-":"_"}).replace(/=/g,"")},z=function(He,We){return We?ee(de(He)):de(He)},oe=function(He){return z(He,!0)},ie;ae.Uint8Array&&(ie=function(He,We){for(var at="",ft=0,mt=He.length;ft<mt;ft+=3){var Lt=He[ft],Xe=He[ft+1],et=He[ft+2],lt=Lt<<16|Xe<<8|et;at+=fe.charAt(lt>>>18)+fe.charAt(lt>>>12&63)+(typeof Xe!="undefined"?fe.charAt(lt>>>6&63):"=")+(typeof et!="undefined"?fe.charAt(lt&63):"=")}return We?ee(at):at});var le=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=function(He){switch(He.length){case 4:var We=(7&He.charCodeAt(0))<<18|(63&He.charCodeAt(1))<<12|(63&He.charCodeAt(2))<<6|63&He.charCodeAt(3),at=We-65536;return be((at>>>10)+55296)+be((at&1023)+56320);case 3:return be((15&He.charCodeAt(0))<<12|(63&He.charCodeAt(1))<<6|63&He.charCodeAt(2));default:return be((31&He.charCodeAt(0))<<6|63&He.charCodeAt(1))}},me=function(He){return He.replace(le,ue)},xe=function(He){var We=He.length,at=We%4,ft=(We>0?pe[He.charAt(0)]<<18:0)|(We>1?pe[He.charAt(1)]<<12:0)|(We>2?pe[He.charAt(2)]<<6:0)|(We>3?pe[He.charAt(3)]:0),mt=[be(ft>>>16),be(ft>>>8&255),be(ft&255)];return mt.length-=[0,0,2,1][at],mt.join("")},Ae=ae.atob&&typeof ae.atob=="function"?function(He){return ae.atob(He)}:function(He){return He.replace(/\S{1,4}/g,xe)},De=function(He){return Ae(String(He).replace(/[^A-Za-z0-9\+\/]/g,""))},Fe=function(He){return me(Ae(He))},je=function(He){return String(He).replace(/[-_]/g,function(We){return We=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Le=function(He){return Fe(je(He))},Be;ae.Uint8Array&&(Be=function(He){return Uint8Array.from(De(je(He)),function(We){return We.charCodeAt(0)})});var Ue=function(){var He=ae.Base64;return ae.Base64=Ge,He};if(ae.Base64={VERSION:Re,atob:De,btoa:Pe,fromBase64:Le,toBase64:z,utob:Te,encode:z,encodeURI:oe,btou:me,decode:Le,noConflict:Ue,fromUint8Array:ie,toUint8Array:Be},typeof Object.defineProperty=="function"){var Je=function(He){return{value:He,enumerable:!1,writable:!0,configurable:!0}};ae.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Je(function(){return Le(this)})),Object.defineProperty(String.prototype,"toBase64",Je(function(He){return z(this,He)})),Object.defineProperty(String.prototype,"toBase64URI",Je(function(){return z(this,!0)}))}}return ae.Meteor&&(Base64=ae.Base64),Sn.exports?Sn.exports.Base64=ae.Base64:(st=[],Ft=function(){return ae.Base64}.apply(vn,st),Ft!==void 0&&(Sn.exports=Ft)),{Base64:ae.Base64}})},15979:function(Sn,vn,ot){"use strict";ot.d(vn,{hP:function(){return Ye}});var st=function(Ze,Se){return(st=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ne,$e){Ne.__proto__=$e}||function(Ne,$e){for(var nt in $e)Object.prototype.hasOwnProperty.call($e,nt)&&(Ne[nt]=$e[nt])})(Ze,Se)};function Ft(Ze,Se){function Ne(){this.constructor=Ze}st(Ze,Se),Ze.prototype=Se===null?Object.create(Se):(Ne.prototype=Se.prototype,new Ne)}function ae(Ze,Se,Ne,$e){return new(Ne||(Ne=Promise))(function(nt,Ie){function ze(St){try{it($e.next(St))}catch(Ct){Ie(Ct)}}function Ve(St){try{it($e.throw(St))}catch(Ct){Ie(Ct)}}function it(St){var Ct;St.done?nt(St.value):(Ct=St.value,Ct instanceof Ne?Ct:new Ne(function(It){It(Ct)})).then(ze,Ve)}it(($e=$e.apply(Ze,Se||[])).next())})}function Ge(Ze,Se){var Ne,$e,nt,Ie,ze={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return Ie={next:Ve(0),throw:Ve(1),return:Ve(2)},typeof Symbol=="function"&&(Ie[Symbol.iterator]=function(){return this}),Ie;function Ve(it){return function(St){return function(Ct){if(Ne)throw new TypeError("Generator is already executing.");for(;ze;)try{if(Ne=1,$e&&(nt=2&Ct[0]?$e.return:Ct[0]?$e.throw||((nt=$e.return)&&nt.call($e),0):$e.next)&&!(nt=nt.call($e,Ct[1])).done)return nt;switch($e=0,nt&&(Ct=[2&Ct[0],nt.value]),Ct[0]){case 0:case 1:nt=Ct;break;case 4:return ze.label++,{value:Ct[1],done:!1};case 5:ze.label++,$e=Ct[1],Ct=[0];continue;case 7:Ct=ze.ops.pop(),ze.trys.pop();continue;default:if(nt=ze.trys,!((nt=nt.length>0&&nt[nt.length-1])||Ct[0]!==6&&Ct[0]!==2)){ze=0;continue}if(Ct[0]===3&&(!nt||Ct[1]>nt[0]&&Ct[1]<nt[3])){ze.label=Ct[1];break}if(Ct[0]===6&&ze.label<nt[1]){ze.label=nt[1],nt=Ct;break}if(nt&&ze.label<nt[2]){ze.label=nt[2],ze.ops.push(Ct);break}nt[2]&&ze.ops.pop(),ze.trys.pop();continue}Ct=Se.call(Ze,ze)}catch(It){Ct=[6,It],$e=0}finally{Ne=nt=0}if(5&Ct[0])throw Ct[1];return{value:Ct[0]?Ct[1]:void 0,done:!0}}([it,St])}}}function Re(){for(var Ze=0,Se=0,Ne=arguments.length;Se<Ne;Se++)Ze+=arguments[Se].length;var $e=Array(Ze),nt=0;for(Se=0;Se<Ne;Se++)for(var Ie=arguments[Se],ze=0,Ve=Ie.length;ze<Ve;ze++,nt++)$e[nt]=Ie[ze];return $e}var fe=function(){function Ze(){}return Ze.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ze.setAttributes=function(Se,Ne){for(var $e=0,nt=Ne;$e<nt.length;$e++){var Ie=nt[$e],ze=Ie[0],Ve=Ie[1];Se.setAttribute(ze,Ve)}},Ze.createRect=function(Se,Ne,$e){var nt=document.createElementNS("http://www.w3.org/2000/svg","rect");return nt.setAttribute("width",Se.toString()),nt.setAttribute("height",Ne.toString()),$e&&Ze.setAttributes(nt,$e),nt},Ze.createLine=function(Se,Ne,$e,nt,Ie){var ze=document.createElementNS("http://www.w3.org/2000/svg","line");return ze.setAttribute("x1",Se.toString()),ze.setAttribute("y1",Ne.toString()),ze.setAttribute("x2",$e.toString()),ze.setAttribute("y2",nt.toString()),Ie&&Ze.setAttributes(ze,Ie),ze},Ze.createPolygon=function(Se,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","polygon");return $e.setAttribute("points",Se),Ne&&Ze.setAttributes($e,Ne),$e},Ze.createCircle=function(Se,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","circle");return $e.setAttribute("cx",(Se/2).toString()),$e.setAttribute("cy",(Se/2).toString()),$e.setAttribute("r",Se.toString()),Ne&&Ze.setAttributes($e,Ne),$e},Ze.createEllipse=function(Se,Ne,$e){var nt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return nt.setAttribute("cx",(Se/2).toString()),nt.setAttribute("cy",(Ne/2).toString()),nt.setAttribute("rx",(Se/2).toString()),nt.setAttribute("ry",(Ne/2).toString()),$e&&Ze.setAttributes(nt,$e),nt},Ze.createGroup=function(Se){var Ne=document.createElementNS("http://www.w3.org/2000/svg","g");return Se&&Ze.setAttributes(Ne,Se),Ne},Ze.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ze.createMarker=function(Se,Ne,$e,nt,Ie,ze,Ve){var it=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ze.setAttributes(it,[["id",Se],["orient",Ne],["markerWidth",$e.toString()],["markerHeight",nt.toString()],["refX",Ie.toString()],["refY",ze.toString()]]),it.appendChild(Ve),it},Ze.createText=function(Se){var Ne=document.createElementNS("http://www.w3.org/2000/svg","text");return Ne.setAttribute("x","0"),Ne.setAttribute("y","0"),Se&&Ze.setAttributes(Ne,Se),Ne},Ze.createTSpan=function(Se,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","tspan");return $e.textContent=Se,Ne&&Ze.setAttributes($e,Ne),$e},Ze.createImage=function(Se){var Ne=document.createElementNS("http://www.w3.org/2000/svg","image");return Se&&Ze.setAttributes(Ne,Se),Ne},Ze.createPoint=function(Se,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return $e.x=Se,$e.y=Ne,$e},Ze.createPath=function(Se,Ne){var $e=document.createElementNS("http://www.w3.org/2000/svg","path");return $e.setAttribute("d",Se),Ne&&Ze.setAttributes($e,Ne),$e},Ze}(),pe=function(){function Ze(){}return Ze.addKey=function(Se){Ze.key=Se},Object.defineProperty(Ze,"isLicensed",{get:function(){return!!Ze.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ze.key)},enumerable:!1,configurable:!0}),Ze}(),be=function(){function Ze(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ze.prototype.rasterize=function(Se,Ne,$e){var nt=this;return new Promise(function(Ie){var ze=$e!==void 0?$e:document.createElement("canvas");Se===null&&(nt.markersOnly=!0,nt.naturalSize=!1);var Ve=document.createElementNS("http://www.w3.org/2000/svg","svg");Ve.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ve.setAttribute("width",Ne.width.baseVal.valueAsString),Ve.setAttribute("height",Ne.height.baseVal.valueAsString),Ve.setAttribute("viewBox","0 0 "+Ne.viewBox.baseVal.width.toString()+" "+Ne.viewBox.baseVal.height.toString()),Ve.innerHTML=Ne.innerHTML,nt.naturalSize===!0?(Ve.width.baseVal.value=Se.naturalWidth,Ve.height.baseVal.value=Se.naturalHeight):nt.width!==void 0&&nt.height!==void 0&&(Ve.width.baseVal.value=nt.width,Ve.height.baseVal.value=nt.height),ze.width=Ve.width.baseVal.value,ze.height=Ve.height.baseVal.value;var it=Ve.outerHTML,St=ze.getContext("2d");nt.markersOnly!==!0&&St.drawImage(Se,0,0,ze.width,ze.height);var Ct=window.URL,It=new Image(ze.width,ze.height);It.setAttribute("crossOrigin","anonymous");var jt=new Blob([it],{type:"image/svg+xml"}),Kt=Ct.createObjectURL(jt);It.onload=function(){St.drawImage(It,0,0),Ct.revokeObjectURL(Kt);var an=ze.toDataURL(nt.imageType,nt.imageQuality);Ie(an)},It.src=Kt})},Ze}(),Ee=function(){},we=function(){function Ze(Se){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Se+"_"}return Object.defineProperty(Ze.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.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(Ze.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ze.prototype.addClass=function(Se){return this.styleSheet===void 0&&this.addStyleSheet(),Se.name=""+this.classNamePrefix+Se.localName,this.classes.push(Se),this.styleSheet.sheet.insertRule("."+Se.name+" {"+Se.style+"}",this.styleSheet.sheet.cssRules.length),Se},Ze.prototype.addRule=function(Se){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Se),this.styleSheet.sheet.insertRule(Se.selector+" {"+Se.style+"}",this.styleSheet.sheet.cssRules.length)},Ze.prototype.addStyleSheet=function(){var Se;this.styleSheet=document.createElement("style"),((Se=this.styleSheetRoot)!==null&&Se!==void 0?Se:document.head).appendChild(this.styleSheet),this.addRule(new Te("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Te("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Te("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new ve("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new ve("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Ze.prototype.removeStyleSheet=function(){var Se;this.styleSheet&&(((Se=this.styleSheetRoot)!==null&&Se!==void 0?Se:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ze}(),Te=function(Ze,Se){this.selector=Ze,this.style=Se},ve=function(Ze,Se){this.localName=Ze,this.style=Se},Pe=function(){function Ze(Se,Ne,$e,nt,Ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Se,this.displayMode=Ne,this.markerItems=$e,this.uiStyleSettings=nt,this.styles=Ie,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ze.prototype.show=function(Se){var Ne=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Se,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var $e=document.createElement("div");$e.className=this.toolbarBlockStyleClass.name,$e.style.whiteSpace="nowrap",this.uiContainer.appendChild($e),this.addActionButton($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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($e,'<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 ze=document.createElement("div");ze.className=""+Ne.toolbarButtonStyleClass.name,ze.setAttribute("data-type-name",Ie.typeName),ze.innerHTML=Ie.icon,ze.addEventListener("click",function(){Ne.markerToolbarButtonClicked(ze,Ie)}),Ne.buttons.push(ze),Ne.markerButtons.push(ze)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var nt=document.createElement("div");nt.className=this.toolbarBlockStyleClass.name,nt.style.whiteSpace="nowrap",nt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(nt),this.addActionButton(nt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(nt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ze.prototype.addButtonClickListener=function(Se){this.buttonClickListeners.push(Se)},Ze.prototype.removeButtonClickListener=function(Se){this.buttonClickListeners.indexOf(Se)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Se),1)},Ze.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ze.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Se=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ne=0;Ne<this.markerButtons.length;Ne++)Ne<Se||Ne===Se&&this.markerButtons.length-1===Se?this.markerButtonBlock.appendChild(this.markerButtons[Ne]):(Ne===Se&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ne]))}},Ze.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")},Ze.prototype.resetButtonStyles=function(){var Se=this;this.buttons.forEach(function(Ne){Ne.className=Ne.className.replace(Se.uiStyleSettings.toolbarButtonStyleColorsClassName?Se.uiStyleSettings.toolbarButtonStyleColorsClassName:Se.toolbarButtonStyleColorsClass.name,"").trim(),Ne.className=Ne.className.replace(Se.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Se.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Se.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ne.className+=" "+(Se.uiStyleSettings.toolbarButtonStyleColorsClassName?Se.uiStyleSettings.toolbarButtonStyleColorsClassName:Se.toolbarButtonStyleColorsClass.name)})},Ze.prototype.addActionButton=function(Se,Ne,$e){var nt=this,Ie=document.createElement("div");switch(Ie.className=""+this.toolbarButtonStyleClass.name,Ie.innerHTML=Ne,Ie.setAttribute("data-action",$e),Ie.addEventListener("click",function(){nt.actionToolbarButtonClicked(Ie,$e)}),$e){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}Se.appendChild(Ie),this.buttons.push(Ie)},Ze.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 Se=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Se)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Se)+`px;
|
|
padding: `+Se+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Te("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Te("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},Ze.prototype.markerToolbarButtonClicked=function(Se,Ne){this.setActiveButton(Se),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($e){return $e("marker",Ne)}),this.markerButtonOverflowBlock.style.display="none"},Ze.prototype.actionToolbarButtonClicked=function(Se,Ne){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function($e){return $e("action",Ne)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ze.prototype.setActiveButton=function(Se){this.resetButtonStyles(),Se.className=Se.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Se.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ze.prototype.setActiveMarkerButton=function(Se){var Ne=this.markerButtons.find(function($e){return $e.getAttribute("data-type-name")===Se});Ne&&this.setActiveButton(Ne)},Ze.prototype.setCurrentMarker=function(Se){var Ne=this;this.currentMarker=Se,this.buttons.filter(function($e){return/delete|notes/.test($e.getAttribute("data-action"))}).forEach(function($e){Ne.currentMarker===void 0?($e.style.fillOpacity="0.4",$e.style.pointerEvents="none"):($e.style.fillOpacity="1",$e.style.pointerEvents="all")})},Ze}(),de=function(){function Ze(Se,Ne,$e,nt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Se,this.displayMode=Ne,this.uiStyleSettings=$e,this.styles=nt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ze.prototype.addStyles=function(){var Se;this.toolboxStyleClass=this.styles.addClass(new ve("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new ve("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var Ne=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ve("toolbox-panel-row_colors",`
|
|
background-color: `+((Se=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Se!==void 0?Se:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ne)+`px;
|
|
padding: `+Ne+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Te("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Te("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},Ze.prototype.show=function(Se){var Ne;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Se,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ze.prototype.setPanelButtons=function(Se){var Ne,$e,nt=this;this.panels=Se,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(($e=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&$e!==void 0?$e:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ie){var ze;Ie.uiStyleSettings=nt.uiStyleSettings;var Ve=document.createElement("div");Ve.className=nt.toolboxButtonStyleClass.name+" "+((ze=nt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ze!==void 0?ze:nt.toolboxButtonStyleColorsClass.name),Ve.innerHTML=Ie.icon,Ve.title=Ie.title,Ve.addEventListener("click",function(){nt.panelButtonClick(Ie)}),nt.panelButtons.push(Ve),nt.buttonRow.appendChild(Ve)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ze.prototype.panelButtonClick=function(Se){var Ne=this,$e=-1;if(Se!==this.activePanel){$e=this.panels.indexOf(Se),this.panelRow.innerHTML="";var nt=Se.getUi();nt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(nt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=Se}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ne.displayMode==="inline"?Ne.panelRow.style.display="none":Ne.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ie,ze){var Ve,it;Ie.className=Ne.toolboxButtonStyleClass.name+" "+(ze===$e?""+((Ve=Ne.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ve!==void 0?Ve:Ne.toolboxActiveButtonStyleColorsClass.name):""+((it=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&it!==void 0?it:Ne.toolboxButtonStyleColorsClass.name))})},Ze}(),ee=function(Ze,Se){this.title=Ze,this.icon=Se},z=function(Ze){function Se(Ne,$e,nt,Ie){var ze=Ze.call(this,Ne,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 ze.colors=[],ze.addTransparent=!1,ze.colorBoxes=[],ze.colors=$e,ze.currentColor=nt,ze.setCurrentColor=ze.setCurrentColor.bind(ze),ze.getColorBox=ze.getColorBox.bind(ze),ze}return Ft(Se,Ze),Se.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.overflow="hidden",$e.style.whiteSpace="nowrap",this.colors.forEach(function(nt){var Ie=Ne.getColorBox(nt);$e.appendChild(Ie),Ne.colorBoxes.push(Ie)}),$e},Se.prototype.getColorBox=function(Ne){var $e=this,nt=this.uiStyleSettings.toolbarHeight/4,Ie=this.uiStyleSettings.toolbarHeight-nt,ze=document.createElement("div");ze.style.display="inline-block",ze.style.boxSizing="content-box",ze.style.width=Ie-2+"px",ze.style.height=Ie-2+"px",ze.style.padding="1px",ze.style.marginRight="2px",ze.style.marginBottom="2px",ze.style.borderWidth="2px",ze.style.borderStyle="solid",ze.style.borderRadius=(Ie+2)/2+"px",ze.style.borderColor=Ne===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ze.addEventListener("click",function(){$e.setCurrentColor(Ne,ze)});var Ve=document.createElement("div");return Ve.style.display="inline-block",Ve.style.width=Ie-2+"px",Ve.style.height=Ie-2+"px",Ve.style.backgroundColor=Ne,Ve.style.borderRadius=Ie/2+"px",Ne==="transparent"&&(Ve.style.fill=this.uiStyleSettings.toolboxAccentColor,Ve.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>`),ze.appendChild(Ve),ze},Se.prototype.setCurrentColor=function(Ne,$e){var nt=this;this.currentColor=Ne,this.colorBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===$e?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ne)},Se}(ee),oe=function(){function Ze(Se,Ne,$e){this._state="new",this._isSelected=!1,this._container=Se,this._overlayContainer=Ne,this.globalSettings=$e,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ze.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ze.prototype.ownsTarget=function(Se){return!1},Object.defineProperty(Ze.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ze.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ze.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ze.prototype.pointerDown=function(Se,Ne){},Ze.prototype.dblClick=function(Se,Ne){},Ze.prototype.manipulate=function(Se){},Ze.prototype.pointerUp=function(Se){this.stateChanged()},Ze.prototype.dispose=function(){},Ze.prototype.addMarkerVisualToContainer=function(Se){this.container.childNodes.length>0?this.container.insertBefore(Se,this.container.childNodes[0]):this.container.appendChild(Se)},Ze.prototype.getState=function(){return{typeName:Ze.typeName,state:this.state,notes:this.notes}},Ze.prototype.restoreState=function(Se){this._state=Se.state,this.notes=Se.notes},Ze.prototype.scale=function(Se,Ne){},Ze.prototype.colorChanged=function(Se){this.onColorChanged&&this.onColorChanged(Se),this.stateChanged()},Ze.prototype.fillColorChanged=function(Se){this.onFillColorChanged&&this.onFillColorChanged(Se),this.stateChanged()},Ze.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Se=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Se.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Se)&&this.onStateChanged(this)}},Ze.typeName="MarkerBase",Ze}(),ie=function(){function Ze(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ze.prototype.findGripByVisual=function(Se){return this.topLeft.ownsTarget(Se)?this.topLeft:this.topCenter.ownsTarget(Se)?this.topCenter:this.topRight.ownsTarget(Se)?this.topRight:this.centerLeft.ownsTarget(Se)?this.centerLeft:this.centerRight.ownsTarget(Se)?this.centerRight:this.bottomLeft.ownsTarget(Se)?this.bottomLeft:this.bottomCenter.ownsTarget(Se)?this.bottomCenter:this.bottomRight.ownsTarget(Se)?this.bottomRight:void 0},Ze}(),le=function(){function Ze(){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 Ze.prototype.ownsTarget=function(Se){return Se===this.visual||Se===this.visual.childNodes[0]||Se===this.visual.childNodes[1]},Ze}(),ue=function(){function Ze(){}return Ze.toITransformMatrix=function(Se){return{a:Se.a,b:Se.b,c:Se.c,d:Se.d,e:Se.e,f:Se.f}},Ze.toSVGMatrix=function(Se,Ne){return Se.a=Ne.a,Se.b=Ne.b,Se.c=Ne.c,Se.d=Ne.d,Se.e=Ne.e,Se.f=Ne.f,Se},Ze}(),me=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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 Ft(Se,Ze),Object.defineProperty(Se.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Se.prototype,"visual",{get:function(){return this._visual},set:function(Ne){this._visual=Ne;var $e=fe.createTransform();this._visual.transform.baseVal.appendItem($e)},enumerable:!1,configurable:!0}),Se.prototype.ownsTarget=function(Ne){return!!Ze.prototype.ownsTarget.call(this,Ne)||!!(this.controlGrips.findGripByVisual(Ne)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne))},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.left=Ne.x,this.top=Ne.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var nt=this.unrotatePoint(Ne);if(this.manipulationStartX=nt.x,this.manipulationStartY=nt.y,this.offsetX=nt.x-this.left,this.offsetY=nt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual($e),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($e)){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 ze=this.container.transform.baseVal.getItem(0);ze.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ze,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Se.prototype.pointerUp=function(Ne){var $e=this.state;Ze.prototype.pointerUp.call(this,Ne),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ne),this._state="select",$e==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Se.prototype.moveVisual=function(Ne){this.visual.style.transform="translate("+Ne.x+"px, "+Ne.y+"px)"},Se.prototype.manipulate=function(Ne){var $e=this.unrotatePoint(Ne);this.state==="creating"?this.resize(Ne):this.state==="move"?(this.left=this.manipulationStartLeft+($e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+($e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize($e):this.state==="rotate"&&this.rotate(Ne)},Se.prototype.resize=function(Ne){var $e=this.manipulationStartLeft,nt=this.manipulationStartWidth,Ie=this.manipulationStartTop,ze=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:$e=this.manipulationStartLeft+Ne.x-this.manipulationStartX,nt=this.manipulationStartWidth+this.manipulationStartLeft-$e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:nt=this.manipulationStartWidth+Ne.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ie=this.manipulationStartTop+Ne.y-this.manipulationStartY,ze=this.manipulationStartHeight+this.manipulationStartTop-Ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ze=this.manipulationStartHeight+Ne.y-this.manipulationStartY}nt>=0?(this.left=$e,this.width=nt):(this.left=$e+nt,this.width=-nt),ze>=0?(this.top=Ie,this.height=ze):(this.top=Ie+ze,this.height=-ze),this.setSize()},Se.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Se.prototype.rotate=function(Ne){if(Math.abs(Ne.x-this.centerX)>.1){var $e=Math.sign(Ne.x-this.centerX);this.rotationAngle=180*Math.atan((Ne.y-this.centerY)/(Ne.x-this.centerX))/Math.PI+90*$e,this.applyRotation()}},Se.prototype.applyRotation=function(){var Ne=this.container.transform.baseVal.getItem(0);Ne.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ne,0)},Se.prototype.rotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var $e=this.container.getCTM(),nt=fe.createPoint(Ne.x,Ne.y);return{x:(nt=nt.matrixTransform($e)).x,y:nt.y}},Se.prototype.unrotatePoint=function(Ne){if(this.rotationAngle===0)return Ne;var $e=this.container.getCTM();$e=$e.inverse();var nt=fe.createPoint(Ne.x,Ne.y);return{x:(nt=nt.matrixTransform($e)).x,y:nt.y}},Se.prototype.select=function(){Ze.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Se.prototype.deselect=function(){Ze.prototype.deselect.call(this),this.controlBox.style.display="none"},Se.prototype.setupControlBox=function(){this.controlBox=fe.createGroup();var Ne=fe.createTransform();Ne.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ne),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"},Se.prototype.adjustControlBox=function(){var Ne=this.controlBox.transform.baseVal.getItem(0);Ne.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ne,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},Se.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()},Se.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},Se.prototype.positionGrips=function(){var Ne=this.controlGrips.topLeft.GRIP_SIZE,$e=-Ne/2,nt=$e,Ie=(this.width+this.CB_DISTANCE)/2-Ne/2,ze=(this.height+this.CB_DISTANCE)/2-Ne/2,Ve=this.height+this.CB_DISTANCE-Ne/2,it=this.width+this.CB_DISTANCE-Ne/2;this.positionGrip(this.controlGrips.topLeft.visual,$e,nt),this.positionGrip(this.controlGrips.topCenter.visual,Ie,nt),this.positionGrip(this.controlGrips.topRight.visual,it,nt),this.positionGrip(this.controlGrips.centerLeft.visual,$e,ze),this.positionGrip(this.controlGrips.centerRight.visual,it,ze),this.positionGrip(this.controlGrips.bottomLeft.visual,$e,Ve),this.positionGrip(this.controlGrips.bottomCenter.visual,Ie,Ve),this.positionGrip(this.controlGrips.bottomRight.visual,it,Ve),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ie,nt-3*this.CB_DISTANCE)},Se.prototype.positionGrip=function(Ne,$e,nt){var Ie=Ne.transform.baseVal.getItem(0);Ie.setTranslate($e,nt),Ne.transform.baseVal.replaceItem(Ie,0)},Se.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Se.prototype.showControlBox=function(){this.controlBox.style.display=""},Se.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)},Ze.prototype.getState.call(this))},Se.prototype.restoreState=function(Ne){Ze.prototype.restoreState.call(this,Ne);var $e=Ne;this.left=$e.left,this.top=$e.top,this.width=$e.width,this.height=$e.height,this.rotationAngle=$e.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,$e.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,$e.containerTransformMatrix))},Se.prototype.scale=function(Ne,$e){Ze.prototype.scale.call(this,Ne,$e);var nt=this.rotatePoint({x:this.left,y:this.top}),Ie=this.unrotatePoint({x:nt.x*Ne,y:nt.y*$e});this.left=Ie.x,this.top=Ie.y,this.width=this.width*Ne,this.height=this.height*$e,this.adjustControlBox()},Se}(oe),xe=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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 Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return!(!Ze.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},Se.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)},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Se.prototype.manipulate=function(Ne){Ze.prototype.manipulate.call(this,Ne)},Se.prototype.resize=function(Ne){Ze.prototype.resize.call(this,Ne),this.setSize()},Se.prototype.setSize=function(){Ze.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Se.prototype.pointerUp=function(Ne){Ze.prototype.pointerUp.call(this,Ne),this.setSize()},Se.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Se.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Se.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Se.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Se.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ze.prototype.getState.call(this))},Se.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.opacity=$e.opacity,this.createVisual(),Ze.prototype.restoreState.call(this,Ne),this.setSize()},Se.prototype.scale=function(Ne,$e){Ze.prototype.scale.call(this,Ne,$e),this.setSize()},Se.title="Rectangle marker",Se}(me),Ae=function(Ze){function Se(Ne,$e,nt,Ie){var ze=Ze.call(this,Ne,Ie||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ze.widths=[],ze.widthBoxes=[],ze.widths=$e,ze.currentWidth=nt,ze.setCurrentWidth=ze.setCurrentWidth.bind(ze),ze}return Ft(Se,Ze),Se.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",this.widths.forEach(function(nt){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=nt===Ne.currentWidth?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentWidth(nt,Ie)}),$e.appendChild(Ie);var ze=document.createElement("div");ze.innerText=nt.toString(),ze.style.marginRight="5px",Ie.appendChild(ze);var Ve=document.createElement("div");Ve.style.minHeight="20px",Ve.style.flexGrow="2",Ve.style.display="flex",Ve.style.alignItems="center";var it=document.createElement("hr");it.style.minWidth="20px",it.style.border="0px",it.style.borderTop=nt+"px solid "+Ne.uiStyleSettings.toolboxColor,it.style.flexGrow="2",Ve.appendChild(it),Ie.appendChild(Ve),Ne.widthBoxes.push(Ie)}),$e},Se.prototype.setCurrentWidth=function(Ne,$e){var nt=this;this.currentWidth=Ne,this.widthBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===$e?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Se}(ee),De=function(Ze){function Se(Ne,$e,nt,Ie){var ze=Ze.call(this,Ne,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 ze.styles=[],ze.styleBoxes=[],ze.styles=$e,ze.currentStyle=nt,ze.setCurrentStyle=ze.setCurrentStyle.bind(ze),ze}return Ft(Se,Ze),Se.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",this.styles.forEach(function(nt){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/Ne.styles.length-5+"%",Ie.style.borderColor=nt===Ne.currentStyle?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentStyle(nt,Ie)}),$e.appendChild(Ie);var ze=document.createElement("div");ze.style.minHeight="20px",ze.style.flexGrow="2",ze.style.overflow="hidden";var Ve=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ne.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(nt!==""?'stroke-dasharray="'+nt+'"':"")+` />
|
|
</svg>`;ze.innerHTML=Ve,Ie.appendChild(ze),Ne.styleBoxes.push(Ie)}),$e},Se.prototype.setCurrentStyle=function(Ne,$e){var nt=this;this.currentStyle=Ne,this.styleBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===$e?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Se}(ee),Fe=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||this;return Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new z("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new Ae("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ft(Se,Ze),Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Ze.prototype.getState.call(this);return Ne.typeName=Se.typeName,Ne},Se.typeName="FrameMarker",Se.title="Frame marker",Se.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Se}(xe),je=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"},Le=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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 Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return!!Ze.prototype.ownsTarget.call(this,Ne)||!(!this.grip1.ownsTarget(Ne)&&!this.grip2.ownsTarget(Ne))},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.state==="new"&&(this.x1=Ne.x,this.y1=Ne.y,this.x2=Ne.x,this.y2=Ne.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget($e)?this.activeGrip=this.grip1:this.grip2.ownsTarget($e)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Se.prototype.pointerUp=function(Ne){var $e=this.state;Ze.prototype.pointerUp.call(this,Ne),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Ne),this._state="select",$e==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Se.prototype.adjustVisual=function(){},Se.prototype.manipulate=function(Ne){this.state==="creating"?this.resize(Ne):this.state==="move"?(this.x1=this.manipulationStartX1+Ne.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ne.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ne.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ne.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ne)},Se.prototype.resize=function(Ne){switch(this.activeGrip){case this.grip1:this.x1=Ne.x,this.y1=Ne.y;break;case this.grip2:case void 0:this.x2=Ne.x,this.y2=Ne.y}this.adjustVisual(),this.adjustControlBox()},Se.prototype.select=function(){Ze.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Se.prototype.deselect=function(){Ze.prototype.deselect.call(this),this.controlBox.style.display="none"},Se.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Se.prototype.adjustControlBox=function(){this.positionGrips()},Se.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Se.prototype.createGrip=function(){var Ne=new le;return Ne.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Ne.visual),Ne},Se.prototype.positionGrips=function(){var Ne=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ne/2,this.y1-Ne/2),this.positionGrip(this.grip2.visual,this.x2-Ne/2,this.y2-Ne/2)},Se.prototype.positionGrip=function(Ne,$e,nt){var Ie=Ne.transform.baseVal.getItem(0);Ie.setTranslate($e,nt),Ne.transform.baseVal.replaceItem(Ie,0)},Se.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ze.prototype.getState.call(this))},Se.prototype.restoreState=function(Ne){Ze.prototype.restoreState.call(this,Ne);var $e=Ne;this.x1=$e.x1,this.y1=$e.y1,this.x2=$e.x2,this.y2=$e.y2},Se.prototype.scale=function(Ne,$e){Ze.prototype.scale.call(this,Ne,$e),this.x1=this.x1*Ne,this.y1=this.y1*$e,this.x2=this.x2*Ne,this.y2=this.y2*$e,this.adjustVisual(),this.adjustControlBox()},Se}(oe),Be=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new z("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new Ae("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return!(!Ze.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorLine&&Ne!==this.visibleLine)},Se.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)},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Se.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()]]))},Se.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},Se.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},Se.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ze.prototype.getState.call(this));return Ne.typeName=Se.typeName,Ne},Se.prototype.restoreState=function(Ne){Ze.prototype.restoreState.call(this,Ne);var $e=Ne;this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.createVisual(),this.adjustVisual()},Se.typeName="LineMarker",Se.title="Line marker",Se.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Se}(Le),Ue=function(Ze){function Se(Ne,$e,nt,Ie){var ze=Ze.call(this,Ne,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 ze.fonts=[],ze.fontBoxes=[],ze.fonts=$e,ze.currentFont=nt,ze.setCurrentFont=ze.setCurrentFont.bind(ze),ze}return Ft(Se,Ze),Se.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.overflow="hidden",$e.style.flexGrow="2",this.fonts.forEach(function(nt){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/Ne.fonts.length-5+"%",Ie.style.borderColor=nt===Ne.currentFont?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentFont(nt,Ie)}),$e.appendChild(Ie);var ze=document.createElement("div");ze.style.display="flex",ze.style.minHeight="20px",ze.style.flexGrow="2",ze.style.fontFamily=nt,ze.style.overflow="hidden";var Ve=document.createElement("div");Ve.style.whiteSpace="nowrap",Ve.style.overflow="hidden",Ve.style.textOverflow="ellipsis",Ve.innerHTML="The quick brown fox jumps over the lazy dog",ze.appendChild(Ve),Ie.appendChild(ze),Ne.fontBoxes.push(Ie)}),$e},Se.prototype.setCurrentFont=function(Ne,$e){var nt=this;this.currentFont=Ne,this.fontBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===$e?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Se}(ee),Je=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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=nt.defaultColor,Ie.fontFamily=nt.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 z("Color",nt.defaultColorSet,nt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.fontFamilyPanel=new Ue("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie}return Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){if(Ze.prototype.ownsTarget.call(this,Ne)||Ne===this.visual||Ne===this.textElement||Ne===this.bgRectangle)return!0;var $e=!1;return this.textElement.childNodes.forEach(function(nt){nt===Ne&&($e=!0)}),$e},Se.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()},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Se.prototype.renderText=function(){var Ne=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function($e){Ne.textElement.appendChild(fe.createTSpan($e.trim()===""?" ":$e.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Se.prototype.getTextScale=function(){var Ne=this.textElement.getBBox(),$e=1;if(Ne.width>0&&Ne.height>0){var nt=(1*this.width-this.width*this.padding*2/100)/Ne.width,Ie=(1*this.height-this.height*this.padding*2/100)/Ne.height;$e=Math.min(nt,Ie)}return $e},Se.prototype.getTextPosition=function(Ne){var $e=this.textElement.getBBox(),nt=0,Ie=0;return $e.width>0&&$e.height>0&&(nt=(this.width-$e.width*Ne)/2,Ie=this.height/2-$e.height*Ne/2),{x:nt,y:Ie}},Se.prototype.sizeText=function(){var Ne=this.textElement.getBBox(),$e=this.getTextScale(),nt=this.getTextPosition($e);nt.y-=Ne.y*$e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+nt.x+"px, "+nt.y+"px) scale("+$e+", "+$e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(nt.x,nt.y),this.textElement.transform.baseVal.getItem(1).setScale($e,$e))},Se.prototype.manipulate=function(Ne){Ze.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},Se.prototype.resize=function(Ne){Ze.prototype.resize.call(this,Ne),this.isMoved=!0,this.setSize(),this.sizeText()},Se.prototype.setSize=function(){Ze.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()]]))},Se.prototype.pointerUp=function(Ne){var $e=this.state;$e==="creating"&&(this._suppressMarkerCreateEvent=!0),Ze.prototype.pointerUp.call(this,Ne),this.setSize(),($e==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Se.prototype.showTextEditor=function(){var Ne=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function($e){$e.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var $e=Number.parseFloat(Ne.textEditor.style.fontSize);Ne.textEditor.clientWidth>=Number.parseInt(Ne.textEditor.style.maxWidth)&&$e>.9;)$e-=.1,Ne.textEditor.style.fontSize=Math.max($e,.9)+"em"}),this.textEditor.addEventListener("keyup",function($e){$e.cancelBubble=!0}),this.textEditor.addEventListener("paste",function($e){if($e.clipboardData){var nt=$e.clipboardData.getData("text"),Ie=window.getSelection();if(!Ie.rangeCount)return!1;Ie.deleteFromDocument(),Ie.getRangeAt(0).insertNode(document.createTextNode(nt)),$e.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ne.textEditDivClicked(Ne.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Se.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ne=this.getTextScale(),$e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),nt=this.textElement.getBBox(),Ie={x:nt.width*Ne,y:nt.height*Ne};$e.x-=Ie.x/2,$e.y-=Ie.y/2,this.textEditor.style.top=$e.y+"px",this.textEditor.style.left=$e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-$e.x+"px",this.textEditor.style.fontSize=Math.max(16*Ne,12)+"px",this.textElement.style.display="none"}},Se.prototype.textEditDivClicked=function(Ne){this.text=Ne.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Se.prototype.select=function(){Ze.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Se.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ze.prototype.deselect.call(this)},Se.prototype.dblClick=function(Ne,$e){Ze.prototype.dblClick.call(this,Ne,$e),this.showTextEditor()},Se.prototype.setColor=function(Ne){this.textElement&&fe.setAttributes(this.textElement,[["fill",Ne]]),this.color=Ne,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ne)},Se.prototype.setFont=function(Ne){this.textElement&&fe.setAttributes(this.textElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Se.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Se.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ze.prototype.getState.call(this));return Ne.typeName=Se.typeName,Ne},Se.prototype.restoreState=function(Ne){var $e=Ne;this.color=$e.color,this.fontFamily=$e.fontFamily,this.padding=$e.padding,this.text=$e.text,this.createVisual(),Ze.prototype.restoreState.call(this,Ne),this.setSize()},Se.prototype.scale=function(Ne,$e){Ze.prototype.scale.call(this,Ne,$e),this.setSize(),this.sizeText(),this.positionTextEditor()},Se.typeName="TextMarker",Se.title="Text marker",Se.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>',Se}(me),He=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||this;return Ie.color="transparent",Ie.lineWidth=3,Ie.drawing=!1,Ie.pixelRatio=1,Ie.color=nt.defaultColor,Ie.lineWidth=nt.defaultStrokeWidth,Ie.pixelRatio=nt.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 z("Color",nt.defaultColorSet,nt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.lineWidthPanel=new Ae("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.lineWidthPanel.onWidthChanged=Ie.setLineWidth,Ie}return Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return!(!Ze.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.drawingImage)},Se.prototype.createVisual=function(){this.visual=fe.createGroup(),this.drawingImage=fe.createImage(),this.visual.appendChild(this.drawingImage);var Ne=fe.createTransform();this.visual.transform.baseVal.appendItem(Ne),this.addMarkerVisualToContainer(this.visual)},Se.prototype.pointerDown=function(Ne,$e){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Ne.x,Ne.y),this.drawing=!0):Ze.prototype.pointerDown.call(this,Ne,$e)},Se.prototype.manipulate=function(Ne){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ne.x,Ne.y),this.canvasContext.stroke()):Ze.prototype.manipulate.call(this,Ne)},Se.prototype.resize=function(Ne){Ze.prototype.resize.call(this,Ne),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Se.prototype.pointerUp=function(Ne){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ze.prototype.pointerUp.call(this,Ne)},Se.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)},Se.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ze.prototype.select.call(this)},Se.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ze.prototype.deselect.call(this)},Se.prototype.finishCreation=function(){for(var Ne=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),$e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],nt=$e[0],Ie=$e[1],ze=$e[2],Ve=$e[3],it=!1,St=0;St<this.canvasElement.height;St++)for(var Ct=0;Ct<this.canvasElement.width;Ct++)Ne.data[St*this.canvasElement.width*4+4*Ct+3]>0&&(it=!0,St<Ie&&(Ie=St),Ct<nt&&(nt=Ct),St>Ve&&(Ve=St),Ct>ze&&(ze=Ct));if(it){this.left=nt/this.pixelRatio,this.top=Ie/this.pixelRatio,this.width=(ze-nt)/this.pixelRatio,this.height=(Ve-Ie)/this.pixelRatio;var It=document.createElement("canvas");It.width=ze-nt,It.height=Ve-Ie,It.getContext("2d").putImageData(this.canvasContext.getImageData(nt,Ie,ze-nt,Ve-Ie),0,0),this.drawingImgUrl=It.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Se.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})},Se.prototype.setColor=function(Ne){this.color=Ne,this.colorChanged(Ne)},Se.prototype.setLineWidth=function(Ne){this.lineWidth=Ne},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Object.assign({drawingImgUrl:this.drawingImgUrl},Ze.prototype.getState.call(this));return Ne.typeName=Se.typeName,Ne},Se.prototype.restoreState=function(Ne){this.createVisual(),Ze.prototype.restoreState.call(this,Ne),this.drawingImgUrl=Ne.drawingImgUrl,this.setDrawingImage()},Se.prototype.scale=function(Ne,$e){Ze.prototype.scale.call(this,Ne,$e),this.setDrawingImage()},Se.typeName="FreehandMarker",Se.title="Freehand marker",Se.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>',Se}(me),We=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,nt||'<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=$e,Ie.setCurrentType=Ie.setCurrentType.bind(Ie),Ie}return Ft(Se,Ze),Se.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");$e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2";for(var nt=function(Ve){var it="both";switch(Ve){case 0:it="both";break;case 1:it="start";break;case 2:it="end";break;case 3:it="none"}var St=document.createElement("div");if(St.style.display="flex",St.style.flexGrow="2",St.style.alignItems="center",St.style.justifyContent="space-between",St.style.padding="5px",St.style.borderWidth="2px",St.style.borderStyle="solid",St.style.borderColor=it===Ie.currentType?Ie.uiStyleSettings.toolboxAccentColor:"transparent",St.addEventListener("click",function(){Ne.setCurrentType(it,St)}),$e.appendChild(St),it==="both"||it==="start"){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.minHeight="20px",Ct.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>`,Ct.style.marginLeft="5px",St.appendChild(Ct)}var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.minHeight="20px",It.style.flexGrow="2";var jt=document.createElement("hr");if(jt.style.minWidth="20px",jt.style.border="0px",jt.style.borderTop="3px solid "+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee"),jt.style.flexGrow="2",It.appendChild(jt),St.appendChild(It),it==="both"||it==="end"){var Kt=document.createElement("div");Kt.style.display="flex",Kt.style.alignItems="center",Kt.style.minHeight="20px",Kt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Kt.style.marginRight="5px",St.appendChild(Kt)}Ie.typeBoxes.push(St)},Ie=this,ze=0;ze<4;ze++)nt(ze);return $e},Se.prototype.setCurrentType=function(Ne,$e){var nt=this;this.currentType=Ne,this.typeBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===$e?nt.uiStyleSettings!==void 0?nt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Se}(ee),at=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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 We("Arrow type","end"),Ie.arrowTypePanel.onArrowTypeChanged=Ie.setArrowType,Ie}return Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return!(!Ze.prototype.ownsTarget.call(this,Ne)&&Ne!==this.arrow1&&Ne!==this.arrow2)},Se.prototype.getArrowPoints=function(Ne,$e){var nt=this.arrowBaseWidth+2*this.strokeWidth,Ie=this.arrowBaseHeight+2*this.strokeWidth;return Ne-nt/2+","+($e+Ie/2)+" "+Ne+","+($e-Ie/2)+" "+(Ne+nt/2)+","+($e+Ie/2)},Se.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)},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"&&this.createTips()},Se.prototype.adjustVisual=function(){if(Ze.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 Ne=0;Math.abs(this.x1-this.x2)>.1&&(Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var $e=this.arrow1.transform.baseVal.getItem(0);$e.setRotate(Ne,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem($e,0);var nt=this.arrow2.transform.baseVal.getItem(0);nt.setRotate(Ne+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(nt,0)}},Se.prototype.setArrowType=function(Ne){this.arrowType=Ne,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Object.assign({arrowType:this.arrowType},Ze.prototype.getState.call(this));return Ne.typeName=Se.typeName,Ne},Se.prototype.restoreState=function(Ne){Ze.prototype.restoreState.call(this,Ne);var $e=Ne;this.arrowType=$e.arrowType,this.createTips(),this.adjustVisual()},Se.typeName="ArrowMarker",Se.title="Arrow marker",Se.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Se}(Be),ft=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||this;return Ie.fillColor=nt.defaultFillColor,Ie.strokeWidth=0,Ie.fillPanel=new z("Color",nt.defaultColorSet,nt.defaultFillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie}return Ft(Se,Ze),Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Ze.prototype.getState.call(this);return Ne.typeName=Se.typeName,Ne},Se.typeName="CoverMarker",Se.title="Cover marker",Se.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Se}(xe),mt=function(Ze){function Se(Ne,$e,nt,Ie){var ze=Ze.call(this,Ne,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 ze.opacities=[],ze.opacityBoxes=[],ze.opacities=$e,ze.currentOpacity=nt,ze.setCurrentOpacity=ze.setCurrentOpacity.bind(ze),ze}return Ft(Se,Ze),Se.prototype.getUi=function(){var Ne=this,$e=document.createElement("div");return $e.style.display="flex",$e.style.overflow="hidden",$e.style.flexGrow="2",$e.style.justifyContent="space-between",this.opacities.forEach(function(nt){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=nt===Ne.currentOpacity?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Ne.setCurrentOpacity(nt,Ie)}),$e.appendChild(Ie);var ze=document.createElement("div");ze.innerText=100*nt+"%",Ie.appendChild(ze),Ne.opacityBoxes.push(Ie)}),$e},Se.prototype.setCurrentOpacity=function(Ne,$e){var nt=this;this.currentOpacity=Ne,this.opacityBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===$e?nt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Se}(ee),Lt=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||this;return Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.fillColor=nt.defaultHighlightColor,Ie.strokeWidth=0,Ie.opacity=nt.defaultHighlightOpacity,Ie.fillPanel=new z("Color",nt.defaultColorSet,Ie.fillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.opacityPanel=new mt("Opacity",nt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Ft(Se,Ze),Se.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Ze.prototype.getState.call(this);return Ne.typeName=Se.typeName,Ne},Se.typeName="HighlightMarker",Se.title="Highlight marker",Se.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>',Se}(ft),Xe='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',et='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',lt=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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=nt.defaultStrokeColor,Ie.bgColor=nt.defaultFillColor,Ie.fontFamily=nt.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 z("Text color",nt.defaultColorSet,Ie.color,Xe),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.bgColorPanel=new z("Fill color",nt.defaultColorSet,Ie.bgColor,et),Ie.bgColorPanel.onColorChanged=Ie.setBgColor,Ie.fontFamilyPanel=new Ue("Font",nt.defaultFontFamilies,nt.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 Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return Ze.prototype.ownsTarget.call(this,Ne)||this.tipGrip.ownsTarget(Ne)||this.tip===Ne},Se.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)},Se.prototype.pointerDown=function(Ne,$e){this.state==="new"&&Ze.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget($e)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ze.prototype.pointerDown.call(this,Ne,$e)},Se.prototype.pointerUp=function(Ne){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ze.prototype.pointerUp.call(this,Ne);else{var $e=this.state==="creating";Ze.prototype.pointerUp.call(this,Ne),this.setTipPoints($e),this.positionTip()}},Se.prototype.manipulate=function(Ne){if(this.tipMoving){var $e=this.unrotatePoint(Ne);this.tipPosition={x:$e.x-this.manipulationStartLeft,y:$e.y-this.manipulationStartTop},this.positionTip()}else Ze.prototype.manipulate.call(this,Ne)},Se.prototype.setBgColor=function(Ne){this.bgRectangle&&this.tip&&(fe.setAttributes(this.bgRectangle,[["fill",Ne]]),fe.setAttributes(this.tip,[["fill",Ne]])),this.bgColor=Ne,this.fillColorChanged(Ne)},Se.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},Se.prototype.setTipPoints=function(Ne){Ne===void 0&&(Ne=!1);var $e=Math.min(this.height/2,15),nt=this.height/5;Ne&&(this.tipPosition={x:$e+nt/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))?(nt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:$e,y:0},this.tipBase2Position={x:$e+nt,y:0}):(this.tipBase1Position={x:0,y:$e},this.tipBase2Position={x:0,y:$e+nt}):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))?(nt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$e-nt,y:0},this.tipBase2Position={x:this.width-$e,y:0}):(this.tipBase1Position={x:this.width,y:$e},this.tipBase2Position={x:this.width,y:$e+nt}):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))?(nt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-$e-nt,y:this.height},this.tipBase2Position={x:this.width-$e,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-$e-nt},this.tipBase2Position={x:this.width,y:this.height-$e}):Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(nt=this.width/5,$e=Math.min(this.width/2,15),this.tipBase1Position={x:$e,y:this.height},this.tipBase2Position={x:$e+nt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-$e},this.tipBase2Position={x:0,y:this.height-$e-nt})},Se.prototype.resize=function(Ne){Ze.prototype.resize.call(this,Ne),this.positionTip()},Se.prototype.positionTip=function(){fe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ne=this.tipGrip.visual.transform.baseVal.getItem(0);Ne.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ne,0)},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Se.prototype.select=function(){this.positionTip(),Ze.prototype.select.call(this)},Se.prototype.getState=function(){var Ne=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ze.prototype.getState.call(this));return Ne.typeName=Se.typeName,Ne},Se.prototype.restoreState=function(Ne){var $e=Ne;this.bgColor=$e.bgColor,this.tipPosition=$e.tipPosition,Ze.prototype.restoreState.call(this,Ne),this.createTip(),this.setTipPoints()},Se.prototype.scale=function(Ne,$e){Ze.prototype.scale.call(this,Ne,$e),this.tipPosition={x:this.tipPosition.x*Ne,y:this.tipPosition.y*$e},this.positionTip()},Se.typeName="CalloutMarker",Se.title="Callout marker",Se.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>',Se}(Je),vt=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.strokeColor=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.fillColor=nt.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 z("Line color",Re(nt.defaultColorSet,["transparent"]),nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new z("Fill color",Re(nt.defaultColorSet,["transparent"]),Ie.fillColor,et),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new Ae("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.opacityPanel=new mt("Opacity",nt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return!(!Ze.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual)},Se.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)},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Se.prototype.manipulate=function(Ne){Ze.prototype.manipulate.call(this,Ne)},Se.prototype.resize=function(Ne){Ze.prototype.resize.call(this,Ne),this.setSize()},Se.prototype.setSize=function(){Ze.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()]])},Se.prototype.pointerUp=function(Ne){Ze.prototype.pointerUp.call(this,Ne),this.setSize()},Se.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Se.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},Se.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Se.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Se.prototype.setOpacity=function(Ne){this.opacity=Ne,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ze.prototype.getState.call(this));return Ne.typeName=Se.typeName,Ne},Se.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.opacity=$e.opacity,this.createVisual(),Ze.prototype.restoreState.call(this,Ne),this.setSize()},Se.prototype.scale=function(Ne,$e){Ze.prototype.scale.call(this,Ne,$e),this.setSize()},Se.typeName="EllipseMarker",Se.title="Ellipse marker",Se.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>',Se}(me),wt=function(Ze){function Se(Ne,$e,nt){return Ze.call(this,Ne,$e,nt)||this}return Ft(Se,Ze),Object.defineProperty(Se.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Se.prototype.ownsTarget=function(Ne){return!(!Ze.prototype.ownsTarget.call(this,Ne)&&Ne!==this.tip1&&Ne!==this.tip2)},Se.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)},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.state==="creating"&&this.createTips()},Se.prototype.adjustVisual=function(){if(Ze.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 Ne=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),$e=this.tip1.transform.baseVal.getItem(0);$e.setRotate(Ne,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem($e,0);var nt=this.tip2.transform.baseVal.getItem(0);nt.setRotate(Ne+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(nt,0)}},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Ze.prototype.getState.call(this);return Ne.typeName=Se.typeName,Ne},Se.prototype.restoreState=function(Ne){Ze.prototype.restoreState.call(this,Ne),this.createTips(),this.adjustVisual()},Se.typeName="MeasurementMarker",Se.title="Measurement marker",Se.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>',Se}(Be),ht=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||this;return Ie.strokePanel.colors=nt.defaultColorSet,Ie.fillColor="transparent",Ie}return Ft(Se,Ze),Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Ze.prototype.getState.call(this);return Ne.typeName=Se.typeName,Ne},Se.typeName="EllipseFrameMarker",Se.title="Ellipse frame marker",Se.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>',Se}(vt),dt=function(){function Ze(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ze.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ze.prototype.addUndoStep=function(Se){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Se)||(this.undoStack.push(Se),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Se)&&this.redoStack.splice(0,this.redoStack.length))},Ze.prototype.replaceLastUndoStep=function(Se){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Se)},Ze.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ze.prototype.undo=function(){if(this.undoStack.length>1){var Se=this.undoStack.pop();return Se!==void 0&&this.redoStack.push(Se),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ze.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ze}(),ut=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.strokePanel=new z("Line color",nt.defaultColorSet,nt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new Ae("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return!(!Ze.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.selectorCurve&&Ne!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ne))},Se.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Se.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)},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ne.x,this.curveY=Ne.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget($e)&&(this.activeGrip=this.curveGrip,this._state="resize")},Se.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()]]))},Se.prototype.setupControlBox=function(){Ze.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)},Se.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ze.prototype.addControlGrips.call(this)},Se.prototype.positionGrips=function(){Ze.prototype.positionGrips.call(this);var Ne=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ne/2,this.curveY-Ne/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},Se.prototype.manipulate=function(Ne){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ne.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ne.y-this.manipulationStartY),Ze.prototype.manipulate.call(this,Ne)},Se.prototype.resize=function(Ne){this.activeGrip===this.curveGrip&&(this.curveX=Ne.x,this.curveY=Ne.y),Ze.prototype.resize.call(this,Ne),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Se.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.adjustVisual(),this.colorChanged(Ne)},Se.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.adjustVisual()},Se.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.adjustVisual()},Se.prototype.scale=function(Ne,$e){this.curveX=this.curveX*Ne,this.curveY=this.curveY*$e,Ze.prototype.scale.call(this,Ne,$e)},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ze.prototype.getState.call(this));return Ne.typeName=Se.typeName,Ne},Se.prototype.restoreState=function(Ne){Ze.prototype.restoreState.call(this,Ne);var $e=Ne;this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.curveX=$e.curveX,this.curveY=$e.curveY,this.createVisual(),this.adjustVisual()},Se.typeName="CurveMarker",Se.title="Curve marker",Se.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>',Se}(Le),Pt=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,$e,nt)||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=nt.defaultColor,Ie.strokeWidth=nt.defaultStrokeWidth,Ie.strokeDasharray=nt.defaultStrokeDasharray,Ie.fillColor=nt.defaultFillColor,Ie.textColor=nt.defaultStrokeColor,Ie.fontFamily=nt.defaultFontFamily,Ie.fontSize=nt.defaultCaptionFontSize,Ie.captionText=nt.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 z("Line color",Re(nt.defaultColorSet,["transparent"]),Ie.strokeColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new z("Fill color",Re(nt.defaultColorSet,["transparent"]),Ie.fillColor,et),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new Ae("Line width",nt.defaultStrokeWidths,nt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new De("Line style",nt.defaultStrokeDasharrays,nt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.fontFamilyPanel=new Ue("Font",nt.defaultFontFamilies,nt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.textColorPanel=new z("Text color",nt.defaultColorSet,Ie.textColor,Xe),Ie.textColorPanel.onColorChanged=Ie.setTextColor,Ie}return Ft(Se,Ze),Se.prototype.ownsTarget=function(Ne){return!(!Ze.prototype.ownsTarget.call(this,Ne)&&Ne!==this.visual&&Ne!==this.frame&&Ne!==this.captionBg&&Ne!==this.captionElement)},Se.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()},Se.prototype.setCaptionText=function(Ne){this.captionText=Ne,this.captionElement.textContent=this.captionText,this.sizeCaption()},Se.prototype.pointerDown=function(Ne,$e){Ze.prototype.pointerDown.call(this,Ne,$e),this.isMoved=!1,this.pointerDownPoint=Ne,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ne),this._state="creating")},Se.prototype.manipulate=function(Ne){Ze.prototype.manipulate.call(this,Ne),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ne.x-this.pointerDownPoint.x)>5||Math.abs(Ne.y-this.pointerDownPoint.y)>5)},Se.prototype.resize=function(Ne){Ze.prototype.resize.call(this,Ne),this.setSize()},Se.prototype.sizeCaption=function(){var Ne=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ne.width+2*this.PADDING,this.captionBoxHeight=Ne.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),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')"]])},Se.prototype.showTextEditor=function(){var Ne=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function($e){$e.stopPropagation()}),this.textEditBox.addEventListener("keypress",function($e){$e.key==="Enter"&&Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function($e){$e.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ne.finishTextEditing(Ne.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Se.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"))},Se.prototype.finishTextEditing=function(Ne){this.setCaptionText(Ne.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Se.prototype.setFont=function(Ne){this.captionElement&&fe.setAttributes(this.captionElement,[["font-family",Ne]]),this.fontFamily=Ne,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Se.prototype.setTextColor=function(Ne){this.captionElement&&fe.setAttributes(this.captionElement,[["fill",Ne]]),this.textColor=Ne,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Se.prototype.setSize=function(){Ze.prototype.setSize.call(this),fe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Se.prototype.pointerUp=function(Ne){Ze.prototype.pointerUp.call(this,Ne),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Se.prototype.dblClick=function(Ne,$e){Ze.prototype.dblClick.call(this,Ne,$e),this.showTextEditor()},Se.prototype.setStrokeColor=function(Ne){this.strokeColor=Ne,this.frame&&fe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ne),this.stateChanged()},Se.prototype.setFillColor=function(Ne){this.fillColor=Ne,this.captionBg&&fe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ne),this.stateChanged()},Se.prototype.setStrokeWidth=function(Ne){this.strokeWidth=Ne,this.frame&&fe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Se.prototype.setStrokeDasharray=function(Ne){this.strokeDasharray=Ne,this.frame&&fe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Se.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Se.prototype.getState=function(){var Ne=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Ze.prototype.getState.call(this));return Ne.typeName=this.typeName,Ne},Se.prototype.restoreState=function(Ne){var $e=Ne;this.fillColor=$e.fillColor,this.strokeColor=$e.strokeColor,this.strokeWidth=$e.strokeWidth,this.strokeDasharray=$e.strokeDasharray,this.textColor=$e.textColor,this.fontFamily=$e.fontFamily,this.captionText=$e.captionText,this.fontSize=$e.fontSize,this.createVisual(),Ze.prototype.restoreState.call(this,Ne),this.setSize()},Se.prototype.scale=function(Ne,$e){Ze.prototype.scale.call(this,Ne,$e),this.setSize()},Se.typeName="CaptionFrameMarker",Se.title="Caption frame marker",Se.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>',Se}(me),yt=function(){function Ze(Se,Ne){Ne===void 0&&(Ne=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Se,this.cancelable=Ne}return Object.defineProperty(Ze.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ze.prototype.preventDefault=function(){this._defaultPrevented=!0},Ze}(),gt=function(Ze){function Se(Ne,$e,nt){var Ie=Ze.call(this,Ne,!1)||this;return Ie.dataUrl=$e,Ie.state=nt,Ie}return Ft(Se,Ze),Se}(yt),Tt=function(Ze){function Se(Ne,$e,nt){nt===void 0&&(nt=!1);var Ie=Ze.call(this,Ne,nt)||this;return Ie.marker=$e,Ie}return Ft(Se,Ze),Se}(yt),ct=function(){function Ze(){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 Ze.prototype.addEventListener=function(Se,Ne){this[Se].push(Ne)},Ze.prototype.removeEventListener=function(Se,Ne){var $e=this[Se].indexOf(Ne);$e>-1&&this[Se].splice($e,1)},Ze}(),Ye=function(){function Ze(Se){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new je,this._isOpen=!1,this.undoRedoManager=new dt,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 ct,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ze.instanceCounter++,this.styles=new we(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Se,this.targetRoot=document.body,this.width=Se.clientWidth,this.height=Se.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(Ze.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,He,at,Je,ht,vt,Lt,lt,wt,ft,Be,ut,Pt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,He,at,Je,vt,Lt,lt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,He,at,Je,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Se){var Ne=this;this._availableMarkerTypes.splice(0),Se.forEach(function($e){if(typeof $e=="string"){var nt=Ne.ALL_MARKER_TYPES.find(function(Ie){return Ie.typeName===$e});nt!==void 0&&Ne._availableMarkerTypes.push(nt)}else Ne._availableMarkerTypes.push($e)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ze.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Se){this._zoomLevel=Se,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(Ze.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ze.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),pe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ze.prototype.show=function(){var Se=this;this.styles.styleSheetRoot===void 0&&Ee.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ee.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ne){return Ne(new yt(Se))})},Ze.prototype.render=function(){return ae(this,void 0,void 0,function(){var Se;return Ge(this,function(Ne){switch(Ne.label){case 0:return this.setCurrentMarker(),(Se=new be).naturalSize=this.renderAtNaturalSize,Se.imageType=this.renderImageType,Se.imageQuality=this.renderImageQuality,Se.markersOnly=this.renderMarkersOnly,Se.width=this.renderWidth,Se.height=this.renderHeight,[4,Se.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ne.sent(),[4,Se.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ne.sent()]}})})},Ze.prototype.close=function(Se){var Ne=this;if(Se===void 0&&(Se=!1),this.isOpen){var $e=!1;Se||this.eventListeners.beforeclose.forEach(function(nt){var Ie=new yt(Ne,!0);nt(Ie),Ie.defaultPrevented&&($e=!0)}),$e||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(nt){return nt(new yt(Ne))}),this.detachEvents(),this._isOpen=!1)}},Ze.prototype.addMarkersToToolbar=function(){for(var Se,Ne=[],$e=0;$e<arguments.length;$e++)Ne[$e]=arguments[$e];(Se=this._availableMarkerTypes).push.apply(Se,Ne)},Ze.prototype.addRenderEventListener=function(Se){this.addEventListener("render",function(Ne){Se(Ne.dataUrl,Ne.state)})},Ze.prototype.removeRenderEventListener=function(Se){},Ze.prototype.addCloseEventListener=function(Se){this.addEventListener("close",function(){Se()})},Ze.prototype.removeCloseEventListener=function(Se){},Ze.prototype.setupResizeObserver=function(){var Se=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Se.resize(Se.target.clientWidth,Se.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Se.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ze.prototype.onPopupTargetResize=function(){var Se=1*this.target.clientWidth/this.target.clientHeight,Ne=this.editorCanvas.clientWidth/Se>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Se:this.editorCanvas.clientWidth,$e=Ne<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Se;this.resize(Ne,$e)},Ze.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ze.prototype.resize=function(Se,Ne){this._isResizing=!0;var $e=Se/this.imageWidth,nt=Ne/this.imageHeight;this.imageWidth=Math.round(Se),this.imageHeight=Math.round(Ne),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers($e,nt),this._isResizing=!1},Ze.prototype.scaleMarkers=function(Se,Ne){var $e,nt=this;this._currentMarker&&this._currentMarker instanceof Je?this._currentMarker.scale(Se,Ne):($e=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ie){Ie!==nt._currentMarker&&Ie.scale(Se,Ne)}),$e!==void 0&&this.setCurrentMarker($e)},Ze.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"},Ze.prototype.setTopLeft=function(){var Se=this.editingTarget.getBoundingClientRect(),Ne=this.editorCanvas.getBoundingClientRect();this.left=Se.left-Ne.left,this.top=Se.top-Ne.top},Ze.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)},Ze.prototype.addDefs=function(){for(var Se,Ne=[],$e=0;$e<arguments.length;$e++)Ne[$e]=arguments[$e];this.defs=fe.createDefs(),this.addDefsToImage(),(Se=this.defs).append.apply(Se,Ne)},Ze.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ze.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)},Ze.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ze.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ze.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)},Ze.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ze.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)},Ze.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 Se=document.createElement("a");Se.href="https://markerjs.com/",Se.target="_blank",Se.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>',Se.title="Powered by marker.js",Se.style.display="grid",Se.style.alignItems="center",Se.style.justifyItems="center",Se.style.padding="3px",Se.style.width="20px",Se.style.height="20px",this.logoUI.appendChild(Se),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ze.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")},Ze.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"},Ze.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ze.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 Se=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=Se+"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 Pe(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")},Ze.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ze.prototype.removeMarker=function(Se){this.markerImage.removeChild(Se.container),this.markers.indexOf(Se)>-1&&this.markers.splice(this.markers.indexOf(Se),1),Se.dispose()},Ze.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())},Ze.prototype.toolbarButtonClicked=function(Se,Ne){if(Se==="marker"&&Ne!==void 0)this.createNewMarker(Ne);else if(Se==="action")switch(Ne){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Ze.prototype.deleteSelectedMarker=function(){var Se=this;if(this._currentMarker!==void 0){var Ne=!1;if(this.eventListeners.markerbeforedelete.forEach(function(nt){var Ie=new Tt(Se,Se._currentMarker,!0);nt(Ie),Ie.defaultPrevented&&(Ne=!0)}),!Ne){var $e=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(nt){return nt(new Tt(Se,$e))})}}},Ze.prototype.clear=function(){var Se=this,Ne=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ze){var Ve=new Tt(Se,void 0,!0);ze(Ve),Ve.defaultPrevented&&(Ne=!0)}),!Ne)){this.setCurrentMarker();for(var $e=function(ze){var Ve=nt.markers[ze];nt.setCurrentMarker(nt.markers[ze]),nt._currentMarker.dispose(),nt.markerImage.removeChild(nt._currentMarker.container),nt.markers.splice(nt.markers.indexOf(nt._currentMarker),1),nt.eventListeners.markerdelete.forEach(function(it){return it(new Tt(Se,Ve))})},nt=this,Ie=this.markers.length-1;Ie>=0;Ie--)$e(Ie);this.addUndoStep()}},Object.defineProperty(Ze.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ze.prototype.showNotesEditor=function(){var Se;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=(Se=this._currentMarker.notes)!==null&&Se!==void 0?Se:"",this.overlayContainer.appendChild(this.notesArea))},Ze.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)},Ze.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ze.prototype.addUndoStep=function(){var Se=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ne=this.getState(),$e=this.undoRedoManager.getLastUndoStep();if(!$e||$e.width===Ne.width&&$e.height===Ne.height){var nt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ne),nt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ie){return Ie(new yt(Se))})}else this.undoRedoManager.replaceLastUndoStep(Ne),this.eventListeners.statechange.forEach(function(Ie){return Ie(new yt(Se))})}},Ze.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ze.prototype.undoStep=function(){var Se=this,Ne=this.undoRedoManager.undo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($e){return $e(new yt(Se))}))},Ze.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ze.prototype.redoStep=function(){var Se=this,Ne=this.undoRedoManager.redo();Ne!==void 0&&(this.restoreState(Ne),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function($e){return $e(new yt(Se))}))},Ze.prototype.stepZoom=function(){var Se=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Se<this.zoomSteps.length-1?this.zoomSteps[Se+1]:this.zoomSteps[0]},Ze.prototype.panTo=function(Se){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Se.x,top:this.prevPanPoint.y-Se.y}),this.prevPanPoint=Se},Ze.prototype.startRenderAndClose=function(){return ae(this,void 0,void 0,function(){var Se,Ne,$e=this;return Ge(this,function(nt){switch(nt.label){case 0:return[4,this.render()];case 1:return Se=nt.sent(),Ne=this.getState(),this.eventListeners.render.forEach(function(Ie){return Ie(new gt($e,Se,Ne))}),this.close(!0),[2]}})})},Ze.prototype.getState=function(Se){Se===!0&&this.setCurrentMarker();var Ne={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function($e){return Ne.markers.push($e.getState())}),Ne},Ze.prototype.restoreState=function(Se){var Ne=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Se.markers.forEach(function($e){var nt=Ne._availableMarkerTypes.find(function(ze){return ze.typeName===$e.typeName});if(nt!==void 0){var Ie=Ne.addNewMarker(nt);Ie.restoreState($e),Ne.markers.push(Ie)}}),Se.width&&Se.height&&(Se.width!==this.imageWidth||Se.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Se.width,this.imageHeight/Se.height),this.eventListeners.restorestate.forEach(function($e){return $e(new yt(Ne))})},Ze.prototype.addNewMarker=function(Se){var Ne=fe.createGroup();return this.markerImage.appendChild(Ne),new Se(Ne,this.overlayContainer,this.settings)},Ze.prototype.createNewMarker=function(Se){var Ne,$e=this;(Ne=typeof Se=="string"?this._availableMarkerTypes.find(function(nt){return nt.typeName===Se}):Se)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ne),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Ne.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(nt){return nt(new Tt($e,$e._currentMarker))}))},Ze.prototype.markerCreated=function(Se){var Ne=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Se),this.setCurrentMarker(Se),Se instanceof He&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(He):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function($e){return $e(new Tt(Ne,Ne._currentMarker))})},Ze.prototype.colorChanged=function(Se){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Se,this.settings.defaultStrokeColor=Se)},Ze.prototype.fillColorChanged=function(Se){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Se)},Ze.prototype.markerStateChanged=function(Se){var Ne=this;this.eventListeners.markerchange.forEach(function($e){return $e(new Tt(Ne,Se))})},Ze.prototype.setCurrentMarker=function(Se){var Ne=this;this._currentMarker!==Se&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function($e){return $e(new Tt(Ne,Ne._currentMarker))})),this._currentMarker=Se,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($e){return $e(new Tt(Ne,Ne._currentMarker))}))},Ze.prototype.onPointerDown=function(Se){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Se.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Ne=this.markers.find(function($e){return $e.ownsTarget(Se.target)});Ne!==void 0?(this.setCurrentMarker(Ne),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Se.clientX,Se.clientY),Se.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Se.clientX,y:Se.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Se.clientX,Se.clientY))},Ze.prototype.onDblClick=function(Se){if(this._isFocused||this.focus(),this.mode==="select"){var Ne=this.markers.find(function($e){return $e.ownsTarget(Se.target)});Ne!==void 0&&Ne!==this._currentMarker&&this.setCurrentMarker(Ne),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Se.clientX,Se.clientY),Se.target):this.setCurrentMarker()}},Ze.prototype.onPointerMove=function(Se){this.touchPoints!==1&&Se.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Se.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Se.clientX,Se.clientY)):this.zoomLevel>1&&this.panTo({x:Se.clientX,y:Se.clientY}))},Ze.prototype.onPointerUp=function(Se){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Se.clientX,Se.clientY)),this.isDragging=!1,this.addUndoStep()},Ze.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ze.prototype.onKeyUp=function(Se){this._currentMarker===void 0||this.notesArea!==void 0||Se.key!=="Delete"&&Se.key!=="Backspace"||this.deleteSelectedMarker()},Ze.prototype.clientToLocalCoordinates=function(Se,Ne){var $e=this.markerImage.getBoundingClientRect();return{x:(Se-$e.left)/this.zoomLevel,y:(Ne-$e.top)/this.zoomLevel}},Ze.prototype.onWindowResize=function(){this.positionUI()},Ze.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Se=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Se+"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()},Ze.prototype.addLicenseKey=function(Se){pe.addKey(Se)},Ze.prototype.addEventListener=function(Se,Ne){this.eventListeners.addEventListener(Se,Ne)},Ze.prototype.removeEventListener=function(Se,Ne){this.eventListeners.removeEventListener(Se,Ne)},Ze.prototype.renderState=function(Se){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Se),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ze.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ze.prototype.focus=function(){var Se=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ne){return Ne(new yt(Se))}))},Ze.prototype.blur=function(){var Se=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ne){return Ne(new yt(Se))}))},Ze.instanceCounter=0,Ze}()},3510:function(Sn,vn,ot){"use strict";ot.r(vn),ot.d(vn,{Panel:function(){return He},default:function(){return Je}});var st=ot(87462),Ft=ot(74902),ae=ot(97685),Ge=ot(71002),Re=ot(94184),fe=ot.n(Re),pe=ot(21770),be=ot(80334),Ee=ot(67294),we=ot(45987),Te=ot(50344),ve=ot(1413),Pe=ot(4942),de=ot(62874),ee=ot(15105),z=Ee.forwardRef(function(We,at){var ft=We.prefixCls,mt=We.forceRender,Lt=We.className,Xe=We.style,et=We.children,lt=We.isActive,vt=We.role,wt=We.classNames,ht=We.styles,dt=Ee.useState(lt||mt),ut=(0,ae.Z)(dt,2),Pt=ut[0],yt=ut[1];return Ee.useEffect(function(){(mt||lt)&&yt(!0)},[mt,lt]),Pt?Ee.createElement("div",{ref:at,className:fe()("".concat(ft,"-content"),(0,Pe.Z)((0,Pe.Z)({},"".concat(ft,"-content-active"),lt),"".concat(ft,"-content-inactive"),!lt),Lt),style:Xe,role:vt},Ee.createElement("div",{className:fe()("".concat(ft,"-content-box"),wt==null?void 0:wt.body),style:ht==null?void 0:ht.body},et)):null});z.displayName="PanelContent";var oe=z,ie=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],le=Ee.forwardRef(function(We,at){var ft=We.showArrow,mt=ft===void 0?!0:ft,Lt=We.headerClass,Xe=We.isActive,et=We.onItemClick,lt=We.forceRender,vt=We.className,wt=We.classNames,ht=wt===void 0?{}:wt,dt=We.styles,ut=dt===void 0?{}:dt,Pt=We.prefixCls,yt=We.collapsible,gt=We.accordion,Tt=We.panelKey,ct=We.extra,Ye=We.header,Ze=We.expandIcon,Se=We.openMotion,Ne=We.destroyInactivePanel,$e=We.children,nt=(0,we.Z)(We,ie),Ie=yt==="disabled",ze=ct!=null&&typeof ct!="boolean",Ve=(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)({onClick:function(){et==null||et(Tt)},onKeyDown:function(an){(an.key==="Enter"||an.keyCode===ee.Z.ENTER||an.which===ee.Z.ENTER)&&(et==null||et(Tt))},role:gt?"tab":"button"},"aria-expanded",Xe),"aria-disabled",Ie),"tabIndex",Ie?-1:0),it=typeof Ze=="function"?Ze(We):Ee.createElement("i",{className:"arrow"}),St=it&&Ee.createElement("div",(0,st.Z)({className:"".concat(Pt,"-expand-icon")},["header","icon"].includes(yt)?Ve:{}),it),Ct=fe()("".concat(Pt,"-item"),(0,Pe.Z)((0,Pe.Z)({},"".concat(Pt,"-item-active"),Xe),"".concat(Pt,"-item-disabled"),Ie),vt),It=fe()(Lt,"".concat(Pt,"-header"),(0,Pe.Z)({},"".concat(Pt,"-collapsible-").concat(yt),!!yt),ht.header),jt=(0,ve.Z)({className:It,style:ut.header},["header","icon"].includes(yt)?{}:Ve);return Ee.createElement("div",(0,st.Z)({},nt,{ref:at,className:Ct}),Ee.createElement("div",jt,mt&&St,Ee.createElement("span",(0,st.Z)({className:"".concat(Pt,"-header-text")},yt==="header"?Ve:{}),Ye),ze&&Ee.createElement("div",{className:"".concat(Pt,"-extra")},ct)),Ee.createElement(de.Z,(0,st.Z)({visible:Xe,leavedClassName:"".concat(Pt,"-content-hidden")},Se,{forceRender:lt,removeOnLeave:Ne}),function(Kt,an){var un=Kt.className,hn=Kt.style;return Ee.createElement(oe,{ref:an,prefixCls:Pt,className:un,classNames:ht,style:hn,styles:ut,isActive:Xe,forceRender:lt,role:gt?"tabpanel":void 0},$e)}))}),ue=le,me=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],xe=function(at,ft){var mt=ft.prefixCls,Lt=ft.accordion,Xe=ft.collapsible,et=ft.destroyInactivePanel,lt=ft.onItemClick,vt=ft.activeKey,wt=ft.openMotion,ht=ft.expandIcon;return at.map(function(dt,ut){var Pt=dt.children,yt=dt.label,gt=dt.key,Tt=dt.collapsible,ct=dt.onItemClick,Ye=dt.destroyInactivePanel,Ze=(0,we.Z)(dt,me),Se=String(gt!=null?gt:ut),Ne=Tt!=null?Tt:Xe,$e=Ye!=null?Ye:et,nt=function(Ve){Ne!=="disabled"&&(lt(Ve),ct==null||ct(Ve))},Ie=!1;return Lt?Ie=vt[0]===Se:Ie=vt.indexOf(Se)>-1,Ee.createElement(ue,(0,st.Z)({},Ze,{prefixCls:mt,key:Se,panelKey:Se,isActive:Ie,accordion:Lt,openMotion:wt,expandIcon:ht,header:yt,collapsible:Ne,onItemClick:nt,destroyInactivePanel:$e}),Pt)})},Ae=function(at,ft,mt){if(!at)return null;var Lt=mt.prefixCls,Xe=mt.accordion,et=mt.collapsible,lt=mt.destroyInactivePanel,vt=mt.onItemClick,wt=mt.activeKey,ht=mt.openMotion,dt=mt.expandIcon,ut=at.key||String(ft),Pt=at.props,yt=Pt.header,gt=Pt.headerClass,Tt=Pt.destroyInactivePanel,ct=Pt.collapsible,Ye=Pt.onItemClick,Ze=!1;Xe?Ze=wt[0]===ut:Ze=wt.indexOf(ut)>-1;var Se=ct!=null?ct:et,Ne=function(Ie){Se!=="disabled"&&(vt(Ie),Ye==null||Ye(Ie))},$e={key:ut,panelKey:ut,header:yt,headerClass:gt,isActive:Ze,prefixCls:Lt,destroyInactivePanel:Tt!=null?Tt:lt,openMotion:ht,accordion:Xe,children:at.props.children,onItemClick:Ne,expandIcon:dt,collapsible:Se};return typeof at.type=="string"?at:(Object.keys($e).forEach(function(nt){typeof $e[nt]=="undefined"&&delete $e[nt]}),Ee.cloneElement(at,$e))};function De(We,at,ft){return Array.isArray(We)?xe(We,ft):(0,Te.Z)(at).map(function(mt,Lt){return Ae(mt,Lt,ft)})}var Fe=De,je=ot(64217);function Le(We){var at=We;if(!Array.isArray(at)){var ft=(0,Ge.Z)(at);at=ft==="number"||ft==="string"?[at]:[]}return at.map(function(mt){return String(mt)})}var Be=Ee.forwardRef(function(We,at){var ft=We.prefixCls,mt=ft===void 0?"rc-collapse":ft,Lt=We.destroyInactivePanel,Xe=Lt===void 0?!1:Lt,et=We.style,lt=We.accordion,vt=We.className,wt=We.children,ht=We.collapsible,dt=We.openMotion,ut=We.expandIcon,Pt=We.activeKey,yt=We.defaultActiveKey,gt=We.onChange,Tt=We.items,ct=fe()(mt,vt),Ye=(0,pe.Z)([],{value:Pt,onChange:function(ze){return gt==null?void 0:gt(ze)},defaultValue:yt,postState:Le}),Ze=(0,ae.Z)(Ye,2),Se=Ze[0],Ne=Ze[1],$e=function(ze){return Ne(function(){if(lt)return Se[0]===ze?[]:[ze];var Ve=Se.indexOf(ze),it=Ve>-1;return it?Se.filter(function(St){return St!==ze}):[].concat((0,Ft.Z)(Se),[ze])})};(0,be.ZP)(!wt,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var nt=Fe(Tt,wt,{prefixCls:mt,accordion:lt,openMotion:dt,expandIcon:ut,collapsible:ht,destroyInactivePanel:Xe,onItemClick:$e,activeKey:Se});return Ee.createElement("div",(0,st.Z)({ref:at,className:ct,style:et,role:lt?"tablist":void 0},(0,je.Z)(We,{aria:!0,data:!0})),nt)}),Ue=Object.assign(Be,{Panel:ue}),Je=Ue,He=Ue.Panel},42289:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return ya}});function st(Zt){"@babel/helpers - typeof";return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Jt){return typeof Jt}:function(Jt){return Jt&&typeof Symbol=="function"&&Jt.constructor===Symbol&&Jt!==Symbol.prototype?"symbol":typeof Jt},st(Zt)}function Ft(Zt,Jt){if(st(Zt)!="object"||!Zt)return Zt;var dn=Zt[Symbol.toPrimitive];if(dn!==void 0){var Fn=dn.call(Zt,Jt||"default");if(st(Fn)!="object")return Fn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Jt==="string"?String:Number)(Zt)}function ae(Zt){var Jt=Ft(Zt,"string");return st(Jt)=="symbol"?Jt:Jt+""}function Ge(Zt,Jt,dn){return(Jt=ae(Jt))in Zt?Object.defineProperty(Zt,Jt,{value:dn,enumerable:!0,configurable:!0,writable:!0}):Zt[Jt]=dn,Zt}function Re(Zt,Jt){var dn=Object.keys(Zt);if(Object.getOwnPropertySymbols){var Fn=Object.getOwnPropertySymbols(Zt);Jt&&(Fn=Fn.filter(function(pr){return Object.getOwnPropertyDescriptor(Zt,pr).enumerable})),dn.push.apply(dn,Fn)}return dn}function fe(Zt){for(var Jt=1;Jt<arguments.length;Jt++){var dn=arguments[Jt]!=null?arguments[Jt]:{};Jt%2?Re(Object(dn),!0).forEach(function(Fn){Ge(Zt,Fn,dn[Fn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Zt,Object.getOwnPropertyDescriptors(dn)):Re(Object(dn)).forEach(function(Fn){Object.defineProperty(Zt,Fn,Object.getOwnPropertyDescriptor(dn,Fn))})}return Zt}function pe(Zt){if(Array.isArray(Zt))return Zt}function be(Zt,Jt){var dn=Zt==null?null:typeof Symbol!="undefined"&&Zt[Symbol.iterator]||Zt["@@iterator"];if(dn!=null){var Fn,pr,oi,_r,Kn=[],Et=!0,io=!1;try{if(oi=(dn=dn.call(Zt)).next,Jt===0){if(Object(dn)!==dn)return;Et=!1}else for(;!(Et=(Fn=oi.call(dn)).done)&&(Kn.push(Fn.value),Kn.length!==Jt);Et=!0);}catch(Ir){io=!0,pr=Ir}finally{try{if(!Et&&dn.return!=null&&(_r=dn.return(),Object(_r)!==_r))return}finally{if(io)throw pr}}return Kn}}function Ee(Zt,Jt){(Jt==null||Jt>Zt.length)&&(Jt=Zt.length);for(var dn=0,Fn=Array(Jt);dn<Jt;dn++)Fn[dn]=Zt[dn];return Fn}function we(Zt,Jt){if(Zt){if(typeof Zt=="string")return Ee(Zt,Jt);var dn={}.toString.call(Zt).slice(8,-1);return dn==="Object"&&Zt.constructor&&(dn=Zt.constructor.name),dn==="Map"||dn==="Set"?Array.from(Zt):dn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(dn)?Ee(Zt,Jt):void 0}}function Te(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(Zt,Jt){return pe(Zt)||be(Zt,Jt)||we(Zt,Jt)||Te()}function Pe(Zt){if(Array.isArray(Zt))return Zt}function de(Zt,Jt){var dn=Zt==null?null:typeof Symbol!="undefined"&&Zt[Symbol.iterator]||Zt["@@iterator"];if(dn!=null){var Fn,pr,oi,_r,Kn=[],Et=!0,io=!1;try{if(oi=(dn=dn.call(Zt)).next,Jt===0){if(Object(dn)!==dn)return;Et=!1}else for(;!(Et=(Fn=oi.call(dn)).done)&&(Kn.push(Fn.value),Kn.length!==Jt);Et=!0);}catch(Ir){io=!0,pr=Ir}finally{try{if(!Et&&dn.return!=null&&(_r=dn.return(),Object(_r)!==_r))return}finally{if(io)throw pr}}return Kn}}function ee(Zt,Jt){(Jt==null||Jt>Zt.length)&&(Jt=Zt.length);for(var dn=0,Fn=new Array(Jt);dn<Jt;dn++)Fn[dn]=Zt[dn];return Fn}function z(Zt,Jt){if(Zt){if(typeof Zt=="string")return ee(Zt,Jt);var dn=Object.prototype.toString.call(Zt).slice(8,-1);if(dn==="Object"&&Zt.constructor&&(dn=Zt.constructor.name),dn==="Map"||dn==="Set")return Array.from(Zt);if(dn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(dn))return ee(Zt,Jt)}}function oe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ie(Zt,Jt){return Pe(Zt)||de(Zt,Jt)||z(Zt,Jt)||oe()}var le=ot(67294),ue=ot(73935);function me(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var xe={};function Ae(Zt,Jt){}function De(Zt,Jt){}function Fe(){xe={}}function je(Zt,Jt,dn){!Jt&&!xe[dn]&&(Zt(!1,dn),xe[dn]=!0)}function Le(Zt,Jt){je(Ae,Zt,Jt)}function Be(Zt,Jt){je(De,Zt,Jt)}var Ue=null;function Je(Zt){"@babel/helpers - typeof";return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Jt){return typeof Jt}:function(Jt){return Jt&&typeof Symbol=="function"&&Jt.constructor===Symbol&&Jt!==Symbol.prototype?"symbol":typeof Jt},Je(Zt)}var He=ot(18459);function We(Zt,Jt,dn){var Fn=le.useRef({});return(!("value"in Fn.current)||dn(Fn.current.condition,Jt))&&(Fn.current.value=Zt(),Fn.current.condition=Jt),Fn.current.value}function at(Zt,Jt){typeof Zt=="function"?Zt(Jt):Je(Zt)==="object"&&Zt&&"current"in Zt&&(Zt.current=Jt)}function ft(){for(var Zt=arguments.length,Jt=new Array(Zt),dn=0;dn<Zt;dn++)Jt[dn]=arguments[dn];var Fn=Jt.filter(function(pr){return pr});return Fn.length<=1?Fn[0]:function(pr){Jt.forEach(function(oi){at(oi,pr)})}}function mt(){for(var Zt=arguments.length,Jt=new Array(Zt),dn=0;dn<Zt;dn++)Jt[dn]=arguments[dn];return We(function(){return ft.apply(void 0,Jt)},Jt,function(Fn,pr){return Fn.length===pr.length&&Fn.every(function(oi,_r){return oi===pr[_r]})})}function Lt(Zt){var Jt,dn,Fn=(0,He.isMemo)(Zt)?Zt.type.type:Zt.type;return!(typeof Fn=="function"&&!((Jt=Fn.prototype)!==null&&Jt!==void 0&&Jt.render)||typeof Zt=="function"&&!((dn=Zt.prototype)!==null&&dn!==void 0&&dn.render))}var Xe=le.createContext(null),et=Xe;function lt(Zt){if(Array.isArray(Zt))return ee(Zt)}function vt(Zt){if(typeof Symbol!="undefined"&&Zt[Symbol.iterator]!=null||Zt["@@iterator"]!=null)return Array.from(Zt)}function wt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ht(Zt){return lt(Zt)||vt(Zt)||z(Zt)||wt()}var dt=me()?le.useLayoutEffect:le.useEffect,ut=dt,Pt=function(Jt,dn){var Fn=React.useRef(!0);dt(function(){if(!Fn.current)return Jt()},dn),dt(function(){return Fn.current=!1,function(){Fn.current=!0}},[])},yt=[];function gt(Zt,Jt){var dn=le.useState(function(){if(!me())return null;var Ki=document.createElement("div");return Ki}),Fn=ie(dn,1),pr=Fn[0],oi=le.useRef(!1),_r=le.useContext(et),Kn=le.useState(yt),Et=ie(Kn,2),io=Et[0],Ir=Et[1],gi=_r||(oi.current?void 0:function(Ki){Ir(function(Jo){var Vo=[Ki].concat(ht(Jo));return Vo})});function oo(){pr.parentElement||document.body.appendChild(pr),oi.current=!0}function Yi(){var Ki;(Ki=pr.parentElement)===null||Ki===void 0||Ki.removeChild(pr),oi.current=!1}return ut(function(){return Zt?_r?_r(oo):oo():Yi(),Yi},[Zt]),ut(function(){io.length&&(io.forEach(function(Ki){return Ki()}),Ir(yt))},[io]),[pr,gi]}function Tt(Zt,Jt){if(!Zt)return!1;if(Zt.contains)return Zt.contains(Jt);for(var dn=Jt;dn;){if(dn===Zt)return!0;dn=dn.parentNode}return!1}var ct="data-rc-order",Ye="rc-util-key",Ze=new Map;function Se(){var Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Jt=Zt.mark;return Jt?Jt.startsWith("data-")?Jt:"data-".concat(Jt):Ye}function Ne(Zt){if(Zt.attachTo)return Zt.attachTo;var Jt=document.querySelector("head");return Jt||document.body}function $e(Zt){return Zt==="queue"?"prependQueue":Zt?"prepend":"append"}function nt(Zt){return Array.from((Ze.get(Zt)||Zt).children).filter(function(Jt){return Jt.tagName==="STYLE"})}function Ie(Zt){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!me())return null;var dn=Jt.csp,Fn=Jt.prepend,pr=document.createElement("style");pr.setAttribute(ct,$e(Fn)),dn!=null&&dn.nonce&&(pr.nonce=dn==null?void 0:dn.nonce),pr.innerHTML=Zt;var oi=Ne(Jt),_r=oi.firstChild;if(Fn){if(Fn==="queue"){var Kn=nt(oi).filter(function(Et){return["prepend","prependQueue"].includes(Et.getAttribute(ct))});if(Kn.length)return oi.insertBefore(pr,Kn[Kn.length-1].nextSibling),pr}oi.insertBefore(pr,_r)}else oi.appendChild(pr);return pr}function ze(Zt){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dn=Ne(Jt);return nt(dn).find(function(Fn){return Fn.getAttribute(Se(Jt))===Zt})}function Ve(Zt){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dn=ze(Zt,Jt);if(dn){var Fn=Ne(Jt);Fn.removeChild(dn)}}function it(Zt,Jt){var dn=Ze.get(Zt);if(!dn||!Tt(document,dn)){var Fn=Ie("",Jt),pr=Fn.parentNode;Ze.set(Zt,pr),Zt.removeChild(Fn)}}function St(){Ze.clear()}function Ct(Zt,Jt){var dn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Fn=Ne(dn);it(Fn,dn);var pr=ze(Jt,dn);if(pr){var oi,_r;if((oi=dn.csp)!==null&&oi!==void 0&&oi.nonce&&pr.nonce!==((_r=dn.csp)===null||_r===void 0?void 0:_r.nonce)){var Kn;pr.nonce=(Kn=dn.csp)===null||Kn===void 0?void 0:Kn.nonce}return pr.innerHTML!==Zt&&(pr.innerHTML=Zt),pr}var Et=Ie(Zt,dn);return Et.setAttribute(Se(dn),Jt),Et}var It;function jt(Zt){if(typeof document=="undefined")return 0;if(Zt||It===void 0){var Jt=document.createElement("div");Jt.style.width="100%",Jt.style.height="200px";var dn=document.createElement("div"),Fn=dn.style;Fn.position="absolute",Fn.top="0",Fn.left="0",Fn.pointerEvents="none",Fn.visibility="hidden",Fn.width="200px",Fn.height="150px",Fn.overflow="hidden",dn.appendChild(Jt),document.body.appendChild(dn);var pr=Jt.offsetWidth;dn.style.overflow="scroll";var oi=Jt.offsetWidth;pr===oi&&(oi=dn.clientWidth),document.body.removeChild(dn),It=pr-oi}return It}function Kt(Zt){var Jt=Zt.match(/^(.*)px$/),dn=Number(Jt==null?void 0:Jt[1]);return Number.isNaN(dn)?jt():dn}function an(Zt){if(typeof document=="undefined"||!Zt||!(Zt instanceof Element))return{width:0,height:0};var Jt=getComputedStyle(Zt,"::-webkit-scrollbar"),dn=Jt.width,Fn=Jt.height;return{width:Kt(dn),height:Kt(Fn)}}function un(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var hn="rc-util-locker-".concat(Date.now()),qt=0;function On(Zt){var Jt=!!Zt,dn=le.useState(function(){return qt+=1,"".concat(hn,"_").concat(qt)}),Fn=ie(dn,1),pr=Fn[0];ut(function(){if(Jt){var oi=an(document.body).width,_r=un();Ct(`
|
|
html body {
|
|
overflow-y: hidden;
|
|
`.concat(_r?"width: calc(100% - ".concat(oi,"px);"):"",`
|
|
}`),pr)}else Ve(pr);return function(){Ve(pr)}},[Jt,pr])}var fn=!1;function Wt(Zt){return typeof Zt=="boolean"&&(fn=Zt),fn}var Bn=function(Jt){return Jt===!1?!1:!me()||!Jt?null:typeof Jt=="string"?document.querySelector(Jt):typeof Jt=="function"?Jt():Jt},zn=le.forwardRef(function(Zt,Jt){var dn=Zt.open,Fn=Zt.autoLock,pr=Zt.getContainer,oi=Zt.debug,_r=Zt.autoDestroy,Kn=_r===void 0?!0:_r,Et=Zt.children,io=le.useState(dn),Ir=ie(io,2),gi=Ir[0],oo=Ir[1],Yi=gi||dn;le.useEffect(function(){(Kn||dn)&&oo(dn)},[dn,Kn]);var Ki=le.useState(function(){return Bn(pr)}),Jo=ie(Ki,2),Vo=Jo[0],Zi=Jo[1];le.useEffect(function(){var $o=Bn(pr);Zi($o!=null?$o:null)});var ao=gt(Yi&&!Vo,oi),Mr=ie(ao,2),Er=Mr[0],jr=Mr[1],pn=Vo!=null?Vo:Er;On(Fn&&dn&&me()&&(pn===Er||pn===document.body));var Hr=null;if(Et&&Lt(Et)&&Jt){var pi=Et;Hr=pi.ref}var vo=mt(Hr,Jt);if(!Yi||!me()||Vo===void 0)return null;var qi=pn===!1||Wt(),Ao=Et;return Jt&&(Ao=le.cloneElement(Et,{ref:vo})),le.createElement(et.Provider,{value:jr},qi?Ao:(0,ue.createPortal)(Ao,pn))}),Yn=zn,fr=Yn;function Gr(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var lr=Gr()?le.useLayoutEffect:le.useEffect,ni=function(Jt,dn){var Fn=le.useRef(!0);lr(function(){return Jt(Fn.current)},dn),lr(function(){return Fn.current=!1,function(){Fn.current=!0}},[])},ri=function(Jt,dn){ni(function(Fn){if(!Fn)return Jt()},dn)},ki=ni,ji=le.createContext(null),Vi=le.createContext({}),Io=ji;function Mo(){return Mo=Object.assign?Object.assign.bind():function(Zt){for(var Jt=1;Jt<arguments.length;Jt++){var dn=arguments[Jt];for(var Fn in dn)({}).hasOwnProperty.call(dn,Fn)&&(Zt[Fn]=dn[Fn])}return Zt},Mo.apply(null,arguments)}var ro=ot(94184),Nn=ot.n(ro),Qe=ot(62874),Pn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Jt){var dn=Jt.keyCode;if(Jt.altKey&&!Jt.ctrlKey||Jt.metaKey||dn>=Pn.F1&&dn<=Pn.F12)return!1;switch(dn){case Pn.ALT:case Pn.CAPS_LOCK:case Pn.CONTEXT_MENU:case Pn.CTRL:case Pn.DOWN:case Pn.END:case Pn.ESC:case Pn.HOME:case Pn.INSERT:case Pn.LEFT:case Pn.MAC_FF_META:case Pn.META:case Pn.NUMLOCK:case Pn.NUM_CENTER:case Pn.PAGE_DOWN:case Pn.PAGE_UP:case Pn.PAUSE:case Pn.PRINT_SCREEN:case Pn.RIGHT:case Pn.SHIFT:case Pn.UP:case Pn.WIN_KEY:case Pn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Jt){if(Jt>=Pn.ZERO&&Jt<=Pn.NINE||Jt>=Pn.NUM_ZERO&&Jt<=Pn.NUM_MULTIPLY||Jt>=Pn.A&&Jt<=Pn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Jt===0)return!0;switch(Jt){case Pn.SPACE:case Pn.QUESTION_MARK:case Pn.NUM_PLUS:case Pn.NUM_MINUS:case Pn.NUM_PERIOD:case Pn.NUM_DIVISION:case Pn.SEMICOLON:case Pn.DASH:case Pn.EQUALS:case Pn.COMMA:case Pn.PERIOD:case Pn.SLASH:case Pn.APOSTROPHE:case Pn.SINGLE_QUOTE:case Pn.OPEN_SQUARE_BRACKET:case Pn.BACKSLASH:case Pn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},An=Pn;function Lr(Zt){"@babel/helpers - typeof";return Lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Jt){return typeof Jt}:function(Jt){return Jt&&typeof Symbol=="function"&&Jt.constructor===Symbol&&Jt!==Symbol.prototype?"symbol":typeof Jt},Lr(Zt)}function Dn(Zt,Jt){if(Lr(Zt)!=="object"||Zt===null)return Zt;var dn=Zt[Symbol.toPrimitive];if(dn!==void 0){var Fn=dn.call(Zt,Jt||"default");if(Lr(Fn)!=="object")return Fn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Jt==="string"?String:Number)(Zt)}function Zn(Zt){var Jt=Dn(Zt,"string");return Lr(Jt)==="symbol"?Jt:String(Jt)}function nr(Zt,Jt,dn){return Jt=Zn(Jt),Jt in Zt?Object.defineProperty(Zt,Jt,{value:dn,enumerable:!0,configurable:!0,writable:!0}):Zt[Jt]=dn,Zt}function Jr(Zt,Jt){var dn=Object.keys(Zt);if(Object.getOwnPropertySymbols){var Fn=Object.getOwnPropertySymbols(Zt);Jt&&(Fn=Fn.filter(function(pr){return Object.getOwnPropertyDescriptor(Zt,pr).enumerable})),dn.push.apply(dn,Fn)}return dn}function nn(Zt){for(var Jt=1;Jt<arguments.length;Jt++){var dn=arguments[Jt]!=null?arguments[Jt]:{};Jt%2?Jr(Object(dn),!0).forEach(function(Fn){nr(Zt,Fn,dn[Fn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Zt,Object.getOwnPropertyDescriptors(dn)):Jr(Object(dn)).forEach(function(Fn){Object.defineProperty(Zt,Fn,Object.getOwnPropertyDescriptor(dn,Fn))})}return Zt}var ln=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
summary tabIndex target title type useMap value width wmode wrap`,Vt=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,cn="".concat(ln," ").concat(Vt).split(/[\s\n]+/),Qn="aria-",rr="data-";function or(Zt,Jt){return Zt.indexOf(Jt)===0}function en(Zt){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,dn;Jt===!1?dn={aria:!0,data:!0,attr:!0}:Jt===!0?dn={aria:!0}:dn=nn({},Jt);var Fn={};return Object.keys(Zt).forEach(function(pr){(dn.aria&&(pr==="role"||or(pr,Qn))||dn.data&&or(pr,rr)||dn.attr&&cn.includes(pr))&&(Fn[pr]=Zt[pr])}),Fn}function Tn(Zt,Jt){if(Zt==null)return{};var dn={};for(var Fn in Zt)if({}.hasOwnProperty.call(Zt,Fn)){if(Jt.indexOf(Fn)!==-1)continue;dn[Fn]=Zt[Fn]}return dn}function Sr(Zt,Jt){if(Zt==null)return{};var dn,Fn,pr=Tn(Zt,Jt);if(Object.getOwnPropertySymbols){var oi=Object.getOwnPropertySymbols(Zt);for(Fn=0;Fn<oi.length;Fn++)dn=oi[Fn],Jt.indexOf(dn)===-1&&{}.propertyIsEnumerable.call(Zt,dn)&&(pr[dn]=Zt[dn])}return pr}var Vr=ot(33993);function Wn(Zt,Jt,dn){var Fn=le.useRef({});return(!("value"in Fn.current)||dn(Fn.current.condition,Jt))&&(Fn.current.value=Zt(),Fn.current.condition=Jt),Fn.current.value}var $t=Symbol.for("react.element"),cr=Symbol.for("react.transitional.element"),yr=Symbol.for("react.fragment");function Nr(Zt){return Zt&&_typeof(Zt)==="object"&&(Zt.$$typeof===$t||Zt.$$typeof===cr)&&Zt.type===yr}var xn=Number(le.version.split(".")[0]),gr=function(Jt,dn){typeof Jt=="function"?Jt(dn):Lr(Jt)==="object"&&Jt&&"current"in Jt&&(Jt.current=dn)},hi=function(){for(var Jt=arguments.length,dn=new Array(Jt),Fn=0;Fn<Jt;Fn++)dn[Fn]=arguments[Fn];var pr=dn.filter(Boolean);return pr.length<=1?pr[0]:function(oi){dn.forEach(function(_r){gr(_r,oi)})}},Wi=function(){for(var Jt=arguments.length,dn=new Array(Jt),Fn=0;Fn<Jt;Fn++)dn[Fn]=arguments[Fn];return Wn(function(){return hi.apply(void 0,dn)},dn,function(pr,oi){return pr.length!==oi.length||pr.every(function(_r,Kn){return _r!==oi[Kn]})})},zi=function(Jt){var dn,Fn;if(!Jt)return!1;if(sr(Jt)&&xn>=19)return!0;var pr=isMemo(Jt)?Jt.type.type:Jt.type;return!(typeof pr=="function"&&!((dn=pr.prototype)!==null&&dn!==void 0&&dn.render)&&pr.$$typeof!==ForwardRef||typeof Jt=="function"&&!((Fn=Jt.prototype)!==null&&Fn!==void 0&&Fn.render)&&Jt.$$typeof!==ForwardRef)};function sr(Zt){return isValidElement(Zt)&&!isFragment(Zt)}var dr=function(Jt){return sr(Jt)&&zi(Jt)},Ar=function(Jt){if(Jt&&sr(Jt)){var dn=Jt;return dn.props.propertyIsEnumerable("ref")?dn.props.ref:dn.ref}return null},ii=["prefixCls","className","containerRef"],Zr=function(Jt){var dn=Jt.prefixCls,Fn=Jt.className,pr=Jt.containerRef,oi=Sr(Jt,ii),_r=le.useContext(Vi),Kn=_r.panel,Et=Wi(Kn,pr);return le.createElement("div",Mo({className:Nn()("".concat(dn,"-content"),Fn),role:"dialog",ref:Et},en(Jt,{aria:!0}),{"aria-modal":"true"},oi))},In=Zr,Cr={},la=[],Ho=function(Jt){la.push(Jt)};function zo(Zt,Jt){if(0)var dn}function tn(Zt,Jt){if(0)var dn}function Xr(){Cr={}}function yi(Zt,Jt,dn){!Jt&&!Cr[dn]&&(Zt(!1,dn),Cr[dn]=!0)}function xr(Zt,Jt){yi(zo,Zt,Jt)}function Po(Zt,Jt){yi(tn,Zt,Jt)}xr.preMessage=Ho,xr.resetWarned=Xr,xr.noteOnce=Po;var Li=xr;function Bi(Zt){return typeof Zt=="string"&&String(Number(Zt))===Zt?(Li(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Zt)):Zt}function Mi(Zt){warning(!("wrapperClassName"in Zt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Zt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Pi={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Ji(Zt,Jt){var dn,Fn,pr,oi=Zt.prefixCls,_r=Zt.open,Kn=Zt.placement,Et=Zt.inline,io=Zt.push,Ir=Zt.forceRender,gi=Zt.autoFocus,oo=Zt.keyboard,Yi=Zt.classNames,Ki=Zt.rootClassName,Jo=Zt.rootStyle,Vo=Zt.zIndex,Zi=Zt.className,ao=Zt.id,Mr=Zt.style,Er=Zt.motion,jr=Zt.width,pn=Zt.height,Hr=Zt.children,pi=Zt.mask,vo=Zt.maskClosable,qi=Zt.maskMotion,Ao=Zt.maskClassName,$o=Zt.maskStyle,Fa=Zt.afterOpenChange,Sa=Zt.onClose,Zs=Zt.onMouseEnter,Bs=Zt.onMouseOver,on=Zt.onMouseLeave,Da=Zt.onClick,ts=Zt.onKeyDown,Bl=Zt.onKeyUp,yo=Zt.styles,ul=Zt.drawerRender,hl=le.useRef(),bl=le.useRef(),bo=le.useRef();le.useImperativeHandle(Jt,function(){return hl.current});var ia=function(Xa){var vi=Xa.keyCode,Il=Xa.shiftKey;switch(vi){case An.TAB:{if(vi===An.TAB){if(!Il&&document.activeElement===bo.current){var us;(us=bl.current)===null||us===void 0||us.focus({preventScroll:!0})}else if(Il&&document.activeElement===bl.current){var hs;(hs=bo.current)===null||hs===void 0||hs.focus({preventScroll:!0})}}break}case An.ESC:{Sa&&oo&&(Xa.stopPropagation(),Sa(Xa));break}}};le.useEffect(function(){if(_r&&gi){var Ca;(Ca=hl.current)===null||Ca===void 0||Ca.focus({preventScroll:!0})}},[_r]);var mi=le.useState(!1),Gi=ve(mi,2),Co=Gi[0],Zo=Gi[1],wr=le.useContext(Io),Ku;typeof io=="boolean"?Ku=io?{}:{distance:0}:Ku=io||{};var Xs=(dn=(Fn=(pr=Ku)===null||pr===void 0?void 0:pr.distance)!==null&&Fn!==void 0?Fn:wr==null?void 0:wr.pushDistance)!==null&&dn!==void 0?dn:180,xs=le.useMemo(function(){return{pushDistance:Xs,push:function(){Zo(!0)},pull:function(){Zo(!1)}}},[Xs]);le.useEffect(function(){if(_r){var Ca;wr==null||(Ca=wr.push)===null||Ca===void 0||Ca.call(wr)}else{var Xa;wr==null||(Xa=wr.pull)===null||Xa===void 0||Xa.call(wr)}},[_r]),le.useEffect(function(){return function(){var Ca;wr==null||(Ca=wr.pull)===null||Ca===void 0||Ca.call(wr)}},[]);var ic=pi&&le.createElement(Qe.Z,Mo({key:"mask"},qi,{visible:_r}),function(Ca,Xa){var vi=Ca.className,Il=Ca.style;return le.createElement("div",{className:Nn()("".concat(oi,"-mask"),vi,Yi==null?void 0:Yi.mask,Ao),style:fe(fe(fe({},Il),$o),yo==null?void 0:yo.mask),onClick:vo&&_r?Sa:void 0,ref:Xa})}),ku=typeof Er=="function"?Er(Kn):Er,ar={};if(Co&&Xs)switch(Kn){case"top":ar.transform="translateY(".concat(Xs,"px)");break;case"bottom":ar.transform="translateY(".concat(-Xs,"px)");break;case"left":ar.transform="translateX(".concat(Xs,"px)");break;default:ar.transform="translateX(".concat(-Xs,"px)");break}Kn==="left"||Kn==="right"?ar.width=Bi(jr):ar.height=Bi(pn);var ba={onMouseEnter:Zs,onMouseOver:Bs,onMouseLeave:on,onClick:Da,onKeyDown:ts,onKeyUp:Bl},La=le.createElement(Qe.Z,Mo({key:"panel"},ku,{visible:_r,forceRender:Ir,onVisibleChanged:function(Xa){Fa==null||Fa(Xa)},removeOnLeave:!1,leavedClassName:"".concat(oi,"-content-wrapper-hidden")}),function(Ca,Xa){var vi=Ca.className,Il=Ca.style,us=le.createElement(In,Mo({id:ao,containerRef:Xa,prefixCls:oi,className:Nn()(Zi,Yi==null?void 0:Yi.content),style:fe(fe({},Mr),yo==null?void 0:yo.content)},en(Zt,{aria:!0}),ba),Hr);return le.createElement("div",Mo({className:Nn()("".concat(oi,"-content-wrapper"),Yi==null?void 0:Yi.wrapper,vi),style:fe(fe(fe({},ar),Il),yo==null?void 0:yo.wrapper)},en(Zt,{data:!0})),ul?ul(us):us)}),Cl=fe({},Jo);return Vo&&(Cl.zIndex=Vo),le.createElement(Io.Provider,{value:xs},le.createElement("div",{className:Nn()(oi,"".concat(oi,"-").concat(Kn),Ki,Ge(Ge({},"".concat(oi,"-open"),_r),"".concat(oi,"-inline"),Et)),style:Cl,tabIndex:-1,ref:hl,onKeyDown:ia},ic,le.createElement("div",{tabIndex:0,ref:bl,style:Pi,"aria-hidden":"true","data-sentinel":"start"}),La,le.createElement("div",{tabIndex:0,ref:bo,style:Pi,"aria-hidden":"true","data-sentinel":"end"})))}var kn=le.forwardRef(Ji),To=kn,bn=function(Jt){var dn=Jt.open,Fn=dn===void 0?!1:dn,pr=Jt.prefixCls,oi=pr===void 0?"rc-drawer":pr,_r=Jt.placement,Kn=_r===void 0?"right":_r,Et=Jt.autoFocus,io=Et===void 0?!0:Et,Ir=Jt.keyboard,gi=Ir===void 0?!0:Ir,oo=Jt.width,Yi=oo===void 0?378:oo,Ki=Jt.mask,Jo=Ki===void 0?!0:Ki,Vo=Jt.maskClosable,Zi=Vo===void 0?!0:Vo,ao=Jt.getContainer,Mr=Jt.forceRender,Er=Jt.afterOpenChange,jr=Jt.destroyOnClose,pn=Jt.onMouseEnter,Hr=Jt.onMouseOver,pi=Jt.onMouseLeave,vo=Jt.onClick,qi=Jt.onKeyDown,Ao=Jt.onKeyUp,$o=Jt.panelRef,Fa=le.useState(!1),Sa=ve(Fa,2),Zs=Sa[0],Bs=Sa[1],on=le.useState(!1),Da=ve(on,2),ts=Da[0],Bl=Da[1];ki(function(){Bl(!0)},[]);var yo=ts?Fn:!1,ul=le.useRef(),hl=le.useRef();ki(function(){yo&&(hl.current=document.activeElement)},[yo]);var bl=function(Co){var Zo;if(Bs(Co),Er==null||Er(Co),!Co&&hl.current&&!((Zo=ul.current)!==null&&Zo!==void 0&&Zo.contains(hl.current))){var wr;(wr=hl.current)===null||wr===void 0||wr.focus({preventScroll:!0})}},bo=le.useMemo(function(){return{panel:$o}},[$o]);if(!Mr&&!Zs&&!yo&&jr)return null;var ia={onMouseEnter:pn,onMouseOver:Hr,onMouseLeave:pi,onClick:vo,onKeyDown:qi,onKeyUp:Ao},mi=fe(fe({},Jt),{},{open:yo,prefixCls:oi,placement:Kn,autoFocus:io,keyboard:gi,width:Yi,mask:Jo,maskClosable:Zi,inline:ao===!1,afterOpenChange:bl,ref:ul},ia);return le.createElement(Vi.Provider,{value:bo},le.createElement(fr,{open:yo||Mr||Zs,autoDestroy:!1,getContainer:ao,autoLock:Jo&&(yo||Zs)},le.createElement(To,mi)))},Ni=bn,ya=Ni},26819:function(Sn,vn){"use strict";var ot;var st=typeof Symbol=="function"&&Symbol.for,Ft=st?Symbol.for("react.element"):60103,ae=st?Symbol.for("react.portal"):60106,Ge=st?Symbol.for("react.fragment"):60107,Re=st?Symbol.for("react.strict_mode"):60108,fe=st?Symbol.for("react.profiler"):60114,pe=st?Symbol.for("react.provider"):60109,be=st?Symbol.for("react.context"):60110,Ee=st?Symbol.for("react.async_mode"):60111,we=st?Symbol.for("react.concurrent_mode"):60111,Te=st?Symbol.for("react.forward_ref"):60112,ve=st?Symbol.for("react.suspense"):60113,Pe=st?Symbol.for("react.suspense_list"):60120,de=st?Symbol.for("react.memo"):60115,ee=st?Symbol.for("react.lazy"):60116,z=st?Symbol.for("react.block"):60121,oe=st?Symbol.for("react.fundamental"):60117,ie=st?Symbol.for("react.responder"):60118,le=st?Symbol.for("react.scope"):60119;function ue(xe){if(typeof xe=="object"&&xe!==null){var Ae=xe.$$typeof;switch(Ae){case Ft:switch(xe=xe.type,xe){case Ee:case we:case Ge:case fe:case Re:case ve:return xe;default:switch(xe=xe&&xe.$$typeof,xe){case be:case Te:case ee:case de:case pe:return xe;default:return Ae}}case ae:return Ae}}}function me(xe){return ue(xe)===we}ot=Ee,ot=we,ot=be,ot=pe,ot=Ft,ot=Te,ot=Ge,ot=ee,ot=de,ot=ae,ot=fe,ot=Re,ot=ve,ot=function(xe){return me(xe)||ue(xe)===Ee},ot=me,ot=function(xe){return ue(xe)===be},ot=function(xe){return ue(xe)===pe},ot=function(xe){return typeof xe=="object"&&xe!==null&&xe.$$typeof===Ft},ot=function(xe){return ue(xe)===Te},ot=function(xe){return ue(xe)===Ge},ot=function(xe){return ue(xe)===ee},vn.isMemo=function(xe){return ue(xe)===de},ot=function(xe){return ue(xe)===ae},ot=function(xe){return ue(xe)===fe},ot=function(xe){return ue(xe)===Re},ot=function(xe){return ue(xe)===ve},ot=function(xe){return typeof xe=="string"||typeof xe=="function"||xe===Ge||xe===we||xe===fe||xe===Re||xe===ve||xe===Pe||typeof xe=="object"&&xe!==null&&(xe.$$typeof===ee||xe.$$typeof===de||xe.$$typeof===pe||xe.$$typeof===be||xe.$$typeof===Te||xe.$$typeof===oe||xe.$$typeof===ie||xe.$$typeof===le||xe.$$typeof===z)},ot=ue},18459:function(Sn,vn,ot){"use strict";Sn.exports=ot(26819)},16651:function(Sn,vn){"use strict";var ot;var st=Symbol.for("react.element"),Ft=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),Re=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),pe=Symbol.for("react.context"),be=Symbol.for("react.server_context"),Ee=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),ee;ee=Symbol.for("react.module.reference");function z(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case st:switch(oe=oe.type,oe){case ae:case Re:case Ge:case we:case Te:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case be:case pe:case Ee:case Pe:case ve:case fe:return oe;default:return ie}}case Ft:return ie}}}ot=pe,ot=fe,ot=st,ot=Ee,ot=ae,ot=Pe,ot=ve,ot=Ft,ot=Re,ot=Ge,ot=we,ot=Te,ot=function(){return!1},ot=function(){return!1},ot=function(oe){return z(oe)===pe},ot=function(oe){return z(oe)===fe},ot=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===st},ot=function(oe){return z(oe)===Ee},ot=function(oe){return z(oe)===ae},ot=function(oe){return z(oe)===Pe},ot=function(oe){return z(oe)===ve},ot=function(oe){return z(oe)===Ft},ot=function(oe){return z(oe)===Re},ot=function(oe){return z(oe)===Ge},ot=function(oe){return z(oe)===we},ot=function(oe){return z(oe)===Te},ot=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===ae||oe===Re||oe===Ge||oe===we||oe===Te||oe===de||typeof oe=="object"&&oe!==null&&(oe.$$typeof===Pe||oe.$$typeof===ve||oe.$$typeof===fe||oe.$$typeof===pe||oe.$$typeof===Ee||oe.$$typeof===ee||oe.getModuleId!==void 0)},ot=z},33993:function(Sn,vn,ot){"use strict";ot(16651)},31457:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return Tt}});var st=ot(4942),Ft=ot(87462),ae=ot(71002),Ge=ot(1413),Re=ot(97685),fe=ot(94184),pe=ot.n(fe),be=ot(67294);function Ee(ct){var Ye=be.useRef();Ye.current=ct;var Ze=be.useCallback(function(){for(var Se,Ne=arguments.length,$e=new Array(Ne),nt=0;nt<Ne;nt++)$e[nt]=arguments[nt];return(Se=Ye.current)===null||Se===void 0?void 0:Se.call.apply(Se,[Ye].concat($e))},[]);return Ze}function we(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Te=we()?be.useLayoutEffect:be.useEffect,ve=function(Ye,Ze){var Se=be.useRef(!0);Te(function(){return Ye(Se.current)},Ze),Te(function(){return Se.current=!1,function(){Se.current=!0}},[])},Pe=function(Ye,Ze){ve(function(Se){if(!Se)return Ye()},Ze)},de=null;function ee(ct){var Ye=be.useRef(!1),Ze=be.useState(ct),Se=(0,Re.Z)(Ze,2),Ne=Se[0],$e=Se[1];be.useEffect(function(){return Ye.current=!1,function(){Ye.current=!0}},[]);function nt(Ie,ze){ze&&Ye.current||$e(Ie)}return[Ne,nt]}function z(ct){return ct!==void 0}function oe(ct,Ye){var Ze=Ye||{},Se=Ze.defaultValue,Ne=Ze.value,$e=Ze.onChange,nt=Ze.postState,Ie=ee(function(){return z(Ne)?Ne:z(Se)?typeof Se=="function"?Se():Se:typeof ct=="function"?ct():ct}),ze=(0,Re.Z)(Ie,2),Ve=ze[0],it=ze[1],St=Ne!==void 0?Ne:Ve,Ct=nt?nt(St):St,It=Ee($e),jt=ee([St]),Kt=(0,Re.Z)(jt,2),an=Kt[0],un=Kt[1];Pe(function(){var qt=an[0];Ve!==qt&&It(Ve,qt)},[an]),Pe(function(){z(Ne)||it(Ne)},[Ne]);var hn=Ee(function(qt,On){it(qt,On),un([St],On)});return[Ct,hn]}var ie={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ye){var Ze=Ye.keyCode;if(Ye.altKey&&!Ye.ctrlKey||Ye.metaKey||Ze>=ie.F1&&Ze<=ie.F12)return!1;switch(Ze){case ie.ALT:case ie.CAPS_LOCK:case ie.CONTEXT_MENU:case ie.CTRL:case ie.DOWN:case ie.END:case ie.ESC:case ie.HOME:case ie.INSERT:case ie.LEFT:case ie.MAC_FF_META:case ie.META:case ie.NUMLOCK:case ie.NUM_CENTER:case ie.PAGE_DOWN:case ie.PAGE_UP:case ie.PAUSE:case ie.PRINT_SCREEN:case ie.RIGHT:case ie.SHIFT:case ie.UP:case ie.WIN_KEY:case ie.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ye){if(Ye>=ie.ZERO&&Ye<=ie.NINE||Ye>=ie.NUM_ZERO&&Ye<=ie.NUM_MULTIPLY||Ye>=ie.A&&Ye<=ie.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ye===0)return!0;switch(Ye){case ie.SPACE:case ie.QUESTION_MARK:case ie.NUM_PLUS:case ie.NUM_MINUS:case ie.NUM_PERIOD:case ie.NUM_DIVISION:case ie.SEMICOLON:case ie.DASH:case ie.EQUALS:case ie.COMMA:case ie.PERIOD:case ie.SLASH:case ie.APOSTROPHE:case ie.SINGLE_QUOTE:case ie.OPEN_SQUARE_BRACKET:case ie.BACKSLASH:case ie.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},le=ie,ue=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
summary tabIndex target title type useMap value width wmode wrap`,me=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,xe="".concat(ue," ").concat(me).split(/[\s\n]+/),Ae="aria-",De="data-";function Fe(ct,Ye){return ct.indexOf(Ye)===0}function je(ct){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ze;Ye===!1?Ze={aria:!0,data:!0,attr:!0}:Ye===!0?Ze={aria:!0}:Ze=(0,Ge.Z)({},Ye);var Se={};return Object.keys(ct).forEach(function(Ne){(Ze.aria&&(Ne==="role"||Fe(Ne,Ae))||Ze.data&&Fe(Ne,De)||Ze.attr&&xe.includes(Ne))&&(Se[Ne]=ct[Ne])}),Se}var Le={},Be=[],Ue=function(Ye){Be.push(Ye)};function Je(ct,Ye){if(0)var Ze}function He(ct,Ye){if(0)var Ze}function We(){Le={}}function at(ct,Ye,Ze){!Ye&&!Le[Ze]&&(ct(!1,Ze),Le[Ze]=!0)}function ft(ct,Ye){at(Je,ct,Ye)}function mt(ct,Ye){at(He,ct,Ye)}ft.preMessage=Ue,ft.resetWarned=We,ft.noteOnce=mt;var Lt=null,Xe=ot(81626),et=[10,20,50,100],lt=function(Ye){var Ze=Ye.pageSizeOptions,Se=Ze===void 0?et:Ze,Ne=Ye.locale,$e=Ye.changeSize,nt=Ye.pageSize,Ie=Ye.goButton,ze=Ye.quickGo,Ve=Ye.rootPrefixCls,it=Ye.disabled,St=Ye.buildOptionText,Ct=Ye.showSizeChanger,It=Ye.sizeChangerRender,jt=be.useState(""),Kt=(0,Re.Z)(jt,2),an=Kt[0],un=Kt[1],hn=function(){return!an||Number.isNaN(an)?void 0:Number(an)},qt=typeof St=="function"?St:function(lr){return"".concat(lr," ").concat(Ne.items_per_page)},On=function(ni){un(ni.target.value)},fn=function(ni){Ie||an===""||(un(""),!(ni.relatedTarget&&(ni.relatedTarget.className.indexOf("".concat(Ve,"-item-link"))>=0||ni.relatedTarget.className.indexOf("".concat(Ve,"-item"))>=0))&&(ze==null||ze(hn())))},Wt=function(ni){an!==""&&(ni.keyCode===le.ENTER||ni.type==="click")&&(un(""),ze==null||ze(hn()))},Bn=function(){return Se.some(function(ni){return ni.toString()===nt.toString()})?Se:Se.concat([nt]).sort(function(ni,ri){var ki=Number.isNaN(Number(ni))?0:Number(ni),ji=Number.isNaN(Number(ri))?0:Number(ri);return ki-ji})},zn="".concat(Ve,"-options");if(!Ct&&!ze)return null;var Yn=null,fr=null,Gr=null;return Ct&&It&&(Yn=It({disabled:it,size:nt,onSizeChange:function(ni){$e==null||$e(Number(ni))},"aria-label":Ne.page_size,className:"".concat(zn,"-size-changer"),options:Bn().map(function(lr){return{label:qt(lr),value:lr}})})),ze&&(Ie&&(Gr=typeof Ie=="boolean"?be.createElement("button",{type:"button",onClick:Wt,onKeyUp:Wt,disabled:it,className:"".concat(zn,"-quick-jumper-button")},Ne.jump_to_confirm):be.createElement("span",{onClick:Wt,onKeyUp:Wt},Ie)),fr=be.createElement("div",{className:"".concat(zn,"-quick-jumper")},Ne.jump_to,be.createElement("input",{disabled:it,type:"text",value:an,onChange:On,onKeyUp:Wt,onBlur:fn,"aria-label":Ne.page}),Ne.page,Gr)),be.createElement("li",{className:zn},Yn,fr)},vt=lt,wt=function(Ye){var Ze=Ye.rootPrefixCls,Se=Ye.page,Ne=Ye.active,$e=Ye.className,nt=Ye.showTitle,Ie=Ye.onClick,ze=Ye.onKeyPress,Ve=Ye.itemRender,it="".concat(Ze,"-item"),St=pe()(it,"".concat(it,"-").concat(Se),(0,st.Z)((0,st.Z)({},"".concat(it,"-active"),Ne),"".concat(it,"-disabled"),!Se),$e),Ct=function(){Ie(Se)},It=function(an){ze(an,Ie,Se)},jt=Ve(Se,"page",be.createElement("a",{rel:"nofollow"},Se));return jt?be.createElement("li",{title:nt?String(Se):null,className:St,onClick:Ct,onKeyDown:It,tabIndex:0},jt):null},ht=wt,dt=function(Ye,Ze,Se){return Se};function ut(){}function Pt(ct){var Ye=Number(ct);return typeof Ye=="number"&&!Number.isNaN(Ye)&&isFinite(Ye)&&Math.floor(Ye)===Ye}function yt(ct,Ye,Ze){var Se=typeof ct=="undefined"?Ye:ct;return Math.floor((Ze-1)/Se)+1}var gt=function(Ye){var Ze=Ye.prefixCls,Se=Ze===void 0?"rc-pagination":Ze,Ne=Ye.selectPrefixCls,$e=Ne===void 0?"rc-select":Ne,nt=Ye.className,Ie=Ye.current,ze=Ye.defaultCurrent,Ve=ze===void 0?1:ze,it=Ye.total,St=it===void 0?0:it,Ct=Ye.pageSize,It=Ye.defaultPageSize,jt=It===void 0?10:It,Kt=Ye.onChange,an=Kt===void 0?ut:Kt,un=Ye.hideOnSinglePage,hn=Ye.align,qt=Ye.showPrevNextJumpers,On=qt===void 0?!0:qt,fn=Ye.showQuickJumper,Wt=Ye.showLessItems,Bn=Ye.showTitle,zn=Bn===void 0?!0:Bn,Yn=Ye.onShowSizeChange,fr=Yn===void 0?ut:Yn,Gr=Ye.locale,lr=Gr===void 0?Xe.Z:Gr,ni=Ye.style,ri=Ye.totalBoundaryShowSizeChanger,ki=ri===void 0?50:ri,ji=Ye.disabled,Vi=Ye.simple,Io=Ye.showTotal,Mo=Ye.showSizeChanger,ro=Mo===void 0?St>ki:Mo,Nn=Ye.sizeChangerRender,Qe=Ye.pageSizeOptions,Pn=Ye.itemRender,An=Pn===void 0?dt:Pn,Lr=Ye.jumpPrevIcon,Dn=Ye.jumpNextIcon,Zn=Ye.prevIcon,nr=Ye.nextIcon,Jr=be.useRef(null),nn=oe(10,{value:Ct,defaultValue:jt}),ln=(0,Re.Z)(nn,2),Vt=ln[0],cn=ln[1],Qn=oe(1,{value:Ie,defaultValue:Ve,postState:function(Hr){return Math.max(1,Math.min(Hr,yt(void 0,Vt,St)))}}),rr=(0,Re.Z)(Qn,2),or=rr[0],en=rr[1],Tn=be.useState(or),Sr=(0,Re.Z)(Tn,2),Vr=Sr[0],Wn=Sr[1];(0,be.useEffect)(function(){Wn(or)},[or]);var $t=an!==ut,cr="current"in Ye,yr=Math.max(1,or-(Wt?3:5)),Nr=Math.min(yt(void 0,Vt,St),or+(Wt?3:5));function xn(pn,Hr){var pi=pn||be.createElement("button",{type:"button","aria-label":Hr,className:"".concat(Se,"-item-link")});return typeof pn=="function"&&(pi=be.createElement(pn,(0,Ge.Z)({},Ye))),pi}function gr(pn){var Hr=pn.target.value,pi=yt(void 0,Vt,St),vo;return Hr===""?vo=Hr:Number.isNaN(Number(Hr))?vo=Vr:Hr>=pi?vo=pi:vo=Number(Hr),vo}function hi(pn){return Pt(pn)&&pn!==or&&Pt(St)&&St>0}var Wi=St>Vt?fn:!1;function zi(pn){(pn.keyCode===le.UP||pn.keyCode===le.DOWN)&&pn.preventDefault()}function sr(pn){var Hr=gr(pn);switch(Hr!==Vr&&Wn(Hr),pn.keyCode){case le.ENTER:ii(Hr);break;case le.UP:ii(Hr-1);break;case le.DOWN:ii(Hr+1);break;default:break}}function dr(pn){ii(gr(pn))}function Ar(pn){var Hr=yt(pn,Vt,St),pi=or>Hr&&Hr!==0?Hr:or;cn(pn),Wn(pi),fr==null||fr(or,pn),en(pi),an==null||an(pi,pn)}function ii(pn){if(hi(pn)&&!ji){var Hr=yt(void 0,Vt,St),pi=pn;return pn>Hr?pi=Hr:pn<1&&(pi=1),pi!==Vr&&Wn(pi),en(pi),an==null||an(pi,Vt),pi}return or}var Zr=or>1,In=or<yt(void 0,Vt,St);function Cr(){Zr&&ii(or-1)}function la(){In&&ii(or+1)}function Ho(){ii(yr)}function zo(){ii(Nr)}function tn(pn,Hr){if(pn.key==="Enter"||pn.charCode===le.ENTER||pn.keyCode===le.ENTER){for(var pi=arguments.length,vo=new Array(pi>2?pi-2:0),qi=2;qi<pi;qi++)vo[qi-2]=arguments[qi];Hr.apply(void 0,vo)}}function Xr(pn){tn(pn,Cr)}function yi(pn){tn(pn,la)}function xr(pn){tn(pn,Ho)}function Po(pn){tn(pn,zo)}function Li(pn){var Hr=An(pn,"prev",xn(Zn,"prev page"));return be.isValidElement(Hr)?be.cloneElement(Hr,{disabled:!Zr}):Hr}function Bi(pn){var Hr=An(pn,"next",xn(nr,"next page"));return be.isValidElement(Hr)?be.cloneElement(Hr,{disabled:!In}):Hr}function Mi(pn){(pn.type==="click"||pn.keyCode===le.ENTER)&&ii(Vr)}var Pi=null,Ji=je(Ye,{aria:!0,data:!0}),kn=Io&&be.createElement("li",{className:"".concat(Se,"-total-text")},Io(St,[St===0?0:(or-1)*Vt+1,or*Vt>St?St:or*Vt])),To=null,bn=yt(void 0,Vt,St);if(un&&St<=Vt)return null;var Ni=[],ya={rootPrefixCls:Se,onClick:ii,onKeyPress:tn,showTitle:zn,itemRender:An,page:-1},Zt=or-1>0?or-1:0,Jt=or+1<bn?or+1:bn,dn=fn&&fn.goButton,Fn=(0,ae.Z)(Vi)==="object"?Vi.readOnly:!Vi,pr=dn,oi=null;Vi&&(dn&&(typeof dn=="boolean"?pr=be.createElement("button",{type:"button",onClick:Mi,onKeyUp:Mi},lr.jump_to_confirm):pr=be.createElement("span",{onClick:Mi,onKeyUp:Mi},dn),pr=be.createElement("li",{title:zn?"".concat(lr.jump_to).concat(or,"/").concat(bn):null,className:"".concat(Se,"-simple-pager")},pr)),oi=be.createElement("li",{title:zn?"".concat(or,"/").concat(bn):null,className:"".concat(Se,"-simple-pager")},Fn?Vr:be.createElement("input",{type:"text","aria-label":lr.jump_to,value:Vr,disabled:ji,onKeyDown:zi,onKeyUp:sr,onChange:sr,onBlur:dr,size:3}),be.createElement("span",{className:"".concat(Se,"-slash")},"/"),bn));var _r=Wt?1:2;if(bn<=3+_r*2){bn||Ni.push(be.createElement(ht,(0,Ft.Z)({},ya,{key:"noPager",page:1,className:"".concat(Se,"-item-disabled")})));for(var Kn=1;Kn<=bn;Kn+=1)Ni.push(be.createElement(ht,(0,Ft.Z)({},ya,{key:Kn,page:Kn,active:or===Kn})))}else{var Et=Wt?lr.prev_3:lr.prev_5,io=Wt?lr.next_3:lr.next_5,Ir=An(yr,"jump-prev",xn(Lr,"prev page")),gi=An(Nr,"jump-next",xn(Dn,"next page"));On&&(Pi=Ir?be.createElement("li",{title:zn?Et:null,key:"prev",onClick:Ho,tabIndex:0,onKeyDown:xr,className:pe()("".concat(Se,"-jump-prev"),(0,st.Z)({},"".concat(Se,"-jump-prev-custom-icon"),!!Lr))},Ir):null,To=gi?be.createElement("li",{title:zn?io:null,key:"next",onClick:zo,tabIndex:0,onKeyDown:Po,className:pe()("".concat(Se,"-jump-next"),(0,st.Z)({},"".concat(Se,"-jump-next-custom-icon"),!!Dn))},gi):null);var oo=Math.max(1,or-_r),Yi=Math.min(or+_r,bn);or-1<=_r&&(Yi=1+_r*2),bn-or<=_r&&(oo=bn-_r*2);for(var Ki=oo;Ki<=Yi;Ki+=1)Ni.push(be.createElement(ht,(0,Ft.Z)({},ya,{key:Ki,page:Ki,active:or===Ki})));if(or-1>=_r*2&&or!==3&&(Ni[0]=be.cloneElement(Ni[0],{className:pe()("".concat(Se,"-item-after-jump-prev"),Ni[0].props.className)}),Ni.unshift(Pi)),bn-or>=_r*2&&or!==bn-2){var Jo=Ni[Ni.length-1];Ni[Ni.length-1]=be.cloneElement(Jo,{className:pe()("".concat(Se,"-item-before-jump-next"),Jo.props.className)}),Ni.push(To)}oo!==1&&Ni.unshift(be.createElement(ht,(0,Ft.Z)({},ya,{key:1,page:1}))),Yi!==bn&&Ni.push(be.createElement(ht,(0,Ft.Z)({},ya,{key:bn,page:bn})))}var Vo=Li(Zt);if(Vo){var Zi=!Zr||!bn;Vo=be.createElement("li",{title:zn?lr.prev_page:null,onClick:Cr,tabIndex:Zi?null:0,onKeyDown:Xr,className:pe()("".concat(Se,"-prev"),(0,st.Z)({},"".concat(Se,"-disabled"),Zi)),"aria-disabled":Zi},Vo)}var ao=Bi(Jt);if(ao){var Mr,Er;Vi?(Mr=!In,Er=Zr?0:null):(Mr=!In||!bn,Er=Mr?null:0),ao=be.createElement("li",{title:zn?lr.next_page:null,onClick:la,tabIndex:Er,onKeyDown:yi,className:pe()("".concat(Se,"-next"),(0,st.Z)({},"".concat(Se,"-disabled"),Mr)),"aria-disabled":Mr},ao)}var jr=pe()(Se,nt,(0,st.Z)((0,st.Z)((0,st.Z)((0,st.Z)((0,st.Z)({},"".concat(Se,"-start"),hn==="start"),"".concat(Se,"-center"),hn==="center"),"".concat(Se,"-end"),hn==="end"),"".concat(Se,"-simple"),Vi),"".concat(Se,"-disabled"),ji));return be.createElement("ul",(0,Ft.Z)({className:jr,style:ni,ref:Jr},Ji),kn,Vo,Vi?oi:Ni,ao,be.createElement(vt,{locale:lr,rootPrefixCls:Se,disabled:ji,selectPrefixCls:$e,changeSize:Ar,pageSize:Vt,pageSizeOptions:Qe,quickGo:Wi?ii:null,goButton:pr,showSizeChanger:ro,sizeChangerRender:Nn}))},Tt=gt},43579:function(Sn,vn,ot){"use strict";ot.d(vn,{Cd:function(){return Be}});var st=ot(87462),Ft=ot(1413),ae=ot(45987),Ge=ot(67294),Re=ot(94184),fe=ot.n(Re),pe={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},be=function(){var He=(0,Ge.useRef)([]),We=(0,Ge.useRef)(null);return(0,Ge.useEffect)(function(){var at=Date.now(),ft=!1;He.current.forEach(function(mt){if(mt){ft=!0;var Lt=mt.style;Lt.transitionDuration=".3s, .3s, .3s, .06s",We.current&&at-We.current<100&&(Lt.transitionDuration="0s, 0s")}}),ft&&(We.current=Date.now())}),He.current},Ee=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],we=function(He){var We=(0,Ft.Z)((0,Ft.Z)({},pe),He),at=We.className,ft=We.percent,mt=We.prefixCls,Lt=We.strokeColor,Xe=We.strokeLinecap,et=We.strokeWidth,lt=We.style,vt=We.trailColor,wt=We.trailWidth,ht=We.transition,dt=(0,ae.Z)(We,Ee);delete dt.gapPosition;var ut=Array.isArray(ft)?ft:[ft],Pt=Array.isArray(Lt)?Lt:[Lt],yt=be(),gt=et/2,Tt=100-et/2,ct="M ".concat(Xe==="round"?gt:0,",").concat(gt,`
|
|
L `).concat(Xe==="round"?Tt:100,",").concat(gt),Ye="0 0 100 ".concat(et),Ze=0;return Ge.createElement("svg",(0,st.Z)({className:fe()("".concat(mt,"-line"),at),viewBox:Ye,preserveAspectRatio:"none",style:lt},dt),Ge.createElement("path",{className:"".concat(mt,"-line-trail"),d:ct,strokeLinecap:Xe,stroke:vt,strokeWidth:wt||et,fillOpacity:"0"}),ut.map(function(Se,Ne){var $e=1;switch(Xe){case"round":$e=1-et/100;break;case"square":$e=1-et/2/100;break;default:$e=1;break}var nt={strokeDasharray:"".concat(Se*$e,"px, 100px"),strokeDashoffset:"-".concat(Ze,"px"),transition:ht||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ie=Pt[Ne]||Pt[Pt.length-1];return Ze+=Se,Ge.createElement("path",{key:Ne,className:"".concat(mt,"-line-path"),d:ct,strokeLinecap:Xe,stroke:Ie,strokeWidth:et,fillOpacity:"0",ref:function(Ve){yt[Ne]=Ve},style:nt})}))},Te=we,ve=ot(71002),Pe=ot(97685),de=ot(98924),ee=0,z=(0,de.Z)();function oe(){var Je;return z?(Je=ee,ee+=1):Je="TEST_OR_SSR",Je}var ie=function(Je){var He=Ge.useState(),We=(0,Pe.Z)(He,2),at=We[0],ft=We[1];return Ge.useEffect(function(){ft("rc_progress_".concat(oe()))},[]),Je||at},le=function(He){var We=He.bg,at=He.children;return Ge.createElement("div",{style:{width:"100%",height:"100%",background:We}},at)};function ue(Je,He){return Object.keys(Je).map(function(We){var at=parseFloat(We),ft="".concat(Math.floor(at*He),"%");return"".concat(Je[We]," ").concat(ft)})}var me=Ge.forwardRef(function(Je,He){var We=Je.prefixCls,at=Je.color,ft=Je.gradientId,mt=Je.radius,Lt=Je.style,Xe=Je.ptg,et=Je.strokeLinecap,lt=Je.strokeWidth,vt=Je.size,wt=Je.gapDegree,ht=at&&(0,ve.Z)(at)==="object",dt=ht?"#FFF":void 0,ut=vt/2,Pt=Ge.createElement("circle",{className:"".concat(We,"-circle-path"),r:mt,cx:ut,cy:ut,stroke:dt,strokeLinecap:et,strokeWidth:lt,opacity:Xe===0?0:1,style:Lt,ref:He});if(!ht)return Pt;var yt="".concat(ft,"-conic"),gt=wt?"".concat(180+wt/2,"deg"):"0deg",Tt=ue(at,(360-wt)/360),ct=ue(at,1),Ye="conic-gradient(from ".concat(gt,", ").concat(Tt.join(", "),")"),Ze="linear-gradient(to ".concat(wt?"bottom":"top",", ").concat(ct.join(", "),")");return Ge.createElement(Ge.Fragment,null,Ge.createElement("mask",{id:yt},Pt),Ge.createElement("foreignObject",{x:0,y:0,width:vt,height:vt,mask:"url(#".concat(yt,")")},Ge.createElement(le,{bg:Ze},Ge.createElement(le,{bg:Ye}))))}),xe=me,Ae=100,De=function(He,We,at,ft,mt,Lt,Xe,et,lt,vt){var wt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ht=at/100*360*((360-Lt)/360),dt=Lt===0?0:{bottom:0,top:180,left:90,right:-90}[Xe],ut=(100-ft)/100*We;lt==="round"&&ft!==100&&(ut+=vt/2,ut>=We&&(ut=We-.01));var Pt=Ae/2;return{stroke:typeof et=="string"?et:void 0,strokeDasharray:"".concat(We,"px ").concat(He),strokeDashoffset:ut+wt,transform:"rotate(".concat(mt+ht+dt,"deg)"),transformOrigin:"".concat(Pt,"px ").concat(Pt,"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 je(Je){var He=Je!=null?Je:[];return Array.isArray(He)?He:[He]}var Le=function(He){var We=(0,Ft.Z)((0,Ft.Z)({},pe),He),at=We.id,ft=We.prefixCls,mt=We.steps,Lt=We.strokeWidth,Xe=We.trailWidth,et=We.gapDegree,lt=et===void 0?0:et,vt=We.gapPosition,wt=We.trailColor,ht=We.strokeLinecap,dt=We.style,ut=We.className,Pt=We.strokeColor,yt=We.percent,gt=(0,ae.Z)(We,Fe),Tt=Ae/2,ct=ie(at),Ye="".concat(ct,"-gradient"),Ze=Tt-Lt/2,Se=Math.PI*2*Ze,Ne=lt>0?90+lt/2:-90,$e=Se*((360-lt)/360),nt=(0,ve.Z)(mt)==="object"?mt:{count:mt,gap:2},Ie=nt.count,ze=nt.gap,Ve=je(yt),it=je(Pt),St=it.find(function(hn){return hn&&(0,ve.Z)(hn)==="object"}),Ct=St&&(0,ve.Z)(St)==="object",It=Ct?"butt":ht,jt=De(Se,$e,0,100,Ne,lt,vt,wt,It,Lt),Kt=be(),an=function(){var qt=0;return Ve.map(function(On,fn){var Wt=it[fn]||it[it.length-1],Bn=De(Se,$e,qt,On,Ne,lt,vt,Wt,It,Lt);return qt+=On,Ge.createElement(xe,{key:fn,color:Wt,ptg:On,radius:Ze,prefixCls:ft,gradientId:Ye,style:Bn,strokeLinecap:It,strokeWidth:Lt,gapDegree:lt,ref:function(Yn){Kt[fn]=Yn},size:Ae})}).reverse()},un=function(){var qt=Math.round(Ie*(Ve[0]/100)),On=100/Ie,fn=0;return new Array(Ie).fill(null).map(function(Wt,Bn){var zn=Bn<=qt-1?it[0]:wt,Yn=zn&&(0,ve.Z)(zn)==="object"?"url(#".concat(Ye,")"):void 0,fr=De(Se,$e,fn,On,Ne,lt,vt,zn,"butt",Lt,ze);return fn+=($e-fr.strokeDashoffset+ze)*100/$e,Ge.createElement("circle",{key:Bn,className:"".concat(ft,"-circle-path"),r:Ze,cx:Tt,cy:Tt,stroke:Yn,strokeWidth:Lt,opacity:1,style:fr,ref:function(lr){Kt[Bn]=lr}})})};return Ge.createElement("svg",(0,st.Z)({className:fe()("".concat(ft,"-circle"),ut),viewBox:"0 0 ".concat(Ae," ").concat(Ae),style:dt,id:at,role:"presentation"},gt),!Ie&&Ge.createElement("circle",{className:"".concat(ft,"-circle-trail"),r:Ze,cx:Tt,cy:Tt,stroke:wt,strokeLinecap:It,strokeWidth:Xe||Lt,style:jt}),Ie?un():an())},Be=Le,Ue={Line:Te,Circle:Be}},58212:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return Lt}});function st(){return st=Object.assign?Object.assign.bind():function(Xe){for(var et=1;et<arguments.length;et++){var lt=arguments[et];for(var vt in lt)Object.prototype.hasOwnProperty.call(lt,vt)&&(Xe[vt]=lt[vt])}return Xe},st.apply(this,arguments)}function Ft(Xe){"@babel/helpers - typeof";return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},Ft(Xe)}function ae(Xe,et){if(Ft(Xe)!=="object"||Xe===null)return Xe;var lt=Xe[Symbol.toPrimitive];if(lt!==void 0){var vt=lt.call(Xe,et||"default");if(Ft(vt)!=="object")return vt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(Xe)}function Ge(Xe){var et=ae(Xe,"string");return Ft(et)==="symbol"?et:String(et)}function Re(Xe,et,lt){return et=Ge(et),et in Xe?Object.defineProperty(Xe,et,{value:lt,enumerable:!0,configurable:!0,writable:!0}):Xe[et]=lt,Xe}function fe(Xe){if(Array.isArray(Xe))return Xe}function pe(Xe,et){var lt=Xe==null?null:typeof Symbol!="undefined"&&Xe[Symbol.iterator]||Xe["@@iterator"];if(lt!=null){var vt,wt,ht,dt,ut=[],Pt=!0,yt=!1;try{if(ht=(lt=lt.call(Xe)).next,et===0){if(Object(lt)!==lt)return;Pt=!1}else for(;!(Pt=(vt=ht.call(lt)).done)&&(ut.push(vt.value),ut.length!==et);Pt=!0);}catch(gt){yt=!0,wt=gt}finally{try{if(!Pt&<.return!=null&&(dt=lt.return(),Object(dt)!==dt))return}finally{if(yt)throw wt}}return ut}}function be(Xe,et){(et==null||et>Xe.length)&&(et=Xe.length);for(var lt=0,vt=new Array(et);lt<et;lt++)vt[lt]=Xe[lt];return vt}function Ee(Xe,et){if(Xe){if(typeof Xe=="string")return be(Xe,et);var lt=Object.prototype.toString.call(Xe).slice(8,-1);if(lt==="Object"&&Xe.constructor&&(lt=Xe.constructor.name),lt==="Map"||lt==="Set")return Array.from(Xe);if(lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(lt))return be(Xe,et)}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(Xe,et){return fe(Xe)||pe(Xe,et)||Ee(Xe,et)||we()}function ve(Xe,et){if(Xe==null)return{};var lt={},vt=Object.keys(Xe),wt,ht;for(ht=0;ht<vt.length;ht++)wt=vt[ht],!(et.indexOf(wt)>=0)&&(lt[wt]=Xe[wt]);return lt}function Pe(Xe,et){if(Xe==null)return{};var lt=ve(Xe,et),vt,wt;if(Object.getOwnPropertySymbols){var ht=Object.getOwnPropertySymbols(Xe);for(wt=0;wt<ht.length;wt++)vt=ht[wt],!(et.indexOf(vt)>=0)&&Object.prototype.propertyIsEnumerable.call(Xe,vt)&&(lt[vt]=Xe[vt])}return lt}var de=ot(67294),ee=ot(94184),z=ot.n(ee);function oe(Xe){if(Array.isArray(Xe))return Xe}function ie(Xe,et){var lt=Xe==null?null:typeof Symbol!="undefined"&&Xe[Symbol.iterator]||Xe["@@iterator"];if(lt!=null){var vt,wt,ht,dt,ut=[],Pt=!0,yt=!1;try{if(ht=(lt=lt.call(Xe)).next,et===0){if(Object(lt)!==lt)return;Pt=!1}else for(;!(Pt=(vt=ht.call(lt)).done)&&(ut.push(vt.value),ut.length!==et);Pt=!0);}catch(gt){yt=!0,wt=gt}finally{try{if(!Pt&<.return!=null&&(dt=lt.return(),Object(dt)!==dt))return}finally{if(yt)throw wt}}return ut}}function le(Xe,et){(et==null||et>Xe.length)&&(et=Xe.length);for(var lt=0,vt=new Array(et);lt<et;lt++)vt[lt]=Xe[lt];return vt}function ue(Xe,et){if(Xe){if(typeof Xe=="string")return le(Xe,et);var lt=Object.prototype.toString.call(Xe).slice(8,-1);if(lt==="Object"&&Xe.constructor&&(lt=Xe.constructor.name),lt==="Map"||lt==="Set")return Array.from(Xe);if(lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(lt))return le(Xe,et)}}function me(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xe(Xe,et){return oe(Xe)||ie(Xe,et)||ue(Xe,et)||me()}function Ae(Xe){var et=de.useRef();et.current=Xe;var lt=de.useCallback(function(){for(var vt,wt=arguments.length,ht=new Array(wt),dt=0;dt<wt;dt++)ht[dt]=arguments[dt];return(vt=et.current)===null||vt===void 0?void 0:vt.call.apply(vt,[et].concat(ht))},[]);return lt}function De(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Fe=De()?de.useLayoutEffect:de.useEffect,je=function(et,lt){var vt=de.useRef(!0);Fe(function(){return et(vt.current)},lt),Fe(function(){return vt.current=!1,function(){vt.current=!0}},[])},Le=function(et,lt){je(function(vt){if(!vt)return et()},lt)},Be=null;function Ue(Xe){var et=de.useRef(!1),lt=de.useState(Xe),vt=xe(lt,2),wt=vt[0],ht=vt[1];de.useEffect(function(){return et.current=!1,function(){et.current=!0}},[]);function dt(ut,Pt){Pt&&et.current||ht(ut)}return[wt,dt]}function Je(Xe){return Xe!==void 0}function He(Xe,et){var lt=et||{},vt=lt.defaultValue,wt=lt.value,ht=lt.onChange,dt=lt.postState,ut=Ue(function(){return Je(wt)?wt:Je(vt)?typeof vt=="function"?vt():vt:typeof Xe=="function"?Xe():Xe}),Pt=xe(ut,2),yt=Pt[0],gt=Pt[1],Tt=wt!==void 0?wt:yt,ct=dt?dt(Tt):Tt,Ye=Ae(ht),Ze=Ue([Tt]),Se=xe(Ze,2),Ne=Se[0],$e=Se[1];Le(function(){var Ie=Ne[0];yt!==Ie&&Ye(yt,Ie)},[Ne]),Le(function(){Je(wt)||gt(wt)},[wt]);var nt=Ae(function(Ie,ze){gt(Ie,ze),$e([Tt],ze)});return[ct,nt]}var We={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(et){var lt=et.keyCode;if(et.altKey&&!et.ctrlKey||et.metaKey||lt>=We.F1&<<=We.F12)return!1;switch(lt){case We.ALT:case We.CAPS_LOCK:case We.CONTEXT_MENU:case We.CTRL:case We.DOWN:case We.END:case We.ESC:case We.HOME:case We.INSERT:case We.LEFT:case We.MAC_FF_META:case We.META:case We.NUMLOCK:case We.NUM_CENTER:case We.PAGE_DOWN:case We.PAGE_UP:case We.PAUSE:case We.PRINT_SCREEN:case We.RIGHT:case We.SHIFT:case We.UP:case We.WIN_KEY:case We.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(et){if(et>=We.ZERO&&et<=We.NINE||et>=We.NUM_ZERO&&et<=We.NUM_MULTIPLY||et>=We.A&&et<=We.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&et===0)return!0;switch(et){case We.SPACE:case We.QUESTION_MARK:case We.NUM_PLUS:case We.NUM_MINUS:case We.NUM_PERIOD:case We.NUM_DIVISION:case We.SEMICOLON:case We.DASH:case We.EQUALS:case We.COMMA:case We.PERIOD:case We.SLASH:case We.APOSTROPHE:case We.SINGLE_QUOTE:case We.OPEN_SQUARE_BRACKET:case We.BACKSLASH:case We.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},at=We,ft=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],mt=de.forwardRef(function(Xe,et){var lt,vt=Xe.prefixCls,wt=vt===void 0?"rc-switch":vt,ht=Xe.className,dt=Xe.checked,ut=Xe.defaultChecked,Pt=Xe.disabled,yt=Xe.loadingIcon,gt=Xe.checkedChildren,Tt=Xe.unCheckedChildren,ct=Xe.onClick,Ye=Xe.onChange,Ze=Xe.onKeyDown,Se=Pe(Xe,ft),Ne=He(!1,{value:dt,defaultValue:ut}),$e=Te(Ne,2),nt=$e[0],Ie=$e[1];function ze(Ct,It){var jt=nt;return Pt||(jt=Ct,Ie(jt),Ye==null||Ye(jt,It)),jt}function Ve(Ct){Ct.which===at.LEFT?ze(!1,Ct):Ct.which===at.RIGHT&&ze(!0,Ct),Ze==null||Ze(Ct)}function it(Ct){var It=ze(!nt,Ct);ct==null||ct(It,Ct)}var St=z()(wt,ht,(lt={},Re(lt,"".concat(wt,"-checked"),nt),Re(lt,"".concat(wt,"-disabled"),Pt),lt));return de.createElement("button",st({},Se,{type:"button",role:"switch","aria-checked":nt,disabled:Pt,className:St,ref:et,onKeyDown:Ve,onClick:it}),yt,de.createElement("span",{className:"".concat(wt,"-inner")},de.createElement("span",{className:"".concat(wt,"-inner-checked")},gt),de.createElement("span",{className:"".concat(wt,"-inner-unchecked")},Tt)))});mt.displayName="Switch";var Lt=mt},45233:function(Sn,vn,ot){"use strict";ot.d(vn,{R:function(){return Ft},w:function(){return st}});var st={},Ft="rc-table-internal-hook"},54768:function(Sn,vn,ot){"use strict";ot.d(vn,{L:function(){return oe},Z:function(){return xe}});var st=ot(97685),Ft=ot(4942),ae=ot(74902),Ge=ot(71002),Re=ot(1413),fe=ot(45987),pe=ot(63295),be=ot(67294);function Ee(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=[];return be.Children.forEach(Ae,function(je){je==null&&!De.keepEmpty||(Array.isArray(je)?Fe=Fe.concat(Ee(je)):(0,pe.Z)(je)&&je.props?Fe=Fe.concat(Ee(je.props.children,De)):Fe.push(je))}),Fe}var we=ot(40830),Te=ot(45233),ve=ot(62978);function Pe(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof De=="number"?De:De.endsWith("%")?Ae*parseFloat(De)/100:null}function de(Ae,De,Fe){return be.useMemo(function(){if(De&&De>0){var je=0,Le=0;Ae.forEach(function(mt){var Lt=Pe(De,mt.width);Lt?je+=Lt:Le+=1});var Be=Math.max(De,Fe),Ue=Math.max(Be-je,Le),Je=Le,He=Ue/Le,We=0,at=Ae.map(function(mt){var Lt=(0,Re.Z)({},mt),Xe=Pe(De,Lt.width);if(Xe)Lt.width=Xe;else{var et=Math.floor(He);Lt.width=Je===1?Ue:et,Ue-=et,Je-=1}return We+=Lt.width,Lt});if(We<Be){var ft=Be/We;Ue=Be,at.forEach(function(mt,Lt){var Xe=Math.floor(mt.width*ft);mt.width=Lt===at.length-1?Ue:Xe,Ue-=Xe})}return[at,Math.max(We,Be)]}return[Ae,De]},[Ae,De,Fe])}var ee=["children"],z=["fixed"];function oe(Ae){return Ee(Ae).filter(function(De){return be.isValidElement(De)}).map(function(De){var Fe=De.key,je=De.props,Le=je.children,Be=(0,fe.Z)(je,ee),Ue=(0,Re.Z)({key:Fe},Be);return Le&&(Ue.children=oe(Le)),Ue})}function ie(Ae){return Ae.filter(function(De){return De&&(0,Ge.Z)(De)==="object"&&!De.hidden}).map(function(De){var Fe=De.children;return Fe&&Fe.length>0?(0,Re.Z)((0,Re.Z)({},De),{},{children:ie(Fe)}):De})}function le(Ae){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Ae.filter(function(Fe){return Fe&&(0,Ge.Z)(Fe)==="object"}).reduce(function(Fe,je,Le){var Be=je.fixed,Ue=Be===!0?"left":Be,Je="".concat(De,"-").concat(Le),He=je.children;return He&&He.length>0?[].concat((0,ae.Z)(Fe),(0,ae.Z)(le(He,Je).map(function(We){return(0,Re.Z)({fixed:Ue},We)}))):[].concat((0,ae.Z)(Fe),[(0,Re.Z)((0,Re.Z)({key:Je},je),{},{fixed:Ue})])},[])}function ue(Ae){return Ae.map(function(De){var Fe=De.fixed,je=(0,fe.Z)(De,z),Le=Fe;return Fe==="left"?Le="right":Fe==="right"&&(Le="left"),(0,Re.Z)({fixed:Le},je)})}function me(Ae,De){var Fe=Ae.prefixCls,je=Ae.columns,Le=Ae.children,Be=Ae.expandable,Ue=Ae.expandedKeys,Je=Ae.columnTitle,He=Ae.getRowKey,We=Ae.onTriggerExpand,at=Ae.expandIcon,ft=Ae.rowExpandable,mt=Ae.expandIconColumnIndex,Lt=Ae.direction,Xe=Ae.expandRowByClick,et=Ae.columnWidth,lt=Ae.fixed,vt=Ae.scrollWidth,wt=Ae.clientWidth,ht=be.useMemo(function(){var Ze=je||oe(Le)||[];return ie(Ze.slice())},[je,Le]),dt=be.useMemo(function(){if(Be){var Ze=ht.slice();if(!Ze.includes(Te.w)){var Se=mt||0;Se>=0&&(Se||lt==="left"||!lt)&&Ze.splice(Se,0,Te.w),lt==="right"&&Ze.splice(ht.length,0,Te.w)}var Ne=Ze.indexOf(Te.w);Ze=Ze.filter(function(ze,Ve){return ze!==Te.w||Ve===Ne});var $e=ht[Ne],nt;lt?nt=lt:nt=$e?$e.fixed:null;var Ie=(0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)({},ve.v,{className:"".concat(Fe,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Je),"fixed",nt),"className","".concat(Fe,"-row-expand-icon-cell")),"width",et),"render",function(Ve,it,St){var Ct=He(it,St),It=Ue.has(Ct),jt=ft?ft(it):!0,Kt=at({prefixCls:Fe,expanded:It,expandable:jt,record:it,onExpand:We});return Xe?be.createElement("span",{onClick:function(un){return un.stopPropagation()}},Kt):Kt});return Ze.map(function(ze){return ze===Te.w?Ie:ze})}return ht.filter(function(ze){return ze!==Te.w})},[Be,ht,He,Ue,at,Lt]),ut=be.useMemo(function(){var Ze=dt;return De&&(Ze=De(Ze)),Ze.length||(Ze=[{render:function(){return null}}]),Ze},[De,dt,Lt]),Pt=be.useMemo(function(){return Lt==="rtl"?ue(le(ut)):le(ut)},[ut,Lt,vt]),yt=be.useMemo(function(){for(var Ze=-1,Se=Pt.length-1;Se>=0;Se-=1){var Ne=Pt[Se].fixed;if(Ne==="left"||Ne===!0){Ze=Se;break}}if(Ze>=0)for(var $e=0;$e<=Ze;$e+=1){var nt=Pt[$e].fixed;if(nt!=="left"&&nt!==!0)return!0}var Ie=Pt.findIndex(function(it){var St=it.fixed;return St==="right"});if(Ie>=0)for(var ze=Ie;ze<Pt.length;ze+=1){var Ve=Pt[ze].fixed;if(Ve!=="right")return!0}return!1},[Pt]),gt=de(Pt,vt,wt),Tt=(0,st.Z)(gt,2),ct=Tt[0],Ye=Tt[1];return[ut,ct,Ye,yt]}var xe=me},29104:function(Sn,vn,ot){"use strict";ot.d(vn,{w2:function(){return st.w},vP:function(){return Mi.v},RQ:function(){return st.R},ER:function(){return Nn},Q$:function(){return ia},TN:function(){return hh}});var st=ot(45233),Ft=ot(97685),ae=ot(66680),Ge=ot(8410),Re=ot(91881),fe=ot(67294),pe=ot(73935);function be(bt){var Bt=fe.createContext(void 0),Gt=function(Qt){var sn=Qt.value,gn=Qt.children,En=fe.useRef(sn);En.current=sn;var Hn=fe.useState(function(){return{getValue:function(){return En.current},listeners:new Set}}),Rn=(0,Ft.Z)(Hn,1),tr=Rn[0];return(0,Ge.Z)(function(){(0,pe.unstable_batchedUpdates)(function(){tr.listeners.forEach(function(Gn){Gn(sn)})})},[sn]),fe.createElement(Bt.Provider,{value:tr},gn)};return{Context:Bt,Provider:Gt,defaultValue:bt}}function Ee(bt,Bt){var Gt=(0,ae.Z)(typeof Bt=="function"?Bt:function(Gn){if(Bt===void 0)return Gn;if(!Array.isArray(Bt))return Gn[Bt];var $n={};return Bt.forEach(function(Vn){$n[Vn]=Gn[Vn]}),$n}),Ut=fe.useContext(bt==null?void 0:bt.Context),Qt=Ut||{},sn=Qt.listeners,gn=Qt.getValue,En=fe.useRef();En.current=Gt(Ut?gn():bt==null?void 0:bt.defaultValue);var Hn=fe.useState({}),Rn=(0,Ft.Z)(Hn,2),tr=Rn[1];return(0,Ge.Z)(function(){if(!Ut)return;function Gn($n){var Vn=Gt($n);(0,Re.Z)(En.current,Vn,!0)||tr({})}return sn.add(Gn),function(){sn.delete(Gn)}},[Ut]),En.current}var we=ot(87462),Te=ot(42550);function ve(){var bt=fe.createContext(null);function Bt(){return fe.useContext(bt)}function Gt(Qt,sn){var gn=(0,Te.Yr)(Qt),En=function(Rn,tr){var Gn=gn?{ref:tr}:{},$n=fe.useRef(0),Vn=fe.useRef(Rn),hr=Bt();return hr!==null?fe.createElement(Qt,(0,we.Z)({},Rn,Gn)):((!sn||sn(Vn.current,Rn))&&($n.current+=1),Vn.current=Rn,fe.createElement(bt.Provider,{value:$n.current},fe.createElement(Qt,(0,we.Z)({},Rn,Gn))))};return gn?fe.forwardRef(En):En}function Ut(Qt,sn){var gn=(0,Te.Yr)(Qt),En=function(Rn,tr){var Gn=gn?{ref:tr}:{};return Bt(),fe.createElement(Qt,(0,we.Z)({},Rn,Gn))};return gn?fe.memo(fe.forwardRef(En),sn):fe.memo(En,sn)}return{makeImmutable:Gt,responseImmutable:Ut,useImmutableMark:Bt}}var Pe=ve(),de=Pe.makeImmutable,ee=Pe.responseImmutable,z=Pe.useImmutableMark,oe=ve(),ie=oe.makeImmutable,le=oe.responseImmutable,ue=oe.useImmutableMark,me=be(),xe=me;function Ae(bt,Bt){var Gt=React.useRef(0);Gt.current+=1;var Ut=React.useRef(bt),Qt=[];Object.keys(bt||{}).map(function(gn){var En;(bt==null?void 0:bt[gn])!==((En=Ut.current)===null||En===void 0?void 0:En[gn])&&Qt.push(gn)}),Ut.current=bt;var sn=React.useRef([]);return Qt.length&&(sn.current=Qt),React.useDebugValue(Gt.current),React.useDebugValue(sn.current.join(", ")),Bt&&console.log("".concat(Bt,":"),Gt.current,sn.current),Gt.current}var De=null,Fe=null,je=ot(71002),Le=ot(1413),Be=ot(4942),Ue=ot(94184),Je=ot.n(Ue);function He(bt,Bt,Gt){var Ut=fe.useRef({});return(!("value"in Ut.current)||Gt(Ut.current.condition,Bt))&&(Ut.current.value=bt(),Ut.current.condition=Bt),Ut.current.value}var We=ot(40830);function at(bt,Bt){var Gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ut=new Set;function Qt(sn,gn){var En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Hn=Ut.has(sn);if((0,We.ZP)(!Hn,"Warning: There may be circular references"),Hn)return!1;if(sn===gn)return!0;if(Gt&&En>1)return!1;Ut.add(sn);var Rn=En+1;if(Array.isArray(sn)){if(!Array.isArray(gn)||sn.length!==gn.length)return!1;for(var tr=0;tr<sn.length;tr++)if(!Qt(sn[tr],gn[tr],Rn))return!1;return!0}if(sn&&gn&&(0,je.Z)(sn)==="object"&&(0,je.Z)(gn)==="object"){var Gn=Object.keys(sn);return Gn.length!==Object.keys(gn).length?!1:Gn.every(function($n){return Qt(sn[$n],gn[$n],Rn)})}return!1}return Qt(bt,Bt)}var ft=at;function mt(bt,Bt){for(var Gt=bt,Ut=0;Ut<Bt.length;Ut+=1){if(Gt==null)return;Gt=Gt[Bt[Ut]]}return Gt}var Lt=fe.createContext({renderWithProps:!1}),Xe=Lt,et="RC_TABLE_KEY";function lt(bt){return bt==null?[]:Array.isArray(bt)?bt:[bt]}function vt(bt){var Bt=[],Gt={};return bt.forEach(function(Ut){for(var Qt=Ut||{},sn=Qt.key,gn=Qt.dataIndex,En=sn||lt(gn).join("-")||et;Gt[En];)En="".concat(En,"_next");Gt[En]=!0,Bt.push(En)}),Bt}function wt(bt){return bt!=null}function ht(bt){return typeof bt=="number"&&!Number.isNaN(bt)}function dt(bt){return bt&&(0,je.Z)(bt)==="object"&&!Array.isArray(bt)&&!fe.isValidElement(bt)}function ut(bt,Bt,Gt,Ut,Qt,sn){var gn=fe.useContext(Xe),En=ue(),Hn=He(function(){if(wt(Ut))return[Ut];var Rn=Bt==null||Bt===""?[]:Array.isArray(Bt)?Bt:[Bt],tr=mt(bt,Rn),Gn=tr,$n=void 0;if(Qt){var Vn=Qt(tr,bt,Gt);dt(Vn)?(Gn=Vn.children,$n=Vn.props,gn.renderWithProps=!0):Gn=Vn}return[Gn,$n]},[En,bt,Ut,Bt,Qt,Gt],function(Rn,tr){if(sn){var Gn=(0,Ft.Z)(Rn,2),$n=Gn[1],Vn=(0,Ft.Z)(tr,2),hr=Vn[1];return sn(hr,$n)}return gn.renderWithProps?!0:!ft(Rn,tr,!0)});return Hn}function Pt(bt,Bt,Gt,Ut){var Qt=bt+Bt-1;return bt<=Ut&&Qt>=Gt}function yt(bt,Bt){return Ee(xe,function(Gt){var Ut=Pt(bt,Bt||1,Gt.hoverStartRow,Gt.hoverEndRow);return[Ut,Gt.onHover]})}function gt(bt){var Bt=fe.useRef();Bt.current=bt;var Gt=fe.useCallback(function(){for(var Ut,Qt=arguments.length,sn=new Array(Qt),gn=0;gn<Qt;gn++)sn[gn]=arguments[gn];return(Ut=Bt.current)===null||Ut===void 0?void 0:Ut.call.apply(Ut,[Bt].concat(sn))},[]);return Gt}function Tt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ct=Tt()?fe.useLayoutEffect:fe.useEffect,Ye=function(Bt,Gt){var Ut=React.useRef(!0);ct(function(){return Bt(Ut.current)},Gt),ct(function(){return Ut.current=!1,function(){Ut.current=!0}},[])},Ze=function(Bt,Gt){Ye(function(Ut){if(!Ut)return Bt()},Gt)},Se=null;function Ne(bt){var Bt=React.useRef(!1),Gt=React.useState(bt),Ut=_slicedToArray(Gt,2),Qt=Ut[0],sn=Ut[1];React.useEffect(function(){return Bt.current=!1,function(){Bt.current=!0}},[]);function gn(En,Hn){Hn&&Bt.current||sn(En)}return[Qt,gn]}function $e(bt){return bt!==void 0}function nt(bt,Bt){var Gt=Bt||{},Ut=Gt.defaultValue,Qt=Gt.value,sn=Gt.onChange,gn=Gt.postState,En=useState(function(){return $e(Qt)?Qt:$e(Ut)?typeof Ut=="function"?Ut():Ut:typeof bt=="function"?bt():bt}),Hn=_slicedToArray(En,2),Rn=Hn[0],tr=Hn[1],Gn=Qt!==void 0?Qt:Rn,$n=gn?gn(Gn):Gn,Vn=useEvent(sn),hr=useState([Gn]),Tr=_slicedToArray(hr,2),zr=Tr[0],qr=Tr[1];useLayoutUpdateEffect(function(){var Rr=zr[0];Rn!==Rr&&Vn(Rn,Rr)},[zr]),useLayoutUpdateEffect(function(){$e(Qt)||tr(Qt)},[Qt]);var mr=useEvent(function(Rr,kr){tr(Rr,kr),qr([Gn],kr)});return[$n,mr]}var Ie=ot(35110),ze=ot(63295),Ve=Number(fe.version.split(".")[0]),it=function(Bt,Gt){typeof Bt=="function"?Bt(Gt):(0,je.Z)(Bt)==="object"&&Bt&&"current"in Bt&&(Bt.current=Gt)},St=function(){for(var Bt=arguments.length,Gt=new Array(Bt),Ut=0;Ut<Bt;Ut++)Gt[Ut]=arguments[Ut];var Qt=Gt.filter(Boolean);return Qt.length<=1?Qt[0]:function(sn){Gt.forEach(function(gn){it(gn,sn)})}},Ct=function(){for(var Bt=arguments.length,Gt=new Array(Bt),Ut=0;Ut<Bt;Ut++)Gt[Ut]=arguments[Ut];return useMemo(function(){return St.apply(void 0,Gt)},Gt,function(Qt,sn){return Qt.length!==sn.length||Qt.every(function(gn,En){return gn!==sn[En]})})},It=function(Bt){var Gt,Ut;if(!Bt)return!1;if(jt(Bt)&&Ve>=19)return!0;var Qt=isMemo(Bt)?Bt.type.type:Bt.type;return!(typeof Qt=="function"&&!((Gt=Qt.prototype)!==null&&Gt!==void 0&&Gt.render)&&Qt.$$typeof!==ForwardRef||typeof Bt=="function"&&!((Ut=Bt.prototype)!==null&&Ut!==void 0&&Ut.render)&&Bt.$$typeof!==ForwardRef)};function jt(bt){return isValidElement(bt)&&!isFragment(bt)}var Kt=function(Bt){return jt(Bt)&&It(Bt)},an=function(Bt){if(Bt&&jt(Bt)){var Gt=Bt;return Gt.props.propertyIsEnumerable("ref")?Gt.props.ref:Gt.ref}return null};function un(bt,Bt,Gt,Ut){if(!Bt.length)return Gt;var Qt=_toArray(Bt),sn=Qt[0],gn=Qt.slice(1),En;return!bt&&typeof sn=="number"?En=[]:Array.isArray(bt)?En=_toConsumableArray(bt):En=_objectSpread({},bt),Ut&&Gt===void 0&&gn.length===1?delete En[sn][gn[0]]:En[sn]=un(En[sn],gn,Gt,Ut),En}function hn(bt,Bt,Gt){var Ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Bt.length&&Ut&&Gt===void 0&&!get(bt,Bt.slice(0,-1))?bt:un(bt,Bt,Gt,Ut)}function qt(bt){return _typeof(bt)==="object"&&bt!==null&&Object.getPrototypeOf(bt)===Object.prototype}function On(bt){return Array.isArray(bt)?[]:{}}var fn=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Wt(){for(var bt=arguments.length,Bt=new Array(bt),Gt=0;Gt<bt;Gt++)Bt[Gt]=arguments[Gt];var Ut=On(Bt[0]);return Bt.forEach(function(Qt){function sn(gn,En){var Hn=new Set(En),Rn=get(Qt,gn),tr=Array.isArray(Rn);if(tr||qt(Rn)){if(!Hn.has(Rn)){Hn.add(Rn);var Gn=get(Ut,gn);tr?Ut=hn(Ut,gn,[]):(!Gn||_typeof(Gn)!=="object")&&(Ut=hn(Ut,gn,On(Rn))),fn(Rn).forEach(function($n){sn([].concat(_toConsumableArray(gn),[$n]),Hn)})}}else Ut=hn(Ut,gn,Rn)}sn([])}),Ut}var Bn=function(Bt){var Gt=Bt.ellipsis,Ut=Bt.rowType,Qt=Bt.children,sn,gn=Gt===!0?{showTitle:!0}:Gt;return gn&&(gn.showTitle||Ut==="header")&&(typeof Qt=="string"||typeof Qt=="number"?sn=Qt.toString():fe.isValidElement(Qt)&&typeof Qt.props.children=="string"&&(sn=Qt.props.children)),sn};function zn(bt){var Bt,Gt,Ut,Qt,sn,gn,En,Hn,Rn=bt.component,tr=bt.children,Gn=bt.ellipsis,$n=bt.scope,Vn=bt.prefixCls,hr=bt.className,Tr=bt.align,zr=bt.record,qr=bt.render,mr=bt.dataIndex,Rr=bt.renderIndex,kr=bt.shouldCellUpdate,Qr=bt.index,bi=bt.rowType,Yr=bt.colSpan,Xi=bt.rowSpan,Ci=bt.fixLeft,so=bt.fixRight,Wo=bt.firstFixLeft,ho=bt.lastFixLeft,wi=bt.firstFixRight,Ei=bt.lastFixRight,Pr=bt.appendNode,ei=bt.additionalProps,Ai=ei===void 0?{}:ei,Oi=bt.isSticky,Fi="".concat(Vn,"-cell"),So=Ee(xe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Ui=So.supportSticky,Ro=So.allColumnsFixedLeft,Go=So.rowHoverable,aa=ut(zr,mr,Rr,tr,qr,kr),$a=(0,Ft.Z)(aa,2),wa=$a[0],$i=$a[1],xo={},No=typeof Ci=="number"&&Ui,Bo=typeof so=="number"&&Ui;No&&(xo.position="sticky",xo.left=Ci),Bo&&(xo.position="sticky",xo.right=so);var mo=(Bt=(Gt=(Ut=$i==null?void 0:$i.colSpan)!==null&&Ut!==void 0?Ut:Ai.colSpan)!==null&&Gt!==void 0?Gt:Yr)!==null&&Bt!==void 0?Bt:1,ui=(Qt=(sn=(gn=$i==null?void 0:$i.rowSpan)!==null&&gn!==void 0?gn:Ai.rowSpan)!==null&&sn!==void 0?sn:Xi)!==null&&Qt!==void 0?Qt:1,Eo=yt(Qr,ui),Na=(0,Ft.Z)(Eo,2),bs=Na[0],cs=Na[1],Js=gt(function(rs){var Ba;zr&&cs(Qr,Qr+ui-1),Ai==null||(Ba=Ai.onMouseEnter)===null||Ba===void 0||Ba.call(Ai,rs)}),Qs=gt(function(rs){var Ba;zr&&cs(-1,-1),Ai==null||(Ba=Ai.onMouseLeave)===null||Ba===void 0||Ba.call(Ai,rs)});if(mo===0||ui===0)return null;var Ml=(En=Ai.title)!==null&&En!==void 0?En:Bn({rowType:bi,ellipsis:Gn,children:wa}),Ti=Je()(Fi,hr,(Hn={},(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)(Hn,"".concat(Fi,"-fix-left"),No&&Ui),"".concat(Fi,"-fix-left-first"),Wo&&Ui),"".concat(Fi,"-fix-left-last"),ho&&Ui),"".concat(Fi,"-fix-left-all"),ho&&Ro&&Ui),"".concat(Fi,"-fix-right"),Bo&&Ui),"".concat(Fi,"-fix-right-first"),wi&&Ui),"".concat(Fi,"-fix-right-last"),Ei&&Ui),"".concat(Fi,"-ellipsis"),Gn),"".concat(Fi,"-with-append"),Pr),"".concat(Fi,"-fix-sticky"),(No||Bo)&&Oi&&Ui),(0,Be.Z)(Hn,"".concat(Fi,"-row-hover"),!$i&&bs)),Ai.className,$i==null?void 0:$i.className),el={};Tr&&(el.textAlign=Tr);var _o=(0,Le.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({},$i==null?void 0:$i.style),xo),el),Ai.style),Ja=wa;return(0,je.Z)(Ja)==="object"&&!Array.isArray(Ja)&&!fe.isValidElement(Ja)&&(Ja=null),Gn&&(ho||wi)&&(Ja=fe.createElement("span",{className:"".concat(Fi,"-content")},Ja)),fe.createElement(Rn,(0,we.Z)({},$i,Ai,{className:Ti,style:_o,title:Ml,scope:$n,onMouseEnter:Go?Js:void 0,onMouseLeave:Go?Qs:void 0,colSpan:mo!==1?mo:null,rowSpan:ui!==1?ui:null}),Pr,Ja)}var Yn=fe.memo(zn);function fr(bt,Bt,Gt,Ut,Qt){var sn=Gt[bt]||{},gn=Gt[Bt]||{},En,Hn;sn.fixed==="left"?En=Ut.left[Qt==="rtl"?Bt:bt]:gn.fixed==="right"&&(Hn=Ut.right[Qt==="rtl"?bt:Bt]);var Rn=!1,tr=!1,Gn=!1,$n=!1,Vn=Gt[Bt+1],hr=Gt[bt-1],Tr=Vn&&!Vn.fixed||hr&&!hr.fixed||Gt.every(function(kr){return kr.fixed==="left"});if(Qt==="rtl"){if(En!==void 0){var zr=hr&&hr.fixed==="left";$n=!zr&&Tr}else if(Hn!==void 0){var qr=Vn&&Vn.fixed==="right";Gn=!qr&&Tr}}else if(En!==void 0){var mr=Vn&&Vn.fixed==="left";Rn=!mr&&Tr}else if(Hn!==void 0){var Rr=hr&&hr.fixed==="right";tr=!Rr&&Tr}return{fixLeft:En,fixRight:Hn,lastFixLeft:Rn,firstFixRight:tr,lastFixRight:Gn,firstFixLeft:$n,isSticky:Ut.isSticky}}var Gr=fe.createContext({}),lr=Gr;function ni(bt){var Bt=bt.className,Gt=bt.index,Ut=bt.children,Qt=bt.colSpan,sn=Qt===void 0?1:Qt,gn=bt.rowSpan,En=bt.align,Hn=Ee(xe,["prefixCls","direction"]),Rn=Hn.prefixCls,tr=Hn.direction,Gn=fe.useContext(lr),$n=Gn.scrollColumnIndex,Vn=Gn.stickyOffsets,hr=Gn.flattenColumns,Tr=Gt+sn-1,zr=Tr+1===$n?sn+1:sn,qr=fr(Gt,Gt+zr-1,hr,Vn,tr);return fe.createElement(Yn,(0,we.Z)({className:Bt,index:Gt,component:"td",prefixCls:Rn,record:null,dataIndex:null,align:En,colSpan:zr,rowSpan:gn,render:function(){return Ut}},qr))}var ri=ot(45987),ki=["children"];function ji(bt){var Bt=bt.children,Gt=(0,ri.Z)(bt,ki);return fe.createElement("tr",Gt,Bt)}function Vi(bt){var Bt=bt.children;return Bt}Vi.Row=ji,Vi.Cell=ni;var Io=Vi;function Mo(bt){var Bt=bt.children,Gt=bt.stickyOffsets,Ut=bt.flattenColumns,Qt=Ee(xe,"prefixCls"),sn=Ut.length-1,gn=Ut[sn],En=fe.useMemo(function(){return{stickyOffsets:Gt,flattenColumns:Ut,scrollColumnIndex:gn!=null&&gn.scrollbar?sn:null}},[gn,Ut,sn,Gt]);return fe.createElement(lr.Provider,{value:En},fe.createElement("tfoot",{className:"".concat(Qt,"-summary")},Bt))}var ro=le(Mo),Nn=Io,Qe=ot(48555),Pn=function(bt){if(!bt)return!1;if(bt instanceof Element){if(bt.offsetParent)return!0;if(bt.getBBox){var Bt=bt.getBBox(),Gt=Bt.width,Ut=Bt.height;if(Gt||Ut)return!0}if(bt.getBoundingClientRect){var Qt=bt.getBoundingClientRect(),sn=Qt.width,gn=Qt.height;if(sn||gn)return!0}}return!1},An=function(Bt){if(Tt()&&window.document.documentElement){var Gt=Array.isArray(Bt)?Bt:[Bt],Ut=window.document.documentElement;return Gt.some(function(Qt){return Qt in Ut.style})}return!1},Lr=function(Bt,Gt){if(!An(Bt))return!1;var Ut=document.createElement("div"),Qt=Ut.style[Bt];return Ut.style[Bt]=Gt,Ut.style[Bt]!==Qt};function Dn(bt,Bt){return!Array.isArray(bt)&&Bt!==void 0?Lr(bt,Bt):An(bt)}function Zn(bt,Bt){if(!bt)return!1;if(bt.contains)return bt.contains(Bt);for(var Gt=Bt;Gt;){if(Gt===bt)return!0;Gt=Gt.parentNode}return!1}var nr="data-rc-order",Jr="data-rc-priority",nn="rc-util-key",ln=new Map;function Vt(){var bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Bt=bt.mark;return Bt?Bt.startsWith("data-")?Bt:"data-".concat(Bt):nn}function cn(bt){if(bt.attachTo)return bt.attachTo;var Bt=document.querySelector("head");return Bt||document.body}function Qn(bt){return bt==="queue"?"prependQueue":bt?"prepend":"append"}function rr(bt){return Array.from((ln.get(bt)||bt).children).filter(function(Bt){return Bt.tagName==="STYLE"})}function or(bt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Tt())return null;var Gt=Bt.csp,Ut=Bt.prepend,Qt=Bt.priority,sn=Qt===void 0?0:Qt,gn=Qn(Ut),En=gn==="prependQueue",Hn=document.createElement("style");Hn.setAttribute(nr,gn),En&&sn&&Hn.setAttribute(Jr,"".concat(sn)),Gt!=null&&Gt.nonce&&(Hn.nonce=Gt==null?void 0:Gt.nonce),Hn.innerHTML=bt;var Rn=cn(Bt),tr=Rn.firstChild;if(Ut){if(En){var Gn=(Bt.styles||rr(Rn)).filter(function($n){if(!["prepend","prependQueue"].includes($n.getAttribute(nr)))return!1;var Vn=Number($n.getAttribute(Jr)||0);return sn>=Vn});if(Gn.length)return Rn.insertBefore(Hn,Gn[Gn.length-1].nextSibling),Hn}Rn.insertBefore(Hn,tr)}else Rn.appendChild(Hn);return Hn}function en(bt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Gt=cn(Bt);return(Bt.styles||rr(Gt)).find(function(Ut){return Ut.getAttribute(Vt(Bt))===bt})}function Tn(bt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Gt=en(bt,Bt);if(Gt){var Ut=cn(Bt);Ut.removeChild(Gt)}}function Sr(bt,Bt){var Gt=ln.get(bt);if(!Gt||!Zn(document,Gt)){var Ut=or("",Bt),Qt=Ut.parentNode;ln.set(bt,Qt),bt.removeChild(Ut)}}function Vr(){ln.clear()}function Wn(bt,Bt){var Gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ut=cn(Gt),Qt=rr(Ut),sn=(0,Le.Z)((0,Le.Z)({},Gt),{},{styles:Qt});Sr(Ut,sn);var gn=en(Bt,sn);if(gn){var En,Hn;if((En=sn.csp)!==null&&En!==void 0&&En.nonce&&gn.nonce!==((Hn=sn.csp)===null||Hn===void 0?void 0:Hn.nonce)){var Rn;gn.nonce=(Rn=sn.csp)===null||Rn===void 0?void 0:Rn.nonce}return gn.innerHTML!==bt&&(gn.innerHTML=bt),gn}var tr=or(bt,sn);return tr.setAttribute(Vt(sn),Bt),tr}var $t;function cr(bt){var Bt="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),Gt=document.createElement("div");Gt.id=Bt;var Ut=Gt.style;Ut.position="absolute",Ut.left="0",Ut.top="0",Ut.width="100px",Ut.height="100px",Ut.overflow="scroll";var Qt,sn;if(bt){var gn=getComputedStyle(bt);Ut.scrollbarColor=gn.scrollbarColor,Ut.scrollbarWidth=gn.scrollbarWidth;var En=getComputedStyle(bt,"::-webkit-scrollbar"),Hn=parseInt(En.width,10),Rn=parseInt(En.height,10);try{var tr=Hn?"width: ".concat(En.width,";"):"",Gn=Rn?"height: ".concat(En.height,";"):"";Wn(`
|
|
#`.concat(Bt,`::-webkit-scrollbar {
|
|
`).concat(tr,`
|
|
`).concat(Gn,`
|
|
}`),Bt)}catch(hr){console.error(hr),Qt=Hn,sn=Rn}}document.body.appendChild(Gt);var $n=bt&&Qt&&!isNaN(Qt)?Qt:Gt.offsetWidth-Gt.clientWidth,Vn=bt&&sn&&!isNaN(sn)?sn:Gt.offsetHeight-Gt.clientHeight;return document.body.removeChild(Gt),Tn(Bt),{width:$n,height:Vn}}function yr(bt){return typeof document=="undefined"?0:((bt||$t===void 0)&&($t=cr()),$t.width)}function Nr(bt){return typeof document=="undefined"||!bt||!(bt instanceof Element)?{width:0,height:0}:cr(bt)}var xn=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
summary tabIndex target title type useMap value width wmode wrap`,gr=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,hi="".concat(xn," ").concat(gr).split(/[\s\n]+/),Wi="aria-",zi="data-";function sr(bt,Bt){return bt.indexOf(Bt)===0}function dr(bt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Gt;Bt===!1?Gt={aria:!0,data:!0,attr:!0}:Bt===!0?Gt={aria:!0}:Gt=(0,Le.Z)({},Bt);var Ut={};return Object.keys(bt).forEach(function(Qt){(Gt.aria&&(Qt==="role"||sr(Qt,Wi))||Gt.data&&sr(Qt,zi)||Gt.attr&&hi.includes(Qt))&&(Ut[Qt]=bt[Qt])}),Ut}function Ar(bt,Bt,Gt,Ut,Qt,sn,gn){bt.push({record:Bt,indent:Gt,index:gn});var En=sn(Bt),Hn=Qt==null?void 0:Qt.has(En);if(Bt&&Array.isArray(Bt[Ut])&&Hn)for(var Rn=0;Rn<Bt[Ut].length;Rn+=1)Ar(bt,Bt[Ut][Rn],Gt+1,Ut,Qt,sn,Rn)}function ii(bt,Bt,Gt,Ut){var Qt=fe.useMemo(function(){if(Gt!=null&&Gt.size){for(var sn=[],gn=0;gn<(bt==null?void 0:bt.length);gn+=1){var En=bt[gn];Ar(sn,En,0,Bt,Gt,Ut,gn)}return sn}return bt==null?void 0:bt.map(function(Hn,Rn){return{record:Hn,indent:0,index:Rn}})},[bt,Bt,Gt,Ut]);return Qt}function Zr(bt,Bt,Gt,Ut){var Qt=Ee(xe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),sn=Qt.flattenColumns,gn=Qt.expandableType,En=Qt.expandedKeys,Hn=Qt.childrenColumnName,Rn=Qt.onTriggerExpand,tr=Qt.rowExpandable,Gn=Qt.onRow,$n=Qt.expandRowByClick,Vn=Qt.rowClassName,hr=gn==="nest",Tr=gn==="row"&&(!tr||tr(bt)),zr=Tr||hr,qr=En&&En.has(Bt),mr=Hn&&bt&&bt[Hn],Rr=gt(Rn),kr=Gn==null?void 0:Gn(bt,Gt),Qr=kr==null?void 0:kr.onClick,bi=function(so){$n&&zr&&Rn(bt,so);for(var Wo=arguments.length,ho=new Array(Wo>1?Wo-1:0),wi=1;wi<Wo;wi++)ho[wi-1]=arguments[wi];Qr==null||Qr.apply(void 0,[so].concat(ho))},Yr;typeof Vn=="string"?Yr=Vn:typeof Vn=="function"&&(Yr=Vn(bt,Gt,Ut));var Xi=vt(sn);return(0,Le.Z)((0,Le.Z)({},Qt),{},{columnsKey:Xi,nestExpandable:hr,expanded:qr,hasNestChildren:mr,record:bt,onTriggerExpand:Rr,rowSupportExpand:Tr,expandable:zr,rowProps:(0,Le.Z)((0,Le.Z)({},kr),{},{className:Je()(Yr,kr==null?void 0:kr.className),onClick:bi})})}function In(bt){var Bt=bt.prefixCls,Gt=bt.children,Ut=bt.component,Qt=bt.cellComponent,sn=bt.className,gn=bt.expanded,En=bt.colSpan,Hn=bt.isEmpty,Rn=Ee(xe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),tr=Rn.scrollbarSize,Gn=Rn.fixHeader,$n=Rn.fixColumn,Vn=Rn.componentWidth,hr=Rn.horizonScroll,Tr=Gt;return(Hn?hr&&Vn:$n)&&(Tr=fe.createElement("div",{style:{width:Vn-(Gn&&!Hn?tr:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Bt,"-expanded-row-fixed")},Tr)),fe.createElement(Ut,{className:sn,style:{display:gn?null:"none"}},fe.createElement(Yn,{component:Qt,prefixCls:Bt,colSpan:En},Tr))}var Cr=In;function la(bt){var Bt=bt.prefixCls,Gt=bt.record,Ut=bt.onExpand,Qt=bt.expanded,sn=bt.expandable,gn="".concat(Bt,"-row-expand-icon");if(!sn)return fe.createElement("span",{className:Je()(gn,"".concat(Bt,"-row-spaced"))});var En=function(Rn){Ut(Gt,Rn),Rn.stopPropagation()};return fe.createElement("span",{className:Je()(gn,(0,Be.Z)((0,Be.Z)({},"".concat(Bt,"-row-expanded"),Qt),"".concat(Bt,"-row-collapsed"),!Qt)),onClick:En})}function Ho(bt,Bt,Gt){var Ut=[];function Qt(sn){(sn||[]).forEach(function(gn,En){Ut.push(Bt(gn,En)),Qt(gn[Gt])})}return Qt(bt),Ut}function zo(bt,Bt,Gt,Ut){return typeof bt=="string"?bt:typeof bt=="function"?bt(Bt,Gt,Ut):""}function tn(bt,Bt,Gt,Ut,Qt){var sn=bt.record,gn=bt.prefixCls,En=bt.columnsKey,Hn=bt.fixedInfoList,Rn=bt.expandIconColumnIndex,tr=bt.nestExpandable,Gn=bt.indentSize,$n=bt.expandIcon,Vn=bt.expanded,hr=bt.hasNestChildren,Tr=bt.onTriggerExpand,zr=En[Gt],qr=Hn[Gt],mr;Gt===(Rn||0)&&tr&&(mr=fe.createElement(fe.Fragment,null,fe.createElement("span",{style:{paddingLeft:"".concat(Gn*Ut,"px")},className:"".concat(gn,"-row-indent indent-level-").concat(Ut)}),$n({prefixCls:gn,expanded:Vn,expandable:hr,record:sn,onExpand:Tr})));var Rr;return Bt.onCell&&(Rr=Bt.onCell(sn,Qt)),{key:zr,fixedInfo:qr,appendCellNode:mr,additionalCellProps:Rr||{}}}function Xr(bt){var Bt=bt.className,Gt=bt.style,Ut=bt.record,Qt=bt.index,sn=bt.renderIndex,gn=bt.rowKey,En=bt.indent,Hn=En===void 0?0:En,Rn=bt.rowComponent,tr=bt.cellComponent,Gn=bt.scopeCellComponent,$n=Zr(Ut,gn,Qt,Hn),Vn=$n.prefixCls,hr=$n.flattenColumns,Tr=$n.expandedRowClassName,zr=$n.expandedRowRender,qr=$n.rowProps,mr=$n.expanded,Rr=$n.rowSupportExpand,kr=fe.useRef(!1);kr.current||(kr.current=mr);var Qr=zo(Tr,Ut,Qt,Hn),bi=fe.createElement(Rn,(0,we.Z)({},qr,{"data-row-key":gn,className:Je()(Bt,"".concat(Vn,"-row"),"".concat(Vn,"-row-level-").concat(Hn),qr==null?void 0:qr.className,(0,Be.Z)({},Qr,Hn>=1)),style:(0,Le.Z)((0,Le.Z)({},Gt),qr==null?void 0:qr.style)}),hr.map(function(Ci,so){var Wo=Ci.render,ho=Ci.dataIndex,wi=Ci.className,Ei=tn($n,Ci,so,Hn,Qt),Pr=Ei.key,ei=Ei.fixedInfo,Ai=Ei.appendCellNode,Oi=Ei.additionalCellProps;return fe.createElement(Yn,(0,we.Z)({className:wi,ellipsis:Ci.ellipsis,align:Ci.align,scope:Ci.rowScope,component:Ci.rowScope?Gn:tr,prefixCls:Vn,key:Pr,record:Ut,index:Qt,renderIndex:sn,dataIndex:ho,render:Wo,shouldCellUpdate:Ci.shouldCellUpdate},ei,{appendNode:Ai,additionalProps:Oi}))})),Yr;if(Rr&&(kr.current||mr)){var Xi=zr(Ut,Qt,Hn+1,mr);Yr=fe.createElement(Cr,{expanded:mr,className:Je()("".concat(Vn,"-expanded-row"),"".concat(Vn,"-expanded-row-level-").concat(Hn+1),Qr),prefixCls:Vn,component:Rn,cellComponent:tr,colSpan:hr.length,isEmpty:!1},Xi)}return fe.createElement(fe.Fragment,null,bi,Yr)}var yi=le(Xr);function xr(bt){var Bt=bt.columnKey,Gt=bt.onColumnResize,Ut=fe.useRef();return fe.useEffect(function(){Ut.current&&Gt(Bt,Ut.current.offsetWidth)},[]),fe.createElement(Qe.Z,{data:Bt},fe.createElement("td",{ref:Ut,style:{padding:0,border:0,height:0}},fe.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Po(bt){var Bt=bt.prefixCls,Gt=bt.columnsKey,Ut=bt.onColumnResize;return fe.createElement("tr",{"aria-hidden":"true",className:"".concat(Bt,"-measure-row"),style:{height:0,fontSize:0}},fe.createElement(Qe.Z.Collection,{onBatchResize:function(sn){sn.forEach(function(gn){var En=gn.data,Hn=gn.size;Ut(En,Hn.offsetWidth)})}},Gt.map(function(Qt){return fe.createElement(xr,{key:Qt,columnKey:Qt,onColumnResize:Ut})})))}function Li(bt){var Bt=bt.data,Gt=bt.measureColumnWidth,Ut=Ee(xe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Qt=Ut.prefixCls,sn=Ut.getComponent,gn=Ut.onColumnResize,En=Ut.flattenColumns,Hn=Ut.getRowKey,Rn=Ut.expandedKeys,tr=Ut.childrenColumnName,Gn=Ut.emptyNode,$n=ii(Bt,tr,Rn,Hn),Vn=fe.useRef({renderWithProps:!1}),hr=sn(["body","wrapper"],"tbody"),Tr=sn(["body","row"],"tr"),zr=sn(["body","cell"],"td"),qr=sn(["body","cell"],"th"),mr;Bt.length?mr=$n.map(function(kr,Qr){var bi=kr.record,Yr=kr.indent,Xi=kr.index,Ci=Hn(bi,Qr);return fe.createElement(yi,{key:Ci,rowKey:Ci,record:bi,index:Qr,renderIndex:Xi,rowComponent:Tr,cellComponent:zr,scopeCellComponent:qr,indent:Yr})}):mr=fe.createElement(Cr,{expanded:!0,className:"".concat(Qt,"-placeholder"),prefixCls:Qt,component:Tr,cellComponent:zr,colSpan:En.length,isEmpty:!0},Gn);var Rr=vt(En);return fe.createElement(Xe.Provider,{value:Vn.current},fe.createElement(hr,{className:"".concat(Qt,"-tbody")},Gt&&fe.createElement(Po,{prefixCls:Qt,columnsKey:Rr,onColumnResize:gn}),mr))}var Bi=le(Li),Mi=ot(62978),Pi=["columnType"];function Ji(bt){for(var Bt=bt.colWidths,Gt=bt.columns,Ut=bt.columCount,Qt=Ee(xe,["tableLayout"]),sn=Qt.tableLayout,gn=[],En=Ut||Gt.length,Hn=!1,Rn=En-1;Rn>=0;Rn-=1){var tr=Bt[Rn],Gn=Gt&&Gt[Rn],$n=void 0,Vn=void 0;if(Gn&&($n=Gn[Mi.v],sn==="auto"&&(Vn=Gn.minWidth)),tr||Vn||$n||Hn){var hr=$n||{},Tr=hr.columnType,zr=(0,ri.Z)(hr,Pi);gn.unshift(fe.createElement("col",(0,we.Z)({key:Rn,style:{width:tr,minWidth:Vn}},zr))),Hn=!0}}return fe.createElement("colgroup",null,gn)}var kn=Ji,To=ot(74902),bn=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Ni(bt,Bt){return(0,fe.useMemo)(function(){for(var Gt=[],Ut=0;Ut<Bt;Ut+=1){var Qt=bt[Ut];if(Qt!==void 0)Gt[Ut]=Qt;else return null}return Gt},[bt.join("_"),Bt])}var ya=fe.forwardRef(function(bt,Bt){var Gt=bt.className,Ut=bt.noData,Qt=bt.columns,sn=bt.flattenColumns,gn=bt.colWidths,En=bt.columCount,Hn=bt.stickyOffsets,Rn=bt.direction,tr=bt.fixHeader,Gn=bt.stickyTopOffset,$n=bt.stickyBottomOffset,Vn=bt.stickyClassName,hr=bt.onScroll,Tr=bt.maxContentScroll,zr=bt.children,qr=(0,ri.Z)(bt,bn),mr=Ee(xe,["prefixCls","scrollbarSize","isSticky","getComponent"]),Rr=mr.prefixCls,kr=mr.scrollbarSize,Qr=mr.isSticky,bi=mr.getComponent,Yr=bi(["header","table"],"table"),Xi=Qr&&!tr?0:kr,Ci=fe.useRef(null),so=fe.useCallback(function(Oi){it(Bt,Oi),it(Ci,Oi)},[]);fe.useEffect(function(){var Oi;function Fi(So){var Ui=So,Ro=Ui.currentTarget,Go=Ui.deltaX;Go&&(hr({currentTarget:Ro,scrollLeft:Ro.scrollLeft+Go}),So.preventDefault())}return(Oi=Ci.current)===null||Oi===void 0||Oi.addEventListener("wheel",Fi,{passive:!1}),function(){var So;(So=Ci.current)===null||So===void 0||So.removeEventListener("wheel",Fi)}},[]);var Wo=fe.useMemo(function(){return sn.every(function(Oi){return Oi.width})},[sn]),ho=sn[sn.length-1],wi={fixed:ho?ho.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Rr,"-cell-scrollbar")}}},Ei=(0,fe.useMemo)(function(){return Xi?[].concat((0,To.Z)(Qt),[wi]):Qt},[Xi,Qt]),Pr=(0,fe.useMemo)(function(){return Xi?[].concat((0,To.Z)(sn),[wi]):sn},[Xi,sn]),ei=(0,fe.useMemo)(function(){var Oi=Hn.right,Fi=Hn.left;return(0,Le.Z)((0,Le.Z)({},Hn),{},{left:Rn==="rtl"?[].concat((0,To.Z)(Fi.map(function(So){return So+Xi})),[0]):Fi,right:Rn==="rtl"?Oi:[].concat((0,To.Z)(Oi.map(function(So){return So+Xi})),[0]),isSticky:Qr})},[Xi,Hn,Qr]),Ai=Ni(gn,En);return fe.createElement("div",{style:(0,Le.Z)({overflow:"hidden"},Qr?{top:Gn,bottom:$n}:{}),ref:so,className:Je()(Gt,(0,Be.Z)({},Vn,!!Vn))},fe.createElement(Yr,{style:{tableLayout:"fixed",visibility:Ut||Ai?null:"hidden"}},(!Ut||!Tr||Wo)&&fe.createElement(kn,{colWidths:Ai?[].concat((0,To.Z)(Ai),[Xi]):[],columCount:En+1,columns:Pr}),zr((0,Le.Z)((0,Le.Z)({},qr),{},{stickyOffsets:ei,columns:Ei,flattenColumns:Pr}))))}),Zt=fe.memo(ya),Jt=function(Bt){var Gt=Bt.cells,Ut=Bt.stickyOffsets,Qt=Bt.flattenColumns,sn=Bt.rowComponent,gn=Bt.cellComponent,En=Bt.onHeaderRow,Hn=Bt.index,Rn=Ee(xe,["prefixCls","direction"]),tr=Rn.prefixCls,Gn=Rn.direction,$n;En&&($n=En(Gt.map(function(hr){return hr.column}),Hn));var Vn=vt(Gt.map(function(hr){return hr.column}));return fe.createElement(sn,$n,Gt.map(function(hr,Tr){var zr=hr.column,qr=fr(hr.colStart,hr.colEnd,Qt,Ut,Gn),mr;return zr&&zr.onHeaderCell&&(mr=hr.column.onHeaderCell(zr)),fe.createElement(Yn,(0,we.Z)({},hr,{scope:zr.title?hr.colSpan>1?"colgroup":"col":null,ellipsis:zr.ellipsis,align:zr.align,component:gn,prefixCls:tr,key:Vn[Tr]},qr,{additionalProps:mr,rowType:"header"}))}))},dn=Jt;function Fn(bt){var Bt=[];function Gt(gn,En){var Hn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Bt[Hn]=Bt[Hn]||[];var Rn=En,tr=gn.filter(Boolean).map(function(Gn){var $n={key:Gn.key,className:Gn.className||"",children:Gn.title,column:Gn,colStart:Rn},Vn=1,hr=Gn.children;return hr&&hr.length>0&&(Vn=Gt(hr,Rn,Hn+1).reduce(function(Tr,zr){return Tr+zr},0),$n.hasSubColumns=!0),"colSpan"in Gn&&(Vn=Gn.colSpan),"rowSpan"in Gn&&($n.rowSpan=Gn.rowSpan),$n.colSpan=Vn,$n.colEnd=$n.colStart+Vn-1,Bt[Hn].push($n),Rn+=Vn,Vn});return tr}Gt(bt,0);for(var Ut=Bt.length,Qt=function(En){Bt[En].forEach(function(Hn){!("rowSpan"in Hn)&&!Hn.hasSubColumns&&(Hn.rowSpan=Ut-En)})},sn=0;sn<Ut;sn+=1)Qt(sn);return Bt}var pr=function(Bt){var Gt=Bt.stickyOffsets,Ut=Bt.columns,Qt=Bt.flattenColumns,sn=Bt.onHeaderRow,gn=Ee(xe,["prefixCls","getComponent"]),En=gn.prefixCls,Hn=gn.getComponent,Rn=fe.useMemo(function(){return Fn(Ut)},[Ut]),tr=Hn(["header","wrapper"],"thead"),Gn=Hn(["header","row"],"tr"),$n=Hn(["header","cell"],"th");return fe.createElement(tr,{className:"".concat(En,"-thead")},Rn.map(function(Vn,hr){var Tr=fe.createElement(dn,{key:hr,flattenColumns:Qt,cells:Vn,stickyOffsets:Gt,rowComponent:Gn,cellComponent:$n,onHeaderRow:sn,index:hr});return Tr}))},oi=le(pr),_r=ot(54768);function Kn(bt,Bt,Gt){var Ut=(0,Mi.g)(bt),Qt=Ut.expandIcon,sn=Ut.expandedRowKeys,gn=Ut.defaultExpandedRowKeys,En=Ut.defaultExpandAllRows,Hn=Ut.expandedRowRender,Rn=Ut.onExpand,tr=Ut.onExpandedRowsChange,Gn=Ut.childrenColumnName,$n=Qt||la,Vn=Gn||"children",hr=fe.useMemo(function(){return Hn?"row":bt.expandable&&bt.internalHooks===st.R&&bt.expandable.__PARENT_RENDER_ICON__||Bt.some(function(Qr){return Qr&&(0,je.Z)(Qr)==="object"&&Qr[Vn]})?"nest":!1},[!!Hn,Bt]),Tr=fe.useState(function(){return gn||(En?Ho(Bt,Gt,Vn):[])}),zr=(0,Ft.Z)(Tr,2),qr=zr[0],mr=zr[1],Rr=fe.useMemo(function(){return new Set(sn||qr||[])},[sn,qr]),kr=fe.useCallback(function(Qr){var bi=Gt(Qr,Bt.indexOf(Qr)),Yr,Xi=Rr.has(bi);Xi?(Rr.delete(bi),Yr=(0,To.Z)(Rr)):Yr=[].concat((0,To.Z)(Rr),[bi]),mr(Yr),Rn&&Rn(!Xi,Qr),tr&&tr(Yr)},[Gt,Rr,Bt,Rn,tr]);return[Ut,hr,Rr,$n,Vn,kr]}function Et(bt,Bt,Gt){var Ut=bt.map(function(Qt,sn){return fr(sn,sn,bt,Bt,Gt)});return He(function(){return Ut},[Ut],function(Qt,sn){return!ft(Qt,sn)})}function io(bt){var Bt=(0,fe.useRef)(bt),Gt=(0,fe.useState)({}),Ut=(0,Ft.Z)(Gt,2),Qt=Ut[1],sn=(0,fe.useRef)(null),gn=(0,fe.useRef)([]);function En(Hn){gn.current.push(Hn);var Rn=Promise.resolve();sn.current=Rn,Rn.then(function(){if(sn.current===Rn){var tr=gn.current,Gn=Bt.current;gn.current=[],tr.forEach(function($n){Bt.current=$n(Bt.current)}),sn.current=null,Gn!==Bt.current&&Qt({})}})}return(0,fe.useEffect)(function(){return function(){sn.current=null}},[]),[Bt.current,En]}function Ir(bt){var Bt=(0,fe.useRef)(bt||null),Gt=(0,fe.useRef)();function Ut(){window.clearTimeout(Gt.current)}function Qt(gn){Bt.current=gn,Ut(),Gt.current=window.setTimeout(function(){Bt.current=null,Gt.current=void 0},100)}function sn(){return Bt.current}return(0,fe.useEffect)(function(){return Ut},[]),[Qt,sn]}function gi(){var bt=fe.useState(-1),Bt=(0,Ft.Z)(bt,2),Gt=Bt[0],Ut=Bt[1],Qt=fe.useState(-1),sn=(0,Ft.Z)(Qt,2),gn=sn[0],En=sn[1],Hn=fe.useCallback(function(Rn,tr){Ut(Rn),En(tr)},[]);return[Gt,gn,Hn]}var oo=Tt()?window:null;function Yi(bt,Bt){var Gt=(0,je.Z)(bt)==="object"?bt:{},Ut=Gt.offsetHeader,Qt=Ut===void 0?0:Ut,sn=Gt.offsetSummary,gn=sn===void 0?0:sn,En=Gt.offsetScroll,Hn=En===void 0?0:En,Rn=Gt.getContainer,tr=Rn===void 0?function(){return oo}:Rn,Gn=tr()||oo,$n=!!bt;return fe.useMemo(function(){return{isSticky:$n,stickyClassName:$n?"".concat(Bt,"-sticky-holder"):"",offsetHeader:Qt,offsetSummary:gn,offsetScroll:Hn,container:Gn}},[$n,Hn,Qt,gn,Bt,Gn])}function Ki(bt,Bt,Gt){var Ut=(0,fe.useMemo)(function(){var Qt=Bt.length,sn=function(Rn,tr,Gn){for(var $n=[],Vn=0,hr=Rn;hr!==tr;hr+=Gn)$n.push(Vn),Bt[hr].fixed&&(Vn+=bt[hr]||0);return $n},gn=sn(0,Qt,1),En=sn(Qt-1,-1,-1).reverse();return Gt==="rtl"?{left:En,right:gn}:{left:gn,right:En}},[bt,Bt,Gt]);return Ut}var Jo=Ki;function Vo(bt){var Bt=bt.className,Gt=bt.children;return fe.createElement("div",{className:Bt},Gt)}var Zi=Vo;function ao(bt,Bt,Gt,Ut){var Qt=pe.unstable_batchedUpdates?function(gn){pe.unstable_batchedUpdates(Gt,gn)}:Gt;return bt!=null&&bt.addEventListener&&bt.addEventListener(Bt,Qt,Ut),{remove:function(){bt!=null&&bt.removeEventListener&&bt.removeEventListener(Bt,Qt,Ut)}}}var Mr=function(Bt){return+setTimeout(Bt,16)},Er=function(Bt){return clearTimeout(Bt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Mr=function(Bt){return window.requestAnimationFrame(Bt)},Er=function(Bt){return window.cancelAnimationFrame(Bt)});var jr=0,pn=new Map;function Hr(bt){pn.delete(bt)}var pi=function(Bt){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;jr+=1;var Ut=jr;function Qt(sn){if(sn===0)Hr(Ut),Bt();else{var gn=Mr(function(){Qt(sn-1)});pn.set(Ut,gn)}}return Qt(Gt),Ut};pi.cancel=function(bt){var Bt=pn.get(bt);return Hr(bt),Er(Bt)};var vo=pi;function qi(bt){return bt instanceof HTMLElement||bt instanceof SVGElement}function Ao(bt){return bt&&(0,je.Z)(bt)==="object"&&qi(bt.nativeElement)?bt.nativeElement:qi(bt)?bt:null}function $o(bt){var Bt=Ao(bt);if(Bt)return Bt;if(bt instanceof React.Component){var Gt;return(Gt=ReactDOM.findDOMNode)===null||Gt===void 0?void 0:Gt.call(ReactDOM,bt)}return null}function Fa(bt){var Bt=Ao(bt),Gt=Bt.getBoundingClientRect(),Ut=document.documentElement;return{left:Gt.left+(window.pageXOffset||Ut.scrollLeft)-(Ut.clientLeft||document.body.clientLeft||0),top:Gt.top+(window.pageYOffset||Ut.scrollTop)-(Ut.clientTop||document.body.clientTop||0)}}var Sa=function(Bt,Gt){var Ut,Qt,sn=Bt.scrollBodyRef,gn=Bt.onScroll,En=Bt.offsetScroll,Hn=Bt.container,Rn=Bt.direction,tr=Ee(xe,"prefixCls"),Gn=((Ut=sn.current)===null||Ut===void 0?void 0:Ut.scrollWidth)||0,$n=((Qt=sn.current)===null||Qt===void 0?void 0:Qt.clientWidth)||0,Vn=Gn&&$n*($n/Gn),hr=fe.useRef(),Tr=io({scrollLeft:0,isHiddenScrollBar:!0}),zr=(0,Ft.Z)(Tr,2),qr=zr[0],mr=zr[1],Rr=fe.useRef({delta:0,x:0}),kr=fe.useState(!1),Qr=(0,Ft.Z)(kr,2),bi=Qr[0],Yr=Qr[1],Xi=fe.useRef(null);fe.useEffect(function(){return function(){vo.cancel(Xi.current)}},[]);var Ci=function(){Yr(!1)},so=function(Pr){Pr.persist(),Rr.current.delta=Pr.pageX-qr.scrollLeft,Rr.current.x=0,Yr(!0),Pr.preventDefault()},Wo=function(Pr){var ei,Ai=Pr||((ei=window)===null||ei===void 0?void 0:ei.event),Oi=Ai.buttons;if(!bi||Oi===0){bi&&Yr(!1);return}var Fi=Rr.current.x+Pr.pageX-Rr.current.x-Rr.current.delta,So=Rn==="rtl";Fi=Math.max(So?Vn-$n:0,Math.min(So?0:$n-Vn,Fi));var Ui=!So||Math.abs(Fi)+Math.abs(Vn)<$n;Ui&&(gn({scrollLeft:Fi/$n*(Gn+2)}),Rr.current.x=Pr.pageX)},ho=function(){vo.cancel(Xi.current),Xi.current=vo(function(){if(sn.current){var Pr=Fa(sn.current).top,ei=Pr+sn.current.offsetHeight,Ai=Hn===window?document.documentElement.scrollTop+window.innerHeight:Fa(Hn).top+Hn.clientHeight;ei-yr()<=Ai||Pr>=Ai-En?mr(function(Oi){return(0,Le.Z)((0,Le.Z)({},Oi),{},{isHiddenScrollBar:!0})}):mr(function(Oi){return(0,Le.Z)((0,Le.Z)({},Oi),{},{isHiddenScrollBar:!1})})}})},wi=function(Pr){mr(function(ei){return(0,Le.Z)((0,Le.Z)({},ei),{},{scrollLeft:Pr/Gn*$n||0})})};return fe.useImperativeHandle(Gt,function(){return{setScrollLeft:wi,checkScrollBarVisible:ho}}),fe.useEffect(function(){var Ei=ao(document.body,"mouseup",Ci,!1),Pr=ao(document.body,"mousemove",Wo,!1);return ho(),function(){Ei.remove(),Pr.remove()}},[Vn,bi]),fe.useEffect(function(){if(sn.current){for(var Ei=[],Pr=Ao(sn.current);Pr;)Ei.push(Pr),Pr=Pr.parentElement;return Ei.forEach(function(ei){return ei.addEventListener("scroll",ho,!1)}),window.addEventListener("resize",ho,!1),window.addEventListener("scroll",ho,!1),Hn.addEventListener("scroll",ho,!1),function(){Ei.forEach(function(ei){return ei.removeEventListener("scroll",ho)}),window.removeEventListener("resize",ho),window.removeEventListener("scroll",ho),Hn.removeEventListener("scroll",ho)}}},[Hn]),fe.useEffect(function(){qr.isHiddenScrollBar||mr(function(Ei){var Pr=sn.current;return Pr?(0,Le.Z)((0,Le.Z)({},Ei),{},{scrollLeft:Pr.scrollLeft/Pr.scrollWidth*Pr.clientWidth}):Ei})},[qr.isHiddenScrollBar]),Gn<=$n||!Vn||qr.isHiddenScrollBar?null:fe.createElement("div",{style:{height:yr(),width:$n,bottom:En},className:"".concat(tr,"-sticky-scroll")},fe.createElement("div",{onMouseDown:so,ref:hr,className:Je()("".concat(tr,"-sticky-scroll-bar"),(0,Be.Z)({},"".concat(tr,"-sticky-scroll-bar-active"),bi)),style:{width:"".concat(Vn,"px"),transform:"translate3d(".concat(qr.scrollLeft,"px, 0, 0)")}}))},Zs=fe.forwardRef(Sa);function Bs(bt){return null}var on=Bs;function Da(bt){return null}var ts=Da,Bl="rc-table",yo=[],ul={};function hl(){return"No Data"}function bl(bt,Bt){var Gt=(0,Le.Z)({rowKey:"key",prefixCls:Bl,emptyText:hl},bt),Ut=Gt.prefixCls,Qt=Gt.className,sn=Gt.rowClassName,gn=Gt.style,En=Gt.data,Hn=Gt.rowKey,Rn=Gt.scroll,tr=Gt.tableLayout,Gn=Gt.direction,$n=Gt.title,Vn=Gt.footer,hr=Gt.summary,Tr=Gt.caption,zr=Gt.id,qr=Gt.showHeader,mr=Gt.components,Rr=Gt.emptyText,kr=Gt.onRow,Qr=Gt.onHeaderRow,bi=Gt.onScroll,Yr=Gt.internalHooks,Xi=Gt.transformColumns,Ci=Gt.internalRefs,so=Gt.tailor,Wo=Gt.getContainerWidth,ho=Gt.sticky,wi=Gt.rowHoverable,Ei=wi===void 0?!0:wi,Pr=En||yo,ei=!!Pr.length,Ai=Yr===st.R,Oi=fe.useCallback(function(Fo,lo){return mt(mr,Fo)||lo},[mr]),Fi=fe.useMemo(function(){return typeof Hn=="function"?Hn:function(Fo){var lo=Fo&&Fo[Hn];return lo}},[Hn]),So=Oi(["body"]),Ui=gi(),Ro=(0,Ft.Z)(Ui,3),Go=Ro[0],aa=Ro[1],$a=Ro[2],wa=Kn(Gt,Pr,Fi),$i=(0,Ft.Z)(wa,6),xo=$i[0],No=$i[1],Bo=$i[2],mo=$i[3],ui=$i[4],Eo=$i[5],Na=Rn==null?void 0:Rn.x,bs=fe.useState(0),cs=(0,Ft.Z)(bs,2),Js=cs[0],Qs=cs[1],Ml=(0,_r.Z)((0,Le.Z)((0,Le.Z)((0,Le.Z)({},Gt),xo),{},{expandable:!!xo.expandedRowRender,columnTitle:xo.columnTitle,expandedKeys:Bo,getRowKey:Fi,onTriggerExpand:Eo,expandIcon:mo,expandIconColumnIndex:xo.expandIconColumnIndex,direction:Gn,scrollWidth:Ai&&so&&typeof Na=="number"?Na:null,clientWidth:Js}),Ai?Xi:null),Ti=(0,Ft.Z)(Ml,4),el=Ti[0],_o=Ti[1],Ja=Ti[2],rs=Ti[3],Ba=Ja!=null?Ja:Na,Tu=fe.useMemo(function(){return{columns:el,flattenColumns:_o}},[el,_o]),fl=fe.useRef(),_l=fe.useRef(),ga=fe.useRef(),Tl=fe.useRef();fe.useImperativeHandle(Bt,function(){return{nativeElement:fl.current,scrollTo:function(lo){var Va;if(ga.current instanceof HTMLElement){var Ll=lo.index,Es=lo.top,nu=lo.key;if(ht(Es)){var es;(es=ga.current)===null||es===void 0||es.scrollTo({top:Es})}else{var Qu,Pa=nu!=null?nu:Fi(Pr[Ll]);(Qu=ga.current.querySelector('[data-row-key="'.concat(Pa,'"]')))===null||Qu===void 0||Qu.scrollIntoView()}}else(Va=ga.current)!==null&&Va!==void 0&&Va.scrollTo&&ga.current.scrollTo(lo)}}});var Ql=fe.useRef(),ch=fe.useState(!1),sc=(0,Ft.Z)(ch,2),fh=sc[0],fs=sc[1],Lu=fe.useState(!1),is=(0,Ft.Z)(Lu,2),zl=is[0],Nu=is[1],fu=io(new Map),Rh=(0,Ft.Z)(fu,2),dh=Rh[0],lc=Rh[1],Au=vt(_o),Gl=Au.map(function(Fo){return dh.get(Fo)}),ph=fe.useMemo(function(){return Gl},[Gl.join("_")]),ju=Jo(ph,_o,Gn),sa=Rn&&wt(Rn.y),Cs=Rn&&wt(Ba)||!!xo.fixed,ql=Cs&&_o.some(function(Fo){var lo=Fo.fixed;return lo}),du=fe.useRef(),dl=Yi(ho,Ut),ds=dl.isSticky,Bh=dl.offsetHeader,Ih=dl.offsetSummary,Aa=dl.offsetScroll,_h=dl.stickyClassName,pu=dl.container,Qa=fe.useMemo(function(){return hr==null?void 0:hr(Pr)},[hr,Pr]),eu=(sa||ds)&&fe.isValidElement(Qa)&&Qa.type===Io&&Qa.props.fixed,gh,tu,uc;sa&&(tu={overflowY:ei?"scroll":"auto",maxHeight:Rn.y}),Cs&&(gh={overflowX:"auto"},sa||(tu={overflowY:"hidden"}),uc={width:Ba===!0?"auto":Ba,minWidth:"100%"});var Ou=fe.useCallback(function(Fo,lo){Pn(fl.current)&&lc(function(Va){if(Va.get(Fo)!==lo){var Ll=new Map(Va);return Ll.set(Fo,lo),Ll}return Va})},[]),pl=Ir(null),$u=(0,Ft.Z)(pl,2),hc=$u[0],Di=$u[1];function Si(Fo,lo){lo&&(typeof lo=="function"?lo(Fo):lo.scrollLeft!==Fo&&(lo.scrollLeft=Fo,lo.scrollLeft!==Fo&&setTimeout(function(){lo.scrollLeft=Fo},0)))}var fi=gt(function(Fo){var lo=Fo.currentTarget,Va=Fo.scrollLeft,Ll=Gn==="rtl",Es=typeof Va=="number"?Va:lo.scrollLeft,nu=lo||ul;if(!Di()||Di()===nu){var es;hc(nu),Si(Es,_l.current),Si(Es,ga.current),Si(Es,Ql.current),Si(Es,(es=du.current)===null||es===void 0?void 0:es.setScrollLeft)}var Qu=lo||_l.current;if(Qu){var Pa=Ai&&so&&typeof Ba=="number"?Ba:Qu.scrollWidth,Wh=Qu.clientWidth;if(Pa===Wh){fs(!1),Nu(!1);return}Ll?(fs(-Es<Pa-Wh),Nu(-Es>0)):(fs(Es>0),Nu(Es<Pa-Wh))}}),qo=gt(function(Fo){fi(Fo),bi==null||bi(Fo)}),qa=function(){if(Cs&&ga.current){var lo;fi({currentTarget:Ao(ga.current),scrollLeft:(lo=ga.current)===null||lo===void 0?void 0:lo.scrollLeft})}else fs(!1),Nu(!1)},Ju=function(lo){var Va,Ll=lo.width;(Va=du.current)===null||Va===void 0||Va.checkScrollBarVisible();var Es=fl.current?fl.current.offsetWidth:Ll;Ai&&Wo&&fl.current&&(Es=Wo(fl.current,Es)||Es),Es!==Js&&(qa(),Qs(Es))},gu=fe.useRef(!1);fe.useEffect(function(){gu.current&&qa()},[Cs,En,el.length]),fe.useEffect(function(){gu.current=!0},[]);var Xt=fe.useState(0),Fu=(0,Ft.Z)(Xt,2),tl=Fu[0],zh=Fu[1],hd=fe.useState(!0),cd=(0,Ft.Z)(hd,2),kf=cd[0],Wp=cd[1];fe.useEffect(function(){(!so||!Ai)&&(ga.current instanceof Element?zh(Nr(ga.current).width):zh(Nr(Tl.current).width)),Wp(Dn("position","sticky"))},[]),fe.useEffect(function(){Ai&&Ci&&(Ci.body.current=ga.current)});var ps=fe.useCallback(function(Fo){return fe.createElement(fe.Fragment,null,fe.createElement(oi,Fo),eu==="top"&&fe.createElement(ro,Fo,Qa))},[eu,Qa]),Kc=fe.useCallback(function(Fo){return fe.createElement(ro,Fo,Qa)},[Qa]),Mf=Oi(["table"],"table"),Vc=fe.useMemo(function(){return tr||(ql?Ba==="max-content"?"auto":"fixed":sa||ds||_o.some(function(Fo){var lo=Fo.ellipsis;return lo})?"fixed":"auto")},[sa,ql,_o,tr,ds]),Tf,Lf={colWidths:ph,columCount:_o.length,stickyOffsets:ju,onHeaderRow:Qr,fixHeader:sa,scroll:Rn},fd=fe.useMemo(function(){return ei?null:typeof Rr=="function"?Rr():Rr},[ei,Rr]),Nf=fe.createElement(Bi,{data:Pr,measureColumnWidth:sa||Cs||ds}),gl=fe.createElement(kn,{colWidths:_o.map(function(Fo){var lo=Fo.width;return lo}),columns:_o}),Gh=Tr!=null?fe.createElement("caption",{className:"".concat(Ut,"-caption")},Tr):void 0,dd=dr(Gt,{data:!0}),mu=dr(Gt,{aria:!0});if(sa||ds){var Uh;typeof So=="function"?(Uh=So(Pr,{scrollbarSize:tl,ref:ga,onScroll:fi}),Lf.colWidths=_o.map(function(Fo,lo){var Va=Fo.width,Ll=lo===_o.length-1?Va-tl:Va;return typeof Ll=="number"&&!Number.isNaN(Ll)?Ll:0})):Uh=fe.createElement("div",{style:(0,Le.Z)((0,Le.Z)({},gh),tu),onScroll:qo,ref:ga,className:Je()("".concat(Ut,"-body"))},fe.createElement(Mf,(0,we.Z)({style:(0,Le.Z)((0,Le.Z)({},uc),{},{tableLayout:Vc})},mu),Gh,gl,Nf,!eu&&Qa&&fe.createElement(ro,{stickyOffsets:ju,flattenColumns:_o},Qa)));var Zc=(0,Le.Z)((0,Le.Z)((0,Le.Z)({noData:!Pr.length,maxContentScroll:Cs&&Ba==="max-content"},Lf),Tu),{},{direction:Gn,stickyClassName:_h,onScroll:fi});Tf=fe.createElement(fe.Fragment,null,qr!==!1&&fe.createElement(Zt,(0,we.Z)({},Zc,{stickyTopOffset:Bh,className:"".concat(Ut,"-header"),ref:_l}),ps),Uh,eu&&eu!=="top"&&fe.createElement(Zt,(0,we.Z)({},Zc,{stickyBottomOffset:Ih,className:"".concat(Ut,"-summary"),ref:Ql}),Kc),ds&&ga.current&&ga.current instanceof Element&&fe.createElement(Zs,{ref:du,offsetScroll:Aa,scrollBodyRef:ga,onScroll:fi,container:pu,direction:Gn}))}else Tf=fe.createElement("div",{style:(0,Le.Z)((0,Le.Z)({},gh),tu),className:Je()("".concat(Ut,"-content")),onScroll:fi,ref:ga},fe.createElement(Mf,(0,we.Z)({style:(0,Le.Z)((0,Le.Z)({},uc),{},{tableLayout:Vc})},mu),Gh,gl,qr!==!1&&fe.createElement(oi,(0,we.Z)({},Lf,Tu)),Nf,Qa&&fe.createElement(ro,{stickyOffsets:ju,flattenColumns:_o},Qa)));var Hh=fe.createElement("div",(0,we.Z)({className:Je()(Ut,Qt,(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(Ut,"-rtl"),Gn==="rtl"),"".concat(Ut,"-ping-left"),fh),"".concat(Ut,"-ping-right"),zl),"".concat(Ut,"-layout-fixed"),tr==="fixed"),"".concat(Ut,"-fixed-header"),sa),"".concat(Ut,"-fixed-column"),ql),"".concat(Ut,"-fixed-column-gapped"),ql&&rs),"".concat(Ut,"-scroll-horizontal"),Cs),"".concat(Ut,"-has-fix-left"),_o[0]&&_o[0].fixed),"".concat(Ut,"-has-fix-right"),_o[_o.length-1]&&_o[_o.length-1].fixed==="right")),style:gn,id:zr,ref:fl},dd),$n&&fe.createElement(Zi,{className:"".concat(Ut,"-title")},$n(Pr)),fe.createElement("div",{ref:Tl,className:"".concat(Ut,"-container")},Tf),Vn&&fe.createElement(Zi,{className:"".concat(Ut,"-footer")},Vn(Pr)));Cs&&(Hh=fe.createElement(Qe.Z,{onResize:Ju},Hh));var nl=Et(_o,ju,Gn),pd=fe.useMemo(function(){return{scrollX:Ba,prefixCls:Ut,getComponent:Oi,scrollbarSize:tl,direction:Gn,fixedInfoList:nl,isSticky:ds,supportSticky:kf,componentWidth:Js,fixHeader:sa,fixColumn:ql,horizonScroll:Cs,tableLayout:Vc,rowClassName:sn,expandedRowClassName:xo.expandedRowClassName,expandIcon:mo,expandableType:No,expandRowByClick:xo.expandRowByClick,expandedRowRender:xo.expandedRowRender,onTriggerExpand:Eo,expandIconColumnIndex:xo.expandIconColumnIndex,indentSize:xo.indentSize,allColumnsFixedLeft:_o.every(function(Fo){return Fo.fixed==="left"}),emptyNode:fd,columns:el,flattenColumns:_o,onColumnResize:Ou,hoverStartRow:Go,hoverEndRow:aa,onHover:$a,rowExpandable:xo.rowExpandable,onRow:kr,getRowKey:Fi,expandedKeys:Bo,childrenColumnName:ui,rowHoverable:Ei}},[Ba,Ut,Oi,tl,Gn,nl,ds,kf,Js,sa,ql,Cs,Vc,sn,xo.expandedRowClassName,mo,No,xo.expandRowByClick,xo.expandedRowRender,Eo,xo.expandIconColumnIndex,xo.indentSize,fd,el,_o,Ou,Go,aa,$a,xo.rowExpandable,kr,Fi,Bo,ui,Ei]);return fe.createElement(xe.Provider,{value:pd},Hh)}var bo=fe.forwardRef(bl);function ia(bt){return ie(bo,bt)}var mi=ia();mi.EXPAND_COLUMN=st.w,mi.INTERNAL_HOOKS=st.R,mi.Column=on,mi.ColumnGroup=ts,mi.Summary=Nn;var Gi=mi;function Co(bt){var Bt=fe.useRef();Bt.current=bt;var Gt=fe.useCallback(function(){for(var Ut,Qt=arguments.length,sn=new Array(Qt),gn=0;gn<Qt;gn++)sn[gn]=arguments[gn];return(Ut=Bt.current)===null||Ut===void 0?void 0:Ut.call.apply(Ut,[Bt].concat(sn))},[]);return Gt}function Zo(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var wr=Zo()?fe.useLayoutEffect:fe.useEffect,Ku=function(Bt,Gt){var Ut=fe.useRef(!0);wr(function(){return Bt(Ut.current)},Gt),wr(function(){return Ut.current=!1,function(){Ut.current=!0}},[])},Xs=function(Bt,Gt){Ku(function(Ut){if(!Ut)return Bt()},Gt)},xs=Ku;function ic(bt){var Bt=React.useRef(!1),Gt=React.useState(bt),Ut=_slicedToArray(Gt,2),Qt=Ut[0],sn=Ut[1];React.useEffect(function(){return Bt.current=!1,function(){Bt.current=!0}},[]);function gn(En,Hn){Hn&&Bt.current||sn(En)}return[Qt,gn]}function ku(bt){return bt!==void 0}function ar(bt,Bt){var Gt=Bt||{},Ut=Gt.defaultValue,Qt=Gt.value,sn=Gt.onChange,gn=Gt.postState,En=useState(function(){return ku(Qt)?Qt:ku(Ut)?typeof Ut=="function"?Ut():Ut:typeof bt=="function"?bt():bt}),Hn=_slicedToArray(En,2),Rn=Hn[0],tr=Hn[1],Gn=Qt!==void 0?Qt:Rn,$n=gn?gn(Gn):Gn,Vn=useEvent(sn),hr=useState([Gn]),Tr=_slicedToArray(hr,2),zr=Tr[0],qr=Tr[1];useLayoutUpdateEffect(function(){var Rr=zr[0];Rn!==Rr&&Vn(Rn,Rr)},[zr]),useLayoutUpdateEffect(function(){ku(Qt)||tr(Qt)},[Qt]);var mr=useEvent(function(Rr,kr){tr(Rr,kr),qr([Gn],kr)});return[$n,mr]}function ba(bt,Bt,Gt){var Ut=React.useRef({});return(!("value"in Ut.current)||Gt(Ut.current.condition,Bt))&&(Ut.current.value=bt(),Ut.current.condition=Bt),Ut.current.value}function La(bt,Bt){typeof bt=="function"?bt(Bt):_typeof(bt)==="object"&&bt&&"current"in bt&&(bt.current=Bt)}function Cl(){for(var bt=arguments.length,Bt=new Array(bt),Gt=0;Gt<bt;Gt++)Bt[Gt]=arguments[Gt];var Ut=Bt.filter(function(Qt){return Qt});return Ut.length<=1?Ut[0]:function(Qt){Bt.forEach(function(sn){La(sn,Qt)})}}function Ca(){for(var bt=arguments.length,Bt=new Array(bt),Gt=0;Gt<bt;Gt++)Bt[Gt]=arguments[Gt];return useMemo(function(){return Cl.apply(void 0,Bt)},Bt,function(Ut,Qt){return Ut.length!==Qt.length||Ut.every(function(sn,gn){return sn!==Qt[gn]})})}function Xa(bt){var Bt,Gt,Ut=isMemo(bt)?bt.type.type:bt.type;return!(typeof Ut=="function"&&!((Bt=Ut.prototype)!==null&&Bt!==void 0&&Bt.render)||typeof bt=="function"&&!((Gt=bt.prototype)!==null&&Gt!==void 0&&Gt.render))}function vi(bt){return!isValidElement(bt)||isFragment(bt)?!1:Xa(bt)}function Il(bt,Bt,Gt,Ut){if(!Bt.length)return Gt;var Qt=_toArray(Bt),sn=Qt[0],gn=Qt.slice(1),En;return!bt&&typeof sn=="number"?En=[]:Array.isArray(bt)?En=_toConsumableArray(bt):En=_objectSpread({},bt),Ut&&Gt===void 0&&gn.length===1?delete En[sn][gn[0]]:En[sn]=Il(En[sn],gn,Gt,Ut),En}function us(bt,Bt,Gt){var Ut=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Bt.length&&Ut&&Gt===void 0&&!get(bt,Bt.slice(0,-1))?bt:Il(bt,Bt,Gt,Ut)}function hs(bt){return _typeof(bt)==="object"&&bt!==null&&Object.getPrototypeOf(bt)===Object.prototype}function Ys(bt){return Array.isArray(bt)?[]:{}}var lh=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function oc(){for(var bt=arguments.length,Bt=new Array(bt),Gt=0;Gt<bt;Gt++)Bt[Gt]=arguments[Gt];var Ut=Ys(Bt[0]);return Bt.forEach(function(Qt){function sn(gn,En){var Hn=new Set(En),Rn=get(Qt,gn),tr=Array.isArray(Rn);if(tr||hs(Rn)){if(!Hn.has(Rn)){Hn.add(Rn);var Gn=get(Ut,gn);tr?Ut=us(Ut,gn,[]):(!Gn||_typeof(Gn)!=="object")&&(Ut=us(Ut,gn,Ys(Rn))),lh(Rn).forEach(function($n){sn([].concat(_toConsumableArray(gn),[$n]),Hn)})}}else Ut=us(Ut,gn,Rn)}sn([])}),Ut}var Is={},Jl=[],Rc=function(Bt){Jl.push(Bt)};function rd(bt,Bt){if(0)var Gt}function Pf(bt,Bt){if(0)var Gt}function id(){Is={}}function Bc(bt,Bt,Gt){!Bt&&!Is[Gt]&&(bt(!1,Gt),Is[Gt]=!0)}function Ah(bt,Bt){Bc(rd,bt,Bt)}function uh(bt,Bt){Bc(Pf,bt,Bt)}Ah.preMessage=Rc,Ah.resetWarned=id,Ah.noteOnce=uh;var cu=null,Ic=fe.forwardRef(function(bt,Bt){var Gt=bt.height,Ut=bt.offsetY,Qt=bt.offsetX,sn=bt.children,gn=bt.prefixCls,En=bt.onInnerResize,Hn=bt.innerProps,Rn=bt.rtl,tr=bt.extra,Gn={},$n={display:"flex",flexDirection:"column"};return Ut!==void 0&&(Gn={height:Gt,position:"relative",overflow:"hidden"},$n=(0,Le.Z)((0,Le.Z)({},$n),{},(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({transform:"translateY(".concat(Ut,"px)")},Rn?"marginRight":"marginLeft",-Qt),"position","absolute"),"left",0),"right",0),"top",0))),fe.createElement("div",{style:Gn},fe.createElement(Qe.Z,{onResize:function(hr){var Tr=hr.offsetHeight;Tr&&En&&En()}},fe.createElement("div",(0,we.Z)({style:$n,className:Je()((0,Be.Z)({},"".concat(gn,"-holder-inner"),gn)),ref:Bt},Hn),sn,tr)))});Ic.displayName="Filler";var bf=Ic;function od(bt){var Bt=bt.children,Gt=bt.setRef,Ut=fe.useCallback(function(Qt){Gt(Qt)},[]);return fe.cloneElement(Bt,{ref:Ut})}function za(bt,Bt,Gt,Ut,Qt,sn,gn,En){var Hn=En.getKey;return bt.slice(Bt,Gt+1).map(function(Rn,tr){var Gn=Bt+tr,$n=gn(Rn,Gn,{style:{width:Ut},offsetX:Qt}),Vn=Hn(Rn);return fe.createElement(od,{key:Vn,setRef:function(Tr){return sn(Rn,Tr)}},$n)})}function Hp(bt,Bt,Gt,Ut){var Qt=Gt-bt,sn=Bt-Gt,gn=Math.min(Qt,sn)*2;if(Ut<=gn){var En=Math.floor(Ut/2);return Ut%2?Gt+En+1:Gt-En}return Qt>sn?Gt-(Ut-sn):Gt+(Ut-Qt)}function ad(bt,Bt,Gt){var Ut=bt.length,Qt=Bt.length,sn,gn;if(Ut===0&&Qt===0)return null;Ut<Qt?(sn=bt,gn=Bt):(sn=Bt,gn=bt);var En={__EMPTY_ITEM__:!0};function Hn(hr){return hr!==void 0?Gt(hr):En}for(var Rn=null,tr=Math.abs(Ut-Qt)!==1,Gn=0;Gn<gn.length;Gn+=1){var $n=Hn(sn[Gn]),Vn=Hn(gn[Gn]);if($n!==Vn){Rn=Gn,tr=tr||$n!==Hn(gn[Gn+1]);break}}return Rn===null?null:{index:Rn,multiple:tr}}function _c(bt,Bt,Gt){var Ut=fe.useState(bt),Qt=(0,Ft.Z)(Ut,2),sn=Qt[0],gn=Qt[1],En=fe.useState(null),Hn=(0,Ft.Z)(En,2),Rn=Hn[0],tr=Hn[1];return fe.useEffect(function(){var Gn=ad(sn||[],bt||[],Bt);(Gn==null?void 0:Gn.index)!==void 0&&(Gt==null||Gt(Gn.index),tr(bt[Gn.index])),gn(bt)},[bt]),[Rn]}var jh=function(Bt){return+setTimeout(Bt,16)},ws=function(Bt){return clearTimeout(Bt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(jh=function(Bt){return window.requestAnimationFrame(Bt)},ws=function(Bt){return window.cancelAnimationFrame(Bt)});var Ps=0,Wa=new Map;function ns(bt){Wa.delete(bt)}var zc=function(Bt){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ps+=1;var Ut=Ps;function Qt(sn){if(sn===0)ns(Ut),Bt();else{var gn=jh(function(){Qt(sn-1)});Wa.set(Ut,gn)}}return Qt(Gt),Ut};zc.cancel=function(bt){var Bt=Wa.get(bt);return ns(Bt),ws(Bt)};var El=zc,Ea=(typeof navigator=="undefined"?"undefined":(0,je.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Gc=Ea,Uc=function(bt,Bt,Gt,Ut){var Qt=(0,fe.useRef)(!1),sn=(0,fe.useRef)(null);function gn(){clearTimeout(sn.current),Qt.current=!0,sn.current=setTimeout(function(){Qt.current=!1},50)}var En=(0,fe.useRef)({top:bt,bottom:Bt,left:Gt,right:Ut});return En.current.top=bt,En.current.bottom=Bt,En.current.left=Gt,En.current.right=Ut,function(Hn,Rn){var tr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Gn=Hn?Rn<0&&En.current.left||Rn>0&&En.current.right:Rn<0&&En.current.top||Rn>0&&En.current.bottom;return tr&&Gn?(clearTimeout(sn.current),Qt.current=!1):(!Gn||Qt.current)&&gn(),!Qt.current&&Gn}};function Cf(bt,Bt,Gt,Ut,Qt,sn,gn){var En=(0,fe.useRef)(0),Hn=(0,fe.useRef)(null),Rn=(0,fe.useRef)(null),tr=(0,fe.useRef)(!1),Gn=Uc(Bt,Gt,Ut,Qt);function $n(mr,Rr){if(El.cancel(Hn.current),!Gn(!1,Rr)){var kr=mr;if(!kr._virtualHandled)kr._virtualHandled=!0;else return;En.current+=Rr,Rn.current=Rr,Gc||kr.preventDefault(),Hn.current=El(function(){var Qr=tr.current?10:1;gn(En.current*Qr,!1),En.current=0})}}function Vn(mr,Rr){gn(Rr,!0),Gc||mr.preventDefault()}var hr=(0,fe.useRef)(null),Tr=(0,fe.useRef)(null);function zr(mr){if(bt){El.cancel(Tr.current),Tr.current=El(function(){hr.current=null},2);var Rr=mr.deltaX,kr=mr.deltaY,Qr=mr.shiftKey,bi=Rr,Yr=kr;(hr.current==="sx"||!hr.current&&Qr&&kr&&!Rr)&&(bi=kr,Yr=0,hr.current="sx");var Xi=Math.abs(bi),Ci=Math.abs(Yr);hr.current===null&&(hr.current=sn&&Xi>Ci?"x":"y"),hr.current==="y"?$n(mr,Yr):Vn(mr,bi)}}function qr(mr){bt&&(tr.current=mr.detail===Rn.current)}return[zr,qr]}function Wr(bt,Bt,Gt,Ut){var Qt=fe.useMemo(function(){return[new Map,[]]},[bt,Gt.id,Ut]),sn=(0,Ft.Z)(Qt,2),gn=sn[0],En=sn[1],Hn=function(tr){var Gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tr,$n=gn.get(tr),Vn=gn.get(Gn);if($n===void 0||Vn===void 0)for(var hr=bt.length,Tr=En.length;Tr<hr;Tr+=1){var zr,qr=bt[Tr],mr=Bt(qr);gn.set(mr,Tr);var Rr=(zr=Gt.get(mr))!==null&&zr!==void 0?zr:Ut;if(En[Tr]=(En[Tr-1]||0)+Rr,mr===tr&&($n=Tr),mr===Gn&&(Vn=Tr),$n!==void 0&&Vn!==void 0)break}return{top:En[$n-1]||0,bottom:En[Vn]}};return Hn}var sd=ot(15671),Ht=ot(43144),jn=function(){function bt(){(0,sd.Z)(this,bt),(0,Be.Z)(this,"maps",void 0),(0,Be.Z)(this,"id",0),(0,Be.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Ht.Z)(bt,[{key:"set",value:function(Gt,Ut){this.maps[Gt]=Ut,this.id+=1,this.diffKeys.add(Gt)}},{key:"get",value:function(Gt){return this.maps[Gt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),bt}(),Hd=jn;function ld(bt){var Bt=parseFloat(bt);return isNaN(Bt)?0:Bt}function Vu(bt,Bt,Gt){var Ut=fe.useState(0),Qt=(0,Ft.Z)(Ut,2),sn=Qt[0],gn=Qt[1],En=(0,fe.useRef)(new Map),Hn=(0,fe.useRef)(new Hd),Rn=(0,fe.useRef)(0);function tr(){Rn.current+=1}function Gn(){var Vn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;tr();var hr=function(){var qr=!1;En.current.forEach(function(mr,Rr){if(mr&&mr.offsetParent){var kr=mr.offsetHeight,Qr=getComputedStyle(mr),bi=Qr.marginTop,Yr=Qr.marginBottom,Xi=ld(bi),Ci=ld(Yr),so=kr+Xi+Ci;Hn.current.get(Rr)!==so&&(Hn.current.set(Rr,so),qr=!0)}}),qr&&gn(function(mr){return mr+1})};if(Vn)hr();else{Rn.current+=1;var Tr=Rn.current;Promise.resolve().then(function(){Tr===Rn.current&&hr()})}}function $n(Vn,hr){var Tr=bt(Vn),zr=En.current.get(Tr);hr?(En.current.set(Tr,hr),Gn()):En.current.delete(Tr),!zr!=!hr&&(hr?Bt==null||Bt(Vn):Gt==null||Gt(Vn))}return(0,fe.useEffect)(function(){return tr},[]),[$n,Gn,Hn.current,sn]}var Mu=14/15;function Oh(bt,Bt,Gt){var Ut=(0,fe.useRef)(!1),Qt=(0,fe.useRef)(0),sn=(0,fe.useRef)(0),gn=(0,fe.useRef)(null),En=(0,fe.useRef)(null),Hn,Rn=function(Vn){if(Ut.current){var hr=Math.ceil(Vn.touches[0].pageX),Tr=Math.ceil(Vn.touches[0].pageY),zr=Qt.current-hr,qr=sn.current-Tr,mr=Math.abs(zr)>Math.abs(qr);mr?Qt.current=hr:sn.current=Tr;var Rr=Gt(mr,mr?zr:qr,!1,Vn);Rr&&Vn.preventDefault(),clearInterval(En.current),Rr&&(En.current=setInterval(function(){mr?zr*=Mu:qr*=Mu;var kr=Math.floor(mr?zr:qr);(!Gt(mr,kr,!0)||Math.abs(kr)<=.1)&&clearInterval(En.current)},16))}},tr=function(){Ut.current=!1,Hn()},Gn=function(Vn){Hn(),Vn.touches.length===1&&!Ut.current&&(Ut.current=!0,Qt.current=Math.ceil(Vn.touches[0].pageX),sn.current=Math.ceil(Vn.touches[0].pageY),gn.current=Vn.target,gn.current.addEventListener("touchmove",Rn,{passive:!1}),gn.current.addEventListener("touchend",tr,{passive:!0}))};Hn=function(){gn.current&&(gn.current.removeEventListener("touchmove",Rn),gn.current.removeEventListener("touchend",tr))},xs(function(){return bt&&Bt.current.addEventListener("touchstart",Gn,{passive:!0}),function(){var $n;($n=Bt.current)===null||$n===void 0||$n.removeEventListener("touchstart",Gn),Hn(),clearInterval(En.current)}},[bt])}function Hc(bt){return Math.floor(Math.pow(bt,.5))}function Fh(bt,Bt){var Gt="touches"in bt?bt.touches[0]:bt;return Gt[Bt?"pageX":"pageY"]-window[Bt?"scrollX":"scrollY"]}function pa(bt,Bt,Gt){fe.useEffect(function(){var Ut=Bt.current;if(bt&&Ut){var Qt=!1,sn,gn,En=function(){El.cancel(sn)},Hn=function $n(){En(),sn=El(function(){Gt(gn),$n()})},Rn=function(Vn){if(!(Vn.target.draggable||Vn.button!==0)){var hr=Vn;hr._virtualHandled||(hr._virtualHandled=!0,Qt=!0)}},tr=function(){Qt=!1,En()},Gn=function(Vn){if(Qt){var hr=Fh(Vn,!1),Tr=Ut.getBoundingClientRect(),zr=Tr.top,qr=Tr.bottom;if(hr<=zr){var mr=zr-hr;gn=-Hc(mr),Hn()}else if(hr>=qr){var Rr=hr-qr;gn=Hc(Rr),Hn()}else En()}};return Ut.addEventListener("mousedown",Rn),Ut.ownerDocument.addEventListener("mouseup",tr),Ut.ownerDocument.addEventListener("mousemove",Gn),function(){Ut.removeEventListener("mousedown",Rn),Ut.ownerDocument.removeEventListener("mouseup",tr),Ut.ownerDocument.removeEventListener("mousemove",Gn),En()}}},[bt])}var ci=10;function _s(bt,Bt,Gt,Ut,Qt,sn,gn,En){var Hn=fe.useRef(),Rn=fe.useState(null),tr=(0,Ft.Z)(Rn,2),Gn=tr[0],$n=tr[1];return xs(function(){if(Gn&&Gn.times<ci){if(!bt.current){$n(function(Fi){return(0,Le.Z)({},Fi)});return}sn();var Vn=Gn.targetAlign,hr=Gn.originAlign,Tr=Gn.index,zr=Gn.offset,qr=bt.current.clientHeight,mr=!1,Rr=Vn,kr=null;if(qr){for(var Qr=Vn||hr,bi=0,Yr=0,Xi=0,Ci=Math.min(Bt.length-1,Tr),so=0;so<=Ci;so+=1){var Wo=Qt(Bt[so]);Yr=bi;var ho=Gt.get(Wo);Xi=Yr+(ho===void 0?Ut:ho),bi=Xi}for(var wi=Qr==="top"?zr:qr-zr,Ei=Ci;Ei>=0;Ei-=1){var Pr=Qt(Bt[Ei]),ei=Gt.get(Pr);if(ei===void 0){mr=!0;break}if(wi-=ei,wi<=0)break}switch(Qr){case"top":kr=Yr-zr;break;case"bottom":kr=Xi-qr+zr;break;default:{var Ai=bt.current.scrollTop,Oi=Ai+qr;Yr<Ai?Rr="top":Xi>Oi&&(Rr="bottom")}}kr!==null&&gn(kr),kr!==Gn.lastTop&&(mr=!0)}mr&&$n((0,Le.Z)((0,Le.Z)({},Gn),{},{times:Gn.times+1,targetAlign:Rr,lastTop:kr}))}},[Gn,bt.current]),function(Vn){if(Vn==null){En();return}if(El.cancel(Hn.current),typeof Vn=="number")gn(Vn);else if(Vn&&(0,je.Z)(Vn)==="object"){var hr,Tr=Vn.align;"index"in Vn?hr=Vn.index:hr=Bt.findIndex(function(mr){return Qt(mr)===Vn.key});var zr=Vn.offset,qr=zr===void 0?0:zr;$n({times:0,index:hr,offset:qr,originAlign:Tr})}}}var kl=fe.forwardRef(function(bt,Bt){var Gt=bt.prefixCls,Ut=bt.rtl,Qt=bt.scrollOffset,sn=bt.scrollRange,gn=bt.onStartMove,En=bt.onStopMove,Hn=bt.onScroll,Rn=bt.horizontal,tr=bt.spinSize,Gn=bt.containerSize,$n=bt.style,Vn=bt.thumbStyle,hr=bt.showScrollBar,Tr=fe.useState(!1),zr=(0,Ft.Z)(Tr,2),qr=zr[0],mr=zr[1],Rr=fe.useState(null),kr=(0,Ft.Z)(Rr,2),Qr=kr[0],bi=kr[1],Yr=fe.useState(null),Xi=(0,Ft.Z)(Yr,2),Ci=Xi[0],so=Xi[1],Wo=!Ut,ho=fe.useRef(),wi=fe.useRef(),Ei=fe.useState(hr),Pr=(0,Ft.Z)(Ei,2),ei=Pr[0],Ai=Pr[1],Oi=fe.useRef(),Fi=function(){hr===!0||hr===!1||(clearTimeout(Oi.current),Ai(!0),Oi.current=setTimeout(function(){Ai(!1)},3e3))},So=sn-Gn||0,Ui=Gn-tr||0,Ro=fe.useMemo(function(){if(Qt===0||So===0)return 0;var mo=Qt/So;return mo*Ui},[Qt,So,Ui]),Go=function(ui){ui.stopPropagation(),ui.preventDefault()},aa=fe.useRef({top:Ro,dragging:qr,pageY:Qr,startTop:Ci});aa.current={top:Ro,dragging:qr,pageY:Qr,startTop:Ci};var $a=function(ui){mr(!0),bi(Fh(ui,Rn)),so(aa.current.top),gn(),ui.stopPropagation(),ui.preventDefault()};fe.useEffect(function(){var mo=function(bs){bs.preventDefault()},ui=ho.current,Eo=wi.current;return ui.addEventListener("touchstart",mo,{passive:!1}),Eo.addEventListener("touchstart",$a,{passive:!1}),function(){ui.removeEventListener("touchstart",mo),Eo.removeEventListener("touchstart",$a)}},[]);var wa=fe.useRef();wa.current=So;var $i=fe.useRef();$i.current=Ui,fe.useEffect(function(){if(qr){var mo,ui=function(bs){var cs=aa.current,Js=cs.dragging,Qs=cs.pageY,Ml=cs.startTop;El.cancel(mo);var Ti=ho.current.getBoundingClientRect(),el=Gn/(Rn?Ti.width:Ti.height);if(Js){var _o=(Fh(bs,Rn)-Qs)*el,Ja=Ml;!Wo&&Rn?Ja-=_o:Ja+=_o;var rs=wa.current,Ba=$i.current,Tu=Ba?Ja/Ba:0,fl=Math.ceil(Tu*rs);fl=Math.max(fl,0),fl=Math.min(fl,rs),mo=El(function(){Hn(fl,Rn)})}},Eo=function(){mr(!1),En()};return window.addEventListener("mousemove",ui,{passive:!0}),window.addEventListener("touchmove",ui,{passive:!0}),window.addEventListener("mouseup",Eo,{passive:!0}),window.addEventListener("touchend",Eo,{passive:!0}),function(){window.removeEventListener("mousemove",ui),window.removeEventListener("touchmove",ui),window.removeEventListener("mouseup",Eo),window.removeEventListener("touchend",Eo),El.cancel(mo)}}},[qr]),fe.useEffect(function(){return Fi(),function(){clearTimeout(Oi.current)}},[Qt]),fe.useImperativeHandle(Bt,function(){return{delayHidden:Fi}});var xo="".concat(Gt,"-scrollbar"),No={position:"absolute",visibility:ei?null:"hidden"},Bo={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Rn?(No.height=8,No.left=0,No.right=0,No.bottom=0,Bo.height="100%",Bo.width=tr,Wo?Bo.left=Ro:Bo.right=Ro):(No.width=8,No.top=0,No.bottom=0,Wo?No.right=0:No.left=0,Bo.width="100%",Bo.height=tr,Bo.top=Ro),fe.createElement("div",{ref:ho,className:Je()(xo,(0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(xo,"-horizontal"),Rn),"".concat(xo,"-vertical"),!Rn),"".concat(xo,"-visible"),ei)),style:(0,Le.Z)((0,Le.Z)({},No),$n),onMouseDown:Go,onMouseMove:Fi},fe.createElement("div",{ref:wi,className:Je()("".concat(xo,"-thumb"),(0,Be.Z)({},"".concat(xo,"-thumb-moving"),qr)),style:(0,Le.Z)((0,Le.Z)({},Bo),Vn),onMouseDown:$a}))}),ua=kl,eo=20;function Ra(){var bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Gt=bt/Bt*bt;return isNaN(Gt)&&(Gt=0),Gt=Math.max(Gt,eo),Math.floor(Gt)}var $s=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Qo=[],cl={overflowY:"auto",overflowAnchor:"none"};function Ya(bt,Bt){var Gt=bt.prefixCls,Ut=Gt===void 0?"rc-virtual-list":Gt,Qt=bt.className,sn=bt.height,gn=bt.itemHeight,En=bt.fullHeight,Hn=En===void 0?!0:En,Rn=bt.style,tr=bt.data,Gn=bt.children,$n=bt.itemKey,Vn=bt.virtual,hr=bt.direction,Tr=bt.scrollWidth,zr=bt.component,qr=zr===void 0?"div":zr,mr=bt.onScroll,Rr=bt.onVirtualScroll,kr=bt.onVisibleChange,Qr=bt.innerProps,bi=bt.extraRender,Yr=bt.styles,Xi=bt.showScrollBar,Ci=Xi===void 0?"optional":Xi,so=(0,ri.Z)(bt,$s),Wo=fe.useCallback(function(Di){return typeof $n=="function"?$n(Di):Di==null?void 0:Di[$n]},[$n]),ho=Vu(Wo,null,null),wi=(0,Ft.Z)(ho,4),Ei=wi[0],Pr=wi[1],ei=wi[2],Ai=wi[3],Oi=!!(Vn!==!1&&sn&&gn),Fi=fe.useMemo(function(){return Object.values(ei.maps).reduce(function(Di,Si){return Di+Si},0)},[ei.id,ei.maps]),So=Oi&&tr&&(Math.max(gn*tr.length,Fi)>sn||!!Tr),Ui=hr==="rtl",Ro=Je()(Ut,(0,Be.Z)({},"".concat(Ut,"-rtl"),Ui),Qt),Go=tr||Qo,aa=(0,fe.useRef)(),$a=(0,fe.useRef)(),wa=(0,fe.useRef)(),$i=(0,fe.useState)(0),xo=(0,Ft.Z)($i,2),No=xo[0],Bo=xo[1],mo=(0,fe.useState)(0),ui=(0,Ft.Z)(mo,2),Eo=ui[0],Na=ui[1],bs=(0,fe.useState)(!1),cs=(0,Ft.Z)(bs,2),Js=cs[0],Qs=cs[1],Ml=function(){Qs(!0)},Ti=function(){Qs(!1)},el={getKey:Wo};function _o(Di){Bo(function(Si){var fi;typeof Di=="function"?fi=Di(Si):fi=Di;var qo=Au(fi);return aa.current.scrollTop=qo,qo})}var Ja=(0,fe.useRef)({start:0,end:Go.length}),rs=(0,fe.useRef)(),Ba=_c(Go,Wo),Tu=(0,Ft.Z)(Ba,1),fl=Tu[0];rs.current=fl;var _l=fe.useMemo(function(){if(!Oi)return{scrollHeight:void 0,start:0,end:Go.length-1,offset:void 0};if(!So){var Di;return{scrollHeight:((Di=$a.current)===null||Di===void 0?void 0:Di.offsetHeight)||0,start:0,end:Go.length-1,offset:void 0}}for(var Si=0,fi,qo,qa,Ju=Go.length,gu=0;gu<Ju;gu+=1){var Xt=Go[gu],Fu=Wo(Xt),tl=ei.get(Fu),zh=Si+(tl===void 0?gn:tl);zh>=No&&fi===void 0&&(fi=gu,qo=Si),zh>No+sn&&qa===void 0&&(qa=gu),Si=zh}return fi===void 0&&(fi=0,qo=0,qa=Math.ceil(sn/gn)),qa===void 0&&(qa=Go.length-1),qa=Math.min(qa+1,Go.length-1),{scrollHeight:Si,start:fi,end:qa,offset:qo}},[So,Oi,No,Go,Ai,sn]),ga=_l.scrollHeight,Tl=_l.start,Ql=_l.end,ch=_l.offset;Ja.current.start=Tl,Ja.current.end=Ql,fe.useLayoutEffect(function(){var Di=ei.getRecord();if(Di.size===1){var Si=Array.from(Di)[0],fi=Go[Tl];if(fi){var qo=Wo(fi);if(qo===Si){var qa=ei.get(Si),Ju=qa-gn;_o(function(gu){return gu+Ju})}}}ei.resetRecord()},[ga]);var sc=fe.useState({width:0,height:sn}),fh=(0,Ft.Z)(sc,2),fs=fh[0],Lu=fh[1],is=function(Si){Lu({width:Si.offsetWidth,height:Si.offsetHeight})},zl=(0,fe.useRef)(),Nu=(0,fe.useRef)(),fu=fe.useMemo(function(){return Ra(fs.width,Tr)},[fs.width,Tr]),Rh=fe.useMemo(function(){return Ra(fs.height,ga)},[fs.height,ga]),dh=ga-sn,lc=(0,fe.useRef)(dh);lc.current=dh;function Au(Di){var Si=Di;return Number.isNaN(lc.current)||(Si=Math.min(Si,lc.current)),Si=Math.max(Si,0),Si}var Gl=No<=0,ph=No>=dh,ju=Eo<=0,sa=Eo>=Tr,Cs=Uc(Gl,ph,ju,sa),ql=function(){return{x:Ui?-Eo:Eo,y:No}},du=(0,fe.useRef)(ql()),dl=Co(function(Di){if(Rr){var Si=(0,Le.Z)((0,Le.Z)({},ql()),Di);(du.current.x!==Si.x||du.current.y!==Si.y)&&(Rr(Si),du.current=Si)}});function ds(Di,Si){var fi=Di;Si?((0,pe.flushSync)(function(){Na(fi)}),dl()):_o(fi)}function Bh(Di){var Si=Di.currentTarget.scrollTop;Si!==No&&_o(Si),mr==null||mr(Di),dl()}var Ih=function(Si){var fi=Si,qo=Tr?Tr-fs.width:0;return fi=Math.max(fi,0),fi=Math.min(fi,qo),fi},Aa=Co(function(Di,Si){Si?((0,pe.flushSync)(function(){Na(function(fi){var qo=fi+(Ui?-Di:Di);return Ih(qo)})}),dl()):_o(function(fi){var qo=fi+Di;return qo})}),_h=Cf(Oi,Gl,ph,ju,sa,!!Tr,Aa),pu=(0,Ft.Z)(_h,2),Qa=pu[0],eu=pu[1];Oh(Oi,aa,function(Di,Si,fi,qo){var qa=qo;return Cs(Di,Si,fi)?!1:!qa||!qa._virtualHandled?(qa&&(qa._virtualHandled=!0),Qa({preventDefault:function(){},deltaX:Di?Si:0,deltaY:Di?0:Si}),!0):!1}),pa(So,aa,function(Di){_o(function(Si){return Si+Di})}),xs(function(){function Di(fi){var qo=Gl&&fi.detail<0,qa=ph&&fi.detail>0;Oi&&!qo&&!qa&&fi.preventDefault()}var Si=aa.current;return Si.addEventListener("wheel",Qa,{passive:!1}),Si.addEventListener("DOMMouseScroll",eu,{passive:!0}),Si.addEventListener("MozMousePixelScroll",Di,{passive:!1}),function(){Si.removeEventListener("wheel",Qa),Si.removeEventListener("DOMMouseScroll",eu),Si.removeEventListener("MozMousePixelScroll",Di)}},[Oi,Gl,ph]),xs(function(){if(Tr){var Di=Ih(Eo);Na(Di),dl({x:Di})}},[fs.width,Tr]);var gh=function(){var Si,fi;(Si=zl.current)===null||Si===void 0||Si.delayHidden(),(fi=Nu.current)===null||fi===void 0||fi.delayHidden()},tu=_s(aa,Go,ei,gn,Wo,function(){return Pr(!0)},_o,gh);fe.useImperativeHandle(Bt,function(){return{nativeElement:wa.current,getScrollInfo:ql,scrollTo:function(Si){function fi(qo){return qo&&(0,je.Z)(qo)==="object"&&("left"in qo||"top"in qo)}fi(Si)?(Si.left!==void 0&&Na(Ih(Si.left)),tu(Si.top)):tu(Si)}}}),xs(function(){if(kr){var Di=Go.slice(Tl,Ql+1);kr(Di,Go)}},[Tl,Ql,Go]);var uc=Wr(Go,Wo,ei,gn),Ou=bi==null?void 0:bi({start:Tl,end:Ql,virtual:So,offsetX:Eo,offsetY:ch,rtl:Ui,getSize:uc}),pl=za(Go,Tl,Ql,Tr,Eo,Ei,Gn,el),$u=null;sn&&($u=(0,Le.Z)((0,Be.Z)({},Hn?"height":"maxHeight",sn),cl),Oi&&($u.overflowY="hidden",Tr&&($u.overflowX="hidden"),Js&&($u.pointerEvents="none")));var hc={};return Ui&&(hc.dir="rtl"),fe.createElement("div",(0,we.Z)({ref:wa,style:(0,Le.Z)((0,Le.Z)({},Rn),{},{position:"relative"}),className:Ro},hc,so),fe.createElement(Qe.Z,{onResize:is},fe.createElement(qr,{className:"".concat(Ut,"-holder"),style:$u,ref:aa,onScroll:Bh,onMouseEnter:gh},fe.createElement(bf,{prefixCls:Ut,height:ga,offsetX:Eo,offsetY:ch,scrollWidth:Tr,onInnerResize:Pr,ref:$a,innerProps:Qr,rtl:Ui,extra:Ou},pl))),So&&ga>sn&&fe.createElement(ua,{ref:zl,prefixCls:Ut,scrollOffset:No,scrollRange:ga,rtl:Ui,onScroll:ds,onStartMove:Ml,onStopMove:Ti,spinSize:Rh,containerSize:fs.height,style:Yr==null?void 0:Yr.verticalScrollBar,thumbStyle:Yr==null?void 0:Yr.verticalScrollBarThumb,showScrollBar:Ci}),So&&Tr>fs.width&&fe.createElement(ua,{ref:Nu,prefixCls:Ut,scrollOffset:Eo,scrollRange:Tr,rtl:Ui,onScroll:ds,onStartMove:Ml,onStopMove:Ti,spinSize:fu,containerSize:fs.width,horizontal:!0,style:Yr==null?void 0:Yr.horizontalScrollBar,thumbStyle:Yr==null?void 0:Yr.horizontalScrollBarThumb,showScrollBar:Ci}))}var Zu=fe.forwardRef(Ya);Zu.displayName="List";var Lo=Zu,zs=Lo,fo=be(null),Xo=be(null);function oa(bt,Bt,Gt){var Ut=Bt||1;return Gt[bt+Ut]-(Gt[bt]||0)}function xa(bt){var Bt=bt.rowInfo,Gt=bt.column,Ut=bt.colIndex,Qt=bt.indent,sn=bt.index,gn=bt.component,En=bt.renderIndex,Hn=bt.record,Rn=bt.style,tr=bt.className,Gn=bt.inverse,$n=bt.getHeight,Vn=Gt.render,hr=Gt.dataIndex,Tr=Gt.className,zr=Gt.width,qr=Ee(Xo,["columnsOffset"]),mr=qr.columnsOffset,Rr=tn(Bt,Gt,Ut,Qt,sn),kr=Rr.key,Qr=Rr.fixedInfo,bi=Rr.appendCellNode,Yr=Rr.additionalCellProps,Xi=Yr.style,Ci=Yr.colSpan,so=Ci===void 0?1:Ci,Wo=Yr.rowSpan,ho=Wo===void 0?1:Wo,wi=Ut-1,Ei=oa(wi,so,mr),Pr=so>1?zr-Ei:0,ei=(0,Le.Z)((0,Le.Z)((0,Le.Z)({},Xi),Rn),{},{flex:"0 0 ".concat(Ei,"px"),width:"".concat(Ei,"px"),marginRight:Pr,pointerEvents:"auto"}),Ai=fe.useMemo(function(){return Gn?ho<=1:so===0||ho===0||ho>1},[ho,so,Gn]);Ai?ei.visibility="hidden":Gn&&(ei.height=$n==null?void 0:$n(ho));var Oi=Ai?function(){return null}:Vn,Fi={};return(ho===0||so===0)&&(Fi.rowSpan=1,Fi.colSpan=1),fe.createElement(Yn,(0,we.Z)({className:Je()(Tr,tr),ellipsis:Gt.ellipsis,align:Gt.align,scope:Gt.rowScope,component:gn,prefixCls:Bt.prefixCls,key:kr,record:Hn,index:sn,renderIndex:En,dataIndex:hr,render:Oi,shouldCellUpdate:Gt.shouldCellUpdate},Qr,{appendNode:bi,additionalProps:(0,Le.Z)((0,Le.Z)({},Yr),{},{style:ei},Fi)}))}var jo=xa,Dh=["data","index","className","rowKey","style","extra","getHeight"],li=fe.forwardRef(function(bt,Bt){var Gt=bt.data,Ut=bt.index,Qt=bt.className,sn=bt.rowKey,gn=bt.style,En=bt.extra,Hn=bt.getHeight,Rn=(0,ri.Z)(bt,Dh),tr=Gt.record,Gn=Gt.indent,$n=Gt.index,Vn=Ee(xe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),hr=Vn.scrollX,Tr=Vn.flattenColumns,zr=Vn.prefixCls,qr=Vn.fixColumn,mr=Vn.componentWidth,Rr=Ee(fo,["getComponent"]),kr=Rr.getComponent,Qr=Zr(tr,sn,Ut,Gn),bi=kr(["body","row"],"div"),Yr=kr(["body","cell"],"div"),Xi=Qr.rowSupportExpand,Ci=Qr.expanded,so=Qr.rowProps,Wo=Qr.expandedRowRender,ho=Qr.expandedRowClassName,wi;if(Xi&&Ci){var Ei=Wo(tr,Ut,Gn+1,Ci),Pr=zo(ho,tr,Ut,Gn),ei={};qr&&(ei={style:(0,Be.Z)({},"--virtual-width","".concat(mr,"px"))});var Ai="".concat(zr,"-expanded-row-cell");wi=fe.createElement(bi,{className:Je()("".concat(zr,"-expanded-row"),"".concat(zr,"-expanded-row-level-").concat(Gn+1),Pr)},fe.createElement(Yn,{component:Yr,prefixCls:zr,className:Je()(Ai,(0,Be.Z)({},"".concat(Ai,"-fixed"),qr)),additionalProps:ei},Ei))}var Oi=(0,Le.Z)((0,Le.Z)({},gn),{},{width:hr});En&&(Oi.position="absolute",Oi.pointerEvents="none");var Fi=fe.createElement(bi,(0,we.Z)({},so,Rn,{"data-row-key":sn,ref:Xi?null:Bt,className:Je()(Qt,"".concat(zr,"-row"),so==null?void 0:so.className,(0,Be.Z)({},"".concat(zr,"-row-extra"),En)),style:(0,Le.Z)((0,Le.Z)({},Oi),so==null?void 0:so.style)}),Tr.map(function(So,Ui){return fe.createElement(jo,{key:Ui,component:Yr,rowInfo:Qr,column:So,colIndex:Ui,indent:Gn,index:Ut,renderIndex:$n,record:tr,inverse:En,getHeight:Hn})}));return Xi?fe.createElement("div",{ref:Bt},Fi,wi):Fi}),Wd=le(li),po=Wd,Kd=fe.forwardRef(function(bt,Bt){var Gt=bt.data,Ut=bt.onScroll,Qt=Ee(xe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),sn=Qt.flattenColumns,gn=Qt.onColumnResize,En=Qt.getRowKey,Hn=Qt.expandedKeys,Rn=Qt.prefixCls,tr=Qt.childrenColumnName,Gn=Qt.scrollX,$n=Qt.direction,Vn=Ee(fo),hr=Vn.sticky,Tr=Vn.scrollY,zr=Vn.listItemHeight,qr=Vn.getComponent,mr=Vn.onScroll,Rr=fe.useRef(),kr=ii(Gt,tr,Hn,En),Qr=fe.useMemo(function(){var wi=0;return sn.map(function(Ei){var Pr=Ei.width,ei=Ei.key;return wi+=Pr,[ei,Pr,wi]})},[sn]),bi=fe.useMemo(function(){return Qr.map(function(wi){return wi[2]})},[Qr]);fe.useEffect(function(){Qr.forEach(function(wi){var Ei=(0,Ft.Z)(wi,2),Pr=Ei[0],ei=Ei[1];gn(Pr,ei)})},[Qr]),fe.useImperativeHandle(Bt,function(){var wi,Ei={scrollTo:function(ei){var Ai;(Ai=Rr.current)===null||Ai===void 0||Ai.scrollTo(ei)},nativeElement:(wi=Rr.current)===null||wi===void 0?void 0:wi.nativeElement};return Object.defineProperty(Ei,"scrollLeft",{get:function(){var ei;return((ei=Rr.current)===null||ei===void 0?void 0:ei.getScrollInfo().x)||0},set:function(ei){var Ai;(Ai=Rr.current)===null||Ai===void 0||Ai.scrollTo({left:ei})}}),Ei});var Yr=function(Ei,Pr){var ei,Ai=(ei=kr[Pr])===null||ei===void 0?void 0:ei.record,Oi=Ei.onCell;if(Oi){var Fi,So=Oi(Ai,Pr);return(Fi=So==null?void 0:So.rowSpan)!==null&&Fi!==void 0?Fi:1}return 1},Xi=function(Ei){var Pr=Ei.start,ei=Ei.end,Ai=Ei.getSize,Oi=Ei.offsetY;if(ei<0)return null;for(var Fi=sn.filter(function(mo){return Yr(mo,Pr)===0}),So=Pr,Ui=function(ui){if(Fi=Fi.filter(function(Eo){return Yr(Eo,ui)===0}),!Fi.length)return So=ui,1},Ro=Pr;Ro>=0&&!Ui(Ro);Ro-=1);for(var Go=sn.filter(function(mo){return Yr(mo,ei)!==1}),aa=ei,$a=function(ui){if(Go=Go.filter(function(Eo){return Yr(Eo,ui)!==1}),!Go.length)return aa=Math.max(ui-1,ei),1},wa=ei;wa<kr.length&&!$a(wa);wa+=1);for(var $i=[],xo=function(ui){var Eo=kr[ui];if(!Eo)return 1;sn.some(function(Na){return Yr(Na,ui)>1})&&$i.push(ui)},No=So;No<=aa;No+=1)xo(No);var Bo=$i.map(function(mo){var ui=kr[mo],Eo=En(ui.record,mo),Na=function(Js){var Qs=mo+Js-1,Ml=En(kr[Qs].record,Qs),Ti=Ai(Eo,Ml);return Ti.bottom-Ti.top},bs=Ai(Eo);return fe.createElement(po,{key:mo,data:ui,rowKey:Eo,index:mo,style:{top:-Oi+bs.top},extra:!0,getHeight:Na})});return Bo},Ci=fe.useMemo(function(){return{columnsOffset:bi}},[bi]),so="".concat(Rn,"-tbody"),Wo=qr(["body","wrapper"]),ho={};return hr&&(ho.position="sticky",ho.bottom=0,(0,je.Z)(hr)==="object"&&hr.offsetScroll&&(ho.bottom=hr.offsetScroll)),fe.createElement(Xo.Provider,{value:Ci},fe.createElement(zs,{fullHeight:!1,ref:Rr,prefixCls:"".concat(so,"-virtual"),styles:{horizontalScrollBar:ho},className:so,height:Tr,itemHeight:zr||24,data:kr,itemKey:function(Ei){return En(Ei.record)},component:Wo,scrollWidth:Gn,direction:$n,onVirtualScroll:function(Ei){var Pr,ei=Ei.x;Ut({currentTarget:(Pr=Rr.current)===null||Pr===void 0?void 0:Pr.nativeElement,scrollLeft:ei})},onScroll:mr,extraRender:Xi},function(wi,Ei,Pr){var ei=En(wi.record,Ei);return fe.createElement(po,{data:wi,rowKey:ei,index:Ei,style:Pr.style})}))}),ac=le(Kd),Wc=ac,ud=function(Bt,Gt){var Ut=Gt.ref,Qt=Gt.onScroll;return fe.createElement(Wc,{ref:Ut,data:Bt,onScroll:Qt})};function Ef(bt,Bt){var Gt=bt.data,Ut=bt.columns,Qt=bt.scroll,sn=bt.sticky,gn=bt.prefixCls,En=gn===void 0?Bl:gn,Hn=bt.className,Rn=bt.listItemHeight,tr=bt.components,Gn=bt.onScroll,$n=Qt||{},Vn=$n.x,hr=$n.y;typeof Vn!="number"&&(Vn=1),typeof hr!="number"&&(hr=500);var Tr=gt(function(mr,Rr){return mt(tr,mr)||Rr}),zr=gt(Gn),qr=fe.useMemo(function(){return{sticky:sn,scrollY:hr,listItemHeight:Rn,getComponent:Tr,onScroll:zr}},[sn,hr,Rn,Tr,zr]);return fe.createElement(fo.Provider,{value:qr},fe.createElement(Gi,(0,we.Z)({},bt,{className:Je()(Hn,"".concat(En,"-virtual")),scroll:(0,Le.Z)((0,Le.Z)({},Qt),{},{x:Vn}),components:(0,Le.Z)((0,Le.Z)({},tr),{},{body:Gt!=null&&Gt.length?ud:void 0}),columns:Ut,internalHooks:st.R,tailor:!0,ref:Bt})))}var Xu=fe.forwardRef(Ef);function hh(bt){return ie(Xu,bt)}var Oo=hh(),Yu=null},62978:function(Sn,vn,ot){"use strict";ot.d(vn,{g:function(){return fe},v:function(){return Re}});var st=ot(1413),Ft=ot(45987),ae=ot(40830),Ge=["expandable"],Re="RC_TABLE_INTERNAL_COL_DEFINE";function fe(pe){var be=pe.expandable,Ee=(0,Ft.Z)(pe,Ge),we;return"expandable"in pe?we=(0,st.Z)((0,st.Z)({},Ee),be):we=Ee,we.showExpandColumn===!1&&(we.expandIconColumnIndex=-1),we}},63295:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return Re}});var st=ot(71002),Ft=Symbol.for("react.element"),ae=Symbol.for("react.transitional.element"),Ge=Symbol.for("react.fragment");function Re(fe){return fe&&(0,st.Z)(fe)==="object"&&(fe.$$typeof===Ft||fe.$$typeof===ae)&&fe.type===Ge}},40830:function(Sn,vn,ot){"use strict";var st={},Ft=[],ae=function(Te){Ft.push(Te)};function Ge(we,Te){if(0)var ve}function Re(we,Te){if(0)var ve}function fe(){st={}}function pe(we,Te,ve){!Te&&!st[ve]&&(we(!1,ve),st[ve]=!0)}function be(we,Te){pe(Ge,we,Te)}function Ee(we,Te){pe(Re,we,Te)}be.preMessage=ae,be.resetWarned=fe,be.noteOnce=Ee,vn.ZP=be},46762:function(Sn,vn){"use strict";var ot;var st=Symbol.for("react.element"),Ft=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),Re=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),pe=Symbol.for("react.context"),be=Symbol.for("react.server_context"),Ee=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),ee;ee=Symbol.for("react.module.reference");function z(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case st:switch(oe=oe.type,oe){case ae:case Re:case Ge:case we:case Te:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case be:case pe:case Ee:case Pe:case ve:case fe:return oe;default:return ie}}case Ft:return ie}}}ot=pe,ot=fe,ot=st,ot=Ee,ot=ae,ot=Pe,ot=ve,ot=Ft,ot=Re,ot=Ge,ot=we,ot=Te,ot=function(){return!1},ot=function(){return!1},ot=function(oe){return z(oe)===pe},ot=function(oe){return z(oe)===fe},ot=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===st},ot=function(oe){return z(oe)===Ee},ot=function(oe){return z(oe)===ae},ot=function(oe){return z(oe)===Pe},ot=function(oe){return z(oe)===ve},ot=function(oe){return z(oe)===Ft},ot=function(oe){return z(oe)===Re},ot=function(oe){return z(oe)===Ge},ot=function(oe){return z(oe)===we},ot=function(oe){return z(oe)===Te},ot=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===ae||oe===Re||oe===Ge||oe===we||oe===Te||oe===de||typeof oe=="object"&&oe!==null&&(oe.$$typeof===Pe||oe.$$typeof===ve||oe.$$typeof===fe||oe.$$typeof===pe||oe.$$typeof===Ee||oe.$$typeof===ee||oe.getModuleId!==void 0)},ot=z},35110:function(Sn,vn,ot){"use strict";ot(46762)},86128:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return ue}});var st=ot(87462),Ft=ot(4942),ae=ot(1413),Ge=ot(97685),Re=ot(45987),fe=ot(67294),pe=ot(94184),be=ot.n(pe),Ee=ot(64217),we=ot(27822),Te=function(xe){for(var Ae=xe.prefixCls,De=xe.level,Fe=xe.isStart,je=xe.isEnd,Le="".concat(Ae,"-indent-unit"),Be=[],Ue=0;Ue<De;Ue+=1)Be.push(fe.createElement("span",{key:Ue,className:be()(Le,(0,Ft.Z)((0,Ft.Z)({},"".concat(Le,"-start"),Fe[Ue]),"".concat(Le,"-end"),je[Ue]))}));return fe.createElement("span",{"aria-hidden":"true",className:"".concat(Ae,"-indent")},Be)},ve=fe.memo(Te),Pe=ot(35381),de=ot(1089),ee=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],z="open",oe="close",ie="---",le=function(xe){var Ae,De,Fe,je=xe.eventKey,Le=xe.className,Be=xe.style,Ue=xe.dragOver,Je=xe.dragOverGapTop,He=xe.dragOverGapBottom,We=xe.isLeaf,at=xe.isStart,ft=xe.isEnd,mt=xe.expanded,Lt=xe.selected,Xe=xe.checked,et=xe.halfChecked,lt=xe.loading,vt=xe.domRef,wt=xe.active,ht=xe.data,dt=xe.onMouseMove,ut=xe.selectable,Pt=(0,Re.Z)(xe,ee),yt=fe.useContext(we.k),gt=fe.useContext(we.y),Tt=fe.useRef(null),ct=fe.useState(!1),Ye=(0,Ge.Z)(ct,2),Ze=Ye[0],Se=Ye[1],Ne=!!(yt.disabled||xe.disabled||(Ae=gt.nodeDisabled)!==null&&Ae!==void 0&&Ae.call(gt,ht)),$e=fe.useMemo(function(){return!yt.checkable||xe.checkable===!1?!1:yt.checkable},[yt.checkable,xe.checkable]),nt=function(An){Ne||yt.onNodeSelect(An,(0,de.F)(xe))},Ie=function(An){Ne||!$e||xe.disableCheckbox||yt.onNodeCheck(An,(0,de.F)(xe),!Xe)},ze=fe.useMemo(function(){return typeof ut=="boolean"?ut:yt.selectable},[ut,yt.selectable]),Ve=function(An){yt.onNodeClick(An,(0,de.F)(xe)),ze?nt(An):Ie(An)},it=function(An){yt.onNodeDoubleClick(An,(0,de.F)(xe))},St=function(An){yt.onNodeMouseEnter(An,(0,de.F)(xe))},Ct=function(An){yt.onNodeMouseLeave(An,(0,de.F)(xe))},It=function(An){yt.onNodeContextMenu(An,(0,de.F)(xe))},jt=fe.useMemo(function(){return!!(yt.draggable&&(!yt.draggable.nodeDraggable||yt.draggable.nodeDraggable(ht)))},[yt.draggable,ht]),Kt=function(An){An.stopPropagation(),Se(!0),yt.onNodeDragStart(An,xe);try{An.dataTransfer.setData("text/plain","")}catch(Lr){}},an=function(An){An.preventDefault(),An.stopPropagation(),yt.onNodeDragEnter(An,xe)},un=function(An){An.preventDefault(),An.stopPropagation(),yt.onNodeDragOver(An,xe)},hn=function(An){An.stopPropagation(),yt.onNodeDragLeave(An,xe)},qt=function(An){An.stopPropagation(),Se(!1),yt.onNodeDragEnd(An,xe)},On=function(An){An.preventDefault(),An.stopPropagation(),Se(!1),yt.onNodeDrop(An,xe)},fn=function(An){lt||yt.onNodeExpand(An,(0,de.F)(xe))},Wt=fe.useMemo(function(){var Pn=(0,Pe.Z)(yt.keyEntities,je)||{},An=Pn.children;return!!(An||[]).length},[yt.keyEntities,je]),Bn=fe.useMemo(function(){return We===!1?!1:We||!yt.loadData&&!Wt||yt.loadData&&xe.loaded&&!Wt},[We,yt.loadData,Wt,xe.loaded]);fe.useEffect(function(){lt||typeof yt.loadData=="function"&&mt&&!Bn&&!xe.loaded&&yt.onNodeLoad((0,de.F)(xe))},[lt,yt.loadData,yt.onNodeLoad,mt,Bn,xe]);var zn=fe.useMemo(function(){var Pn;return(Pn=yt.draggable)!==null&&Pn!==void 0&&Pn.icon?fe.createElement("span",{className:"".concat(yt.prefixCls,"-draggable-icon")},yt.draggable.icon):null},[yt.draggable]),Yn=function(An){var Lr=xe.switcherIcon||yt.switcherIcon;return typeof Lr=="function"?Lr((0,ae.Z)((0,ae.Z)({},xe),{},{isLeaf:An})):Lr},fr=function(){if(Bn){var An=Yn(!0);return An!==!1?fe.createElement("span",{className:be()("".concat(yt.prefixCls,"-switcher"),"".concat(yt.prefixCls,"-switcher-noop"))},An):null}var Lr=Yn(!1);return Lr!==!1?fe.createElement("span",{onClick:fn,className:be()("".concat(yt.prefixCls,"-switcher"),"".concat(yt.prefixCls,"-switcher_").concat(mt?z:oe))},Lr):null},Gr=fe.useMemo(function(){if(!$e)return null;var Pn=typeof $e!="boolean"?$e:null;return fe.createElement("span",{className:be()("".concat(yt.prefixCls,"-checkbox"),(0,Ft.Z)((0,Ft.Z)((0,Ft.Z)({},"".concat(yt.prefixCls,"-checkbox-checked"),Xe),"".concat(yt.prefixCls,"-checkbox-indeterminate"),!Xe&&et),"".concat(yt.prefixCls,"-checkbox-disabled"),Ne||xe.disableCheckbox)),onClick:Ie,role:"checkbox","aria-checked":et?"mixed":Xe,"aria-disabled":Ne||xe.disableCheckbox,"aria-label":"Select ".concat(typeof xe.title=="string"?xe.title:"tree node")},Pn)},[$e,Xe,et,Ne,xe.disableCheckbox,xe.title]),lr=fe.useMemo(function(){return Bn?null:mt?z:oe},[Bn,mt]),ni=fe.useMemo(function(){return fe.createElement("span",{className:be()("".concat(yt.prefixCls,"-iconEle"),"".concat(yt.prefixCls,"-icon__").concat(lr||"docu"),(0,Ft.Z)({},"".concat(yt.prefixCls,"-icon_loading"),lt))})},[yt.prefixCls,lr,lt]),ri=fe.useMemo(function(){var Pn=!!yt.draggable,An=!xe.disabled&&Pn&&yt.dragOverNodeKey===je;return An?yt.dropIndicatorRender({dropPosition:yt.dropPosition,dropLevelOffset:yt.dropLevelOffset,indent:yt.indent,prefixCls:yt.prefixCls,direction:yt.direction}):null},[yt.dropPosition,yt.dropLevelOffset,yt.indent,yt.prefixCls,yt.direction,yt.draggable,yt.dragOverNodeKey,yt.dropIndicatorRender]),ki=fe.useMemo(function(){var Pn=xe.title,An=Pn===void 0?ie:Pn,Lr="".concat(yt.prefixCls,"-node-content-wrapper"),Dn;if(yt.showIcon){var Zn=xe.icon||yt.icon;Dn=Zn?fe.createElement("span",{className:be()("".concat(yt.prefixCls,"-iconEle"),"".concat(yt.prefixCls,"-icon__customize"))},typeof Zn=="function"?Zn(xe):Zn):ni}else yt.loadData&<&&(Dn=ni);var nr;return typeof An=="function"?nr=An(ht):yt.titleRender?nr=yt.titleRender(ht):nr=An,fe.createElement("span",{ref:Tt,title:typeof An=="string"?An:"",className:be()(Lr,"".concat(Lr,"-").concat(lr||"normal"),(0,Ft.Z)({},"".concat(yt.prefixCls,"-node-selected"),!Ne&&(Lt||Ze))),onMouseEnter:St,onMouseLeave:Ct,onContextMenu:It,onClick:Ve,onDoubleClick:it},Dn,fe.createElement("span",{className:"".concat(yt.prefixCls,"-title")},nr),ri)},[yt.prefixCls,yt.showIcon,xe,yt.icon,ni,yt.titleRender,ht,lr,St,Ct,It,Ve,it]),ji=(0,Ee.Z)(Pt,{aria:!0,data:!0}),Vi=(0,Pe.Z)(yt.keyEntities,je)||{},Io=Vi.level,Mo=ft[ft.length-1],ro=!Ne&&jt,Nn=yt.draggingNodeKey===je,Qe=ut!==void 0?{"aria-selected":!!ut}:void 0;return fe.createElement("div",(0,st.Z)({ref:vt,role:"treeitem","aria-expanded":We?void 0:mt,className:be()(Le,"".concat(yt.prefixCls,"-treenode"),(Fe={},(0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)(Fe,"".concat(yt.prefixCls,"-treenode-disabled"),Ne),"".concat(yt.prefixCls,"-treenode-switcher-").concat(mt?"open":"close"),!We),"".concat(yt.prefixCls,"-treenode-checkbox-checked"),Xe),"".concat(yt.prefixCls,"-treenode-checkbox-indeterminate"),et),"".concat(yt.prefixCls,"-treenode-selected"),Lt),"".concat(yt.prefixCls,"-treenode-loading"),lt),"".concat(yt.prefixCls,"-treenode-active"),wt),"".concat(yt.prefixCls,"-treenode-leaf-last"),Mo),"".concat(yt.prefixCls,"-treenode-draggable"),jt),"dragging",Nn),(0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)(Fe,"drop-target",yt.dropTargetKey===je),"drop-container",yt.dropContainerKey===je),"drag-over",!Ne&&Ue),"drag-over-gap-top",!Ne&&Je),"drag-over-gap-bottom",!Ne&&He),"filter-node",(De=yt.filterTreeNode)===null||De===void 0?void 0:De.call(yt,(0,de.F)(xe))),"".concat(yt.prefixCls,"-treenode-leaf"),Bn))),style:Be,draggable:ro,onDragStart:ro?Kt:void 0,onDragEnter:jt?an:void 0,onDragOver:jt?un:void 0,onDragLeave:jt?hn:void 0,onDrop:jt?On:void 0,onDragEnd:jt?qt:void 0,onMouseMove:dt},Qe,ji),fe.createElement(ve,{prefixCls:yt.prefixCls,level:Io,isStart:at,isEnd:ft}),zn,fr(),Gr,ki)};le.isTreeNode=1;var ue=le},27822:function(Sn,vn,ot){"use strict";ot.d(vn,{k:function(){return Ft},y:function(){return ae}});var st=ot(67294),Ft=st.createContext(null),ae=st.createContext({})},70593:function(Sn,vn,ot){"use strict";ot.d(vn,{OF:function(){return je.Z},y6:function(){return oe.y},ZP:function(){return Ne}});var st=ot(87462),Ft=ot(71002),ae=ot(1413),Ge=ot(74902),Re=ot(15671),fe=ot(43144),pe=ot(97326),be=ot(60136),Ee=ot(29388),we=ot(4942),Te=ot(94184),ve=ot.n(Te),Pe=ot(15105),de=ot(64217),ee=ot(80334),z=ot(67294),oe=ot(27822),ie=function(nt){var Ie=nt.dropPosition,ze=nt.dropLevelOffset,Ve=nt.indent,it={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ie){case-1:it.top=0,it.left=-ze*Ve;break;case 1:it.bottom=0,it.left=-ze*Ve;break;case 0:it.bottom=0,it.left=Ve;break}return z.createElement("div",{style:it})},le=ie;function ue($e){if($e==null)throw new TypeError("Cannot destructure "+$e)}var me=ot(97685),xe=ot(45987),Ae=ot(8410),De=ot(73299),Fe=ot(62874),je=ot(86128);function Le($e,nt){var Ie=z.useState(!1),ze=(0,me.Z)(Ie,2),Ve=ze[0],it=ze[1];(0,Ae.Z)(function(){if(Ve)return $e(),function(){nt()}},[Ve]),(0,Ae.Z)(function(){return it(!0),function(){it(!1)}},[])}var Be=Le,Ue=ot(1089),Je=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],He=z.forwardRef(function($e,nt){var Ie=$e.className,ze=$e.style,Ve=$e.motion,it=$e.motionNodes,St=$e.motionType,Ct=$e.onMotionStart,It=$e.onMotionEnd,jt=$e.active,Kt=$e.treeNodeRequiredProps,an=(0,xe.Z)($e,Je),un=z.useState(!0),hn=(0,me.Z)(un,2),qt=hn[0],On=hn[1],fn=z.useContext(oe.k),Wt=fn.prefixCls,Bn=it&&St!=="hide";(0,Ae.Z)(function(){it&&Bn!==qt&&On(Bn)},[it]);var zn=function(){it&&Ct()},Yn=z.useRef(!1),fr=function(){it&&!Yn.current&&(Yn.current=!0,It())};Be(zn,fr);var Gr=function(ni){Bn===ni&&fr()};return it?z.createElement(Fe.Z,(0,st.Z)({ref:nt,visible:qt},Ve,{motionAppear:St==="show",onVisibleChanged:Gr}),function(lr,ni){var ri=lr.className,ki=lr.style;return z.createElement("div",{ref:ni,className:ve()("".concat(Wt,"-treenode-motion"),ri),style:ki},it.map(function(ji){var Vi=Object.assign({},(ue(ji.data),ji.data)),Io=ji.title,Mo=ji.key,ro=ji.isStart,Nn=ji.isEnd;delete Vi.children;var Qe=(0,Ue.H8)(Mo,Kt);return z.createElement(je.Z,(0,st.Z)({},Vi,Qe,{title:Io,active:jt,data:ji.data,key:Mo,isStart:ro,isEnd:Nn}))}))}):z.createElement(je.Z,(0,st.Z)({domRef:nt,className:Ie,style:ze},an,{active:jt}))}),We=He;function at(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=$e.length,ze=nt.length;if(Math.abs(Ie-ze)!==1)return{add:!1,key:null};function Ve(it,St){var Ct=new Map;it.forEach(function(jt){Ct.set(jt,!0)});var It=St.filter(function(jt){return!Ct.has(jt)});return It.length===1?It[0]:null}return Ie<ze?{add:!0,key:Ve($e,nt)}:{add:!1,key:Ve(nt,$e)}}function ft($e,nt,Ie){var ze=$e.findIndex(function(Ct){return Ct.key===Ie}),Ve=$e[ze+1],it=nt.findIndex(function(Ct){return Ct.key===Ie});if(Ve){var St=nt.findIndex(function(Ct){return Ct.key===Ve.key});return nt.slice(it+1,St)}return nt.slice(it+1)}var mt=["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"],Lt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Xe=function(){},et="RC_TREE_MOTION_".concat(Math.random()),lt={key:et},vt={key:et,level:0,index:0,pos:"0",node:lt,nodes:[lt]},wt={parent:null,children:[],pos:vt.pos,data:lt,title:null,key:et,isStart:[],isEnd:[]};function ht($e,nt,Ie,ze){return nt===!1||!Ie?$e:$e.slice(0,Math.ceil(Ie/ze)+1)}function dt($e){var nt=$e.key,Ie=$e.pos;return(0,Ue.km)(nt,Ie)}function ut($e){for(var nt=String($e.data.key),Ie=$e;Ie.parent;)Ie=Ie.parent,nt="".concat(Ie.data.key," > ").concat(nt);return nt}var Pt=z.forwardRef(function($e,nt){var Ie=$e.prefixCls,ze=$e.data,Ve=$e.selectable,it=$e.checkable,St=$e.expandedKeys,Ct=$e.selectedKeys,It=$e.checkedKeys,jt=$e.loadedKeys,Kt=$e.loadingKeys,an=$e.halfCheckedKeys,un=$e.keyEntities,hn=$e.disabled,qt=$e.dragging,On=$e.dragOverNodeKey,fn=$e.dropPosition,Wt=$e.motion,Bn=$e.height,zn=$e.itemHeight,Yn=$e.virtual,fr=$e.scrollWidth,Gr=$e.focusable,lr=$e.activeItem,ni=$e.focused,ri=$e.tabIndex,ki=$e.onKeyDown,ji=$e.onFocus,Vi=$e.onBlur,Io=$e.onActiveChange,Mo=$e.onListChangeStart,ro=$e.onListChangeEnd,Nn=(0,xe.Z)($e,mt),Qe=z.useRef(null),Pn=z.useRef(null);z.useImperativeHandle(nt,function(){return{scrollTo:function(Wi){Qe.current.scrollTo(Wi)},getIndentWidth:function(){return Pn.current.offsetWidth}}});var An=z.useState(St),Lr=(0,me.Z)(An,2),Dn=Lr[0],Zn=Lr[1],nr=z.useState(ze),Jr=(0,me.Z)(nr,2),nn=Jr[0],ln=Jr[1],Vt=z.useState(ze),cn=(0,me.Z)(Vt,2),Qn=cn[0],rr=cn[1],or=z.useState([]),en=(0,me.Z)(or,2),Tn=en[0],Sr=en[1],Vr=z.useState(null),Wn=(0,me.Z)(Vr,2),$t=Wn[0],cr=Wn[1],yr=z.useRef(ze);yr.current=ze;function Nr(){var hi=yr.current;ln(hi),rr(hi),Sr([]),cr(null),ro()}(0,Ae.Z)(function(){Zn(St);var hi=at(Dn,St);if(hi.key!==null)if(hi.add){var Wi=nn.findIndex(function(Zr){var In=Zr.key;return In===hi.key}),zi=ht(ft(nn,ze,hi.key),Yn,Bn,zn),sr=nn.slice();sr.splice(Wi+1,0,wt),rr(sr),Sr(zi),cr("show")}else{var dr=ze.findIndex(function(Zr){var In=Zr.key;return In===hi.key}),Ar=ht(ft(ze,nn,hi.key),Yn,Bn,zn),ii=ze.slice();ii.splice(dr+1,0,wt),rr(ii),Sr(Ar),cr("hide")}else nn!==ze&&(ln(ze),rr(ze))},[St,ze]),z.useEffect(function(){qt||Nr()},[qt]);var xn=Wt?Qn:ze,gr={expandedKeys:St,selectedKeys:Ct,loadedKeys:jt,loadingKeys:Kt,checkedKeys:It,halfCheckedKeys:an,dragOverNodeKey:On,dropPosition:fn,keyEntities:un};return z.createElement(z.Fragment,null,ni&&lr&&z.createElement("span",{style:Lt,"aria-live":"assertive"},ut(lr)),z.createElement("div",null,z.createElement("input",{style:Lt,disabled:Gr===!1||hn,tabIndex:Gr!==!1?ri:null,onKeyDown:ki,onFocus:ji,onBlur:Vi,value:"",onChange:Xe,"aria-label":"for screen reader"})),z.createElement("div",{className:"".concat(Ie,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},z.createElement("div",{className:"".concat(Ie,"-indent")},z.createElement("div",{ref:Pn,className:"".concat(Ie,"-indent-unit")}))),z.createElement(De.Z,(0,st.Z)({},Nn,{data:xn,itemKey:dt,height:Bn,fullHeight:!1,virtual:Yn,itemHeight:zn,scrollWidth:fr,prefixCls:"".concat(Ie,"-list"),ref:Qe,role:"tree",onVisibleChange:function(Wi){Wi.every(function(zi){return dt(zi)!==et})&&Nr()}}),function(hi){var Wi=hi.pos,zi=Object.assign({},(ue(hi.data),hi.data)),sr=hi.title,dr=hi.key,Ar=hi.isStart,ii=hi.isEnd,Zr=(0,Ue.km)(dr,Wi);delete zi.key,delete zi.children;var In=(0,Ue.H8)(Zr,gr);return z.createElement(We,(0,st.Z)({},zi,In,{title:sr,active:!!lr&&dr===lr.key,pos:Wi,data:hi.data,isStart:Ar,isEnd:ii,motion:Wt,motionNodes:dr===et?Tn:null,motionType:$t,onMotionStart:Mo,onMotionEnd:Nr,treeNodeRequiredProps:gr,onMouseMove:function(){Io(null)}}))}))}),yt=Pt,gt=ot(10225),Tt=ot(17341),ct=ot(35381),Ye=10,Ze=function($e){(0,be.Z)(Ie,$e);var nt=(0,Ee.Z)(Ie);function Ie(){var ze;(0,Re.Z)(this,Ie);for(var Ve=arguments.length,it=new Array(Ve),St=0;St<Ve;St++)it[St]=arguments[St];return ze=nt.call.apply(nt,[this].concat(it)),(0,we.Z)((0,pe.Z)(ze),"destroyed",!1),(0,we.Z)((0,pe.Z)(ze),"delayedDragEnterLogic",void 0),(0,we.Z)((0,pe.Z)(ze),"loadingRetryTimes",{}),(0,we.Z)((0,pe.Z)(ze),"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,Ue.w$)()}),(0,we.Z)((0,pe.Z)(ze),"dragStartMousePosition",null),(0,we.Z)((0,pe.Z)(ze),"dragNodeProps",null),(0,we.Z)((0,pe.Z)(ze),"currentMouseOverDroppableNodeKey",null),(0,we.Z)((0,pe.Z)(ze),"listRef",z.createRef()),(0,we.Z)((0,pe.Z)(ze),"onNodeDragStart",function(Ct,It){var jt=ze.state,Kt=jt.expandedKeys,an=jt.keyEntities,un=ze.props.onDragStart,hn=It.eventKey;ze.dragNodeProps=It,ze.dragStartMousePosition={x:Ct.clientX,y:Ct.clientY};var qt=(0,gt._5)(Kt,hn);ze.setState({draggingNodeKey:hn,dragChildrenKeys:(0,gt.wA)(hn,an),indent:ze.listRef.current.getIndentWidth()}),ze.setExpandedKeys(qt),window.addEventListener("dragend",ze.onWindowDragEnd),un==null||un({event:Ct,node:(0,Ue.F)(It)})}),(0,we.Z)((0,pe.Z)(ze),"onNodeDragEnter",function(Ct,It){var jt=ze.state,Kt=jt.expandedKeys,an=jt.keyEntities,un=jt.dragChildrenKeys,hn=jt.flattenNodes,qt=jt.indent,On=ze.props,fn=On.onDragEnter,Wt=On.onExpand,Bn=On.allowDrop,zn=On.direction,Yn=It.pos,fr=It.eventKey;if(ze.currentMouseOverDroppableNodeKey!==fr&&(ze.currentMouseOverDroppableNodeKey=fr),!ze.dragNodeProps){ze.resetDragState();return}var Gr=(0,gt.OM)(Ct,ze.dragNodeProps,It,qt,ze.dragStartMousePosition,Bn,hn,an,Kt,zn),lr=Gr.dropPosition,ni=Gr.dropLevelOffset,ri=Gr.dropTargetKey,ki=Gr.dropContainerKey,ji=Gr.dropTargetPos,Vi=Gr.dropAllowed,Io=Gr.dragOverNodeKey;if(un.includes(ri)||!Vi){ze.resetDragState();return}if(ze.delayedDragEnterLogic||(ze.delayedDragEnterLogic={}),Object.keys(ze.delayedDragEnterLogic).forEach(function(Mo){clearTimeout(ze.delayedDragEnterLogic[Mo])}),ze.dragNodeProps.eventKey!==It.eventKey&&(Ct.persist(),ze.delayedDragEnterLogic[Yn]=window.setTimeout(function(){if(ze.state.draggingNodeKey!==null){var Mo=(0,Ge.Z)(Kt),ro=(0,ct.Z)(an,It.eventKey);ro&&(ro.children||[]).length&&(Mo=(0,gt.L0)(Kt,It.eventKey)),ze.props.hasOwnProperty("expandedKeys")||ze.setExpandedKeys(Mo),Wt==null||Wt(Mo,{node:(0,Ue.F)(It),expanded:!0,nativeEvent:Ct.nativeEvent})}},800)),ze.dragNodeProps.eventKey===ri&&ni===0){ze.resetDragState();return}ze.setState({dragOverNodeKey:Io,dropPosition:lr,dropLevelOffset:ni,dropTargetKey:ri,dropContainerKey:ki,dropTargetPos:ji,dropAllowed:Vi}),fn==null||fn({event:Ct,node:(0,Ue.F)(It),expandedKeys:Kt})}),(0,we.Z)((0,pe.Z)(ze),"onNodeDragOver",function(Ct,It){var jt=ze.state,Kt=jt.dragChildrenKeys,an=jt.flattenNodes,un=jt.keyEntities,hn=jt.expandedKeys,qt=jt.indent,On=ze.props,fn=On.onDragOver,Wt=On.allowDrop,Bn=On.direction;if(ze.dragNodeProps){var zn=(0,gt.OM)(Ct,ze.dragNodeProps,It,qt,ze.dragStartMousePosition,Wt,an,un,hn,Bn),Yn=zn.dropPosition,fr=zn.dropLevelOffset,Gr=zn.dropTargetKey,lr=zn.dropContainerKey,ni=zn.dropTargetPos,ri=zn.dropAllowed,ki=zn.dragOverNodeKey;Kt.includes(Gr)||!ri||(ze.dragNodeProps.eventKey===Gr&&fr===0?ze.state.dropPosition===null&&ze.state.dropLevelOffset===null&&ze.state.dropTargetKey===null&&ze.state.dropContainerKey===null&&ze.state.dropTargetPos===null&&ze.state.dropAllowed===!1&&ze.state.dragOverNodeKey===null||ze.resetDragState():Yn===ze.state.dropPosition&&fr===ze.state.dropLevelOffset&&Gr===ze.state.dropTargetKey&&lr===ze.state.dropContainerKey&&ni===ze.state.dropTargetPos&&ri===ze.state.dropAllowed&&ki===ze.state.dragOverNodeKey||ze.setState({dropPosition:Yn,dropLevelOffset:fr,dropTargetKey:Gr,dropContainerKey:lr,dropTargetPos:ni,dropAllowed:ri,dragOverNodeKey:ki}),fn==null||fn({event:Ct,node:(0,Ue.F)(It)}))}}),(0,we.Z)((0,pe.Z)(ze),"onNodeDragLeave",function(Ct,It){ze.currentMouseOverDroppableNodeKey===It.eventKey&&!Ct.currentTarget.contains(Ct.relatedTarget)&&(ze.resetDragState(),ze.currentMouseOverDroppableNodeKey=null);var jt=ze.props.onDragLeave;jt==null||jt({event:Ct,node:(0,Ue.F)(It)})}),(0,we.Z)((0,pe.Z)(ze),"onWindowDragEnd",function(Ct){ze.onNodeDragEnd(Ct,null,!0),window.removeEventListener("dragend",ze.onWindowDragEnd)}),(0,we.Z)((0,pe.Z)(ze),"onNodeDragEnd",function(Ct,It){var jt=ze.props.onDragEnd;ze.setState({dragOverNodeKey:null}),ze.cleanDragState(),jt==null||jt({event:Ct,node:(0,Ue.F)(It)}),ze.dragNodeProps=null,window.removeEventListener("dragend",ze.onWindowDragEnd)}),(0,we.Z)((0,pe.Z)(ze),"onNodeDrop",function(Ct,It){var jt,Kt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,an=ze.state,un=an.dragChildrenKeys,hn=an.dropPosition,qt=an.dropTargetKey,On=an.dropTargetPos,fn=an.dropAllowed;if(fn){var Wt=ze.props.onDrop;if(ze.setState({dragOverNodeKey:null}),ze.cleanDragState(),qt!==null){var Bn=(0,ae.Z)((0,ae.Z)({},(0,Ue.H8)(qt,ze.getTreeNodeRequiredProps())),{},{active:((jt=ze.getActiveItem())===null||jt===void 0?void 0:jt.key)===qt,data:(0,ct.Z)(ze.state.keyEntities,qt).node}),zn=un.includes(qt);(0,ee.ZP)(!zn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Yn=(0,gt.yx)(On),fr={event:Ct,node:(0,Ue.F)(Bn),dragNode:ze.dragNodeProps?(0,Ue.F)(ze.dragNodeProps):null,dragNodesKeys:[ze.dragNodeProps.eventKey].concat(un),dropToGap:hn!==0,dropPosition:hn+Number(Yn[Yn.length-1])};Kt||Wt==null||Wt(fr),ze.dragNodeProps=null}}}),(0,we.Z)((0,pe.Z)(ze),"cleanDragState",function(){var Ct=ze.state.draggingNodeKey;Ct!==null&&ze.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),ze.dragStartMousePosition=null,ze.currentMouseOverDroppableNodeKey=null}),(0,we.Z)((0,pe.Z)(ze),"triggerExpandActionExpand",function(Ct,It){var jt=ze.state,Kt=jt.expandedKeys,an=jt.flattenNodes,un=It.expanded,hn=It.key,qt=It.isLeaf;if(!(qt||Ct.shiftKey||Ct.metaKey||Ct.ctrlKey)){var On=an.filter(function(Wt){return Wt.key===hn})[0],fn=(0,Ue.F)((0,ae.Z)((0,ae.Z)({},(0,Ue.H8)(hn,ze.getTreeNodeRequiredProps())),{},{data:On.data}));ze.setExpandedKeys(un?(0,gt._5)(Kt,hn):(0,gt.L0)(Kt,hn)),ze.onNodeExpand(Ct,fn)}}),(0,we.Z)((0,pe.Z)(ze),"onNodeClick",function(Ct,It){var jt=ze.props,Kt=jt.onClick,an=jt.expandAction;an==="click"&&ze.triggerExpandActionExpand(Ct,It),Kt==null||Kt(Ct,It)}),(0,we.Z)((0,pe.Z)(ze),"onNodeDoubleClick",function(Ct,It){var jt=ze.props,Kt=jt.onDoubleClick,an=jt.expandAction;an==="doubleClick"&&ze.triggerExpandActionExpand(Ct,It),Kt==null||Kt(Ct,It)}),(0,we.Z)((0,pe.Z)(ze),"onNodeSelect",function(Ct,It){var jt=ze.state.selectedKeys,Kt=ze.state,an=Kt.keyEntities,un=Kt.fieldNames,hn=ze.props,qt=hn.onSelect,On=hn.multiple,fn=It.selected,Wt=It[un.key],Bn=!fn;Bn?On?jt=(0,gt.L0)(jt,Wt):jt=[Wt]:jt=(0,gt._5)(jt,Wt);var zn=jt.map(function(Yn){var fr=(0,ct.Z)(an,Yn);return fr?fr.node:null}).filter(Boolean);ze.setUncontrolledState({selectedKeys:jt}),qt==null||qt(jt,{event:"select",selected:Bn,node:It,selectedNodes:zn,nativeEvent:Ct.nativeEvent})}),(0,we.Z)((0,pe.Z)(ze),"onNodeCheck",function(Ct,It,jt){var Kt=ze.state,an=Kt.keyEntities,un=Kt.checkedKeys,hn=Kt.halfCheckedKeys,qt=ze.props,On=qt.checkStrictly,fn=qt.onCheck,Wt=It.key,Bn,zn={event:"check",node:It,checked:jt,nativeEvent:Ct.nativeEvent};if(On){var Yn=jt?(0,gt.L0)(un,Wt):(0,gt._5)(un,Wt),fr=(0,gt._5)(hn,Wt);Bn={checked:Yn,halfChecked:fr},zn.checkedNodes=Yn.map(function(ji){return(0,ct.Z)(an,ji)}).filter(Boolean).map(function(ji){return ji.node}),ze.setUncontrolledState({checkedKeys:Yn})}else{var Gr=(0,Tt.S)([].concat((0,Ge.Z)(un),[Wt]),!0,an),lr=Gr.checkedKeys,ni=Gr.halfCheckedKeys;if(!jt){var ri=new Set(lr);ri.delete(Wt);var ki=(0,Tt.S)(Array.from(ri),{checked:!1,halfCheckedKeys:ni},an);lr=ki.checkedKeys,ni=ki.halfCheckedKeys}Bn=lr,zn.checkedNodes=[],zn.checkedNodesPositions=[],zn.halfCheckedKeys=ni,lr.forEach(function(ji){var Vi=(0,ct.Z)(an,ji);if(Vi){var Io=Vi.node,Mo=Vi.pos;zn.checkedNodes.push(Io),zn.checkedNodesPositions.push({node:Io,pos:Mo})}}),ze.setUncontrolledState({checkedKeys:lr},!1,{halfCheckedKeys:ni})}fn==null||fn(Bn,zn)}),(0,we.Z)((0,pe.Z)(ze),"onNodeLoad",function(Ct){var It,jt=Ct.key,Kt=ze.state.keyEntities,an=(0,ct.Z)(Kt,jt);if(!(an!=null&&(It=an.children)!==null&&It!==void 0&&It.length)){var un=new Promise(function(hn,qt){ze.setState(function(On){var fn=On.loadedKeys,Wt=fn===void 0?[]:fn,Bn=On.loadingKeys,zn=Bn===void 0?[]:Bn,Yn=ze.props,fr=Yn.loadData,Gr=Yn.onLoad;if(!fr||Wt.includes(jt)||zn.includes(jt))return null;var lr=fr(Ct);return lr.then(function(){var ni=ze.state.loadedKeys,ri=(0,gt.L0)(ni,jt);Gr==null||Gr(ri,{event:"load",node:Ct}),ze.setUncontrolledState({loadedKeys:ri}),ze.setState(function(ki){return{loadingKeys:(0,gt._5)(ki.loadingKeys,jt)}}),hn()}).catch(function(ni){if(ze.setState(function(ki){return{loadingKeys:(0,gt._5)(ki.loadingKeys,jt)}}),ze.loadingRetryTimes[jt]=(ze.loadingRetryTimes[jt]||0)+1,ze.loadingRetryTimes[jt]>=Ye){var ri=ze.state.loadedKeys;(0,ee.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),ze.setUncontrolledState({loadedKeys:(0,gt.L0)(ri,jt)}),hn()}qt(ni)}),{loadingKeys:(0,gt.L0)(zn,jt)}})});return un.catch(function(){}),un}}),(0,we.Z)((0,pe.Z)(ze),"onNodeMouseEnter",function(Ct,It){var jt=ze.props.onMouseEnter;jt==null||jt({event:Ct,node:It})}),(0,we.Z)((0,pe.Z)(ze),"onNodeMouseLeave",function(Ct,It){var jt=ze.props.onMouseLeave;jt==null||jt({event:Ct,node:It})}),(0,we.Z)((0,pe.Z)(ze),"onNodeContextMenu",function(Ct,It){var jt=ze.props.onRightClick;jt&&(Ct.preventDefault(),jt({event:Ct,node:It}))}),(0,we.Z)((0,pe.Z)(ze),"onFocus",function(){var Ct=ze.props.onFocus;ze.setState({focused:!0});for(var It=arguments.length,jt=new Array(It),Kt=0;Kt<It;Kt++)jt[Kt]=arguments[Kt];Ct==null||Ct.apply(void 0,jt)}),(0,we.Z)((0,pe.Z)(ze),"onBlur",function(){var Ct=ze.props.onBlur;ze.setState({focused:!1}),ze.onActiveChange(null);for(var It=arguments.length,jt=new Array(It),Kt=0;Kt<It;Kt++)jt[Kt]=arguments[Kt];Ct==null||Ct.apply(void 0,jt)}),(0,we.Z)((0,pe.Z)(ze),"getTreeNodeRequiredProps",function(){var Ct=ze.state,It=Ct.expandedKeys,jt=Ct.selectedKeys,Kt=Ct.loadedKeys,an=Ct.loadingKeys,un=Ct.checkedKeys,hn=Ct.halfCheckedKeys,qt=Ct.dragOverNodeKey,On=Ct.dropPosition,fn=Ct.keyEntities;return{expandedKeys:It||[],selectedKeys:jt||[],loadedKeys:Kt||[],loadingKeys:an||[],checkedKeys:un||[],halfCheckedKeys:hn||[],dragOverNodeKey:qt,dropPosition:On,keyEntities:fn}}),(0,we.Z)((0,pe.Z)(ze),"setExpandedKeys",function(Ct){var It=ze.state,jt=It.treeData,Kt=It.fieldNames,an=(0,Ue.oH)(jt,Ct,Kt);ze.setUncontrolledState({expandedKeys:Ct,flattenNodes:an},!0)}),(0,we.Z)((0,pe.Z)(ze),"onNodeExpand",function(Ct,It){var jt=ze.state.expandedKeys,Kt=ze.state,an=Kt.listChanging,un=Kt.fieldNames,hn=ze.props,qt=hn.onExpand,On=hn.loadData,fn=It.expanded,Wt=It[un.key];if(!an){var Bn=jt.includes(Wt),zn=!fn;if((0,ee.ZP)(fn&&Bn||!fn&&!Bn,"Expand state not sync with index check"),jt=zn?(0,gt.L0)(jt,Wt):(0,gt._5)(jt,Wt),ze.setExpandedKeys(jt),qt==null||qt(jt,{node:It,expanded:zn,nativeEvent:Ct.nativeEvent}),zn&&On){var Yn=ze.onNodeLoad(It);Yn&&Yn.then(function(){var fr=(0,Ue.oH)(ze.state.treeData,jt,un);ze.setUncontrolledState({flattenNodes:fr})}).catch(function(){var fr=ze.state.expandedKeys,Gr=(0,gt._5)(fr,Wt);ze.setExpandedKeys(Gr)})}}}),(0,we.Z)((0,pe.Z)(ze),"onListChangeStart",function(){ze.setUncontrolledState({listChanging:!0})}),(0,we.Z)((0,pe.Z)(ze),"onListChangeEnd",function(){setTimeout(function(){ze.setUncontrolledState({listChanging:!1})})}),(0,we.Z)((0,pe.Z)(ze),"onActiveChange",function(Ct){var It=ze.state.activeKey,jt=ze.props,Kt=jt.onActiveChange,an=jt.itemScrollOffset,un=an===void 0?0:an;It!==Ct&&(ze.setState({activeKey:Ct}),Ct!==null&&ze.scrollTo({key:Ct,offset:un}),Kt==null||Kt(Ct))}),(0,we.Z)((0,pe.Z)(ze),"getActiveItem",function(){var Ct=ze.state,It=Ct.activeKey,jt=Ct.flattenNodes;return It===null?null:jt.find(function(Kt){var an=Kt.key;return an===It})||null}),(0,we.Z)((0,pe.Z)(ze),"offsetActiveKey",function(Ct){var It=ze.state,jt=It.flattenNodes,Kt=It.activeKey,an=jt.findIndex(function(qt){var On=qt.key;return On===Kt});an===-1&&Ct<0&&(an=jt.length),an=(an+Ct+jt.length)%jt.length;var un=jt[an];if(un){var hn=un.key;ze.onActiveChange(hn)}else ze.onActiveChange(null)}),(0,we.Z)((0,pe.Z)(ze),"onKeyDown",function(Ct){var It=ze.state,jt=It.activeKey,Kt=It.expandedKeys,an=It.checkedKeys,un=It.fieldNames,hn=ze.props,qt=hn.onKeyDown,On=hn.checkable,fn=hn.selectable;switch(Ct.which){case Pe.Z.UP:{ze.offsetActiveKey(-1),Ct.preventDefault();break}case Pe.Z.DOWN:{ze.offsetActiveKey(1),Ct.preventDefault();break}}var Wt=ze.getActiveItem();if(Wt&&Wt.data){var Bn=ze.getTreeNodeRequiredProps(),zn=Wt.data.isLeaf===!1||!!(Wt.data[un.children]||[]).length,Yn=(0,Ue.F)((0,ae.Z)((0,ae.Z)({},(0,Ue.H8)(jt,Bn)),{},{data:Wt.data,active:!0}));switch(Ct.which){case Pe.Z.LEFT:{zn&&Kt.includes(jt)?ze.onNodeExpand({},Yn):Wt.parent&&ze.onActiveChange(Wt.parent.key),Ct.preventDefault();break}case Pe.Z.RIGHT:{zn&&!Kt.includes(jt)?ze.onNodeExpand({},Yn):Wt.children&&Wt.children.length&&ze.onActiveChange(Wt.children[0].key),Ct.preventDefault();break}case Pe.Z.ENTER:case Pe.Z.SPACE:{On&&!Yn.disabled&&Yn.checkable!==!1&&!Yn.disableCheckbox?ze.onNodeCheck({},Yn,!an.includes(jt)):!On&&fn&&!Yn.disabled&&Yn.selectable!==!1&&ze.onNodeSelect({},Yn);break}}}qt==null||qt(Ct)}),(0,we.Z)((0,pe.Z)(ze),"setUncontrolledState",function(Ct){var It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,jt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ze.destroyed){var Kt=!1,an=!0,un={};Object.keys(Ct).forEach(function(hn){if(ze.props.hasOwnProperty(hn)){an=!1;return}Kt=!0,un[hn]=Ct[hn]}),Kt&&(!It||an)&&ze.setState((0,ae.Z)((0,ae.Z)({},un),jt))}}),(0,we.Z)((0,pe.Z)(ze),"scrollTo",function(Ct){ze.listRef.current.scrollTo(Ct)}),ze}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 Ve=this.props,it=Ve.activeKey,St=Ve.itemScrollOffset,Ct=St===void 0?0:St;it!==void 0&&it!==this.state.activeKey&&(this.setState({activeKey:it}),it!==null&&this.scrollTo({key:it,offset:Ct}))}},{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 Ve=this.state,it=Ve.focused,St=Ve.flattenNodes,Ct=Ve.keyEntities,It=Ve.draggingNodeKey,jt=Ve.activeKey,Kt=Ve.dropLevelOffset,an=Ve.dropContainerKey,un=Ve.dropTargetKey,hn=Ve.dropPosition,qt=Ve.dragOverNodeKey,On=Ve.indent,fn=this.props,Wt=fn.prefixCls,Bn=fn.className,zn=fn.style,Yn=fn.showLine,fr=fn.focusable,Gr=fn.tabIndex,lr=Gr===void 0?0:Gr,ni=fn.selectable,ri=fn.showIcon,ki=fn.icon,ji=fn.switcherIcon,Vi=fn.draggable,Io=fn.checkable,Mo=fn.checkStrictly,ro=fn.disabled,Nn=fn.motion,Qe=fn.loadData,Pn=fn.filterTreeNode,An=fn.height,Lr=fn.itemHeight,Dn=fn.scrollWidth,Zn=fn.virtual,nr=fn.titleRender,Jr=fn.dropIndicatorRender,nn=fn.onContextMenu,ln=fn.onScroll,Vt=fn.direction,cn=fn.rootClassName,Qn=fn.rootStyle,rr=(0,de.Z)(this.props,{aria:!0,data:!0}),or;Vi&&((0,Ft.Z)(Vi)==="object"?or=Vi:typeof Vi=="function"?or={nodeDraggable:Vi}:or={});var en={prefixCls:Wt,selectable:ni,showIcon:ri,icon:ki,switcherIcon:ji,draggable:or,draggingNodeKey:It,checkable:Io,checkStrictly:Mo,disabled:ro,keyEntities:Ct,dropLevelOffset:Kt,dropContainerKey:an,dropTargetKey:un,dropPosition:hn,dragOverNodeKey:qt,indent:On,direction:Vt,dropIndicatorRender:Jr,loadData:Qe,filterTreeNode:Pn,titleRender:nr,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 z.createElement(oe.k.Provider,{value:en},z.createElement("div",{className:ve()(Wt,Bn,cn,(0,we.Z)((0,we.Z)((0,we.Z)({},"".concat(Wt,"-show-line"),Yn),"".concat(Wt,"-focused"),it),"".concat(Wt,"-active-focused"),jt!==null)),style:Qn},z.createElement(yt,(0,st.Z)({ref:this.listRef,prefixCls:Wt,style:zn,data:St,disabled:ro,selectable:ni,checkable:!!Io,motion:Nn,dragging:It!==null,height:An,itemHeight:Lr,virtual:Zn,focusable:fr,focused:it,tabIndex:lr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:nn,onScroll:ln,scrollWidth:Dn},this.getTreeNodeRequiredProps(),rr))))}}],[{key:"getDerivedStateFromProps",value:function(Ve,it){var St=it.prevProps,Ct={prevProps:Ve};function It(lr){return!St&&Ve.hasOwnProperty(lr)||St&&St[lr]!==Ve[lr]}var jt,Kt=it.fieldNames;if(It("fieldNames")&&(Kt=(0,Ue.w$)(Ve.fieldNames),Ct.fieldNames=Kt),It("treeData")?jt=Ve.treeData:It("children")&&((0,ee.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),jt=(0,Ue.zn)(Ve.children)),jt){Ct.treeData=jt;var an=(0,Ue.I8)(jt,{fieldNames:Kt});Ct.keyEntities=(0,ae.Z)((0,we.Z)({},et,vt),an.keyEntities)}var un=Ct.keyEntities||it.keyEntities;if(It("expandedKeys")||St&&It("autoExpandParent"))Ct.expandedKeys=Ve.autoExpandParent||!St&&Ve.defaultExpandParent?(0,gt.r7)(Ve.expandedKeys,un):Ve.expandedKeys;else if(!St&&Ve.defaultExpandAll){var hn=(0,ae.Z)({},un);delete hn[et];var qt=[];Object.keys(hn).forEach(function(lr){var ni=hn[lr];ni.children&&ni.children.length&&qt.push(ni.key)}),Ct.expandedKeys=qt}else!St&&Ve.defaultExpandedKeys&&(Ct.expandedKeys=Ve.autoExpandParent||Ve.defaultExpandParent?(0,gt.r7)(Ve.defaultExpandedKeys,un):Ve.defaultExpandedKeys);if(Ct.expandedKeys||delete Ct.expandedKeys,jt||Ct.expandedKeys){var On=(0,Ue.oH)(jt||it.treeData,Ct.expandedKeys||it.expandedKeys,Kt);Ct.flattenNodes=On}if(Ve.selectable&&(It("selectedKeys")?Ct.selectedKeys=(0,gt.BT)(Ve.selectedKeys,Ve):!St&&Ve.defaultSelectedKeys&&(Ct.selectedKeys=(0,gt.BT)(Ve.defaultSelectedKeys,Ve))),Ve.checkable){var fn;if(It("checkedKeys")?fn=(0,gt.E6)(Ve.checkedKeys)||{}:!St&&Ve.defaultCheckedKeys?fn=(0,gt.E6)(Ve.defaultCheckedKeys)||{}:jt&&(fn=(0,gt.E6)(Ve.checkedKeys)||{checkedKeys:it.checkedKeys,halfCheckedKeys:it.halfCheckedKeys}),fn){var Wt=fn,Bn=Wt.checkedKeys,zn=Bn===void 0?[]:Bn,Yn=Wt.halfCheckedKeys,fr=Yn===void 0?[]:Yn;if(!Ve.checkStrictly){var Gr=(0,Tt.S)(zn,!0,un);zn=Gr.checkedKeys,fr=Gr.halfCheckedKeys}Ct.checkedKeys=zn,Ct.halfCheckedKeys=fr}}return It("loadedKeys")&&(Ct.loadedKeys=Ve.loadedKeys),Ct}}]),Ie}(z.Component);(0,we.Z)(Ze,"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,we.Z)(Ze,"TreeNode",je.Z);var Se=Ze,Ne=Se},10225:function(Sn,vn,ot){"use strict";ot.d(vn,{BT:function(){return z},E6:function(){return le},L0:function(){return we},OM:function(){return ee},_5:function(){return Ee},r7:function(){return ue},wA:function(){return ve},yx:function(){return Te}});var st=ot(74902),Ft=ot(71002),ae=ot(80334),Ge=ot(67294),Re=ot(86128),fe=ot(35381),pe=ot(1089),be=null;function Ee(me,xe){if(!me)return[];var Ae=me.slice(),De=Ae.indexOf(xe);return De>=0&&Ae.splice(De,1),Ae}function we(me,xe){var Ae=(me||[]).slice();return Ae.indexOf(xe)===-1&&Ae.push(xe),Ae}function Te(me){return me.split("-")}function ve(me,xe){var Ae=[],De=(0,fe.Z)(xe,me);function Fe(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];je.forEach(function(Le){var Be=Le.key,Ue=Le.children;Ae.push(Be),Fe(Ue)})}return Fe(De.children),Ae}function Pe(me){if(me.parent){var xe=Te(me.pos);return Number(xe[xe.length-1])===me.parent.children.length-1}return!1}function de(me){var xe=Te(me.pos);return Number(xe[xe.length-1])===0}function ee(me,xe,Ae,De,Fe,je,Le,Be,Ue,Je){var He,We=me.clientX,at=me.clientY,ft=me.target.getBoundingClientRect(),mt=ft.top,Lt=ft.height,Xe=(Je==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-We),et=(Xe-12)/De,lt=Ue.filter(function(Ne){var $e;return($e=Be[Ne])===null||$e===void 0||($e=$e.children)===null||$e===void 0?void 0:$e.length}),vt=(0,fe.Z)(Be,Ae.eventKey);if(at<mt+Lt/2){var wt=Le.findIndex(function(Ne){return Ne.key===vt.key}),ht=wt<=0?0:wt-1,dt=Le[ht].key;vt=(0,fe.Z)(Be,dt)}var ut=vt.key,Pt=vt,yt=vt.key,gt=0,Tt=0;if(!lt.includes(ut))for(var ct=0;ct<et&&Pe(vt);ct+=1)vt=vt.parent,Tt+=1;var Ye=xe.data,Ze=vt.node,Se=!0;return de(vt)&&vt.level===0&&at<mt+Lt/2&&je({dragNode:Ye,dropNode:Ze,dropPosition:-1})&&vt.key===Ae.eventKey?gt=-1:(Pt.children||[]).length&<.includes(yt)?je({dragNode:Ye,dropNode:Ze,dropPosition:0})?gt=0:Se=!1:Tt===0?et>-1.5?je({dragNode:Ye,dropNode:Ze,dropPosition:1})?gt=1:Se=!1:je({dragNode:Ye,dropNode:Ze,dropPosition:0})?gt=0:je({dragNode:Ye,dropNode:Ze,dropPosition:1})?gt=1:Se=!1:je({dragNode:Ye,dropNode:Ze,dropPosition:1})?gt=1:Se=!1,{dropPosition:gt,dropLevelOffset:Tt,dropTargetKey:vt.key,dropTargetPos:vt.pos,dragOverNodeKey:yt,dropContainerKey:gt===0?null:((He=vt.parent)===null||He===void 0?void 0:He.key)||null,dropAllowed:Se}}function z(me,xe){if(me){var Ae=xe.multiple;return Ae?me.slice():me.length?[me[0]]:me}}var oe=function(xe){return xe};function ie(me,xe){if(!me)return[];var Ae=xe||{},De=Ae.processProps,Fe=De===void 0?oe:De,je=Array.isArray(me)?me:[me];return je.map(function(Le){var Be=Le.children,Ue=_objectWithoutProperties(Le,be),Je=ie(Be,xe);return React.createElement(TreeNode,_extends({key:Ue.key},Fe(Ue)),Je)})}function le(me){if(!me)return null;var xe;if(Array.isArray(me))xe={checkedKeys:me,halfCheckedKeys:void 0};else if((0,Ft.Z)(me)==="object")xe={checkedKeys:me.checked||void 0,halfCheckedKeys:me.halfChecked||void 0};else return(0,ae.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return xe}function ue(me,xe){var Ae=new Set;function De(Fe){if(!Ae.has(Fe)){var je=(0,fe.Z)(xe,Fe);if(je){Ae.add(Fe);var Le=je.parent,Be=je.node;Be.disabled||Le&&De(Le.key)}}}return(me||[]).forEach(function(Fe){De(Fe)}),(0,st.Z)(Ae)}},17341:function(Sn,vn,ot){"use strict";ot.d(vn,{S:function(){return pe}});var st=ot(80334),Ft=ot(35381);function ae(be,Ee){var we=new Set;return be.forEach(function(Te){Ee.has(Te)||we.add(Te)}),we}function Ge(be){var Ee=be||{},we=Ee.disabled,Te=Ee.disableCheckbox,ve=Ee.checkable;return!!(we||Te)||ve===!1}function Re(be,Ee,we,Te){for(var ve=new Set(be),Pe=new Set,de=0;de<=we;de+=1){var ee=Ee.get(de)||new Set;ee.forEach(function(le){var ue=le.key,me=le.node,xe=le.children,Ae=xe===void 0?[]:xe;ve.has(ue)&&!Te(me)&&Ae.filter(function(De){return!Te(De.node)}).forEach(function(De){ve.add(De.key)})})}for(var z=new Set,oe=we;oe>=0;oe-=1){var ie=Ee.get(oe)||new Set;ie.forEach(function(le){var ue=le.parent,me=le.node;if(!(Te(me)||!le.parent||z.has(le.parent.key))){if(Te(le.parent.node)){z.add(ue.key);return}var xe=!0,Ae=!1;(ue.children||[]).filter(function(De){return!Te(De.node)}).forEach(function(De){var Fe=De.key,je=ve.has(Fe);xe&&!je&&(xe=!1),!Ae&&(je||Pe.has(Fe))&&(Ae=!0)}),xe&&ve.add(ue.key),Ae&&Pe.add(ue.key),z.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(ae(Pe,ve))}}function fe(be,Ee,we,Te,ve){for(var Pe=new Set(be),de=new Set(Ee),ee=0;ee<=Te;ee+=1){var z=we.get(ee)||new Set;z.forEach(function(ue){var me=ue.key,xe=ue.node,Ae=ue.children,De=Ae===void 0?[]:Ae;!Pe.has(me)&&!de.has(me)&&!ve(xe)&&De.filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){Pe.delete(Fe.key)})})}de=new Set;for(var oe=new Set,ie=Te;ie>=0;ie-=1){var le=we.get(ie)||new Set;le.forEach(function(ue){var me=ue.parent,xe=ue.node;if(!(ve(xe)||!ue.parent||oe.has(ue.parent.key))){if(ve(ue.parent.node)){oe.add(me.key);return}var Ae=!0,De=!1;(me.children||[]).filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){var je=Fe.key,Le=Pe.has(je);Ae&&!Le&&(Ae=!1),!De&&(Le||de.has(je))&&(De=!0)}),Ae||Pe.delete(me.key),De&&de.add(me.key),oe.add(me.key)}})}return{checkedKeys:Array.from(Pe),halfCheckedKeys:Array.from(ae(de,Pe))}}function pe(be,Ee,we,Te){var ve=[],Pe;Te?Pe=Te:Pe=Ge;var de=new Set(be.filter(function(ie){var le=!!(0,Ft.Z)(we,ie);return le||ve.push(ie),le})),ee=new Map,z=0;Object.keys(we).forEach(function(ie){var le=we[ie],ue=le.level,me=ee.get(ue);me||(me=new Set,ee.set(ue,me)),me.add(le),z=Math.max(z,ue)}),(0,st.ZP)(!ve.length,"Tree missing follow keys: ".concat(ve.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var oe;return Ee===!0?oe=Re(de,ee,z,Pe):oe=fe(de,Ee.halfCheckedKeys,ee,z,Pe),oe}},35381:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return st}});function st(Ft,ae){return Ft[ae]}},1089:function(Sn,vn,ot){"use strict";ot.d(vn,{F:function(){return ue},H8:function(){return le},I8:function(){return ie},km:function(){return ve},oH:function(){return z},w$:function(){return Pe},zn:function(){return ee}});var st=ot(71002),Ft=ot(74902),ae=ot(1413),Ge=ot(45987),Re=ot(50344),fe=ot(98423),pe=ot(80334),be=ot(35381),Ee=["children"];function we(me,xe){return"".concat(me,"-").concat(xe)}function Te(me){return me&&me.type&&me.type.isTreeNode}function ve(me,xe){return me!=null?me:xe}function Pe(me){var xe=me||{},Ae=xe.title,De=xe._title,Fe=xe.key,je=xe.children,Le=Ae||"title";return{title:Le,_title:De||[Le],key:Fe||"key",children:je||"children"}}function de(me,xe){var Ae=new Map;function De(Fe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Le){var Be=Le[xe.key],Ue=Le[xe.children];warning(Be!=null,"Tree node must have a certain key: [".concat(je).concat(Be,"]"));var Je=String(Be);warning(!Ae.has(Je)||Be===null||Be===void 0,"Same 'key' exist in the Tree: ".concat(Je)),Ae.set(Je,!0),De(Ue,"".concat(je).concat(Je," > "))})}De(me)}function ee(me){function xe(Ae){var De=(0,Re.Z)(Ae);return De.map(function(Fe){if(!Te(Fe))return(0,pe.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var je=Fe.key,Le=Fe.props,Be=Le.children,Ue=(0,Ge.Z)(Le,Ee),Je=(0,ae.Z)({key:je},Ue),He=xe(Be);return He.length&&(Je.children=He),Je}).filter(function(Fe){return Fe})}return xe(me)}function z(me,xe,Ae){var De=Pe(Ae),Fe=De._title,je=De.key,Le=De.children,Be=new Set(xe===!0?[]:xe),Ue=[];function Je(He){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return He.map(function(at,ft){for(var mt=we(We?We.pos:"0",ft),Lt=ve(at[je],mt),Xe,et=0;et<Fe.length;et+=1){var lt=Fe[et];if(at[lt]!==void 0){Xe=at[lt];break}}var vt=Object.assign((0,fe.Z)(at,[].concat((0,Ft.Z)(Fe),[je,Le])),{title:Xe,key:Lt,parent:We,pos:mt,children:null,data:at,isStart:[].concat((0,Ft.Z)(We?We.isStart:[]),[ft===0]),isEnd:[].concat((0,Ft.Z)(We?We.isEnd:[]),[ft===He.length-1])});return Ue.push(vt),xe===!0||Be.has(Lt)?vt.children=Je(at[Le]||[],vt):vt.children=[],vt})}return Je(me),Ue}function oe(me,xe,Ae){var De={};(0,st.Z)(Ae)==="object"?De=Ae:De={externalGetKey:Ae},De=De||{};var Fe=De,je=Fe.childrenPropName,Le=Fe.externalGetKey,Be=Fe.fieldNames,Ue=Pe(Be),Je=Ue.key,He=Ue.children,We=je||He,at;Le?typeof Le=="string"?at=function(Lt){return Lt[Le]}:typeof Le=="function"&&(at=function(Lt){return Le(Lt)}):at=function(Lt,Xe){return ve(Lt[Je],Xe)};function ft(mt,Lt,Xe,et){var lt=mt?mt[We]:me,vt=mt?we(Xe.pos,Lt):"0",wt=mt?[].concat((0,Ft.Z)(et),[mt]):[];if(mt){var ht=at(mt,vt),dt={node:mt,index:Lt,pos:vt,key:ht,parentPos:Xe.node?Xe.pos:null,level:Xe.level+1,nodes:wt};xe(dt)}lt&<.forEach(function(ut,Pt){ft(ut,Pt,{node:mt,pos:vt,level:Xe?Xe.level+1:-1},wt)})}ft(null)}function ie(me){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ae=xe.initWrapper,De=xe.processEntity,Fe=xe.onProcessFinished,je=xe.externalGetKey,Le=xe.childrenPropName,Be=xe.fieldNames,Ue=arguments.length>2?arguments[2]:void 0,Je=je||Ue,He={},We={},at={posEntities:He,keyEntities:We};return Ae&&(at=Ae(at)||at),oe(me,function(ft){var mt=ft.node,Lt=ft.index,Xe=ft.pos,et=ft.key,lt=ft.parentPos,vt=ft.level,wt=ft.nodes,ht={node:mt,nodes:wt,index:Lt,key:et,pos:Xe,level:vt},dt=ve(et,Xe);He[Xe]=ht,We[dt]=ht,ht.parent=He[lt],ht.parent&&(ht.parent.children=ht.parent.children||[],ht.parent.children.push(ht)),De&&De(ht,at)},{externalGetKey:Je,childrenPropName:Le,fieldNames:Be}),Fe&&Fe(at),at}function le(me,xe){var Ae=xe.expandedKeys,De=xe.selectedKeys,Fe=xe.loadedKeys,je=xe.loadingKeys,Le=xe.checkedKeys,Be=xe.halfCheckedKeys,Ue=xe.dragOverNodeKey,Je=xe.dropPosition,He=xe.keyEntities,We=(0,be.Z)(He,me),at={eventKey:me,expanded:Ae.indexOf(me)!==-1,selected:De.indexOf(me)!==-1,loaded:Fe.indexOf(me)!==-1,loading:je.indexOf(me)!==-1,checked:Le.indexOf(me)!==-1,halfChecked:Be.indexOf(me)!==-1,pos:String(We?We.pos:""),dragOver:Ue===me&&Je===0,dragOverGapTop:Ue===me&&Je===-1,dragOverGapBottom:Ue===me&&Je===1};return at}function ue(me){var xe=me.data,Ae=me.expanded,De=me.selected,Fe=me.checked,je=me.loaded,Le=me.loading,Be=me.halfChecked,Ue=me.dragOver,Je=me.dragOverGapTop,He=me.dragOverGapBottom,We=me.pos,at=me.active,ft=me.eventKey,mt=(0,ae.Z)((0,ae.Z)({},xe),{},{expanded:Ae,selected:De,checked:Fe,loaded:je,loading:Le,halfChecked:Be,dragOver:Ue,dragOverGapTop:Je,dragOverGapBottom:He,pos:We,active:at,key:ft});return"props"in mt||Object.defineProperty(mt,"props",{get:function(){return(0,pe.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),me}}),mt}},36356:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return ft}});var st=ot(87462),Ft=ot(15671),ae=ot(43144),Ge=ot(97326),Re=ot(60136),fe=ot(29388),pe=ot(4942),be=ot(67294),Ee=ot(1413),we=ot(45987),Te=ot(71002),ve=ot(74165),Pe=ot(15861),de=ot(74902),ee=ot(94184),z=ot.n(ee),oe=ot(64217),ie=ot(80334),le=function(mt,Lt){if(mt&&Lt){var Xe=Array.isArray(Lt)?Lt:Lt.split(","),et=mt.name||"",lt=mt.type||"",vt=lt.replace(/\/.*$/,"");return Xe.some(function(wt){var ht=wt.trim();if(/^\*(\/\*)?$/.test(wt))return!0;if(ht.charAt(0)==="."){var dt=et.toLowerCase(),ut=ht.toLowerCase(),Pt=[ut];return(ut===".jpg"||ut===".jpeg")&&(Pt=[".jpg",".jpeg"]),Pt.some(function(yt){return dt.endsWith(yt)})}return/\/\*$/.test(ht)?vt===ht.replace(/\/.*$/,""):lt===ht?!0:/^\w+$/.test(ht)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(ht,"'.Skip for check.")),!0):!1})}return!0};function ue(mt,Lt){var Xe="cannot ".concat(mt.method," ").concat(mt.action," ").concat(Lt.status,"'"),et=new Error(Xe);return et.status=Lt.status,et.method=mt.method,et.url=mt.action,et}function me(mt){var Lt=mt.responseText||mt.response;if(!Lt)return Lt;try{return JSON.parse(Lt)}catch(Xe){return Lt}}function xe(mt){var Lt=new XMLHttpRequest;mt.onProgress&&Lt.upload&&(Lt.upload.onprogress=function(vt){vt.total>0&&(vt.percent=vt.loaded/vt.total*100),mt.onProgress(vt)});var Xe=new FormData;mt.data&&Object.keys(mt.data).forEach(function(lt){var vt=mt.data[lt];if(Array.isArray(vt)){vt.forEach(function(wt){Xe.append("".concat(lt,"[]"),wt)});return}Xe.append(lt,vt)}),mt.file instanceof Blob?Xe.append(mt.filename,mt.file,mt.file.name):Xe.append(mt.filename,mt.file),Lt.onerror=function(vt){mt.onError(vt)},Lt.onload=function(){return Lt.status<200||Lt.status>=300?mt.onError(ue(mt,Lt),me(Lt)):mt.onSuccess(me(Lt),Lt)},Lt.open(mt.method,mt.action,!0),mt.withCredentials&&"withCredentials"in Lt&&(Lt.withCredentials=!0);var et=mt.headers||{};return et["X-Requested-With"]!==null&&Lt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(et).forEach(function(lt){et[lt]!==null&&Lt.setRequestHeader(lt,et[lt])}),Lt.send(Xe),{abort:function(){Lt.abort()}}}var Ae=function(){var mt=(0,Pe.Z)((0,ve.Z)().mark(function Lt(Xe,et){var lt,vt,wt,ht,dt,ut,Pt,yt;return(0,ve.Z)().wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:ut=function(){return ut=(0,Pe.Z)((0,ve.Z)().mark(function Ye(Ze){return(0,ve.Z)().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.abrupt("return",new Promise(function($e){Ze.file(function(nt){et(nt)?(Ze.fullPath&&!nt.webkitRelativePath&&(Object.defineProperties(nt,{webkitRelativePath:{writable:!0}}),nt.webkitRelativePath=Ze.fullPath.replace(/^\//,""),Object.defineProperties(nt,{webkitRelativePath:{writable:!1}})),$e(nt)):$e(null)})}));case 1:case"end":return Ne.stop()}},Ye)})),ut.apply(this,arguments)},dt=function(Ye){return ut.apply(this,arguments)},ht=function(){return ht=(0,Pe.Z)((0,ve.Z)().mark(function Ye(Ze){var Se,Ne,$e,nt,Ie;return(0,ve.Z)().wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:Se=Ze.createReader(),Ne=[];case 2:return Ve.next=5,new Promise(function(it){Se.readEntries(it,function(){return it([])})});case 5:if($e=Ve.sent,nt=$e.length,nt){Ve.next=9;break}return Ve.abrupt("break",12);case 9:for(Ie=0;Ie<nt;Ie++)Ne.push($e[Ie]);Ve.next=2;break;case 12:return Ve.abrupt("return",Ne);case 13:case"end":return Ve.stop()}},Ye)})),ht.apply(this,arguments)},wt=function(Ye){return ht.apply(this,arguments)},lt=[],vt=[],Xe.forEach(function(ct){return vt.push(ct.webkitGetAsEntry())}),Pt=function(){var ct=(0,Pe.Z)((0,ve.Z)().mark(function Ye(Ze,Se){var Ne,$e;return(0,ve.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Ze){Ie.next=2;break}return Ie.abrupt("return");case 2:if(Ze.path=Se||"",!Ze.isFile){Ie.next=10;break}return Ie.next=6,dt(Ze);case 6:Ne=Ie.sent,Ne&<.push(Ne),Ie.next=15;break;case 10:if(!Ze.isDirectory){Ie.next=15;break}return Ie.next=13,wt(Ze);case 13:$e=Ie.sent,vt.push.apply(vt,(0,de.Z)($e));case 15:case"end":return Ie.stop()}},Ye)}));return function(Ze,Se){return ct.apply(this,arguments)}}(),yt=0;case 9:if(!(yt<vt.length)){Tt.next=15;break}return Tt.next=12,Pt(vt[yt]);case 12:yt++,Tt.next=9;break;case 15:return Tt.abrupt("return",lt);case 16:case"end":return Tt.stop()}},Lt)}));return function(Xe,et){return mt.apply(this,arguments)}}(),De=Ae,Fe=+new Date,je=0;function Le(){return"rc-upload-".concat(Fe,"-").concat(++je)}var Be=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],Ue=function(mt){(0,Re.Z)(Xe,mt);var Lt=(0,fe.Z)(Xe);function Xe(){var et;(0,Ft.Z)(this,Xe);for(var lt=arguments.length,vt=new Array(lt),wt=0;wt<lt;wt++)vt[wt]=arguments[wt];return et=Lt.call.apply(Lt,[this].concat(vt)),(0,pe.Z)((0,Ge.Z)(et),"state",{uid:Le()}),(0,pe.Z)((0,Ge.Z)(et),"reqs",{}),(0,pe.Z)((0,Ge.Z)(et),"fileInput",void 0),(0,pe.Z)((0,Ge.Z)(et),"_isMounted",void 0),(0,pe.Z)((0,Ge.Z)(et),"onChange",function(ht){var dt=et.props,ut=dt.accept,Pt=dt.directory,yt=ht.target.files,gt=(0,de.Z)(yt).filter(function(Tt){return!Pt||le(Tt,ut)});et.uploadFiles(gt),et.reset()}),(0,pe.Z)((0,Ge.Z)(et),"onClick",function(ht){var dt=et.fileInput;if(dt){var ut=ht.target,Pt=et.props.onClick;if(ut&&ut.tagName==="BUTTON"){var yt=dt.parentNode;yt.focus(),ut.blur()}dt.click(),Pt&&Pt(ht)}}),(0,pe.Z)((0,Ge.Z)(et),"onKeyDown",function(ht){ht.key==="Enter"&&et.onClick(ht)}),(0,pe.Z)((0,Ge.Z)(et),"onFileDrop",function(){var ht=(0,Pe.Z)((0,ve.Z)().mark(function dt(ut){var Pt,yt,gt;return(0,ve.Z)().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(Pt=et.props.multiple,ut.preventDefault(),ut.type!=="dragover"){ct.next=4;break}return ct.abrupt("return");case 4:if(!et.props.directory){ct.next=11;break}return ct.next=7,De(Array.prototype.slice.call(ut.dataTransfer.items),function(Ye){return le(Ye,et.props.accept)});case 7:yt=ct.sent,et.uploadFiles(yt),ct.next=14;break;case 11:gt=(0,de.Z)(ut.dataTransfer.files).filter(function(Ye){return le(Ye,et.props.accept)}),Pt===!1&&(gt=gt.slice(0,1)),et.uploadFiles(gt);case 14:case"end":return ct.stop()}},dt)}));return function(dt){return ht.apply(this,arguments)}}()),(0,pe.Z)((0,Ge.Z)(et),"uploadFiles",function(ht){var dt=(0,de.Z)(ht),ut=dt.map(function(Pt){return Pt.uid=Le(),et.processFile(Pt,dt)});Promise.all(ut).then(function(Pt){var yt=et.props.onBatchStart;yt==null||yt(Pt.map(function(gt){var Tt=gt.origin,ct=gt.parsedFile;return{file:Tt,parsedFile:ct}})),Pt.filter(function(gt){return gt.parsedFile!==null}).forEach(function(gt){et.post(gt)})})}),(0,pe.Z)((0,Ge.Z)(et),"processFile",function(){var ht=(0,Pe.Z)((0,ve.Z)().mark(function dt(ut,Pt){var yt,gt,Tt,ct,Ye,Ze,Se,Ne,$e;return(0,ve.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(yt=et.props.beforeUpload,gt=ut,!yt){Ie.next=14;break}return Ie.prev=3,Ie.next=6,yt(ut,Pt);case 6:gt=Ie.sent,Ie.next=12;break;case 9:Ie.prev=9,Ie.t0=Ie.catch(3),gt=!1;case 12:if(gt!==!1){Ie.next=14;break}return Ie.abrupt("return",{origin:ut,parsedFile:null,action:null,data:null});case 14:if(Tt=et.props.action,typeof Tt!="function"){Ie.next=21;break}return Ie.next=18,Tt(ut);case 18:ct=Ie.sent,Ie.next=22;break;case 21:ct=Tt;case 22:if(Ye=et.props.data,typeof Ye!="function"){Ie.next=29;break}return Ie.next=26,Ye(ut);case 26:Ze=Ie.sent,Ie.next=30;break;case 29:Ze=Ye;case 30:return Se=((0,Te.Z)(gt)==="object"||typeof gt=="string")&>?gt:ut,Se instanceof File?Ne=Se:Ne=new File([Se],ut.name,{type:ut.type}),$e=Ne,$e.uid=ut.uid,Ie.abrupt("return",{origin:ut,data:Ze,parsedFile:$e,action:ct});case 35:case"end":return Ie.stop()}},dt,null,[[3,9]])}));return function(dt,ut){return ht.apply(this,arguments)}}()),(0,pe.Z)((0,Ge.Z)(et),"saveFileInput",function(ht){et.fileInput=ht}),et}return(0,ae.Z)(Xe,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(lt){var vt=this,wt=lt.data,ht=lt.origin,dt=lt.action,ut=lt.parsedFile;if(this._isMounted){var Pt=this.props,yt=Pt.onStart,gt=Pt.customRequest,Tt=Pt.name,ct=Pt.headers,Ye=Pt.withCredentials,Ze=Pt.method,Se=ht.uid,Ne=gt||xe,$e={action:dt,filename:Tt,data:wt,file:ut,headers:ct,withCredentials:Ye,method:Ze||"post",onProgress:function(Ie){var ze=vt.props.onProgress;ze==null||ze(Ie,ut)},onSuccess:function(Ie,ze){var Ve=vt.props.onSuccess;Ve==null||Ve(Ie,ut,ze),delete vt.reqs[Se]},onError:function(Ie,ze){var Ve=vt.props.onError;Ve==null||Ve(Ie,ze,ut),delete vt.reqs[Se]}};yt(ht),this.reqs[Se]=Ne($e)}}},{key:"reset",value:function(){this.setState({uid:Le()})}},{key:"abort",value:function(lt){var vt=this.reqs;if(lt){var wt=lt.uid?lt.uid:lt;vt[wt]&&vt[wt].abort&&vt[wt].abort(),delete vt[wt]}else Object.keys(vt).forEach(function(ht){vt[ht]&&vt[ht].abort&&vt[ht].abort(),delete vt[ht]})}},{key:"render",value:function(){var lt=this.props,vt=lt.component,wt=lt.prefixCls,ht=lt.className,dt=lt.classNames,ut=dt===void 0?{}:dt,Pt=lt.disabled,yt=lt.id,gt=lt.name,Tt=lt.style,ct=lt.styles,Ye=ct===void 0?{}:ct,Ze=lt.multiple,Se=lt.accept,Ne=lt.capture,$e=lt.children,nt=lt.directory,Ie=lt.openFileDialogOnClick,ze=lt.onMouseEnter,Ve=lt.onMouseLeave,it=lt.hasControlInside,St=(0,we.Z)(lt,Be),Ct=z()((0,pe.Z)((0,pe.Z)((0,pe.Z)({},wt,!0),"".concat(wt,"-disabled"),Pt),ht,ht)),It=nt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},jt=Pt?{}:{onClick:Ie?this.onClick:function(){},onKeyDown:Ie?this.onKeyDown:function(){},onMouseEnter:ze,onMouseLeave:Ve,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:it?void 0:"0"};return be.createElement(vt,(0,st.Z)({},jt,{className:Ct,role:it?void 0:"button",style:Tt}),be.createElement("input",(0,st.Z)({},(0,oe.Z)(St,{aria:!0,data:!0}),{id:yt,name:gt,disabled:Pt,type:"file",ref:this.saveFileInput,onClick:function(an){return an.stopPropagation()},key:this.state.uid,style:(0,Ee.Z)({display:"none"},Ye.input),className:ut.input,accept:Se},It,{multiple:Ze,onChange:this.onChange},Ne!=null?{capture:Ne}:{})),$e)}}]),Xe}(be.Component),Je=Ue;function He(){}var We=function(mt){(0,Re.Z)(Xe,mt);var Lt=(0,fe.Z)(Xe);function Xe(){var et;(0,Ft.Z)(this,Xe);for(var lt=arguments.length,vt=new Array(lt),wt=0;wt<lt;wt++)vt[wt]=arguments[wt];return et=Lt.call.apply(Lt,[this].concat(vt)),(0,pe.Z)((0,Ge.Z)(et),"uploader",void 0),(0,pe.Z)((0,Ge.Z)(et),"saveUploader",function(ht){et.uploader=ht}),et}return(0,ae.Z)(Xe,[{key:"abort",value:function(lt){this.uploader.abort(lt)}},{key:"render",value:function(){return be.createElement(Je,(0,st.Z)({},this.props,{ref:this.saveUploader}))}}]),Xe}(be.Component);(0,pe.Z)(We,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:He,onError:He,onSuccess:He,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var at=We,ft=at},73299:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return ro}});var st=ot(87462),Ft=ot(1413),ae=ot(71002),Ge=ot(97685),Re=ot(4942),fe=ot(45987),pe=ot(67294),be=ot(73935),Ee=ot(94184),we=ot.n(Ee),Te=ot(48555),ve=pe.forwardRef(function(Nn,Qe){var Pn=Nn.height,An=Nn.offsetY,Lr=Nn.offsetX,Dn=Nn.children,Zn=Nn.prefixCls,nr=Nn.onInnerResize,Jr=Nn.innerProps,nn=Nn.rtl,ln=Nn.extra,Vt={},cn={display:"flex",flexDirection:"column"};if(An!==void 0){var Qn;Vt={height:Pn,position:"relative",overflow:"hidden"},cn=(0,Ft.Z)((0,Ft.Z)({},cn),{},(Qn={transform:"translateY(".concat(An,"px)")},(0,Re.Z)(Qn,nn?"marginRight":"marginLeft",-Lr),(0,Re.Z)(Qn,"position","absolute"),(0,Re.Z)(Qn,"left",0),(0,Re.Z)(Qn,"right",0),(0,Re.Z)(Qn,"top",0),Qn))}return pe.createElement("div",{style:Vt},pe.createElement(Te.Z,{onResize:function(or){var en=or.offsetHeight;en&&nr&&nr()}},pe.createElement("div",(0,st.Z)({style:cn,className:we()((0,Re.Z)({},"".concat(Zn,"-holder-inner"),Zn)),ref:Qe},Jr),Dn,ln)))});ve.displayName="Filler";var Pe=ve,de=function(Qe){return+setTimeout(Qe,16)},ee=function(Qe){return clearTimeout(Qe)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(de=function(Qe){return window.requestAnimationFrame(Qe)},ee=function(Qe){return window.cancelAnimationFrame(Qe)});var z=0,oe=new Map;function ie(Nn){oe.delete(Nn)}var le=function(Qe){var Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;z+=1;var An=z;function Lr(Dn){if(Dn===0)ie(An),Qe();else{var Zn=de(function(){Lr(Dn-1)});oe.set(An,Zn)}}return Lr(Pn),An};le.cancel=function(Nn){var Qe=oe.get(Nn);return ie(Qe),ee(Qe)};var ue=le;function me(Nn,Qe){var Pn="touches"in Nn?Nn.touches[0]:Nn;return Pn[Qe?"pageX":"pageY"]}var xe=pe.forwardRef(function(Nn,Qe){var Pn,An=Nn.prefixCls,Lr=Nn.rtl,Dn=Nn.scrollOffset,Zn=Nn.scrollRange,nr=Nn.onStartMove,Jr=Nn.onStopMove,nn=Nn.onScroll,ln=Nn.horizontal,Vt=Nn.spinSize,cn=Nn.containerSize,Qn=Nn.style,rr=Nn.thumbStyle,or=pe.useState(!1),en=(0,Ge.Z)(or,2),Tn=en[0],Sr=en[1],Vr=pe.useState(null),Wn=(0,Ge.Z)(Vr,2),$t=Wn[0],cr=Wn[1],yr=pe.useState(null),Nr=(0,Ge.Z)(yr,2),xn=Nr[0],gr=Nr[1],hi=!Lr,Wi=pe.useRef(),zi=pe.useRef(),sr=pe.useState(!1),dr=(0,Ge.Z)(sr,2),Ar=dr[0],ii=dr[1],Zr=pe.useRef(),In=function(){clearTimeout(Zr.current),ii(!0),Zr.current=setTimeout(function(){ii(!1)},3e3)},Cr=Zn-cn||0,la=cn-Vt||0,Ho=Cr>0,zo=pe.useMemo(function(){if(Dn===0||Cr===0)return 0;var Pi=Dn/Cr;return Pi*la},[Dn,Cr,la]),tn=function(Ji){Ji.stopPropagation(),Ji.preventDefault()},Xr=pe.useRef({top:zo,dragging:Tn,pageY:$t,startTop:xn});Xr.current={top:zo,dragging:Tn,pageY:$t,startTop:xn};var yi=function(Ji){Sr(!0),cr(me(Ji,ln)),gr(Xr.current.top),nr(),Ji.stopPropagation(),Ji.preventDefault()};pe.useEffect(function(){var Pi=function(bn){bn.preventDefault()},Ji=Wi.current,kn=zi.current;return Ji.addEventListener("touchstart",Pi),kn.addEventListener("touchstart",yi),function(){Ji.removeEventListener("touchstart",Pi),kn.removeEventListener("touchstart",yi)}},[]);var xr=pe.useRef();xr.current=Cr;var Po=pe.useRef();Po.current=la,pe.useEffect(function(){if(Tn){var Pi,Ji=function(bn){var Ni=Xr.current,ya=Ni.dragging,Zt=Ni.pageY,Jt=Ni.startTop;if(ue.cancel(Pi),ya){var dn=me(bn,ln)-Zt,Fn=Jt;!hi&&ln?Fn-=dn:Fn+=dn;var pr=xr.current,oi=Po.current,_r=oi?Fn/oi:0,Kn=Math.ceil(_r*pr);Kn=Math.max(Kn,0),Kn=Math.min(Kn,pr),Pi=ue(function(){nn(Kn,ln)})}},kn=function(){Sr(!1),Jr()};return window.addEventListener("mousemove",Ji),window.addEventListener("touchmove",Ji),window.addEventListener("mouseup",kn),window.addEventListener("touchend",kn),function(){window.removeEventListener("mousemove",Ji),window.removeEventListener("touchmove",Ji),window.removeEventListener("mouseup",kn),window.removeEventListener("touchend",kn),ue.cancel(Pi)}}},[Tn]),pe.useEffect(function(){In()},[Dn]),pe.useImperativeHandle(Qe,function(){return{delayHidden:In}});var Li="".concat(An,"-scrollbar"),Bi={position:"absolute",visibility:Ar&&Ho?null:"hidden"},Mi={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ln?(Bi.height=8,Bi.left=0,Bi.right=0,Bi.bottom=0,Mi.height="100%",Mi.width=Vt,hi?Mi.left=zo:Mi.right=zo):(Bi.width=8,Bi.top=0,Bi.bottom=0,hi?Bi.right=0:Bi.left=0,Mi.width="100%",Mi.height=Vt,Mi.top=zo),pe.createElement("div",{ref:Wi,className:we()(Li,(Pn={},(0,Re.Z)(Pn,"".concat(Li,"-horizontal"),ln),(0,Re.Z)(Pn,"".concat(Li,"-vertical"),!ln),(0,Re.Z)(Pn,"".concat(Li,"-visible"),Ar),Pn)),style:(0,Ft.Z)((0,Ft.Z)({},Bi),Qn),onMouseDown:tn,onMouseMove:In},pe.createElement("div",{ref:zi,className:we()("".concat(Li,"-thumb"),(0,Re.Z)({},"".concat(Li,"-thumb-moving"),Tn)),style:(0,Ft.Z)((0,Ft.Z)({},Mi),rr),onMouseDown:yi}))}),Ae=xe;function De(Nn){var Qe=Nn.children,Pn=Nn.setRef,An=pe.useCallback(function(Lr){Pn(Lr)},[]);return pe.cloneElement(Qe,{ref:An})}function Fe(Nn,Qe,Pn,An,Lr,Dn,Zn){var nr=Zn.getKey;return Nn.slice(Qe,Pn+1).map(function(Jr,nn){var ln=Qe+nn,Vt=Dn(Jr,ln,{style:{width:An}}),cn=nr(Jr);return pe.createElement(De,{key:cn,setRef:function(rr){return Lr(Jr,rr)}},Vt)})}function je(Nn){return Nn instanceof HTMLElement||Nn instanceof SVGElement}function Le(Nn){return je(Nn)?Nn:Nn instanceof pe.Component?be.findDOMNode(Nn):null}var Be=ot(15671),Ue=ot(43144),Je=function(){function Nn(){(0,Be.Z)(this,Nn),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,Ue.Z)(Nn,[{key:"set",value:function(Pn,An){this.maps[Pn]=An,this.id+=1}},{key:"get",value:function(Pn){return this.maps[Pn]}}]),Nn}(),He=Je;function We(Nn,Qe,Pn){var An=pe.useState(0),Lr=(0,Ge.Z)(An,2),Dn=Lr[0],Zn=Lr[1],nr=(0,pe.useRef)(new Map),Jr=(0,pe.useRef)(new He),nn=(0,pe.useRef)();function ln(){ue.cancel(nn.current)}function Vt(){var Qn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ln();var rr=function(){nr.current.forEach(function(en,Tn){if(en&&en.offsetParent){var Sr=Le(en),Vr=Sr.offsetHeight;Jr.current.get(Tn)!==Vr&&Jr.current.set(Tn,Sr.offsetHeight)}}),Zn(function(en){return en+1})};Qn?rr():nn.current=ue(rr)}function cn(Qn,rr){var or=Nn(Qn),en=nr.current.get(or);rr?(nr.current.set(or,rr),Vt()):nr.current.delete(or),!en!=!rr&&(rr?Qe==null||Qe(Qn):Pn==null||Pn(Qn))}return(0,pe.useEffect)(function(){return ln},[]),[cn,Vt,Jr.current,Dn]}function at(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ft=at()?pe.useLayoutEffect:pe.useEffect,mt=function(Qe,Pn){var An=pe.useRef(!0);ft(function(){return Qe(An.current)},Pn),ft(function(){return An.current=!1,function(){An.current=!0}},[])},Lt=function(Qe,Pn){mt(function(An){if(!An)return Qe()},Pn)},Xe=mt;function et(Nn){var Qe=pe.useRef();Qe.current=Nn;var Pn=pe.useCallback(function(){for(var An,Lr=arguments.length,Dn=new Array(Lr),Zn=0;Zn<Lr;Zn++)Dn[Zn]=arguments[Zn];return(An=Qe.current)===null||An===void 0?void 0:An.call.apply(An,[Qe].concat(Dn))},[]);return Pn}function lt(Nn){var Qe=React.useRef(!1),Pn=React.useState(Nn),An=_slicedToArray(Pn,2),Lr=An[0],Dn=An[1];React.useEffect(function(){return Qe.current=!1,function(){Qe.current=!0}},[]);function Zn(nr,Jr){Jr&&Qe.current||Dn(nr)}return[Lr,Zn]}function vt(Nn){return Nn!==void 0}function wt(Nn,Qe){var Pn=Qe||{},An=Pn.defaultValue,Lr=Pn.value,Dn=Pn.onChange,Zn=Pn.postState,nr=useState(function(){return vt(Lr)?Lr:vt(An)?typeof An=="function"?An():An:typeof Nn=="function"?Nn():Nn}),Jr=_slicedToArray(nr,2),nn=Jr[0],ln=Jr[1],Vt=Lr!==void 0?Lr:nn,cn=Zn?Zn(Vt):Vt,Qn=useEvent(Dn),rr=useState([Vt]),or=_slicedToArray(rr,2),en=or[0],Tn=or[1];useLayoutUpdateEffect(function(){var Vr=en[0];nn!==Vr&&Qn(nn,Vr)},[en]),useLayoutUpdateEffect(function(){vt(Lr)||ln(Lr)},[Lr]);var Sr=useEvent(function(Vr,Wn){ln(Vr,Wn),Tn([Vt],Wn)});return[cn,Sr]}var ht=ot(31461);function dt(Nn,Qe,Pn){var An=React.useRef({});return(!("value"in An.current)||Pn(An.current.condition,Qe))&&(An.current.value=Nn(),An.current.condition=Qe),An.current.value}function ut(Nn,Qe){typeof Nn=="function"?Nn(Qe):_typeof(Nn)==="object"&&Nn&&"current"in Nn&&(Nn.current=Qe)}function Pt(){for(var Nn=arguments.length,Qe=new Array(Nn),Pn=0;Pn<Nn;Pn++)Qe[Pn]=arguments[Pn];var An=Qe.filter(function(Lr){return Lr});return An.length<=1?An[0]:function(Lr){Qe.forEach(function(Dn){ut(Dn,Lr)})}}function yt(){for(var Nn=arguments.length,Qe=new Array(Nn),Pn=0;Pn<Nn;Pn++)Qe[Pn]=arguments[Pn];return useMemo(function(){return Pt.apply(void 0,Qe)},Qe,function(An,Lr){return An.length!==Lr.length||An.every(function(Dn,Zn){return Dn!==Lr[Zn]})})}function gt(Nn){var Qe,Pn,An=isMemo(Nn)?Nn.type.type:Nn.type;return!(typeof An=="function"&&!((Qe=An.prototype)!==null&&Qe!==void 0&&Qe.render)||typeof Nn=="function"&&!((Pn=Nn.prototype)!==null&&Pn!==void 0&&Pn.render))}function Tt(Nn){return!isValidElement(Nn)||isFragment(Nn)?!1:gt(Nn)}function ct(Nn,Qe,Pn,An){if(!Qe.length)return Pn;var Lr=_toArray(Qe),Dn=Lr[0],Zn=Lr.slice(1),nr;return!Nn&&typeof Dn=="number"?nr=[]:Array.isArray(Nn)?nr=_toConsumableArray(Nn):nr=_objectSpread({},Nn),An&&Pn===void 0&&Zn.length===1?delete nr[Dn][Zn[0]]:nr[Dn]=ct(nr[Dn],Zn,Pn,An),nr}function Ye(Nn,Qe,Pn){var An=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Qe.length&&An&&Pn===void 0&&!get(Nn,Qe.slice(0,-1))?Nn:ct(Nn,Qe,Pn,An)}function Ze(Nn){return _typeof(Nn)==="object"&&Nn!==null&&Object.getPrototypeOf(Nn)===Object.prototype}function Se(Nn){return Array.isArray(Nn)?[]:{}}var Ne=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function $e(){for(var Nn=arguments.length,Qe=new Array(Nn),Pn=0;Pn<Nn;Pn++)Qe[Pn]=arguments[Pn];var An=Se(Qe[0]);return Qe.forEach(function(Lr){function Dn(Zn,nr){var Jr=new Set(nr),nn=get(Lr,Zn),ln=Array.isArray(nn);if(ln||Ze(nn)){if(!Jr.has(nn)){Jr.add(nn);var Vt=get(An,Zn);ln?An=Ye(An,Zn,[]):(!Vt||_typeof(Vt)!=="object")&&(An=Ye(An,Zn,Se(nn))),Ne(nn).forEach(function(cn){Dn([].concat(_toConsumableArray(Zn),[cn]),Jr)})}}else An=Ye(An,Zn,nn)}Dn([])}),An}var nt={},Ie=[],ze=function(Qe){Ie.push(Qe)};function Ve(Nn,Qe){if(0)var Pn}function it(Nn,Qe){if(0)var Pn}function St(){nt={}}function Ct(Nn,Qe,Pn){!Qe&&!nt[Pn]&&(Nn(!1,Pn),nt[Pn]=!0)}function It(Nn,Qe){Ct(Ve,Nn,Qe)}function jt(Nn,Qe){Ct(it,Nn,Qe)}It.preMessage=ze,It.resetWarned=St,It.noteOnce=jt;var Kt=null,an=10;function un(Nn,Qe,Pn,An,Lr,Dn,Zn,nr){var Jr=pe.useRef(),nn=pe.useState(null),ln=(0,Ge.Z)(nn,2),Vt=ln[0],cn=ln[1];return Xe(function(){if(Vt&&Vt.times<an){if(!Nn.current){cn(function(In){return(0,Ft.Z)({},In)});return}Dn();var Qn=Vt.targetAlign,rr=Vt.originAlign,or=Vt.index,en=Vt.offset,Tn=Nn.current.clientHeight,Sr=!1,Vr=Qn,Wn=null;if(Tn){for(var $t=Qn||rr,cr=0,yr=0,Nr=0,xn=Math.min(Qe.length-1,or),gr=0;gr<=xn;gr+=1){var hi=Lr(Qe[gr]);yr=cr;var Wi=Pn.get(hi);Nr=yr+(Wi===void 0?An:Wi),cr=Nr}for(var zi=$t==="top"?en:Tn-en,sr=xn;sr>=0;sr-=1){var dr=Lr(Qe[sr]),Ar=Pn.get(dr);if(Ar===void 0){Sr=!0;break}if(zi-=Ar,zi<=0)break}switch($t){case"top":Wn=yr-en;break;case"bottom":Wn=Nr-Tn+en;break;default:{var ii=Nn.current.scrollTop,Zr=ii+Tn;yr<ii?Vr="top":Nr>Zr&&(Vr="bottom")}}Wn!==null&&Zn(Wn),Wn!==Vt.lastTop&&(Sr=!0)}Sr&&cn(function(In){return(0,Ft.Z)((0,Ft.Z)({},In),{},{times:In.times+1,targetAlign:Vr,lastTop:Wn})})}},[Vt,Nn.current]),function(Qn){if(Qn==null){nr();return}if(ue.cancel(Jr.current),typeof Qn=="number")Zn(Qn);else if(Qn&&(0,ae.Z)(Qn)==="object"){var rr,or=Qn.align;"index"in Qn?rr=Qn.index:rr=Qe.findIndex(function(Sr){return Lr(Sr)===Qn.key});var en=Qn.offset,Tn=en===void 0?0:en;cn({times:0,index:rr,offset:Tn,originAlign:or})}}}function hn(Nn,Qe,Pn,An){var Lr=Pn-Nn,Dn=Qe-Pn,Zn=Math.min(Lr,Dn)*2;if(An<=Zn){var nr=Math.floor(An/2);return An%2?Pn+nr+1:Pn-nr}return Lr>Dn?Pn-(An-Dn):Pn+(An-Lr)}function qt(Nn,Qe,Pn){var An=Nn.length,Lr=Qe.length,Dn,Zn;if(An===0&&Lr===0)return null;An<Lr?(Dn=Nn,Zn=Qe):(Dn=Qe,Zn=Nn);var nr={__EMPTY_ITEM__:!0};function Jr(rr){return rr!==void 0?Pn(rr):nr}for(var nn=null,ln=Math.abs(An-Lr)!==1,Vt=0;Vt<Zn.length;Vt+=1){var cn=Jr(Dn[Vt]),Qn=Jr(Zn[Vt]);if(cn!==Qn){nn=Vt,ln=ln||cn!==Jr(Zn[Vt+1]);break}}return nn===null?null:{index:nn,multiple:ln}}function On(Nn,Qe,Pn){var An=pe.useState(Nn),Lr=(0,Ge.Z)(An,2),Dn=Lr[0],Zn=Lr[1],nr=pe.useState(null),Jr=(0,Ge.Z)(nr,2),nn=Jr[0],ln=Jr[1];return pe.useEffect(function(){var Vt=qt(Dn||[],Nn||[],Qe);(Vt==null?void 0:Vt.index)!==void 0&&(Pn==null||Pn(Vt.index),ln(Nn[Vt.index])),Zn(Nn)},[Nn]),[nn]}var fn=(typeof navigator=="undefined"?"undefined":(0,ae.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Wt=fn,Bn=function(Nn,Qe){var Pn=(0,pe.useRef)(!1),An=(0,pe.useRef)(null);function Lr(){clearTimeout(An.current),Pn.current=!0,An.current=setTimeout(function(){Pn.current=!1},50)}var Dn=(0,pe.useRef)({top:Nn,bottom:Qe});return Dn.current.top=Nn,Dn.current.bottom=Qe,function(Zn){var nr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Jr=Zn<0&&Dn.current.top||Zn>0&&Dn.current.bottom;return nr&&Jr?(clearTimeout(An.current),Pn.current=!1):(!Jr||Pn.current)&&Lr(),!Pn.current&&Jr}};function zn(Nn,Qe,Pn,An,Lr){var Dn=(0,pe.useRef)(0),Zn=(0,pe.useRef)(null),nr=(0,pe.useRef)(null),Jr=(0,pe.useRef)(!1),nn=Bn(Qe,Pn);function ln(en,Tn){ue.cancel(Zn.current),Dn.current+=Tn,nr.current=Tn,!nn(Tn)&&(Wt||en.preventDefault(),Zn.current=ue(function(){var Sr=Jr.current?10:1;Lr(Dn.current*Sr),Dn.current=0}))}function Vt(en,Tn){Lr(Tn,!0),Wt||en.preventDefault()}var cn=(0,pe.useRef)(null),Qn=(0,pe.useRef)(null);function rr(en){if(Nn){ue.cancel(Qn.current),Qn.current=ue(function(){cn.current=null},2);var Tn=en.deltaX,Sr=en.deltaY,Vr=en.shiftKey,Wn=Tn,$t=Sr;(cn.current==="sx"||!cn.current&&Vr&&Sr&&!Tn)&&(Wn=Sr,$t=0,cn.current="sx");var cr=Math.abs(Wn),yr=Math.abs($t);cn.current===null&&(cn.current=An&&cr>yr?"x":"y"),cn.current==="y"?ln(en,$t):Vt(en,Wn)}}function or(en){Nn&&(Jr.current=en.detail===nr.current)}return[rr,or]}var Yn=14/15;function fr(Nn,Qe,Pn){var An=(0,pe.useRef)(!1),Lr=(0,pe.useRef)(0),Dn=(0,pe.useRef)(null),Zn=(0,pe.useRef)(null),nr,Jr=function(cn){if(An.current){var Qn=Math.ceil(cn.touches[0].pageY),rr=Lr.current-Qn;Lr.current=Qn,Pn(rr)&&cn.preventDefault(),clearInterval(Zn.current),Zn.current=setInterval(function(){rr*=Yn,(!Pn(rr,!0)||Math.abs(rr)<=.1)&&clearInterval(Zn.current)},16)}},nn=function(){An.current=!1,nr()},ln=function(cn){nr(),cn.touches.length===1&&!An.current&&(An.current=!0,Lr.current=Math.ceil(cn.touches[0].pageY),Dn.current=cn.target,Dn.current.addEventListener("touchmove",Jr),Dn.current.addEventListener("touchend",nn))};nr=function(){Dn.current&&(Dn.current.removeEventListener("touchmove",Jr),Dn.current.removeEventListener("touchend",nn))},Xe(function(){return Nn&&Qe.current.addEventListener("touchstart",ln),function(){var Vt;(Vt=Qe.current)===null||Vt===void 0||Vt.removeEventListener("touchstart",ln),nr(),clearInterval(Zn.current)}},[Nn])}var Gr=20;function lr(){var Nn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Pn=Nn/Qe*100;return isNaN(Pn)&&(Pn=0),Pn=Math.max(Pn,Gr),Pn=Math.min(Pn,Nn/2),Math.floor(Pn)}function ni(Nn,Qe,Pn,An){var Lr=pe.useMemo(function(){return[new Map,[]]},[Nn,Pn.id,An]),Dn=(0,Ge.Z)(Lr,2),Zn=Dn[0],nr=Dn[1],Jr=function(ln){var Vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ln,cn=Zn.get(ln),Qn=Zn.get(Vt);if(cn===void 0||Qn===void 0)for(var rr=Nn.length,or=nr.length;or<rr;or+=1){var en,Tn=Nn[or],Sr=Qe(Tn);Zn.set(Sr,or);var Vr=(en=Pn.get(Sr))!==null&&en!==void 0?en:An;if(nr[or]=(nr[or-1]||0)+Vr,Sr===ln&&(cn=or),Sr===Vt&&(Qn=or),cn!==void 0&&Qn!==void 0)break}return{top:nr[cn-1]||0,bottom:nr[Qn]}};return Jr}var ri=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],ki=[],ji={overflowY:"auto",overflowAnchor:"none"};function Vi(Nn,Qe){var Pn=Nn.prefixCls,An=Pn===void 0?"rc-virtual-list":Pn,Lr=Nn.className,Dn=Nn.height,Zn=Nn.itemHeight,nr=Nn.fullHeight,Jr=nr===void 0?!0:nr,nn=Nn.style,ln=Nn.data,Vt=Nn.children,cn=Nn.itemKey,Qn=Nn.virtual,rr=Nn.direction,or=Nn.scrollWidth,en=Nn.component,Tn=en===void 0?"div":en,Sr=Nn.onScroll,Vr=Nn.onVirtualScroll,Wn=Nn.onVisibleChange,$t=Nn.innerProps,cr=Nn.extraRender,yr=Nn.styles,Nr=(0,fe.Z)(Nn,ri),xn=!!(Qn!==!1&&Dn&&Zn),gr=xn&&ln&&(Zn*ln.length>Dn||!!or),hi=rr==="rtl",Wi=we()(An,(0,Re.Z)({},"".concat(An,"-rtl"),hi),Lr),zi=ln||ki,sr=(0,pe.useRef)(),dr=(0,pe.useRef)(),Ar=(0,pe.useState)(0),ii=(0,Ge.Z)(Ar,2),Zr=ii[0],In=ii[1],Cr=(0,pe.useState)(0),la=(0,Ge.Z)(Cr,2),Ho=la[0],zo=la[1],tn=(0,pe.useState)(!1),Xr=(0,Ge.Z)(tn,2),yi=Xr[0],xr=Xr[1],Po=function(){xr(!0)},Li=function(){xr(!1)},Bi=pe.useCallback(function(mi){return typeof cn=="function"?cn(mi):mi==null?void 0:mi[cn]},[cn]),Mi={getKey:Bi};function Pi(mi){In(function(Gi){var Co;typeof mi=="function"?Co=mi(Gi):Co=mi;var Zo=jr(Co);return sr.current.scrollTop=Zo,Zo})}var Ji=(0,pe.useRef)({start:0,end:zi.length}),kn=(0,pe.useRef)(),To=On(zi,Bi),bn=(0,Ge.Z)(To,1),Ni=bn[0];kn.current=Ni;var ya=We(Bi,null,null),Zt=(0,Ge.Z)(ya,4),Jt=Zt[0],dn=Zt[1],Fn=Zt[2],pr=Zt[3],oi=pe.useMemo(function(){if(!xn)return{scrollHeight:void 0,start:0,end:zi.length-1,offset:void 0};if(!gr){var mi;return{scrollHeight:((mi=dr.current)===null||mi===void 0?void 0:mi.offsetHeight)||0,start:0,end:zi.length-1,offset:void 0}}for(var Gi=0,Co,Zo,wr,Ku=zi.length,Xs=0;Xs<Ku;Xs+=1){var xs=zi[Xs],ic=Bi(xs),ku=Fn.get(ic),ar=Gi+(ku===void 0?Zn:ku);ar>=Zr&&Co===void 0&&(Co=Xs,Zo=Gi),ar>Zr+Dn&&wr===void 0&&(wr=Xs),Gi=ar}return Co===void 0&&(Co=0,Zo=0,wr=Math.ceil(Dn/Zn)),wr===void 0&&(wr=zi.length-1),wr=Math.min(wr+1,zi.length-1),{scrollHeight:Gi,start:Co,end:wr,offset:Zo}},[gr,xn,Zr,zi,pr,Dn]),_r=oi.scrollHeight,Kn=oi.start,Et=oi.end,io=oi.offset;Ji.current.start=Kn,Ji.current.end=Et;var Ir=pe.useState({width:0,height:Dn}),gi=(0,Ge.Z)(Ir,2),oo=gi[0],Yi=gi[1],Ki=function(Gi){Yi({width:Gi.width||Gi.offsetWidth,height:Gi.height||Gi.offsetHeight})},Jo=(0,pe.useRef)(),Vo=(0,pe.useRef)(),Zi=pe.useMemo(function(){return lr(oo.width,or)},[oo.width,or]),ao=pe.useMemo(function(){return lr(oo.height,_r)},[oo.height,_r]),Mr=_r-Dn,Er=(0,pe.useRef)(Mr);Er.current=Mr;function jr(mi){var Gi=mi;return Number.isNaN(Er.current)||(Gi=Math.min(Gi,Er.current)),Gi=Math.max(Gi,0),Gi}var pn=Zr<=0,Hr=Zr>=Mr,pi=Bn(pn,Hr),vo=function(){return{x:hi?-Ho:Ho,y:Zr}},qi=(0,pe.useRef)(vo()),Ao=et(function(){if(Vr){var mi=vo();(qi.current.x!==mi.x||qi.current.y!==mi.y)&&(Vr(mi),qi.current=mi)}});function $o(mi,Gi){var Co=mi;Gi?((0,be.flushSync)(function(){zo(Co)}),Ao()):Pi(Co)}function Fa(mi){var Gi=mi.currentTarget.scrollTop;Gi!==Zr&&Pi(Gi),Sr==null||Sr(mi),Ao()}var Sa=function(Gi){var Co=Gi,Zo=or-oo.width;return Co=Math.max(Co,0),Co=Math.min(Co,Zo),Co},Zs=et(function(mi,Gi){Gi?((0,be.flushSync)(function(){zo(function(Co){var Zo=Co+(hi?-mi:mi);return Sa(Zo)})}),Ao()):Pi(function(Co){var Zo=Co+mi;return Zo})}),Bs=zn(xn,pn,Hr,!!or,Zs),on=(0,Ge.Z)(Bs,2),Da=on[0],ts=on[1];fr(xn,sr,function(mi,Gi){return pi(mi,Gi)?!1:(Da({preventDefault:function(){},deltaY:mi}),!0)}),Xe(function(){function mi(Co){xn&&Co.preventDefault()}var Gi=sr.current;return Gi.addEventListener("wheel",Da),Gi.addEventListener("DOMMouseScroll",ts),Gi.addEventListener("MozMousePixelScroll",mi),function(){Gi.removeEventListener("wheel",Da),Gi.removeEventListener("DOMMouseScroll",ts),Gi.removeEventListener("MozMousePixelScroll",mi)}},[xn]),Xe(function(){or&&zo(function(mi){return Sa(mi)})},[oo.width,or]);var Bl=function(){var Gi,Co;(Gi=Jo.current)===null||Gi===void 0||Gi.delayHidden(),(Co=Vo.current)===null||Co===void 0||Co.delayHidden()},yo=un(sr,zi,Fn,Zn,Bi,function(){return dn(!0)},Pi,Bl);pe.useImperativeHandle(Qe,function(){return{getScrollInfo:vo,scrollTo:function(Gi){function Co(Zo){return Zo&&(0,ae.Z)(Zo)==="object"&&("left"in Zo||"top"in Zo)}Co(Gi)?(Gi.left!==void 0&&zo(Sa(Gi.left)),yo(Gi.top)):yo(Gi)}}}),Xe(function(){if(Wn){var mi=zi.slice(Kn,Et+1);Wn(mi,zi)}},[Kn,Et,zi]);var ul=ni(zi,Bi,Fn,Zn),hl=cr==null?void 0:cr({start:Kn,end:Et,virtual:gr,offsetX:Ho,offsetY:io,rtl:hi,getSize:ul}),bl=Fe(zi,Kn,Et,or,Jt,Vt,Mi),bo=null;Dn&&(bo=(0,Ft.Z)((0,Re.Z)({},Jr?"height":"maxHeight",Dn),ji),xn&&(bo.overflowY="hidden",or&&(bo.overflowX="hidden"),yi&&(bo.pointerEvents="none")));var ia={};return hi&&(ia.dir="rtl"),pe.createElement("div",(0,st.Z)({style:(0,Ft.Z)((0,Ft.Z)({},nn),{},{position:"relative"}),className:Wi},ia,Nr),pe.createElement(Te.Z,{onResize:Ki},pe.createElement(Tn,{className:"".concat(An,"-holder"),style:bo,ref:sr,onScroll:Fa,onMouseEnter:Bl},pe.createElement(Pe,{prefixCls:An,height:_r,offsetX:Ho,offsetY:io,scrollWidth:or,onInnerResize:dn,ref:dr,innerProps:$t,rtl:hi,extra:hl},bl))),gr&&_r>Dn&&pe.createElement(Ae,{ref:Jo,prefixCls:An,scrollOffset:Zr,scrollRange:_r,rtl:hi,onScroll:$o,onStartMove:Po,onStopMove:Li,spinSize:ao,containerSize:oo.height,style:yr==null?void 0:yr.verticalScrollBar,thumbStyle:yr==null?void 0:yr.verticalScrollBarThumb}),gr&&or&&pe.createElement(Ae,{ref:Vo,prefixCls:An,scrollOffset:Ho,scrollRange:or,rtl:hi,onScroll:$o,onStartMove:Po,onStopMove:Li,spinSize:Zi,containerSize:oo.width,horizontal:!0,style:yr==null?void 0:yr.horizontalScrollBar,thumbStyle:yr==null?void 0:yr.horizontalScrollBarThumb}))}var Io=pe.forwardRef(Vi);Io.displayName="List";var Mo=Io,ro=Mo},66392:function(Sn,vn){"use strict";var ot;var st=Symbol.for("react.element"),Ft=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),Ge=Symbol.for("react.strict_mode"),Re=Symbol.for("react.profiler"),fe=Symbol.for("react.provider"),pe=Symbol.for("react.context"),be=Symbol.for("react.server_context"),Ee=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),ve=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),ee;ee=Symbol.for("react.module.reference");function z(oe){if(typeof oe=="object"&&oe!==null){var ie=oe.$$typeof;switch(ie){case st:switch(oe=oe.type,oe){case ae:case Re:case Ge:case we:case Te:return oe;default:switch(oe=oe&&oe.$$typeof,oe){case be:case pe:case Ee:case Pe:case ve:case fe:return oe;default:return ie}}case Ft:return ie}}}ot=pe,ot=fe,ot=st,ot=Ee,ot=ae,ot=Pe,ot=ve,ot=Ft,ot=Re,ot=Ge,ot=we,ot=Te,ot=function(){return!1},ot=function(){return!1},ot=function(oe){return z(oe)===pe},ot=function(oe){return z(oe)===fe},ot=function(oe){return typeof oe=="object"&&oe!==null&&oe.$$typeof===st},ot=function(oe){return z(oe)===Ee},ot=function(oe){return z(oe)===ae},ot=function(oe){return z(oe)===Pe},ot=function(oe){return z(oe)===ve},ot=function(oe){return z(oe)===Ft},ot=function(oe){return z(oe)===Re},ot=function(oe){return z(oe)===Ge},ot=function(oe){return z(oe)===we},ot=function(oe){return z(oe)===Te},ot=function(oe){return typeof oe=="string"||typeof oe=="function"||oe===ae||oe===Re||oe===Ge||oe===we||oe===Te||oe===de||typeof oe=="object"&&oe!==null&&(oe.$$typeof===Pe||oe.$$typeof===ve||oe.$$typeof===fe||oe.$$typeof===pe||oe.$$typeof===Ee||oe.$$typeof===ee||oe.getModuleId!==void 0)},ot=z},31461:function(Sn,vn,ot){"use strict";ot(66392)},58971:function(Sn,vn,ot){var st=ot(62195),Ft=ot(39015),ae=[ot(19257)];Sn.exports=st.createStore(Ft,ae)},19257:function(Sn,vn,ot){Sn.exports=st;function st(){return ot(55703),{}}},55703:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(Sn){return Sn<10?"0"+Sn:Sn}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(Sn){return rx_escapable.lastIndex=0,rx_escapable.test(Sn)?'"'+Sn.replace(rx_escapable,function(vn){var ot=meta[vn];return typeof ot=="string"?ot:"\\u"+("0000"+vn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Sn+'"'}function str(Sn,vn){var ot,st,Ft,ae,Ge=gap,Re,fe=vn[Sn];switch(fe&&typeof fe=="object"&&typeof fe.toJSON=="function"&&(fe=fe.toJSON(Sn)),typeof rep=="function"&&(fe=rep.call(vn,Sn,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,Re=[],Object.prototype.toString.apply(fe)==="[object Array]"){for(ae=fe.length,ot=0;ot<ae;ot+=1)Re[ot]=str(ot,fe)||"null";return Ft=Re.length===0?"[]":gap?`[
|
|
`+gap+Re.join(`,
|
|
`+gap)+`
|
|
`+Ge+"]":"["+Re.join(",")+"]",gap=Ge,Ft}if(rep&&typeof rep=="object")for(ae=rep.length,ot=0;ot<ae;ot+=1)typeof rep[ot]=="string"&&(st=rep[ot],Ft=str(st,fe),Ft&&Re.push(quote(st)+(gap?": ":":")+Ft));else for(st in fe)Object.prototype.hasOwnProperty.call(fe,st)&&(Ft=str(st,fe),Ft&&Re.push(quote(st)+(gap?": ":":")+Ft));return Ft=Re.length===0?"{}":gap?`{
|
|
`+gap+Re.join(`,
|
|
`+gap)+`
|
|
`+Ge+"}":"{"+Re.join(",")+"}",gap=Ge,Ft}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Sn,vn,ot){var st;if(gap="",indent="",typeof ot=="number")for(st=0;st<ot;st+=1)indent+=" ";else typeof ot=="string"&&(indent=ot);if(rep=vn,vn&&typeof vn!="function"&&(typeof vn!="object"||typeof vn.length!="number"))throw new Error("JSON.stringify");return str("",{"":Sn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Sn,vn){var ot,st,Ft=Sn[vn];if(Ft&&typeof Ft=="object")for(ot in Ft)Object.prototype.hasOwnProperty.call(Ft,ot)&&(st=walk(Ft,ot),st!==void 0?Ft[ot]=st:delete Ft[ot]);return reviver.call(Sn,vn,Ft)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Sn){return"\\u"+("0000"+Sn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},62195:function(Sn,vn,ot){var st=ot(69078),Ft=st.slice,ae=st.pluck,Ge=st.each,Re=st.bind,fe=st.create,pe=st.isList,be=st.isFunction,Ee=st.isObject;Sn.exports={createStore:ve};var we={version:"2.0.12",enabled:!1,get:function(Pe,de){var ee=this.storage.read(this._namespacePrefix+Pe);return this._deserialize(ee,de)},set:function(Pe,de){return de===void 0?this.remove(Pe):(this.storage.write(this._namespacePrefix+Pe,this._serialize(de)),de)},remove:function(Pe){this.storage.remove(this._namespacePrefix+Pe)},each:function(Pe){var de=this;this.storage.each(function(ee,z){Pe.call(de,de._deserialize(ee),(z||"").replace(de._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(Pe){return this._namespacePrefix=="__storejs_"+Pe+"_"},createStore:function(){return ve.apply(this,arguments)},addPlugin:function(Pe){this._addPlugin(Pe)},namespace:function(Pe){return ve(this.storage,this.plugins,Pe)}};function Te(){var Pe=typeof console=="undefined"?null:console;if(Pe){var de=Pe.warn?Pe.warn:Pe.log;de.apply(Pe,arguments)}}function ve(Pe,de,ee){ee||(ee=""),Pe&&!pe(Pe)&&(Pe=[Pe]),de&&!pe(de)&&(de=[de]);var z=ee?"__storejs_"+ee+"_":"",oe=ee?new RegExp("^"+z):null,ie=/^[a-zA-Z0-9_\-]*$/;if(!ie.test(ee))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var le={_namespacePrefix:z,_namespaceRegexp:oe,_testStorage:function(me){try{var xe="__storejs__test__";me.write(xe,xe);var Ae=me.read(xe)===xe;return me.remove(xe),Ae}catch(De){return!1}},_assignPluginFnProp:function(me,xe){var Ae=this[xe];this[xe]=function(){var Fe=Ft(arguments,0),je=this;function Le(){if(Ae)return Ge(arguments,function(Ue,Je){Fe[Je]=Ue}),Ae.apply(je,Fe)}var Be=[Le].concat(Fe);return me.apply(je,Be)}},_serialize:function(me){return JSON.stringify(me)},_deserialize:function(me,xe){if(!me)return xe;var Ae="";try{Ae=JSON.parse(me)}catch(De){Ae=me}return Ae!==void 0?Ae:xe},_addStorage:function(me){this.enabled||this._testStorage(me)&&(this.storage=me,this.enabled=!0)},_addPlugin:function(me){var xe=this;if(pe(me)){Ge(me,function(Fe){xe._addPlugin(Fe)});return}var Ae=ae(this.plugins,function(Fe){return me===Fe});if(!Ae){if(this.plugins.push(me),!be(me))throw new Error("Plugins must be function values that return objects");var De=me.call(this);if(!Ee(De))throw new Error("Plugins must return an object of function properties");Ge(De,function(Fe,je){if(!be(Fe))throw new Error("Bad plugin property: "+je+" from plugin "+me.name+". Plugins should only return functions.");xe._assignPluginFnProp(Fe,je)})}},addStorage:function(me){Te("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(me)}},ue=fe(le,we,{plugins:[]});return ue.raw={},Ge(ue,function(me,xe){be(me)&&(ue.raw[xe]=Re(ue,me))}),Ge(Pe,function(me){ue._addStorage(me)}),Ge(de,function(me){ue._addPlugin(me)}),ue}},69078:function(Sn,vn,ot){var st=Re(),Ft=fe(),ae=pe(),Ge=typeof window!="undefined"?window:ot.g;Sn.exports={assign:st,create:Ft,trim:ae,bind:be,slice:Ee,each:we,map:Te,pluck:ve,isList:Pe,isFunction:de,isObject:ee,Global:Ge};function Re(){return Object.assign?Object.assign:function(oe,ie,le,ue){for(var me=1;me<arguments.length;me++)we(Object(arguments[me]),function(xe,Ae){oe[Ae]=xe});return oe}}function fe(){if(Object.create)return function(ie,le,ue,me){var xe=Ee(arguments,1);return st.apply(this,[Object.create(ie)].concat(xe))};{let oe=function(){};var z=oe;return function(le,ue,me,xe){var Ae=Ee(arguments,1);return oe.prototype=le,st.apply(this,[new oe].concat(Ae))}}}function pe(){return String.prototype.trim?function(oe){return String.prototype.trim.call(oe)}:function(oe){return oe.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function be(z,oe){return function(){return oe.apply(z,Array.prototype.slice.call(arguments,0))}}function Ee(z,oe){return Array.prototype.slice.call(z,oe||0)}function we(z,oe){ve(z,function(ie,le){return oe(ie,le),!1})}function Te(z,oe){var ie=Pe(z)?[]:{};return ve(z,function(le,ue){return ie[ue]=oe(le,ue),!1}),ie}function ve(z,oe){if(Pe(z)){for(var ie=0;ie<z.length;ie++)if(oe(z[ie],ie))return z[ie]}else for(var le in z)if(z.hasOwnProperty(le)&&oe(z[le],le))return z[le]}function Pe(z){return z!=null&&typeof z!="function"&&typeof z.length=="number"}function de(z){return z&&{}.toString.call(z)==="[object Function]"}function ee(z){return z&&{}.toString.call(z)==="[object Object]"}},39015:function(Sn,vn,ot){Sn.exports=[ot(39627),ot(95347),ot(34524),ot(45580),ot(58855),ot(8728)]},45580:function(Sn,vn,ot){var st=ot(69078),Ft=st.Global,ae=st.trim;Sn.exports={name:"cookieStorage",read:Re,write:pe,each:fe,remove:be,clearAll:Ee};var Ge=Ft.document;function Re(Te){if(!Te||!we(Te))return null;var ve="(?:^|.*;\\s*)"+escape(Te).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Ge.cookie.replace(new RegExp(ve),"$1"))}function fe(Te){for(var ve=Ge.cookie.split(/; ?/g),Pe=ve.length-1;Pe>=0;Pe--)if(ae(ve[Pe])){var de=ve[Pe].split("="),ee=unescape(de[0]),z=unescape(de[1]);Te(z,ee)}}function pe(Te,ve){Te&&(Ge.cookie=escape(Te)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function be(Te){!Te||!we(Te)||(Ge.cookie=escape(Te)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function Ee(){fe(function(Te,ve){be(ve)})}function we(Te){return new RegExp("(?:^|;\\s*)"+escape(Te).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Ge.cookie)}},39627:function(Sn,vn,ot){var st=ot(69078),Ft=st.Global;Sn.exports={name:"localStorage",read:Ge,write:Re,each:fe,remove:pe,clearAll:be};function ae(){return Ft.localStorage}function Ge(Ee){return ae().getItem(Ee)}function Re(Ee,we){return ae().setItem(Ee,we)}function fe(Ee){for(var we=ae().length-1;we>=0;we--){var Te=ae().key(we);Ee(Ge(Te),Te)}}function pe(Ee){return ae().removeItem(Ee)}function be(){return ae().clear()}},8728:function(Sn){Sn.exports={name:"memoryStorage",read:ot,write:st,each:Ft,remove:ae,clearAll:Ge};var vn={};function ot(Re){return vn[Re]}function st(Re,fe){vn[Re]=fe}function Ft(Re){for(var fe in vn)vn.hasOwnProperty(fe)&&Re(vn[fe],fe)}function ae(Re){delete vn[Re]}function Ge(Re){vn={}}},95347:function(Sn,vn,ot){var st=ot(69078),Ft=st.Global;Sn.exports={name:"oldFF-globalStorage",read:Ge,write:Re,each:fe,remove:pe,clearAll:be};var ae=Ft.globalStorage;function Ge(Ee){return ae[Ee]}function Re(Ee,we){ae[Ee]=we}function fe(Ee){for(var we=ae.length-1;we>=0;we--){var Te=ae.key(we);Ee(ae[Te],Te)}}function pe(Ee){return ae.removeItem(Ee)}function be(){fe(function(Ee,we){delete ae[Ee]})}},34524:function(Sn,vn,ot){var st=ot(69078),Ft=st.Global;Sn.exports={name:"oldIE-userDataStorage",write:pe,read:be,each:Ee,remove:we,clearAll:Te};var ae="storejs",Ge=Ft.document,Re=de(),fe=(Ft.navigator?Ft.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function pe(ee,z){if(!fe){var oe=Pe(ee);Re(function(ie){ie.setAttribute(oe,z),ie.save(ae)})}}function be(ee){if(!fe){var z=Pe(ee),oe=null;return Re(function(ie){oe=ie.getAttribute(z)}),oe}}function Ee(ee){Re(function(z){for(var oe=z.XMLDocument.documentElement.attributes,ie=oe.length-1;ie>=0;ie--){var le=oe[ie];ee(z.getAttribute(le.name),le.name)}})}function we(ee){var z=Pe(ee);Re(function(oe){oe.removeAttribute(z),oe.save(ae)})}function Te(){Re(function(ee){var z=ee.XMLDocument.documentElement.attributes;ee.load(ae);for(var oe=z.length-1;oe>=0;oe--)ee.removeAttribute(z[oe].name);ee.save(ae)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function Pe(ee){return ee.replace(/^\d/,"___$&").replace(ve,"___")}function de(){if(!Ge||!Ge.documentElement||!Ge.documentElement.addBehavior)return null;var ee="script",z,oe,ie;try{oe=new ActiveXObject("htmlfile"),oe.open(),oe.write("<"+ee+">document.w=window</"+ee+'><iframe src="/favicon.ico"></iframe>'),oe.close(),z=oe.w.frames[0].document,ie=z.createElement("div")}catch(le){ie=Ge.createElement("div"),z=Ge.body}return function(le){var ue=[].slice.call(arguments,0);ue.unshift(ie),z.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(ae),le.apply(this,ue),z.removeChild(ie)}}},58855:function(Sn,vn,ot){var st=ot(69078),Ft=st.Global;Sn.exports={name:"sessionStorage",read:Ge,write:Re,each:fe,remove:pe,clearAll:be};function ae(){return Ft.sessionStorage}function Ge(Ee){return ae().getItem(Ee)}function Re(Ee,we){return ae().setItem(Ee,we)}function fe(Ee){for(var we=ae().length-1;we>=0;we--){var Te=ae().key(we);Ee(Ge(Te),Te)}}function pe(Ee){return ae().removeItem(Ee)}function be(){return ae().clear()}},4977:function(Sn){"use strict";Sn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},17423:function(Sn,vn,ot){"use strict";ot.d(vn,{Z:function(){return be}});const st=Ee=>typeof Ee=="object"&&Ee!=null&&Ee.nodeType===1,Ft=(Ee,we)=>(!we||Ee!=="hidden")&&Ee!=="visible"&&Ee!=="clip",ae=(Ee,we)=>{if(Ee.clientHeight<Ee.scrollHeight||Ee.clientWidth<Ee.scrollWidth){const Te=getComputedStyle(Ee,null);return Ft(Te.overflowY,we)||Ft(Te.overflowX,we)||(ve=>{const Pe=(de=>{if(!de.ownerDocument||!de.ownerDocument.defaultView)return null;try{return de.ownerDocument.defaultView.frameElement}catch(ee){return null}})(ve);return!!Pe&&(Pe.clientHeight<ve.scrollHeight||Pe.clientWidth<ve.scrollWidth)})(Ee)}return!1},Ge=(Ee,we,Te,ve,Pe,de,ee,z)=>de<Ee&&ee>we||de>Ee&&ee<we?0:de<=Ee&&z<=Te||ee>=we&&z>=Te?de-Ee-ve:ee>we&&z<Te||de<Ee&&z>Te?ee-we+Pe:0,Re=Ee=>{const we=Ee.parentElement;return we==null?Ee.getRootNode().host||null:we},fe=(Ee,we)=>{var Te,ve,Pe,de;if(typeof document=="undefined")return[];const{scrollMode:ee,block:z,inline:oe,boundary:ie,skipOverflowHiddenElements:le}=we,ue=typeof ie=="function"?ie:wt=>wt!==ie;if(!st(Ee))throw new TypeError("Invalid target");const me=document.scrollingElement||document.documentElement,xe=[];let Ae=Ee;for(;st(Ae)&&ue(Ae);){if(Ae=Re(Ae),Ae===me){xe.push(Ae);break}Ae!=null&&Ae===document.body&&ae(Ae)&&!ae(document.documentElement)||Ae!=null&&ae(Ae,le)&&xe.push(Ae)}const De=(ve=(Te=window.visualViewport)==null?void 0:Te.width)!=null?ve:innerWidth,Fe=(de=(Pe=window.visualViewport)==null?void 0:Pe.height)!=null?de:innerHeight,{scrollX:je,scrollY:Le}=window,{height:Be,width:Ue,top:Je,right:He,bottom:We,left:at}=Ee.getBoundingClientRect(),{top:ft,right:mt,bottom:Lt,left:Xe}=(wt=>{const ht=window.getComputedStyle(wt);return{top:parseFloat(ht.scrollMarginTop)||0,right:parseFloat(ht.scrollMarginRight)||0,bottom:parseFloat(ht.scrollMarginBottom)||0,left:parseFloat(ht.scrollMarginLeft)||0}})(Ee);let et=z==="start"||z==="nearest"?Je-ft:z==="end"?We+Lt:Je+Be/2-ft+Lt,lt=oe==="center"?at+Ue/2-Xe+mt:oe==="end"?He+mt:at-Xe;const vt=[];for(let wt=0;wt<xe.length;wt++){const ht=xe[wt],{height:dt,width:ut,top:Pt,right:yt,bottom:gt,left:Tt}=ht.getBoundingClientRect();if(ee==="if-needed"&&Je>=0&&at>=0&&We<=Fe&&He<=De&&Je>=Pt&&We<=gt&&at>=Tt&&He<=yt)return vt;const ct=getComputedStyle(ht),Ye=parseInt(ct.borderLeftWidth,10),Ze=parseInt(ct.borderTopWidth,10),Se=parseInt(ct.borderRightWidth,10),Ne=parseInt(ct.borderBottomWidth,10);let $e=0,nt=0;const Ie="offsetWidth"in ht?ht.offsetWidth-ht.clientWidth-Ye-Se:0,ze="offsetHeight"in ht?ht.offsetHeight-ht.clientHeight-Ze-Ne:0,Ve="offsetWidth"in ht?ht.offsetWidth===0?0:ut/ht.offsetWidth:0,it="offsetHeight"in ht?ht.offsetHeight===0?0:dt/ht.offsetHeight:0;if(me===ht)$e=z==="start"?et:z==="end"?et-Fe:z==="nearest"?Ge(Le,Le+Fe,Fe,Ze,Ne,Le+et,Le+et+Be,Be):et-Fe/2,nt=oe==="start"?lt:oe==="center"?lt-De/2:oe==="end"?lt-De:Ge(je,je+De,De,Ye,Se,je+lt,je+lt+Ue,Ue),$e=Math.max(0,$e+Le),nt=Math.max(0,nt+je);else{$e=z==="start"?et-Pt-Ze:z==="end"?et-gt+Ne+ze:z==="nearest"?Ge(Pt,gt,dt,Ze,Ne+ze,et,et+Be,Be):et-(Pt+dt/2)+ze/2,nt=oe==="start"?lt-Tt-Ye:oe==="center"?lt-(Tt+ut/2)+Ie/2:oe==="end"?lt-yt+Se+Ie:Ge(Tt,yt,ut,Ye,Se+Ie,lt,lt+Ue,Ue);const{scrollLeft:St,scrollTop:Ct}=ht;$e=it===0?0:Math.max(0,Math.min(Ct+$e/it,ht.scrollHeight-dt/it+ze)),nt=Ve===0?0:Math.max(0,Math.min(St+nt/Ve,ht.scrollWidth-ut/Ve+Ie)),et+=Ct-$e,lt+=St-nt}vt.push({el:ht,top:$e,left:nt})}return vt},pe=Ee=>Ee===!1?{block:"end",inline:"nearest"}:(we=>we===Object(we)&&Object.keys(we).length!==0)(Ee)?Ee:{block:"start",inline:"nearest"};function be(Ee,we){if(!Ee.isConnected||!(Pe=>{let de=Pe;for(;de&&de.parentNode;){if(de.parentNode===document)return!0;de=de.parentNode instanceof ShadowRoot?de.parentNode.host:de.parentNode}return!1})(Ee))return;const Te=(Pe=>{const de=window.getComputedStyle(Pe);return{top:parseFloat(de.scrollMarginTop)||0,right:parseFloat(de.scrollMarginRight)||0,bottom:parseFloat(de.scrollMarginBottom)||0,left:parseFloat(de.scrollMarginLeft)||0}})(Ee);if((Pe=>typeof Pe=="object"&&typeof Pe.behavior=="function")(we))return we.behavior(fe(Ee,we));const ve=typeof we=="boolean"||we==null?void 0:we.behavior;for(const{el:Pe,top:de,left:ee}of fe(Ee,pe(we))){const z=de-Te.top+Te.bottom,oe=ee-Te.left+Te.right;Pe.scroll({top:z,left:oe,behavior:ve})}}}}]);
|